diff --git a/frontend/src/app.d.ts b/frontend/src/app.d.ts index e5e13f7..99ea21c 100644 --- a/frontend/src/app.d.ts +++ b/frontend/src/app.d.ts @@ -13,6 +13,7 @@ declare global { __walkInCountdownInterval?: ReturnType; __walkInModalCountdownInterval?: ReturnType; __bookingCreateCountdownInterval?: ReturnType; + __bookingFlowCountdownInterval?: ReturnType | null; } } diff --git a/frontend/src/lib/components/booking/BookingFlow.svelte b/frontend/src/lib/components/booking/BookingFlow.svelte index 62cb08b..5049d4c 100644 --- a/frontend/src/lib/components/booking/BookingFlow.svelte +++ b/frontend/src/lib/components/booking/BookingFlow.svelte @@ -27,12 +27,6 @@ import { onDestroy } from 'svelte'; import { SvelteDate } from 'svelte/reactivity'; - declare global { - interface Window { - __bookingFlowCountdownInterval?: ReturnType | null; - } - } - // Components import BookingActions from '$lib/components/booking/BookingActions.svelte'; import BookingSummary from '$lib/components/booking/BookingSummary.svelte'; @@ -688,7 +682,7 @@ loadingAvailableHours = true; try { - const authHeaders = authStore.currentToken ? { Authorization: `Bearer ${authStore.currentToken}` } : {}; + const authHeaders: RequestInit['headers'] = authStore.currentToken ? { Authorization: `Bearer ${authStore.currentToken}` } : undefined; const [whRes, ahRes] = await Promise.all([ fetch(`/api/scheduling/working-hours?start=${startStr}&end=${endStr}`, { headers: authHeaders }), fetch(`/api/scheduling/available-hours?start=${startStr}&end=${endStr}`, { headers: authHeaders }) @@ -782,7 +776,7 @@ const startStr = startOfMonth.toString(); const endStr = endOfMonth.toString(); - const authHeaders = authStore.currentToken ? { Authorization: `Bearer ${authStore.currentToken}` } : {}; + const authHeaders: RequestInit['headers'] = authStore.currentToken ? { Authorization: `Bearer ${authStore.currentToken}` } : undefined; // Fetch working hours const workingHoursResponse = await fetch(