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

327 lines
9.3 KiB
React
Raw Normal View History

2024-07-08 20:42:55 +05:30
import { Badge, Box, Image, Text } from "@chakra-ui/react";
import {
Box,
Button,
Divider,
Image,
Menu,
MenuButton,
MenuItem,
MenuList,
Modal,
ModalBody,
ModalCloseButton,
ModalContent,
ModalFooter,
ModalHeader,
ModalOverlay,
Portal,
Text,
useDisclosure,
2024-07-09 13:05:58 +05:30
MenuItemOption,
MenuGroup,
MenuOptionGroup,
MenuDivider,
2024-07-09 12:25:52 +05:30
} from "@chakra-ui/react";
2024-07-05 20:02:10 +05:30
import header from "../../../assets/IOheader.png";
import { HiDotsVertical } from "react-icons/hi";
import { Link } from "react-router-dom";
import AmountInvested from "./HeaderModal/AmountInvested";
import FeesExpenses from "./HeaderModal/FeesExpenses";
import DistributionSponsor from "./HeaderModal/DistributionSponsor";
import DistributionInvestor from "./HeaderModal/DistributionInvestor";
import UpdateIONav from "./HeaderModal/UpdateIONav";
import UpdateIOStatus from "./HeaderModal/UpdateIOStatus";
2024-07-09 12:25:52 +05:30
import { useRef } from "react";
2024-07-05 15:33:08 +05:30
const ViewIOdataHeader = () => {
const { isOpen, onOpen, onClose } = useDisclosure();
2024-07-09 12:25:52 +05:30
const btnRef = useRef();
const {
isOpen: isInvestmentOpen,
onOpen: onInvestmentOpen,
onClose: onInvestmentClose,
} = useDisclosure();
const {
isOpen: isFeesOpen,
onOpen: onFeesOpen,
onClose: onFeesClose,
} = useDisclosure();
const {
isOpen: isDistSponsorOpen,
onOpen: onDistSponsorOpen,
onClose: onDistSponsorClose,
} = useDisclosure();
const {
isOpen: isDistInvestorOpen,
onOpen: onDistInvestorOpen,
onClose: onDistInvestorClose,
} = useDisclosure();
const {
isOpen: isUpdateNavOpen,
onOpen: onUpdateNavOpen,
onClose: onUpdateNavClose,
} = useDisclosure();
const {
isOpen: isUpdateStatusOpen,
onOpen: onUpdateStatusOpen,
onClose: onUpdateStatusClose,
} = useDisclosure();
const bg = {
bg: "#fff",
};
const hover = {
textDecoration: "underline",
background: "#fff",
};
2024-07-09 13:13:39 +05:30
const style = {
fontSize: "0.875rem",
fontWeight: "400",
};
2024-07-05 15:33:08 +05:30
return (
<Box
display={"flex"}
alignItems={"center"}
2024-07-08 20:42:55 +05:30
justifyContent={"start"}
gap={14}
2024-07-05 15:33:08 +05:30
bg={"#caf5d8"}
2024-07-08 20:42:55 +05:30
rounded={"md"}
// bgGradient='linear(to-r, #caf5d8, #f5e8ca)'
// bgGradient='linear(to-r, #caf5d8, #d4a5a5)'
// bgGradient='linear(to-r, #caf5d8, #d4a5a5)'
// bgGradient='linear(to-r, #caf5d8, #b3e5fc)'
// bgGradient='linear(to-r, #ffd54f, #caf5d8)'
// bgGradient='linear(to-r, #caf5d8, #a8e6cf)'
boxShadow={'md'}
paddingRight={"10px"}
2024-07-05 15:33:08 +05:30
borderRadius={"10px"}
>
2024-07-08 20:42:55 +05:30
<Box p={1}>
<Image h={82} src={header} />
2024-07-05 15:33:08 +05:30
</Box>
2024-07-08 20:42:55 +05:30
<Box display={"flex"} flexDirection={'column'} gap={2}>
<Text as={'span'} fontSize={"sm"} fontWeight={"500"}>KKR Private Equity Fund (K-Prime)</Text>
<Text as={'span'} fontSize={"sm"} fontWeight={"500"}>sponsor name: KKR</Text>
2024-07-05 15:33:08 +05:30
</Box>
2024-07-08 20:42:55 +05:30
<Box display={"flex"} flexDirection={'column'} gap={2}>
<Text as={'span'} fontSize={"xs"} color={"gray.500"} fontWeight={"500"}>IO Status</Text>
<Badge variant='subtle' w={"auto"} color='green'>Open</Badge>
2024-07-05 15:33:08 +05:30
</Box>
2024-07-08 20:42:55 +05:30
<Box display={"flex"} flexDirection={'column'} gap={2}>
<Text as={'span'} fontSize={"xs"} color={"gray.500"} fontWeight={"500"}>IO MV NAV</Text>
<Text as={'span'} fontSize={"sm"} fontWeight={"500"}>$1,092,500</Text>
2024-07-05 15:33:08 +05:30
</Box>
2024-07-08 20:42:55 +05:30
<Box display={"flex"} flexDirection={'column'} gap={2}>
<Text as={'span'} fontSize={"xs"} color={"gray.500"} fontWeight={"500"}>IO cash</Text>
<Text as={'span'} fontSize={"sm"} fontWeight={"500"}>$48,000</Text>
2024-07-05 15:33:08 +05:30
</Box>
2024-07-08 20:42:55 +05:30
<Box display={"flex"} flexDirection={'column'} gap={2}>
<Text as={'span'} fontSize={"xs"} color={"gray.500"} fontWeight={"500"}>IO NAV</Text>
<Text as={'span'} fontSize={"sm"} fontWeight={"500"}>$1,140,500</Text>
2024-07-05 15:33:08 +05:30
</Box>
<Box display={"flex"} alignItems={"start"} height={"95px"}>
<Menu>
<MenuButton
className="link p-1 rounded-1"
bg={"#fff"}
_hover={{ backgroundColor: "#fff !important" }}
onClick={onOpen}
2024-07-09 12:25:52 +05:30
ref={btnRef}
>
<HiDotsVertical className="rubix-text-dark fs-6" />
</MenuButton>
2024-07-09 13:05:58 +05:30
<MenuList>
<Box display={"grid"} alignContent={"left"} justifyItems={"start"}>
<MenuItem _hover={hover} _focus={{ bg: "transparent" }}>
2024-07-09 13:13:39 +05:30
<Button
onClick={onInvestmentOpen}
bg={bg}
_hover={hover}
style={style}
>
2024-07-09 13:05:58 +05:30
Amount Invested
</Button>
</MenuItem>
<Divider />
<MenuItem _hover={hover}>
2024-07-09 13:13:39 +05:30
<Button
onClick={onFeesOpen}
bg={bg}
_hover={hover}
style={style}
>
2024-07-09 13:05:58 +05:30
Fees & Expenses
</Button>
</MenuItem>
<Divider />
<MenuItem _hover={hover}>
2024-07-09 13:13:39 +05:30
<Button
onClick={onDistSponsorOpen}
bg={bg}
_hover={hover}
style={style}
>
2024-07-09 13:05:58 +05:30
Distribution from Sponsors
</Button>
</MenuItem>
<Divider />
<MenuItem _hover={hover}>
2024-07-09 13:13:39 +05:30
<Button
onClick={onDistInvestorOpen}
bg={bg}
_hover={hover}
style={style}
>
2024-07-09 13:05:58 +05:30
Distribution To Investors
</Button>
</MenuItem>
<Divider />
<MenuItem _hover={hover}>
2024-07-09 13:13:39 +05:30
<Button
onClick={onUpdateNavOpen}
bg={bg}
_hover={hover}
style={style}
>
2024-07-09 13:05:58 +05:30
Update IO NAV
</Button>
</MenuItem>
<Divider />
<MenuItem _hover={hover}>
2024-07-09 13:13:39 +05:30
<Button
onClick={onUpdateStatusOpen}
bg={bg}
_hover={hover}
style={style}
>
2024-07-09 13:05:58 +05:30
Update IO Status
</Button>
</MenuItem>
</Box>
</MenuList>
</Menu>
2024-07-09 12:25:52 +05:30
{/* Drawer */}
2024-07-09 13:05:58 +05:30
{/* <Drawer
2024-07-09 12:25:52 +05:30
isOpen={isOpen}
placement="right"
onClose={onClose}
finalFocusRef={btnRef}
>
<DrawerOverlay />
<DrawerContent>
<DrawerCloseButton />
<DrawerHeader>Transaction</DrawerHeader>
<DrawerBody>
<Box
display={"grid"}
alignContent={"left"}
justifyItems={"start"}
>
2024-07-09 12:25:52 +05:30
<Button
onClick={onInvestmentOpen}
bg={bg}
_hover={hover}
paddingInline={"0px"}
>
Amount Invested
</Button>
<Divider />
2024-07-09 12:25:52 +05:30
<Button
onClick={onFeesOpen}
bg={bg}
_hover={hover}
paddingInline={"0px"}
>
Fees & Expenses
</Button>
<Divider />
2024-07-09 12:25:52 +05:30
<Button
onClick={onDistSponsorOpen}
bg={bg}
_hover={hover}
paddingInline={"0px"}
>
Distribution from Sponsors
</Button>
<Divider />
2024-07-09 12:25:52 +05:30
<Button
onClick={onDistInvestorOpen}
bg={bg}
_hover={hover}
paddingInline={"0px"}
>
Distribution To Investors
</Button>
<Divider />
2024-07-09 12:25:52 +05:30
<Button
onClick={onUpdateNavOpen}
bg={bg}
_hover={hover}
paddingInline={"0px"}
>
Update IO NAV
</Button>
<Divider />
<Button
2024-07-09 12:25:52 +05:30
onClick={onUpdateStatusOpen}
bg={bg}
_hover={hover}
2024-07-09 12:25:52 +05:30
paddingInline={"0px"}
>
2024-07-09 12:25:52 +05:30
Update IO Status
</Button>
<Divider />
</Box>
2024-07-09 12:25:52 +05:30
</DrawerBody>
<DrawerFooter>
<Button variant="outline" mr={3} onClick={onClose}>
Cancel
</Button>
</DrawerFooter>
</DrawerContent>
2024-07-09 13:05:58 +05:30
</Drawer> */}
{/* Modals */}
<AmountInvested isOpen={isInvestmentOpen} onClose={onInvestmentClose} />
<FeesExpenses isOpen={isFeesOpen} onClose={onFeesClose} />
<DistributionSponsor
isOpen={isDistSponsorOpen}
onClose={onDistSponsorClose}
/>
<DistributionInvestor
isOpen={isDistInvestorOpen}
onClose={onDistInvestorClose}
/>
<UpdateIONav isOpen={isUpdateNavOpen} onClose={onUpdateNavClose} />
<UpdateIOStatus
isOpen={isUpdateStatusOpen}
onClose={onUpdateStatusClose}
/>
</Box>
2024-07-05 15:33:08 +05:30
</Box>
);
};
export default ViewIOdataHeader;