added SodistoreHome Battery View Soc and Voltage Color code in frontend
This commit is contained in:
parent
58bd0611a3
commit
71e2644866
|
|
@ -271,12 +271,14 @@ function BatteryViewSodioHome(props: BatteryViewSodioHomeProps) {
|
|||
sx={{
|
||||
width: '13%',
|
||||
textAlign: 'center',
|
||||
|
||||
backgroundColor: '#32CD32',
|
||||
color: 'black'
|
||||
backgroundColor:
|
||||
battery.Voltage < 32 || battery.Voltage > 63
|
||||
? '#FF033E'
|
||||
: '#32CD32',
|
||||
color: 'inherit'
|
||||
}}
|
||||
>
|
||||
{battery.Voltage + ' ' + 'V'}
|
||||
{battery.Voltage + ' V'}
|
||||
</TableCell>
|
||||
<TableCell
|
||||
sx={{
|
||||
|
|
@ -292,7 +294,12 @@ function BatteryViewSodioHome(props: BatteryViewSodioHomeProps) {
|
|||
sx={{
|
||||
width: '8%',
|
||||
textAlign: 'center',
|
||||
backgroundColor: '#32CD32',
|
||||
backgroundColor:
|
||||
battery.Soc > 20
|
||||
? '#32CD32'
|
||||
: battery.Soc >= 10
|
||||
? '#ffbf00'
|
||||
: '#FF033E',
|
||||
color: 'inherit'
|
||||
}}
|
||||
>
|
||||
|
|
|
|||
Loading…
Reference in New Issue