fix(hr): remove default times and fix calendar status precedence for Late/Early

This commit is contained in:
2026-04-28 17:54:15 +08:00
parent 01b10a8c2a
commit 6a7348edaa
413 changed files with 14232 additions and 14232 deletions

View File

@@ -924,15 +924,15 @@ class AttendanceRecordController extends Controller
} else if ($record->status === 'absent') {
$status = 'A';
$label = 'Absent';
} else if ($record->is_late || (isset($user->employee->shift) && $record->clock_in && \Carbon\Carbon::parse($record->clock_in)->format('H:i:s') > $user->employee->shift->start_time)) {
$status = 'L';
$label = 'Late';
} else if ($record->is_early_departure || (isset($user->employee->shift) && $record->clock_out && \Carbon\Carbon::parse($record->clock_out)->format('H:i:s') < $user->employee->shift->end_time)) {
$status = 'E';
$label = 'Early Checkout';
} else if ($record->overtime_hours > 0) {
$status = 'OT';
$label = 'Overtime';
} else if ($record->is_late) {
$status = 'L';
$label = 'Late';
} else if ($record->is_early_departure) {
$status = 'E';
$label = 'Early Checkout';
} else if ($record->status === 'half_day') {
$status = 'H';
$label = 'Half Day';