This commit is contained in:
@@ -764,27 +764,22 @@ export default {
|
||||
if (res.data.id) {
|
||||
//Handle "post" of new record (CREATE)
|
||||
|
||||
//FOr listview this is the big one to handle as it's so funky
|
||||
//NOPE vm.obj = res.data;
|
||||
|
||||
|
||||
window.$gz.form.setFormState({
|
||||
vm: vm,
|
||||
dirty: false,
|
||||
readOnly: res.readOnly ? true : false
|
||||
});
|
||||
|
||||
//change url to new record but don't actually navigate, replace current url with same url but with the actual id at the end instead of zero:
|
||||
vm.$router.replace(
|
||||
|
||||
//NOPE: vm.$route.fullPath.slice(0, -1) + res.data.id
|
||||
//this is the format for listview:
|
||||
//ay-data-list-view/-1/TestWidgetDataList/test-widgets
|
||||
//or 0 if it's coming from the default listview
|
||||
//or id number if it's got one which we don't care about here
|
||||
//so mission is to replace the 0 or -1 with the real id in the url
|
||||
|
||||
);
|
||||
//change url to new record
|
||||
//this is the format for listview:
|
||||
//ay-data-list-view/-1/TestWidgetDataList/test-widgets
|
||||
//or 0 if it's coming from the default listview
|
||||
//or id number if it's got one which we don't care about here
|
||||
//so mission is to replace the 0 or -1 with the real id in the url
|
||||
var urlParts = vm.$route.split("/");
|
||||
var newUrl =
|
||||
urlParts[0] +
|
||||
"/" +
|
||||
res.data.id +
|
||||
"/" +
|
||||
urlParts[2] +
|
||||
"/" +
|
||||
urlParts[3];
|
||||
vm.$router.replace(newUrl);
|
||||
} else {
|
||||
//Handle "put" of an existing record (UPDATE)
|
||||
vm.obj.concurrencyToken = res.data.concurrencyToken;
|
||||
|
||||
Reference in New Issue
Block a user