功能(接单平台): 为普通运营增加杂项配置权限
This commit is contained in:
@@ -11,6 +11,8 @@
|
||||
*/
|
||||
|
||||
/** 所有可作为 tab 的 key(新增 tab 只改这里)。 */
|
||||
export const WORKER_PLATFORM_MISC_CONFIG_PERMISSION = 'worker_platform.misc_config'
|
||||
|
||||
export const WORKER_PLATFORM_TAB_KEYS: readonly string[] = [
|
||||
'orders',
|
||||
'consignment-inventory',
|
||||
@@ -84,3 +86,7 @@ export const WORKER_PLATFORM_NON_TAB_QUERY_KEYS: readonly string[] = ['hall-conf
|
||||
export function isWorkerPlatformTab(tab: string | null): tab is string {
|
||||
return WORKER_PLATFORM_TAB_KEYS.includes(String(tab || ''))
|
||||
}
|
||||
|
||||
export function canManageWorkerPlatformMiscConfig(role: string | null | undefined) {
|
||||
return role === 'admin' || role === 'operator'
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user