Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Rex Dri
Rex Dri
Commits
a6cd769e
Unverified
Commit
a6cd769e
authored
May 09, 2020
by
Estelle Veisemburger
Committed by
Florent Chehab
May 24, 2020
Browse files
feat(filter):merge GSM and GM into IM
parent
77549c93
Changes
1
Hide whitespace changes
Inline
Side-by-side
frontend/src/services/FilterService.js
View file @
a6cd769e
...
...
@@ -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
];
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment