Unverified Commit a6cd769e authored by Estelle Veisemburger's avatar Estelle Veisemburger Committed by Florent Chehab
Browse files

feat(filter):merge GSM and GM into IM

parent 77549c93
......@@ -110,14 +110,22 @@ class FilterService {
allowedSemesters === null ? true : allowedSemesters.includes(sem)
)
.map(([, forSemester]) => forSemester)
.flatMap((forSemester) => Object.entries(forSemester))
.flatMap(forSemester => Object.entries(forSemester))
.flatMap(([major, minors]) =>
minors.map((minor) => `${major}${minor}`)
minors.map(minor => {
if (major === "GSM" || major === "GM") {
major = "IM";
}
return `${major}${minor}`;
})
);
const extraMinors = this.getMajorInUniv(univObj).map(
(major) => `${major} — Toutes filières confondues`
);
const extraMinors = this.getMajorInUniv(univObj).map(major => {
if (major === "GSM" || major === "GM") {
major = "IM";
}
return `${major} — Toutes filières confondues`;
});
return [...new Set(realMinors), ...extraMinors];
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment