fix(map): convert actual demand display units

This commit is contained in:
2026-07-17 10:13:50 +08:00
parent d8ee2e1f0c
commit d986e563a6
4 changed files with 54 additions and 12 deletions
+4
View File
@@ -1,5 +1,9 @@
export const FLOW_DISPLAY_UNIT = "m³/h";
const M3H_FACTOR = 3600;
const LPS_FLOW_PROPERTIES = new Set(["flow", "actual_demand", "actualdemand"]);
export const isLpsFlowProperty = (property: string) =>
LPS_FLOW_PROPERTIES.has(property);
export const toM3h = (value: number, sourceUnit: string = "m³/s") => {
if (!Number.isFinite(value)) return Number.NaN;