View | Details | Raw Unified | Return to bug 41214
Collapse All | Expand All

(-)a/koha-tmpl/intranet-tmpl/prog/js/vue/components/FormElement.vue (-3 / +1 lines)
Lines 45-53 Link Here
45
            :id="getElementId"
45
            :id="getElementId"
46
            type="checkbox"
46
            type="checkbox"
47
            v-model="resource[attr.name]"
47
            v-model="resource[attr.name]"
48
            :changeMethod="
48
            :changeMethod="attr.onChange && attr.onChange.bind(this, resource)"
49
                attr.onChange && attr.onChange.bind(this, resource)
50
            "
51
            :disabled="disabled"
49
            :disabled="disabled"
52
        />
50
        />
53
    </template>
51
    </template>
(-)a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ResourceList.vue (-4 / +5 lines)
Lines 116-125 export default { Link Here
116
            let columnActions = thisResource.tableOptions.actions;
116
            let columnActions = thisResource.tableOptions.actions;
117
117
118
            const columns = resourceAttrs.reduce((acc, attr, i) => {
118
            const columns = resourceAttrs.reduce((acc, attr, i) => {
119
                const shouldFieldBeHidden = attr.hideIn && typeof attr.hideIn === "function" ? attr.hideIn() : attr.hideIn
119
                const shouldFieldBeHidden =
120
                if (
120
                    attr.hideIn && typeof attr.hideIn === "function"
121
                    shouldFieldBeHidden && shouldFieldBeHidden.includes("List")
121
                        ? attr.hideIn()
122
                )
122
                        : attr.hideIn;
123
                if (shouldFieldBeHidden && shouldFieldBeHidden.includes("List"))
123
                    return acc;
124
                    return acc;
124
                if (
125
                if (
125
                    attr.hasOwnProperty("tableColumnDefinition") &&
126
                    attr.hasOwnProperty("tableColumnDefinition") &&
(-)a/koha-tmpl/intranet-tmpl/prog/js/vue/components/SIP2/SIP2AccountResource.vue (-1 / +4 lines)
Lines 422-428 export default { Link Here
422
                relationshipAPIClient: APIClient.cash.cash_registers,
422
                relationshipAPIClient: APIClient.cash.cash_registers,
423
                relationshipOptionLabelAttr: "name", // attr of the related resource used for display
423
                relationshipOptionLabelAttr: "name", // attr of the related resource used for display
424
                relationshipRequiredKey: "cash_register_id",
424
                relationshipRequiredKey: "cash_register_id",
425
                hideIn: () => sysprefs.value.UseCashRegisters !== "0" ? ["List"] : ["Form", "Show", "List"],
425
                hideIn: () =>
426
                    sysprefs.value.UseCashRegisters !== "0"
427
                        ? ["List"]
428
                        : ["Form", "Show", "List"],
426
                group: "Details",
429
                group: "Details",
427
                toolTip: __(
430
                toolTip: __(
428
                    "Only required if system preference UseCashRegisters is enabled"
431
                    "Only required if system preference UseCashRegisters is enabled"
(-)a/koha-tmpl/intranet-tmpl/prog/js/vue/composables/base-resource.js (-4 / +12 lines)
Lines 418-428 export function useBaseResource(resourceConfig) { Link Here
418
                        relationshipField.relationshipName = ra.name;
418
                        relationshipField.relationshipName = ra.name;
419
                    });
419
                    });
420
                }
420
                }
421
                const shouldFieldBeHidden = ra.hideIn && typeof ra.hideIn === "function" ? ra.hideIn() : ra.hideIn
421
                const shouldFieldBeHidden =
422
                if (shouldFieldBeHidden && !shouldFieldBeHidden.includes(component)) {
422
                    ra.hideIn && typeof ra.hideIn === "function"
423
                        ? ra.hideIn()
424
                        : ra.hideIn;
425
                if (
426
                    shouldFieldBeHidden &&
427
                    !shouldFieldBeHidden.includes(component)
428
                ) {
423
                    return [...acc, ra];
429
                    return [...acc, ra];
424
                }
430
                }
425
                if (shouldFieldBeHidden && shouldFieldBeHidden.includes(component)) {
431
                if (
432
                    shouldFieldBeHidden &&
433
                    shouldFieldBeHidden.includes(component)
434
                ) {
426
                    return acc;
435
                    return acc;
427
                }
436
                }
428
                return [...acc, ra];
437
                return [...acc, ra];
429
- 

Return to bug 41214