@extends('layouts.admin') @section('title', setting('school_name', 'ShulePoint') . ' | Staff') @section('page-title', 'Staff') @section('content')
@foreach ([ ['Total staff', number_format($stats['total'] ?? $staff->total()), 'fa-users', '#1a56db', route('staff.index')], ['Active', number_format($stats['active'] ?? 0), 'fa-user-check', '#16a34a', null], ['Designations', $designations->count(), 'fa-id-badge', '#8b5cf6', route('designations.index')], [(request('search') || request('status') || request('designation') || request('school_id') ? 'Filtered' : 'All'), (request('search') ? '“'.\Illuminate\Support\Str::limit(request('search'), 18).'”' : 'No active search'), 'fa-filter', '#f97316', (request()->hasAny(['search', 'status', 'designation', 'school_id']) ? route('staff.index') : null)], ] as [$label, $value, $icon, $color, $url])
{{ $value }}{{ $label }} @if($url)@endif
@endforeach
{{-- Search / filter card --}}

Find staff

@if(\App\Support\SchoolFilter::can())
@else
@endif
@if(request()->hasAny(['search', 'status', 'designation', 'school_id'])) @endif
@if(request()->hasAny(['search', 'status', 'designation', 'school_id']))
@if(request('search')){{ request('search') }}@endif @if(request('designation')){{ request('designation') }}@endif @if(request('status')){{ ucfirst(str_replace('_', ' ', request('status'))) }}@endif @if(request('school_id') === 'all')All schools @elseif(request('school_id')){{ \App\Support\SchoolFilter::options()->firstWhere('id', request('school_id'))->name ?? 'School' }}@endif
@endif
{{-- Bulk action bar --}}
0 selected Export selected
Selection applies to this page only
{{-- Table card --}}

Staff register Showing {{ $staff->firstItem() ?? 0 }}–{{ $staff->lastItem() ?? 0 }} of {{ number_format($staff->total()) }}

0 on page
@include('layouts.partials.school-th') @forelse($staff as $m) @php $initials = strtoupper(substr($m->first_name ?? '?', 0, 1) . substr($m->last_name ?? '', 0, 1)); $hue = ($m->id * 47) % 360; $pill = $m->status === 'active' ? 'ok' : ($m->status === 'on_leave' ? 'warn' : 'muted'); @endphp @include('layouts.partials.school-td', ['schoolId' => $m->school_id ?? null]) @empty @endforelse
Staff member Designation TSC StatusActions
@if($m->photo) {{ $m->first_name }} {{ $m->last_name }} @else {{ $initials }} @endif
{{ $m->first_name }} {{ $m->last_name }}
{{ $m->staff_no }} @if($m->gender)·{{ $m->gender }}@endif
@if($m->designation) {{ $m->designation }} @else — @endif
{{ $m->department ?? 'No department' }}
{{ $m->tsc_no ?? '—' }} {{ ucfirst(str_replace('_', ' ', $m->status)) }}

No staff found

Try adjusting your search or add a new staff member.

Add Staff Clear filters
{{-- Single delete confirmations --}} @foreach($staff as $m) @endforeach {{-- Bulk: assign designation --}} {{-- Bulk: set status --}} {{-- Import modal --}} {{-- Bulk: delete --}} @endsection @push('scripts') @endpush