Skip to content

Commit

Permalink
Merge branch 'main' of github.com:WWWPiramalFinanceCOM/piramalfinance
Browse files Browse the repository at this point in the history
  • Loading branch information
omprakashgupta1995 committed Oct 9, 2024
2 parents 08f5f2c + cf9035a commit c910e9d
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 19 deletions.
4 changes: 2 additions & 2 deletions blocks/applyloanform/loanformapi.js
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
}
Expand Down
14 changes: 5 additions & 9 deletions blocks/branchlocator/branchlocator-biz.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
})
Expand Down Expand Up @@ -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'],
Expand Down Expand Up @@ -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);
Expand All @@ -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);
Expand All @@ -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"];
Expand Down
2 changes: 1 addition & 1 deletion blocks/branchlocator/branchlocator.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
});
}); */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
});
}
Expand Down
10 changes: 5 additions & 5 deletions blocks/moredetailsaddress/moredetailsaddress.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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);
})
Expand Down Expand Up @@ -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){
Expand Down Expand Up @@ -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));
} */
2 changes: 1 addition & 1 deletion blocks/select-tag/getSelectedLanguage.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit c910e9d

Please sign in to comment.