From 9d385451796fb255d59b55658680db1d135272f9 Mon Sep 17 00:00:00 2001 From: Bhasher Date: Tue, 2 Jan 2024 22:33:09 +0100 Subject: [PATCH] Fix tag deletion and views update --- .../card/modal_tag/modal_tag_value.svelte | 16 ++++++++------ .../project/card/modal_tag/select_tags.svelte | 4 ++++ frontend/src/components/project/header.svelte | 12 +++++++--- frontend/src/components/sidebar.svelte | 5 +++-- frontend/src/stores/smallStore.ts | 22 +++++++++---------- 5 files changed, 36 insertions(+), 23 deletions(-) diff --git a/frontend/src/components/project/card/modal_tag/modal_tag_value.svelte b/frontend/src/components/project/card/modal_tag/modal_tag_value.svelte index 1162394..d3ee6c2 100644 --- a/frontend/src/components/project/card/modal_tag/modal_tag_value.svelte +++ b/frontend/src/components/project/card/modal_tag/modal_tag_value.svelte @@ -10,10 +10,12 @@ let tagType = getTagTypeFromId(projectTag.type); - - {#if tagType?.hasOptions} - - {:else if !tagType?.hasOptions} - - {/if} - +{#if tagType} + + {#if tagType?.hasOptions} + + {:else if !tagType?.hasOptions} + + {/if} + +{/if} diff --git a/frontend/src/components/project/card/modal_tag/select_tags.svelte b/frontend/src/components/project/card/modal_tag/select_tags.svelte index bc44559..a9b0c95 100644 --- a/frontend/src/components/project/card/modal_tag/select_tags.svelte +++ b/frontend/src/components/project/card/modal_tag/select_tags.svelte @@ -79,6 +79,10 @@ } tagValue = undefined; + + card.tags = card.tags.filter((t) => t.tag_id !== projectTag.id); + + cards.reload(); } function createOption() { diff --git a/frontend/src/components/project/header.svelte b/frontend/src/components/project/header.svelte index b873caf..387a52c 100644 --- a/frontend/src/components/project/header.svelte +++ b/frontend/src/components/project/header.svelte @@ -1,7 +1,7 @@ diff --git a/frontend/src/components/sidebar.svelte b/frontend/src/components/sidebar.svelte index 7ae4a57..26d8ad4 100644 --- a/frontend/src/components/sidebar.svelte +++ b/frontend/src/components/sidebar.svelte @@ -1,5 +1,5 @@