fix: change hide action button in memberhship
This commit is contained in:
parent
28e959c26d
commit
fdd123bb9f
|
@ -165,13 +165,13 @@ export const Membership = observer(() => {
|
||||||
key: "action",
|
key: "action",
|
||||||
render: (text, record) => (
|
render: (text, record) => (
|
||||||
<Space size="middle">
|
<Space size="middle">
|
||||||
<Button
|
{store.authentication.userData.role === "Admin" && <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>}
|
||||||
{store.authentication.userData.role === ('Admin' && 'Supervisor') && <Button
|
<Button
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
setDestination(record?.id);
|
setDestination(record?.id);
|
||||||
console.log(record?.id);
|
console.log(record?.id);
|
||||||
|
@ -179,8 +179,8 @@ export const Membership = observer(() => {
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<DownloadOutlined/> Top Up Saldo
|
<DownloadOutlined/> Top Up Saldo
|
||||||
</Button>}
|
</Button>
|
||||||
<Button
|
{store.authentication.userData.role === "Admin" && <Button
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
let record2 = record;
|
let record2 = record;
|
||||||
delete record2.password;
|
delete record2.password;
|
||||||
|
@ -190,26 +190,26 @@ export const Membership = observer(() => {
|
||||||
...record2,
|
...record2,
|
||||||
// roleId: record.roles.id,
|
// roleId: record.roles.id,
|
||||||
});
|
});
|
||||||
setVisibleModal(true);
|
setVisibleModal(true);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
Edit
|
Edit
|
||||||
</Button>
|
</Button>}
|
||||||
<Button
|
{store.authentication.userData.role === "Admin" && <Button
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
let record2 = record;
|
let record2 = record;
|
||||||
delete record2.password;
|
delete record2.password;
|
||||||
record2.isChangePassword = true;
|
record2.isChangePassword = true;
|
||||||
|
|
||||||
setInitialData({
|
setInitialData({
|
||||||
...record2,
|
...record2,
|
||||||
// roleId: record.roles.id,
|
// roleId: record.roles.id,
|
||||||
});
|
});
|
||||||
setVisibleModal(true);
|
setVisibleModal(true);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
Ganti Password
|
Ganti Password
|
||||||
</Button>
|
</Button>}
|
||||||
<Button
|
<Button
|
||||||
onClick={async () => {
|
onClick={async () => {
|
||||||
await store.transaction.getDataHistoryTopUp(record.id)
|
await store.transaction.getDataHistoryTopUp(record.id)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user