Skip to content

Commit 1360ec8

Browse files
committed
changed the int to float values
1 parent 53908bc commit 1360ec8

2 files changed

Lines changed: 8 additions & 8 deletions

File tree

app/admin/event/group/page.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ export default function GroupEventLeaderboardPage() {
7878
group.judgeWiseTotal[judgeId] = 0;
7979
}
8080

81-
group.judgeWiseTotal[judgeId] += parseInt(
81+
group.judgeWiseTotal[judgeId] += parseFloat(
8282
group.score[_eventName][judgeId][criteria],
8383
);
8484
});
@@ -267,12 +267,12 @@ export default function GroupEventLeaderboardPage() {
267267
key={i}
268268
className="text-xs"
269269
>
270-
{total}
270+
{parseFloat(total).toFixed(2)}
271271
</p>
272272
))}
273273
</td>
274274
<td className="px-4 py-2 border font-bold">
275-
{group.overallTotal}
275+
{parseFloat(group.overallTotal).toFixed(2)}
276276
</td>
277277
<td className="px-4 py-2 border">
278278
{eventMetadata.judgeIdList.map((judgeId, i2) => (

app/admin/event/individual/page.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ export default function EventLeaderboardIndiPage() {
5959
participant.judgeWiseTotal[judgeId] = 0;
6060
}
6161

62-
participant.judgeWiseTotal[judgeId] += parseInt(
62+
participant.judgeWiseTotal[judgeId] += parseFloat(
6363
participant.score[_eventName][judgeId][criteria],
6464
);
6565
});
@@ -215,7 +215,7 @@ export default function EventLeaderboardIndiPage() {
215215
<tr key={index}>
216216
<td
217217
className={
218-
'px-4 py-2 border max-w-[160px]' +
218+
'px-4 py-2 border max-w-40' +
219219
(row.substitute && row.substitute[eventMetadata.name]
220220
? ' bg-[#ffcece]'
221221
: '')
@@ -261,7 +261,7 @@ export default function EventLeaderboardIndiPage() {
261261
</div>
262262
)}
263263
</td>
264-
<td className="px-4 py-2 border max-w-[200px]">
264+
<td className="px-4 py-2 border max-w-50">
265265
<p className="font-bold">{row.district ?? '-'}</p>
266266
<p className="text-xs">{row.samithiName ?? '-'}</p>
267267
{row.studentGroup === 'Group 3' && (
@@ -304,12 +304,12 @@ export default function EventLeaderboardIndiPage() {
304304
key={index}
305305
className="text-xs"
306306
>
307-
{total}
307+
{parseFloat(total).toFixed(2)}
308308
</p>
309309
))}
310310
</td>
311311
<td className="px-4 py-2 border font-bold">
312-
{row.overallTotal}
312+
{parseFloat(row.overallTotal).toFixed(2)}
313313
</td>
314314
<td className="px-4 py-2 border">
315315
<div className="flex flex-col">

0 commit comments

Comments
 (0)