fix(admin): дефолтные подвкладки конференций и пользователей
Конференции открывались на «Все» — неинформативная сборная вкладка вместо актуальных «Запланированные». Заодно перенесена вкладка «Все» в конец списка фильтров (после «Завершённые»), чтобы порядок шёл от актуального к общему. Пользователи открывались на «Все» вместо «Активные» — админ по умолчанию видел вперемешку с заблокированными.
This commit is contained in:
@@ -18,10 +18,10 @@ import { formatRecurrenceSummary } from '@/lib/recurrenceFormat'
|
|||||||
const PAGE_SIZE = 10
|
const PAGE_SIZE = 10
|
||||||
|
|
||||||
const STATUS_FILTERS: { value: ConferenceStatus | 'all'; label: string }[] = [
|
const STATUS_FILTERS: { value: ConferenceStatus | 'all'; label: string }[] = [
|
||||||
{ value: 'all', label: 'Все' },
|
|
||||||
{ value: 'scheduled', label: 'Запланированные' },
|
{ value: 'scheduled', label: 'Запланированные' },
|
||||||
{ value: 'active', label: 'Активные' },
|
{ value: 'active', label: 'Активные' },
|
||||||
{ value: 'ended', label: 'Завершённые' },
|
{ value: 'ended', label: 'Завершённые' },
|
||||||
|
{ value: 'all', label: 'Все' },
|
||||||
]
|
]
|
||||||
|
|
||||||
function StatusBadge({ conference }: { conference: AdminConferenceOut }) {
|
function StatusBadge({ conference }: { conference: AdminConferenceOut }) {
|
||||||
@@ -287,7 +287,7 @@ function InviteModal({ conference, onClose }: { conference: AdminConferenceOut;
|
|||||||
* блок «table-card», адаптированный под сущность «конференция»).
|
* блок «table-card», адаптированный под сущность «конференция»).
|
||||||
*/
|
*/
|
||||||
export function AdminConferencesTab() {
|
export function AdminConferencesTab() {
|
||||||
const [statusFilter, setStatusFilter] = useState<ConferenceStatus | 'all'>('all')
|
const [statusFilter, setStatusFilter] = useState<ConferenceStatus | 'all'>('scheduled')
|
||||||
const [searchInput, setSearchInput] = useState('')
|
const [searchInput, setSearchInput] = useState('')
|
||||||
const [search, setSearch] = useState('')
|
const [search, setSearch] = useState('')
|
||||||
const [offset, setOffset] = useState(0)
|
const [offset, setOffset] = useState(0)
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ const STATUS_FILTERS: { value: 'active' | 'blocked' | 'all'; label: string }[] =
|
|||||||
*/
|
*/
|
||||||
export function AdminUsersTab() {
|
export function AdminUsersTab() {
|
||||||
const { user: currentUser } = useAuth()
|
const { user: currentUser } = useAuth()
|
||||||
const [statusFilter, setStatusFilter] = useState<'active' | 'blocked' | 'all'>('all')
|
const [statusFilter, setStatusFilter] = useState<'active' | 'blocked' | 'all'>('active')
|
||||||
const [searchInput, setSearchInput] = useState('')
|
const [searchInput, setSearchInput] = useState('')
|
||||||
const [search, setSearch] = useState('')
|
const [search, setSearch] = useState('')
|
||||||
const [offset, setOffset] = useState(0)
|
const [offset, setOffset] = useState(0)
|
||||||
|
|||||||
Reference in New Issue
Block a user