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