From aa6c61e4a4f3e987f2d2f0bc6d8b929783b2f833 Mon Sep 17 00:00:00 2001 From: "Siddhesh.More" Date: Sat, 5 Oct 2024 20:37:17 +0530 Subject: [PATCH] kyc & notification fix --- src/Pages/Admin/Notification.jsx | 6 +---- .../InvestorDetails/Kyc.jsx | 23 ++++++++++++++----- 2 files changed, 18 insertions(+), 11 deletions(-) diff --git a/src/Pages/Admin/Notification.jsx b/src/Pages/Admin/Notification.jsx index 0d84595..b214b0b 100644 --- a/src/Pages/Admin/Notification.jsx +++ b/src/Pages/Admin/Notification.jsx @@ -45,11 +45,7 @@ export const notification = yup.object().shape({ ), expectedReturn: yup .string() - .required("Expected Return is required") - .matches( - /^[0-9]+(\.[0-9]{1,2})?$/, - "Expected Return must be a valid number with up to 2 decimal places" - ), + .required("Expected Return is required"), }); diff --git a/src/Pages/Investor_Management/InvestorDetails/Kyc.jsx b/src/Pages/Investor_Management/InvestorDetails/Kyc.jsx index c28e970..5bc030b 100644 --- a/src/Pages/Investor_Management/InvestorDetails/Kyc.jsx +++ b/src/Pages/Investor_Management/InvestorDetails/Kyc.jsx @@ -10,7 +10,7 @@ const Kyc = () => { const { data, isLoading:bankDetailsLoading, errors, refetch } = useGetInvestorsDetailsByIdQuery( id,{skip: !id,} ); - const [value, setValue] = useState('2') + // const [value, setValue] = useState('2') console.log(data?.data?.KYC?.questions); @@ -55,25 +55,36 @@ const Kyc = () => { - + {data?.data?.KYC?.questions.map((question, index) => ( - + <> + {question?.question_text} + + + {question?.subQuestions?.map((subQuestion, index) => ( + + {subQuestion.question_text} + + ))} + + + ))} - {value === '2' && ( + {/* {value === '2' && ( - {data?.data?.KYC?.questions[0]?.subQuestions?.map((subQuestion, index) => ( + {data?.data?.KYC?.questions[1]?.subQuestions?.map((subQuestion, index) => ( {subQuestion.question_text} ))} - )} + )} */}