diff --git a/webapp/src/components/AdminOrganizationDeleteMenu.tsx b/webapp/src/components/AdminOrganizationDeleteMenu.tsx index 1d904e5df..a0fbbc58b 100644 --- a/webapp/src/components/AdminOrganizationDeleteMenu.tsx +++ b/webapp/src/components/AdminOrganizationDeleteMenu.tsx @@ -6,6 +6,8 @@ import { Options } from './AdminDeletionOptions' import '../features/adminRsuTab/Admin.css' import { ContainedIconButton } from '../styles/components/ContainedIconButton' +import { alpha, useTheme } from '@mui/material/styles' +import { DeleteOutline } from '@mui/icons-material' interface AdminOrganizationDeleteMenuProps { selectedOrganization: string @@ -13,6 +15,7 @@ interface AdminOrganizationDeleteMenuProps { } const AdminOrganizationDeleteMenu = (props: AdminOrganizationDeleteMenuProps) => { + const theme = useTheme() const handleDelete = () => { const buttons = [ { @@ -36,14 +39,15 @@ const AdminOrganizationDeleteMenu = (props: AdminOrganizationDeleteMenuProps) => title="Delete Organization" onClick={handleDelete} sx={{ - float: 'left', - margin: 2, - mt: 0.5, - mr: 0, - ml: 0.5, + backgroundColor: 'transparent', + color: theme.palette.text.primary, + borderRadius: '2px', + '&:hover': { + backgroundColor: alpha(theme.palette.text.primary, 0.1), + }, }} > - + ) diff --git a/webapp/src/components/AdminTable.tsx b/webapp/src/components/AdminTable.tsx index b17fda875..539e66904 100644 --- a/webapp/src/components/AdminTable.tsx +++ b/webapp/src/components/AdminTable.tsx @@ -1,5 +1,5 @@ import React from 'react' -import MaterialTable, { Action, Column, MTableBodyRow, MTableCell } from '@material-table/core' +import MaterialTable, { Action, Column, MTableCell } from '@material-table/core' import '../features/adminRsuTab/Admin.css' import { alpha, Tooltip, useTheme } from '@mui/material' @@ -33,9 +33,6 @@ const AdminTable = (props: AdminTableProps) => { actions={props.actions} columns={props.columns?.map((column) => ({ ...column, - cellStyle: { - borderRight: `1px solid ${alpha(theme.palette.divider, 0.1)}`, // Add column lines - }, }))} data={props.data} title={props.title} @@ -54,6 +51,7 @@ const AdminTable = (props: AdminTableProps) => { }, pageSize: 5, pageSizeOptions: props.pageSizeOptions === undefined ? [5, 10, 20] : props.pageSizeOptions, + searchFieldAlignment: 'left', }} components={{ Cell: (props) => { diff --git a/webapp/src/components/VerticalTabs.tsx b/webapp/src/components/VerticalTabs.tsx index 2909e6a5a..f03a0690f 100644 --- a/webapp/src/components/VerticalTabs.tsx +++ b/webapp/src/components/VerticalTabs.tsx @@ -9,6 +9,12 @@ import { RootState } from '../store' import { alpha, Box, Tab, Tabs, useTheme } from '@mui/material' import { Link, Navigate, Route, Routes, useLocation } from 'react-router-dom' import { evaluateFeatureFlags } from '../feature-flags' +import { + FiberManualRecordOutlined, + PersonOutlined, + SignalCellularAltOutlined, + TrafficOutlined, +} from '@mui/icons-material' interface TabPanelProps { children?: React.ReactNode @@ -53,6 +59,19 @@ function VerticalTabs(props: VerticalTabProps) { const filteredTabs = tabs.filter((tab) => evaluateFeatureFlags(tab.tag)) const defaultTabKey = filteredTabs[defaultTabIndex ?? 0]?.path + const getIcon = (tabName: string) => { + switch (tabName) { + case 'RSUs': + return + case 'Intersections': + return + case 'Users': + return + case 'Organizations': + return + } + } + const getSelectedTab = () => location.pathname.split('/').at(-1) || defaultTabKey const [value, setValue] = useState(getSelectedTab()) @@ -92,14 +111,7 @@ function VerticalTabs(props: VerticalTabProps) { indicatorColor="secondary" textColor="inherit" orientation="vertical" - sx={{ width: 170 }} - TabIndicatorProps={{ - style: { - right: 'auto', // remove the default right positioning - left: 0, // add left positioning - width: 5, // width of the indicator - }, - }} + sx={{ width: 250 }} > {filteredTabs.map((tab) => { const index = filteredTabs.indexOf(tab) @@ -110,22 +122,21 @@ function VerticalTabs(props: VerticalTabProps) { value={tab.path} component={Link} to={tab.path} + icon={getIcon(tab.title)} sx={{ - backgroundColor: value === tab.path || value === index ? theme.palette.primary.main : 'transparent', fontSize: 20, - height: '80px', - alignItems: 'flex-start', + height: '60px', + alignItems: 'center', + display: 'flex', + flexDirection: 'row', + justifyContent: 'flex-start', textTransform: 'none', borderRadius: 1, - '&&': { - color: - value === tab.path || value === index - ? theme.palette.primary.contrastText - : theme.palette.text.primary, - border: - value === tab.path || value === index - ? 'none' - : `0.5px solid ${alpha(theme.palette.divider, 0.2)}`, + fontWeight: value === tab.path || value === index ? 'bold' : 'normal', + color: theme.palette.text.primary, + backgroundColor: 'transparent', + '&:hover': { + backgroundColor: alpha(theme.palette.primary.main, 0.2), }, }} /> diff --git a/webapp/src/components/__snapshots__/AdminFormManager.test.tsx.snap b/webapp/src/components/__snapshots__/AdminFormManager.test.tsx.snap index aa7a556ae..f008981b6 100644 --- a/webapp/src/components/__snapshots__/AdminFormManager.test.tsx.snap +++ b/webapp/src/components/__snapshots__/AdminFormManager.test.tsx.snap @@ -5,180 +5,183 @@ exports[`snapshot organization 1`] = `
-
-
-

- CV Manager Organizations - - -

-
+
- -
-
-
+ + + + Refresh + +
+
@@ -190,8 +193,8 @@ exports[`snapshot organization 1`] = ` class="accordion" >

- RSUs + RSUs

- Intersections + Intersections

- Users + Users

-
-

- CV Manager RSUs - - -

-
@@ -477,9 +419,6 @@ exports[`snapshot rsu 1`] = ` class="MuiToolbar-root MuiToolbar-gutters MuiToolbar-regular css-mocked-MuiToolbar-root" > -
@@ -542,6 +481,9 @@ exports[`snapshot rsu 1`] = `
+
@@ -552,7 +494,74 @@ exports[`snapshot rsu 1`] = `
+ > + + + + + + +
@@ -875,7 +884,7 @@ exports[`snapshot rsu 1`] = ` />

Rows per page:

@@ -883,12 +892,12 @@ exports[`snapshot rsu 1`] = ` class="MuiInputBase-root MuiInputBase-colorPrimary MuiTablePagination-input css-mocked-MuiInputBase-root-MuiTablePagination-select" >