feat: 预入职状态+入职手续待办

1. 花名册动态状态:hireDate > today 显示「预入职」(蓝色标签)
2. RiskType 增加 ONBOARDING 枚举
3. 新增 detectOnboardingRisks:入职日期到但未签合同→生成待办
4. detectContractRisks 排除预入职员工(未到入职日期不检查合同)
5. Dashboard 风险提醒 tab 支持 ONBOARDING 待办类型
6. 前端类型定义同步更新
This commit is contained in:
freedakgmail
2026-07-23 18:45:59 +08:00
parent c439097319
commit ad6800b63c
6 changed files with 57 additions and 9 deletions
+6 -2
View File
@@ -133,8 +133,12 @@ export default function Roster() {
<td className="py-2 px-3 font-medium">{e.name}</td>
<td className="py-2 px-3 text-gray-500">{e.department}</td>
<td className="py-2 px-3">
<span className={`px-2 py-0.5 rounded text-xs ${e.status === 'ACTIVE' ? 'bg-green-50 text-safe' : 'bg-gray-100 text-gray-500'}`}>
{e.status === 'ACTIVE' ? '在职' : '离职'}
<span className={`px-2 py-0.5 rounded text-xs ${
e.status === 'ACTIVE' ? 'bg-green-50 text-safe'
: e.status === 'PRE_HIRE' ? 'bg-blue-50 text-blue-600'
: 'bg-gray-100 text-gray-500'
}`}>
{e.status === 'ACTIVE' ? '在职' : e.status === 'PRE_HIRE' ? '预入职' : '离职'}
</span>
</td>
<td className="py-2 px-3 text-gray-500">{e.hireDate?.toString().slice(0, 10)}</td>