Bug 41214: (QA follow-up): Tidy fix
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
parent
76d7a0bc72
commit
ab14eb2bca
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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") &&
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -419,11 +419,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];
|
||||
|
|
|
|||
Loading…
Reference in New Issue