missed screen added

This commit is contained in:
victorAnumudu
2025-03-03 19:42:25 +01:00
parent 348532d7cf
commit df7ca95653
5 changed files with 33 additions and 3 deletions
@@ -8,9 +8,10 @@ import GetLoan from './getloan/GetLoan';
import TermsAndConditions from './getloan/TermsAndConditions';
import LoanDetails from './getloan/LoanDetails';
import ProductDetails from './getloan/ProductDetails';
import NotEligible from './getloan/NotEligible';
export default function GetLoanScreens({step, screens, typeToShow, setShowType, handleStep}) {
return (
<>
{!step?.screen?.length || step?.screen[step.screen.length -1 ] == screens.products ?
@@ -19,6 +20,10 @@ export default function GetLoanScreens({step, screens, typeToShow, setShowType,
<>
<GetLoan step={step} handleStep={handleStep} screens={screens} typeToShow={typeToShow} setShowType={setShowType} />
</>
:step?.screen[step.screen.length -1 ] == screens.not_eligible?
<>
<NotEligible step={step} handleStep={handleStep} screens={screens} />
</>
:step?.screen[step.screen.length -1 ] == screens.terms_conditions ?
<>
<TermsAndConditions step={step} handleStep={handleStep} screens={screens} />
@@ -4,7 +4,11 @@ export default function GetLoan({step, handleStep, screens, typeToShow, setShowT
const handleGetLoan = () => {
// handleStep({...step.details}, screens.pin)
handleStep({...step.details}, screens.terms_conditions)
if(step?.activeUser?.salary_account){
handleStep({...step.details}, screens.terms_conditions)
}else{
handleStep({...step.details}, screens.not_eligible)
}
}
const handlePayLoan = () => {
@@ -0,0 +1,20 @@
import React from 'react'
export default function NotEligible({step, handleStep, screens}) {
// const handleGetLoan = () => {
// handleStep({...step.details}, screens.getloan)
// }
return (
<div className='mt-3 h-full flex flex-col gap-3'>
<p className='text-center text-base sm:text-lg text-red-500 font-medium'>Selected profile not qualified for this product</p>
{/* <div className='mt-3 w-full h-full flex flex-col gap-2 justify-end'>
<button className='w-full p-3 bg-orange-500 text-lg sm:text-2xl text-white font-bold rounded'>Pay Loan</button>
<button className='w-full p-3 bg-orange-500 text-lg sm:text-2xl text-white font-bold rounded'>Loan Information</button>
</div> */}
</div>
)
}