[Koha-bugs] [Bug 32806] Some Vue files need to be moved for better reusability

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Tue Feb 7 09:49:26 CET 2023


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32806

--- Comment #6 from Jonathan Druart <jonathan.druart+koha at gmail.com> ---
(In reply to Agustín Moyano from comment #5)
> Hi Jonathan, to reuse stuff I like your idea to create folders by type
> (routes, stores, components, ..). 
> 
> Maybe we can add another folder named "modules" where we place all "main.ts"
> files, renaming them as "erm.ts" or "import_sources.ts". Or, instead of
> creating a "modules" folder, we could have a single "main.ts" and make all
> modules in routes to lazy load (
> https://router.vuejs.org/guide/advanced/lazy-loading.html )

I think I quite like the idea to have them visible at the root instead of
hiding in the sub directory, but I am not strongly attached to it.

> About the components folder, in my implementation, I added a "shared"
> subfolder for all shared components, but I don't mind keeping them in the
> components folder directly.

Same as above, it was to make them more visible, but that one could consider it
messy.

> I loved the idea of generating the breadcrumbs from the router
> specification, but the definition of it was kind of confusing, and hard to
> follow, so I took your idea and changed it a little bit.

The breadcrumb for the ERM module is quite complex, hence the complexity of the
file :)
About your implementation, there is something weird, you don't define the
routes, and "Add import source" leads to admin/import-sources.pl/add. Is that
expected?
On erm I've decided to rewrite the url and have something following the REST
routes (/cgi-bin/koha/erm/eholdings/local/packages/add for instance)

> I added a couple more shared components, one of them being the
> implementation of Datatables in Vue (called KohaTables). I see that you have
> here the "composable" folder where you call functions of Datatables, but I
> saw that the creators of Datatables had an implementation for Vue, so I
> thought it best to use that.

Yes but then you will need to reimplement all what we have in datatables.js,
and I don't think that's something worthwhile (at least I would not consider it
a priority for now). In your implementation there is problem with the
pagination (NaN), the order by does not work, there is no column filtering,
etc.

I think we need to be consistent between the modules that are going to use Vue.
We should apply the changes to the existing modules, then use them for the new
ones.

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list