fix
This commit is contained in:
@@ -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} />
|
||||
|
||||
@@ -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: () => {
|
||||
|
||||
Reference in New Issue
Block a user