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={{
|
sx={{
|
||||||
width: '13%',
|
width: '13%',
|
||||||
textAlign: 'center',
|
textAlign: 'center',
|
||||||
|
backgroundColor:
|
||||||
backgroundColor: '#32CD32',
|
battery.Voltage < 32 || battery.Voltage > 63
|
||||||
color: 'black'
|
? '#FF033E'
|
||||||
|
: '#32CD32',
|
||||||
|
color: 'inherit'
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{battery.Voltage + ' ' + 'V'}
|
{battery.Voltage + ' V'}
|
||||||
</TableCell>
|
</TableCell>
|
||||||
<TableCell
|
<TableCell
|
||||||
sx={{
|
sx={{
|
||||||
|
|
@ -292,7 +294,12 @@ function BatteryViewSodioHome(props: BatteryViewSodioHomeProps) {
|
||||||
sx={{
|
sx={{
|
||||||
width: '8%',
|
width: '8%',
|
||||||
textAlign: 'center',
|
textAlign: 'center',
|
||||||
backgroundColor: '#32CD32',
|
backgroundColor:
|
||||||
|
battery.Soc > 20
|
||||||
|
? '#32CD32'
|
||||||
|
: battery.Soc >= 10
|
||||||
|
? '#ffbf00'
|
||||||
|
: '#FF033E',
|
||||||
color: 'inherit'
|
color: 'inherit'
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue