refactor: Streamline BillingManager layout by consolidating filter and action buttons. Enhanced UI for better accessibility and user experience.
Publish Fast Tabler Docker image / build-and-push-fast (push) Successful in 1m42s
Publish Fast Tabler Docker image / build-and-push-fast (push) Successful in 1m42s
This commit is contained in:
@@ -510,26 +510,6 @@ function BillingManager() {
|
|||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
{/* Дополнительные действия */}
|
|
||||||
<div className="mb-4 d-print-none">
|
|
||||||
<div className="btn-list">
|
|
||||||
<button
|
|
||||||
className="btn btn-outline-secondary"
|
|
||||||
onClick={() => setShowFilters(!showFilters)}
|
|
||||||
>
|
|
||||||
<IconFilter size={16} className="me-1" />
|
|
||||||
Фильтры
|
|
||||||
</button>
|
|
||||||
<button
|
|
||||||
className="btn btn-primary"
|
|
||||||
onClick={handleAddItem}
|
|
||||||
>
|
|
||||||
<IconPlus size={16} className="me-1" />
|
|
||||||
Добавить
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{/* Уведомления */}
|
{/* Уведомления */}
|
||||||
{error && (
|
{error && (
|
||||||
<ErrorAlert
|
<ErrorAlert
|
||||||
@@ -547,68 +527,6 @@ function BillingManager() {
|
|||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{/* Фильтры */}
|
|
||||||
{showFilters && (
|
|
||||||
<div className="card mb-4">
|
|
||||||
<div className="card-header">
|
|
||||||
<h3 className="card-title">Фильтры</h3>
|
|
||||||
</div>
|
|
||||||
<div className="card-body">
|
|
||||||
<div className="row g-3">
|
|
||||||
<div className="col-md-3">
|
|
||||||
<label className="form-label">Поиск</label>
|
|
||||||
<input
|
|
||||||
type="text"
|
|
||||||
className="form-control"
|
|
||||||
placeholder="Поиск по названию, назначению, провайдеру..."
|
|
||||||
value={searchTerm}
|
|
||||||
onChange={(e) => setSearchTerm(e.target.value)}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
<div className="col-md-3">
|
|
||||||
<label className="form-label">Провайдер</label>
|
|
||||||
<select
|
|
||||||
className="form-select"
|
|
||||||
value={filterProvider}
|
|
||||||
onChange={(e) => setFilterProvider(e.target.value)}
|
|
||||||
>
|
|
||||||
<option value="">Все провайдеры</option>
|
|
||||||
{uniqueProviders.map(provider => (
|
|
||||||
<option key={provider} value={provider}>{provider}</option>
|
|
||||||
))}
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
<div className="col-md-3">
|
|
||||||
<label className="form-label">Страна</label>
|
|
||||||
<select
|
|
||||||
className="form-select"
|
|
||||||
value={filterCountry}
|
|
||||||
onChange={(e) => setFilterCountry(e.target.value)}
|
|
||||||
>
|
|
||||||
<option value="">Все страны</option>
|
|
||||||
{uniqueCountries.map(country => (
|
|
||||||
<option key={country} value={country}>{country}</option>
|
|
||||||
))}
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
<div className="col-md-3">
|
|
||||||
<label className="form-label">Статус</label>
|
|
||||||
<select
|
|
||||||
className="form-select"
|
|
||||||
value={filterStatus}
|
|
||||||
onChange={(e) => setFilterStatus(e.target.value)}
|
|
||||||
>
|
|
||||||
<option value="">Все статусы</option>
|
|
||||||
{uniqueStatuses.map(status => (
|
|
||||||
<option key={status} value={status}>{status}</option>
|
|
||||||
))}
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
|
|
||||||
{/* Статистические карточки */}
|
{/* Статистические карточки */}
|
||||||
<div className="row g-3 mb-4">
|
<div className="row g-3 mb-4">
|
||||||
<div className="col-md-3">
|
<div className="col-md-3">
|
||||||
@@ -688,17 +606,91 @@ function BillingManager() {
|
|||||||
<div className="card-header">
|
<div className="card-header">
|
||||||
<h3 className="card-title">Оплачиваемые ноды</h3>
|
<h3 className="card-title">Оплачиваемые ноды</h3>
|
||||||
<div className="card-actions">
|
<div className="card-actions">
|
||||||
<button
|
<div className="btn-list">
|
||||||
className="btn btn-primary"
|
<button
|
||||||
onClick={handleSaveChanges}
|
className="btn btn-outline-secondary"
|
||||||
disabled={loading}
|
onClick={() => setShowFilters(!showFilters)}
|
||||||
>
|
>
|
||||||
<IconDatabase size={16} />
|
<IconFilter size={16} className="me-1" />
|
||||||
Сохранить
|
Фильтры
|
||||||
</button>
|
</button>
|
||||||
|
<button
|
||||||
|
className="btn btn-primary"
|
||||||
|
onClick={handleAddItem}
|
||||||
|
>
|
||||||
|
<IconPlus size={16} className="me-1" />
|
||||||
|
Добавить
|
||||||
|
</button>
|
||||||
|
<button
|
||||||
|
className="btn btn-primary"
|
||||||
|
onClick={handleSaveChanges}
|
||||||
|
disabled={loading}
|
||||||
|
>
|
||||||
|
<IconDatabase size={16} className="me-1" />
|
||||||
|
Сохранить
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="card-body">
|
<div className="card-body">
|
||||||
|
{/* Фильтры */}
|
||||||
|
{showFilters && (
|
||||||
|
<div className="card mb-3">
|
||||||
|
<div className="card-body">
|
||||||
|
<div className="row g-3">
|
||||||
|
<div className="col-md-3">
|
||||||
|
<label className="form-label">Поиск</label>
|
||||||
|
<input
|
||||||
|
type="text"
|
||||||
|
className="form-control"
|
||||||
|
placeholder="Поиск по названию, назначению, провайдеру..."
|
||||||
|
value={searchTerm}
|
||||||
|
onChange={(e) => setSearchTerm(e.target.value)}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div className="col-md-3">
|
||||||
|
<label className="form-label">Провайдер</label>
|
||||||
|
<select
|
||||||
|
className="form-select"
|
||||||
|
value={filterProvider}
|
||||||
|
onChange={(e) => setFilterProvider(e.target.value)}
|
||||||
|
>
|
||||||
|
<option value="">Все провайдеры</option>
|
||||||
|
{uniqueProviders.map(provider => (
|
||||||
|
<option key={provider} value={provider}>{provider}</option>
|
||||||
|
))}
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<div className="col-md-3">
|
||||||
|
<label className="form-label">Страна</label>
|
||||||
|
<select
|
||||||
|
className="form-select"
|
||||||
|
value={filterCountry}
|
||||||
|
onChange={(e) => setFilterCountry(e.target.value)}
|
||||||
|
>
|
||||||
|
<option value="">Все страны</option>
|
||||||
|
{uniqueCountries.map(country => (
|
||||||
|
<option key={country} value={country}>{country}</option>
|
||||||
|
))}
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<div className="col-md-3">
|
||||||
|
<label className="form-label">Статус</label>
|
||||||
|
<select
|
||||||
|
className="form-select"
|
||||||
|
value={filterStatus}
|
||||||
|
onChange={(e) => setFilterStatus(e.target.value)}
|
||||||
|
>
|
||||||
|
<option value="">Все статусы</option>
|
||||||
|
{uniqueStatuses.map(status => (
|
||||||
|
<option key={status} value={status}>{status}</option>
|
||||||
|
))}
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
<div className="table-responsive">
|
<div className="table-responsive">
|
||||||
<table className="table card-table table-vcenter table-nowrap mb-0">
|
<table className="table card-table table-vcenter table-nowrap mb-0">
|
||||||
<thead>
|
<thead>
|
||||||
|
|||||||
Reference in New Issue
Block a user