Skip to content

Commit 43971d9

Browse files
authored
Rounding frontend (#84)
* Added frontend images * Rounding
1 parent 8828e3c commit 43971d9

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

ui/src/components/custom/pdfExport/ExportPdfButton.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ export const ExportPdfButton: React.FC<ExportPdfButtonProps> = ({ config, items
7272

7373
// Apply multiplier
7474
const multiplier = Number(config[multiplierKey]) || 1;
75-
const finalScore = average * multiplier;
75+
const finalScore = Number((average * multiplier).toFixed(1));
7676

7777
console.log(`Category ${category}:`, { scores, average, multiplier, finalScore }); // Debug log
7878

ui/src/components/custom/pdfExport/MatrixPdfExporter.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ export const generateMatrixPdf = ({ config, matrixMap }: MatrixData) => {
288288
pdf.setFontSize(12);
289289
pdf.text(`${index + 1}. ${item.target}`, margin, yOffset);
290290
pdf.setFont("helvetica", "normal");
291-
pdf.text(`Score: ${item.totalScore.toFixed(2)}`, margin + 100, yOffset);
291+
pdf.text(`Score: ${Number(item.totalScore.toFixed(1))}`, margin + 100, yOffset);
292292
yOffset += 10;
293293
});
294294

0 commit comments

Comments
 (0)