From 5a03f70a7aef40cece2656be32e088ecb7cd2a0f Mon Sep 17 00:00:00 2001 From: Alex | Kronox Date: Wed, 28 Aug 2024 20:35:44 +0200 Subject: [PATCH] use name when operating on search bar --- report-viewer/src/components/ComparisonTableFilter.vue | 2 +- report-viewer/src/components/ComparisonsTable.vue | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/report-viewer/src/components/ComparisonTableFilter.vue b/report-viewer/src/components/ComparisonTableFilter.vue index 99a381b75..b2e47a29b 100644 --- a/report-viewer/src/components/ComparisonTableFilter.vue +++ b/report-viewer/src/components/ComparisonTableFilter.vue @@ -83,7 +83,7 @@ const searchStringValue = computed({ } for (const submissionId of store().getSubmissionIds) { - const submissionParts = submissionId.toLowerCase().split(/ +/g) + const submissionParts = store().submissionDisplayName(submissionId).toLowerCase().split(/ +/g) if (submissionParts.every((part) => searchParts.includes(part))) { store().state.anonymous.delete(submissionId) } diff --git a/report-viewer/src/components/ComparisonsTable.vue b/report-viewer/src/components/ComparisonsTable.vue index 9af99fe2c..37703b647 100644 --- a/report-viewer/src/components/ComparisonsTable.vue +++ b/report-viewer/src/components/ComparisonsTable.vue @@ -236,9 +236,9 @@ function getFilteredComparisons(comparisons: ComparisonListElement[]) { return comparisons.filter((c) => { // name search - const id1 = c.firstSubmissionId.toLowerCase() - const id2 = c.secondSubmissionId.toLowerCase() - if (searches.some((s) => id1.includes(s) || id2.includes(s))) { + const name1 = store().submissionDisplayName(c.firstSubmissionId).toLowerCase() + const name2 = store().submissionDisplayName(c.secondSubmissionId).toLowerCase() + if (searches.some((s) => name1.includes(s) || name2.includes(s))) { return true }