From 497f633af234162e319a3ac08ef0c3c145eccc50 Mon Sep 17 00:00:00 2001 From: Matt Blenkinsop Date: Tue, 21 Oct 2025 14:09:31 +0100 Subject: [PATCH] Bug 41063: Allow setting of a group for additional fields --- .../prog/js/vue/components/Vendors/VendorResource.vue | 1 + .../intranet-tmpl/prog/js/vue/composables/base-resource.js | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/components/Vendors/VendorResource.vue b/koha-tmpl/intranet-tmpl/prog/js/vue/components/Vendors/VendorResource.vue index 0731d15c50f..f03977b8b17 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/vue/components/Vendors/VendorResource.vue +++ b/koha-tmpl/intranet-tmpl/prog/js/vue/components/Vendors/VendorResource.vue @@ -156,6 +156,7 @@ export default { defaultToolbarButtons, stickyToolbar: ["Form"], extendedAttributesResourceType: "vendor", + extendedAttributesFieldGroup: "Details", resourceAttrs: [ { name: "id", diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/composables/base-resource.js b/koha-tmpl/intranet-tmpl/prog/js/vue/composables/base-resource.js index e6204e378cc..ede509dcd95 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/vue/composables/base-resource.js +++ b/koha-tmpl/intranet-tmpl/prog/js/vue/composables/base-resource.js @@ -38,6 +38,7 @@ import { * @param {Function} resourceConfig.afterResourceFetch - A function to call after the resource is fetched. This can be used to edit resource data or fetch additional data * @param {Boolean} resourceConfig.embedded - A flag to indicate whether the resource is actually being used as a child component of another resource e.g. embedding a list of agreeements into EBSCO package agreements * @param {String} resourceConfig.extendedAttributesResourceType - The resource type for extended attributes, if applicable. + * @param {String} resourceConfig.extendedAttributesFieldGroup - The field group that you would like the additional fields to be displayed in. * @param {Function} resourceConfig.defaultToolbarButtons - A function to amend default buttons in the toolbar. * @param {Function} resourceConfig.additionalToolbarButtons - A function to add additional buttons to the toolbar. * @param {String} resourceConfig.formGroupsDisplayMode - The display mode for the form groups if not the default. Can be one of the following: "accordion", "tabs". @@ -434,6 +435,9 @@ export function useBaseResource(resourceConfig) { type: "additional_fields", extended_attributes_resource_type: resourceConfig.extendedAttributesResourceType, + ...(resourceConfig.extendedAttributesFieldGroup && { + group: resourceConfig.extendedAttributesFieldGroup, + }), }); } const groupings = attributesToConsider.reduce((acc, attr) => { -- 2.50.1