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,14 +106,18 @@ class Profile extends Component { ...@@ -106,14 +106,18 @@ class Profile extends Component {
defaultValue={groups} defaultValue={groups}
/> />
<br /> <br />
<Form.Checkbox { role === 'Applicant' ?
name='signed' <Form.Checkbox
label='Szeretnék jelentkezni a KSZKépzésre' name='signed'
onChange={(_, v) => label='Szeretnék jelentkezni a KSZKépzésre'
this.props.textChange({ target: { name: v.name, value: v.checked } }) onChange={(_, v) =>
} this.props.textChange({ target: { name: v.name, value: v.checked } })
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.
Finish editing this message first!
Please register or to comment