mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 23:23:51 +00:00
activity: fix the on-the-fly POSTing of the location entity
This commit is contained in:
@@ -74,7 +74,6 @@ export default {
|
||||
...concernedThirdPartiesLocation,
|
||||
...response.results,
|
||||
];
|
||||
console.log(this.locations);
|
||||
if (window.default_location_id) {
|
||||
let location = this.locations.filter(
|
||||
(l) => l.id === window.default_location_id
|
||||
@@ -102,7 +101,6 @@ export default {
|
||||
},
|
||||
makeConcernedPersonsLocation(locationType) {
|
||||
let locations = [];
|
||||
console.log(this.suggestedEntities)
|
||||
this.suggestedEntities.forEach(
|
||||
(e) => {
|
||||
if (e.type === 'person' && e.current_household_address !== null){
|
||||
@@ -111,7 +109,7 @@ export default {
|
||||
onthefly: true,
|
||||
name: e.text,
|
||||
address: {
|
||||
id: e.current_household_address.id,
|
||||
id: e.current_household_address.address_id,
|
||||
},
|
||||
locationType: locationType
|
||||
});
|
||||
@@ -129,7 +127,7 @@ export default {
|
||||
type: 'location',
|
||||
onthefly: true,
|
||||
name: e.text,
|
||||
address: { id: e.address.id },
|
||||
address: { id: e.address.address_id },
|
||||
locationType: locationType
|
||||
});
|
||||
}
|
||||
@@ -138,7 +136,6 @@ export default {
|
||||
return locations;
|
||||
},
|
||||
makeAccompanyingPeriodLocation(locationType) {
|
||||
console.log(this.activity)
|
||||
const accPeriodLocation = this.activity.accompanyingPeriod.location;
|
||||
return {
|
||||
type: 'location',
|
||||
@@ -147,7 +144,7 @@ export default {
|
||||
address: {
|
||||
id: accPeriodLocation.address_id,
|
||||
text: `${accPeriodLocation.text} - ${accPeriodLocation.postcode.code} ${accPeriodLocation.postcode.name}`
|
||||
}, //TODO is the id sufficient?
|
||||
},
|
||||
locationType: locationType
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user