This commit is contained in:
@@ -46,20 +46,16 @@ https://blog.anoff.io/2019-10-migrating-vuetify-1-to-2/
|
|||||||
=============== UPGRADING NOTES =================
|
=============== UPGRADING NOTES =================
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
** NOTE: can start dev server, go to *it's* client to see a working older version of ayanova client for comparision!
|
** 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:7575/login
|
||||||
http://localhost:8080/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!
|
|
||||||
=================================================
|
=================================================
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -40,65 +40,30 @@ TODO:
|
|||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
//Valid values for notify type are: success, info, warning, and error
|
||||||
|
|
||||||
///////////
|
///////////
|
||||||
//ERROR
|
//ERROR
|
||||||
window.$gz.eventBus.$on("notify-error", function handleNotifyWarn(msg) {
|
window.$gz.eventBus.$on("notify-error", function handleNotifyWarn(msg) {
|
||||||
vm.$dialog.notify.info(msg, {
|
vm.$root.$gznotify(msg, { type: "error", timeout: 7000 });
|
||||||
position: "bottom-right",
|
|
||||||
icon: "fa-exclamation-triangle",
|
|
||||||
timeout: 8000
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
|
||||||
///////////
|
///////////
|
||||||
//WARNING
|
//WARNING
|
||||||
window.$gz.eventBus.$on("notify-warning", function handleNotifyWarn(msg) {
|
window.$gz.eventBus.$on("notify-warning", function handleNotifyWarn(msg) {
|
||||||
vm.$dialog.notify.warning(msg, {
|
vm.$root.$gznotify(msg, { type: "warning", timeout: 7000 });
|
||||||
position: "bottom-right",
|
|
||||||
icon: "fa-exclamation",
|
|
||||||
timeout: 7000
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
|
||||||
///////////
|
///////////
|
||||||
//INFO
|
//INFO
|
||||||
window.$gz.eventBus.$on("notify-info", function handleNotifyWarn(msg) {
|
window.$gz.eventBus.$on("notify-info", function handleNotifyWarn(msg) {
|
||||||
// // eslint-disable-next-line no-debugger
|
vm.$root.$gznotify(msg, { type: "info", timeout: 5000 });
|
||||||
// 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
|
|
||||||
// }
|
|
||||||
// ]
|
|
||||||
// });
|
|
||||||
});
|
});
|
||||||
|
|
||||||
///////////
|
///////////
|
||||||
//SUCCESS
|
//SUCCESS
|
||||||
window.$gz.eventBus.$on("notify-success", function handleNotifyWarn(msg) {
|
window.$gz.eventBus.$on("notify-success", function handleNotifyWarn(msg) {
|
||||||
vm.$dialog.notify.success(msg, {
|
vm.$root.$gznotify(msg, { type: "info", timeout: 3000 });
|
||||||
position: "bottom-right",
|
|
||||||
icon: "fa-check-circle ",
|
|
||||||
timeout: 3000
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
/////////////////////////////////////
|
/////////////////////////////////////
|
||||||
|
|||||||
@@ -144,7 +144,7 @@ export default function initialize() {
|
|||||||
if (res.data.timeZoneOffset != localOffset) {
|
if (res.data.timeZoneOffset != localOffset) {
|
||||||
//TODO: localize message and also actually have a fix for it here
|
//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
|
//so this should be a confirm prompt but for now will just show it
|
||||||
|
|
||||||
//for now just show the message
|
//for now just show the message
|
||||||
window.$gz.eventBus.$emit(
|
window.$gz.eventBus.$emit(
|
||||||
"notify-info",
|
"notify-info",
|
||||||
@@ -154,6 +154,19 @@ export default function initialize() {
|
|||||||
localOffset +
|
localOffset +
|
||||||
". You might want to adjust that under user settings"
|
". 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
|
//Store offset in locale data
|
||||||
|
|||||||
@@ -1,44 +1,13 @@
|
|||||||
<template>
|
<template>
|
||||||
<!-- <v-dialog
|
|
||||||
v-model="dialog"
|
|
||||||
:max-width="options.width"
|
|
||||||
:style="{ zIndex: options.zIndex }"
|
|
||||||
@keydown.esc="cancel"
|
|
||||||
>
|
|
||||||
<v-card>
|
|
||||||
<v-toolbar dark :color="options.color" dense flat>
|
|
||||||
<v-toolbar-title class="white--text">{{ title }}</v-toolbar-title>
|
|
||||||
</v-toolbar>
|
|
||||||
<v-card-text v-show="!!message" class="pa-4">{{ message }}</v-card-text>
|
|
||||||
<v-card-actions class="pt-0">
|
|
||||||
<v-spacer></v-spacer>
|
|
||||||
<v-btn color="primary darken-1" text @click.native="agree">Yes</v-btn>
|
|
||||||
<v-btn color="grey" text @click.native="cancel">Cancel</v-btn>
|
|
||||||
</v-card-actions>
|
|
||||||
</v-card>
|
|
||||||
</v-dialog> -->
|
|
||||||
<!-- <v-snackbar
|
|
||||||
:color="options.color"
|
|
||||||
:value="snackbar"
|
|
||||||
:timeout="options.timeout"
|
|
||||||
>
|
|
||||||
<v-icon color="white">fa-info-circle</v-icon>
|
|
||||||
<div>
|
|
||||||
{{ message }}
|
|
||||||
</div>
|
|
||||||
<v-btn icon @click="snackbar = false">
|
|
||||||
<v-icon color="white">fa-times-circle</v-icon>
|
|
||||||
</v-btn>
|
|
||||||
</v-snackbar> -->
|
|
||||||
<v-snackbar
|
<v-snackbar
|
||||||
:value="snackbar"
|
:value="isVisible"
|
||||||
:color="options.color"
|
:color="options.type"
|
||||||
:timeout="options.timeout"
|
:timeout="options.timeout"
|
||||||
>
|
>
|
||||||
<v-alert type="info">
|
<v-alert :type="options.type">
|
||||||
{{ message }}
|
{{ message }}
|
||||||
</v-alert>
|
</v-alert>
|
||||||
<v-btn icon @click="snackbar = false">
|
<v-btn icon @click="isVisible = false">
|
||||||
<v-icon color="white">fa-times-circle</v-icon>
|
<v-icon color="white">fa-times-circle</v-icon>
|
||||||
</v-btn>
|
</v-btn>
|
||||||
</v-snackbar>
|
</v-snackbar>
|
||||||
@@ -47,17 +16,17 @@
|
|||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
data: () => ({
|
data: () => ({
|
||||||
snackbar: false,
|
isVisible: false,
|
||||||
|
|
||||||
message: null,
|
message: null,
|
||||||
options: {
|
options: {
|
||||||
color: "primary",
|
type: "info", //one of success, info, warning, and error, see v-alert docs for more info
|
||||||
timeout: 3000
|
timeout: 3000
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
methods: {
|
methods: {
|
||||||
open(message, options) {
|
open(message, options) {
|
||||||
this.snackbar = true;
|
this.isVisible = true;
|
||||||
this.message = message;
|
this.message = message;
|
||||||
this.options = Object.assign(this.options, options);
|
this.options = Object.assign(this.options, options);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user