mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
accompanying course: fix filtering of suggested referrers
This commit is contained in:
parent
61607fee3d
commit
17076024f7
@ -104,11 +104,15 @@ export default {
|
||||
}
|
||||
}),
|
||||
referrersSuggested: state => state.referrersSuggested.filter(u => {
|
||||
if (u.user_job && state.accompanyingCourse.job) {
|
||||
if (u.user_job && state.accompanyingCourse.job && state.accompanyingCourse.user) {
|
||||
return u.user_job.id === state.accompanyingCourse.job.id && state.accompanyingCourse.user.id !== u.id
|
||||
} else {
|
||||
if (null === state.accompanyingCourse.user) {
|
||||
return true;
|
||||
if (u.user_job && state.accompanyingCourse.job) {
|
||||
return u.user_job.id === state.accompanyingCourse.job.id
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return state.accompanyingCourse.user.id !== u.id;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user