diff --git a/app/app.vue b/app/app.vue index 5819deb..1b6722e 100644 --- a/app/app.vue +++ b/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 : {}, }, }, ]; diff --git a/app/components/ui/AppManagerDock.vue b/app/components/ui/AppManagerDock.vue index 6be9e91..91ea3b1 100644 --- a/app/components/ui/AppManagerDock.vue +++ b/app/components/ui/AppManagerDock.vue @@ -2,23 +2,22 @@ type DockItem = { to: string; label: string; - icon: 'orders' | 'clients' | 'bonus'; + icon: 'orders' | 'bonus'; }; const route = useRoute(); const dockItems: DockItem[] = [ { to: '/client-orders', label: 'Заказы', icon: 'orders' }, - { to: '/clients', label: 'Клиенты', icon: 'clients' }, { to: '/bonus-system', label: 'Бонусы', icon: 'bonus' }, ]; function isActive(path: string) { if (path === '/client-orders') { - return route.path === '/client-orders' || route.path.startsWith('/client-orders/'); - } - if (path === '/clients') { - return route.path === '/clients' || route.path.startsWith('/clients/'); + return route.path === '/client-orders' + || route.path.startsWith('/client-orders/') + || route.path === '/clients' + || route.path.startsWith('/clients/'); } if (path === '/bonus-system') { return route.path === '/bonus-system' || route.path.startsWith('/bonus-system/'); @@ -44,12 +43,6 @@ function isActive(path: string) { - - - - - - diff --git a/app/pages/clients/index.vue b/app/pages/clients/index.vue index 29f8ad8..d7317b7 100644 --- a/app/pages/clients/index.vue +++ b/app/pages/clients/index.vue @@ -98,7 +98,7 @@ function userInitials(fullName: string) {
+
+ + Клиенты + + + Заявки + +
+