WFDASHDRIVER-APP/lib
Dave 286b86162b feat(problems): say what kind of problem, and flag out-of-stock rows
Every flagged item rendered the same red triangle and the same
"Problem" pill, whichever problem it was. An out-of-stock line and a
quality complaint look identical on the list, and they need different
follow-ups — one is a phone call to the supplier, the other is a
replacement.

problem_type is a PB *select* on order_items (stock|supplier|driver|
delivery|pricing|other, plus the four values added 2026-10-14) but a
free *text* field on stock_purchase_items, so the label map is
deliberately wider than PROBLEM_TYPES: updateStockCollectionStatus
writes `stock` on its own, and stock rows can carry anything.

Out-of-stock rows also get a red left rail and a light red wash. The
pill stays the signal — colour is never the only thing carrying the
meaning, since a red wash alone is invisible to anyone who can't
distinguish it from the hover state.

Colour is deliberately NOT used to disable Collect. Stock can arrive
without anyone clearing the flag, and a driver standing in front of
the shelf is the best possible source of truth.
2026-10-15 08:24:58 +02:00
..
hooks.ts feat: popover stays above footer, partial collections must be justified 2026-08-02 22:58:08 +02:00
image.ts fix(photos): downscale pickup photos client-side before upload 2026-10-14 16:12:37 +02:00
itemsCache.ts feat: add pickup proof photos, improve performance and UX 2026-07-07 20:43:17 +02:00
pocketbase.ts fix(photos): downscale pickup photos client-side before upload 2026-10-14 16:12:37 +02:00
pwa.ts Add PWA support and UI redesign 2026-05-27 00:34:50 +02:00
theme.ts feat: add complete dark mode support with settings toggle 2026-07-07 18:28:19 +02:00
types.ts feat(problems): say what kind of problem, and flag out-of-stock rows 2026-10-15 08:24:58 +02:00
utils.ts feat(grouping): add area grouping, refine UI and cleanup 2026-07-10 02:01:57 +02:00