diff --git a/src/modules/chat/components/ChatConversationList.jsx b/src/modules/chat/components/ChatConversationList.jsx index 914ade2..50515cd 100644 --- a/src/modules/chat/components/ChatConversationList.jsx +++ b/src/modules/chat/components/ChatConversationList.jsx @@ -46,6 +46,32 @@ function PresenceDot({ status }) { ); } +function UnreadBadge({ count }) { + if (!count) return null; + + return ( + + {count > 99 ? '99+' : count} + + ); +} + +const CHAT_LIST_HEIGHT = 'min(640px, calc(100vh - 220px))'; + export function ChatConversationList({ contacts, activeContactId, @@ -62,7 +88,9 @@ export function ChatConversationList({ display: 'grid', gridTemplateRows: 'auto minmax(0, 1fr)', gap: '0.85rem', - height: isMobile ? 'auto' : 'min(760px, calc(100vh - 190px))', + height: isMobile ? 'auto' : CHAT_LIST_HEIGHT, + maxHeight: isMobile ? 'none' : CHAT_LIST_HEIGHT, + alignSelf: 'start', minHeight: 0, }} > @@ -78,6 +106,8 @@ export function ChatConversationList({ display: 'grid', gap: '0.75rem', gridTemplateColumns: isMobile ? '1fr' : '1fr', + gridAutoRows: 'max-content', + alignContent: 'start', overflowY: 'auto', minHeight: 0, paddingRight: '0.15rem', @@ -115,27 +145,28 @@ export function ChatConversationList({
- {contact.unread ? ( - - {contact.unread} - - ) : null} +
{contact.preview} ); })} + + {contacts.length === 0 ? ( +
+ Nenhuma conversa ativa na sua fila. Conversas em triagem do Omnino aparecem aqui depois de classificadas. +
+ ) : null} ); diff --git a/src/modules/chat/components/ChatTransferPanel.jsx b/src/modules/chat/components/ChatTransferPanel.jsx index 2470ada..14eb4df 100644 --- a/src/modules/chat/components/ChatTransferPanel.jsx +++ b/src/modules/chat/components/ChatTransferPanel.jsx @@ -4,6 +4,7 @@ export function ChatTransferPanel({ setTransferArea, transferAreas, attendants, + isSameUserArea = true, transferAttendant, setTransferAttendant, transferNote, @@ -69,17 +70,30 @@ export function ChatTransferPanel({