Skip to content
Snippets Groups Projects
Commit 2e71b6d1 authored by Chif Gergő's avatar Chif Gergő
Browse files

Remove checkbox from profile if user isnt Applicant

parent a61af5af
Branches
Tags
No related merge requests found
......@@ -20,7 +20,7 @@ class Profile extends Component {
render() {
const {
nick, groups, motivationAbout, motivationProfession, motivationExercise, signed, id,
role, nick, groups, motivationAbout, motivationProfession, motivationExercise, signed, id,
} = this.props;
return (
<Container
......@@ -106,6 +106,7 @@ class Profile extends Component {
defaultValue={groups}
/>
<br />
{ role === 'Applicant' ?
<Form.Checkbox
name='signed'
label='Szeretnék jelentkezni a KSZKépzésre'
......@@ -114,6 +115,9 @@ class Profile extends Component {
}
checked={signed}
/>
:
null
}
<Form.Button
primary
onClick={() => this.props.submitRegistration({
......@@ -130,9 +134,10 @@ class Profile extends Component {
const mapStateToProps = ({
user: {
nick, groups, motivationAbout, motivationProfession, motivationExercise, signed, id,
role, nick, groups, motivationAbout, motivationProfession, motivationExercise, signed, id,
},
}) => ({
role,
nick,
groups,
motivationAbout,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment