This commit is contained in:
2026-06-08 10:44:40 +03:00
parent 5adb1e807b
commit 80c7c5e8f8
11 changed files with 157 additions and 9 deletions

View File

@@ -6,13 +6,15 @@ import { FormField, Notification, PrimaryButton } from '@shared/ui'
import { AdminLoginForm } from '@widgets/admin-login-form'
import { OrganizationDocuments } from '@widgets/organization-documents'
import { OrganizationPurchaseRequests } from '@widgets/organization-purchase-requests'
import { OrganizationWallets } from '@widgets/organization-wallets'
import { useOrganizationForm } from '../model/useOrganizationForm'
import styles from './AdminOrganizationPage.module.css'
type Tab = 'info' | 'documents' | 'requests'
type Tab = 'info' | 'wallets' | 'documents' | 'requests'
const TABS: { id: Tab; label: string }[] = [
{ id: 'info', label: 'Общая информация' },
{ id: 'wallets', label: 'Кошельки' },
{ id: 'documents', label: 'Документы' },
{ id: 'requests', label: 'Заявки' },
]
@@ -118,6 +120,12 @@ export function AdminOrganizationPage() {
</form>
)}
{org && activeTab === 'wallets' && (
<div className={styles.tabPanel}>
<OrganizationWallets orgId={org.id} />
</div>
)}
{org && activeTab === 'documents' && (
<div className={styles.tabPanel}>
<OrganizationDocuments orgId={org.id} />

View File

@@ -21,10 +21,10 @@ export function AdminPage() {
function handleCreated(organization: Organization) {
setNotification({ status: 'success', message: 'Юридическое лицо добавлено' })
createWallets.mutate(organization.id, {
onSuccess: (wallets) => {
onSuccess: (result) => {
setNotification({
status: 'success',
message: `Кошельки созданы (${wallets.length})`,
message: `Кошельки созданы (${result.wallets.length})`,
})
},
onError: () => {