This commit is contained in:
@@ -53,9 +53,8 @@ export default {
|
||||
});
|
||||
});
|
||||
},
|
||||
|
||||
////////////////////////////
|
||||
//
|
||||
/////////////////////////////////////
|
||||
// Are you sure you want to delete?
|
||||
//
|
||||
confirmDelete(vm) {
|
||||
//https://github.com/yariksav/vuetify-dialog#readme
|
||||
@@ -75,6 +74,26 @@ export default {
|
||||
}
|
||||
]
|
||||
});
|
||||
}, /////////////////////////////////////
|
||||
// Are you sure you want to delete?
|
||||
//
|
||||
confirmLeaveUnsaved(vm) {
|
||||
return vm.$dialog.warning({
|
||||
text: vm.$gzlocale.get("AreYouSureUnsavedChanges"),
|
||||
title: vm.$gzlocale.get("Leave"),
|
||||
icon: "fa-exclamation-triangle",
|
||||
actions: [
|
||||
{
|
||||
text: vm.$gzlocale.get("Cancel"),
|
||||
key: false
|
||||
},
|
||||
{
|
||||
text: vm.$gzlocale.get("Leave"),
|
||||
color: "red",
|
||||
key: true
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
//new functions above here
|
||||
};
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* Xeslint-disable */
|
||||
import { processLogout } from "./authutil";
|
||||
//import { processLogout } from "./authutil";
|
||||
|
||||
/////////////////////////////////
|
||||
// Menu utils and handlers
|
||||
@@ -123,8 +123,20 @@ export default {
|
||||
window.open(helpurl, "_blank");
|
||||
break;
|
||||
case "logout":
|
||||
processLogout();
|
||||
vm.$router.push({ name: "login" });
|
||||
// if (vm.formState && vm.formState.dirty) {
|
||||
// vm.$gzdialog.confirmLeaveUnsaved(vm).then(dialogResult => {
|
||||
// if (dialogResult == true) {
|
||||
// processLogout();
|
||||
// vm.$router.push({ name: "login" });
|
||||
// } else {
|
||||
// return;
|
||||
// }
|
||||
// });
|
||||
// } else {
|
||||
// processLogout();
|
||||
// vm.$router.push({ name: "login" });
|
||||
// }
|
||||
break;
|
||||
case "nav":
|
||||
vm.$router.push({ name: item.data });
|
||||
|
||||
@@ -92,7 +92,9 @@ export default {
|
||||
"ErrorServerUnresponsive",
|
||||
"ErrorUserNotAuthenticated",
|
||||
"ErrorUserNotAuthorized",
|
||||
"DeletePrompt"
|
||||
"DeletePrompt",
|
||||
"AreYouSureUnsavedChanges",
|
||||
"Leave"
|
||||
],
|
||||
decimalValidate(required) {
|
||||
return { required: required, decimal: [2, this.formats.decimalSeparator] };
|
||||
|
||||
Reference in New Issue
Block a user