mirror of
https://framagit.org/enfance-libre/statistiques
synced 2025-12-07 04:03:44 +00:00
fix: prop EvenementsDates
This commit is contained in:
parent
376a79ae85
commit
d5755516fb
3 changed files with 8 additions and 1 deletions
|
|
@ -28,6 +28,10 @@ export type Famille = Readonly<{
|
|||
// Inclus aussi les evenements sans date
|
||||
Evenements: EvenementFamille[];
|
||||
|
||||
// Tous Evenements triés par date asc
|
||||
// Inclus aussi les evenements sans date
|
||||
EvenementsDates: EvenementFamille[];
|
||||
|
||||
// Evenements durant la période EL triés par date asc
|
||||
EvenementsEL: EvenementFamille[];
|
||||
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ export function initialiserLesEvenementsDetailles(
|
|||
const EvenementsAvantEL = f.Evenements.filter(
|
||||
(e) => e.Date !== null && f.Integration !== null && e.Date < f.Integration
|
||||
);
|
||||
const EvenementsDates = f.Evenements.filter((e) => e.Date !== null);
|
||||
|
||||
const EvenementsEL = f.Evenements.filter(
|
||||
(e) =>
|
||||
|
|
@ -25,6 +26,7 @@ export function initialiserLesEvenementsDetailles(
|
|||
|
||||
return {
|
||||
...f,
|
||||
EvenementsDates: EvenementsDates,
|
||||
EvenementsAvantEL: EvenementsAvantEL,
|
||||
EvenementsEL: EvenementsEL,
|
||||
EvenementsApresEL: EvenementsApresEL,
|
||||
|
|
|
|||
|
|
@ -252,7 +252,8 @@ function buildFamily(
|
|||
Integration: datePropertyToDate(pageProperties, "Intégration"),
|
||||
Sortie: datePropertyToDate(pageProperties, "Sortie"),
|
||||
Evenements: familyEvents.filter((fe) => fe.notionIdFamille === page.id),
|
||||
// Ces trois propriétés seront peuplés après le data consistency check
|
||||
// Ces 4 propriétés seront peuplés après le data consistency check
|
||||
EvenementsDates: [],
|
||||
EvenementsEL: [],
|
||||
EvenementsAvantEL: [],
|
||||
EvenementsApresEL: [],
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue