chore: simplify status display by replacing EnforceSwitch with badges
This commit is contained in:
@ -85,11 +85,16 @@ const ManagePositionContextProvider = ({ children }: { children: React.ReactNode
|
||||
enableSorting: false,
|
||||
enableHiding: false,
|
||||
cell: ({ row }) => {
|
||||
const isActive = row.original.status === 'Y';
|
||||
|
||||
return (
|
||||
<EnforceSwitch
|
||||
enforce={row.original.status == 'Y' ? true : false}
|
||||
onChange={() => {}}
|
||||
/>
|
||||
<span
|
||||
className={`px-2 py-1 text-xs font-semibold rounded-full ${
|
||||
isActive ? 'bg-green-100 text-green-600' : 'bg-red-100 text-red-600'
|
||||
}`}
|
||||
>
|
||||
{isActive ? 'Active' : 'Inactive'}
|
||||
</span>
|
||||
);
|
||||
},
|
||||
meta: {
|
||||
|
||||
@ -127,11 +127,16 @@ const ManageUserContextProvider = ({ children }: { children: React.ReactNode })
|
||||
enableSorting: false,
|
||||
enableHiding: false,
|
||||
cell: ({ row }) => {
|
||||
const isActive = row.original.status === 'Y';
|
||||
|
||||
return (
|
||||
<EnforceSwitch
|
||||
enforce={row.original.status == 'Y' ? true : false}
|
||||
onChange={() => {}}
|
||||
/>
|
||||
<span
|
||||
className={`px-2 py-1 text-xs font-semibold rounded-full ${
|
||||
isActive ? 'bg-green-100 text-green-600' : 'bg-red-100 text-red-600'
|
||||
}`}
|
||||
>
|
||||
{isActive ? 'Active' : 'Inactive'}
|
||||
</span>
|
||||
);
|
||||
},
|
||||
meta: {
|
||||
|
||||
Reference in New Issue
Block a user