Instrumento v2: 44 preguntas + widget text_short

This commit is contained in:
markosbenitez
2026-06-04 14:30:28 -03:00
parent 10c665d25c
commit d91ea6b2ff
11 changed files with 765 additions and 751 deletions

View File

@@ -35,16 +35,22 @@ function formatAnswer(question: Question, raw: FormAnswers[string]): string {
return String(raw)
}
// Section titles by first question code prefix
// Section titles by code prefix ('A', '1', '2', …)
const SECTION_TITLES: Record<string, string> = {
A: 'Datos Generales',
B: '¿Vivís con discapacidad?',
C: 'Familiares con Discapacidad',
D: 'Adultos Mayores a Cargo',
E: 'Tu Rol como Cuidador/a',
F: 'Impacto Económico',
G: 'Bienestar y Descanso',
H: 'Necesidades',
'1': 'Prevalencia: cuidado y discapacidad',
'2': 'Intensidad y rol del cuidado',
'3': 'Impacto económico del cuidado',
'4': 'Tiempo y descanso',
'5': 'Impacto en el trabajo',
'6': 'Conciencia organizacional',
'7': 'Para cerrar',
}
// 'A1' → 'A', '1.1' → '1', '6.4' → '6', '7.1' → '7'
function getSectionPrefix(code: string): string {
const m = code.match(/^([A-Za-z]+|\d+)/)
return m ? m[1] : code
}
export function SummaryScreen({
@@ -72,7 +78,7 @@ export function SummaryScreen({
<dl className="summary-list">
{visibleQuestions.map((q) => {
const section = q.code.replace(/\d+$/, '')
const section = getSectionPrefix(q.code)
const showHeader = section !== lastSection
lastSection = section