chore(types): remove explicit any, fix hook deps, and unused vars across admin/api/tickets; tighten zod server schemas; adjust UI types; fix pdf export expression; minor cleanup

This commit is contained in:
Esdras Renan 2025-10-09 22:43:39 -03:00
parent 0556502685
commit 6ffd6c6392
17 changed files with 104 additions and 59 deletions

View file

@ -42,7 +42,7 @@ export function TicketsView() {
const companies = useMemo(() => {
const set = new Set<string>()
for (const t of tickets) {
const name = (t as any).company?.name as string | undefined
const name = ((t as unknown as { company?: { name?: string } })?.company?.name) as string | undefined
if (name) set.add(name)
}
return Array.from(set).sort((a, b) => a.localeCompare(b, "pt-BR"))
@ -64,11 +64,11 @@ export function TicketsView() {
working = working.filter((t) => t.queue === filters.queue)
}
if (filters.company) {
working = working.filter((t) => ((t as any).company?.name ?? null) === filters.company)
working = working.filter((t) => (((t as unknown as { company?: { name?: string } })?.company?.name) ?? null) === filters.company)
}
return working
}, [tickets, filters.queue, filters.status, filters.view])
}, [tickets, filters.queue, filters.status, filters.view, filters.company])
return (
<div className="flex flex-col gap-6 px-4 lg:px-6">