Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
90 changes: 46 additions & 44 deletions src/app/student/assessment/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -277,25 +277,25 @@ export default function StudentAssessmentPage() {
case 'goal_setting':
return (
<div>
<h2 className="text-2xl font-bold mb-6">{currentStep.sectionTitle}</h2>
<div className="mb-4 text-muted-foreground" dangerouslySetInnerHTML={{ __html: assessmentData.goalSettingInstructions || `Define up to ${MAX_GOALS} personal or professional goals.` }} />
<h2 className="text-4xl font-bold mb-6 text-black">{currentStep.sectionTitle}</h2>
<div className="mb-4 text-black text-xl" dangerouslySetInnerHTML={{ __html: assessmentData.goalSettingInstructions || `Define up to ${MAX_GOALS} personal or professional goals.` }} />
<div className="space-y-4">
{goals.map((goal, index) => (
<div key={index} className="flex items-center gap-2">
<Input
value={goal}
onChange={(e) => handleGoalChange(index, e.target.value)}
placeholder={`Goal ${index + 1}`}
className="text-lg"
className="text-2xl p-4 border-2 border-black"
/>
<Button variant="ghost" size="icon" onClick={() => handleDeleteGoal(index)} disabled={goals.length <= 1 && !goals[0]}>
<Trash2 className="h-5 w-5 text-red-500" />
<Trash2 className="h-6 w-6 text-red-500" />
</Button>
</div>
))}
</div>
{goals.length < MAX_GOALS && (
<Button onClick={addGoal} variant="link" className="mt-2">Add another goal</Button>
<Button onClick={addGoal} variant="link" className="mt-2 text-xl">Add another goal</Button>
)}
</div>
);
Expand All @@ -305,34 +305,34 @@ export default function StudentAssessmentPage() {
if (currentStep.question.isInstruction) {
return (
<div>
<h2 className="text-2xl font-bold mb-2">{currentStep.sectionTitle}</h2>
<h2 className="text-4xl font-bold mb-2 text-black">{currentStep.sectionTitle}</h2>
{currentStep.isGoalQuestion && (
<p className="mb-4 p-2 bg-blue-50 border-l-4 border-blue-500 text-blue-800">
<p className="mb-4 p-3 bg-blue-50 border-l-4 border-blue-500 text-blue-800 text-xl">
Regarding your goal: <span className="font-bold">{currentStep.goal}</span>
</p>
)}
<div className="mt-6 p-4 border rounded-lg bg-gray-50">
<h3 className="block text-lg font-semibold mb-2">{currentStep.question.title}</h3>
<div className="text-sm text-muted-foreground" dangerouslySetInnerHTML={{ __html: currentStep.question.helpText }} />
<div className="mt-6 p-6 border rounded-lg bg-gray-100">
<h3 className="block text-3xl font-semibold mb-2 text-black">{currentStep.question.title}</h3>
<div className="text-xl text-black" dangerouslySetInnerHTML={{ __html: currentStep.question.helpText }} />
</div>
</div>
);
}
return (
<div>
<h2 className="text-2xl font-bold mb-2">{currentStep.sectionTitle}</h2>
<h2 className="text-4xl font-bold mb-2 text-black">{currentStep.sectionTitle}</h2>
{currentStep.isGoalQuestion && (
<p className="mb-4 p-2 bg-blue-50 border-l-4 border-blue-500 text-blue-800">
<p className="mb-4 p-3 bg-blue-50 border-l-4 border-blue-500 text-blue-800 text-xl">
Regarding your goal: <span className="font-bold">{currentStep.goal}</span>
</p>
)}
<div className="mt-6">
<label className="block text-lg font-semibold mb-2">{currentStep.question.title}</label>
<div className="text-sm text-muted-foreground mb-3" dangerouslySetInnerHTML={{ __html: currentStep.question.helpText }} />
<label className="block text-3xl font-semibold mb-3 text-black">{currentStep.question.title}</label>
<div className="text-xl text-black mb-4" dangerouslySetInnerHTML={{ __html: currentStep.question.helpText }} />
<Textarea
rows={8}
rows={10}
placeholder="Your answer..."
className="text-base"
className="text-2xl p-4 border-2 border-black"
value={answers[questionId] || ''}
onChange={(e) => handleAnswerChange(questionId, e.target.value)}
minLength={currentStep.question.minLength}
Expand Down Expand Up @@ -408,13 +408,13 @@ export default function StudentAssessmentPage() {
}

return (
<div className="container mx-auto p-4 md:p-8 max-w-4xl">
<Card>
<CardHeader>
<div className="w-full flex-grow flex flex-col bg-gray-50 relative">
<div className="absolute inset-0 overflow-y-auto">
<CardHeader className="sticky top-0 z-10 px-6 pt-6 bg-white border-b">
<div className="flex justify-between items-start">
<div>
<CardTitle className="text-3xl">Personality & Goals Assessment</CardTitle>
<CardDescription>
<CardTitle className="text-5xl font-bold text-black">Personality & Goals Assessment</CardTitle>
<CardDescription className="text-lg text-black">
{isSaving ? 'Saving...' : 'Complete all sections to generate your report.'}
</CardDescription>
</div>
Expand All @@ -434,7 +434,7 @@ export default function StudentAssessmentPage() {
`}</style>
<div className="flex items-center gap-4 mb-2">
<Progress value={progressPercentage} className="w-full custom-progress-bar"/>
<span className="font-bold text-lg text-[#468966]">{Math.round(progressPercentage)}%</span>
<span className="font-bold text-2xl text-[#468966]">{Math.round(progressPercentage)}%</span>
</div>
<div className="flex flex-wrap gap-2">
{sectionPills.map((pill) => (
Expand All @@ -443,7 +443,7 @@ export default function StudentAssessmentPage() {
variant={currentStep.sectionTitle === pill.title ? 'default' : 'outline'}
size="sm"
onClick={() => handleGoToSection(pill.stepIndex)}
className="text-xs sm:text-sm"
className="text-base"
>
{pill.title}
</Button>
Expand All @@ -452,28 +452,30 @@ export default function StudentAssessmentPage() {
</div>
</CardHeader>

<CardContent className="min-h-[300px]">
{renderStepContent()}
<CardContent className="p-6 md:p-10 pb-24">
<div className="max-w-4xl mx-auto">
{renderStepContent()}
</div>
</CardContent>

<div className="p-6 bg-muted/50 flex justify-between items-center rounded-b-lg">
<Button variant="outline" onClick={handlePrev} disabled={currentStepIndex === 0}>
<ChevronLeft className="mr-2 h-4 w-4"/> Previous
</Button>
<p className="text-sm text-muted-foreground">
Step {currentStepIndex + 1} of {steps.length}
</p>
{currentStepIndex === steps.length - 1 ? (
<Button variant="success" onClick={handleFinish}>
<Check className="mr-2 h-4 w-4"/> Finish & View Report
</Button>
) : (
<Button onClick={handleNext} disabled={isNextDisabled}>
Next <ChevronRight className="ml-2 h-4 w-4"/>
</Button>
)}
</div>
</Card>
</div>

<div className="fixed bottom-0 left-0 right-0 z-20 bg-white border-t p-4 flex justify-between items-center shadow-[0_-2px_10px_rgba(0,0,0,0.05)]">
<Button variant="outline" onClick={handlePrev} disabled={currentStepIndex === 0} className="h-12 px-6 text-lg">
<ChevronLeft className="mr-2 h-5 w-5"/> Previous
</Button>
<p className="text-lg text-black">
Step {currentStepIndex + 1} of {steps.length}
</p>
{currentStepIndex === steps.length - 1 ? (
<Button variant="success" onClick={handleFinish} className="h-12 px-6 text-lg">
<Check className="mr-2 h-5 w-5"/> Finish & View Report
</Button>
) : (
<Button onClick={handleNext} disabled={isNextDisabled} className="h-12 px-6 text-lg">
Next <ChevronRight className="ml-2 h-5 w-5"/>
</Button>
)}
</div>
</div>
);
}