Skip to content
Snippets Groups Projects
Select Git revision
  • 2b20f4fbae18b34a6deee9a803e8d7904a0e1803
  • master default protected
  • 1.3.1
  • 1.3.0
  • 1.2.0
  • 1.1.5
  • 1.1.4
  • 1.1.3
  • 1.1.2
  • 1.1.1
  • 1.1.0
  • 1.0.19
  • 1.0.18
  • 1.0.17
  • 1.0.16
  • 1.0.15
  • 1.0.14
  • 1.0.13
  • 1.0.12
  • 1.0.10
  • 1.0.9
  • 1.0.8
22 results

Applications.js

Blame
  • Forked from KSZK / DevTeam / kszkepzes / old / kszkepzes-frontend
    Source project has a limited visibility.
    Applications.js 1.43 KiB
    import React, { Component } from 'react';
    import moment from 'moment';
    import { Link } from 'react-router-dom';
    import { Container, Table, Button } from 'semantic-ui-react';
    import { connect } from 'react-redux';
    import { getTrainees } from '../../actions/statistics';
    
    class Applications extends Component {
      componentWillMount() {
        this.props.getTrainees();
      }
    
      renderApplicants() {
        return this.props.trainees.map((trainee) =>
        { return (
          <Table.Row>
            <Table.Cell>
              <Link to={`trainee/${trainee.id}`}>
                {trainee.full_name}
              </Link>
            </Table.Cell>
            <Table.Cell>
            </Table.Cell>
          </Table.Row>
        );
        });
      }
    
      render() {
        return (
          <Container
            textAlign='center'
            style={{
              padding: '80px'
            }}
          >
            <Table color='blue' celled selectable compact>
              <Table.Header>
                <Table.Row>
                  <Table.HeaderCell>Jelentkezettek</Table.HeaderCell>
                  <Table.HeaderCell>Jelentkezés elfogadva:</Table.HeaderCell>
                </Table.Row>
              </Table.Header>
    
              <Table.Body>
                {this.props.trainees ? this.renderApplicants() : 'Nincs még alaklom beírva'}
              </Table.Body>
            </Table>
          </Container>
        );
      }
    }
    
    const mapStateToProps = ({ trainees: { trainees }, user }) => ({ trainees, user });
    
    export default connect(mapStateToProps, { getTrainees })(Applications);