feat(frontend): Phase 2/3 hardening release

Roadmap P0
- Ship /logo.svg fallback and rewire asset references (superseded later by
  the project-manager PNG in a separate commit).

Roadmap P1
- Response envelope alignment ({items,total,page,size}) across services
  and query hooks.
- Approval/ticket UX updates tied to the new backend rollback semantics.

Roadmap P2
- React.lazy + Vite manualChunks to split vendor-radix/charts/icons/forms
  from the main bundle and cut initial JS.
- Fix the 181 tsc errors (PaginationParams class + per-service generics).
- Auto-refresh flow for JWT refresh tokens wired into api-client.ts.

Roadmap P3
- i18n: i18next + language detector, en/ar locales, RTL auto-switch,
  LanguageToggle component in RoleLayout and AdminLmsLayout.
- GDPR: PrivacyCenter page for data export and right-to-erasure, backed
  by gdpr.service.ts; logout via AuthContext after erasure.
- Human-in-the-loop exam review UI: admin ExamReviewQueue + ExamReviewDetail
  pages, useExamReview hooks, exam-review.service.ts.
- AI quality loop: AIPromptEditor (versioning + render preview),
  AIFeedbackButtons for students, AIFeedbackTriage admin page, dedicated
  services, hooks, and types.
- Dark mode: ThemeProvider + ThemeToggle + chart color tokens.
- Accessibility: DialogDescription on every DialogContent; alert-dialog
  and sheet updates.
- Retire dead pages: ExamPage marketing, Index, ProfilePage import.
- Playwright e2e scaffolding: playwright.config.ts + e2e/login.spec.ts
  smoke tests, npm scripts test:e2e / test:e2e:install.

Made-with: Cursor
This commit is contained in:
Yamen Ahmad
2026-04-19 14:16:32 +04:00
parent dcf5ea6941
commit e70a2854f4
75 changed files with 3727 additions and 551 deletions

View File

@@ -8,21 +8,21 @@ export default function StudentTimetable() {
const { data: timetableSessions = [], isLoading } = useTimetable();
if (isLoading) return <div className="flex items-center justify-center min-h-[400px]"><div className="animate-spin rounded-full h-8 w-8 border-b-2 border-primary" /></div>;
const mySessions = timetableSessions.filter(s => ["c1", "c2", "c5", "c8"].includes(s.courseId));
const mySessions = timetableSessions.filter(s => ["c1", "c2", "c5", "c8"].includes(String(s.course_id)));
function getSessionAt(day: string, hour: string) {
return mySessions.find(s => s.day === day && s.startTime <= hour && s.endTime > hour);
return mySessions.find(s => s.day === day && s.start_time <= hour && s.end_time > hour);
}
function isStart(day: string, hour: string) {
return mySessions.find(s => s.day === day && s.startTime === hour);
return mySessions.find(s => s.day === day && s.start_time === hour);
}
function getSpan(session: (typeof mySessions)[0]) {
const start = parseInt(session.startTime.split(":")[0]);
const end = parseInt(session.endTime.split(":")[0]);
const startMin = parseInt(session.startTime.split(":")[1]);
const endMin = parseInt(session.endTime.split(":")[1]);
const start = parseInt(session.start_time.split(":")[0]);
const end = parseInt(session.end_time.split(":")[0]);
const startMin = parseInt(session.start_time.split(":")[1]);
const endMin = parseInt(session.end_time.split(":")[1]);
return (end - start) + (endMin > 0 ? 0.5 : 0) - (startMin > 0 ? 0.5 : 0);
}
@@ -55,8 +55,8 @@ export default function StudentTimetable() {
className="rounded-md p-2 text-xs text-white"
style={{ backgroundColor: session.color, minHeight: `${getSpan(session) * 48}px` }}
>
<p className="font-semibold">{session.courseName}</p>
<p className="opacity-80">{session.startTime}-{session.endTime}</p>
<p className="font-semibold">{session.course_name}</p>
<p className="opacity-80">{session.start_time}-{session.end_time}</p>
<p className="opacity-70">{session.room}</p>
</div>
);