Skip to content

Commit 36eadf2

Browse files
committed
merge mainscreen conflicts
2 parents be9008c + ac54829 commit 36eadf2

File tree

2 files changed

+37
-107
lines changed

2 files changed

+37
-107
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 & 102 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +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}
3617
rightSection={
37-
<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+
>
3827
<span>MemberCount[{index}]</span>
3928
<IconUsersGroup />
4029
</div>
4130
}
31+
styles={{
32+
label: {
33+
color: `${color}`,
34+
fontSize: `${size}`,
35+
},
36+
}}
4237
/>
4338
);
4439
};
@@ -54,10 +49,10 @@ export const ScreenComponent: React.FC = () => {
5449
justifyContent: 'space-between',
5550
alignItems: 'center',
5651
fontWeight: 'bold',
57-
// backgroundColor: "#f8f9fa",
5852
borderRadius: '8px',
5953
padding: '10px 16px',
6054
marginBottom: '8px',
55+
fontSize: '22px',
6156
}}
6257
>
6358
<span>Organization</span>
@@ -67,80 +62,3 @@ export const ScreenComponent: React.FC = () => {
6762
</>
6863
);
6964
};
70-
71-
import { Table } from '@mantine/core';
72-
73-
export const SigTable = () => {
74-
const location = useLocation();
75-
return (
76-
<Table highlightOnHover>
77-
{/* Headers */}
78-
<thead>
79-
<tr>
80-
<th>Organization</th>
81-
<th>Member Count</th>
82-
</tr>
83-
</thead>
84-
85-
<tbody>
86-
{OrganizationList.map((org, index) => (
87-
<tr key={index}>
88-
{/* Organization Column */}
89-
<td>
90-
<NavLink
91-
href={`${location.pathname}/${org}`}
92-
label={org}
93-
variant="filled"
94-
active={index % 2 === 0}
95-
/>
96-
</td>
97-
98-
{/* Member Count Column */}
99-
<td style={{ display: 'flex', alignItems: 'center', gap: '8px' }}>
100-
<span>MemberCount[{index}]</span>
101-
<IconUsersGroup />
102-
</td>
103-
</tr>
104-
))}
105-
</tbody>
106-
{/* <tbody>
107-
{OrganizationList.map((org, index) => (
108-
<tr key={index}>
109-
<td>{renderSigLink(org, index)}</td>
110-
</tr>
111-
))}
112-
</tbody> */}
113-
</Table>
114-
);
115-
};
116-
117-
// const navLinks = [
118-
// { label: "Home", icon: <IconHome size={16} />, path: "/" },
119-
// { label: "Profile", icon: <IconUser size={16} />, path: "/profile" },
120-
// { label: "Settings", icon: <IconSettings size={16} />, path: "/settings" },
121-
// ];
122-
123-
// export const NavLinkTable = () => {
124-
// return (
125-
// <Table highlightOnHover>
126-
// <thead>
127-
// <tr>
128-
// <th>Navigation</th>
129-
// </tr>
130-
// </thead>
131-
// <tbody>
132-
// {navLinks.map((link, index) => (
133-
// <tr key={index}>
134-
// <td>
135-
// <NavLink
136-
// label={link.label}
137-
// component={Link} // Integrates with React Router
138-
// to={link.path}
139-
// />
140-
// </td>
141-
// </tr>
142-
// ))}
143-
// </tbody>
144-
// </Table>
145-
// );
146-
// }

0 commit comments

Comments
 (0)