- There is {formatRemainingTime(minutesUntilClosing)} left to accept walk-in bookings
+ {#if minutesUntilClosing >= 75}
+
+
+
+
Online booking still open
+
Users booking online still have time to book in
+
{/if}
- {#if minutesUntilClosing >= 75}
-
- Users booking online still have time to book in
+ {#if minutesUntilClosing >= 30}
+
+
+
+
Walk-ins closing soon
+
There is {formatRemainingTime(minutesUntilClosing)} left to accept walk-in bookings
+
{/if}
@@ -418,6 +461,11 @@
£{summary.amount_due_today.toFixed(2)}
+ {#if summary.last_customer_name}
+
+ — {summary.last_customer_name}
+
+ {/if}
{/if}
@@ -765,7 +813,7 @@
{#if showPaymentModal && activeAppointment}
(showPaymentModal = false)}
onComplete={handlePaymentComplete}
/>
diff --git a/frontend/src/lib/components/today/PendingApprovals.svelte b/frontend/src/lib/components/today/PendingApprovals.svelte
index f3efc3d..ebe0cb1 100644
--- a/frontend/src/lib/components/today/PendingApprovals.svelte
+++ b/frontend/src/lib/components/today/PendingApprovals.svelte
@@ -265,8 +265,15 @@
fetchEditRequests();
}, 60_000);
+ function handleBookingApproved() {
+ fetchPendingApprovals();
+ fetchEditRequests();
+ }
+ window.addEventListener('bookingApproved', handleBookingApproved);
+
return () => {
clearInterval(intervalId);
+ window.removeEventListener('bookingApproved', handleBookingApproved);
};
});
@@ -398,7 +405,7 @@
{er.user?.full_name || 'Unknown'}
- Edit Request
+ Edit/Reschedule
{getEditRequestSummary(er)}
diff --git a/frontend/src/lib/components/today/TodayCalendar.svelte b/frontend/src/lib/components/today/TodayCalendar.svelte
index 98f947c..4801c0e 100644
--- a/frontend/src/lib/components/today/TodayCalendar.svelte
+++ b/frontend/src/lib/components/today/TodayCalendar.svelte
@@ -2,6 +2,7 @@
import { authStore } from '$lib/stores/auth.svelte';
import { SvelteDate } from 'svelte/reactivity';
import { toast } from 'svelte-sonner';
+ import { sanitizeText } from '$lib/utils/toast-safe';
import * as Card from '$lib/components/ui/card';
import { Button } from '$lib/components/ui/button';
import { Badge } from '$lib/components/ui/badge';
@@ -521,7 +522,7 @@
await fetchTodayBlockersData();
} else {
const text = await response.text();
- toast.error('Failed to create: ' + text, { id: loadingToast });
+ toast.error('Failed to create: ' + sanitizeText(text), { id: loadingToast });
}
} catch (err) {
console.error('Error creating time blocker:', err);
@@ -546,7 +547,7 @@
await fetchTodayBlockersData();
} else {
const text = await response.text();
- toast.error('Failed to delete: ' + text, { id: loadingToast });
+ toast.error('Failed to delete: ' + sanitizeText(text), { id: loadingToast });
}
} catch (err) {
console.error('Error deleting time blocker:', err);