WFDASHDRIVER-APP/lib
Dave 04d56fa1fb Send reported problems back to the collection pool
Previously, reportProblem parked an order item in item_status='problem'
and reportStockProblem only toggled problem_flag on a stock_purchase_items
row that stayed in status='assigned_to_driver'. Both ended up as a
dead-end: the row fell off the driver's Assigned tab but never landed
anywhere the driver (or any other driver) could re-attempt it, and the
stock-pickup variant looked like 'tapped Problem and nothing happened'
because the assigned-status filter didn't exclude the flagged row.

Now both writers release the row back to collection_pool, clear drv_id
and assigned_at, and keep problem_flag=true for operator-side audit.
getPoolItems and getProblemItems are extended to surface
stock_purchase_items alongside order_items so flagged / pooled stock
pickups actually appear in both tabs. Toast wording on the driver side
updated to reflect the pool handoff.
2026-09-08 22:04:37 +02:00
..
hooks.ts feat: popover stays above footer, partial collections must be justified 2026-08-02 22:58:08 +02:00
itemsCache.ts feat: add pickup proof photos, improve performance and UX 2026-07-07 20:43:17 +02:00
pocketbase.ts Send reported problems back to the collection pool 2026-09-08 22:04: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(pocketbase): merge stock_purchase_items into Assigned list 2026-08-17 22:33:10 +02:00
utils.ts feat(grouping): add area grouping, refine UI and cleanup 2026-07-10 02:01:57 +02:00