Release/test #10
@@ -49,7 +49,7 @@ export const firstLegModule = {
|
||||
name: 'first-leg-customs-documents',
|
||||
component: () => import('./views/CustomsDocumentsView.vue'),
|
||||
release: 'active',
|
||||
meta: { title: '报关资料', description: '管理装柜后的退税报关资料与回执', permission: 'order:first-leg:list' },
|
||||
meta: { title: '报关资料', description: '管理装柜后的退税报关资料与回执', permission: 'order:first-leg:customs-list' },
|
||||
navigation: { key: 'first-leg-customs-documents', title: '报关资料', icon: FileText },
|
||||
},
|
||||
{
|
||||
@@ -57,7 +57,7 @@ export const firstLegModule = {
|
||||
name: 'first-leg-sailing-prices',
|
||||
component: () => import('./views/SailingPricesView.vue'),
|
||||
release: 'active',
|
||||
meta: { title: '船期价格', description: '查询渠道、参考船期与预估运费', permission: 'order:first-leg:list' },
|
||||
meta: { title: '船期价格', description: '查询渠道、参考船期与预估运费', permission: 'order:first-leg:pricing-list' },
|
||||
navigation: { key: 'first-leg-sailing-prices', title: '船期价格', icon: Calculator },
|
||||
},
|
||||
],
|
||||
|
||||
@@ -49,6 +49,8 @@ export const TENANT_PERMISSION_GROUPS: readonly TenantPermissionGroup[] = [
|
||||
label: '头程订单',
|
||||
items: [
|
||||
{ code: 'order:first-leg:list', label: '查看订单', description: '查看本企业头程订单列表和详情' },
|
||||
{ code: 'order:first-leg:customs-list', label: '查看报关资料', description: '查看本企业装柜后的退税报关资料、文件版本和报关行回执' },
|
||||
{ code: 'order:first-leg:pricing-list', label: '查看船期价格', description: '查看本企业可用渠道、参考船期和服务端预估价格' },
|
||||
{ code: 'order:first-leg:create', label: '创建订单', description: '新建并保存订单草稿' },
|
||||
{ code: 'order:first-leg:quick-create', label: '快速下单', description: '使用快速下单页面生成订单草稿,不包含提交订单权限' },
|
||||
{ code: 'order:first-leg:edit', label: '编辑订单', description: '编辑本企业尚未提交的订单草稿' },
|
||||
@@ -134,6 +136,8 @@ export const FRONTEND_TO_MERCHANT_PERMISSION_CODES: Readonly<Record<string, read
|
||||
'merchant:finance:account:view': ['merchant:finance:account:view'],
|
||||
'merchant:finance:recharge:create': ['merchant:finance:recharge:create'],
|
||||
'order:first-leg:list': ['merchant:order:list', 'merchant:order:view'],
|
||||
'order:first-leg:customs-list': ['merchant:order:list', 'merchant:order:view'],
|
||||
'order:first-leg:pricing-list': ['merchant:order:list', 'merchant:order:view'],
|
||||
'order:first-leg:create': ['merchant:order:create'],
|
||||
'order:first-leg:quick-create': ['merchant:order:quick-create', 'merchant:order:create'],
|
||||
'order:first-leg:edit': ['merchant:order:edit'],
|
||||
|
||||
@@ -109,7 +109,7 @@ test('flattens visible leaves with unique paths', () => {
|
||||
})
|
||||
|
||||
test('filters inaccessible leaves and empty navigation groups', () => {
|
||||
const visible = filterNavigationByPermissions(clientNavigation, ['account:profile:view', 'order:first-leg:list'])
|
||||
const visible = filterNavigationByPermissions(clientNavigation, ['account:profile:view', 'order:first-leg:list', 'order:first-leg:customs-list', 'order:first-leg:pricing-list'])
|
||||
|
||||
assert.deepEqual(getNavigationLeaves(visible).map((item) => item.path), ['/orders/first-leg', '/first-leg/customs-documents', '/first-leg/sailing-prices'])
|
||||
assert.deepEqual(visible.map((item) => item.title), ['订单中心'])
|
||||
|
||||
Reference in New Issue
Block a user