diff --git a/common/app/routes/Jobs/components/Show.jsx b/common/app/routes/Jobs/components/Show.jsx
index b15a6b154d..85034e3242 100644
--- a/common/app/routes/Jobs/components/Show.jsx
+++ b/common/app/routes/Jobs/components/Show.jsx
@@ -1,4 +1,4 @@
-import React, { createClass } from 'react';
+import React, { PropTypes } from 'react';
import { History } from 'react-router';
import { contain } from 'thundercats-react';
@@ -6,7 +6,7 @@ import ShowJob from './ShowJob.jsx';
import JobNotFound from './JobNotFound.jsx';
import { isJobValid } from '../utils';
-function shouldShowJob(
+function shouldShowApply(
{
isFrontEndCert: isFrontEndCertReq = false,
isFullStackCert: isFullStackCertReq = false
@@ -22,9 +22,12 @@ function shouldShowJob(
function generateMessage(
{
- isFrontEndCert: isFrontEndCertReq = false
- }, {
+ isFrontEndCert: isFrontEndCertReq = false,
+ isFullStackCert: isFullStackCertReq = false
+ },
+ {
isFrontEndCert = false,
+ isFullStackCert = false,
isSignedIn = false
}
) {
@@ -33,9 +36,19 @@ function generateMessage(
return 'Must be signed in to apply';
}
if (isFrontEndCertReq && !isFrontEndCert) {
- return 'You must earn your Full Stack Certification to apply';
+ return 'This employer requires Free Code Camp’s Front ' +
+ 'End Development Certification in order to apply';
}
- return 'You must earn your Front End Certification to apply';
+ if (isFullStackCertReq && !isFullStackCert) {
+ return 'This employer requires Free Code Camp’s Full ' +
+ 'Stack Development Certification in order to apply';
+ }
+ if (isFrontEndCertReq && isFrontEndCertReq) {
+ return 'This employer requires the Front End Development Certification. ' +
+ "You've earned it, so feel free to apply.";
+ }
+ return 'This employer requires the Full Stack Development Certification. ' +
+ "You've earned it, so feel free to apply.";
}
export default contain(
@@ -66,9 +79,16 @@ export default contain(
return job.id !== id;
}
},
- createClass({
+ React.createClass({
displayName: 'Show',
+ propTypes: {
+ job: PropTypes.object,
+ isFullStackCert: PropTypes.bool,
+ isFrontEndCert: PropTypes.bool,
+ username: PropTypes.string
+ },
+
mixins: [History],
componentDidMount() {
@@ -86,15 +106,28 @@ export default contain(
job,
username
} = this.props;
- const isSignedIn = !!username;
if (!isJobValid(job)) {
return { message }
+ { message }
+
{ description }
-