From d4a243d314635da1d5f3060801bc900f6e74c0e1 Mon Sep 17 00:00:00 2001 From: Matt Blenkinsop Date: Thu, 23 Oct 2025 14:56:25 +0100 Subject: [PATCH] Bug 40942: Improve the display of vendor contracts Test plan: 1) Apply patch and yarn js:build 2) Navigate to a vendor and add some contacts 3) View the vendor record 4) The contacts table should now be at the bottom of the page and the full width of the screen 5) The Ordering information section should be at the top right of the screen Signed-off-by: Michaela Signed-off-by: Laura_Escamilla --- .../vue/components/Vendors/VendorResource.vue | 128 +++++++++--------- 1 file changed, 65 insertions(+), 63 deletions(-) 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 a87ce3a1b7..24b16e98f6 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 @@ -163,9 +163,8 @@ export default { splitScreenGroupings: [ { name: "Details", pane: 1 }, { name: "Aliases", pane: 1 }, - { name: "Contacts", pane: 2 }, + { name: "Ordering information", pane: 2 }, { name: "Interfaces", pane: 2 }, - { name: "Ordering information", pane: 1 }, ], additionalToolbarButtons, defaultToolbarButtons, @@ -283,66 +282,6 @@ export default { name: "contacts", type: "relationshipWidget", group: $__("Contacts"), - showElement: { - type: "table", - columnData: "contacts", - hidden: vendor => !!vendor.contacts?.length, - columns: [ - { - name: $__("Name"), - value: "name", - }, - { - name: $__("Position"), - value: "role", - }, - { - name: $__("Phone"), - value: "phone", - }, - { - name: $__("Alternative phone"), - value: "altphone", - }, - { - name: $__("Fax"), - value: "fax", - }, - { - name: $__("Email"), - value: "email", - }, - { - name: $__("Notes"), - value: "notes", - }, - { - name: $__("Primary acquisitions contact"), - value: "acqprimary", - format: handleContactOptions, - }, - { - name: $__("Contact when ordering"), - value: "orderacquisition", - format: handleContactOptions, - }, - { - name: $__("Contact about late orders"), - value: "claimacquisition", - format: handleContactOptions, - }, - { - name: $__("Primary serials contact"), - value: "serialsprimary", - format: handleContactOptions, - }, - { - name: $__("Contact about late issues"), - value: "claimissues", - format: handleContactOptions, - }, - ], - }, componentProps: { resourceRelationships: { resourceProperty: "contacts", @@ -427,7 +366,7 @@ export default { hideIn: ["List", "Show"], }, ], - hideIn: ["List"], + hideIn: ["List", "Show"], }, { name: "interfaces", @@ -847,6 +786,69 @@ export default { const appendToShow = componentData => { let formatDate = format_date; return [ + { + name: $__("Contacts"), + showElement: { + type: "table", + columnData: "contacts", + hidden: vendor => !!vendor.contacts?.length, + columns: [ + { + name: $__("Name"), + value: "name", + }, + { + name: $__("Position"), + value: "position", + }, + { + name: $__("Phone"), + value: "phone", + }, + { + name: $__("Alternative phone"), + value: "altphone", + }, + { + name: $__("Fax"), + value: "fax", + }, + { + name: $__("Email"), + value: "email", + }, + { + name: $__("Notes"), + value: "notes", + }, + { + name: $__("Primary acquisitions contact"), + value: "acqprimary", + format: handleContactOptions, + }, + { + name: $__("Contact when ordering"), + value: "orderacquisition", + format: handleContactOptions, + }, + { + name: $__("Contact about late orders"), + value: "claimacquisition", + format: handleContactOptions, + }, + { + name: $__("Primary serials contact"), + value: "serialsprimary", + format: handleContactOptions, + }, + { + name: $__("Contact about late issues"), + value: "claimissues", + format: handleContactOptions, + }, + ], + }, + }, { type: "component", name: $__("Contracts"), -- 2.39.5