From 3198dec20ce0cf81f4df59f9876b804274ddaf11 Mon Sep 17 00:00:00 2001 From: Fluffy Date: Fri, 10 May 2024 14:46:53 +0100 Subject: [PATCH] Start on Booking form Clean up navigation bar Form CSS Add warning to run when skipping migrations --- cmd/run.go | 2 + front/src/App.svelte | 43 ++++--- front/src/components/MenuItem.svelte | 2 +- front/src/lib/cart.ts | 3 +- front/src/lib/test-data.ts | 20 +-- front/src/pages/PageBooking.svelte | 134 +++++++++++++++++++++ front/src/pages/PageContact.svelte | 9 ++ front/src/styles/_announcement_banner.scss | 5 +- front/src/styles/_form_element.scss | 1 - 9 files changed, 181 insertions(+), 38 deletions(-) diff --git a/cmd/run.go b/cmd/run.go index b3a521a..a5da512 100644 --- a/cmd/run.go +++ b/cmd/run.go @@ -34,6 +34,8 @@ func run(flags []string) { fmt.Println("Run `TastyBites status` or use the flag -skipMigrations") os.Exit(1) } + } else { + fmt.Println("WARNING: Skipping migrations! This can lead to errors, or even data loss!") } api.Serve(api.Config{ diff --git a/front/src/App.svelte b/front/src/App.svelte index 439ed0c..445c44a 100644 --- a/front/src/App.svelte +++ b/front/src/App.svelte @@ -1,17 +1,18 @@ +

Table booking

+
+
+ + + {#if !nameValid} + Enter a name + {/if} +
+ +
+ +
+ + + {#if !emailValid} + Email not valid + {/if} +
+ +
+ +
+ + + {#if !telephoneValid} + Telephone number not valid + {/if} +
+ +
+
+
+
+
+ +
+ +