admin page

This commit is contained in:
2026-06-05 16:13:04 +03:00
parent a85f9aabd5
commit fd66ca9c9b
18 changed files with 593 additions and 166 deletions

View File

@@ -35,6 +35,10 @@
background: rgba(255, 255, 255, 0.04);
}
.row {
cursor: pointer;
}
.name {
font-weight: 600;
display: block;

View File

@@ -1,4 +1,6 @@
import { useNavigate } from 'react-router-dom'
import { useOrganizations } from '@features/admin'
import { adminOrganizationPath } from '@shared/config/routes'
import styles from './LegalEntitiesTable.module.css'
const STATUS_LABELS: Record<string, string> = {
@@ -16,6 +18,7 @@ function formatDate(value: string | null): string {
export function LegalEntitiesTable() {
const { data, isLoading, isError } = useOrganizations()
const navigate = useNavigate()
if (isLoading) {
return <div className={styles.tableWrap}><div className={styles.state}>Загрузка...</div></div>
@@ -54,7 +57,11 @@ export function LegalEntitiesTable() {
</thead>
<tbody>
{data.items.map((org) => (
<tr key={org.id}>
<tr
key={org.id}
className={styles.row}
onClick={() => navigate(adminOrganizationPath(org.id))}
>
<td>
<span className={styles.name}>{org.name}</span>
{org.short_name && <span className={styles.subname}>{org.short_name}</span>}