- {/* Current balance */}
-
-
- {t('admin.users.detail.balance.current')}
-
-
- {formatWithCurrency(user.balance_rubles)}
-
-
-
- {/* Add/subtract form */}
- {hasPermission('users:balance') && (
-
-
-
setBalanceDescription(e.target.value)}
- placeholder={t('admin.users.detail.balance.descriptionPlaceholder')}
- className="input"
- maxLength={500}
- />
-
-
-
-
-
- )}
-
- {/* Active promo offer */}
- {user.promo_offer_discount_percent > 0 && (
-
-
-
- {t('admin.users.detail.activePromoOffer')}
-
-
-
-
-
-
- {user.promo_offer_discount_percent}%
-
-
{t('admin.users.detail.discount')}
-
-
-
- {user.promo_offer_discount_source || '-'}
-
-
{t('admin.users.detail.source')}
-
-
-
- {user.promo_offer_discount_expires_at
- ? formatDate(user.promo_offer_discount_expires_at)
- : '-'}
-
-
{t('admin.users.detail.expiresAt')}
-
-
-
- )}
-
- {/* Send promo offer */}
- {hasPermission('users:send_offer') && (
-
- )}
-
- {/* Recent transactions */}
- {user.recent_transactions.length > 0 && (
-
-
- {t('admin.users.detail.balance.recentTransactions')}
-
-
- {user.recent_transactions.map((tx) => (
-
-
-
{tx.description || tx.type}
-
{formatDate(tx.created_at)}
-
-
= 0 ? 'text-success-400' : 'text-error-400'}
- >
- {tx.amount_kopeks >= 0 ? '+' : ''}
- {formatWithCurrency(tx.amount_rubles)}
-
-
- ))}
-
-
- )}
-
+ {activeTab === 'balance' && userId && (
+