From c18f874aaef35958e0c70206df5624f3c210520e Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Fri, 11 Jun 2021 20:14:17 +0000 Subject: [PATCH] --- .../src/components/work-order-item-units.vue | 39 +++++++++++++++++-- 1 file changed, 36 insertions(+), 3 deletions(-) diff --git a/ayanova/src/components/work-order-item-units.vue b/ayanova/src/components/work-order-item-units.vue index a26251ed..1cb0675b 100644 --- a/ayanova/src/components/work-order-item-units.vue +++ b/ayanova/src/components/work-order-item-units.vue @@ -298,6 +298,7 @@ export default { customFields: "{}", tags: [], userId: null, + unitId: 0, estimatedQuantity: 0, startDate: null, stopDate: null, @@ -309,10 +310,42 @@ export default { this.$emit("change"); this.selectedRow = [{ index: newIndex }]; this.activeItemIndex = newIndex; + this.$nextTick(() => { + // console.log( + // "CONTROL:", + // this.$refs[ + // `Items[${this.activeWoItemIndex}].units[${this.activeItemIndex}].unitId` + // ] + // ); + this.value.items[this.activeWoItemIndex].units[ + this.activeItemIndex + ].unitId = null; + this.fieldValueChanged( + `Items[${this.activeWoItemIndex}].units[${this.activeItemIndex}].unitId` + ); + }); + + // //trigger rule breaking / validation - this.fieldValueChanged( - `Items[${this.activeWoItemIndex}].units[${this.activeItemIndex}].unitId` - ); + // this.value.items[this.activeWoItemIndex].units[ + // this.activeItemIndex + // ].unitId = 0; + // this.fieldValueChanged( + // `Items[${this.activeWoItemIndex}].units[${this.activeItemIndex}].unitId` + // ); + // this.value.items[this.activeWoItemIndex].units[ + // this.activeItemIndex + // ].unitId = null; + // this.fieldValueChanged( + // `Items[${this.activeWoItemIndex}].units[${this.activeItemIndex}].unitId` + // ); + // this.fieldValueChanged( + // `Items[${this.activeWoItemIndex}].units[${this.activeItemIndex}].unitId` + // ); + // this.fieldValueChanged( + // `Items[${this.activeWoItemIndex}].units[${this.activeItemIndex}].notes` + // ); + // }); }, unDeleteItem() { this.value.items[this.activeWoItemIndex].units[