NestJS backend rewrite; migrate client to FluentUI V9

This commit is contained in:
2025-09-18 15:48:08 +09:00
parent 32ff36a12c
commit 34529cea68
62 changed files with 5642 additions and 3679 deletions

View File

@ -1,8 +1,8 @@
import { useRoles } from '../hooks/swrHooks'
import { CreateField } from '../interfaces/create'
import RoleService from '../services/RoleService'
import { Loader, Stack } from '@mantine/core'
import CustomTable from '../components/CustomTable'
import { Spinner } from '@fluentui/react-components'
export default function Roles() {
const { roles, isError, isLoading } = useRoles()
@ -13,30 +13,34 @@ export default function Roles() {
]
if (isError) return <div>Произошла ошибка при получении данных.</div>
if (isLoading) return <Loader />
if (isLoading) return <Spinner />
return (
<Stack w={'100%'} h={'100%'} p='sm'>
<div style={{
width: '100%',
height: '100%',
padding: '1rem'
}} >
<CustomTable
createFields={createFields}
submitHandler={RoleService.createRole}
data={roles} columns={[
{
accessorKey: 'id',
name: 'id',
header: 'id',
cell: (info) => info.getValue(),
type: 'number'
},
{
accessorKey: 'name',
name: 'name',
header: 'Название',
cell: (info) => info.getValue(),
type: 'string'
},
{
accessorKey: 'description',
name: 'description',
header: 'Описание',
cell: (info) => info.getValue(),
type: 'string'
},
]} />
</Stack>
</div>
)
}