pelagia-portal/App
Hardik 0252e8eab4 feat(approvals): highlight submitter's edits to manager on resubmission
When a submitter edits and resubmits a PO after the manager requested edits
(EDITS_REQUESTED → MGR_REVIEW), the manager now sees exactly what changed.

Changes:
- edit/actions.ts: before mutating the PO, snapshot the current state
  (line items + header fields incl. vessel/account/vendor names) into the
  SUBMITTED action's metadata as { editSnapshot: { lineItems, fields } }.

- po-line-items-editor: add `originalItemsLabel` prop so the diff banner
  message can be context-specific (manager edit vs. submitter resubmit).

- po-detail: detect the resubmit snapshot from the most recent SUBMITTED
  action with editSnapshot metadata; show a "Changes from last review"
  amber table listing every header field the submitter changed (title,
  cost centre, account, vendor, project code, date required, place of
  delivery); pass the resubmit snapshot as originalItems to LineItemsEditor
  so changed line items are highlighted with strikethrough on prior values.
  Resubmit snapshot takes priority over manager-line-edit diff.
  Panel is only visible to MANAGER / SUPERUSER when status is MGR_REVIEW.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-16 04:17:51 +05:30
..
pelagia-portal feat(approvals): highlight submitter's edits to manager on resubmission 2026-05-16 04:17:51 +05:30