Skip to content

Commit

Permalink
Fix draft players with draft data
Browse files Browse the repository at this point in the history
  • Loading branch information
slmnio committed Nov 20, 2024
1 parent d62ed12 commit 4bcefef
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions website/src/components/broadcast/roots/DraftOverlay.vue
Original file line number Diff line number Diff line change
Expand Up @@ -102,11 +102,13 @@ export default {
teams: ReactiveArray("teams", {
theme: ReactiveThing("theme"),
staff: ReactiveArray("staff"),
players: ReactiveArray("players"),
players: ReactiveArray("players", {
signup_data: ReactiveArray("signup_data")
}),
captains: ReactiveArray("captains")
}),
draftable_players: ReactiveArray("draftable_players", {
"signup_data": ReactiveArray("signup_data")
signup_data: ReactiveArray("signup_data")
})
});
},
Expand Down Expand Up @@ -186,7 +188,10 @@ export default {
if (!this.event?.teams) return [];
let teams = this.event.teams.filter(team => team.draft_order !== undefined).sort((a, b) => a.draft_order - b.draft_order);
if (this.category) teams = teams.filter(t => !this.category || (t.team_category?.includes(";") ? t.team_category.split(";")[1] : t.team_category) === this.category);
return teams;
return teams.map(t => {
t.players = (t.players || []).map(p => decoratePlayerWithDraftData(p, this.event?.id));
return t;
});
},
draftRows() {
if (!this.draftTeams) return [];
Expand Down

0 comments on commit 4bcefef

Please sign in to comment.