Restructure manager navigation
This commit is contained in:
31
app/app.vue
31
app/app.vue
@@ -15,30 +15,29 @@ const managerPageTabs = computed(() => {
|
||||
return [];
|
||||
}
|
||||
|
||||
if (route.path === '/clients') {
|
||||
if (
|
||||
route.path === '/client-orders'
|
||||
|| route.path.startsWith('/client-orders/')
|
||||
|| route.path === '/clients'
|
||||
|| route.path.startsWith('/clients/')
|
||||
) {
|
||||
return [
|
||||
{
|
||||
key: 'users',
|
||||
label: 'Пользователи',
|
||||
active: route.query.tab !== 'requests',
|
||||
key: 'orders',
|
||||
label: 'Заказы',
|
||||
active: route.path === '/client-orders' || route.path.startsWith('/client-orders/'),
|
||||
to: {
|
||||
path: '/clients',
|
||||
query: {
|
||||
...route.query,
|
||||
tab: 'users',
|
||||
},
|
||||
path: '/client-orders',
|
||||
query: route.path === '/client-orders' ? route.query : {},
|
||||
},
|
||||
},
|
||||
{
|
||||
key: 'requests',
|
||||
label: 'Заявки',
|
||||
active: route.query.tab === 'requests',
|
||||
key: 'clients',
|
||||
label: 'Клиенты',
|
||||
active: route.path === '/clients' || route.path.startsWith('/clients/'),
|
||||
to: {
|
||||
path: '/clients',
|
||||
query: {
|
||||
...route.query,
|
||||
tab: 'requests',
|
||||
},
|
||||
query: route.path === '/clients' ? route.query : {},
|
||||
},
|
||||
},
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user