From bc04646fbe7aadb652299889a839c7c73bbf7e7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Arod?= Date: Tue, 27 May 2025 20:57:43 +0200 Subject: [PATCH] =?UTF-8?q?feat:=20stat:s=20Nb=20familles=20ou=20le=20parq?= =?UTF-8?q?uet=20=C3=A0=20fait=20appel?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/statistiques/v2/penales/StatsPenales.ts | 3 +++ .../v2/penales/tc/InfoTribunalCorrectionnel.ts | 2 ++ .../v2/penales/tc/buildInfoTribunauxCorrectionnel.ts | 4 ++++ .../v2/penales/tc/computeTribunalCorrectionnel.ts | 8 ++++++++ 4 files changed, 17 insertions(+) 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 + ), }; }