fix: 花名册状态列在职/试用期分两行显示

This commit is contained in:
freedakgmail
2026-08-17 20:10:53 +08:00
parent 95567c9cc4
commit 226c4f1444
+4 -2
View File
@@ -805,7 +805,8 @@ export default function Roster() {
</td> </td>
{colVisible('department') && <td className="px-4 py-2.5 text-gray-500">{e.department}</td>} {colVisible('department') && <td className="px-4 py-2.5 text-gray-500">{e.department}</td>}
{colVisible('status') && <td className="px-4 py-2.5"> {colVisible('status') && <td className="px-4 py-2.5">
<span className={`px-2 py-0.5 rounded text-xs ${ <div className="flex flex-col gap-1">
<span className={`px-2 py-0.5 rounded text-xs w-fit ${
e.status === 'ACTIVE' ? 'bg-green-50 text-safe' e.status === 'ACTIVE' ? 'bg-green-50 text-safe'
: e.status === 'PRE_HIRE' ? 'bg-blue-50 text-blue-600' : e.status === 'PRE_HIRE' ? 'bg-blue-50 text-blue-600'
: 'bg-gray-100 text-gray-500' : 'bg-gray-100 text-gray-500'
@@ -813,7 +814,7 @@ export default function Roster() {
{e.status === 'ACTIVE' ? '在职' : e.status === 'PRE_HIRE' ? '预入职' : '离职'} {e.status === 'ACTIVE' ? '在职' : e.status === 'PRE_HIRE' ? '预入职' : '离职'}
</span> </span>
{e.probationInfo?.isProbation && ( {e.probationInfo?.isProbation && (
<span className={`ml-1 px-2 py-0.5 rounded text-xs ${ <span className={`px-2 py-0.5 rounded text-xs w-fit ${
e.probationInfo.isExpiring e.probationInfo.isExpiring
? 'bg-orange-50 text-orange-700 border border-orange-200' ? 'bg-orange-50 text-orange-700 border border-orange-200'
: 'bg-amber-50 text-amber-700 border border-amber-200' : 'bg-amber-50 text-amber-700 border border-amber-200'
@@ -821,6 +822,7 @@ export default function Roster() {
{e.probationInfo.isExpiring ? `即将到期(${e.probationInfo.daysToConfirm}天)` : `${e.probationInfo.daysToConfirm}`} {e.probationInfo.isExpiring ? `即将到期(${e.probationInfo.daysToConfirm}天)` : `${e.probationInfo.daysToConfirm}`}
</span> </span>
)} )}
</div>
</td>} </td>}
{colVisible('hireDate') && <td className="px-4 py-2.5 text-gray-500">{e.hireDate?.toString().slice(0, 10)}</td>} {colVisible('hireDate') && <td className="px-4 py-2.5 text-gray-500">{e.hireDate?.toString().slice(0, 10)}</td>}
<td className="hidden px-4 py-2.5 text-gray-500"> <td className="hidden px-4 py-2.5 text-gray-500">