From 149667436e37001cb4312a3db1c2764eb8aea162 Mon Sep 17 00:00:00 2001
From: YasinShaikh123 <123150391+YasinShaikh123@users.noreply.github.com>
Date: Fri, 4 Oct 2024 18:06:38 +0530
Subject: [PATCH] updated Kyc
---
src/Components/FormField.jsx | 5 +-
src/Components/FormInputMain.jsx | 4 +-
src/Pages/Admin/Notification.jsx | 6 --
.../IO_Management/CreateIO/IODetails.jsx | 4 +-
.../IO_Management/CreateIO/Investors.jsx | 3 +-
.../InvestorDetails/Kyc.jsx | 80 +++++++++++++++++++
.../InvestorDetails/ProfileView.jsx | 8 +-
7 files changed, 95 insertions(+), 15 deletions(-)
create mode 100644 src/Pages/Investor_Management/InvestorDetails/Kyc.jsx
diff --git a/src/Components/FormField.jsx b/src/Components/FormField.jsx
index 109e62d..b05eb76 100644
--- a/src/Components/FormField.jsx
+++ b/src/Components/FormField.jsx
@@ -69,6 +69,7 @@ const FormField = ({
align,
maxLength,
dateValue,
+ closingDate,
...props
}) => (
);
diff --git a/src/Components/FormInputMain.jsx b/src/Components/FormInputMain.jsx
index 15cdd42..20665ba 100644
--- a/src/Components/FormInputMain.jsx
+++ b/src/Components/FormInputMain.jsx
@@ -60,7 +60,8 @@ const FormInputMain = ({
handleInputChange,
align,
maxLength,
- dateValue
+ dateValue,
+ closingDate
},
key
) => (
@@ -89,6 +90,7 @@ const FormInputMain = ({
align={align}
maxLength={maxLength}
dateValue={dateValue}
+ closingDate={closingDate}
/>
)
)}
diff --git a/src/Pages/Admin/Notification.jsx b/src/Pages/Admin/Notification.jsx
index 28a94ca..3645bed 100644
--- a/src/Pages/Admin/Notification.jsx
+++ b/src/Pages/Admin/Notification.jsx
@@ -304,12 +304,6 @@ const Notification = () => {
onSubmit={handleSubmit(onSubmit)}
btnLoading={isLoading}
>
-
-
-
-
-
-
{
}, [id, IObyID]);
-
-
-
// const minInvestmentById =
@@ -448,6 +445,7 @@ const IODetails = ({ enableNextTab, index, data }) => {
width: "32.3%",
dateValue:formatDatee(IObyID?.data?.closingDate),
// helperText: IObyID && `Current closing date is : ${formatDate(IObyID?.data?.closingDate)}`
+ closingDate:true
},
{
label: "ISIN",
diff --git a/src/Pages/IO_Management/CreateIO/Investors.jsx b/src/Pages/IO_Management/CreateIO/Investors.jsx
index 91e2e61..2a9fe78 100644
--- a/src/Pages/IO_Management/CreateIO/Investors.jsx
+++ b/src/Pages/IO_Management/CreateIO/Investors.jsx
@@ -451,6 +451,7 @@ const Investors = ({ data }) => {
};
+console.log(IODetails?.investors);
return (
@@ -486,7 +487,7 @@ const Investors = ({ data }) => {
fontSize={"xs"}
w={100}
me={2}
- >
+ >
Export xls
diff --git a/src/Pages/Investor_Management/InvestorDetails/Kyc.jsx b/src/Pages/Investor_Management/InvestorDetails/Kyc.jsx
new file mode 100644
index 0000000..b6d5ba2
--- /dev/null
+++ b/src/Pages/Investor_Management/InvestorDetails/Kyc.jsx
@@ -0,0 +1,80 @@
+import { Box, Checkbox, CheckboxGroup, Divider, FormControl, FormLabel, Heading, HStack, Input, Radio, RadioGroup, Select, Stack, Text, Textarea } from "@chakra-ui/react";
+import React, { useState } from "react";
+import { useParams } from "react-router-dom";
+import { useGetInvestorsDetailsByIdQuery } from "../../../Services/investor.details.service";
+
+const Kyc = () => {
+
+ const params = useParams();
+ const id = params?.id;
+ const { data, isLoading:bankDetailsLoading, errors, refetch } = useGetInvestorsDetailsByIdQuery(
+ id,{skip: !id,}
+ );
+ const [value, setValue] = useState('2')
+
+ console.log(data?.data?.KYC?.questions[0]?.question_text);
+
+
+ return (
+ (!bankDetailsLoading &&
+
+ Additional Questions
+ Please provide additional Information to complete your profile.
+
+
+ City
+
+
+
+ Country
+
+
+
+
+
+ Occupation
+
+
+
+ Source of Funds
+
+
+
+
+
+ Address
+
+
+
+
+
+
+
+ Investor Eligibilty Notice
+ Please note that Tanami is currently only available to qualifield or accredited investors. Please confirm your status
+
+
+ {data?.data?.KYC?.questions.map((question, index) => (
+
+ {question?.question_text}
+
+ ))}
+
+
+ {value === '2' && (
+
+
+ {data?.data?.KYC?.questions[0]?.subQuestions?.map((subQuestion, index) => (
+
+ {subQuestion.question_text}
+
+ ))}
+
+
+ )}
+
+ )
+ );
+};
+
+export default Kyc;
diff --git a/src/Pages/Investor_Management/InvestorDetails/ProfileView.jsx b/src/Pages/Investor_Management/InvestorDetails/ProfileView.jsx
index 697f727..26a67b7 100644
--- a/src/Pages/Investor_Management/InvestorDetails/ProfileView.jsx
+++ b/src/Pages/Investor_Management/InvestorDetails/ProfileView.jsx
@@ -23,6 +23,7 @@ import Transaction from "./Transaction";
import FullscreenLoaders from "../../../Components/Loaders/FullscreenLoaders";
import { useGetInvestorsDetailsByIdQuery } from "../../../Services/investor.details.service";
import BankDetails from "./BankDetails";
+import Kyc from "./Kyc";
const ProfileView = () => {
const navigate = useNavigate();
@@ -323,14 +324,14 @@ const ProfileView = () => {
Transaction
- documents
+ KYC
@@ -346,6 +347,9 @@ const ProfileView = () => {
+
+
+