diff --git a/src/components/ClientSidebarMenu.vue b/src/components/ClientSidebarMenu.vue index dde7db9..67e3bd8 100644 --- a/src/components/ClientSidebarMenu.vue +++ b/src/components/ClientSidebarMenu.vue @@ -43,6 +43,8 @@ const visibleNavigation = computed(() => filterNavigationByPermissions(clientNav const activeParentKeys = computed(() => new Set(getNavigationParentKeys(visibleNavigation.value, props.activePath))) const openedKeys = ref>(new Set(activeParentKeys.value)) +// Expand the order group by default so the three customer order shortcuts are visible. +openedKeys.value = new Set([...openedKeys.value, 'order-center']) function handleToggle(key: string) { const next = new Set(openedKeys.value) diff --git a/src/navigation/clientNavigation.test.mjs b/src/navigation/clientNavigation.test.mjs index 926f714..c81797a 100644 --- a/src/navigation/clientNavigation.test.mjs +++ b/src/navigation/clientNavigation.test.mjs @@ -52,13 +52,13 @@ test('keeps standalone business pages at the client sidebar root', () => { { title: '首页', children: undefined }, { title: '订单中心', - children: ['头程订单', '入库订单', '派送订单', '海外采购', '美国本土卡', '美本土散板'], + children: ['头程订单', '入库订单', '派送订单'], }, { title: '报关资料', children: undefined }, { title: '船期价格', children: undefined }, { title: '海外仓', - children: ['贴标申请', '仓储转运', '货物废弃', '退货换标'], + children: ['贴标申请', '仓储转运', '货物废弃', '退货换标', '海外采购', '美国本土卡', '美本土散板'], }, { title: '费用与账单', @@ -90,15 +90,15 @@ test('flattens visible leaves with unique paths', () => { '/orders/first-leg', '/orders/inbound', '/orders/delivery', - '/cross-border/procurement', - '/cross-border/domestic-trucking', - '/cross-border/pallet-shipping', '/first-leg/customs-documents', '/first-leg/sailing-prices', '/overseas-warehouse/labeling', '/overseas-warehouse/storage-transfer', '/overseas-warehouse/cargo-disposal', '/overseas-warehouse/return-relabel', + '/cross-border/procurement', + '/cross-border/domestic-trucking', + '/cross-border/pallet-shipping', '/finance/account', '/finance/bills', '/company/profile', diff --git a/src/navigation/clientNavigation.ts b/src/navigation/clientNavigation.ts index 321af20..923930c 100644 --- a/src/navigation/clientNavigation.ts +++ b/src/navigation/clientNavigation.ts @@ -54,9 +54,6 @@ export const clientNavigation: ClientNavigationNode[] = [ requireLeaf('first-leg-orders', '头程订单'), requireLeaf('orders-inbound', '入库订单'), requireLeaf('orders-delivery', '派送订单'), - requireLeaf('cross-border-procurement'), - requireLeaf('cross-border-domestic-trucking'), - requireLeaf('cross-border-pallet-shipping'), ], }, requireLeaf('first-leg-customs-documents', '报关资料'), @@ -70,6 +67,9 @@ export const clientNavigation: ClientNavigationNode[] = [ requireLeaf('overseas-storage-transfer'), requireLeaf('overseas-cargo-disposal'), requireLeaf('overseas-return-relabel', '退货换标'), + requireLeaf('cross-border-procurement'), + requireLeaf('cross-border-domestic-trucking'), + requireLeaf('cross-border-pallet-shipping'), ], }, {