This commit is contained in:
YasinShaikh123
2024-09-10 11:51:08 +05:30
8 changed files with 83 additions and 62 deletions

View File

@@ -65,7 +65,7 @@ const DataTable = ({
{/* <Box mb={2}>{caption}</Box> */}
<Table size="sm" {...provided.droppableProps} ref={provided.innerRef}>
<TableCaption p={0}>{caption}</TableCaption>
<Thead backgroundColor="gray.50">
<Thead backgroundColor="forestGreen.100">
<Tr>
{tableHeadRow.map((heading, index) => (
<Th
@@ -97,7 +97,7 @@ const DataTable = ({
bg: "blue.50",
cursor: "grab",
}}
bg={snapshot.isDragging ? "blue.100" : index % 2 ? "white" : "gray.50"}
bg={snapshot.isDragging ? "blue.100" : index % 2 ? "white" : "forestGreen.50"}
boxShadow={snapshot.isDragging ? "0 0 1em rgba(0, 0, 0, 0.2)" : "none"}
>
@@ -121,7 +121,7 @@ const DataTable = ({
)}
</Draggable>
) : (
<Tr bg={index % 2 ? "gray.50" : "white"} key={index}>
<Tr bg={index % 2 ? "forestGreen.50" : "white"} key={index}>
{tableHeadRow.map((heading, i) => (
<Td
textAlign={tableHeadRow.length - 1 === i || centered ? "center" : "left"}

View File

@@ -68,7 +68,8 @@ const IONAVDetails = () => {
const searchLower = searchTerm.toLowerCase();
const nameMatches = name.toLowerCase().includes(searchLower);
return nameMatches;
}).reverse()
})
.reverse()
// .sort((b, a) => new Date(a.transactionDate) - new Date(b.transactionDate));
const extractedArray = filteredData?.map((item, index) => ({

View File

@@ -233,7 +233,9 @@ const Investors = ({ data }) => {
fontWeight={"500"}
className="d-flex align-items-center web-text-small"
>
<Badge ms={1} colorScheme="green" me={1}>$</Badge>
<Badge ms={1} colorScheme="green" me={1}>
$
</Badge>
{/* {`$${item.Distribution_Amt}`} */}
{`$${parseFloat(item.Distribution_Amt || 0).toLocaleString(undefined, {
minimumFractionDigits: 2,
@@ -264,7 +266,9 @@ const Investors = ({ data }) => {
fontWeight={"500"}
className="d-flex align-items-center web-text-small"
>
<Badge ms={1} colorScheme="green" me={1}>$</Badge>
<Badge ms={1} colorScheme="green" me={1}>
$
</Badge>
{/* {`$${formatCurrency(item.Total_Return) || 0}`} */}
{`${parseFloat(item.Total_Return || 0).toLocaleString(undefined, {
minimumFractionDigits: 2,
@@ -421,6 +425,7 @@ const Investors = ({ data }) => {
const handleRefresh = async () => {
setIsRefetchLoading(true);
await refetch();
setIsRefetchLoading(false);
};
@@ -445,21 +450,23 @@ const Investors = ({ data }) => {
value={searchTerm}
onChange={(e) => setSearchTerm(e.target.value)}
/>
<Icon
ms={3}
animation={
IObyIDisLoading ? `${rotate} 1s linear infinite` : "none"
}
bg={"gray.100"}
onClick={handleRefresh}
fontWeight={600}
as={RepeatIcon}
boxSize={8}
p={2}
rounded={"md"}
_hover={{ bg: "gray.100" }}
cursor={"pointer"}
/>
<Box as="span">
<Icon
ms={3}
animation={
isRefetchLoading ? `${rotate} 1s linear infinite` : "none"
}
bg={"gray.50"}
onClick={handleRefresh}
fontWeight={600}
as={RepeatIcon}
boxSize={8}
p={2}
rounded={"full"}
_hover={{ bg: "gray.100" }}
cursor={"pointer"}
/>
</Box>
</span>
<HStack
@@ -483,8 +490,11 @@ const Investors = ({ data }) => {
>
Total Investment Amount ( USD )
</Text>
<Badge ms={2} colorScheme="forestGreen" me={0}>$</Badge>
<Text fontWeight={600} fontSize={"sm"} as={"span"} pt={"2px"}>
<Text display={'flex'} alignItems={'center'} fontWeight={600} fontSize={"sm"} as={"span"} pt={"2px"}>
<Badge p={1} ms={2} fontSize={'md'} colorScheme="green" me={0}>
$
</Badge>
{parseFloat(IODetails?.totalAmtInvestmentInUSD).toLocaleString()}
</Text>
</HStack>

View File

@@ -110,8 +110,9 @@ const DistributionInvestor = ({ isOpen, onClose }) => {
"First name",
"Last Name",
"Amount",
"Holding %",
"Holding (%)",
"Distriution Amt($)",
"Yeild (%)",
];
const extractedArray = calcualtedData?.data?.map((item, index) => ({
@@ -160,17 +161,15 @@ const DistributionInvestor = ({ isOpen, onClose }) => {
</Text>
</Box>
),
"Holding %": (
<Box minW={19} isTruncated={true}>
<Text
textAlign={"right"}
as={"span"}
color={"teal.900"}
fontWeight={"500"}
>
{parseFloat(item?.distribution_per).toFixed(2)}%
</Text>
</Box>
"Holding (%)": (
<Box minW={24} isTruncated={true}>
<Text as={"span"} color={"teal.900"} fontWeight={"500"}>
{item?.investor_holidings?.toLocaleString(undefined, {
minimumFractionDigits: 2,
maximumFractionDigits: 2,
})}%
</Text>
</Box>
),
"Distriution Amt($)": (
<Box minW={24} isTruncated={true}>
@@ -182,6 +181,16 @@ const DistributionInvestor = ({ isOpen, onClose }) => {
</Text>
</Box>
),
"Yeild (%)": (
<Box minW={24} isTruncated={true}>
<Text as={"span"} color={"teal.900"} fontWeight={"500"}>
{item?.distribution_per?.toLocaleString(undefined, {
minimumFractionDigits: 2,
maximumFractionDigits: 2,
})}%
</Text>
</Box>
),
}));
const Total = () => {
@@ -359,7 +368,7 @@ const DistributionInvestor = ({ isOpen, onClose }) => {
return (
<Modal size={"xl"} isOpen={isOpen} onClose={handleClose}>
<ModalOverlay />
<ModalContent maxW={1000}>
<ModalContent maxW={1200}>
<ModalHeader fontSize={"md"}>
Distribution To Investor Transaction
</ModalHeader>

View File

@@ -147,7 +147,7 @@ const Exit = ({ isOpen, onClose }) => {
"First name",
"Last Name",
"Amount",
"Holding %",
"Holding (%)",
"Exit Amt($)",
];
@@ -197,17 +197,15 @@ const Exit = ({ isOpen, onClose }) => {
</Text>
</Box>
),
"Holding %": (
<Box minW={19} isTruncated={true}>
<Text
textAlign={"right"}
as={"span"}
color={"teal.900"}
fontWeight={"500"}
>
{parseFloat(item?.distribution_per).toFixed(2)}%
</Text>
</Box>
"Holding (%)": (
<Box minW={24} isTruncated={true}>
<Text as={"span"} color={"teal.900"} fontWeight={"500"}>
{item?.investor_holidings?.toLocaleString(undefined, {
minimumFractionDigits: 2,
maximumFractionDigits: 2,
})}%
</Text>
</Box>
),
"Exit Amt($)": (
<Box minW={24} isTruncated={true}>
@@ -394,18 +392,18 @@ const Exit = ({ isOpen, onClose }) => {
<Modal size={"xl"} isOpen={isOpen} onClose={handleClose}>
<ModalOverlay />
<ModalContent maxW={1000}>
<ModalHeader fontSize={"md"}>Enter Exit Amount</ModalHeader>
<ModalHeader fontSize={"md"}>Exit Transaction</ModalHeader>
<ModalCloseButton />
<ModalBody>
{/* <Text as="label" mb="5px" fontSize="sm" fontWeight={500}>
Amount to Distribute
</Text> */}
<HStack onSubmit={handleSubmit(onSubmit)} as={"form"} mb={4}>
<HStack onSubmit={handleSubmit(onSubmit)} as={"form"} mb={4} alignItems={'center'}>
{/* <Input placeholder="$00.00" size={"sm"} className="col" /> */}
{/* <FormControl isInvalid={errors.amount} isRequired>
<FormLabel textAlign={"right"} fontSize={"sm"}>
Enter Exit Amount
</FormLabel> */}
{/* <FormControl isInvalid={errors.amount} isRequired>*/}
<Text textAlign={"right"} fontSize={"sm"}>
Exit Amount :
</Text>
<Text
textAlign={"start"}
bg={"green.100"}

View File

@@ -67,7 +67,7 @@ const BankDetails = () => {
console.log(data?.data?.bank_details);
const filteredData = data?.data?.bank_details?.filter((item) => {
const name = item.accountNumber;
const name = item.bankNickName;
const searchLower = searchTerm.toLowerCase();
const nameMatches = name.toLowerCase().includes(searchLower);
@@ -78,7 +78,7 @@ const BankDetails = () => {
const tableHeadRow = [
"Sr No",
"bankNickName",
"Bank Nick Name",
"IBAN",
"Account No",
"Bank Name",
@@ -100,7 +100,7 @@ const BankDetails = () => {
{generateSerialNumber(idx, currentPage, pageSize)}
</Text>
),
"bankNickName": (
"Bank Nick Name": (
<Text
justifyContent={slideFromRight ? "right" : "left"}
as={"span"}
@@ -133,7 +133,7 @@ const BankDetails = () => {
isTruncated={true}
className="d-flex align-items-center web-text-small"
>
{item.accountName}
{item.accountNumber}
</Text>
),
"Bank Name": (
@@ -157,7 +157,7 @@ const BankDetails = () => {
isTruncated={true}
className="d-flex align-items-center web-text-small"
>
{item.accountNumber}
{item.accountName}
</Text>
),
"Bank Address": (
@@ -202,7 +202,9 @@ const BankDetails = () => {
return (
<Box {...OPACITY_ON_LOAD} overflowY={"scroll"} height={"100vh"} pb={38}>
<Box bg="white.500">
<HStack>
<Text as={'span'} fontSize={'sm'} fontWeight={700}>Bank Deatils</Text>
</HStack>
<HStack
display={"flex"}
justifyContent={"space-between"}
@@ -225,7 +227,6 @@ const BankDetails = () => {
onChange={(e) => setSearchTerm(e.target.value)}
/>
</HStack>
</Box>
{/* ======================== [Data Table] ======================= */}

View File

@@ -1,6 +1,7 @@
import {
Badge,
Box,
Divider,
Icon,
Tab,
TabList,
@@ -336,6 +337,7 @@ const ProfileView = () => {
<TabPanels>
<TabPanel>
<FormInputView width={"32%"} groupedFields={groupedFields} />
<Divider/>
<BankDetails />
</TabPanel>
<TabPanel>

View File

@@ -84,7 +84,7 @@ const ExchangeRate = () => {
fontWeight={"600"}
className="d-flex align-items-center fw- web-text-small"
>
{index + 1}.
{index + 1}
</Text>
),
"From Currency": (