portpolio api

This commit is contained in:
YasinShaikh123
2024-08-23 18:00:44 +05:30
parent 187841b178
commit 8b97add9e0
6 changed files with 76 additions and 21 deletions

View File

@@ -62,7 +62,7 @@ const DeletionRequest = () => {
}, []);
// ====================================================[Table Filter]================================================================
const filteredData = data?.data?.filter((item) => {
const filteredData = data?.data?.rows?.filter((item) => {
// Filter by name (case insensitive)
const name = item?.firstName;
const searchLower = searchTerm.toLowerCase();

View File

@@ -110,7 +110,7 @@ const ViewIOTable = () => {
</Box>
),
"IO Name": (
<Box w={"auto"} isTruncated={true}>
<Box w={"100px"} isTruncated={true}>
<Text as={"span"} color={"teal.900"} fontWeight={"500"}>
{item.investmentNameEnglish ? item.investmentNameEnglish : "---"}
</Text>
@@ -124,7 +124,7 @@ const ViewIOTable = () => {
</Box>
),
"Investment Type": (
<Box w={"auto"} isTruncated={true}>
<Box w={"120px"} isTruncated={true}>
<Text as={"span"} color={"teal.900"} fontWeight={"500"}>
{item?.investmentType?.investmentTypeName
? item.investmentType?.investmentTypeName

View File

@@ -40,12 +40,14 @@ const ProfileView = () => {
skip: !id,
});
const foundObject = data?.data;
useEffect(() => {
setViewInvestor(data?.data?.portfolio);
setTransaction(data?.data?.transaction);
setInvestorWallet(data?.data.wallet);
setInvestorWallet(data?.data.wallet);
}, [data]);
const formFields = [

View File

@@ -64,8 +64,13 @@ const ViewInvestorDetails = () => {
"Deal Name",
"Sponsor Name",
"Investment Amount",
"Holding Period",
"Estimated return",
"Percentage",
"Market Value",
"Return on Investment",
"Distribution",
"Distribution Percent",
"Total return",
"Total return on Investment",
"Status",
// "Action",
];
@@ -123,21 +128,69 @@ console.log(viewInvestor);
"Investment Amount": (
<Box w={"auto"} isTruncated={true}>
<Text as={"span"} color={"teal.900"}>
{item.investedAmount}
{/* {item.investedAmount} */}
$ {parseFloat(item?.investedAmount || 0).toLocaleString(undefined, {
minimumFractionDigits: 2,
maximumFractionDigits: 2,
})}
</Text>
</Box>
),
"Holding Period": (
"Percentage": (
<Box w={"auto"} isTruncated={true}>
<Text as={"span"} color={"teal.900"}>
{item.Investor_Holidings}
{item?.MarketValue_Per} %
</Text>
</Box>
),
"Estimated return": (
"Market Value": (
<Box w={"auto"} isTruncated={true}>
<Text as={"span"} color={"teal.900"}>
{item.TotalReturn}
$ {parseFloat(item?.MarketValue || 0).toLocaleString(undefined, {
minimumFractionDigits: 2,
maximumFractionDigits: 2,
})}
</Text>
</Box>
),
"Return on Investment": (
<Box w={"auto"} isTruncated={true}>
<Text as={"span"} color={"teal.900"}>
{item.TotalReturn} %
</Text>
</Box>
),
"Distribution": (
<Box w={"auto"} isTruncated={true}>
<Text as={"span"} color={"teal.900"}>
$ {parseFloat(item?.DistributionAmountReceived || 0).toLocaleString(undefined, {
minimumFractionDigits: 2,
maximumFractionDigits: 2,
})}
</Text>
</Box>
),
"Distribution Percent": (
<Box w={"auto"} isTruncated={true}>
<Text as={"span"} color={"teal.900"}>
{item?.Distribution_Per} %
</Text>
</Box>
),
"Total return": (
<Box w={"auto"} isTruncated={true}>
<Text as={"span"} color={"teal.900"}>
$ {parseFloat(item?.TotalReturn || 0).toLocaleString(undefined, {
minimumFractionDigits: 2,
maximumFractionDigits: 2,
})}
</Text>
</Box>
),
"Total return on Investment": (
<Box w={"auto"} isTruncated={true}>
<Text as={"span"} color={"teal.900"}>
{item.TotalReturn_Per} %
</Text>
</Box>
),

View File

@@ -68,9 +68,9 @@ const ExchangeRate = () => {
// ====================================================[Table Setup]================================================================
const tableHeadRow = [
"Sr.No",
"From currency",
"To currency",
"Effective from",
"From Currency",
"To Currency",
"Effective From",
"Rate",
"Action",
];
@@ -87,7 +87,7 @@ const ExchangeRate = () => {
{index + 1}.
</Text>
),
"From currency": (
"From Currency": (
<Text
justifyContent={slideFromRight ? "right" : "left"}
as={"span"}
@@ -98,7 +98,7 @@ const ExchangeRate = () => {
{item?.fromCurrency?.currencyCode}
</Text>
),
"To currency": (
"To Currency": (
<Text
justifyContent={slideFromRight ? "right" : "left"}
as={"span"}
@@ -109,7 +109,7 @@ const ExchangeRate = () => {
{item?.toCurrency?.currencyCode}
</Text>
),
"Effective from": (
"Effective From": (
<Text
justifyContent={slideFromRight ? "right" : "left"}
as={"span"}

View File

@@ -61,14 +61,14 @@ const Sponser = () => {
// ====================================================[Table Setup]================================================================
const tableHeadRow = [
"Sponsor name",
"Email address",
"Sponsor Name",
"Email Address",
"Status",
"Action",
];
const extractedArray = filteredData?.map((item) => ({
"Sponsor name": (
"Sponsor Name": (
<Text
justifyContent={slideFromRight ? "right" : "left"}
as={"span"}
@@ -80,7 +80,7 @@ const Sponser = () => {
</Text>
),
"Email address": (
"Email Address": (
<Box w={"auto"} isTruncated={true}>
<Text as={"span"} color={"teal.900"} fontWeight={"500"}>
{item.email}