changes date
This commit is contained in:
@@ -191,7 +191,7 @@ const DepositRequest = () => {
|
||||
"Deposit Date": (
|
||||
<Text
|
||||
w={"60px"}
|
||||
justifyContent={slideFromRight ? "right" : "left"}
|
||||
justifyContent={slideFromRight ? "right" : "left"}
|
||||
as={"span"}
|
||||
color={"teal.900"}
|
||||
fontWeight={"500"}
|
||||
|
||||
@@ -52,6 +52,14 @@ import {
|
||||
// Cleanup the timer on component unmount
|
||||
return () => clearTimeout(timer);
|
||||
}, []);
|
||||
|
||||
const formatDate = (date) => {
|
||||
return new Date(date).toLocaleDateString('en-GB', {
|
||||
day: '2-digit',
|
||||
month: '2-digit',
|
||||
year: 'numeric',
|
||||
});
|
||||
};
|
||||
|
||||
// ====================================================[Table Setup]================================================================
|
||||
const tableHeadRow = [
|
||||
@@ -96,7 +104,7 @@ console.log(transaction);
|
||||
const extractedArray = filteredData?.map((item) => ({
|
||||
id: item?.id,
|
||||
"Sr N/O": (
|
||||
<Text w={'50px'}
|
||||
<Text w={'100px'}
|
||||
justifyContent={slideFromRight ? "right" : "left"}
|
||||
as={"span"}
|
||||
color={"gray.600"}
|
||||
@@ -106,14 +114,14 @@ console.log(transaction);
|
||||
</Text>
|
||||
),
|
||||
"Date": (
|
||||
<Box w={"auto"} isTruncated={true}>
|
||||
<Box w={"80px"} isTruncated={true}>
|
||||
<Text as={"span"} color={"teal.900"}>
|
||||
{formatDate(item.transactionDate)}
|
||||
</Text>
|
||||
</Box>
|
||||
),
|
||||
"Transaction": (
|
||||
<Box w={"auto"} isTruncated={true}>
|
||||
<Box w={"100px"} isTruncated={true}>
|
||||
<Text as={"span"} color={"teal.900"}>
|
||||
{item.investorTransaction?.transactionName}
|
||||
</Text>
|
||||
@@ -127,38 +135,40 @@ console.log(transaction);
|
||||
</Box>
|
||||
),
|
||||
"Amount in investors currency": (
|
||||
<Box w={"120px"} isTruncated={true}>
|
||||
<Box w={"120px"} isTruncated={true} display={"flex"} justifyContent={"end"}>
|
||||
<Text as={"span"} color={"teal.900"}>
|
||||
{/* {item.investorAmount} */}
|
||||
{parseFloat(item?.investorAmount || 0).toLocaleString(undefined, {
|
||||
minimumFractionDigits: 2,
|
||||
maximumFractionDigits: 2,
|
||||
})}
|
||||
<Badge ms={1} colorScheme="green">{item?.investorCurrency}</Badge>
|
||||
</Text>
|
||||
</Box>
|
||||
),
|
||||
"From USD": (
|
||||
<Box w={"auto"} isTruncated={true}>
|
||||
<Box w={"80px"} isTruncated={true}>
|
||||
<Text as={"span"} color={"teal.900"}>
|
||||
{item.USDToInvCur_Rate}
|
||||
</Text>
|
||||
</Box>
|
||||
),
|
||||
"TO USD": (
|
||||
<Box w={"auto"} isTruncated={true}>
|
||||
<Box w={"80px"} isTruncated={true}>
|
||||
<Text as={"span"} color={"teal.900"}>
|
||||
{item.invCurToUSD_Rate}
|
||||
</Text>
|
||||
</Box>
|
||||
),
|
||||
"USD amount": (
|
||||
<Box w={"auto"} isTruncated={true}>
|
||||
<Box w={"100px"} isTruncated={true} display={"flex"} justifyContent={"end"}>
|
||||
<Text as={"span"} color={"teal.900"}>
|
||||
{/* {item.USDAmount} */}
|
||||
{parseFloat(item?.USDAmount || 0).toLocaleString(undefined, {
|
||||
minimumFractionDigits: 2,
|
||||
maximumFractionDigits: 2,
|
||||
})}
|
||||
<Badge ms={1} colorScheme="green">$</Badge>
|
||||
</Text>
|
||||
</Box>
|
||||
),
|
||||
@@ -193,13 +203,13 @@ console.log(transaction);
|
||||
|
||||
const Total = () => {
|
||||
return (
|
||||
<Table size="sm">
|
||||
<Table size="sm" >
|
||||
<Tbody backgroundColor="gray.50">
|
||||
<Tr >
|
||||
<Th
|
||||
textAlign={"center"}
|
||||
textAlign={"left"}
|
||||
p={3}
|
||||
width="60px"
|
||||
width="100px"
|
||||
color={"#004118"}
|
||||
whiteSpace="normal"
|
||||
wordBreak="normal"
|
||||
@@ -210,7 +220,8 @@ console.log(transaction);
|
||||
<Th
|
||||
textAlign={"center"}
|
||||
p={3}
|
||||
width="60px"
|
||||
width="120px"
|
||||
maxW={"120px"}
|
||||
color={"#004118"}
|
||||
whiteSpace="normal"
|
||||
wordBreak="normal"
|
||||
@@ -219,20 +230,23 @@ console.log(transaction);
|
||||
{" "}
|
||||
</Th>
|
||||
<Th
|
||||
textAlign={"center"}
|
||||
textAlign={"right"}
|
||||
p={3}
|
||||
width="60px"
|
||||
width="100px"
|
||||
color={"#004118"}
|
||||
whiteSpace="normal"
|
||||
wordBreak="normal"
|
||||
overflowWrap="normal"
|
||||
>
|
||||
{" "}
|
||||
<Box display={"flex"} justifyContent={"end"}>
|
||||
{parseFloat(InvestorWallet?.WalletBalance_InInvCur).toLocaleString(undefined, { minimumFractionDigits: 2, maximumFractionDigits: 2 })}
|
||||
<Badge ms={1} colorScheme="green">{InvestorWallet?.currencyCode_InCur}</Badge>
|
||||
</Box>
|
||||
</Th>
|
||||
<Th
|
||||
textAlign={"center"}
|
||||
p={3}
|
||||
width="60px"
|
||||
width="80px"
|
||||
color={"#004118"}
|
||||
whiteSpace="normal"
|
||||
wordBreak="normal"
|
||||
@@ -248,28 +262,6 @@ console.log(transaction);
|
||||
whiteSpace="normal"
|
||||
wordBreak="normal"
|
||||
overflowWrap="normal"
|
||||
>
|
||||
{parseFloat(InvestorWallet?.WalletBalance_InInvCur).toLocaleString(undefined, { minimumFractionDigits: 2, maximumFractionDigits: 2 })}
|
||||
</Th>
|
||||
<Th
|
||||
textAlign={"center"}
|
||||
p={3}
|
||||
width="50px"
|
||||
color={"#004118"}
|
||||
whiteSpace="normal"
|
||||
wordBreak="normal"
|
||||
overflowWrap="normal"
|
||||
>
|
||||
{" "}
|
||||
</Th>
|
||||
<Th
|
||||
textAlign={"center"}
|
||||
p={3}
|
||||
width="50px"
|
||||
color={"#004118"}
|
||||
whiteSpace="normal"
|
||||
wordBreak="normal"
|
||||
overflowWrap="normal"
|
||||
>
|
||||
{" "}
|
||||
</Th>
|
||||
@@ -282,7 +274,10 @@ console.log(transaction);
|
||||
wordBreak="normal"
|
||||
overflowWrap="normal"
|
||||
>
|
||||
{parseFloat(InvestorWallet?.WalletBalance_InUSD).toLocaleString(undefined, { minimumFractionDigits: 2, maximumFractionDigits: 2 })}
|
||||
<Box display={"flex"} justifyContent={"end"}>
|
||||
{parseFloat(InvestorWallet?.WalletBalance_InUSD).toLocaleString(undefined, { minimumFractionDigits: 2, maximumFractionDigits: 2 })}
|
||||
<Badge ms={1} colorScheme="green">{InvestorWallet?.currencyCode_InCur}</Badge>
|
||||
</Box>
|
||||
</Th>
|
||||
<Th
|
||||
textAlign={"center"}
|
||||
|
||||
@@ -23,6 +23,7 @@ import { TABLE_PAGINATION } from "../../../Constants/Paginations";
|
||||
import NormalTable from "../../../Components/DataTable/NormalTable"
|
||||
import DrawalRequestApprove from "./DrawalRequestApprove";
|
||||
import { formatDate } from "../../../Components/Functions/UTCConvertor";
|
||||
import { generateSerialNumber } from "../../../Constants/Constants";
|
||||
|
||||
const PendingRequest = () => {
|
||||
const toast = useToast();
|
||||
@@ -105,7 +106,7 @@ const PendingRequest = () => {
|
||||
|
||||
// ====================================================[Table Setup]================================================================
|
||||
const tableHeadRow = [
|
||||
// "Sr.no",
|
||||
"Sr.no",
|
||||
"Date",
|
||||
"Client ID",
|
||||
"First Name",
|
||||
@@ -120,7 +121,7 @@ const PendingRequest = () => {
|
||||
|
||||
|
||||
|
||||
const extractedArray = filteredData?.map((item, index) => ({
|
||||
const extractedArray = filteredData?.map((item, idx) => ({
|
||||
// id: item?.id,
|
||||
"Sr.no": (
|
||||
<Text
|
||||
@@ -131,7 +132,7 @@ const PendingRequest = () => {
|
||||
fontWeight={"500"}
|
||||
className="d-flex align-items-center web-text-small"
|
||||
>
|
||||
{index + 1}
|
||||
{generateSerialNumber(idx,currentPage, pageSize )}
|
||||
</Text>
|
||||
),
|
||||
"Date": (
|
||||
|
||||
Reference in New Issue
Block a user