From: Steinar H. Gunderson Date: Sun, 10 Oct 2021 22:43:09 +0000 (+0200) Subject: Slight trickery to fix 9–11 and 12–14 (how did they ever work). X-Git-Url: https://git.sesse.net/?p=ultimatescore;a=commitdiff_plain;h=9d39083770cddd50a52b1458bd4b8ef4df8e4590 Slight trickery to fix 9–11 and 12–14 (how did they ever work). --- diff --git a/carousel.js b/carousel.js index 28fa7ae..2587231 100644 --- a/carousel.js +++ b/carousel.js @@ -539,7 +539,7 @@ function filter_teams(teams, response) function filter_teams_by_group(teams, groups, group) { return teams.filter(function(team) { - return groups[group].indexOf(team.shortname) != -1; + return groups[group].indexOf(team.shortname) != -1 || groups[group].indexOf(team.mediumname) != -1; }); } diff --git a/update_sheets.js b/update_sheets.js index edaed4d..2438135 100644 --- a/update_sheets.js +++ b/update_sheets.js @@ -394,6 +394,8 @@ function fill_playoff(all_teams, groups, replacements) { get_all_group_games(all_teams, groups, function(group_games) { // NOTE: filter_teams_by_group will be delayed by one cycle // after W P1 etc. becomes determined for the first time. + // Note that this requires the Groups sheet to pick out + // the right teams from the group matches in the Results sheet! let teams_l1 = filter_teams_by_group(all_teams, groups, 'Playoffs 9th–11th'); let teams_l2 = filter_teams_by_group(all_teams, groups, 'Playoffs 12th–14th'); publish_group_rank(teams_l1, group_games, 'Playoffs 9th–11th');