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 @@
Price | Item Name | Amount |
---|---|---|
£{item.data.price * item.amount} (£{item.data.price}) | -{item.data.name} | -{item.amount} | -
Price (each) | Item Name | # |
---|---|---|
£{item.data.price * item.amount} (£{item.data.price}) | +{item.data.name} | +{item.amount} | +
To make any changes to your order, return to the cart.
+To make any changes, return to the cart.
By pressing "Checkout" you agree to our terms of service
+ + +