diff --git a/app/ayanova/src/views/log.vue b/app/ayanova/src/views/log.vue index d11e9652..4728872b 100644 --- a/app/ayanova/src/views/log.vue +++ b/app/ayanova/src/views/log.vue @@ -15,8 +15,8 @@ export default { data() { return {}; }, - beforeMount() { - lt.fetch(["Log"]); + async Created() { + await lt.fetch(["Log"]); }, mounted() {}, methods: { diff --git a/devdocs/todo.txt b/devdocs/todo.txt index a87e3d78..9fe2ae31 100644 --- a/devdocs/todo.txt +++ b/devdocs/todo.txt @@ -10,12 +10,26 @@ Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOiIxNTQxNTE5NTA5IiwiZXhwIjoi - Centralize the lt function, find out how to move it into the top so can just call it from anywhere - pre-fetch: noticed it's not pausing long enough to get teh fetched text at times (log view) + - !!This will be important to every form loading data so need to get it right here!! + - This seems to be best done in the router if I want to prefetch before the component lifecycle starts + otherwise the alternate approach is to do it in teh component but show a loading or placeholder + which is a good idea for some things like loading big lists etc but won't work with localetext + so perhaps a mix. + Here is the definitive link: https://router.vuejs.org/guide/advanced/data-fetching.html - Need everything to stay on hold until the fetch of localized text is completed for that view somehow - fetch in router? or how can I hold things off in vue lifecycle until it's done with the fetch of the keys? + Useful links (but see router based solution link above as that's more "canon"): + - https://vuejs.org/v2/cookbook/using-axios-to-consume-apis.html + - https://stackoverflow.com/questions/40813975/how-to-structure-api-calls-in-vue-js + - https://stackoverflow.com/questions/49577394/which-vuejs-lifecycle-hook-must-asynchronous-http-requests-be-called-in + - this might be of use, it uses async await a lot and seems to get to the heart of the issue: + https://developer.okta.com/blog/2018/02/15/build-crud-app-vuejs-node + See the created method - Dummy form with all RAVEN required input controls on it for testing - As if a widget but not actual widget api calls yet so can expand this form later and save time + - Dirty form check and prevent route leave: https://router.vuejs.org/guide/advanced/navigation-guards.html#in-component-guards - Document a release procedure while doing the next step: - Post a dist version up to the dev server so can test with all our devices and note what works and what doesn't - Test initial shell and dummy input form on all devices including a simple e2e test of some kind to get a start on that aspect