fixed NoneType errors in detailed data formatters of Web UI

pull/78/MERGE
13621160019@163.com 2021-11-04 22:13:22 +08:00
parent 20422f9074
commit df57994c7a
49 changed files with 380 additions and 76 deletions

View File

@ -204,7 +204,11 @@ const CombinedEquipmentBatch = ({ setRedirect, setRedirectUrl, t }) => {
text: currentValue['name'] + ' (' + currentValue['unit_of_measure'] + ')',
sort: true,
formatter: function (decimalValue) {
if (decimalValue !== null) {
return decimalValue.toFixed(2);
} else {
return null;
}
}
})
});

View File

@ -472,7 +472,11 @@ const CombinedEquipmentCost = ({ setRedirect, setRedirectUrl, t }) => {
text: currentValue + ' (' + unit + ')',
sort: true,
formatter: function (decimalValue) {
if (decimalValue !== null) {
return decimalValue.toFixed(2);
} else {
return null;
}
}
});
});
@ -481,7 +485,11 @@ const CombinedEquipmentCost = ({ setRedirect, setRedirectUrl, t }) => {
text: t('Total') + ' (' + json['reporting_period']['total_unit'] + ')',
sort: true,
formatter: function (decimalValue) {
if (decimalValue !== null) {
return decimalValue.toFixed(2);
} else {
return null;
}
}
});
setDetailedDataTableColumns(detailed_column_list);
@ -517,7 +525,11 @@ const CombinedEquipmentCost = ({ setRedirect, setRedirectUrl, t }) => {
text: currentValue + ' (' + unit + ')',
sort: true,
formatter: function (decimalValue) {
if (decimalValue !== null) {
return decimalValue.toFixed(2);
} else {
return null;
}
}
});
});
@ -526,7 +538,11 @@ const CombinedEquipmentCost = ({ setRedirect, setRedirectUrl, t }) => {
text: t('Total') + ' (' + json['associated_equipment']['total_unit'] + ')',
sort: true,
formatter: function (decimalValue) {
if (decimalValue !== null) {
return decimalValue.toFixed(2);
} else {
return null;
}
}
});

View File

@ -485,7 +485,11 @@ const CombinedEquipmentEnergyCategory = ({ setRedirect, setRedirectUrl, t }) =>
text: currentValue + ' (' + unit + ')',
sort: true,
formatter: function (decimalValue) {
if (decimalValue !== null) {
return decimalValue.toFixed(2);
} else {
return null;
}
}
})
});
@ -519,7 +523,11 @@ const CombinedEquipmentEnergyCategory = ({ setRedirect, setRedirectUrl, t }) =>
text: currentValue + ' (' + unit + ')',
sort: true,
formatter: function (decimalValue) {
if (decimalValue !== null) {
return decimalValue.toFixed(2);
} else {
return null;
}
}
});
});

View File

@ -446,7 +446,11 @@ const CombinedEquipmentEnergyItem = ({ setRedirect, setRedirectUrl, t }) => {
text: currentValue + ' (' + unit + ')',
sort: true,
formatter: function (decimalValue) {
if (decimalValue !== null) {
return decimalValue.toFixed(2);
} else {
return null;
}
}
})
});

View File

@ -436,7 +436,11 @@ const CombinedEquipmentIncome = ({ setRedirect, setRedirectUrl, t }) => {
text: currentValue + ' (' + unit + ')',
sort: true,
formatter: function (decimalValue) {
if (decimalValue !== null) {
return decimalValue.toFixed(2);
} else {
return null;
}
}
});
});
@ -445,7 +449,11 @@ const CombinedEquipmentIncome = ({ setRedirect, setRedirectUrl, t }) => {
text: t('Total') + ' (' + json['reporting_period']['total_unit'] + ')',
sort: true,
formatter: function (decimalValue) {
if (decimalValue !== null) {
return decimalValue.toFixed(2);
} else {
return null;
}
}
});
setDetailedDataTableColumns(detailed_column_list);
@ -481,7 +489,11 @@ const CombinedEquipmentIncome = ({ setRedirect, setRedirectUrl, t }) => {
text: currentValue + ' (' + unit + ')',
sort: true,
formatter: function (decimalValue) {
if (decimalValue !== null) {
return decimalValue.toFixed(2);
} else {
return null;
}
}
});
});
@ -490,7 +502,11 @@ const CombinedEquipmentIncome = ({ setRedirect, setRedirectUrl, t }) => {
text: t('Total') + ' (' + json['associated_equipment']['total_unit'] + ')',
sort: true,
formatter: function (decimalValue) {
if (decimalValue !== null) {
return decimalValue.toFixed(2);
} else {
return null;
}
}
});

View File

@ -409,7 +409,11 @@ const CombinedEquipmentOutput = ({ setRedirect, setRedirectUrl, t }) => {
text: currentValue + ' (' + unit + ')',
sort: true,
formatter: function (decimalValue) {
if (decimalValue !== null) {
return decimalValue.toFixed(2);
} else {
return null;
}
}
})
});
@ -443,7 +447,11 @@ const CombinedEquipmentOutput = ({ setRedirect, setRedirectUrl, t }) => {
text: currentValue + ' (' + unit + ')',
sort: true,
formatter: function (decimalValue) {
if (decimalValue !== null) {
return decimalValue.toFixed(2);
} else {
return null;
}
}
});
});

View File

@ -448,7 +448,11 @@ const CombinedEquipmentSaving = ({ setRedirect, setRedirectUrl, t }) => {
text: currentValue + ' (' + unit + ')',
sort: true,
formatter: function (decimalValue) {
if (decimalValue !== null) {
return decimalValue.toFixed(2);
} else {
return null;
}
}
})
});
@ -482,7 +486,11 @@ const CombinedEquipmentSaving = ({ setRedirect, setRedirectUrl, t }) => {
text: currentValue + ' (' + unit + ')',
sort: true,
formatter: function (decimalValue) {
if (decimalValue !== null) {
return decimalValue.toFixed(2);
} else {
return null;
}
}
});
});

View File

@ -420,7 +420,11 @@ const CombinedEquipmentStatistics = ({ setRedirect, setRedirectUrl, t }) => {
text: currentValue + ' (' + unit + ')',
sort: true,
formatter: function (decimalValue) {
if (decimalValue !== null) {
return decimalValue.toFixed(2);
} else {
return null;
}
}
})
});
@ -453,7 +457,11 @@ const CombinedEquipmentStatistics = ({ setRedirect, setRedirectUrl, t }) => {
text: currentValue + ' (' + unit + ')',
sort: true,
formatter: function (decimalValue) {
if (decimalValue !== null) {
return decimalValue.toFixed(2);
} else {
return null;
}
}
});
});

View File

@ -204,7 +204,11 @@ const EquipmentBatch = ({ setRedirect, setRedirectUrl, t }) => {
text: currentValue['name'] + ' (' + currentValue['unit_of_measure'] + ')',
sort: true,
formatter: function (decimalValue) {
if (decimalValue !== null) {
return decimalValue.toFixed(2);
} else {
return null;
}
}
})
});

View File

@ -467,7 +467,11 @@ const EquipmentCost = ({ setRedirect, setRedirectUrl, t }) => {
text: currentValue + ' (' + unit + ')',
sort: true,
formatter: function (decimalValue) {
if (decimalValue !== null) {
return decimalValue.toFixed(2);
} else {
return null;
}
}
});
});
@ -476,7 +480,11 @@ const EquipmentCost = ({ setRedirect, setRedirectUrl, t }) => {
text: t('Total') + ' (' + json['reporting_period']['total_unit'] + ')',
sort: true,
formatter: function (decimalValue) {
if (decimalValue !== null) {
return decimalValue.toFixed(2);
} else {
return null;
}
}
});
setDetailedDataTableColumns(detailed_column_list);

View File

@ -482,7 +482,11 @@ const EquipmentEnergyCategory = ({ setRedirect, setRedirectUrl, t }) => {
text: currentValue + ' (' + unit + ')',
sort: true,
formatter: function (decimalValue) {
if (decimalValue !== null) {
return decimalValue.toFixed(2);
} else {
return null;
}
}
})
});

View File

@ -442,7 +442,11 @@ const EquipmentEnergyItem = ({ setRedirect, setRedirectUrl, t }) => {
text: currentValue + ' (' + unit + ')',
sort: true,
formatter: function (decimalValue) {
if (decimalValue !== null) {
return decimalValue.toFixed(2);
} else {
return null;
}
}
})
});

View File

@ -432,7 +432,11 @@ const EquipmentIncome = ({ setRedirect, setRedirectUrl, t }) => {
text: currentValue + ' (' + unit + ')',
sort: true,
formatter: function (decimalValue) {
if (decimalValue !== null) {
return decimalValue.toFixed(2);
} else {
return null;
}
}
});
});
@ -441,7 +445,11 @@ const EquipmentIncome = ({ setRedirect, setRedirectUrl, t }) => {
text: t('Total') + ' (' + json['reporting_period']['total_unit'] + ')',
sort: true,
formatter: function (decimalValue) {
if (decimalValue !== null) {
return decimalValue.toFixed(2);
} else {
return null;
}
}
});
setDetailedDataTableColumns(detailed_column_list);

View File

@ -404,7 +404,11 @@ const EquipmentOutput = ({ setRedirect, setRedirectUrl, t }) => {
text: currentValue + ' (' + unit + ')',
sort: true,
formatter: function (decimalValue) {
if (decimalValue !== null) {
return decimalValue.toFixed(2);
} else {
return null;
}
}
})
});

View File

@ -444,7 +444,11 @@ const EquipmentSaving = ({ setRedirect, setRedirectUrl, t }) => {
text: currentValue + ' (' + unit + ')',
sort: true,
formatter: function (decimalValue) {
if (decimalValue !== null) {
return decimalValue.toFixed(2);
} else {
return null;
}
}
});
});

View File

@ -417,7 +417,11 @@ const EquipmentStatistics = ({ setRedirect, setRedirectUrl, t }) => {
text: currentValue + ' (' + unit + ')',
sort: true,
formatter: function (decimalValue) {
if (decimalValue !== null) {
return decimalValue.toFixed(2);
} else {
return null;
}
}
})
});

View File

@ -393,7 +393,11 @@ const MeterCost = ({ setRedirect, setRedirectUrl, t }) => {
text: json['meter']['energy_category_name'] + ' (' + json['meter']['unit_of_measure'] + ')',
sort: true,
formatter: function (decimalValue) {
if (decimalValue !== null) {
return decimalValue.toFixed(2);
} else {
return null;
}
}
}]);

View File

@ -393,7 +393,11 @@ const MeterEnergy = ({ setRedirect, setRedirectUrl, t }) => {
text: json['meter']['energy_category_name'] + ' (' + json['meter']['unit_of_measure'] + ')',
sort: true,
formatter: function (decimalValue) {
if (decimalValue !== null) {
return decimalValue.toFixed(2);
} else {
return null;
}
}
}]);

View File

@ -330,7 +330,11 @@ const MeterSubmetersBalance = ({ setRedirect, setRedirectUrl, t }) => {
text: json['meter']['energy_category_name'] + ' (' + json['meter']['unit_of_measure'] + ')',
sort: true,
formatter: function (decimalValue) {
if (decimalValue !== null) {
return decimalValue.toFixed(2);
} else {
return null;
}
}
}]);

View File

@ -371,7 +371,11 @@ const OfflineMeterCost = ({ setRedirect, setRedirectUrl, t }) => {
text: json['offline_meter']['energy_category_name'] + ' (' + json['offline_meter']['unit_of_measure'] + ')',
sort: true,
formatter: function (decimalValue) {
if (decimalValue !== null) {
return decimalValue.toFixed(2);
} else {
return null;
}
}
}]);

View File

@ -371,7 +371,11 @@ const OfflineMeterEnergy = ({ setRedirect, setRedirectUrl, t }) => {
text: json['offline_meter']['energy_category_name'] + ' (' + json['offline_meter']['unit_of_measure'] + ')',
sort: true,
formatter: function (decimalValue) {
if (decimalValue !== null) {
return decimalValue.toFixed(2);
} else {
return null;
}
}
}]);

View File

@ -371,7 +371,11 @@ const VirtualMeterCost = ({ setRedirect, setRedirectUrl, t }) => {
text: json['virtual_meter']['energy_category_name'] + ' (' + json['virtual_meter']['unit_of_measure'] + ')',
sort: true,
formatter: function (decimalValue) {
if (decimalValue !== null) {
return decimalValue.toFixed(2);
} else {
return null;
}
}
}]);

View File

@ -371,7 +371,11 @@ const VirtualMeterEnergy = ({ setRedirect, setRedirectUrl, t }) => {
text: json['virtual_meter']['energy_category_name'] + ' (' + json['virtual_meter']['unit_of_measure'] + ')',
sort: true,
formatter: function (decimalValue) {
if (decimalValue !== null) {
return decimalValue.toFixed(2);
} else {
return null;
}
}
}]);

View File

@ -204,7 +204,11 @@ const ShopfloorBatch = ({ setRedirect, setRedirectUrl, t }) => {
text: currentValue['name'] + ' (' + currentValue['unit_of_measure'] + ')',
sort: true,
formatter: function (decimalValue) {
if (decimalValue !== null) {
return decimalValue.toFixed(2);
} else {
return null;
}
}
})
});

View File

@ -468,7 +468,11 @@ const ShopfloorCost = ({ setRedirect, setRedirectUrl, t }) => {
text: currentValue + ' (' + unit + ')',
sort: true,
formatter: function (decimalValue) {
if (decimalValue !== null) {
return decimalValue.toFixed(2);
} else {
return null;
}
}
});
});
@ -477,7 +481,11 @@ const ShopfloorCost = ({ setRedirect, setRedirectUrl, t }) => {
text: t('Total') + ' (' + json['reporting_period']['total_unit'] + ')',
sort: true,
formatter: function (decimalValue) {
if (decimalValue !== null) {
return decimalValue.toFixed(2);
} else {
return null;
}
}
});
setDetailedDataTableColumns(detailed_column_list);

View File

@ -483,7 +483,11 @@ const ShopfloorEnergyCategory = ({ setRedirect, setRedirectUrl, t }) => {
text: currentValue + ' (' + unit + ')',
sort: true,
formatter: function (decimalValue) {
if (decimalValue !== null) {
return decimalValue.toFixed(2);
} else {
return null;
}
}
})
});

View File

@ -444,7 +444,11 @@ const ShopfloorEnergyItem = ({ setRedirect, setRedirectUrl, t }) => {
text: currentValue + ' (' + unit + ')',
sort: true,
formatter: function (decimalValue) {
if (decimalValue !== null) {
return decimalValue.toFixed(2);
} else {
return null;
}
}
})
});

View File

@ -445,7 +445,11 @@ const ShopfloorSaving = ({ setRedirect, setRedirectUrl, t }) => {
text: currentValue + ' (' + unit + ')',
sort: true,
formatter: function (decimalValue) {
if (decimalValue !== null) {
return decimalValue.toFixed(2);
} else {
return null;
}
}
})
});

View File

@ -421,7 +421,11 @@ const ShopfloorStatistics = ({ setRedirect, setRedirectUrl, t }) => {
text: currentValue + ' (' + unit + ')',
sort: true,
formatter: function (decimalValue) {
if (decimalValue !== null) {
return decimalValue.toFixed(2);
} else {
return null;
}
}
})
});

View File

@ -441,7 +441,11 @@ const SpaceCost = ({ setRedirect, setRedirectUrl, t }) => {
text: currentValue + ' (' + unit + ')',
sort: true,
formatter: function (decimalValue) {
if (decimalValue !== null) {
return decimalValue.toFixed(2);
} else {
return null;
}
}
});
});
@ -450,7 +454,11 @@ const SpaceCost = ({ setRedirect, setRedirectUrl, t }) => {
text: t('Total') + ' (' + json['reporting_period']['total_unit'] + ')',
sort: true,
formatter: function (decimalValue) {
if (decimalValue !== null) {
return decimalValue.toFixed(2);
} else {
return null;
}
}
});
setDetailedDataTableColumns(detailed_column_list);
@ -486,7 +494,11 @@ const SpaceCost = ({ setRedirect, setRedirectUrl, t }) => {
text: currentValue + ' (' + unit + ')',
sort: true,
formatter: function (decimalValue) {
if (decimalValue !== null) {
return decimalValue.toFixed(2);
} else {
return null;
}
}
});
});
@ -495,7 +507,11 @@ const SpaceCost = ({ setRedirect, setRedirectUrl, t }) => {
text: t('Total') + ' (' + json['child_space']['total_unit'] + ')',
sort: true,
formatter: function (decimalValue) {
if (decimalValue !== null) {
return decimalValue.toFixed(2);
} else {
return null;
}
}
});

View File

@ -442,7 +442,11 @@ const SpaceEnergyCategory = ({ setRedirect, setRedirectUrl, t }) => {
text: currentValue + ' (' + unit + ')',
sort: true,
formatter: function (decimalValue) {
if (decimalValue !== null) {
return decimalValue.toFixed(2);
} else {
return null;
}
}
})
});
@ -476,7 +480,11 @@ const SpaceEnergyCategory = ({ setRedirect, setRedirectUrl, t }) => {
text: currentValue + ' (' + unit + ')',
sort: true,
formatter: function (decimalValue) {
if (decimalValue !== null) {
return decimalValue.toFixed(2);
} else {
return null;
}
}
});
});

View File

@ -374,7 +374,11 @@ const SpaceEnergyItem = ({ setRedirect, setRedirectUrl, t }) => {
text: currentValue + ' (' + unit + ')',
sort: true,
formatter: function (decimalValue) {
if (decimalValue !== null) {
return decimalValue.toFixed(2);
} else {
return null;
}
}
})
});
@ -408,7 +412,11 @@ const SpaceEnergyItem = ({ setRedirect, setRedirectUrl, t }) => {
text: currentValue + ' (' + unit + ')',
sort: true,
formatter: function (decimalValue) {
if (decimalValue !== null) {
return decimalValue.toFixed(2);
} else {
return null;
}
}
});
});

View File

@ -365,7 +365,11 @@ const SpaceIncome = ({ setRedirect, setRedirectUrl, t }) => {
text: currentValue + ' (' + unit + ')',
sort: true,
formatter: function (decimalValue) {
if (decimalValue !== null) {
return decimalValue.toFixed(2);
} else {
return null;
}
}
});
});
@ -374,7 +378,11 @@ const SpaceIncome = ({ setRedirect, setRedirectUrl, t }) => {
text: t('Total') + ' (' + json['reporting_period']['total_unit'] + ')',
sort: true,
formatter: function (decimalValue) {
if (decimalValue !== null) {
return decimalValue.toFixed(2);
} else {
return null;
}
}
});
setDetailedDataTableColumns(detailed_column_list);
@ -410,7 +418,11 @@ const SpaceIncome = ({ setRedirect, setRedirectUrl, t }) => {
text: currentValue + ' (' + unit + ')',
sort: true,
formatter: function (decimalValue) {
if (decimalValue !== null) {
return decimalValue.toFixed(2);
} else {
return null;
}
}
});
});
@ -419,7 +431,11 @@ const SpaceIncome = ({ setRedirect, setRedirectUrl, t }) => {
text: t('Total') + ' (' + json['child_space']['total_unit'] + ')',
sort: true,
formatter: function (decimalValue) {
if (decimalValue !== null) {
return decimalValue.toFixed(2);
} else {
return null;
}
}
});

View File

@ -337,7 +337,11 @@ const SpaceOutput = ({ setRedirect, setRedirectUrl, t }) => {
text: currentValue + ' (' + unit + ')',
sort: true,
formatter: function (decimalValue) {
if (decimalValue !== null) {
return decimalValue.toFixed(2);
} else {
return null;
}
}
})
});
@ -371,7 +375,11 @@ const SpaceOutput = ({ setRedirect, setRedirectUrl, t }) => {
text: currentValue + ' (' + unit + ')',
sort: true,
formatter: function (decimalValue) {
if (decimalValue !== null) {
return decimalValue.toFixed(2);
} else {
return null;
}
}
});
});

View File

@ -378,7 +378,11 @@ const SpaceSaving = ({ setRedirect, setRedirectUrl, t }) => {
text: currentValue + ' (' + unit + ')',
sort: true,
formatter: function (decimalValue) {
if (decimalValue !== null) {
return decimalValue.toFixed(2);
} else {
return null;
}
}
})
});
@ -412,7 +416,11 @@ const SpaceSaving = ({ setRedirect, setRedirectUrl, t }) => {
text: currentValue + ' (' + unit + ')',
sort: true,
formatter: function (decimalValue) {
if (decimalValue !== null) {
return decimalValue.toFixed(2);
} else {
return null;
}
}
});
});

View File

@ -348,7 +348,11 @@ const SpaceStatistics = ({ setRedirect, setRedirectUrl, t }) => {
text: currentValue + ' (' + unit + ')',
sort: true,
formatter: function (decimalValue) {
if (decimalValue !== null) {
return decimalValue.toFixed(2);
} else {
return null;
}
}
})
});

View File

@ -204,7 +204,11 @@ const StoreBatch = ({ setRedirect, setRedirectUrl, t }) => {
text: currentValue['name'] + ' (' + currentValue['unit_of_measure'] + ')',
sort: true,
formatter: function (decimalValue) {
if (decimalValue !== null) {
return decimalValue.toFixed(2);
} else {
return null;
}
}
})
});

View File

@ -469,7 +469,11 @@ const StoreCost = ({ setRedirect, setRedirectUrl, t }) => {
text: currentValue + ' (' + unit + ')',
sort: true,
formatter: function (decimalValue) {
if (decimalValue !== null) {
return decimalValue.toFixed(2);
} else {
return null;
}
}
});
});
@ -478,7 +482,11 @@ const StoreCost = ({ setRedirect, setRedirectUrl, t }) => {
text: t('Total') + ' (' + json['reporting_period']['total_unit'] + ')',
sort: true,
formatter: function (decimalValue) {
if (decimalValue !== null) {
return decimalValue.toFixed(2);
} else {
return null;
}
}
});
setDetailedDataTableColumns(detailed_column_list);

View File

@ -483,7 +483,11 @@ const StoreEnergyCategory = ({ setRedirect, setRedirectUrl, t }) => {
text: currentValue + ' (' + unit + ')',
sort: true,
formatter: function (decimalValue) {
if (decimalValue !== null) {
return decimalValue.toFixed(2);
} else {
return null;
}
}
})
});

View File

@ -444,7 +444,11 @@ const StoreEnergyItem = ({ setRedirect, setRedirectUrl, t }) => {
text: currentValue + ' (' + unit + ')',
sort: true,
formatter: function (decimalValue) {
if (decimalValue !== null) {
return decimalValue.toFixed(2);
} else {
return null;
}
}
})
});

View File

@ -445,7 +445,11 @@ const StoreSaving = ({ setRedirect, setRedirectUrl, t }) => {
text: currentValue + ' (' + unit + ')',
sort: true,
formatter: function (decimalValue) {
if (decimalValue !== null) {
return decimalValue.toFixed(2);
} else {
return null;
}
}
})
});

View File

@ -420,7 +420,11 @@ const StoreStatistics = ({ setRedirect, setRedirectUrl, t }) => {
text: currentValue + ' (' + unit + ')',
sort: true,
formatter: function (decimalValue) {
if (decimalValue !== null) {
return decimalValue.toFixed(2);
} else {
return null;
}
}
})
});

View File

@ -207,14 +207,22 @@ const TenantBatch = ({ setRedirect, setRedirectUrl, t }) => {
text: currentValue['name'] + ' (' + currentValue['unit_of_measure'] + ')',
sort: true,
formatter: function (decimalValue) {
if (decimalValue !== null) {
return decimalValue.toFixed(2);
} else {
return null;
}
}
},{
dataField: 'a' + (2 * index + 1),
text: currentValue['name'] + ' ' + t('Maximum Load') + ' (' + currentValue['unit_of_measure'] + ')',
sort: true,
formatter: function (decimalValue) {
if (decimalValue !== null) {
return decimalValue.toFixed(2);
} else {
return null;
}
}
})
});

View File

@ -469,7 +469,11 @@ const TenantCost = ({ setRedirect, setRedirectUrl, t }) => {
text: currentValue + ' (' + unit + ')',
sort: true,
formatter: function (decimalValue) {
if (decimalValue !== null) {
return decimalValue.toFixed(2);
} else {
return null;
}
}
});
});
@ -478,7 +482,11 @@ const TenantCost = ({ setRedirect, setRedirectUrl, t }) => {
text: t('Total') + ' (' + json['reporting_period']['total_unit'] + ')',
sort: true,
formatter: function (decimalValue) {
if (decimalValue !== null) {
return decimalValue.toFixed(2);
} else {
return null;
}
}
});
setDetailedDataTableColumns(detailed_column_list);

View File

@ -482,7 +482,11 @@ const TenantEnergyCategory = ({ setRedirect, setRedirectUrl, t }) => {
text: currentValue + ' (' + unit + ')',
sort: true,
formatter: function (decimalValue) {
if (decimalValue !== null) {
return decimalValue.toFixed(2);
} else {
return null;
}
}
})
});

View File

@ -444,7 +444,11 @@ const TenantEnergyItem = ({ setRedirect, setRedirectUrl, t }) => {
text: currentValue + ' (' + unit + ')',
sort: true,
formatter: function (decimalValue) {
if (decimalValue !== null) {
return decimalValue.toFixed(2);
} else {
return null;
}
}
})
});

View File

@ -447,7 +447,11 @@ const TenantSaving = ({ setRedirect, setRedirectUrl, t }) => {
text: currentValue + ' (' + unit + ')',
sort: true,
formatter: function (decimalValue) {
if (decimalValue !== null) {
return decimalValue.toFixed(2);
} else {
return null;
}
}
})
});

View File

@ -422,7 +422,11 @@ const TenantStatistics = ({ setRedirect, setRedirectUrl, t }) => {
text: currentValue + ' (' + unit + ')',
sort: true,
formatter: function (decimalValue) {
if (decimalValue !== null) {
return decimalValue.toFixed(2);
} else {
return null;
}
}
})
});

View File

@ -343,7 +343,11 @@ const Dashboard = ({ setRedirect, setRedirectUrl, t }) => {
text: currentValue + ' (' + unit + ')',
sort: true,
formatter: function (decimalValue) {
if (decimalValue !== null) {
return decimalValue.toFixed(2);
} else {
return null;
}
}
});
});
@ -354,7 +358,11 @@ const Dashboard = ({ setRedirect, setRedirectUrl, t }) => {
text: currentValue + ' (' + unit + ')',
sort: true,
formatter: function (decimalValue) {
if (decimalValue !== null) {
return decimalValue.toFixed(2);
} else {
return null;
}
}
});
});