fix: remove duplicacao de comentario na troca de responsavel e corrige avatar
- Remove criacao automatica de comentario ao trocar responsavel (ja aparece na timeline) - Adiciona migration removeAssigneeChangeComments para limpar comentarios antigos - Adiciona campos description, type, options, answer ao schema de checklist no mapper - Cria mutation updateAvatar no Convex para sincronizar avatar com snapshots - Atualiza rota /api/profile/avatar para sincronizar com Convex ao adicionar/remover foto 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
59e9298d61
commit
9d1908a5aa
6 changed files with 193 additions and 78 deletions
|
|
@ -1,29 +0,0 @@
|
|||
import { describe, expect, it } from "bun:test"
|
||||
|
||||
import { buildAssigneeChangeComment } from "../convex/tickets"
|
||||
|
||||
describe("buildAssigneeChangeComment", () => {
|
||||
it("inclui nomes antigos e novos e quebra o motivo em parágrafos", () => {
|
||||
const html = buildAssigneeChangeComment("Transferir para o time B\nCliente solicitou gestor.", {
|
||||
previousName: "Ana",
|
||||
nextName: "Bruno",
|
||||
})
|
||||
|
||||
expect(html).toContain("Ana")
|
||||
expect(html).toContain("Bruno")
|
||||
expect(html).toContain("<p>Transferir para o time B</p>")
|
||||
expect(html).toContain("<p>Cliente solicitou gestor.</p>")
|
||||
})
|
||||
|
||||
it("escapa caracteres perigosos", () => {
|
||||
const html = buildAssigneeChangeComment("<script>alert(1)</script>", {
|
||||
previousName: "<Ana>",
|
||||
nextName: "Bruno & Co",
|
||||
})
|
||||
|
||||
expect(html).toContain("<Ana>")
|
||||
expect(html).toContain("Bruno & Co")
|
||||
expect(html).not.toContain("<script>")
|
||||
})
|
||||
})
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue