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 =