updated client module
This commit is contained in:
@@ -344,7 +344,7 @@
|
||||
format: format
|
||||
});
|
||||
|
||||
// Redirect the browser to trigger the file download
|
||||
|
||||
window.location.href = "{{ route('clients.export') }}?" + queryParams;
|
||||
});
|
||||
// Render Table Rows
|
||||
|
||||
@@ -0,0 +1,125 @@
|
||||
<!-- ========================================== -->
|
||||
<!-- 1. ADD SHORT CODE MODAL -->
|
||||
<!-- ========================================== -->
|
||||
<div class="modal fade" id="addShortcodeModal" tabindex="-1" aria-labelledby="addShortcodeModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<form id="shortcodeForm" action="{{ route('shortcodes.store') }}" method="POST">
|
||||
@csrf
|
||||
<input type="hidden" name="client_id" value="{{ $showclient->id }}">
|
||||
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title fw-bold" id="addShortcodeModalLabel"><i class="bi bi-code-square text-primary me-2"></i>Add New Short Code</h5>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="mb-3">
|
||||
<label class="form-label text-muted small fw-bold">Code Type</label>
|
||||
<select name="code_type" class="form-select" required>
|
||||
<option value="sms">SMS</option>
|
||||
<option value="ussd">USSD</option>
|
||||
<option value="voice">Voice</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="form-label text-muted small fw-bold">Short Code / Number</label>
|
||||
<input type="text" name="shortcode" class="form-control" placeholder="e.g. 1234 or *123#" required>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="form-label text-muted small fw-bold">Network</label>
|
||||
<input type="text" name="network" class="form-control" placeholder="e.g. MTN, Vodafone, AirtelTigo">
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="form-label text-muted small fw-bold">Expiry Date</label>
|
||||
<input type="date" name="expiry_date" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer bg-light">
|
||||
<button type="button" class="btn btn-secondary btn-sm" data-bs-dismiss="modal">Cancel</button>
|
||||
<button type="submit" class="btn btn-primary btn-sm px-4">Save Short Code</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- ========================================== -->
|
||||
<!-- 2. ADD PAYMENT MODAL -->
|
||||
<!-- ========================================== -->
|
||||
<div class="modal fade" id="addPaymentModal" tabindex="-1" aria-labelledby="addPaymentModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<form id="paymentForm" action="{{ route('client-payments.store') }}" method="POST">
|
||||
@csrf
|
||||
<input type="hidden" name="client_id" value="{{ $showclient->id }}">
|
||||
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title fw-bold" id="addPaymentModalLabel"><i class="bi bi-wallet2 text-primary me-2"></i>Record New Payment</h5>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="mb-3">
|
||||
<label class="form-label text-muted small fw-bold">Invoice / Reference Number</label>
|
||||
<input type="text" name="invoice_number" class="form-control" placeholder="e.g. INV-2026-001" required>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="form-label text-muted small fw-bold">Amount</label>
|
||||
<input type="number" step="0.01" name="invoice_amount" class="form-control" placeholder="0.00" required>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="form-label text-muted small fw-bold">Invoice Date</label>
|
||||
<input type="date" name="invoice_date" class="form-control" value="{{ date('Y-m-d') }}" required>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="form-label text-muted small fw-bold">Status</label>
|
||||
<select name="invoice_status" class="form-select" required>
|
||||
<option value="paid">Paid</option>
|
||||
<option value="pending">Pending</option>
|
||||
<option value="partial">Partial</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer bg-light">
|
||||
<button type="button" class="btn btn-secondary btn-sm" data-bs-dismiss="modal">Cancel</button>
|
||||
<button type="submit" class="btn btn-primary btn-sm px-4">Record Payment</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- ========================================== -->
|
||||
<!-- 3. UPLOAD DOCUMENT MODAL -->
|
||||
<!-- ========================================== -->
|
||||
<div class="modal fade" id="uploadDocumentModal" tabindex="-1" aria-labelledby="uploadDocumentModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<form id="documentForm" action="{{ route('client-files.store') }}" method="POST" enctype="multipart/form-data">
|
||||
@csrf
|
||||
<input type="hidden" name="client_id" value="{{ $showclient->id }}">
|
||||
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title fw-bold" id="uploadDocumentModalLabel"><i class="bi bi-file-earmark-arrow-up text-primary me-2"></i>Upload Client Document</h5>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="mb-3">
|
||||
<label class="form-label text-muted small fw-bold">Document Name / Title</label>
|
||||
<input type="text" name="name" class="form-control" placeholder="e.g. Signed Service Agreement" required>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="form-label text-muted small fw-bold">Select File</label>
|
||||
<input type="file" name="file" class="form-control" required>
|
||||
<div class="form-text text-muted">Accepted formats: PDF, DOC, DOCX, JPG, PNG (Max size depends on server config).</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer bg-light">
|
||||
<button type="button" class="btn btn-secondary btn-sm" data-bs-dismiss="modal">Cancel</button>
|
||||
<button type="submit" class="btn btn-primary btn-sm px-4">Upload Document</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -291,8 +291,10 @@
|
||||
</div>
|
||||
<!-- Tabs Navigation for Additional Records -->
|
||||
<div class="card border-light-subtle shadow-sm mt-5 mb-4">
|
||||
<div class="card-header bg-white pt-3 pb-0 border-bottom">
|
||||
<ul class="nav nav-tabs card-header-tabs" id="clientRecordTabs" role="tablist">
|
||||
<div class="card-header bg-white py-3 border-bottom d-flex flex-column flex-md-row justify-content-between align-items-md-center gap-3">
|
||||
|
||||
<!-- 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">
|
||||
<i class="bi bi-code-square text-primary me-1"></i> Short Codes
|
||||
@@ -312,6 +314,20 @@
|
||||
</button>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<!-- Action Buttons Corresponding to Tabs -->
|
||||
<div class="tab-action-buttons">
|
||||
<button type="button" class="btn btn-sm btn-outline-primary fw-bold" data-bs-toggle="modal" data-bs-target="#addShortcodeModal">
|
||||
<i class="bi bi-plus-lg me-1"></i> Add Short Code
|
||||
</button>
|
||||
<button type="button" class="btn btn-sm btn-outline-primary fw-bold ms-1" data-bs-toggle="modal" data-bs-target="#addPaymentModal">
|
||||
<i class="bi bi-plus-lg me-1"></i> Add Payment
|
||||
</button>
|
||||
<button type="button" class="btn btn-sm btn-outline-primary fw-bold ms-1" data-bs-toggle="modal" data-bs-target="#uploadDocumentModal">
|
||||
<i class="bi bi-upload me-1"></i> Upload Doc
|
||||
</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="card-body bg-light tab-content" id="clientRecordTabsContent">
|
||||
@@ -471,4 +487,8 @@
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@include('clients.partials.shortcode-payment-docs-modal')
|
||||
@endsection
|
||||
@section('scripts')
|
||||
<script src="{{ asset('js/client-show-modals.js') }}"></script>
|
||||
@endsection
|
||||
Reference in New Issue
Block a user