mirror of
https://github.com/Team254/cheesy-arena-lite.git
synced 2026-03-09 13:46:44 -04:00
Don't show 0-0 scores on match review page for matches that haven't been played yet.
This commit is contained in:
@@ -44,8 +44,8 @@
|
|||||||
<td class="text-center blue-text">
|
<td class="text-center blue-text">
|
||||||
{{index $match.BlueTeams 0}}, {{index $match.BlueTeams 1}}, {{index $match.BlueTeams 2}}
|
{{index $match.BlueTeams 0}}, {{index $match.BlueTeams 1}}, {{index $match.BlueTeams 2}}
|
||||||
</td>
|
</td>
|
||||||
<td class="text-center red-text">{{$match.RedScore}}</td>
|
<td class="text-center red-text">{{if $match.IsComplete}}{{$match.RedScore}}{{end}}</td>
|
||||||
<td class="text-center blue-text">{{$match.BlueScore}}</td>
|
<td class="text-center blue-text">{{if $match.IsComplete}}{{$match.BlueScore}}{{end}}</td>
|
||||||
<td class="text-center nowrap">
|
<td class="text-center nowrap">
|
||||||
<a href="/match_review/{{$match.Id}}/edit"><b class="btn btn-info btn-xs">Edit</b></a>
|
<a href="/match_review/{{$match.Id}}/edit"><b class="btn btn-info btn-xs">Edit</b></a>
|
||||||
</td>
|
</td>
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ type MatchReviewListItem struct {
|
|||||||
RedScore int
|
RedScore int
|
||||||
BlueScore int
|
BlueScore int
|
||||||
ColorClass string
|
ColorClass string
|
||||||
|
IsComplete bool
|
||||||
}
|
}
|
||||||
|
|
||||||
// Shows the match review interface.
|
// Shows the match review interface.
|
||||||
@@ -196,12 +197,16 @@ func (web *Web) buildMatchReviewList(matchType string) ([]MatchReviewListItem, e
|
|||||||
switch match.Status {
|
switch match.Status {
|
||||||
case game.RedWonMatch:
|
case game.RedWonMatch:
|
||||||
matchReviewList[i].ColorClass = "danger"
|
matchReviewList[i].ColorClass = "danger"
|
||||||
|
matchReviewList[i].IsComplete = true
|
||||||
case game.BlueWonMatch:
|
case game.BlueWonMatch:
|
||||||
matchReviewList[i].ColorClass = "info"
|
matchReviewList[i].ColorClass = "info"
|
||||||
|
matchReviewList[i].IsComplete = true
|
||||||
case game.TieMatch:
|
case game.TieMatch:
|
||||||
matchReviewList[i].ColorClass = "warning"
|
matchReviewList[i].ColorClass = "warning"
|
||||||
|
matchReviewList[i].IsComplete = true
|
||||||
default:
|
default:
|
||||||
matchReviewList[i].ColorClass = ""
|
matchReviewList[i].ColorClass = ""
|
||||||
|
matchReviewList[i].IsComplete = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user