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",
|
||||
render: (text, record) => (
|
||||
<Space size="middle">
|
||||
<Button
|
||||
{store.authentication.userData.role === "Admin" && <Button
|
||||
type={record?.isActive === true ? "danger" : "primary"}
|
||||
onClick={() => changeStatus(record?.id, record?.isActive)}
|
||||
>
|
||||
{record?.isActive === true ? "Inactive" : "Active"}
|
||||
</Button>
|
||||
{store.authentication.userData.role === ('Admin' && 'Supervisor') && <Button
|
||||
</Button>}
|
||||
<Button
|
||||
onClick={() => {
|
||||
setDestination(record?.id);
|
||||
console.log(record?.id);
|
||||
|
@ -179,8 +179,8 @@ export const Membership = observer(() => {
|
|||
}}
|
||||
>
|
||||
<DownloadOutlined/> Top Up Saldo
|
||||
</Button>}
|
||||
<Button
|
||||
</Button>
|
||||
{store.authentication.userData.role === "Admin" && <Button
|
||||
onClick={() => {
|
||||
let record2 = record;
|
||||
delete record2.password;
|
||||
|
@ -190,26 +190,26 @@ export const Membership = observer(() => {
|
|||
...record2,
|
||||
// roleId: record.roles.id,
|
||||
});
|
||||
setVisibleModal(true);
|
||||
}}
|
||||
>
|
||||
Edit
|
||||
</Button>
|
||||
<Button
|
||||
onClick={() => {
|
||||
let record2 = record;
|
||||
delete record2.password;
|
||||
record2.isChangePassword = true;
|
||||
setVisibleModal(true);
|
||||
}}
|
||||
>
|
||||
Edit
|
||||
</Button>}
|
||||
{store.authentication.userData.role === "Admin" && <Button
|
||||
onClick={() => {
|
||||
let record2 = record;
|
||||
delete record2.password;
|
||||
record2.isChangePassword = true;
|
||||
|
||||
setInitialData({
|
||||
...record2,
|
||||
// roleId: record.roles.id,
|
||||
});
|
||||
setVisibleModal(true);
|
||||
}}
|
||||
>
|
||||
Ganti Password
|
||||
</Button>
|
||||
setInitialData({
|
||||
...record2,
|
||||
// roleId: record.roles.id,
|
||||
});
|
||||
setVisibleModal(true);
|
||||
}}
|
||||
>
|
||||
Ganti Password
|
||||
</Button>}
|
||||
<Button
|
||||
onClick={async () => {
|
||||
await store.transaction.getDataHistoryTopUp(record.id)
|
||||
|
|
Loading…
Reference in New Issue
Block a user