Update
This commit is contained in:
parent
c09f27da86
commit
caf3a5a696
|
|
@ -287,6 +287,7 @@ function App() {
|
|||
socket.off("user_close_cli");
|
||||
socket.off("confirm_take_over");
|
||||
socket.off("response_content_log");
|
||||
socket.off("data_textfsm");
|
||||
};
|
||||
}, [socket, stations, selectedLine]);
|
||||
|
||||
|
|
@ -366,7 +367,6 @@ function App() {
|
|||
|
||||
useEffect(() => {
|
||||
return () => {
|
||||
console.log("CLEANUP SOCKET CLI", selectedLine);
|
||||
if (selectedLine)
|
||||
socket?.emit("close_cli", {
|
||||
lineId: selectedLine?.id,
|
||||
|
|
@ -511,10 +511,17 @@ function App() {
|
|||
socket={socket}
|
||||
selectedLines={selectedLines.filter(
|
||||
(el) =>
|
||||
typeof el?.userEmailOpenCLI === "undefined" ||
|
||||
!el?.userEmailOpenCLI ||
|
||||
el?.userEmailOpenCLI === user?.email
|
||||
)}
|
||||
isDisable={isDisable || selectedLines.length === 0}
|
||||
isDisable={
|
||||
isDisable ||
|
||||
selectedLines.filter(
|
||||
(el) =>
|
||||
!el?.userEmailOpenCLI ||
|
||||
el?.userEmailOpenCLI === user?.email
|
||||
).length === 0
|
||||
}
|
||||
onClick={() => {
|
||||
setSelectedLines([]);
|
||||
setIsDisable(true);
|
||||
|
|
|
|||
|
|
@ -113,6 +113,7 @@ const CardLine = ({
|
|||
isDisabled={
|
||||
typeof line?.userOpenCLI !== "undefined" &&
|
||||
typeof line?.userOpenCLI === "string" &&
|
||||
line?.userOpenCLI.length > 0 &&
|
||||
line?.userOpenCLI !== user?.userName
|
||||
}
|
||||
line_status={line?.status || ""}
|
||||
|
|
|
|||
Loading…
Reference in New Issue