build
This commit is contained in:
parent
20ec4ed99f
commit
f2337c9530
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"files": {
|
||||
"main.css": "/static/css/main.47dd3ba3.css",
|
||||
"main.js": "/static/js/main.1e244223.js",
|
||||
"main.js": "/static/js/main.144fee65.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.47dd3ba3.css",
|
||||
"static/js/main.1e244223.js"
|
||||
"static/js/main.144fee65.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.1e244223.js"></script><link href="/static/css/main.47dd3ba3.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.144fee65.js"></script><link href="/static/css/main.47dd3ba3.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,9 +30,11 @@ const AcceptStage = ({
|
|||
setErrMessage,
|
||||
setErrMessageEn,
|
||||
setErrMessageTkm,
|
||||
recipientWorkPlace,
|
||||
recipientWorkPosition,
|
||||
}) => {
|
||||
const { locale } = useContext(LanguageContext);
|
||||
const userToken = localStorage.getItem('userToken');
|
||||
const userToken = localStorage.getItem("userToken");
|
||||
const { user } = useContext(UserContext);
|
||||
|
||||
const handleCardDetails = (e) => {
|
||||
|
|
@ -41,7 +43,7 @@ const AcceptStage = ({
|
|||
|
||||
const [isLoading, setIsLoading] = useState(false);
|
||||
const [error, setError] = useState(false);
|
||||
const [errorMessage, setErrorMesage] = useState('');
|
||||
const [errorMessage, setErrorMesage] = useState("");
|
||||
|
||||
const {
|
||||
register,
|
||||
|
|
@ -50,20 +52,21 @@ const AcceptStage = ({
|
|||
} = useForm({
|
||||
resolver: zodResolver(schema),
|
||||
defaultValues: {
|
||||
amount: recepientAmount ? recepientAmount : 'Loading',
|
||||
duration: creditDuration ? creditDuration : 'loading',
|
||||
amount: recepientAmount ? recepientAmount : "Loading",
|
||||
duration: creditDuration ? creditDuration : "loading",
|
||||
},
|
||||
});
|
||||
|
||||
const loanCreateCheck = async () => {
|
||||
setIsLoading(true);
|
||||
try {
|
||||
const response = await fetch(
|
||||
'https://shahsyotag.halkbank.gov.tm/onlineloancre-services/api/loancre/check',
|
||||
"https://shahsyotag.halkbank.gov.tm/onlineloancre-services/api/loancre/check",
|
||||
{
|
||||
method: 'POST',
|
||||
method: "POST",
|
||||
headers: {
|
||||
Accept: 'application/json, text/plain',
|
||||
'Content-Type': 'application/json;charset=UTF-8',
|
||||
Accept: "application/json, text/plain",
|
||||
"Content-Type": "application/json;charset=UTF-8",
|
||||
},
|
||||
body: JSON.stringify({
|
||||
clientRecipient: {
|
||||
|
|
@ -74,7 +77,7 @@ const AcceptStage = ({
|
|||
surname: borrowerData.surname,
|
||||
lastname: borrowerData.lastname,
|
||||
availableAmount: borrowerData.availableAmount,
|
||||
clientType: 'recipient',
|
||||
clientType: "recipient",
|
||||
signRecipient: borrowerData.signRecipient,
|
||||
expDate: borrowerData.expDate,
|
||||
},
|
||||
|
|
@ -87,7 +90,7 @@ const AcceptStage = ({
|
|||
surname: guaranterData.surname,
|
||||
lastname: guaranterData.lastname,
|
||||
availableAmount: guaranterData.availableAmount,
|
||||
clientType: 'guarantor',
|
||||
clientType: "guarantor",
|
||||
signGuarantor: guaranterData.signGuarantor,
|
||||
expDate: guaranterData.expDate,
|
||||
}
|
||||
|
|
@ -97,7 +100,7 @@ const AcceptStage = ({
|
|||
mrtIsInsuarance: isGuranter ? 0 : 1,
|
||||
termInYears: creditDuration,
|
||||
}),
|
||||
},
|
||||
}
|
||||
);
|
||||
|
||||
if (!response.ok) {
|
||||
|
|
@ -108,7 +111,7 @@ const AcceptStage = ({
|
|||
|
||||
if (jsonedResponse.errCode === 0) {
|
||||
// sendCode();
|
||||
setStage(11);
|
||||
loanCreate();
|
||||
} else {
|
||||
setErrMessage(jsonedResponse.messageRu);
|
||||
setErrMessageTkm(jsonedResponse.message);
|
||||
|
|
@ -118,15 +121,119 @@ const AcceptStage = ({
|
|||
} catch (error) {}
|
||||
};
|
||||
|
||||
const loanCreate = async () => {
|
||||
try {
|
||||
const response = await fetch(
|
||||
`https://shahsyotag.halkbank.gov.tm/onlineloancre-services/api/loancre`,
|
||||
{
|
||||
method: "POST",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
body: JSON.stringify({
|
||||
clientRecipient: {
|
||||
idSeria: borrowerData.idSeria,
|
||||
idNo: borrowerData.idNo,
|
||||
cardMaskNumber: borrowerData.cardMaskNumber,
|
||||
name: borrowerData.name,
|
||||
surname: borrowerData.surname,
|
||||
lastname: borrowerData.lastname,
|
||||
availableAmount: borrowerData.availableAmount,
|
||||
clientType: "recipient",
|
||||
signRecipient: borrowerData.signRecipient,
|
||||
expDate: borrowerData.expDate,
|
||||
},
|
||||
clientGuarantor: isGuranter
|
||||
? {
|
||||
idSeria: guaranterData.idSeria,
|
||||
idNo: guaranterData.idNo,
|
||||
cardMaskNumber: guaranterData.cardMaskNumber,
|
||||
name: guaranterData.name,
|
||||
surname: guaranterData.surname,
|
||||
lastname: guaranterData.lastname,
|
||||
availableAmount: guaranterData.availableAmount,
|
||||
clientType: "guarantor",
|
||||
signGuarantor: guaranterData.signGuarantor,
|
||||
expDate: guaranterData.expDate,
|
||||
}
|
||||
: null,
|
||||
availableAmount: recepientAmount,
|
||||
creditCardAccountNumber: cardDetails,
|
||||
mrtIsInsuarance: isGuranter ? 0 : 1,
|
||||
termInYears: creditDuration,
|
||||
}),
|
||||
}
|
||||
);
|
||||
|
||||
if (!response.ok) {
|
||||
throw new Error(`HTTP error! Status: ${response.status}`);
|
||||
}
|
||||
|
||||
const responseJson = await response.json();
|
||||
|
||||
if (responseJson.errCode === 0) {
|
||||
sendData(responseJson);
|
||||
} else {
|
||||
setErrMessage(responseJson.messageRu);
|
||||
setStage(10);
|
||||
}
|
||||
} catch (error) {
|
||||
console.error(error.toString());
|
||||
// Handle errors as needed
|
||||
setError(true);
|
||||
}
|
||||
};
|
||||
|
||||
const sendData = async (requestBody) => {
|
||||
try {
|
||||
const headers = {
|
||||
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({
|
||||
sign: requestBody.sign,
|
||||
where_works: recipientWorkPlace,
|
||||
position: recipientWorkPosition,
|
||||
mobile_phone: user.mobile_phone,
|
||||
name: borrowerData.name,
|
||||
surname: borrowerData.surname,
|
||||
lastname: borrowerData.lastname,
|
||||
}),
|
||||
}
|
||||
);
|
||||
|
||||
const jsonedResponse = await response.json();
|
||||
if (!cardDetails) {
|
||||
}
|
||||
|
||||
setAcceptedMessage(jsonedResponse.message);
|
||||
setIsLoading(false);
|
||||
|
||||
setStage(11);
|
||||
} catch (error) {
|
||||
console.error(error.toString());
|
||||
setError(true);
|
||||
}
|
||||
};
|
||||
|
||||
const sendCode = async () => {
|
||||
try {
|
||||
const response = await fetch('https://shahsyotag.halkbank.gov.tm/sendOTP', {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'aplication/json' },
|
||||
body: JSON.stringify({
|
||||
phone_number: user.mobile_phone,
|
||||
}),
|
||||
});
|
||||
const response = await fetch(
|
||||
"https://shahsyotag.halkbank.gov.tm/sendOTP",
|
||||
{
|
||||
method: "POST",
|
||||
headers: { "Content-Type": "aplication/json" },
|
||||
body: JSON.stringify({
|
||||
phone_number: user.mobile_phone,
|
||||
}),
|
||||
}
|
||||
);
|
||||
|
||||
if (!response.ok) {
|
||||
setError(true);
|
||||
|
|
@ -153,28 +260,32 @@ const AcceptStage = ({
|
|||
<section className="cs-1 err-section">
|
||||
<h1 className="cs-2-title">
|
||||
{errorMessage}
|
||||
{locale === 'TKM'
|
||||
? ' Bir zat ýalňyş ...'
|
||||
: locale === 'РУС'
|
||||
? ' Ошибка...'
|
||||
: locale === 'ENG'
|
||||
? 'Error...'
|
||||
: ' Bir zat ýalňyş ...'}
|
||||
{locale === "TKM"
|
||||
? " Bir zat ýalňyş ..."
|
||||
: locale === "РУС"
|
||||
? " Ошибка..."
|
||||
: locale === "ENG"
|
||||
? "Error..."
|
||||
: " Bir zat ýalňyş ..."}
|
||||
</h1>
|
||||
<br />
|
||||
<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>
|
||||
|
|
@ -186,13 +297,13 @@ const AcceptStage = ({
|
|||
return (
|
||||
<section className="loading">
|
||||
<h1 className="cs-2-title">
|
||||
{locale === 'TKM'
|
||||
? 'Garaşmagyňyzy haýyş edýäris ...'
|
||||
: locale === 'РУС'
|
||||
? 'Пожалуйста, подождите...'
|
||||
: locale === 'ENG'
|
||||
? 'Please wait...'
|
||||
: 'Garaşmagyňyzy haýyş edýäris ...'}
|
||||
{locale === "TKM"
|
||||
? "Garaşmagyňyzy haýyş edýäris ..."
|
||||
: locale === "РУС"
|
||||
? "Пожалуйста, подождите..."
|
||||
: locale === "ENG"
|
||||
? "Please wait..."
|
||||
: "Garaşmagyňyzy haýyş edýäris ..."}
|
||||
</h1>
|
||||
</section>
|
||||
);
|
||||
|
|
@ -202,50 +313,55 @@ const AcceptStage = ({
|
|||
<section className="imm-cs-1 cs-1">
|
||||
<form onSubmit={handleSubmit(onSubmit)}>
|
||||
<h2 className="cs-2-title">
|
||||
{locale === 'TKM'
|
||||
? 'Karzyň maglumatlaryny tassyklaň'
|
||||
: locale === 'РУС'
|
||||
? 'Подтвердите данные кредита'
|
||||
: locale === 'ENG'
|
||||
? 'Confirm the loan details'
|
||||
: 'Karzyň maglumatlaryny tassyklaň'}
|
||||
{locale === "TKM"
|
||||
? "Karzyň maglumatlaryny tassyklaň"
|
||||
: locale === "РУС"
|
||||
? "Подтвердите данные кредита"
|
||||
: locale === "ENG"
|
||||
? "Confirm the loan details"
|
||||
: "Karzyň maglumatlaryny tassyklaň"}
|
||||
</h2>
|
||||
<div className="imm-credit-form-wrapper">
|
||||
<div className="input-block">
|
||||
<label htmlFor="amount">
|
||||
{locale === 'TKM'
|
||||
? 'Karzyň möçberi'
|
||||
: locale === 'РУС'
|
||||
? 'Сумма кредита'
|
||||
: locale === 'ENG'
|
||||
? 'Amount of loan'
|
||||
: 'Karzyň möçberi'}
|
||||
{locale === "TKM"
|
||||
? "Karzyň möçberi"
|
||||
: locale === "РУС"
|
||||
? "Сумма кредита"
|
||||
: locale === "ENG"
|
||||
? "Amount of loan"
|
||||
: "Karzyň möçberi"}
|
||||
</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="duration">
|
||||
{locale === 'TKM'
|
||||
? 'Karzyň möhleti'
|
||||
: locale === 'РУС'
|
||||
? 'Срок кредита'
|
||||
: locale === 'ENG'
|
||||
? 'Term of loan'
|
||||
: 'Karzyň möhleti'}
|
||||
{locale === "TKM"
|
||||
? "Karzyň möhleti"
|
||||
: locale === "РУС"
|
||||
? "Срок кредита"
|
||||
: locale === "ENG"
|
||||
? "Term of loan"
|
||||
: "Karzyň möhleti"}
|
||||
</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'
|
||||
? 'Karz kartynyň hasabyny dolduryň'
|
||||
: locale === 'РУС'
|
||||
? 'Заполните счет кредитной карты'
|
||||
: locale === 'ENG'
|
||||
? 'Fill the credit card account number'
|
||||
: 'Karz kartynyň hasabyny dolduryň'}
|
||||
{locale === "TKM"
|
||||
? "Karz kartynyň hasabyny dolduryň"
|
||||
: locale === "РУС"
|
||||
? "Заполните счет кредитной карты"
|
||||
: locale === "ENG"
|
||||
? "Fill the credit card account number"
|
||||
: "Karz kartynyň hasabyny dolduryň"}
|
||||
</label>
|
||||
<input
|
||||
value={cardDetails}
|
||||
|
|
@ -255,31 +371,35 @@ const AcceptStage = ({
|
|||
placeholder="6435980023168745"
|
||||
/>
|
||||
<span className="another-option" onClick={() => setStage(12)}>
|
||||
{locale === 'TKM'
|
||||
? 'Kartyňyz ýok bolsa, täze karty üçin ýüz tutuň'
|
||||
: locale === 'РУС'
|
||||
? 'Оформите новую карту, если она у вас отсувствует'
|
||||
: locale === 'ENG'
|
||||
? 'Apply for a new card if you do not have one'
|
||||
: 'Kartyňyz ýok bolsa, täze karty üçin ýüz tutuň'}
|
||||
{locale === "TKM"
|
||||
? "Kartyňyz ýok bolsa, täze karty üçin ýüz tutuň"
|
||||
: locale === "РУС"
|
||||
? "Оформите новую карту, если она у вас отсувствует"
|
||||
: locale === "ENG"
|
||||
? "Apply for a new card if you do not have one"
|
||||
: "Kartyňyz ýok bolsa, täze karty üçin ýüz tutuň"}
|
||||
</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={() => 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>
|
||||
|
|
@ -289,16 +409,17 @@ const AcceptStage = ({
|
|||
disabled={cardDetails.length !== 23 && !isLoading ? true : false}
|
||||
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" />
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
import React, { useContext, useState } from 'react';
|
||||
import { LanguageContext } from '../../backend/LanguageContext';
|
||||
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';
|
||||
import { UserContext } from '../../backend/UserContext';
|
||||
import next from "../../icons/next.svg";
|
||||
import next_reverse from "../../icons/next-reverse.svg";
|
||||
import { UserContext } from "../../backend/UserContext";
|
||||
|
||||
const PaymentSuccess = ({
|
||||
setStage,
|
||||
|
|
@ -22,7 +22,7 @@ const PaymentSuccess = ({
|
|||
const { locale } = useContext(LanguageContext);
|
||||
const { user } = useContext(UserContext);
|
||||
|
||||
const [codeValue, setPhoneValue] = useState('');
|
||||
const [codeValue, setPhoneValue] = useState("");
|
||||
|
||||
const [isLoading, setIsLoading] = useState(false);
|
||||
const [error, setError] = useState(false);
|
||||
|
|
@ -34,15 +34,18 @@ const PaymentSuccess = ({
|
|||
const confirmCode = async () => {
|
||||
try {
|
||||
setIsLoading(true);
|
||||
const response = await fetch('https://shahsyotag.halkbank.gov.tm/validateOTP', {
|
||||
headers: { 'Content-Type': 'aplication/json' },
|
||||
method: 'POST',
|
||||
const response = await fetch(
|
||||
"https://shahsyotag.halkbank.gov.tm/validateOTP",
|
||||
{
|
||||
headers: { "Content-Type": "aplication/json" },
|
||||
method: "POST",
|
||||
|
||||
body: JSON.stringify({
|
||||
phone_number: user.mobile_phone,
|
||||
otp: codeValue,
|
||||
}),
|
||||
});
|
||||
body: JSON.stringify({
|
||||
phone_number: user.mobile_phone,
|
||||
otp: codeValue,
|
||||
}),
|
||||
}
|
||||
);
|
||||
|
||||
if (!response.ok) {
|
||||
throw new Error(`HTTP error! Status: ${response.status}`);
|
||||
|
|
@ -50,7 +53,7 @@ const PaymentSuccess = ({
|
|||
|
||||
const jsonedResponse = await response.json();
|
||||
|
||||
if (jsonedResponse === 'OTP validated successfully') {
|
||||
if (jsonedResponse === "OTP validated successfully") {
|
||||
fetchData();
|
||||
setIsLoading(false);
|
||||
}
|
||||
|
|
@ -62,9 +65,9 @@ const PaymentSuccess = ({
|
|||
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: {
|
||||
|
|
@ -75,7 +78,7 @@ const PaymentSuccess = ({
|
|||
surname: borrowerData.surname,
|
||||
lastname: borrowerData.lastname,
|
||||
availableAmount: borrowerData.availableAmount,
|
||||
clientType: 'recipient',
|
||||
clientType: "recipient",
|
||||
signRecipient: borrowerData.signRecipient,
|
||||
expDate: borrowerData.expDate,
|
||||
},
|
||||
|
|
@ -88,17 +91,17 @@ const PaymentSuccess = ({
|
|||
surname: guaranterData.surname,
|
||||
lastname: guaranterData.lastname,
|
||||
availableAmount: guaranterData.availableAmount,
|
||||
clientType: 'guarantor',
|
||||
clientType: "guarantor",
|
||||
signGuarantor: guaranterData.signGuarantor,
|
||||
expDate: guaranterData.expDate,
|
||||
}
|
||||
: null,
|
||||
availableAmount: recepientAmount,
|
||||
creditCardAccountNumber: cardDetails ? cardDetails : '',
|
||||
creditCardAccountNumber: cardDetails ? cardDetails : "",
|
||||
mrtIsInsuarance: isGuranter ? 0 : 1,
|
||||
termInYears: creditDuration,
|
||||
}),
|
||||
},
|
||||
}
|
||||
);
|
||||
|
||||
if (!response.ok) {
|
||||
|
|
@ -124,21 +127,21 @@ const PaymentSuccess = ({
|
|||
};
|
||||
|
||||
const onSubmit = (data) => {
|
||||
confirmCode();
|
||||
fetchData();
|
||||
};
|
||||
|
||||
if (isLoading) {
|
||||
return (
|
||||
<section className="loading">
|
||||
<h1 className="cs-2-title">
|
||||
{' '}
|
||||
{locale === 'TKM'
|
||||
? 'Garaşmagyňyzy haýyş edýäris ...'
|
||||
: locale === 'РУС'
|
||||
? 'Пожалуйста, подождите...'
|
||||
: locale === 'ENG'
|
||||
? 'Please wait...'
|
||||
: 'Garaşmagyňyzy haýyş edýäris ...'}
|
||||
{" "}
|
||||
{locale === "TKM"
|
||||
? "Garaşmagyňyzy haýyş edýäris ..."
|
||||
: locale === "РУС"
|
||||
? "Пожалуйста, подождите..."
|
||||
: locale === "ENG"
|
||||
? "Please wait..."
|
||||
: "Garaşmagyňyzy haýyş edýäris ..."}
|
||||
</h1>
|
||||
</section>
|
||||
);
|
||||
|
|
@ -148,35 +151,40 @@ const PaymentSuccess = ({
|
|||
<section className="imm-cs-1 cs-1">
|
||||
<form>
|
||||
<h2 className="succes-title">
|
||||
{locale === 'TKM'
|
||||
? 'Karz karty açmak üçin tölegiňiz üstünlikli geçdi we arzaňyz kabul edildi '
|
||||
: locale === 'РУС'
|
||||
? 'Оплата прошла успешно, заявка на оформление кредитной карты принята.'
|
||||
: locale === 'ENG'
|
||||
? 'To complete the application for a Digital loan, enter the SMS code sent to the number'
|
||||
: 'Karz karty açmak üçin tölegiňiz üstünlikli geçdi we arzaňyz kabul edildi '}
|
||||
{locale === "TKM"
|
||||
? "Karz karty açmak üçin tölegiňiz üstünlikli geçdi we arzaňyz kabul edildi "
|
||||
: locale === "РУС"
|
||||
? "Оплата прошла успешно, заявка на оформление кредитной карты принята."
|
||||
: locale === "ENG"
|
||||
? "To complete the application for a Digital loan, enter the SMS code sent to the number"
|
||||
: "Karz karty açmak üçin tölegiňiz üstünlikli geçdi we arzaňyz kabul edildi "}
|
||||
</h2>
|
||||
<h3 className="succes-sub-title">
|
||||
{locale === 'TKM'
|
||||
? 'Sanly karz ýüz tutmaňyzy doly tamamlamak üçin siziň telefon belgiňize gelen SMS kody giriziň'
|
||||
: locale === 'РУС'
|
||||
? 'Для завершения оформления заявки на получение быстрого кредита введите СМС код, отправленный на номер …..'
|
||||
: locale === 'ENG'
|
||||
? 'To complete the application for a Digital loan, enter the SMS code sent to the number'
|
||||
: 'Sanly karz ýüz tutmaňyzy doly tamamlamak üçin siziň telefon belgiňize gelen SMS kody giriziň'}
|
||||
{locale === "TKM"
|
||||
? "Sanly karz ýüz tutmaňyzy doly tamamlamak üçin siziň telefon belgiňize gelen SMS kody giriziň"
|
||||
: locale === "РУС"
|
||||
? "Для завершения оформления заявки на получение быстрого кредита введите СМС код, отправленный на номер ….."
|
||||
: locale === "ENG"
|
||||
? "To complete the application for a Digital loan, enter the SMS code sent to the number"
|
||||
: "Sanly karz ýüz tutmaňyzy doly tamamlamak üçin siziň telefon belgiňize gelen SMS kody giriziň"}
|
||||
</h3>
|
||||
<div className="imm-credit-form-wrapper">
|
||||
<div className="input-block">
|
||||
<label htmlFor="code">
|
||||
{locale === 'TKM'
|
||||
? 'Kod'
|
||||
: locale === 'РУС'
|
||||
? 'Код'
|
||||
: locale === 'ENG'
|
||||
? 'Code'
|
||||
: 'Kod'}
|
||||
{locale === "TKM"
|
||||
? "Kod"
|
||||
: locale === "РУС"
|
||||
? "Код"
|
||||
: locale === "ENG"
|
||||
? "Code"
|
||||
: "Kod"}
|
||||
</label>
|
||||
<input value={codeValue} onChange={handleCodeChange} type="text" id="code" />
|
||||
<input
|
||||
value={codeValue}
|
||||
onChange={handleCodeChange}
|
||||
type="text"
|
||||
id="code"
|
||||
/>
|
||||
{/* <span className="another-option" onClick={codeResend}>
|
||||
Отправить код снова
|
||||
</span> */}
|
||||
|
|
@ -184,19 +192,23 @@ const PaymentSuccess = ({
|
|||
</div>
|
||||
</div>
|
||||
<div className="cu-bottom cd-2-title">
|
||||
<button type="button" className="sign-btn reg-btn" onClick={() => setStage(14)}>
|
||||
<button
|
||||
type="button"
|
||||
className="sign-btn reg-btn"
|
||||
onClick={() => setStage(14)}
|
||||
>
|
||||
<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>
|
||||
|
|
@ -204,16 +216,17 @@ const PaymentSuccess = ({
|
|||
disabled={codeValue.length !== 6 && !isLoading ? true : false}
|
||||
type="submit"
|
||||
onClick={onSubmit}
|
||||
className="sign-btn cu-btn">
|
||||
className="sign-btn cu-btn"
|
||||
>
|
||||
<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" />
|
||||
|
|
|
|||
|
|
@ -1,13 +1,13 @@
|
|||
// IMPORT MODULES
|
||||
import React, { useState, useContext, useEffect } from 'react';
|
||||
import { LanguageContext } from '../../backend/LanguageContext';
|
||||
import { useForm } from 'react-hook-form';
|
||||
import { z } from 'zod';
|
||||
import { zodResolver } from '@hookform/resolvers/zod';
|
||||
import React, { useState, useContext, useEffect } from "react";
|
||||
import { LanguageContext } from "../../backend/LanguageContext";
|
||||
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 { UserContext } from '../../backend/UserContext';
|
||||
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({
|
||||
|
|
@ -33,7 +33,7 @@ const PhoneAccept = ({
|
|||
}) => {
|
||||
const { locale } = useContext(LanguageContext);
|
||||
const { user } = useContext(UserContext);
|
||||
const userToken = localStorage.getItem('userToken');
|
||||
const userToken = localStorage.getItem("userToken");
|
||||
|
||||
const [isLoading, setIsLoading] = useState(false);
|
||||
const [error, setError] = useState(false);
|
||||
|
|
@ -41,7 +41,7 @@ const PhoneAccept = ({
|
|||
const [invalidData, setInvalidData] = useState(false);
|
||||
const [tryAgain, setTryAgain] = useState(false);
|
||||
|
||||
const [codeValue, setPhoneValue] = useState('');
|
||||
const [codeValue, setPhoneValue] = useState("");
|
||||
|
||||
const [errMessage, setErrMessage] = useState();
|
||||
|
||||
|
|
@ -61,23 +61,26 @@ const PhoneAccept = ({
|
|||
const confirmPayment = async () => {
|
||||
try {
|
||||
const headers = {
|
||||
'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8',
|
||||
"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('md-order', paymentDetails['md-order']);
|
||||
formData.append('acs-req-id', submitCardDetails['acs-request-id']);
|
||||
formData.append('acs-session-url', submitCardDetails['acs-session-url']);
|
||||
formData.append('otp', codeValue);
|
||||
formData.append('term-url', submitCardDetails['terminate-url']);
|
||||
formData.append("app", "sanlykarz");
|
||||
formData.append("id", borrowerData.idNo);
|
||||
formData.append("md-order", paymentDetails["md-order"]);
|
||||
formData.append("acs-req-id", submitCardDetails["acs-request-id"]);
|
||||
formData.append("acs-session-url", submitCardDetails["acs-session-url"]);
|
||||
formData.append("otp", codeValue);
|
||||
formData.append("term-url", submitCardDetails["terminate-url"]);
|
||||
|
||||
const response = await fetch('https://shahsyotag.halkbank.gov.tm/api/v1/confirm-payment', {
|
||||
method: 'POST',
|
||||
headers: headers,
|
||||
body: formData.toString(),
|
||||
});
|
||||
const response = await fetch(
|
||||
"https://shahsyotag.halkbank.gov.tm/api/v1/confirm-payment",
|
||||
{
|
||||
method: "POST",
|
||||
headers: headers,
|
||||
body: formData.toString(),
|
||||
}
|
||||
);
|
||||
|
||||
const jsonedResponse = await response.json();
|
||||
|
||||
|
|
@ -85,13 +88,16 @@ const PhoneAccept = ({
|
|||
throw new Error(`HTTP error! Status: ${response.status}`);
|
||||
}
|
||||
|
||||
if (jsonedResponse.status === 'ok' && jsonedResponse['final-url'].includes('status=1')) {
|
||||
console.log(jsonedResponse['final-url']);
|
||||
if (
|
||||
jsonedResponse.status === "ok" &&
|
||||
jsonedResponse["final-url"].includes("status=1")
|
||||
) {
|
||||
console.log(jsonedResponse["final-url"]);
|
||||
setInvalidData(false);
|
||||
checkPayment();
|
||||
} else if (
|
||||
jsonedResponse.status === 'wrong-otp' ||
|
||||
!jsonedResponse['final-url'].includes('status=1')
|
||||
jsonedResponse.status === "wrong-otp" ||
|
||||
!jsonedResponse["final-url"].includes("status=1")
|
||||
) {
|
||||
setTryAgain(true);
|
||||
} else {
|
||||
|
|
@ -103,7 +109,7 @@ const PhoneAccept = ({
|
|||
const checkPayment = async () => {
|
||||
try {
|
||||
const response = await fetch(
|
||||
`https://shahsyotag.halkbank.gov.tm/app/api/check-payment-credit-card?paymentId=${paymentLink.id}&orderId=${paymentDetails['md-order']}&status=1`,
|
||||
`https://shahsyotag.halkbank.gov.tm/app/api/check-payment-credit-card?paymentId=${paymentLink.id}&orderId=${paymentDetails["md-order"]}&status=1`
|
||||
);
|
||||
|
||||
if (!response.ok) {
|
||||
|
|
@ -112,8 +118,8 @@ const PhoneAccept = ({
|
|||
|
||||
const jsonedResponse = await response.json();
|
||||
|
||||
if (jsonedResponse.status.ErrorCode === '0') {
|
||||
console.log('success');
|
||||
if (jsonedResponse.status.ErrorCode === "0") {
|
||||
console.log("success");
|
||||
loanCreateCheck();
|
||||
}
|
||||
} catch (error) {
|
||||
|
|
@ -124,12 +130,12 @@ const PhoneAccept = ({
|
|||
const loanCreateCheck = async () => {
|
||||
try {
|
||||
const response = await fetch(
|
||||
'https://shahsyotag.halkbank.gov.tm/onlineloancre-services/api/loancre/check',
|
||||
"https://shahsyotag.halkbank.gov.tm/onlineloancre-services/api/loancre/check",
|
||||
{
|
||||
method: 'POST',
|
||||
method: "POST",
|
||||
headers: {
|
||||
Accept: 'application/json, text/plain',
|
||||
'Content-Type': 'application/json;charset=UTF-8',
|
||||
Accept: "application/json, text/plain",
|
||||
"Content-Type": "application/json;charset=UTF-8",
|
||||
},
|
||||
body: JSON.stringify({
|
||||
clientRecipient: {
|
||||
|
|
@ -140,7 +146,7 @@ const PhoneAccept = ({
|
|||
surname: borrowerData.surname,
|
||||
lastname: borrowerData.lastname,
|
||||
availableAmount: borrowerData.availableAmount,
|
||||
clientType: 'recipient',
|
||||
clientType: "recipient",
|
||||
signRecipient: borrowerData.signRecipient,
|
||||
expDate: borrowerData.expDate,
|
||||
},
|
||||
|
|
@ -153,7 +159,7 @@ const PhoneAccept = ({
|
|||
surname: guaranterData.surname,
|
||||
lastname: guaranterData.lastname,
|
||||
availableAmount: guaranterData.availableAmount,
|
||||
clientType: 'guarantor',
|
||||
clientType: "guarantor",
|
||||
signGuarantor: guaranterData.signGuarantor,
|
||||
expDate: guaranterData.expDate,
|
||||
}
|
||||
|
|
@ -163,7 +169,7 @@ const PhoneAccept = ({
|
|||
mrtIsInsuarance: isGuranter ? 0 : 1,
|
||||
termInYears: creditDuration,
|
||||
}),
|
||||
},
|
||||
}
|
||||
);
|
||||
|
||||
if (!response.ok) {
|
||||
|
|
@ -174,6 +180,7 @@ const PhoneAccept = ({
|
|||
|
||||
if (jsonedResponse.errCode === 0) {
|
||||
// sendCode();
|
||||
setStage(15);
|
||||
} else {
|
||||
setStage(10);
|
||||
}
|
||||
|
|
@ -182,13 +189,16 @@ const PhoneAccept = ({
|
|||
|
||||
const sendCode = async () => {
|
||||
try {
|
||||
const response = await fetch('https://shahsyotag.halkbank.gov.tm/sendOTP', {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'aplication/json' },
|
||||
body: JSON.stringify({
|
||||
phone_number: user.mobile_phone,
|
||||
}),
|
||||
});
|
||||
const response = await fetch(
|
||||
"https://shahsyotag.halkbank.gov.tm/sendOTP",
|
||||
{
|
||||
method: "POST",
|
||||
headers: { "Content-Type": "aplication/json" },
|
||||
body: JSON.stringify({
|
||||
phone_number: user.mobile_phone,
|
||||
}),
|
||||
}
|
||||
);
|
||||
|
||||
if (!response.ok) {
|
||||
setErrMessage(response.status);
|
||||
|
|
@ -207,19 +217,22 @@ const PhoneAccept = ({
|
|||
const confirmCode = async () => {
|
||||
try {
|
||||
setIsLoading(true);
|
||||
const response = await fetch('https://shahsyotag.halkbank.gov.tm/validateOTP', {
|
||||
headers: { 'Content-Type': 'aplication/json' },
|
||||
method: 'POST',
|
||||
const response = await fetch(
|
||||
"https://shahsyotag.halkbank.gov.tm/validateOTP",
|
||||
{
|
||||
headers: { "Content-Type": "aplication/json" },
|
||||
method: "POST",
|
||||
|
||||
body: JSON.stringify({
|
||||
phone_number: user.mobile_phone,
|
||||
otp: codeValue,
|
||||
}),
|
||||
});
|
||||
body: JSON.stringify({
|
||||
phone_number: user.mobile_phone,
|
||||
otp: codeValue,
|
||||
}),
|
||||
}
|
||||
);
|
||||
|
||||
const jsonedResponse = await response.json();
|
||||
|
||||
if (jsonedResponse === 'OTP validated successfully') {
|
||||
if (jsonedResponse === "OTP validated successfully") {
|
||||
loanCreate();
|
||||
} else {
|
||||
setErrMessage(true);
|
||||
|
|
@ -232,9 +245,9 @@ const PhoneAccept = ({
|
|||
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: {
|
||||
|
|
@ -245,7 +258,7 @@ const PhoneAccept = ({
|
|||
surname: borrowerData.surname,
|
||||
lastname: borrowerData.lastname,
|
||||
availableAmount: borrowerData.availableAmount,
|
||||
clientType: 'recipient',
|
||||
clientType: "recipient",
|
||||
signRecipient: borrowerData.signRecipient,
|
||||
expDate: borrowerData.expDate,
|
||||
},
|
||||
|
|
@ -258,7 +271,7 @@ const PhoneAccept = ({
|
|||
surname: guaranterData.surname,
|
||||
lastname: guaranterData.lastname,
|
||||
availableAmount: guaranterData.availableAmount,
|
||||
clientType: 'guarantor',
|
||||
clientType: "guarantor",
|
||||
signGuarantor: guaranterData.signGuarantor,
|
||||
expDate: guaranterData.expDate,
|
||||
}
|
||||
|
|
@ -268,7 +281,7 @@ const PhoneAccept = ({
|
|||
mrtIsInsuarance: isGuranter ? 0 : 1,
|
||||
termInYears: creditDuration,
|
||||
}),
|
||||
},
|
||||
}
|
||||
);
|
||||
|
||||
if (!response.ok) {
|
||||
|
|
@ -293,23 +306,26 @@ const PhoneAccept = ({
|
|||
const sendData = async (requestBody) => {
|
||||
try {
|
||||
const headers = {
|
||||
Accept: 'application/json',
|
||||
'Content-Type': '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({
|
||||
sign: requestBody.sign,
|
||||
where_works: recipientWorkPlace,
|
||||
position: recipientWorkPosition,
|
||||
mobile_phone: user.mobile_phone,
|
||||
name: borrowerData.name,
|
||||
surname: borrowerData.surname,
|
||||
lastname: borrowerData.lastname,
|
||||
}),
|
||||
});
|
||||
const response = await fetch(
|
||||
"https://shahsyotag.halkbank.gov.tm/app/api/quick_loans",
|
||||
{
|
||||
method: "POST",
|
||||
headers: headers,
|
||||
body: JSON.stringify({
|
||||
sign: requestBody.sign,
|
||||
where_works: recipientWorkPlace,
|
||||
position: recipientWorkPosition,
|
||||
mobile_phone: user.mobile_phone,
|
||||
name: borrowerData.name,
|
||||
surname: borrowerData.surname,
|
||||
lastname: borrowerData.lastname,
|
||||
}),
|
||||
}
|
||||
);
|
||||
|
||||
const jsonedResponse = await response.json();
|
||||
if (!cardDetails) {
|
||||
|
|
@ -327,13 +343,16 @@ const PhoneAccept = ({
|
|||
|
||||
const codeResend = async () => {
|
||||
try {
|
||||
const response = await fetch('https://shahsyotag.halkbank.gov.tm/sendOTP', {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'aplication/json' },
|
||||
body: JSON.stringify({
|
||||
phone_number: user.mobile_phone,
|
||||
}),
|
||||
});
|
||||
const response = await fetch(
|
||||
"https://shahsyotag.halkbank.gov.tm/sendOTP",
|
||||
{
|
||||
method: "POST",
|
||||
headers: { "Content-Type": "aplication/json" },
|
||||
body: JSON.stringify({
|
||||
phone_number: user.mobile_phone,
|
||||
}),
|
||||
}
|
||||
);
|
||||
|
||||
if (!response.ok) {
|
||||
setError(true);
|
||||
|
|
@ -379,13 +398,13 @@ const PhoneAccept = ({
|
|||
return (
|
||||
<section className="loading">
|
||||
<h1 className="cs-2-title">
|
||||
{locale === 'TKM'
|
||||
? 'Garaşmagyňyzy haýyş edýäris ...'
|
||||
: locale === 'РУС'
|
||||
? 'Пожалуйста, подождите...'
|
||||
: locale === 'ENG'
|
||||
? 'Please wait...'
|
||||
: 'Garaşmagyňyzy haýyş edýäris ...'}
|
||||
{locale === "TKM"
|
||||
? "Garaşmagyňyzy haýyş edýäris ..."
|
||||
: locale === "РУС"
|
||||
? "Пожалуйста, подождите..."
|
||||
: locale === "ENG"
|
||||
? "Please wait..."
|
||||
: "Garaşmagyňyzy haýyş edýäris ..."}
|
||||
</h1>
|
||||
</section>
|
||||
);
|
||||
|
|
@ -396,28 +415,32 @@ const PhoneAccept = ({
|
|||
<section className="cs-1 err-section">
|
||||
<h1 className="cs-2-title">
|
||||
{errMessage}
|
||||
{locale === 'TKM'
|
||||
? 'Bir zat ýalňyş ...'
|
||||
: locale === 'РУС'
|
||||
? ' Ошибка...'
|
||||
: locale === 'ENG'
|
||||
? ' Error...'
|
||||
: ' Bir zat ýalňyş ...'}
|
||||
{locale === "TKM"
|
||||
? "Bir zat ýalňyş ..."
|
||||
: locale === "РУС"
|
||||
? " Ошибка..."
|
||||
: locale === "ENG"
|
||||
? " Error..."
|
||||
: " Bir zat ýalňyş ..."}
|
||||
</h1>
|
||||
<br />
|
||||
<button type="button" className="sign-btn reg-btn" onClick={() => setStage(8)}>
|
||||
<button
|
||||
type="button"
|
||||
className="sign-btn reg-btn"
|
||||
onClick={() => setStage(8)}
|
||||
>
|
||||
<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>
|
||||
|
|
@ -429,39 +452,53 @@ const PhoneAccept = ({
|
|||
<section className="imm-cs-1 cs-1">
|
||||
<form onSubmit={handleSubmit(onSubmit)}>
|
||||
<h2 className="cs-2-title">
|
||||
{locale === 'TKM'
|
||||
{locale === "TKM"
|
||||
? `${
|
||||
cardDetails ? user.mobile_phone : submitCardDetails['three-d-secure-number']
|
||||
cardDetails
|
||||
? user.mobile_phone
|
||||
: submitCardDetails["three-d-secure-number"]
|
||||
} Karz ýüzlenmäni tassyklamak üçin belgä iberilen SMS duýduryş koduny giriziň`
|
||||
: locale === 'РУС'
|
||||
: locale === "РУС"
|
||||
? `Для подтверждения кредитной заявки, введите код с СМС оповещения, отправленный на номер ${
|
||||
cardDetails ? user.mobile_phone : submitCardDetails['three-d-secure-number']
|
||||
cardDetails
|
||||
? user.mobile_phone
|
||||
: submitCardDetails["three-d-secure-number"]
|
||||
}`
|
||||
: locale === 'ENG'
|
||||
: locale === "ENG"
|
||||
? `To confirm the loan application enter the SMS alert code sent to the number ${
|
||||
cardDetails ? user.mobile_phone : submitCardDetails['three-d-secure-number']
|
||||
cardDetails
|
||||
? user.mobile_phone
|
||||
: submitCardDetails["three-d-secure-number"]
|
||||
}`
|
||||
: `${
|
||||
cardDetails ? user.mobile_phone : submitCardDetails['three-d-secure-number']
|
||||
cardDetails
|
||||
? user.mobile_phone
|
||||
: submitCardDetails["three-d-secure-number"]
|
||||
} Karz ýüzlenmäni tassyklamak üçin belgä iberilen SMS duýduryş koduny giriziň`}
|
||||
</h2>
|
||||
<div className="imm-credit-form-wrapper">
|
||||
<div className="input-block">
|
||||
<label htmlFor="code">
|
||||
{locale === 'TKM'
|
||||
? 'Kod'
|
||||
: locale === 'РУС'
|
||||
? 'Код'
|
||||
: locale === 'ENG'
|
||||
? 'Code'
|
||||
: 'Kod'}
|
||||
{locale === "TKM"
|
||||
? "Kod"
|
||||
: locale === "РУС"
|
||||
? "Код"
|
||||
: locale === "ENG"
|
||||
? "Code"
|
||||
: "Kod"}
|
||||
</label>
|
||||
<input value={codeValue} onChange={handleCodeChange} type="text" id="code" />
|
||||
<input
|
||||
value={codeValue}
|
||||
onChange={handleCodeChange}
|
||||
type="text"
|
||||
id="code"
|
||||
/>
|
||||
<button
|
||||
type="button"
|
||||
disabled={messageSend}
|
||||
className="another-option"
|
||||
onClick={codeResend}>
|
||||
onClick={codeResend}
|
||||
>
|
||||
Отправить код снова
|
||||
</button>
|
||||
{messageSend && <p>Time left: {timeLeft} seconds</p>}
|
||||
|
|
@ -471,27 +508,27 @@ const PhoneAccept = ({
|
|||
{invalidData && (
|
||||
<section className=" cs-1">
|
||||
<h1 className="cs-2-title">
|
||||
{locale === 'TKM'
|
||||
? 'Ýalňyş, maglumatlary barlaň'
|
||||
: locale === 'РУС'
|
||||
? 'Ошибка, проверьте данные'
|
||||
: locale === 'ENG'
|
||||
? 'Error, check data'
|
||||
: 'Ýalňyş, maglumatlary barlaň'}
|
||||
{locale === "TKM"
|
||||
? "Ýalňyş, maglumatlary barlaň"
|
||||
: locale === "РУС"
|
||||
? "Ошибка, проверьте данные"
|
||||
: locale === "ENG"
|
||||
? "Error, check data"
|
||||
: "Ýalňyş, maglumatlary barlaň"}
|
||||
</h1>
|
||||
</section>
|
||||
)}
|
||||
{tryAgain && (
|
||||
<section className="imm-cs-1 cs-1">
|
||||
<h1 className="cs-2-title">
|
||||
{' '}
|
||||
{locale === 'TKM'
|
||||
? 'Gaýtadan iberip görüň'
|
||||
: locale === 'РУС'
|
||||
? 'Попробуйте отправить снова'
|
||||
: locale === 'ENG'
|
||||
? 'Try sending again'
|
||||
: 'Gaýtadan iberip görüň'}
|
||||
{" "}
|
||||
{locale === "TKM"
|
||||
? "Gaýtadan iberip görüň"
|
||||
: locale === "РУС"
|
||||
? "Попробуйте отправить снова"
|
||||
: locale === "ENG"
|
||||
? "Try sending again"
|
||||
: "Gaýtadan iberip görüň"}
|
||||
</h1>
|
||||
</section>
|
||||
)}
|
||||
|
|
@ -499,19 +536,20 @@ const PhoneAccept = ({
|
|||
<button
|
||||
type="submit"
|
||||
className="sign-btn reg-btn"
|
||||
onClick={() => (cardDetails ? setStage(8) : setStage(13))}>
|
||||
onClick={() => (cardDetails ? setStage(8) : setStage(13))}
|
||||
>
|
||||
<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>
|
||||
|
|
@ -527,16 +565,17 @@ const PhoneAccept = ({
|
|||
}
|
||||
type="submit"
|
||||
onClick={onSubmit}
|
||||
className="sign-btn cu-btn">
|
||||
className="sign-btn cu-btn"
|
||||
>
|
||||
<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" />
|
||||
|
|
|
|||
|
|
@ -1,35 +1,35 @@
|
|||
// 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 FinalStage from '../ImmediateCreditsStages/FinalStage';
|
||||
import { UserContext } from '../../backend/UserContext';
|
||||
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 FinalStage from "../ImmediateCreditsStages/FinalStage";
|
||||
import { UserContext } from "../../backend/UserContext";
|
||||
|
||||
const ImmediateCreditModal = ({
|
||||
modalOpen,
|
||||
|
|
@ -50,13 +50,13 @@ const ImmediateCreditModal = ({
|
|||
const [loading, setLoading] = useState();
|
||||
const [error, setError] = useState();
|
||||
|
||||
const [errMessage, setErrMessage] = useState('');
|
||||
const [errMessageEn, setErrMessageEn] = useState('');
|
||||
const [errMessageTkm, setErrMessageTkm] = useState('');
|
||||
const [errMessage, setErrMessage] = useState("");
|
||||
const [errMessageEn, setErrMessageEn] = useState("");
|
||||
const [errMessageTkm, setErrMessageTkm] = useState("");
|
||||
|
||||
const [acceptedMessage, setAcceptedMessage] = useState('');
|
||||
const [acceptedMessageEn, setAcceptedMessageEn] = useState('');
|
||||
const [acceptedMessageTkm, setAcceptedMessageTkm] = useState('');
|
||||
const [acceptedMessage, setAcceptedMessage] = useState("");
|
||||
const [acceptedMessageEn, setAcceptedMessageEn] = useState("");
|
||||
const [acceptedMessageTkm, setAcceptedMessageTkm] = useState("");
|
||||
|
||||
const [borrowerData, setBorrowerData] = useState();
|
||||
const [guaranterData, setGuaranterData] = useState();
|
||||
|
|
@ -66,39 +66,42 @@ const ImmediateCreditModal = ({
|
|||
const [maxAmount, setMaxAmount] = useState();
|
||||
const [recepientAmount, setRecepientAmount] = useState(0);
|
||||
const [creditDuration, setCreditDuration] = useState(0);
|
||||
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();
|
||||
|
||||
const [recipientWorkPlace, setRecipientWorkPlace] = useState('');
|
||||
const [recipientWorkPosition, setRecipientWorkPosition] = useState('');
|
||||
const [recipientWorkPlace, setRecipientWorkPlace] = useState("");
|
||||
const [recipientWorkPosition, setRecipientWorkPosition] = useState("");
|
||||
|
||||
const [invalidData, setInvalidData] = useState(false);
|
||||
|
||||
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'
|
||||
? 'Sanly karz almak üçin onlaýn-ýüzlenme'
|
||||
: locale === 'ENG'
|
||||
? 'Online aplication for digital loan'
|
||||
: 'Онлайн-заявка для получения цифрового кредита'}
|
||||
{locale === "TKM"
|
||||
? "Sanly karz almak üçin onlaýn-ýüzlenme"
|
||||
: locale === "ENG"
|
||||
? "Online aplication for digital loan"
|
||||
: "Онлайн-заявка для получения цифрового кредита"}
|
||||
</h2>
|
||||
<button
|
||||
type="button"
|
||||
className="exit-btn"
|
||||
onClick={() => {
|
||||
setModalOpen(false);
|
||||
}}>
|
||||
}}
|
||||
>
|
||||
<div>
|
||||
<img src={exit} alt="exit" />
|
||||
</div>
|
||||
|
|
@ -109,136 +112,148 @@ const ImmediateCreditModal = ({
|
|||
<div className="icon-block active">
|
||||
<Img4 className="modal-icon" />
|
||||
<h3 className="icon-title">
|
||||
{locale === 'TKM'
|
||||
? 'Maglumatlary dolduryň'
|
||||
: locale === 'РУС'
|
||||
? 'Заполните данные'
|
||||
: locale === 'ENG'
|
||||
? 'Fill in the details'
|
||||
: 'Maglumatlary dolduryň'}
|
||||
{locale === "TKM"
|
||||
? "Maglumatlary dolduryň"
|
||||
: locale === "РУС"
|
||||
? "Заполните данные"
|
||||
: locale === "ENG"
|
||||
? "Fill in the details"
|
||||
: "Maglumatlary dolduryň"}
|
||||
</h3>
|
||||
</div>
|
||||
|
||||
<div className={stage > 1 ? 'line-block active' : 'line-block'}>
|
||||
<div className={stage > 1 ? "line-block active" : "line-block"}>
|
||||
<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 maglumatlaryňyzy tassyklaň'
|
||||
: locale === 'РУС'
|
||||
? 'Подтвердите личные данные'
|
||||
: locale === 'ENG'
|
||||
? 'Confirm your Personal data'
|
||||
: 'Şahsy maglumatlaryňyzy tassyklaň'}
|
||||
{locale === "TKM"
|
||||
? "Şahsy maglumatlaryňyzy tassyklaň"
|
||||
: locale === "РУС"
|
||||
? "Подтвердите личные данные"
|
||||
: locale === "ENG"
|
||||
? "Confirm your Personal data"
|
||||
: "Şahsy maglumatlaryňyzy tassyklaň"}
|
||||
</h3>
|
||||
</div>
|
||||
|
||||
<div className={stage > 1 ? 'line-block active' : 'line-block'}>
|
||||
<div className={stage > 1 ? "line-block active" : "line-block"}>
|
||||
<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'
|
||||
? 'Zamunçynyň maglumatlaryny dolduryň'
|
||||
: locale === 'РУС'
|
||||
? 'Заполните данные поручителя'
|
||||
: locale === 'ENG'
|
||||
{locale === "TKM"
|
||||
? "Zamunçynyň maglumatlaryny dolduryň"
|
||||
: locale === "РУС"
|
||||
? "Заполните данные поручителя"
|
||||
: locale === "ENG"
|
||||
? "Fill in the guarantor's details"
|
||||
: 'Zamunçynyň maglumatlaryny dolduryň'}
|
||||
: "Zamunçynyň maglumatlaryny dolduryň"}
|
||||
</h3>
|
||||
</div>
|
||||
|
||||
<div className={stage > 3 ? 'line-block active' : 'line-block'}>
|
||||
<div
|
||||
className={stage > 3 ? "line-block active" : "line-block"}
|
||||
>
|
||||
<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'
|
||||
? 'Zamunçynyň maglumatlaryny tassyklaň'
|
||||
: locale === 'РУС'
|
||||
? 'Подтвердите данные поручителя'
|
||||
: locale === 'ENG'
|
||||
{locale === "TKM"
|
||||
? "Zamunçynyň maglumatlaryny tassyklaň"
|
||||
: locale === "РУС"
|
||||
? "Подтвердите данные поручителя"
|
||||
: locale === "ENG"
|
||||
? "Confirm the guarantor's details"
|
||||
: 'Zamunçynyň maglumatlaryny tassyklaň'}
|
||||
: "Zamunçynyň maglumatlaryny tassyklaň"}
|
||||
</h3>
|
||||
</div>
|
||||
|
||||
<div className={stage > 3 ? 'line-block active' : 'line-block'}>
|
||||
<div
|
||||
className={stage > 3 ? "line-block active" : "line-block"}
|
||||
>
|
||||
<Lines className="lines" />
|
||||
</div>
|
||||
|
||||
<div className={stage > 8 ? 'icon-block active' : 'icon-block'}>
|
||||
<div
|
||||
className={stage > 8 ? "icon-block active" : "icon-block"}
|
||||
>
|
||||
<Img5 className="modal-icon" />
|
||||
<h3 className="icon-title">
|
||||
{locale === 'TKM'
|
||||
? 'Karz ýüzlenmesini tassyklaň'
|
||||
: locale === 'РУС'
|
||||
? 'Подтвердите кредитную заявку'
|
||||
: locale === 'ENG'
|
||||
? 'Confirm your loan application'
|
||||
: 'Karz ýüzlenmesini tassyklaň'}
|
||||
{locale === "TKM"
|
||||
? "Karz ýüzlenmesini tassyklaň"
|
||||
: locale === "РУС"
|
||||
? "Подтвердите кредитную заявку"
|
||||
: locale === "ENG"
|
||||
? "Confirm your loan application"
|
||||
: "Karz ýüzlenmesini tassyklaň"}
|
||||
</h3>
|
||||
</div>
|
||||
|
||||
<div className={stage > 8 ? 'line-block active' : 'line-block'}>
|
||||
<div
|
||||
className={stage > 8 ? "line-block active" : "line-block"}
|
||||
>
|
||||
<Lines className="lines" />
|
||||
</div>
|
||||
</>
|
||||
)}
|
||||
|
||||
<div className={stage > 6 ? 'icon-block active' : 'icon-block'}>
|
||||
<div className={stage > 6 ? "icon-block active" : "icon-block"}>
|
||||
<Img2 className="modal-icon" />
|
||||
<h3 className="icon-title">
|
||||
{locale === 'TKM'
|
||||
? 'Karz kalkulýatory'
|
||||
: locale === 'РУС'
|
||||
? 'Калькулятор кредита'
|
||||
: locale === 'ENG'
|
||||
? 'Loan calculator'
|
||||
: 'Karz kalkulýatory'}
|
||||
{locale === "TKM"
|
||||
? "Karz kalkulýatory"
|
||||
: locale === "РУС"
|
||||
? "Калькулятор кредита"
|
||||
: locale === "ENG"
|
||||
? "Loan calculator"
|
||||
: "Karz kalkulýatory"}
|
||||
</h3>
|
||||
</div>
|
||||
|
||||
<div className={stage > 6 ? 'line-block active' : 'line-block'}>
|
||||
<div className={stage > 6 ? "line-block active" : "line-block"}>
|
||||
<Lines className="lines" />
|
||||
</div>
|
||||
|
||||
<div className={stage > 7 ? 'icon-block active' : 'icon-block'}>
|
||||
<div className={stage > 7 ? "icon-block active" : "icon-block"}>
|
||||
<Img6 className="modal-icon" />
|
||||
<h3 className="icon-title">
|
||||
{locale === 'TKM'
|
||||
? 'Karz maglumatlaryňyzy tassyklaň'
|
||||
: locale === 'РУС'
|
||||
? 'Подтвердите данные кредита'
|
||||
: locale === 'ENG'
|
||||
? 'Confirm your loan personal data'
|
||||
: 'Karz maglumatlaryňyzy tassyklaň'}
|
||||
{locale === "TKM"
|
||||
? "Karz maglumatlaryňyzy tassyklaň"
|
||||
: locale === "РУС"
|
||||
? "Подтвердите данные кредита"
|
||||
: locale === "ENG"
|
||||
? "Confirm your loan personal data"
|
||||
: "Karz maglumatlaryňyzy tassyklaň"}
|
||||
</h3>
|
||||
</div>
|
||||
|
||||
<div className={stage > 7 ? 'line-block active' : 'line-block'}>
|
||||
<div className={stage > 7 ? "line-block active" : "line-block"}>
|
||||
<Lines className="lines" />
|
||||
</div>
|
||||
|
||||
<div className={stage > 8 ? 'icon-block active' : 'icon-block'}>
|
||||
<div className={stage > 8 ? "icon-block active" : "icon-block"}>
|
||||
<Img5 className="modal-icon" />
|
||||
<h3 className="icon-title">
|
||||
{locale === 'TKM'
|
||||
? 'Karz ýüzlenmesini tassyklaň'
|
||||
: locale === 'РУС'
|
||||
? 'Подтвердите кредитную заявку'
|
||||
: locale === 'ENG'
|
||||
? 'Confirm your loan application'
|
||||
: 'Karz ýüzlenmesini tassyklaň'}
|
||||
{locale === "TKM"
|
||||
? "Karz ýüzlenmesini tassyklaň"
|
||||
: locale === "РУС"
|
||||
? "Подтвердите кредитную заявку"
|
||||
: locale === "ENG"
|
||||
? "Confirm your loan application"
|
||||
: "Karz ýüzlenmesini tassyklaň"}
|
||||
</h3>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -248,13 +263,13 @@ const ImmediateCreditModal = ({
|
|||
<div className="icon-block active">
|
||||
<Img4 className="modal-icon" />
|
||||
<h3 className="icon-title">
|
||||
{locale === 'TKM'
|
||||
? 'Maglumatlary dolduryň'
|
||||
: locale === 'РУС'
|
||||
? 'Заполните данные'
|
||||
: locale === 'ENG'
|
||||
? 'Fill in the details'
|
||||
: 'Maglumatlary dolduryň'}
|
||||
{locale === "TKM"
|
||||
? "Maglumatlary dolduryň"
|
||||
: locale === "РУС"
|
||||
? "Заполните данные"
|
||||
: locale === "ENG"
|
||||
? "Fill in the details"
|
||||
: "Maglumatlary dolduryň"}
|
||||
</h3>
|
||||
</div>
|
||||
)}
|
||||
|
|
@ -263,13 +278,13 @@ const ImmediateCreditModal = ({
|
|||
<div className="icon-block active">
|
||||
<Img3 className="modal-icon" />
|
||||
<h3 className="icon-title">
|
||||
{locale === 'TKM'
|
||||
? 'Şahsy maglumatlaryňyzy tassyklaň'
|
||||
: locale === 'РУС'
|
||||
? 'Подтвердите личные данные'
|
||||
: locale === 'ENG'
|
||||
? 'Confirm your Personal data'
|
||||
: 'Şahsy maglumatlaryňyzy tassyklaň'}
|
||||
{locale === "TKM"
|
||||
? "Şahsy maglumatlaryňyzy tassyklaň"
|
||||
: locale === "РУС"
|
||||
? "Подтвердите личные данные"
|
||||
: locale === "ENG"
|
||||
? "Confirm your Personal data"
|
||||
: "Şahsy maglumatlaryňyzy tassyklaň"}
|
||||
</h3>
|
||||
</div>
|
||||
)}
|
||||
|
|
@ -280,13 +295,13 @@ const ImmediateCreditModal = ({
|
|||
<div className="icon-block active">
|
||||
<Img4 className="modal-icon" />
|
||||
<h3 className="icon-title">
|
||||
{locale === 'TKM'
|
||||
? 'Zamunçynyň maglumatlaryny dolduryň'
|
||||
: locale === 'РУС'
|
||||
? 'Заполните данные поручителя'
|
||||
: locale === 'ENG'
|
||||
{locale === "TKM"
|
||||
? "Zamunçynyň maglumatlaryny dolduryň"
|
||||
: locale === "РУС"
|
||||
? "Заполните данные поручителя"
|
||||
: locale === "ENG"
|
||||
? "Fill in the guarantor's details"
|
||||
: 'Zamunçynyň maglumatlaryny dolduryň'}
|
||||
: "Zamunçynyň maglumatlaryny dolduryň"}
|
||||
</h3>
|
||||
</div>
|
||||
)}
|
||||
|
|
@ -294,13 +309,13 @@ const ImmediateCreditModal = ({
|
|||
<div className="icon-block active">
|
||||
<Img3 className="modal-icon" />
|
||||
<h3 className="icon-title">
|
||||
{locale === 'TKM'
|
||||
? 'Zamunçynyň maglumatlaryny tassyklaň'
|
||||
: locale === 'РУС'
|
||||
? 'Подтвердите данные поручителя'
|
||||
: locale === 'ENG'
|
||||
{locale === "TKM"
|
||||
? "Zamunçynyň maglumatlaryny tassyklaň"
|
||||
: locale === "РУС"
|
||||
? "Подтвердите данные поручителя"
|
||||
: locale === "ENG"
|
||||
? "Confirm the guarantor's details"
|
||||
: 'Zamunçynyň maglumatlaryny tassyklaň'}
|
||||
: "Zamunçynyň maglumatlaryny tassyklaň"}
|
||||
</h3>
|
||||
</div>
|
||||
)}
|
||||
|
|
@ -311,13 +326,13 @@ const ImmediateCreditModal = ({
|
|||
<div className="icon-block active">
|
||||
<Img2 className="modal-icon" />
|
||||
<h3 className="icon-title">
|
||||
{locale === 'TKM'
|
||||
? 'Karz kalkulýatory'
|
||||
: locale === 'РУС'
|
||||
? 'Калькулятор кредита'
|
||||
: locale === 'ENG'
|
||||
? 'Loan calculator'
|
||||
: 'Karz kalkulýatory'}
|
||||
{locale === "TKM"
|
||||
? "Karz kalkulýatory"
|
||||
: locale === "РУС"
|
||||
? "Калькулятор кредита"
|
||||
: locale === "ENG"
|
||||
? "Loan calculator"
|
||||
: "Karz kalkulýatory"}
|
||||
</h3>
|
||||
</div>
|
||||
)}
|
||||
|
|
@ -326,13 +341,13 @@ const ImmediateCreditModal = ({
|
|||
<div className="icon-block active">
|
||||
<Img6 className="modal-icon" />
|
||||
<h3 className="icon-title">
|
||||
{locale === 'TKM'
|
||||
? 'Karz maglumatlaryňyzy tassyklaň'
|
||||
: locale === 'РУС'
|
||||
? 'Подтвердите данные кредита'
|
||||
: locale === 'ENG'
|
||||
? 'Confirm your loan details'
|
||||
: 'Karz maglumatlaryňyzy tassyklaň'}
|
||||
{locale === "TKM"
|
||||
? "Karz maglumatlaryňyzy tassyklaň"
|
||||
: locale === "РУС"
|
||||
? "Подтвердите данные кредита"
|
||||
: locale === "ENG"
|
||||
? "Confirm your loan details"
|
||||
: "Karz maglumatlaryňyzy tassyklaň"}
|
||||
</h3>
|
||||
</div>
|
||||
)}
|
||||
|
|
@ -340,13 +355,13 @@ const ImmediateCreditModal = ({
|
|||
<div className="icon-block active">
|
||||
<Img5 className="modal-icon" />
|
||||
<h3 className="icon-title">
|
||||
{locale === 'TKM'
|
||||
? 'Karz ýüzlenmesini tassyklaň'
|
||||
: locale === 'РУС'
|
||||
? 'Подтвердите кредитную заявку'
|
||||
: locale === 'ENG'
|
||||
? 'Confirm your loan application'
|
||||
: 'Karz ýüzlenmesini tassyklaň'}
|
||||
{locale === "TKM"
|
||||
? "Karz ýüzlenmesini tassyklaň"
|
||||
: locale === "РУС"
|
||||
? "Подтвердите кредитную заявку"
|
||||
: locale === "ENG"
|
||||
? "Confirm your loan application"
|
||||
: "Karz ýüzlenmesini tassyklaň"}
|
||||
</h3>
|
||||
</div>
|
||||
)}
|
||||
|
|
@ -501,6 +516,9 @@ const ImmediateCreditModal = ({
|
|||
setErrMessage={setErrMessage}
|
||||
setErrMessageEn={setErrMessageEn}
|
||||
setErrMessageTkm={setErrMessageTkm}
|
||||
setAcceptedMessage={setAcceptedMessage}
|
||||
recipientWorkPlace={recipientWorkPlace}
|
||||
recipientWorkPosition={recipientWorkPosition}
|
||||
/>
|
||||
) : stage === 9 ? (
|
||||
<PhoneAccept
|
||||
|
|
@ -581,7 +599,7 @@ const ImmediateCreditModal = ({
|
|||
acceptedMessageTkm={acceptedMessageTkm}
|
||||
/>
|
||||
) : (
|
||||
''
|
||||
""
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Reference in New Issue