activity: post new location on-the-fly

This commit is contained in:
nobohan
2021-11-23 17:50:32 +01:00
parent 1b579f7930
commit a2f6f2b5cb
3 changed files with 18 additions and 3 deletions

View File

@@ -104,6 +104,7 @@ export default {
if (e.type === 'person' && e.current_household_address !== null){
locations.push({
type: 'location',
onthefly: true,
name: e.text,
address: { id: e.current_household_address.id },
locationType: locationType
@@ -120,6 +121,7 @@ export default {
if (e.type === 'thirdparty' && e.address !== null){
locations.push({
type: 'location',
onthefly: true,
name: e.text,
address: { id: e.address.id },
locationType: locationType
@@ -134,7 +136,8 @@ export default {
const accPeriodLocation = this.activity.accompanyingPeriod.location;
return {
type: 'location',
name: '__AccompanyingCourseLocation__', //TODO not perfect...
onthefly: true,
name: '__AccompanyingCourseLocation__', //TODO not perfect... shoould show the address
address: { id: accPeriodLocation.address_id }, //TODO is the id sufficient?
locationType: locationType
}