investor changes
This commit is contained in:
@@ -186,7 +186,6 @@ const DepositHistory = () => {
|
||||
),
|
||||
"Amount in Investor currency": (
|
||||
<Box
|
||||
w={"120px"}
|
||||
isTruncated={true}
|
||||
display={"flex"}
|
||||
justifyContent={"end"}
|
||||
|
||||
@@ -21,7 +21,7 @@ import React, { useContext, useEffect, useState } from "react";
|
||||
import { OPACITY_ON_LOAD } from "../../../Layout/animations";
|
||||
import NormalTable from "../../../Components/DataTable/NormalTable";
|
||||
import { HiDotsVertical } from "react-icons/hi";
|
||||
import { Link, Navigate, Link as RouterLink } from "react-router-dom";
|
||||
import { Link, Navigate, Link as RouterLink, useParams } from "react-router-dom";
|
||||
import {
|
||||
AddIcon,
|
||||
DeleteIcon,
|
||||
@@ -34,6 +34,7 @@ import GlobalStateContext from "../../../Contexts/GlobalStateContext";
|
||||
import CustomAlertDialog from "../../../Components/CustomAlertDialog";
|
||||
import ToastBox from "../../../Components/ToastBox";
|
||||
import { debounce } from "../../Master/Sponser/AddSponser";
|
||||
import { useGetInvestorsDetailsById_InInvCurQuery } from "../../../Services/investor.details.service";
|
||||
|
||||
const formatDate = (date) => new Date(date).toLocaleDateString(); // Simple date formatter
|
||||
|
||||
@@ -48,6 +49,17 @@ const ViewInvestorDetails = () => {
|
||||
const [mouseEntered, setMouseEntered] = useState(false);
|
||||
const [mouseEnteredId, setMouseEnteredId] = useState("");
|
||||
const [isSwitchOn, setIsSwitchOn] = useState(false);
|
||||
// const params = useParams();
|
||||
// const id = params?.id;
|
||||
|
||||
|
||||
// const { data, errors, refetch} = useGetInvestorsDetailsById_InInvCurQuery(id, {
|
||||
// skip: !id,
|
||||
// });
|
||||
|
||||
// console.log(data);
|
||||
|
||||
|
||||
|
||||
useEffect(() => {
|
||||
// Simulate loading
|
||||
@@ -62,9 +74,10 @@ const ViewInvestorDetails = () => {
|
||||
// ====================================================[Table Setup]================================================================
|
||||
const tableHeadRow = [
|
||||
// "Sr N/O",
|
||||
"Deal Name",
|
||||
// "Deal Name",
|
||||
"IO Name",
|
||||
"Sponsor Name",
|
||||
"Investment Type",
|
||||
"Investment Amount",
|
||||
"Percentage",
|
||||
"Market Value",
|
||||
@@ -118,13 +131,6 @@ const ViewInvestorDetails = () => {
|
||||
</Text>
|
||||
</Box>
|
||||
),
|
||||
"Deal Name": (
|
||||
<Box w={"auto"} isTruncated={true}>
|
||||
<Text as={"span"} color={"teal.900"}>
|
||||
{item.investmentTypeName}
|
||||
</Text>
|
||||
</Box>
|
||||
),
|
||||
"Sponsor Name": (
|
||||
<Box w={"auto"} isTruncated={true}>
|
||||
<Text as={"span"} color={"teal.900"}>
|
||||
@@ -132,6 +138,13 @@ const ViewInvestorDetails = () => {
|
||||
</Text>
|
||||
</Box>
|
||||
),
|
||||
"Investment Type": (
|
||||
<Box w={"auto"} isTruncated={true}>
|
||||
<Text as={"span"} color={"teal.900"}>
|
||||
{item.investmentTypeName}
|
||||
</Text>
|
||||
</Box>
|
||||
),
|
||||
"Investment Amount": (
|
||||
<Box w={"auto"} isTruncated={true}>
|
||||
<Text as={"span"} color={"teal.900"}>
|
||||
@@ -309,7 +322,7 @@ const ViewInvestorDetails = () => {
|
||||
value={searchTerm}
|
||||
onChange={(e) => setSearchTerm(e.target.value)}
|
||||
/>
|
||||
<Box
|
||||
{/* <Box
|
||||
as="button"
|
||||
display="flex"
|
||||
alignItems="center"
|
||||
@@ -347,7 +360,7 @@ const ViewInvestorDetails = () => {
|
||||
>
|
||||
{isSwitchOn ? "Investor Currency" : "Investor Currency"}
|
||||
</Text>
|
||||
</Box>
|
||||
</Box> */}
|
||||
{/* <HStack display={"flex"} alignItems={"center"}>
|
||||
<Pagination totalItems={10} />
|
||||
</HStack> */}
|
||||
|
||||
@@ -10,7 +10,7 @@ import {
|
||||
MenuItem,
|
||||
MenuList,
|
||||
Portal,
|
||||
Select,
|
||||
Select,
|
||||
Switch,
|
||||
Tag,
|
||||
Text,
|
||||
|
||||
@@ -193,7 +193,7 @@ const ViewHistory = () => {
|
||||
</Box>
|
||||
),
|
||||
"Amount in Investor currency": (
|
||||
<Box w={"120px"} isTruncated={true} display={'flex'} justifyContent={'end'}>
|
||||
<Box isTruncated={true} display={'flex'} justifyContent={'end'}>
|
||||
<Text as={"span"} color={"teal.900"}>
|
||||
{parseFloat(item?.investorAmount||0).toLocaleString(undefined, { minimumFractionDigits: 2, maximumFractionDigits: 2 })}<Badge ms={1} colorScheme="green">{item?.currencyCode}</Badge>
|
||||
</Text>
|
||||
|
||||
@@ -83,11 +83,11 @@ export const nav = [
|
||||
path: "/investor-details",
|
||||
icon: TbListDetails,
|
||||
},
|
||||
{
|
||||
title: "Investor Transactions",
|
||||
path: "/investor-transactions",
|
||||
icon: TbTransactionDollar,
|
||||
},
|
||||
// {
|
||||
// title: "Investor Transactions",
|
||||
// path: "/investor-transactions",
|
||||
// icon: TbTransactionDollar,
|
||||
// },
|
||||
],
|
||||
type: "accordion",
|
||||
Icon: TbCalendarDollar,
|
||||
|
||||
@@ -12,7 +12,7 @@ import ViewIOdata from "../Pages/IO_Management/ViewIO/ViewIOdata";
|
||||
import InvestorPendingRequest from "../Pages/InvestorUpgrade/InvestorRequest";
|
||||
import UpgradeHistory from "../Pages/InvestorUpgrade/UpgradeHistory";
|
||||
import InvestorDetails from "../Pages/Investor_Management/InvestorDetails/InvestorDetails";
|
||||
import InvestorTransactions from "../Pages/Investor_Management/InvestorTransactions";
|
||||
// import InvestorTransactions from "../Pages/Investor_Management/InvestorTransactions";
|
||||
import ProfileView from "../Pages/Investor_Management/InvestorDetails/ProfileView";
|
||||
import ViewInvestorDetails from "../Pages/Investor_Management/InvestorDetails/ViewInvestorDetails";
|
||||
import ExchangeRate from "../Pages/Master/ExchangeRate/ExchangeRate";
|
||||
@@ -67,7 +67,7 @@ export const RouteLink = [
|
||||
{ path: "/investor-details/profile-view/:id", Component: ProfileView },
|
||||
{ path: "/investor-details/view-investor-details", Component: ViewInvestorDetails },
|
||||
// { path: "/investor-transactions", Component: InvestorTransactions },
|
||||
{ path: "/investor-transactions", Component: UnderConstruction },
|
||||
// { path: "/investor-transactions", Component: UnderConstruction },
|
||||
|
||||
// ===============[ Deposit ]===============
|
||||
{ path: "/deposit-request", Component: DepositRequest },
|
||||
|
||||
@@ -22,9 +22,16 @@ export const investorDetails = createApi({
|
||||
query: (id) => `/investorDetails/admin/byId/${id}`,
|
||||
providesTags: ["getInvestors"],
|
||||
}),
|
||||
|
||||
// =====[get investment details ]
|
||||
getInvestorsDetailsById_InInvCur: builder.query({
|
||||
query: (id) => `/investorDetails/admin/byId/${id}?currencyIn=InvCur`,
|
||||
providesTags: ["getInvestors"],
|
||||
}),
|
||||
|
||||
}),
|
||||
});
|
||||
|
||||
// Export hooks for usage in functional components
|
||||
export const { useGetInvestorsQuery, useGetInvestorsDetailsByIdQuery } =
|
||||
export const { useGetInvestorsQuery, useGetInvestorsDetailsByIdQuery,useGetInvestorsDetailsById_InInvCurQuery } =
|
||||
investorDetails;
|
||||
|
||||
Reference in New Issue
Block a user