Move manager routes under /admin

This commit is contained in:
Ruslan Bakiev
2026-04-06 16:12:54 +07:00
parent 0380c54d60
commit b640885ef0
14 changed files with 83 additions and 73 deletions

View File

@@ -8,23 +8,20 @@ type DockItem = {
const route = useRoute();
const dockItems: DockItem[] = [
{ to: '/client-orders', label: 'Заказы', icon: 'orders' },
{ to: '/bonus-system', label: 'Бонусы', icon: 'bonus' },
{ to: '/messages', label: 'Настройки', icon: 'settings' },
{ to: '/admin/orders', label: 'Заказы', icon: 'orders' },
{ to: '/admin/bonuses/balances', label: 'Бонусы', icon: 'bonus' },
{ to: '/admin/settings/messages', label: 'Настройки', icon: 'settings' },
];
function isActive(path: string) {
if (path === '/client-orders') {
return route.path === '/client-orders'
|| route.path.startsWith('/client-orders/')
|| route.path === '/clients'
|| route.path.startsWith('/clients/');
if (path === '/admin/orders') {
return route.path === '/admin/orders' || route.path.startsWith('/admin/orders/');
}
if (path === '/bonus-system') {
return route.path === '/bonus-system' || route.path.startsWith('/bonus-system/');
if (path === '/admin/bonuses/balances') {
return route.path.startsWith('/admin/bonuses');
}
if (path === '/messages') {
return route.path === '/messages';
if (path === '/admin/settings/messages') {
return route.path.startsWith('/admin/settings');
}
return route.path === path;
}