import { Button, InputCompOne, Stepper } from '../../shared/index'; import {Formik, Form} from 'formik' import * as Yup from "yup"; import { applyForLoan } from '../../../core/apiRequest'; // import { useNavigate } from "react-router-dom"; // import { RouteHandler } from '../../../router/routes'; type Props = { handleNextStep:(value:{})=>any applicationDetails: {} } const initialValues = { account: "", checked: false }; // To get the validation schema const validationSchema = Yup.object().shape({ account: Yup.string() .required("Required"), checked: Yup.bool() // use bool instead of boolean .oneOf([true], "You must accept the terms and conditions") }); export default function DashboardHomeAttestation({handleNextStep, applicationDetails}:Props) { // let navigate = useNavigate(); // const navigateToProfile = () => navigate(RouteHandler.dashboardProfile); //FUNCTION TO HANDLE LOAN APPLICATION const handleSubmit = (values:any) => { delete values.checked applyForLoan({...applicationDetails, disbursement: values}).then(res=>{ console.log('APPLY FOR LOAN', res) handleNextStep({disbursement: values}) console.log('ApplicationDetails', {...applicationDetails, disbursement: values}) }).catch(err=>{ console.log(err) }) // applyForLoan(payload).then(res=>{ // console.log('APPLY FOR LOAN', res) // // handleNextStep({disbursement: values}) // }).catch(err=>{ // console.log(err) // }) }; return (

Applicant's Attestation and Debit Instruction

NB: Must be your FCMB account number

{(props)=>(

By pressing, you agree that you have read, understood and accept the applicatant's attestation and terms and conditions for FCMB premium salary loan. You also give us permission to collect financial information and run credit checks on the account provided through our partners

{props.errors.checked && props.touched.checked && {props.errors.checked}}
)}
); } // const payload = { // "loan_amount": "100000", // "payment_month": "18", // "sales_agent": "Testing1234", // "gender": "male", // "address": "World bank housing Estate, Umuahia", // "marital_status": "single", // "state": "abia", // "email": "test5070@gmail.com", // "country": "NG", // "employment": { // "job_title": "Information Officer", // "name": "Testing Testing", // "sector": "private (non academic)", // "industry": "engineering", // "resumption_date": "2024-04-05", // "email": "test50700@gmail.com", // "annual_income": "600000", // "monthly_salary": "50000", // "salary_payment_date": "2024-04-19", // "employment_id": "2555566", // "highest_eductaion": "b.sc + professional qualification" // }, // "loan_reference": [ // { // "fullname": "John Mike", // "relationship": "Brother", // "phone_number": "07055566611", // "email": "refone@gmail.com", // "bvn": "11111111111" // }, // { // "fullname": "Mary Paul", // "relationship": "Brother", // "phone_number": "07055577711", // "email": "reftwo@gmail.com", // "bvn": "22222222222" // } // ], // disbursement:{account: '1122334456'} // }