Bladeren bron

refactoring code

feature/1522_UI_when_table_view_is_disabled-fe
Dzenis Hadzifejzovic 3 jaren geleden
bovenliggende
commit
bbc8cf9e9e

+ 7
- 3
src/assets/styles/components/_candidatesPage.scss Bestand weergeven

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;
} }



+ 1
- 1
src/pages/CandidateDetailsPage/CandidateDetailsPage.js Bestand weergeven

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)}

+ 3
- 3
src/pages/CandidatesPage/CandidatesPage.js Bestand weergeven

/> />
</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>

+ 2
- 4
src/store/reducers/candidates/candidatesReducer.js Bestand weergeven

); );


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,
}; };
} }



+ 1
- 4
src/store/saga/candidatesSaga.js Bestand weergeven

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)

Laden…
Annuleren
Opslaan