fix: nouvelle valeurs de StatutFamille
parent
539e1a9e38
commit
e906093d1d
|
@ -27,7 +27,7 @@ export function periodOfResistance(
|
|||
family: Famille,
|
||||
atDate: Date = new Date(Date.now())
|
||||
): Period | null {
|
||||
if (family.Statut !== "Résistant.e" && family.Statut !== "Ex résistant·e·s") {
|
||||
if (family.Statut !== "Résistant·e" && family.Statut !== "Ex résistant·e") {
|
||||
return null;
|
||||
}
|
||||
if (!family.Integration || family.Integration > atDate) {
|
||||
|
|
|
@ -8,8 +8,8 @@ export const statutsPreIntegration = ["en réflexion"] as const;
|
|||
export const statutsIntegrationEnEchec = ["Abandon", "Incompatible"] as const;
|
||||
export const statutsFamille = [
|
||||
...statutsPreIntegration,
|
||||
"Résistant.e",
|
||||
"Ex résistant·e·s",
|
||||
"Résistant·e",
|
||||
"Ex résistant·e",
|
||||
...statutsIntegrationEnCours,
|
||||
...statutsIntegrationEnEchec,
|
||||
] as const;
|
||||
|
|
|
@ -22,30 +22,30 @@ function checkFamilyDataConsistency(family: Famille): ConsistencyReport {
|
|||
const consistencyErrors: ConsistencyIssue[] = [];
|
||||
const consistencyWarnings: ConsistencyIssue[] = [];
|
||||
|
||||
if (family.Statut === "Résistant.e") {
|
||||
if (family.Statut === "Résistant·e") {
|
||||
if (family.Integration === null) {
|
||||
consistencyErrors.push({
|
||||
familyId: family.Titre,
|
||||
issueType: "Résistant.e sans date d'Intégration",
|
||||
issueType: "Résistant·e sans date d'Intégration",
|
||||
});
|
||||
}
|
||||
if (family.Sortie !== null) {
|
||||
consistencyErrors.push({
|
||||
familyId: family.Titre,
|
||||
issueType: "Résistant.e avec Date de Sortie",
|
||||
issueType: "Résistant·e avec Date de Sortie",
|
||||
});
|
||||
}
|
||||
} else if (family.Statut === "Ex résistant·e·s") {
|
||||
} else if (family.Statut === "Ex résistant·e") {
|
||||
if (family.Integration === null) {
|
||||
consistencyErrors.push({
|
||||
familyId: family.Titre,
|
||||
issueType: "Ex résistant.e.s sans date Intégration",
|
||||
issueType: "Ex résistant·e sans date Intégration",
|
||||
});
|
||||
}
|
||||
if (family.Sortie === null) {
|
||||
consistencyErrors.push({
|
||||
familyId: family.Titre,
|
||||
issueType: "Ex résistant.e.s sans date Sortie",
|
||||
issueType: "Ex résistant·e sans date Sortie",
|
||||
});
|
||||
}
|
||||
if (
|
||||
|
|
|
@ -32,7 +32,7 @@ export const computeFamillesWithEventsConditionInEarlyPeriod = (
|
|||
Object.entries(durations).map(([name, months]) => {
|
||||
const famillesWithAtLeastDurationOfDc = familles
|
||||
.filter(
|
||||
(f) => f.Statut === "Résistant.e" || f.Statut === "Ex résistant·e·s"
|
||||
(f) => f.Statut === "Résistant·e" || f.Statut === "Ex résistant·e"
|
||||
)
|
||||
.filter(
|
||||
(f) =>
|
||||
|
|
Loading…
Reference in New Issue