build
This commit is contained in:
parent
28b110f632
commit
e1d9a56f1f
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"files": {
|
||||
"main.css": "/static/css/main.148e73e6.css",
|
||||
"main.js": "/static/js/main.71160969.js",
|
||||
"main.js": "/static/js/main.4fd53a32.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.71160969.js"
|
||||
"static/js/main.4fd53a32.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.71160969.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.4fd53a32.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
|
|
@ -1,13 +1,13 @@
|
|||
// IMPORT MODULES
|
||||
import React, { useState, useContext } from "react";
|
||||
import { LanguageContext } from "../../backend/LanguageContext";
|
||||
import { UserContext } from "../../backend/UserContext";
|
||||
import { useForm } from "react-hook-form";
|
||||
import { z } from "zod";
|
||||
import { zodResolver } from "@hookform/resolvers/zod";
|
||||
import React, { useState, useContext } from 'react';
|
||||
import { LanguageContext } from '../../backend/LanguageContext';
|
||||
import { UserContext } from '../../backend/UserContext';
|
||||
import { useForm } from 'react-hook-form';
|
||||
import { z } from 'zod';
|
||||
import { zodResolver } from '@hookform/resolvers/zod';
|
||||
// IMPORT IMAGES
|
||||
import next from "../../icons/next.svg";
|
||||
import next_reverse from "../../icons/next-reverse.svg";
|
||||
import next from '../../icons/next.svg';
|
||||
import next_reverse from '../../icons/next-reverse.svg';
|
||||
// import arrow from "../../icons/arrow.svg";
|
||||
|
||||
const schema = z.object({
|
||||
|
|
@ -30,7 +30,7 @@ const AcceptStage = ({
|
|||
userDataRes,
|
||||
}) => {
|
||||
const { locale } = useContext(LanguageContext);
|
||||
const userToken = localStorage.getItem("userToken");
|
||||
const userToken = localStorage.getItem('userToken');
|
||||
|
||||
const handleCardDetails = (e) => {
|
||||
setCardDetails(e.target.value);
|
||||
|
|
@ -46,8 +46,8 @@ const AcceptStage = ({
|
|||
} = useForm({
|
||||
resolver: zodResolver(schema),
|
||||
defaultValues: {
|
||||
amount: recepientAmount ? recepientAmount : "Loading",
|
||||
duration: creditDuration ? creditDuration : "loading",
|
||||
amount: recepientAmount ? recepientAmount : 'Loading',
|
||||
duration: creditDuration ? creditDuration : 'loading',
|
||||
},
|
||||
});
|
||||
|
||||
|
|
@ -58,9 +58,9 @@ const AcceptStage = ({
|
|||
const response = await fetch(
|
||||
`https://shahsyotag.halkbank.gov.tm/onlineloancre-services/api/loancre`,
|
||||
{
|
||||
method: "POST",
|
||||
method: 'POST',
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
body: JSON.stringify({
|
||||
clientRecipient: {
|
||||
|
|
@ -70,7 +70,7 @@ const AcceptStage = ({
|
|||
name: borrowerData.name,
|
||||
surname: borrowerData.surname,
|
||||
availableAmount: borrowerData.availableAmount,
|
||||
clientType: "recipient",
|
||||
clientType: 'recipient',
|
||||
signRecipient: borrowerData.signRecipient,
|
||||
},
|
||||
clientGuarantor: isGuranter
|
||||
|
|
@ -81,7 +81,7 @@ const AcceptStage = ({
|
|||
name: guaranterData.name,
|
||||
surname: guaranterData.surname,
|
||||
availableAmount: guaranterData.availableAmount,
|
||||
clientType: "guarantor",
|
||||
clientType: 'guarantor',
|
||||
signGuarantor: guaranterData.signGuarantor,
|
||||
}
|
||||
: null,
|
||||
|
|
@ -90,7 +90,7 @@ const AcceptStage = ({
|
|||
mrtIsInsuarance: isGuranter ? 0 : 1,
|
||||
termInYears: creditDuration,
|
||||
}),
|
||||
}
|
||||
},
|
||||
);
|
||||
|
||||
if (!response.ok) {
|
||||
|
|
@ -115,17 +115,15 @@ const AcceptStage = ({
|
|||
const sendData = async (requestBody) => {
|
||||
try {
|
||||
const headers = {
|
||||
Accept: "application/json",
|
||||
Accept: 'application/json',
|
||||
'Content-Type': 'application/json',
|
||||
Authorization: `Bearer ${userToken}`,
|
||||
};
|
||||
const response = await fetch(
|
||||
"https://shahsyotag.halkbank.gov.tm/app/api/quick_loans",
|
||||
{
|
||||
method: "POST",
|
||||
headers: headers,
|
||||
body: JSON.stringify(requestBody),
|
||||
}
|
||||
);
|
||||
const response = await fetch('https://shahsyotag.halkbank.gov.tm/app/api/quick_loans', {
|
||||
method: 'POST',
|
||||
headers: headers,
|
||||
body: JSON.stringify(requestBody.sign),
|
||||
});
|
||||
|
||||
const jsonedResponse = await response.json();
|
||||
setAcceptedMessage(jsonedResponse.message);
|
||||
|
|
@ -148,23 +146,19 @@ const AcceptStage = ({
|
|||
<section className="imm-cs-1">
|
||||
<h1 className="cs-2-title">Error...</h1>
|
||||
<div className="cu-bottom cd-2-title">
|
||||
<button
|
||||
type="button"
|
||||
className="sign-btn reg-btn"
|
||||
onClick={() => setStage(7)}
|
||||
>
|
||||
<button type="button" className="sign-btn reg-btn" onClick={() => setStage(7)}>
|
||||
<div>
|
||||
<div className="btn-img">
|
||||
<img src={next_reverse} alt="logout" />
|
||||
</div>
|
||||
<h3>
|
||||
{locale === "TKM"
|
||||
? "Yza"
|
||||
: locale === "РУС"
|
||||
? "Назад"
|
||||
: locale === "ENG"
|
||||
? "Back"
|
||||
: "Yza"}
|
||||
{locale === 'TKM'
|
||||
? 'Yza'
|
||||
: locale === 'РУС'
|
||||
? 'Назад'
|
||||
: locale === 'ENG'
|
||||
? 'Back'
|
||||
: 'Yza'}
|
||||
</h3>
|
||||
</div>
|
||||
</button>
|
||||
|
|
@ -185,55 +179,50 @@ const AcceptStage = ({
|
|||
<section className="imm-cs-1">
|
||||
<form onSubmit={handleSubmit(onSubmit)}>
|
||||
<h2 className="cs-2-title">
|
||||
{locale === "TKM"
|
||||
? "Karzyň kalkulýatory"
|
||||
: locale === "РУС"
|
||||
? "Подтвердите данные"
|
||||
: locale === "ENG"
|
||||
? "Loan calculator"
|
||||
: "Karzyň kalkulýatory"}
|
||||
{locale === 'TKM'
|
||||
? 'Karzyň kalkulýatory'
|
||||
: locale === 'РУС'
|
||||
? 'Подтвердите данные'
|
||||
: locale === 'ENG'
|
||||
? 'Loan calculator'
|
||||
: 'Karzyň kalkulýatory'}
|
||||
</h2>
|
||||
<div className="imm-credit-form-wrapper">
|
||||
<div className="input-block">
|
||||
<label htmlFor="amount">
|
||||
{locale === "TKM"
|
||||
? "At"
|
||||
: locale === "РУС"
|
||||
? "Сумма"
|
||||
: locale === "ENG"
|
||||
? "amount"
|
||||
: "At"}
|
||||
{locale === 'TKM'
|
||||
? 'At'
|
||||
: locale === 'РУС'
|
||||
? 'Сумма'
|
||||
: locale === 'ENG'
|
||||
? 'amount'
|
||||
: 'At'}
|
||||
</label>
|
||||
<input {...register("amount")} type="text" id="amount" disabled />
|
||||
<input {...register('amount')} type="text" id="amount" disabled />
|
||||
{errors.amount && <span>{errors.amount.message}</span>}
|
||||
</div>
|
||||
<div className="input-block">
|
||||
<label htmlFor="surname">
|
||||
{locale === "TKM"
|
||||
? "At"
|
||||
: locale === "РУС"
|
||||
? "Срок"
|
||||
: locale === "ENG"
|
||||
? "duration"
|
||||
: "At"}
|
||||
{locale === 'TKM'
|
||||
? 'At'
|
||||
: locale === 'РУС'
|
||||
? 'Срок'
|
||||
: locale === 'ENG'
|
||||
? 'duration'
|
||||
: 'At'}
|
||||
</label>
|
||||
<input
|
||||
{...register("duration")}
|
||||
type="text"
|
||||
id="duration"
|
||||
disabled
|
||||
/>
|
||||
<input {...register('duration')} type="text" id="duration" disabled />
|
||||
{errors.duration && <span>{errors.duration.message}</span>}
|
||||
</div>
|
||||
<div className="input-block">
|
||||
<label htmlFor="code">
|
||||
{locale === "TKM"
|
||||
? "At"
|
||||
: locale === "РУС"
|
||||
? "Номер карты"
|
||||
: locale === "ENG"
|
||||
? "amount"
|
||||
: "At"}
|
||||
{locale === 'TKM'
|
||||
? 'At'
|
||||
: locale === 'РУС'
|
||||
? 'Номер карты'
|
||||
: locale === 'ENG'
|
||||
? 'amount'
|
||||
: 'At'}
|
||||
</label>
|
||||
<input
|
||||
value={cardDetails}
|
||||
|
|
@ -249,23 +238,19 @@ const AcceptStage = ({
|
|||
</div>
|
||||
</div>
|
||||
<div className="cu-bottom cd-2-title">
|
||||
<button
|
||||
type="button"
|
||||
className="sign-btn reg-btn"
|
||||
onClick={() => setStage(7)}
|
||||
>
|
||||
<button type="button" className="sign-btn reg-btn" onClick={() => setStage(7)}>
|
||||
<div>
|
||||
<div className="btn-img">
|
||||
<img src={next_reverse} alt="logout" />
|
||||
</div>
|
||||
<h3>
|
||||
{locale === "TKM"
|
||||
? "Yza"
|
||||
: locale === "РУС"
|
||||
? "Назад"
|
||||
: locale === "ENG"
|
||||
? "Back"
|
||||
: "Yza"}
|
||||
{locale === 'TKM'
|
||||
? 'Yza'
|
||||
: locale === 'РУС'
|
||||
? 'Назад'
|
||||
: locale === 'ENG'
|
||||
? 'Back'
|
||||
: 'Yza'}
|
||||
</h3>
|
||||
</div>
|
||||
</button>
|
||||
|
|
@ -273,17 +258,16 @@ const AcceptStage = ({
|
|||
type="submit"
|
||||
className="sign-btn cu-btn"
|
||||
disabled={cardDetails.length !== 23 && !isLoading ? true : false}
|
||||
onClick={onSubmit}
|
||||
>
|
||||
onClick={onSubmit}>
|
||||
<div>
|
||||
<h3>
|
||||
{locale === "TKM"
|
||||
? "Dowam et"
|
||||
: locale === "РУС"
|
||||
? "Подтвердить "
|
||||
: locale === "ENG"
|
||||
? "Proceed"
|
||||
: "Dowam et"}
|
||||
{locale === 'TKM'
|
||||
? 'Dowam et'
|
||||
: locale === 'РУС'
|
||||
? 'Подтвердить '
|
||||
: locale === 'ENG'
|
||||
? 'Proceed'
|
||||
: 'Dowam et'}
|
||||
</h3>
|
||||
<div className="btn-img">
|
||||
<img src={next} alt="logout" />
|
||||
|
|
|
|||
|
|
@ -44,6 +44,8 @@ const BorrowerInfo = ({ setStage, isGuranter, borrowerData }) => {
|
|||
passportSerial: borrowerData.idSeria ? borrowerData.idSeria : 'Loading',
|
||||
passportNumber: borrowerData.idNo ? borrowerData.idNo : 'Loading',
|
||||
bankAccount: borrowerData.accountNo ? borrowerData.accountNo : 'Loading',
|
||||
birthDate: borrowerData.birthDate ? borrowerData.birthDate : 'Loading',
|
||||
address: borrowerData.address ? borrowerData.address : 'Loading',
|
||||
phoneNumber: user.mobile_phone,
|
||||
},
|
||||
});
|
||||
|
|
@ -92,6 +94,7 @@ const BorrowerInfo = ({ setStage, isGuranter, borrowerData }) => {
|
|||
<input {...register('lastname')} type="text" id="lastname" disabled />
|
||||
{/* {errors.surname && <span>{errors.surname.message}</span>} */}
|
||||
</div>
|
||||
|
||||
<div className="input-block">
|
||||
<label htmlFor="surname">
|
||||
{locale === 'TKM'
|
||||
|
|
@ -105,6 +108,19 @@ const BorrowerInfo = ({ setStage, isGuranter, borrowerData }) => {
|
|||
<input {...register('surname')} type="text" id="surname" disabled />
|
||||
{/* {errors.surname && <span>{errors.surname.message}</span>} */}
|
||||
</div>
|
||||
<div className="input-block">
|
||||
<label htmlFor="birthDate">
|
||||
{locale === 'TKM'
|
||||
? 'At'
|
||||
: locale === 'РУС'
|
||||
? 'Год рождения'
|
||||
: locale === 'ENG'
|
||||
? 'Surname'
|
||||
: 'At'}
|
||||
</label>
|
||||
<input {...register('birthDate')} type="text" id="birthDate" disabled />
|
||||
{/* {errors.surname && <span>{errors.surname.message}</span>} */}
|
||||
</div>
|
||||
<div className="input-block">
|
||||
<label htmlFor="passport-serial">
|
||||
{locale === 'TKM'
|
||||
|
|
@ -136,6 +152,20 @@ const BorrowerInfo = ({ setStage, isGuranter, borrowerData }) => {
|
|||
/>
|
||||
{errors.passportNumber && <span>{errors.passportNumber.message}</span>}
|
||||
</div>
|
||||
|
||||
<div className="input-block">
|
||||
<label htmlFor="address">
|
||||
{locale === 'TKM'
|
||||
? 'Hasaba almak'
|
||||
: locale === 'РУС'
|
||||
? 'Адресс прописки'
|
||||
: locale === 'ENG'
|
||||
? 'Sign up'
|
||||
: 'Hasaba almak'}
|
||||
</label>
|
||||
<input {...register('address')} type="text" id="address" disabled />
|
||||
</div>
|
||||
|
||||
<div className="input-block">
|
||||
<label htmlFor="bank-acc">
|
||||
{locale === 'TKM'
|
||||
|
|
@ -168,6 +198,31 @@ const BorrowerInfo = ({ setStage, isGuranter, borrowerData }) => {
|
|||
|
||||
{errors.phoneNumber && <span>{errors.phoneNumber.message}</span>}
|
||||
</div>
|
||||
|
||||
<div className="input-block">
|
||||
<label htmlFor="workPlace">
|
||||
{locale === 'TKM'
|
||||
? 'Hasaba almak'
|
||||
: locale === 'РУС'
|
||||
? 'Место работы'
|
||||
: locale === 'ENG'
|
||||
? 'Sign up'
|
||||
: 'Hasaba almak'}
|
||||
</label>
|
||||
<input type="text" id="workPlace" {...register('workPlace')} />
|
||||
</div>
|
||||
<div className="input-block">
|
||||
<label htmlFor="workPosition">
|
||||
{locale === 'TKM'
|
||||
? 'Hasaba almak'
|
||||
: locale === 'РУС'
|
||||
? 'Должность'
|
||||
: locale === 'ENG'
|
||||
? 'Sign up'
|
||||
: 'Hasaba almak'}
|
||||
</label>
|
||||
<input type="text" id="workPosition" {...register('workPosition')} />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="cu-bottom cd-2-title">
|
||||
|
|
|
|||
|
|
@ -43,6 +43,8 @@ const GuaranterInfo = ({ setStage, isGuranter, guaranterData }) => {
|
|||
passportSerial: guaranterData.idSeria ? guaranterData.idSeria : 'Loading',
|
||||
passportNumber: guaranterData.idNo ? guaranterData.idNo : 'Loading',
|
||||
bankAccount: guaranterData.accountNo ? guaranterData.accountNo : 'Loading',
|
||||
birthDate: guaranterData.birthDate ? guaranterData.birthDate : 'Loading',
|
||||
address: guaranterData.address ? guaranterData.address : 'Loading',
|
||||
},
|
||||
});
|
||||
|
||||
|
|
@ -74,7 +76,7 @@ const GuaranterInfo = ({ setStage, isGuranter, guaranterData }) => {
|
|||
: 'At'}
|
||||
</label>
|
||||
<input {...register('name')} type="text" id="name" disabled />
|
||||
{errors.name && <span>{errors.name.message}</span>}
|
||||
{/* {errors.name && <span>{errors.name.message}</span>} */}
|
||||
</div>
|
||||
|
||||
<div className="input-block">
|
||||
|
|
@ -90,6 +92,7 @@ const GuaranterInfo = ({ setStage, isGuranter, guaranterData }) => {
|
|||
<input {...register('lastname')} type="text" id="lastname" disabled />
|
||||
{/* {errors.surname && <span>{errors.surname.message}</span>} */}
|
||||
</div>
|
||||
|
||||
<div className="input-block">
|
||||
<label htmlFor="surname">
|
||||
{locale === 'TKM'
|
||||
|
|
@ -101,7 +104,20 @@ const GuaranterInfo = ({ setStage, isGuranter, guaranterData }) => {
|
|||
: 'At'}
|
||||
</label>
|
||||
<input {...register('surname')} type="text" id="surname" disabled />
|
||||
{errors.surname && <span>{errors.surname.message}</span>}
|
||||
{/* {errors.surname && <span>{errors.surname.message}</span>} */}
|
||||
</div>
|
||||
<div className="input-block">
|
||||
<label htmlFor="birthDate">
|
||||
{locale === 'TKM'
|
||||
? 'At'
|
||||
: locale === 'РУС'
|
||||
? 'Год рождения'
|
||||
: locale === 'ENG'
|
||||
? 'Surname'
|
||||
: 'At'}
|
||||
</label>
|
||||
<input {...register('birthDate')} type="text" id="birthDate" disabled />
|
||||
{/* {errors.surname && <span>{errors.surname.message}</span>} */}
|
||||
</div>
|
||||
<div className="input-block">
|
||||
<label htmlFor="passport-serial">
|
||||
|
|
@ -134,6 +150,20 @@ const GuaranterInfo = ({ setStage, isGuranter, guaranterData }) => {
|
|||
/>
|
||||
{errors.passportNumber && <span>{errors.passportNumber.message}</span>}
|
||||
</div>
|
||||
|
||||
<div className="input-block">
|
||||
<label htmlFor="address">
|
||||
{locale === 'TKM'
|
||||
? 'Hasaba almak'
|
||||
: locale === 'РУС'
|
||||
? 'Адресс прописки'
|
||||
: locale === 'ENG'
|
||||
? 'Sign up'
|
||||
: 'Hasaba almak'}
|
||||
</label>
|
||||
<input {...register('address')} type="text" id="address" disabled />
|
||||
</div>
|
||||
|
||||
<div className="input-block">
|
||||
<label htmlFor="bank-acc">
|
||||
{locale === 'TKM'
|
||||
|
|
@ -152,6 +182,31 @@ const GuaranterInfo = ({ setStage, isGuranter, guaranterData }) => {
|
|||
/>
|
||||
{errors.bankAccount && <span>{errors.bankAccount.message}</span>}
|
||||
</div>
|
||||
|
||||
<div className="input-block">
|
||||
<label htmlFor="workPlace">
|
||||
{locale === 'TKM'
|
||||
? 'Hasaba almak'
|
||||
: locale === 'РУС'
|
||||
? 'Место работы'
|
||||
: locale === 'ENG'
|
||||
? 'Sign up'
|
||||
: 'Hasaba almak'}
|
||||
</label>
|
||||
<input type="text" id="workPlace" {...register('workPlace')} />
|
||||
</div>
|
||||
<div className="input-block">
|
||||
<label htmlFor="workPosition">
|
||||
{locale === 'TKM'
|
||||
? 'Hasaba almak'
|
||||
: locale === 'РУС'
|
||||
? 'Должность'
|
||||
: locale === 'ENG'
|
||||
? 'Sign up'
|
||||
: 'Hasaba almak'}
|
||||
</label>
|
||||
<input type="text" id="workPosition" {...register('workPosition')} />
|
||||
</div>
|
||||
</div>
|
||||
<div className="cu-bottom cd-2-title">
|
||||
<button type="button" className="sign-btn reg-btn" onClick={() => setStage(3)}>
|
||||
|
|
|
|||
|
|
@ -1,11 +1,25 @@
|
|||
import React, { useContext } from 'react';
|
||||
import React, { useContext, useState } from 'react';
|
||||
import { LanguageContext } from '../../backend/LanguageContext';
|
||||
|
||||
import next from '../../icons/next.svg';
|
||||
import next_reverse from '../../icons/next-reverse.svg';
|
||||
|
||||
const PaymentSuccess = ({ setStage, stage, setModalOpen }) => {
|
||||
const { locale } = useContext(LanguageContext);
|
||||
|
||||
const [codeValue, setPhoneValue] = useState('');
|
||||
|
||||
const [isLoading, setIsLoading] = useState(false);
|
||||
const [error, setError] = useState(false);
|
||||
|
||||
const handleCodeChange = (e) => {
|
||||
setPhoneValue(e.target.value);
|
||||
};
|
||||
|
||||
const onSubmit = (data) => {
|
||||
// confirmPayment();
|
||||
};
|
||||
|
||||
return (
|
||||
<section className="imm-cs-1">
|
||||
<form>
|
||||
|
|
@ -18,8 +32,35 @@ const PaymentSuccess = ({ setStage, stage, setModalOpen }) => {
|
|||
? 'Loan calculator'
|
||||
: 'Karzyň kalkulýatory'}
|
||||
</h2>
|
||||
<h2 className="cs-2-title">
|
||||
{locale === 'TKM'
|
||||
? 'Karzyň kalkulýatory'
|
||||
: locale === 'РУС'
|
||||
? 'Введите код с СМС оповещения, отправленный на номер '
|
||||
: locale === 'ENG'
|
||||
? 'Loan calculator'
|
||||
: 'Karzyň kalkulýatory'}
|
||||
</h2>
|
||||
<div className="imm-credit-form-wrapper">
|
||||
<div className="input-block">
|
||||
<label htmlFor="code">
|
||||
{locale === 'TKM'
|
||||
? 'At'
|
||||
: locale === 'РУС'
|
||||
? 'Код'
|
||||
: locale === 'ENG'
|
||||
? 'amount'
|
||||
: 'At'}
|
||||
</label>
|
||||
<input value={codeValue} onChange={handleCodeChange} type="text" id="code" />
|
||||
{/* <span className="another-option" onClick={codeResend}>
|
||||
Отправить код снова
|
||||
</span> */}
|
||||
{/* {errors.code && <span>{errors.code.message}</span>} */}
|
||||
</div>
|
||||
</div>
|
||||
<div className="cu-bottom cd-2-title">
|
||||
<button type="button" className="sign-btn reg-btn" onClick={() => setModalOpen(false)}>
|
||||
<button type="button" className="sign-btn reg-btn" onClick={() => setStage(14)}>
|
||||
<div>
|
||||
<div className="btn-img">
|
||||
<img src={next_reverse} alt="logout" />
|
||||
|
|
@ -28,33 +69,33 @@ const PaymentSuccess = ({ setStage, stage, setModalOpen }) => {
|
|||
{locale === 'TKM'
|
||||
? 'Yza'
|
||||
: locale === 'РУС'
|
||||
? 'Закрыть'
|
||||
? 'Назад'
|
||||
: locale === 'ENG'
|
||||
? 'Back'
|
||||
: 'Yza'}
|
||||
</h3>
|
||||
</div>
|
||||
</button>
|
||||
{/* <button
|
||||
type="button"
|
||||
className="sign-btn cu-btn"
|
||||
onClick={() => setStage(4)}
|
||||
>
|
||||
<div>
|
||||
<h3>
|
||||
{locale === "TKM"
|
||||
? "Dowam et"
|
||||
: locale === "РУС"
|
||||
? "Подтвердить "
|
||||
: locale === "ENG"
|
||||
? "Proceed"
|
||||
: "Dowam et"}
|
||||
</h3>
|
||||
<div className="btn-img">
|
||||
<img src={next} alt="logout" />
|
||||
<button
|
||||
disabled={codeValue.length !== 5 && !isLoading ? true : false}
|
||||
type="submit"
|
||||
onClick={onSubmit}
|
||||
className="sign-btn cu-btn">
|
||||
<div>
|
||||
<h3>
|
||||
{locale === 'TKM'
|
||||
? 'Dowam et'
|
||||
: locale === 'РУС'
|
||||
? 'Подтвердить '
|
||||
: locale === 'ENG'
|
||||
? 'Proceed'
|
||||
: 'Dowam et'}
|
||||
</h3>
|
||||
<div className="btn-img">
|
||||
<img src={next} alt="logout" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</button> */}
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
</section>
|
||||
|
|
|
|||
|
|
@ -14,13 +14,20 @@ const schema = z.object({
|
|||
// surname: z.string().min(1),
|
||||
});
|
||||
|
||||
const PhoneAccept = ({ setStage, borrowerData, submitCardDetails, paymentDetails }) => {
|
||||
const PhoneAccept = ({
|
||||
setStage,
|
||||
borrowerData,
|
||||
submitCardDetails,
|
||||
paymentDetails,
|
||||
paymentLink,
|
||||
}) => {
|
||||
const { locale } = useContext(LanguageContext);
|
||||
|
||||
const [isLoading, setIsLoading] = useState(false);
|
||||
const [error, setError] = useState(false);
|
||||
|
||||
const [invalidData, setInvalidData] = useState(false);
|
||||
const [tryAgain, setTryAgain] = useState(false);
|
||||
|
||||
const [codeValue, setPhoneValue] = useState('');
|
||||
|
||||
|
|
@ -32,6 +39,8 @@ const PhoneAccept = ({ setStage, borrowerData, submitCardDetails, paymentDetails
|
|||
resolver: zodResolver(schema),
|
||||
});
|
||||
|
||||
console.log(paymentDetails);
|
||||
|
||||
const confirmPayment = async () => {
|
||||
try {
|
||||
const headers = {
|
||||
|
|
@ -55,6 +64,66 @@ const PhoneAccept = ({ setStage, borrowerData, submitCardDetails, paymentDetails
|
|||
|
||||
const jsonedResponse = await response.json();
|
||||
|
||||
if (!response.ok) {
|
||||
throw new Error(`HTTP error! Status: ${response.status}`);
|
||||
} else {
|
||||
}
|
||||
|
||||
if (jsonedResponse.status === 'ok') {
|
||||
setInvalidData(false);
|
||||
} else if (jsonedResponse.status === 'wrong-otp') {
|
||||
setTryAgain(true);
|
||||
} else {
|
||||
setInvalidData(true);
|
||||
}
|
||||
} catch (error) {}
|
||||
};
|
||||
|
||||
const sendConfirmData = async () => {
|
||||
try {
|
||||
const headers = {
|
||||
'Content-Type': 'application/json',
|
||||
};
|
||||
|
||||
const response = await fetch(
|
||||
'https://shahsyotag.halkbank.gov.tm/app/api/check-payment-credit-card',
|
||||
{
|
||||
headers: headers,
|
||||
body: JSON.stringify({
|
||||
paymentId: paymentLink.id,
|
||||
orderId: paymentDetails['md-order'],
|
||||
status: '1',
|
||||
}),
|
||||
},
|
||||
);
|
||||
|
||||
if (!response.ok) {
|
||||
throw new Error(`HTTP error! Status: ${response.status}`);
|
||||
}
|
||||
|
||||
const jsonedResponse = await response.json();
|
||||
console.log(jsonedResponse);
|
||||
|
||||
setStage(15);
|
||||
} catch (error) {}
|
||||
};
|
||||
|
||||
const sendCodeForCard = async () => {
|
||||
try {
|
||||
const headers = {
|
||||
'Content-Type': 'application/json',
|
||||
};
|
||||
|
||||
const response = await fetch('https://shahsyotag.halkbank.gov.tm/sendOTP', {
|
||||
method: 'POST',
|
||||
headers: headers,
|
||||
body: JSON.stringify({
|
||||
phone_number: '+99361454210',
|
||||
}),
|
||||
});
|
||||
|
||||
const jsonedResponse = await response.json();
|
||||
|
||||
if (jsonedResponse.status === 'ok') {
|
||||
setInvalidData(false);
|
||||
setStage(15);
|
||||
|
|
@ -64,38 +133,39 @@ const PhoneAccept = ({ setStage, borrowerData, submitCardDetails, paymentDetails
|
|||
} catch (error) {}
|
||||
};
|
||||
|
||||
const codeResend = async () => {
|
||||
try {
|
||||
const headers = {
|
||||
'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8',
|
||||
};
|
||||
// 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 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(),
|
||||
});
|
||||
// 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}`);
|
||||
}
|
||||
// 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 jsonedResponse = await response.json();
|
||||
// } catch (error) {
|
||||
// console.error(error.toString());
|
||||
// // Handle errors as needed
|
||||
// setError(true);
|
||||
// }
|
||||
// };
|
||||
|
||||
const onSubmit = (data) => {
|
||||
confirmPayment();
|
||||
sendConfirmData();
|
||||
};
|
||||
|
||||
if (isLoading) {
|
||||
|
|
@ -166,6 +236,11 @@ const PhoneAccept = ({ setStage, borrowerData, submitCardDetails, paymentDetails
|
|||
<h1 className="cs-2-title">Ошибкаб проверьте данные</h1>
|
||||
</section>
|
||||
)}
|
||||
{tryAgain && (
|
||||
<section className="imm-cs-1">
|
||||
<h1 className="cs-2-title">Попробуйте отправить снова</h1>
|
||||
</section>
|
||||
)}
|
||||
<div className="cu-bottom cd-2-title">
|
||||
<button type="button" className="sign-btn reg-btn" onClick={() => setStage(13)}>
|
||||
<div>
|
||||
|
|
|
|||
|
|
@ -1,33 +1,33 @@
|
|||
// IMPORT MODULES
|
||||
import React, { useEffect, useRef, useState, useContext } from "react";
|
||||
import { LanguageContext } from "../../backend/LanguageContext";
|
||||
import React, { useEffect, useRef, useState, useContext } from 'react';
|
||||
import { LanguageContext } from '../../backend/LanguageContext';
|
||||
|
||||
import axios from "axios";
|
||||
import axios from 'axios';
|
||||
|
||||
// IMPORT IMAGES
|
||||
import exit from "../../icons/exit.svg";
|
||||
import { ReactComponent as Lines } from "../../icons/lines.svg";
|
||||
import { ReactComponent as Img1 } from "../../icons/credit1.svg";
|
||||
import { ReactComponent as Img2 } from "../../icons/credit2.svg";
|
||||
import { ReactComponent as Img3 } from "../../icons/credit3.svg";
|
||||
import { ReactComponent as Img4 } from "../../icons/credit4.svg";
|
||||
import { ReactComponent as Img5 } from "../../icons/credit5.svg";
|
||||
import { ReactComponent as Img6 } from "../../icons/credit6.svg";
|
||||
import exit from '../../icons/exit.svg';
|
||||
import { ReactComponent as Lines } from '../../icons/lines.svg';
|
||||
import { ReactComponent as Img1 } from '../../icons/credit1.svg';
|
||||
import { ReactComponent as Img2 } from '../../icons/credit2.svg';
|
||||
import { ReactComponent as Img3 } from '../../icons/credit3.svg';
|
||||
import { ReactComponent as Img4 } from '../../icons/credit4.svg';
|
||||
import { ReactComponent as Img5 } from '../../icons/credit5.svg';
|
||||
import { ReactComponent as Img6 } from '../../icons/credit6.svg';
|
||||
|
||||
// IMPORT COMPONENTS
|
||||
import BorrowerStage from "../ImmediateCreditsStages/BorrowerStage";
|
||||
import BorrowerInfo from "../ImmediateCreditsStages/BorrowerInfo";
|
||||
import GuaranterStage from "../ImmediateCreditsStages/GuaranterStage";
|
||||
import GuaranterInfo from "../ImmediateCreditsStages/GuaranterInfo";
|
||||
import NotAUser from "../ImmediateCreditsStages/NotAUser";
|
||||
import CalculateStage from "../ImmediateCreditsStages/CalculateStage";
|
||||
import AcceptStage from "../ImmediateCreditsStages/AcceptStage";
|
||||
import PhoneAccept from "../ImmediateCreditsStages/PhoneAccept";
|
||||
import CardDetails from "../ImmediateCreditsStages/CardDetails";
|
||||
import LoanAccepted from "../ImmediateCreditsStages/LoanAccepted";
|
||||
import CardRegistration from "../ImmediateCreditsStages/CardRegistration";
|
||||
import PaymentDetails from "../ImmediateCreditsStages/PaymentDetails";
|
||||
import PaymentSuccess from "../ImmediateCreditsStages/PaymentSuccess";
|
||||
import BorrowerStage from '../ImmediateCreditsStages/BorrowerStage';
|
||||
import BorrowerInfo from '../ImmediateCreditsStages/BorrowerInfo';
|
||||
import GuaranterStage from '../ImmediateCreditsStages/GuaranterStage';
|
||||
import GuaranterInfo from '../ImmediateCreditsStages/GuaranterInfo';
|
||||
import NotAUser from '../ImmediateCreditsStages/NotAUser';
|
||||
import CalculateStage from '../ImmediateCreditsStages/CalculateStage';
|
||||
import AcceptStage from '../ImmediateCreditsStages/AcceptStage';
|
||||
import PhoneAccept from '../ImmediateCreditsStages/PhoneAccept';
|
||||
import CardDetails from '../ImmediateCreditsStages/CardDetails';
|
||||
import LoanAccepted from '../ImmediateCreditsStages/LoanAccepted';
|
||||
import CardRegistration from '../ImmediateCreditsStages/CardRegistration';
|
||||
import PaymentDetails from '../ImmediateCreditsStages/PaymentDetails';
|
||||
import PaymentSuccess from '../ImmediateCreditsStages/PaymentSuccess';
|
||||
|
||||
const ImmediateCreditModal = ({
|
||||
modalOpen,
|
||||
|
|
@ -46,8 +46,8 @@ const ImmediateCreditModal = ({
|
|||
const [loading, setLoading] = useState();
|
||||
const [error, setError] = useState();
|
||||
|
||||
const [errMessage, setErrMessage] = useState("");
|
||||
const [acceptedMessage, setAcceptedMessage] = useState("");
|
||||
const [errMessage, setErrMessage] = useState('');
|
||||
const [acceptedMessage, setAcceptedMessage] = useState('');
|
||||
|
||||
const [borrowerData, setBorrowerData] = useState();
|
||||
const [guaranterData, setGuaranterData] = useState();
|
||||
|
|
@ -57,11 +57,11 @@ const ImmediateCreditModal = ({
|
|||
const [maxAmount, setMaxAmount] = useState();
|
||||
const [recepientAmount, setRecepientAmount] = useState(0);
|
||||
const [creditDuration, setCreditDuration] = useState(1);
|
||||
const [phoneNumber, setPhoneNumber] = useState("");
|
||||
const [cardDetails, setCardDetails] = useState("");
|
||||
const [phoneNumber, setPhoneNumber] = useState('');
|
||||
const [cardDetails, setCardDetails] = useState('');
|
||||
|
||||
const [userDataRes, setUserDataRes] = useState();
|
||||
const [paymentLink, setPaymentLink] = useState("");
|
||||
const [paymentLink, setPaymentLink] = useState('');
|
||||
|
||||
const [paymentDetails, setPaymentDetails] = useState();
|
||||
const [submitCardDetails, setSumbitCardDetails] = useState();
|
||||
|
|
@ -69,25 +69,22 @@ const ImmediateCreditModal = ({
|
|||
console.log(paymentDetails);
|
||||
|
||||
return (
|
||||
<section
|
||||
className={modalOpen ? "modal credit-modal active" : "modal credit-modal"}
|
||||
>
|
||||
<section className={modalOpen ? 'modal credit-modal active' : 'modal credit-modal'}>
|
||||
<div className="modal-container">
|
||||
<div className="modal-inner" ref={window}>
|
||||
<div className="modal-window">
|
||||
<div className="modal-top">
|
||||
<h2>
|
||||
{locale === "TKM"
|
||||
? "Çalt karz almak üçin onlaýn-ýüzlenme"
|
||||
: "Онлайн-заявка для получения быстрого кредита"}
|
||||
{locale === 'TKM'
|
||||
? 'Çalt karz almak üçin onlaýn-ýüzlenme'
|
||||
: 'Онлайн-заявка для получения быстрого кредита'}
|
||||
</h2>
|
||||
<button
|
||||
type="button"
|
||||
className="exit-btn"
|
||||
onClick={() => {
|
||||
setModalOpen(false);
|
||||
}}
|
||||
>
|
||||
}}>
|
||||
<div>
|
||||
<img src={exit} alt="exit" />
|
||||
</div>
|
||||
|
|
@ -98,81 +95,73 @@ const ImmediateCreditModal = ({
|
|||
<div className="icon-block active">
|
||||
<Img4 className="modal-icon" />
|
||||
<h3 className="icon-title">
|
||||
{locale === "TKM"
|
||||
? "Karz üçin maglumat"
|
||||
: locale === "РУС"
|
||||
? "Заполните данные"
|
||||
: locale === "ENG"
|
||||
? "Loan details"
|
||||
: "Karz üçin maglumat"}
|
||||
{locale === 'TKM'
|
||||
? 'Karz üçin maglumat'
|
||||
: locale === 'РУС'
|
||||
? 'Заполните данные'
|
||||
: locale === 'ENG'
|
||||
? 'Loan details'
|
||||
: 'Karz üçin maglumat'}
|
||||
</h3>
|
||||
</div>
|
||||
|
||||
<div className={stage > 1 ? "line-block active" : "line-block"}>
|
||||
<div className={stage > 1 ? 'line-block active' : 'line-block'}>
|
||||
<Lines className="lines" />
|
||||
<Lines className="lines" />
|
||||
</div>
|
||||
|
||||
<div className={stage > 1 ? "icon-block active" : "icon-block"}>
|
||||
<div className={stage > 1 ? 'icon-block active' : 'icon-block'}>
|
||||
<Img3 className="modal-icon" />
|
||||
<h3 className="icon-title">
|
||||
{locale === "TKM"
|
||||
? "Şahsy maglumatlar"
|
||||
: locale === "РУС"
|
||||
? "Подтвердите личные данные"
|
||||
: locale === "ENG"
|
||||
? "Personal data"
|
||||
: "Şahsy maglumatlar"}
|
||||
{locale === 'TKM'
|
||||
? 'Şahsy maglumatlar'
|
||||
: locale === 'РУС'
|
||||
? 'Подтвердите личные данные'
|
||||
: locale === 'ENG'
|
||||
? 'Personal data'
|
||||
: 'Şahsy maglumatlar'}
|
||||
</h3>
|
||||
</div>
|
||||
|
||||
<div className={stage > 2 ? "line-block active" : "line-block"}>
|
||||
<div className={stage > 2 ? 'line-block active' : 'line-block'}>
|
||||
<Lines className="lines" />
|
||||
<Lines className="lines" />
|
||||
</div>
|
||||
|
||||
{isGuranter && (
|
||||
<>
|
||||
<div
|
||||
className={stage > 3 ? "icon-block active" : "icon-block"}
|
||||
>
|
||||
<div className={stage > 3 ? 'icon-block active' : 'icon-block'}>
|
||||
<Img4 className="modal-icon" />
|
||||
<h3 className="icon-title">
|
||||
{locale === "TKM"
|
||||
? "Karz üçin maglumat"
|
||||
: locale === "РУС"
|
||||
? "Заполните данные поручитель"
|
||||
: locale === "ENG"
|
||||
? "Loan details"
|
||||
: "Karz üçin maglumat"}
|
||||
{locale === 'TKM'
|
||||
? 'Karz üçin maglumat'
|
||||
: locale === 'РУС'
|
||||
? 'Заполните данные поручитель'
|
||||
: locale === 'ENG'
|
||||
? 'Loan details'
|
||||
: 'Karz üçin maglumat'}
|
||||
</h3>
|
||||
</div>
|
||||
|
||||
<div
|
||||
className={stage > 3 ? "line-block active" : "line-block"}
|
||||
>
|
||||
<div className={stage > 3 ? 'line-block active' : 'line-block'}>
|
||||
<Lines className="lines" />
|
||||
<Lines className="lines" />
|
||||
</div>
|
||||
|
||||
<div
|
||||
className={stage > 4 ? "icon-block active" : "icon-block"}
|
||||
>
|
||||
<div className={stage > 4 ? 'icon-block active' : 'icon-block'}>
|
||||
<Img3 className="modal-icon" />
|
||||
<h3 className="icon-title">
|
||||
{locale === "TKM"
|
||||
? "Şahsy maglumatlar"
|
||||
: locale === "РУС"
|
||||
? "Подтвердите данные поручителя"
|
||||
: locale === "ENG"
|
||||
? "Personal data"
|
||||
: "Şahsy maglumatlar"}
|
||||
{locale === 'TKM'
|
||||
? 'Şahsy maglumatlar'
|
||||
: locale === 'РУС'
|
||||
? 'Подтвердите данные поручителя'
|
||||
: locale === 'ENG'
|
||||
? 'Personal data'
|
||||
: 'Şahsy maglumatlar'}
|
||||
</h3>
|
||||
</div>
|
||||
|
||||
<div
|
||||
className={stage > 4 ? "line-block active" : "line-block"}
|
||||
>
|
||||
<div className={stage > 4 ? 'line-block active' : 'line-block'}>
|
||||
<Lines className="lines" />
|
||||
<Lines className="lines" />
|
||||
</div>
|
||||
|
|
@ -233,56 +222,56 @@ const ImmediateCreditModal = ({
|
|||
<div className="icon-block active">
|
||||
<Img4 className="modal-icon" />
|
||||
<h3 className="icon-title">
|
||||
{locale === "TKM"
|
||||
? "Karz üçin maglumat"
|
||||
: locale === "РУС"
|
||||
? "Заполните данные"
|
||||
: locale === "ENG"
|
||||
? "Loan details"
|
||||
: "Karz üçin maglumat"}
|
||||
{locale === 'TKM'
|
||||
? 'Karz üçin maglumat'
|
||||
: locale === 'РУС'
|
||||
? 'Заполните данные'
|
||||
: locale === 'ENG'
|
||||
? 'Loan details'
|
||||
: 'Karz üçin maglumat'}
|
||||
</h3>
|
||||
</div>
|
||||
) : stage >= 2 ? (
|
||||
<div className="icon-block active">
|
||||
<Img3 className="modal-icon" />
|
||||
<h3 className="icon-title">
|
||||
{locale === "TKM"
|
||||
? "Karzyň kalkulýatory"
|
||||
: locale === "РУС"
|
||||
? "Подтвердите личные данные"
|
||||
: locale === "ENG"
|
||||
? "Loan calculator"
|
||||
: "Karzyň kalkulýatory"}
|
||||
{locale === 'TKM'
|
||||
? 'Karzyň kalkulýatory'
|
||||
: locale === 'РУС'
|
||||
? 'Подтвердите личные данные'
|
||||
: locale === 'ENG'
|
||||
? 'Loan calculator'
|
||||
: 'Karzyň kalkulýatory'}
|
||||
</h3>
|
||||
</div>
|
||||
) : stage === 4 && isGuranter ? (
|
||||
<div className="icon-block active">
|
||||
<Img3 className="modal-icon" />
|
||||
<h3 className="icon-title">
|
||||
{locale === "TKM"
|
||||
? "Şahsy maglumatlar"
|
||||
: locale === "РУС"
|
||||
? "Заполните данные поручителя"
|
||||
: locale === "ENG"
|
||||
? "Personal data"
|
||||
: "Şahsy maglumatlar"}
|
||||
{locale === 'TKM'
|
||||
? 'Şahsy maglumatlar'
|
||||
: locale === 'РУС'
|
||||
? 'Заполните данные поручителя'
|
||||
: locale === 'ENG'
|
||||
? 'Personal data'
|
||||
: 'Şahsy maglumatlar'}
|
||||
</h3>
|
||||
</div>
|
||||
) : stage >= 5 && isGuranter ? (
|
||||
<div className="icon-block active">
|
||||
<Img4 className="modal-icon" />
|
||||
<h3 className="icon-title">
|
||||
{locale === "TKM"
|
||||
? "Karz üçin maglumat"
|
||||
: locale === "РУС"
|
||||
? "Подтвердите данные поручителя"
|
||||
: locale === "ENG"
|
||||
? "Loan details"
|
||||
: "Karz üçin maglumat"}
|
||||
{locale === 'TKM'
|
||||
? 'Karz üçin maglumat'
|
||||
: locale === 'РУС'
|
||||
? 'Подтвердите данные поручителя'
|
||||
: locale === 'ENG'
|
||||
? 'Loan details'
|
||||
: 'Karz üçin maglumat'}
|
||||
</h3>
|
||||
</div>
|
||||
) : (
|
||||
""
|
||||
''
|
||||
)}
|
||||
</div>
|
||||
|
||||
|
|
@ -307,11 +296,7 @@ const ImmediateCreditModal = ({
|
|||
borrowerData={borrowerData}
|
||||
/>
|
||||
) : stage === 3 ? (
|
||||
<NotAUser
|
||||
setStage={setStage}
|
||||
stage={stage}
|
||||
errMessage={errMessage}
|
||||
/>
|
||||
<NotAUser setStage={setStage} stage={stage} errMessage={errMessage} />
|
||||
) : stage === 4 ? (
|
||||
<GuaranterStage
|
||||
setStage={setStage}
|
||||
|
|
@ -331,11 +316,7 @@ const ImmediateCreditModal = ({
|
|||
guaranterData={guaranterData}
|
||||
/>
|
||||
) : stage === 6 ? (
|
||||
<NotAUser
|
||||
setStage={setStage}
|
||||
stage={stage}
|
||||
errMessage={errMessage}
|
||||
/>
|
||||
<NotAUser setStage={setStage} stage={stage} errMessage={errMessage} />
|
||||
) : stage === 7 ? (
|
||||
<CalculateStage
|
||||
isGuranter={isGuranter}
|
||||
|
|
@ -373,11 +354,7 @@ const ImmediateCreditModal = ({
|
|||
creditDuration={creditDuration}
|
||||
/>
|
||||
) : stage === 10 ? (
|
||||
<NotAUser
|
||||
setStage={setStage}
|
||||
stage={stage}
|
||||
errMessage={errMessage}
|
||||
/>
|
||||
<NotAUser setStage={setStage} stage={stage} errMessage={errMessage} />
|
||||
) : stage === 11 ? (
|
||||
<LoanAccepted
|
||||
setModalOpen={setModalOpen}
|
||||
|
|
@ -408,14 +385,12 @@ const ImmediateCreditModal = ({
|
|||
setStage={setStage}
|
||||
paymentDetails={paymentDetails}
|
||||
submitCardDetails={submitCardDetails}
|
||||
paymentLink={paymentLink}
|
||||
/>
|
||||
) : stage === 15 ? (
|
||||
<PaymentSuccess
|
||||
setStage={setStage}
|
||||
setModalOpen={setModalOpen}
|
||||
/>
|
||||
<PaymentSuccess setStage={setStage} setModalOpen={setModalOpen} />
|
||||
) : (
|
||||
""
|
||||
''
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -35,6 +35,8 @@ const ImmediateCredit = () => {
|
|||
|
||||
const [paymentDetails, setPaymentDetails] = useState();
|
||||
|
||||
console.log(userToken);
|
||||
|
||||
useEffect(() => {
|
||||
if (modalOpen) {
|
||||
document.body.style.overflowY = 'hidden';
|
||||
|
|
@ -103,7 +105,7 @@ const ImmediateCredit = () => {
|
|||
|
||||
const jsonedResponse = await response.json();
|
||||
|
||||
setCardData(jsonedResponse);
|
||||
// setCardData(jsonedResponse);
|
||||
} catch (error) {}
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue