fix(GRO-876): wire up refund button in invoice detail modal

- Add stripePaymentIntentId and stripeRefundId to Invoice interface (types)
- Include both fields in the invoice list endpoint select (api)
- Show Refund button only when: status=paid, stripePaymentIntentId exists,
  stripeRefundId is null, and current user is manager
- Render "Refunded" badge on already-refunded invoices
- Full/partial refund dialog with amount input for partial

Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
Test User
2026-04-22 07:54:54 +00:00
parent 9da0520eb6
commit 628ed34d73
2 changed files with 76 additions and 68 deletions
+1
View File
@@ -102,6 +102,7 @@ invoicesRouter.get(
paidAt: invoices.paidAt,
notes: invoices.notes,
stripePaymentIntentId: invoices.stripePaymentIntentId,
stripeRefundId: invoices.stripeRefundId,
createdAt: invoices.createdAt,
updatedAt: invoices.updatedAt,
})