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:
parent
d990450698
commit
ab2bcdc755
1 changed files with 4 additions and 0 deletions
|
|
@ -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,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue