diff --git a/ayanova/devdocs/todo.txt b/ayanova/devdocs/todo.txt index 66904ac6..bc4fe0fa 100644 --- a/ayanova/devdocs/todo.txt +++ b/ayanova/devdocs/todo.txt @@ -46,20 +46,16 @@ https://blog.anoff.io/2019-10-migrating-vuetify-1-to-2/ =============== UPGRADING NOTES ================= - ** NOTE: can start dev server, go to *it's* client to see a working older version of ayanova client for comparision! http://localhost:7575/login http://localhost:8080/login +CURRENT WORK: Replace dialog, confirm etc with my own implementations as stock as possible -Grid not taking 25, 99 etc, stuck at 5 initial value for rows per page and that's what fetches off the server as well +- Currently gznotify component is working but needs to support a queue and show each one after the other times out as per specs that say only one snackbar / toast at a time + - more info here and some code people made to do this https://github.com/vuetifyjs/vuetify/issues/2384 - -Vuetify dialog changes - https://github.com/yariksav/vuetify-dialog/issues/46 - -DIALOG - Rethinking the dialog component I'm using, it appears to be buggy with the new vuetify version and it's a 3rd party black box of confusion at times. Vuetify has a built in dialog, not as specialized and windows-y (alert, danger, info etc) but it could be made to work and then I'm not reliant on one more thing -OTHER 3rd PARTY - examine any other 3rd party client stuff being used and see if can replace it with anything in Vuetify or Vue itself, less dependencies the better! ================================================= diff --git a/ayanova/src/api/gzdialog.js b/ayanova/src/api/gzdialog.js index b13a7633..7f269de1 100644 --- a/ayanova/src/api/gzdialog.js +++ b/ayanova/src/api/gzdialog.js @@ -40,65 +40,30 @@ TODO: */ + //Valid values for notify type are: success, info, warning, and error + /////////// //ERROR window.$gz.eventBus.$on("notify-error", function handleNotifyWarn(msg) { - vm.$dialog.notify.info(msg, { - position: "bottom-right", - icon: "fa-exclamation-triangle", - timeout: 8000 - }); + vm.$root.$gznotify(msg, { type: "error", timeout: 7000 }); }); /////////// //WARNING window.$gz.eventBus.$on("notify-warning", function handleNotifyWarn(msg) { - vm.$dialog.notify.warning(msg, { - position: "bottom-right", - icon: "fa-exclamation", - timeout: 7000 - }); + vm.$root.$gznotify(msg, { type: "warning", timeout: 7000 }); }); /////////// //INFO window.$gz.eventBus.$on("notify-info", function handleNotifyWarn(msg) { - // // eslint-disable-next-line no-debugger - // debugger; - // eslint-disable-next-line no-console - //console.log(msg); - vm.$root.$gznotify(msg, { color: "info", timeout: 10000 }); - // if (vm.$root.$gznoitfy(msg, "Are you sure?", { color: "red" })) { - // alert("YES"); - // } else { - // alert("CANCEL"); - // } - // vm.$dialog.notify.info(msg, { - // position: "bottom-right", - // icon: "fa-info-circle", - // timeout: 3000, - // actions: [ - // { - // text: window.$gz.locale.get("Cancel"), - // key: false - // }, - // { - // text: window.$gz.locale.get("Delete"), - // color: "red", - // key: true - // } - // ] - // }); + vm.$root.$gznotify(msg, { type: "info", timeout: 5000 }); }); /////////// //SUCCESS window.$gz.eventBus.$on("notify-success", function handleNotifyWarn(msg) { - vm.$dialog.notify.success(msg, { - position: "bottom-right", - icon: "fa-check-circle ", - timeout: 3000 - }); + vm.$root.$gznotify(msg, { type: "info", timeout: 3000 }); }); }, ///////////////////////////////////// diff --git a/ayanova/src/api/initialize.js b/ayanova/src/api/initialize.js index 7e2dbc29..055ef497 100644 --- a/ayanova/src/api/initialize.js +++ b/ayanova/src/api/initialize.js @@ -144,7 +144,7 @@ export default function initialize() { if (res.data.timeZoneOffset != localOffset) { //TODO: localize message and also actually have a fix for it here //so this should be a confirm prompt but for now will just show it - + //for now just show the message window.$gz.eventBus.$emit( "notify-info", @@ -154,6 +154,19 @@ export default function initialize() { localOffset + ". You might want to adjust that under user settings" ); + + window.$gz.eventBus.$emit( + "notify-warning", + "this is a warning test" + ); + window.$gz.eventBus.$emit( + "notify-error", + "this is an error test" + ); + window.$gz.eventBus.$emit( + "notify-success", + "this is a success test" + ); } //Store offset in locale data diff --git a/ayanova/src/components/gznotify.vue b/ayanova/src/components/gznotify.vue index 9d669234..2978445c 100644 --- a/ayanova/src/components/gznotify.vue +++ b/ayanova/src/components/gznotify.vue @@ -1,44 +1,13 @@