Bug 33066: Introduce a KohaTable Vue component
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Fri, 24 Feb 2023 12:14:19 +0000 (13:14 +0100)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Thu, 11 May 2023 16:01:22 +0000 (17:01 +0100)
commit498a37f229b1d42f2d0d698c712e0ae9a912438c
treea9c67ae86188644bf90b9eeb6a7f419f285b70d7
parent28b0b435442f0d0d584257c4110b2f14f9a0dbf9
Bug 33066: Introduce a KohaTable Vue component

The way we deal with DataTables in Vue component is not nice, especially when we
need to add buttons/link in the cell and interact with the rest of the Vue app from
there.

When I started to work on Vue last year there was no good solution from DataTables,
now there is a Vue component. It is not perfect, you still cannot add Vue component
in the DT component, but it brings something to follow. Agustin implemented something
on theke/import_source_vue, but he went too far, and it will need to rewrite the
whole ERM module. Additionally he didn't provide a solution that has the same features
as what we have now.

The goal of this patch is to not duplicate the code in datatables.js, we
don't want to maintain two version of this code (one is enough already!)
We split the huge function in datatables.js in small ones to make them
reusable from the Vue component.

This is quite ugly, and it needs to lot more addition, but it's a first
start!

Help, ideas, and feedback welcome (and needed!)

Bug 33066: Fix agreement name in delete confirmation dialog

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>
(cherry picked from commit 765fd1ced3b9efc4ff6fb71e2fee1a7a227d1cae)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
koha-tmpl/intranet-tmpl/prog/js/datatables.js
koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/AgreementsList.vue
koha-tmpl/intranet-tmpl/prog/js/vue/components/KohaTable.vue [new file with mode: 0644]
package.json
yarn.lock