From c3fa2a53faafbd2a71e3107ce83f62f2ad093607 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A0=D0=BE=D1=81=D0=B8=D0=BD=20=D0=A1=D0=B5=D0=BC=D1=91?= =?UTF-8?q?=D0=BD?= Date: Wed, 22 Apr 2026 20:16:14 +0300 Subject: [PATCH 1/4] fix: user groups without name counting --- hwproj.front/src/components/Courses/StudentStats.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/hwproj.front/src/components/Courses/StudentStats.tsx b/hwproj.front/src/components/Courses/StudentStats.tsx index 8cd990e4a..a38cf001c 100644 --- a/hwproj.front/src/components/Courses/StudentStats.tsx +++ b/hwproj.front/src/components/Courses/StudentStats.tsx @@ -313,6 +313,7 @@ const StudentStats: React.FC = (props) => {
{studentGroups + .filter(g => g.name && g.name.trim().length != 0) .map(r => r.name) .join(', ')}
From f097fc76d86f6b8759aa2a89671185217b810d28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A0=D0=BE=D1=81=D0=B8=D0=BD=20=D0=A1=D0=B5=D0=BC=D1=91?= =?UTF-8?q?=D0=BD?= Date: Wed, 22 Apr 2026 20:17:30 +0300 Subject: [PATCH 2/4] fix: trim group names --- hwproj.front/src/components/Courses/StudentStats.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hwproj.front/src/components/Courses/StudentStats.tsx b/hwproj.front/src/components/Courses/StudentStats.tsx index a38cf001c..744b5ec4c 100644 --- a/hwproj.front/src/components/Courses/StudentStats.tsx +++ b/hwproj.front/src/components/Courses/StudentStats.tsx @@ -314,7 +314,7 @@ const StudentStats: React.FC = (props) => {
{studentGroups .filter(g => g.name && g.name.trim().length != 0) - .map(r => r.name) + .map(r => r.name!.trim()) .join(', ')}
} From 2f89174be7712b526e33efe4211841ce96d91b75 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A0=D0=BE=D1=81=D0=B8=D0=BD=20=D0=A1=D0=B5=D0=BC=D1=91?= =?UTF-8?q?=D0=BD?= Date: Wed, 22 Apr 2026 20:31:41 +0300 Subject: [PATCH 3/4] fix: remove unneccesary trim --- hwproj.front/src/components/Courses/StudentStats.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hwproj.front/src/components/Courses/StudentStats.tsx b/hwproj.front/src/components/Courses/StudentStats.tsx index 744b5ec4c..e91ab2666 100644 --- a/hwproj.front/src/components/Courses/StudentStats.tsx +++ b/hwproj.front/src/components/Courses/StudentStats.tsx @@ -313,8 +313,8 @@ const StudentStats: React.FC = (props) => {
{studentGroups - .filter(g => g.name && g.name.trim().length != 0) - .map(r => r.name!.trim()) + .filter(g => g.name && g.name.length != 0) + .map(r => r.name) .join(', ')}
} From a9650453795f7951856dac7c9a5b7881686bd7dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A0=D0=BE=D1=81=D0=B8=D0=BD=20=D0=A1=D0=B5=D0=BC=D1=91?= =?UTF-8?q?=D0=BD?= Date: Wed, 22 Apr 2026 20:39:02 +0300 Subject: [PATCH 4/4] refactor --- hwproj.front/src/components/Courses/StudentStats.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hwproj.front/src/components/Courses/StudentStats.tsx b/hwproj.front/src/components/Courses/StudentStats.tsx index e91ab2666..0c9ae77e3 100644 --- a/hwproj.front/src/components/Courses/StudentStats.tsx +++ b/hwproj.front/src/components/Courses/StudentStats.tsx @@ -313,7 +313,7 @@ const StudentStats: React.FC = (props) => {
{studentGroups - .filter(g => g.name && g.name.length != 0) + .filter(g => g.name?.trim()) .map(r => r.name) .join(', ')}