Merge branch 'release/sprint-8' of http://git.wdipl.com/Siddhesh.More/tanami-admin-panel into Yasin
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import {
|
||||
Badge,
|
||||
Box,
|
||||
Button,
|
||||
Tab,
|
||||
@@ -24,7 +25,7 @@ const IOCashDetails = () => {
|
||||
const params = useParams();
|
||||
const toast = useToast();
|
||||
const id = params?.id;
|
||||
const { IODetails} = useContext(GlobalStateContext);
|
||||
const { IODetails } = useContext(GlobalStateContext);
|
||||
const { isOpen, onOpen, onClose } = useDisclosure();
|
||||
const firstField = useRef();
|
||||
|
||||
@@ -32,8 +33,6 @@ const IOCashDetails = () => {
|
||||
const [activeTab, setActiveTab] = useState(0);
|
||||
|
||||
const handleAdd = async () => {
|
||||
|
||||
|
||||
try {
|
||||
const res = await updateIOCase(id);
|
||||
if (res?.data) {
|
||||
@@ -57,70 +56,78 @@ const IOCashDetails = () => {
|
||||
|
||||
return (
|
||||
<Box>
|
||||
<Tabs index={activeTab} onChange={(index) => setActiveTab(index)} variant='unstyled'>
|
||||
<Box
|
||||
display={"flex"}
|
||||
justifyContent={"space-between"}
|
||||
alignItems={"center"}
|
||||
borderBottom={"1px solid #ccc"}
|
||||
<Tabs
|
||||
index={activeTab}
|
||||
onChange={(index) => setActiveTab(index)}
|
||||
variant="unstyled"
|
||||
>
|
||||
<TabList>
|
||||
<Tab
|
||||
fontSize={"sm"}
|
||||
_selected={{
|
||||
color: "#004118",
|
||||
borderBottom: "2px solid #38a169",
|
||||
}}
|
||||
>
|
||||
Approved
|
||||
</Tab>
|
||||
<Tab
|
||||
fontSize={"sm"}
|
||||
_selected={{
|
||||
color: "#004118",
|
||||
borderBottom: "2px solid #38a169",
|
||||
}}
|
||||
>
|
||||
Pending
|
||||
</Tab>
|
||||
<Tab
|
||||
fontSize={"sm"}
|
||||
_selected={{
|
||||
color: "#004118",
|
||||
borderBottom: "2px solid #38a169",
|
||||
}}
|
||||
>
|
||||
Rejected
|
||||
</Tab>
|
||||
</TabList>
|
||||
{IODetails?.isInvestedAmount ? (
|
||||
localStorage?.getItem('role') ==="Maker" &&
|
||||
<Button
|
||||
onClick={handleAdd}
|
||||
leftIcon={<AddIcon />}
|
||||
colorScheme="forestGreen"
|
||||
size={"sm"}
|
||||
rounded={"sm"}
|
||||
fontSize={"xs"}
|
||||
<Box
|
||||
display={"flex"}
|
||||
justifyContent={"space-between"}
|
||||
alignItems={"center"}
|
||||
borderBottom={"1px solid #ccc"}
|
||||
>
|
||||
Add
|
||||
</Button>
|
||||
) : null}
|
||||
</Box>
|
||||
<TabPanels>
|
||||
<TabPanel>
|
||||
<Approved />
|
||||
</TabPanel>
|
||||
<TabPanel>
|
||||
<Pending />
|
||||
</TabPanel>
|
||||
<TabPanel>
|
||||
<Rejected />
|
||||
</TabPanel>
|
||||
</TabPanels>
|
||||
</Tabs>
|
||||
<AddCaseDetails
|
||||
setActiveTab={setActiveTab}
|
||||
<TabList>
|
||||
<Tab
|
||||
fontSize={"sm"}
|
||||
_selected={{
|
||||
color: "#004118",
|
||||
borderBottom: "2px solid #38a169",
|
||||
}}
|
||||
>
|
||||
Approved
|
||||
</Tab>
|
||||
<Tab
|
||||
fontSize={"sm"}
|
||||
_selected={{
|
||||
color: "#004118",
|
||||
borderBottom: "2px solid #38a169",
|
||||
}}
|
||||
>
|
||||
Pending{" "}
|
||||
<Badge rounded={"sm"} colorScheme="forestGreen" ms={2}>
|
||||
{IODetails?.ioCashStatusHistory?.Pending.length || 0}
|
||||
</Badge>
|
||||
</Tab>
|
||||
<Tab
|
||||
fontSize={"sm"}
|
||||
_selected={{
|
||||
color: "#004118",
|
||||
borderBottom: "2px solid #38a169",
|
||||
}}
|
||||
>
|
||||
Rejected
|
||||
</Tab>
|
||||
</TabList>
|
||||
{IODetails?.isInvestedAmount
|
||||
? localStorage?.getItem("role") === "Maker" && (
|
||||
<Button
|
||||
onClick={handleAdd}
|
||||
leftIcon={<AddIcon />}
|
||||
colorScheme="forestGreen"
|
||||
size={"sm"}
|
||||
rounded={"sm"}
|
||||
fontSize={"xs"}
|
||||
>
|
||||
Add
|
||||
</Button>
|
||||
)
|
||||
: null}
|
||||
</Box>
|
||||
<TabPanels>
|
||||
<TabPanel>
|
||||
<Approved />
|
||||
</TabPanel>
|
||||
<TabPanel>
|
||||
<Pending />
|
||||
</TabPanel>
|
||||
<TabPanel>
|
||||
<Rejected />
|
||||
</TabPanel>
|
||||
</TabPanels>
|
||||
</Tabs>
|
||||
<AddCaseDetails
|
||||
setActiveTab={setActiveTab}
|
||||
isOpen={isOpen}
|
||||
onClose={onClose}
|
||||
firstField={firstField}
|
||||
|
||||
@@ -54,6 +54,7 @@
|
||||
// export default IONAVDetails;
|
||||
|
||||
import {
|
||||
Badge,
|
||||
Box,
|
||||
Button,
|
||||
Tab,
|
||||
@@ -134,6 +135,13 @@ const IONAVDetails = () => {
|
||||
}}
|
||||
>
|
||||
Pending
|
||||
<Badge
|
||||
rounded={"sm"}
|
||||
colorScheme="forestGreen"
|
||||
ms={2}
|
||||
>
|
||||
{IODetails?.ioNAVStatusHistory?.Pending.length || 0}
|
||||
</Badge>
|
||||
</Tab>
|
||||
<Tab
|
||||
fontSize={"sm"}
|
||||
|
||||
@@ -1,10 +1,13 @@
|
||||
import { Tab, TabList, TabPanel, TabPanels, Tabs } from "@chakra-ui/react";
|
||||
import React from "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";
|
||||
import Rejected from "./Rejected";
|
||||
import GlobalStateContext from "../../../../Contexts/GlobalStateContext";
|
||||
|
||||
const IOTransaction = () => {
|
||||
|
||||
const { IODetails } = useContext(GlobalStateContext);
|
||||
return (
|
||||
<Tabs>
|
||||
<TabList>
|
||||
@@ -25,6 +28,13 @@ const IOTransaction = () => {
|
||||
}}
|
||||
>
|
||||
Pending
|
||||
<Badge
|
||||
rounded={"sm"}
|
||||
colorScheme="forestGreen"
|
||||
ms={2}
|
||||
>
|
||||
{IODetails?.ioTransactionRecords?.Pending.length || 0}
|
||||
</Badge>
|
||||
</Tab>
|
||||
<Tab
|
||||
fontSize={"sm"}
|
||||
|
||||
Reference in New Issue
Block a user