amount changes
This commit is contained in:
@@ -20,11 +20,10 @@ const DataTable = ({
|
||||
tableHeadRow,
|
||||
emptyMessage,
|
||||
centered,
|
||||
total
|
||||
total,
|
||||
}) => {
|
||||
|
||||
console.log(data);
|
||||
|
||||
|
||||
const columnWidth =
|
||||
data && data[0]
|
||||
? `${(100 / Object.keys(data[0]).length).toFixed(2)}%`
|
||||
@@ -35,7 +34,9 @@ const DataTable = ({
|
||||
<EmptySearchList message={emptyMessage} />
|
||||
) : (
|
||||
<Table size="sm">
|
||||
<TableCaption p={total?0:null}>{total? total :"Tanami v1.0.0"}</TableCaption>
|
||||
<TableCaption p={total ? 0 : null}>
|
||||
{total ? total : "Tanami v1.0.0"}
|
||||
</TableCaption>
|
||||
<Thead backgroundColor="gray.100">
|
||||
<Tr>
|
||||
{tableHeadRow.map((heading, index) => (
|
||||
@@ -52,8 +53,7 @@ const DataTable = ({
|
||||
whiteSpace="normal" // Allow text to wrap
|
||||
wordBreak="normal" // Ensure long words break properly
|
||||
overflowWrap="normal" // Break long words if necessary
|
||||
textTransform={'none'}
|
||||
|
||||
textTransform={"none"}
|
||||
>
|
||||
{isLoading ? <Skeleton height="20px" /> : heading}
|
||||
{/* {heading} */}
|
||||
@@ -63,24 +63,26 @@ const DataTable = ({
|
||||
</Thead>
|
||||
<Tbody className="web-text-small">
|
||||
{isLoading
|
||||
? Array.from({ length: TABLE_PAGINATION?.size }).map((_, index) => (
|
||||
<Tr key={index}>
|
||||
{tableHeadRow.map((_, i) => (
|
||||
<Td
|
||||
width={'fit-content'}
|
||||
key={i}
|
||||
style={{
|
||||
whiteSpace: "nowrap",
|
||||
textOverflow: "ellipsis",
|
||||
}}
|
||||
className="web-text-small"
|
||||
w={columnWidth}
|
||||
>
|
||||
<Skeleton height="20px" mb={1} mt={1} />
|
||||
</Td>
|
||||
))}
|
||||
</Tr>
|
||||
))
|
||||
? Array.from({ length: TABLE_PAGINATION?.size }).map(
|
||||
(_, index) => (
|
||||
<Tr key={index}>
|
||||
{tableHeadRow.map((_, i) => (
|
||||
<Td
|
||||
width={"fit-content"}
|
||||
key={i}
|
||||
style={{
|
||||
whiteSpace: "nowrap",
|
||||
textOverflow: "ellipsis",
|
||||
}}
|
||||
className="web-text-small"
|
||||
w={columnWidth}
|
||||
>
|
||||
<Skeleton height="20px" mb={1} mt={1} />
|
||||
</Td>
|
||||
))}
|
||||
</Tr>
|
||||
)
|
||||
)
|
||||
: data?.map((item, index) => (
|
||||
<Tr bg={index % 2 === 0 ? "" : "gray.50"} key={index}>
|
||||
{tableHeadRow.map((heading, i) => (
|
||||
|
||||
@@ -119,11 +119,35 @@ const ViewIOTable = () => {
|
||||
</Box>
|
||||
),
|
||||
"IO Name": (
|
||||
<Box w={"100px"} isTruncated={true}>
|
||||
<Text as={"span"} color={"teal.900"} fontWeight={"500"}>
|
||||
{item.investmentNameEnglish ? item.investmentNameEnglish : "---"}
|
||||
</Text>
|
||||
</Box>
|
||||
// <Box w={"200px"} isTruncated={true}>
|
||||
// <Text as={"span"} color={"teal.900"} fontWeight={"500"}>
|
||||
// <Tooltip w={"100%"} label={item.investmentNameEnglish ? item.investmentNameEnglish : "---"} placement='top'>
|
||||
// {item.investmentNameEnglish ? item.investmentNameEnglish : "---"}
|
||||
// </Tooltip>
|
||||
// </Text>
|
||||
// </Box>
|
||||
<Tooltip
|
||||
hasArrow
|
||||
bg={"#fff"}
|
||||
fontSize={"xs"}
|
||||
label={item.investmentNameEnglish ? item.investmentNameEnglish : "---"}
|
||||
placement="top-start"
|
||||
color={"blue.800"}
|
||||
>
|
||||
<Text
|
||||
as={"span"}
|
||||
color={"teal.900"}
|
||||
fontWeight={"500"}
|
||||
maxWidth="200px" // Adjust width as needed
|
||||
display="block" // Ensure block display for proper truncation
|
||||
overflow="hidden"
|
||||
isTruncated
|
||||
textOverflow="ellipsis"
|
||||
cursor={"grab"}
|
||||
>
|
||||
{item.investmentNameEnglish ? item.investmentNameEnglish : "---"}
|
||||
</Text>
|
||||
</Tooltip>
|
||||
),
|
||||
Sponsor: (
|
||||
<Box w={"auto"} isTruncated={true}>
|
||||
@@ -150,9 +174,10 @@ const ViewIOTable = () => {
|
||||
color={"teal.900"}
|
||||
fontWeight={"500"}
|
||||
>
|
||||
{item.goalAmount
|
||||
{/* {item.goalAmount
|
||||
? formatCurrency(removeTrailingZeros(item.goalAmount))
|
||||
: "---"}
|
||||
: "---"} */}
|
||||
{`$${parseFloat(item.goalAmount||0).toLocaleString()}`}
|
||||
</Text>
|
||||
</Box>
|
||||
),
|
||||
@@ -163,7 +188,7 @@ const ViewIOTable = () => {
|
||||
{formatDate(item.closingDate ? item.closingDate : "---")}
|
||||
</Text>
|
||||
</Box>
|
||||
),
|
||||
),
|
||||
"IO Status": (
|
||||
<Box w={"auto"} isTruncated={true}>
|
||||
<Badge
|
||||
|
||||
@@ -249,7 +249,7 @@ console.log(transaction);
|
||||
wordBreak="normal"
|
||||
overflowWrap="normal"
|
||||
>
|
||||
{parseFloat(InvestorWallet?.WalletBalance_InUSD).toLocaleString(undefined, { minimumFractionDigits: 2, maximumFractionDigits: 2 })}
|
||||
{parseFloat(InvestorWallet?.WalletBalance_InInvCur).toLocaleString(undefined, { minimumFractionDigits: 2, maximumFractionDigits: 2 })}
|
||||
</Th>
|
||||
<Th
|
||||
textAlign={"center"}
|
||||
@@ -282,7 +282,7 @@ console.log(transaction);
|
||||
wordBreak="normal"
|
||||
overflowWrap="normal"
|
||||
>
|
||||
{parseFloat(InvestorWallet?.WalletBalance_InInvCur).toLocaleString(undefined, { minimumFractionDigits: 2, maximumFractionDigits: 2 })}
|
||||
{parseFloat(InvestorWallet?.WalletBalance_InUSD).toLocaleString(undefined, { minimumFractionDigits: 2, maximumFractionDigits: 2 })}
|
||||
</Th>
|
||||
<Th
|
||||
textAlign={"center"}
|
||||
|
||||
@@ -116,24 +116,28 @@ const InvestmentType = () => {
|
||||
</Text>
|
||||
),
|
||||
Description: (
|
||||
|
||||
<Tooltip hasArrow bg={"#fff"} fontSize={"xs"} label={item.note} placement="top-start" color={"blue.800"} >
|
||||
<Text
|
||||
as={"span"}
|
||||
color={"teal.900"}
|
||||
fontWeight={"500"}
|
||||
maxWidth="600px" // Adjust width as needed
|
||||
display="block" // Ensure block display for proper truncation
|
||||
overflow="hidden"
|
||||
isTruncated
|
||||
textOverflow="ellipsis"
|
||||
cursor={"grab"}
|
||||
<Tooltip
|
||||
hasArrow
|
||||
bg={"#fff"}
|
||||
fontSize={"xs"}
|
||||
label={item.note}
|
||||
placement="top-start"
|
||||
color={"blue.800"}
|
||||
>
|
||||
|
||||
<Text
|
||||
as={"span"}
|
||||
color={"teal.900"}
|
||||
fontWeight={"500"}
|
||||
maxWidth="600px" // Adjust width as needed
|
||||
display="block" // Ensure block display for proper truncation
|
||||
overflow="hidden"
|
||||
isTruncated
|
||||
textOverflow="ellipsis"
|
||||
cursor={"grab"}
|
||||
>
|
||||
{item.note}
|
||||
|
||||
</Text>
|
||||
</Tooltip>
|
||||
</Text>
|
||||
</Tooltip>
|
||||
),
|
||||
Status: (
|
||||
<Box isTruncated={true}>
|
||||
|
||||
@@ -16,13 +16,13 @@ import DataTable from "../../../Components/DataTable/DataTable";
|
||||
import Pagination from "../../../Components/Pagination";
|
||||
import GlobalStateContext from "../../../Contexts/GlobalStateContext";
|
||||
import CustomAlertDialog from "../../../Components/CustomAlertDialog";
|
||||
import { formatDate } from "../../../Components/Functions/UTCConvertor";
|
||||
import { CheckIcon, CloseIcon } from "@chakra-ui/icons";
|
||||
import DrawalRequestReject from "./DrawalRequestReject";
|
||||
import { useGetDrawalRequestQuery } from "../../../Services/drawal.request.service";
|
||||
import { TABLE_PAGINATION } from "../../../Constants/Paginations";
|
||||
import NormalTable from "../../../Components/DataTable/NormalTable"
|
||||
import DrawalRequestApprove from "./DrawalRequestApprove";
|
||||
import { formatDate } from "../../../Components/Functions/UTCConvertor";
|
||||
|
||||
const PendingRequest = () => {
|
||||
const toast = useToast();
|
||||
@@ -38,6 +38,14 @@ const PendingRequest = () => {
|
||||
const [pageSize, setPageSize] = useState(TABLE_PAGINATION?.size);
|
||||
const [currentPage, setCurrentPage] = useState(TABLE_PAGINATION?.page);
|
||||
|
||||
const formatDate = (date) => {
|
||||
return new Date(date).toLocaleDateString('en-GB', {
|
||||
day: '2-digit',
|
||||
month: '2-digit',
|
||||
year: 'numeric',
|
||||
});
|
||||
};
|
||||
|
||||
const {
|
||||
isOpen: isConfirmOpen,
|
||||
onOpen: onConfirmOpen,
|
||||
|
||||
@@ -47,6 +47,15 @@ const ViewHistory = () => {
|
||||
// onClose: onRejectClose,
|
||||
// } = useDisclosure();
|
||||
|
||||
|
||||
const formatDate = (date) => {
|
||||
return new Date(date).toLocaleDateString('en-GB', {
|
||||
day: '2-digit',
|
||||
month: '2-digit',
|
||||
year: 'numeric',
|
||||
});
|
||||
};
|
||||
|
||||
const [pageSize, setPageSize] = useState(TABLE_PAGINATION?.size);
|
||||
const [currentPage, setCurrentPage] = useState(TABLE_PAGINATION?.page);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user