Bug Fixing

This commit is contained in:
2022-02-03 18:26:58 +07:00
parent 4ea7e8d632
commit 1346d625f8
11 changed files with 64 additions and 58 deletions

View File

@@ -71,7 +71,8 @@ export const Membership = observer(() => {
}, []);
const getData = async () => {
store.authentication.userData.role === "Admin"
store.authentication.userData.role === "Admin" ||
store.authentication.userData.role === "Customer Service"
? await store.membership.getData()
: await store.membership.getDataBySuperior();
};
@@ -111,10 +112,10 @@ export const Membership = observer(() => {
color: "#fff",
}}
>
Remove Filter
Hapus Filter
</Button>,
<Button key={"cancel"} onClick={handleCancelFilter}>
Cancel
Batal
</Button>,
<Button
key={"submit"}
@@ -124,7 +125,7 @@ export const Membership = observer(() => {
color: "#fff",
}}
>
Apply
Terapkan
</Button>,
];
const handleCancelTransaction = () => {
@@ -225,6 +226,7 @@ export const Membership = observer(() => {
},
];
if (store.authentication.userData.role === "Customer Service") columns.pop();
const routeData = [
{
route: LINKS.HOME,
@@ -362,16 +364,18 @@ export const Membership = observer(() => {
key="1"
hasEmpty
columns={columns}
style={{ cursor: "pointer" }}
//style={{ cursor: "pointer" }}
dataSource={
store.authentication.userData.role === "Admin"
store.authentication.userData.role === "Admin" ||
store.authentication.userData.role === "Customer Service"
? store.membership.dataMember
: store.membership.data
}
pagination={{
pageSize: store.membership.pageSize,
total:
store.authentication.userData.role === "Admin"
store.authentication.userData.role === "Admin" ||
store.authentication.userData.role === "Customer Service"
? store.membership.dataTotal
: store.membership.total_data,
current: store.membership.page + 1,
@@ -404,14 +408,16 @@ export const Membership = observer(() => {
},
pageSize: store.membership.pageSize,
total:
store.authentication.userData.role === "Admin"
store.authentication.userData.role === "Admin" ||
store.authentication.userData.role === "Customer Service"
? store.membership.dataTotal
: store.membership.total_data,
current: store.membership.page + 1,
style: { marginBottom: "1rem", marginRight: "1rem" },
}}
dataSource={
store.authentication.userData.role === "Admin"
store.authentication.userData.role === "Admin" ||
store.authentication.userData.role === "Customer Service"
? store.membership.dataMember
: store.membership.data
}