diff --git a/src/statistiques/v2/penales/StatsPenales.ts b/src/statistiques/v2/penales/StatsPenales.ts index e805abd..0a00fdf 100644 --- a/src/statistiques/v2/penales/StatsPenales.ts +++ b/src/statistiques/v2/penales/StatsPenales.ts @@ -16,6 +16,9 @@ export const statsTribunalCorrectionnelDesc = { nbFamillesRelaxees: { label: "Nb familles relaxées 🥳", }, + nbFamillesAvecAppelDuParquet: { + label: "Nb familles ou le parquet à fait appel", + }, } as const; export const statsPenalesDesc = { diff --git a/src/statistiques/v2/penales/tc/InfoTribunalCorrectionnel.ts b/src/statistiques/v2/penales/tc/InfoTribunalCorrectionnel.ts index 7ee51e9..bd1def8 100644 --- a/src/statistiques/v2/penales/tc/InfoTribunalCorrectionnel.ts +++ b/src/statistiques/v2/penales/tc/InfoTribunalCorrectionnel.ts @@ -5,4 +5,6 @@ export type InfoTribunalCorrectionnel = { evtRelaxe?: EvenementFamille; evtViceDeProcedure?: EvenementFamille; evtAppel?: EvenementFamille; + evtAppelDuParquet?: EvenementFamille; + procesDAppel?: EvenementFamille; }; diff --git a/src/statistiques/v2/penales/tc/buildInfoTribunauxCorrectionnel.ts b/src/statistiques/v2/penales/tc/buildInfoTribunauxCorrectionnel.ts index 49ae20b..ab942f6 100644 --- a/src/statistiques/v2/penales/tc/buildInfoTribunauxCorrectionnel.ts +++ b/src/statistiques/v2/penales/tc/buildInfoTribunauxCorrectionnel.ts @@ -32,6 +32,10 @@ export function buildInfoTribunauxCorrectionnel( evtRelaxe: eventsBetweenCurrentTribAndNextTrib.find( (e) => e.Type === "Relaxe Tribunal correctionnel" ), + + evtAppelDuParquet: eventsBetweenCurrentTribAndNextTrib.find( + (e) => e.Type === "Appel du parquet" + ), }; }); } diff --git a/src/statistiques/v2/penales/tc/computeTribunalCorrectionnel.ts b/src/statistiques/v2/penales/tc/computeTribunalCorrectionnel.ts index ef1a9e9..461004a 100644 --- a/src/statistiques/v2/penales/tc/computeTribunalCorrectionnel.ts +++ b/src/statistiques/v2/penales/tc/computeTribunalCorrectionnel.ts @@ -32,6 +32,11 @@ export function computeTribunalCorrectionnel( f.infoTribunaux[indexTribunal].evtAppel ); + const famillesAppelDuParquet = famillesPassees.filter( + (f) => + f.infoTribunaux.length > indexTribunal && + f.infoTribunaux[indexTribunal].evtAppelDuParquet + ); const famillesViceDeProcedure = famillesPassees.filter( (f) => f.infoTribunaux.length > indexTribunal && @@ -48,5 +53,8 @@ export function computeTribunalCorrectionnel( nbFamillesViceDeProcedure: nbFamillesAvecPagesLiees( famillesViceDeProcedure ), + nbFamillesAvecAppelDuParquet: nbFamillesAvecPagesLiees( + famillesAppelDuParquet + ), }; }