Skip to content

Commit

Permalink
WIP comments in usecase
Browse files Browse the repository at this point in the history
  • Loading branch information
P-Jeremy committed Oct 8, 2024
1 parent e11b981 commit cf5b2fa
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,15 @@ export async function verifyCandidateSubscriptions({

const subscribedHighestBadgeAcquisition = _getSubscribedHighestBadgeAcquisition(userAcquiredBadges, candidate);

// PB CE NE SONT PAS DES BADGES QUI CORRESPONDENT A LA BDD (PAS DE DETACHEDAT, NI CE COMPLE_CERT_ID) ET ON S'EN FOUT DU OFFSET ET CURRENT ICI
// LE MODELE RENVOYE NE CORRESPOND PAS AU BESOIN
// LE REPO UTILISE ICI NE FAIT PAS VRAIMENT CE QUI EST ATTENDU DE BASE MAIS PAS BLOQUANT POUR CETTE PR
const complementaryCertificationBadges = await complementaryCertificationBadgeRepository.findAll();

const userComplementaryCertificationBadgesSortedByLevel =
_getSubscribedComplementaryCertificationBadgesSortedByLevel(complementaryCertificationBadges, candidate);

// ON DEVRAIT FILTRER SUBSCRIBED.CCBADGID === complementaryCertificationBadges.ID ET NE PAS FAIRE LA LIGNE DU DESSUS
const subscribedComplementaryCertificationBadge = _getSubscribedComplementaryCertificationBadge(
userComplementaryCertificationBadgesSortedByLevel,
subscribedHighestBadgeAcquisition,
Expand All @@ -87,6 +91,7 @@ export async function verifyCandidateSubscriptions({
}

function _isSubscribedUserBadgeOutDated(subscribedComplementaryCertificationBadge) {
// PAS DE DETACHEDAT
return subscribedComplementaryCertificationBadge?.detachedAt !== null;
}

Expand Down

0 comments on commit cf5b2fa

Please sign in to comment.