This commit is contained in:
2021-06-11 21:27:00 +00:00
parent b801eb3650
commit 8de0df4898
8 changed files with 126 additions and 190 deletions

View File

@@ -180,9 +180,9 @@
)
]"
@input="
fieldValueChanged(`Items[${activeWoItemIndex}].labors[
${activeItemIndex}
].serviceRateQuantity`)
fieldValueChanged(
`Items[${activeWoItemIndex}].labors[${activeItemIndex}].serviceRateQuantity`
)
"
></gz-decimal>
</v-col>
@@ -372,9 +372,9 @@
)
]"
@input="
fieldValueChanged(`Items[${activeWoItemIndex}].labors[
${activeItemIndex}
].priceOverride`)
fieldValueChanged(
`Items[${activeWoItemIndex}].labors[${activeItemIndex}].priceOverride`
)
"
></gz-currency>
</v-col>
@@ -394,21 +394,17 @@
:error-messages="
form().serverErrors(
this,
`Items[${activeWoItemIndex}].labors[
${activeItemIndex}
].serviceDetails`
`Items[${activeWoItemIndex}].labors[${activeItemIndex}].serviceDetails`
)
"
:ref="
`Items[${activeWoItemIndex}].labors[
${activeItemIndex}
].serviceDetails`
`Items[${activeWoItemIndex}].labors[${activeItemIndex}].serviceDetails`
"
data-cy="laborserviceDetails"
@input="
fieldValueChanged(`Items[${activeWoItemIndex}].labors[
${activeItemIndex}
].serviceDetails`)
fieldValueChanged(
`Items[${activeWoItemIndex}].labors[${activeItemIndex}].serviceDetails`
)
"
auto-grow
></v-textarea>

View File

@@ -121,32 +121,24 @@
:readonly="formState.readOnly || isDeleted"
:disabled="isDeleted"
:label="$ay.t('WorkOrderItemLoanRate')"
:ref="
`Items[${activeWoItemIndex}].loans[
${activeItemIndex}
].rate`
"
:ref="`Items[${activeWoItemIndex}].loans[${activeItemIndex}].rate`"
data-cy="loanUnitRateUnit"
:rules="[
form().integerValid(
this,
`Items[${activeWoItemIndex}].loans[
${activeItemIndex}
].rate`
`Items[${activeWoItemIndex}].loans[${activeItemIndex}].rate`
)
]"
:error-messages="
form().serverErrors(
this,
`Items[${activeWoItemIndex}].loans[
${activeItemIndex}
].rate`
`Items[${activeWoItemIndex}].loans[${activeItemIndex}].rate`
)
"
@input="
fieldValueChanged(`Items[${activeWoItemIndex}].loans[
${activeItemIndex}
].rate`)
fieldValueChanged(
`Items[${activeWoItemIndex}].loans[${activeItemIndex}].rate`
)
"
@change="loanUnitRateUnitChange"
></v-select>
@@ -187,9 +179,9 @@
)
]"
@input="
fieldValueChanged(`Items[${activeWoItemIndex}].loans[
${activeItemIndex}
].quantity`)
fieldValueChanged(
`Items[${activeWoItemIndex}].loans[ ${activeItemIndex} ].quantity`
)
"
></gz-decimal>
</v-col>
@@ -358,9 +350,9 @@
)
]"
@input="
fieldValueChanged(`Items[${activeWoItemIndex}].loans[
${activeItemIndex}
].priceOverride`)
fieldValueChanged(
`Items[${activeWoItemIndex}].loans[ ${activeItemIndex} ].priceOverride`
)
"
></gz-currency>
</v-col>
@@ -376,21 +368,17 @@
:error-messages="
form().serverErrors(
this,
`Items[${activeWoItemIndex}].loans[
${activeItemIndex}
].notes`
`Items[${activeWoItemIndex}].loans[ ${activeItemIndex} ].notes`
)
"
:ref="
`Items[${activeWoItemIndex}].loans[
${activeItemIndex}
].notes`
`Items[${activeWoItemIndex}].loans[ ${activeItemIndex} ].notes`
"
data-cy="loanUnitNotes"
@input="
fieldValueChanged(`Items[${activeWoItemIndex}].loans[
${activeItemIndex}
].notes`)
fieldValueChanged(
`Items[${activeWoItemIndex}].loans[ ${activeItemIndex} ].notes`
)
"
auto-grow
></v-textarea>

View File

@@ -161,22 +161,18 @@
:disabled="isDeleted"
:label="$ay.t('WorkOrderItemOutsideServiceRMANumber')"
:ref="
`Items[${activeWoItemIndex}].outsideServices[
${activeItemIndex}
].rmaNumber`
`Items[${activeWoItemIndex}].outsideServices[ ${activeItemIndex} ].rmaNumber`
"
:error-messages="
form().serverErrors(
this,
`Items[${activeWoItemIndex}].outsideServices[
${activeItemIndex}
].rmaNumber`
`Items[${activeWoItemIndex}].outsideServices[ ${activeItemIndex} ].rmaNumber`
)
"
@input="
fieldValueChanged(`Items[${activeWoItemIndex}].outsideServices[
${activeItemIndex}
].rmaNumber`)
fieldValueChanged(
`Items[${activeWoItemIndex}].outsideServices[ ${activeItemIndex} ].rmaNumber`
)
"
></v-text-field>
</v-col>
@@ -213,9 +209,9 @@
)
]"
@input="
fieldValueChanged(`Items[${activeWoItemIndex}].outsideServices[
${activeItemIndex}
].repairCost`)
fieldValueChanged(
`Items[${activeWoItemIndex}].outsideServices[ ${activeItemIndex} ].repairCost`
)
"
></gz-currency>
</v-col>
@@ -253,9 +249,9 @@
)
]"
@input="
fieldValueChanged(`Items[${activeWoItemIndex}].outsideServices[
${activeItemIndex}
].repairPrice`)
fieldValueChanged(
`Items[${activeWoItemIndex}].outsideServices[ ${activeItemIndex} ].repairPrice`
)
"
></gz-currency>
</v-col>
@@ -316,22 +312,18 @@
:disabled="isDeleted"
:label="$ay.t('WorkOrderItemOutsideServiceTrackingNumber')"
:ref="
`Items[${activeWoItemIndex}].outsideServices[
${activeItemIndex}
].trackingNumber`
`Items[${activeWoItemIndex}].outsideServices[ ${activeItemIndex} ].trackingNumber`
"
:error-messages="
form().serverErrors(
this,
`Items[${activeWoItemIndex}].outsideServices[
${activeItemIndex}
].trackingNumber`
`Items[${activeWoItemIndex}].outsideServices[ ${activeItemIndex} ].trackingNumber`
)
"
@input="
fieldValueChanged(`Items[${activeWoItemIndex}].outsideServices[
${activeItemIndex}
].trackingNumber`)
fieldValueChanged(
`Items[${activeWoItemIndex}].outsideServices[ ${activeItemIndex} ].trackingNumber`
)
"
></v-text-field>
</v-col>
@@ -368,9 +360,9 @@
)
]"
@input="
fieldValueChanged(`Items[${activeWoItemIndex}].outsideServices[
${activeItemIndex}
].shippingCost`)
fieldValueChanged(
`Items[${activeWoItemIndex}].outsideServices[ ${activeItemIndex} ].shippingCost`
)
"
></gz-currency>
</v-col>
@@ -408,9 +400,9 @@
)
]"
@input="
fieldValueChanged(`Items[${activeWoItemIndex}].outsideServices[
${activeItemIndex}
].shippingPrice`)
fieldValueChanged(
`Items[${activeWoItemIndex}].outsideServices[ ${activeItemIndex} ].shippingPrice`
)
"
></gz-currency>
</v-col>
@@ -565,21 +557,17 @@
:error-messages="
form().serverErrors(
this,
`Items[${activeWoItemIndex}].outsideServices[
${activeItemIndex}
].notes`
`Items[${activeWoItemIndex}].outsideServices[ ${activeItemIndex} ].notes`
)
"
:ref="
`Items[${activeWoItemIndex}].outsideServices[
${activeItemIndex}
].notes`
`Items[${activeWoItemIndex}].outsideServices[ ${activeItemIndex} ].notes`
"
data-cy="outsideServiceNotes"
@input="
fieldValueChanged(`Items[${activeWoItemIndex}].outsideServices[
${activeItemIndex}
].notes`)
fieldValueChanged(
`Items[${activeWoItemIndex}].outsideServices[ ${activeItemIndex} ].notes`
)
"
auto-grow
></v-textarea>

View File

@@ -106,9 +106,9 @@
)
]"
@input="
fieldValueChanged(`Items[${activeWoItemIndex}].parts[
${activeItemIndex}
].quantity`)
fieldValueChanged(
`Items[${activeWoItemIndex}].parts[ ${activeItemIndex} ].quantity`
)
"
></gz-decimal>
<template
@@ -225,9 +225,9 @@
)
"
@input="
fieldValueChanged(`Items[${activeWoItemIndex}].parts[
${activeItemIndex}
].description`)
fieldValueChanged(
`Items[${activeWoItemIndex}].parts[ ${activeItemIndex} ].description`
)
"
></v-text-field>
</v-col>
@@ -301,9 +301,9 @@
)
]"
@input="
fieldValueChanged(`Items[${activeWoItemIndex}].parts[
${activeItemIndex}
].priceOverride`)
fieldValueChanged(
`Items[${activeWoItemIndex}].parts[ ${activeItemIndex} ].priceOverride`
)
"
></gz-currency>
</v-col>
@@ -319,21 +319,17 @@
:error-messages="
form().serverErrors(
this,
`Items[${activeWoItemIndex}].parts[
${activeItemIndex}
].serials`
`Items[${activeWoItemIndex}].parts[ ${activeItemIndex} ].serials`
)
"
:ref="
`Items[${activeWoItemIndex}].parts[
${activeItemIndex}
].serials`
`Items[${activeWoItemIndex}].parts[ ${activeItemIndex} ].serials`
"
data-cy="partSerials"
@input="
fieldValueChanged(`Items[${activeWoItemIndex}].parts[
${activeItemIndex}
].serials`)
fieldValueChanged(
`Items[${activeWoItemIndex}].parts[ ${activeItemIndex} ].serials`
)
"
auto-grow
></v-textarea>

View File

@@ -182,9 +182,9 @@
)
]"
@input="
fieldValueChanged(`Items[${activeWoItemIndex}].scheduledUsers[
${activeItemIndex}
].estimatedQuantity`)
fieldValueChanged(
`Items[${activeWoItemIndex}].scheduledUsers[ ${activeItemIndex} ].estimatedQuantity`
)
"
></gz-decimal>
</v-col>

View File

@@ -93,30 +93,24 @@
:disabled="isDeleted"
:label="$ay.t('Sequence')"
:ref="
`Items[${activeWoItemIndex}].tasks[
${activeItemIndex}
].sequence`
`Items[${activeWoItemIndex}].tasks[ ${activeItemIndex} ].sequence`
"
:rules="[
form().integerValid(
this,
`Items[${activeWoItemIndex}].tasks[
${activeItemIndex}
].sequence`
`Items[${activeWoItemIndex}].tasks[ ${activeItemIndex} ].sequence`
)
]"
:error-messages="
form().serverErrors(
this,
`Items[${activeWoItemIndex}].tasks[
${activeItemIndex}
].sequence`
`Items[${activeWoItemIndex}].tasks[ ${activeItemIndex} ].sequence`
)
"
@input="
fieldValueChanged(`Items[${activeWoItemIndex}].tasks[
${activeItemIndex}
].sequence`)
fieldValueChanged(
`Items[${activeWoItemIndex}].tasks[ ${activeItemIndex} ].sequence`
)
"
type="number"
></v-text-field>
@@ -145,31 +139,25 @@
:disabled="isDeleted"
:label="$ay.t('WorkOrderItemTaskWorkOrderItemTaskCompletionType')"
:ref="
`Items[${activeWoItemIndex}].tasks[
${activeItemIndex}
].status`
`Items[${activeWoItemIndex}].tasks[ ${activeItemIndex} ].status`
"
data-cy="usertype"
:rules="[
form().integerValid(
this,
`Items[${activeWoItemIndex}].tasks[
${activeItemIndex}
].status`
`Items[${activeWoItemIndex}].tasks[ ${activeItemIndex} ].status`
)
]"
:error-messages="
form().serverErrors(
this,
`Items[${activeWoItemIndex}].tasks[
${activeItemIndex}
].status`
`Items[${activeWoItemIndex}].tasks[ ${activeItemIndex} ].status`
)
"
@input="
fieldValueChanged(`Items[${activeWoItemIndex}].tasks[
${activeItemIndex}
].status`)
fieldValueChanged(
`Items[${activeWoItemIndex}].tasks[ ${activeItemIndex} ].status`
)
"
@change="statusChange"
></v-select>
@@ -254,21 +242,17 @@
:error-messages="
form().serverErrors(
this,
`Items[${activeWoItemIndex}].tasks[
${activeItemIndex}
].task`
`Items[${activeWoItemIndex}].tasks[ ${activeItemIndex} ].task`
)
"
:ref="
`Items[${activeWoItemIndex}].tasks[
${activeItemIndex}
].task`
`Items[${activeWoItemIndex}].tasks[ ${activeItemIndex} ].task`
"
data-cy="expenseDescription"
@input="
fieldValueChanged(`Items[${activeWoItemIndex}].tasks[
${activeItemIndex}
].task`)
fieldValueChanged(
`Items[${activeWoItemIndex}].tasks[ ${activeItemIndex} ].task`
)
"
auto-grow
></v-textarea>

View File

@@ -180,9 +180,9 @@
)
]"
@input="
fieldValueChanged(`Items[${activeWoItemIndex}].travels[
${activeItemIndex}
].travelRateQuantity`)
fieldValueChanged(
`Items[${activeWoItemIndex}].travels[ ${activeItemIndex} ].travelRateQuantity`
)
"
></gz-decimal>
</v-col>
@@ -296,9 +296,9 @@
)
]"
@input="
fieldValueChanged(`Items[${activeWoItemIndex}].travels[
${activeItemIndex}
].noChargeQuantity`)
fieldValueChanged(
`Items[${activeWoItemIndex}].travels[ ${activeItemIndex} ].noChargeQuantity`
)
"
></gz-decimal>
</v-col>
@@ -372,9 +372,9 @@
)
]"
@input="
fieldValueChanged(`Items[${activeWoItemIndex}].travels[
${activeItemIndex}
].priceOverride`)
fieldValueChanged(
`Items[${activeWoItemIndex}].travels[ ${activeItemIndex} ].priceOverride`
)
"
></gz-currency>
</v-col>
@@ -394,21 +394,17 @@
:error-messages="
form().serverErrors(
this,
`Items[${activeWoItemIndex}].travels[
${activeItemIndex}
].travelDetails`
`Items[${activeWoItemIndex}].travels[ ${activeItemIndex} ].travelDetails`
)
"
:ref="
`Items[${activeWoItemIndex}].travels[
${activeItemIndex}
].travelDetails`
`Items[${activeWoItemIndex}].travels[ ${activeItemIndex} ].travelDetails`
"
data-cy="traveltravelDetails"
@input="
fieldValueChanged(`Items[${activeWoItemIndex}].travels[
${activeItemIndex}
].travelDetails`)
fieldValueChanged(
`Items[${activeWoItemIndex}].travels[ ${activeItemIndex} ].travelDetails`
)
"
auto-grow
></v-textarea>

View File

@@ -126,9 +126,7 @@
)
"
:ref="
`Items[${activeWoItemIndex}].units[
${activeItemIndex}
].notes`
`Items[${activeWoItemIndex}].units[ ${activeItemIndex} ].notes`
"
data-cy="unitUnitNotes"
@input="
@@ -148,20 +146,16 @@
:error-messages="
form().serverErrors(
this,
`Items[${activeWoItemIndex}].units[
${activeItemIndex}
].tags`
`Items[${activeWoItemIndex}].units[ ${activeItemIndex} ].tags`
)
"
:ref="
`Items[${activeWoItemIndex}].units[
${activeItemIndex}
].tags`
`Items[${activeWoItemIndex}].units[ ${activeItemIndex} ].tags`
"
@input="
fieldValueChanged(`Items[${activeWoItemIndex}].units[
${activeItemIndex}
].tags`)
fieldValueChanged(
`Items[${activeWoItemIndex}].units[ ${activeItemIndex} ].tags`
)
"
></gz-tag-picker>
</v-col>
@@ -176,23 +170,19 @@
:parent-v-m="this"
key-start-with="WorkOrderItemUnitCustom"
:ref="
`Items[${activeWoItemIndex}].units[
${activeItemIndex}
].customFields`
`Items[${activeWoItemIndex}].units[ ${activeItemIndex} ].customFields`
"
data-cy="unitCustomFields"
:error-messages="
form().serverErrors(
this,
`Items[${activeWoItemIndex}].units[
${activeItemIndex}
].customFields`
`Items[${activeWoItemIndex}].units[ ${activeItemIndex} ].customFields`
)
"
@input="
fieldValueChanged(`Items[${activeWoItemIndex}].units[
${activeItemIndex}
].customFields`)
fieldValueChanged(
`Items[${activeWoItemIndex}].units[ ${activeItemIndex} ].customFields`
)
"
></gz-custom-fields>
</v-col>
@@ -202,16 +192,14 @@
:aya-type="$ay.ayt().WorkOrderItem"
:aya-id="value.id"
:ref="
`Items[${activeWoItemIndex}].units[
${activeItemIndex}
].wiki`
`Items[${activeWoItemIndex}].units[ ${activeItemIndex} ].wiki`
"
v-model="value.items[activeWoItemIndex].units[activeItemIndex].wiki"
:readonly="formState.readOnly"
@input="
fieldValueChanged(`Items[${activeWoItemIndex}].units[
${activeItemIndex}
].wiki`)
fieldValueChanged(
`Items[${activeWoItemIndex}].units[ ${activeItemIndex} ].wiki`
)
"
></gz-wiki
></v-col>
@@ -311,14 +299,14 @@ export default {
this.selectedRow = [{ index: newIndex }];
this.activeItemIndex = newIndex;
//trigger rule breaking / validation
this.$nextTick(() => {
this.value.items[this.activeWoItemIndex].units[
this.activeItemIndex
].unitId = null;
this.fieldValueChanged(
`Items[${this.activeWoItemIndex}].units[${this.activeItemIndex}].unitId`
);
});
// this.$nextTick(() => {
this.value.items[this.activeWoItemIndex].units[
this.activeItemIndex
].unitId = null;
this.fieldValueChanged(
`Items[${this.activeWoItemIndex}].units[${this.activeItemIndex}].unitId`
);
// });
},
unDeleteItem() {
this.value.items[this.activeWoItemIndex].units[