From 4879ca5a829c00a98c2b621abadb19b1e3eaee0c Mon Sep 17 00:00:00 2001 From: Stephen Adamson Date: Sun, 5 Jul 2026 12:00:09 +0100 Subject: [PATCH] style: format multi-line expressions in BookingFlow.svelte Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus --- .../lib/components/booking/BookingFlow.svelte | 24 ++++++++++++++----- 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/frontend/src/lib/components/booking/BookingFlow.svelte b/frontend/src/lib/components/booking/BookingFlow.svelte index 5049d4c..03edca9 100644 --- a/frontend/src/lib/components/booking/BookingFlow.svelte +++ b/frontend/src/lib/components/booking/BookingFlow.svelte @@ -682,10 +682,16 @@ loadingAvailableHours = true; try { - const authHeaders: RequestInit['headers'] = authStore.currentToken ? { Authorization: `Bearer ${authStore.currentToken}` } : undefined; + 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 }) + fetch(`/api/scheduling/working-hours?start=${startStr}&end=${endStr}`, { + headers: authHeaders + }), + fetch(`/api/scheduling/available-hours?start=${startStr}&end=${endStr}`, { + headers: authHeaders + }) ]); if (!whRes.ok || !ahRes.ok) { throw new Error(`HTTP error! wh: ${whRes.status}, ah: ${ahRes.status}`); @@ -776,7 +782,9 @@ const startStr = startOfMonth.toString(); const endStr = endOfMonth.toString(); - const authHeaders: RequestInit['headers'] = authStore.currentToken ? { Authorization: `Bearer ${authStore.currentToken}` } : undefined; + const authHeaders: RequestInit['headers'] = authStore.currentToken + ? { Authorization: `Bearer ${authStore.currentToken}` } + : undefined; // Fetch working hours const workingHoursResponse = await fetch( @@ -1298,7 +1306,9 @@ // Step 2 -> Step 3: Check if we already hold a valid reservation for this exact slot if (currentStep === 2) { - const sameSlot = _reservationId && !reservationExpired && + const sameSlot = + _reservationId && + !reservationExpired && _reservedSlotTime === selectedTime && _reservedSlotDate === (selectedDate ? selectedDate.toString() : null); @@ -1311,7 +1321,9 @@ try { const res = await fetch('/api/bookings/reserve', { method: 'DELETE', - headers: authStore.currentToken ? { Authorization: `Bearer ${authStore.currentToken}` } : {} + headers: authStore.currentToken + ? { Authorization: `Bearer ${authStore.currentToken}` } + : {} }); if (!res.ok) console.warn('Failed to release old reservation', res.status); } catch (e) {