myheats

Live heats, scoring and leaderboard for sport events
git clone https://git.in0rdr.ch/myheats.git
Log | Files | Refs | Pull requests | README | LICENSE

commit e72c42df0d41548082bcd76a3aa84e64ad4ded45
parent c87d07ab995bf37c9d9ae7da37fe9477a965d491
Author: Andreas Gruhler <andreas.gruhler@adfinis.com>
Date:   Thu,  9 Mar 2023 00:19:47 +0100

feat: add sorting for total/sum

Diffstat:
Msrc/App.js | 6++++++
1 file changed, 6 insertions(+), 0 deletions(-)

diff --git a/src/App.js b/src/App.js @@ -79,6 +79,9 @@ function rankByHeat(rankingComp) { case 'worst': // rank by worst heat return b.worstHeat - a.worstHeat + case 'total': + // rank by total sum across heats + return b.sum - a.sum default: // rank by heat totals if (b.heats.find(h => h.heatId === r.value)?.summary - a.heats.find(h => h.heatId === r.value)?.summary !== 0) { @@ -111,6 +114,9 @@ function App() { }, { value: 'worst', label: 'Worst Heat' + }, { + value: 'total', + label: 'Total Sum (all heats)' } ])