build
This commit is contained in:
parent
88db2611ca
commit
07bb756e45
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"files": {
|
||||
"main.css": "/static/css/main.148e73e6.css",
|
||||
"main.js": "/static/js/main.656d3ddd.js",
|
||||
"main.js": "/static/js/main.86d86f63.js",
|
||||
"static/media/logo-transp.svg": "/static/media/logo-transp.66d6235f12fb5d9a6264c592bce58c5a.svg",
|
||||
"static/media/logo-bg.jpg": "/static/media/logo-bg.1d55df78b7376108f96c.jpg",
|
||||
"static/media/credit-card.jpg": "/static/media/credit-card.ff2990f7d50439a8f34d.jpg",
|
||||
|
|
@ -69,6 +69,6 @@
|
|||
},
|
||||
"entrypoints": [
|
||||
"static/css/main.148e73e6.css",
|
||||
"static/js/main.656d3ddd.js"
|
||||
"static/js/main.86d86f63.js"
|
||||
]
|
||||
}
|
||||
|
|
@ -1 +1 @@
|
|||
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="/favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1"/><meta name="theme-color" content="#000000"/><meta name="Content-Security-Policy" content="default-src https://shahsyotag.halkbank.gov.tm 'self'; content-src 'self' https://shahsyotag.halkbank.gov.tm; script-src 'self' www.google.com www.gstatic.com; style-src 'self' https: 'unsafe-inline'; frame-src www.google.com;"/><link rel="apple-touch-icon" href="/logo192.png"/><link rel="manifest" href="/manifest.json"/><title>Shahsy Otag</title><script defer="defer" src="/static/js/main.656d3ddd.js"></script><link href="/static/css/main.148e73e6.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div><script src="//www.google.com/recaptcha/api.js" nonce="{NONCE}" async defer="defer"></script></body></html>
|
||||
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="/favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1"/><meta name="theme-color" content="#000000"/><meta name="Content-Security-Policy" content="default-src https://shahsyotag.halkbank.gov.tm 'self'; content-src 'self' https://shahsyotag.halkbank.gov.tm; script-src 'self' www.google.com www.gstatic.com; style-src 'self' https: 'unsafe-inline'; frame-src www.google.com;"/><link rel="apple-touch-icon" href="/logo192.png"/><link rel="manifest" href="/manifest.json"/><title>Shahsy Otag</title><script defer="defer" src="/static/js/main.86d86f63.js"></script><link href="/static/css/main.148e73e6.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div><script src="//www.google.com/recaptcha/api.js" nonce="{NONCE}" async defer="defer"></script></body></html>
|
||||
File diff suppressed because one or more lines are too long
|
|
@ -0,0 +1,40 @@
|
|||
import React, { useContext } from 'react';
|
||||
import { LanguageContext } from '../../backend/LanguageContext';
|
||||
|
||||
const FinalStage = ({ setModalOpen }) => {
|
||||
const { locale } = useContext(LanguageContext);
|
||||
|
||||
return (
|
||||
<section className="imm-cs-1">
|
||||
<form>
|
||||
<h2 className="succes-title">
|
||||
{locale === 'TKM'
|
||||
? 'Karzyň kalkulýatory'
|
||||
: locale === 'РУС'
|
||||
? 'Оплата прошла успешно. Ваша заявка принята'
|
||||
: locale === 'ENG'
|
||||
? 'Loan calculator'
|
||||
: 'Karzyň kalkulýatory'}
|
||||
</h2>
|
||||
|
||||
<div className="cu-bottom cd-2-title">
|
||||
<button type="submit" onClick={setModalOpen(false)} className="sign-btn cu-btn">
|
||||
<div>
|
||||
<h3>
|
||||
{locale === 'TKM'
|
||||
? 'Dowam et'
|
||||
: locale === 'РУС'
|
||||
? 'Закрыть '
|
||||
: locale === 'ENG'
|
||||
? 'Proceed'
|
||||
: 'Dowam et'}
|
||||
</h3>
|
||||
</div>
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
</section>
|
||||
);
|
||||
};
|
||||
|
||||
export default FinalStage;
|
||||
|
|
@ -7,6 +7,7 @@ import { zodResolver } from '@hookform/resolvers/zod';
|
|||
// IMPORT IMAGES
|
||||
import next from '../../icons/next.svg';
|
||||
import next_reverse from '../../icons/next-reverse.svg';
|
||||
import { UserContext } from '../../backend/UserContext';
|
||||
// import arrow from "../../icons/arrow.svg";
|
||||
|
||||
const schema = z.object({
|
||||
|
|
@ -22,6 +23,7 @@ const PhoneAccept = ({
|
|||
paymentLink,
|
||||
}) => {
|
||||
const { locale } = useContext(LanguageContext);
|
||||
const { user } = useContext(UserContext);
|
||||
|
||||
const [isLoading, setIsLoading] = useState(false);
|
||||
const [error, setError] = useState(false);
|
||||
|
|
@ -66,11 +68,12 @@ const PhoneAccept = ({
|
|||
|
||||
if (!response.ok) {
|
||||
throw new Error(`HTTP error! Status: ${response.status}`);
|
||||
} else {
|
||||
}
|
||||
|
||||
if (jsonedResponse.status === 'ok') {
|
||||
setInvalidData(false);
|
||||
sendCode();
|
||||
setStage(15);
|
||||
} else if (jsonedResponse.status === 'wrong-otp') {
|
||||
setTryAgain(true);
|
||||
} else {
|
||||
|
|
@ -103,66 +106,31 @@ const PhoneAccept = ({
|
|||
|
||||
const jsonedResponse = await response.json();
|
||||
console.log(jsonedResponse);
|
||||
|
||||
setStage(15);
|
||||
} catch (error) {}
|
||||
};
|
||||
|
||||
const sendCodeForCard = async () => {
|
||||
const sendCode = async () => {
|
||||
try {
|
||||
const headers = {
|
||||
'Content-Type': 'application/json',
|
||||
};
|
||||
|
||||
const response = await fetch('https://shahsyotag.halkbank.gov.tm/sendOTP', {
|
||||
method: 'POST',
|
||||
headers: headers,
|
||||
headers: { 'Content-Type': 'aplication/json' },
|
||||
body: JSON.stringify({
|
||||
phone_number: '+99361454210',
|
||||
phone_number: user.mobile_phone,
|
||||
}),
|
||||
});
|
||||
|
||||
const jsonedResponse = await response.json();
|
||||
|
||||
if (jsonedResponse.status === 'ok') {
|
||||
setInvalidData(false);
|
||||
setStage(15);
|
||||
} else {
|
||||
setInvalidData(true);
|
||||
console.log(jsonedResponse);
|
||||
|
||||
if (!response.ok) {
|
||||
throw new Error(`HTTP error! Status: ${response.status}`);
|
||||
}
|
||||
} catch (error) {}
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
}
|
||||
};
|
||||
|
||||
// const codeResend = async () => {
|
||||
// try {
|
||||
// const headers = {
|
||||
// 'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8',
|
||||
// };
|
||||
|
||||
// const formData = new URLSearchParams();
|
||||
// formData.append('app', 'sanlykarz');
|
||||
// formData.append('id', borrowerData.idNo);
|
||||
// formData.append('acs-req-id', submitCardDetails['acs-request-id']);
|
||||
// formData.append('acs-session-url', submitCardDetails['acs-session-url']);
|
||||
|
||||
// const response = await fetch('https://shahsyotag.halkbank.gov.tm/app/api/v1/resend-code', {
|
||||
// method: 'POST',
|
||||
// headers: headers,
|
||||
// body: formData.toString(),
|
||||
// });
|
||||
|
||||
// if (!response.ok) {
|
||||
// throw new Error(`HTTP error! Status: ${response.status}`);
|
||||
// }
|
||||
|
||||
// const jsonedResponse = await response.json();
|
||||
// } catch (error) {
|
||||
// console.error(error.toString());
|
||||
// // Handle errors as needed
|
||||
// setError(true);
|
||||
// }
|
||||
// };
|
||||
|
||||
const onSubmit = (data) => {
|
||||
confirmPayment();
|
||||
sendConfirmData();
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@ import LoanAccepted from '../ImmediateCreditsStages/LoanAccepted';
|
|||
import CardRegistration from '../ImmediateCreditsStages/CardRegistration';
|
||||
import PaymentDetails from '../ImmediateCreditsStages/PaymentDetails';
|
||||
import PaymentSuccess from '../ImmediateCreditsStages/PaymentSuccess';
|
||||
import FinalStage from '../ImmediateCreditsStages/FinalStage';
|
||||
|
||||
const ImmediateCreditModal = ({
|
||||
modalOpen,
|
||||
|
|
@ -66,8 +67,6 @@ const ImmediateCreditModal = ({
|
|||
const [paymentDetails, setPaymentDetails] = useState();
|
||||
const [submitCardDetails, setSumbitCardDetails] = useState();
|
||||
|
||||
console.log(paymentDetails);
|
||||
|
||||
return (
|
||||
<section className={modalOpen ? 'modal credit-modal active' : 'modal credit-modal'}>
|
||||
<div className="modal-container">
|
||||
|
|
@ -388,7 +387,18 @@ const ImmediateCreditModal = ({
|
|||
paymentLink={paymentLink}
|
||||
/>
|
||||
) : stage === 15 ? (
|
||||
<PaymentSuccess setStage={setStage} setModalOpen={setModalOpen} />
|
||||
<PaymentSuccess
|
||||
setStage={setStage}
|
||||
setModalOpen={setModalOpen}
|
||||
borrowerData={borrowerData}
|
||||
guaranterData={guaranterData}
|
||||
isGuranter={isGuranter}
|
||||
recepientAmount={recepientAmount}
|
||||
creditDuration={creditDuration}
|
||||
setErrMessage={setErrMessage}
|
||||
/>
|
||||
) : stage === 16 ? (
|
||||
<FinalStage setModalOpen={setModalOpen} />
|
||||
) : (
|
||||
''
|
||||
)}
|
||||
|
|
|
|||
Loading…
Reference in New Issue