fix: 待签合同列表中合同类型英文改为中文
LaborContract.contractType 枚举值(FIXED/UNFIXED/LABOR等) 转为中文显示(固定期限劳动合同/劳务协议等)。 Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
@@ -155,6 +155,16 @@ router.get('/pending', async (req: AuthRequest, res: Response, next: NextFunctio
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 汇总 LaborContract(排除已有 EsignRecord 关联的,避免重复)
|
// 汇总 LaborContract(排除已有 EsignRecord 关联的,避免重复)
|
||||||
|
const CONTRACT_TYPE_LABEL: Record<string, string> = {
|
||||||
|
FIXED: '固定期限劳动合同',
|
||||||
|
UNFIXED: '无固定期限劳动合同',
|
||||||
|
UNSIGNED: '未签合同',
|
||||||
|
LABOR: '劳务协议',
|
||||||
|
INTERNSHIP: '实习协议',
|
||||||
|
DISPATCH: '劳务派遣合同',
|
||||||
|
OUTSOURCING: '外包合同',
|
||||||
|
PARTTIME: '非全日制合同',
|
||||||
|
}
|
||||||
const esignContractIds = new Set(pendingEsign.filter(r => r.contractId).map(r => r.contractId))
|
const esignContractIds = new Set(pendingEsign.filter(r => r.contractId).map(r => r.contractId))
|
||||||
for (const c of pendingContracts) {
|
for (const c of pendingContracts) {
|
||||||
if (esignContractIds.has(c.id)) continue // 已有电子签署记录的不重复
|
if (esignContractIds.has(c.id)) continue // 已有电子签署记录的不重复
|
||||||
@@ -163,7 +173,7 @@ router.get('/pending', async (req: AuthRequest, res: Response, next: NextFunctio
|
|||||||
type: 'contract',
|
type: 'contract',
|
||||||
recordId: null,
|
recordId: null,
|
||||||
contractId: c.id,
|
contractId: c.id,
|
||||||
title: `${c.contractType}合同`,
|
title: CONTRACT_TYPE_LABEL[c.contractType] || `${c.contractType}合同`,
|
||||||
scene: 'CONTRACT',
|
scene: 'CONTRACT',
|
||||||
signMethod: c.signMethod,
|
signMethod: c.signMethod,
|
||||||
status: 'PENDING',
|
status: 'PENDING',
|
||||||
|
|||||||
Reference in New Issue
Block a user