diff --git a/frontend/src/BillingManager.jsx b/frontend/src/BillingManager.jsx index 6cf6718..4f8d075 100644 --- a/frontend/src/BillingManager.jsx +++ b/frontend/src/BillingManager.jsx @@ -17,7 +17,8 @@ import { IconDownload, IconUpload, IconEye, - IconEyeOff + IconEyeOff, + IconHistory } from '@tabler/icons-react'; const API_URL = '/api'; @@ -166,7 +167,7 @@ function BillingManager() { const handleAddSubmit = () => { if (!newItem.hostName || !newItem.country || !newItem.provider) { - setError('Пожалуйста, заполните обязательные поля: Host Name, Country, Provider'); + setError('Пожалуйста, заполните обязательные поля: Имя хоста, Страна, Провайдер'); return; } @@ -180,7 +181,7 @@ function BillingManager() { const handleEditSubmit = () => { if (!editingItem.hostName || !editingItem.country || !editingItem.provider) { - setError('Пожалуйста, заполните обязательные поля: Host Name, Country, Provider'); + setError('Пожалуйста, заполните обязательные поля: Имя хоста, Страна, Провайдер'); return; } @@ -249,15 +250,6 @@ function BillingManager() { const uniqueCountries = [...new Set(billingData.map(item => item.country).filter(Boolean))]; const uniqueStatuses = [...new Set(billingData.map(item => item.status).filter(Boolean))]; - function countryToFlag(isoCode) { - if (!isoCode) return '🌍'; - const codePoints = isoCode - .toUpperCase() - .split('') - .map(char => 127397 + char.charCodeAt()); - return String.fromCodePoint(...codePoints); - } - function formatDate(dateString) { if (!dateString) return 'Не указано'; try { @@ -428,7 +420,7 @@ function BillingManager() { > {uniqueCountries.map(country => ( - + ))} @@ -615,9 +607,6 @@ function BillingManager() {
| Имя хостера | +Дата платежа | +Сумма | +Валюта | +Статус | +
|---|---|---|---|---|
|
+ {item.hostName}
+ {item.provider}
+ |
+ {formatDate(item.lastPaymentDate)} | +
+
+ {formatCurrency(item.lastPaymentAmount, item.lastPaymentCurrency)}
+
+
+ {formatCurrencyInRUB(item.lastPaymentAmount, item.lastPaymentCurrency)}
+
+ |
+ + + {item.lastPaymentCurrency || 'USD'} + + | ++ + Оплачен + + | +
| + История платежей пуста + | +||||