diff --git a/src/components/Dashboard/DashboardHomeIntro.tsx b/src/components/Dashboard/DashboardHomeIntro.tsx index 2026e2c..638794f 100644 --- a/src/components/Dashboard/DashboardHomeIntro.tsx +++ b/src/components/Dashboard/DashboardHomeIntro.tsx @@ -101,7 +101,7 @@ const DashboardHomeIntro: FC = ({ const [userLoanList, setUserLoanList] = useState<{ loading: boolean; - data: PendingTableList; + data: Array; }>({ loading: true, data: [] }); useEffect(() => { @@ -120,6 +120,7 @@ const DashboardHomeIntro: FC = ({ }) .catch((err) => { setUserLoanList({ loading: false, data: [] }); + console.log(err) }); }, []); @@ -209,7 +210,7 @@ const DashboardHomeIntro: FC = ({ - diff --git a/src/components/Dashboard/PendingLoanPopout.tsx b/src/components/Dashboard/PendingLoanPopout.tsx index bb62a32..e3c9679 100644 --- a/src/components/Dashboard/PendingLoanPopout.tsx +++ b/src/components/Dashboard/PendingLoanPopout.tsx @@ -1,4 +1,4 @@ -import React, {useState} from 'react' +import {useState} from 'react' import ModalWrapper from '../modal/ModalWrapper' import { PendingTableList } from '../../core/models' import { NewDateTimeFormatter } from '../../lib/NewDateTimeFormatter' @@ -12,6 +12,7 @@ interface Props { } export default function PendingLoanPopout({data, action}:Props) { + console.log('MUMU', data) const [addCardStatus, setAddCardStatus] = useState<{ loading: boolean; @@ -19,7 +20,7 @@ export default function PendingLoanPopout({data, action}:Props msg: string }>({ loading: false, status: false, msg: ''}); - const handleAddCard = (appID:string) => { + const handleAddCard = (appID:string | undefined) => { let reqData = { application_uid: appID diff --git a/src/components/Dashboard/employmentDetails/EmploymentDetails.tsx b/src/components/Dashboard/employmentDetails/EmploymentDetails.tsx index 9e3b532..caaa975 100644 --- a/src/components/Dashboard/employmentDetails/EmploymentDetails.tsx +++ b/src/components/Dashboard/employmentDetails/EmploymentDetails.tsx @@ -8,9 +8,9 @@ import { getEmployer } from '../../../core/apiRequest'; import CustomSpinner from '../../CustomSpinner'; import { FormatAmount } from '../../../lib/FormatAmount'; -type Props = { - handleNextStep?:(value:{})=>any -} +// type Props = { +// handleNextStep?:(value:{})=>any +// } // type EmployerProps = { // loading?: boolean, @@ -87,7 +87,7 @@ const validationSchema = Yup.object().shape({ }), }); -export default function EmploymentDetail({handleNextStep}:Props) { +export default function EmploymentDetail() { const [employerList, setEmployerList] = useState({ loading: true, @@ -96,21 +96,13 @@ export default function EmploymentDetail({handleNextStep}:Props) { //FUNCTION TO HANDLE SUBMIT - const handleSubmit = (values:any) => { - // if(values.employer_uid){ - // let employer_uid = values.employer_uid - // delete values.employer_uid - // handleNextStep({employer_uid, employment: values}) - // }else{ - // handleNextStep({employment: values}) - // } + const handleSubmit = () => { console.log('good') }; useEffect(()=>{ getEmployer().then(res => { setEmployerList({loading:false, data:res?.data?.employer}) - // console.log('RES', res) }).catch(err => { console.log(err) setEmployerList({loading:false, data:{}}) @@ -178,7 +170,7 @@ export default function EmploymentDetail({handleNextStep}:Props) { placeholder="Mr. Mark John" value={props.values.name} onChange={props.handleChange} - error={(props.errors.name && props.touched.name) ? props.errors.name : ''} + // error={(props.errors.name && props.touched.name) ? props.errors.name : ''} /> @@ -234,7 +226,7 @@ export default function EmploymentDetail({handleNextStep}:Props) { placeholder="Software Engineer" value={props.values.job_title} onChange={props.handleChange} - error={(props.errors.job_title && props.touched.job_title) ? props.errors.job_title : ''} + // error={(props.errors.job_title && props.touched.job_title) ? props.errors.job_title : ''} />
@@ -291,7 +283,7 @@ export default function EmploymentDetail({handleNextStep}:Props) { placeholder="1,200,000" value={FormatAmount(props.values.annual_salary)} onChange={props.handleChange} - error={(props.errors.annual_salary && props.touched.annual_salary) ? props.errors.annual_salary : ''} + // error={(props.errors.annual_salary && props.touched.annual_salary) ? props.errors.annual_salary : ''} />