From 55b14081f784e7ddeca1f26ded89bc38c950bbd4 Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Mon, 13 Apr 2020 18:29:26 +0000 Subject: [PATCH] --- ayanova/devdocs/todo.txt | 4 ++++ ayanova/src/views/ay-history.vue | 31 +++++++++++++++++++++++-------- 2 files changed, 27 insertions(+), 8 deletions(-) diff --git a/ayanova/devdocs/todo.txt b/ayanova/devdocs/todo.txt index 2d506008..f365a5e9 100644 --- a/ayanova/devdocs/todo.txt +++ b/ayanova/devdocs/todo.txt @@ -61,6 +61,10 @@ todo: RECORD HISTORY (HAS OUTSTANDING ITEMS) - make a todo entry in the report section below to include the ability of feeding reports from local data in addition to off the server - Does it benefit from caching? (not really thinking so as this is a different animal than search but something to ponder a bit) + +todo: Start the update mail now after history is done + + todo: can page titles be improved so in task bar can see what is being worked with in that browser window diff --git a/ayanova/src/views/ay-history.vue b/ayanova/src/views/ay-history.vue index 9c30b340..6e48694e 100644 --- a/ayanova/src/views/ay-history.vue +++ b/ayanova/src/views/ay-history.vue @@ -145,16 +145,31 @@ export default { }, methods: { openItem(item) { - window.$gz.eventBus.$emit("openobject", { - type: item.objectType, - id: item.objectId - }); + if (item.userId) { + window.$gz.eventBus.$emit("openobject", { + type: window.$gz.type.User, + id: item.userId + }); + } else { + window.$gz.eventBus.$emit("openobject", { + type: item.objectType, + id: item.objectId + }); + } }, openHistoryOfItem(item) { - this.$router.push({ - name: "ay-history", - params: { ayatype: item.objectType, recordid: item.objectId } - }); + if (item.userId) { + //object log, so open is for user + this.$router.push({ + name: "ay-history", + params: { ayatype: window.$gz.type.User, recordid: item.userId } + }); + } else { + this.$router.push({ + name: "ay-history", + params: { ayatype: item.objectType, recordid: item.objectId } + }); + } }, canViewUserHistory(objectlogitem) { //For object log to decide if view history of user in item is allowed