translation fix
This commit is contained in:
parent
c1a59007c0
commit
d523cd28bf
|
|
@ -1,33 +1,42 @@
|
|||
import React, { useContext } from 'react';
|
||||
import { LanguageContext } from '../../backend/LanguageContext';
|
||||
import React, { useContext } from "react";
|
||||
import { LanguageContext } from "../../backend/LanguageContext";
|
||||
|
||||
const FinalStage = ({ setModalOpen }) => {
|
||||
const FinalStage = ({
|
||||
setModalOpen,
|
||||
acceptedMessageTkm,
|
||||
acceptedMessage,
|
||||
acceptedMessageEn,
|
||||
}) => {
|
||||
const { locale } = useContext(LanguageContext);
|
||||
|
||||
return (
|
||||
<section className="imm-cs-1 cs-1">
|
||||
<form>
|
||||
<h2 className="succes-title">
|
||||
{locale === 'TKM'
|
||||
? 'Karzyň kalkulýatory'
|
||||
: locale === 'РУС'
|
||||
? 'Оплата прошла успешно. Ваша заявка принята'
|
||||
: locale === 'ENG'
|
||||
? 'Loan calculator'
|
||||
: 'Karzyň kalkulýatory'}
|
||||
{locale === "TKM"
|
||||
? acceptedMessageTkm
|
||||
: locale === "РУС"
|
||||
? acceptedMessage
|
||||
: locale === "ENG"
|
||||
? acceptedMessageEn
|
||||
: acceptedMessageTkm}
|
||||
</h2>
|
||||
|
||||
<div className="cu-bottom cd-2-title">
|
||||
<button type="submit" onClick={() => setModalOpen(false)} className="sign-btn cu-btn">
|
||||
<button
|
||||
type="submit"
|
||||
onClick={() => setModalOpen(false)}
|
||||
className="sign-btn cu-btn"
|
||||
>
|
||||
<div>
|
||||
<h3>
|
||||
{locale === 'TKM'
|
||||
? 'Dowam et'
|
||||
: locale === 'РУС'
|
||||
? 'Закрыть '
|
||||
: locale === 'ENG'
|
||||
? 'Proceed'
|
||||
: 'Dowam et'}
|
||||
{locale === "TKM"
|
||||
? "Çykmak"
|
||||
: locale === "РУС"
|
||||
? "Закрыть "
|
||||
: locale === "ENG"
|
||||
? "Close"
|
||||
: "Çykmak"}
|
||||
</h3>
|
||||
</div>
|
||||
</button>
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
// IMPORT MODULES
|
||||
import React, { useState, useContext } 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 } 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 next from "../../icons/next.svg";
|
||||
import next_reverse from "../../icons/next-reverse.svg";
|
||||
// import arrow from "../../icons/arrow.svg";
|
||||
|
||||
const schema = z.object({
|
||||
|
|
@ -16,13 +16,13 @@ const schema = z.object({
|
|||
passportNumber: z
|
||||
.number()
|
||||
.int()
|
||||
.gte(100000, { message: 'Must be equal to 6 digits' })
|
||||
.lte(999999, { message: 'Must be equal to 6 digits' }),
|
||||
.gte(100000, { message: "Must be equal to 6 digits" })
|
||||
.lte(999999, { message: "Must be equal to 6 digits" }),
|
||||
bankAccount: z
|
||||
.number()
|
||||
.int()
|
||||
.gte(100000, { message: 'Must be equal to 6 digits' })
|
||||
.lte(999999, { message: 'Must be equal to 6 digits' }),
|
||||
.gte(100000, { message: "Must be equal to 6 digits" })
|
||||
.lte(999999, { message: "Must be equal to 6 digits" }),
|
||||
// clientType: z.string(),
|
||||
});
|
||||
|
||||
|
|
@ -36,15 +36,17 @@ const GuaranterInfo = ({ setStage, isGuranter, guaranterData }) => {
|
|||
} = useForm({
|
||||
resolver: zodResolver(schema),
|
||||
defaultValues: {
|
||||
name: guaranterData.name ? guaranterData.name : 'Loading',
|
||||
surname: guaranterData.surname ? guaranterData.surname : 'loading',
|
||||
lastname: guaranterData.lastname ? guaranterData.lastname : 'loading',
|
||||
name: guaranterData.name ? guaranterData.name : "Loading",
|
||||
surname: guaranterData.surname ? guaranterData.surname : "loading",
|
||||
lastname: guaranterData.lastname ? guaranterData.lastname : "loading",
|
||||
|
||||
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',
|
||||
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",
|
||||
},
|
||||
});
|
||||
|
||||
|
|
@ -56,126 +58,145 @@ const GuaranterInfo = ({ setStage, isGuranter, guaranterData }) => {
|
|||
<section className="imm-cs-1 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"
|
||||
? "Zamunçynyň görkezilen maglumatlaryny tassyklan, egerde görkezilen maglumatlar nädogry bolsa ýa doldurylmadyk meýdançalar bolsa bank bilen habarlaşyn"
|
||||
: locale === "РУС"
|
||||
? "Подтвердите предоставленную заемщиком информацию и связажитесь с банком, если предоставленная информация была неверной или поля не были заполнены"
|
||||
: locale === "ENG"
|
||||
? "Confirm the information provided by the borrower and contact the bank if the information provided was incorrect or fields were not completed"
|
||||
: "Zamunçynyň görkezilen maglumatlaryny tassyklan, egerde görkezilen maglumatlar nädogry bolsa ýa doldurylmadyk meýdançalar bolsa bank bilen habarlaşyn"}
|
||||
</h2>
|
||||
<div className="imm-credit-form-wrapper">
|
||||
<div className="input-block">
|
||||
<label htmlFor="name">
|
||||
{locale === 'TKM'
|
||||
? 'At'
|
||||
: locale === 'РУС'
|
||||
? 'Имя'
|
||||
: locale === 'ENG'
|
||||
? 'Name'
|
||||
: 'At'}
|
||||
{locale === "TKM"
|
||||
? "At"
|
||||
: locale === "РУС"
|
||||
? "Имя"
|
||||
: locale === "ENG"
|
||||
? "Name"
|
||||
: "At"}
|
||||
</label>
|
||||
<input {...register('name')} type="text" id="name" disabled />
|
||||
<input {...register("name")} type="text" id="name" disabled />
|
||||
{/* {errors.name && <span>{errors.name.message}</span>} */}
|
||||
</div>
|
||||
|
||||
<div className="input-block">
|
||||
<label htmlFor="lastname">
|
||||
{locale === 'TKM'
|
||||
? 'Familiýa'
|
||||
: locale === 'РУС'
|
||||
? 'Фамилия'
|
||||
: locale === 'ENG'
|
||||
? 'Lastname'
|
||||
: 'Familiýa'}
|
||||
{locale === "TKM"
|
||||
? "Familiýa"
|
||||
: locale === "РУС"
|
||||
? "Фамилия"
|
||||
: locale === "ENG"
|
||||
? "Lastname"
|
||||
: "Familiýa"}
|
||||
</label>
|
||||
<input {...register('lastname')} type="text" id="lastname" disabled />
|
||||
<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'
|
||||
? 'Atasynyň ady'
|
||||
: locale === 'РУС'
|
||||
? 'Отчество'
|
||||
: locale === 'ENG'
|
||||
? 'Middle name'
|
||||
: 'Atasynyň ady'}
|
||||
{locale === "TKM"
|
||||
? "Atasynyň ady"
|
||||
: locale === "РУС"
|
||||
? "Отчество"
|
||||
: locale === "ENG"
|
||||
? "Middle name"
|
||||
: "Atasynyň ady"}
|
||||
</label>
|
||||
<input {...register('surname')} type="text" id="surname" disabled />
|
||||
<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'
|
||||
? 'Doglan ýyly'
|
||||
: locale === 'РУС'
|
||||
? 'Год рождения'
|
||||
: locale === 'ENG'
|
||||
? 'Year of birth'
|
||||
: 'Doglan ýyly'}
|
||||
{locale === "TKM"
|
||||
? "Doglan ýyly"
|
||||
: locale === "РУС"
|
||||
? "Год рождения"
|
||||
: locale === "ENG"
|
||||
? "Year of birth"
|
||||
: "Doglan ýyly"}
|
||||
</label>
|
||||
<input {...register('birthDate')} type="text" id="birthDate" disabled />
|
||||
<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'
|
||||
? 'Pasportyň seriýasy'
|
||||
: locale === 'РУС'
|
||||
? 'Серия паспорта'
|
||||
: locale === 'ENG'
|
||||
? 'Passport Series'
|
||||
: 'Pasportyň seriýasy'}
|
||||
{locale === "TKM"
|
||||
? "Pasportyň seriýasy"
|
||||
: locale === "РУС"
|
||||
? "Серия паспорта"
|
||||
: locale === "ENG"
|
||||
? "Passport Series"
|
||||
: "Pasportyň seriýasy"}
|
||||
</label>
|
||||
<input {...register('passportSerial')} type="text" id="passport-serial" disabled />
|
||||
{errors.passportSerial && <span>{errors.passportSerial.message}</span>}
|
||||
<input
|
||||
{...register("passportSerial")}
|
||||
type="text"
|
||||
id="passport-serial"
|
||||
disabled
|
||||
/>
|
||||
{errors.passportSerial && (
|
||||
<span>{errors.passportSerial.message}</span>
|
||||
)}
|
||||
</div>
|
||||
<div className="input-block">
|
||||
<label htmlFor="passport-number">
|
||||
{locale === 'TKM'
|
||||
? 'Pasportyň belgisi'
|
||||
: locale === 'РУС'
|
||||
? 'Номер паспорта'
|
||||
: locale === 'ENG'
|
||||
? 'Passport number'
|
||||
: 'Pasportyň belgisi'}
|
||||
{locale === "TKM"
|
||||
? "Pasportyň belgisi"
|
||||
: locale === "РУС"
|
||||
? "Номер паспорта"
|
||||
: locale === "ENG"
|
||||
? "Passport number"
|
||||
: "Pasportyň belgisi"}
|
||||
</label>
|
||||
<input
|
||||
{...register('passportNumber', { valueAsNumber: true })}
|
||||
{...register("passportNumber", { valueAsNumber: true })}
|
||||
type="number"
|
||||
id="passport-number"
|
||||
disabled
|
||||
/>
|
||||
{errors.passportNumber && <span>{errors.passportNumber.message}</span>}
|
||||
{errors.passportNumber && (
|
||||
<span>{errors.passportNumber.message}</span>
|
||||
)}
|
||||
</div>
|
||||
|
||||
<div className="input-block">
|
||||
<label htmlFor="address">
|
||||
{locale === 'TKM'
|
||||
? 'Ýaşaýan salgysy'
|
||||
: locale === 'РУС'
|
||||
? 'Адрес прописки'
|
||||
: locale === 'ENG'
|
||||
? 'Address of residence'
|
||||
: 'Ýaşaýan salgysy'}
|
||||
{locale === "TKM"
|
||||
? "Ýaşaýan salgysy"
|
||||
: locale === "РУС"
|
||||
? "Адрес прописки"
|
||||
: locale === "ENG"
|
||||
? "Address of residence"
|
||||
: "Ýaşaýan salgysy"}
|
||||
</label>
|
||||
<input {...register('address')} type="text" id="address" disabled />
|
||||
<input {...register("address")} type="text" id="address" disabled />
|
||||
</div>
|
||||
|
||||
<div className="input-block">
|
||||
<label htmlFor="bank-acc">
|
||||
{locale === 'TKM'
|
||||
? 'Aýlyk kartyň hasaby'
|
||||
: locale === 'РУС'
|
||||
? 'Счет зарплатной карты'
|
||||
: locale === 'ENG'
|
||||
? 'Salary card account'
|
||||
: 'Aýlyk kartyň hasaby'}
|
||||
{locale === "TKM"
|
||||
? "Aýlyk kartyň hasaby"
|
||||
: locale === "РУС"
|
||||
? "Счет зарплатной карты"
|
||||
: locale === "ENG"
|
||||
? "Salary card account"
|
||||
: "Aýlyk kartyň hasaby"}
|
||||
</label>
|
||||
<input
|
||||
{...register('bankAccount', { valueAsNumber: true })}
|
||||
{...register("bankAccount", { valueAsNumber: true })}
|
||||
type="number"
|
||||
id="bank-acc"
|
||||
disabled
|
||||
|
|
@ -185,56 +206,68 @@ const GuaranterInfo = ({ setStage, isGuranter, guaranterData }) => {
|
|||
|
||||
<div className="input-block">
|
||||
<label htmlFor="workPlace">
|
||||
{locale === 'TKM'
|
||||
? 'Iş ýeriňizi dolduryň'
|
||||
: locale === 'РУС'
|
||||
? 'Заполните место работы'
|
||||
: locale === 'ENG'
|
||||
? 'Fill the place of work'
|
||||
: 'Iş ýeriňizi dolduryň'}
|
||||
{locale === "TKM"
|
||||
? "Iş ýeriňizi dolduryň"
|
||||
: locale === "РУС"
|
||||
? "Заполните место работы"
|
||||
: locale === "ENG"
|
||||
? "Fill the place of work"
|
||||
: "Iş ýeriňizi dolduryň"}
|
||||
</label>
|
||||
<input type="text" id="workPlace" {...register('workPlace')} />
|
||||
<input type="text" id="workPlace" {...register("workPlace")} />
|
||||
</div>
|
||||
<div className="input-block">
|
||||
<label htmlFor="workPosition">
|
||||
{locale === 'TKM'
|
||||
? 'Wezipäňizi dolduryň'
|
||||
: locale === 'РУС'
|
||||
? 'Заполните должность'
|
||||
: locale === 'ENG'
|
||||
? 'Fill the position'
|
||||
: 'Wezipäňizi dolduryň'}
|
||||
{locale === "TKM"
|
||||
? "Wezipäňizi dolduryň"
|
||||
: locale === "РУС"
|
||||
? "Заполните должность"
|
||||
: locale === "ENG"
|
||||
? "Fill the position"
|
||||
: "Wezipäňizi dolduryň"}
|
||||
</label>
|
||||
<input type="text" id="workPosition" {...register('workPosition')} />
|
||||
<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)}>
|
||||
<button
|
||||
type="button"
|
||||
className="sign-btn reg-btn"
|
||||
onClick={() => setStage(3)}
|
||||
>
|
||||
<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>
|
||||
<button type="button" className="sign-btn cu-btn" onClick={() => setStage(7)}>
|
||||
<button
|
||||
type="button"
|
||||
className="sign-btn cu-btn"
|
||||
onClick={() => setStage(7)}
|
||||
>
|
||||
<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,
|
||||
|
|
@ -14,11 +14,14 @@ const PaymentSuccess = ({
|
|||
recepientAmount,
|
||||
creditDuration,
|
||||
setErrMessage,
|
||||
setAcceptedMessage,
|
||||
setAcceptedMessageEn,
|
||||
setAcceptedMessageTkm,
|
||||
}) => {
|
||||
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);
|
||||
|
|
@ -30,15 +33,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}`);
|
||||
|
|
@ -46,7 +52,7 @@ const PaymentSuccess = ({
|
|||
|
||||
const jsonedResponse = await response.json();
|
||||
|
||||
if (jsonedResponse === 'OTP validated successfully') {
|
||||
if (jsonedResponse === "OTP validated successfully") {
|
||||
fetchData();
|
||||
setIsLoading(false);
|
||||
}
|
||||
|
|
@ -58,9 +64,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: {
|
||||
|
|
@ -70,7 +76,7 @@ const PaymentSuccess = ({
|
|||
name: borrowerData.name,
|
||||
surname: borrowerData.surname,
|
||||
availableAmount: borrowerData.availableAmount,
|
||||
clientType: 'recipient',
|
||||
clientType: "recipient",
|
||||
signRecipient: borrowerData.signRecipient,
|
||||
},
|
||||
clientGuarantor: isGuranter
|
||||
|
|
@ -81,7 +87,7 @@ const PaymentSuccess = ({
|
|||
name: guaranterData.name,
|
||||
surname: guaranterData.surname,
|
||||
availableAmount: guaranterData.availableAmount,
|
||||
clientType: 'guarantor',
|
||||
clientType: "guarantor",
|
||||
signGuarantor: guaranterData.signGuarantor,
|
||||
}
|
||||
: null,
|
||||
|
|
@ -90,7 +96,7 @@ const PaymentSuccess = ({
|
|||
mrtIsInsuarance: isGuranter ? 0 : 1,
|
||||
termInYears: creditDuration,
|
||||
}),
|
||||
},
|
||||
}
|
||||
);
|
||||
|
||||
if (!response.ok) {
|
||||
|
|
@ -100,6 +106,9 @@ const PaymentSuccess = ({
|
|||
const responseJson = await response.json();
|
||||
|
||||
if (responseJson.errCode === 0) {
|
||||
setAcceptedMessage(jsonedResponse.messageRu);
|
||||
setAcceptedMessageEn(jsonedResponse.messageEn);
|
||||
setAcceptedMessageTkm(jsonedResponse.message);
|
||||
setStage(16);
|
||||
} else {
|
||||
setErrMessage(responseJson.messageRu);
|
||||
|
|
@ -120,14 +129,14 @@ const PaymentSuccess = ({
|
|||
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>
|
||||
);
|
||||
|
|
@ -137,35 +146,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'
|
||||
? 'At'
|
||||
: locale === 'РУС'
|
||||
? 'Код'
|
||||
: locale === 'ENG'
|
||||
? 'amount'
|
||||
: 'At'}
|
||||
{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> */}
|
||||
|
|
@ -173,19 +187,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>
|
||||
|
|
@ -193,16 +211,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 } 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 } 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 [errMesage, setErrMessage] = useState();
|
||||
|
||||
|
|
@ -58,23 +58,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();
|
||||
|
||||
|
|
@ -82,13 +85,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 {
|
||||
|
|
@ -100,7 +106,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) {
|
||||
|
|
@ -109,8 +115,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) {
|
||||
|
|
@ -121,12 +127,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: {
|
||||
|
|
@ -136,7 +142,7 @@ const PhoneAccept = ({
|
|||
name: borrowerData.name,
|
||||
surname: borrowerData.surname,
|
||||
availableAmount: borrowerData.availableAmount,
|
||||
clientType: 'recipient',
|
||||
clientType: "recipient",
|
||||
signRecipient: borrowerData.signRecipient,
|
||||
},
|
||||
clientGuarantor: isGuranter
|
||||
|
|
@ -147,7 +153,7 @@ const PhoneAccept = ({
|
|||
name: guaranterData.name,
|
||||
surname: guaranterData.surname,
|
||||
availableAmount: guaranterData.availableAmount,
|
||||
clientType: 'guarantor',
|
||||
clientType: "guarantor",
|
||||
signGuarantor: guaranterData.signGuarantor,
|
||||
}
|
||||
: null,
|
||||
|
|
@ -156,7 +162,7 @@ const PhoneAccept = ({
|
|||
mrtIsInsuarance: isGuranter ? 0 : 1,
|
||||
termInYears: creditDuration,
|
||||
}),
|
||||
},
|
||||
}
|
||||
);
|
||||
|
||||
if (!response.ok) {
|
||||
|
|
@ -174,16 +180,19 @@ const PhoneAccept = ({
|
|||
};
|
||||
|
||||
const sendCode = async () => {
|
||||
console.log('startred');
|
||||
console.log("startred");
|
||||
|
||||
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) {
|
||||
throw new Error(`HTTP error! Status: ${response.status}`);
|
||||
|
|
@ -200,19 +209,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);
|
||||
|
|
@ -225,9 +237,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: {
|
||||
|
|
@ -237,7 +249,7 @@ const PhoneAccept = ({
|
|||
name: borrowerData.name,
|
||||
surname: borrowerData.surname,
|
||||
availableAmount: borrowerData.availableAmount,
|
||||
clientType: 'recipient',
|
||||
clientType: "recipient",
|
||||
signRecipient: borrowerData.signRecipient,
|
||||
},
|
||||
clientGuarantor: isGuranter
|
||||
|
|
@ -248,7 +260,7 @@ const PhoneAccept = ({
|
|||
name: guaranterData.name,
|
||||
surname: guaranterData.surname,
|
||||
availableAmount: guaranterData.availableAmount,
|
||||
clientType: 'guarantor',
|
||||
clientType: "guarantor",
|
||||
signGuarantor: guaranterData.signGuarantor,
|
||||
}
|
||||
: null,
|
||||
|
|
@ -257,7 +269,7 @@ const PhoneAccept = ({
|
|||
mrtIsInsuarance: isGuranter ? 0 : 1,
|
||||
termInYears: creditDuration,
|
||||
}),
|
||||
},
|
||||
}
|
||||
);
|
||||
|
||||
if (!response.ok) {
|
||||
|
|
@ -282,22 +294,25 @@ 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,
|
||||
}),
|
||||
});
|
||||
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,
|
||||
}),
|
||||
}
|
||||
);
|
||||
|
||||
const jsonedResponse = await response.json();
|
||||
if (!cardDetails) {
|
||||
|
|
@ -325,14 +340,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>
|
||||
);
|
||||
|
|
@ -341,20 +355,32 @@ const PhoneAccept = ({
|
|||
if (errMesage) {
|
||||
return (
|
||||
<section className="imm-cs-1 cs-1">
|
||||
<h1 className="cs-2-title">Error...</h1>
|
||||
<button type="button" className="sign-btn reg-btn" onClick={() => setStage(8)}>
|
||||
<h1 className="cs-2-title">
|
||||
{locale === "TKM"
|
||||
? "Bir zat ýalňyş ..."
|
||||
: locale === "РУС"
|
||||
? "Ошибка..."
|
||||
: locale === "ENG"
|
||||
? "Error..."
|
||||
: "Bir zat ýalňyş ..."}
|
||||
</h1>
|
||||
<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>
|
||||
|
|
@ -366,34 +392,47 @@ 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"
|
||||
/>
|
||||
{/* <span className="another-option" onClick={codeResend}>
|
||||
Отправить код снова
|
||||
</span> */}
|
||||
|
|
@ -403,27 +442,27 @@ const PhoneAccept = ({
|
|||
{invalidData && (
|
||||
<section className=" cs-1">
|
||||
<h1 className="cs-2-title">
|
||||
{locale === 'TKM'
|
||||
? 'Roralňyşlyk, maglumatlary barlaň'
|
||||
: locale === 'РУС'
|
||||
? 'Ошибка, проверьте данные'
|
||||
: locale === 'ENG'
|
||||
? 'Error, check data'
|
||||
: 'Roralňyşlyk, 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>
|
||||
)}
|
||||
|
|
@ -431,19 +470,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>
|
||||
|
|
@ -459,16 +499,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" />
|
||||
|
|
|
|||
|
|
@ -53,7 +53,10 @@ const ImmediateCreditModal = ({
|
|||
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 [borrowerData, setBorrowerData] = useState();
|
||||
const [guaranterData, setGuaranterData] = useState();
|
||||
|
|
@ -557,9 +560,17 @@ const ImmediateCreditModal = ({
|
|||
recepientAmount={recepientAmount}
|
||||
creditDuration={creditDuration}
|
||||
setErrMessage={setErrMessage}
|
||||
setAcceptedMessage={setAcceptedMessage}
|
||||
setAcceptedMessageEn={setAcceptedMessageEn}
|
||||
setAcceptedMessageTkm={setAcceptedMessageTkm}
|
||||
/>
|
||||
) : stage === 16 ? (
|
||||
<FinalStage setModalOpen={setModalOpen} />
|
||||
<FinalStage
|
||||
setModalOpen={setModalOpen}
|
||||
acceptedMessage={acceptedMessage}
|
||||
acceptedMessageEn={acceptedMessageEn}
|
||||
acceptedMessageTkm={acceptedMessageTkm}
|
||||
/>
|
||||
) : (
|
||||
""
|
||||
)}
|
||||
|
|
|
|||
Loading…
Reference in New Issue