pelagia-portal/App/app/(portal)/po/[id]
Claude (auto-fix) 66f2e133b1 fix(inventory): add items to inventory on PO approval, not on closure
Moves the ItemInventory upsert from confirmReceipt (CLOSED) to approvePo
(MGR_APPROVED) so site inventory is visible as soon as a purchase order
is manager-approved, without waiting for full closure.

- approvePo: fetch lineItems, upsert ItemInventory per site PO line item
  that has a productId; revalidate the site admin path.
- confirmReceipt: remove the now-redundant inventory update block.
- Rename approvepo → approvePo for consistency (fixes import mismatch
  in the existing integration test file).
- Add three integration test cases covering: site PO inventory increment,
  line items without productId are skipped, vessel-only POs are untouched.

Fixes #7

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-19 03:15:56 +05:30
..
edit feat(po): allow submitter to set an optional PO date 2026-06-16 13:06:12 +05:30
receipt fix(inventory): add items to inventory on PO approval, not on closure 2026-06-19 03:15:56 +05:30
actions.ts fix(notifications): rationalise who gets which email 2026-05-27 03:45:40 +05:30
page.tsx refactor: revert cost centre to vessels only, remove vessel-site link 2026-05-30 18:14:24 +05:30
vendor-id-form.tsx fix(ui): reset pending state on success for all save/confirm buttons 2026-05-27 04:36:29 +05:30