diff --git a/.env b/.env
index c0c1b21..b8d5625 100644
--- a/.env
+++ b/.env
@@ -3,4 +3,7 @@ DIGIFI_PORT=5173
# Social Links
FACEBOOK_URL=https://www.facebook.com
TWITTER_URL=https://twitter.com
-INSTAGRAM_URL=https://www.instagram.com
\ No newline at end of file
+INSTAGRAM_URL=https://www.instagram.com
+
+# BACKEND END POINTS
+VITE_USERS_ENDPOINT='https://digifi-apidev.chiefsoft.net/digiusers/v1'
\ No newline at end of file
diff --git a/.env.development b/.env.development
index 90d9e86..71ce632 100644
--- a/.env.development
+++ b/.env.development
@@ -3,4 +3,7 @@ DIGIFI_PORT=5173
# Social Links
VITE_FACEBOOK_URL=https://www.facebook.com
VITE_TWITTER_URL=https://twitter.com
-VITE_INSTAGRAM_URL=https://www.instagram.com
\ No newline at end of file
+VITE_INSTAGRAM_URL=https://www.instagram.com
+
+# BACKEND END POINTS
+VITE_USERS_ENDPOINT='https://digifi-apidev.chiefsoft.net/digiusers/v1'
\ No newline at end of file
diff --git a/.env.production b/.env.production
index c0c1b21..b8d5625 100644
--- a/.env.production
+++ b/.env.production
@@ -3,4 +3,7 @@ DIGIFI_PORT=5173
# Social Links
FACEBOOK_URL=https://www.facebook.com
TWITTER_URL=https://twitter.com
-INSTAGRAM_URL=https://www.instagram.com
\ No newline at end of file
+INSTAGRAM_URL=https://www.instagram.com
+
+# BACKEND END POINTS
+VITE_USERS_ENDPOINT='https://digifi-apidev.chiefsoft.net/digiusers/v1'
\ No newline at end of file
diff --git a/src/components/Dashboard/DashboardFormInit.tsx b/src/components/Dashboard/DashboardFormInit.tsx
index 220fc8b..980dc8c 100644
--- a/src/components/Dashboard/DashboardFormInit.tsx
+++ b/src/components/Dashboard/DashboardFormInit.tsx
@@ -3,20 +3,20 @@ import {Formik, Form} from 'formik'
import * as Yup from "yup";
type Props = {
- handleNextStep:()=>any
+ handleNextStep:(value:{})=>any
}
const initialValues = {
- amount: "",
- duration: "",
- id: "",
+ loan_amount: "",
+ payment_month: "",
+ sales_agent: "",
};
// To get the validation schema
const validationSchema = Yup.object().shape({
- duration: Yup.string()
+ payment_month: Yup.string()
.required("Required"),
- amount: Yup.string()
+ loan_amount: Yup.string()
.required("Required")
.test("no-e", "Invalid", (value:any) => {
if (value && /^[0-9]*$/.test(value) == false) {
@@ -24,16 +24,15 @@ const validationSchema = Yup.object().shape({
}
return true;
}),
- id: Yup.string()
+ sales_agent: Yup.string()
.required("Required")
});
export default function DashboardFormInit({handleNextStep}:Props) {
//FUNCTION TO HANDLE SUBMIT
- const handleSubmit = (values:any) => {
- console.log(values)
- handleNextStep()
+ const handleSubmit = (values:{}) => {
+ handleNextStep(values)
};
return (
@@ -51,40 +50,40 @@ export default function DashboardFormInit({handleNextStep}:Props) {
>
diff --git a/src/components/Dashboard/home/DashboardHomeAttestation.tsx b/src/components/Dashboard/home/DashboardHomeAttestation.tsx
index f3ea735..67df9c6 100644
--- a/src/components/Dashboard/home/DashboardHomeAttestation.tsx
+++ b/src/components/Dashboard/home/DashboardHomeAttestation.tsx
@@ -6,30 +6,32 @@ import * as Yup from "yup";
// import { RouteHandler } from '../../../router/routes';
type Props = {
- handleNextStep:()=>any
+ handleNextStep:(value:{})=>any
+ applicationDetails: {}
}
const initialValues = {
- account_number: "",
+ account: "",
checked: false
};
// To get the validation schema
const validationSchema = Yup.object().shape({
- account_number: Yup.string()
+ 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}:Props) {
+export default function DashboardHomeAttestation({handleNextStep, applicationDetails}:Props) {
// let navigate = useNavigate();
// const navigateToProfile = () => navigate(RouteHandler.dashboardProfile);
//FUNCTION TO HANDLE SUBMIT
const handleSubmit = (values:any) => {
- console.log(values)
- handleNextStep()
+ delete values.checked
+ handleNextStep({disbursement: values})
+ console.log('ApplicationDetails', applicationDetails)
};
return (
@@ -50,15 +52,15 @@ export default function DashboardHomeAttestation({handleNextStep}:Props) {
diff --git a/src/components/Dashboard/home/DashboardHomeDetail.tsx b/src/components/Dashboard/home/DashboardHomeDetail.tsx
index 991820e..5205328 100644
--- a/src/components/Dashboard/home/DashboardHomeDetail.tsx
+++ b/src/components/Dashboard/home/DashboardHomeDetail.tsx
@@ -4,7 +4,7 @@ import {Formik, Form} from 'formik'
import * as Yup from "yup";
type Props = {
- handleNextStep:()=>any
+ handleNextStep:(value:{})=>any
}
const initialValues = {
@@ -34,8 +34,7 @@ export default function DashboardHomeDetail({handleNextStep}:Props) {
//FUNCTION TO HANDLE SUBMIT
const handleSubmit = (values:any) => {
- console.log(values)
- handleNextStep()
+ handleNextStep(values)
};
return (
diff --git a/src/components/Dashboard/home/DashboardHomeEmploymentInfo.tsx b/src/components/Dashboard/home/DashboardHomeEmploymentInfo.tsx
index a5767e0..b5d86d2 100644
--- a/src/components/Dashboard/home/DashboardHomeEmploymentInfo.tsx
+++ b/src/components/Dashboard/home/DashboardHomeEmploymentInfo.tsx
@@ -4,36 +4,36 @@ import {Formik, Form} from 'formik'
import * as Yup from "yup";
type Props = {
- handleNextStep:()=>any
+ handleNextStep:(value:{})=>any
}
const initialValues = {
job_title: "",
- employer_name: "",
- job_sector: "",
+ name: "",
+ sector: "",
industry: "",
- date_of_resumption: "",
- employer_email:"",
+ resumption_date: "",
+ email:"",
annual_income: "",
monthly_salary: "",
salary_payment_date: "",
- employee_id: "",
- qualification: ""
+ employment_id: "",
+ highest_eductaion: ""
};
// To get the validation schema
const validationSchema = Yup.object().shape({
job_title: Yup.string()
.required("Required"),
- employer_name: Yup.string()
+ name: Yup.string()
.required("Required"),
- job_sector: Yup.string()
+ sector: Yup.string()
.required("Required"),
industry: Yup.string()
.required("Required"),
- date_of_resumption: Yup.string()
+ resumption_date: Yup.string()
.required("Required"),
- employer_email: Yup.string()
+ email: Yup.string()
.email("Invalid")
.required("Required"),
annual_income: Yup.string()
@@ -54,9 +54,9 @@ const validationSchema = Yup.object().shape({
}),
salary_payment_date: Yup.string()
.required("Required"),
- employee_id: Yup.string()
+ employment_id: Yup.string()
.required("Required"),
- qualification: Yup.string()
+ highest_eductaion: Yup.string()
.required("Required"),
});
@@ -65,8 +65,7 @@ export default function DashboardHomeEmploymentInfo({handleNextStep}:Props) {
//FUNCTION TO HANDLE SUBMIT
const handleSubmit = (values:any) => {
- console.log(values)
- handleNextStep()
+ handleNextStep({employment: values})
};
@@ -99,29 +98,29 @@ export default function DashboardHomeEmploymentInfo({handleNextStep}:Props) {
/>
@@ -205,28 +204,28 @@ export default function DashboardHomeEmploymentInfo({handleNextStep}:Props) {
/>