Skip to content

Commit

Permalink
conflict resolved
Browse files Browse the repository at this point in the history
  • Loading branch information
Vaibhav sasulkar committed Jul 3, 2024
2 parents ad46006 + 03b3313 commit 0926972
Show file tree
Hide file tree
Showing 17 changed files with 2,179 additions and 452 deletions.
18 changes: 5 additions & 13 deletions blocks/applyloanform/applyloanform.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ import { applyLoanPopper } from "./applyloanpopper.js";
import { loanutmForm } from "./loanutm.js";
import { stateMasterApi } from "./statemasterapi.js";
import { validationJSFunc } from "./validation.js";
import AirDatepicker from "./datepickertest.js";
import AirDatepicker from "../datepickerlib/datepickerlib.js";
import Popper from "../datepickerlib/popper.js";
import { loanFromBtn, loanOtpInput } from "./loanformdom.js";
import { workFlow } from "./loanformapi.js";
// import { buttonCLick } from "./loanformapi.js";
import { buttonCLick } from "./loanformapi.js";

export default function decorate(block) {
export default async function decorate(block) {
let cfURL = block.querySelector("a")?.textContent.trim();
// const cfRepsonse = CFApiCall(cfURL);
// const cfRepsonse = await CFApiCall(cfURL);

block.innerHTML = appplyLoanTemplate();
try {
Expand All @@ -21,15 +21,7 @@ export default function decorate(block) {
loanutmForm();
stateMasterApi();
validationJSFunc();
// buttonCLick();
let loanStatus = "Rejected";

loanFromBtn().addEventListener("click", function ({ currentTarget }) {
// debugger;
currentTarget.closest(".loan-form-button-container").classList.add("loader-initialized");
loanOtpInput().value = "";
workFlow();
});
buttonCLick();
} catch (error) {
console.warn(error);

Check warning on line 26 in blocks/applyloanform/applyloanform.js

View workflow job for this annotation

GitHub Actions / build

Unexpected console statement
}
Expand Down
4 changes: 2 additions & 2 deletions blocks/applyloanform/applyloantemplate.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ export function appplyLoanTemplate() {
options: [
{
"Personal Loan": [
{ litext: "Loan less than 5 Lac", loantype: "pl" },
{ litext: "Loan more than 5 Lac", loantype: "pl" },
{ litext: "Loan less than 5 Lacs", loantype: "pl" },
{ litext: "Loan more than 5 Lacs", loantype: "pl" },
],
},
{
Expand Down
1 change: 0 additions & 1 deletion blocks/applyloanform/loanformapi.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ let loanStatus = "Rejected";

export function buttonCLick() {


loanFromBtn().addEventListener("click", function ({ currentTarget }) {
// debugger;
currentTarget.closest(".loan-form-button-container").classList.add("loader-initialized");
Expand Down
42 changes: 20 additions & 22 deletions blocks/applyloanform/loanutm.js
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
export let isMobile = {
Android: function() {
return navigator.userAgent.match(/Android/i);
},
BlackBerry: function() {
return navigator.userAgent.match(/BlackBerry/i);
},
iOS: function() {
return navigator.userAgent.match(/iPhone|iPad|iPod/i);
},
Opera: function() {
return navigator.userAgent.match(/Opera Mini/i);
},
Windows: function() {
return navigator.userAgent.match(/IEMobile/i) || navigator.userAgent.match(/WPDesktop/i);
},
any: function() {
return (isMobile.Android() || isMobile.BlackBerry() || isMobile.iOS() || isMobile.Opera() || isMobile.Windows());
}
};

export function loanutmForm(){
const isMobile = {
Android: function() {
return navigator.userAgent.match(/Android/i);
},
BlackBerry: function() {
return navigator.userAgent.match(/BlackBerry/i);
},
iOS: function() {
return navigator.userAgent.match(/iPhone|iPad|iPod/i);
},
Opera: function() {
return navigator.userAgent.match(/Opera Mini/i);
},
Windows: function() {
return navigator.userAgent.match(/IEMobile/i) || navigator.userAgent.match(/WPDesktop/i);
},
any: function() {
return (isMobile.Android() || isMobile.BlackBerry() || isMobile.iOS() || isMobile.Opera() || isMobile.Windows());
}
};
let utmBtns = document.querySelectorAll(".loan-form-utm");

if(utmBtns.length) {
Expand All @@ -40,8 +40,6 @@ export function loanFormUTM() {
}




export function loginFormUTM() {
let redirectionLink=document.querySelector(".location-link").innerHTML;

Expand Down
28 changes: 5 additions & 23 deletions blocks/city-list/city-list.js
Original file line number Diff line number Diff line change
@@ -1,29 +1,11 @@
import { getProps, renderHelper } from "../../scripts/scripts.js";
import { fetchAPI, getProps, renderHelper } from "../../scripts/scripts.js";

export default function decorate(block) {
export default async function decorate(block) {
const [url] = getProps(block);
const resp = await fetchAPI("GET", url);
const data = await resp.json();

const resp = [
{
url: "https://publish-p133703-e1305981.adobeaemcloud.com/in/en/home-loan/ahmedabad.html",
text: "Ahmedabad"
},
{
url: "https://publish-p133703-e1305981.adobeaemcloud.com/in/en/home-loan/chennai.html",
text: "Chennai"
},
{
url: "https://publish-p133703-e1305981.adobeaemcloud.com/in/en/home-loan/delhi.html",
text: "Delhi"
},
{
url: "https://publish-p133703-e1305981.adobeaemcloud.com/in/en/home-loan/bangalore.html",
text: "Bangalore"
}
]


let li = renderHelper(resp, `<div class="forName">
let li = renderHelper(data.data, `<div class="forName">
<li><a href="{url}" title="{text}">{text}</a></li>
</div>`)
block.innerHTML = '<ul>' + li + '</ul>'
Expand Down
1,801 changes: 1,797 additions & 4 deletions blocks/datepickerlib/datepickerlib.js

Large diffs are not rendered by default.

6 changes: 4 additions & 2 deletions blocks/eligibilitycalculator/eligibilitycalculator.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import { targetObject } from "../../scripts/scripts.js";
let calculatorType, elgCalDiv, elgOverlay, overlay;


export default function decorate(block) {
export default async function decorate(block) {
let cfURL = block.querySelector("a")?.textContent.trim();
// const cfRepsonse = CFApiCall(cfURL);
// const cfRepsonse = await CFApiCall(cfURL);

const callAJson = {
total: 1,
Expand Down Expand Up @@ -166,7 +166,9 @@ export default function decorate(block) {
calendarmobile: "/content/dam/piramalfinance/homepage/images/calc-calendarwebp",
outputtext: "Your home loan EMI is",
button1text: "Talk to loan expert",
button1link: "https://www.google.com/",
button2text: "Apply loan now",
button2link: "https://www.google.com/",
pageproperties: "bl",
},
],
Expand Down
4 changes: 2 additions & 2 deletions blocks/emiandeligiblitycalc/templatehtml1.js
Original file line number Diff line number Diff line change
Expand Up @@ -250,11 +250,11 @@ const eligibilitydiv = callJson.data[0].chechboxelibilityobj.chechboxemi
<div class="customerbuttons">
<a target="_self">
<a href="${callJson.data[0].button1link}" target="_self">
<button class="expert">${callJson.data[0].button1text}</button>
</a>
<a target="_self">
<a href="${callJson.data[0].button2link}" target="_self">
<button class="expert orangeexpert">${callJson.data[0].button2text}</button>
</a>
Expand Down
Loading

0 comments on commit 0926972

Please sign in to comment.