From 0bd84b035d3613444e2b7aa91ffd93dd40cae725 Mon Sep 17 00:00:00 2001 From: "cyril.tsui" Date: Mon, 17 Jun 2024 11:21:54 +0800 Subject: [PATCH] update --- src/components/CreateProject/StaffAllocation.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/CreateProject/StaffAllocation.tsx b/src/components/CreateProject/StaffAllocation.tsx index 76130e7..47d79a4 100644 --- a/src/components/CreateProject/StaffAllocation.tsx +++ b/src/components/CreateProject/StaffAllocation.tsx @@ -171,8 +171,8 @@ const StaffAllocation: React.FC = ({ allStaffs.filter((staff) => { const q = query.toLowerCase(); return ( - (staff.name.toLowerCase().includes(q) || - staff.staffId.toString().includes(q) || + (staff.name?.toLowerCase().includes(q) || + staff.staffId?.toLowerCase().includes(q) || staff.currentPosition?.toLowerCase().includes(q)) && Object.entries(filters).every(([filterKey, filterValue]) => { const staffColumnValue = staff[filterKey as keyof StaffResult];