Bugzilla – Attachment 186994 Details for
Bug 36674
Lazy load api-client JS files
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 36674: Remove duplication
Bug-36674-Remove-duplication.patch (text/plain), 2.94 KB, created by
Lisette Scheer
on 2025-09-26 17:15:50 UTC
(
hide
)
Description:
Bug 36674: Remove duplication
Filename:
MIME Type:
Creator:
Lisette Scheer
Created:
2025-09-26 17:15:50 UTC
Size:
2.94 KB
patch
obsolete
>From e6cfd04a65e79fd70c737a8ab1af234ec04cc6b8 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Fri, 19 Sep 2025 12:32:51 +0200 >Subject: [PATCH] Bug 36674: Remove duplication > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com> >--- > .../intranet-tmpl/prog/js/fetch/api-client.js | 45 +++++++++---------- > 1 file changed, 22 insertions(+), 23 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/js/fetch/api-client.js b/koha-tmpl/intranet-tmpl/prog/js/fetch/api-client.js >index 918947db605..ef758dbc9ba 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/fetch/api-client.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/fetch/api-client.js >@@ -179,29 +179,28 @@ const createClientProxy = loader => { > return /** @type {T} */ (createProxy(client => client)); > }; > >-export const APIClient = { >- article_request: createClientProxy( >- () => import("./article-request-api-client.js") >- ), >- authorised_values: createClientProxy( >- () => import("./authorised-values-api-client.js") >- ), >- acquisition: createClientProxy(() => import("./acquisition-api-client.js")), >- cataloguing: createClientProxy(() => import("./cataloguing-api-client.js")), >- circulation: createClientProxy(() => import("./circulation-api-client.js")), >- club: createClientProxy(() => import("./club-api-client.js")), >- cover_image: createClientProxy(() => import("./cover-image-api-client.js")), >- localization: createClientProxy( >- () => import("./localization-api-client.js") >- ), >- patron: createClientProxy(() => import("./patron-api-client.js")), >- patron_list: createClientProxy(() => import("./patron-list-api-client.js")), >- recall: createClientProxy(() => import("./recall-api-client.js")), >- sysprefs: createClientProxy( >- () => import("./system-preferences-api-client.js") >- ), >- ticket: createClientProxy(() => import("./ticket-api-client.js")), >- default: createClientProxy(() => import("./default-api-client.js")), >+const apiClientFiles = { >+ article_request: "./article-request-api-client.js", >+ authorised_values: "./authorised-values-api-client.js", >+ acquisition: "./acquisition-api-client.js", >+ cataloguing: "./cataloguing-api-client.js", >+ circulation: "./circulation-api-client.js", >+ club: "./club-api-client.js", >+ cover_image: "./cover-image-api-client.js", >+ localization: "./localization-api-client.js", >+ patron: "./patron-api-client.js", >+ patron_list: "./patron-list-api-client.js", >+ recall: "./recall-api-client.js", >+ sysprefs: "./system-preferences-api-client.js", >+ ticket: "./ticket-api-client.js", >+ default: "./default-api-client.js", > }; > >+export const APIClient = Object.fromEntries( >+ Object.entries(apiClientFiles).map(([key, path]) => [ >+ key, >+ createClientProxy(() => import(path)), >+ ]) >+); >+ > export default APIClient; >-- >2.39.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 36674
:
186551
|
186616
|
186617
|
186994
|
186995
|
187826