From fde122c4a289489488f9c2168b42a1b459931d75 Mon Sep 17 00:00:00 2001 From: khanshanawaz10 Date: Tue, 12 Nov 2024 15:44:52 +0530 Subject: [PATCH] fix - partner campaign validate partner, send OTP & verify OTP api integrated --- campaign.html | 1344 ++++++++++++++++++++++++++++--------------------- 1 file changed, 763 insertions(+), 581 deletions(-) diff --git a/campaign.html b/campaign.html index 529c848..22bfd64 100644 --- a/campaign.html +++ b/campaign.html @@ -7,9 +7,11 @@ grid-column-gap: 1em; grid-auto-columns: auto; } + body { - font-family: "Poppins", sans-serif; -} + font-family: "Poppins", sans-serif; + } + .row { display: flex; flex-wrap: wrap; @@ -17,51 +19,236 @@ /* Column that takes up 6 out of 12 equal parts (50%) */ .col-6 { - flex: 0 0 50%; /* 50% width */ - padding: 10px; /* Optional padding */ - box-sizing: border-box; /* Ensure padding does not affect width */ + flex: 0 0 50%; + /* 50% width */ + padding: 10px; + /* Optional padding */ + box-sizing: border-box; + /* Ensure padding does not affect width */ } + .campaign-page { margin: 20px 70px; } + .head-text { font-size: 28px; color: #2a468d; font-weight: 600; } + .text-center { text-align: center; } + .text-danger { /* color: #ed1f24; */ color: #EC221F; } + .right-side-text { color: #2a468d; font-size: 18px; font-weight: 600; margin-top: 10px; } + .sub-text { margin: 20px 0px; color: gray; font-weight: 500; } + .composite { margin-top: 20px; } + .banner { margin-top: 50px; } - .input-button{ - background: #EC221F; + + .input-button { + background: #EC221F; border: 1px solid var(--Border-Danger-Secondary, #C00F0C); color: white; border-radius: 5px; padding: 10px 40px; font-size: 14px; font-weight: 600; + } + + button { + background: #ffffff; + height: 40px; + border: 0; + border-radius: 5px; + color: #000000; + padding: 0 15px; + cursor: pointer; + } + + dialog { + width: 500px; + max-height: 400px; + padding: 30px 30px 70px 30px; + border: 0; + box-shadow: 0 0 10px rgba(0, 0, 0, 0.2); + border-radius: 5px; + position: relative; + } + + dialog button { + position: absolute; + bottom: 20px; + right: 30px; + background: #000000; + color: #ffffff; + } + + p { + color: #aaa; + padding-bottom: 10px; + line-height: 2; + font-size: 14px; + } + + .container { + /* background-color: rgba(30, 30, 30, 0.8); */ + padding: 40px 40px 87px 30px; + /* border-radius: 16px; */ + /* box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3); */ + text-align: center; + backdrop-filter: blur(10px); + /* border: 1px solid rgba(255, 255, 255, 0.1); */ + max-width: 400px; + width: 100%; + } + + h1 { + margin-bottom: 1.5rem; + color: black; + font-weight: 600; + font-size: 2rem; + } + + p { + margin-bottom: 2rem; + color: #b0b0b0; + font-weight: 300; + } + + .otp-input { + display: flex; + justify-content: center; + margin-bottom: 2rem; + } + + .otp-input input { + width: 50px; + height: 50px; + margin: 0 8px; + text-align: center; + font-size: 1.5rem; + border: 2px solid #6665F1; + border-radius: 12px; + background-color: rgba(42, 42, 42, 0.8); + color: #ffffff; + transition: all 0.3s ease; + } + + .otp-input input:focus { + border-color: #A556F6; + box-shadow: 0 0 0 2px rgba(166, 86, 246, 0.3); + outline: none; + } + + .otp-input input::-webkit-outer-spin-button, + .otp-input input::-webkit-inner-spin-button { + -webkit-appearance: none; + margin: 0; + } + + .otp-input input[type=number] { + -moz-appearance: textfield; + } + + button { + background: linear-gradient(135deg, #6665F1, #A556F6); + color: white; + border: 2px solid #6665F1; + padding: 12px 24px; + font-size: 1rem; + border-radius: 8px; + cursor: pointer; + margin: 5px; + transition: all 0.3s ease; + font-weight: 500; + letter-spacing: 0.5px; + } + + button:hover { + background: linear-gradient(135deg, #A556F6, #6665F1); + transform: translateY(-2px); + box-shadow: 0 4px 8px rgba(166, 86, 246, 0.3); + } + + button:disabled { + background: #cccccc; + border-color: #999999; + color: #666666; + cursor: not-allowed; + transform: none; + box-shadow: none; + } + + #timer { + font-size: 1rem; + color: #A556F6; + font-weight: 500; + margin-left: 10px; + } + + @keyframes pulse { + 0% { + opacity: 1; + } + + 50% { + opacity: 0.5; } + + 100% { + opacity: 1; + } + } + + .expired { + animation: pulse 2s infinite; + color: #ff4444; + } + + .resend-text { + margin-top: 1rem; + font-size: 0.9rem; + color: #b0b0b0; + } + + .resend-link { + color: #6665F1; + text-decoration: none; + cursor: pointer; + transition: color 0.3s ease; + } + + .resend-link:hover { + color: #A556F6; + text-decoration: underline; + } + + #email { + color: #A556F6; + font-weight: 500; + } + function handleVerifyOTP(inputOtp=null) { + var name = $("#input-Name").val(); + var phoneno = $("#input-PhoneNo").val(); + var email = $("#input-Email").val(); + var ARNNo = $("#input-ARN").val() + var partnerRequest = {}; + partnerRequest["Name"] = name; + partnerRequest["Email"] = email; + partnerRequest["Mobile"] = phoneno; + partnerRequest["ARN"] = ARNNo||""; + + var jsonData = {partnerRequest}; + jsonData["OTP"] = inputOtp; + jsonData["Mode"] = "sms"; + jsonData["CommunicationValue"] = "sms"; + jsonData["ExpiryTimeInMinute"] = 1; + + data = JSON.stringify(jsonData); + console.log(data, "DKODOKOKDKODOKDOKDKO"); + + // return false + //SendWelcomeMail(emailid) + + $.ajax({ + type: "POST", + headers: { 'AccessKey': 'hcdCy0roNswTNTBaHZZdSemiKojB2yrH' }, + url: "https://uatapi.nivesh.com/api/Partner/V1.0/VerifyOTP", + data: data, + processData: false, + contentType: "application/json", + success: function (data) { + //$('#grow-income').text("Thank You"); + //$('#grow-income').prop("disabled", false); + console.log(data, 'KOODODOKDOOKDODOKDOK'); + // fbq("track", "Lead"); + var t = new Date().getTime(); + while (new Date().getTime() < t + 2000); + // window.location.assign( + // "https://app.nivesh.com/partner_onboarding/sign_in?MobileNo=" + + // phoneno + + // "&RoleId=3" + // ); + //window.location.assign("https://lead.nivesh.com/thank-you-nivesh"); + //window.location.href = "https://app.nivesh.com/thank-you"; + }, + error: function () { + //alert('There was an error submitting the form'); + element.classList.remove("css-disabledbtn"); + element.classList.add("css-1idrav"); + element.disabled = false; + //window.location.assign("https://app.nivesh.com/thank-you"); + //return false; + }, + async: true, + }); + } + function handlePopUp() { + document.querySelectorAll("[data-dialog]").forEach(button => { + button.addEventListener("click", () => { + const dialog = document.querySelector(`#${button.dataset.dialog}`); + dialog.showModal(); + + document.body.style.overflow = "hidden"; + document.documentElement.style.overflow = "hidden"; + + dialog.querySelector(".closeDialog").addEventListener("click", () => { + dialog.close(); + document.body.style.removeProperty("overflow"); + document.documentElement.style.removeProperty("overflow"); + }) + }) + }) + } + function handleClosePopUp() { + $(document).ready(function () { + $(".closeDialog").trigger("click"); + }); + } + handlePopUp() + // handleOTPform() + \ No newline at end of file