fix hanging

This commit is contained in:
2026-04-23 10:15:50 +08:00
parent b0cfddb508
commit dd071f6d8a
447 changed files with 15047 additions and 23281 deletions

View File

@@ -835,8 +835,17 @@ class AttendanceRecordController extends Controller
$status = 'H';
$label = 'Half Day';
} else if ($record->status === 'present') {
$status = 'P';
$label = 'Present';
// Only show P if they actually clocked in/out, otherwise show A for data integrity
if (!empty($record->clock_in) && !empty($record->clock_out)) {
$status = 'P';
$label = 'Present';
} else if (!empty($record->clock_in)) {
$status = 'P';
$label = 'Present (Clocked In Only)';
} else {
$status = 'A';
$label = 'Marked Present (No times recorded)';
}
}
}