Bugzilla – Attachment 191343 Details for
Bug 41214
Cash register should only show if UseCashRegisters sys pref is enabled
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 41214: (QA follow-up): Tidy fix
Bug-41214-QA-follow-up-Tidy-fix.patch (text/plain), 4.79 KB, created by
Pedro Amorim
on 2026-01-13 09:22:56 UTC
(
hide
)
Description:
Bug 41214: (QA follow-up): Tidy fix
Filename:
MIME Type:
Creator:
Pedro Amorim
Created:
2026-01-13 09:22:56 UTC
Size:
4.79 KB
patch
obsolete
>From 61d3f96306b4430e2e2efbfa2b8bd9e427927380 Mon Sep 17 00:00:00 2001 >From: Pedro Amorim <pedro.amorim@openfifth.co.uk> >Date: Tue, 13 Jan 2026 09:21:59 +0000 >Subject: [PATCH] Bug 41214: (QA follow-up): Tidy fix > >--- > .../prog/js/vue/components/FormElement.vue | 4 +--- > .../prog/js/vue/components/ResourceList.vue | 9 +++++---- > .../vue/components/SIP2/SIP2AccountResource.vue | 5 ++++- > .../prog/js/vue/composables/base-resource.js | 15 ++++++++++++--- > 4 files changed, 22 insertions(+), 11 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/components/FormElement.vue b/koha-tmpl/intranet-tmpl/prog/js/vue/components/FormElement.vue >index 181dec48cc0..8379c7eea33 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/vue/components/FormElement.vue >+++ b/koha-tmpl/intranet-tmpl/prog/js/vue/components/FormElement.vue >@@ -45,9 +45,7 @@ > :id="getElementId" > type="checkbox" > v-model="resource[attr.name]" >- :changeMethod=" >- attr.onChange && attr.onChange.bind(this, resource) >- " >+ :changeMethod="attr.onChange && attr.onChange.bind(this, resource)" > :disabled="disabled" > /> > </template> >diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ResourceList.vue b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ResourceList.vue >index 753de46bde3..df0a72e24fc 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ResourceList.vue >+++ b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ResourceList.vue >@@ -116,10 +116,11 @@ export default { > let columnActions = thisResource.tableOptions.actions; > > const columns = resourceAttrs.reduce((acc, attr, i) => { >- const shouldFieldBeHidden = attr.hideIn && typeof attr.hideIn === "function" ? attr.hideIn() : attr.hideIn >- if ( >- shouldFieldBeHidden && shouldFieldBeHidden.includes("List") >- ) >+ const shouldFieldBeHidden = >+ attr.hideIn && typeof attr.hideIn === "function" >+ ? attr.hideIn() >+ : attr.hideIn; >+ if (shouldFieldBeHidden && shouldFieldBeHidden.includes("List")) > return acc; > if ( > attr.hasOwnProperty("tableColumnDefinition") && >diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/components/SIP2/SIP2AccountResource.vue b/koha-tmpl/intranet-tmpl/prog/js/vue/components/SIP2/SIP2AccountResource.vue >index 121f3fedf32..207b807d5c7 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/vue/components/SIP2/SIP2AccountResource.vue >+++ b/koha-tmpl/intranet-tmpl/prog/js/vue/components/SIP2/SIP2AccountResource.vue >@@ -422,7 +422,10 @@ export default { > relationshipAPIClient: APIClient.cash.cash_registers, > relationshipOptionLabelAttr: "name", // attr of the related resource used for display > relationshipRequiredKey: "cash_register_id", >- hideIn: () => sysprefs.value.UseCashRegisters !== "0" ? ["List"] : ["Form", "Show", "List"], >+ hideIn: () => >+ sysprefs.value.UseCashRegisters !== "0" >+ ? ["List"] >+ : ["Form", "Show", "List"], > group: "Details", > toolTip: __( > "Only required if system preference UseCashRegisters is enabled" >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 cc499c53820..8231b4dba53 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 >@@ -418,11 +418,20 @@ export function useBaseResource(resourceConfig) { > relationshipField.relationshipName = ra.name; > }); > } >- const shouldFieldBeHidden = ra.hideIn && typeof ra.hideIn === "function" ? ra.hideIn() : ra.hideIn >- if (shouldFieldBeHidden && !shouldFieldBeHidden.includes(component)) { >+ const shouldFieldBeHidden = >+ ra.hideIn && typeof ra.hideIn === "function" >+ ? ra.hideIn() >+ : ra.hideIn; >+ if ( >+ shouldFieldBeHidden && >+ !shouldFieldBeHidden.includes(component) >+ ) { > return [...acc, ra]; > } >- if (shouldFieldBeHidden && shouldFieldBeHidden.includes(component)) { >+ if ( >+ shouldFieldBeHidden && >+ shouldFieldBeHidden.includes(component) >+ ) { > return acc; > } > return [...acc, ra]; >-- >2.39.5
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 41214
:
189263
|
189322
|
189695
|
189697
|
189698
|
189699
|
189700
|
189701
|
189702
|
189902
|
189903
|
189904
|
189905
| 191343