Config Page
This commit is contained in:
@@ -147,31 +147,33 @@ export const Membership = observer(() => {
|
||||
currency: "IDR",
|
||||
}).format(text),
|
||||
},
|
||||
// {
|
||||
// title: "Status",
|
||||
// dataIndex: "isActive",
|
||||
// key: "isActive",
|
||||
// render: (text, record) => (
|
||||
// <Tag
|
||||
// color={record?.isActive === true ? "processing" : "#E3E8EE"}
|
||||
// style={{ color: "#4F566B" }}
|
||||
// >
|
||||
// {record?.isActive === true ? " ACTIVE" : "INACTIVE"}
|
||||
// </Tag>
|
||||
// ),
|
||||
// },
|
||||
{
|
||||
title: "Status",
|
||||
dataIndex: "isActive",
|
||||
key: "isActive",
|
||||
render: (text, record) => (
|
||||
<Tag
|
||||
color={record?.isActive === true ? "processing" : "#E3E8EE"}
|
||||
style={{ color: "#4F566B" }}
|
||||
>
|
||||
{record?.isActive === true ? " ACTIVE" : "INACTIVE"}
|
||||
</Tag>
|
||||
),
|
||||
},
|
||||
{
|
||||
title: "Action",
|
||||
key: "action",
|
||||
render: (text, record) => (
|
||||
<Space size="middle">
|
||||
{/* {store.authentication.userData.role === "Admin" && <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>}
|
||||
<Button
|
||||
</Button>
|
||||
{/* } */}
|
||||
{/* <Button
|
||||
onClick={() => {
|
||||
setDestination(record?.id);
|
||||
console.log(record?.id);
|
||||
@@ -179,8 +181,9 @@ export const Membership = observer(() => {
|
||||
}}
|
||||
>
|
||||
<DownloadOutlined/> Top Up Saldo
|
||||
</Button>
|
||||
{store.authentication.userData.role === "Admin" && <Button
|
||||
</Button> */}
|
||||
{/* {store.authentication.userData.role === "Admin" && */}
|
||||
<Button
|
||||
onClick={() => {
|
||||
let record2 = record;
|
||||
delete record2.password;
|
||||
@@ -194,8 +197,10 @@ export const Membership = observer(() => {
|
||||
}}
|
||||
>
|
||||
Edit
|
||||
</Button>}
|
||||
{store.authentication.userData.role === "Admin" && <Button
|
||||
</Button>
|
||||
{/* }
|
||||
{store.authentication.userData.role === "Admin" && */}
|
||||
<Button
|
||||
onClick={() => {
|
||||
let record2 = record;
|
||||
delete record2.password;
|
||||
@@ -209,7 +214,8 @@ export const Membership = observer(() => {
|
||||
}}
|
||||
>
|
||||
Ganti Password
|
||||
</Button>} */}
|
||||
</Button>
|
||||
{/* } */}
|
||||
<Button
|
||||
onClick={() => {
|
||||
setDestination(record?.id);
|
||||
@@ -219,15 +225,18 @@ export const Membership = observer(() => {
|
||||
>
|
||||
<DownloadOutlined /> Top Up Saldo
|
||||
</Button>
|
||||
<Button
|
||||
onClick={async () => {
|
||||
await store.transaction.getDataHistoryTopUp(record.id);
|
||||
history.push(LINKS.USER_DETAIL.replace(":id", record.id));
|
||||
console.log(record.id);
|
||||
}}
|
||||
>
|
||||
Detail
|
||||
</Button>
|
||||
{/* {store.authentication.userData.role === "Admin" && ( */}
|
||||
<Button
|
||||
onClick={async () => {
|
||||
await store.transaction.getDataHistoryTopUp(record.id);
|
||||
history.push(LINKS.USER_DETAIL.replace(":id", record.id));
|
||||
console.log(record.id);
|
||||
}}
|
||||
>
|
||||
Detail
|
||||
</Button>
|
||||
{/* ) */}
|
||||
{/* } */}
|
||||
</Space>
|
||||
),
|
||||
},
|
||||
@@ -239,8 +248,8 @@ export const Membership = observer(() => {
|
||||
name: "Home",
|
||||
},
|
||||
{
|
||||
route: "/app/membership",
|
||||
name: <span style={{ fontWeight: "bold" }}>Membership</span>,
|
||||
route: LINKS.MEMBERSHIP,
|
||||
name: <span style={{ fontWeight: "bold" }}>Keanggotaan</span>,
|
||||
},
|
||||
];
|
||||
|
||||
@@ -300,14 +309,14 @@ export const Membership = observer(() => {
|
||||
</Button> */}
|
||||
</Col>
|
||||
<Col span={12} style={{ textAlign: "right" }}>
|
||||
<Search
|
||||
{/* <Search
|
||||
placeholder="input search text"
|
||||
style={{
|
||||
width: store.ui.mediaQuery.isMobile ? 160 : 200,
|
||||
marginRight: store.ui.mediaQuery.isMobile ? 0 : 10,
|
||||
marginBottom: store.ui.mediaQuery.isMobile ? 10 : 0,
|
||||
}}
|
||||
/>
|
||||
/> */}
|
||||
<Button
|
||||
onClick={() => {
|
||||
setInitialData({});
|
||||
|
||||
Reference in New Issue
Block a user