From bd74313bd5252cef813bb23423cfab6252d5f83f Mon Sep 17 00:00:00 2001 From: Tiago Ribeiro Date: Sat, 23 Mar 2024 18:28:12 +0000 Subject: [PATCH] Updated the radial result accordingly --- src/exams/pdf/details/radial.result.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/exams/pdf/details/radial.result.tsx b/src/exams/pdf/details/radial.result.tsx index 8149fcca..4098d76d 100644 --- a/src/exams/pdf/details/radial.result.tsx +++ b/src/exams/pdf/details/radial.result.tsx @@ -5,13 +5,16 @@ import {View, Text, Image} from "@react-pdf/renderer"; import {styles} from "../styles"; import {ModuleScore} from "@/interfaces/module.scores"; import {calculateBandScore} from "@/utils/score"; +import {Module} from "@/interfaces"; export const RadialResult = ({module, score, total, png}: ModuleScore) => ( {module} - {calculateBandScore(score, total, module, "academic")} + + {module === "level" ? Math.floor(score) : calculateBandScore(score, total, module.toLowerCase() as Module | "overall", "general")} + out of 9.0