feat(shipping-notice): 增强订单抽取与审计功能,支持取消与保留策略
- 在环境配置中新增进度细化、订单提取取消与审计导出相关的开关 - 实现订单抽取运行的取消功能,允许管理员在运行中进行操作 - 引入审计事件的保留策略,支持三年保留期的自动清理 - 更新相关模型与服务,确保新功能的完整性与可追溯性 - 增强文档与代码注释,反映新的业务逻辑与审计要求
This commit is contained in:
1 parent
c85997884b
commit
95cdfe66b0
158 files changed
+19005
-1201
No files matched your search
@@ -0,0 +1,31 @@
|
||||
/**
|
||||
* features/chat/shipping-review/useShippingOrderReview.spec.ts
|
||||
* 用途:阶段 3 复核页历史版本只读契约冒烟。
|
||||
* 依赖:isReviewCaseHistorical 纯函数。
|
||||
* 逻辑:断言 superseded / 非当前 case_no 时强制只读。
|
||||
*/
|
||||
import { describe, expect, it } from 'vitest';
|
||||
import { isReviewCaseHistorical } from './useShippingOrderReview';
|
||||
|
||||
describe('useShippingOrderReview historical readonly', () => {
|
||||
it('forces readonly when case status is superseded', () => {
|
||||
expect(isReviewCaseHistorical(
|
||||
{ case_no: 'CASE-OLD', status: 'superseded' },
|
||||
{ current_case_no: 'CASE-NEW' },
|
||||
)).toBe(true);
|
||||
});
|
||||
|
||||
it('forces readonly when viewing non-current work item case', () => {
|
||||
expect(isReviewCaseHistorical(
|
||||
{ case_no: 'CASE-OLD', status: 'draft' },
|
||||
{ current_case_no: 'CASE-NEW', version_replaced: true },
|
||||
)).toBe(true);
|
||||
});
|
||||
|
||||
it('allows edit when viewing current case', () => {
|
||||
expect(isReviewCaseHistorical(
|
||||
{ case_no: 'CASE-1', status: 'draft' },
|
||||
{ current_case_no: 'CASE-1', version_replaced: false },
|
||||
)).toBe(false);
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user