diff --git a/blocks/applyloanform/loanformapi.js b/blocks/applyloanform/loanformapi.js index c558f3a8ec..9656c25a00 100644 --- a/blocks/applyloanform/loanformapi.js +++ b/blocks/applyloanform/loanformapi.js @@ -61,8 +61,8 @@ export function getAccessToken() { export function AccessTokenAPI() { const requestJson = { requestJson: { - "client_id": "79641f863d2a4151b7fcaadfece67e9e", - "client_secret": "2a86f9105b464e8389883d2362cb96b0", + "client_id": "270762d6d2544ce695908b3496d25e06", + "client_secret": "5c2e50eedd8f484387ad432be9897ce4", "source": "WebApp" }, } diff --git a/blocks/branchlocator/branchlocator-biz.js b/blocks/branchlocator/branchlocator-biz.js index 12bc8f6ea4..63390b0173 100644 --- a/blocks/branchlocator/branchlocator-biz.js +++ b/blocks/branchlocator/branchlocator-biz.js @@ -64,7 +64,7 @@ export async function onloadBranchLocator(block) { }else{ branchhList = sortingNearestBranch(setLocationObj.lat, setLocationObj.lng, setLocationObj.getExcelData); } - loadScript("https://maps.googleapis.com/maps/api/js?key=AIzaSyCJr5F6tJXVCcA_VIJreibOtqG9Vf_rb0k").then((resolve) => { + loadScript("https://maps.googleapis.com/maps/api/js?key=AIzaSyDx1HwnCLjSSIm_gADqaYAZhSBh7hgcwTQ").then((resolve) => { myMap(setLocationObj.lat, setLocationObj.lng, branchhList); }); bizStateDD(setLocationObj.getExcelData, block); @@ -124,7 +124,7 @@ async function getStateCity(lat, lng) { function getStateName(lat, lan) { return new Promise(function (resolve, reject) { - fetchAPI("GET", "https://maps.googleapis.com/maps/api/geocode/json?latlng=" + lat + "," + lan + "&sensor=true&key=AIzaSyCJr5F6tJXVCcA_VIJreibOtqG9Vf_rb0k") + fetchAPI("GET", "https://maps.googleapis.com/maps/api/geocode/json?latlng=" + lat + "," + lan + "&sensor=true&key=AIzaSyDx1HwnCLjSSIm_gADqaYAZhSBh7hgcwTQ") .then(function (res) { resolve(res); }) @@ -190,10 +190,6 @@ function myMap(lat, long, sortedBranch) { // adding the markers function addMarkers() { for (let eachLagLong of sortedBranch) { - if (typeof eachLagLong["Latitude"] == "string" || typeof eachLagLong["Longitude"] == "string") { - continue; - } - new google.maps.Marker({ position: new google.maps.LatLng(eachLagLong["Latitude"], eachLagLong["Longitude"]), title: eachLagLong['Address'], @@ -259,7 +255,7 @@ export function onClickState(block){ defaultSelectedCityState(block); renderCity(block); let branchhList = sortingNearestBranch(setLocationObj.lat, setLocationObj.lng, setLocationObj.getExcelData); - loadScript("https://maps.googleapis.com/maps/api/js?key=AIzaSyCJr5F6tJXVCcA_VIJreibOtqG9Vf_rb0k").then((resolve) => { + loadScript("https://maps.googleapis.com/maps/api/js?key=AIzaSyDx1HwnCLjSSIm_gADqaYAZhSBh7hgcwTQ").then((resolve) => { myMap(setLocationObj.lat, setLocationObj.lng, branchhList); }); let multipleBranch = innerBranchFunc(branchhList); @@ -280,7 +276,7 @@ export function onClickCity(block){ setLocationObj.lng = excelValueObj[0]['Longitude']; defaultSelectedCityState(block); let branchhList = sortingNearestBranch(setLocationObj.lat, setLocationObj.lng, setLocationObj.getExcelData); - loadScript("https://maps.googleapis.com/maps/api/js?key=AIzaSyCJr5F6tJXVCcA_VIJreibOtqG9Vf_rb0k").then((resolve) => { + loadScript("https://maps.googleapis.com/maps/api/js?key=AIzaSyDx1HwnCLjSSIm_gADqaYAZhSBh7hgcwTQ").then((resolve) => { myMap(setLocationObj.lat, setLocationObj.lng, branchhList); }); let multipleBranch = innerBranchFunc(branchhList); @@ -306,7 +302,7 @@ export function locateMeClick(block){ if(setLocationObj.lat && setLocationObj.lng){ await getStateCity(setLocationObj.lat, setLocationObj.lng); let branchhList = sortingNearestBranch(setLocationObj.lat, setLocationObj.lng, setLocationObj.getExcelData); - loadScript("https://maps.googleapis.com/maps/api/js?key=AIzaSyCJr5F6tJXVCcA_VIJreibOtqG9Vf_rb0k").then((resolve) => { + loadScript("https://maps.googleapis.com/maps/api/js?key=AIzaSyDx1HwnCLjSSIm_gADqaYAZhSBh7hgcwTQ").then((resolve) => { myMap(setLocationObj.lat, setLocationObj.lng, branchhList); let gettingStortedBranchlat = branchhList[0]["Latitude"]; let gettingStortedBranchlag = branchhList[0]["Longitude"]; diff --git a/blocks/branchlocator/branchlocator.js b/blocks/branchlocator/branchlocator.js index fedb9690e6..d1ba332c22 100644 --- a/blocks/branchlocator/branchlocator.js +++ b/blocks/branchlocator/branchlocator.js @@ -141,7 +141,7 @@ export default async function decorate(block) { } returnLatLan().then(function ({ lat, lng }) { - loadScript("https://maps.googleapis.com/maps/api/js?key=AIzaSyCJr5F6tJXVCcA_VIJreibOtqG9Vf_rb0k").then((resolve) => { + loadScript("https://maps.googleapis.com/maps/api/js?key=AIzaSyDx1HwnCLjSSIm_gADqaYAZhSBh7hgcwTQ").then((resolve) => { myMap(lat, lng); }); }); */ diff --git a/blocks/branchlocatormoredetails/branchlocatormoredetails.js b/blocks/branchlocatormoredetails/branchlocatormoredetails.js index c92de084e7..74d90dcd99 100644 --- a/blocks/branchlocatormoredetails/branchlocatormoredetails.js +++ b/blocks/branchlocatormoredetails/branchlocatormoredetails.js @@ -31,7 +31,7 @@ function myMap(lat, long) { } export function settingCurrentLoct(setLocationObj){ - loadScript("https://maps.googleapis.com/maps/api/js?key=AIzaSyCJr5F6tJXVCcA_VIJreibOtqG9Vf_rb0k").then((resolve) => { + loadScript("https://maps.googleapis.com/maps/api/js?key=AIzaSyDx1HwnCLjSSIm_gADqaYAZhSBh7hgcwTQ").then((resolve) => { myMap(setLocationObj.lat, setLocationObj.lng); }); } diff --git a/blocks/moredetailsaddress/moredetailsaddress.js b/blocks/moredetailsaddress/moredetailsaddress.js index f756b16b90..b6a7b4ec79 100644 --- a/blocks/moredetailsaddress/moredetailsaddress.js +++ b/blocks/moredetailsaddress/moredetailsaddress.js @@ -96,7 +96,7 @@ async function getStateCity(lat, lng) { for (var j = 0; j < results.length; j++) { if (results[j].place_id) { reviewRating = await getReviewRating(results[j].place_id); - if(reviewRating.result.reviews && reviewRating.result.opening_hours.weekday_text){ + if(reviewRating.result.reviews && reviewRating.result?.opening_hours?.weekday_text){ setLocationObj.review = reviewRating.result.reviews; setLocationObj.working = reviewRating.result.opening_hours.weekday_text; console.log(reviewRating); @@ -119,7 +119,7 @@ async function getStateCity(lat, lng) { function getStateName(lat, lan) { return new Promise(function (resolve, reject) { - fetchAPI("GET", "https://maps.googleapis.com/maps/api/geocode/json?latlng=" + lat + "," + lan + "&sensor=true&key=AIzaSyCJr5F6tJXVCcA_VIJreibOtqG9Vf_rb0k") + fetchAPI("GET", "https://maps.googleapis.com/maps/api/geocode/json?latlng=" + lat + "," + lan + "&sensor=true&key=AIzaSyDx1HwnCLjSSIm_gADqaYAZhSBh7hgcwTQ") .then(function (res) { resolve(res); }) @@ -148,11 +148,11 @@ async function getStateCity(lat, lng) { async function getReviewRating(placeID){ return new Promise(function(resolve, reject){ - fetchAPI('GET',`https://maps.googleapis.com/maps/api/place/details/json?place_id=${placeID}&key=AIzaSyCJr5F6tJXVCcA_VIJreibOtqG9Vf_rb0k`) // api for the get request + fetchAPI('GET',`https://maps.googleapis.com/maps/api/place/details/json?place_id=${placeID}&key=AIzaSyDx1HwnCLjSSIm_gADqaYAZhSBh7hgcwTQ`) // api for the get request .then((response) => response.json()) .then((data) => resolve(data)).catch(error => console.log(error)); - /* fetchAPI('GET', `https://maps.googleapis.com/maps/api/place/details/json?place_id=${setLocationObj.placeid}&key=AIzaSyCJr5F6tJXVCcA_VIJreibOtqG9Vf_rb0k`).then((res)=>{ + /* fetchAPI('GET', `https://maps.googleapis.com/maps/api/place/details/json?place_id=${setLocationObj.placeid}&key=AIzaSyDx1HwnCLjSSIm_gADqaYAZhSBh7hgcwTQ`).then((res)=>{ resolve(res); }) .catch(function(err){ @@ -452,7 +452,7 @@ function nearBLBreadCrumb() { /* function nearBybranch(){ debugger; - fetch(`https://maps.googleapis.com/maps/api/place/nearbysearch/json?location=${setLocationObj.lat},${setLocationObj.lng}&radius=1500&key=AIzaSyCJr5F6tJXVCcA_VIJreibOtqG9Vf_rb0k`) + fetch(`https://maps.googleapis.com/maps/api/place/nearbysearch/json?location=${setLocationObj.lat},${setLocationObj.lng}&radius=1500&key=AIzaSyDx1HwnCLjSSIm_gADqaYAZhSBh7hgcwTQ`) .then((response) => response.json()) .then((data) => resolve(data)).catch(error => console.log(error)); } */ diff --git a/blocks/select-tag/getSelectedLanguage.js b/blocks/select-tag/getSelectedLanguage.js index b074cb9b85..3ef87fc422 100644 --- a/blocks/select-tag/getSelectedLanguage.js +++ b/blocks/select-tag/getSelectedLanguage.js @@ -45,7 +45,7 @@ export default function returnLatLan() { function getStateName(lat, lan) { return new Promise(function (resolve, reject) { - fetchAPI('GET', 'https://maps.googleapis.com/maps/api/geocode/json?latlng=' + lat + ',' + lan + '&sensor=true&key=AIzaSyCJr5F6tJXVCcA_VIJreibOtqG9Vf_rb0k').then(function (res) { + fetchAPI('GET', 'https://maps.googleapis.com/maps/api/geocode/json?latlng=' + lat + ',' + lan + '&sensor=true&key=AIzaSyDx1HwnCLjSSIm_gADqaYAZhSBh7hgcwTQ').then(function (res) { resolve(res) }).catch(function (err) { resolve(err);