Fix some errors in table users
parent
ec19fb6799
commit
72c2a6c353
|
@ -136,11 +136,19 @@ const TableUser = ({ classes, usersOnlineInfo, logout }) => {
|
||||||
|
|
||||||
<TableCell>
|
<TableCell>
|
||||||
<div style={{ display: "flex", alignItems: "center", gap: "12px" }}>
|
<div style={{ display: "flex", alignItems: "center", gap: "12px" }}>
|
||||||
<Typography className={classes.tableCounterOpen}>
|
<Typography className={classes.tableCounterOpen} title="Em Atendimento">
|
||||||
{user.sumOpen === undefined ? 0 : user.sumOpen.count}
|
{user.sumOpen
|
||||||
|
? user.sumOpen.count !== ""
|
||||||
|
? user.sumOpen.count
|
||||||
|
: 0
|
||||||
|
: 0}
|
||||||
</Typography>
|
</Typography>
|
||||||
<Typography className={classes.tableCounterClosed}>
|
<Typography className={classes.tableCounterClosed} title="Finalzados">
|
||||||
{user.sumClosed === undefined ? 0 : user.sumClosed.count}
|
{user.sumClosed
|
||||||
|
? user.sumClosed.count !== ""
|
||||||
|
? user.sumClosed.count
|
||||||
|
: 0
|
||||||
|
: 0}
|
||||||
</Typography>
|
</Typography>
|
||||||
</div>
|
</div>
|
||||||
</TableCell>
|
</TableCell>
|
||||||
|
@ -154,30 +162,26 @@ const TableUser = ({ classes, usersOnlineInfo, logout }) => {
|
||||||
gap: "12px",
|
gap: "12px",
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
{user.openClosedInQueue &&
|
||||||
|
user.openClosedInQueue.map((queue) => (
|
||||||
|
<Typography
|
||||||
|
key={queue.queueId}
|
||||||
|
className={classes.tableQueues}
|
||||||
|
title={queue.name}
|
||||||
|
style={{ backgroundColor: queue.color }}
|
||||||
|
>
|
||||||
|
{queue.countOpen ? queue.countOpen : "0"}
|
||||||
|
</Typography>
|
||||||
|
))}
|
||||||
<Typography
|
<Typography
|
||||||
className={classes.tableQueues}
|
className={classes.tableQueues}
|
||||||
title="Sem Fila"
|
title="Sem Fila"
|
||||||
style={{ backgroundColor: "grey" }}
|
style={{ backgroundColor: "grey" }}
|
||||||
>
|
>
|
||||||
{user.openClosedOutQueue.countOpen === 0
|
{user.openClosedOutQueue.countOpen === 0
|
||||||
? ""
|
? 0
|
||||||
: user.openClosedOutQueue.countOpen}
|
: user.openClosedOutQueue.countOpen}
|
||||||
</Typography>
|
</Typography>
|
||||||
|
|
||||||
{!user.openClosedInQueue ? (
|
|
||||||
<Typography>Nenhuma fila atribuida</Typography>
|
|
||||||
) : (
|
|
||||||
user.openClosedInQueue.map((queue) => (
|
|
||||||
<Typography
|
|
||||||
key={queue.queueId}
|
|
||||||
className={classes.tableQueues}
|
|
||||||
title={queue.name}
|
|
||||||
style={{ backgroundColor: queue.color }}
|
|
||||||
>
|
|
||||||
{queue.countOpen}
|
|
||||||
</Typography>
|
|
||||||
))
|
|
||||||
)}
|
|
||||||
</div>
|
</div>
|
||||||
</TableCell>
|
</TableCell>
|
||||||
|
|
||||||
|
@ -190,26 +194,7 @@ const TableUser = ({ classes, usersOnlineInfo, logout }) => {
|
||||||
gap: "12px",
|
gap: "12px",
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<div
|
{user.openClosedInQueue &&
|
||||||
style={{
|
|
||||||
display: "flex",
|
|
||||||
flexWrap: "wrap",
|
|
||||||
alignItems: "center",
|
|
||||||
gap: "12px",
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<Typography
|
|
||||||
className={classes.tableQueues}
|
|
||||||
title="Sem Fila"
|
|
||||||
style={{ backgroundColor: "grey" }}
|
|
||||||
>
|
|
||||||
{user.openClosedOutQueue.countClosed === 0
|
|
||||||
? ""
|
|
||||||
: user.openClosedOutQueue.countClosed}
|
|
||||||
</Typography>
|
|
||||||
{!user.openClosedInQueue ? (
|
|
||||||
<Typography>Nenhuma fila atribuida</Typography>
|
|
||||||
) : (
|
|
||||||
user.openClosedInQueue.map((queue) => (
|
user.openClosedInQueue.map((queue) => (
|
||||||
<Typography
|
<Typography
|
||||||
key={queue.queueId}
|
key={queue.queueId}
|
||||||
|
@ -217,11 +202,18 @@ const TableUser = ({ classes, usersOnlineInfo, logout }) => {
|
||||||
title={queue.name}
|
title={queue.name}
|
||||||
style={{ backgroundColor: queue.color }}
|
style={{ backgroundColor: queue.color }}
|
||||||
>
|
>
|
||||||
{queue.countClosed}
|
{queue.countClosed ? queue.countClosed : "0"}
|
||||||
|
</Typography>
|
||||||
|
))}
|
||||||
|
<Typography
|
||||||
|
className={classes.tableQueues}
|
||||||
|
title="Sem Fila"
|
||||||
|
style={{ backgroundColor: "grey" }}
|
||||||
|
>
|
||||||
|
{user.openClosedOutQueue.countOpen === 0
|
||||||
|
? 0
|
||||||
|
: user.openClosedOutQueue.countOpen}
|
||||||
</Typography>
|
</Typography>
|
||||||
))
|
|
||||||
)}
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</TableCell>
|
</TableCell>
|
||||||
<TableCell>
|
<TableCell>
|
||||||
|
@ -238,6 +230,7 @@ const TableUser = ({ classes, usersOnlineInfo, logout }) => {
|
||||||
) : (
|
) : (
|
||||||
<PowerSettingsNewIcon
|
<PowerSettingsNewIcon
|
||||||
style={{ color: "grey", cursor: "not-allowed" }}
|
style={{ color: "grey", cursor: "not-allowed" }}
|
||||||
|
title="Agente Não Logado"
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
</TableCell>
|
</TableCell>
|
||||||
|
|
|
@ -486,7 +486,6 @@ const Dashboard = () => {
|
||||||
usersOnlineInfo={usersOnlineInfo}
|
usersOnlineInfo={usersOnlineInfo}
|
||||||
logout={handleLogouOnlineUser}
|
logout={handleLogouOnlineUser}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
</Paper>
|
</Paper>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
Loading…
Reference in New Issue