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