Skip to content
This repository has been archived by the owner on May 28, 2018. It is now read-only.

Commit

Permalink
Display applicant status and establishment for PEPITE
Browse files Browse the repository at this point in the history
  • Loading branch information
nbrohee committed Dec 12, 2016
1 parent f1a651f commit 695fe5b
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 1 deletion.
15 changes: 15 additions & 0 deletions client/src/components/pepite/GraduationLabel.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import React, { PropTypes } from 'react'

const GraduationLabel = ({application}) => {
if (application.contact.situation == 'student' && application.profile.situation == 'student') {
return (<span className="label label-info">Étudiant</span>)
} else {
return (<span className="label label-primary">Diplômé</span>)
}
}

GraduationLabel.propTypes = {
application: PropTypes.object.isRequired,
}

export default GraduationLabel
5 changes: 4 additions & 1 deletion client/src/components/pepite/PepiteApplicantRow.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
import React, { PropTypes } from 'react'
import { Glyphicon } from 'react-bootstrap'
import GraduationLabel from './GraduationLabel'

const PepiteApplicantRow = ({application}) => {
return (
<tr>
<td>{application.contact.firstname}</td>
<td>{application.contact.name}</td>
<td>{application.contact.email}</td>
<td><a className="btn btn-info btn-xs" target="_blank" href={`/application/${application._id}`}><Glyphicon glyph="share-alt"/></a></td>
<td>{application.career.diploma.establishment}</td>
<td><GraduationLabel application={application}/></td>
<td><a className="btn btn-info btn-xs" target="_blank" href={`/application/${application._id}`}><Glyphicon glyph="share-alt" /></a></td>
</tr>
)
}
Expand Down
2 changes: 2 additions & 0 deletions client/src/components/pepite/PepiteHomePage.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ export class PepiteHomePage extends React.Component {
<th>Nom</th>
<th>Prénom</th>
<th>Email</th>
<th>Établissement</th>
<th>Status</th>
<th>Candidature</th>
</tr>
</thead>
Expand Down

0 comments on commit 695fe5b

Please sign in to comment.