admin page
This commit is contained in:
@@ -35,6 +35,10 @@
|
||||
background: rgba(255, 255, 255, 0.04);
|
||||
}
|
||||
|
||||
.row {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.name {
|
||||
font-weight: 600;
|
||||
display: block;
|
||||
|
||||
@@ -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>}
|
||||
|
||||
Reference in New Issue
Block a user