|
|
@ -289,8 +289,35 @@ class Registration extends React.Component {
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
try {
|
|
|
|
if (this.props.user.admin === true) {
|
|
|
|
if (result.data.competition_teams.length === 0) {
|
|
|
|
try {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (result.data.competition_teams.length === 0) {
|
|
|
|
|
|
|
|
this.setState({
|
|
|
|
|
|
|
|
type: 6,
|
|
|
|
|
|
|
|
typeysl: 1,
|
|
|
|
|
|
|
|
data: result.data.competition_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.competition_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({
|
|
|
|
this.setState({
|
|
|
|
type: 6,
|
|
|
|
type: 6,
|
|
|
|
typeysl: 1,
|
|
|
|
typeysl: 1,
|
|
|
@ -302,11 +329,40 @@ class Registration extends React.Component {
|
|
|
|
members_count: result.data.members_count,
|
|
|
|
members_count: result.data.members_count,
|
|
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
})
|
|
|
|
} else {
|
|
|
|
}
|
|
|
|
|
|
|
|
} 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({
|
|
|
|
this.setState({
|
|
|
|
type: 6,
|
|
|
|
type: 6,
|
|
|
|
typeysl: 0,
|
|
|
|
typeysl: 1,
|
|
|
|
data: result.data.competition_teams,
|
|
|
|
data: result.data.my_teams,
|
|
|
|
count: result.data.count,
|
|
|
|
count: result.data.count,
|
|
|
|
competition_teams: result.data.competition_teams,
|
|
|
|
competition_teams: result.data.competition_teams,
|
|
|
|
personal: result.data.personal,
|
|
|
|
personal: result.data.personal,
|
|
|
@ -315,19 +371,9 @@ class Registration extends React.Component {
|
|
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} catch (e) {
|
|
|
|
|
|
|
|
this.setState({
|
|
|
|
|
|
|
|
type: 6,
|
|
|
|
|
|
|
|
typeysl: 1,
|
|
|
|
|
|
|
|
data: result.data.competition_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,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|