From b7bc7da3661480ab415900ec80a72c5f11753044 Mon Sep 17 00:00:00 2001 From: Fluffy-Bean Date: Tue, 30 Apr 2024 14:48:32 +0100 Subject: [PATCH] Basic Cart functionality Add test-api function for contact page --- front/src/App.svelte | 15 ++++++++-- front/src/lib/cart.ts | 43 +++++++++++++++++++++++++++++ front/src/lib/test-api.js | 26 ++++++++++++++++- front/src/lib/test-data.js | 14 +++++----- front/src/pages/PageCart.svelte | 19 +++++++++---- front/src/pages/PageContact.svelte | 24 +++++++++++----- front/src/pages/PageItem.svelte | 5 +++- front/src/styles/_form_element.scss | 20 ++++++++++++++ 8 files changed, 142 insertions(+), 24 deletions(-) create mode 100644 front/src/lib/cart.ts diff --git a/front/src/App.svelte b/front/src/App.svelte index 28090dc..fe39557 100644 --- a/front/src/App.svelte +++ b/front/src/App.svelte @@ -1,9 +1,11 @@

Shopping Cart

-
-
-

Empty....

-
-
+ -
+

Looking past orders? Check out the commonly asked questions

diff --git a/front/src/pages/PageContact.svelte b/front/src/pages/PageContact.svelte index ca4bd77..2263884 100644 --- a/front/src/pages/PageContact.svelte +++ b/front/src/pages/PageContact.svelte @@ -1,11 +1,14 @@

Contact us

+

Commonly Asked Questions

- - - -

If you ordered online, if we haven't started making your food yet, a refund is possible.

If you reserved a table, you can refund upto 1 hour before your time.

@@ -54,6 +54,14 @@

Contact From

+ {#await formMessage then formMessage} + {#if formMessage} +

 {formMessage}

+ {/if} + {:catch error} +

 {error.message}

+ {/await} +
+ +