Use top-level manager tabs only
This commit is contained in:
35
app/app.vue
35
app/app.vue
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user