[update] - condition on pending request for checkers

This commit is contained in:
Swapnil Bendal
2024-11-25 16:45:52 +05:30
parent 0c21e99732
commit 4f8916036e
3 changed files with 25 additions and 18 deletions

View File

@@ -85,9 +85,14 @@ const IOCashDetails = () => {
}}
>
Pending{" "}
<Badge rounded={"sm"} colorScheme="forestGreen" ms={2}>
{IODetails?.ioCashStatusHistory?.Pending.length > 0 && (
<Badge rounded={"sm"} colorScheme="forestGreen" ms={2}>
{IODetails?.ioCashStatusHistory?.Pending.length || 0}
</Badge>
)}
{/* <Badge rounded={"sm"} colorScheme="forestGreen" ms={2}>
{IODetails?.ioCashStatusHistory?.Pending.length || 0}
</Badge>
</Badge> */}
</Tab>
<Tab
fontSize={"sm"}

View File

@@ -135,13 +135,11 @@ const IONAVDetails = () => {
}}
>
Pending
<Badge
rounded={"sm"}
colorScheme="forestGreen"
ms={2}
>
{IODetails?.ioNAVStatusHistory?.Pending.length || 0}
</Badge>
{IODetails?.ioNAVStatusHistory?.Pending.length > 0 && (
<Badge rounded={"sm"} colorScheme="forestGreen" ms={2}>
{IODetails?.ioNAVStatusHistory?.Pending.length || 0}
</Badge>
)}
</Tab>
<Tab
fontSize={"sm"}

View File

@@ -1,4 +1,11 @@
import { Badge, Tab, TabList, TabPanel, TabPanels, Tabs } from "@chakra-ui/react";
import {
Badge,
Tab,
TabList,
TabPanel,
TabPanels,
Tabs,
} from "@chakra-ui/react";
import React, { useContext } from "react";
import Approved from "./Approved";
import Pending from "./Pending";
@@ -6,7 +13,6 @@ import Rejected from "./Rejected";
import GlobalStateContext from "../../../../Contexts/GlobalStateContext";
const IOTransaction = () => {
const { IODetails } = useContext(GlobalStateContext);
return (
<Tabs>
@@ -28,13 +34,11 @@ const IOTransaction = () => {
}}
>
Pending
<Badge
rounded={"sm"}
colorScheme="forestGreen"
ms={2}
>
{IODetails?.ioTransactionRecords?.Pending.length || 0}
</Badge>
{IODetails?.ioTransactionRecords?.Pending.length > 0 && (
<Badge rounded={"sm"} colorScheme="forestGreen" ms={2}>
{IODetails?.ioTransactionRecords?.Pending.length || 0}
</Badge>
)}
</Tab>
<Tab
fontSize={"sm"}