/** * DashboardPage.tsx * * Painel de fila de tickets — visão principal do agente de TI. * Exibe todos os chamados com filtros por status e prioridade. */ import { useState } from 'react'; import { useQuery } from '@tanstack/react-query'; import { api, type TicketStatus, type TicketPriority } from '@/lib/api'; import { TicketCard } from '@/components/tickets/TicketCard'; import styles from './DashboardPage.module.css'; // ─── Opções dos filtros ─────────────────────────────────────────────────────── const STATUS_OPTIONS: { value: TicketStatus | ''; label: string }[] = [ { value: '', label: 'Todos os status' }, { value: 'open', label: '🔵 Abertos' }, { value: 'in_progress', label: '🟣 Em Andamento' }, { value: 'waiting', label: '🟡 Aguardando' }, { value: 'resolved', label: '🟢 Resolvidos' }, { value: 'closed', label: '⚫ Fechados' }, ]; const PRIORITY_OPTIONS: { value: TicketPriority | ''; label: string }[] = [ { value: '', label: 'Todas as prioridades' }, { value: 'critical', label: '⚡ Crítica' }, { value: 'high', label: '↑ Alta' }, { value: 'medium', label: '→ Média' }, { value: 'low', label: '↓ Baixa' }, ]; // ─── Skeleton de carregamento ───────────────────────────────────────────────── function TicketSkeleton() { return (