Use top-level manager tabs only
This commit is contained in:
@@ -29,7 +29,6 @@ type ProductCard = {
|
||||
};
|
||||
|
||||
const route = useRoute();
|
||||
const router = useRouter();
|
||||
const search = ref('');
|
||||
const balancesQuery = useQuery(ManagerBonusBalancesDocument);
|
||||
const referralLinksQuery = useQuery(ManagerReferralLinksDocument);
|
||||
@@ -222,24 +221,6 @@ const WITHDRAWAL_DATE_FORMATTER = new Intl.DateTimeFormat('ru-RU', {
|
||||
minute: '2-digit',
|
||||
});
|
||||
|
||||
const bonusTabs = computed<Array<{ id: 'balances' | 'withdrawals' | 'rewards'; label: string }>>(() => [
|
||||
{ id: 'balances', label: 'Балансы' },
|
||||
{ id: 'withdrawals', label: 'Выплаты' },
|
||||
{ id: 'rewards', label: 'Вознаграждения' },
|
||||
]);
|
||||
|
||||
function setActiveTab(tab: 'balances' | 'withdrawals' | 'rewards') {
|
||||
const query = { ...route.query };
|
||||
|
||||
if (tab === 'balances') {
|
||||
delete query.tab;
|
||||
} else {
|
||||
query.tab = tab;
|
||||
}
|
||||
|
||||
void router.replace({ query });
|
||||
}
|
||||
|
||||
function userInitials(fullName: string) {
|
||||
const parts = fullName
|
||||
.trim()
|
||||
@@ -323,23 +304,6 @@ function productVisualLabel(product: ProductCard) {
|
||||
: 'Название или номинал'"
|
||||
/>
|
||||
|
||||
<div class="surface-card rounded-3xl p-2">
|
||||
<div class="flex flex-wrap gap-2">
|
||||
<button
|
||||
v-for="tab in bonusTabs"
|
||||
:key="tab.id"
|
||||
type="button"
|
||||
class="rounded-full px-4 py-2 text-sm font-semibold transition"
|
||||
:class="activeTab === tab.id
|
||||
? 'bg-[#123824] text-white'
|
||||
: 'bg-[#eef7f1] text-[#355947] hover:bg-[#e3f1e8]'"
|
||||
@click="setActiveTab(tab.id)"
|
||||
>
|
||||
{{ tab.label }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<template v-if="activeTab === 'balances'">
|
||||
<div v-if="balancesQuery.loading.value || referralLinksQuery.loading.value || usersQuery.loading.value" class="manager-empty-state">
|
||||
Загружаем балансы...
|
||||
|
||||
@@ -37,14 +37,6 @@ function channelLabel(channel: TemplateChannel['channel']) {
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="surface-card rounded-3xl p-2">
|
||||
<div class="flex flex-wrap gap-2">
|
||||
<span class="rounded-full bg-[#123824] px-4 py-2 text-sm font-semibold text-white">
|
||||
Сообщения
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div v-if="templatesQuery.loading.value" class="manager-empty-state">
|
||||
Загружаем шаблоны...
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user