refactor: simplify ticket form and SLA configuration handling

- Removed SLA configuration selection from the TicketForm component to streamline the ticket creation process.
- Updated the abrir-chamado route to eliminate unnecessary SLA loading logic and directly pass loading state to the TicketForm.
- Enhanced the central-chamados route to support SLA configurations by priority, allowing for better management of SLA settings.
- Introduced new mutations for SLA configuration management, including creation, updating, and deletion of SLA settings.
- Improved email templates for ticket notifications, ensuring better communication with users regarding ticket status and updates.
This commit is contained in:
2025-11-16 15:41:16 -03:00
parent 24b8eb6a14
commit fb784d6f7e
6 changed files with 755 additions and 161 deletions

View File

@@ -913,7 +913,12 @@ export default defineSchema({
slaConfigs: defineTable({
nome: v.string(),
descricao: v.optional(v.string()),
setores: v.optional(v.array(v.string())),
prioridade: v.union(
v.literal("baixa"),
v.literal("media"),
v.literal("alta"),
v.literal("critica")
),
tempoRespostaHoras: v.number(),
tempoConclusaoHoras: v.number(),
tempoEncerramentoHoras: v.optional(v.number()),
@@ -925,6 +930,7 @@ export default defineSchema({
atualizadoEm: v.number(),
})
.index("by_ativo", ["ativo"])
.index("by_prioridade", ["prioridade", "ativo"])
.index("by_nome", ["nome"]),
ticketAssignments: defineTable({