Merge dashboard-test: the CaMa dashboard's presentation over the FHIR measures, with TEA's history and summary kept

This commit is contained in:
Roberto Treviño Cervantes
2026-11-15 05:37:15 -06:00
133 changed files with 9936 additions and 290 deletions
@@ -96,6 +96,16 @@ export class IndicadoresMemory {
applied: { tipo: 'semestre', selection: { mode: 'todos' }, revision: 0 },
};
for (const tipo of types) state.editors[tipo] ??= newEditor(tipo, 'semestre');
// Legacy CaMa selections can contain several periods although its editor now shows one.
if (domain === 'cama' && stored) {
for (const editor of Object.values(state.editors)) {
if (editor?.draft.mode === 'explicit' && editor.draft.periodos.length > 1)
editor.draft = { mode: 'explicit', periodos: [editor.draft.periodos[0]] };
}
const selection = state.applied.selection;
if (selection.mode === 'explicit' && selection.periodos.length > 1)
state.applied = { ...state.applied, selection: { mode: 'explicit', periodos: [selection.periodos[0]] }, revision: state.applied.revision + 1 };
}
// Preserve an application whose capabilities changed: consumers explain incompatibility,
// rather than silently replacing or trimming the user's temporal selection.
return state;