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:
parent
0556502685
commit
6ffd6c6392
17 changed files with 104 additions and 59 deletions
|
|
@ -42,15 +42,15 @@ export function HoursReport() {
|
|||
convexUserId ? { tenantId, viewerId: convexUserId as Id<"users">, range: timeRange } : "skip"
|
||||
) as { rangeDays: number; items: HoursItem[] } | undefined
|
||||
|
||||
const items = data?.items ?? []
|
||||
const companies = useQuery(api.companies.list, convexUserId ? { tenantId, viewerId: convexUserId as Id<"users"> } : "skip") as Array<{ id: Id<"companies">; name: string }> | undefined
|
||||
const filtered = useMemo(() => {
|
||||
const items = data?.items ?? []
|
||||
const q = query.trim().toLowerCase()
|
||||
let list = items
|
||||
if (companyId !== "all") list = list.filter((it) => String(it.companyId) === companyId)
|
||||
if (q) list = list.filter((it) => it.name.toLowerCase().includes(q))
|
||||
return list
|
||||
}, [items, query, companyId])
|
||||
}, [data?.items, query, companyId])
|
||||
|
||||
return (
|
||||
<div className="space-y-6">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue