Merge branch 'develop' into 'devops-staging'
fix: change hide action column on admin and supervisor See merge request empatnusabangsa/ppob/ppob-frontend!12
This commit is contained in:
commit
f76e2e6638
|
@ -164,32 +164,32 @@ export const Membership = observer(() => {
|
||||||
title: "Action",
|
title: "Action",
|
||||||
key: "action",
|
key: "action",
|
||||||
render: (text, record) => (
|
render: (text, record) => (
|
||||||
<Space size="middle">
|
<Space size="middle">
|
||||||
<Button
|
<Button
|
||||||
type={record?.isActive === true ? "danger" : "primary"}
|
type={record?.isActive === true ? "danger" : "primary"}
|
||||||
onClick={() => changeStatus(record?.id, record?.isActive)}
|
onClick={() => changeStatus(record?.id, record?.isActive)}
|
||||||
>
|
>
|
||||||
{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);
|
||||||
setIsVisibleTopUpModal(true);
|
setIsVisibleTopUpModal(true);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<DownloadOutlined /> Top Up Saldo
|
<DownloadOutlined/> Top Up Saldo
|
||||||
</Button>
|
</Button>}
|
||||||
<Button
|
<Button
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
let record2 = record;
|
let record2 = record;
|
||||||
delete record2.password;
|
delete record2.password;
|
||||||
record2.isChangePassword = false;
|
record2.isChangePassword = false;
|
||||||
|
|
||||||
setInitialData({
|
setInitialData({
|
||||||
...record2,
|
...record2,
|
||||||
// roleId: record.roles.id,
|
// roleId: record.roles.id,
|
||||||
});
|
});
|
||||||
setVisibleModal(true);
|
setVisibleModal(true);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
@ -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,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user