@extends('layouts.app') @section('title', '{{ $staff->full_name }} — Staff Profile | Institution Axis') @section('sidebar-menu') @include('schooladmin.partials.sidebar') @endsection @section('sidebar-footer')

{{ auth()->user()->school?->name ?? 'Institution Axis' }}

@endsection @section('breadcrumb') Home / Staff / {{ $staff->full_name }} @endsection @section('navbar-right')
5
@endsection @section('content')

Staff Profile

Edit Profile Back
@foreach(['success','error'] as $msg) @if(session($msg))
{{ session($msg) }}
@endif @endforeach
{{-- Left: Profile Card --}}
{{ $staff->full_name }}
{{ $staff->designation ?? 'Staff Member' }}
@php $sc = match($staff->status){ 'active'=>'bg-success','inactive'=>'bg-secondary','suspended'=>'bg-danger',default=>'bg-secondary'}; @endphp {{ ucfirst($staff->status) }}

Staff No: {{ $staff->staff_number }}
Dept: {{ $staff->department ?? '—' }}
{{ $staff->phone ?? '—' }}
{{ $staff->user->email }}
{{ ucfirst($staff->gender ?? '—') }}
{{ $staff->date_of_birth?->format('d M Y') ?? '—' }}
Joined: {{ $staff->date_of_joining?->format('d M Y') ?? '—' }}
@if($staff->emergency_contact)
Emergency: {{ $staff->emergency_contact }}
@endif
@if($staff->qualifications)
Qualifications:
{{ $staff->qualifications }}
@endif
{{-- Quick Links --}}
{{-- Right: Details Tabs --}}
{{-- This Month Attendance --}}
This Month's Attendance
@php $present = $monthAttendance->get('present', 0); $absent = $monthAttendance->get('absent', 0); $late = $monthAttendance->get('late', 0); $halfDay = $monthAttendance->get('half_day', 0); $total = $present + $absent + $late + $halfDay; $rate = $total > 0 ? round(($present / $total) * 100) : 0; @endphp
{{ $present }}
Present
{{ $absent }}
Absent
{{ $late }}
Late
{{ $rate }}%
Rate
{{-- Recent 7 records --}}
@forelse($recentAttendance as $att) @empty @endforelse
DateStatusInOut
{{ $att->date->format('d M Y') }} {{ $att->status_label }} {{ $att->check_in_time ?? '—' }} {{ $att->check_out_time ?? '—' }}
No records yet
{{-- Leave Requests --}}
Leave History
@forelse($leaveRequests as $lr) @empty @endforelse
TypeFromToDaysStatusReviewed By
{{ $lr->leave_type_label }} {{ $lr->start_date->format('d M Y') }} {{ $lr->end_date->format('d M Y') }} {{ $lr->days_requested }} {{ ucfirst($lr->status) }} {{ $lr->reviewer?->name ?? '—' }}
No leave records
@endsection