This commit is contained in:
@@ -23,7 +23,10 @@ NEXT TODOS:
|
|||||||
|
|
||||||
|
|
||||||
- On object not found when deleting an item and trying to reload the edit page, shoudl redirect to home or back instead or just not there
|
- On object not found when deleting an item and trying to reload the edit page, shoudl redirect to home or back instead or just not there
|
||||||
|
|
||||||
|
- On save of record should have a brief notification that auto closes that says "SAVED" or something just to handle the case of people not clicking on save??
|
||||||
|
- or, would the dirty check on nav away cover this anyway?
|
||||||
|
- Would it be annoying on a small device?
|
||||||
- Locale settings move to store
|
- Locale settings move to store
|
||||||
- Right now if you reload a page the locale settings reset back to default as they are not backed by the store
|
- Right now if you reload a page the locale settings reset back to default as they are not backed by the store
|
||||||
- However localized text keys do not because they *are* backed by the store
|
- However localized text keys do not because they *are* backed by the store
|
||||||
|
|||||||
@@ -94,6 +94,23 @@ export default {
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
|
},
|
||||||
|
/////////////////////////////////////
|
||||||
|
// Display LT message with wait for ok
|
||||||
|
//
|
||||||
|
displayLTErrorMessage(vm, ltKeyText, ltKeyTitle = undefined) {
|
||||||
|
//https://github.com/yariksav/vuetify-dialog#readme
|
||||||
|
return vm.$dialog.error({
|
||||||
|
text: ltKeyText ? vm.$gzlocale.get(ltKeyText) : "",
|
||||||
|
title: ltKeyTitle ? vm.$gzlocale.get(ltKeyTitle) : "",
|
||||||
|
icon: "fa-exclamation-triangle",
|
||||||
|
actions: [
|
||||||
|
{
|
||||||
|
text: vm.$gzlocale.get("OK"),
|
||||||
|
key: true
|
||||||
|
}
|
||||||
|
]
|
||||||
|
});
|
||||||
}
|
}
|
||||||
//new functions above here
|
//new functions above here
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -13,8 +13,7 @@
|
|||||||
transition="scale-transition"
|
transition="scale-transition"
|
||||||
class="multi-line"
|
class="multi-line"
|
||||||
outline
|
outline
|
||||||
>{{ formState.errorBoxMessage }}</v-alert
|
>{{ formState.errorBoxMessage }}</v-alert>
|
||||||
>
|
|
||||||
</v-flex>
|
</v-flex>
|
||||||
<v-flex xs12 sm6 lg4 xl3 px-2>
|
<v-flex xs12 sm6 lg4 xl3 px-2>
|
||||||
<v-text-field
|
<v-text-field
|
||||||
@@ -151,7 +150,7 @@
|
|||||||
READONLY: {{ formState.readOnly }}
|
READONLY: {{ formState.readOnly }}
|
||||||
<br />
|
<br />
|
||||||
</v-flex>
|
</v-flex>
|
||||||
</v-layout> -->
|
</v-layout>-->
|
||||||
</v-form>
|
</v-form>
|
||||||
</v-flex>
|
</v-flex>
|
||||||
</v-layout>
|
</v-layout>
|
||||||
@@ -345,20 +344,22 @@ export default {
|
|||||||
var url = "Widget/" + this.$route.params.id;
|
var url = "Widget/" + this.$route.params.id;
|
||||||
var vm = this;
|
var vm = this;
|
||||||
this.$gzform.deleteAllErrorBoxErrors(this);
|
this.$gzform.deleteAllErrorBoxErrors(this);
|
||||||
|
|
||||||
this.$gzapi
|
this.$gzapi
|
||||||
.get(url)
|
.get(url)
|
||||||
.then(res => {
|
.then(res => {
|
||||||
if (res.error) {
|
if (res.error) {
|
||||||
if(res.error.code=="2010"){
|
if (res.error.code == "2010") {
|
||||||
//notify error then navigate backwards
|
//notify error then navigate backwards
|
||||||
vm.$gzevent.$emit("notify-error", res.error.message);//TODO LOCALIZE THIS AND MOVE TO API
|
vm.$gzdialog
|
||||||
// navigate backwards
|
.displayLTErrorMessage(vm, "ErrorAPI2010")
|
||||||
vm.$router.go(-1);
|
.then(() => {
|
||||||
|
// navigate backwards
|
||||||
|
vm.$router.go(-1);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
vm.formState.serverError = res.error;
|
vm.formState.serverError = res.error;
|
||||||
vm.$gzform.setErrorBoxErrors(vm);
|
vm.$gzform.setErrorBoxErrors(vm);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
vm.obj = res.data;
|
vm.obj = res.data;
|
||||||
//Update the form status
|
//Update the form status
|
||||||
|
|||||||
Reference in New Issue
Block a user