Skip to content

Commit 04ab173

Browse files
authored
Merge pull request #705 from jembi/CI-86c0qwr3h-users-updates
feat: ability to delete user.
2 parents 8e8f10c + ea89d20 commit 04ab173

File tree

14 files changed

+329
-206
lines changed

14 files changed

+329
-206
lines changed

packages/channels-app/src/components/dialogs/basic.dialog.component.tsx

+2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ export type BasicDialogProps = {
88
children: React.ReactNode
99
size?: DialogProps['maxWidth']
1010
defaultContentWrapper?: boolean
11+
sx?: DialogProps['sx']
1112
}
1213

1314
export function BasicDialog(props: BasicDialogProps) {
@@ -16,6 +17,7 @@ export function BasicDialog(props: BasicDialogProps) {
1617
open={props.open}
1718
onClose={props.onClose}
1819
maxWidth={props.size ?? 'lg'}
20+
sx={props.sx}
1921
>
2022
{props.title && <DialogTitle>{props.title}</DialogTitle>}
2123
<DialogContent>{props.children}</DialogContent>

packages/channels-app/src/contexts/dialog.context.tsx

+13-5
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
11
import React, {createContext, useContext, useState, ReactNode} from 'react'
2-
import {BasicDialog} from '../components/dialogs/basic.dialog.component'
2+
import {
3+
BasicDialog,
4+
BasicDialogProps
5+
} from '../components/dialogs/basic.dialog.component'
36

47
interface BasicDialogContextProps {
58
showBasicDialog: (
69
children: ReactNode,
710
title?: string,
8-
size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl'
11+
size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl',
12+
sx?: BasicDialogProps['sx']
913
) => void
1014
hideBasicDialog: () => void
1115
}
@@ -22,19 +26,22 @@ export const BasicDialogProvider: React.FC<{children: ReactNode}> = ({
2226
children: ReactNode
2327
open: boolean
2428
size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl'
29+
sx?: BasicDialogProps['sx']
2530
}>({
2631
title: '',
2732
children: null,
2833
open: false,
29-
size: 'xs'
34+
size: 'xs',
35+
sx: undefined
3036
})
3137

3238
const showBasicDialog = (
3339
children: ReactNode,
3440
title?: string,
35-
size: 'xs' | 'sm' | 'md' | 'lg' | 'xl' = 'xs'
41+
size: 'xs' | 'sm' | 'md' | 'lg' | 'xl' = 'xs',
42+
sx?: BasicDialogProps['sx']
3643
) => {
37-
setDialogProps({title, children, open: true, size})
44+
setDialogProps({title, children, open: true, size, sx})
3845
}
3946

4047
const hideBasicDialog = () => {
@@ -49,6 +56,7 @@ export const BasicDialogProvider: React.FC<{children: ReactNode}> = ({
4956
open={dialogProps.open}
5057
onClose={hideBasicDialog}
5158
size={dialogProps.size}
59+
sx={dialogProps.sx}
5260
>
5361
{dialogProps.children}
5462
</BasicDialog>

packages/channels-app/src/screens/manage.channels.screen.tsx

+8
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,7 @@ const ManageChannelsScreen: React.FC = () => {
154154
)
155155
}
156156
},
157+
{field: 'type', headerName: 'Type', flex: 0.5},
157158
{field: 'priority', headerName: 'Priority', flex: 0.5},
158159
{field: 'allow', headerName: 'Access', flex: 1},
159160
{
@@ -203,6 +204,7 @@ const ManageChannelsScreen: React.FC = () => {
203204
id: index,
204205
name: channel.name,
205206
urlPattern: channel.urlPattern,
207+
type: channel.type,
206208
status: channel.status,
207209
priority: channel.priority ?? '',
208210
allow: channel.allow.join(', ')
@@ -268,6 +270,12 @@ const ManageChannelsScreen: React.FC = () => {
268270
},
269271
'& .MuiDataGrid-columnHeaders': {
270272
borderBottom: 'none'
273+
},
274+
'& .MuiDataGrid-cell:focus': {
275+
outline: 'none'
276+
},
277+
'& .MuiDataGrid-columnHeaderTitle': {
278+
fontWeight: 'bold'
271279
}
272280
}}
273281
/>

0 commit comments

Comments
 (0)