Speed up payment/refund processing on the supervisor dashboard
Reconciling a Yoco payment and sending payment links blocked the HTTP response on ticket-PDF generation and email/WhatsApp sends; they now run in the background like the other payment flows already did. Registration/payment option loops (pricing, stock checks, ticket generation) now resolve concurrently instead of sequentially. The Payments page dropped a per-registration N+1 fetch and now refreshes its lists in parallel after each action. Added missing indexes for dashboard stats and donation-leg lookups, and made GET /api/registrations optionally paginated. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -201,6 +201,7 @@ model Registration {
|
||||
@@index([eventId])
|
||||
@@index([userId, status])
|
||||
@@index([eventId, status])
|
||||
@@index([createdAt, status])
|
||||
}
|
||||
|
||||
model RegistrationOption {
|
||||
@@ -249,7 +250,7 @@ model Payment {
|
||||
@@index([registrationId])
|
||||
@@index([eventId])
|
||||
@@index([createdAt])
|
||||
@@index([originalPaymentId])
|
||||
@@index([originalPaymentId, isDonation])
|
||||
}
|
||||
|
||||
model Ticket {
|
||||
@@ -271,6 +272,7 @@ model Ticket {
|
||||
@@index([eventId])
|
||||
@@index([userId])
|
||||
@@index([registrationOptionId])
|
||||
@@index([createdAt])
|
||||
}
|
||||
|
||||
model TicketUsage {
|
||||
|
||||
Reference in New Issue
Block a user