mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 15:13:50 +00:00
accompanying course: fix filtering of suggested referrers
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user