ENCOA-255 Fixed the level import
This commit is contained in:
@@ -94,7 +94,13 @@ export const sectionLabels = (module: Module, levelParts?: number) => {
|
||||
label: `Section ${index + 1}`
|
||||
}));
|
||||
case 'level':
|
||||
return [{ 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" }];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user