Fakultas Ilmu Komputer UI

Commit 4d2d3c4d authored by Zamil Majdy's avatar Zamil Majdy
Browse files

[#140652771] [#21] [Refactor] Delete unused file, unused import, refactor class name

parent 96885206
import React from 'react';
import { Grid, Segment, Button, Header, Icon, Modal, Form, Input, TextArea, Card, Image} from 'semantic-ui-react';
import { Grid, Segment, Header, Card, Image } from 'semantic-ui-react';
import LoginForm from './components/LoginForm';
import RegisterModal from './components/RegisterModal';
import CompanyRegisterModal from './components/CompanyRegisterModal';
export default class Login extends React.Component {
......@@ -17,18 +17,17 @@ export default class Login extends React.Component {
};
render = () => (
<div className="halamanLogin">
<div className="headerLogin">
<Header as='h2' icon textAlign='center' >
<Image src='/assets/img/logo.png' size='medium' centered />
<Header as="h2" icon textAlign="center" >
<Image src="/assets/img/logo.png" size="medium" centered />
<Header.Content >
Kanal Akses Pendaftaran KP Elektronik
</Header.Content>
</Header>
</Header>
</div>
<Grid stackable columns={2} relaxed>
<Grid stackable columns={2} relaxed>
<Grid.Column>
<Segment basic>
<LoginForm type="company" header="Company Login" imgSrc="logo.png" imgSize="small" />
......@@ -43,13 +42,12 @@ export default class Login extends React.Component {
<Header as="h3">New to us ?</Header>
</Grid.Column>
<Grid.Column>
<RegisterModal />
<CompanyRegisterModal />
</Grid.Column>
</Grid>
</Card.Content>
</Card>
</div>
</Grid.Column>
<Grid.Column>
......@@ -58,7 +56,6 @@ export default class Login extends React.Component {
{this.props.children}
</Segment>
</Grid.Column>
</Grid>
</div>
)
......
// /* eslint-disable no-unused-expressions */
// import React from 'react';
// import ReactTestUtils from 'react-addons-test-utils';
// import Vacancy from '../components/ComponentRegister';
//
// describe('Vacancy', () => {
// it('renders without problem', () => {
// let companyRegister = ReactTestUtils.renderIntoDocument(
// <CompanyRegister />);
// expect(companyRegister).to.exist;
//
// });
// });
\ No newline at end of file
......@@ -5,7 +5,7 @@ import ModalAlert from './../components/ModalAlert';
import Server from './../lib/Server';
import Storage from './../lib/Storage';
export default class RegisterModal extends React.Component {
export default class CompanyRegisterModal extends React.Component {
constructor(props) {
super(props);
......
import React from 'react';
import moment from 'moment';
import { Button, Icon, Item, Segment } from 'semantic-ui-react';
import { Button, Icon, Item, Grid } from 'semantic-ui-react';
import { Link } from 'react-router';
const defaultImage = 'http://semantic-ui.com/images/wireframe/image.png';
export default class ApplicantList extends React.Component {
export default class CompanyVacancy extends React.Component {
static propTypes = {
data: React.PropTypes.object.isRequired,
deleteCallback: React.PropTypes.func.isRequired,
};
constructor(props) {
super(props);
moment.locale('id');
this.state = { deleteLoading: false };
}
getLink = `/buat-lowongan/${this.props.data.id}`;
render() {
return (
<Item className="applicantItems">
<Item.Image src={this.props.data.company.logo ? this.props.data.company.logo : defaultImage} size="small" />
<Item.Content>
<Item.Header as="a">{this.props.data.name}</Item.Header>
<Segment compact basic floated="right">
{this.props.data.verified ?
(<h4> <Icon name="checkmark box" size="large" color="green" /> Terverifikasi </h4>) :
(<h4> <Icon name="remove circle" size="large" color="red" /> Belum Terverifikasi </h4>)}
<Button color="blue" floated="right" as={Link} to={this.getLink}>
Ubah <Icon name="right chevron" />
</Button>
</Segment>
<Item.Extra>
<h3> 105 Pendaftar </h3>
<Grid.Row>
<Grid.Column floated="left">
<h5> 105 Pendaftar </h5>
Ditutup {moment(moment(this.props.data.close_time)).fromNow()}
</Item.Extra>
</Grid.Column>
<Grid.Column floated="right">
{this.props.data.verified ?
(<h4> <Icon name="checkmark box" size="large" color="green" /> Terverifikasi </h4>) :
(<h4> <Icon name="remove circle" size="large" color="red" /> Belum Terverifikasi </h4>)}
<Button color="blue" floated="right" as={Link} to={this.getLink}>
Ubah <Icon name="right chevron" />
</Button>
<Button loading={this.state.deleteLoading} color="red" floated="right" onClick={() => { this.setState({ deleteLoading : true }); this.props.deleteCallback(); }} >
Hapus <Icon name="delete" />
</Button>
</Grid.Column>
</Grid.Row>
</Item.Content>
</Item>
);
}
}
......@@ -32,7 +32,7 @@ export default class ModalAlert extends React.Component {
};
render = () => {
const style = { 'white-space': 'pre-wrap' };
const style = { whiteSpace: 'pre-wrap' };
return (
<Modal open={this.state.open} basic size="small">
<Header icon="warning sign" content={this.state.header} />
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment