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}
This commit is contained in:
IT Dog
2026-07-19 23:28:18 +08:00
parent 25ebf6da66
commit 6c70b81df5
+1 -1
View File
@@ -426,7 +426,7 @@ function LeavesTab() {
{(showCreate || editing) && ( {(showCreate || editing) && (
<LeaveModal <LeaveModal
leave={editing} leave={editing}
employees={uniqueEmps} employees={employees}
onClose={() => { setShowCreate(false); setEditing(null) }} onClose={() => { setShowCreate(false); setEditing(null) }}
onSaved={() => { setShowCreate(false); setEditing(null); load() }} onSaved={() => { setShowCreate(false); setEditing(null); load() }}
/> />