From 68768a47c63a28ceb7755543e45e44790420aab7 Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Wed, 16 Jun 2021 23:02:02 +0000 Subject: [PATCH] --- ayanova/devdocs/todo.txt | 3 ++ .../src/components/work-order-item-units.vue | 15 ++++++- ayanova/src/components/work-order-items.vue | 41 +++++++++++++++---- ayanova/src/views/home-notifications.vue | 15 ++++--- 4 files changed, 58 insertions(+), 16 deletions(-) diff --git a/ayanova/devdocs/todo.txt b/ayanova/devdocs/todo.txt index ea775722..de3f8736 100644 --- a/ayanova/devdocs/todo.txt +++ b/ayanova/devdocs/todo.txt @@ -392,6 +392,9 @@ TODO: Hiding sections not used when empty and now added from the menu to present add from fab floating action button when new? something that stays so users can use either way so no confusion about shifting UI elements that disappear +bugbug: service completed (closed status) workorder goes gray initially but when go out and back in it's editable again WTF?? + Seems to have just happened + todo: check Joyce's cases --------- TEST RELEASE HERE --------------- diff --git a/ayanova/src/components/work-order-item-units.vue b/ayanova/src/components/work-order-item-units.vue index f9f87aa6..edd26a8b 100644 --- a/ayanova/src/components/work-order-item-units.vue +++ b/ayanova/src/components/work-order-item-units.vue @@ -243,6 +243,10 @@ export default { gotoIndex: { default: null, type: Number + }, + addNew: { + default: null, + type: Number } }, watch: { @@ -253,8 +257,13 @@ export default { }, gotoIndex(val, oldVal) { if (val != oldVal) { - this.selectedRow = [{ index: val }]; - this.activeItemIndex = val; + let gotoIndex = val; + if (val < 0) { + //it's a create request + gotoIndex = this.newItem(); + } + this.selectedRow = [{ index: gotoIndex }]; + this.activeItemIndex = gotoIndex; this.$nextTick(() => { const el = this.$refs.unittopform; if (el) { @@ -301,6 +310,8 @@ export default { `Items[${this.activeWoItemIndex}].units[${this.activeItemIndex}].unitId` ); }); + + return newIndex; //for create new on goto }, unDeleteItem() { this.value.items[this.activeWoItemIndex].units[ diff --git a/ayanova/src/components/work-order-items.vue b/ayanova/src/components/work-order-items.vue index f048a2c7..aebfa161 100644 --- a/ayanova/src/components/work-order-items.vue +++ b/ayanova/src/components/work-order-items.vue @@ -11,7 +11,7 @@ > {{ $ay.t("WorkOrderItemList") }} - $ayiEllipsisV + $ayiEllipsisV @@ -35,6 +35,20 @@ {{ $ay.t("Undelete") }} + + @@ -362,13 +376,7 @@ GRANDCHILDREN ############################################################################ --> - + 0 + ); } } }; diff --git a/ayanova/src/views/home-notifications.vue b/ayanova/src/views/home-notifications.vue index 6bff0cc8..7e77f2d2 100644 --- a/ayanova/src/views/home-notifications.vue +++ b/ayanova/src/views/home-notifications.vue @@ -301,12 +301,15 @@ function generateMenu(vm) { vm: vm }); - menuOptions.menuItems.push({ - title: "DirectNotification", - icon: "$ayiCommentAlt", - data: "home-notify-direct", - key: "app:nav" - }); + if (!window.$gz.store.state.isCustomerUser) { + menuOptions.menuItems.push({ + title: "DirectNotification", + icon: "$ayiCommentAlt", + data: "home-notify-direct", + key: "app:nav" + }); + } + window.$gz.eventBus.$emit("menu-change", menuOptions); } /////////////////////////////////