@php $tenant = \App\Support\Facades\Tenancy::get(); $brandStyle = $tenant->brand_primary_color ? ":root { --color-brand-600: {$tenant->brand_primary_color}; } .dark { --color-brand-600: {$tenant->brand_primary_color}; }" : null; $tabLabels = [ 'teachers' => 'Teachers', 'employees' => 'Employees', 'admissions' => 'Admissions', 'admission-tests' => 'Admission Tests', 'notices' => 'Notices', 'assets' => 'Assets', 'campuses' => 'Campuses', 'branches' => 'Branches', 'buildings' => 'Buildings', 'shifts' => 'Shifts', 'academic-sessions' => 'Academic Sessions', 'calendar-events' => 'Calendar Events', 'calendar-event-types' => 'Calendar Event Types', 'departments' => 'Departments', 'classes' => 'Classes', 'subjects' => 'Subjects', 'chapters' => 'Chapters', 'designations' => 'Designations', 'job-postings' => 'Job Postings', 'leave-types' => 'Leave Types', 'staff-shifts' => 'Staff Shifts', 'wellness-appointments' => 'Wellness Appointments', 'esign-documents' => 'E-Signature', 'facilities' => 'Facilities', 'facility-bookings' => 'Facility Bookings', 'facility-types' => 'Facility Types', 'document-types' => 'Document Types', 'rooms' => 'Rooms', 'grievance-cases' => 'Grievance Cases', 'reports' => 'Reports', 'governance-roles' => 'Governance Roles', 'download-categories' => 'Download Categories', 'gallery-categories' => 'Gallery Categories', 'transport-vehicles' => 'Transport Vehicles', 'transport-allocations' => 'Transport Allocations', 'hostel-allocations' => 'Hostel Allocations', 'library-loan-periods' => 'Loan Periods', ]; $itemName = function ($item) use ($tab) { return match ($tab) { 'teachers', 'employees' => $item->fullName(), 'admissions' => $item->applicantName(), 'admission-tests' => $item->title, 'notices' => $item->title, 'assets' => $item->name, 'calendar-events' => $item->title, 'job-postings' => $item->title, 'esign-documents' => $item->title, 'wellness-appointments' => $item->student?->fullName() ?? 'Unknown student', 'facility-bookings' => $item->facility?->name ?? 'Unknown facility', 'campuses', 'branches', 'buildings', 'shifts', 'academic-sessions', 'departments', 'classes', 'subjects', 'chapters', 'designations', 'leave-types', 'staff-shifts', 'facilities', 'facility-types', 'governance-roles', 'download-categories', 'gallery-categories', 'library-loan-periods', 'calendar-event-types', 'document-types', 'rooms' => $item->name, // Case contents are confidential — the bin shows only the case number, never the description. 'grievance-cases' => $item->case_number, 'reports' => $item->name, 'transport-vehicles' => $item->vehicle_number, 'transport-allocations' => $item->student?->fullName() ?? 'Unknown student', 'hostel-allocations' => $item->student?->fullName() ?? 'Unknown student', }; }; // Reason category is deliberately never shown here, even to staff who could see // it elsewhere via viewReason() — the bin is a generic admin list, not a // counselling-scoped view, so it stays confidential the same way it does for // guardians on the main Wellness page. $itemSubtitle = function ($item) use ($tab) { return match ($tab) { 'teachers' => $item->teacher_code, 'employees' => $item->employee_code, 'admissions' => $item->reference, 'admission-tests' => ($item->schoolClass?->name ?? 'Unknown class').' · '.$item->scheduledAtLocal()->format('M j, Y g:i A'), 'notices' => ucfirst($item->audience_type), 'assets' => $item->asset_tag, 'campuses' => $item->city, 'branches', 'departments', 'subjects', 'leave-types' => $item->code, 'chapters' => $item->subject?->name ?? 'Unknown subject', 'shifts' => $item->start_time.' – '.$item->end_time, 'staff-shifts' => $item->check_in_by.' – '.$item->check_out_from, 'academic-sessions' => $item->start_date->format('M Y').' – '.$item->end_date->format('M Y'), 'calendar-events' => ucfirst(str_replace('_', ' ', $item->type)).' · '.($item->academicSession?->name ?? 'Unknown session'), 'classes', 'designations', 'facility-types', 'governance-roles', 'download-categories', 'gallery-categories', 'calendar-event-types', 'document-types', 'rooms', 'buildings' => 'Order '.$item->sort_order, 'library-loan-periods' => $item->days.' '.\Illuminate\Support\Str::plural('day', $item->days), 'job-postings' => $item->vacancies.' '.\Illuminate\Support\Str::plural('vacancy', $item->vacancies), 'wellness-appointments' => ucfirst($item->status), 'esign-documents' => ucfirst($item->status), 'facilities' => ucfirst(str_replace('_', ' ', $item->type)), 'facility-bookings' => ucfirst($item->status), 'grievance-cases' => ucfirst($item->category), 'reports' => $item->data_source, 'transport-vehicles' => $item->route?->name ?? 'No route', 'transport-allocations' => $item->route?->name ?? 'No route', 'hostel-allocations' => $item->bed?->room?->building?->name ?? 'No building', }; }; @endphp
@foreach($tabLabels as $tabKey => $label) {{ $label }} {{ $counts[$tabKey] }} @endforeach
@forelse($items as $index => $item) @empty @endforelse
# Name {{ match ($tab) { 'notices' => 'Audience', 'assets' => 'Tag', 'campuses' => 'City', 'shifts', 'staff-shifts' => 'Time', 'academic-sessions' => 'Duration', 'calendar-events' => 'Type · Session', 'classes', 'designations', 'facility-types', 'governance-roles', 'download-categories', 'gallery-categories', 'calendar-event-types', 'document-types', 'rooms', 'buildings' => 'Order', 'chapters' => 'Subject', 'job-postings' => 'Vacancies', 'wellness-appointments', 'esign-documents', 'facility-bookings' => 'Status', 'facilities' => 'Type', 'grievance-cases' => 'Category', 'reports' => 'Data Source', 'transport-vehicles', 'transport-allocations' => 'Route', 'hostel-allocations' => 'Building', 'library-loan-periods' => 'Days', 'admission-tests' => 'Class · Scheduled', default => 'Code' } }} Deleted
{{ $items->firstItem() + $index }}
@if($tab === 'teachers' && $item->photo_path) {{ $itemName($item) }} @elseif($tab === 'employees' && $item->photo_path) {{ $itemName($item) }} @elseif($tab === 'subjects' && $item->image_path) {{ $itemName($item) }} @elseif($tab === 'job-postings' && $item->image_path) {{ $itemName($item) }} @elseif($tab === 'wellness-appointments' && $item->student?->photo_path) {{ $itemName($item) }} @elseif($tab === 'transport-vehicles' && $item->photo_path) {{ $itemName($item) }} @elseif($tab === 'transport-allocations' && $item->student?->photo_path) {{ $itemName($item) }} @elseif($tab === 'hostel-allocations' && $item->student?->photo_path) {{ $itemName($item) }} @else @endif {{ $itemName($item) }}
{{ $itemSubtitle($item) ?? '—' }} {{ $item->deleted_at?->diffForHumans() }}
@csrf
The bin is empty.
@foreach($items as $item) @endforeach
{{ $items->links() }}