feat(ask): add question and option notes

This commit is contained in:
Erik Kotsiuba
2026-04-17 16:50:53 +02:00
parent 52dfc4f9a6
commit 16ff8c42e2
7 changed files with 718 additions and 57 deletions
+4 -1
View File
@@ -34,6 +34,7 @@ export interface AskAnswer {
indices: number[];
customText?: string;
note?: string;
optionNotes?: Record<string, string>;
}
export interface AskResult {
@@ -48,7 +49,7 @@ export interface AskResult {
answers: Record<string, AskAnswer>;
}
export type ViewMode = "navigate" | "input" | "submit";
export type ViewMode = "navigate" | "input" | "note" | "submit";
export interface AskState {
title?: string;
@@ -58,6 +59,8 @@ export interface AskState {
submitIndex: number;
mode: ViewMode;
inputQuestionId: string | null;
noteQuestionId: string | null;
noteOptionValue: string | null;
answers: Record<string, AskAnswer>;
completed: boolean;
cancelled: boolean;