Bug 38993 - Merge fetch files
Summary: Merge fetch files
Status: Signed Off
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low enhancement
Assignee: Jonathan Druart
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-01-29 16:05 UTC by Jonathan Druart
Modified: 2025-01-30 09:36 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments
Bug 38993: Merge 'fetch' directories (61.21 KB, patch)
2025-01-29 16:06 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 38993: (follow-up) Add 'fetch' alias to rspack config (839 bytes, patch)
2025-01-29 16:35 UTC, Paul Derscheid
Details | Diff | Splinter Review
Bug 38993: (follow-up) Add 'fetch' alias to rspack config (743 bytes, patch)
2025-01-29 16:46 UTC, Paul Derscheid
Details | Diff | Splinter Review
Bug 38993: Merge 'fetch' directories (60.60 KB, patch)
2025-01-30 08:16 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 38993: (follow-up) Add 'fetch' alias to rspack config (745 bytes, patch)
2025-01-30 08:16 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 38993: Use the @fetch alias (3.84 KB, patch)
2025-01-30 08:16 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 38993: Use the @fetch alias (1.96 KB, patch)
2025-01-30 08:56 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 38993: Restore add patrons to list (1.91 KB, patch)
2025-01-30 09:06 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 38993: Restore add patrons to list (4.57 KB, patch)
2025-01-30 09:15 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 38993: Merge 'fetch' directories (60.61 KB, patch)
2025-01-30 09:24 UTC, Paul Derscheid
Details | Diff | Splinter Review
Bug 38993: (follow-up) Add 'fetch' alias to rspack config (802 bytes, patch)
2025-01-30 09:24 UTC, Paul Derscheid
Details | Diff | Splinter Review
Bug 38993: Use the @fetch alias (2.01 KB, patch)
2025-01-30 09:24 UTC, Paul Derscheid
Details | Diff | Splinter Review
Bug 38993: Restore add patrons to list (4.62 KB, patch)
2025-01-30 09:24 UTC, Paul Derscheid
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Druart 2025-01-29 16:05:41 UTC
We have "fetch" files in koha-tmpl/intranet-tmpl/prog/js/vue/fetch and koha-tmpl/intranet-tmpl/prog/js/fetch
The reason is hidden behind http-client and how we handle errors.
We should avoid the duplication of -api-client.js files between the two directories.
Comment 1 Jonathan Druart 2025-01-29 16:06:18 UTC
Created attachment 177316 [details] [review]
Bug 38993: Merge 'fetch' directories

Why does not alias @fetch work??
Comment 2 Paul Derscheid 2025-01-29 16:35:55 UTC
Created attachment 177317 [details] [review]
Bug 38993: (follow-up) Add 'fetch' alias to rspack config
Comment 3 Paul Derscheid 2025-01-29 16:46:58 UTC
Created attachment 177318 [details] [review]
Bug 38993: (follow-up) Add 'fetch' alias to rspack config
Comment 4 Jonathan Druart 2025-01-30 08:16:29 UTC
Created attachment 177337 [details] [review]
Bug 38993: Merge 'fetch' directories
Comment 5 Jonathan Druart 2025-01-30 08:16:32 UTC
Created attachment 177338 [details] [review]
Bug 38993: (follow-up) Add 'fetch' alias to rspack config
Comment 6 Jonathan Druart 2025-01-30 08:16:34 UTC
Created attachment 177339 [details] [review]
Bug 38993: Use the @fetch alias
Comment 7 Jonathan Druart 2025-01-30 08:56:41 UTC
Created attachment 177342 [details] [review]
Bug 38993: Use the @fetch alias
Comment 8 Jonathan Druart 2025-01-30 09:06:31 UTC
Created attachment 177343 [details] [review]
Bug 38993: Restore add patrons to list
Comment 9 Jonathan Druart 2025-01-30 09:15:07 UTC
Created attachment 177344 [details] [review]
Bug 38993: Restore add patrons to list
Comment 10 Paul Derscheid 2025-01-30 09:24:19 UTC
Created attachment 177345 [details] [review]
Bug 38993: Merge 'fetch' directories

Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Comment 11 Paul Derscheid 2025-01-30 09:24:22 UTC
Created attachment 177346 [details] [review]
Bug 38993: (follow-up) Add 'fetch' alias to rspack config

Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Comment 12 Paul Derscheid 2025-01-30 09:24:24 UTC
Created attachment 177347 [details] [review]
Bug 38993: Use the @fetch alias

Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Comment 13 Paul Derscheid 2025-01-30 09:24:27 UTC
Created attachment 177348 [details] [review]
Bug 38993: Restore add patrons to list

Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Comment 14 Jonathan Druart 2025-01-30 09:36:47 UTC
We should then discuss how we want to organize those files.

One thing that is wrong is the inconsistency in the use of plural vs singular:
additional-fields-api-client.js
cover-image-api-client.js
patron-api-client.js

We first had the modules, and so started with singular. Then we continue with all singular. But at some point plurals got introduced and now it's messy.

I would revert to all singular, but that's for another bug report.