fix: resolve email saving issue and implement email substring search

This commit is contained in:
2026-05-28 08:01:43 +07:00
parent 9d83a74769
commit 29308d756a
3 changed files with 33 additions and 7 deletions
+4 -1
View File
@@ -147,7 +147,10 @@ const App = () => {
const deptMatch = emp.department_name && emp.department_name.toLowerCase().includes(queryClean);
const buildingMatch = emp.building && emp.building.toLowerCase().includes(queryClean);
return nameMatch || phoneMatch || internalPhoneMatch || internalPhoneStringMatch || titleMatch || companyMatch || deptMatch || buildingMatch;
// Match email fragment (by start, middle, domain, part before @)
const emailMatch = emp.email && emp.email.toLowerCase().includes(queryClean);
return nameMatch || phoneMatch || internalPhoneMatch || internalPhoneStringMatch || titleMatch || companyMatch || deptMatch || buildingMatch || emailMatch;
}
return true;