diff --git a/src/routes/staff/manage/reservation/+page.ts b/src/routes/staff/manage/reservation/+page.ts deleted file mode 100644 index 508967a..0000000 --- a/src/routes/staff/manage/reservation/+page.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { trpcOnServer } from '$lib/trpc'; -import type { PageLoad, PageServerLoad } from './$types'; - -export const load = (async ({ fetch }) => { - const trpc = trpcOnServer(fetch); - const user = await trpc.auth.getUser.query(); - const medicalAccount = await trpc.medicalStaff.findById.query({ - medicalStaffId: user?.user.id || '' - }); - const allReservation = await trpc.reservation.findAll.query(); - const placeReservations = []; - for (const reservation of allReservation) { - if (reservation.Reservation_Slot.place_id === medicalAccount?.Place.id) { - placeReservations.push(reservation); - } - } - - return { - allReservation: placeReservations - }; -}) satisfies PageServerLoad;