mirror of
https://framagit.org/enfance-libre/statistiques
synced 2025-12-07 07:33:46 +00:00
59 lines
1.8 KiB
TypeScript
59 lines
1.8 KiB
TypeScript
import { TypeEvenement } from "./TypeEvenement";
|
|
|
|
export type TypeEvenementsPenal = (typeof typesEvenementsPenal)[number];
|
|
export const typesEvenementsPenal = [
|
|
"Mise en demeure de scolarisation",
|
|
|
|
"Gendarmerie/Forces de l'ordre",
|
|
|
|
// Procureur
|
|
"Audition procureur",
|
|
|
|
"Refus CRPC",
|
|
"Acceptation CRPC", // PLaceholder see does not exist in Notion yet // See https://discord.com/channels/990921361121746984/1245360366322585691/1248260713634336839
|
|
"Classement pénal sans suite",
|
|
"Classement sous condition",
|
|
|
|
"Composition pénale refusée",
|
|
"Composition pénale acceptée",
|
|
|
|
"Acceptation avertissement pénal probatoire",
|
|
"Stage parentalité ou citoyenneté",
|
|
"Réquisition judiciaire",
|
|
|
|
// Tribunal correctionnel
|
|
"Tribunal correctionnel",
|
|
"Appel jugement Tribunal Correctionnel",
|
|
"Appel du 2ème jugement TC", // placeholder
|
|
"Administrateur AD'HOC",
|
|
"Relaxe Tribunal correctionnel",
|
|
"Vice de procédure tribunal correctionnel",
|
|
"Appel du parquet",
|
|
"Procès appel TC",
|
|
// Tribunal de police
|
|
"Tribunal de police judiciaire",
|
|
"Relaxe Tribunal de police",
|
|
"Appel Tribunal Police opposition ordonnance pénale",
|
|
"Procès appel TP",
|
|
// [,,,"Amendes",,,,"Classement sous condition","Information non médico-sociale"]
|
|
] as const;
|
|
|
|
export function isEvtTypeProcedurePenale(evtType: TypeEvenement): boolean {
|
|
return (
|
|
typesEvenementsPenal.includes(evtType as TypeEvenementsPenal) &&
|
|
evtType !== "Mise en demeure de scolarisation"
|
|
);
|
|
}
|
|
|
|
export const typeEvenementsProcedurePenale = typesEvenementsPenal.filter(
|
|
isEvtTypeProcedurePenale
|
|
);
|
|
|
|
export function isEvtTypeProcedurePenaleHorsGendarmerie(
|
|
evtType: TypeEvenement
|
|
): boolean {
|
|
return (
|
|
isEvtTypeProcedurePenale(evtType) &&
|
|
evtType !== "Gendarmerie/Forces de l'ordre"
|
|
);
|
|
}
|