mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-12-02 03:47:09 -05:00
Merge pull request #1236 from codecombat/master
Fixed employer view for manually created candidates
This commit is contained in:
commit
6184761ea5
1 changed files with 8 additions and 3 deletions
|
@ -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()
|
||||||
|
|
Loading…
Reference in a new issue