ENCOA-295

This commit is contained in:
Carlos-Mesquita
2024-12-26 12:26:17 +00:00
parent 958f74bd9c
commit f642e41bfa
13 changed files with 492 additions and 16 deletions

View File

@@ -97,13 +97,13 @@ export const sectionLabels = (module: Module, levelParts?: number) => {
label: `Section ${index + 1}`
}));
case 'level':
return levelParts !== undefined ?
Array.from({ length: levelParts }, (_, index) => ({
id: index + 1,
label: `Part ${index + 1}`
}))
:
[{ id: 1, label: "Part 1" }];
return levelParts !== undefined ?
Array.from({ length: levelParts }, (_, index) => ({
id: index + 1,
label: `Part ${index + 1}`
}))
:
[{ id: 1, label: "Part 1" }];
}
}
@@ -166,6 +166,16 @@ const defaultModuleSettings = (module: Module, minTimer: number): ModuleState =>
importModule: true,
importing: false,
edit: [],
instructionsState: {
isInstructionsOpen: false,
chosenOption: { value: "Automatic", label: "Automatic" },
currentInstructions: "",
presetInstructions: "",
customInstructions: "",
currentInstructionsURL: "",
presetInstructionsURL: "",
customInstructionsURL: "",
},
};
if (["reading", "writing"].includes(module)) {
state["type"] = "general";