dashboard weight updates

This commit is contained in:
Raman Marikanti 2025-12-16 16:12:08 +05:30
parent 4ff37c175e
commit 3eadd05d1c
1 changed files with 7 additions and 3 deletions

View File

@ -209,7 +209,7 @@ export class ConsumptionDashboard extends Component {
dataType: "float", dataType: "float",
format: "#,###.00", format: "#,###.00",
align: "right", align: "right",
summary: { type: "sum" } summary: { type: "sum_" }
}, },
{ {
title: "UOM", title: "UOM",
@ -224,7 +224,7 @@ export class ConsumptionDashboard extends Component {
dataType: "float", dataType: "float",
format: "#,###.00", format: "#,###.00",
align: "right", align: "right",
summary: { type: "sum" } summary: { type: "sum_" }
} }
]; ];
@ -278,7 +278,7 @@ export class ConsumptionDashboard extends Component {
align: "right", align: "right",
dataType: "float", dataType: "float",
format: "#,###.00", format: "#,###.00",
summary: { type: "sum" }, summary: { type: "sum_" },
})); }));
return [...baseColumns, ...dynamicColumns]; return [...baseColumns, ...dynamicColumns];
@ -287,6 +287,10 @@ export class ConsumptionDashboard extends Component {
async renderGrid() { async renderGrid() {
const { data } = this.processConsumptionData(); const { data } = this.processConsumptionData();
const columns = await this.getColumns(); const columns = await this.getColumns();
const agg = pq.aggregate;
agg.sum_ = function(arr, col) {
return " " + agg.sum(arr, col).toFixed(2).toString();
};
const gridOptions = { const gridOptions = {
selectionModel: { type: "row" }, selectionModel: { type: "row" },