WFDASHDRIVER-APP/app
Dave 22bf5dab81 feat(pocketbase): merge stock_purchase_items into Assigned list
Stock pickups live in stock_purchase_items (status="assigned_to_driver"),
not order_items. Previously getMyAssignedItems() only queried order_items,
so a driver with a stock pickup assigned to them saw nothing in the
Assigned tab or Map.

- getMyAssignedStockItems() fetches stock_purchase_items with the
  matching drv_id/status filter and expands purchase.supplier +
  stock_item. A toOrderItemFromStock() reshaper puts each row onto
  the OrderItem shape so the existing card/modal/map components
  render stock pickups unchanged; a kind:'pickup' discriminator
  tags them for the write side.
- handleCollect / handleProblem / handleBulkCollect / handleBulkProblem
  branch on item.kind to PATCH stock_purchase_items instead of
  order_items (status="collected" + quantity_received on collect,
  problem_flag + problem_type + problem_notes on problem; mirrors
  the order_items quantity-mismatch auto-notes).
- Same merge on app/map/page.tsx so the stock stop lands on the map.
- scripts/check-pb-schema.mjs now covers the stock filter so a future
  PB rename is caught at prebuild.
2026-08-17 22:33:10 +02:00
..
login refactor(ui): rebrand app, fix supplier naming 2026-07-05 22:32:20 +02:00
map feat(pocketbase): merge stock_purchase_items into Assigned list 2026-08-17 22:33:10 +02:00
settings feat: add complete dark mode support with settings toggle 2026-07-07 18:28:19 +02:00
.DS_Store Refactor collections to order items 2026-05-25 00:47:47 +02:00
globals.css feat: add complete dark mode support with settings toggle 2026-07-07 18:28:19 +02:00
layout.tsx feat: add pickup proof photos, improve performance and UX 2026-07-07 20:43:17 +02:00
page.tsx feat(pocketbase): merge stock_purchase_items into Assigned list 2026-08-17 22:33:10 +02:00