Skip to content
Snippets Groups Projects
Commit e3635ad3 authored by Rafael László's avatar Rafael László :speech_balloon:
Browse files

added group choices to applicant profile

parent 78e64bab
No related branches found
No related tags found
No related merge requests found
...@@ -4,21 +4,53 @@ import { connect } from 'react-redux'; ...@@ -4,21 +4,53 @@ import { connect } from 'react-redux';
import { getSelectedProfile, setStatus } from '../../actions/statistics'; import { getSelectedProfile, setStatus } from '../../actions/statistics';
import ConfirmModal from '../forms/ConfirmModal'; import ConfirmModal from '../forms/ConfirmModal';
const groupTypes = {
HAT: {
name: 'Hallgatói Tudásbázis',
color: 'purple',
},
SYS: {
name: 'Sysadmin',
color: 'violet',
},
NET: {
name: 'NETeam',
color: 'blue',
},
ST: {
name: 'SecurITeam',
color: 'teal',
},
DT: {
name: 'DevTeam',
color: 'green',
},
};
class ApplicantProfile extends Component { class ApplicantProfile extends Component {
UNSAFE_componentWillMount() { UNSAFE_componentWillMount() {
this.props.getSelectedProfile(this.props.match.params.id); this.props.getSelectedProfile(this.props.match.params.id);
} }
render() { render() {
const { id, signed, role, full_name, nick, motivation_about, motivation_exercise, motivation_profession } const { id, signed, role, full_name,
nick, motivation_about, motivation_exercise,
motivation_profession, groups }
= this.props.selectedProfile; = this.props.selectedProfile;
return ( return (
<Container style={{ paddingTop: '3em', paddingBottom: '6em' }}> <Container style={{ paddingTop: '3em', paddingBottom: '6em' }}>
<Item> <Item>
<Item.Content> <Item.Content>
<Container textAlign='center'> <Container textAlign='center' style={{paddingBottom: '2em'}}>
<Header as='h2'>{full_name}</Header> <Header as='h2'>{full_name}</Header>
<Item.Meta>{nick}</Item.Meta> <Item.Meta>{nick}</Item.Meta>
<Header as='h2'>{groups?.map(group => {
return (
<Label color={groupTypes[group].color}>
{groupTypes[group].name}
</Label>
)
})}</Header>
</Container> </Container>
<Item.Description> <Item.Description>
<Container textAlign='justified' style={{ padding: '1em' }}> <Container textAlign='justified' style={{ padding: '1em' }}>
...@@ -34,6 +66,7 @@ class ApplicantProfile extends Component { ...@@ -34,6 +66,7 @@ class ApplicantProfile extends Component {
<p>{motivation_exercise <p>{motivation_exercise
?.split ('\n').map ((item, i) => <div key={i}>{item}</div>)} ?.split ('\n').map ((item, i) => <div key={i}>{item}</div>)}
</p> </p>
</Container> </Container>
<Container textAlign='center' style={{ padding: '1em' }}> <Container textAlign='center' style={{ padding: '1em' }}>
<Header as='h3'>Státusz:</Header> <Header as='h3'>Státusz:</Header>
......
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