update: change navigation to every page is continues
This commit is contained in:
parent
2de5b84669
commit
3b7af5eff1
|
|
@ -395,8 +395,8 @@ export default function AssessmentPage() {
|
||||||
});
|
});
|
||||||
}, [assessmentId]);
|
}, [assessmentId]);
|
||||||
|
|
||||||
// Max file size in bytes (25 MB)
|
// Max file size in bytes (64 MB)
|
||||||
const MAX_FILE_SIZE = 25 * 1024 * 1024;
|
const MAX_FILE_SIZE = 64 * 1024 * 1024;
|
||||||
|
|
||||||
const handleDrop = (event: React.DragEvent<HTMLDivElement>, question: { questionId: string }) => {
|
const handleDrop = (event: React.DragEvent<HTMLDivElement>, question: { questionId: string }) => {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
|
|
@ -544,7 +544,7 @@ export default function AssessmentPage() {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
const startIndex = (page - 1) * limit;
|
const startIndex = (currentPage - 1) * questionsPerPage;
|
||||||
|
|
||||||
// Fungsi untuk mengubah halaman pada sub-aspek
|
// Fungsi untuk mengubah halaman pada sub-aspek
|
||||||
const handlePageChange = (subAspectId: string, newPage: number) => {
|
const handlePageChange = (subAspectId: string, newPage: number) => {
|
||||||
|
|
@ -759,7 +759,7 @@ export default function AssessmentPage() {
|
||||||
PNG, JPG, PDF
|
PNG, JPG, PDF
|
||||||
</Text>
|
</Text>
|
||||||
<Text className="text-sm text-gray-400">
|
<Text className="text-sm text-gray-400">
|
||||||
(Max.File size : 25 MB)
|
(Max.File size : 64 MB)
|
||||||
</Text>
|
</Text>
|
||||||
</div>
|
</div>
|
||||||
</Flex>
|
</Flex>
|
||||||
|
|
@ -819,14 +819,11 @@ export default function AssessmentPage() {
|
||||||
|
|
||||||
{/* Navigasi (Number of Questions) */}
|
{/* Navigasi (Number of Questions) */}
|
||||||
<div className="grid grid-cols-5 gap-2">
|
<div className="grid grid-cols-5 gap-2">
|
||||||
{filteredQuestions.map((question, index) => {
|
{Array.from({ length: totalQuestionsInSubAspect }).map((_, i) => {
|
||||||
const questionId = question.questionId;
|
const questionNumber = startIndex + i + 1;
|
||||||
if (!questionId) return null;
|
const questionId = filteredQuestions[i]?.questionId;
|
||||||
|
|
||||||
// Menentukan nomor soal berdasarkan indeks pertanyaan yang difilter
|
return questionId ? (
|
||||||
const questionNumber = index + 1; // Nomor pertanyaan dimulai dari 1
|
|
||||||
|
|
||||||
return (
|
|
||||||
<div key={questionId} className="flex justify-center relative">
|
<div key={questionId} className="flex justify-center relative">
|
||||||
<button
|
<button
|
||||||
className={`w-9 h-9 border rounded-sm flex items-center justify-center relative text-md
|
className={`w-9 h-9 border rounded-sm flex items-center justify-center relative text-md
|
||||||
|
|
@ -838,12 +835,11 @@ export default function AssessmentPage() {
|
||||||
>
|
>
|
||||||
{questionNumber}
|
{questionNumber}
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
{flaggedQuestions[questionId] && (
|
{flaggedQuestions[questionId] && (
|
||||||
<div className="absolute top-0 right-0 w-0 h-0 border-b-[20px] border-b-transparent border-r-[20px] border-r-red-600 rounded-tr-sm" />
|
<div className="absolute top-0 right-0 w-0 h-0 border-b-[20px] border-b-transparent border-r-[20px] border-r-red-600 rounded-tr-sm" />
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
);
|
) : null;
|
||||||
})}
|
})}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
@ -879,7 +875,7 @@ export default function AssessmentPage() {
|
||||||
<div key={aspect.aspectId} className="flex justify-between items-center">
|
<div key={aspect.aspectId} className="flex justify-between items-center">
|
||||||
<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-xl font-bold ${
|
||||||
aspectScoreValue >= 4.5
|
aspectScoreValue >= 4.5
|
||||||
? "text-green-700"
|
? "text-green-700"
|
||||||
: aspectScoreValue >= 3.5
|
: aspectScoreValue >= 3.5
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user