This commit is contained in:
2022-02-25 16:54:17 +00:00
parent 996d4b6203
commit e5c951ab4e

View File

@@ -118,6 +118,20 @@ export default {
//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?
REPORTING
v.nexxt?
charts lib at server?
DateTrunc https://www.postgresqltutorial.com/postgresql-date_trunc/ will respect changes of month or year or whatever so this works
SELECT row_to_json(t) as res from (
@@ -133,27 +147,30 @@ GROUP BY timeframe
ORDER BY timeframe ASC
) t
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?
REPORTING
v.nexxt?
charts lib at server?
*/
// let tt = {
// KPIName: "WorkOrderItemLaborQuantitySummary",
// criteria: {
// dateRange: this.settings.dateRange,
// unit: this.settings.unit
// },
// clientTimeStamp: window.$gz.locale.clientLocalZoneTimeStamp()
// };
// console.log(tt);
try {
this.errorMessage = null;
const res = await window.$gz.api.post("kpi", {
KPIName: "WorkOrderItemLaborQuantitySummary",
criteria: JSON.stringify({ test: 12, blah: "blahbittyblahblahblah" }),
criteria: {
dateRange: this.settings.dateRange,
unit: this.settings.unit
},
clientTimeStamp: window.$gz.locale.clientLocalZoneTimeStamp()
});
if (res.error) {