The PO Activity timeline rendered every partial payment as the generic "Partial payment confirmed". markPaid() already persists the instalment amount on the PARTIAL_PAYMENT_CONFIRMED action's metadata (metadata.paymentAmount), so surface it: the row now reads "Partial payment of <amount> confirmed" using the PO's own currency. Falls back to the plain label when paymentAmount is missing or non-numeric (older audit rows) so historical POs never render NaN. Extracted ACTION_LABELS + the new actionLabel() helper into lib/po-activity.ts so the label logic is unit-testable without pulling the server-only PoDetail component (and its storage/auth imports) into jsdom. Fixes #140 |
||
|---|---|---|
| .. | ||
| cancel-po-controls.tsx | ||
| delivery-location-field.tsx | ||
| discard-draft-button.tsx | ||
| email-vendor-button.tsx | ||
| file-uploader.tsx | ||
| po-detail.tsx | ||
| po-line-items-editor.tsx | ||
| po-status-badge.tsx | ||
| po-terms-editor.tsx | ||
| project-code-field.tsx | ||
| submit-draft-button.tsx | ||
| unsaved-changes-guard.tsx | ||