Bugzilla – Attachment 188639 Details for
Bug 39320
Create a 'landing page' for ERM
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 39320: (ERMCounts QA follow-up): Reimplement loading. Now present 'Loading' for each resource count that's waiting, rather than hang the whole widget waiting for all responses
Bug-39320-ERMCounts-QA-follow-up-Reimplement-loadi.patch (text/plain), 4.66 KB, created by
Pedro Amorim
on 2025-10-30 12:52:09 UTC
(
hide
)
Description:
Bug 39320: (ERMCounts QA follow-up): Reimplement loading. Now present 'Loading' for each resource count that's waiting, rather than hang the whole widget waiting for all responses
Filename:
MIME Type:
Creator:
Pedro Amorim
Created:
2025-10-30 12:52:09 UTC
Size:
4.66 KB
patch
obsolete
>From 90231eacf02d72b0ade567722c2a7afafd91b4cc Mon Sep 17 00:00:00 2001 >From: Pedro Amorim <pedro.amorim@openfifth.co.uk> >Date: Thu, 30 Oct 2025 11:57:18 +0000 >Subject: [PATCH] Bug 39320: (ERMCounts QA follow-up): Reimplement loading. Now > present 'Loading' for each resource count that's waiting, rather than hang > the whole widget waiting for all responses > >--- > .../ModuleDashboard/Widgets/ERMCounts.vue | 38 +++++++++++++------ > 1 file changed, 26 insertions(+), 12 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ModuleDashboard/Widgets/ERMCounts.vue b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ModuleDashboard/Widgets/ERMCounts.vue >index eb3467b4a80..f5f4c568b30 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ModuleDashboard/Widgets/ERMCounts.vue >+++ b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ModuleDashboard/Widgets/ERMCounts.vue >@@ -4,12 +4,19 @@ > <ul class="count-list"> > <li v-for="def in countDefinitions" :key="def.name"> > <strong> >- <router-link v-if="def.page" :to="{ name: def.page }"> >+ <router-link >+ v-if="def.page && !def.loading" >+ :to="{ name: def.page }" >+ > > {{ createCountText(def) }} > </router-link> >- <span v-else class="inactive-link">{{ >- createCountText(def) >- }}</span> >+ <span v-else class="inactive-link"> >+ <div >+ class="spinner-border spinner-border-sm" >+ role="status" >+ ></div> >+ {{ createCountText(def) }} >+ </span> > </strong> > </li> > </ul> >@@ -46,20 +53,23 @@ export default { > }, > emit > ); >+ baseWidget.loading.value = false; > const countDefinitions = reactive([ > { > page: "AgreementsList", > name: "agreements_count", > i18nLabel: count => > __n("%s agreement", "%s agreements", count).format(count), >- count: 0, >+ count: "", >+ loading: true, > }, > { > page: "LicensesList", > name: "licenses_count", > i18nLabel: count => > __n("%s license", "%s licenses", count).format(count), >- count: 0, >+ count: "", >+ loading: true, > }, > { > page: "EHoldingsLocalPackagesList", >@@ -68,7 +78,8 @@ export default { > __n("%s local package", "%s local packages", count).format( > count > ), >- count: 0, >+ count: "", >+ loading: true, > }, > { > page: "EHoldingsLocalTitlesList", >@@ -77,7 +88,8 @@ export default { > __n("%s local title", "%s local titles", count).format( > count > ), >- count: 0, >+ count: "", >+ loading: true, > }, > { > page: "UsageStatisticsDataProvidersList", >@@ -88,7 +100,8 @@ export default { > "%s usage data providers", > count > ).format(count), >- count: 0, >+ count: "", >+ loading: true, > }, > ]); > >@@ -124,17 +137,18 @@ export default { > endpoints.forEach(({ name, endpoint }) => { > endpoint > .then(response => { >- const definition = countDefinitions.find(i => i.name === name); >+ const definition = countDefinitions.find( >+ i => i.name === name >+ ); > if (definition) { > definition.count = response; >+ definition.loading = false; > } > }) > .catch(error => { > console.error(`Error fetching ${name}:`, error); > }); > }); >- >- baseWidget.loading.value = false; > } catch (error) { > console.error(error); > } >-- >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 39320
:
187513
|
187514
|
187515
|
187516
|
187517
|
187518
|
187519
|
187520
|
187521
|
187522
|
187563
|
187568
|
187635
|
187636
|
187637
|
187638
|
187639
|
187640
|
187641
|
187642
|
187643
|
187644
|
187645
|
188094
|
188095
|
188096
|
188097
|
188098
|
188099
|
188100
|
188101
|
188102
|
188103
|
188104
|
188151
|
188279
|
188280
|
188281
|
188282
|
188283
|
188284
|
188285
|
188312
|
188315
|
188372
|
188375
|
188376
|
188637
|
188638
|
188639
|
188640
|
188641
|
188830
|
188831
|
188832
|
188833
|
188834
|
188835
|
188836
|
188837
|
188838
|
188839
|
188840
|
188841
|
188842
|
188843
|
188844
|
188845
|
188846
|
188847
|
188848
|
188849
|
188850
|
188851
|
188852
|
188853
|
188854
|
188855
|
188856
|
188857
|
188858
|
188859
|
188860
|
188861
|
188862
|
188863
|
188864