= { "AI Coach": "AI Coach", "Pro": "Pro", "Free": "Free" }
function formatDate(iso?: string | null) {
if (!iso) return "—"
@@ -164,7 +164,7 @@ export default function StudentKundliPage() {
>
-
+
) : (
@@ -178,13 +178,14 @@ export default function StudentKundliPage() {
onChange={e => setEditExam(e.target.value)}
className="text-sm bg-secondary border border-border rounded-lg px-3 py-1.5 focus:outline-none focus:ring-1 focus:ring-primary"
>
+
-
-
) : (
- {data.target_exam.replace("_", " ")}
+
+ {data.target_exam === "JEE_Main" ? "JEE" : data.target_exam.replace("_", " ")}
+
)}
diff --git a/src/app/admin/students/page.tsx b/src/app/admin/students/page.tsx
index eb23412..60bdf3a 100644
--- a/src/app/admin/students/page.tsx
+++ b/src/app/admin/students/page.tsx
@@ -9,13 +9,13 @@ import { useRouter } from "next/navigation"
import { useRef } from "react"
const TIER_STYLE: Record = {
- "Al_Coach": "bg-[var(--cyan-ai-10)] text-[var(--cyan-ai)] border-[var(--cyan-ai-20)] font-bold",
+ "AI Coach": "bg-[var(--cyan-ai-10)] text-[var(--cyan-ai)] border-[var(--cyan-ai-20)] font-bold",
"Pro": "bg-yellow-500/10 text-yellow-500 border-yellow-500/20 font-bold",
"Free": "bg-secondary text-foreground border-border",
}
const TIER_LABEL: Record = {
- "Al_Coach": "AI Coach",
+ "AI Coach": "AI Coach",
"Pro": "Pro",
"Free": "Free",
}
@@ -27,12 +27,14 @@ export default function StudentsPage() {
const [search, setSearch] = useState("")
const [selectedIds, setSelectedIds] = useState([])
const [deleting, setDeleting] = useState(false)
+ const [isUploading, setIsUploading] = useState(false)
const fileInputRef = useRef(null)
const handleBulkUpload = async (e: React.ChangeEvent) => {
const file = e.target.files?.[0]
if (!file) return
+ setIsUploading(true)
setLoading(true)
try {
const formData = new FormData()
@@ -68,6 +70,7 @@ export default function StudentsPage() {
} catch (err: any) {
alert("Error: " + err.message)
} finally {
+ setIsUploading(false)
setLoading(false)
if (fileInputRef.current) fileInputRef.current.value = ""
}
@@ -141,9 +144,10 @@ export default function StudentsPage() {
Delete ({selectedIds.length})
)}
-
-
- | {s.target_exam.replace("_", " ")} |
+
+ {s.target_exam === "JEE_Main" ? "JEE" : s.target_exam.replace("_", " ")}
+ |
{s.total_tests} |
= 80 ? "text-green-500" : s.avg_accuracy >= 60 ? "text-yellow-500" : "text-muted-foreground"}`}>
diff --git a/src/app/checkout/page.tsx b/src/app/checkout/page.tsx
index a3a4ea5..22d1bfe 100644
--- a/src/app/checkout/page.tsx
+++ b/src/app/checkout/page.tsx
@@ -64,7 +64,7 @@ function CheckoutContent() {
}
}, [userId, userLoading, router, tier])
- const amount = tier === "Al_Coach" ? 11999 : 3499
+ const amount = tier === "AI Coach" ? 11999 : 3499
const handlePayment = async () => {
if (!address.trim() || !phone.trim() || phone.length < 10) {
diff --git a/src/app/dashboard/layout.tsx b/src/app/dashboard/layout.tsx
index ea73875..3b52c79 100644
--- a/src/app/dashboard/layout.tsx
+++ b/src/app/dashboard/layout.tsx
@@ -350,7 +350,7 @@ export default function DashboardLayout({ children }: { children: ReactNode }) {
{user ? cleanDisplayName(user.name).split(" ")[0] : "Loading..."}
-
+
diff --git a/src/app/dashboard/page.tsx b/src/app/dashboard/page.tsx
index 77907d4..fb419eb 100644
--- a/src/app/dashboard/page.tsx
+++ b/src/app/dashboard/page.tsx
@@ -48,7 +48,7 @@ export default function DashboardPage() {
const rank = isNew ? "#--" : `#${userStats?.city_rank || 1} / ${userStats?.city_total || 50}`
const target = user?.target_exam === "NEET" ? "NEET" : "JEE"
- const plan = user?.tier === "Al_Coach" ? "AI Coach" : user?.tier || "Free"
+ const plan = user?.tier === "AI Coach" ? "AI Coach" : user?.tier || "Free"
const name = user?.name || "Student"
const date = new Intl.DateTimeFormat('en-IN', {
dateStyle: 'medium',
diff --git a/src/app/onboarding/page.tsx b/src/app/onboarding/page.tsx
index 2f29528..d54d293 100644
--- a/src/app/onboarding/page.tsx
+++ b/src/app/onboarding/page.tsx
@@ -33,9 +33,9 @@ const AI_COACH_FEATURES = [
export default function OnboardingPage() {
const router = useRouter();
- const [selecting, setSelecting] = useState<"Pro" | "Al_Coach" | null>(null);
+ const [selecting, setSelecting] = useState<"Pro" | "AI Coach" | null>(null);
- const handleSelect = async (plan: "Pro" | "Al_Coach") => {
+ const handleSelect = async (plan: "Pro" | "AI Coach") => {
setSelecting(plan);
// Save chosen plan preference to localStorage so dashboard can read it
if (typeof window !== "undefined") {
@@ -165,7 +165,7 @@ export default function OnboardingPage() {
background:
"linear-gradient(135deg, rgba(12,96,96,0.5) 0%, rgba(12,96,96,0.08) 100%)",
}}
- onClick={() => !selecting && handleSelect("Al_Coach")}
+ onClick={() => !selecting && handleSelect("AI Coach")}
>
{/* Most Popular Badge */}
@@ -201,12 +201,12 @@ export default function OnboardingPage() {
{
e.stopPropagation();
- if (!selecting) handleSelect("Al_Coach");
+ if (!selecting) handleSelect("AI Coach");
}}
disabled={!!selecting}
className="w-full h-12 rounded-xl bg-[var(--cyan-ai)] text-black font-bold text-base hover:bg-[var(--cyan-ai-80)] transition-all duration-300 shadow-[0_0_20px_-5px_rgba(12,96,96,0.5)] hover:shadow-[0_0_30px_-3px_rgba(12,96,96,0.8)] hover:-translate-y-0.5 disabled:opacity-70 disabled:cursor-not-allowed flex items-center justify-center gap-2"
>
- {selecting === "Al_Coach" ? (
+ {selecting === "AI Coach" ? (
<>
Starting Trial…
diff --git a/src/app/upgrade/page.tsx b/src/app/upgrade/page.tsx
index b261594..c11f8b8 100644
--- a/src/app/upgrade/page.tsx
+++ b/src/app/upgrade/page.tsx
@@ -87,7 +87,7 @@ export default function UpgradePage() {
handleUpgrade("Al_Coach")}
+ onClick={() => handleUpgrade("AI Coach")}
disabled={userLoading}
>
{userLoading ? : "Get AI Coach"}
diff --git a/src/components/AI/ProgressShare.tsx b/src/components/AI/ProgressShare.tsx
index a289dd2..c2a9949 100644
--- a/src/components/AI/ProgressShare.tsx
+++ b/src/components/AI/ProgressShare.tsx
@@ -15,7 +15,7 @@ export function ProgressShare() {
const accuracy = "85"
const name = user?.name || "Student"
const target = user?.target_exam === "NEET" ? "NEET" : "JEE"
- const plan = user?.tier === "Al_Coach" ? "AI Coach" : user?.tier || "Free"
+ const plan = user?.tier === "AI Coach" ? "AI Coach" : user?.tier || "Free"
const imageUrl = `/api/og/progress?streak=${streak}&accuracy=${accuracy}&name=${encodeURIComponent(name)}&target=${target}&plan=${encodeURIComponent(plan)}`
const handleDownload = async () => {
@@ -97,7 +97,7 @@ export function ProgressShare() {
{name}
- {user?.tier === "Al_Coach" ? "AI Coach Plan" : `${user?.tier || "Free"} Plan`}
+ {user?.tier === "AI Coach" ? "AI Coach Plan" : `${user?.tier || "Free"} Plan`}
{user?.target_exam === "NEET" ? "NEET Aspirant" : "JEE Aspirant"}
diff --git a/src/hooks/useActiveUser.ts b/src/hooks/useActiveUser.ts
index 285bf73..9fddf6b 100644
--- a/src/hooks/useActiveUser.ts
+++ b/src/hooks/useActiveUser.ts
@@ -14,7 +14,7 @@ export interface UserProfile {
school: string | null;
city: string;
state: string;
- tier: "Free" | "Pro" | "Al_Coach";
+ tier: "Free" | "Pro" | "AI Coach";
streak_count: number;
longest_streak: number;
active_session_token?: string;
@@ -48,14 +48,14 @@ export function computeTrialInfo(user: UserProfile | null, globalSettings: any):
trialDayNumber: number; // 1-based current day in trial
trialDaysRemaining: number; // days left (0 if expired)
trialTotalDays: number;
- effectiveTier: "Free" | "Pro" | "Al_Coach";
+ effectiveTier: "Free" | "Pro" | "AI Coach";
} {
const defaultResult = {
isTrialActive: false,
trialDayNumber: 0,
trialDaysRemaining: 0,
trialTotalDays: 0,
- effectiveTier: (user?.tier ?? "Free") as "Free" | "Pro" | "Al_Coach",
+ effectiveTier: (user?.tier ?? "Free") as "Free" | "Pro" | "AI Coach",
};
if (!user || !globalSettings) return defaultResult;
@@ -106,7 +106,7 @@ export function computeTrialInfo(user: UserProfile | null, globalSettings: any):
trialDaysRemaining,
trialTotalDays: trialDays,
effectiveTier: isTrialActive
- ? ((globalSettings.trial_tier as "Pro" | "Al_Coach") ?? "Al_Coach")
+ ? ((globalSettings.trial_tier as "Pro" | "AI Coach") ?? "AI Coach")
: "Free",
};
}
@@ -311,14 +311,14 @@ export function useActiveUser() {
case "weekly-test-series":
case "full-length-mock-tests":
case "previous-year-papers":
- case "detailed-performance-analytics":
case "chapter-wise-progress-tracking":
case "doubt-resolution-community":
case "parent-dashboard":
case "offline-mode":
case "pdf-export":
- return tier === "Pro" || tier === "Al_Coach";
+ return tier === "Pro" || tier === "AI Coach";
+ case "detailed-performance-analytics":
case "ai-coach-custom-schedules":
case "personalized-study-plan":
case "ai-tutor-doubt-resolution":
@@ -327,7 +327,7 @@ export function useActiveUser() {
case "ai-tutor-chat":
case "college-predictor":
case "exam-day-strategy":
- return tier === "Al_Coach";
+ return tier === "AI Coach";
default:
// Free tier features: DPS (1/day), basic dashboard, basic streak tracking, leaderboard
|