Bugzilla – Attachment 149606 Details for
Bug 33103
Add vendor aliases
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 33103: Display the aliases in the dropdown list in ERM
Bug-33103-Display-the-aliases-in-the-dropdown-list.patch (text/plain), 5.13 KB, created by
Jonathan Druart
on 2023-04-13 15:06:18 UTC
(
hide
)
Description:
Bug 33103: Display the aliases in the dropdown list in ERM
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2023-04-13 15:06:18 UTC
Size:
5.13 KB
patch
obsolete
>From eb7c0f469d2f7aa44f69ee16b1078c3ebeac5501 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Wed, 1 Mar 2023 14:03:38 +0100 >Subject: [PATCH] Bug 33103: Display the aliases in the dropdown list in ERM > >Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com> >--- > .../vue/components/ERM/AgreementsFormAdd.vue | 2 +- > .../ERM/EHoldingsLocalPackagesFormAdd.vue | 2 +- > .../EHoldingsLocalTitlesFormAddResources.vue | 2 +- > .../js/vue/components/ERM/LicensesFormAdd.vue | 2 +- > .../prog/js/vue/components/ERM/Main.vue | 21 ++++++++++++------- > 5 files changed, 18 insertions(+), 11 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/AgreementsFormAdd.vue b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/AgreementsFormAdd.vue >index bafe8ee1184..3e2492d2c33 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/AgreementsFormAdd.vue >+++ b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/AgreementsFormAdd.vue >@@ -31,7 +31,7 @@ > <v-select > id="agreement_vendor_id" > v-model="agreement.vendor_id" >- label="name" >+ label="display_name" > :reduce="vendor => vendor.id" > :options="vendors" > /> >diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/EHoldingsLocalPackagesFormAdd.vue b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/EHoldingsLocalPackagesFormAdd.vue >index 268af004b2e..1aa1f9754cc 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/EHoldingsLocalPackagesFormAdd.vue >+++ b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/EHoldingsLocalPackagesFormAdd.vue >@@ -28,7 +28,7 @@ > <v-select > id="package_vendor_id" > v-model="erm_package.vendor_id" >- label="name" >+ label="display_name" > :reduce="vendor => vendor.id" > :options="vendors" > /> >diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/EHoldingsLocalTitlesFormAddResources.vue b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/EHoldingsLocalTitlesFormAddResources.vue >index fe6ae050e6d..badeeee673a 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/EHoldingsLocalTitlesFormAddResources.vue >+++ b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/EHoldingsLocalTitlesFormAddResources.vue >@@ -46,7 +46,7 @@ > <v-select > :id="`resource_vendor_id_${counter}`" > v-model="resource.vendor_id" >- label="name" >+ label="display_name" > :reduce="vendor => vendor.id" > :options="vendors" > /> >diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/LicensesFormAdd.vue b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/LicensesFormAdd.vue >index 272253cadf3..611b3ac9579 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/LicensesFormAdd.vue >+++ b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/LicensesFormAdd.vue >@@ -31,7 +31,7 @@ > <v-select > id="license_vendor_id" > v-model="license.vendor_id" >- label="name" >+ label="display_name" > :reduce="vendor => vendor.id" > :options="vendors" > /> >diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/Main.vue b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/Main.vue >index 9f4a1c99dde..dd1e27a2d67 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/Main.vue >+++ b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/Main.vue >@@ -163,13 +163,20 @@ export default { > let promises = [] > > const acq_client = APIClient.acquisition >- promises.push( >- acq_client.vendors.getAll().then( >- vendors => { >- this.vendorStore.vendors = vendors >- }, >- error => {} >- ) >+ acq_client.vendors.getAll().then( >+ vendors => { >+ this.vendorStore.vendors = vendors.map(v => ({ >+ ...v, >+ display_name: >+ v.name + >+ (v.aliases.length > 0 >+ ? " (" + >+ v.aliases.map(a => a.alias).join(", ") + >+ ")" >+ : ""), >+ })) >+ }, >+ error => {} > ) > > const av_client = APIClient.authorised_values >-- >2.25.1
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 33103
:
147621
|
147622
|
147623
|
147624
|
147625
|
147626
|
147627
|
147628
|
147629
|
147630
|
147645
|
147646
|
147647
|
147648
|
147649
|
147650
|
147651
|
147652
|
147653
|
147654
|
147827
|
148448
|
148449
|
148450
|
148451
|
148452
|
148453
|
148454
|
148455
|
148456
|
148457
|
148458
|
149414
|
149419
|
149479
|
149480
|
149481
|
149482
|
149483
|
149484
|
149485
|
149486
|
149487
|
149488
|
149489
|
149490
|
149491
| 149606 |
149607
|
149608
|
149609
|
149629
|
149630
|
149788