accompanying course: filter suggested entities by open participations

This commit is contained in:
nobohan 2022-02-11 17:37:45 +01:00
parent 7dd6cd04ba
commit fc9deb8ba8
2 changed files with 2 additions and 2 deletions

View File

@ -199,7 +199,7 @@ export default {
...mapState({
suggestedEntities: state => {
return [
...state.accompanyingCourse.participations.map(p => p.person),
...state.accompanyingCourse.participations.filter((p) => p.endDate === null).map((p) => p.person),
...state.accompanyingCourse.resources.map(r => r.resource)
]
.filter((e) => e !== null)

View File

@ -77,7 +77,7 @@ export default {
counter: state => state.accompanyingCourse.resources.length,
suggestedEntities: state => [
state.accompanyingCourse.requestor,
...state.accompanyingCourse.participations.map(p => p.person),
...state.accompanyingCourse.participations.filter((p) => p.endDate === null).map((p) => p.person),
]
.filter((e) => e !== null)
.filter(