fix: 花名册状态列在职/试用期分两行显示
This commit is contained in:
@@ -805,22 +805,24 @@ export default function Roster() {
|
||||
</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">
|
||||
<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>
|
||||
{e.probationInfo?.isProbation && (
|
||||
<span className={`ml-1 px-2 py-0.5 rounded text-xs ${
|
||||
e.probationInfo.isExpiring
|
||||
? 'bg-orange-50 text-orange-700 border border-orange-200'
|
||||
: 'bg-amber-50 text-amber-700 border border-amber-200'
|
||||
<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 === 'PRE_HIRE' ? 'bg-blue-50 text-blue-600'
|
||||
: 'bg-gray-100 text-gray-500'
|
||||
}`}>
|
||||
试用期{e.probationInfo.isExpiring ? `即将到期(${e.probationInfo.daysToConfirm}天)` : `剩${e.probationInfo.daysToConfirm}天`}
|
||||
{e.status === 'ACTIVE' ? '在职' : e.status === 'PRE_HIRE' ? '预入职' : '离职'}
|
||||
</span>
|
||||
)}
|
||||
{e.probationInfo?.isProbation && (
|
||||
<span className={`px-2 py-0.5 rounded text-xs w-fit ${
|
||||
e.probationInfo.isExpiring
|
||||
? 'bg-orange-50 text-orange-700 border border-orange-200'
|
||||
: 'bg-amber-50 text-amber-700 border border-amber-200'
|
||||
}`}>
|
||||
试用期{e.probationInfo.isExpiring ? `即将到期(${e.probationInfo.daysToConfirm}天)` : `剩${e.probationInfo.daysToConfirm}天`}
|
||||
</span>
|
||||
)}
|
||||
</div>
|
||||
</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">
|
||||
|
||||
Reference in New Issue
Block a user