From 05d342b411cfd5a2a1de73f0f7de23e6334ef26e Mon Sep 17 00:00:00 2001 From: Matt Blenkinsop Date: Thu, 24 Oct 2024 14:00:46 +0000 Subject: [PATCH] Bug 38256: Update the UI to handle the new vendor field (cherry picked from commit c4f308ed64ffc0420b1ced1426925ac84cac54ce) --- .../ERM/UsageStatisticsDataProviderDetails.vue | 10 ++++++++++ .../ERM/UsageStatisticsDataProvidersFormAdd.vue | 12 ++++++++++++ .../ERM/UsageStatisticsDataProvidersShow.vue | 1 + .../prog/js/vue/fetch/erm-api-client.js | 4 +++- 4 files changed, 26 insertions(+), 1 deletion(-) diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/UsageStatisticsDataProviderDetails.vue b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/UsageStatisticsDataProviderDetails.vue index 3032b8d6685..62b90d3b8c8 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/UsageStatisticsDataProviderDetails.vue +++ b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/UsageStatisticsDataProviderDetails.vue @@ -14,6 +14,16 @@ {{ usage_data_provider.description }} +
  • + + + + {{ usage_data_provider.vendor.name }} + + +
  • diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/UsageStatisticsDataProvidersFormAdd.vue b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/UsageStatisticsDataProvidersFormAdd.vue index 973f655331c..1e1c66d62f4 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/UsageStatisticsDataProvidersFormAdd.vue +++ b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/UsageStatisticsDataProvidersFormAdd.vue @@ -95,6 +95,15 @@ :disabled="!selected_provider && !manual_form" />
  • +
  • + + +
  • import ButtonSubmit from "../ButtonSubmit.vue" +import FormSelectVendors from "../FormSelectVendors.vue" import { setMessage, setWarning } from "../../messages" import { APIClient } from "../../fetch/api-client.js" import { inject } from "vue" @@ -405,6 +415,7 @@ export default { erm_usage_data_provider_id: null, name: "", description: "", + vendor_id: null, active: 1, method: "", aggregator: "", @@ -620,6 +631,7 @@ export default { }, components: { ButtonSubmit, + FormSelectVendors, }, name: "UsageStatisticsDataProvidersFormAdd", } diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/UsageStatisticsDataProvidersShow.vue b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/UsageStatisticsDataProvidersShow.vue index 73d7215843c..3fa3a0b0abd 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/UsageStatisticsDataProvidersShow.vue +++ b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/UsageStatisticsDataProvidersShow.vue @@ -147,6 +147,7 @@ export default { requestor_name: "", requestor_email: "", report_types: [], + vendor: null, }, initialized: false, tab_content: "detail", diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/fetch/erm-api-client.js b/koha-tmpl/intranet-tmpl/prog/js/vue/fetch/erm-api-client.js index a5ff355cb19..587e69851c9 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/vue/fetch/erm-api-client.js +++ b/koha-tmpl/intranet-tmpl/prog/js/vue/fetch/erm-api-client.js @@ -261,12 +261,14 @@ export class ERMAPIClient extends HttpClient { get: id => this.get({ endpoint: "usage_data_providers/" + id, + headers: { + "x-koha-embed": "vendor", + }, }), getAll: query => this.getAll({ endpoint: "usage_data_providers", query, - query, }), delete: id => this.delete({ -- 2.39.3 (Apple Git-146)