This commit is contained in:
2026-08-14 19:02:34 +08:00
parent 44ee2be246
commit 4dec54feef
14 changed files with 215 additions and 54 deletions
+2 -5
View File
@@ -45,7 +45,6 @@ describe('adminNavigation', () => {
'订舱列表',
'拖车列表',
'货柜列表',
'智能装柜',
'预装清单',
'装柜清单',
])
@@ -91,7 +90,7 @@ describe('adminNavigation', () => {
expect(paths).not.toEqual(expect.arrayContaining(['/notifications/messages', '/notifications/templates', '/notifications/mine']))
expect(paths).toContain('/master-data/fee-items')
expect(paths).toContain('/container-loading')
expect(paths).toContain('/container-loading/smart-loading')
expect(paths).not.toContain('/container-loading/smart-loading')
expect(paths).toContain('/loading-plans')
expect(paths).toContain('/loading-lists')
expect(paths).not.toContain('/port-schedules')
@@ -192,10 +191,9 @@ describe('adminNavigation', () => {
expect(getNavigationLeaves(missing).map((item) => item.path)).toEqual(['/dashboard'])
})
it('shows each formal container workflow entry only with its matching permission', () => {
it('shows container list and downstream lists without a standalone smart-loading menu', () => {
const filtered = filterAdminNavigation(adminNavigation, new Set([
'platform:firstleg:container:list',
'platform:firstleg:smart-loading:list',
'platform:firstleg:preload:list',
'platform:firstleg:loading-list:list',
]))
@@ -203,7 +201,6 @@ describe('adminNavigation', () => {
expect(getNavigationLeaves(filtered).map((item) => item.path)).toEqual([
'/dashboard',
'/container-loading',
'/container-loading/smart-loading',
'/loading-plans',
'/loading-lists',
])
-1
View File
@@ -102,7 +102,6 @@ export const adminNavigation: AdminNavigationNode[] = [
{ key: 'booking-list', title: '订舱列表', icon: ClipboardList, path: '/ocean-bookings', permission: 'platform:firstleg:ocean-booking:list' },
{ key: 'truck-list', title: '拖车列表', icon: Truck, path: '/trucking', permission: 'platform:firstleg:truck-appointment:list' },
{ key: 'container-list', title: '货柜列表', icon: WarehouseIcon, path: '/container-loading', permission: 'platform:firstleg:container:list' },
{ key: 'container-smart-loading', title: '智能装柜', icon: ClipboardList, path: '/container-loading/smart-loading', permission: 'platform:firstleg:smart-loading:list' },
{ key: 'container-preload', title: '预装清单', icon: ClipboardList, path: '/loading-plans', permission: 'platform:firstleg:preload:list' },
{ key: 'container-manifest', title: '装柜清单', icon: ClipboardList, path: '/loading-lists', permission: 'platform:firstleg:loading-list:list' },
],