diff --git a/src/App.jsx b/src/App.jsx
index e163d62..22329ab 100644
--- a/src/App.jsx
+++ b/src/App.jsx
@@ -58,6 +58,7 @@ const App = () => {
// isOnline ? (
// isAuthenticate || isAuthenticatedInCookie === "true" ? (
localStorage.getItem('accessToken') && localStorage.getItem('refreshToken') ? (
+ // true ? (
) : (
diff --git a/src/Contexts/GlobalStateProvider.jsx b/src/Contexts/GlobalStateProvider.jsx
index aac69de..8a1b5f2 100644
--- a/src/Contexts/GlobalStateProvider.jsx
+++ b/src/Contexts/GlobalStateProvider.jsx
@@ -3,7 +3,7 @@ import React, { useState } from "react";
import GlobalStateContext from "./GlobalStateContext";
import { effect, useColorMode } from "@chakra-ui/react";
import { v4 as uuidv4 } from "uuid";
-import { TbClock2 } from "react-icons/tb";
+import { TbClock2 } from "react-icons/tb";
import { CiWallet } from "react-icons/ci";
import { HiOutlineReceiptPercent } from "react-icons/hi2";
import { IoMdQrScanner } from "react-icons/io";
@@ -713,36 +713,7 @@ const GlobalStateProvider = ({ children }) => {
]);
const [viewInvestor, setViewInvestor] = useState([
- {
- id: 1,
- dealId: "UWE3424992",
- dealName: "KKR Private Equity Fund",
- sponsorName: "KKR",
- investAmount: "$100,000",
- holdingPeriod: "4-5 years",
- estimatedReturn: "50-60%",
- kycStatus: "Open",
- },
- {
- id: 2,
- dealId: "UWE3424992",
- dealName: "Blackstone Real Estate Income Trust",
- sponsorName: "Blackstone",
- investAmount: "$100,000",
- holdingPeriod: "4-5 years",
- estimatedReturn: "50-60%",
- kycStatus: "Pending",
- },
- {
- id: 3,
- dealId: "UWE3424992",
- dealName: "J.P. Morgan",
- sponsorName: "J.P. Morgan",
- investAmount: "$100,000",
- holdingPeriod: "4-5 years",
- estimatedReturn: "50-60%",
- kycStatus: "Closed",
- },
+
]);
const [transaction, setTransaction] = useState([
{
diff --git a/src/Pages/Investor_Management/InvestorDetails/InvestorDetails.jsx b/src/Pages/Investor_Management/InvestorDetails/InvestorDetails.jsx
index 0dfd678..f63bfe7 100644
--- a/src/Pages/Investor_Management/InvestorDetails/InvestorDetails.jsx
+++ b/src/Pages/Investor_Management/InvestorDetails/InvestorDetails.jsx
@@ -142,7 +142,7 @@ const InvestorDetails = () => {
{item.clientReference_id}
-
+
),
"First Name": (
diff --git a/src/Pages/Investor_Management/InvestorDetails/ProfileView.jsx b/src/Pages/Investor_Management/InvestorDetails/ProfileView.jsx
index 08f3c9c..7372d33 100644
--- a/src/Pages/Investor_Management/InvestorDetails/ProfileView.jsx
+++ b/src/Pages/Investor_Management/InvestorDetails/ProfileView.jsx
@@ -25,7 +25,7 @@ import { useGetInvestorsDetailsByIdQuery } from "../../../Services/investor.deta
const ProfileView = () => {
const navigate = useNavigate();
const params = useParams();
- const { InvestorDetails } = useContext(GlobalStateContext);
+ const { InvestorDetails,setViewInvestor } = useContext(GlobalStateContext);
const { reset } = useForm(); // assuming react-hook-form
const id = params?.id;
@@ -36,6 +36,13 @@ const ProfileView = () => {
const foundObject = data?.data;
+
+ useEffect(()=>{
+ setViewInvestor(data?.data?.protfolio)
+ },[data])
+
+
+
@@ -237,7 +244,7 @@ const ProfileView = () => {
View Details
{
Portfolio
{
const [actionId, setActionId] = useState(false);
const [mouseEntered, setMouseEntered] = useState(false);
const [mouseEnteredId, setMouseEnteredId] = useState("");
-
+
useEffect(() => {
// Simulate loading
const timer = setTimeout(() => {
@@ -70,21 +70,15 @@ const ViewInvestorDetails = () => {
"Action",
];
- const handleUpdateStatus = debounce((id) => {
- setViewInvestor((prevData) =>
- prevData.map((viewInvestor) =>
- viewInvestor.id === id ? { ...viewInvestor } : viewInvestor
- )
- );
- toast({
- render: () => ,
- });
- }, 300);
+console.log(viewInvestor);
+
+
+
// ====================================================[Table Filter]================================================================
const filteredData = viewInvestor?.filter((item) => {
// Filter by name (case insensitive)
- const name = item.dealId;
+ const name = item.sponsorName;
const searchLower = searchTerm.toLowerCase();
const nameMatches = name?.toLowerCase().includes(searchLower);
@@ -100,6 +94,8 @@ const ViewInvestorDetails = () => {
return nameMatches;
});
+ console.log(filteredData);
+
const extractedArray = filteredData?.map((item) => ({
id: item?.id,
"Sr N/O": (
@@ -109,13 +105,13 @@ const ViewInvestorDetails = () => {
color={"gray.600"}
className="d-flex align-items-center fw-bold web-text-small"
>
- {item.id}
+ {item.IOId}
),
"Deal Name": (
- {item.dealName}
+ {item.investmentTypeName}
),
@@ -129,21 +125,21 @@ const ViewInvestorDetails = () => {
"Investment Amount": (
- {item.investAmount}
+ {item.investedAmount}
),
"Holding Period": (
- {item.holdingPeriod}
+ {item.Investor_Holidings}
),
"Estimated return": (
- {item.estimatedReturn}
+ {item.TotalReturn}
),
@@ -153,16 +149,16 @@ const ViewInvestorDetails = () => {
fontWeight={"500"}
textTransform={"none"}
color={
- item.kycStatus === "Open"
+ item.statusAdmin === "Open"
? "green"
- : item.kycStatus === "Pending"
+ : item.statusAdmin === "Pending"
? "blue"
: "red"
}
px={2}
py={0.5}
>
- {item.kycStatus}
+ {item.statusAdmin}
),