diff --git a/ayanova/devdocs/todo.txt b/ayanova/devdocs/todo.txt index 6d39837f..8c6cc203 100644 --- a/ayanova/devdocs/todo.txt +++ b/ayanova/devdocs/todo.txt @@ -385,6 +385,7 @@ todo: many biz objects are not using new PUT methodology CURRENTLY DOING: Work order notifications - PartRequested +bugbug: new wokrorder adding new item of any kind doesn't trigger dirty bugubg: completely fresh workorder riddled with errors when attempting to create one of each type of record expense -> tax code is required in sql but not in UI WTF? @@ -1303,6 +1304,9 @@ build 110 ScheduledOnWorkorder ScheduledOnWorkorderImminent WorkorderCompletedStatusOverdue + +- standard object CRUD notifications implemented for all workorder tree objects + (note that child items in workorder tree that don't have their own tags [all but items and workorder item units] will use the work order header tags for determining notification) - Removed all visible references to Service Bank feature from all forms and front and back end diff --git a/ayanova/src/api/gzform.js b/ayanova/src/api/gzform.js index 5974e357..d22adee6 100644 --- a/ayanova/src/api/gzform.js +++ b/ayanova/src/api/gzform.js @@ -47,17 +47,9 @@ function isNumber(n) { // Get control from ref // function getControl(vm, ref) { + //NOTE: Due to automatic code formatting some refs will come here with newlines in them resulting in no matches + ref = ref.replace(/\s/g, ""); let ctrl = vm.$refs[ref]; - - //I don't think this is required anymore - // if (ctrl === undefined) { - // //it's either a sub field in custom fields component or it's a coding error - // let customFields = vm.$refs["customFields"]; - // if (customFields !== undefined) { - // ctrl = customFields.$refs[ref]; - // } - // } - return ctrl; } @@ -807,6 +799,8 @@ export default { if (formReference == undefined) { formControl = vm.$refs.form; } else { + //NOTE: Due to automatic code formatting some refs will come here with newlines in them resulting in no matches + formReference = formReference.replace(/\s/g, ""); formControl = vm.$refs[formReference]; } @@ -1006,6 +1000,8 @@ export default { // Get validity of referenced control // controlIsValid(vm, ref) { + //NOTE: Due to automatic code formatting some refs will come here with newlines in them resulting in no matches + ref = ref.replace(/\s/g, ""); if (vm.$refs[ref]) { return vm.$refs[ref].valid; } diff --git a/ayanova/src/components/work-order-item-units.vue b/ayanova/src/components/work-order-item-units.vue index 91c84e00..15bec40a 100644 --- a/ayanova/src/components/work-order-item-units.vue +++ b/ayanova/src/components/work-order-item-units.vue @@ -90,6 +90,14 @@ `Items[${activeWoItemIndex}].units[${activeItemIndex}].unitId` " data-cy="units.unitId" + :rules="[ + form().required( + this, + `Items[${activeWoItemIndex}].units[ + ${activeItemIndex} + ].unitId` + ) + ]" :error-messages=" form().serverErrors( this, diff --git a/ayanova/src/components/work-order-items.vue b/ayanova/src/components/work-order-items.vue index d7abb8e7..d8507704 100644 --- a/ayanova/src/components/work-order-items.vue +++ b/ayanova/src/components/work-order-items.vue @@ -789,6 +789,8 @@ export default { this.$emit("change"); this.selectedRow = [{ index: newIndex }]; this.activeItemIndex = newIndex; + //trigger rule breaking / validation + this.fieldValueChanged(`items[${this.activeItemIndex}].notes`); }, unDeleteItem() { this.value.items[this.activeItemIndex].deleted = false; diff --git a/ayanova/src/views/svc-workorder.vue b/ayanova/src/views/svc-workorder.vue index 83f9fe93..eb3a70e9 100644 --- a/ayanova/src/views/svc-workorder.vue +++ b/ayanova/src/views/svc-workorder.vue @@ -14,6 +14,7 @@ data-cy="woHeader" @change="setDirty()" /> + {{ formState }}