From a4f261306f1b984bbaa70ad03575afb69bb65cda Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Fri, 17 Feb 2023 11:26:38 +0100 Subject: [PATCH] Bug 32991: Improve our Dialog component This is picking some improvements made by Agustin on bug 32607. This patch is only a POC and we should apply this change to the different delete route. We will then remove the *FormConfirmDelete components, and the /delete routes Initially I wanted to have the same behaviour as in other areas of Koha, and have a separate view for the deletion step. But it's too much overhead for not much gain. Additionally we will have to remove messages.js, the aim of this file was to import the methods to add messages very easily (only 1 import line). Now we will need 2 lines (it was more when I added messages.js, because I didn't inject the store). Not a big deal. Finally, there is something weird in Main.vue we need to fix. The console is showing a warning "[Vue warn]: setup() return property "_is_loading" should not start with "$" or "_" which are reserved prefixes for Vue internals." I had a hard time to display this "loading" modal when the app is loading all the things it needs. Pinia/store is not available as we are accessing the methods/actions too earlier. It will be good to fix that before we decide to move forward with this approach. Signed-off-by: Matt Blenkinsop --- .../prog/js/vue/components/Dialog.vue | 17 +++- .../js/vue/components/ERM/AgreementsList.vue | 28 +++++-- .../prog/js/vue/components/ERM/Main.vue | 10 +-- .../intranet-tmpl/prog/js/vue/stores/main.js | 82 +++++++++++++------ 4 files changed, 94 insertions(+), 43 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/components/Dialog.vue b/koha-tmpl/intranet-tmpl/prog/js/vue/components/Dialog.vue index f0932611381..995b9e6591c 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/vue/components/Dialog.vue +++ b/koha-tmpl/intranet-tmpl/prog/js/vue/components/Dialog.vue @@ -1,8 +1,16 @@