feat: agenda polish, SLA sync, filters
This commit is contained in:
parent
7fb6c65d9a
commit
6ab8a6ce89
40 changed files with 2771 additions and 154 deletions
12
src/lib/ticket-matchers.ts
Normal file
12
src/lib/ticket-matchers.ts
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
import type { Ticket } from "@/lib/schemas/ticket"
|
||||
|
||||
export const VISIT_KEYWORDS = ["visita", "visitas", "in loco", "laboratório", "laboratorio", "lab"]
|
||||
|
||||
export function isVisitTicket(ticket: Ticket): boolean {
|
||||
const queueName = ticket.queue?.toLowerCase() ?? ""
|
||||
if (VISIT_KEYWORDS.some((keyword) => queueName.includes(keyword))) {
|
||||
return true
|
||||
}
|
||||
const tags = Array.isArray(ticket.tags) ? ticket.tags : []
|
||||
return tags.some((tag) => VISIT_KEYWORDS.some((keyword) => tag.toLowerCase().includes(keyword)))
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue