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:
@@ -55,6 +55,13 @@ exports[`DigitalTwinTab Render 1`] = `
|
||||
:
|
||||
unknown
|
||||
</p>
|
||||
<p>
|
||||
<b>
|
||||
Max Range
|
||||
</b>
|
||||
:
|
||||
577
|
||||
</p>
|
||||
</div>
|
||||
<div
|
||||
class="makeStyles-popupSection-0"
|
||||
@@ -195,7 +202,7 @@ exports[`DigitalTwinTab Render 1`] = `
|
||||
>
|
||||
<p>
|
||||
<b>
|
||||
Updated at
|
||||
Updated At
|
||||
</b>
|
||||
:
|
||||
7/26/2022 12:26:38 AM
|
||||
@@ -206,7 +213,7 @@ exports[`DigitalTwinTab Render 1`] = `
|
||||
>
|
||||
<p>
|
||||
<b>
|
||||
DBC version
|
||||
DBC Version
|
||||
</b>
|
||||
:
|
||||
d439abd3662dd20099f49dd8f43f7b145202e961caa2b5aba2c6154c8096348b
|
||||
|
||||
@@ -26,10 +26,12 @@ const TabViews = [
|
||||
{
|
||||
label: "Details",
|
||||
component: CarDetailsTab,
|
||||
rolesPerProvider: Permissions.FiskerMagnaRead,
|
||||
},
|
||||
{
|
||||
label: "Car Updates",
|
||||
component: CarUpdatesTab,
|
||||
rolesPerProvider: Permissions.FiskerMagnaRead,
|
||||
},
|
||||
{
|
||||
label: "CAN Filters",
|
||||
@@ -39,22 +41,27 @@ const TabViews = [
|
||||
{
|
||||
label: "Digital Twin",
|
||||
component: DigitalTwinTab,
|
||||
rolesPerProvider: Permissions.FiskerMagnaRead,
|
||||
},
|
||||
{
|
||||
label: "CAN Signals",
|
||||
component: CANSignalsTab,
|
||||
rolesPerProvider: Permissions.FiskerMagnaRead,
|
||||
},
|
||||
{
|
||||
label: "T.Rex logs",
|
||||
component: TRexLogsTab,
|
||||
rolesPerProvider: Permissions.FiskerMagnaRead,
|
||||
},
|
||||
{
|
||||
label: "ECUs",
|
||||
component: ECUsTab,
|
||||
rolesPerProvider: Permissions.FiskerMagnaRead,
|
||||
},
|
||||
{
|
||||
label: "Remote Commands",
|
||||
component: RemoteCommandsTab,
|
||||
rolesPerProvider: Permissions.FiskerMagnaCreate,
|
||||
},
|
||||
{
|
||||
label: "Fleets",
|
||||
@@ -63,7 +70,8 @@ const TabViews = [
|
||||
},
|
||||
{
|
||||
label: "CAN Signal Export",
|
||||
component: SelfServeTab
|
||||
component: SelfServeTab,
|
||||
rolesPerProvider: Permissions.FiskerRead,
|
||||
}
|
||||
];
|
||||
|
||||
|
||||
@@ -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