|
@@ -1,8 +1,8 @@
|
|
import React from 'react' // React to manage the GUI
|
|
import React from 'react' // React to manage the GUI
|
|
import Player from './classes/player'
|
|
import Player from './classes/player'
|
|
import Match from './classes/match'
|
|
import Match from './classes/match'
|
|
-import PlayerList from './playerList' // Everything that has to do with players
|
|
|
|
-import MatchList from './matchList' // Everything that has to do with matches
|
|
|
|
|
|
+import playerList from './playerList' // Everything that has to do with players
|
|
|
|
+import matchList from './matchList' // Everything that has to do with matches
|
|
import Excel from './excel' // Helper files to create Excel files
|
|
import Excel from './excel' // Helper files to create Excel files
|
|
import { date2s, time2s } from './helpers'
|
|
import { date2s, time2s } from './helpers'
|
|
import 'bootstrap/dist/css/bootstrap.css'
|
|
import 'bootstrap/dist/css/bootstrap.css'
|
|
@@ -106,9 +106,9 @@ class Main extends React.Component {
|
|
|
|
|
|
generatePlayerList (worksheet) {
|
|
generatePlayerList (worksheet) {
|
|
console.log('About to read the player list.')
|
|
console.log('About to read the player list.')
|
|
- const worksheets = { ...this.state.worksheets }
|
|
|
|
|
|
+ /* const worksheets = { ...this.state.worksheets }
|
|
worksheets['PlayerList'] = worksheet
|
|
worksheets['PlayerList'] = worksheet
|
|
- this.setState({ worksheets })
|
|
|
|
|
|
+ this.setState({ worksheets }) */
|
|
|
|
|
|
if (worksheet[4].length !== 32 & worksheet[3][0] !== 'Konkurrenz' & worksheet[3][31] !== 'bezahlt') {
|
|
if (worksheet[4].length !== 32 & worksheet[3][0] !== 'Konkurrenz' & worksheet[3][31] !== 'bezahlt') {
|
|
throw Error('Wrong file structure.')
|
|
throw Error('Wrong file structure.')
|
|
@@ -359,8 +359,8 @@ class Main extends React.Component {
|
|
}
|
|
}
|
|
|
|
|
|
render () {
|
|
render () {
|
|
- const Pli = PlayerList.components.PlayerList
|
|
|
|
- const Mli = MatchList.components.MatchList
|
|
|
|
|
|
+ const PlayerTable = playerList.components.PlayerTable
|
|
|
|
+ const MatchTable = matchList.components.MatchTable
|
|
const places = this.props.matchList.places || []
|
|
const places = this.props.matchList.places || []
|
|
const dates = this.props.matchList.dates || {}
|
|
const dates = this.props.matchList.dates || {}
|
|
const matchCategories = this.props.matchList.categories || []
|
|
const matchCategories = this.props.matchList.categories || []
|
|
@@ -409,10 +409,10 @@ class Main extends React.Component {
|
|
<button onClick={this.generatePayTable} disabled={(!this.props.matchList.filteredMatches.length | !this.props.playerList.filteredPlayers.length)}>Zahlliste 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>
|
|
<button onClick={this.generatePhoneList} disabled={!this.props.playerList.allPlayers.length}>Telefonliste generieren</button>
|
|
</form>
|
|
</form>
|
|
- <Mli match={this.props.matchList} />
|
|
|
|
|
|
+ <MatchTable match={this.props.matchList} />
|
|
<PhoneList filtered={this.props.matchList.filteredMatches} players={this.props.playerList.allPlayers} />
|
|
<PhoneList filtered={this.props.matchList.filteredMatches} players={this.props.playerList.allPlayers} />
|
|
<EmailList filtered={this.props.matchList.filteredMatches} players={this.props.playerList.allPlayers} />
|
|
<EmailList filtered={this.props.matchList.filteredMatches} players={this.props.playerList.allPlayers} />
|
|
- <Pli player={this.props.playerList} />
|
|
|
|
|
|
+ <PlayerTable player={this.props.playerList} />
|
|
</div>
|
|
</div>
|
|
)
|
|
)
|
|
}
|
|
}
|