mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-12 21:34:25 +00:00
fix error on previous commit, when creating new accourse
This commit is contained in:
parent
eb89fa2cd4
commit
5da332a06e
@ -135,12 +135,17 @@ export default {
|
|||||||
return this.accompanyingCourse.participations.filter(p => p.enddate !== null);
|
return this.accompanyingCourse.participations.filter(p => p.enddate !== null);
|
||||||
},
|
},
|
||||||
hasNoPersonLocation() {
|
hasNoPersonLocation() {
|
||||||
|
|
||||||
let addressInParticipations_ = []
|
let addressInParticipations_ = []
|
||||||
this.currentParticipations.forEach(p => {
|
this.currentParticipations.forEach(p => {
|
||||||
addressInParticipations_.push(this.checkHouseholdAddressForParticipation(p));
|
addressInParticipations_.push(this.checkHouseholdAddressForParticipation(p));
|
||||||
});
|
});
|
||||||
|
|
||||||
const booleanReducer = (previousValue, currentValue) => previousValue || currentValue;
|
const booleanReducer = (previousValue, currentValue) => previousValue || currentValue;
|
||||||
let addressInParticipations = addressInParticipations_.reduce(booleanReducer);
|
|
||||||
|
let addressInParticipations = (addressInParticipations_.length > 0) ?
|
||||||
|
addressInParticipations_.reduce(booleanReducer) : false;
|
||||||
|
|
||||||
//console.log(addressInParticipations_, addressInParticipations);
|
//console.log(addressInParticipations_, addressInParticipations);
|
||||||
return (
|
return (
|
||||||
this.accompanyingCourse.step !== 'DRAFT'
|
this.accompanyingCourse.step !== 'DRAFT'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user