fixed otp email settings
This commit is contained in:
12
accounts.md
12
accounts.md
@@ -1,2 +1,14 @@
|
||||
## Details
|
||||
- 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"
|
||||
|
||||
@@ -830,6 +830,64 @@ class ClientsController extends Controller
|
||||
|
||||
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!'
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -4,7 +4,11 @@ namespace App\Http\Controllers;
|
||||
|
||||
use App\Models\StaffMember;
|
||||
use Illuminate\Http\Request;
|
||||
use App\Mail\LoginOtpMail;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Illuminate\Support\Facades\Hash;
|
||||
use Illuminate\Support\Facades\Mail;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
|
||||
class OtpController extends Controller
|
||||
{
|
||||
|
||||
@@ -8,7 +8,8 @@ document.addEventListener("DOMContentLoaded", function() {
|
||||
|
||||
|
||||
// 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();
|
||||
|
||||
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
|
||||
});
|
||||
@@ -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,8 +370,9 @@
|
||||
</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>
|
||||
<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>
|
||||
@@ -380,6 +381,19 @@
|
||||
{{ $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
|
||||
<div class="text-center py-4 text-muted small">
|
||||
@@ -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,18 +479,16 @@
|
||||
<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
|
||||
@php $serviceNames = $payment->service_names; @endphp
|
||||
@if($serviceNames->count() > 0)
|
||||
<div class="d-flex flex-wrap gap-1">
|
||||
@foreach($serviceNames as $serviceName)
|
||||
@@ -477,6 +506,20 @@
|
||||
<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>
|
||||
@@ -522,60 +565,11 @@
|
||||
|
||||
</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>
|
||||
@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>
|
||||
@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
|
||||
@@ -29,37 +29,12 @@
|
||||
</button>
|
||||
<div class="collapse navbar-collapse" id="navbarNav">
|
||||
<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>
|
||||
<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>
|
||||
|
||||
@@ -24,6 +24,11 @@ Route::middleware(['auth'])->group(function () {
|
||||
Route::get('/', [App\Http\Controllers\DashboardController::class, 'index'])->name('dashboard');
|
||||
Route::get('home', [App\Http\Controllers\DashboardController::class, 'index'])->name('home');
|
||||
#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/export', [App\Http\Controllers\ClientsController::class, 'export'])->name('clients.export');
|
||||
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::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']);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user