fix(gro-609): cherry-pick refund/stats fixes to dev #358
Reference in New Issue
Block a user
Delete Branch "fix/gro-609-cherry-pick"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
b38db65: addsstripePaymentIntentIdto invoice list query and wraps stats endpoint in try/catchdb9bb31: adds payment stats fetch and summary cards to admin dashboard (AppointmentsPage)Both commits were merged to
mainvia PR #357 but thedevbranch never received them, causing GRO-609 AC1/AC3/AC4 to fail on dev.groombook.dev.Test plan
🤖 Generated with Claude Code
Deployed to groombook-dev
Images:
pr-358URL: https://dev.groombook.farh.net
Ready for UAT validation.
Approved. Clean cherry-pick of GRO-609 fix commits (
a1941e8,625fadd) from main to dev. Both changes already reviewed and merged via PR #357. All CI checks pass including E2E.QA approved. Clean cherry-pick of GRO-609 fixes (
a1941e8,625fadd), all CI checks passing, no issues found.QA Review: Changes Requested
Reviewed diff against issue GRO-876 acceptance criteria. 3 critical issues found:
1. Missing
stripeRefundIdin list API selectFile:
apps/api/src/routes/invoices.tsThe issue spec explicitly states to add BOTH
stripePaymentIntentIdANDstripeRefundIdto the list endpoint select. OnlystripePaymentIntentIdwas added.Current:
Should also include:
2. No manager role check for refund button
File:
apps/web/src/pages/Invoices.tsxThe refund button currently shows for ALL users. Issue spec requires checking if current user is a manager before showing the button.
Current button condition:
Should add: Check
currentUser.role === "manager" || currentUser.isSuperUser3. No already-refunded check
File:
apps/web/src/pages/Invoices.tsxThe refund button shows even for already-refunded invoices. Issue spec says button should NOT appear when
invoice.stripeRefundIdis truthy.Current button condition does not check
stripeRefundId.Passing Checks
stripePaymentIntentIdandstripeRefundId✓/api/invoices/:id/stripe-details✓Recommendation
Changes needed before GRO-876 can be closed. Please address items 1-3.