error correction in notifications for already opened tickets

feat-scaling-ticket-remote-creation
gustavo-gsp 2024-03-20 14:08:35 -03:00
parent 52e63706c1
commit 18d0420949
1 changed files with 22 additions and 22 deletions

View File

@ -261,15 +261,14 @@ const NotificationsPopOver = () => {
})
}else{
user.queues.forEach(queue =>{
if(queue.id === notify.data.queue?.id){
if(queue.id === notify.data?.queue?.id){
isQueue = true;
}
})
}
if(!isQueue && notify){
if(!isQueue){
return;
}else {
const notification = new Notification(`${i18n.t("tickets.notification.messagePeding")} ${notify.data.queue?.name}`);
const notification = new Notification(`${i18n.t("tickets.notification.messagePeding")} ${notify.data?.queue?.name}`);
notification.onclick = e => {
e.preventDefault()
window.focus()
@ -287,6 +286,7 @@ const NotificationsPopOver = () => {
return [notification, ...prevState]
})
}
}
soundAlertRef.current()
}