fixed otp email settings

This commit is contained in:
Kwesi Banson Jnr
2026-08-27 11:52:50 +00:00
parent 27c2a8ac80
commit 3ab91468a8
8 changed files with 417 additions and 146 deletions

View File

@@ -1,2 +1,14 @@
## Details ## Details
- kwesi@click-mobile.com/frantic@300 - kwesi@click-mobile.com/frantic@300
MAIL_DRIVER=smtp
MAIL_HOST=smtp.office365.com
MAIL_PORT=587
MAIL_USERNAME=alerts@click-mobile.com
MAIL_PASSWORD=K$286565586884an
MAIL_ENCRYPTION=tls
MAIL_FROM_ADDRESS=null
MAIL_FROM_NAME="${APP_NAME}"
MAIL_FROM_ADDRESS="no-reply@click-mobile.com"

View File

@@ -830,6 +830,64 @@ class ClientsController extends Controller
return response()->json(['message' => 'Note added successfully!']); return response()->json(['message' => 'Note added successfully!']);
} }
public function update_notes(Request $request, $id)
{
$note = ClientNote::findOrFail($id);
// Optional: Double-check the 2-day rule on the backend for security
if ($note->created_at->diffInDays(now()) > 2) {
return response()->json(['errors' => ['Cannot edit notes older than 2 days.']], 403);
}
$note->update([
'notes_body' => $request->notes_body,
]);
return response()->json(['success' => true, 'message' => 'Note updated successfully!']);
}
public function update_short_code(Request $request, $id)
{
// Validate the inputs based on the fields in your edit modal
$validated = $request->validate([
'code_type' => 'required|string',
'shortcode' => 'required|string',
'network' => 'required|string',
'status' => 'required|string',
'expiry_date' => 'nullable|date',
'remarks' => 'nullable|string',
]);
// Find the record and update it
$shortcode = ShortCode::findOrFail($id); // Adjust 'ShortCode' to your actual model name
$shortcode->update($validated);
// Return the JSON response for SweetAlert
return response()->json([
'success' => true,
'message' => 'Short code updated successfully!'
]);
}
public function update_payment(Request $request, $id)
{
// Validate the inputs based on the fields in your edit modal
$validated = $request->validate([
'invoice_number' => 'required|string',
'invoice_amount' => 'required|numeric',
'invoice_date' => 'required|date',
'invoice_status' => 'required|string',
]);
// Find the record and update it
$payment = ClientPayment::findOrFail($id); // Adjust 'ClientPayment' to your actual model name
$payment->update($validated);
// Return the JSON response for SweetAlert
return response()->json([
'success' => true,
'message' => 'Payment record updated successfully!'
]);
}

View File

@@ -4,7 +4,11 @@ namespace App\Http\Controllers;
use App\Models\StaffMember; use App\Models\StaffMember;
use Illuminate\Http\Request; use Illuminate\Http\Request;
use App\Mail\LoginOtpMail;
use Illuminate\Support\Facades\Auth; use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Hash;
use Illuminate\Support\Facades\Mail;
use Illuminate\Support\Facades\Log;
class OtpController extends Controller class OtpController extends Controller
{ {

View File

@@ -8,7 +8,8 @@ document.addEventListener("DOMContentLoaded", function() {
// Generic AJAX handler for standard forms (Shortcodes & Payments) // Generic AJAX handler for standard forms (Shortcodes & Payments)
$(document).on('submit', '#shortcodeForm, #paymentForm, #noteForm', function(e) { // $(document).on('submit', '#shortcodeForm, #paymentForm, #noteForm', function(e) {
$(document).on('submit', '#shortcodeForm, #paymentForm, #noteForm, #editNoteForm, #editShortcodeForm, #editPaymentForm', function(e) {
e.preventDefault(); e.preventDefault();
let $form = $(this); let $form = $(this);
@@ -378,5 +379,100 @@ document.addEventListener("DOMContentLoaded", function() {
} }
}); });
}); });
});
// Confirm and Delete Note
$(document).on('click', '.delete-note-btn', function() {
let id = $(this).data('id');
if(confirm("Are you sure you want to delete this note? This action cannot be undone.")) {
// Send AJAX DELETE request using the meta tag for CSRF
$.ajax({
url: `/notes/${id}`,
type: 'DELETE',
headers: {
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
},
success: function(res) {
location.reload();
}
});
}
});
// Confirm and Delete Short Code
$(document).on('click', '.delete-shortcode-btn', function() {
let id = $(this).data('id');
if(confirm("Are you sure you want to delete this short code?")) {
$.ajax({
url: `/shortcodes/${id}`,
type: 'DELETE',
headers: { 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') },
success: function(res) { location.reload(); }
});
}
});
// Confirm and Delete Payment
$(document).on('click', '.delete-payment-btn', function() {
let id = $(this).data('id');
if(confirm("Are you sure you want to delete this payment record?")) {
$.ajax({
url: `/payments/${id}`,
type: 'DELETE',
headers: { 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') },
success: function(res) { location.reload(); }
});
}
});
// --- POPULATE NOTE EDIT MODAL ---
$(document).on('click', '.edit-note-btn', function() {
let id = $(this).data('id');
let body = $(this).closest('.list-group-item').find('p').text();
$('#edit_note_id').val(id);
$('#edit_note_body').val(body);
$('#editNoteForm').attr('action', `/notes/${id}`);
// Replaced vanilla JS with jQuery modal show
$('#editNoteModal').modal('show');
});
// --- POPULATE SHORT CODE EDIT MODAL ---
$(document).on('click', '.edit-shortcode-btn', function() {
let id = $(this).data('id');
$('#edit_shortcode_id').val(id);
$('#edit_sc_type').val($(this).data('type'));
$('#edit_sc_code').val($(this).data('code'));
$('#edit_sc_network').val($(this).data('network'));
$('#edit_sc_status').val($(this).data('status'));
$('#edit_sc_expiry').val($(this).data('expiry'));
$('#edit_sc_remarks').val($(this).data('remarks'));
$('#editShortcodeForm').attr('action', `/shortcodes/${id}`);
// Replaced vanilla JS with jQuery modal show
$('#editShortcodeModal').modal('show');
});
// --- POPULATE PAYMENT EDIT MODAL ---
$(document).on('click', '.edit-payment-btn', function() {
let id = $(this).data('id');
$('#edit_payment_id').val(id);
$('#edit_pay_invoice').val($(this).data('invoice'));
$('#edit_pay_amount').val($(this).data('amount'));
$('#edit_pay_date').val($(this).data('date'));
$('#edit_pay_status').val($(this).data('status'));
$('#editPaymentForm').attr('action', `/payments/${id}`);
// Replaced vanilla JS with jQuery modal show
$('#editPaymentModal').modal('show');
});
}); // <-- End of the main $(document).ready
}); });

View File

@@ -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>

View File

@@ -370,15 +370,29 @@
</div> </div>
@endif @endif
<p class="mb-2 text-dark">{{ $note->notes_body }}</p> <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;"> <div class="d-flex justify-content-between align-items-center mt-2">
<span> <div class="text-muted" style="font-size: 0.8rem;">
<i class="bi bi-person-fill me-1 text-primary"></i> <span class="me-3">
<strong class="text-secondary">{{ $note->created_by_info->name ?? 'System User' }}</strong> <i class="bi bi-person-fill me-1 text-primary"></i>
</span> <strong class="text-secondary">{{ $note->created_by_info->name ?? 'System User' }}</strong>
<span> </span>
<i class="bi bi-clock me-1"></i> <span>
{{ $note->created_at->format('d M Y, h:i A') }} <i class="bi bi-clock me-1"></i>
</span> {{ $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>
</div> </div>
@empty @empty
@@ -389,7 +403,7 @@
</div> </div>
</div> </div>
</div> </div>
<!-- TAB 1: SHORT CODES --> <!-- TAB 1: SHORT CODES -->
<div class="tab-pane fade " id="shortcodes-pane" role="tabpanel" tabindex="0"> <div class="tab-pane fade " id="shortcodes-pane" role="tabpanel" tabindex="0">
@php @php
$allCodes = collect($voice_codes)->concat($sms_codes)->concat($ussd_codes); $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"> <tr style="font-size: 0.8rem;" class="text-secondary text-uppercase">
<th style="width: 10%;">Type</th> <th style="width: 10%;">Type</th>
<th style="width: 15%;">Shortcode</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: 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: 15%;">Expiry Date</th>
<th style="width: 10%;" class="text-end">Actions</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@@ -417,13 +432,29 @@
<td> <td>
<span class="badge bg-success bg-opacity-10 text-success">{{ $code->status ?? 'Active' }}</span> <span class="badge bg-success bg-opacity-10 text-success">{{ $code->status ?? 'Active' }}</span>
</td> </td>
<!-- Styled Remarks Column with text-wrap and max-width bounds -->
<td> <td>
<div class="text-muted text-break" style="font-size: 0.9rem; max-width: 250px; line-height: 1.3;"> <div class="text-muted text-break" style="font-size: 0.9rem; max-width: 250px; line-height: 1.3;">
{{ $code->remarks ?? '-' }} {{ $code->remarks ?? '-' }}
</div> </div>
</td> </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-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> </tr>
@endforeach @endforeach
</tbody> </tbody>
@@ -448,35 +479,47 @@
<th>Amount</th> <th>Amount</th>
<th>Date</th> <th>Date</th>
<th>Status</th> <th>Status</th>
<th class="text-end">Actions</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@foreach($recent_payments as $payment) @foreach($recent_payments as $payment)
<?php //dump($payment); ?>
<tr> <tr>
<td class="fw-bold text-dark">{{ $payment->invoice_number ?? 'N/A' }}</td> <td class="fw-bold text-dark">{{ $payment->invoice_number ?? 'N/A' }}</td>
<td> <td>
@php @php $serviceNames = $payment->service_names; @endphp
$serviceNames = $payment->service_names; @if($serviceNames->count() > 0)
@endphp <div class="d-flex flex-wrap gap-1">
@if($serviceNames->count() > 0) @foreach($serviceNames as $serviceName)
<div class="d-flex flex-wrap gap-1"> <span class="badge bg-light text-primary border" style="font-size: 0.75rem;">
@foreach($serviceNames as $serviceName) {{ $serviceName }}
<span class="badge bg-light text-primary border" style="font-size: 0.75rem;"> </span>
{{ $serviceName }} @endforeach
</span> </div>
@endforeach @else
</div>
@else
<span class="text-muted small">-</span> <span class="text-muted small">-</span>
@endif @endif
</td> </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 class="text-muted small">{{ $payment->invoice_date ? \Carbon\Carbon::parse($payment->invoice_date)->format('d M Y') : 'N/A' }}</td>
<td> <td>
<span class="badge bg-info bg-opacity-10 text-info text-uppercase">{{ $payment->invoice_status ?? 'Pending' }}</span> <span class="badge bg-info bg-opacity-10 text-info text-uppercase">{{ $payment->invoice_status ?? 'Pending' }}</span>
</td> </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> </tr>
@endforeach @endforeach
</tbody> </tbody>
@@ -486,96 +529,47 @@
<div class="text-center py-4 text-muted small"> <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. <i class="bi bi-wallet fs-4 d-block mb-1"></i> No payment records found.
</div> </div>
@endif @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>
</div> </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.shortcode-payment-docs-modal')
@include('clients.partials.edit-modal') @include('clients.partials.edit-modal')
@include('clients.partials.short-notes-payments-edit')
@endsection @endsection
@push('scripts') @push('scripts')
<script src="{{ asset('public/assets/js/client-show-modal.js') }}"></script> <script src="{{ asset('public/assets/js/client-show-modal.js') }}"></script>
<script>
</script>
@endpush @endpush

View File

@@ -29,37 +29,12 @@
</button> </button>
<div class="collapse navbar-collapse" id="navbarNav"> <div class="collapse navbar-collapse" id="navbarNav">
<ul class="navbar-nav me-auto mb-2 mb-lg-0"> <ul class="navbar-nav me-auto mb-2 mb-lg-0">
<li class="nav-item">
<a class="nav-link active" aria-current="page" href="/">Home</a>
</li>
<li class="nav-item">
<a class="nav-link" href="/projects">Projects</a>
</li>
<li class="nav-item">
<a class="nav-link" href="/project-status">Project Statuses</a>
</li>
<!-- <li class="nav-item">
<a class="nav-link" href="#">Contact</a>
</li> -->
</ul> </ul>
<div class="dropdown"> <div class="dropdown">
<button class="btn btn-secondary dropdown-toggle" type="button" id="userDropdown" data-bs-toggle="dropdown" aria-expanded="false">
User Profile
</button>
<ul class="dropdown-menu dropdown-menu-end" aria-labelledby="userDropdown">
<li><a class="dropdown-item" href="#">My Profile</a></li>
<li><a class="dropdown-item" href="#">Settings</a></li>
<li>
<a class="dropdown-item" href="{{ route('logout') }}"
onclick="event.preventDefault();
document.getElementById('logout-form').submit();">
{{ __('Logout') }}
</a>
<form id="logout-form" action="{{ route('logout') }}" method="POST" class="d-none">
@csrf
</form>
</li>
</ul>
</div> </div>
</div> </div>
</div> </div>

View File

@@ -24,6 +24,11 @@ Route::middleware(['auth'])->group(function () {
Route::get('/', [App\Http\Controllers\DashboardController::class, 'index'])->name('dashboard'); Route::get('/', [App\Http\Controllers\DashboardController::class, 'index'])->name('dashboard');
Route::get('home', [App\Http\Controllers\DashboardController::class, 'index'])->name('home'); Route::get('home', [App\Http\Controllers\DashboardController::class, 'index'])->name('home');
#Clients #Clients
Route::put('/notes/{id}', [App\Http\Controllers\ClientsController::class, 'update_notes']);
Route::put('/shortcodes/{id}', [App\Http\Controllers\ClientsController::class, 'update_short_code']);
Route::put('/payments/{id}', [App\Http\Controllers\ClientsController::class, 'update_payment']);
Route::get('/clients/data', [App\Http\Controllers\ClientsController::class, 'fetchData'])->name('clients.data'); Route::get('/clients/data', [App\Http\Controllers\ClientsController::class, 'fetchData'])->name('clients.data');
Route::get('/clients/export', [App\Http\Controllers\ClientsController::class, 'export'])->name('clients.export'); Route::get('/clients/export', [App\Http\Controllers\ClientsController::class, 'export'])->name('clients.export');
Route::get('/clients/{id}/json', [App\Http\Controllers\ClientsController::class, 'getClientJson']); Route::get('/clients/{id}/json', [App\Http\Controllers\ClientsController::class, 'getClientJson']);
@@ -53,10 +58,8 @@ Route::middleware(['auth'])->group(function () {
// Route::get('/senderids', [App\Http\Controllers\SenderidsController::class, 'index']); // Route::get('/senderids', [App\Http\Controllers\SenderidsController::class, 'index']);
Route::resource('senderids', App\Http\Controllers\SenderidsController::class)->except(['create', 'show', 'edit']); Route::resource('senderids', App\Http\Controllers\SenderidsController::class)->except(['create', 'show', 'edit']);
// Route::get('/shortcodes', [App\Http\Controllers\ShortCodesController::class, 'index']);
// use App\Http\Controllers\ShortCodesController;
Route::resource('shortcodes', App\Http\Controllers\ShortCodesController::class)->except(['create', 'show', 'edit']); Route::resource('shortcodes', App\Http\Controllers\ShortCodesController::class)->except(['create', 'show', 'edit']);