(Feat-Fix): Fixed the check-in, check-out system, added a contractor payment system.

This commit is contained in:
2025-12-21 08:54:47 +00:00
parent 8fcbfe2a47
commit 04e25527e8
7 changed files with 705 additions and 83 deletions

View File

@@ -221,9 +221,11 @@ router.post("/", authenticateToken, authorize("SuperAdmin"), async (ctx) => {
}
// Update the employee's department and contractor
// If no target contractor specified, keep the original contractor
const newContractorId = targetContractorId || employee.contractor_id || null;
const [updateResult] = await connection.execute(
"UPDATE users SET department_id = ?, contractor_id = ? WHERE id = ?",
[targetDepartmentId, targetContractorId || null, employeeId],
[targetDepartmentId, newContractorId, employeeId],
);
const affectedRows =