[ Refetch update ] 🎭

This commit is contained in:
2024-09-02 16:20:51 +05:30
parent 4b3313b1ea
commit d74481e7f4
3 changed files with 31 additions and 22 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

@@ -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,7 +490,9 @@ const Investors = ({ data }) => {
>
Total Investment Amount ( USD )
</Text>
<Badge ms={2} colorScheme="forestGreen" me={0}>$</Badge>
<Badge ms={2} colorScheme="forestGreen" me={0}>
$
</Badge>
<Text fontWeight={600} fontSize={"sm"} as={"span"} pt={"2px"}>
{parseFloat(IODetails?.totalAmtInvestmentInUSD).toLocaleString()}
</Text>

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": (