Thanks for involving me in this work Jonathan. To be clear, my contribution was very light compared to the work Jonathan did and is doing.
I'm very excited to have all of this in master and see what's next for Vue in Koha.


Pedro Amorim

Software Engineer

 

E: pedro.amorim@ptfs-europe.com

www.ptfs-europe.com






On Wed, 15 Feb 2023 at 12:09, Jonathan Druart <jonathan.druart@bugs.koha-community.org> wrote:
Hi,

Pedro and I have been working on improving the way we request the Koha REST API from Vue components.
We ended up with the implementation that is available on the following remote branch:
https://gitlab.com/joubu/Koha/-/commits/bug_32925

It contains the patches from the following bug reports:
Bug 32898 - Cypress tests are failing
Bug 32923 - x-koha-embed must a header of collectionFormat csv
Bug 32806 - Some Vue files need to be moved for better reusability
Bug 32939 - Have generic fetch functions in vue modules
Bug 32925 - Display loading info when a form is submitted

First, make the tests pass (32898)! We forgot to include the cypress test in the jenkins pipeline and we missed regressions! There have been regressions on the REST API specs, that are fixed on 32923.
We noticed that the code we provided for the ERM module was not flexible enough and too ERM oriented. Some directories have been moved and code split a bit to make it more reusable for other modules (32806).
Finally there are 32939 that introduce generic fetch functions, to have all the error handling (catch exceptions and display the error on the UI) in a single place. On top of that we added a "loading" message when a form (POST/PUT/DELETE) is submitted and, thanks to the previous moves, it's only a couple of lines of code!

All this must be considered a base for future Vue enhancements, and I would like people interested in the Vue work to have a look at it.

Cheers,
Jonathan
_______________________________________________
Koha-devel mailing list
Koha-devel@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel
website : https://www.koha-community.org/
git : https://git.koha-community.org/
bugs : https://bugs.koha-community.org/