feat: 完善审批退回流程与报销申请关联
后端优化报销单访问策略和常量定义,增强退回原因和审批状态 流转,前端完善退回对话框和审批交互组件,新增报销申请关联 模型,优化文档中心行数据和审批收件箱工具函数,增强引导 流程和会话模型,补充单元测试覆盖。
This commit is contained in:
@@ -3,6 +3,8 @@ import test from 'node:test'
|
||||
|
||||
import {
|
||||
excludeArchivedDocumentRows,
|
||||
filterApplicationScopeNewRows,
|
||||
prepareApplicationScopeRows,
|
||||
isArchivedDocumentRow
|
||||
} from '../src/utils/documentCenterRows.js'
|
||||
|
||||
@@ -48,3 +50,34 @@ test('document center all scope excludes archived rows from merged lists', () =>
|
||||
|
||||
assert.deepEqual(rows.map((row) => row.claimId), ['c'])
|
||||
})
|
||||
|
||||
test('application scope does not mark submitted approval application rows as new', () => {
|
||||
const rows = prepareApplicationScopeRows([
|
||||
{
|
||||
claimId: 'draft-application',
|
||||
documentTypeCode: 'application',
|
||||
statusGroup: 'draft',
|
||||
isNewDocument: true
|
||||
},
|
||||
{
|
||||
claimId: 'submitted-application',
|
||||
documentTypeCode: 'application',
|
||||
statusGroup: 'in_progress',
|
||||
isNewDocument: true
|
||||
},
|
||||
{
|
||||
claimId: 'reimbursement',
|
||||
documentTypeCode: 'reimbursement',
|
||||
statusGroup: 'in_progress',
|
||||
isNewDocument: true
|
||||
}
|
||||
])
|
||||
|
||||
assert.deepEqual(rows.map((row) => row.claimId), ['draft-application', 'submitted-application'])
|
||||
assert.equal(rows.find((row) => row.claimId === 'draft-application')?.isNewDocument, true)
|
||||
assert.equal(rows.find((row) => row.claimId === 'submitted-application')?.isNewDocument, false)
|
||||
assert.deepEqual(
|
||||
filterApplicationScopeNewRows(rows).map((row) => row.claimId),
|
||||
['draft-application']
|
||||
)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user