Commit Graph

10 Commits

Author SHA1 Message Date
Dev Server 75d6072309 fix: translate auth pages to Russian, fix backend error parsing, calendar timezone
- Translate forgot-password and reset-password pages to Russian
- Translate verify-email page to Russian
- Fix error message parsing: backend returns {error:{message}} not {message}
- Apply timezone fix in calendar (FullCalendar timeZone prop + fTime helper)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-12 16:50:51 +03:00
Dev Server f6caa7df6b feat: role-based UI for student/parent, child selector, timezone fix
- Role-based nav: hide payment/referrals for students, board/progress-children for parents
- Add "Мои группы" to student nav; groups detail page read-only for non-mentors
- Logout button in sidebar nav (signOut + redirect to login)
- Parent: auto-select first child, ChildSelector in nav above profile
- Children fetched from /parent/dashboard/ (not the broken /users/parents/children/)
- Add child by 8-char universal code with role validation (client only)
- Removed "Прогресс" button from child cards in children-view
- Fix redirect on child switch — stay on current page (no router.push)
- Parent child notification settings in profile (per-child + per-type toggles)
- Fix scroll on all pages: Main overflow auto, hasSidebar Box overflow auto
- Fix 403: isMentor guard before getStudents() calls in groups pages
- Fix timezone: FullCalendar timeZone prop + fTime() use user.timezone

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-12 16:45:15 +03:00
Dev Server 7cf7a78326 fix: dashboard — remove greeting & user card, fix weekly lessons count
- 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 <noreply@anthropic.com>
2026-03-09 21:33:48 +03:00
Dev Server 1b06404d64 feat: chat fixes, header cleanup, scrollbar, UI improvements
- chat: fix create_direct endpoint (was /chats/ → /chats/create_direct/ with user_id)
- chat: fix backend NotSupportedError — remove select_for_update()+distinct() combo
- chat: normalize chat objects (participant_id from other_participant.id)
- chat: enrich new chats with contact data so contacts section updates correctly
- chat: sendMessage — JSON when no file, FormData only with attachment
- chat: show send errors in UI instead of silent catch
- header: hide search, language, contacts, workspaces, account buttons
- theme: thin custom scrollbar (6px, theme-aware light/dark)
- settings: always high contrast, vertical nav only, purple default, Inter font
- settings-button: replaced gear icon with dark/light toggle + fullscreen button

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-09 21:25:36 +03:00
Dev Server da3736e131 feat: nav sidebar user card — real data + subscription info
- Show real avatar, full name, email from useAuthContext
- Fetch GET /subscriptions/subscriptions/active/ on mount
- Display subscription plan name (label: success=active, warning=trial, default=none)
- Show end date + days left text
- LinearProgress bar showing days remaining (red <20%, yellow <50%, green otherwise)
- Trial subscription displayed as 'Пробный: <plan>'

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-09 17:48:54 +03:00
Dev Server a62f53fd96 fix: vite dev server config — allowedHosts, Dockerfile, docker-compose
- vite.config.js: allowedHosts: true (accept all hosts behind nginx proxy)
- Dockerfile: switch from next to vite entrypoint, VITE_* build args
- docker-compose: VITE_* build args replacing NEXT_PUBLIC_* for front_minimal

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-09 17:24:07 +03:00
Dev Server b55c8dc602 feat: migrate front_minimal from Next.js to Vite + React SPA
- package.json: replace next scripts with vite dev/build/preview,
  add react-router-dom + vite/plugin-react/svgr devDeps, remove next + @mui/material-nextjs
- vite.config.js: add NEXT_PUBLIC_* → process.env define map for backward compat,
  add rollup manual chunks (mui, fullcalendar), loadEnv support
- front_minimal/.env: add VITE_* prefix vars alongside legacy NEXT_PUBLIC_*
- routes/sections.jsx: replace 691-line template routes with 160-line platform-only router
- routes/paths.js: trim to platform paths only (no mock IDs, no template pages)
- app.jsx: remove CheckoutProvider (not needed)
- theme-provider.jsx: remove AppRouterCacheProvider from @mui/material-nextjs
- routes/hooks: replace next/navigation re-exports with react-router-dom wrappers
  (useRouter → useNavigate adapter, useSearchParams, usePathname, useParams)
- routes/components/router-link.jsx: Link from react-router-dom
- sections: replace all next/navigation imports with react-router-dom
- analytics-view, my-progress-view: replace next/dynamic with direct import (no SSR)
- Remove all 'use client' directives (231 files) — not needed in Vite SPA
- Build: vite build ✓ in ~8s

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-09 17:04:53 +03:00
Dev Server f679f0c0f4 feat: board list view, excalidraw basePath fix, analytics, feedback pages
- Board: replace blank iframe with board list (my_boards + shared_with_me),
  mentor gets per-student buttons to open/create boards,
  iframe fills full available height via CSS vars (dvh)
- Excalidraw: build with NEXT_PUBLIC_BASE_PATH=/devboard so _next/ assets
  served under /devboard/_next/ and nginx path proxy works correctly
- Nginx: preserve /devboard/ path in proxy_pass (no trailing slash),
  add /yjs WebSocket proxy to devapi.uchill.online for dev YJS on port 1235
- Analytics: real API charts (income/lessons/students) with DateRangePicker
- Feedback: mentor kanban view of completed lessons, grade + notes drawer
- Nav: dynamic role-based menu (getNavData(role)), mentor-only analytics/feedback
- New API utils: analytics-api.js, board-api.js (full), dashboard-api getLessons()
- Routes: paths.dashboard.analytics, feedback, board added

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-09 16:35:30 +03:00
Dev Server d4ec417ebf feat: migrate Homework, Materials, Students, Notifications to front_minimal
- Homework: kanban view with columns (pending/submitted/returned/reviewed/fill_later/ai_draft), details drawer with submission list for mentor, submit drawer for client, edit draft drawer; full AI-grade support
- Materials: grid view with image preview, upload and delete dialogs
- Students: mentor view with student list + pending requests + invite by email/code; client view with mentors list + incoming invitations + send request by mentor code
- Notifications: full page + NotificationsDrawer in header connected to real API (mark read, delete, mark all)
- New API utils: homework-api.js, materials-api.js, students-api.js, notifications-api.js
- Added routes: /dashboard/homework, /dashboard/materials, /dashboard/students, /dashboard/notifications
- Updated navigation config with new items

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-09 10:09:30 +03:00
Dev Server 17bed2b321 feat: calendar form improvements + real-time sync
Deploy to Dev / deploy-dev (push) Successful in 27s Details
2026-03-08 02:46:06 +03:00