Add read-only Noya admin panel with assignments and UX polish.

Ship admin auth, user overview, assessments, chats, assignment filters/export, security hardening, and a separate desktop admin shell with clearer assessment answers.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
ar.badiei
2026-09-21 08:00:24 +03:30
co-authored by Cursor
parent 8016b8f45e
commit c6243caa35
104 changed files with 15654 additions and 415 deletions
+7 -4
View File
@@ -22,11 +22,12 @@ type StepState = 'open' | 'locked' | 'done';
export default function AccountPage() {
const { effectiveUserId, isGuest, guestSessionHydrated, user } = useAuth();
const { progress, loading, permissions } = useLearningJourney(effectiveUserId ?? undefined);
const { currentSession, isProgramComplete, programProgress } = useCurrentSession(effectiveUserId);
const { currentSession, isProgramComplete, programProgress, progressLoading } =
useCurrentSession(effectiveUserId);
const navigate = useNavigate();
const usernameLabel = isGuest ? 'مهمان' : user?.email?.trim() || null;
if (!guestSessionHydrated || loading) {
if (!guestSessionHydrated || loading || progressLoading) {
return <CourseStatusSkeleton />;
}
@@ -55,7 +56,9 @@ export default function AccountPage() {
const displaySessionOrder =
currentSession?.order ??
(programDone ? PROGRAM_SESSION_COUNT : Math.max(effectiveProgramProgress.currentSessionOrder, 1));
(programDone
? PROGRAM_SESSION_COUNT
: Math.max(effectiveProgramProgress.currentSessionOrder || 1, 1));
const preState: StepState = preDone ? 'done' : 'open';
const trainingState: StepState = !permissions.canOpenTraining
@@ -70,7 +73,7 @@ export default function AccountPage() {
: 'locked';
return (
<div className="h-full min-h-0 flex-1 overflow-y-auto bg-slate-50 px-4 py-6 transition-colors duration-300 dark:bg-slate-900">
<div className="h-full min-h-0 flex-1 overflow-x-hidden overflow-y-auto bg-slate-50 px-4 py-6 transition-colors duration-300 dark:bg-slate-900">
<div className="mx-auto w-full max-w-md space-y-4">
<AnimationWrapper immediate className="space-y-1 pb-2">
<h1 className="text-2xl font-bold tracking-tight text-foreground">وضعیت دوره</h1>