This commit is contained in:
@@ -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
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user