diff --git a/config/dev.env.js b/config/dev.env.js
index fa855b06..e07e34b0 100644
--- a/config/dev.env.js
+++ b/config/dev.env.js
@@ -20,6 +20,7 @@ module.exports = merge(prodEnv, {
DEFAULT_AVATAR: `'${process.env.DEFAULT_AVATAR}'`,
FORM_BACKGROUND: `'${process.env.FORM_BACKGROUND}'`,
PRODUCTS_URL: `'${process.env.PRODUCTS_URL}'`,
+ API_GOOGLE_MAPS: `'${process.env.API_GOOGLE_MAPS}'`,
REDIRECT_URI: `'${process.env.REDIRECT_URI}'`,
ROLE_CODE: `'${process.env.ROLE_CODE}'`,
S3_IMAGES_URL: "'//apprunn.s3.amazonaws.com'",
diff --git a/config/prod.env.js b/config/prod.env.js
index 9e4ed5a7..f26bb069 100644
--- a/config/prod.env.js
+++ b/config/prod.env.js
@@ -18,6 +18,7 @@ module.exports = {
DEFAULT_AVATAR: `'${process.env.DEFAULT_AVATAR}'`,
FORM_BACKGROUND: `'${process.env.FORM_BACKGROUND}'`,
PRODUCTS_URL: `'${process.env.PRODUCTS_URL}'`,
+ API_GOOGLE_MAPS: `'${process.env.API_GOOGLE_MAPS}'`,
REDIRECT_URI: `'${process.env.REDIRECT_URI}'`,
ROLE_CODE: `'${process.env.ROLE_CODE}'`,
S3_IMAGES_URL: "'//apprunn.s3.amazonaws.com'",
diff --git a/src/axios.js b/src/axios.js
index 8f03682c..6c9e1bec 100644
--- a/src/axios.js
+++ b/src/axios.js
@@ -19,6 +19,10 @@ const salesInstance = axios.create({
baseURL: process.env.SALES_URL,
});
+const httpsMaps = axios.create({
+ baseURL: process.env.API_GOOGLE_MAPS,
+});
+
const updateTransactionIntance = axios.create({
baseURL: process.env.SALES_URL,
});
@@ -79,4 +83,5 @@ export default function (Vue) {
Vue.prototype.$httpSalesReadPublic = saleReadReportPublic;
Vue.prototype.$httpProductsRead = productsReadReport;
Vue.prototype.$httpSalesRead = saleReadReport;
+ Vue.prototype.$httpMaps = httpsMaps;
}
diff --git a/src/components/order/new-address.vue b/src/components/order/new-address.vue
index 0aad398e..454376dc 100644
--- a/src/components/order/new-address.vue
+++ b/src/components/order/new-address.vue
@@ -115,6 +115,7 @@
]"
:location="{ lat: newAddress.latitude, lng: newAddress.longitude }"
:center="{ lat: newAddress.latitude, lng: newAddress.longitude }"
+ @update-address="updateAddressLine1"
/>
@@ -194,6 +195,7 @@ function googleSearch() {
function selectDepartment(provinceId) {
this.newAddress.province = null;
this.newAddress.district = null;
+ this.newAddress.addressLine1 = null;
this.$store.commit('SET_PROVINCES', []);
this.$store.commit('SET_DISTRICTS', []);
// this.calculateShippingCost({ provinceId });
@@ -203,6 +205,7 @@ function selectDepartment(provinceId) {
function selectProvince(cityId) {
this.newAddress.districts = null;
+ this.newAddress.addressLine1 = null;
this.$store.commit('SET_DISTRICTS', []);
// this.calculateShippingCost({
// provinceId: this.newAddress.department,
@@ -213,6 +216,7 @@ function selectProvince(cityId) {
}
function selectDistrict(parishId) {
+ this.newAddress.addressLine1 = null;
this.calculateShippingCost({
provinceId: this.newAddress.department,
cityId: this.newAddress.province,
@@ -351,6 +355,9 @@ export default {
setCustomerAddress,
googleSearch,
getMap,
+ updateAddressLine1(address) {
+ this.newAddress.addressLine1 = address;
+ },
},
validations,
watch: {
diff --git a/src/components/shared/map/map-component.vue b/src/components/shared/map/map-component.vue
index d1196315..7b309e43 100644
--- a/src/components/shared/map/map-component.vue
+++ b/src/components/shared/map/map-component.vue
@@ -5,16 +5,16 @@
style="width:100%;height:400px;"
@click="setCoords"
>
-
-
+
+