api/src/services/jeveuxaider.js
Avoid deeply nested control flow statements. Open
Open
if (young.statusPhase2 === YOUNG_STATUS_PHASE2.IN_PROGRESS && application.status === APPLICATION_STATUS.VALIDATED) data.actions.missionInProgress += 1;
Avoid deeply nested control flow statements. Open
Open
if (contract && application.status === APPLICATION_STATUS.VALIDATED) {
const statusContract = checkStatusContract(contract);
if (statusContract === CONTRACT_STATUS.DRAFT) data.actions.contractToBeFilled += 1;
if (statusContract === CONTRACT_STATUS.SENT && contract.structureManagerStatus === "WAITING_VALIDATION") data.actions.contractToBeSigned += 1;
if (statusContract === CONTRACT_STATUS.VALIDATED && young.status === YOUNG_STATUS.VALIDATED) data.actions.volunteerToHost += 1;
Avoid deeply nested control flow statements. Open
Open
if (application.status === APPLICATION_STATUS.WAITING_VALIDATION) data.actions.applicationWaitingValidation += 1;