Drivers can now switch the header toggle to 'Invoice' to see stops bucketed by PO within each supplier. Each PO sub-header is collapsible and shows the PO number + item count + total qty. Per-PO bulk actions (visible only when the supplier has more than one invoice): - Green 'All' button marks every item under that PO as collected in one tap (no per-item modal flow, expectedQty is auto-stamped). - Red flag button flags every item with a generic problem note. Implementation: - New 'po' groupMode in app/page.tsx with its own groupedByPO memo and expandedPOs Set state (auto-expanded on load, controlled by expandAll/collapseAll alongside supplier expansion). - SupplierGroup now accepts optional poGroups + handlers and renders PO sub-headers in compact mode. Each PO is rendered as a flat list of CompactItemRow subcomponents (extracted to share the row markup between flat-list and per-PO render paths). - bulkCollect / bulkProblem helpers in lib/pocketbase.ts loop the patch; per-row failures are logged and excluded from the count so one bad row doesn't poison the batch. Co-authored-by: Orca <help@stably.ai> |
||
|---|---|---|
| .. | ||
| login | ||
| map | ||
| settings | ||
| .DS_Store | ||
| globals.css | ||
| layout.tsx | ||
| page.tsx | ||