Skip to content

Commit 529801c

Browse files
committed
Merge branch 'develop' into #2140-rm-page-blocks-user-management
2 parents 16a0bd8 + 374fc2d commit 529801c

14 files changed

Lines changed: 174 additions & 78 deletions

File tree

src/frontend/src/components/Tabs.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,10 @@ interface TabProps {
1313
baseUrl: string; //the URL that all the tab URLs extend
1414
defaultTab: string; //tab that the tabs component defaults to
1515
id: string;
16+
noUnderline?: boolean;
1617
}
1718

18-
const NERTabs = ({ setTab, tabsLabels, baseUrl, defaultTab, id }: TabProps) => {
19+
const NERTabs = ({ setTab, tabsLabels, baseUrl, defaultTab, id, noUnderline = false }: TabProps) => {
1920
const tabUrlValues = tabsLabels.map((tab) => tab.tabUrlValue);
2021
const match = useRouteMatch<{ tabValueString: string }>(`${baseUrl}/:tabValueString`);
2122
const tabValueString = match?.params?.tabValueString;
@@ -39,7 +40,7 @@ const NERTabs = ({ setTab, tabsLabels, baseUrl, defaultTab, id }: TabProps) => {
3940
<Tabs value={tabValue} onChange={handleTabChange} aria-label={`${id}-tabs`}>
4041
{tabsLabels.map((tab, idx) => (
4142
<Tab
42-
sx={{ borderBottom: 1, borderColor: 'divider' }}
43+
sx={noUnderline ? {} : { borderBottom: 1, borderColor: 'divider' }}
4344
label={tab.tabName}
4445
aria-label={tab.tabUrlValue}
4546
value={idx}

src/frontend/src/pages/AdminToolsPage/AdminToolsBOMConfig.tsx

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
1-
import { Grid } from '@mui/material';
2-
import PageBlock from '../../layouts/PageBlock';
1+
import { Grid, Typography } from '@mui/material';
32
import ManufacturerTable from './BOMConfig/ManufacturerTable';
43
import MaterialTypeTable from './BOMConfig/MaterialTypeTable';
54
import UnitTable from './BOMConfig/UnitTable';
5+
import { Box } from '@mui/system';
66

77
const AdminToolsBOMConfig: React.FC = () => {
88
return (
9-
<PageBlock title="Bill of Material Config">
9+
<Box>
10+
<Typography variant="h5" gutterBottom borderBottom={1} color="red" borderColor={'white'}>
11+
Bill of Materials Config
12+
</Typography>
1013
<Grid container spacing="3%">
1114
<Grid item direction="column" xs={12} md={6}>
1215
<ManufacturerTable />
@@ -18,7 +21,7 @@ const AdminToolsBOMConfig: React.FC = () => {
1821
<UnitTable />
1922
</Grid>
2023
</Grid>
21-
</PageBlock>
24+
</Box>
2225
);
2326
};
2427

src/frontend/src/pages/AdminToolsPage/AdminToolsFinanceConfig.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import AccountCodesTable from './FinanceConfig/AccountCodesTable';
55
const AdminToolsFinanceConfig: React.FC = () => {
66
return (
77
<Box padding="5px">
8-
<Typography marginBottom="15px" variant="h5">
8+
<Typography variant="h5" gutterBottom borderBottom={1} color="red" borderColor={'white'}>
99
Finance Config
1010
</Typography>
1111
<Grid container spacing="3%">

src/frontend/src/pages/AdminToolsPage/AdminToolsPage.tsx

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -69,13 +69,16 @@ const AdminToolsPage: React.FC = () => {
6969
<PageLayout
7070
title="Admin Tools"
7171
tabs={
72-
<NERTabs
73-
setTab={setTabIndex}
74-
tabsLabels={tabs}
75-
baseUrl={routes.ADMIN_TOOLS}
76-
defaultTab={defaultTab}
77-
id="admin-tools-tabs"
78-
/>
72+
<Box borderBottom={1} borderColor={'divider'} width={'100%'}>
73+
<NERTabs
74+
noUnderline
75+
setTab={setTabIndex}
76+
tabsLabels={tabs}
77+
baseUrl={routes.ADMIN_TOOLS}
78+
defaultTab={defaultTab}
79+
id="admin-tools-tabs"
80+
/>
81+
</Box>
7982
}
8083
>
8184
{tabIndex === 0 ? (

src/frontend/src/pages/AdminToolsPage/AdminToolsProjectsConfig.tsx

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
1-
import PageBlock from '../../layouts/PageBlock';
1+
import { Box } from '@mui/system';
22
import LinkTypeTable from './ProjectsConfig/LinkTypeTable';
3+
import { Typography } from '@mui/material';
34

45
const AdminToolsProjectsConfig: React.FC = () => {
56
return (
6-
<PageBlock title="Projects Config">
7+
<Box>
8+
<Typography variant="h5" gutterBottom borderBottom={1} color="red" borderColor={'white'}>
9+
Links Config
10+
</Typography>
711
<LinkTypeTable />
8-
</PageBlock>
12+
</Box>
913
);
1014
};
1115

src/frontend/src/pages/AdminToolsPage/BOMConfig/ManufacturerTable.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { TableRow, TableCell, Typography, Box } from '@mui/material';
1+
import { TableRow, TableCell, Box } from '@mui/material';
22
import LoadingIndicator from '../../../components/LoadingIndicator';
33
import { datePipe } from '../../../utils/pipes';
44
import ErrorPage from '../../ErrorPage';
@@ -36,7 +36,6 @@ const ManufacturerTable: React.FC = () => {
3636
return (
3737
<Box>
3838
<CreateManufacturerModal showModal={createModalShow} handleClose={() => setCreateModalShow(false)} />
39-
<Typography variant="subtitle1">Registered Manufacturers</Typography>
4039
<AdminToolTable columns={[{ name: 'Date Registered' }, { name: 'Manufacturer Name' }]} rows={manufacturersTableRows} />
4140
<Box sx={{ display: 'flex', justifyContent: 'right', marginTop: '10px' }}>
4241
<NERButton

src/frontend/src/pages/AdminToolsPage/BOMConfig/MaterialTypeTable.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { TableRow, TableCell, Typography, Box } from '@mui/material';
1+
import { TableRow, TableCell, Box } from '@mui/material';
22
import LoadingIndicator from '../../../components/LoadingIndicator';
33
import { datePipe } from '../../../utils/pipes';
44
import ErrorPage from '../../ErrorPage';
@@ -36,7 +36,6 @@ const MaterialTypeTable: React.FC = () => {
3636
return (
3737
<Box>
3838
<CreateMaterialTypeModal showModal={createModalShow} handleClose={() => setCreateModalShow(false)} />
39-
<Typography variant="subtitle1">Registered Material Types</Typography>
4039
<AdminToolTable columns={[{ name: 'Date Registered' }, { name: 'Material Type' }]} rows={materialTypesTableRows} />
4140
<Box sx={{ display: 'flex', justifyContent: 'right', marginTop: '10px' }}>
4241
<NERButton

src/frontend/src/pages/AdminToolsPage/BOMConfig/UnitTable.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
import { TableRow, TableCell, Typography, Box } from '@mui/material';
1+
import { TableRow, TableCell, Box } from '@mui/material';
22
import LoadingIndicator from '../../../components/LoadingIndicator';
3-
// import { datePipe } from '../../../utils/pipes';
43
import ErrorPage from '../../ErrorPage';
54
import { NERButton } from '../../../components/NERButton';
65
import { useState } from 'react';
@@ -35,7 +34,6 @@ const UnitTypeTable: React.FC = () => {
3534
return (
3635
<Box>
3736
<CreateUnitFormModal showModal={createModalShow} handleClose={() => setCreateModalShow(false)} />
38-
<Typography variant="subtitle1">Registered Units</Typography>
3937
<AdminToolTable columns={[{ name: 'Unit' }]} rows={unitTypesTableRows} />
4038
<Box sx={{ display: 'flex', justifyContent: 'right', marginTop: '10px' }}>
4139
<NERButton

src/frontend/src/pages/AdminToolsPage/FinanceConfig/AccountCodesTable.tsx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,6 @@ const AccountCodesTable = () => {
6464
accountCode={clickedAccountCode}
6565
/>
6666
)}
67-
<Typography variant="subtitle1" textAlign="left">
68-
Account Codes
69-
</Typography>
7067
<AdminToolTable
7168
columns={[
7269
{ name: 'Account Name', width: '25%' },

src/frontend/src/pages/AdminToolsPage/FinanceConfig/VendorsTable.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { TableRow, TableCell, Typography, Box } from '@mui/material';
1+
import { TableRow, TableCell, Box } from '@mui/material';
22
import LoadingIndicator from '../../../components/LoadingIndicator';
33
import { useGetAllVendors } from '../../../hooks/finance.hooks';
44
import { datePipe } from '../../../utils/pipes';
@@ -52,7 +52,6 @@ const VendorsTable = () => {
5252
vendors={vendors}
5353
/>
5454
)}
55-
<Typography variant="subtitle1">Registered Vendors</Typography>
5655
<AdminToolTable columns={[{ name: 'Date Registered' }, { name: 'Vendor Name' }]} rows={vendorTableRows} />
5756
<Box sx={{ display: 'flex', justifyContent: 'right', marginTop: '10px' }}>
5857
<NERButton

0 commit comments

Comments
 (0)