From f3f96723b20faeab27cfa53444f0c90942dfe8c5 Mon Sep 17 00:00:00 2001 From: Hayden <64056131+hay-kot@users.noreply.github.com> Date: Fri, 6 Oct 2023 16:22:16 -0500 Subject: [PATCH] fix: ensure loading in toggled (#571) --- 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 5b9f583..77e8190 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 e860e56..abaf96a 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 e1202c5..2a4a4ed 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"); }