From e3fe14acc94cc3e13b56fad2b4765a1da97507f3 Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Tue, 7 Jul 2020 23:43:18 +0000 Subject: [PATCH] --- ayanova/devdocs/todo.txt | 9 ++++++++ ayanova/src/App.vue | 17 +++++++++++--- ayanova/src/router.js | 8 +++++++ ayanova/src/views/home-notifications.vue | 29 ++++++++++++++++++++++++ 4 files changed, 60 insertions(+), 3 deletions(-) create mode 100644 ayanova/src/views/home-notifications.vue diff --git a/ayanova/devdocs/todo.txt b/ayanova/devdocs/todo.txt index 6c660db3..aa8bafe4 100644 --- a/ayanova/devdocs/todo.txt +++ b/ayanova/devdocs/todo.txt @@ -13,6 +13,15 @@ todo: notification https://github.com/vuetifyjs/vuetify/blob/3513d76774ce4ed02c34220ba6389fa0f42467c1/packages/docs/src/components/app/Notifications.vue + +todo: Test server down while polling in release mode, does it recover when server starts again or...? + + + + + + + todo: PickLists based on AyaPickList at server, need one for each type, so far have widget and user only Not sure if should just make them all or...?? Maybe when I hit a form that uses it, that's when I really need it? diff --git a/ayanova/src/App.vue b/ayanova/src/App.vue index f47aa843..85dcd50d 100644 --- a/ayanova/src/App.vue +++ b/ayanova/src/App.vue @@ -149,9 +149,13 @@ {{ $ay.t(appBar.title) }} - - - + + @@ -259,6 +263,7 @@ import ayaNovaVersion from "./api/ayanova-version"; import gzconfirm from "./components/gzconfirm"; import gznotify from "./components/gznotify"; import openObjectHandler from "./api/open-object-handler"; +import notifyPoll from "./api/notifypoll"; export default { components: { @@ -346,6 +351,12 @@ export default { window.$gz.eventBus.$emit("openobject", null); } + //RELOAD / REFRESH HANDLING + //Restart notification polling due to refresh? + if (window.$gz.store.state.authenticated) { + notifyPoll.startPolling(); + } + //FUTURE: If need to detect a reload, this works reliably //OK if here then is this a reliable way to detect a reload or refresh or re-open of the app from a closed window but still authenticated? //console.log("APP.VUE::Mounted=>RELOAD DETECTED?"); diff --git a/ayanova/src/router.js b/ayanova/src/router.js index c72a136b..ee7cfe2d 100644 --- a/ayanova/src/router.js +++ b/ayanova/src/router.js @@ -97,6 +97,14 @@ export default new Router({ component: () => import(/* webpackChunkName: "ay-common" */ "./views/home-memos.vue") }, + { + path: "/home-notifications", + name: "home-notifications", + component: () => + import( + /* webpackChunkName: "ay-common" */ "./views/home-notifications.vue" + ) + }, { path: "/home-reminders", name: "home-reminders", diff --git a/ayanova/src/views/home-notifications.vue b/ayanova/src/views/home-notifications.vue new file mode 100644 index 00000000..8bf5ca73 --- /dev/null +++ b/ayanova/src/views/home-notifications.vue @@ -0,0 +1,29 @@ + + +