diff --git a/frontend/src/lib/components/admin/EditBookingModal.svelte b/frontend/src/lib/components/admin/EditBookingModal.svelte index 89b832b..a2ef0e6 100644 --- a/frontend/src/lib/components/admin/EditBookingModal.svelte +++ b/frontend/src/lib/components/admin/EditBookingModal.svelte @@ -11,7 +11,7 @@ import { Input } from '$lib/components/ui/input'; import { Textarea } from '$lib/components/ui/textarea'; import CharCounter from '$lib/components/ui/CharCounter.svelte'; - import type { Booking, BookingService, Service } from '$lib/types/booking'; + import type { Booking, BookingService, Payment, Service } from '$lib/types/booking'; interface Props { open: boolean; @@ -112,7 +112,7 @@ override_price: s.override_price, override_duration_minutes: s.override_duration_minutes })), - payments: (data.payments || []).map((p: any) => ({ + payments: (data.payments || []).map((p: Payment) => ({ id: p.id, booking_id: p.booking_id, payment_type: p.payment_type, diff --git a/frontend/src/lib/components/admin/HolidayHours.svelte b/frontend/src/lib/components/admin/HolidayHours.svelte index c28527e..51b5397 100644 --- a/frontend/src/lib/components/admin/HolidayHours.svelte +++ b/frontend/src/lib/components/admin/HolidayHours.svelte @@ -151,13 +151,13 @@ if (data === null || data.length === 0) { return; } - exceptionGroups = data.map((group: any) => ({ + exceptionGroups = data.map((group: ExceptionGroup) => ({ id: group.id, name: group.name, description: group.description, weekStarts: group.weekStarts || [], hours: - group.hours?.map((h: any) => ({ + group.hours?.map((h: { id: number; weekday: number; startTime: string; endTime: string; isOpen: boolean }) => ({ id: h.id, weekday: h.weekday, start_time: formatTime(h.startTime), diff --git a/frontend/src/lib/components/admin/WalkInCreateModal.svelte b/frontend/src/lib/components/admin/WalkInCreateModal.svelte index 8c58de6..55fed15 100644 --- a/frontend/src/lib/components/admin/WalkInCreateModal.svelte +++ b/frontend/src/lib/components/admin/WalkInCreateModal.svelte @@ -363,7 +363,7 @@ if (response.ok) { const data = await response.json(); const list = data.services || data; - customServices = list.map((cs: any) => ({ ...cs, is_custom: true })); + customServices = list.map((cs: CustomService) => ({ ...cs, is_custom: true })); } } catch { console.error('Failed to fetch custom services'); diff --git a/frontend/src/lib/components/admin/WeeklySchedule.svelte b/frontend/src/lib/components/admin/WeeklySchedule.svelte index 16f36cf..bd1a4e4 100644 --- a/frontend/src/lib/components/admin/WeeklySchedule.svelte +++ b/frontend/src/lib/components/admin/WeeklySchedule.svelte @@ -112,7 +112,7 @@ if (response.ok) { const data = await response.json(); - defaultHours = data.map((hour: any) => ({ + defaultHours = data.map((hour: { weekday: number; startTime: string; endTime: string; isOpen: boolean }) => ({ weekday: hour.weekday, start_time: formatTime(hour.startTime), end_time: formatTime(hour.endTime), diff --git a/frontend/src/lib/components/payments/PaymentModal.svelte b/frontend/src/lib/components/payments/PaymentModal.svelte index 4247d6a..474e982 100644 --- a/frontend/src/lib/components/payments/PaymentModal.svelte +++ b/frontend/src/lib/components/payments/PaymentModal.svelte @@ -543,7 +543,7 @@ try { await applyLoyaltyRedemption(); - const body: any = { + const body: { amount: number; payment_type: string; payment_method: string; gift_card_id?: string } = { amount: payAmountCents, payment_type: 'full', payment_method: 'giftcard' diff --git a/frontend/src/routes/admin/notifications/+page.svelte b/frontend/src/routes/admin/notifications/+page.svelte index 9be1cef..1f858c8 100644 --- a/frontend/src/routes/admin/notifications/+page.svelte +++ b/frontend/src/routes/admin/notifications/+page.svelte @@ -14,6 +14,7 @@ import UserModal from '$lib/components/admin/UserModal.svelte'; import EditRequestModal from '$lib/components/admin/EditRequestModal.svelte'; import { toast } from 'svelte-sonner'; + import type { Booking } from '$lib/types/booking'; interface Notification { id: number; @@ -68,7 +69,7 @@ let includeAcknowledged = $state(false); let showApprovalModal = $state(false); - let selectedBooking = $state(null); + let selectedBooking = $state(null); let showBookingModal = $state(false); let showUserModal = $state(false); let selectedUserId = $state(null); @@ -154,7 +155,7 @@ } } - async function fetchBookingDetails(bookingId: string): Promise { + async function fetchBookingDetails(bookingId: string): Promise { const response = await fetch(`/api/admin/bookings/${bookingId}`, { headers: { Authorization: `Bearer ${authStore.currentToken}` } });