borower stage translated

This commit is contained in:
Kakabay 2024-04-06 17:37:31 +05:00
parent 48e9d6fc20
commit f531a9b523
2 changed files with 62 additions and 45 deletions

View File

@ -46,6 +46,7 @@ const BorrowerStage = ({
setMaxAmount,
setRecepientAmount,
setErrMessage,
modalOpen,
}) => {
const { locale } = useContext(LanguageContext);
@ -135,6 +136,10 @@ const BorrowerStage = ({
fetchData(idSerial, passportNumber, accNumber, isGuranter);
};
useEffect(() => {
setIsGuranterSelected(false);
}, [modalOpen]);
if (isLoading) {
return (
<section className="imm-cs-1">
@ -174,12 +179,12 @@ const BorrowerStage = ({
<form onSubmit={handleSubmit(onSubmit)}>
<h2 className="cs-2-title">
{locale === 'TKM'
? 'Karzyň kalkulýatory'
? 'Maglumatlary dolduryň'
: locale === 'РУС'
? 'Заполните данные'
: locale === 'ENG'
? 'Loan calculator'
: 'Karzyň kalkulýatory'}
? 'Fill in the details'
: 'Maglumatlary dolduryň'}
</h2>
<div className="imm-credit-form-wrapper">
<Select
@ -246,49 +251,60 @@ const BorrowerStage = ({
</div>
</div>
<div className="imm-credit-checkbox-group">
<div className="imm-credit-checkbox-block" onClick={() => isGuranterHandler(false)}>
<input
type="radio"
id="borrower"
value={'recepient'}
name="client-type"
checked={isGuranterSelected ? (isGuranter ? false : true) : false}
onChange={checkboxHandleChange}
// {...register("clientType")}
className="radio-button"
/>
<label htmlFor="borrower">
{locale === 'TKM'
? 'Ätiýaçlandyryş hyzmaty'
: locale === 'РУС'
? 'Гос страхование'
: locale === 'ENG'
? 'Borrower'
: 'Hasaba almak'}
</label>
</div>
<div className="imm-credit-checkbox-block">
<h3>
{locale === 'TKM'
? 'Zamunçylygyň görnüşini saýlan'
: locale === 'РУС'
? 'Выберите вид поручителя'
: locale === 'ENG'
? 'Select the type of guarantor'
: 'Zamunçylygyň görnüşini saýlan'}
</h3>
<div className="imm-credit-checkbox-group">
<div className="imm-credit-checkbox-block" onClick={() => isGuranterHandler(false)}>
<input
type="radio"
id="borrower"
value={'recepient'}
name="client-type"
checked={isGuranterSelected ? (isGuranter ? false : true) : false}
onChange={checkboxHandleChange}
// {...register("clientType")}
className="radio-button"
/>
<label htmlFor="borrower">
{locale === 'TKM'
? 'Ätiýaçlandyryş hyzmaty'
: locale === 'РУС'
? 'Гос страхование'
: locale === 'ENG'
? 'State insurance'
: 'Ätiýaçlandyryş hyzmaty'}
</label>
</div>
<div className="imm-credit-checkbox-block" onClick={() => isGuranterHandler(true)}>
<input
type="radio"
id="isGuranter"
value={'guaranter'}
name="client-type"
checked={isGuranterSelected ? (isGuranter ? true : false) : false}
onChange={checkboxHandleChange}
// {...register("clientType")}
className="radio-button"
/>
<label htmlFor="isGuranter">
{locale === 'TKM'
? 'Zamunçy'
: locale === 'РУС'
? 'Поручитель'
: locale === 'ENG'
? 'guaranter'
: 'Zamunçy'}
</label>
<div className="imm-credit-checkbox-block" onClick={() => isGuranterHandler(true)}>
<input
type="radio"
id="isGuranter"
value={'guaranter'}
name="client-type"
checked={isGuranterSelected ? (isGuranter ? true : false) : false}
onChange={checkboxHandleChange}
// {...register("clientType")}
className="radio-button"
/>
<label htmlFor="isGuranter">
{locale === 'TKM'
? 'Zamunçy'
: locale === 'РУС'
? 'Поручитель'
: locale === 'ENG'
? 'Guaranter'
: 'Zamunçy'}
</label>
</div>
</div>
</div>

View File

@ -286,6 +286,7 @@ const ImmediateCreditModal = ({
<div className="modal-bottom">
{stage === 1 ? (
<BorrowerStage
modalOpen={modalOpen}
stage={stage}
setStage={setStage}
isGuranter={isGuranter}