From d73a85c38d3e01d7a1b0d793f8fb968ad6010cda Mon Sep 17 00:00:00 2001 From: Yinyin Liu Date: Tue, 3 Feb 2026 13:29:18 +0100 Subject: [PATCH] enabled Control Permission for Sinexcel on monitor in frontend --- csharp/App/Backend/DataTypes/Configuration.cs | 4 +- .../src/content/dashboards/Log/graph.util.tsx | 4 -- .../SodistoreHomeConfiguration.tsx | 50 +++++++++---------- 3 files changed, 26 insertions(+), 32 deletions(-) diff --git a/csharp/App/Backend/DataTypes/Configuration.cs b/csharp/App/Backend/DataTypes/Configuration.cs index 8c000a138..a99492044 100644 --- a/csharp/App/Backend/DataTypes/Configuration.cs +++ b/csharp/App/Backend/DataTypes/Configuration.cs @@ -25,7 +25,7 @@ public class Configuration return $"MinimumSoC: {MinimumSoC}, GridSetPoint: {GridSetPoint}, CalibrationChargeState: {CalibrationChargeState}, CalibrationChargeDate: {CalibrationChargeDate}, " + $"CalibrationDischargeState: {CalibrationDischargeState}, CalibrationDischargeDate: {CalibrationDischargeDate}, " + $"MaximumDischargingCurrent: {MaximumDischargingCurrent}, MaximumChargingCurrent: {MaximumChargingCurrent}, OperatingPriority: {OperatingPriority}, " + - $"BatteriesCount: {BatteriesCount}, ClusterNumber: {ClusterNumber}, PvNumber: {PvNumber}, GrowattControlPermission:{ControlPermission}, "+ + $"BatteriesCount: {BatteriesCount}, ClusterNumber: {ClusterNumber}, PvNumber: {PvNumber}, ControlPermission:{ControlPermission}, "+ $"SinexcelTimeChargeandDischargePower: {TimeChargeandDischargePower}, SinexcelStartTimeChargeandDischargeDayandTime: {StartTimeChargeandDischargeDayandTime}, SinexcelStopTimeChargeandDischargeDayandTime: {StopTimeChargeandDischargeDayandTime}"; } @@ -45,7 +45,7 @@ public class Configuration public string GetConfigurationSodistoreHome() { return $"MinimumSoC: {MinimumSoC}, MaximumDischargingCurrent: {MaximumDischargingCurrent}, MaximumChargingCurrent: {MaximumChargingCurrent}, OperatingPriority: {OperatingPriority}, " + - $"BatteriesCount: {BatteriesCount}, ClusterNumber: {ClusterNumber}, PvNumber: {PvNumber}, GrowattControlPermission:{ControlPermission}, "+ + $"BatteriesCount: {BatteriesCount}, ClusterNumber: {ClusterNumber}, PvNumber: {PvNumber}, ControlPermission:{ControlPermission}, "+ $"SinexcelTimeChargeandDischargePower: {TimeChargeandDischargePower}, SinexcelStartTimeChargeandDischargeDayandTime: {StartTimeChargeandDischargeDayandTime}, SinexcelStopTimeChargeandDischargeDayandTime: {StopTimeChargeandDischargeDayandTime}"; } } diff --git a/typescript/frontend-marios2/src/content/dashboards/Log/graph.util.tsx b/typescript/frontend-marios2/src/content/dashboards/Log/graph.util.tsx index 4ccc7d715..928ddcd1d 100644 --- a/typescript/frontend-marios2/src/content/dashboards/Log/graph.util.tsx +++ b/typescript/frontend-marios2/src/content/dashboards/Log/graph.util.tsx @@ -331,8 +331,6 @@ export interface JSONRecordData { BatteriesCount: number; ClusterNumber: number; PvNumber: number; - - //For SodistoerHome-Growatt: ControlPermission:boolean; //For SodistoerHome-Sinexcel: TimeChargeDischarge mode @@ -645,8 +643,6 @@ export type ConfigurationValues = { batteriesCount: number; clusterNumber: number; PvNumber: number; - - //For sodistoreHome-Growatt: controlPermission:boolean; // For sodistoreHome-Sinexcel: TimeChargeDischarge mode diff --git a/typescript/frontend-marios2/src/content/dashboards/SodiohomeInstallations/SodistoreHomeConfiguration.tsx b/typescript/frontend-marios2/src/content/dashboards/SodiohomeInstallations/SodistoreHomeConfiguration.tsx index 08a5ccb41..6aa7ad22a 100644 --- a/typescript/frontend-marios2/src/content/dashboards/SodiohomeInstallations/SodistoreHomeConfiguration.tsx +++ b/typescript/frontend-marios2/src/content/dashboards/SodiohomeInstallations/SodistoreHomeConfiguration.tsx @@ -281,33 +281,31 @@ function SodistoreHomeConfiguration(props: SodistoreHomeConfigurationProps) { autoComplete="off" > <> - {device === 3 && ( -
- - setFormValues((prev) => ({ - ...prev, - controlPermission: e.target.checked, - })) - } - sx={{ transform: "scale(1.4)", marginLeft: "15px" }} - /> - } +
+ + setFormValues((prev) => ({ + ...prev, + controlPermission: e.target.checked, + })) + } + sx={{ transform: "scale(1.4)", marginLeft: "15px" }} + /> + } - label={ - - } - /> -
- )} + label={ + + } + /> +