This commit is contained in:
@@ -54,7 +54,7 @@ export default {
|
||||
},
|
||||
{
|
||||
roles: [role.Tech, role.TechRestricted],
|
||||
title: "WorkOrderItemLaborList",
|
||||
title: "WorkOrderItemLaborServiceRateQuantity",
|
||||
type: "GzDashLaborHoursPersonal",
|
||||
scheduleableUserOnly: true,
|
||||
singleOnly: false,
|
||||
@@ -67,7 +67,7 @@ export default {
|
||||
},
|
||||
{
|
||||
roles: [role.Tech, role.TechRestricted],
|
||||
title: "WorkOrderItemLaborList",
|
||||
title: "WorkOrderItemLaborServiceRateQuantity",
|
||||
type: "GzDashLaborHoursPersonalBar",
|
||||
scheduleableUserOnly: true,
|
||||
singleOnly: false,
|
||||
|
||||
@@ -345,47 +345,20 @@ function populateSelectionLists(vm) {
|
||||
);
|
||||
}
|
||||
|
||||
/* //todo: need a equivalent of a datalist at the server but that can take the minimal criteria offered here and return the data easily digestable
|
||||
//do not want the client end to have to do math or anything and also it needs to drive reporting of the same type as the widget display
|
||||
//so as similar as possible to the datatable system but handles the math and summarizing ideally in the db server itself
|
||||
|
||||
TODO:
|
||||
DYNAMIC FROM SETS
|
||||
handle params (time range, currentusertoken,period)
|
||||
enforce current user only (I guess that's built in if use token or leave out token because it's assumed in which case rename to WorkOrderItemLaborQuantitySummaryPERSONAL )
|
||||
ACTUAL CHART WORKING
|
||||
line chart, can it work with this data, does it need adjustment to locale?
|
||||
scroll? Vertical better than horizontal? Select bar OR line?
|
||||
/*
|
||||
|
||||
todo: clean up line version of dash-labor-hours-personal with lessons learned from bar one
|
||||
todo: add icons to dashregistry with title so can include some indication of type of chart when names are duped
|
||||
or subtitle if icons too fucky
|
||||
|
||||
REPORTING
|
||||
v.nexxt?
|
||||
charts lib at server?
|
||||
todo: add hours as interval??
|
||||
todo: clean up the sheer number of time periods, maybe remove individual months or whatever and time frames so short they don't make sense for personal
|
||||
todo: give a good look over and determine if ready to make more now based on what was done already
|
||||
need to release so don't go too crazy, there are some new cases to take care of as well, just need to show promise and get the two most important kpi items in and leaderboard and can go from there
|
||||
|
||||
Leave reporting to future v.next
|
||||
|
||||
DateTrunc https://www.postgresqltutorial.com/postgresql-date_trunc/ will respect changes of month or year or whatever so this works
|
||||
My version of chart.js docs: https://www.chartjs.org/docs/2.9.4/charts/bar.html
|
||||
|
||||
SELECT row_to_json(t) as res from (
|
||||
|
||||
select SUM(AWORKORDERITEMLABOR.serviceratequantity) SERVICERATESUM, date_trunc('month',AWORKORDERITEMLABOR.servicestartdate) timeframe
|
||||
|
||||
FROM AWORKORDER
|
||||
LEFT JOIN AWORKORDERITEM ON AWORKORDER.ID = AWORKORDERITEM.WORKORDERID
|
||||
LEFT JOIN AWORKORDERITEMLABOR ON AWORKORDERITEM.ID = AWORKORDERITEMLABOR.WORKORDERITEMID
|
||||
WHERE AWORKORDERITEMLABOR.userid = 10
|
||||
|
||||
GROUP BY timeframe
|
||||
ORDER BY timeframe ASC
|
||||
) t
|
||||
|
||||
|
||||
// let tt = {
|
||||
// KPIName: "WorkOrderItemLaborQuantitySummary",
|
||||
// criteria: {
|
||||
// timeSpan: this.settings.timeSpan,
|
||||
// unit: this.settings.unit
|
||||
// },
|
||||
// clientTimeStamp: window.$gz.locale.clientLocalZoneTimeStamp()
|
||||
// };
|
||||
// console.log(tt); */
|
||||
*/
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user