From 1077514901fc161921724d08270f30002288de97 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 Signed-off-by: Tomas Cohen Arazi --- .../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 cafa96fae1..33f62f8800 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 268af004b2..1aa1f9754c 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 fe6ae050e6..badeeee673 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 a36160a00c..c92d6d724b 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 9f4a1c99dd..dd1e27a2d6 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.39.5