|
|
|
@ -289,7 +289,9 @@ class Registration extends React.Component {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
if (this.props.user.admin === true) {
|
|
|
|
|
try {
|
|
|
|
|
|
|
|
|
|
if (result.data.competition_teams.length === 0) {
|
|
|
|
|
this.setState({
|
|
|
|
|
type: 6,
|
|
|
|
@ -328,6 +330,50 @@ class Registration extends React.Component {
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
try {
|
|
|
|
|
|
|
|
|
|
if (result.data.my_teams.length === 0) {
|
|
|
|
|
this.setState({
|
|
|
|
|
type: 6,
|
|
|
|
|
typeysl: 1,
|
|
|
|
|
data: result.data.my_teams,
|
|
|
|
|
count: result.data.count,
|
|
|
|
|
competition_teams: result.data.competition_teams,
|
|
|
|
|
personal: result.data.personal,
|
|
|
|
|
competition_name: result.data.competition_name,
|
|
|
|
|
members_count: result.data.members_count,
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
|
} else {
|
|
|
|
|
this.setState({
|
|
|
|
|
type: 6,
|
|
|
|
|
typeysl: 0,
|
|
|
|
|
data: result.data.my_teams,
|
|
|
|
|
count: result.data.count,
|
|
|
|
|
competition_teams: result.data.competition_teams,
|
|
|
|
|
personal: result.data.personal,
|
|
|
|
|
competition_name: result.data.competition_name,
|
|
|
|
|
members_count: result.data.members_count,
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
} catch (e) {
|
|
|
|
|
this.setState({
|
|
|
|
|
type: 6,
|
|
|
|
|
typeysl: 1,
|
|
|
|
|
data: result.data.my_teams,
|
|
|
|
|
count: result.data.count,
|
|
|
|
|
competition_teams: result.data.competition_teams,
|
|
|
|
|
personal: result.data.personal,
|
|
|
|
|
competition_name: result.data.competition_name,
|
|
|
|
|
members_count: result.data.members_count,
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|