@@ -56,6 +56,8 @@ class RecruitCRMJobsContainer extends React.Component {
5656 const {
5757 getJobs,
5858 jobs,
59+ getJobApplications,
60+ auth,
5961 } = this . props ;
6062 const { state } = this ;
6163 const q = getQuery ( ) ;
@@ -74,6 +76,9 @@ class RecruitCRMJobsContainer extends React.Component {
7476 } ;
7577 this . setState ( stateUpdate ) ;
7678 }
79+ if ( auth . tokenV3 ) {
80+ getJobApplications ( auth . tokenV3 ) ;
81+ }
7782 }
7883
7984 /**
@@ -138,6 +143,7 @@ class RecruitCRMJobsContainer extends React.Component {
138143 loading,
139144 jobs,
140145 optimizely,
146+ applications,
141147 } = this . props ;
142148 const {
143149 term,
@@ -250,7 +256,7 @@ class RecruitCRMJobsContainer extends React.Component {
250256 < Dropdown label = "Location" onChange = { this . onLocation } options = { locations } size = "xs" />
251257 < Dropdown label = "Sort by" onChange = { this . onSort } options = { sortByOptions } size = "xs" />
252258 </ div >
253- < GigHeader />
259+ < GigHeader appNum = { applications } />
254260 < div styleName = "jobs-list-container" >
255261 {
256262 jobsToDisplay . length
@@ -290,20 +296,29 @@ class RecruitCRMJobsContainer extends React.Component {
290296RecruitCRMJobsContainer . defaultProps = {
291297 jobs : [ ] ,
292298 loading : true ,
299+ applications : 0 ,
300+ auth : { } ,
293301} ;
294302
295303RecruitCRMJobsContainer . propTypes = {
296304 getJobs : PT . func . isRequired ,
297305 loading : PT . bool ,
298306 jobs : PT . arrayOf ( PT . shape ) ,
299307 optimizely : PT . shape ( ) . isRequired ,
308+ getJobApplications : PT . func . isRequired ,
309+ applications : PT . number ,
310+ auth : PT . object ,
300311} ;
301312
302313function mapStateToProps ( state ) {
303314 const data = state . recruitCRM ;
304315 return {
305316 jobs : data ? data . jobs : [ ] ,
306317 loading : data ? data . loading : true ,
318+ applications : data . applications ,
319+ auth : {
320+ ...state . auth ,
321+ } ,
307322 } ;
308323}
309324
@@ -314,6 +329,10 @@ function mapDispatchToActions(dispatch) {
314329 dispatch ( a . getJobsInit ( ownProps ) ) ;
315330 dispatch ( a . getJobsDone ( ownProps ) ) ;
316331 } ,
332+ getJobApplications : ( tokenV3 ) => {
333+ dispatch ( a . getJobApplicationsInit ( ) ) ;
334+ dispatch ( a . getJobApplicationsDone ( tokenV3 ) ) ;
335+ } ,
317336 } ;
318337}
319338
0 commit comments