CEC-287 Car connection status (#59)

* Car connection status

* Formatting
This commit is contained in:
John Wu
2021-06-23 14:48:19 -07:00
committed by GitHub
parent 5b37f39e74
commit a3b6b01bf3
6 changed files with 79 additions and 19 deletions

View File

@@ -10,6 +10,7 @@ import {
TablePagination,
TableRow,
} from "@material-ui/core";
import CheckCircleIcon from "@material-ui/icons/CheckCircle";
import { useVehicleContext } from "../../Contexts/VehicleContext";
import { useStatusContext } from "../../Contexts/StatusContext";
@@ -133,6 +134,14 @@ const CarSelectionTable = (props) => {
/>
</TableCell>
<TableCell align="center">
{row.connected && (
<>
<CheckCircleIcon
style={{ color: "Green", fontSize: 12 }}
/>
<span>&nbsp;</span>
</>
)}
<Link to={`/vehicle-status/${row.vin}`}>{row.vin}</Link>
</TableCell>
<TableCell align="center">{row.model}</TableCell>
@@ -177,6 +186,7 @@ CarSelectionTable.propTypes = {
selected: PropTypes.array.isRequired,
onSelect: PropTypes.func.isRequired,
onSelectAll: PropTypes.func.isRequired,
connectionStatus: PropTypes.bool,
};
export default CarSelectionTable;