Bug 32991: Improve our Dialog component
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Fri, 17 Feb 2023 10:26:38 +0000 (11:26 +0100)
committerTomas Cohen Arazi <tomascohen@theke.io>
Fri, 10 Mar 2023 14:15:25 +0000 (11:15 -0300)
commit0b380ecfa3f462f52758ceadb4e4161c7806dc60
treef7c8bd5373df622552096a1f38ecf3e075e87825
parent87ae8b21b4f1772706ec62292d13376eed4b4a87
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 <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Agustín Moyano <agustinmoyano@theke.io>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
koha-tmpl/intranet-tmpl/prog/js/vue/components/Dialog.vue
koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/AgreementsList.vue
koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/Main.vue
koha-tmpl/intranet-tmpl/prog/js/vue/stores/main.js