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. |
||
|---|---|---|
| .. | ||
| hooks.ts | ||
| itemsCache.ts | ||
| pocketbase.ts | ||
| pwa.ts | ||
| theme.ts | ||
| types.ts | ||
| utils.ts | ||