fix: combine detailed tender search fields

This commit is contained in:
2026-09-06 15:59:01 +03:00
parent 9b751296ed
commit 3a5b06cee2
8 changed files with 78 additions and 35 deletions
+5
View File
@@ -5,6 +5,11 @@ export function matchingItemResults(result, query) {
return result?.query === normalizeTenderSearch(query) ? result.matches : null;
}
export function matchesDetailedSearch(tender, {institution='',registration=''} = {}) {
return normalizeTenderSearch(tender.kurum).includes(normalizeTenderSearch(institution)) &&
normalizeTenderSearch(tender.ikn).includes(normalizeTenderSearch(registration));
}
export function matchesTenderSearch(tender, query, itemMatches) {
const q=normalizeTenderSearch(query);
if (!q) return true;