diff --git a/frontend/src/component/admin/users/UsersHeader/LicensedUsersBox.tsx b/frontend/src/component/admin/users/UsersHeader/LicensedUsersBox.tsx index 0ce075c3dc..9790cb69c8 100644 --- a/frontend/src/component/admin/users/UsersHeader/LicensedUsersBox.tsx +++ b/frontend/src/component/admin/users/UsersHeader/LicensedUsersBox.tsx @@ -1,5 +1,7 @@ import { Box, Button, styled, Typography } from '@mui/material'; import { HelpIcon } from 'component/common/HelpIcon/HelpIcon'; +import { useState } from 'react'; +import { LicensedUsersSidebar } from './LicensedUsersSidebar'; const StyledContainer = styled(Box)(({ theme }) => ({ display: 'flex', @@ -33,6 +35,7 @@ const InvisibleParagraph = styled('p')({ }); export const LicensedUsersBox = () => { + const [licensedUsersChartOpen, setLicensedUsersChartOpen] = useState(false); return ( @@ -60,9 +63,18 @@ export const LicensedUsersBox = () => { } /> - {}}> + + { + setLicensedUsersChartOpen(true); + }} + > View graph over time + setLicensedUsersChartOpen(false)} + /> ); diff --git a/frontend/src/component/admin/users/UsersHeader/LicensedUsersSidebar.tsx b/frontend/src/component/admin/users/UsersHeader/LicensedUsersSidebar.tsx new file mode 100644 index 0000000000..c87a0bf4bb --- /dev/null +++ b/frontend/src/component/admin/users/UsersHeader/LicensedUsersSidebar.tsx @@ -0,0 +1,122 @@ +import { Alert, Button, styled, Typography } from '@mui/material'; +import { DynamicSidebarModal } from 'component/common/SidebarModal/SidebarModal'; +import type React from 'react'; +const ModalContentContainer = styled('section')(({ theme }) => ({ + minHeight: '100vh', + maxWidth: 700, + width: '95vw', + backgroundColor: theme.palette.background.default, + display: 'flex', + flexFlow: 'column', + gap: theme.spacing(4), + paddingInline: theme.spacing(4), + paddingBlock: theme.spacing(3.75), +})); + +const WidgetContainer = styled('div')(({ theme }) => ({ + display: 'flex', + flexDirection: 'column', + gap: theme.spacing(9), +})); + +const HeaderRow = styled('div')(({ theme }) => ({ + display: 'flex', + alignItems: 'center', + gap: theme.spacing(1.5), +})); + +const ModalHeader = styled('h3')(({ theme }) => ({ + fontSize: theme.typography.h2.fontSize, + margin: 0, + fontWeight: theme.typography.h4.fontWeight, +})); + +const RowHeader = styled('h4')(({ theme }) => ({ + margin: 0, + fontWeight: theme.typography.h4.fontWeight, + fontSize: theme.spacing(1.75), +})); + +const Row = styled('div')(({ theme }) => ({ + display: 'flex', + flexDirection: 'column', + gap: theme.spacing(2), +})); + +const CloseRow = styled('div')(({ theme }) => ({ + display: 'flex', + justifyContent: 'flex-end', + marginBlockStart: 'auto', + gap: theme.spacing(4), +})); + +const InfoRow = styled('div')(({ theme }) => ({ + display: 'flex', + gap: theme.spacing(2), + width: '100%', +})); + +const LicenceBox = styled('div')(({ theme }) => ({ + display: 'flex', + flexDirection: 'column', + width: '100%', + background: theme.palette.background.elevation1, + padding: theme.spacing(3, 2, 3, 2), + borderRadius: theme.shape.borderRadiusLarge, +})); + +type LicensedUsersSidebarProps = { + open: boolean; + close: () => void; +}; + +export const LicensedUsersSidebar = ({ + open, + close, +}: LicensedUsersSidebarProps) => { + return ( + { + if (e.target instanceof HTMLAnchorElement) { + close(); + } + }} + > + + + Licensed seats + + + + Last 30 days + + + 11/25 + + Used seats last 30 days + + + + A licensed seat is a unique user that had access + to your Unleash instance within the last 30 + days, and thereby occupied a seat. + + + + + Last year +
this will be great grid
+
+
+ + + +
+
+ ); +};