fix: change hide action column on admin and supervisor

This commit is contained in:
caturbgs 2021-12-22 23:54:43 +07:00
parent 7e356d0178
commit 28e959c26d

View File

@ -171,7 +171,7 @@ export const Membership = observer(() => {
> >
{record?.isActive === true ? "Inactive" : "Active"} {record?.isActive === true ? "Inactive" : "Active"}
</Button> </Button>
<Button {store.authentication.userData.role === ('Admin' && 'Supervisor') && <Button
onClick={() => { onClick={() => {
setDestination(record?.id); setDestination(record?.id);
console.log(record?.id); console.log(record?.id);
@ -179,7 +179,7 @@ export const Membership = observer(() => {
}} }}
> >
<DownloadOutlined/> Top Up Saldo <DownloadOutlined/> Top Up Saldo
</Button> </Button>}
<Button <Button
onClick={() => { onClick={() => {
let record2 = record; let record2 = record;
@ -224,7 +224,6 @@ export const Membership = observer(() => {
}, },
]; ];
if (store.authentication.userData.role !== "Admin") columns.pop();
const routeData = [ const routeData = [
{ {
route: LINKS.HOME, route: LINKS.HOME,