From 66ec595b7d81709224bb2c4594e4bf031f596573 Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Thu, 6 Aug 2020 18:06:23 +0000 Subject: [PATCH] --- ayanova/devdocs/todo.txt | 9 +-------- ayanova/src/api/open-object-handler.js | 27 +++++++++++++++++++++++++- 2 files changed, 27 insertions(+), 9 deletions(-) diff --git a/ayanova/devdocs/todo.txt b/ayanova/devdocs/todo.txt index 1295df55..1a3039da 100644 --- a/ayanova/devdocs/todo.txt +++ b/ayanova/devdocs/todo.txt @@ -3,14 +3,7 @@ PRIORITY - ALWAYS Lowest level stuff first, i.e. TODO at server, api route changes etc then back here in order lowest level first as affects the most stuff exponentially so best to do it early =-=-=-=- - - -todo: notifications, is there one for the customer to know service is completed like in v7? If not should be made into it's own event type and then update the code in home-notify-subscription customer version - as well as all other places where applicable. - Ideally Notify subscriptions that are intended for customers should be their own thing, not shared with regular User type subs - WAS workorder closed regional client notification in v7 - now would need to be notification when set to particular status or more likely when set to any "Closed" type of workorder status - +javascript: todo: open-object-handler.js deal with some utility types: //TODO: FORMCUSTOMIZATION //TODO: LIST VIEW diff --git a/ayanova/src/api/open-object-handler.js b/ayanova/src/api/open-object-handler.js index 2eaecf36..3ce62661 100644 --- a/ayanova/src/api/open-object-handler.js +++ b/ayanova/src/api/open-object-handler.js @@ -95,10 +95,35 @@ export default { }); break; + case ayatype.FormCustom: + //all we have is the id, but need the formkey to open it + (async () => { + try { + let res = await window.$gz.api.get( + "form-custom/form-key/" + tid.id + ); + + if (res.error) { + throw res.error; + } + if (res && res.data) { + vm.$router.push({ + name: "ay-customize", + params: { formCustomTemplateKey: res.data } + }); + return; + } + } catch (e) { + throw e; + } + })(); + + break; + default: window.$gz.eventBus.$emit( "notify-warning", - "open-object-handler: unrecognized type [" + tid.type + "]" + `open-object-handler: unknown [${tid.type},${tid.id}]` ); } }