mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
activity: new activity: show address in parcours location
This commit is contained in:
parent
a2f6f2b5cb
commit
c7f2717676
@ -90,15 +90,19 @@ export default {
|
||||
);
|
||||
},
|
||||
methods: {
|
||||
labelAccompanyingCourseLocation(value) {
|
||||
return `${value.address.text} (Localisation du parcours)`
|
||||
},
|
||||
customLabel(value) {
|
||||
return value.name ?
|
||||
value.name === '__AccompanyingCourseLocation__' ?
|
||||
'Localisation du parcours' :
|
||||
this.labelAccompanyingCourseLocation(value) :
|
||||
`${value.name} (${value.locationType.title.fr})` :
|
||||
value.locationType.title.fr;
|
||||
},
|
||||
makeConcernedPersonsLocation(locationType) {
|
||||
let locations = [];
|
||||
console.log(this.suggestedEntities)
|
||||
this.suggestedEntities.forEach(
|
||||
(e) => {
|
||||
if (e.type === 'person' && e.current_household_address !== null){
|
||||
@ -106,7 +110,9 @@ export default {
|
||||
type: 'location',
|
||||
onthefly: true,
|
||||
name: e.text,
|
||||
address: { id: e.current_household_address.id },
|
||||
address: {
|
||||
id: e.current_household_address.id,
|
||||
},
|
||||
locationType: locationType
|
||||
});
|
||||
}
|
||||
@ -137,8 +143,11 @@ export default {
|
||||
return {
|
||||
type: 'location',
|
||||
onthefly: true,
|
||||
name: '__AccompanyingCourseLocation__', //TODO not perfect... shoould show the address
|
||||
address: { id: accPeriodLocation.address_id }, //TODO is the id sufficient?
|
||||
name: '__AccompanyingCourseLocation__',
|
||||
address: {
|
||||
id: accPeriodLocation.address_id,
|
||||
text: `${accPeriodLocation.text} - ${accPeriodLocation.postcode.code} ${accPeriodLocation.postcode.name}`
|
||||
}, //TODO is the id sufficient?
|
||||
locationType: locationType
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user