Unified search algorithm across all lists; per-section record visibility (contacts, deals, activities, leads, finance, tickets, notes, projects)
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
<script setup lang="ts">
|
||||
import { computed, onMounted, ref, watch } from 'vue';
|
||||
import { matchesSearch } from '@/lib/search';
|
||||
import TableColumnsMenu from '@/components/TableColumnsMenu.vue';
|
||||
import { PAGE_SIZE_OPTIONS, usePageSize } from '@/lib/pageSize';
|
||||
import { RouterLink, useRoute, useRouter } from 'vue-router';
|
||||
@@ -204,13 +205,9 @@ const filtered = computed(() => {
|
||||
if (Number.isFinite(amax) && amountMax.value !== '') {
|
||||
list = list.filter((r) => Math.abs(r.amount) <= amax);
|
||||
}
|
||||
const query = q.value.trim().toLowerCase();
|
||||
if (query) {
|
||||
if (q.value.trim()) {
|
||||
list = list.filter((r) =>
|
||||
[r.number, r.customerName, r.personName, r.statusLabel, String(r.amount)]
|
||||
.join(' ')
|
||||
.toLowerCase()
|
||||
.includes(query),
|
||||
matchesSearch(q.value, [r.number, r.customerName, r.personName, r.statusLabel, String(r.amount)]),
|
||||
);
|
||||
}
|
||||
return list;
|
||||
|
||||
Reference in New Issue
Block a user