@foreach ([
['value' => $payroll->present_days ?? 0, 'label' => __('Present days'), 'class' => '', 'section' => null],
['value' => $payroll->absent_days ?? 0, 'label' => __('Absent days'), 'class' => 'text-danger', 'section' => 'absence'],
['value' => $payroll->holiday_days ?? 0, 'label' => __('Holiday days'), 'class' => 'text-info', 'section' => null],
['value' => ($payroll->paid_holiday_days + 0).' / '.($payroll->unpaid_leave_days + 0), 'label' => __('Leave (paid / unpaid)'), 'class' => 'text-warning', 'section' => 'leave'],
['value' => $payroll->total_overtime_minutes ?? 0, 'label' => __('Overtime (min)'), 'class' => 'text-success', 'section' => 'overtime'],
['value' => $payroll->total_late_minutes ?? 0, 'label' => __('Late (min)'), 'class' => 'text-danger', 'section' => 'late'],
['value' => $payroll->permission_minutes ?? 0, 'label' => __('Permissions (min)'), 'class' => '', 'section' => 'permissions'],
] as $box)
@if ($box['section'])
@include('admin.payrolls.components.detail-link', ['payroll' => $payroll, 'section' => $box['section'], 'label' => $box['value'], 'title' => $box['label']])
@else
{{ $box['value'] }}
@endif
{{ $box['label'] }}
@endforeach