added sender ID export, edit payment bug fix, profile page bug fix

This commit is contained in:
Kwesi Banson
2026-10-29 12:23:00 +00:00
parent 8428d94abd
commit 965892ac62
15 changed files with 792 additions and 139 deletions

View File

@@ -552,6 +552,7 @@
data-amount="{{ $payment->invoice_amount }}"
data-date="{{ $payment->invoice_date ? \Carbon\Carbon::parse($payment->invoice_date)->format('Y-m-d') : '' }}"
data-status="{{ $payment->invoice_status }}"
data-remarks="{{ $payment->remarks }}"
title="Edit">
<i class="bi bi-pencil"></i>
</button>

View File

@@ -20,6 +20,9 @@
<i class="bi bi-border-center me-2"></i> Management Hub
</a>
@endif
<a href="{{ url('management') }}" class="sidebar-nav-item {{ request()->is('management') ? 'active' : '' }}">
<i class="bi bi-border-center me-2"></i> Management Hub
</a>
<div class="sidebar-heading mt-2">Core Entities</div>
<a href="{{ url('/clients') }}" class="sidebar-nav-item {{ request()->is('clients*') ? 'active' : '' }}">
<i class="bi bi-people me-2"></i> Clients
@@ -40,8 +43,9 @@
<a href="{{ url('/documents') }}" class="sidebar-nav-item {{ request()->is('documents*') ? 'active' : '' }}">
<i class="bi bi-folder2-open me-2"></i> Document Vault
</a>
@if(\Auth::user()->department->name == 'Technical')
@if(auth()->user()->hasRole('system_admin') || auth()->user()->hasRole('tech_team'))
<div class="sidebar-heading mt-2">Technical</div>
<!-- Infrastructure Parent Toggle -->
<a href="#infrastructureMenu" data-bs-toggle="collapse"
@@ -51,6 +55,8 @@
<i class="bi bi-chevron-down toggle-icon" style="font-size: 0.75rem;"></i>
</a>
<!-- Collapsible Sub-links -->
<div class="collapse {{ request()->is('servers*') ? 'show' : '' }}" id="infrastructureMenu">
<div class="d-flex flex-column ms-3 mt-1 border-start border-secondary ps-2">
@@ -83,4 +89,4 @@
<a href="{{ url('/activity-logs') }}" class="sidebar-nav-item {{ request()->is('activity-logs*') ? 'active' : '' }}">
<i class="bi bi-clock-history me-2"></i> Activity Logs
</a>
</aside>
</aside>

View File

@@ -122,11 +122,23 @@
<label class="form-label text-secondary fw-semibold small">Date of Birth (Month & Day)</label>
<div class="row g-2">
@php
// Extract current month and day if they exist in the DB (e.g., "12-25" or "2026-12-25")
$currentDob = $staff->dob ? date('m-d', strtotime($staff->dob)) : '--';
[$currMonth, $currDay] = explode('-', $currentDob) + [null, null];
$currMonth = null;
$currDay = null;
if ($staff->dob) {
$parts = explode('-', $staff->dob);
if (count($parts) === 3) {
// Handles "YYYY-MM-DD"
$currMonth = str_pad($parts[1], 2, '0', STR_PAD_LEFT);
$currDay = str_pad($parts[2], 2, '0', STR_PAD_LEFT);
} elseif (count($parts) === 2) {
// Handles "MM-DD"
$currMonth = str_pad($parts[0], 2, '0', STR_PAD_LEFT);
$currDay = str_pad($parts[1], 2, '0', STR_PAD_LEFT);
}
}
@endphp
<!-- Month Dropdown -->
<div class="col-7">
<select class="form-select" name="birth_month">
@@ -274,6 +286,9 @@
@push('scripts')
<script>
$(document).ready(function() {
// Force the browser (and any attached libraries like Select2) to visually update to the selected options
$('select[name="birth_month"]').val($('select[name="birth_month"] option[selected]').val()).trigger('change');
$('select[name="birth_day"]').val($('select[name="birth_day"] option[selected]').val()).trigger('change');
// Profile Photo Preview
$('#profilePhoto').on('change', function(e) {
if(e.target.files && e.target.files[0]) {

View File

@@ -43,9 +43,20 @@
<h4 class="fw-bold mb-1">SMS Sender IDs</h4>
<p class="text-secondary mb-0" style="font-size: 0.9rem;">Manage Sender IDs</p>
</div>
<button class="btn text-white fw-bold d-flex align-items-center" style="background-color: #5c4df0; border-radius: 8px;" id="btnOpenSenderModal">
<i class="bi bi-plus-lg me-2"></i> Add Sender ID
</button>
<div class="d-flex gap-2">
<!-- New Export Buttons -->
<a href="{{ route('senderids.export.excel', request()->query()) }}" class="btn btn-outline-success fw-bold d-flex align-items-center">
<i class="bi bi-file-earmark-excel me-1"></i> Excel
</a>
<a href="{{ route('senderids.export.pdf', request()->query()) }}" class="btn btn-outline-danger fw-bold d-flex align-items-center">
<i class="bi bi-file-earmark-pdf me-1"></i> PDF
</a>
<!-- Existing Add Button -->
<button class="btn text-white fw-bold d-flex align-items-center" style="background-color: #5c4df0; border-radius: 8px;" id="btnOpenSenderModal">
<i class="bi bi-plus-lg me-2"></i> Add Sender ID
</button>
</div>
</div>
<!-- KPIs -->

View File

@@ -0,0 +1,50 @@
<!DOCTYPE html>
<html>
<head>
<title>Sender IDs Export</title>
<style>
body { font-family: Arial, sans-serif; font-size: 11px; color: #333; }
.header { text-align: center; margin-bottom: 20px; }
.header h2 { margin: 0; padding: 0; color: #5c4df0; }
.header p { margin: 5px 0; color: #666; font-size: 10px; }
table { width: 100%; border-collapse: collapse; margin-top: 10px; }
th, td { border: 1px solid #dddddd; padding: 8px; text-align: left; }
th { background-color: #f8f9fc; font-weight: bold; text-transform: uppercase; font-size: 10px; }
.badge-yes { color: #5c4df0; font-weight: bold; }
.badge-no { color: #6c757d; }
</style>
</head>
<body>
<div class="header">
<h2>SMS Sender IDs Directory</h2>
<p>Exported on: {{ now()->format('F j, Y, g:i a') }}</p>
</div>
<table>
<thead>
<tr>
<th>Sender ID</th>
<th>Direct MNO</th>
<th>MNO / Supplier Name</th>
<th>Type</th>
<th>Status</th>
<th>Created Date</th>
</tr>
</thead>
<tbody>
@foreach($senderIds as $sender)
<tr>
<td style="font-weight: bold;">{{ $sender->senderid }}</td>
<td class="{{ $sender->direct_mno == 'YES' ? 'badge-yes' : 'badge-no' }}">{{ $sender->direct_mno }}</td>
<td>{{ $sender->direct_mno == 'YES' ? ($sender->mno_name ?? 'N/A') : ($sender->supplier_name ?? 'N/A') }}</td>
<td>{{ $sender->type }}</td>
<td>{{ strtoupper($sender->status) }}</td>
<td>{{ $sender->created_at ? $sender->created_at->format('M d, Y') : 'N/A' }}</td>
</tr>
@endforeach
</tbody>
</table>
</body>
</html>