Restructure manager navigation

This commit is contained in:
Ruslan Bakiev
2026-04-06 11:38:47 +07:00
parent 55b0028ddb
commit a352e40b95
3 changed files with 38 additions and 29 deletions

View File

@@ -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 : {},
},
},
];