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