mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 15:13:50 +00:00
Link between address and reference, and api endpoint to find household
by address reference * add a one-to-many link between address and address reference; * update AddAddress.vue to add information on picked address reference; * add an HouseholdACLAwareRepository, with a method to find household by current address reference * add an endpoint to retrieve household by address reference * + tests
This commit is contained in:
@@ -589,6 +589,14 @@ export default {
|
||||
'point': this.entity.selected.address.point.coordinates
|
||||
});
|
||||
}
|
||||
|
||||
// add the address reference, if any
|
||||
if (this.entity.selected.address.addressReference !== undefined) {
|
||||
newAddress = Object.assign(newAddress, {
|
||||
'addressReference': this.entity.selected.address.addressReference
|
||||
});
|
||||
}
|
||||
|
||||
if (this.validFrom) {
|
||||
console.log('add validFrom in fetch body', this.entity.selected.valid.from);
|
||||
newAddress = Object.assign(newAddress, {
|
||||
@@ -733,6 +741,9 @@ export default {
|
||||
},
|
||||
|
||||
/**
|
||||
*
|
||||
* Called when the event pick-address is emitted, which is, by the way,
|
||||
* called when an address suggestion is picked.
|
||||
*
|
||||
* @param address the address selected
|
||||
*/
|
||||
|
@@ -95,6 +95,9 @@ export default {
|
||||
},
|
||||
selectAddress(value) {
|
||||
this.entity.selected.address = value;
|
||||
this.entity.selected.address.addressReference = {
|
||||
id: value.id
|
||||
};
|
||||
this.entity.selected.address.street = value.street;
|
||||
this.entity.selected.address.streetNumber = value.streetNumber;
|
||||
this.entity.selected.writeNew.address = false;
|
||||
|
Reference in New Issue
Block a user