Skip to content

Commit ac54829

Browse files
committed
UI updates for the main screen #99
* changed color of alt tabs to be consistent with the theme * increased size of font of all text * reduced width of table for cleaner look
1 parent f3bea09 commit ac54829

File tree

2 files changed

+37
-113
lines changed

2 files changed

+37
-113
lines changed

src/ui/pages/siglead/ManageSigLeads.page.tsx

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,14 @@
1-
import { Title, Box, TextInput, Textarea, Switch, Select, Button, Loader } from '@mantine/core';
1+
import {
2+
Title,
3+
Box,
4+
TextInput,
5+
Textarea,
6+
Switch,
7+
Select,
8+
Button,
9+
Loader,
10+
Container,
11+
} from '@mantine/core';
212
import { DateTimePicker } from '@mantine/dates';
313
import { useForm, zodResolver } from '@mantine/form';
414
import { notifications } from '@mantine/notifications';
@@ -11,7 +21,7 @@ import { getRunEnvironmentConfig } from '@ui/config';
1121
import { useApi } from '@ui/util/api';
1222
import { OrganizationList as orgList } from '@common/orgs';
1323
import { AppRoles } from '@common/roles';
14-
import { ScreenComponent, SigTable } from './SigScreenComponents';
24+
import { ScreenComponent } from './SigScreenComponents';
1525

1626
export function capitalizeFirstLetter(string: string) {
1727
return string.charAt(0).toUpperCase() + string.slice(1);
@@ -156,9 +166,11 @@ export const ManageSigLeadsPage: React.FC = () => {
156166

157167
return (
158168
<AuthGuard resourceDef={{ service: 'core', validRoles: [AppRoles.IAM_ADMIN] }}>
159-
<Title order={2}>SigLead Management System</Title>
160-
<ScreenComponent />
161-
{/* <SigTable /> */}
169+
<Container>
170+
<Title order={2}>SigLead Management System</Title>
171+
<ScreenComponent />
172+
{/* <SigTable /> */}
173+
</Container>
162174
</AuthGuard>
163175
);
164176
};
Lines changed: 20 additions & 108 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,39 @@
11
import React, { useEffect, useMemo, useState } from 'react';
2-
import { z } from 'zod';
32
import { OrganizationList } from '@common/orgs';
43
import { NavLink, Paper } from '@mantine/core';
5-
import { AuthGuard } from '@ui/components/AuthGuard';
6-
import { AppRoles } from '@common/roles';
74
import { IconUsersGroup } from '@tabler/icons-react';
85
import { useLocation } from 'react-router-dom';
96

10-
// use personn icon
11-
// import { IconPlus, IconTrash } from '@tabler/icons-react';
12-
13-
// const OrganizationListEnum = z.enum(OrganizationList);
14-
15-
// const renderTableRow = (org: string) => {
16-
// const count = 50;
17-
// return(
18-
// <Transition mounted={true} transition="fade" duration={400} timingFunction="ease">
19-
// {(styles) => (
20-
// <tr style={{ ...styles, display: 'table-row' }}>
21-
// <Table.Td>{org}</Table.Td>
22-
// <Table.Td>{count}</Table.Td>
23-
// </tr>
24-
// )}
25-
// </Transition>
26-
// )
27-
// }
28-
297
const renderSigLink = (org: string, index: number) => {
8+
const color = 'light-dark(var(--mantine-color-black), var(--mantine-color-white))';
9+
const size = '18px';
3010
return (
3111
<NavLink
3212
href={`${useLocation().pathname}/${org}`}
13+
active={index % 2 === 0}
3314
label={org}
15+
color="var(--mantine-color-blue-light)"
3416
variant="filled"
35-
active={index % 2 === 0}
36-
// color="blue"
37-
// style={{
38-
// // color: "lightgray",
39-
// backgroundColor: "DodgerBlue",
40-
// opacity: 0.5
41-
// }}
4217
rightSection={
43-
<div style={{ display: 'flex', alignItems: 'center', gap: '4px' }}>
18+
<div
19+
style={{
20+
display: 'flex',
21+
alignItems: 'center',
22+
gap: '4px',
23+
color: `${color}`,
24+
fontSize: `${size}`,
25+
}}
26+
>
4427
<span>MemberCount[{index}]</span>
4528
<IconUsersGroup />
4629
</div>
4730
}
31+
styles={{
32+
label: {
33+
color: `${color}`,
34+
fontSize: `${size}`,
35+
},
36+
}}
4837
/>
4938
);
5039
};
@@ -60,10 +49,10 @@ export const ScreenComponent: React.FC = () => {
6049
justifyContent: 'space-between',
6150
alignItems: 'center',
6251
fontWeight: 'bold',
63-
// backgroundColor: "#f8f9fa",
6452
borderRadius: '8px',
6553
padding: '10px 16px',
6654
marginBottom: '8px',
55+
fontSize: '22px',
6756
}}
6857
>
6958
<span>Organization</span>
@@ -73,80 +62,3 @@ export const ScreenComponent: React.FC = () => {
7362
</>
7463
);
7564
};
76-
77-
import { Table } from '@mantine/core';
78-
79-
export const SigTable = () => {
80-
const location = useLocation();
81-
return (
82-
<Table highlightOnHover>
83-
{/* Headers */}
84-
<thead>
85-
<tr>
86-
<th>Organization</th>
87-
<th>Member Count</th>
88-
</tr>
89-
</thead>
90-
91-
<tbody>
92-
{OrganizationList.map((org, index) => (
93-
<tr key={index}>
94-
{/* Organization Column */}
95-
<td>
96-
<NavLink
97-
href={`${location.pathname}/${org}`}
98-
label={org}
99-
variant="filled"
100-
active={index % 2 === 0}
101-
/>
102-
</td>
103-
104-
{/* Member Count Column */}
105-
<td style={{ display: 'flex', alignItems: 'center', gap: '8px' }}>
106-
<span>MemberCount[{index}]</span>
107-
<IconUsersGroup />
108-
</td>
109-
</tr>
110-
))}
111-
</tbody>
112-
{/* <tbody>
113-
{OrganizationList.map((org, index) => (
114-
<tr key={index}>
115-
<td>{renderSigLink(org, index)}</td>
116-
</tr>
117-
))}
118-
</tbody> */}
119-
</Table>
120-
);
121-
};
122-
123-
// const navLinks = [
124-
// { label: "Home", icon: <IconHome size={16} />, path: "/" },
125-
// { label: "Profile", icon: <IconUser size={16} />, path: "/profile" },
126-
// { label: "Settings", icon: <IconSettings size={16} />, path: "/settings" },
127-
// ];
128-
129-
// export const NavLinkTable = () => {
130-
// return (
131-
// <Table highlightOnHover>
132-
// <thead>
133-
// <tr>
134-
// <th>Navigation</th>
135-
// </tr>
136-
// </thead>
137-
// <tbody>
138-
// {navLinks.map((link, index) => (
139-
// <tr key={index}>
140-
// <td>
141-
// <NavLink
142-
// label={link.label}
143-
// component={Link} // Integrates with React Router
144-
// to={link.path}
145-
// />
146-
// </td>
147-
// </tr>
148-
// ))}
149-
// </tbody>
150-
// </Table>
151-
// );
152-
// }

0 commit comments

Comments
 (0)