This commit is contained in:
2020-04-01 19:08:07 +00:00
parent 810e060fed
commit fdd1fd3aaa
3 changed files with 22 additions and 14 deletions

View File

@@ -105,13 +105,23 @@ export default {
/////////////////////////////////////
// Display LT message with wait for ok
//
// displayLTErrorMessage(tKeyText, tKeyTitle = undefined) {
// return VM_LOCAL.$root.$gzconfirm({
// message: tKeyText ? window.$gz.translation.get(tKeyText) : "",
// title: tKeyTitle ? window.$gz.translation.get(tKeyTitle) : "",
// yesButtonText: window.$gz.translation.get("OK"),
// type: "error"
// });
// },
displayLTErrorMessage(tKeyText, tKeyTitle = undefined) {
return VM_LOCAL.$root.$gzconfirm({
message: tKeyText ? window.$gz.translation.get(tKeyText) : "",
title: tKeyTitle ? window.$gz.translation.get(tKeyTitle) : "",
yesButtonText: window.$gz.translation.get("OK")
yesButtonText: window.$gz.translation.get("OK"),
type: "error"
});
}, /////////////////////////////////////
},
/////////////////////////////////////
// Custom confirmation
//
confirmGeneric(tKey) {

View File

@@ -263,12 +263,11 @@ export default {
//Not found?
if (res.error.code == "2010") {
//notify not found error then navigate backwards
window.$gz.dialog
.displayLTErrorMessage("ErrorAPI2010")
.then(() => {
// navigate backwards
vm.$router.go(-1);
});
window.$gz.eventBus.$emit("notify-error", vm.t("ErrorAPI2010"));
// navigate backwards
window.$gz._.delay(function() {
vm.$router.go(-1);
}, 2000);
}
vm.formState.serverError = res.error;
window.$gz.form.setErrorBoxErrors(vm);

View File

@@ -408,12 +408,11 @@ export default {
//Not found?
if (res.error.code == "2010") {
//notify not found error then navigate backwards
window.$gz.dialog
.displayLTErrorMessage("ErrorAPI2010")
.then(() => {
// navigate backwards
vm.$router.go(-1);
});
window.$gz.eventBus.$emit("notify-error", vm.t("ErrorAPI2010"));
// navigate backwards
window.$gz._.delay(function() {
vm.$router.go(-1);
}, 2000);
}
vm.formState.serverError = res.error;
window.$gz.form.setErrorBoxErrors(vm);