diff --git a/frontend/ops_vue_js/src/components/AppHeader.vue b/frontend/ops_vue_js/src/components/AppHeader.vue index aba4b0b..b35ce43 100644 --- a/frontend/ops_vue_js/src/components/AppHeader.vue +++ b/frontend/ops_vue_js/src/components/AppHeader.vue @@ -35,7 +35,10 @@ function toggleLocale() { } function isActive(path) { - return route.path === path; + if (path === '/') { + return route.path === '/' + } + return route.path.startsWith(path) } function handleLogout() { @@ -51,7 +54,7 @@ const navItems = computed(() => [ { label: t("appname.schedule"), to: "/schedule" }, { label: t("appname.purchase"), to: "/purchase" }, { label: t("appname.work_order"), to: "/work_order" }, - { label: t("appname.warehouse"), to: "/warehouse/container" }, + { label: t("appname.warehouse"), to: "/warehouse" }, ]); diff --git a/frontend/ops_vue_js/src/router/index.js b/frontend/ops_vue_js/src/router/index.js index da2b57c..e06f0c8 100644 --- a/frontend/ops_vue_js/src/router/index.js +++ b/frontend/ops_vue_js/src/router/index.js @@ -74,6 +74,10 @@ const router = createRouter({ name: 'work-order-show', component: () => import('@/views/work_order/ShowWorkOrder.vue'), }, + { + path: 'warehouse', + redirect: '/warehouse/container', + }, { path: 'warehouse/container', name: 'warehouse',