updated client payment, file upload and notes
This commit is contained in:
@@ -296,7 +296,12 @@
|
||||
<!-- Tab Links -->
|
||||
<ul class="nav nav-tabs card-header-tabs m-0" id="clientRecordTabs" role="tablist">
|
||||
<li class="nav-item" role="presentation">
|
||||
<button class="nav-link active fw-bold text-dark" id="shortcodes-tab" data-bs-toggle="tab" data-bs-target="#shortcodes-pane" type="button" role="tab">
|
||||
<button class="nav-link active fw-bold" id="notes-tab" data-bs-toggle="tab" data-bs-target="#notes-pane" type="button">
|
||||
<i class="bi bi-chat-square-text me-1"></i> Notes
|
||||
</button>
|
||||
</li>
|
||||
<li class="nav-item" role="presentation">
|
||||
<button class="nav-link fw-bold text-dark" id="shortcodes-tab" data-bs-toggle="tab" data-bs-target="#shortcodes-pane" type="button" role="tab">
|
||||
<i class="bi bi-code-square text-primary me-1"></i> Short Codes
|
||||
<span class="badge bg-primary bg-opacity-10 text-primary ms-1">{{ count($voice_codes) + count($sms_codes) + count($ussd_codes) }}</span>
|
||||
</button>
|
||||
@@ -331,9 +336,38 @@
|
||||
</div>
|
||||
|
||||
<div class="card-body bg-light tab-content" id="clientRecordTabsContent">
|
||||
|
||||
<!-- tab 0 Notes -->
|
||||
<div class="tab-pane fade show active" id="notes-pane" role="tabpanel" tabindex="0">
|
||||
<div class="d-flex justify-content-end mb-3">
|
||||
<button class="btn btn-sm btn-primary" data-bs-toggle="modal" data-bs-target="#addNoteModal">
|
||||
<i class="bi bi-plus-lg"></i> Add Note
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="list-group">
|
||||
@forelse($show_notes as $note)
|
||||
<div class="list-group-item p-3 mb-2 border rounded shadow-sm">
|
||||
<p class="mb-2 text-dark">{{ $note->notes_body }}</p>
|
||||
<div class="d-flex justify-content-between align-items-center text-muted" style="font-size: 0.8rem;">
|
||||
<span>
|
||||
<i class="bi bi-person-fill me-1 text-primary"></i>
|
||||
<strong class="text-secondary">{{ $note->created_by_info->name ?? 'System User' }}</strong>
|
||||
</span>
|
||||
<span>
|
||||
<i class="bi bi-clock me-1"></i>
|
||||
{{ $note->created_at->format('d M Y, h:i A') }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
@empty
|
||||
<div class="text-center py-4 text-muted small">
|
||||
<i class="bi bi-chat-square-text fs-4 d-block mb-1"></i> No notes added for this client yet.
|
||||
</div>
|
||||
@endforelse
|
||||
</div>
|
||||
</div>
|
||||
<!-- TAB 1: SHORT CODES -->
|
||||
<div class="tab-pane fade show active" id="shortcodes-pane" role="tabpanel" tabindex="0">
|
||||
<div class="tab-pane fade " id="shortcodes-pane" role="tabpanel" tabindex="0">
|
||||
@php
|
||||
$allCodes = collect($voice_codes)->concat($sms_codes)->concat($ussd_codes);
|
||||
@endphp
|
||||
@@ -343,22 +377,29 @@
|
||||
<table class="table table-hover align-middle mb-0 bg-white border rounded">
|
||||
<thead class="table-light">
|
||||
<tr style="font-size: 0.8rem;" class="text-secondary text-uppercase">
|
||||
<th>Type</th>
|
||||
<th>Shortcode</th>
|
||||
<th>Network</th>
|
||||
<th>Status</th>
|
||||
<th>Expiry Date</th>
|
||||
<th style="width: 10%;">Type</th>
|
||||
<th style="width: 15%;">Shortcode</th>
|
||||
<th style="width: 20%;">Network</th>
|
||||
<th style="width: 10%;">Status</th>
|
||||
<th style="width: 30%;">Remarks</th>
|
||||
<th style="width: 15%;">Expiry Date</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($allCodes as $code)
|
||||
<tr>
|
||||
<td><span class="badge bg-secondary text-uppercase" style="font-size: 0.7rem;">{{ $code->code_type ?? 'N/A' }}</span></td>
|
||||
<td class="fw-bold text-dark font-monospace">{{ $code->shortcode ?? 'N/A' }}</td>
|
||||
<td>{{ $code->network ?? 'N/A' }}</td>
|
||||
<td class="fw-bold text-dark font-monospace text-break">{{ $code->shortcode ?? 'N/A' }}</td>
|
||||
<td class="text-break">{{ $code->network ?? 'N/A' }}</td>
|
||||
<td>
|
||||
<span class="badge bg-success bg-opacity-10 text-success">{{ $code->status ?? 'Active' }}</span>
|
||||
</td>
|
||||
<!-- Styled Remarks Column with text-wrap and max-width bounds -->
|
||||
<td>
|
||||
<div class="text-muted text-break" style="font-size: 0.9rem; max-width: 250px; line-height: 1.3;">
|
||||
{{ $code->remarks ?? '-' }}
|
||||
</div>
|
||||
</td>
|
||||
<td class="text-muted small">{{ $code->expiry_date ? \Carbon\Carbon::parse($code->expiry_date)->format('d M Y') : 'N/A' }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
@@ -380,6 +421,7 @@
|
||||
<thead class="table-light">
|
||||
<tr style="font-size: 0.8rem;" class="text-secondary text-uppercase">
|
||||
<th>Invoice #</th>
|
||||
<th>Services</th>
|
||||
<th>Amount</th>
|
||||
<th>Date</th>
|
||||
<th>Status</th>
|
||||
@@ -389,7 +431,23 @@
|
||||
@foreach($recent_payments as $payment)
|
||||
<tr>
|
||||
<td class="fw-bold text-dark">{{ $payment->invoice_number ?? 'N/A' }}</td>
|
||||
<td class="fw-semibold text-success">{{ number_format($payment->invoice_amount ?? 0, 2) }}</td>
|
||||
|
||||
<td>
|
||||
@php
|
||||
$serviceNames = $payment->service_names;
|
||||
@endphp
|
||||
@if($serviceNames->count() > 0)
|
||||
<div class="d-flex flex-wrap gap-1">
|
||||
@foreach($serviceNames as $serviceName)
|
||||
<span class="badge bg-light text-primary border" style="font-size: 0.75rem;">
|
||||
{{ $serviceName }}
|
||||
</span>
|
||||
@endforeach
|
||||
</div>
|
||||
@else
|
||||
<span class="text-muted small">-</span>
|
||||
@endif
|
||||
</td>
|
||||
<td class="text-muted small">{{ $payment->invoice_date ? \Carbon\Carbon::parse($payment->invoice_date)->format('d M Y') : 'N/A' }}</td>
|
||||
<td>
|
||||
<span class="badge bg-info bg-opacity-10 text-info text-uppercase">{{ $payment->invoice_status ?? 'Pending' }}</span>
|
||||
@@ -421,7 +479,8 @@
|
||||
</div>
|
||||
</div>
|
||||
@if(!empty($file->file_path))
|
||||
<a href="{{ asset('storage/client_files/' . $file->file_path) }}" target="_blank" class="btn btn-sm btn-light text-primary" title="Download File">
|
||||
|
||||
<a href="{{ route('client-files.download', $file->id) }}" class="btn btn-sm btn-light text-primary" target="_blank" title="{{ $file->name }}">
|
||||
<i class="bi bi-download"></i>
|
||||
</a>
|
||||
@endif
|
||||
@@ -489,6 +548,8 @@
|
||||
</div>
|
||||
@include('clients.partials.shortcode-payment-docs-modal')
|
||||
@endsection
|
||||
@section('scripts')
|
||||
<script src="{{ asset('js/client-show-modals.js') }}"></script>
|
||||
@endsection
|
||||
@push('scripts')
|
||||
<script src="{{ asset('public/assets/js/client-show-modal.js') }}"></script>
|
||||
<script>
|
||||
</script>
|
||||
@endpush
|
||||
Reference in New Issue
Block a user