mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-27 00:55:01 +00:00
[Household members editor] add address suggestion on menage creation
This commit is contained in:
@@ -37,7 +37,20 @@ const fetchHouseholdSuggestionByAccompanyingPeriod = (personId) => {
|
||||
;
|
||||
};
|
||||
|
||||
const fetchAddressSuggestionByPerson = (personId) => {
|
||||
const url = `/api/1.0/person/address/suggest/by-person/${personId}.json`;
|
||||
return window.fetch(url)
|
||||
.then(response => {
|
||||
if (response.ok) {
|
||||
return response.json();
|
||||
}
|
||||
|
||||
throw Error({m: 'Error while fetch address suggestion', status: response.status});
|
||||
});
|
||||
}
|
||||
|
||||
export {
|
||||
householdMove,
|
||||
fetchHouseholdSuggestionByAccompanyingPeriod,
|
||||
fetchAddressSuggestionByPerson,
|
||||
};
|
||||
|
Reference in New Issue
Block a user