From c7d8ed433dc11093233e7cf070cc0508716952ff Mon Sep 17 00:00:00 2001 From: TadiosT Date: Thu, 5 Jun 2025 23:57:00 +0100 Subject: [PATCH] feat: Added checkboxes for properties of a study space on the upload page. Co-Authored By: Caspar Asaam --- src/routes/space/+page.svelte | 121 ++++++++++++++++++++++++++++++++++ 1 file changed, 121 insertions(+) diff --git a/src/routes/space/+page.svelte b/src/routes/space/+page.svelte index 8c3267d..9fcbcd1 100644 --- a/src/routes/space/+page.svelte +++ b/src/routes/space/+page.svelte @@ -7,6 +7,7 @@ import Button from "$lib/components/Button.svelte"; import Images from "$lib/components/inputs/Images.svelte"; import type { Table } from "$lib"; + import { availableStudySpaceTags } from "$lib/index" const { data } = $props(); const { supabase } = $derived(data); @@ -62,6 +63,17 @@ invalidate: ["db:study_spaces"] }); } + + let selectedTags = $state([]); + + function toggleTag(tag: string) { + if (selectedTags.includes(tag)) { + selectedTags = selectedTags.filter(t => t !== tag); + } else { + selectedTags = [...selectedTags, tag]; + } + } + @@ -86,6 +98,22 @@ required /> +
+ Select applicable tags: +
+ {#each availableStudySpaceTags as tag} + + {/each} +
+
+