fixed otp email settings
This commit is contained in:
@@ -0,0 +1,129 @@
|
||||
<!-- EDIT NOTE MODAL -->
|
||||
<div class="modal fade" id="editNoteModal" tabindex="-1" aria-hidden="true">
|
||||
<div class="modal-dialog modal-dialog-centered">
|
||||
<div class="modal-content border-0 shadow">
|
||||
<div class="modal-header bg-light">
|
||||
<h6 class="modal-title fw-bold"><i class="bi bi-pencil me-2 text-primary"></i>Edit Note</h6>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
</div>
|
||||
<form id="editNoteForm" method="POST">
|
||||
@csrf
|
||||
@method('PUT')
|
||||
<input type="hidden" id="edit_note_id" name="note_id">
|
||||
<div class="modal-body p-4">
|
||||
<div class="mb-3">
|
||||
<label class="form-label text-muted small fw-bold">Note Content</label>
|
||||
<textarea class="form-control" id="edit_note_body" name="notes_body" rows="4" required></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer bg-light">
|
||||
<button type="button" class="btn btn-sm btn-outline-secondary fw-bold" data-bs-dismiss="modal">Cancel</button>
|
||||
<button type="submit" class="btn btn-sm btn-primary fw-bold px-3">Update Note</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- EDIT SHORT CODE MODAL -->
|
||||
<div class="modal fade" id="editShortcodeModal" tabindex="-1" aria-hidden="true">
|
||||
<div class="modal-dialog modal-dialog-centered modal-lg">
|
||||
<div class="modal-content border-0 shadow">
|
||||
<div class="modal-header bg-light">
|
||||
<h6 class="modal-title fw-bold"><i class="bi bi-pencil me-2 text-primary"></i>Edit Short Code</h6>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
</div>
|
||||
<form id="editShortcodeForm" method="POST">
|
||||
@csrf
|
||||
@method('PUT')
|
||||
<input type="hidden" id="edit_shortcode_id" name="shortcode_id">
|
||||
<div class="modal-body p-4">
|
||||
<div class="row g-3">
|
||||
<div class="col-md-6">
|
||||
<label class="form-label text-muted small fw-bold">Type</label>
|
||||
<select class="form-select" id="edit_sc_type" name="code_type" required>
|
||||
<option value="VOICE">VOICE</option>
|
||||
<option value="SMS">SMS</option>
|
||||
<option value="USSD">USSD</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<label class="form-label text-muted small fw-bold">Shortcode</label>
|
||||
<input type="text" class="form-control font-monospace" id="edit_sc_code" name="shortcode" required>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<label class="form-label text-muted small fw-bold">Network</label>
|
||||
<input type="text" class="form-control" id="edit_sc_network" name="network" required>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<label class="form-label text-muted small fw-bold">Status</label>
|
||||
<select class="form-select" id="edit_sc_status" name="status" required>
|
||||
<option value="Active">Active</option>
|
||||
<option value="Inactive">Inactive</option>
|
||||
<option value="Pending">Pending</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<label class="form-label text-muted small fw-bold">Expiry Date</label>
|
||||
<input type="date" class="form-control" id="edit_sc_expiry" name="expiry_date">
|
||||
</div>
|
||||
<div class="col-md-12">
|
||||
<label class="form-label text-muted small fw-bold">Remarks</label>
|
||||
<textarea class="form-control" id="edit_sc_remarks" name="remarks" rows="2"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer bg-light">
|
||||
<button type="button" class="btn btn-sm btn-outline-secondary fw-bold" data-bs-dismiss="modal">Cancel</button>
|
||||
<button type="submit" class="btn btn-sm btn-primary fw-bold px-3">Update Short Code</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- EDIT PAYMENT MODAL -->
|
||||
<div class="modal fade" id="editPaymentModal" tabindex="-1" aria-hidden="true">
|
||||
<div class="modal-dialog modal-dialog-centered modal-lg">
|
||||
<div class="modal-content border-0 shadow">
|
||||
<div class="modal-header bg-light">
|
||||
<h6 class="modal-title fw-bold"><i class="bi bi-pencil me-2 text-primary"></i>Edit Payment</h6>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
</div>
|
||||
<form id="editPaymentForm" method="POST">
|
||||
@csrf
|
||||
@method('PUT')
|
||||
<input type="hidden" id="edit_payment_id" name="payment_id">
|
||||
<div class="modal-body p-4">
|
||||
<div class="row g-3">
|
||||
<div class="col-md-6">
|
||||
<label class="form-label text-muted small fw-bold">Invoice Number</label>
|
||||
<input type="text" class="form-control" id="edit_pay_invoice" name="invoice_number" required>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<label class="form-label text-muted small fw-bold">Amount</label>
|
||||
<input type="number" step="0.01" class="form-control" id="edit_pay_amount" name="invoice_amount" required>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<label class="form-label text-muted small fw-bold">Invoice Date</label>
|
||||
<input type="date" class="form-control" id="edit_pay_date" name="invoice_date" required>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<label class="form-label text-muted small fw-bold">Status</label>
|
||||
<select class="form-select" id="edit_pay_status" name="invoice_status" required>
|
||||
<option value="Paid">Paid</option>
|
||||
<option value="Pending">Pending</option>
|
||||
<option value="Overdue">Overdue</option>
|
||||
<option value="Cancelled">Cancelled</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer bg-light">
|
||||
<button type="button" class="btn btn-sm btn-outline-secondary fw-bold" data-bs-dismiss="modal">Cancel</button>
|
||||
<button type="submit" class="btn btn-sm btn-primary fw-bold px-3">Update Payment</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -370,15 +370,29 @@
|
||||
</div>
|
||||
@endif
|
||||
<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 class="d-flex justify-content-between align-items-center mt-2">
|
||||
<div class="text-muted" style="font-size: 0.8rem;">
|
||||
<span class="me-3">
|
||||
<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>
|
||||
|
||||
<!-- 2-Day Edit/Delete Restriction Logic -->
|
||||
@if($note->created_at->diffInDays(now()) <= 2)
|
||||
<div class="btn-group">
|
||||
<button class="btn btn-sm btn-light text-primary edit-note-btn" data-id="{{ $note->id }}" title="Edit Note">
|
||||
<i class="bi bi-pencil"></i>
|
||||
</button>
|
||||
<button class="btn btn-sm btn-light text-danger delete-note-btn" data-id="{{ $note->id }}" title="Delete Note">
|
||||
<i class="bi bi-trash"></i>
|
||||
</button>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
@empty
|
||||
@@ -389,7 +403,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- TAB 1: SHORT CODES -->
|
||||
<!-- TAB 1: SHORT CODES -->
|
||||
<div class="tab-pane fade " id="shortcodes-pane" role="tabpanel" tabindex="0">
|
||||
@php
|
||||
$allCodes = collect($voice_codes)->concat($sms_codes)->concat($ussd_codes);
|
||||
@@ -402,10 +416,11 @@
|
||||
<tr style="font-size: 0.8rem;" class="text-secondary text-uppercase">
|
||||
<th style="width: 10%;">Type</th>
|
||||
<th style="width: 15%;">Shortcode</th>
|
||||
<th style="width: 20%;">Network</th>
|
||||
<th style="width: 15%;">Network</th>
|
||||
<th style="width: 10%;">Status</th>
|
||||
<th style="width: 30%;">Remarks</th>
|
||||
<th style="width: 25%;">Remarks</th>
|
||||
<th style="width: 15%;">Expiry Date</th>
|
||||
<th style="width: 10%;" class="text-end">Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -417,13 +432,29 @@
|
||||
<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>
|
||||
<td class="text-end">
|
||||
|
||||
<button class="btn btn-sm btn-light text-primary edit-shortcode-btn"
|
||||
data-id="{{ $code->id }}"
|
||||
data-type="{{ $code->code_type }}"
|
||||
data-code="{{ $code->shortcode }}"
|
||||
data-network="{{ $code->network }}"
|
||||
data-status="{{ $code->status }}"
|
||||
data-remarks="{{ $code->remarks }}"
|
||||
data-expiry="{{ $code->expiry_date ? \Carbon\Carbon::parse($code->expiry_date)->format('Y-m-d') : '' }}"
|
||||
title="Edit">
|
||||
<i class="bi bi-pencil"></i>
|
||||
</button>
|
||||
<button class="btn btn-sm btn-light text-danger delete-shortcode-btn" data-id="{{ $code->id }}" title="Delete">
|
||||
<i class="bi bi-trash"></i>
|
||||
</button>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
@@ -448,35 +479,47 @@
|
||||
<th>Amount</th>
|
||||
<th>Date</th>
|
||||
<th>Status</th>
|
||||
<th class="text-end">Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($recent_payments as $payment)
|
||||
<?php //dump($payment); ?>
|
||||
<tr>
|
||||
<td class="fw-bold text-dark">{{ $payment->invoice_number ?? 'N/A' }}</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
|
||||
@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>{{ $payment->invoice_amount }} </td>
|
||||
<td>{{ $payment->invoice_amount }}</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>
|
||||
</td>
|
||||
<td class="text-end">
|
||||
<button class="btn btn-sm btn-light text-primary edit-payment-btn"
|
||||
data-id="{{ $payment->id }}"
|
||||
data-invoice="{{ $payment->invoice_number }}"
|
||||
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 }}"
|
||||
title="Edit">
|
||||
<i class="bi bi-pencil"></i>
|
||||
</button>
|
||||
<button class="btn btn-sm btn-light text-danger delete-payment-btn" data-id="{{ $payment->id }}" title="Delete">
|
||||
<i class="bi bi-trash"></i>
|
||||
</button>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
@@ -486,96 +529,47 @@
|
||||
<div class="text-center py-4 text-muted small">
|
||||
<i class="bi bi-wallet fs-4 d-block mb-1"></i> No payment records found.
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<!-- TAB 3: DOCUMENTS -->
|
||||
<div class="tab-pane fade" id="files-pane" role="tabpanel" tabindex="0">
|
||||
@if(isset($showdocuments) && count($showdocuments) > 0)
|
||||
<div class="row g-3">
|
||||
@foreach($showdocuments as $file)
|
||||
<div class="col-md-4">
|
||||
<div class="card border bg-white shadow-sm p-3 d-flex flex-row align-items-center justify-content-between">
|
||||
<div class="d-flex align-items-center overflow-hidden">
|
||||
<i class="bi bi-file-earmark-text fs-3 text-primary me-3"></i>
|
||||
<div class="text-truncate">
|
||||
<div class="fw-bold text-dark text-truncate" style="font-size: 0.9rem;" title="{{ $file->name }}">{{ $file->name }}</div>
|
||||
<small class="text-muted text-uppercase" style="font-size: 0.7rem;">{{ $file->file_extension ?? 'file' }}</small>
|
||||
</div>
|
||||
</div>
|
||||
@if(!empty($file->file_path))
|
||||
|
||||
<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
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
@else
|
||||
<div class="text-center py-4 text-muted small">
|
||||
<i class="bi bi-file-earmark-x fs-4 d-block mb-1"></i> No documents uploaded for this client.
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<!-- Notes / Activity Log Section -->
|
||||
<div class="card border-light-subtle shadow-sm mt-5 mb-5">
|
||||
<div class="card-header bg-white py-3 border-bottom border-light d-flex justify-content-between align-items-center">
|
||||
<h6 class="fw-bold mb-0 text-secondary text-uppercase" style="font-size: 0.8rem; letter-spacing: 0.5px;">
|
||||
<i class="bi bi-journal-text text-primary me-2"></i> Client Notes & Activity Logs
|
||||
</h6>
|
||||
<span class="badge bg-primary bg-opacity-10 text-primary">{{ count($show_notes) }} Entries</span>
|
||||
</div>
|
||||
|
||||
<!-- Scrollable Container -->
|
||||
<div class="card-body bg-light p-3" style="max-height: 450px; overflow-y: auto;">
|
||||
@if(isset($show_notes) && count($show_notes) > 0)
|
||||
<div class="timeline">
|
||||
@foreach($show_notes as $note)
|
||||
<div class="card border-0 shadow-sm mb-3">
|
||||
<div class="card-body p-3">
|
||||
<div class="d-flex justify-content-between align-items-center mb-2">
|
||||
<div class="d-flex align-items-center">
|
||||
<!-- Author Avatar or Name -->
|
||||
<div class="fw-bold text-dark me-2">
|
||||
<i class="bi bi-person-circle text-secondary me-1"></i>
|
||||
{{ $note->created_by_info->name ?? 'System User' }}
|
||||
</div>
|
||||
@if(isset($note->highlight) && $note->highlight == 'YES')
|
||||
<span class="badge bg-warning bg-opacity-10 text-warning border border-warning-subtle" style="font-size: 0.7rem;">Highlighted</span>
|
||||
@endif
|
||||
</div>
|
||||
<small class="text-muted" style="font-size: 0.8rem;">
|
||||
<i class="bi bi-clock me-1"></i>{{ \Carbon\Carbon::parse($note->created_at)->format('d M Y, h:i A') }}
|
||||
</small>
|
||||
</div>
|
||||
|
||||
<!-- Note Content -->
|
||||
<p class="mb-0 text-dark" style="white-space: pre-wrap; font-size: 0.95rem;">
|
||||
{{ $note->notes_body ?? $note->note ?? $note->content ?? 'No content found' }}
|
||||
</p>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
@else
|
||||
<div class="text-center py-4 text-muted small">
|
||||
<i class="bi bi-journal-x fs-4 d-block mb-1"></i> No notes recorded for this client yet.
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!-- TAB 3: DOCUMENTS -->
|
||||
<div class="tab-pane fade" id="files-pane" role="tabpanel" tabindex="0">
|
||||
@if(isset($showdocuments) && count($showdocuments) > 0)
|
||||
<div class="row g-3">
|
||||
@foreach($showdocuments as $file)
|
||||
<div class="col-md-4">
|
||||
<div class="card border bg-white shadow-sm p-3 d-flex flex-row align-items-center justify-content-between">
|
||||
<div class="d-flex align-items-center overflow-hidden">
|
||||
<i class="bi bi-file-earmark-text fs-3 text-primary me-3"></i>
|
||||
<div class="text-truncate">
|
||||
<div class="fw-bold text-dark text-truncate" style="font-size: 0.9rem;" title="{{ $file->name }}">{{ $file->name }}</div>
|
||||
<small class="text-muted text-uppercase" style="font-size: 0.7rem;">{{ $file->file_extension ?? 'file' }}</small>
|
||||
</div>
|
||||
</div>
|
||||
@if(!empty($file->file_path))
|
||||
|
||||
<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
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
@else
|
||||
<div class="text-center py-4 text-muted small">
|
||||
<i class="bi bi-file-earmark-x fs-4 d-block mb-1"></i> No documents uploaded for this client.
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@include('clients.partials.shortcode-payment-docs-modal')
|
||||
@include('clients.partials.edit-modal')
|
||||
@include('clients.partials.short-notes-payments-edit')
|
||||
@endsection
|
||||
@push('scripts')
|
||||
<script src="{{ asset('public/assets/js/client-show-modal.js') }}"></script>
|
||||
<script>
|
||||
</script>
|
||||
@endpush
|
||||
Reference in New Issue
Block a user