This commit is contained in:
@@ -385,6 +385,10 @@ todo: many biz objects are not using new PUT methodology
|
||||
|
||||
CURRENTLY DOING: Work order notifications - PartRequested
|
||||
|
||||
todo: add unit required rule to backend woitemunits selection
|
||||
todo: search workorder tree for front end required and other rules then replicate at back end, some are missing and moer will be missing after below blocks of new wo issues fixed
|
||||
|
||||
|
||||
bugbug: new wokrorder adding new item of any kind doesn't trigger dirty
|
||||
|
||||
bugubg: completely fresh workorder riddled with errors when attempting to create one of each type of record
|
||||
|
||||
@@ -99,22 +99,18 @@
|
||||
:disabled="isDeleted"
|
||||
:label="$ay.t('WorkOrderItemExpenseName')"
|
||||
:ref="
|
||||
`Items[${activeWoItemIndex}].expenses[
|
||||
${activeItemIndex}
|
||||
].name`
|
||||
`Items[${activeWoItemIndex}].expenses[${activeItemIndex}].name`
|
||||
"
|
||||
:error-messages="
|
||||
form().serverErrors(
|
||||
this,
|
||||
`Items[${activeWoItemIndex}].expenses[
|
||||
${activeItemIndex}
|
||||
].name`
|
||||
`Items[${activeWoItemIndex}].expenses[${activeItemIndex}].name`
|
||||
)
|
||||
"
|
||||
@input="
|
||||
fieldValueChanged(`Items[${activeWoItemIndex}].expenses[
|
||||
${activeItemIndex}
|
||||
].name`)
|
||||
fieldValueChanged(
|
||||
`Items[${activeWoItemIndex}].expenses[${activeItemIndex}].name`
|
||||
)
|
||||
"
|
||||
></v-text-field>
|
||||
</v-col>
|
||||
@@ -154,9 +150,9 @@
|
||||
)
|
||||
]"
|
||||
@input="
|
||||
fieldValueChanged(`Items[${activeWoItemIndex}].expenses[
|
||||
${activeItemIndex}
|
||||
].totalCost`)
|
||||
fieldValueChanged(
|
||||
`Items[${activeWoItemIndex}].expenses[${activeItemIndex}].totalCost`
|
||||
)
|
||||
"
|
||||
></gz-currency>
|
||||
</v-col>
|
||||
@@ -197,9 +193,9 @@
|
||||
)
|
||||
]"
|
||||
@input="
|
||||
fieldValueChanged(`Items[${activeWoItemIndex}].expenses[
|
||||
${activeItemIndex}
|
||||
].chargeAmount`)
|
||||
fieldValueChanged(
|
||||
`Items[${activeWoItemIndex}].expenses[${activeItemIndex}].chargeAmount`
|
||||
)
|
||||
"
|
||||
></gz-currency>
|
||||
</v-col>
|
||||
@@ -230,9 +226,9 @@
|
||||
)
|
||||
"
|
||||
@change="
|
||||
fieldValueChanged(`Items[${activeWoItemIndex}].expenses[
|
||||
${activeItemIndex}
|
||||
].chargeToCustomer`)
|
||||
fieldValueChanged(
|
||||
`Items[${activeWoItemIndex}].expenses[${activeItemIndex}].chargeToCustomer`
|
||||
)
|
||||
"
|
||||
></v-checkbox>
|
||||
</v-col>
|
||||
@@ -272,9 +268,9 @@
|
||||
)
|
||||
]"
|
||||
@input="
|
||||
fieldValueChanged(`Items[${activeWoItemIndex}].expenses[
|
||||
${activeItemIndex}
|
||||
].taxPaid`)
|
||||
fieldValueChanged(
|
||||
`Items[${activeWoItemIndex}].expenses[${activeItemIndex}].taxPaid`
|
||||
)
|
||||
"
|
||||
></gz-currency>
|
||||
</v-col>
|
||||
@@ -341,9 +337,9 @@
|
||||
)
|
||||
"
|
||||
@change="
|
||||
fieldValueChanged(`Items[${activeWoItemIndex}].expenses[
|
||||
${activeItemIndex}
|
||||
].reimburseUser`)
|
||||
fieldValueChanged(
|
||||
`Items[${activeWoItemIndex}].expenses[${activeItemIndex}].reimburseUser`
|
||||
)
|
||||
"
|
||||
></v-checkbox>
|
||||
</v-col>
|
||||
@@ -399,21 +395,17 @@
|
||||
:error-messages="
|
||||
form().serverErrors(
|
||||
this,
|
||||
`Items[${activeWoItemIndex}].expenses[
|
||||
${activeItemIndex}
|
||||
].description`
|
||||
`Items[${activeWoItemIndex}].expenses[${activeItemIndex}].description`
|
||||
)
|
||||
"
|
||||
:ref="
|
||||
`Items[${activeWoItemIndex}].expenses[
|
||||
${activeItemIndex}
|
||||
].description`
|
||||
`Items[${activeWoItemIndex}].expenses[${activeItemIndex}].description`
|
||||
"
|
||||
data-cy="expenseDescription"
|
||||
@input="
|
||||
fieldValueChanged(`Items[${activeWoItemIndex}].expenses[
|
||||
${activeItemIndex}
|
||||
].description`)
|
||||
fieldValueChanged(
|
||||
`Items[${activeWoItemIndex}].expenses[${activeItemIndex}].description`
|
||||
)
|
||||
"
|
||||
auto-grow
|
||||
></v-textarea>
|
||||
|
||||
@@ -93,9 +93,7 @@
|
||||
:rules="[
|
||||
form().required(
|
||||
this,
|
||||
`Items[${activeWoItemIndex}].units[
|
||||
${activeItemIndex}
|
||||
].unitId`
|
||||
`Items[${activeWoItemIndex}].units[${activeItemIndex}].unitId`
|
||||
)
|
||||
]"
|
||||
:error-messages="
|
||||
@@ -124,9 +122,7 @@
|
||||
:error-messages="
|
||||
form().serverErrors(
|
||||
this,
|
||||
`Items[${activeWoItemIndex}].units[
|
||||
${activeItemIndex}
|
||||
].notes`
|
||||
`Items[${activeWoItemIndex}].units[${activeItemIndex}].notes`
|
||||
)
|
||||
"
|
||||
:ref="
|
||||
@@ -136,9 +132,9 @@
|
||||
"
|
||||
data-cy="unitUnitNotes"
|
||||
@input="
|
||||
fieldValueChanged(`Items[${activeWoItemIndex}].units[
|
||||
${activeItemIndex}
|
||||
].notes`)
|
||||
fieldValueChanged(
|
||||
`Items[${activeWoItemIndex}].units[${activeItemIndex}].notes`
|
||||
)
|
||||
"
|
||||
auto-grow
|
||||
></v-textarea>
|
||||
@@ -238,47 +234,7 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
/* XXXeslint-disable */
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
/*
|
||||
l.Add(new FormField { TKey = "WorkOrderItemUnitNotes", FieldKey = "WorkOrderItemUnitNotes", TKeySection = "WorkOrderItemUnit" });
|
||||
l.Add(new FormField { TKey = "Unit", FieldKey = "WorkOrderItemUnit", TKeySection = "WorkOrderItemUnit" });
|
||||
l.Add(new FormField { TKey = "Tags", FieldKey = "WorkOrderItemUnitTags", TKeySection = "WorkOrderItemUnit" });
|
||||
l.Add(new FormField { TKey = "Wiki", FieldKey = "WorkOrderItemUnitWiki", TKeySection = "WorkOrderItemUnit" });
|
||||
l.Add(new FormField { TKey = "Attachments", FieldKey = "WorkOrderItemUnitAttachments", TKeySection = "WorkOrderItemUnit" });
|
||||
l.Add(new FormField { TKey = "WorkOrderItemUnitCustom1", FieldKey = "WorkOrderItemUnitCustom1", IsCustomField = true, TKeySection = "WorkOrderItemUnit" });
|
||||
l.Add(new FormField { TKey = "WorkOrderItemUnitCustom2", FieldKey = "WorkOrderItemUnitCustom2", IsCustomField = true, TKeySection = "WorkOrderItemUnit" });
|
||||
l.Add(new FormField { TKey = "WorkOrderItemUnitCustom3", FieldKey = "WorkOrderItemUnitCustom3", IsCustomField = true, TKeySection = "WorkOrderItemUnit" });
|
||||
l.Add(new FormField { TKey = "WorkOrderItemUnitCustom4", FieldKey = "WorkOrderItemUnitCustom4", IsCustomField = true, TKeySection = "WorkOrderItemUnit" });
|
||||
l.Add(new FormField { TKey = "WorkOrderItemUnitCustom5", FieldKey = "WorkOrderItemUnitCustom5", IsCustomField = true, TKeySection = "WorkOrderItemUnit" });
|
||||
l.Add(new FormField { TKey = "WorkOrderItemUnitCustom6", FieldKey = "WorkOrderItemUnitCustom6", IsCustomField = true, TKeySection = "WorkOrderItemUnit" });
|
||||
l.Add(new FormField { TKey = "WorkOrderItemUnitCustom7", FieldKey = "WorkOrderItemUnitCustom7", IsCustomField = true, TKeySection = "WorkOrderItemUnit" });
|
||||
l.Add(new FormField { TKey = "WorkOrderItemUnitCustom8", FieldKey = "WorkOrderItemUnitCustom8", IsCustomField = true, TKeySection = "WorkOrderItemUnit" });
|
||||
l.Add(new FormField { TKey = "WorkOrderItemUnitCustom9", FieldKey = "WorkOrderItemUnitCustom9", IsCustomField = true, TKeySection = "WorkOrderItemUnit" });
|
||||
l.Add(new FormField { TKey = "WorkOrderItemUnitCustom10", FieldKey = "WorkOrderItemUnitCustom10", IsCustomField = true, TKeySection = "WorkOrderItemUnit" });
|
||||
l.Add(new FormField { TKey = "WorkOrderItemUnitCustom11", FieldKey = "WorkOrderItemUnitCustom11", IsCustomField = true, TKeySection = "WorkOrderItemUnit" });
|
||||
l.Add(new FormField { TKey = "WorkOrderItemUnitCustom12", FieldKey = "WorkOrderItemUnitCustom12", IsCustomField = true, TKeySection = "WorkOrderItemUnit" });
|
||||
l.Add(new FormField { TKey = "WorkOrderItemUnitCustom13", FieldKey = "WorkOrderItemUnitCustom13", IsCustomField = true, TKeySection = "WorkOrderItemUnit" });
|
||||
l.Add(new FormField { TKey = "WorkOrderItemUnitCustom14", FieldKey = "WorkOrderItemUnitCustom14", IsCustomField = true, TKeySection = "WorkOrderItemUnit" });
|
||||
l.Add(new FormField { TKey = "WorkOrderItemUnitCustom15", FieldKey = "WorkOrderItemUnitCustom15", IsCustomField = true, TKeySection = "WorkOrderItemUnit" });
|
||||
l.Add(new FormField { TKey = "WorkOrderItemUnitCustom16", FieldKey = "WorkOrderItemUnitCustom16", IsCustomField = true, TKeySection = "WorkOrderItemUnit" });
|
||||
|
||||
|
||||
{
|
||||
"0": {
|
||||
"id": 39,
|
||||
"concurrency": 8129666,
|
||||
"notes": "Saepe quos omnis fugiat aliquam amet animi sit dolorum voluptatibus.",
|
||||
"wiki": null,
|
||||
"customFields": null,
|
||||
"tags": [],
|
||||
"unitId": 2,
|
||||
"unitViz": "86876317",
|
||||
"isDirty": false,
|
||||
"workOrderItemId": 20
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
*/
|
||||
export default {
|
||||
created() {
|
||||
this.setDefaultView();
|
||||
@@ -353,6 +309,10 @@ export default {
|
||||
this.$emit("change");
|
||||
this.selectedRow = [{ index: newIndex }];
|
||||
this.activeItemIndex = newIndex;
|
||||
//trigger rule breaking / validation
|
||||
this.fieldValueChanged(
|
||||
`Items[${this.activeWoItemIndex}].units[${this.activeItemIndex}].unitId`
|
||||
);
|
||||
},
|
||||
unDeleteItem() {
|
||||
this.value.items[this.activeWoItemIndex].units[
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
data-cy="woHeader"
|
||||
@change="setDirty()"
|
||||
/>
|
||||
{{ formState }}
|
||||
|
||||
<GzWoItems
|
||||
v-model="obj"
|
||||
:form-key="formCustomTemplateKey"
|
||||
|
||||
Reference in New Issue
Block a user