This commit is contained in:
2021-08-06 15:42:56 +00:00
parent b14ef83df2
commit b145c6af0a
3 changed files with 23 additions and 31 deletions

View File

@@ -747,8 +747,9 @@ export default {
}
}
let template =
const template =
window.$gz.store.state.formCustomTemplate[vm.formCustomTemplateKey];
if (template === undefined) {
return true;
}
@@ -756,10 +757,15 @@ export default {
//this is a collection of both custom field definitions and standard form fields that are required
//since all names are unique can just filter out the one we need by name which will inherently ignore custom fields by default
let templateItem = template.find(
const templateItem = template.find(
z => z.fld.toLowerCase() == formCustomTemplateFieldName.toLowerCase()
);
if (window.$gz.dev && !templateItem) {
console.log(
`DEV ERROR: FORM FIELD NOT IN TEMPLATE: "${formCustomTemplateFieldName}"`
);
}
if (templateItem === undefined || templateItem.hide !== true) {
return true;
}

View File

@@ -25,13 +25,7 @@
></v-text-field>
</v-col>
<v-col
v-if="form().showMe(this, 'Customer')"
cols="12"
sm="6"
lg="4"
xl="3"
>
<v-col cols="12" sm="6" lg="4" xl="3">
<gz-pick-list
:aya-type="ayaTypes().Customer"
show-edit-icon
@@ -46,7 +40,7 @@
</v-col>
<v-col
v-if="form().showMe(this, 'UnitDescription')"
v-if="form().showMe(this, 'Description')"
cols="12"
sm="6"
lg="4"
@@ -64,7 +58,7 @@
</v-col>
<v-col
v-if="form().showMe(this, 'UnitModel')"
v-if="form().showMe(this, 'UnitModelId')"
cols="12"
sm="6"
lg="4"
@@ -84,7 +78,7 @@
</v-col>
<v-col
v-if="form().showMe(this, 'UnitReplacedByUnitID')"
v-if="form().showMe(this, 'ReplacedByUnitId')"
cols="12"
sm="6"
lg="4"
@@ -106,7 +100,7 @@
</v-col>
<v-col
v-if="form().showMe(this, 'UnitParentUnitID')"
v-if="form().showMe(this, 'ParentUnitId')"
cols="12"
sm="6"
lg="4"
@@ -198,7 +192,7 @@
</v-col> -->
<v-col
v-if="form().showMe(this, 'UnitMetered')"
v-if="form().showMe(this, 'Metered')"
cols="12"
sm="6"
lg="4"
@@ -228,7 +222,7 @@
</v-col>
<v-col
v-if="form().showMe(this, 'UnitBoughtHere')"
v-if="form().showMe(this, 'BoughtHere')"
cols="12"
sm="6"
lg="4"
@@ -246,7 +240,7 @@
</v-col>
<v-col
v-if="form().showMe(this, 'UnitPurchaseFromID')"
v-if="form().showMe(this, 'PurchasedFromVendorId')"
cols="12"
sm="6"
lg="4"
@@ -268,7 +262,7 @@
</v-col>
<v-col
v-if="form().showMe(this, 'UnitPurchasedDate')"
v-if="form().showMe(this, 'PurchasedDate')"
cols="12"
sm="6"
lg="4"
@@ -286,7 +280,7 @@
</v-col>
<v-col
v-if="form().showMe(this, 'UnitReceipt')"
v-if="form().showMe(this, 'Receipt')"
cols="12"
sm="6"
lg="4"
@@ -635,7 +629,7 @@
<v-col
v-if="
form().showMe(this, 'UnitOverrideLifeTime') &&
form().showMe(this, 'LifeTimeWarranty') &&
obj.overrideModelWarranty
"
cols="12"
@@ -658,7 +652,7 @@
<v-col
v-if="
form().showMe(this, 'UnitOverrideLength') &&
form().showMe(this, 'WarrantyLength') &&
obj.overrideModelWarranty &&
!obj.lifeTimeWarranty
"
@@ -684,7 +678,7 @@
<v-col
v-if="
form().showMe(this, 'UnitOverrideWarrantyTerms') &&
form().showMe(this, 'WarrantyTerms') &&
obj.overrideModelWarranty
"
cols="12"