user roles, bug fixes
This commit is contained in:
@@ -255,4 +255,42 @@
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Add Note Modal -->
|
||||
<div class="modal fade" id="addNoteModal" tabindex="-1" aria-hidden="true">
|
||||
<div class="modal-dialog modal-dialog-centered">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header bg-light border-bottom-0">
|
||||
<h5 class="modal-title fw-bold">Add Internal Note</h5>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
</div>
|
||||
<form id="addNoteForm" action="{{ route('mnos.notes.store', $operator->id) }}" method="POST">
|
||||
@csrf
|
||||
<div class="modal-body p-4">
|
||||
<div id="noteModalAlert"></div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label class="form-label text-secondary fw-semibold small">Related Service / Topic (Optional)</label>
|
||||
<select name="services" id="note_services" class="form-select" style="width: 100%;">
|
||||
<option value=""></option>
|
||||
@foreach($allServices as $svc)
|
||||
<option value="{{ $svc->name }}">{{ $svc->name }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label class="form-label text-secondary fw-semibold small">Note Detail *</label>
|
||||
<textarea name="notes_body" class="form-control" rows="4" required placeholder="Log call notes, updates, or instructions here..."></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer bg-light border-top-0">
|
||||
<button type="button" class="btn btn-outline-secondary btn-sm" data-bs-dismiss="modal">Cancel</button>
|
||||
<button type="submit" id="btnSubmitNote" class="btn text-white btn-sm fw-bold px-4" style="background-color: #5c4df0;">Save Note</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1,7 +1,31 @@
|
||||
@extends('layouts.masterbeta')
|
||||
|
||||
@section('title', 'Cick ERP - ' . $operator->name)
|
||||
|
||||
@push('styles')
|
||||
<link href="https://cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/css/select2.min.css" rel="stylesheet" />
|
||||
<style>
|
||||
/* Keep your existing styles here... */
|
||||
|
||||
/* Select2 Bootstrap 5 / Custom tweaks */
|
||||
.select2-container .select2-selection--single {
|
||||
height: 38px;
|
||||
border: 1px solid #dee2e6;
|
||||
border-radius: 0.375rem;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.select2-container--default .select2-selection--single .select2-selection__arrow {
|
||||
height: 36px;
|
||||
}
|
||||
|
||||
.network-badge { font-size: 0.65rem; padding: 0.2rem 0.4rem; border-radius: 4px; border: 1px solid #e2e8f0; font-weight: 600; display: inline-flex; align-items: center; gap: 3px; }
|
||||
.net-approved { background-color: rgba(16, 185, 129, 0.1); color: #10b981; border-color: rgba(16, 185, 129, 0.2); }
|
||||
.net-pending { background-color: rgba(245, 158, 11, 0.1); color: #f59e0b; border-color: rgba(245, 158, 11, 0.2); }
|
||||
.net-rejected { background-color: rgba(239, 68, 68, 0.1); color: #ef4444; border-color: rgba(239, 68, 68, 0.2); }
|
||||
|
||||
.sender-id-text { font-family: monospace; font-size: 1.1rem; letter-spacing: 1px; color: #111425; }
|
||||
</style>
|
||||
@endpush
|
||||
@section('breadcrumbs')
|
||||
<a href="{{ url('/') }}" class="text-secondary text-decoration-none"><i class="bi bi-house me-2"></i></a>
|
||||
<i class="bi bi-chevron-right text-secondary me-2" style="font-size: 0.8rem;"></i>
|
||||
@@ -303,6 +327,44 @@
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- Notes Section -->
|
||||
<div class="content-card p-4 mb-4">
|
||||
<div class="d-flex justify-content-between align-items-center mb-3">
|
||||
<h5 class="fw-bold mb-0 text-secondary" style="font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.5px;">
|
||||
<i class="bi bi-journal-text me-2 text-primary"></i> Internal Notes & Activity
|
||||
</h5>
|
||||
<button type="button" class="btn btn-sm text-white fw-bold" style="background-color: #5c4df0;" data-bs-toggle="modal" data-bs-target="#addNoteModal">
|
||||
<i class="bi bi-plus-lg me-1"></i> Add Note
|
||||
</button>
|
||||
</div>
|
||||
<hr class="text-muted opacity-25">
|
||||
|
||||
<div class="mt-3">
|
||||
@forelse($operator->notes as $note)
|
||||
<div class="border-bottom pb-3 mb-3">
|
||||
<div class="d-flex justify-content-between align-items-start">
|
||||
<div>
|
||||
<span class="fw-bold text-dark">{{ $note->user->name ?? 'System User' }}</span>
|
||||
<span class="text-secondary small ms-2"><i class="bi bi-clock me-1"></i>{{ $note->created_at->format('d M Y, h:i A') }}</span>
|
||||
@if($note->services)
|
||||
<span class="badge bg-light text-primary border ms-2">{{ $note->services }}</span>
|
||||
@endif
|
||||
</div>
|
||||
<form action="{{ route('mnos.notes.destroy', $note->id) }}" method="POST" class="d-inline">
|
||||
@csrf
|
||||
@method('DELETE')
|
||||
<button type="submit" class="btn btn-sm btn-light text-danger border-0 p-1" onclick="return confirm('Delete this note?')">
|
||||
<i class="bi bi-trash"></i>
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
<div class="text-dark mt-2" style="font-size: 0.9rem; white-space: pre-wrap;">{{ $note->notes_body }}</div>
|
||||
</div>
|
||||
@empty
|
||||
<div class="text-center text-secondary py-4">No notes added yet.</div>
|
||||
@endforelse
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -317,6 +379,7 @@
|
||||
const baseUrl = "{{ url('/') }}";
|
||||
const operatorId = "{{ $operator->id }}";
|
||||
</script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/js/select2.min.js"></script>
|
||||
<script src="{{ asset('public/assets/js/mno-show.js') }}"></script>
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user