CEC-3916 add max range (#296)
* CEC-3916 Add max range Magna should not have access to self serve CAN page * Max range
This commit is contained in:
@@ -27,18 +27,19 @@ const windowState = (value) => {
|
||||
|
||||
const DigitalTwin = (props) => {
|
||||
const classes = useStyles();
|
||||
const { battery, doors, location, trex_version, ip, updated, windows, misc_windows, sunroof, dbc_version, door_locks, vcu0x260, charging_metrics } = props;
|
||||
const { battery, doors, location, trex_version, ip, updated, windows, misc_windows, sunroof, dbc_version, door_locks, vcu0x260, charging_metrics, max_range } = props;
|
||||
|
||||
return (
|
||||
<div>
|
||||
{!battery && !doors && !location && !windows && !vcu0x260 && !charging_metrics && (
|
||||
<p>No vehicle data to display.</p>
|
||||
)}
|
||||
{battery && (
|
||||
{(battery || max_range) && (
|
||||
<div className={classes.popupSection}>
|
||||
<h3>Battery</h3>
|
||||
{keyValueTemplate("Percentage", `${battery.percent || 0}%`)}
|
||||
{keyValueTemplate("Total Mileage", `${battery.total_mileage_odometer || UNKNOWN}`)}
|
||||
{keyValueTemplate("Percentage", `${battery?.percent || 0}%`)}
|
||||
{keyValueTemplate("Total Mileage", battery?.total_mileage_odometer || UNKNOWN)}
|
||||
{keyValueTemplate("Max Range", max_range?.max_miles || UNKNOWN)}
|
||||
</div>
|
||||
)}
|
||||
{(vcu0x260 || charging_metrics) && (
|
||||
@@ -113,12 +114,12 @@ const DigitalTwin = (props) => {
|
||||
)}
|
||||
{updated != null && (
|
||||
<div className={classes.popupSection}>
|
||||
{keyValueTemplate("Updated at", LocalDateTimeString(updated))}
|
||||
{keyValueTemplate("Updated At", LocalDateTimeString(updated))}
|
||||
</div>
|
||||
)}
|
||||
{dbc_version != null && (
|
||||
<div className={classes.popupSection}>
|
||||
{keyValueTemplate("DBC version", dbc_version)}
|
||||
{keyValueTemplate("DBC Version", dbc_version)}
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user