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]);
|
||||
|
||||
// Max file size in bytes (25 MB)
|
||||
const MAX_FILE_SIZE = 25 * 1024 * 1024;
|
||||
// Max file size in bytes (64 MB)
|
||||
const MAX_FILE_SIZE = 64 * 1024 * 1024;
|
||||
|
||||
const handleDrop = (event: React.DragEvent<HTMLDivElement>, question: { questionId: string }) => {
|
||||
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
|
||||
const handlePageChange = (subAspectId: string, newPage: number) => {
|
||||
|
|
@ -759,7 +759,7 @@ export default function AssessmentPage() {
|
|||
PNG, JPG, PDF
|
||||
</Text>
|
||||
<Text className="text-sm text-gray-400">
|
||||
(Max.File size : 25 MB)
|
||||
(Max.File size : 64 MB)
|
||||
</Text>
|
||||
</div>
|
||||
</Flex>
|
||||
|
|
@ -819,14 +819,11 @@ export default function AssessmentPage() {
|
|||
|
||||
{/* Navigasi (Number of Questions) */}
|
||||
<div className="grid grid-cols-5 gap-2">
|
||||
{filteredQuestions.map((question, index) => {
|
||||
const questionId = question.questionId;
|
||||
if (!questionId) return null;
|
||||
{Array.from({ length: totalQuestionsInSubAspect }).map((_, i) => {
|
||||
const questionNumber = startIndex + i + 1;
|
||||
const questionId = filteredQuestions[i]?.questionId;
|
||||
|
||||
// Menentukan nomor soal berdasarkan indeks pertanyaan yang difilter
|
||||
const questionNumber = index + 1; // Nomor pertanyaan dimulai dari 1
|
||||
|
||||
return (
|
||||
return questionId ? (
|
||||
<div key={questionId} className="flex justify-center relative">
|
||||
<button
|
||||
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}
|
||||
</button>
|
||||
|
||||
{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>
|
||||
);
|
||||
) : null;
|
||||
})}
|
||||
</div>
|
||||
|
||||
|
|
@ -879,7 +875,7 @@ export default function AssessmentPage() {
|
|||
<div key={aspect.aspectId} className="flex justify-between items-center">
|
||||
<Text className="text-lg text-gray-700">{aspect.aspectName}</Text>
|
||||
<Text
|
||||
className={`text-lg font-bold ${
|
||||
className={`text-xl font-bold ${
|
||||
aspectScoreValue >= 4.5
|
||||
? "text-green-700"
|
||||
: aspectScoreValue >= 3.5
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user