Ajusta layout da tabela de tickets
This commit is contained in:
parent
f3a7045691
commit
292de05039
6 changed files with 240 additions and 232 deletions
|
|
@ -36,7 +36,15 @@ export function PriorityIcon({ value }: { value: TicketPriority }) {
|
|||
return <ChevronsUp className={iconClass} />
|
||||
}
|
||||
|
||||
export function PrioritySelect({ ticketId, value }: { ticketId: string; value: TicketPriority }) {
|
||||
export function PrioritySelect({
|
||||
ticketId,
|
||||
value,
|
||||
className,
|
||||
}: {
|
||||
ticketId: string
|
||||
value: TicketPriority
|
||||
className?: string
|
||||
}) {
|
||||
const updatePriority = useMutation(api.tickets.updatePriority)
|
||||
const [priority, setPriority] = useState<TicketPriority>(value)
|
||||
const { convexUserId } = useAuth()
|
||||
|
|
@ -59,7 +67,7 @@ export function PrioritySelect({ ticketId, value }: { ticketId: string; value: T
|
|||
}
|
||||
}}
|
||||
>
|
||||
<SelectTrigger className={headerTriggerClass} aria-label="Atualizar prioridade">
|
||||
<SelectTrigger className={cn(headerTriggerClass, className)} aria-label="Atualizar prioridade">
|
||||
<SelectValue asChild>
|
||||
<Badge className={cn(priorityBadgeClass, priorityStyles[priority]?.badgeClass)}>
|
||||
<PriorityIcon value={priority} />
|
||||
|
|
@ -68,7 +76,11 @@ export function PrioritySelect({ ticketId, value }: { ticketId: string; value: T
|
|||
</Badge>
|
||||
</SelectValue>
|
||||
</SelectTrigger>
|
||||
<SelectContent className="rounded-lg border border-slate-200 bg-white text-neutral-800 shadow-sm">
|
||||
<SelectContent
|
||||
position="item-aligned"
|
||||
onCloseAutoFocus={(e) => e.preventDefault()}
|
||||
className="rounded-lg border border-slate-200 bg-white text-neutral-800 shadow-sm"
|
||||
>
|
||||
{(["LOW", "MEDIUM", "HIGH", "URGENT"] as const).map((option) => (
|
||||
<SelectItem key={option} value={option} className={priorityItemClass}>
|
||||
<span className="inline-flex items-center gap-2">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue