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: {
|
methods: {
|
||||||
|
labelAccompanyingCourseLocation(value) {
|
||||||
|
return `${value.address.text} (Localisation du parcours)`
|
||||||
|
},
|
||||||
customLabel(value) {
|
customLabel(value) {
|
||||||
return value.name ?
|
return value.name ?
|
||||||
value.name === '__AccompanyingCourseLocation__' ?
|
value.name === '__AccompanyingCourseLocation__' ?
|
||||||
'Localisation du parcours' :
|
this.labelAccompanyingCourseLocation(value) :
|
||||||
`${value.name} (${value.locationType.title.fr})` :
|
`${value.name} (${value.locationType.title.fr})` :
|
||||||
value.locationType.title.fr;
|
value.locationType.title.fr;
|
||||||
},
|
},
|
||||||
makeConcernedPersonsLocation(locationType) {
|
makeConcernedPersonsLocation(locationType) {
|
||||||
let locations = [];
|
let locations = [];
|
||||||
|
console.log(this.suggestedEntities)
|
||||||
this.suggestedEntities.forEach(
|
this.suggestedEntities.forEach(
|
||||||
(e) => {
|
(e) => {
|
||||||
if (e.type === 'person' && e.current_household_address !== null){
|
if (e.type === 'person' && e.current_household_address !== null){
|
||||||
@ -106,7 +110,9 @@ export default {
|
|||||||
type: 'location',
|
type: 'location',
|
||||||
onthefly: true,
|
onthefly: true,
|
||||||
name: e.text,
|
name: e.text,
|
||||||
address: { id: e.current_household_address.id },
|
address: {
|
||||||
|
id: e.current_household_address.id,
|
||||||
|
},
|
||||||
locationType: locationType
|
locationType: locationType
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -137,8 +143,11 @@ export default {
|
|||||||
return {
|
return {
|
||||||
type: 'location',
|
type: 'location',
|
||||||
onthefly: true,
|
onthefly: true,
|
||||||
name: '__AccompanyingCourseLocation__', //TODO not perfect... shoould show the address
|
name: '__AccompanyingCourseLocation__',
|
||||||
address: { id: accPeriodLocation.address_id }, //TODO is the id sufficient?
|
address: {
|
||||||
|
id: accPeriodLocation.address_id,
|
||||||
|
text: `${accPeriodLocation.text} - ${accPeriodLocation.postcode.code} ${accPeriodLocation.postcode.name}`
|
||||||
|
}, //TODO is the id sufficient?
|
||||||
locationType: locationType
|
locationType: locationType
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user