Добавлена новая функция для отображения статистики курса в конфигурации и компоненте LessonList. Теперь статистика курса будет отображаться только при включенной функции.

This commit is contained in:
Primakov Alexandr Alexandrovich 2025-03-23 20:04:29 +03:00
parent d76d85dfcf
commit 32b0e004ca
2 changed files with 7 additions and 1 deletions

View File

@ -34,6 +34,11 @@ module.exports = {
value: '',
key: 'group.by.date',
},
'course.statistics': {
on: true,
value: '',
key: 'course.statistics',
},
},
},
config: {

View File

@ -46,6 +46,7 @@ const features = getFeatures('journal')
const barFeature = features?.['lesson.bar']
const groupByDate = features?.['group.by.date']
const courseStatistics = features?.['course.statistics']
const LessonList = () => {
const { courseId } = useParams()
@ -349,7 +350,7 @@ const LessonList = () => {
)}
{/* Статистика курса */}
{!showForm && (
{!showForm && courseStatistics && (
<CourseStatistics lessons={sorted} isLoading={isLoading} />
)}