not eligible screen bug fixed
This commit is contained in:
@@ -4,11 +4,7 @@ export default function GetLoan({step, handleStep, screens, typeToShow, setShowT
|
|||||||
|
|
||||||
const handleGetLoan = () => {
|
const handleGetLoan = () => {
|
||||||
// handleStep({...step.details}, screens.pin)
|
// handleStep({...step.details}, screens.pin)
|
||||||
if(step?.activeUser?.salary_account){
|
handleStep({...step.details}, screens.terms_conditions)
|
||||||
handleStep({...step.details}, screens.terms_conditions)
|
|
||||||
}else{
|
|
||||||
handleStep({...step.details}, screens.not_eligible)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const handlePayLoan = () => {
|
const handlePayLoan = () => {
|
||||||
|
|||||||
@@ -13,6 +13,14 @@ export default function ProductDetails({step, handleStep, screens}) {
|
|||||||
|
|
||||||
const products = data?.data?.product_data?.products // PRODUCTS LIST
|
const products = data?.data?.product_data?.products // PRODUCTS LIST
|
||||||
|
|
||||||
|
const handleClick = (product) => {
|
||||||
|
if(step?.activeUser?.salary_account){
|
||||||
|
handleStep(product, screens.getLoan)
|
||||||
|
}else{
|
||||||
|
handleStep({...step.details}, screens.not_eligible)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<div className='mt-3 flex flex-col gap-3'>
|
<div className='mt-3 flex flex-col gap-3'>
|
||||||
@@ -34,7 +42,7 @@ export default function ProductDetails({step, handleStep, screens}) {
|
|||||||
<button
|
<button
|
||||||
key={product?.cid}
|
key={product?.cid}
|
||||||
disabled={isDisabled}
|
disabled={isDisabled}
|
||||||
onClick={()=>handleStep(product, screens.getLoan)}
|
onClick={()=>handleClick(product)}
|
||||||
className={`w-full flex gap-2 justify-between items-center p-2 bg-purple-800 text-base sm:text-xl text-white font-bold rounded ${isDisabled && 'opacity-50'}`}
|
className={`w-full flex gap-2 justify-between items-center p-2 bg-purple-800 text-base sm:text-xl text-white font-bold rounded ${isDisabled && 'opacity-50'}`}
|
||||||
>
|
>
|
||||||
<span>{product?.description}</span>
|
<span>{product?.description}</span>
|
||||||
|
|||||||
Reference in New Issue
Block a user