功能(接单平台): 为普通运营增加杂项配置权限

This commit is contained in:
2026-11-27 13:55:49 +08:00
parent 450dee1031
commit 5e45b69720
9 changed files with 142 additions and 26 deletions
@@ -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'
}