mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
activity: label location
This commit is contained in:
parent
c1a2112d48
commit
1b579f7930
@ -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
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user