From 6ace9abab8f9eab98f69be42235dacca1d7742d9 Mon Sep 17 00:00:00 2001 From: Stephen Adamson Date: Mon, 15 Jun 2026 23:19:39 +0100 Subject: [PATCH] feat(frontend): add deposit and payment warnings to cancel modal Shows the total amount already paid in the cancellation confirmation, plus deposit-specific messaging: forfeiture warning when deposit is paid, and a note that outstanding deposit is no longer due when deposit is required but not yet paid. Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus --- .../account/UserBookingModal.svelte | 25 ++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/frontend/src/lib/components/account/UserBookingModal.svelte b/frontend/src/lib/components/account/UserBookingModal.svelte index c0f5c86..9fe4480 100644 --- a/frontend/src/lib/components/account/UserBookingModal.svelte +++ b/frontend/src/lib/components/account/UserBookingModal.svelte @@ -634,16 +634,35 @@ Cancel Booking - Are you sure you want to cancel this booking? + {#if hasPayments} +

+ Are you sure you want to cancel this booking? You have already made payments totalling + £{totalPaid.toFixed(2)}. +

+ {:else} + Are you sure you want to cancel this booking? + {/if} {#if hasPayments}

Please note:

- The £{totalPaid.toFixed(2)} already paid for this booking - will not be refunded, but will be retained as credit towards a future appointment. + Any amounts paid (£{totalPaid.toFixed(2)}) will + not be refunded, but will be retained as credit towards a future appointment.

+ {#if selectedBooking} + {#if selectedBooking.deposit_paid} +

+ The deposit of + £{selectedBooking.deposit_amount?.toFixed(2)} + paid for this booking may be forfeited. +

+ {/if} + {#if selectedBooking.deposit_required && !selectedBooking.deposit_paid} +

Any outstanding deposit will no longer be due.

+ {/if} + {/if}
{/if}