Files
syops/frontend/src/features/workspace/constants/routes.ts
T
hugo 1b6483a4ea feat(shipping-notice,receipt-report): 新增收料报表功能并优化发货通知流程
清理废弃的shipping xfa ocr automark相关代码和job配置
新增收料报表管理的前端页面、路由和侧边栏入口
新增后端收料报表配置接口、数据库模型和RPA脚本
优化发货通知流程的重试策略,将shipping相关job默认不自动重试
移除废弃的库存源确认相关逻辑,更新流程门禁规则
重构订单模板的值适配器模块,新增坐标OCR值适配器
清理前端shipping菜单和action的废弃选项
更新相关文档和测试用例,调整.gitignore忽略规则
2026-08-20 20:23:10 +08:00

40 lines
1.6 KiB
TypeScript

/**
* features/workspace/constants/routes.ts
* 工作台子路由 path 常量,以及旧 ?view= 查询参数到新 path 的映射。
*/
export const WORKSPACE_PATHS = {
root: '/workspace',
profile: '/workspace/profile',
applications: '/workspace/applications',
updates: '/workspace/updates',
knowledgeBase: '/workspace/knowledge-base',
scheduleRuns: '/workspace/schedule-runs',
receiptReports: '/workspace/receipt-reports',
shippingNotice: '/workspace/shipping-notice/my-tasks',
shippingNoticeCustomers: '/workspace/shipping-notice/customers',
shippingNoticeTasks: '/workspace/shipping-notice/tasks',
shippingNoticeMyTasks: '/workspace/shipping-notice/my-tasks',
accountingVoucherCheck: '/workspace/accounting-voucher-check',
feedback: '/workspace/feedback',
history: '/workspace/history',
} as const;
/** 旧 ?view= 参数 → 子路由 path */
export const LEGACY_VIEW_TO_PATH: Record<string, string> = {
profile: WORKSPACE_PATHS.profile,
applications: WORKSPACE_PATHS.applications,
feedback: WORKSPACE_PATHS.feedback,
updates: WORKSPACE_PATHS.updates,
knowledge_base: WORKSPACE_PATHS.knowledgeBase,
schedule_runs: WORKSPACE_PATHS.scheduleRuns,
receipt_reports: WORKSPACE_PATHS.receiptReports,
shipping_notice: WORKSPACE_PATHS.shippingNotice,
accounting_voucher_check: WORKSPACE_PATHS.accountingVoucherCheck,
history: WORKSPACE_PATHS.history,
};
export function workspacePathFromLegacyView(view?: string): string {
if (!view) return WORKSPACE_PATHS.applications;
return LEGACY_VIEW_TO_PATH[view] || WORKSPACE_PATHS.applications;
}