From 4d9c6abc89a7063cd19fb43573786b839542eecd Mon Sep 17 00:00:00 2001 From: Truong Vo <41848815+vmtruong301296@users.noreply.github.com> Date: Thu, 4 Dec 2025 08:26:13 +0700 Subject: [PATCH] =?UTF-8?q?Hi=E1=BB=87u=20ch=E1=BB=89nh=20thanh=20bottom?= =?UTF-8?q?=20bar=20g=E1=BB=8Dn=20h=C6=A1n?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- FRONTEND/src/components/BottomToolBar.tsx | 125 ++++++++++--------- FRONTEND/src/components/Component.module.css | 3 +- 2 files changed, 70 insertions(+), 58 deletions(-) diff --git a/FRONTEND/src/components/BottomToolBar.tsx b/FRONTEND/src/components/BottomToolBar.tsx index 583c4a7..774ff85 100644 --- a/FRONTEND/src/components/BottomToolBar.tsx +++ b/FRONTEND/src/components/BottomToolBar.tsx @@ -479,7 +479,7 @@ const BottomToolBar = ({ @@ -523,7 +524,6 @@ const BottomToolBar = ({ setActiveTabBottom(val || "command"); }} className={classes.containerBottom} - style={{ height: "20vh" }} > - - + + - + {selectedLines.map((el) => ( ))} + + {selectedLines.length > 0 && ( + { + selectedLines.forEach((line) => { + socket?.emit("close_cli", { + lineId: line?.id, + stationId: line.stationId || line.station_id, + }); + }); + setSelectedLines([]); + }} + > + + Clear + + + )} - {selectedLines?.length > 0 ? ( - - ) : ( - "" - )} + /> + @@ -716,46 +760,13 @@ const BottomToolBar = ({ /> - - - { - const lines = station.lines.filter( - (line) => - !line?.userOpenCLI || - line?.userOpenCLI === user?.userName - ); - if (selectedLines.length !== lines.length) { - setSelectedLines(lines); - lines.forEach((line) => { - socket?.emit("open_cli", { - lineId: line.id, - stationId: line.stationId || line.station_id, - userEmail: user?.email, - userName: user?.userName, - }); - }); - } else { - selectedLines.forEach((line) => { - socket?.emit("close_cli", { - lineId: line?.id, - stationId: line.stationId || line.station_id, - }); - }); - setSelectedLines([]); - } - }} - /> + + { - // setSelectedLines([]); if ( selectedLines.length > 0 && selectedLines.length === station?.lines?.length diff --git a/FRONTEND/src/components/Component.module.css b/FRONTEND/src/components/Component.module.css index 9c0d388..45d6b78 100644 --- a/FRONTEND/src/components/Component.module.css +++ b/FRONTEND/src/components/Component.module.css @@ -121,7 +121,8 @@ } .containerBottom { - height: 22vh; + height: auto; + max-height: 20vh; padding: 8px; border: 1px solid #ccc; border-radius: 8px;