|
@@ -371,12 +371,6 @@ class Main extends React.Component {
|
|
|
}
|
|
|
|
|
|
render () {
|
|
|
- const PlayerTable = playerList.components.PlayerTable
|
|
|
- const MatchTable = matchList.components.MatchTable
|
|
|
- const places = this.props.matchList.places || []
|
|
|
- const dates = this.props.matchList.dates || {}
|
|
|
- const matchCategories = this.props.matchList.categories || []
|
|
|
- const playerCategories = this.props.playerList.categories || []
|
|
|
const AppLayout = layout.components.AppLayout
|
|
|
|
|
|
return (
|
|
@@ -386,55 +380,10 @@ class Main extends React.Component {
|
|
|
layoutActions={this.props.layoutActions}
|
|
|
state={this.props}
|
|
|
components={{
|
|
|
- PlayerTable: playerList.components.PlayerTable,
|
|
|
+ PlayerList: playerList.components.PlayerList,
|
|
|
MatchTable: matchList.components.MatchTable
|
|
|
}}
|
|
|
/>
|
|
|
- <form>
|
|
|
- <label htmlFor='PlayerList'>Swisstennis PlayerList.xls</label>
|
|
|
- <input type='file' id='PlayerList' ref={(input) => { this.playerList = input }} accept='.xls' placeholder='PlayerList File' onChange={this.handlePlayerList} />
|
|
|
- <label htmlFor='Calendar'>Swisstennis Calendar.xls</label>
|
|
|
- <input type='file' id='Calendar' ref={(input) => { this.calendar = input }} accept='.xls' placeholder='Calendar File' onChange={this.handleCalendar} />
|
|
|
- <label htmlFor='Date'>Datum</label>
|
|
|
- <select id='Date' ref={(input) => { this.matchDate = input }} onChange={this.filterMatches}>
|
|
|
- <option>{FILTER_OFF}</option>
|
|
|
- {Object.keys(dates).map((key) => (
|
|
|
- <option key={key} value={dates[key]}>{key}</option>
|
|
|
- ))}
|
|
|
- </select>
|
|
|
- <label htmlFor='Place'>Ort</label>
|
|
|
- <select id='Place' ref={(input) => { this.matchPlace = input }} onChange={this.filterMatches}>
|
|
|
- <option>{FILTER_OFF}</option>
|
|
|
- {places.map((place, key) => (
|
|
|
- <option key={key}>{place}</option>
|
|
|
- ))}
|
|
|
- </select>
|
|
|
- <label htmlFor='MatchCategory'>Match Konkurrenz</label>
|
|
|
- <select id='MatchCategory' ref={(input) => { this.matchCategory = input }} onChange={this.filterMatches}>
|
|
|
- <option>{FILTER_OFF}</option>
|
|
|
- {matchCategories.map((category, key) => (
|
|
|
- <option key={key}>{category}</option>
|
|
|
- ))}
|
|
|
- </select>
|
|
|
- <label htmlFor='Junior'>Junior</label>
|
|
|
- <input id='Junior' ref={(input) => { this.playerJunior = input }} type='checkbox' onChange={this.filterPlayers} />
|
|
|
- <label htmlFor='Paid'>Bezahlt</label>
|
|
|
- <input id='Paid' ref={(input) => { this.playerPaid = input }} type='checkbox' onChange={this.filterPlayers} />
|
|
|
- <label htmlFor='PlayerCategory'>Spieler Konkurrenz</label>
|
|
|
- <select id='PlayerCategory' ref={(input) => { this.playerCategory = input }} onChange={this.filterPlayers}>
|
|
|
- <option>{FILTER_OFF}</option>
|
|
|
- {playerCategories.map((category, key) => (
|
|
|
- <option key={key}>{category}</option>
|
|
|
- ))}
|
|
|
- </select>
|
|
|
- <button onClick={this.generateSchedule} disabled={!this.props.matchList.filteredMatches.length}>Spielliste generieren</button>
|
|
|
- <button onClick={this.generatePayTable} disabled={(!this.props.matchList.filteredMatches.length | !this.props.playerList.filteredPlayers.length)}>Zahlliste generieren</button>
|
|
|
- <button onClick={this.generatePhoneList} disabled={!this.props.playerList.allPlayers.length}>Telefonliste generieren</button>
|
|
|
- </form>
|
|
|
- <MatchTable match={this.props.matchList} />
|
|
|
- <PhoneList filtered={this.props.matchList.filteredMatches} players={this.props.playerList.allPlayers} />
|
|
|
- <EmailList filtered={this.props.matchList.filteredMatches} players={this.props.playerList.allPlayers} />
|
|
|
- <PlayerTable player={this.props.playerList} />
|
|
|
</div>
|
|
|
)
|
|
|
}
|