feat(web): 差旅申请详情进度 viewer 与审批/加载态组件增强

- 新增 requestProgressViewer,申请单在直属领导审批视角下将当前步骤展示为'等待批复',travel-request-detail/app-shell/useRequests 接入
- TravelRequestApprovalDialog 增强审批交互,TableLoadingState 补充表格加载占位,ConfirmDialog 扩展确认对话框能力
- useAppShell/useRequests/AppShellRouteView 配套适配申请详情跳转与会话状态
- 同步更新 requestProgressSteps、travel-request-detail-leader-approval、assistant-session-draft-delete、documents-center-status-filter、app-shell-financial-assistant-entry、request-progress-viewer 等测试
This commit is contained in:
caoxiaozhu
2026-06-21 22:49:58 +08:00
parent 8b3495455b
commit 24b5b71b0f
14 changed files with 295 additions and 49 deletions

View File

@@ -0,0 +1,49 @@
import assert from 'node:assert/strict'
import test from 'node:test'
import { resolveProgressStepsForViewer } from '../src/utils/requestProgressViewer.js'
test('progress viewer keeps approver name for applicant view', () => {
const steps = [
{
label: '等待 李经理 批复',
rawLabel: '直属领导审批',
current: true,
title: '当前等待 李经理 批复已停留 3小时15分钟'
}
]
assert.deepEqual(
resolveProgressStepsForViewer(steps, {
isApplicationDocument: true,
isCurrentDirectManagerApprover: false
}),
steps
)
})
test('progress viewer hides approver name for current direct manager approval view', () => {
const steps = [
{
label: '等待 李经理 批复',
rawLabel: '直属领导审批',
current: true,
title: '当前等待 李经理 批复已停留 3小时15分钟'
}
]
assert.deepEqual(
resolveProgressStepsForViewer(steps, {
isApplicationDocument: true,
isCurrentDirectManagerApprover: true
}),
[
{
label: '等待批复',
rawLabel: '直属领导审批',
current: true,
title: '当前等待批复已停留 3小时15分钟'
}
]
)
})