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
|
||||
for employer, index in employers
|
||||
- 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)
|
||||
td
|
||||
img(src=employer.getPhotoURL(50), height=50)
|
||||
|
@ -48,7 +50,10 @@ block content
|
|||
if !employer.get('firstName') && !linkedIn.firstName && !employer.get('name')
|
||||
| Anoner
|
||||
td
|
||||
if employer.get('signedEmployerAgreement')
|
||||
a(href=employer.get('signedEmployerAgreement').data.publicProfileUrl)= employer.get('employerAt')
|
||||
else
|
||||
| Unknown
|
||||
td= employer.get('email')
|
||||
for a in ['login', 'view_candidate', 'contact_candidate']
|
||||
- var act = activity[a];
|
||||
|
@ -62,4 +67,4 @@ block content
|
|||
span= moment(act.last).fromNow()
|
||||
else
|
||||
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