Employee Type @if($staff->roleType) {{ $staff->roleType->title }} @endif
Department {{ isset($staff) ? $staff->department->name : '' }}
Reporting To @if (isset($staff->reportingTo)) {{ $staff->reportingTo->first_name . ' ' . $staff->reportingTo->last_name }} @endif
Country @if (isset($staff->country)) {{ $staff->country->name }} @endif
Date of Joining {{ isset($staff) ? $staff->date_of_joining : '' }}
Years of Experience {{ $staff->years_of_experience ?? '-' }}
@if($staff->jobTitle && in_array(strtolower($staff->jobTitle->slug), ['teacher', 'tester'], true)) @if(strtolower($staff->jobTitle->slug) === 'teacher')
Teacher Type {{ \App\Models\Staff::TEACHER_TYPES[$staff->teacher_type] ?? '-' }}
@endif
Accent @php $accents = is_array($staff->accent) ? $staff->accent : ($staff->accent ? [$staff->accent] : []); @endphp @if (!empty($accents))
@foreach ($accents as $acc) {{ \App\Models\Staff::ACCENTS[strtolower($acc)] ?? ucfirst($acc) }} @endforeach
@else - @endif
Biography {{ $staff->biography ?? '-' }}
@endif
Source of Hire {{ isset($staff) ? $staff->source_of_hire : '' }}
Employee Status {{ isset($staff) ? $staff->active_status ? 'Active' : 'Inactive' : '' }}
Title @if (isset($staff->jobTitle)) {{ $staff->jobTitle->name }} @endif
@if($staff->manager)
Manager {{ $staff->manager->full_name }}
@endif
Secondary Reporting To @if (isset($staff->secondaryReportingTo)) {{ $staff->secondaryReportingTo->first_name . ' ' . $staff->secondaryReportingTo->last_name }} @endif
@can('hr_staffs_view_payroll')
Fixed / Non Fixed Package {{ $staff->package }}
@endcan
Probation End Date {{ isset($staff) ? ($staff->probation_end_date ?: '-') : '-' }}
Contract @if (isset($staff) && $staff->contract) View Contract @endif
Contract Renewal Date {{ isset($staff) ? $staff->contract_renewal_date : '' }}
{{-- Shift Information --}} @if($staff->shiftEmp)
Shift Information
Shift Name {{ $staff->shiftEmp->name }}
Work From {{ \Carbon\Carbon::parse($staff->shiftEmp->work_from)->format('h:i A') }}
Work To {{ \Carbon\Carbon::parse($staff->shiftEmp->work_to)->format('h:i A') }}
Shift Type {{ strtoupper($staff->shiftEmp->shift_type) }}
@endif
Current Rating
@include('components.star_rating', ['rating' => $currentQuarterAverage, 'max' => 5])
{{ $currentQuarterAverage ? number_format($currentQuarterAverage, 1) : 'N/A' }}/5
quarter{{ ceil(date('n') / 3) }}
@foreach($quarterlyAverages as $quarter => $average)
Quarter {{ $quarter }}:
@include('components.star_rating', ['rating' => $average, 'max' => 5])
({{ round($average, 2) ?: 'N/A' }})
@endforeach
@php $yearlyAverage = array_filter($quarterlyAverages); $yearlyAverage = count($yearlyAverage) ? array_sum($yearlyAverage) / count($yearlyAverage) : 0; @endphp
Yearly Rating
@include('components.star_rating', ['rating' => $yearlyAverage, 'max' => 5]) {{ number_format($yearlyAverage, 1) }}/5