feat: admin date-time calendar controller, dpp ui cleanup, 4-subject jee+neet tracker, calendar filter, and clean new account state
This commit is contained in:
@@ -142,17 +142,27 @@ export default function ProgressTrackerPage() {
|
||||
useEffect(() => {
|
||||
const targetExam = user?.target_exam || "JEE_Main";
|
||||
const isNeet = targetExam === "NEET";
|
||||
const isJeeNeet = targetExam === "JEE_NEET";
|
||||
|
||||
const mathDemoSubject: Subject = {
|
||||
name: "Mathematics",
|
||||
completionPct: 22,
|
||||
completionPct: 28,
|
||||
chapters: [
|
||||
{
|
||||
name: "Calculus",
|
||||
isExpanded: true,
|
||||
topics: [
|
||||
{ name: "Limits", status: "In Progress", accuracy: 60, questionsAttempted: 45 },
|
||||
{ name: "Derivatives", status: "Not Started", accuracy: 0, questionsAttempted: 0 },
|
||||
{ name: "Derivatives", status: "Practiced", accuracy: 72, questionsAttempted: 35 },
|
||||
{ name: "Integrals", status: "Not Started", accuracy: 0, questionsAttempted: 0 },
|
||||
]
|
||||
},
|
||||
{
|
||||
name: "Coordinate Geometry",
|
||||
isExpanded: false,
|
||||
topics: [
|
||||
{ name: "Straight Lines", status: "Practiced", accuracy: 80, questionsAttempted: 40 },
|
||||
{ name: "Circles", status: "Not Started", accuracy: 0, questionsAttempted: 0 },
|
||||
]
|
||||
}
|
||||
]
|
||||
@@ -169,6 +179,14 @@ export default function ProgressTrackerPage() {
|
||||
{ name: "Cell Wall", status: "Practiced", accuracy: 80, questionsAttempted: 60 },
|
||||
{ name: "Nucleus", status: "In Progress", accuracy: 50, questionsAttempted: 25 },
|
||||
]
|
||||
},
|
||||
{
|
||||
name: "Genetics & Evolution",
|
||||
isExpanded: false,
|
||||
topics: [
|
||||
{ name: "Mendelian Genetics", status: "Practiced", accuracy: 85, questionsAttempted: 55 },
|
||||
{ name: "Molecular Basis of Inheritance", status: "Not Started", accuracy: 0, questionsAttempted: 0 },
|
||||
]
|
||||
}
|
||||
]
|
||||
};
|
||||
@@ -183,6 +201,15 @@ export default function ProgressTrackerPage() {
|
||||
topics: [
|
||||
{ name: "Limits", status: "Not Started", accuracy: 0, questionsAttempted: 0 },
|
||||
{ name: "Derivatives", status: "Not Started", accuracy: 0, questionsAttempted: 0 },
|
||||
{ name: "Integrals", status: "Not Started", accuracy: 0, questionsAttempted: 0 },
|
||||
]
|
||||
},
|
||||
{
|
||||
name: "Coordinate Geometry",
|
||||
isExpanded: false,
|
||||
topics: [
|
||||
{ name: "Straight Lines", status: "Not Started", accuracy: 0, questionsAttempted: 0 },
|
||||
{ name: "Circles", status: "Not Started", accuracy: 0, questionsAttempted: 0 },
|
||||
]
|
||||
}
|
||||
]
|
||||
@@ -199,12 +226,29 @@ export default function ProgressTrackerPage() {
|
||||
{ name: "Cell Wall", status: "Not Started", accuracy: 0, questionsAttempted: 0 },
|
||||
{ name: "Nucleus", status: "Not Started", accuracy: 0, questionsAttempted: 0 },
|
||||
]
|
||||
},
|
||||
{
|
||||
name: "Genetics & Evolution",
|
||||
isExpanded: false,
|
||||
topics: [
|
||||
{ name: "Mendelian Genetics", status: "Not Started", accuracy: 0, questionsAttempted: 0 },
|
||||
{ name: "Molecular Basis of Inheritance", status: "Not Started", accuracy: 0, questionsAttempted: 0 },
|
||||
]
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
const base = isDemo ? [...DEMO_SUBJECTS] : [...ZERO_SUBJECTS];
|
||||
base.push(isDemo ? (isNeet ? bioDemoSubject : mathDemoSubject) : (isNeet ? bioZeroSubject : mathZeroSubject));
|
||||
|
||||
if (isJeeNeet) {
|
||||
// 4 Subjects for JEE + NEET: Physics, Chemistry, Mathematics, Biology
|
||||
base.push(isDemo ? mathDemoSubject : mathZeroSubject);
|
||||
base.push(isDemo ? bioDemoSubject : bioZeroSubject);
|
||||
} else if (isNeet) {
|
||||
base.push(isDemo ? bioDemoSubject : bioZeroSubject);
|
||||
} else {
|
||||
base.push(isDemo ? mathDemoSubject : mathZeroSubject);
|
||||
}
|
||||
|
||||
setSubjects(base);
|
||||
}, [isDemo, user?.target_exam]);
|
||||
@@ -232,7 +276,7 @@ export default function ProgressTrackerPage() {
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="grid grid-cols-1 md:grid-cols-3 gap-6 mb-8">
|
||||
<div className={`grid grid-cols-1 sm:grid-cols-2 ${subjects.length >= 4 ? 'lg:grid-cols-4' : 'md:grid-cols-3'} gap-6 mb-8`}>
|
||||
{subjects.map((sub, i) => (
|
||||
<Card key={i} className="border-border shadow-sm">
|
||||
<CardContent className="p-6 text-center">
|
||||
|
||||
Reference in New Issue
Block a user