From 38cc5d03bd1b3af023cf410afd90077c68fb48a7 Mon Sep 17 00:00:00 2001 From: rtenorioh Date: Thu, 25 May 2023 23:50:15 -0300 Subject: [PATCH] Ajustes --- frontend/src/components/Audio/index.jsx | 8 +++++--- .../src/components/NotificationsPopOver/index.js | 12 ++++++++---- frontend/src/components/TicketListItem/index.js | 1 + frontend/src/components/TicketsManager/index.js | 2 ++ 4 files changed, 16 insertions(+), 7 deletions(-) diff --git a/frontend/src/components/Audio/index.jsx b/frontend/src/components/Audio/index.jsx index 587796c8..ad41f31d 100644 --- a/frontend/src/components/Audio/index.jsx +++ b/frontend/src/components/Audio/index.jsx @@ -3,7 +3,7 @@ import React, { useRef, useEffect, useState } from "react"; const LS_NAME = 'audioMessageRate'; -export default function({url}) { +const Audio = ({url}) => { const audioRef = useRef(null); const [audioRate, setAudioRate] = useState( parseFloat(localStorage.getItem(LS_NAME) || "1") ); const [showButtonRate, setShowButtonRate] = useState(false); @@ -51,9 +51,11 @@ export default function({url}) { return ( <> {showButtonRate && } ); -} \ No newline at end of file +} + +export default Audio; \ No newline at end of file diff --git a/frontend/src/components/NotificationsPopOver/index.js b/frontend/src/components/NotificationsPopOver/index.js index af0c55f7..22e0f9fd 100644 --- a/frontend/src/components/NotificationsPopOver/index.js +++ b/frontend/src/components/NotificationsPopOver/index.js @@ -111,9 +111,9 @@ const NotificationsPopOver = () => { const UserQueues = user.queues.findIndex((users) => (users.id === data.ticket.queueId)); if ( (data.action === "create" && - !data.message.read && - (data.ticket.userId === user?.id || !data.ticket.userId) - && (UserQueues !== -1 || !data.ticket.queueId)) + !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); @@ -196,7 +196,11 @@ const NotificationsPopOver = () => { aria-label="Open Notifications" color="inherit" > - + diff --git a/frontend/src/components/TicketListItem/index.js b/frontend/src/components/TicketListItem/index.js index c2c6127c..27c98e68 100644 --- a/frontend/src/components/TicketListItem/index.js +++ b/frontend/src/components/TicketListItem/index.js @@ -399,6 +399,7 @@ const TicketListItem = ({ ticket, userId }) => { className={classes.newMessagesCount} badgeContent={ticket.unreadMessages} overlap="rectangular" + max={9999} classes={{ badge: classes.badgeStyle, }} diff --git a/frontend/src/components/TicketsManager/index.js b/frontend/src/components/TicketsManager/index.js index b8fbef0c..e73c64e0 100644 --- a/frontend/src/components/TicketsManager/index.js +++ b/frontend/src/components/TicketsManager/index.js @@ -188,6 +188,7 @@ const TicketsManager = () => { className={classes.badge} badgeContent={openCount} overlap="rectangular" + max={9999} color="secondary" > {i18n.t("tickets.tabs.open.title")} @@ -203,6 +204,7 @@ const TicketsManager = () => { className={classes.badge} badgeContent={pendingCount} overlap="rectangular" + max={9999} color="secondary" > {i18n.t("ticketsList.pendingHeader")}