1.4 KiB
Task 10 report
Implementation commit: 03ac13d951d01c1d01cdd8cc190704d1cb138cce
Fix round: staged candidate doc_number/doc_type are authoritative for unposted candidates; legacy delivery-note document fields are used only for posted candidates. Unknown-supplier grouping keys only on a resolved supplier relation/id while retaining OCR supplier text as evidence. Supplier candidate counts and delivery inputs are precomputed in maps, with the scoped queue using getFullList intentionally to avoid silent truncation. Unposted candidates now fall back from staged date to posted/legacy date and then batch upload date when needed.
Runtime fix: server-callable queue mapping, filtering, and link model functions now live in work-queue-model.ts, separate from the use client view. This removes the Next.js server-to-client callable boundary error.
Verification:
npm test -- --run src/app/dashboard/financial/delivery-notes/work-queue/work-queue.test.ts— 8 passednpm run build— passed; queue route compilednpm run typecheck— passedgit diff --check— passed
Concern: candidate site scope is applied through the owning batch.site relation because dn_batch_notes stores the batch relation rather than a direct site field. The test follows the repository's .test.ts discovery pattern (the brief's .test.tsx extension is not included by the checked-in Vitest config).