Feature: bootstrapping an app to show a modal for address details and showing it inside twig address's render box

Feature: showing map and link to external map, and address details inside address details modal

Feature: AddressDetailsMap show a warning if the address is incomplete
This commit is contained in:
2023-03-14 22:12:30 +01:00
parent c56ae08fae
commit b740a88ae3
16 changed files with 283 additions and 11 deletions

View File

@@ -1,3 +1,5 @@
import {getAddressById} from 'ChillMainAssets/lib/api/address';
/**
* Endpoint chill_api_single_country__index
* method GET, get Country Object
@@ -188,13 +190,7 @@ const postPostalCode = (postalCode) => { //<--
* @returns {Promise} a promise containing a Address object
*/
const getAddress = (id) => {
//console.log('<< get address');
const url = `/api/1.0/main/address/${id}.json`;
return fetch(url)
.then(response => {
if (response.ok) { return response.json(); }
throw Error('Error with request resource response');
});
return getAddressById(id);
};
export {