Perbaikan Menu Produk
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user