Skip to content

Commit

Permalink
Don't show empty marathons in history
Browse files Browse the repository at this point in the history
If a marathon has no submitted runs, don't show it.
Likewise, don't show games with no submitted categories.

Related to Issue #39
  • Loading branch information
BobChao87 committed Nov 28, 2021
1 parent 8c9f9c9 commit 5223627
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions components/user/history/Submission.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@
</ElementTableCell>

<template v-for="(marathon, marathonIndex) in submissions">
<ElementTableCell :key="`marathon-${marathonIndex}`" class="marathon" :class="getCellColor(marathon)" :row-end="getSpan(marathon)">
<ElementTableCell v-if="getCategories(marathon).length" :key="`marathon-${marathonIndex}`" class="marathon" :class="getCellColor(marathon)" :row-end="getSpan(marathon)">
<ElementLink :to="`/marathon/${marathon.marathonId}`">{{ marathon.marathonName }}</ElementLink>
(<ElementTemporalDistance :datetime="marathon.marathonStartDate" />)
</ElementTableCell>

<template v-for="(game, gameIndex) in marathon.games">
<ElementTableCell :key="`game-${marathonIndex}-${gameIndex}`" class="game" :class="getCellColor(game)" :row-end="getSpan(game)">
<ElementTableCell v-if="getCategories(game).length" :key="`game-${marathonIndex}-${gameIndex}`" class="game" :class="getCellColor(game)" :row-end="getSpan(game)">
{{ game.name }}
</ElementTableCell>

Expand Down

0 comments on commit 5223627

Please sign in to comment.