-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support setting venue when generating tournaments
- Loading branch information
Showing
7 changed files
with
71 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 0 additions & 1 deletion
1
...urnaments-admin/components/generate-tournament-tab/components/add-player/add-player.marko
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
.../components/generate-tournament-tab/components/group-selector/group-selector.component.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
module.exports = { | ||
onAddPlayer(player) { | ||
this.emit('add-player', player); | ||
}, | ||
onRemovePlayer(player) { | ||
this.emit('remove-player', player); | ||
}, | ||
onVenueChange(event, selected) { | ||
this.emit('venue-change', parseInt(event.target.value)); | ||
}, | ||
onRemoveGroup(event) { | ||
this.emit('remove-group'); | ||
} | ||
} |
14 changes: 14 additions & 0 deletions
14
...s-admin/components/generate-tournament-tab/components/group-selector/group-selector.marko
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<div style="width: 50%;"> | ||
<h2 style="text-align: center">${input.group.name}</h2> | ||
<p>Venue</p> | ||
<select on-change("onVenueChange")> | ||
<option value=undefined selected=!input.venue>-</option> | ||
<for|venue| of=input.venues> | ||
<option value=`${venue.id}` selected=(venue.id == input.venue)>${venue.name}</option> | ||
</for> | ||
</select> | ||
|
||
<add-player selected=input.selected available=input.playersAvailable | ||
on-add-player("onAddPlayer") | ||
on-remove-player("onRemovePlayer")/> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters