From 78326a5b2af0fb3becdd585371160e8856ecdc8e Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Mon, 7 Jun 2021 23:07:04 +0000 Subject: [PATCH] --- ayanova/devdocs/todo.txt | 4 ++ .../src/views/home-notify-subscription.vue | 52 +++++++++++++++++-- 2 files changed, 53 insertions(+), 3 deletions(-) diff --git a/ayanova/devdocs/todo.txt b/ayanova/devdocs/todo.txt index 2e4bc462..e7af6ea0 100644 --- a/ayanova/devdocs/todo.txt +++ b/ayanova/devdocs/todo.txt @@ -372,10 +372,14 @@ CURRENTLY DOING: workorder round two electric boogaloo basics first then increasingly esoteric features Testing: + Be sure to test with multiple subscribers and also inactive subscribers to ensure it does what it says on the box status changed to specific status immediate notification complete by overdue - make sure that contract sets complete by date properly and that it works with notification when it's changed + status age, stuck in status +todo: notify event list table needs to show status of workorder (all fields) ideally + otherwise if you have multiple wostatusage notifications they all appear the same todo 3: notification Go through all notification types and pick out relevant ones, paste here in a list then implement one by one and test each diff --git a/ayanova/src/views/home-notify-subscription.vue b/ayanova/src/views/home-notify-subscription.vue index 16656ce6..95ac583d 100644 --- a/ayanova/src/views/home-notify-subscription.vue +++ b/ayanova/src/views/home-notify-subscription.vue @@ -22,7 +22,43 @@ > - todo: idValue here for wostatus + + + todo: idValue here for quotestatus @@ -201,6 +237,7 @@ export default { data() { return { selectLists: { + wostatus: [], eventTypes: [], deliveryMethods: [], coreAyaTypes: [] @@ -703,7 +740,8 @@ async function fetchTranslatedText(vm) { "NotifyDeliveryAddress", "tags", "Duration", - "TaggedWith" + "TaggedWith", + "WorkOrderStatus" ]); } @@ -713,7 +751,7 @@ async function fetchTranslatedText(vm) { async function populateSelectionLists(vm) { //ensure the pick lists required are pre-fetched await window.$gz.enums.fetchEnumList("NotifyEventType"); - let tempEventTypes = window.$gz.enums.getSelectionList("NotifyEventType"); + const tempEventTypes = window.$gz.enums.getSelectionList("NotifyEventType"); if (window.$gz.store.getters.isOutsideUser) { vm.selectLists.eventTypes = tempEventTypes.filter( z => z.id == 6 || z.id == 7 || z.id == 21 || z.id == 30 || z.id == 31 @@ -731,5 +769,13 @@ async function populateSelectionLists(vm) { await window.$gz.enums.fetchEnumList("coreview"); vm.selectLists.coreAyaTypes = window.$gz.enums.getSelectionList("coreview"); + + const res = await window.$gz.api.get("work-order-status/list"); + if (res.error) { + vm.formState.serverError = res.error; + window.$gz.form.setErrorBoxErrors(vm); + } else { + vm.selectLists.wostatus = res.data.all; + } }