From a6d899e81dd49b089fe6c271190786ed40c1386f Mon Sep 17 00:00:00 2001 From: Hayden <64056131+hay-kot@users.noreply.github.com> Date: Fri, 6 Oct 2023 16:08:27 -0500 Subject: [PATCH] ensure loading in toggled --- frontend/components/Item/CreateModal.vue | 1 + frontend/components/Label/CreateModal.vue | 1 + frontend/components/Location/CreateModal.vue | 1 + 3 files changed, 3 insertions(+) diff --git a/frontend/components/Item/CreateModal.vue b/frontend/components/Item/CreateModal.vue index 5b9f5831..77e8190a 100644 --- a/frontend/components/Item/CreateModal.vue +++ b/frontend/components/Item/CreateModal.vue @@ -122,6 +122,7 @@ }; const { error, data } = await api.items.create(out); + loading.value = false; if (error) { toast.error("Couldn't create item"); return; diff --git a/frontend/components/Label/CreateModal.vue b/frontend/components/Label/CreateModal.vue index e860e56b..abaf96ab 100644 --- a/frontend/components/Label/CreateModal.vue +++ b/frontend/components/Label/CreateModal.vue @@ -77,6 +77,7 @@ const { error, data } = await api.labels.create(form); if (error) { toast.error("Couldn't create label"); + loading.value = false; return; } diff --git a/frontend/components/Location/CreateModal.vue b/frontend/components/Location/CreateModal.vue index e1202c55..2a4a4ed9 100644 --- a/frontend/components/Location/CreateModal.vue +++ b/frontend/components/Location/CreateModal.vue @@ -85,6 +85,7 @@ }); if (error) { + loading.value = false; toast.error("Couldn't create location"); }