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)
committerTomas Cohen Arazi <tomascohen@theke.io>
Mon, 10 Apr 2023 10:38:28 +0000 (07:38 -0300)
commit765fd1ced3b9efc4ff6fb71e2fee1a7a227d1cae
tree5b47f473211e1984cff0d164ca2925d9da607abe
parentba601ca37fe45dacaa1ed34b783a7d239058724e
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>
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