Bugzilla – Attachment 172911 Details for
Bug 37301
Further improve how we build Vue components
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 37301: Move table_url declaration to resource class
Bug-37301-Move-tableurl-declaration-to-resource-cl.patch (text/plain), 3.34 KB, created by
Pedro Amorim
on 2024-10-17 16:24:16 UTC
(
hide
)
Description:
Bug 37301: Move table_url declaration to resource class
Filename:
MIME Type:
Creator:
Pedro Amorim
Created:
2024-10-17 16:24:16 UTC
Size:
3.34 KB
patch
obsolete
>From 43134c301443a3852a0af2ac49fa089ca26622db Mon Sep 17 00:00:00 2001 >From: Pedro Amorim <pedro.amorim@ptfs-europe.com> >Date: Thu, 17 Oct 2024 11:28:41 +0000 >Subject: [PATCH] Bug 37301: Move table_url declaration to resource class > >This is relevant because doResourceDelete expected table_url to be implemented, but LicensesList does not implement it for example. >We now have a getResourceTableUrl implemented by all resources >--- > .../prog/js/vue/components/BaseResource.vue | 12 +++++++++++- > .../prog/js/vue/components/ERM/AgreementResource.vue | 1 + > .../prog/js/vue/components/ERM/AgreementsList.vue | 2 +- > 3 files changed, 13 insertions(+), 2 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/components/BaseResource.vue b/koha-tmpl/intranet-tmpl/prog/js/vue/components/BaseResource.vue >index 3e08316701..c2b9a1c577 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/vue/components/BaseResource.vue >+++ b/koha-tmpl/intranet-tmpl/prog/js/vue/components/BaseResource.vue >@@ -102,7 +102,9 @@ export default { > if ( > this.$options.name === this.list_component > ) { >- this.$refs.table.redraw(this.table_url()) >+ this.$refs.table.redraw( >+ this.getResourceTableUrl() >+ ) > } else if ( > this.$options.name === this.show_component > ) { >@@ -115,6 +117,14 @@ export default { > } > ) > }, >+ /** >+ * Return the URL for the resource table. >+ * >+ * @return {string} >+ */ >+ getResourceTableUrl: function () { >+ return this.resource_table_url >+ }, > }, > name: "BaseResource", > props: { >diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/AgreementResource.vue b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/AgreementResource.vue >index 6e0fd17327..b43644b6fc 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/AgreementResource.vue >+++ b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/AgreementResource.vue >@@ -15,6 +15,7 @@ export default { > add_component: "AgreementsFormAdd", > edit_component: "AgreementsFormAddEdit", > api_client: APIClient.erm.agreements, >+ resource_table_url: APIClient.erm._baseURL + "agreements", > i18n: { > display_name: __("Agreement"), > }, >diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/AgreementsList.vue b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/AgreementsList.vue >index 58a8ef1996..2b24220799 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/AgreementsList.vue >+++ b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/AgreementsList.vue >@@ -181,7 +181,7 @@ export default { > return new Date().toISOString().substring(0, 10) > }, > table_url: function () { >- let url = "/api/v1/erm/agreements" >+ let url = this.getResourceTableUrl() > if (this.filters.by_expired) > url += > "?max_expiration_date=" + this.filters.max_expiration_date >-- >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 37301
:
168709
|
168739
|
168740
|
168741
|
168800
|
168827
|
168828
|
168829
|
168836
|
172713
|
172911
|
172912
|
172913
|
172914
|
172915
|
172916
|
172917
|
172918
|
172919
|
172920
|
172921
|
174612
|
174613
|
174614
|
174615
|
174616
|
174617
|
174618
|
174619
|
174620
|
174621
|
174622
|
174623
|
174624
|
174625
|
174626
|
174627
|
174628
|
174629
|
174630
|
174631