update: change card on score aspect and sub aspect add scrool area using shadcn

This commit is contained in:
abiyasa05 2024-11-04 12:59:02 +07:00
parent 50f5c042c3
commit 2de5b84669

View File

@ -12,12 +12,12 @@ import {
Card,
CardContent,
CardDescription,
CardHeader,
} from "@/shadcn/components/ui/card";
import { Button } from "@/shadcn/components/ui/button";
import { Textarea } from "@/shadcn/components/ui/textarea";
import { Label } from "@/shadcn/components/ui/label";
import { RadioGroup, RadioGroupItem } from "@/shadcn/components/ui/radio-group";
import { ScrollArea } from "@/shadcn/components/ui/scroll-area";
import {
Pagination,
} from "@/shadcn/components/ui/pagination-assessment";
@ -864,11 +864,11 @@ export default function AssessmentPage() {
{/* Skor Aspek dan Sub-Aspek */}
<div className="mt-4">
<Card>
<CardHeader>
<Text className="text-lg font-extrabold text-center">Nilai Sementara</Text>
</CardHeader>
<CardContent>
<Text className="text-lg font-extrabold text-center mt-4 mb-2">
Nilai Sementara
</Text>
<CardContent className="max-h-full overflow-hidden">
<ScrollArea className="h-[200px] w-full rounded-md p-2">
<CardDescription>
{filteredAspects.length > 0 ? (
filteredAspects.map((aspect) => {
@ -880,13 +880,13 @@ export default function AssessmentPage() {
<Text className="text-lg text-gray-700">{aspect.aspectName}</Text>
<Text
className={`text-lg font-bold ${
aspectScoreValue >= 4.01
aspectScoreValue >= 4.5
? "text-green-700"
: aspectScoreValue >= 3.01
: aspectScoreValue >= 3.5
? "text-green-400"
: aspectScoreValue >= 2.01
: aspectScoreValue >= 2.5
? "text-yellow-400"
: aspectScoreValue >= 1.01
: aspectScoreValue >= 1.5
? "text-orange-500"
: "text-red-500"
}`}
@ -915,13 +915,13 @@ export default function AssessmentPage() {
<Text className="text-sm text-gray-700">{subAspect.subAspectName}</Text>
<Text
className={`text-sm font-bold ${
subAspectScoreValue >= 4.01
subAspectScoreValue >= 4.5
? "text-green-700"
: subAspectScoreValue >= 3.01
: subAspectScoreValue >= 3.5
? "text-green-400"
: subAspectScoreValue >= 2.01
: subAspectScoreValue >= 2.5
? "text-yellow-400"
: subAspectScoreValue >= 1.01
: subAspectScoreValue >= 1.5
? "text-orange-500"
: "text-red-500"
}`}
@ -934,9 +934,9 @@ export default function AssessmentPage() {
) : (
<Text className="text-sm text-gray-700">Data sub-aspek ini kosong</Text>
)}
</ScrollArea>
{/* Tombol Selesai */}
<div className="pt-4">
<div>
<Button
onClick={handleFinishClick}
className="bg-[--primary-color] text-white font-bold rounded-md w-full text-sm"