fix: 员工端姓名显示处加上身份证号 + 修复附件上传缺少 uploadedBy 字段
后端: - portal.routes.ts: 密码登录/验证码登录/自动登录返回 idCardNumber - portal.routes.ts: home/overview 返回 employeeIdCardNumber - portal.routes.ts: 合同确认接口返回 employeeIdCardNumber - portal.routes.ts: 附件上传加上 uploadedBy 字段修复 TS 错误 前端: - EmployeeHome.tsx: 首页欢迎卡片显示身份证号 - PortalLayout.tsx: 顶栏姓名后显示身份证号 - Payslip.tsx: 下载文件名加上身份证号 - ContractConfirm.tsx: 合同确认页显示身份证号
This commit is contained in:
@@ -1055,7 +1055,7 @@ router.post('/attachments', portalAuth, async (req: any, res, next) => {
|
||||
return res.status(400).json({ success: false, error: { code: 'BAD_REQUEST', message: '文件名和文件内容不能为空' } })
|
||||
}
|
||||
const attachment = await prisma.employeeAttachment.create({
|
||||
data: { orgId, employeeId, fileName, fileType: fileType || 'OTHER', fileUrl, fileSize: fileSize || 0 },
|
||||
data: { orgId, employeeId, fileName, fileType: fileType || 'OTHER', fileUrl, fileSize: fileSize || 0, uploadedBy: req.employee.id },
|
||||
})
|
||||
res.json({ success: true, data: attachment })
|
||||
} catch (err) { next(err) }
|
||||
|
||||
Reference in New Issue
Block a user