Story 7 van PBI "Alle dialogen conform docs/patterns/dialog.md". - lib/schemas/question-answer.ts — gedeeld zod-schema + ANSWER_MAX_CHARS constant - actions/questions.ts gebruikt het gedeelde schema - AnswerModal: entityDialog* layout-classes, useDirtyCloseGuard, useDialogSubmitShortcut, DemoTooltip rond submit + multiple-choice knoppen - docs/specs/dialogs/answer-modal.md — entity-profile Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
10 lines
300 B
TypeScript
10 lines
300 B
TypeScript
import { z } from 'zod'
|
|
|
|
export const ANSWER_MAX_CHARS = 4000
|
|
|
|
export const answerQuestionSchema = z.object({
|
|
questionId: z.string().cuid(),
|
|
answer: z.string().min(1, 'Antwoord mag niet leeg zijn').max(ANSWER_MAX_CHARS),
|
|
})
|
|
|
|
export type AnswerQuestionInput = z.infer<typeof answerQuestionSchema>
|