๐ซ {{ $center->name }} Center Overview
Detailed overview of trainers, trainees, lead trainers, coordinators, and operations for this center.
Back to Centers
@php
$summaryStats = [
['label' => 'Senior Trainers', 'value' => $trainersCount ?? 0, 'icon' => 'bi bi-person-badge-fill', 'color' => 'primary', 'sub' => 'Across all classrooms'],
['label' => 'Assistant Trainers', 'value' => $assistantTrainersCount ?? 0, 'icon' => 'bi bi-person-plus-fill', 'color' => 'info', 'sub' => 'Supporting senior trainers'],
['label' => 'Trainees', 'value' => $traineesCount ?? 0, 'icon' => 'bi bi-people-fill', 'color' => 'success', 'sub' => 'Active learners'],
['label' => 'Lead Trainers', 'value' => $center->leadTrainers->count(), 'icon' => 'bi bi-person-lines-fill', 'color' => 'warning', 'sub' => 'Mentors overseeing sessions'],
['label' => 'Deputy Lead Trainers', 'value' => $deputiesCount ?? 0, 'icon' => 'bi bi-person-badge', 'color' => 'info', 'sub' => 'Supporting lead trainers'],
['label' => 'Master Trainers', 'value' => $center->masterTrainers->count(), 'icon' => 'bi bi-person-check-fill', 'color' => 'success', 'sub' => 'Senior trainers for the center'],
['label' => 'Head Teachers', 'value' => $headTeachersCount ?? 0, 'icon' => 'bi bi-mortarboard-fill', 'color' => 'secondary', 'sub' => 'Overseeing classes'],
['label' => 'Teachers on Duty', 'value' => $teachersOnDutyCount ?? 0, 'icon' => 'bi bi-person-badge', 'color' => 'info', 'sub' => 'Daily supervising teachers'],
['label' => 'ICT Agents', 'value' => $ictAgentsCount ?? 0, 'icon' => 'bi bi-laptop-fill', 'color' => 'dark', 'sub' => 'Tech support'],
['label' => 'Recce Agents', 'value' => $recceAgentsCount ?? 0, 'icon' => 'bi bi-binoculars-fill', 'color' => 'warning', 'sub' => 'Recon operations'],
['label' => 'Cleaners', 'value' => $cleanersCount ?? 0, 'icon' => 'bi bi-broom-fill', 'color' => 'secondary', 'sub' => 'Maintaining cleanliness'],
['label' => 'Child Minders', 'value' => $childMindersCount ?? 0, 'icon' => 'bi bi-heart-fill', 'color' => 'danger', 'sub' => 'Caring for children'],
['label' => 'Coordinators', 'value' => $coordinatorsCount ?? 0, 'icon' => 'bi bi-person-gear', 'color' => 'danger', 'sub' => 'Managing operations'],
];
@endphp
@foreach ($summaryStats as $stat)
{{ $stat['label'] }}
{{ $stat['value'] }}
{{ $stat['sub'] }}
@endforeach
@php
$roles = [
['label'=>'Senior Trainers','data'=>$center->trainers,'count'=>$trainersCount ?? 0,'icon'=>'๐งโ๐ซ','fields'=>['Name','Specialization','Phone','Email']],
['label'=>'Assistant Trainers','data'=>$center->assistantTrainers ?? collect(),'count'=>$assistantTrainersCount ?? 0,'icon'=>'๐งโ๐','fields'=>['Name','Specialization','Phone','Email']],
['label'=>'Lead Trainers','data'=>$center->leadTrainers,'count'=>$center->leadTrainers->count(),'icon'=>'๐งโ๐ผ','fields'=>['Name','Phone','Email']],
['label'=>'Deputy Lead Trainers','data'=>$center->deputies ?? collect(),'count'=>$deputiesCount ?? 0,'icon'=>'๐จโ๐ผ','fields'=>['Name','Phone','Email']],
['label'=>'Master Trainers','data'=>$center->masterTrainers,'count'=>$center->masterTrainers->count(),'icon'=>'๐จโ๐ซ','fields'=>['Name','Phone','Email']],
['label'=>'Trainees','data'=>$center->trainees,'count'=>$traineesCount ?? 0,'icon'=>'๐ฉโ๐','fields'=>['Name','Training Type','Phone','Email','Ward']],
['label'=>'Head Teachers','data'=>$center->headTeachers ?? collect(),'count'=>$headTeachersCount ?? 0,'icon'=>'๐','fields'=>['Name','Phone','Email']],
['label'=>'Teachers on Duty','data'=>$center->teachersOnDuty ?? collect(),'count'=>$teachersOnDutyCount ?? 0,'icon'=>'๐งโ๐ซ','fields'=>['Name','Phone','Email','Duty Date']],
['label'=>'ICT Agents','data'=>$center->ictAgents ?? collect(),'count'=>$ictAgentsCount ?? 0,'icon'=>'๐ป','fields'=>['Name','Phone','Email']],
['label'=>'Recce Agents','data'=>$center->recceAgents ?? collect(),'count'=>$recceAgentsCount ?? 0,'icon'=>'๐ญ','fields'=>['Name','Phone','Email']],
['label'=>'Cleaners','data'=>$center->cleaners ?? collect(),'count'=>$cleanersCount ?? 0,'icon'=>'๐งน','fields'=>['Name','Phone','Email']],
['label'=>'Child Minders','data'=>$center->childMinders ?? collect(),'count'=>$childMindersCount ?? 0,'icon'=>'โค๏ธ','fields'=>['Name','Phone','Email']],
['label'=>'Coordinators','data'=>$center->coordinators ?? collect(),'count'=>$coordinatorsCount ?? 0,'icon'=>'๐ ','fields'=>['Coordinator 1','Phone','Email','Coordinator 2','Phone','Email']],
];
@endphp
@foreach($roles as $index => $role)
@if ($role['count'] > 0)
| # |
@foreach($role['fields'] as $field)
{{ $field }} |
@endforeach
@foreach ($role['data'] as $i => $item)
| {{ $i + 1 }} |
@foreach($role['fields'] as $field)
@php
$key = str_replace(' ','_',strtolower($field));
$value = $item->$key ?? 'โ';
@endphp
{{ $value }} |
@endforeach
@endforeach
@else
No {{ strtolower($role['label']) }} assigned yet.
@endif
@endforeach