Skip to content

Commit

Permalink
fix(dashboard): les stats de consultation incluaient tout le temps le…
Browse files Browse the repository at this point in the history
…s consultations sans équipe lorsqu'on cliquait sur 'visualiser les données de toute l'organisation', c'est corrigé
  • Loading branch information
Arnaud AMBROSELLI committed Nov 28, 2023
1 parent e7a8128 commit bf9e278
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions dashboard/src/scenes/stats/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,11 @@ const itemsForStatsSelector = selectorFamily({
isIncluded = true;
}
if (!isIncluded) continue;
} else {
console.log('action.team', action.team);
const { isoStartDate, isoEndDate } = selectedTeamsObjectWithOwnPeriod[action.team] ?? defaultIsoDates;
if (date < isoStartDate) continue;
if (date >= isoEndDate) continue;
}
actionsFilteredByPersons[action._id] = action;
personsWithActions[person._id] = person;
Expand All @@ -186,6 +191,10 @@ const itemsForStatsSelector = selectorFamily({
isIncluded = true;
}
if (!isIncluded) continue;
} else {
const { isoStartDate, isoEndDate } = selectedTeamsObjectWithOwnPeriod[consultation.team] ?? defaultIsoDates;
if (date < isoStartDate) continue;
if (date >= isoEndDate) continue;
}
consultationsFilteredByPersons.push(consultation);
personsWithConsultations[person._id] = person;
Expand Down

0 comments on commit bf9e278

Please sign in to comment.