diff --git a/src/Bundle/ChillActivityBundle/Resources/public/vuejs/Activity/components/Location.vue b/src/Bundle/ChillActivityBundle/Resources/public/vuejs/Activity/components/Location.vue index 6cad3dd8d..ccce99075 100644 --- a/src/Bundle/ChillActivityBundle/Resources/public/vuejs/Activity/components/Location.vue +++ b/src/Bundle/ChillActivityBundle/Resources/public/vuejs/Activity/components/Location.vue @@ -61,7 +61,7 @@ export default { new Promise((resolve) => { getLocationTypeByDefaultFor('person').then( personLocationType => { - const personLocation = this.makePersonLocation(personLocationType); + const personLocation = this.makeAccompanyingPeriodLocation(personLocationType); const concernedPersonsLocation = this.makeConcernedPersonsLocation(personLocationType); getLocationTypeByDefaultFor('thirdparty').then( @@ -91,9 +91,11 @@ export default { }, methods: { customLabel(value) { - return `${value.locationType.title.fr} ${ - value.name ? value.name : "" - }`; + return value.name ? + value.name === '__AccompanyingCourseLocation__' ? + 'Localisation du parcours' : + `${value.name} (${value.locationType.title.fr})` : + value.locationType.title.fr; }, makeConcernedPersonsLocation(locationType) { let locations = []; @@ -127,12 +129,12 @@ export default { ) return locations; }, - makePersonLocation(locationType) { + makeAccompanyingPeriodLocation(locationType) { console.log(this.activity) const accPeriodLocation = this.activity.accompanyingPeriod.location; return { type: 'location', - name: 'Adresse du parcours', //TODO trans + name: '__AccompanyingCourseLocation__', //TODO not perfect... address: { id: accPeriodLocation.address_id }, //TODO is the id sufficient? locationType: locationType }