From bdfeabe03f78c25f9a522ff088912cc4050ef8ad Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Tue, 3 Nov 2020 00:08:10 +0000 Subject: [PATCH] --- ayanova/devdocs/todo.txt | 11 ++++--- ayanova/src/api/gzapi.js | 16 +++++++++- ayanova/src/components/dash-base.vue | 1 + .../dash-test-list-widgets-priciest.vue | 32 +++++++++++++++---- ayanova/src/views/home-dashboard.vue | 4 +-- 5 files changed, 51 insertions(+), 13 deletions(-) diff --git a/ayanova/devdocs/todo.txt b/ayanova/devdocs/todo.txt index 2d7c414d..50f6e3c7 100644 --- a/ayanova/devdocs/todo.txt +++ b/ayanova/devdocs/todo.txt @@ -54,14 +54,17 @@ todo: DASHBOARD feeds user registry, selection process etc todo: need user dashboard setup registry and route +todo: MORE link button click + Should take to a data-list view preselected with the criteria that show the complete list of what is in the dash-item wherever possible + if an item doesn't really have anything appropriate to click on then don't bother for now, can flesh out more later + todo: if dashboard view is empty should be a string displayed saying nothing selected to show? -// Todo: intermediate actual types (try list first), how to instantiate them from here by id (dynamic) -// todo: do we need a PLUS menu item to add one of that type to that widget, i.e. if it's showing workorders then a plus to make a new wokorder would be useful +todo: do we need a PLUS menu item to add one of that type to that widget, i.e. if it's showing workorders then a plus to make a new wokorder would be useful - -todo: popup warning box error: Could not find one or more icon(s) iconName: "exclamation" prefix: "fas" +todo: when showing a popup warning box error: Could not find one or more icon(s) iconName: "exclamation" prefix: "fas" I think maybe this is a built in vuetify icon? + Need to show a warning box to see it in action, maybe delete something and get the are you sure? or maybe it's only the warning type? diff --git a/ayanova/src/api/gzapi.js b/ayanova/src/api/gzapi.js index 1870ba3e..62b7754d 100644 --- a/ayanova/src/api/gzapi.js +++ b/ayanova/src/api/gzapi.js @@ -532,7 +532,21 @@ export default { r = await that.extractBodyEx(r); return r; } catch (error) { - handleError("UPSERT", error, route); + handleError("PUT", error, route); + } + }, + /////////////////////////////////// + // POST DATA TO API SERVER + // (used for post only routes not needing upserts) + async post(route, data) { + try { + let that = this; + let r = await fetch(that.APIUrl(route), that.fetchPostOptions(data)); + that.statusEx(r); + r = await that.extractBodyEx(r); + return r; + } catch (error) { + handleError("POST", error, route); } }, /////////////////////////////////// diff --git a/ayanova/src/components/dash-base.vue b/ayanova/src/components/dash-base.vue index 2c374e96..e77638ae 100644 --- a/ayanova/src/components/dash-base.vue +++ b/ayanova/src/components/dash-base.vue @@ -125,6 +125,7 @@ export default { moreUrl: String, count: { type: Number, default: 0 }, updateFrequency: { type: Number, default: 60000 }, + maxListItems: { type: Number, default: 10 }, icon: { type: String, default: "$ayiTachometer" } }, created() { diff --git a/ayanova/src/components/dash-test-list-widgets-priciest.vue b/ayanova/src/components/dash-test-list-widgets-priciest.vue index dc2f5033..e738e61c 100644 --- a/ayanova/src/components/dash-test-list-widgets-priciest.vue +++ b/ayanova/src/components/dash-test-list-widgets-priciest.vue @@ -2,34 +2,54 @@