Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
nicobret committed Jan 30, 2025
1 parent 2ecd17a commit 923c9e9
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions admin/src/scenes/volontaires/utils/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ import { formatPhoneE164 } from "../../../utils/formatPhoneE164";
import { youngCheckinField } from "@/utils";

export const getFilterArray = (user, bus, session, classes, etablissements) => {
console.log("🚀 ~ getFilterArray ~ classes:", classes);
return [
{ title: "Cohorte", name: "cohort", parentGroup: "Général", missingLabel: "Non renseigné", sort: (e) => orderCohort(e) },
{ title: "Cohorte d'origine", name: "originalCohort", parentGroup: "Général", missingLabel: "Non renseigné", sort: orderCohort },
Expand Down Expand Up @@ -182,8 +181,7 @@ export const getFilterArray = (user, bus, session, classes, etablissements) => {
parentGroup: "Phase 1",
missingLabel: "Non renseigné",
translate: (item) => {
console.log("🚀 ~ getFilterArray ~ item:", typeof item);
if (item === "N/A" || !classes.length) return item;
if (item === "N/A") return item;
return classes[item] || "N/A - Supprimé";
},
},
Expand All @@ -193,7 +191,7 @@ export const getFilterArray = (user, bus, session, classes, etablissements) => {
parentGroup: "Phase 1",
missingLabel: "Non renseigné",
translate: (item) => {
if (item === "N/A" || !etablissements.length) return item;
if (item === "N/A") return item;
return etablissements[item] || "N/A - Supprimé";
},
},
Expand All @@ -203,7 +201,7 @@ export const getFilterArray = (user, bus, session, classes, etablissements) => {
parentGroup: "Phase 1",
missingLabel: "Non renseigné",
translate: (item) => {
if (item === "N/A" || !session.length) return item;
if (item === "N/A") return item;
return session[item] || "N/A - Supprimé";
},
},
Expand Down Expand Up @@ -269,7 +267,7 @@ export const getFilterArray = (user, bus, session, classes, etablissements) => {
parentGroup: "Phase 1",
missingLabel: "Non renseigné",
translate: (item) => {
if (item === "N/A" || !bus?.length) return item;
if (item === "N/A") return item;
return bus[item] || item;
},
},
Expand Down

0 comments on commit 923c9e9

Please sign in to comment.