Bugzilla – Attachment 188756 Details for
Bug 38262
Add additional fields to Vendors
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 38262: Add additional fields UI support for acquisition vendors
Bug-38262-Add-additional-fields-UI-support-for-acq.patch (text/plain), 5.12 KB, created by
Martin Renvoize (ashimema)
on 2025-10-31 07:33:59 UTC
(
hide
)
Description:
Bug 38262: Add additional fields UI support for acquisition vendors
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2025-10-31 07:33:59 UTC
Size:
5.12 KB
patch
obsolete
>From ddefa04a49447ae2681237e0dd7866ca5ce43d38 Mon Sep 17 00:00:00 2001 >From: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> >Date: Tue, 29 Oct 2024 17:12:24 +0000 >Subject: [PATCH] Bug 38262: Add additional fields UI support for acquisition > vendors > >Updates staff interface to expose additional fields functionality for >vendor records: >- Adds "Vendors" (aqbooksellers:vendor) to searchable tables list in > additional fields administration page >- Configures VendorResource.vue to fetch extended_attributes with > proper embeds (+strings for localized values) >- Sets extendedAttributesFieldGroup to display fields in "Details" tab >- Cleans up _strings computed field during vendor save operations > >This completes the frontend implementation allowing staff to create, >manage, and view custom additional fields on vendor records. > >Test plan: >1) Go to Administration > Additional fields and add an additional field for Vendors >2) Navigate to 'Acquisitions' and click 'New vendor' >3) Fill out the form, making sure to add something into your new additional field >4) Hit save >5) View and Edit your new Vendor and confirm that the additional field > values appear and update as expected > >Signed-off-by: David Nind <david@davidnind.com> >Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> >--- > .../intranet-tmpl/prog/en/modules/admin/additional-fields.tt | 3 ++- > .../intranet-tmpl/prog/js/fetch/acquisition-api-client.js | 2 +- > .../prog/js/vue/components/Vendors/VendorResource.vue | 5 ++++- > 3 files changed, 7 insertions(+), 3 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/additional-fields.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/additional-fields.tt >index e8c76a2f3b2..78ddf642e7e 100755 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/additional-fields.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/additional-fields.tt >@@ -30,7 +30,7 @@ > </head> > > [% marcfield_tables = ['subscription', 'aqorders'] %] >-[% searchable_tables = ['subscription', 'aqbasket', 'aqinvoices', 'erm_licenses', 'erm_agreements', 'erm_packages'] %] >+[% searchable_tables = ['subscription', 'aqbasket', 'aqinvoices', 'erm_licenses', 'erm_agreements', 'erm_packages', 'aqbooksellers:vendor'] %] > [% show_marcfield = marcfield_tables.grep('^' _ tablename _ '$').size ? 1 : 0 %] > [% show_searchable = searchable_tables.grep('^' _ tablename _ '$').size ? 1 : 0 %] > >@@ -130,6 +130,7 @@ > [% IF CAN_user_acquisition_order_manage %] > [% WRAPPER table_option value="aqbasket" %]<span>Order baskets</span>[% END %] > [% WRAPPER table_option value="aqorders" %]<span>Order lines</span>[% END %] >+ [% WRAPPER table_option value="aqbooksellers:vendor" %]<span>Vendors</span>[% END %] > [% END %] > </ul> > [% END %] >diff --git a/koha-tmpl/intranet-tmpl/prog/js/fetch/acquisition-api-client.js b/koha-tmpl/intranet-tmpl/prog/js/fetch/acquisition-api-client.js >index 7c33723e04c..f0f1a482df4 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/fetch/acquisition-api-client.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/fetch/acquisition-api-client.js >@@ -21,7 +21,7 @@ export class AcquisitionAPIClient { > endpoint: "vendors/" + id, > headers: { > "x-koha-embed": >- "aliases,subscriptions+count,interfaces,contacts,contracts,baskets+count,invoices+count", >+ "aliases,subscriptions+count,interfaces,contacts,contracts,baskets+count,invoices+count,extended_attributes,+strings", > }, > }), > getAll: (query, params) => >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 a87ce3a1b7d..922d331d898 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 >@@ -170,6 +170,8 @@ export default { > additionalToolbarButtons, > defaultToolbarButtons, > stickyToolbar: ["Form"], >+ extendedAttributesResourceType: "vendor", >+ extendedAttributesFieldGroup: "Details", > resourceAttrs: [ > { > name: "id", >@@ -672,7 +674,7 @@ export default { > > const tableOptions = { > options: { >- embed: "aliases,baskets+count,subscriptions+count,invoices+count", >+ embed: "aliases,baskets+count,subscriptions+count,invoices+count,extended_attributes,+strings", > }, > url: baseResource.getResourceTableUrl(), > table_settings: baseResource.vendorTableSettings, >@@ -771,6 +773,7 @@ export default { > delete vendor.subscriptions; > delete vendor.contracts; > delete vendor.invoices_count; >+ delete vendor._strings; > > if (vendor.discount && !verifyDiscountValue(vendor.discount)) > errors.push($__("Invalid discount value")); >-- >2.51.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 38262
:
175147
|
175148
|
175149
|
175712
|
175713
|
175714
|
180558
|
180559
|
180560
|
182602
|
182603
|
182604
|
183026
|
183027
|
183028
|
183029
|
183030
|
183031
|
188213
|
188214
|
188215
|
188364
|
188366
|
188377
|
188384
|
188385
|
188386
|
188388
|
188754
|
188755
| 188756