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) => {
|
new Promise((resolve) => {
|
||||||
getLocationTypeByDefaultFor('person').then(
|
getLocationTypeByDefaultFor('person').then(
|
||||||
personLocationType => {
|
personLocationType => {
|
||||||
const personLocation = this.makePersonLocation(personLocationType);
|
const personLocation = this.makeAccompanyingPeriodLocation(personLocationType);
|
||||||
const concernedPersonsLocation =
|
const concernedPersonsLocation =
|
||||||
this.makeConcernedPersonsLocation(personLocationType);
|
this.makeConcernedPersonsLocation(personLocationType);
|
||||||
getLocationTypeByDefaultFor('thirdparty').then(
|
getLocationTypeByDefaultFor('thirdparty').then(
|
||||||
@ -91,9 +91,11 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
customLabel(value) {
|
customLabel(value) {
|
||||||
return `${value.locationType.title.fr} ${
|
return value.name ?
|
||||||
value.name ? value.name : ""
|
value.name === '__AccompanyingCourseLocation__' ?
|
||||||
}`;
|
'Localisation du parcours' :
|
||||||
|
`${value.name} (${value.locationType.title.fr})` :
|
||||||
|
value.locationType.title.fr;
|
||||||
},
|
},
|
||||||
makeConcernedPersonsLocation(locationType) {
|
makeConcernedPersonsLocation(locationType) {
|
||||||
let locations = [];
|
let locations = [];
|
||||||
@ -127,12 +129,12 @@ export default {
|
|||||||
)
|
)
|
||||||
return locations;
|
return locations;
|
||||||
},
|
},
|
||||||
makePersonLocation(locationType) {
|
makeAccompanyingPeriodLocation(locationType) {
|
||||||
console.log(this.activity)
|
console.log(this.activity)
|
||||||
const accPeriodLocation = this.activity.accompanyingPeriod.location;
|
const accPeriodLocation = this.activity.accompanyingPeriod.location;
|
||||||
return {
|
return {
|
||||||
type: 'location',
|
type: 'location',
|
||||||
name: 'Adresse du parcours', //TODO trans
|
name: '__AccompanyingCourseLocation__', //TODO not perfect...
|
||||||
address: { id: accPeriodLocation.address_id }, //TODO is the id sufficient?
|
address: { id: accPeriodLocation.address_id }, //TODO is the id sufficient?
|
||||||
locationType: locationType
|
locationType: locationType
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user