Fakultas Ilmu Komputer UI

Commit f1ca7ad4 authored by sirinbaisa's avatar sirinbaisa
Browse files

Merge branch 'UserStory2' of https://gitlab.com/PPL2017csui/PPLA1 into UserStory2

# Conflicts:
#	assets/js/Index.jsx
#	assets/js/components/Lowongan.jsx
#	assets/js/components/ModalPendaftaran.jsx
parents c5cdb1af 62b77b13
......@@ -4,11 +4,11 @@ import { Router, Route, browserHistory } from 'react-router';
import { Segment, Modal, Button, Icon, Image as ImageComponent, Item, TextArea, Forms } from 'semantic-ui-react';
import Dashboard from './Dashboard';
import Login from './Login';
import Register from './CompanyRegister'
import VacancyPage from './VacancyPage';
// import Register from './CompanyRegister'
import Pane from './components/Pane';
import Tabs from './components/Tabs';
import ModalPendaftaran from './components/ModalPendaftaran';
import Lowongan from './components/Lowongan';
import ModalAlert from './components/ModalAlert';
export const Profile = () => (
<Segment>
......@@ -16,27 +16,14 @@ export const Profile = () => (
</Segment>
);
export const Home = () => (
<div>
<Tabs selected={0}>
<Pane label="Semua Lowongan">
<Lowongan data={paragraph} header="Lowongan" content={paragraph} image={imageWireFrame}/>
</Pane>
<Pane label="Lamaran saya">
<div>This is my tab 2 contents!</div>
</Pane>
</Tabs>
</div>
);
export const App = () => (
<Router history={browserHistory}>
<Route path="/login" component={Login} />
<Route path="/register" component={Register} />
{/*<Route path="/register" component={Register} />*/}
<Route component={Dashboard}>
<Route path="/" component={Profile} />
<Route path="profile" component={Profile} />
<Route path="home" component={Home} />
<Route path="lowongan" component={VacancyPage} />
<Route path="users" component={Profile} />
</Route>
</Router>
......
import React from 'react';
import { Segment, Input, Menu } from 'semantic-ui-react'
import Tabs from './components/Tabs';
import Pane from './components/Pane';
import VacancyList from './components/VacancyList';
export default class VacancyPage extends React.Component {
constructor(props) {
super(props);
/* istanbul ignore next */
this.state = { email: '', password: '', errorFlag: false };
this.handleItemClick = this.handleItemClick.bind(this);
}
handleItemClick = (e, { name }) => this.setState({ activeItem: name });
render() {
const data = [{ data1: 'val1' }, { data1: 'val2' }];
const {activeItem} = this.state;
return (
<div className="tabs">
<Menu tabular>
<Menu.Item name='Semua Lowongan' active={activeItem === 'Semua Lowongan'} onClick={this.handleItemClick}/>
<Menu.Item name='Lamaran Saya' active={activeItem === 'Lamaran Saya'} onClick={this.handleItemClick}/>
<Menu.Menu position='right'>
<Menu.Item>
<Input transparent icon={{name: 'search', link: true}} placeholder='Search users...'/>
</Menu.Item>
</Menu.Menu>
</Menu>
<Segment>
<VacancyList vacancies={data} />
</Segment>
</div>
);
};
}
\ No newline at end of file
......@@ -8,28 +8,24 @@ import ModalPendaftaran from './ModalPendaftaran';
export default class Lowongan extends React.Component {
static propTypes = {
data: React.PropTypes.object.isRequired,
image: React.PropTypes.object.isRequired,
header:React.PropTypes.string.isRequired,
content:React.PropTypes.object.isRequired
};
render() {
return (
<Item.Group relaxed>
<Item>
{this.props.image}
<Item.Content verticalAlign="middle">
<Item.Header>{this.props.header}</Item.Header>
<Item.Description>{this.props.content}</Item.Description>
<Item.Extra>
<div className="daftar">
<ModalPendaftaran data={paragraph} buttonTitle="Daftar" id="1"/>
<div>
<h4>{ this.props.data.data1 }</h4>
{paragraph}
<ModalPendaftaran id={1} data={ { header: 'dor', description: 'blabla' } } buttonTitle="Daftar" />
</div>
</Item.Extra>
</Item.Content>
</Item>
</Item.Group>
);
}
}
}
\ No newline at end of file
......@@ -4,6 +4,7 @@ import { Modal, Button, Icon, Header } from 'semantic-ui-react';
export default class ModalAlert extends React.Component {
static propTypes = {
onChangeValue: React.PropTypes.func.isRequired,
coverLetter: React.PropTypes.string.isRequired,
header: React.PropTypes.oneOfType([
React.PropTypes.node,
React.PropTypes.string,
......
......@@ -23,14 +23,15 @@ export default class ModalPendaftaran extends React.Component {
coverLetter: '',
};
this.handleChange = this.handleChange.bind(this);
this.handleOpen = this.handleOpen.bind(this);
}
handleChange(event) {
this.setState({ coverLetter: event.target.value });
// this.setState({ coverLetter: event.target.value });
}
handleOpen() {
this.setState({ modalOpen: true });
console.log(this.state);
const data = { coverLetter: this.state.coverLetter };
Server.post(`/students/${this.props.id}/application`, data).then((data) => {
this.setState({
......@@ -43,17 +44,14 @@ export default class ModalPendaftaran extends React.Component {
responseText: this.failedResponse + JSON.stringify(error),
});
});
this.setState({ modalOpen: true });
}
handleClose = () => this.setState({
modalOpen: false,
});
render = () => (
<Modal
trigger={<Button onClick={this.handleOpen} >{this.props.buttonTitle}</Button>}
closeIcon="close"
......@@ -61,14 +59,14 @@ export default class ModalPendaftaran extends React.Component {
onClose={this.handleClose}
>
<Modal.Header>{this.props.data}</Modal.Header>
<Modal.Header>{this.props.data.header}</Modal.Header>
<Modal.Content image>
<div className="image">
<Icon name="right arrow" />
</div>
<Modal.Description>
<Modal.Header> <h3> Deskripsi Lowongan </h3></Modal.Header>
{this.props.data}
{this.props.data.description}
<div className="linkCV">
<a> your latest CV </a>
......
import React from 'react';
import { Item } from 'semantic-ui-react';
import Lowongan from './Lowongan';
export default class VacancyList extends React.Component {
......@@ -14,7 +15,10 @@ export default class VacancyList extends React.Component {
}
render = () => (
<div className="vacancyList" >{ this.generateVacancies() }
<div className="vacancyList" >
{/*<Item.Group relaxed>*/}
{ this.generateVacancies() }
{/*</Item.Group>*/}
</div>
)
}
\ No newline at end of file
0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli 'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli 'run',
1 verbose cli 'karma' ]
2 info using npm@3.10.10
3 info using node@v6.10.0
4 verbose run-script [ 'prekarma', 'karma', 'postkarma' ]
5 info lifecycle kape@1.0.0~prekarma: kape@1.0.0
6 silly lifecycle kape@1.0.0~prekarma: no script for prekarma, continuing
7 info lifecycle kape@1.0.0~karma: kape@1.0.0
8 verbose lifecycle kape@1.0.0~karma: unsafe-perm in lifecycle true
9 verbose lifecycle kape@1.0.0~karma: PATH: C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin;A:\Kuliah\Semester 6\PPL\kape\node_modules\.bin;B:\Programs\cmder_mini\bin;B:\Programs\cmder_mini\vendor\conemu-maximus5\ConEmu\Scripts;B:\Programs\cmder_mini\vendor\conemu-maximus5;B:\Programs\cmder_mini\vendor\conemu-maximus5\ConEmu;C:\Windows\system32;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;B:\Programs\cmder_mini\bin;C:\ProgramData\Oracle\Java\javapath;C:\Program Files\Haskell\bin;C:\Program Files\Haskell Platform\7.10.3\lib\extralibs\bin;C:\Program Files\Haskell Platform\7.10.3\bin;C:\Windows;C:\cygwin64\bin;C:\Program Files (x86)\OpenSSH\bin;C:\Program Files (x86)\Intel\OpenCL SDK\3.0\bin\x86;C:\Program Files (x86)\Intel\OpenCL SDK\3.0\bin\x64;C:\Program Files\Git\cmd;C:\Program Files\Haskell Platform\7.10.3\mingw\bin;C:\Program Files\Java\jdk1.8.0_73\bin;C:\Program Files\Calibre2\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\Sublime Text 3;C:\Program Files (x86)\Skype\Phone\;C:\Python27;C:\Python27\Scripts;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;B:\Programs\gradle-3.0\bin;C:\Program Files\MATLAB\MATLAB Production Server\R2015a\runtime\win64;C:\Program Files\MATLAB\MATLAB Production Server\R2015a\bin;C:\Program Files\MATLAB\MATLAB Production Server\R2015a\polyspace\bin;C:\Program Files\nodejs\;C:\Program Files\PostgreSQL\9.6\bin;B:\Programs\cmder_mini;C:\Users\M. Reza Qorib\Anaconda3;C:\Users\M. Reza Qorib\Anaconda3\Scripts;C:\Users\M. Reza Qorib\Anaconda3\Library\bin;C:\Users\M. Reza Qorib\AppData\Local\Programs\Python\Python35-32\Scripts\;C:\Users\M. Reza Qorib\AppData\Local\Programs\Python\Python35-32\;C:\Users\M. Reza Qorib\AppData\Roaming\cabal\bin;C:\Users\M. Reza Qorib\AppData\Local\Microsoft\WindowsApps;C:\Program Files (x86)\Atmel\Flip 3.4.7\bin;C:\Users\M. Reza Qorib\AppData\Roaming\npm;C:\Program Files\Git\usr\bin;C:\Program Files\Git\usr\share\vim\vim74;B:\Programs\cmder_mini\
10 verbose lifecycle kape@1.0.0~karma: CWD: A:\Kuliah\Semester 6\PPL\kape
11 silly lifecycle kape@1.0.0~karma: Args: [ '/d /s /c', 'karma start' ]
12 silly lifecycle kape@1.0.0~karma: Returned: code: 1 signal: null
13 info lifecycle kape@1.0.0~karma: Failed to exec karma script
14 verbose stack Error: kape@1.0.0 karma: `karma start`
14 verbose stack Exit status 1
14 verbose stack at EventEmitter.<anonymous> (C:\Program Files\nodejs\node_modules\npm\lib\utils\lifecycle.js:255:16)
14 verbose stack at emitTwo (events.js:106:13)
14 verbose stack at EventEmitter.emit (events.js:191:7)
14 verbose stack at ChildProcess.<anonymous> (C:\Program Files\nodejs\node_modules\npm\lib\utils\spawn.js:40:14)
14 verbose stack at emitTwo (events.js:106:13)
14 verbose stack at ChildProcess.emit (events.js:191:7)
14 verbose stack at maybeClose (internal/child_process.js:877:16)
14 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
15 verbose pkgid kape@1.0.0
16 verbose cwd A:\Kuliah\Semester 6\PPL\kape
17 error Windows_NT 10.0.14393
18 error argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "karma"
19 error node v6.10.0
20 error npm v3.10.10
21 error code ELIFECYCLE
22 error kape@1.0.0 karma: `karma start`
22 error Exit status 1
23 error Failed at the kape@1.0.0 karma script 'karma start'.
23 error Make sure you have the latest version of node.js and npm installed.
23 error If you do, this is most likely a problem with the kape package,
23 error not with npm itself.
23 error Tell the author that this fails on your system:
23 error karma start
23 error You can get information on how to open an issue for this project with:
23 error npm bugs kape
23 error Or if that isn't available, you can get their info via:
23 error npm owner ls kape
23 error There is likely additional logging output above.
24 verbose exit [ 1, true ]
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