update: change card on score aspect and sub aspect add scrool area using shadcn
This commit is contained in:
parent
50f5c042c3
commit
2de5b84669
|
|
@ -12,12 +12,12 @@ import {
|
||||||
Card,
|
Card,
|
||||||
CardContent,
|
CardContent,
|
||||||
CardDescription,
|
CardDescription,
|
||||||
CardHeader,
|
|
||||||
} from "@/shadcn/components/ui/card";
|
} from "@/shadcn/components/ui/card";
|
||||||
import { Button } from "@/shadcn/components/ui/button";
|
import { Button } from "@/shadcn/components/ui/button";
|
||||||
import { Textarea } from "@/shadcn/components/ui/textarea";
|
import { Textarea } from "@/shadcn/components/ui/textarea";
|
||||||
import { Label } from "@/shadcn/components/ui/label";
|
import { Label } from "@/shadcn/components/ui/label";
|
||||||
import { RadioGroup, RadioGroupItem } from "@/shadcn/components/ui/radio-group";
|
import { RadioGroup, RadioGroupItem } from "@/shadcn/components/ui/radio-group";
|
||||||
|
import { ScrollArea } from "@/shadcn/components/ui/scroll-area";
|
||||||
import {
|
import {
|
||||||
Pagination,
|
Pagination,
|
||||||
} from "@/shadcn/components/ui/pagination-assessment";
|
} from "@/shadcn/components/ui/pagination-assessment";
|
||||||
|
|
@ -864,11 +864,11 @@ export default function AssessmentPage() {
|
||||||
{/* Skor Aspek dan Sub-Aspek */}
|
{/* Skor Aspek dan Sub-Aspek */}
|
||||||
<div className="mt-4">
|
<div className="mt-4">
|
||||||
<Card>
|
<Card>
|
||||||
<CardHeader>
|
<Text className="text-lg font-extrabold text-center mt-4 mb-2">
|
||||||
<Text className="text-lg font-extrabold text-center">Nilai Sementara</Text>
|
Nilai Sementara
|
||||||
</CardHeader>
|
</Text>
|
||||||
|
<CardContent className="max-h-full overflow-hidden">
|
||||||
<CardContent>
|
<ScrollArea className="h-[200px] w-full rounded-md p-2">
|
||||||
<CardDescription>
|
<CardDescription>
|
||||||
{filteredAspects.length > 0 ? (
|
{filteredAspects.length > 0 ? (
|
||||||
filteredAspects.map((aspect) => {
|
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 text-gray-700">{aspect.aspectName}</Text>
|
||||||
<Text
|
<Text
|
||||||
className={`text-lg font-bold ${
|
className={`text-lg font-bold ${
|
||||||
aspectScoreValue >= 4.01
|
aspectScoreValue >= 4.5
|
||||||
? "text-green-700"
|
? "text-green-700"
|
||||||
: aspectScoreValue >= 3.01
|
: aspectScoreValue >= 3.5
|
||||||
? "text-green-400"
|
? "text-green-400"
|
||||||
: aspectScoreValue >= 2.01
|
: aspectScoreValue >= 2.5
|
||||||
? "text-yellow-400"
|
? "text-yellow-400"
|
||||||
: aspectScoreValue >= 1.01
|
: aspectScoreValue >= 1.5
|
||||||
? "text-orange-500"
|
? "text-orange-500"
|
||||||
: "text-red-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 text-gray-700">{subAspect.subAspectName}</Text>
|
||||||
<Text
|
<Text
|
||||||
className={`text-sm font-bold ${
|
className={`text-sm font-bold ${
|
||||||
subAspectScoreValue >= 4.01
|
subAspectScoreValue >= 4.5
|
||||||
? "text-green-700"
|
? "text-green-700"
|
||||||
: subAspectScoreValue >= 3.01
|
: subAspectScoreValue >= 3.5
|
||||||
? "text-green-400"
|
? "text-green-400"
|
||||||
: subAspectScoreValue >= 2.01
|
: subAspectScoreValue >= 2.5
|
||||||
? "text-yellow-400"
|
? "text-yellow-400"
|
||||||
: subAspectScoreValue >= 1.01
|
: subAspectScoreValue >= 1.5
|
||||||
? "text-orange-500"
|
? "text-orange-500"
|
||||||
: "text-red-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>
|
<Text className="text-sm text-gray-700">Data sub-aspek ini kosong</Text>
|
||||||
)}
|
)}
|
||||||
|
</ScrollArea>
|
||||||
{/* Tombol Selesai */}
|
{/* Tombol Selesai */}
|
||||||
<div className="pt-4">
|
<div>
|
||||||
<Button
|
<Button
|
||||||
onClick={handleFinishClick}
|
onClick={handleFinishClick}
|
||||||
className="bg-[--primary-color] text-white font-bold rounded-md w-full text-sm"
|
className="bg-[--primary-color] text-white font-bold rounded-md w-full text-sm"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user