From bea1582088cc6e25920fcc2e8798327bcc9102c5 Mon Sep 17 00:00:00 2001 From: Stephen Adamson Date: Wed, 29 Jul 2026 17:40:35 +0100 Subject: [PATCH] feat: add BusinessHours component and update contact page --- .../components/layout/BusinessHours.svelte | 279 ++++++++++++++++++ frontend/src/routes/contact/+page.svelte | 11 +- 2 files changed, 286 insertions(+), 4 deletions(-) create mode 100644 frontend/src/lib/components/layout/BusinessHours.svelte diff --git a/frontend/src/lib/components/layout/BusinessHours.svelte b/frontend/src/lib/components/layout/BusinessHours.svelte new file mode 100644 index 0000000..d428358 --- /dev/null +++ b/frontend/src/lib/components/layout/BusinessHours.svelte @@ -0,0 +1,279 @@ + + +
+
+

Opening Hours

+ {#if hasExceptional} +

Holiday Hours

+ {/if} + + {#if loading} +
+ {#each { length: 7 } as _} +
+
+
+
+ {/each} +
+ {:else if error} +

Unable to load opening hours.

+ {:else} +
+ {#each displayData as { label, isOpen, startTime, endTime, isToday } (label)} +
+ + {#if isToday} + + {/if} + {label} + + + {#if isOpen} + {formatTime(startTime)} – {formatTime(endTime)} + {:else} + Closed + {/if} + +
+ {/each} + + {#if upcomingInfo} +
+

Upcoming Holiday Hours

+ {#each upcomingInfo.days as { label, isOpen, startTime, endTime } (label)} +
+ {label} + + {#if isOpen} + {formatTime(startTime)} – {formatTime(endTime)} + {:else} + Closed + {/if} + +
+ {/each} + {/if} +
+ {/if} +
+
diff --git a/frontend/src/routes/contact/+page.svelte b/frontend/src/routes/contact/+page.svelte index 294efaf..5efefcc 100644 --- a/frontend/src/routes/contact/+page.svelte +++ b/frontend/src/routes/contact/+page.svelte @@ -1,4 +1,5 @@