kyc & notification fix
This commit is contained in:
@@ -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"),
|
||||
});
|
||||
|
||||
|
||||
|
||||
@@ -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 = () => {
|
||||
|
||||
|
||||
|
||||
<RadioGroup value={value}>
|
||||
<RadioGroup >
|
||||
{data?.data?.KYC?.questions.map((question, index) => (
|
||||
<Radio value={String(index + 1)} isChecked={question?.answers} colorScheme='forestGreen' key={index}>
|
||||
<>
|
||||
<Radio isChecked={question?.answers} colorScheme='forestGreen' key={index}>
|
||||
<Text fontSize={"sm"} mb={0}>{question?.question_text}</Text>
|
||||
</Radio>
|
||||
<CheckboxGroup colorScheme='forestGreen'>
|
||||
<Stack ml={8}>
|
||||
{question?.subQuestions?.map((subQuestion, index) => (
|
||||
<Checkbox isChecked={subQuestion.answers} size="sm" key={index}>
|
||||
<Text as="span">{subQuestion.question_text}</Text>
|
||||
</Checkbox>
|
||||
))}
|
||||
</Stack>
|
||||
</CheckboxGroup>
|
||||
</>
|
||||
))}
|
||||
</RadioGroup>
|
||||
|
||||
{value === '2' && (
|
||||
{/* {value === '2' && (
|
||||
<CheckboxGroup colorScheme='forestGreen'>
|
||||
<Stack ml={8}>
|
||||
{data?.data?.KYC?.questions[0]?.subQuestions?.map((subQuestion, index) => (
|
||||
{data?.data?.KYC?.questions[1]?.subQuestions?.map((subQuestion, index) => (
|
||||
<Checkbox isChecked={subQuestion.answers} size="sm" key={index}>
|
||||
<Text as="span">{subQuestion.question_text}</Text>
|
||||
</Checkbox>
|
||||
))}
|
||||
</Stack>
|
||||
</CheckboxGroup>
|
||||
)}
|
||||
)} */}
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user