feat: Nb familles ou le procès d'appel est planifié

This commit is contained in:
Sébastien Arod 2025-05-27 21:09:55 +02:00
parent bc04646fbe
commit 728e219878
4 changed files with 19 additions and 3 deletions

View file

@ -19,6 +19,9 @@ export const statsTribunalCorrectionnelDesc = {
nbFamillesAvecAppelDuParquet: {
label: "Nb familles ou le parquet à fait appel",
},
nbFamillesAvecProcesAppelPlanifie: {
label: "Nb familles ou le procès d'appel est planifié",
},
} as const;
export const statsPenalesDesc = {

View file

@ -6,5 +6,5 @@ export type InfoTribunalCorrectionnel = {
evtViceDeProcedure?: EvenementFamille;
evtAppel?: EvenementFamille;
evtAppelDuParquet?: EvenementFamille;
procesDAppel?: EvenementFamille;
evtProcesAppel?: EvenementFamille;
};

View file

@ -36,6 +36,9 @@ export function buildInfoTribunauxCorrectionnel(
evtAppelDuParquet: eventsBetweenCurrentTribAndNextTrib.find(
(e) => e.Type === "Appel du parquet"
),
evtProcesAppel: eventsBetweenCurrentTribAndNextTrib.find(
(e) => e.Type === "Procès appel TC"
),
};
});
}

View file

@ -20,6 +20,12 @@ export function computeTribunalCorrectionnel(
!isEvenementBefore(f.infoTribunaux[indexTribunal].evtTribunal, now)
);
const famillesViceDeProcedure = famillesPassees.filter(
(f) =>
f.infoTribunaux.length > indexTribunal &&
f.infoTribunaux[indexTribunal].evtViceDeProcedure
);
const famillesRelaxees = famillesPassees.filter(
(f) =>
f.infoTribunaux.length > indexTribunal &&
@ -37,10 +43,11 @@ export function computeTribunalCorrectionnel(
f.infoTribunaux.length > indexTribunal &&
f.infoTribunaux[indexTribunal].evtAppelDuParquet
);
const famillesViceDeProcedure = famillesPassees.filter(
const nbFamillesAvecProcesAppelPlanifie = famillesPassees.filter(
(f) =>
f.infoTribunaux.length > indexTribunal &&
f.infoTribunaux[indexTribunal].evtViceDeProcedure
f.infoTribunaux[indexTribunal].evtProcesAppel
);
return {
@ -56,5 +63,8 @@ export function computeTribunalCorrectionnel(
nbFamillesAvecAppelDuParquet: nbFamillesAvecPagesLiees(
famillesAppelDuParquet
),
nbFamillesAvecProcesAppelPlanifie: nbFamillesAvecPagesLiees(
nbFamillesAvecProcesAppelPlanifie
),
};
}