diff --git a/src/component/ProductComponent.js b/src/component/ProductComponent.js index b44cd63..83ba644 100644 --- a/src/component/ProductComponent.js +++ b/src/component/ProductComponent.js @@ -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, diff --git a/src/component/SubcategoryComponent.js b/src/component/SubcategoryComponent.js index 22a57a7..751318c 100644 --- a/src/component/SubcategoryComponent.js +++ b/src/component/SubcategoryComponent.js @@ -233,7 +233,7 @@ export const SubcategoryComponent = observer((props) => { }} >