+ {filteredAspects.length > 0 ? (
+ filteredAspects.map((aspect) => {
+ const aspectScore = parseFloat(aspect.averageScore).toFixed(2);
+ const aspectScoreValue = parseFloat(aspectScore);
- return (
-
- {aspect.aspectName}
- = 4.5
- ? "text-green-700"
- : aspectScoreValue >= 3.5
- ? "text-green-400"
- : aspectScoreValue >= 2.5
- ? "text-yellow-400"
- : aspectScoreValue >= 1.5
- ? "text-orange-500"
- : "text-red-500"
- }`}
- >
- {aspectScore}
-
-
- );
- })
- ) : (
-
Data aspek ini kosong
- )}
-
+ return (
+
+ {aspect.aspectName}
+ = 4.5
+ ? "text-green-700"
+ : aspectScoreValue >= 3.5
+ ? "text-green-400"
+ : aspectScoreValue >= 2.5
+ ? "text-yellow-400"
+ : aspectScoreValue >= 1.5
+ ? "text-orange-500"
+ : "text-red-500"
+ }`}
+ >
+ {aspectScore}
+
+
+ );
+ })
+ ) : (
+
Data aspek ini kosong
+ )}
+
- {/* Skor Sub-Aspek */}
+ {/* Skor Sub-Aspek */}
+
{filteredSubAspects.length > 0 ? (
filteredSubAspects.map((subAspect) => {
const subAspectScore = parseFloat(subAspect.averageScore).toFixed(2);
@@ -995,7 +964,7 @@ export default function AssessmentPage() {
return (
-
{subAspect.subAspectName}
+
{subAspect.subAspectName}
= 4.5
@@ -1017,18 +986,17 @@ export default function AssessmentPage() {
) : (
Data sub-aspek ini kosong
)}
-
-
- {/* Finish Button */}
-
-
-
+
+ {/* Finish Button */}
+
+
+
{/* Finish Assessment Modal */}
setValidationModalOpen(false)}
unansweredQuestions={unansweredQuestions}
/>
-
+