(Feat-Fix): Added unit display and completion in work allocation system, and ability to edit completed units. Fixed contractor reporting system not displaying data under corresponding departments.

This commit is contained in:
2025-12-31 08:09:04 +00:00
parent 1ac9d22e2d
commit 4e5555c658
13 changed files with 2361 additions and 29 deletions

View File

@@ -69,9 +69,9 @@ router.get(
queryParams.push(endDate);
}
// Department filter (for SuperAdmin)
if (departmentId && currentUser.role === "SuperAdmin") {
query += " AND e.department_id = ?";
// Department filter - filter by sub-department's department
if (departmentId) {
query += " AND sd.department_id = ?";
queryParams.push(departmentId);
}