fix(chat): ajustes de texto, layout e icone do menu

- Mudar texto 'Chat #' para 'Ticket #' no desktop
- Passar ticketRef via URL para exibir numero correto
- Ajustar tamanho da janela minimizada (240px)
- Incluir ticketRef no checkMachineUpdates (Convex)
- Ajustar padding dos botoes no chat web
- Mudar icone 'Todos os tickets' para ClipboardList

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
rever-tecnologia 2025-12-09 13:06:03 -03:00
parent 3c2d1824fb
commit d20ebf7416
8 changed files with 35 additions and 25 deletions

View file

@ -38,9 +38,10 @@ function getFileIcon(fileName: string) {
interface ChatWidgetProps {
ticketId: string
ticketRef?: number
}
export function ChatWidget({ ticketId }: ChatWidgetProps) {
export function ChatWidget({ ticketId, ticketRef }: ChatWidgetProps) {
const [messages, setMessages] = useState<ChatMessage[]>([])
const [inputValue, setInputValue] = useState("")
const [isLoading, setIsLoading] = useState(true)
@ -267,7 +268,7 @@ export function ChatWidget({ ticketId }: ChatWidgetProps) {
<div className="pointer-events-auto flex items-center gap-2 rounded-full bg-slate-200 px-4 py-2 text-slate-600 shadow-lg">
<MessageCircle className="size-4" />
<span className="text-sm font-medium">
{ticketInfo ? `Chat #${ticketInfo.ref}` : "Chat"}
{ticketRef ? `Ticket #${ticketRef}` : ticketInfo?.ref ? `Ticket #${ticketInfo.ref}` : "Chat"}
</span>
<span className="size-2 rounded-full bg-slate-400" />
<span className="text-xs text-slate-500">Offline</span>
@ -287,7 +288,7 @@ export function ChatWidget({ ticketId }: ChatWidgetProps) {
>
<MessageCircle className="size-4" />
<span className="text-sm font-medium">
Chat #{ticketInfo?.ref}
Ticket #{ticketRef ?? ticketInfo?.ref}
</span>
<span className="size-2 rounded-full bg-emerald-400" />
<ChevronUp className="size-4" />
@ -321,9 +322,9 @@ export function ChatWidget({ ticketId }: ChatWidgetProps) {
Online
</span>
</div>
{ticketInfo && (
{(ticketRef || ticketInfo) && (
<p className="text-xs text-slate-500">
#{ticketInfo.ref} - {ticketInfo.agentName ?? "Suporte"}
Ticket #{ticketRef ?? ticketInfo?.ref} - {ticketInfo?.agentName ?? "Suporte"}
</p>
)}
</div>