From 7cf7a7832657ab0c112c2864816a0ba3e52ed553 Mon Sep 17 00:00:00 2001 From: Dev Server Date: Mon, 9 Mar 2026 21:33:48 +0300 Subject: [PATCH] =?UTF-8?q?fix:=20dashboard=20=E2=80=94=20remove=20greetin?= =?UTF-8?q?g=20&=20user=20card,=20fix=20weekly=20lessons=20count?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - remove greeting header (mentor & client dashboards) - remove CourseMyAccount user info block from right panel (mentor) - lessons_this_week: compute client-side from upcoming_lessons filtered to remaining lessons in current Mon–Sun range (was using backend value) Co-Authored-By: Claude Sonnet 4.6 --- .../client/view/overview-client-view.jsx | 10 ------- .../course/view/overview-course-view.jsx | 27 ++++++++++--------- 2 files changed, 15 insertions(+), 22 deletions(-) diff --git a/front_minimal/src/sections/overview/client/view/overview-client-view.jsx b/front_minimal/src/sections/overview/client/view/overview-client-view.jsx index 8bd5d5e..6857515 100644 --- a/front_minimal/src/sections/overview/client/view/overview-client-view.jsx +++ b/front_minimal/src/sections/overview/client/view/overview-client-view.jsx @@ -237,16 +237,6 @@ export function OverviewClientView({ childId, childName }) { borderRight: { lg: `solid 1px ${varAlpha(theme.vars.palette.grey['500Channel'], 0.12)}` }, }} > - {/* Greeting */} - - - Привет, {displayName}! 👋 - - - Твой прогресс и ближайшие занятия. - - - {/* Stat widgets */} { + const upcoming = stats?.upcoming_lessons || []; + const now = new Date(); + const day = now.getDay(); // 0=вс, 1=пн, ..., 6=сб + const diffToMon = (day === 0 ? -6 : 1 - day); + const mon = new Date(now); mon.setHours(0, 0, 0, 0); mon.setDate(now.getDate() + diffToMon); + const sun = new Date(mon); sun.setDate(mon.getDate() + 6); sun.setHours(23, 59, 59, 999); + return upcoming.filter((l) => { + const t = new Date(l.start_time); + return t >= now && t >= mon && t <= sun; + }).length; + }, [stats]); + // Последние сданные ДЗ const recentSubmissions = stats?.recent_submissions || []; @@ -283,14 +295,9 @@ export function OverviewCourseView() { {/* ЛЕВАЯ ЧАСТЬ */} - - Привет, {user?.first_name || 'Ментор'}! 🦾 - Ваша активность и доходы. - - - + @@ -310,10 +317,6 @@ export function OverviewCourseView() { {/* ПРАВАЯ ЧАСТЬ */} - - - - {/* Ближайшие уроки */}