Files
tanami-admin-panel/src/Pages/IO_Management/ViewIO/ViewIOdata.jsx

98 lines
3.2 KiB
React
Raw Normal View History

2024-07-05 20:02:10 +05:30
import {
Box,
Button,
Input,
Tab,
TabList,
TabPanel,
TabPanels,
Tabs,
Text,
useDisclosure,
2024-07-05 20:02:10 +05:30
} from "@chakra-ui/react";
import { useNavigate, useParams } from "react-router-dom";
import GlobalStateContext from "../../../Contexts/GlobalStateContext";
import { useContext, useEffect, useState } from "react";
import FormInputView from "../../../Components/FormInputView";
import { useForm } from "react-hook-form"; // assuming react-hook-form is used
import { OPACITY_ON_LOAD } from "../../../Layout/animations";
import { ArrowBackIcon } from "@chakra-ui/icons";
import CustomAlertDialog from "../../../Components/CustomAlertDialog";
import ViewIOdataHeader from "./ViewIOdataHeader";
import ViewIOdetails from "./ViewIOdetails";
import ViewIOdocs from "./ViewIOdocs";
import ViewKeyMerits from "./ViewKeyMerits";
import ViewIOartifacts from "./ViewIOartifacts";
import ViewInvestors from "./ViewInvestors";
import ViewIOcash from "./ViewIOcash";
import ViewIOnav from "./ViewIOnav";
import ViewDistribution from "./ViewDistribution";
2024-07-08 20:42:55 +05:30
import InvestmentDocument from "../CreateIO/InvestmentDocument";
import KeyMerits from "../CreateIO/KeyMerits";
2024-07-09 14:49:05 +05:30
import Investors from "../CreateIO/Investors"
import EditIO from "../EditIO/EditIO";
2024-07-09 19:05:08 +05:30
import IOArtifacts from "../CreateIO/IOArtifacts";
2024-07-10 12:02:35 +05:30
import IOCashDetails from "../CreateIO/IOCashDetails";
import IONAVDetails from "../CreateIO/IONAVDetails";
2024-07-09 14:49:05 +05:30
2024-07-05 20:02:10 +05:30
const ViewIOdata = () => {
2024-07-11 11:46:48 +05:30
const params = useParams()
const { isOpen, onOpen, onClose } = useDisclosure();
2024-07-05 20:02:10 +05:30
const navigate = useNavigate();
const [isEditing, setIsEditing] = useState(false);
2024-07-09 14:49:05 +05:30
2024-07-05 20:02:10 +05:30
const tabs = [
{ label: "IO Details", content: <ViewIOdetails /> },
2024-07-08 20:42:55 +05:30
{ label: "Investment documents", content: <InvestmentDocument /> },
{ label: "Key merits", content: <KeyMerits /> },
{ label: "IO artifacts", content: <IOArtifacts /> },
2024-07-09 14:49:05 +05:30
{ label: "Investors", content: <Investors /> },
2024-07-10 12:02:35 +05:30
{ label: "IO Cash Details", content: <IOCashDetails /> },
{ label: "IO NAV Details", content: <IONAVDetails /> },
2024-07-08 20:42:55 +05:30
// { label: "Distribution", content: <ViewDistribution /> },
2024-07-05 20:02:10 +05:30
];
return (
2024-07-22 14:50:31 +05:30
<Box {...OPACITY_ON_LOAD} overflowY={"scroll"} overflowX={"hidden"} height={"100vh"} pb={14} >
2024-07-08 20:42:55 +05:30
<Box paddingInline={"12px"} mt={2}>
{/* <span
2024-07-05 20:02:10 +05:30
onClick={() => navigate(-1)}
style={{ fontSize: "15px", cursor: "pointer" }}
>
<ArrowBackIcon cursor={"pointer"} /> Back
2024-07-08 20:42:55 +05:30
</span> */}
2024-07-05 20:02:10 +05:30
<ViewIOdataHeader />
</Box>
<Tabs mt={4}>
2024-07-09 14:49:05 +05:30
<TabList justifyContent={'space-between'} pe={4} alignItems={'center'}>
<Box display={'flex'} >
2024-07-05 20:02:10 +05:30
{tabs.map(({ label }, index) => (
<Tab
disabled={true}
key={index}
fontSize={"sm"}
_selected={{
color: "#004118",
borderBottom: "2px solid #38a169",
}}
>
{label}
</Tab>
))}
2024-07-09 14:49:05 +05:30
</Box>
2024-07-05 20:02:10 +05:30
</TabList>
<TabPanels>
{tabs.map(({ content }, index) => (
<TabPanel key={index}>{content}</TabPanel>
))}
</TabPanels>
</Tabs>
</Box>
);
};
export default ViewIOdata;