feat: aggiunta ricerca testuale in cache nella pagina ricerca spudorata.
This commit is contained in:
1 parent
8d24759a15
commit
a36e501596
4 files changed
+261
-254
No files matched your search
@@ -324,6 +324,30 @@ const RicercaSpudorataView = {
|
||||
let list = [...this.cachedTickets];
|
||||
const s = Filters.state;
|
||||
|
||||
if (s.sub_search) {
|
||||
const q = String(s.sub_search).toLowerCase().trim();
|
||||
if (q) {
|
||||
list = list.filter(t => {
|
||||
const fields = [
|
||||
t.tn,
|
||||
t.title,
|
||||
t.queue_name,
|
||||
t.state_name,
|
||||
t.priority_name,
|
||||
t.owner_first,
|
||||
t.owner_last,
|
||||
`${t.owner_first || ''} ${t.owner_last || ''}`,
|
||||
t.customer_first,
|
||||
t.customer_last,
|
||||
`${t.customer_first || ''} ${t.customer_last || ''}`,
|
||||
t.customer_id,
|
||||
t.customer_user_id
|
||||
];
|
||||
return fields.some(f => f && String(f).toLowerCase().includes(q));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
if (s.state_id) {
|
||||
const selectedStates = String(s.state_id).split(',').filter(Boolean);
|
||||
list = list.filter(t => selectedStates.includes(String(t.ticket_state_id)));
|
||||
|
||||
Reference in new issue
Block a user