diff --git a/frontend/src/lib/components/payments/UserPaymentModal.svelte b/frontend/src/lib/components/payments/UserPaymentModal.svelte index 06235b9..c47cc28 100644 --- a/frontend/src/lib/components/payments/UserPaymentModal.svelte +++ b/frontend/src/lib/components/payments/UserPaymentModal.svelte @@ -217,10 +217,7 @@ // state. The backend will split the charge into deposit + non-deposit records // when appropriate, so this choice mainly controls the button label and amount. const defaultType = $derived(defaultPaymentType ?? (depositOutstanding ? 'deposit' : 'full')); - let paymentType = $state<'full' | 'partial' | 'deposit'>('full'); - $effect(() => { - paymentType = defaultType as 'full' | 'partial' | 'deposit'; - }); + let paymentType = $derived.writable(defaultType as 'full' | 'partial' | 'deposit'); let pollingInterval: ReturnType | null = null;