diff --git a/ayanova/devdocs/todo.txt b/ayanova/devdocs/todo.txt index 6302679e..6da4c8fd 100644 --- a/ayanova/devdocs/todo.txt +++ b/ayanova/devdocs/todo.txt @@ -60,8 +60,7 @@ https://www.ayanova.com/AyaNova7webHelp/index.html?dashboard.htm timespan and interval tags wo, woitem, USER tags also - BRING BACK USER COLOR? Or random assignment? - user color should be a thing I think + ### TEST MIGRATE USER COLOR WITH THIS WHEN DONE ### * LIST overdue workorders (booked on, in the past, not a closed status) for current scheduleable user @@ -898,7 +897,15 @@ BUILD 8.0.0-beta.1-rc3 CHANGES OF NOTE + + + + ================================================ 204 new lady? 2022-03-01 11:20:10 "I pay 917 here for a two bedroom." +2022-03-01 12:45:13 +Don't fucking sign anything. I've been here for 8 years, change is good + + diff --git a/ayanova/src/components/dash-labor-hours-everyone-bar.vue b/ayanova/src/components/dash-labor-hours-everyone-bar.vue index 5a5ce968..8eae9e6a 100644 --- a/ayanova/src/components/dash-labor-hours-everyone-bar.vue +++ b/ayanova/src/components/dash-labor-hours-everyone-bar.vue @@ -10,6 +10,7 @@ > @@ -114,6 +115,7 @@ export default { data() { return { obj: {}, + meta: [], context: false, localSettings: {}, selectLists: { @@ -151,15 +153,36 @@ export default { }, computed: { chartData() { - return { - datasets: [ - { - label: "usernamehere", - backgroundColor: this.settings.color ?? "#000000", - data: this.obj - } - ] - }; + let ret = []; + //build data sets here + //format should be broken out by user + //iterate data and lookup what's needed in meta for each change of data + //or, is it the other way around, maybe iterate meta and if find in data then build dataset!! + this.meta.forEach(m => { + let userData=this.obj.filter(d=>d.z==m.userid); + +if(userData.length>0){ + let item = { + label: m.name, + backgroundColor: m.uicolor, + data: userData.map(d => { + return { x: d.x, y: d.y }; + }) + }; +// } +// if (item.data.length > 0) { +// ret.push(item); +// } + }); + console.log(JSON.stringify({ datasets: ret })); + return { datasets: ret }; + // datasets: [ + // { + // label: "usernamehere", + // backgroundColor: this.settings.color ?? "#000000", + // data: this.obj + // } + // ] } }, async created() { @@ -215,6 +238,7 @@ export default { timeZone: this.timeZoneName }); }); + this.meta = res.meta; this.obj = res.data; } } catch (error) { diff --git a/ayanova/src/views/adm-user.vue b/ayanova/src/views/adm-user.vue index a21ab615..a330510a 100644 --- a/ayanova/src/views/adm-user.vue +++ b/ayanova/src/views/adm-user.vue @@ -381,12 +381,12 @@ {{ $ay.t("UserColor") }}