This commit is contained in:
2020-02-24 19:44:56 +00:00
parent 77f2149627
commit 9d5c608ccf

View File

@@ -500,14 +500,14 @@ export default {
//Logic for detecting if a post or put: if id then it was a post, if no id then it was a put //Logic for detecting if a post or put: if id then it was a post, if no id then it was a put
if (res.data.id) { if (res.data.id) {
//Handle "post" of new record (CREATE) //Handle "post" of new record (CREATE)
vm.obj = res.data; // vm.obj = res.data;
window.$gz.form.setFormState({ // window.$gz.form.setFormState({
vm: vm, // vm: vm,
dirty: false, // dirty: false,
readOnly: res.readOnly ? true : false // readOnly: res.readOnly ? true : false
}); // });
//change url to new record in history and actually navigate but with the actual id at the end instead of zero: //change url to new record in history and trigger navigate but with the id at the end instead of zero:
vm.$router.replace( vm.$router.replace(
vm.$route.fullPath.slice(0, -1) + res.data.id vm.$route.fullPath.slice(0, -1) + res.data.id
); );