Expose Matchup isComplete method in preparation for incorporating into bracket graphic

This commit is contained in:
unknown
2022-08-21 10:18:50 -07:00
committed by Patrick Fairbank
parent 0aa69340f0
commit 0eefc3ba40
2 changed files with 3 additions and 1 deletions

View File

@@ -461,7 +461,7 @@
{{end}}
{{define "matchup"}}
<g id="match_{{.Round}}_{{.Group}}" class="matchblock {{if .IsActive}}active{{end}}">
<g id="match_{{.Round}}_{{.Group}}" class="matchblock {{if .IsActive}}active{{else if .IsComplete}}complete{{end}}">
<rect class="structure" id="background" y="23" width="205" height="130.452"/>
<rect class="red" y="23" width="45.567" height="66.319"/>
<rect class="blue" y="89.133" width="45.567" height="64.319"/>

View File

@@ -46,6 +46,7 @@ type allianceMatchup struct {
IsActive bool
SeriesLeader string
SeriesStatus string
IsComplete bool
}
// Generates a JSON dump of the matches and results.
@@ -250,6 +251,7 @@ func (web *Web) generateBracketSvg(w io.Writer) error {
DisplayName: matchup.LongDisplayName(),
RedAllianceSource: matchup.RedAllianceSourceDisplayName(),
BlueAllianceSource: matchup.BlueAllianceSourceDisplayName(),
IsComplete: matchup.IsComplete(),
}
if matchup.RedAllianceId > 0 {
if len(alliances) > 0 {