Fakultas Ilmu Komputer UI

CompanyPage.jsx 1.71 KB
Newer Older
1
2
3
4
5
import React from 'react';
import { Button } from 'semantic-ui-react';
import Tabs from './components/Tabs';
import CompanyList from './components/CompanyList';
import Company from './components/Company';
6
import Pagination from './components/Pagination';
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22

export default class CompanyPage extends React.Component {

  static propTypes = {
    user: React.PropTypes.object.isRequired,
  };

  handleClick = () => window.open('/admin/');

  render() {
    return (
      <div>
        <div style={{ paddingLeft: '10px' }}>
          <Button onClick={this.handleClick} icon="dashboard" labelPosition="left" color="facebook" content="Buka Menu Administrasi" />
        </div>
        <Tabs selected={0}>
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
          <Pagination
            key={1}
            url={`/companies/?status=${Company.COMPANY_STATUS.NEW}`}
            label="Baru"
            child={
              <CompanyList status={Company.COMPANY_STATUS.NEW} />
            }
          />
          <Pagination
            key={2}
            url={`/companies/?status=${Company.COMPANY_STATUS.VERIFIED}`}
            label="Terverifikasi"
            child={
              <CompanyList status={Company.COMPANY_STATUS.VERIFIED} />
            }
          />
          <Pagination
            key={3}
            url={`/companies/?status=${Company.COMPANY_STATUS.UNVERIFIED}`}
            label="Ditolak"
            child={
              <CompanyList status={Company.COMPANY_STATUS.UNVERIFIED} />
            }
          />
          <Pagination
            key={4}
            url={'/companies/'}
            label="Semua Perusahaan"
            child={
              <CompanyList status={Company.COMPANY_STATUS.ALL} />
            }
          />
55
56
57
58
59
        </Tabs>
      </div>
    );
  }
}