@extends('layouts.masterbeta') @section('title', 'Click ERP - Staff Directory') @push('styles') @endpush @section('breadcrumbs') Staff Directory @endsection @section('content')

Staff Directory

Manage employee profiles, department roles, and system access.

@php // Define an array of Bootstrap background classes for the card top bars $colors = ['bg-primary', 'bg-success', 'bg-warning', 'bg-danger', 'bg-info']; @endphp @forelse($staffMembers as $staff) @php // Generate Initials $words = explode(' ', $staff->name); $initials = strtoupper(substr($words[0], 0, 1) . (isset($words[1]) ? substr($words[1], 0, 1) : '')); // Match the department ID to the collection $deptName = $departments->firstWhere('id', $staff->department_id)->name ?? 'Unassigned'; // Cycle through colors based on the loop index $topBarColor = $colors[$loop->index % count($colors)]; @endphp
@if($staff->profile_pic) {{ $staff->name }} @else
{{ $initials }}
@endif
{{ $staff->name }}
{{ $staff->designation ?? 'N/A' }}
{{ $deptName }} {{ $staff->status }}
{{ $staff->email }}
{{ $staff->location_country ?? 'Not Specified' }}
@csrf @method('DELETE')
@empty
No staff members found.
@endforelse
{{ $staffMembers->links('pagination::bootstrap-5') }}
@endsection @push('modals') @endpush @push('scripts') @endpush