| margin-bottom: 36px; | margin-bottom: 36px; | ||||
| } | } | ||||
| .proba{ | |||||
| margin-top: 64px; | |||||
| } | |||||
| .candidates-options-container { | .candidates-options-container { | ||||
| display: flex; | display: flex; | ||||
| } | } | ||||
| margin-left: 5px; | margin-left: 5px; | ||||
| } | } | ||||
| .proba { | |||||
| .top-cnd { | |||||
| margin-top: 39px; | margin-top: 39px; | ||||
| } | } | ||||
| .proba > div:not(:first-child) { | |||||
| .top-cnd > div:not(:first-child) { | |||||
| margin-top: 79px; | margin-top: 79px; | ||||
| } | } | ||||
| .proba2 { | |||||
| .left-move-candidateAd { | |||||
| margin-left: 27px; | margin-left: 27px; | ||||
| } | } | ||||
| add={add} | add={add} | ||||
| key={index} | key={index} | ||||
| onclick={() => navigateToDetailsPage(add.id)} | onclick={() => navigateToDetailsPage(add.id)} | ||||
| className={index === 0 ? "" : "proba2"} | |||||
| className={index === 0 ? "" : "left-move-candidateAd"} | |||||
| /> | /> | ||||
| ))} | ))} | ||||
| {candidate.ads.length <= 5 && getDummyAds(candidate.ads.length)} | {candidate.ads.length <= 5 && getDummyAds(candidate.ads.length)} |
| /> | /> | ||||
| </div> | </div> | ||||
| ) : ( | ) : ( | ||||
| <div className="ads-candidates-container proba"> | |||||
| <div className="ads-candidates-container top-cnd"> | |||||
| {adsCandidates.map((adCandidates, index) => ( | {adsCandidates.map((adCandidates, index) => ( | ||||
| <div className="ads-candidates" key={index}> | <div className="ads-candidates" key={index}> | ||||
| <div className="ads-candidates-top-container"> | <div className="ads-candidates-top-container"> | ||||
| key={index} | key={index} | ||||
| candidate={candidate} | candidate={candidate} | ||||
| history={history} | history={history} | ||||
| className={index === 0 ? "" : "proba2"} | |||||
| className={index === 0 ? "" : "left-move-candidateAd"} | |||||
| /> | /> | ||||
| ))} | ))} | ||||
| {adCandidates.applicants.length <= 4 && | {adCandidates.applicants.length <= 4 && | ||||
| ))} | ))} | ||||
| </div> | </div> | ||||
| )} | )} | ||||
| <IconButton className="c-btn candidate-btn invite-btn invite-btn-color"> | |||||
| <IconButton className={'c-btn candidate-btn invite-btn invite-btn-color ' + (isTableView === false ? 'proba' : '')}> | |||||
| <img src={planeImage} alt="table" className="candidates-image" /> | <img src={planeImage} alt="table" className="candidates-image" /> | ||||
| Invite | Invite | ||||
| </IconButton> | </IconButton> |
| ); | ); | ||||
| function filterCandidates(state, action) { | function filterCandidates(state, action) { | ||||
| let m = action.payload; | |||||
| let t = m.pop(); | |||||
| return { | return { | ||||
| ...state, | ...state, | ||||
| candidates: m, | |||||
| pagination: t, | |||||
| candidates: action.payload.items, | |||||
| pagination: action.payload.total, | |||||
| }; | }; | ||||
| } | } | ||||
| try { | try { | ||||
| const JwtToken = yield call(authScopeStringGetHelper, JWT_TOKEN); | const JwtToken = yield call(authScopeStringGetHelper, JWT_TOKEN); | ||||
| yield call(addHeaderToken, JwtToken); | yield call(addHeaderToken, JwtToken); | ||||
| const response = yield call(getFilteredCandidates,payload); | |||||
| let data = response.data; | |||||
| const pagination = response.headers.pagination; | |||||
| data.push(pagination) | |||||
| const {data} = yield call(getFilteredCandidates,payload); | |||||
| yield put(filterCandidatesSuccess(data)); | yield put(filterCandidatesSuccess(data)); | ||||
| if(payload.handleApiResponseSuccess){ | if(payload.handleApiResponseSuccess){ | ||||
| yield call(payload.handleApiResponseSuccess) | yield call(payload.handleApiResponseSuccess) |