This commit is contained in:
@@ -488,7 +488,7 @@ export default {
|
||||
totalCost: 0,
|
||||
chargeAmount: 0,
|
||||
taxPaid: 0,
|
||||
chargeTaxCodeId: 0,
|
||||
chargeTaxCodeId: null,
|
||||
chargeTaxCodeViz: null,
|
||||
reimburseUser: false,
|
||||
userId: null,
|
||||
|
||||
@@ -91,6 +91,12 @@
|
||||
`Items[${activeWoItemIndex}].loans[${activeItemIndex}].loanUnitId`
|
||||
"
|
||||
data-cy="loans.loanUnitId"
|
||||
:rules="[
|
||||
form().required(
|
||||
this,
|
||||
`Items[${activeWoItemIndex}].loans[${activeItemIndex}].loanUnitId`
|
||||
)
|
||||
]"
|
||||
:error-messages="
|
||||
form().serverErrors(
|
||||
this,
|
||||
@@ -123,12 +129,6 @@
|
||||
:label="$ay.t('WorkOrderItemLoanRate')"
|
||||
:ref="`Items[${activeWoItemIndex}].loans[${activeItemIndex}].rate`"
|
||||
data-cy="loanUnitRateUnit"
|
||||
:rules="[
|
||||
form().integerValid(
|
||||
this,
|
||||
`Items[${activeWoItemIndex}].loans[${activeItemIndex}].rate`
|
||||
)
|
||||
]"
|
||||
:error-messages="
|
||||
form().serverErrors(
|
||||
this,
|
||||
@@ -511,9 +511,10 @@ export default {
|
||||
userId: null,
|
||||
description: null,
|
||||
serials: null,
|
||||
loanId: null,
|
||||
loanUnitId: 0, //zero to break rule on new
|
||||
loanWarehouseId: null,
|
||||
quantity: 1,
|
||||
rate: 0,
|
||||
taxCodeId: null,
|
||||
price: 0,
|
||||
priceOverride: null,
|
||||
@@ -526,6 +527,15 @@ export default {
|
||||
this.$emit("change");
|
||||
this.selectedRow = [{ index: newIndex }];
|
||||
this.activeItemIndex = newIndex;
|
||||
//trigger rule breaking / validation
|
||||
this.$nextTick(() => {
|
||||
this.value.items[this.activeWoItemIndex].loans[
|
||||
this.activeItemIndex
|
||||
].loanUnitId = null;
|
||||
this.fieldValueChanged(
|
||||
`Items[${this.activeWoItemIndex}].loans[${this.activeItemIndex}].loanUnitId`
|
||||
);
|
||||
});
|
||||
},
|
||||
unDeleteItem() {
|
||||
this.value.items[this.activeWoItemIndex].loans[
|
||||
|
||||
@@ -92,6 +92,12 @@
|
||||
`Items[${activeWoItemIndex}].outsideServices[${activeItemIndex}].unitId`
|
||||
"
|
||||
data-cy="outsideServices.unitId"
|
||||
:rules="[
|
||||
form().required(
|
||||
this,
|
||||
`Items[${activeWoItemIndex}].outsideServices[${activeItemIndex}].unitId`
|
||||
)
|
||||
]"
|
||||
:error-messages="
|
||||
form().serverErrors(
|
||||
this,
|
||||
@@ -656,7 +662,7 @@ export default {
|
||||
this.value.items[this.activeWoItemIndex].outsideServices.push({
|
||||
id: 0,
|
||||
concurrency: 0,
|
||||
unitId: null,
|
||||
unitId: 0,
|
||||
notes: null,
|
||||
vendorSentToId: null,
|
||||
vendorSentViaId: null,
|
||||
|
||||
@@ -280,7 +280,7 @@ export default {
|
||||
customFields: "{}",
|
||||
tags: [],
|
||||
userId: null,
|
||||
unitId: 0,//zero to break rule on new
|
||||
unitId: 0, //zero to break rule on new
|
||||
estimatedQuantity: 0,
|
||||
startDate: null,
|
||||
stopDate: null,
|
||||
|
||||
Reference in New Issue
Block a user