diff --git a/front/src/lib/types.ts b/front/src/lib/types.ts index 85084f6..b21d496 100644 --- a/front/src/lib/types.ts +++ b/front/src/lib/types.ts @@ -35,6 +35,7 @@ export type Checkout = { town: string; postcode: string; }; + message: string; }; export type JSONResponse = { diff --git a/front/src/pages/Checkout.svelte b/front/src/pages/Checkout.svelte index 3121827..39d556c 100644 --- a/front/src/pages/Checkout.svelte +++ b/front/src/pages/Checkout.svelte @@ -3,6 +3,7 @@ import { ArrowLeft, SealWarning, ArrowRight } from "phosphor-svelte"; import { type CartItem, type Checkout } from '../lib/types'; + import { expandOnTyping } from "../lib/utils"; import Cart from "../lib/cart"; const CheckoutData: Checkout = { @@ -16,11 +17,13 @@ town: "", postcode: "", }, + message: "", } $: nameValid = CheckoutData.personal.name.length > 1 $: emailValid = CheckoutData.personal.email.length > 1 $: phoneValid = isNaN(CheckoutData.personal.phone) + $: messageValid = messageValid = CheckoutData.message.length <= 200; let items: [string, CartItem][]; let totalPrice: number; @@ -43,8 +46,11 @@
-

Checkout

+

Checkout

+

Contact Information

+

This is for updates on your order

+
+
+

Special Requests

+

Have a noisy dog, and don't want us to knock? Let us know here!

+
+
+ +