'use client'; import { useState } from 'react'; import UserEditModal from '@/components/UserEditModal'; import { PageLayout, DataTable, FilterBar, StatusBadge } from '@/components/ui'; import { useUsersData } from '@/hooks/useSWRData'; const RL: Record = { admin:'Администратор', authority_inspector:'Инспектор', operator_manager:'Менеджер оператора', operator_user:'Оператор', mro_manager:'Менеджер ТОиР', mro_specialist:'Специалист ТОиР', mro_user:'Специалист ТОиР' }; const RC: Record = { admin:'bg-green-500', authority_inspector:'bg-blue-500', operator_manager:'bg-orange-500', operator_user:'bg-orange-400', mro_manager:'bg-purple-500', mro_specialist:'bg-purple-400', mro_user:'bg-purple-400' }; export default function UsersPage() { const [rf, setRf] = useState(); const { data, isLoading } = useUsersData({ role: rf }); return ( ({ value: v, label: l }))]} className="mb-4" /> {u.display_name} }, { key: 'email', header: 'Email', render: (u: any) => {u.email || '—'} }, { key: 'role', header: 'Роль', render: (u: any) => }, { key: 'organization_name', header: 'Организация', render: (u: any) => {u.organization_name || '—'} }, ]} /> ); }