This commit is contained in:
@@ -44,6 +44,13 @@ CURRENT TODOs
|
|||||||
|
|
||||||
@@@@@@@@@@@ ROADMAP STAGE 1 and 2:
|
@@@@@@@@@@@ ROADMAP STAGE 1 and 2:
|
||||||
|
|
||||||
|
|
||||||
|
todo: save (post) of new record at client triggers renavigation to that page again which also triggers fetch
|
||||||
|
- Notes in beforeRouteUpdate(to, from, next) { in WIDGET edit form
|
||||||
|
- It's a bug in my logic, beforeRouteUpdate fires when submit changes the url in the url bar, but that should not trigger a refetch
|
||||||
|
- Only CREATED and beforeRouteUpdate are triggering GetDataFromAPI, created is valid on open of course so need to handle beforerouteupdate
|
||||||
|
-Does it really need to even do anything, I mean, why would the route update, I guess when navigating back and forth between widgets?
|
||||||
|
|
||||||
todo: CUSTOMIZE not working on widget edit form
|
todo: CUSTOMIZE not working on widget edit form
|
||||||
todo: CUSTOM DATE FIELD NOT SETTING NOW??
|
todo: CUSTOM DATE FIELD NOT SETTING NOW??
|
||||||
- Retest every kind of custom field
|
- Retest every kind of custom field
|
||||||
@@ -52,14 +59,7 @@ todo: are *all* custom field types working? Not certain
|
|||||||
todo: apparently I can change the buttons to display the text not uppercase with class="text-none" or something, should I go back to buttons? (kinda looked cooler, but...)
|
todo: apparently I can change the buttons to display the text not uppercase with class="text-none" or something, should I go back to buttons? (kinda looked cooler, but...)
|
||||||
- https://github.com/vuetifyjs/vuetify/issues/3948
|
- https://github.com/vuetifyjs/vuetify/issues/3948
|
||||||
|
|
||||||
todo: save (post) of new record at client triggers renavigation to that page again which also triggers fetch
|
|
||||||
- original:
|
|
||||||
- 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??
|
|
||||||
- Actually, it really doesn't navigate if it can help it to refresh vue components
|
|
||||||
- So, is it fetching a whole fresh record after save or using the results of save returned?
|
|
||||||
- ANSWER: definitely fetching on save of new record.
|
|
||||||
|
|
||||||
todo: add refresh button above grid, reason being that we really don't want people refreshing the ENTIRE app with a full page refresh
|
todo: add refresh button above grid, reason being that we really don't want people refreshing the ENTIRE app with a full page refresh
|
||||||
- Even though we support it, it's slow and could be an issue when running in application mode with no browser controls
|
- Even though we support it, it's slow and could be an issue when running in application mode with no browser controls
|
||||||
|
|||||||
@@ -313,6 +313,15 @@ export default {
|
|||||||
},
|
},
|
||||||
beforeRouteUpdate(to, from, next) {
|
beforeRouteUpdate(to, from, next) {
|
||||||
//fetch the data for the record as if it's a new record
|
//fetch the data for the record as if it's a new record
|
||||||
|
bugbug: if we are here because a recent submit this triggers a full fetch
|
||||||
|
//except there's no reason to full fetch as we already have the data required from the submit
|
||||||
|
//so need to flag that somehow or figure out better logic here
|
||||||
|
|
||||||
|
//- Only CREATED and beforeRouteUpdate are triggering GetDataFromAPI, created is valid on open of course so need to handle beforerouteupdate
|
||||||
|
//-Does it really need to even do anything, I mean, why would the route update, I guess when navigating back and forth between widgets?
|
||||||
|
|
||||||
|
//WHY IS THIS REQUIRED? IS IT BECAUSE OF NAV BACK AND FORTH BETWEEN WIDGETS MAYBE??
|
||||||
|
//TEST THAT BEFORE PROCEEDING WITH ANY FIX FOR SUBMIT FETCH ISSUE
|
||||||
if (to.params.recordid != 0) {
|
if (to.params.recordid != 0) {
|
||||||
this.getDataFromApi(to.params.recordid);
|
this.getDataFromApi(to.params.recordid);
|
||||||
}
|
}
|
||||||
@@ -504,8 +513,8 @@ export default {
|
|||||||
//change url to new record in history
|
//change url to new record in history
|
||||||
//NOTE: will not cause a new navigate, almost nothing does unless forced with a KEY property or using router.GO()
|
//NOTE: will not cause a new navigate, almost nothing does unless forced with a KEY property or using router.GO()
|
||||||
//but will trigger navigation guard beforeRouteUpdate which we use here in this form
|
//but will trigger navigation guard beforeRouteUpdate which we use here in this form
|
||||||
//to fetch data again
|
|
||||||
debugger;
|
//NOTE: THIS IS THE ONLY PLACE ON THIS FORM THAT WILL TRIGGER BEFOREROUTEUPDATE
|
||||||
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