From d9b7793eb516db8220dcbba62f81ca7fb0f35688 Mon Sep 17 00:00:00 2001 From: arpanetus Date: Fri, 14 Oct 2022 19:42:06 +0600 Subject: [PATCH] CEC-2640 Update online car filter to also include online HMIs (#220) --- src/components/Cars/List/index.jsx | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/components/Cars/List/index.jsx b/src/components/Cars/List/index.jsx index 69e5d18..0dbc101 100644 --- a/src/components/Cars/List/index.jsx +++ b/src/components/Cars/List/index.jsx @@ -16,6 +16,7 @@ const MainForm = () => { const classes = useStyles(); const [search, setSearch] = useState(""); const [online, setOnline] = useState(false); + const [onlineHMI, setOnlineHMI] = useState(false); const { setTitle, setSitePath } = useStatusContext(); const { token: { @@ -31,6 +32,10 @@ const MainForm = () => { setOnline(event.target.checked); } + const handleOnlineHMI = (event) => { + setOnlineHMI(event.target.checked); + } + useEffect(() => { setTitle("Vehicles"); setSitePath([]); @@ -58,6 +63,14 @@ const MainForm = () => { /> } label="Only online" /> + + + } label="Only online HMI" /> + @@ -66,7 +79,7 @@ const MainForm = () => { classes={classes} token={token} multiSelect={false} - search={{ search, online: online? true : null}} + search={{ search, online: online? true : null, online_hmi: onlineHMI? true : null }} /> );