diff --git a/front/src/lib/types.ts b/front/src/lib/types.ts index 4a18b17..0ecf7de 100644 --- a/front/src/lib/types.ts +++ b/front/src/lib/types.ts @@ -6,6 +6,21 @@ export enum Labels { gluten = "GLUTEN", } +export enum TimeSlots { + slot0 = "8am to 10am", + slot1 = "10am to 12am", + slot2 = "12am to 2pm", + slot3 = "2pm to 4pm", + slot4 = "4pm to 6pm", + slot5 = "6pm to 8pm", + slot6 = "8pm to 10pm", +} +export enum Tables { + table1 = "Table 1", + table2 = "Table 2", + table3 = "Table 3", +} + export type Item = { uuid: string; availability?: boolean; @@ -23,6 +38,20 @@ export type CartItem = { export type CartRecord = Record; +export type Booking = { + date: { + date: Date; + slot: TimeSlots; + }; + table: Tables; + message: string; + personal: { + name: string; + email: string; + phone?: number; + }; +}; + export type Checkout = { personal: { name: string; diff --git a/front/src/pages/Booking.svelte b/front/src/pages/Booking.svelte index ae9364a..7ebe95a 100644 --- a/front/src/pages/Booking.svelte +++ b/front/src/pages/Booking.svelte @@ -1,39 +1,30 @@ @@ -77,8 +61,7 @@

Booking Date

@@ -91,25 +74,25 @@
- {#if date && (date.getDay() === 6 || date.getDay() === 0)} + {#if BookingData.date.date && (BookingData.date.date.getDay() === 6 || BookingData.date.date.getDay() === 0)}

 Time slots not available for this date

{:else}
@@ -133,14 +116,14 @@
@@ -158,9 +141,7 @@