Correção do count no Tableuser e atualizaçã para exibir a quantidade de tickets aberto/fechado em tempo real

pull/20/head
adriano 2022-08-10 12:55:56 -03:00
parent 3bfcf56ad8
commit ec19fb6799
2 changed files with 6 additions and 8 deletions

View File

@ -137,7 +137,7 @@ const TableUser = ({ classes, usersOnlineInfo, logout }) => {
<TableCell>
<div style={{ display: "flex", alignItems: "center", gap: "12px" }}>
<Typography className={classes.tableCounterOpen}>
{user.sumOpen === undefined ? 0 : user.sumOpen}
{user.sumOpen === undefined ? 0 : user.sumOpen.count}
</Typography>
<Typography className={classes.tableCounterClosed}>
{user.sumClosed === undefined ? 0 : user.sumClosed.count}

View File

@ -257,9 +257,7 @@ const Dashboard = () => {
socket.on("ticketStatus", (data) => {
if (data.action === "update") {
console.log(ticketStatusChange);
setStatus("");
console.log(ticketStatusChange);
setStatus(data.ticketStatus.status);
}
});
@ -281,7 +279,7 @@ const Dashboard = () => {
return () => {
socket.disconnect();
};
}, [ticketStatusChange]);
}, []);
useEffect(() => {
if (ticketStatusChange === "") return console.log("foi");