fix(checklist): inclui description, type, options e answer na query getById

Os campos estavam sendo salvos corretamente no banco, mas a query
getById nao os incluia no mapeamento de resposta, fazendo com que
as opcoes de resposta e descricao nao aparecessem no frontend.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
esdrasrenan 2025-12-15 20:31:34 -03:00
parent d990450698
commit ab2bcdc755

View file

@ -2081,6 +2081,10 @@ export const getById = query({
? t.checklist.map((item) => ({ ? t.checklist.map((item) => ({
id: item.id, id: item.id,
text: item.text, text: item.text,
description: item.description ?? undefined,
type: item.type ?? "checkbox",
options: item.options ?? undefined,
answer: item.answer ?? undefined,
done: item.done, done: item.done,
required: typeof item.required === "boolean" ? item.required : true, required: typeof item.required === "boolean" ? item.required : true,
templateId: item.templateId ? String(item.templateId) : undefined, templateId: item.templateId ? String(item.templateId) : undefined,