Bugzilla – Attachment 147630 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), 4.78 KB, created by
Jonathan Druart
on 2023-03-02 14:34:51 UTC
(
hide
)
Description:
Bug 33103: Display the aliases in the dropdown list in ERM
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2023-03-02 14:34:51 UTC
Size:
4.78 KB
patch
obsolete
>From 977e5d735b0ac0dbacfd8621744fb55088f46494 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 > >--- > .../prog/js/vue/components/ERM/AgreementsFormAdd.vue | 2 +- > .../components/ERM/EHoldingsLocalPackagesFormAdd.vue | 2 +- > .../ERM/EHoldingsLocalTitlesFormAddResources.vue | 2 +- > .../prog/js/vue/components/ERM/LicensesFormAdd.vue | 2 +- > .../prog/js/vue/components/ERM/Main.vue | 12 ++++++++++-- > 5 files changed, 14 insertions(+), 6 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 7720370b001..92ad8322413 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 c227105e715..ee47c06ad23 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 14b42290f15..c1891374fff 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 c430f61d83a..24ba4f6eb97 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 >@@ -169,8 +169,16 @@ export default { > const client = APIClient.acquisition > client.vendors.getAll().then( > vendors => { >- this.vendorStore.vendors = vendors >- this.initialized = true >+ this.vendorStore.vendors = vendors.map(v => ({ >+ ...v, >+ display_name: >+ v.name + >+ (v.aliases.length > 0 >+ ? " (" + >+ v.aliases.map(a => a.alias).join(", ") + >+ ")" >+ : ""), >+ })) > }, > error => {} > ) >-- >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