Sep 14 - Update the check-ins pages to force employee to select the type of work

This commit is contained in:
2026-09-14 12:18:53 -04:00
parent d92cff81e5
commit 4fc500707b
4 changed files with 87 additions and 13 deletions
+16 -1
View File
@@ -327,10 +327,25 @@ function submitCheckin() {
const workTypeField = document.getElementById("work_type");
const workType = workTypeField ? workTypeField.value.trim() : "";
// Type of Work has no default - the employee must choose one
if (!workType) {
if (workTypeField) {
workTypeField.classList.add("work-type-missing");
workTypeField.focus();
}
showCustomStatusMessage(
"Please select the Type of Work / Por favor seleccione el Tipo de Trabajo",
"error"
);
isSubmitting = false;
updateSubmitButton(false);
return;
}
// Prepare form data
const formData = new FormData();
formData.append("employee_id", employeeId);
// Empty string = Regular; PW / SP / C are appended to the ID server-side
// R = Regular (ID stored unchanged); PW / SP / C are appended to the ID server-side
formData.append("work_type", workType);
formData.append(
"latitude",