add total points aggregration and percentage
This commit is contained in:
@@ -16,7 +16,14 @@
|
|||||||
</a>
|
</a>
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
Total progress: {data.tasks.reduce((acc, task) => acc + task.currentPoints, 0)}
|
Total progress: {data.tasks.reduce((acc, task) => acc + task.currentPoints, 0)} / {data.tasks.reduce(
|
||||||
|
(acc, task) => acc + task.totalPoints,
|
||||||
|
0
|
||||||
|
)} ({(
|
||||||
|
(data.tasks.reduce((acc, task) => acc + task.currentPoints, 0) /
|
||||||
|
data.tasks.reduce((acc, task) => acc + task.totalPoints, 0)) *
|
||||||
|
100
|
||||||
|
).toFixed(1)}%)
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{#if data.tasks.length > 0}
|
{#if data.tasks.length > 0}
|
||||||
|
|||||||
Reference in New Issue
Block a user