feat(tickets): preserve requester/assignee/company snapshots + timeline fallbacks; chore: add requester index\n\n- Add requesterSnapshot, assigneeSnapshot, companySnapshot to tickets\n- Use snapshots as fallback in list/get/play\n- Update snapshots on assignee changes/startWork\n- Preserve snapshots before deleting users/companies\n- Add index tickets.by_tenant_requester\n- Add migrations.backfillTicketSnapshots\n\nchore(convex): upgrade to ^1.28.0 and run codegen\nchore(next): upgrade Next.js to 15.5.6 and update React/eslint-config-next\nfix: remove any and lint warnings; tighten types across API routes and components\ndocs: add docs/ticket-snapshots.md
This commit is contained in:
parent
0d82162a0e
commit
216feca971
16 changed files with 884 additions and 552 deletions
|
|
@ -982,12 +982,9 @@ export function MachineDetails({ machine }: MachineDetailsProps) {
|
|||
api.companies.list,
|
||||
companyQueryArgs ?? ("skip" as const)
|
||||
) as Array<{ id: string; name: string; slug?: string }> | undefined
|
||||
// Convex codegen precisa ser atualizado para tipar `machines.listAlerts`.
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
const machinesApi: any = api
|
||||
const alertsHistory = useQuery(
|
||||
machine && machinesApi?.machines?.listAlerts ? machinesApi.machines.listAlerts : "skip",
|
||||
machine && machinesApi?.machines?.listAlerts ? { machineId: machine.id as Id<"machines">, limit: 50 } : ("skip" as const)
|
||||
machine ? api.machines.listAlerts : "skip",
|
||||
machine ? { machineId: machine.id as Id<"machines">, limit: 50 } : ("skip" as const)
|
||||
) as MachineAlertEntry[] | undefined
|
||||
const machineAlertsHistory = alertsHistory ?? []
|
||||
const metadata = machine?.inventory ?? null
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue