diff --git a/frontend/src/BillingManager.jsx b/frontend/src/BillingManager.jsx index e98ebee..fc44d9b 100644 --- a/frontend/src/BillingManager.jsx +++ b/frontend/src/BillingManager.jsx @@ -34,9 +34,12 @@ import { IconX, IconChecks, IconServer, - IconClock + IconClock, + IconLayoutGrid, + IconList } from '@tabler/icons-react'; import BulkActionsBar from './components/BulkActionsBar.jsx'; +import { BillingCard } from './components/billing/index.js'; function BillingManager() { const [billingData, setBillingData] = useState([]); @@ -50,6 +53,7 @@ function BillingManager() { const [sortOrder, setSortOrder] = useState('asc'); const [filterStatus, setFilterStatus] = useState(''); const [filterUrgency, setFilterUrgency] = useState(''); + const [viewMode, setViewMode] = useState('cards'); // 'cards' | 'table' const pageSize = 15; // Модальные окна @@ -566,7 +570,7 @@ function BillingManager() { - {/* Основная таблица */} + {/* Основная секция */}
| handleSort('hostName')} - style={{ minWidth: '200px' }} - > - Сервис - {sortField === 'hostName' && ( - {sortOrder === 'asc' ? '↑' : '↓'} - )} - | -handleSort('monthlyCost')} - style={{ width: '140px' }} - > - Стоимость - {sortField === 'monthlyCost' && ( - {sortOrder === 'asc' ? '↑' : '↓'} - )} - | -handleSort('nextPaymentDate')} - style={{ width: '120px' }} - > - Платёж - {sortField === 'nextPaymentDate' && ( - {sortOrder === 'asc' ? '↑' : '↓'} - )} - | -Срок | -Статус | -- | ||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| - {searchTerm || filterUrgency ? 'Ничего не найдено' : 'Нет данных'} - | +handleSort('hostName')} + style={{ minWidth: '200px' }} + > + Сервис + {sortField === 'hostName' && ( + {sortOrder === 'asc' ? '↑' : '↓'} + )} + | +handleSort('monthlyCost')} + style={{ width: '140px' }} + > + Стоимость + {sortField === 'monthlyCost' && ( + {sortOrder === 'asc' ? '↑' : '↓'} + )} + | +handleSort('nextPaymentDate')} + style={{ width: '120px' }} + > + Платёж + {sortField === 'nextPaymentDate' && ( + {sortOrder === 'asc' ? '↑' : '↓'} + )} + | +Срок | +Статус | +||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
|
-
-
- {item.hostName}
-
- {item.provider}
- {linkedServer && (
- <>
- •
- {linkedServer.ip}
- >
- )}
- {item.loginUrl && (
-
- | |||||||||||
|
+
+
-
-
+
{item.hostName}
+
+ {item.provider}
+ {linkedServer && (
+ <>
+ •
+ {linkedServer.ip}
+ >
+ )}
+ {item.loginUrl && (
+
+
|
-
-
- {formatCurrency(item.monthlyCost, item.monthlyCostCurrency)}
-
- {item.monthlyCostCurrency !== 'RUB' && (
-
- ≈ {formatCurrencyInRUB(item.monthlyCost, item.monthlyCostCurrency)}
+ |
+
+
+ {formatCurrency(item.monthlyCost, item.monthlyCostCurrency)}
- )}
- |
- - {formatDate(item.nextPaymentDate)} - | -
- |
- - {item.status === 'active' ? ( - Активен - ) : ( - Неактивен - )} - | -
-
-
-
-
-
- |
- |||||