Perbaikan Menu Produk

This commit is contained in:
2022-01-06 18:38:01 +07:00
parent ac78d8ab0b
commit aed34857ee
3 changed files with 18 additions and 11 deletions

View File

@@ -129,13 +129,15 @@ export const ProductComponent = observer((props) => {
},
];
if (store.authentication.userData.role !== "Admin") columns.pop();
if (store.authentication.userData.role === "Admin Partner") delete columns[2];
//if (store.authentication.userData.role === "Admin Partner") delete columns[2];
if (store.authentication.userData.role === "Admin Partner") delete columns[3];
if (store.authentication.userData.role != "Admin Partner") delete columns[4];
if (store.authentication.userData.role !== "Admin") delete columns[6];
if (store.authentication.userData.role !== "Admin") delete columns[2];
if (store.authentication.userData.role !== "Admin") delete columns[5];
if (store.authentication.userData.role === "Admin Partner") delete columns[7];
if (store.authentication.userData.role !== "Admin") delete columns[8];
if (store.authentication.userData.role === "Admin Partner") delete columns[5];
//if (store.authentication.userData.role === "Admin Partner") delete columns[5];
const deleteData = async (id) => {
try {
@@ -288,7 +290,10 @@ export const ProductComponent = observer((props) => {
bordered
pagination={{
pageSize: store.product.pageSize,
total: store.product.total_data,
total:
store.authentication.userData.role === "Admin Partner"
? store.product.total_data_partner
: store.product.total_data,
current: store.product.page + 1,
showSizeChanger: true,
simple: false,