[Update]=final
This commit is contained in:
@@ -36,6 +36,7 @@ import { debounce } from "../../Master/Sponser/AddSponser";
|
||||
import { formatCurrency } from "../../../Components/CurrencyInput";
|
||||
import { FiRefreshCw } from "react-icons/fi";
|
||||
import { useGetIOByIdQuery } from "../../../Services/io.service";
|
||||
import { RepeatIcon } from "@chakra-ui/icons";
|
||||
|
||||
const formatDate = (date) => new Date(date).toLocaleDateString(); // Simple date formatter
|
||||
|
||||
@@ -103,6 +104,7 @@ const Investors = ({data}) => {
|
||||
"Market Value",
|
||||
"Return on Investment",
|
||||
"Distribution",
|
||||
"Distribution Percent",
|
||||
"Total Return",
|
||||
"Total return on Investment",
|
||||
];
|
||||
@@ -184,7 +186,7 @@ const Investors = ({data}) => {
|
||||
fontWeight={"500"}
|
||||
className="d-flex align-items-center web-text-small"
|
||||
>
|
||||
{item.Distribution_Per}%
|
||||
{item.Investor_Holidings} %
|
||||
</Text>
|
||||
),
|
||||
"Market Value": (
|
||||
@@ -207,7 +209,7 @@ const Investors = ({data}) => {
|
||||
h={6}
|
||||
className="d-flex align-items-center web-text-small"
|
||||
>
|
||||
{item.returnOnInvestment || 0}
|
||||
{item.Return_On_Investment || 0} %
|
||||
</Text>
|
||||
),
|
||||
"Distribution": (
|
||||
@@ -222,6 +224,18 @@ const Investors = ({data}) => {
|
||||
{`$${parseFloat(item.Distribution_Amt||0).toLocaleString()}`}
|
||||
</Text>
|
||||
),
|
||||
"Distribution Percent": (
|
||||
<Text
|
||||
justifyContent={slideFromRight ? "right" : "center"}
|
||||
as={"span"}
|
||||
color={"teal.900"}
|
||||
fontWeight={"500"}
|
||||
className="d-flex align-items-center web-text-small"
|
||||
>
|
||||
{/* {`$${item.Distribution_Amt}`} */}
|
||||
{`${parseFloat(item.Distribution_Per||0).toLocaleString()} %`}
|
||||
</Text>
|
||||
),
|
||||
"Total Return": (
|
||||
<Text
|
||||
justifyContent={slideFromRight ? "right" : "center"}
|
||||
@@ -242,7 +256,7 @@ const Investors = ({data}) => {
|
||||
fontWeight={"500"}
|
||||
className="d-flex align-items-center web-text-small"
|
||||
>
|
||||
{item.Total_Return_On_Investment||0}
|
||||
{item.Total_Return_On_Investment||0} %
|
||||
</Text>
|
||||
),
|
||||
}));
|
||||
@@ -394,6 +408,7 @@ const Investors = ({data}) => {
|
||||
justifyContent={"space-between"}
|
||||
pb={3}
|
||||
spacing="24px"
|
||||
|
||||
>
|
||||
<span>
|
||||
<Input
|
||||
@@ -406,12 +421,12 @@ const Investors = ({data}) => {
|
||||
value={searchTerm}
|
||||
onChange={(e) => setSearchTerm(e.target.value)}
|
||||
/>
|
||||
<Icon onClick={handleRefresh} fontWeight={600} as={FiRefreshCw} boxSize={8} p={2} rounded={'md'} _hover={{bg:'gray.100'}} cursor={'pointer'} />
|
||||
<Icon ms={3} bg={"gray.100"} onClick={handleRefresh} fontWeight={600} as={RepeatIcon} boxSize={8} p={2} rounded={'md'} _hover={{bg:'gray.100'}} cursor={'pointer'} />
|
||||
</span>
|
||||
|
||||
<HStack display={"flex"} alignItems={"end"} flexDirection={'column'} >
|
||||
<Text fontWeight={600} fontSize={'sm'} as={'span'}>Total Investment Amount ( USD )</Text>
|
||||
<Text color={'gray.600'} fontWeight={800} fontSize={'sm'} as={'span'}>$ {parseFloat(IODetails?.totalAmtInvestmentInUSD).toFixed(2)}</Text>
|
||||
<HStack bg={'#C6F6D5'} ps={4} pe={4} pt={1.5} pb={1.5} rounded={'md'} boxShadow={'sm'} display={"flex"} alignItems={"end"} flexDirection={'column'} >
|
||||
<Text fontWeight={600} fontSize={'sm'} as={'span'}>$ {parseFloat(IODetails?.totalAmtInvestmentInUSD).toLocaleString()}</Text>
|
||||
<Text fontWeight={600} color={'gray.500'} fontSize={'xs'} as={'span'}>Total Investment Amount ( USD )</Text>
|
||||
|
||||
</HStack>
|
||||
</HStack>
|
||||
|
||||
Reference in New Issue
Block a user