]> git.sesse.net Git - ultimatescore/commitdiff
Fix the display of the points in each group.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Wed, 29 Sep 2021 19:58:45 +0000 (21:58 +0200)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Wed, 29 Sep 2021 20:01:12 +0000 (22:01 +0200)
carousel.js
update_sheets.js

index 1e7d58851a064e449182c5bd09a70ae9c7b4d902..28fa7ae5757c840ba3afb7f0be6a2c1f92a5edaf 100644 (file)
@@ -369,6 +369,7 @@ function parse_teams_from_spreadsheet(response) {
                        "mediumname": response.values[i][1],
                        "shortname": response.values[i][2],
                        //"tags": response.values[i][3],
+                       "seeding": parseInt(response.values[i][3]),
                        "ngames": 0,
                        "nplayed": 0,
                        "gd": 0,
index bd3f9e70340530d335e29bb2d8d652d38f5e2dd0..b6e842648bfd083a73e0323f695fc79e4d5ef9e5 100644 (file)
@@ -72,6 +72,7 @@ function publish_group_rank(teams, games, group_name)
        let cols = config['score_sheet_cols'];
 
        apply_games_to_teams(games, teams, group_name);
+       teams.sort(function(a, b) { return a.seeding - b.seeding });
 
        // Write the points total to the unsorted columns.
        if (config['point_total_start_row'] !== null) {