feat: user booking cancel/reschedule, estimated subtotal wording

- Add Cancel Booking button with confirmation dialog (future bookings only, pending/confirmed status)
- If payments exist, dialog shows warning: amount paid retained as credit towards future appointment
- Add Reschedule button with inline form (date/time picker + optional notes)
- Reschedule submits to POST /api/bookings/{id}/edit-request
- Change 'Amount Due' to 'Estimated Subtotal' for future bookings
- Footer: Cancel (left) | Reschedule, Add to Calendar, Close (right)
- Mobile-first: flex-wrap layout for footer buttons
This commit is contained in:
2026-05-08 22:02:16 +01:00
parent 968b40b4d9
commit fa10134d41
2 changed files with 285 additions and 87 deletions
@@ -9,12 +9,12 @@ No external dependencies. No paid services. No API keys needed.
## P0 — Critical (Fix Now)
| # | Gap | Effort | Area | Notes |
| --- | ---------------------------------------------------- | -------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 1 | ~~`DELETE /api/user/account` is a no-op~~ ✅ | S (1-2h) | Backend | Wired to `anonymize_user()` for registered users and `delete_guest_user()` for guests. CardDAV contact deleted best-effort. |
| 2 | ~~**WalkInCreateModal guest booking errors out**~~ ✅ | S (1-2h) | Frontend | Guest creation now fires at submit time in both walk-in and call-in flows. Phone defaults to +447700900000 if left blank. |
| # | Gap | Effort | Area | Notes |
| --- | ---------------------------------------------------- | -------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 1 | ~~`DELETE /api/user/account` is a no-op~~ ✅ | S (1-2h) | Backend | Wired to `anonymize_user()` for registered users and `delete_guest_user()` for guests. CardDAV contact deleted best-effort. |
| 2 | ~~**WalkInCreateModal guest booking errors out**~~ ✅ | S (1-2h) | Frontend | Guest creation now fires at submit time in both walk-in and call-in flows. Phone defaults to +447700900000 if left blank. |
| 3 | ~~**ApprovalModal decline/cancel stub**~~ ✅ | S (2-3h) | Frontend | `handleDecline()` now calls `POST /api/admin/bookings/{id}/cancel`. Backend sets status to `we_cancelled`, acknowledges pending notification, creates cancelled_booking notification. |
| 4 | **CurrentAppointment action stubs** | M (1d) | Frontend | `handleTakePayment()` ⚠️ blocked on Square. `handleExtend()`, `handleCancel()` — dead buttons. |
| 4 | **CurrentAppointment action stubs** | M (1d) | Frontend | `handleTakePayment()` ⚠️ blocked on Square. `handleExtend()`, `handleCancel()` — dead buttons. |
## P1 — High