From d8fd6d96cf8d7234c171998d59d945afba4841a7 Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Tue, 1 Jun 2021 22:48:54 +0000 Subject: [PATCH] --- .../work-order-item-scheduled-users.vue | 32 ++++++++++++++++--- 1 file changed, 28 insertions(+), 4 deletions(-) diff --git a/ayanova/src/components/work-order-item-scheduled-users.vue b/ayanova/src/components/work-order-item-scheduled-users.vue index b4f17a14..5121adf8 100644 --- a/ayanova/src/components/work-order-item-scheduled-users.vue +++ b/ayanova/src/components/work-order-item-scheduled-users.vue @@ -391,12 +391,36 @@ export default { ].isDirty = true; window.$gz.form.fieldValueChanged(this.pvm, ref); - // //set viz if applicable - // if(ref==""){ - // let selectedPartWarehouse = vm.$refs.partWarehouseId.getFullSelectionValue(); - // } + //Auto calculate dates / quantities / global defaults + if (ref.includes("startDate")) { + this.handleStartDateChange(); + } + if (ref.includes("stopDate")) { + this.handleStopDateChange(); + } + if (ref.includes("estimatedQuantity")) { + this.handleEstimatedQuantityChange(); + } } }, + handleStartDateChange: function() { + let val = this.value.items[this.activeWoItemIndex].scheduledUsers[ + this.activeItemIndex + ].startDate; + console.log("Start date value is now", val); + }, + handleStopDateChange: function() { + let val = this.value.items[this.activeWoItemIndex].scheduledUsers[ + this.activeItemIndex + ].stopDate; + console.log("Stop date value is now", val); + }, + handleEstimatedQuantityChange: function() { + let val = this.value.items[this.activeWoItemIndex].scheduledUsers[ + this.activeItemIndex + ].estimatedQuantity; + console.log("Estimated Quantity is now", val); + }, itemRowClasses: function(item) { let ret = ""; const isDeleted =