This commit is contained in:
@@ -280,9 +280,10 @@ TAGS - At server if equality compare value is an array of strings then it's assu
|
||||
TODO: "Unsaved filter" being displayed, sb "Unsaved listview"
|
||||
|
||||
TODO: No way to make a new widget now!!!
|
||||
TODO: new widget save re-fetches unnecessarily
|
||||
- Instead should just use the data that came back with the save as it has all that's required
|
||||
- should manipulate the history api instead to seem like it never was at zero record ID before save
|
||||
TODO: save (post) of new record at client triggers renavigation to that page again which also triggers fetch
|
||||
- So what's the point of returning the full record on post?
|
||||
- Might as well return nothing if the save was successful other than the new ID
|
||||
- On the other hand, is the data still kept in the view or is create called again fresh and all that??
|
||||
TODO: Switch control has issues in mobile view throws error "touch is undefined"
|
||||
- Update and see if fixes or else switch to some other component
|
||||
TODO: HELP link on listVieweditor not working
|
||||
|
||||
@@ -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