Merge pull request #1236 from codecombat/master

Fixed employer view for manually created candidates
This commit is contained in:
Michael Schmatz 2014-06-26 17:19:21 -07:00
commit 6184761ea5

View file

@ -30,7 +30,9 @@ block content
tbody tbody
for employer, index in employers for employer, index in employers
- var activity = employer.get('activity') || {}; - var activity = employer.get('activity') || {};
- var linkedIn = employer.get('signedEmployerAgreement').data - var hasLinkedIn = typeof employer.get('signedEmployerAgreement') !== "undefined";
- var emptyDate = {date: Date.now()};
- var linkedIn = hasLinkedIn ? employer.get('signedEmployerAgreement').data : emptyDate;
tr(data-employer-id=employer.id) tr(data-employer-id=employer.id)
td td
img(src=employer.getPhotoURL(50), height=50) img(src=employer.getPhotoURL(50), height=50)
@ -48,7 +50,10 @@ block content
if !employer.get('firstName') && !linkedIn.firstName && !employer.get('name') if !employer.get('firstName') && !linkedIn.firstName && !employer.get('name')
| Anoner | Anoner
td td
a(href=employer.get('signedEmployerAgreement').data.publicProfileUrl)= employer.get('employerAt') if employer.get('signedEmployerAgreement')
a(href=employer.get('signedEmployerAgreement').data.publicProfileUrl)= employer.get('employerAt')
else
| Unknown
td= employer.get('email') td= employer.get('email')
for a in ['login', 'view_candidate', 'contact_candidate'] for a in ['login', 'view_candidate', 'contact_candidate']
- var act = activity[a]; - var act = activity[a];
@ -62,4 +67,4 @@ block content
span= moment(act.last).fromNow() span= moment(act.last).fromNow()
else else
td 0 td 0
td(data-employer-age=(new Date() - new Date(employer.get('signedEmployerAgreement').date)) / 86400 / 1000)= moment(employer.get('signedEmployerAgreement').date).fromNow() td(data-employer-age=(new Date() - new Date(linkedIn.date)) / 86400 / 1000)= moment(employer.get('signedEmployerAgreement') ? employer.get('signedEmployerAgreement').date : linkedIn.date).fromNow()