-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10 from FAC7/CandidateProfileModal
add candidate profile (modal) #2
- Loading branch information
Showing
3 changed files
with
79 additions
and
3 deletions.
There are no files selected for viewing
76 changes: 76 additions & 0 deletions
76
frontend/src/js/components/CandidateProfile/CandidateProfileModal.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
import React from 'react' | ||
import {Button, Modal} from 'react-bootstrap' | ||
|
||
const CandidateProfileModal = React.createClass ({ | ||
close() { | ||
this.props.changeState({ showModal: false }); | ||
}, | ||
|
||
open() { | ||
this.props.changeState({ showModal: true }); | ||
}, | ||
|
||
render() { | ||
|
||
return ( | ||
<div> | ||
|
||
<Button | ||
bsStyle='primary' | ||
bsSize='large' | ||
onClick={this.open} | ||
> | ||
{this.props.name} profile | ||
</Button> | ||
|
||
<Modal show={this.props.showModal} onHide={this.close}> | ||
|
||
<Modal.Header closeButton> | ||
<Modal.Title>{this.props.name}</Modal.Title> | ||
</Modal.Header> | ||
|
||
<Modal.Body> | ||
|
||
<p>email: {this.props.email} {this.props.telephone}</p> | ||
<p>Telephone number: {this.props.telephone}</p> | ||
<p>University: {this.props.University}</p> | ||
<p>Degree: {this.props.Degree}</p> | ||
<p>Click here to see the {this.props.name} CV: {this.props.resumeLink}</p> | ||
<p>Description: {this.props.description}</p> | ||
|
||
</Modal.Body> | ||
|
||
<Modal.Footer> | ||
<Button onClick={this.close}>Close</Button> | ||
</Modal.Footer> | ||
|
||
</Modal> | ||
|
||
</div> | ||
) | ||
} | ||
|
||
}) | ||
|
||
CandidateProfileModal.propTypes = { | ||
name: React.PropTypes.string.isRequired, | ||
email: React.PropTypes.string.isRequired, | ||
telephone: React.PropTypes.string.isRequired, | ||
University: React.PropTypes.string.isRequired, | ||
Degree: React.PropTypes.string.isRequired, | ||
resumeLink: React.PropTypes.string.isRequired, | ||
description: React.PropTypes.string.isRequired | ||
} | ||
|
||
CandidateProfileModal.defaultProps = { | ||
name: 'Sam Package', | ||
email: '[email protected]', | ||
telephone: '07483849774', | ||
University: 'Bristol', | ||
Degree: 'Packages', | ||
resumeLink: 'resume.com/resume.doc', | ||
description: 'bla bla bla package bla' | ||
} | ||
|
||
export default CandidateProfileModal | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters