diff --git a/web/convex/bootstrap.ts b/web/convex/bootstrap.ts index f837bca..0eadd01 100644 --- a/web/convex/bootstrap.ts +++ b/web/convex/bootstrap.ts @@ -10,8 +10,8 @@ export const ensureDefaults = mutation({ .collect(); if (existing.length === 0) { const queues = [ - { name: "Suporte N1", slug: "suporte-n1" }, - { name: "Suporte N2", slug: "suporte-n2" }, + { name: "Chamados", slug: "chamados" }, + { name: "Laboratório", slug: "laboratorio" }, { name: "Field Services", slug: "field-services" }, ]; for (const q of queues) { diff --git a/web/convex/seed.ts b/web/convex/seed.ts index a1c799c..2498ab1 100644 --- a/web/convex/seed.ts +++ b/web/convex/seed.ts @@ -13,8 +13,8 @@ export const seedDemo = mutation({ ? existingQueues : await Promise.all( [ - { name: "Suporte N1", slug: "suporte-n1" }, - { name: "Suporte N2", slug: "suporte-n2" }, + { name: "Chamados", slug: "chamados" }, + { name: "Laboratório", slug: "laboratorio" }, ].map((q) => ctx.db.insert("queues", { tenantId, name: q.name, slug: q.slug, teamId: undefined })) ).then((ids) => Promise.all(ids.map((id) => ctx.db.get(id)))) ; diff --git a/web/src/components/tickets/tickets-table.tsx b/web/src/components/tickets/tickets-table.tsx index 3f997fd..c168069 100644 --- a/web/src/components/tickets/tickets-table.tsx +++ b/web/src/components/tickets/tickets-table.tsx @@ -35,7 +35,6 @@ const channelLabel: Record = { const cellClass = "px-6 py-5 align-top text-sm text-neutral-700 first:pl-8 last:pr-8" const queueBadgeClass = "inline-flex items-center rounded-full border border-slate-200 bg-slate-50 px-3 py-1 text-xs font-semibold text-neutral-700" const channelBadgeClass = "inline-flex items-center gap-2 rounded-full border border-slate-200 bg-slate-50 px-3 py-1 text-xs font-semibold text-neutral-700" -const tagBadgeClass = "inline-flex items-center rounded-full border border-slate-200 bg-slate-50 px-2.5 py-0.5 text-[11px] font-medium text-neutral-600" const categoryBadgeClass = "inline-flex items-center gap-1 rounded-full border border-[#00e8ff]/50 bg-[#00e8ff]/10 px-2.5 py-0.5 text-[11px] font-semibold text-[#02414d]" const tableRowClass = "group border-b border-slate-100 text-sm transition-colors hover:bg-slate-100/70 last:border-none" @@ -170,17 +169,13 @@ export function TicketsTable({ tickets = ticketsMock }: TicketsTableProps) {
{ticket.requester.name} - {ticket.category ? ( - - {ticket.category.name} - {ticket.subcategory ? ` • ${ticket.subcategory.name}` : ""} - - ) : null} - {ticket.tags?.map((tag) => ( - - {tag} - - ))} + + {ticket.category + ? `${ticket.category.name}${ticket.subcategory ? ` • ${ticket.subcategory.name}` : ""}` + : "Sem categoria"} +
diff --git a/web/src/lib/mappers/__tests__/ticket.test.ts b/web/src/lib/mappers/__tests__/ticket.test.ts index 342b321..11d0fe8 100644 --- a/web/src/lib/mappers/__tests__/ticket.test.ts +++ b/web/src/lib/mappers/__tests__/ticket.test.ts @@ -35,7 +35,7 @@ describe("ticket mappers", () => { status: "OPEN", priority: "MEDIUM", channel: "EMAIL", - queue: "Suporte N1", + queue: "Chamados", requester: { id: "u1", name: "Ana", email: "a@a.com", teams: [] }, assignee: { id: "u2", name: "Bruno", email: "b@b.com", teams: [] }, updatedAt: now, diff --git a/web/src/lib/mocks/tickets.ts b/web/src/lib/mocks/tickets.ts index 87fd384..62ba03a 100644 --- a/web/src/lib/mocks/tickets.ts +++ b/web/src/lib/mocks/tickets.ts @@ -22,21 +22,21 @@ const users: Record = { name: "Ana Souza", email: "ana.souza@example.com", avatarUrl: "https://avatar.vercel.sh/ana", - teams: ["Suporte N1"], + teams: ["Chamados"], }, bruno: { id: "user-bruno", name: "Bruno Lima", email: "bruno.lima@example.com", avatarUrl: "https://avatar.vercel.sh/bruno", - teams: ["Suporte N1"], + teams: ["Chamados"], }, carla: { id: "user-carla", name: "Carla Menezes", email: "carla.menezes@example.com", avatarUrl: "https://avatar.vercel.sh/carla", - teams: ["Suporte N2"], + teams: ["Laboratório"], }, diego: { id: "user-diego", @@ -54,9 +54,9 @@ const users: Record = { }, } -const queues = [ - { id: "queue-suporte-n1", name: "Suporte N1", pending: 18, waiting: 4, breached: 2 }, - { id: "queue-suporte-n2", name: "Suporte N2", pending: 9, waiting: 3, breached: 1 }, +const queues = [ + { id: "queue-chamados", name: "Chamados", pending: 18, waiting: 4, breached: 2 }, + { id: "queue-laboratorio", name: "Laboratório", pending: 9, waiting: 3, breached: 1 }, { id: "queue-field", name: "Field Services", pending: 5, waiting: 2, breached: 0 }, ] @@ -70,7 +70,7 @@ const baseTickets = [ status: ticketStatusSchema.enum.OPEN, priority: ticketPrioritySchema.enum.URGENT, channel: ticketChannelSchema.enum.EMAIL, - queue: "Suporte N1", + queue: "Chamados", requester: users.eduarda, assignee: users.ana, slaPolicy: { @@ -100,7 +100,7 @@ const baseTickets = [ status: ticketStatusSchema.enum.PENDING, priority: ticketPrioritySchema.enum.HIGH, channel: ticketChannelSchema.enum.WHATSAPP, - queue: "Suporte N2", + queue: "Laboratório", requester: users.eduarda, assignee: users.carla, slaPolicy: { @@ -130,7 +130,7 @@ const baseTickets = [ status: ticketStatusSchema.enum.NEW, priority: ticketPrioritySchema.enum.MEDIUM, channel: ticketChannelSchema.enum.MANUAL, - queue: "Field Services", + queue: "Field Services", requester: users.eduarda, assignee: null, slaPolicy: null, @@ -151,7 +151,7 @@ const baseTickets = [ status: ticketStatusSchema.enum.ON_HOLD, priority: ticketPrioritySchema.enum.HIGH, channel: ticketChannelSchema.enum.CHAT, - queue: "Suporte N2", + queue: "Laboratório", requester: users.eduarda, assignee: users.carla, slaPolicy: { @@ -181,7 +181,7 @@ const baseTickets = [ status: ticketStatusSchema.enum.RESOLVED, priority: ticketPrioritySchema.enum.MEDIUM, channel: ticketChannelSchema.enum.EMAIL, - queue: "Suporte N1", + queue: "Chamados", requester: users.eduarda, assignee: users.bruno, slaPolicy: {