mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-23 23:58:02 -05:00
Various fixes to enable employers page to function correctly
This commit is contained in:
parent
7eeb964d3e
commit
c6cc28b976
2 changed files with 3 additions and 1 deletions
|
@ -41,6 +41,8 @@ module.exports = class EmployersView extends View
|
||||||
ctx.activeCandidates = _.filter ctx.candidates, (c) -> c.get('jobProfile').active
|
ctx.activeCandidates = _.filter ctx.candidates, (c) -> c.get('jobProfile').active
|
||||||
ctx.inactiveCandidates = _.reject ctx.candidates, (c) -> c.get('jobProfile').active
|
ctx.inactiveCandidates = _.reject ctx.candidates, (c) -> c.get('jobProfile').active
|
||||||
ctx.featuredCandidates = _.filter ctx.activeCandidates, (c) -> c.get('jobProfileApproved')
|
ctx.featuredCandidates = _.filter ctx.activeCandidates, (c) -> c.get('jobProfileApproved')
|
||||||
|
#ctx.featuredCandidates = _.filter ctx.featuredCandidates, (c) -> c.get('jobProfile').curated
|
||||||
|
ctx.featuredCandidates = ctx.featuredCandidates.slice(0,8)
|
||||||
ctx.otherCandidates = _.reject ctx.activeCandidates, (c) -> c.get('jobProfileApproved')
|
ctx.otherCandidates = _.reject ctx.activeCandidates, (c) -> c.get('jobProfileApproved')
|
||||||
ctx.remarks = {}
|
ctx.remarks = {}
|
||||||
ctx.remarks[remark.get('user')] = remark for remark in @remarks.models
|
ctx.remarks[remark.get('user')] = remark for remark in @remarks.models
|
||||||
|
|
|
@ -324,7 +324,7 @@ UserHandler = class UserHandler extends Handler
|
||||||
fields = if authorized then ['name', 'jobProfile', 'jobProfileApproved', 'photoURL', '_id'] else ['jobProfile', 'jobProfileApproved']
|
fields = if authorized then ['name', 'jobProfile', 'jobProfileApproved', 'photoURL', '_id'] else ['jobProfile', 'jobProfileApproved']
|
||||||
obj = _.pick document.toObject(), fields
|
obj = _.pick document.toObject(), fields
|
||||||
obj.photoURL ||= obj.jobProfile.photoURL if authorized
|
obj.photoURL ||= obj.jobProfile.photoURL if authorized
|
||||||
subfields = ['country', 'city', 'lookingFor', 'jobTitle', 'skills', 'experience', 'updated', 'active']
|
subfields = ['country', 'city', 'lookingFor', 'jobTitle', 'skills', 'experience', 'updated', 'active', 'shortDescription', 'curated']
|
||||||
if authorized
|
if authorized
|
||||||
subfields = subfields.concat ['name']
|
subfields = subfields.concat ['name']
|
||||||
obj.jobProfile = _.pick obj.jobProfile, subfields
|
obj.jobProfile = _.pick obj.jobProfile, subfields
|
||||||
|
|
Loading…
Reference in a new issue