diff --git a/src/components/GetStarted/ApplicantsAttestation.tsx b/src/components/GetStarted/ApplicantsAttestation.tsx deleted file mode 100644 index 4a01616..0000000 --- a/src/components/GetStarted/ApplicantsAttestation.tsx +++ /dev/null @@ -1,29 +0,0 @@ -import React from "react"; -import DebitAccount from "./DebitAccount"; - - -const ApplicantsAttestation: React.FC = () => { - return ( - <> -
-

- Applicant’s Attestation and Debit Instruction -

-
-

- For more enquiries and support -

-

- Call: 09099000000 -

-

- Email: fcmbloan@support.com -

-
-
- - - ); -}; - -export default ApplicantsAttestation; diff --git a/src/components/GetStarted/BVN.tsx b/src/components/GetStarted/BVN.tsx deleted file mode 100644 index 253c3f1..0000000 --- a/src/components/GetStarted/BVN.tsx +++ /dev/null @@ -1,89 +0,0 @@ -import React from "react"; -import * as Yup from "yup"; -import { Form, Formik } from "formik"; -import { InputCompOne } from "../shared"; - -// To get the validation schema -const validationSchema = Yup.object().shape({ - bvn: Yup.string() - .required("BVN is required") - .test("no-e", "Invalid number", (value:any) => { - if (value && /^[0-9]*$/.test(value) == false) { - return false; - } - return true; - }) - .min(11, "must be 11 digits") - .max(11, "must be 11 digits") -}); - -// initial values for formik -let initialValues = { - bvn: '' -}; - -type Props = { - handleNextStep:()=>any -} - -const BVN = ({handleNextStep}:Props) => { - - const firstInputRef = React.useRef(null); - - const handleSubmit = (values:any) => { - console.log('values', values) - handleNextStep() - }; - - return ( - - {(props:any) => ( -
-
-
-
-

- Let’s Get You Started -

-
-
- - -

- ***Every personal information attached to your BVN is safe and secured. It is only inportant for us to verify your information and also give you access to your application profile/account -

-
-
-
-
- )} -
- ); -}; - -export default BVN; diff --git a/src/components/GetStarted/CreditAccount.tsx b/src/components/GetStarted/CreditAccount.tsx deleted file mode 100644 index cb0e80a..0000000 --- a/src/components/GetStarted/CreditAccount.tsx +++ /dev/null @@ -1,27 +0,0 @@ -import React from "react"; -import { InputCompOne } from ".."; - -const CreditAccount: React.FC = () => { - return ( - <> -
-

- CREDIT ACCOUNT ( Your account to receive your loan ) -

-
- - - ); -}; - -export default CreditAccount; diff --git a/src/components/GetStarted/EmployerValidation.tsx b/src/components/GetStarted/EmployerValidation.tsx index 76e15bd..7107149 100644 --- a/src/components/GetStarted/EmployerValidation.tsx +++ b/src/components/GetStarted/EmployerValidation.tsx @@ -52,13 +52,8 @@ const validationSchema = Yup.object().shape({ checked: Yup.bool(), }); -interface BasicInfoProps { - handleNextStep: any; -} -const EmployerValidation: React.FC = ({ - handleNextStep, -}) => { +const EmployerValidation: React.FC= () => { // const inputRef = useRef(null); // const handleInput = (e: React.FormEvent) => { @@ -83,7 +78,6 @@ const EmployerValidation: React.FC = ({ //FUNCTION TO HANDLE SUBMIT const handleSubmit = (values:any) => { console.log(values) - handleNextStep() }; return ( diff --git a/src/components/GetStarted/GetStarted.tsx b/src/components/GetStarted/GetStarted.tsx deleted file mode 100644 index 7356021..0000000 --- a/src/components/GetStarted/GetStarted.tsx +++ /dev/null @@ -1,28 +0,0 @@ -import EmployerValidation from "./EmployerValidation"; -import YourAreAlmostThere from "./YourAreAlmostThere"; -import LoanAmountComp from "./LoanAmountComp"; -import ApplicantsAttestation from "./ApplicantsAttestation"; - -const GetStarted = ({handleNextStep, step}:{handleNextStep?:any, step?:string|number|any}) => { - - return ( - <> - {/* Main */} - {/* // {step === 2 && ( - // - // )} - // {step === 3 && } - // {step === 4 && } - // {step === 5 && } */} -
-
- -
-
- - ); -}; - -export default GetStarted; diff --git a/src/components/GetStarted/LoanAmountComp.tsx b/src/components/GetStarted/LoanAmountComp.tsx deleted file mode 100644 index 33470d7..0000000 --- a/src/components/GetStarted/LoanAmountComp.tsx +++ /dev/null @@ -1,202 +0,0 @@ -import { Button, InputCompOne } from ".."; - -import {Formik, Form} from 'formik' -import * as Yup from "yup"; - -const initialValues = { - monthly_salary: "", - loan_amount: "", - duration: 6 -}; - -// To get the validation schema -const validationSchema = Yup.object().shape({ - duration: Yup.number() - .required("Required"), - monthly_salary: Yup.string() - .required("Required") - .test("no-e", "Invalid", (value:any) => { - if (value && /^[0-9]*$/.test(value) == false) { - return false; - } - return true; - }), - loan_amount: Yup.string() - .required("Required") - .test("no-e", "Invalid", (value:any) => { - if (value && /^[0-9]*$/.test(value) == false) { - return false; - } - return true; - }), -}); - -// interface SliderProps { -// handleSliderChange: (e: React.ChangeEvent) => void; -// value: number; -// } - -interface LoanAmountProps { - handleNextStep: any; -} - -const LoanAmountComp: React.FC = ({ handleNextStep }) => { - // const [value, setValue] = React.useState(6); - - // const handleSliderChange = (e: any) => { - // setValue(e.target.value); - // }; - - //FUNCTION TO HANDLE SUBMIT - const handleSubmit = (values:any) => { - console.log(values) - handleNextStep() - }; - - return ( - <> -
-

- Loan Amount -

-
-

- For more enquiries and support -

-

- Call: 09099000000 -

-

- Email: fcmbloan@support.com -

-
-
- - {(props)=>( -
-
- - -
-

- The maximum amount you can apply for on this offer is based on the - information you shared with us in your loan application. We have - made this offer to suit your monthly remuneration and to enable you - pay your loan on-time -

- -
-
- Minimum Offer: -

- N100,000 -

-
- -
- Maximum Offer: -

- N500,000 -

-
-
- - <> -
-

For how many months? {(props.errors.duration && props.touched.duration) ? props.errors.duration : ''}

-
- -
-
- {props.values.duration} months -
-
- - -
-
-

Your Monthly Repayment

-

N

-
-
-
-
-
- )} -
- - ); -}; - -export default LoanAmountComp; - -// const Slider: React.FC = ({ handleSliderChange, value }) => { -// return ( -//
-//

For how many months?

-//
-// -//
-//
-// {value} months -//
-//
-// ); -// }; diff --git a/src/components/GetStarted/StartValidation.tsx b/src/components/GetStarted/StartValidation.tsx new file mode 100644 index 0000000..483fe3b --- /dev/null +++ b/src/components/GetStarted/StartValidation.tsx @@ -0,0 +1,16 @@ +import EmployerValidation from "./EmployerValidation"; + +const StartValidation = () => { + + return ( + <> +
+
+ +
+
+ + ); +}; + +export default StartValidation; diff --git a/src/components/GetStarted/YourAreAlmostThere.tsx b/src/components/GetStarted/YourAreAlmostThere.tsx deleted file mode 100644 index 3bbe2ee..0000000 --- a/src/components/GetStarted/YourAreAlmostThere.tsx +++ /dev/null @@ -1,402 +0,0 @@ -import React from "react"; -import { Button, InputCompOne } from ".."; - -import {Formik, Form} from 'formik' -import * as Yup from "yup"; - -const initialValues = { - job_title: "", - employer_name: "", - employer_email:"", - date_of_resumption: "", - employee_id: "", - annual_income: "", - monthly_salary: "", - salary_payment_date: "", - ref_name: "", - ref_email: "", - ref_number: "", - ref_relationship: "", - ref_bvn: "", - ref_two_name: "", - ref_two_email: "", - ref_two_number: "", - ref_two_relationship: "", - ref_two_bvn: "", -}; - -// To get the validation schema -const validationSchema = Yup.object().shape({ - job_title: Yup.string() - .required("Required"), - employer_name: Yup.string() - .required("Required"), - date_of_resumption: Yup.string() - .required("Required"), - employer_email: Yup.string() - .email("Invalid") - .required("Required"), - annual_income: Yup.string() - .required("Required") - .test("no-e", "Invalid", (value:any) => { - if (value && /^[0-9]*$/.test(value) == false) { - return false; - } - return true; - }), - monthly_salary: Yup.string() - .required("Required") - .test("no-e", "Invalid", (value:any) => { - if (value && /^[0-9]*$/.test(value) == false) { - return false; - } - return true; - }), - salary_payment_date: Yup.string() - .required("Required"), - employee_id: Yup.string() - .required("Required"), - ref_name: Yup.string() - .required("Required"), - ref_email: Yup.string() - .email("Invalid") - .required("Required"), - ref_number: Yup.string() - .required("Required"), - ref_relationship: Yup.string() - .required("Required"), - ref_bvn: Yup.string() - .required("BVN is required") - .test("no-e", "Invalid number", (value:any) => { - if (value && /^[0-9]*$/.test(value) == false) { - return false; - } - return true; - }) - .min(11, "must be 11 digits") - .max(11, "must be 11 digits"), - ref_two_name: Yup.string() - .required("Required"), - ref_two_email: Yup.string() - .email("Invalid") - .required("Required"), - ref_two_number: Yup.string() - .required("Required"), - ref_two_relationship: Yup.string() - .required("Required"), - ref_two_bvn: Yup.string() - .required("BVN is required") - .test("no-e", "Invalid number", (value:any) => { - if (value && /^[0-9]*$/.test(value) == false) { - return false; - } - return true; - }) - .min(11, "must be 11 digits") - .max(11, "must be 11 digits"), -}); - -interface YourAreAlmostThereProps { - handleNextStep: any; -} - -const YourAreAlmostThere: React.FC = ({ handleNextStep }) => { - - //FUNCTION TO HANDLE SUBMIT - const handleSubmit = (values:any) => { - console.log(values) - handleNextStep() - }; - - return ( - <> -

- You’re almost there -

- - {(props)=>( -
-
- <> -
-

- EMPLOYMENT DETAILS -

-
- -
- -
- - -
-
- - -
-
- - -
- -
- - - <> -
-

- REFERENCE DETAILS ( Must be 18 years and above ) -

-
-
-
-
-
- - -
-
- - -
- -
-
-
- - -
-
- - -
- -
-
-
- - -
-
- )} -
- - ); -}; - -export default YourAreAlmostThere; diff --git a/src/components/GetStarted/index.ts b/src/components/GetStarted/index.ts index d85f971..3013c3d 100644 --- a/src/components/GetStarted/index.ts +++ b/src/components/GetStarted/index.ts @@ -1,3 +1,3 @@ -import GetStarted from "./GetStarted"; +import StartValidation from "./StartValidation"; -export { GetStarted }; +export { StartValidation }; diff --git a/src/components/auth/OTP.tsx b/src/components/auth/OTP.tsx index 3cd3ed5..c8eff87 100644 --- a/src/components/auth/OTP.tsx +++ b/src/components/auth/OTP.tsx @@ -70,8 +70,8 @@ export default function Login() {
{ // FUNCTION TO GET USER BY ID // let data = {firstname:'firstname', lastname:'lastname', uid:'28273737646466464'} getUserByID(uid).then(res=>{ if(!res.data.call_return || !Object.keys(res.data.customer).length){ - navigate(RouteHandler.letsGetStarted, {replace:true}) + navigate('', {replace:true}) return } setLoading(false) dispatch(updateUserDetails(res.data.customer)); }).catch(err=>{ - navigate(RouteHandler.letsGetStarted, {replace:true}) + navigate('', {replace:true}) console.log('USER ERROR', err) }) } diff --git a/src/layouts/DashboardLayout/DashboardLayout.tsx b/src/layouts/DashboardLayout/DashboardLayout.tsx index 892250c..cc080d5 100644 --- a/src/layouts/DashboardLayout/DashboardLayout.tsx +++ b/src/layouts/DashboardLayout/DashboardLayout.tsx @@ -1,5 +1,5 @@ import { ReactNode, useState, useEffect } from "react"; -import { RouteHandler } from "../../router/routes"; +// import { RouteHandler } from "../../router/routes"; import { useNavigate } from "react-router-dom"; import Aside from "./Aside"; @@ -36,7 +36,7 @@ export default function DashboardLayout({ children }: { children: ReactNode }) { const logoutUser = () => { localStorage.clear() - navigate(RouteHandler.letsGetStarted, {replace:true}) + navigate('', {replace:true}) } return ( diff --git a/src/pages/GetStartedPage.tsx b/src/pages/GetStartedPage.tsx deleted file mode 100644 index baad895..0000000 --- a/src/pages/GetStartedPage.tsx +++ /dev/null @@ -1,31 +0,0 @@ -import React from "react"; -import { GetStarted as Main } from "../components"; -import { Layout } from "../layouts"; -// import BVN from "../components/GetStarted/BVN"; - -const GetStartedPage: React.FC = () => { - const [step, setStep] = React.useState(1); - - const handleNextStep = () => { - if (step < 5) { - setStep(step + 1); - } - }; - - return ( - <> - {/* {step == 1 ? - - - - : - null - } */} - -
- - - ); -}; - -export default GetStartedPage; diff --git a/src/pages/StartValidationPage.tsx b/src/pages/StartValidationPage.tsx new file mode 100644 index 0000000..eca9900 --- /dev/null +++ b/src/pages/StartValidationPage.tsx @@ -0,0 +1,16 @@ +import React from "react"; +import { StartValidation } from "../components"; +import { Layout } from "../layouts"; + +const StartValidationPage: React.FC = () => { + + return ( + <> + + + + + ); +}; + +export default StartValidationPage; diff --git a/src/pages/index.ts b/src/pages/index.ts index b53ab89..4d1a97b 100644 --- a/src/pages/index.ts +++ b/src/pages/index.ts @@ -1,7 +1,7 @@ import HomePage from "./HomePage"; import LoginPage from "./LoginPage"; import OTPPage from "./OTPPage"; -import GetStartedPage from "./GetStartedPage"; +import StartValidationPage from "./StartValidationPage"; // import DashboardHomePage from "./DashboardHomePage"; // import DashboardLegalsPage from "./DashboardLegalsPage"; // import DashboardProfilePage from "./DashboardProfilePage"; @@ -17,7 +17,7 @@ export { HomePage, LoginPage, OTPPage, - GetStartedPage, + StartValidationPage, // DashboardHomePage, // DashboardLegalsPage, // DashboardProfilePage, diff --git a/src/router/Router.tsx b/src/router/Router.tsx index c524109..da16509 100644 --- a/src/router/Router.tsx +++ b/src/router/Router.tsx @@ -3,7 +3,7 @@ import { RouteHandler } from "./routes"; import { DashboardAuth, Layout } from "../layouts"; import { - GetStartedPage, + StartValidationPage, LoginPage, OTPPage, // HomePage, @@ -27,7 +27,7 @@ const Routers = () => { } /> - } /> + } /> {/* } /> */} {/*