This commit is contained in:
2021-06-24 19:36:47 +00:00
parent 2e3a012bcd
commit bc19406282
2 changed files with 39 additions and 0 deletions

View File

@@ -80,6 +80,21 @@
limit-selection-to="inside"
></gz-role-picker>
</v-col>
<v-col v-if="showIncludeDescendants" cols="12" sm="6" lg="4" xl="3">
<v-checkbox
v-model="obj.includeWoItemDescendants"
:readonly="formState.readOnly"
:label="$ay.t('ReportIncludeAllWorkOrderItemDescendants')"
ref="includeWoItemDescendants"
data-cy="includeWoItemDescendants"
:error-messages="
form().serverErrors(this, 'includeWoItemDescendants')
"
@change="fieldValueChanged('includeWoItemDescendants')"
></v-checkbox>
</v-col>
<v-col cols="12" sm="6" lg="4" xl="3">
<v-checkbox
v-model="obj.active"
@@ -450,6 +465,7 @@ export default {
id: 0,
concurrency: 0,
name: "report",
includeWoItemDescendants: false,
active: true,
notes: "",
roles: 124927, //all except customers
@@ -583,6 +599,25 @@ Handlebars.registerHelper('loud', function (aString) {
deep: true
}
},
computed: {
showIncludeDescendants: function() {
switch (this.obj.aType) {
case window.$gz.type.WorkOrderItemExpense:
case window.$gz.type.WorkOrderItemLabor:
case window.$gz.type.WorkOrderItemLoan:
case window.$gz.type.WorkOrderItemPart:
case window.$gz.type.WorkOrderItemPartRequest:
case window.$gz.type.WorkOrderItemScheduledUser:
case window.$gz.type.WorkOrderItemTask:
case window.$gz.type.WorkOrderItemTravel:
case window.$gz.type.WorkOrderItemUnit:
case window.$gz.type.WorkOrderItemOutsideService:
return true;
default:
return false;
}
}
},
methods: {
//alternate method, one editor with tabs example
//probably should do this way