Skip to content

Commit

Permalink
Filtrar Notificações pelo Setor do Usuário
Browse files Browse the repository at this point in the history
  • Loading branch information
rtenorioh committed Jul 29, 2022
1 parent 53bf789 commit 8e66d6a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion frontend/src/components/NotificationsPopOver/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,10 +108,12 @@ const NotificationsPopOver = () => {
});

socket.on("appMessage", data => {
const UserQueues = user.queues.findIndex((users) => (users.id === data.ticket.queueId));
if (
data.action === "create" &&
(data.action === "create" &&
!data.message.read &&
(data.ticket.userId === user?.id || !data.ticket.userId)
&& (UserQueues !== -1 || !data.ticket.queueId))
) {
setNotifications(prevState => {
const ticketIndex = prevState.findIndex(t => t.id === data.ticket.id);
Expand Down

0 comments on commit 8e66d6a

Please sign in to comment.