From eb7c0f469d2f7aa44f69ee16b1078c3ebeac5501 Mon Sep 17 00:00:00 2001 From: Jonathan Druart 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 --- .../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 @@ 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 @@ 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 @@ 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 @@ 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