feat(answer-modal): conform aan dialog-pattern + entity-profile
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>
This commit is contained in:
parent
0a58557e9d
commit
4b0ab8e4b2
5 changed files with 192 additions and 100 deletions
10
lib/schemas/question-answer.ts
Normal file
10
lib/schemas/question-answer.ts
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
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>
|
||||
Loading…
Add table
Add a link
Reference in a new issue