used PvPower for Growatt and sum PvPower1-4 for Sinexcel in frontend
This commit is contained in:
parent
13b3e8cd63
commit
d3e3bedd65
|
|
@ -56,6 +56,12 @@ function TopologySodistoreHome(props: TopologySodistoreHomeProps) {
|
|||
: 0
|
||||
);
|
||||
|
||||
const pvPower =
|
||||
props.values?.InverterRecord?.PvPower ??
|
||||
['PvPower1', 'PvPower2', 'PvPower3', 'PvPower4']
|
||||
.map((key) => props.values?.InverterRecord?.[key] ?? 0)
|
||||
.reduce((sum, val) => sum + val, 0);
|
||||
|
||||
return (
|
||||
<Container maxWidth="xl" style={{ backgroundColor: 'white' }}>
|
||||
<Grid container>
|
||||
|
|
@ -169,7 +175,7 @@ function TopologySodistoreHome(props: TopologySodistoreHomeProps) {
|
|||
data: props.values?.InverterRecord
|
||||
? [
|
||||
{
|
||||
value: props.values.InverterRecord.PvPower,
|
||||
value: pvPower,
|
||||
unit: 'W'
|
||||
}
|
||||
]
|
||||
|
|
@ -181,13 +187,11 @@ function TopologySodistoreHome(props: TopologySodistoreHomeProps) {
|
|||
position: 'top',
|
||||
data: props.values?.InverterRecord
|
||||
? {
|
||||
value: props.values.InverterRecord.PvPower,
|
||||
value: pvPower,
|
||||
unit: 'W'
|
||||
}
|
||||
: undefined,
|
||||
amount: props.values?.InverterRecord
|
||||
? getAmount(highestConnectionValue, props.values.InverterRecord.PvPower)
|
||||
: 0,
|
||||
amount: props.values?.InverterRecord ? getAmount(highestConnectionValue, pvPower) : 0,
|
||||
showValues: showValues
|
||||
}}
|
||||
centerBox={{
|
||||
|
|
|
|||
Loading…
Reference in New Issue