UI: corrigir duplicidade do Encerrar, padronizar ciano, ajustar tamanho do ícone de tempo; atualizar cabeçalho do login; inverter ordem (Novo ticket à esquerda, Compartilhar à direita) no ticket individual
This commit is contained in:
parent
741a0b5b70
commit
2f798d934a
4 changed files with 47 additions and 45 deletions
|
|
@ -83,11 +83,13 @@ export function StatusSelect({
|
|||
value,
|
||||
tenantId,
|
||||
requesterName,
|
||||
showCloseButton = true,
|
||||
}: {
|
||||
ticketId: string
|
||||
value: TicketStatus
|
||||
tenantId: string
|
||||
requesterName?: string | null
|
||||
showCloseButton?: boolean
|
||||
}) {
|
||||
const { convexUserId } = useAuth()
|
||||
const actorId = (convexUserId ?? null) as Id<"users"> | null
|
||||
|
|
@ -104,38 +106,42 @@ export function StatusSelect({
|
|||
<Badge className={cn(baseBadgeClass, statusStyles[status]?.badgeClass ?? statusStyles.PENDING.badgeClass)}>
|
||||
{statusStyles[status]?.label ?? statusStyles.PENDING.label}
|
||||
</Badge>
|
||||
<Tooltip>
|
||||
<TooltipTrigger asChild>
|
||||
<Button
|
||||
type="button"
|
||||
size="icon"
|
||||
aria-label="Encerrar ticket"
|
||||
onClick={() => setCloseDialogOpen(true)}
|
||||
className="h-9 w-9 rounded-lg border border-emerald-300 bg-white text-emerald-700 transition hover:bg-emerald-50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-emerald-200"
|
||||
>
|
||||
<CheckCircle2 className="size-4" />
|
||||
</Button>
|
||||
</TooltipTrigger>
|
||||
<TooltipContent className="rounded-lg border border-slate-200 bg-white px-3 py-2 text-xs font-medium text-neutral-700 shadow-lg">
|
||||
Encerrar ticket
|
||||
</TooltipContent>
|
||||
</Tooltip>
|
||||
{showCloseButton ? (
|
||||
<Tooltip>
|
||||
<TooltipTrigger asChild>
|
||||
<Button
|
||||
type="button"
|
||||
size="icon"
|
||||
aria-label="Encerrar ticket"
|
||||
onClick={() => setCloseDialogOpen(true)}
|
||||
className="h-9 w-9 rounded-lg border border-[#00d6eb] bg-white text-[#00d6eb] transition hover:bg-[#00d6eb]/10 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[#00d6eb]/30"
|
||||
>
|
||||
<CheckCircle2 className="size-4" />
|
||||
</Button>
|
||||
</TooltipTrigger>
|
||||
<TooltipContent className="rounded-lg border border-slate-200 bg-white px-3 py-2 text-xs font-medium text-neutral-700 shadow-lg">
|
||||
Encerrar ticket
|
||||
</TooltipContent>
|
||||
</Tooltip>
|
||||
) : null}
|
||||
</div>
|
||||
{/* Dialog control moved to header; keep for status-only contexts */}
|
||||
<CloseTicketDialog
|
||||
open={closeDialogOpen}
|
||||
onOpenChange={(open) => {
|
||||
if (!open) setCloseDialogOpen(false)
|
||||
}}
|
||||
ticketId={ticketId}
|
||||
tenantId={tenantId}
|
||||
actorId={actorId}
|
||||
requesterName={requesterName}
|
||||
onSuccess={() => {
|
||||
setStatus("RESOLVED")
|
||||
setCloseDialogOpen(false)
|
||||
}}
|
||||
/>
|
||||
{/* Dialog control visível apenas quando o botão de encerrar está presente */}
|
||||
{showCloseButton ? (
|
||||
<CloseTicketDialog
|
||||
open={closeDialogOpen}
|
||||
onOpenChange={(open) => {
|
||||
if (!open) setCloseDialogOpen(false)
|
||||
}}
|
||||
ticketId={ticketId}
|
||||
tenantId={tenantId}
|
||||
actorId={actorId}
|
||||
requesterName={requesterName}
|
||||
onSuccess={() => {
|
||||
setStatus("RESOLVED")
|
||||
setCloseDialogOpen(false)
|
||||
}}
|
||||
/>
|
||||
) : null}
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -621,7 +621,7 @@ export function TicketSummaryHeader({ ticket }: TicketHeaderProps) {
|
|||
<div className="absolute right-6 top-6 flex items-center gap-3">
|
||||
<Button
|
||||
type="button"
|
||||
className="inline-flex items-center gap-2 rounded-lg border border-sky-300 bg-white px-3 py-1.5 text-sm font-semibold text-sky-700 transition hover:bg-sky-50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-sky-200"
|
||||
className="inline-flex items-center gap-2 rounded-lg border border-[#00d6eb] bg-white px-3 py-1.5 text-sm font-semibold text-[#00d6eb] transition hover:bg-[#00d6eb]/10 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[#00d6eb]/30"
|
||||
onClick={() => setCloseOpen(true)}
|
||||
>
|
||||
<CheckCircle2 className="size-4" /> Encerrar
|
||||
|
|
@ -633,7 +633,7 @@ export function TicketSummaryHeader({ ticket }: TicketHeaderProps) {
|
|||
className="inline-flex h-9 cursor-help items-center gap-2 rounded-full border border-slate-200 bg-white px-3 text-sm font-semibold text-neutral-700"
|
||||
title="Tempo total de atendimento"
|
||||
>
|
||||
<IconClock className="size-4 text-neutral-700" /> {formattedTotalWorked}
|
||||
<IconClock className="size-5 text-neutral-700" /> {formattedTotalWorked}
|
||||
</Badge>
|
||||
</TooltipTrigger>
|
||||
<TooltipContent className="rounded-lg border border-slate-200 bg-white px-3 py-2 text-xs font-medium text-neutral-700 shadow-lg">
|
||||
|
|
@ -692,6 +692,7 @@ export function TicketSummaryHeader({ ticket }: TicketHeaderProps) {
|
|||
value={status}
|
||||
tenantId={ticket.tenantId}
|
||||
requesterName={ticket.requester?.name ?? ticket.requester?.email ?? null}
|
||||
showCloseButton={false}
|
||||
/>
|
||||
{isPlaying ? (
|
||||
<Tooltip>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue