From 6c70b81df5638741bda2547cb41e86a4055cb4f6 Mon Sep 17 00:00:00 2001 From: IT Dog Date: Sun, 19 Jul 2026 23:28:18 +0800 Subject: [PATCH] Fix: replace uniqueEmps reference with employees state in LeaveModal Bug: After refactoring LeavesTab to fetch employees from /api/employees/list (useState + useEffect), the LeaveModal was still passed employees={uniqueEmps} but that variable no longer existed, causing JS runtime error: "Can't find variable: uniqueEmps" Fix: rename reference to {employees} --- frontend/src/pages/holidays/Holidays.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/pages/holidays/Holidays.jsx b/frontend/src/pages/holidays/Holidays.jsx index e2cd085..622336b 100644 --- a/frontend/src/pages/holidays/Holidays.jsx +++ b/frontend/src/pages/holidays/Holidays.jsx @@ -426,7 +426,7 @@ function LeavesTab() { {(showCreate || editing) && ( { setShowCreate(false); setEditing(null) }} onSaved={() => { setShowCreate(false); setEditing(null); load() }} />