This commit is contained in:
2021-05-03 17:11:31 +00:00
parent 05052d98c3
commit 6be9d05214
6 changed files with 27 additions and 28 deletions

View File

@@ -39,7 +39,10 @@
</v-col>
<v-col cols="12" sm="6" lg="4" xl="3">
<GzWoState
v-if="pvm.subRights.states.visible"
v-if="
pvm.subRights.states.visible &&
form().showMe(this, 'WorkOrderStatus')
"
v-model="value"
:form-key="formCustomTemplateKey"
:readonly="formState.readOnly"
@@ -52,6 +55,7 @@
<v-col cols="12" sm="6" lg="4" xl="3">
<GzWoAddress
v-if="form().showMe(this, 'Address')"
v-model="value"
:form-key="formCustomTemplateKey"
:readonly="formState.readOnly"
@@ -60,7 +64,7 @@
/>
</v-col>
<v-col v-if="form().showMe(this, 'Notes')" cols="12">
<v-col v-if="form().showMe(this, 'WorkOrderSummary')" cols="12">
<v-textarea
v-model="value.notes"
:readonly="formState.readOnly"

View File

@@ -85,7 +85,7 @@
</v-col>
<v-col
v-if="form().showMe(this, 'Sequence')"
v-if="form().showMe(this, 'WorkOrderItemSequence')"
cols="12"
sm="6"
lg="4"
@@ -119,7 +119,10 @@
</v-col>
<GzWoItemScheduledUsers
v-if="pvm.subRights.scheduledUsers.visible"
v-if="
pvm.subRights.scheduledUsers.visible &&
form().showMe(this, 'WorkOrderItemScheduledUserList')
"
v-model="value"
:pvm="pvm"
:active-wo-item-index="activeItemIndex"

View File

@@ -191,7 +191,6 @@ export default {
});
this.selectedStatus = null;
//flag form dirty
this.pvm.formState.dirty = true;
}
},

View File

@@ -386,6 +386,12 @@ async function initDataObject(vm) {
if (requiredTranslations.indexOf(res.data[i].tKey) === -1) {
requiredTranslations.push(res.data[i].tKey);
}
//sections
if (res.data[i].tKeySection != null) {
if (requiredTranslations.indexOf(res.data[i].tKeySection) === -1) {
requiredTranslations.push(res.data[i].tKeySection);
}
}
}
await window.$gz.translation.cacheTranslations(requiredTranslations);
@@ -412,13 +418,20 @@ async function initDataObject(vm) {
let objItem = {
key: faf.fieldKey,
title: vm.$ay.t(faf.tKey), //sb already cached either above or from the main form it's customizing
title: null,
custom: faf.isCustomField,
required: templateItem.required === true,
visible: templateItem.hide !== true,
type: templateItem.type
};
//set title including optional section prepended
if (faf.tKeySection != null) {
objItem.title = vm.$ay.t(faf.tKeySection) + "." + vm.$ay.t(faf.tKey);
} else {
objItem.title = vm.$ay.t(faf.tKey);
}
vm.obj.push(objItem);
vm.concurrency = window.$gz.formCustomTemplate.getTemplateConcurrencyToken(
vm.formCustomTemplateKey

View File

@@ -1103,7 +1103,7 @@ async function fetchTranslatedText(vm) {
"WorkOrderItemScheduledUserEstimatedQuantity",
"WorkOrderItemScheduledUserUserID",
"WorkOrderItemScheduledUserServiceRateID",
"Sequence",
"WorkOrderItemSequence",
"WorkOrderItemUnitList",
"AddressTypePhysical",
"AddressTypePostal",