Use top-level manager tabs only

This commit is contained in:
Ruslan Bakiev
2026-04-06 15:57:55 +07:00
parent 3ea9753cc9
commit 372626e2ed
3 changed files with 28 additions and 51 deletions

View File

@@ -44,12 +44,17 @@ const managerPageTabs = computed(() => {
];
}
if (route.path === '/bonus-system') {
if (route.path === '/bonus-system' || route.path.startsWith('/bonus-system/')) {
return [
{
key: 'balances',
label: 'Балансы',
active: route.query.tab !== 'withdrawals' && route.query.tab !== 'products' && route.query.tab !== 'manager',
active: route.path !== '/bonus-system/withdrawals'
&& !route.path.startsWith('/bonus-system/withdrawals/')
&& route.query.tab !== 'withdrawals'
&& route.query.tab !== 'rewards'
&& route.query.tab !== 'products'
&& route.query.tab !== 'manager',
to: {
path: '/bonus-system',
query: {
@@ -61,7 +66,9 @@ const managerPageTabs = computed(() => {
{
key: 'withdrawals',
label: 'Заявки на выплату',
active: route.query.tab === 'withdrawals',
active: route.path === '/bonus-system/withdrawals'
|| route.path.startsWith('/bonus-system/withdrawals/')
|| route.query.tab === 'withdrawals',
to: {
path: '/bonus-system',
query: {
@@ -71,20 +78,34 @@ const managerPageTabs = computed(() => {
},
},
{
key: 'products',
label: 'Товары',
active: route.query.tab === 'products' || route.query.tab === 'manager',
key: 'rewards',
label: 'Вознаграждения',
active: route.query.tab === 'rewards' || route.query.tab === 'products' || route.query.tab === 'manager',
to: {
path: '/bonus-system',
query: {
...route.query,
tab: 'products',
tab: 'rewards',
},
},
},
];
}
if (route.path === '/messages') {
return [
{
key: 'messages',
label: 'Сообщения',
active: true,
to: {
path: '/messages',
query: {},
},
},
];
}
return [];
});
</script>