From 2c471a009356fdf340a3ce9d0ff2667b8bc1a5a4 Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Mon, 2 Mar 2020 18:01:28 +0000 Subject: [PATCH] --- ayanova/devdocs/todo.txt | 6 ------ ayanova/src/views/test-inventory-widget-edit.vue | 12 ++---------- 2 files changed, 2 insertions(+), 16 deletions(-) diff --git a/ayanova/devdocs/todo.txt b/ayanova/devdocs/todo.txt index 4eccbd94..e5a9976d 100644 --- a/ayanova/devdocs/todo.txt +++ b/ayanova/devdocs/todo.txt @@ -45,12 +45,6 @@ CURRENT TODOs @@@@@@@@@@@ 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: CUSTOM DATE FIELD NOT SETTING NOW?? - Retest every kind of custom field diff --git a/ayanova/src/views/test-inventory-widget-edit.vue b/ayanova/src/views/test-inventory-widget-edit.vue index 472b6b90..920be9fc 100644 --- a/ayanova/src/views/test-inventory-widget-edit.vue +++ b/ayanova/src/views/test-inventory-widget-edit.vue @@ -312,16 +312,8 @@ export default { } }, beforeRouteUpdate(to, from, next) { - //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 + //This triggers a fetch of the data when the ID value changes on the route + //which happens on duplicate, submit new record and change of active record id (backward nav/forward nav etc) if (to.params.recordid != 0) { this.getDataFromApi(to.params.recordid); }