fix(GRO-639): N+1 queries in reminder scheduler #298

Closed
the-dogfather-cto[bot] wants to merge 8 commits from fix/gro-639-n-plus-one-reminder-scheduler into main

8 Commits

Author SHA1 Message Date
Flea Flicker 04147f3e6c fix(reminders): replace N+1 per-appointment queries with single JOIN query
Replace the per-appointment sequential queries (client, pet, service,
staff) in runReminderCheck with a single JOIN query that fetches all
appointment data in one round-trip. Group results in memory using a Map
for O(1) lookups.

Before: 1 initial query + N*(1 existing + 4 related) = 1 + 5N queries
After:  1 initial + 1 sent-check + 1 JOIN = 3 queries total

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-04-14 14:41:26 +00:00
Paperclip dc947874ca fix(GRO-607): Stripe Elements payment UI - lint/type fixes
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-04-13 20:00:18 +00:00
Paperclip 78b71cca58 GRO-607: Replace mock payment flow with real Stripe Elements
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-04-13 19:55:49 +00:00
Paperclip 5456637705 GRO-607: Add /portal/config endpoint + rename date field
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-04-13 19:55:24 +00:00
Paperclip 3037b77fe8 GRO-607: Install Stripe frontend packages
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-04-13 19:55:13 +00:00
Paperclip ae873215c0 feat(GRO-597): Stripe payment backend — schema, service, API, webhooks
Consolidates GRO-605, GRO-606, GRO-608 into a single clean PR:
- GRO-605: Stripe SDK integration + payment service
- GRO-606: Payment API endpoints (pay invoice, payment methods, refunds)
- GRO-608: Stripe webhook handler

Migration consolidation:
- Single 0026_stripe_payment.sql migration adds stripeCustomerId to clients
  and stripe_payment_intent_id, stripe_refund_id, payment_failure_reason to invoices
- Removed duplicate 0027_stripe_identifiers.sql

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-04-13 19:54:15 +00:00
Paperclip 9d37053580 GRO-606: Add payment API endpoints (pay invoice, payment methods, refunds)
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-04-13 19:43:24 +00:00
Paperclip fdaf4db0d5 GRO-605: Stripe SDK integration + payment service
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-04-13 19:43:03 +00:00