Display contact information for job and size thumbnail
This commit is contained in:
@ -1,11 +0,0 @@
|
||||
import React, { PropTypes } from 'react';
|
||||
|
||||
export default React.createClass({
|
||||
displayName: 'JobsList',
|
||||
propTypes: {
|
||||
foo: PropTypes.string
|
||||
},
|
||||
render() {
|
||||
return null;
|
||||
}
|
||||
});
|
@ -1,6 +1,7 @@
|
||||
import React, { PropTypes } from 'react';
|
||||
import { contain } from 'thundercats-react';
|
||||
import { Accordion, Thumbnail, Panel } from 'react-bootstrap';
|
||||
import { Accordion, Thumbnail, Panel, Well } from 'react-bootstrap';
|
||||
import moment from 'moment';
|
||||
|
||||
export default contain(
|
||||
{
|
||||
@ -13,8 +14,24 @@ export default contain(
|
||||
},
|
||||
|
||||
renderJobs(jobs =[]) {
|
||||
const thumbnailStyle = {
|
||||
backgroundColor: 'white',
|
||||
maxHeight: '200px',
|
||||
maxWidth: '200px'
|
||||
};
|
||||
return jobs.map((
|
||||
{ id, company, position, description, logo },
|
||||
{
|
||||
id,
|
||||
company,
|
||||
position,
|
||||
description,
|
||||
logo,
|
||||
city,
|
||||
state,
|
||||
email,
|
||||
phone,
|
||||
postedOn
|
||||
},
|
||||
index
|
||||
) => {
|
||||
const header = (
|
||||
@ -33,9 +50,17 @@ export default contain(
|
||||
eventKey={ index }
|
||||
header={ header }
|
||||
key={ id }>
|
||||
<Thumbnail alt='171x180' src={ logo } />
|
||||
<Thumbnail
|
||||
alt='200x200' src={ logo }
|
||||
style={ thumbnailStyle } />
|
||||
<Well>
|
||||
Location: { city }, { state }
|
||||
<br />
|
||||
Contact: { email || phone || 'N/A' }
|
||||
<br />
|
||||
Posted On: { moment(postedOn).format('MMMM Do, YYYY') }
|
||||
</Well>
|
||||
<p>{ description }</p>
|
||||
|
||||
</Panel>
|
||||
);
|
||||
});
|
||||
|
@ -16,7 +16,10 @@
|
||||
"city": {
|
||||
"type": "string"
|
||||
},
|
||||
"contact": {
|
||||
"email": {
|
||||
"type": "string"
|
||||
},
|
||||
"phone": {
|
||||
"type": "string"
|
||||
},
|
||||
"state": {
|
||||
@ -40,8 +43,9 @@
|
||||
"isPaid": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"createdOn": {
|
||||
"type": "date"
|
||||
"postedOn": {
|
||||
"type": "date",
|
||||
"defaultFn": "now"
|
||||
}
|
||||
},
|
||||
"validations": [],
|
||||
|
@ -2,6 +2,7 @@
|
||||
{
|
||||
"id": "bd7167d8c441cbafaeb5bdef",
|
||||
"email": "Ada_Gerlach@gmail.com",
|
||||
"phone": "1-140-557-0727",
|
||||
"company": "Livestream",
|
||||
"country": "Singapore",
|
||||
"city": "Morar berg",
|
||||
@ -23,7 +24,7 @@
|
||||
},
|
||||
{
|
||||
"id": "bd7167d8c443cbafaeb5bdef",
|
||||
"email": "Ada_Gerlach@gmail.com",
|
||||
"phone": "1-140-557-0727",
|
||||
"company": "Bookspan",
|
||||
"country": "Singapore",
|
||||
"city": "Morar berg",
|
||||
|
Reference in New Issue
Block a user