diff --git a/.claude/settings.local.json b/.claude/settings.local.json index b269d00..da1c200 100644 --- a/.claude/settings.local.json +++ b/.claude/settings.local.json @@ -54,7 +54,25 @@ "Bash(dir:*)", "Bash(git reset:*)", "Bash(npx convex:*)", - "Bash(bun tsc:*)" + "Bash(bun tsc:*)", + "Bash(scp:*)", + "Bash(docker run:*)", + "Bash(cmd /c \"docker run -d --name postgres-dev -p 5432:5432 -e POSTGRES_PASSWORD=dev -e POSTGRES_DB=sistema_chamados postgres:18\")", + "Bash(cmd /c \"docker ps -a --filter name=postgres-dev\")", + "Bash(cmd /c \"docker --version && docker ps -a\")", + "Bash(powershell -Command \"docker --version\")", + "Bash(powershell -Command \"docker run -d --name postgres-dev -p 5432:5432 -e POSTGRES_PASSWORD=dev -e POSTGRES_DB=sistema_chamados postgres:18\")", + "Bash(dir \"D:\\Projetos IA\\sistema-de-chamados\" /b)", + "Bash(bunx prisma migrate:*)", + "Bash(bunx prisma db push:*)", + "Bash(bun run auth:seed:*)", + "Bash(set DATABASE_URL=postgresql://postgres:dev@localhost:5432/sistema_chamados:*)", + "Bash(bun tsx:*)", + "Bash(DATABASE_URL=\"postgresql://postgres:dev@localhost:5432/sistema_chamados\" bun tsx:*)", + "Bash(docker stop:*)", + "Bash(docker rm:*)", + "Bash(git commit -m \"$(cat <<''EOF''\nfeat(checklist): exibe descricao do template e do item no ticket\n\n- Adiciona campo templateDescription ao schema do checklist\n- Copia descricao do template ao aplicar checklist no ticket\n- Exibe ambas descricoes na visualizacao do ticket (template em italico)\n- Adiciona documentacao de desenvolvimento local (docs/LOCAL-DEV.md)\n- Corrige prisma-client.mjs para usar PostgreSQL em vez de SQLite\n\n🤖 Generated with [Claude Code](https://claude.com/claude-code)\n\nCo-Authored-By: Claude Opus 4.5 \nEOF\n)\")", + "Bash(timeout 90 git push:*)" ] } } diff --git a/convex/checklistTemplates.ts b/convex/checklistTemplates.ts index c9329b5..2ec9d28 100644 --- a/convex/checklistTemplates.ts +++ b/convex/checklistTemplates.ts @@ -232,6 +232,14 @@ export const create = mutation({ const archivedFlag = typeof isArchived === "boolean" ? isArchived : false const now = Date.now() + // DEBUG: Verificar descrição sendo salva + console.log("[DEBUG create template]", { + name: normalizedName, + descriptionInput: description, + normalizedDescription, + willSave: normalizedDescription ?? undefined, + }) + return ctx.db.insert("ticketChecklistTemplates", { tenantId, name: normalizedName, diff --git a/convex/tickets.ts b/convex/tickets.ts index fa79353..39ebe21 100644 --- a/convex/tickets.ts +++ b/convex/tickets.ts @@ -2807,6 +2807,13 @@ export const applyChecklistTemplate = mutation({ const now = Date.now(); const current = normalizeTicketChecklist(ticketDoc.checklist); + // DEBUG: Verificar se o template tem description + console.log("[DEBUG applyChecklistTemplate] Template:", { + id: String(template._id), + name: template.name, + description: template.description, + hasDescription: Boolean(template.description), + }); const result = applyChecklistTemplateToItems(current, template, { now, actorId }); if (result.added === 0) { return { ok: true, added: 0 };