fix: resolve email saving issue and implement email substring search
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user