update: style for pagination assessment
This commit is contained in:
parent
04d42f1dc4
commit
6f908f8b01
|
|
@ -2,7 +2,7 @@ import { createLazyFileRoute } from "@tanstack/react-router";
|
||||||
import {
|
import {
|
||||||
Card,
|
Card,
|
||||||
Flex,
|
Flex,
|
||||||
Pagination,
|
// Pagination,
|
||||||
Stack,
|
Stack,
|
||||||
Text,
|
Text,
|
||||||
Loader,
|
Loader,
|
||||||
|
|
@ -13,6 +13,9 @@ import {
|
||||||
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 {
|
||||||
|
Pagination,
|
||||||
|
} from "@/shadcn/components/ui/pagination-assessment";
|
||||||
import { useQuery, useMutation } from "@tanstack/react-query";
|
import { useQuery, useMutation } from "@tanstack/react-query";
|
||||||
import {
|
import {
|
||||||
submitAssessmentMutationOptions,
|
submitAssessmentMutationOptions,
|
||||||
|
|
@ -527,6 +530,7 @@ export default function AssessmentPage() {
|
||||||
}
|
}
|
||||||
|
|
||||||
const totalQuestions = data?.data?.length || 0;
|
const totalQuestions = data?.data?.length || 0;
|
||||||
|
const totalPages = Math.ceil(totalQuestions / limit);
|
||||||
|
|
||||||
if (!assessmentId) {
|
if (!assessmentId) {
|
||||||
return (
|
return (
|
||||||
|
|
@ -803,6 +807,9 @@ export default function AssessmentPage() {
|
||||||
{/* Navigasi dan Pagination */}
|
{/* Navigasi dan Pagination */}
|
||||||
<div className="fixed h-screen right-0 w-60 overflow-auto mr-4">
|
<div className="fixed h-screen right-0 w-60 overflow-auto mr-4">
|
||||||
<Flex direction="column" gap="xs" className="mx-4">
|
<Flex direction="column" gap="xs" className="mx-4">
|
||||||
|
<Text className="font-medium text-lg text-gray-800 mb-2">
|
||||||
|
Nomor Soal
|
||||||
|
</Text>
|
||||||
|
|
||||||
{/* Navigasi (Number of Questions) */}
|
{/* Navigasi (Number of Questions) */}
|
||||||
<div className="grid grid-cols-5 gap-2">
|
<div className="grid grid-cols-5 gap-2">
|
||||||
|
|
@ -833,11 +840,9 @@ export default function AssessmentPage() {
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="mt-4 flex justify-center">
|
<div className="mt-4 flex justify-center">
|
||||||
<Pagination
|
<Pagination page={page} totalPages={totalPages} onPageChange={handlePageChange}>
|
||||||
value={page}
|
<Text className="text-xs m-0">Halaman {page} dari {totalPages}</Text>
|
||||||
total={Math.ceil(totalQuestions / limit)}
|
</Pagination>
|
||||||
onChange={handlePageChange}
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Skor Aspek dan Sub-Aspek */}
|
{/* Skor Aspek dan Sub-Aspek */}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user