feat: add column partner fee in list product role admin

This commit is contained in:
rahman 2022-05-23 21:36:27 +07:00
parent 8737da9da4
commit 6c4a78f871

View File

@ -62,8 +62,8 @@ export const ProductComponent = observer((props) => {
},
{
title: "Harga Beli",
dataIndex: "current_price_price",
key: "current_price_price",
dataIndex: "price",
key: "price",
render: (text) =>
new Intl.NumberFormat("id-ID", {
style: "currency",
@ -100,6 +100,16 @@ export const ProductComponent = observer((props) => {
currency: "IDR",
}).format(text),
},
{
title: "Partner fee",
dataIndex: "partner_fee",
key: "partner_fee",
render: (text) =>
new Intl.NumberFormat("id-ID", {
style: "currency",
currency: "IDR",
}).format(text),
},
{
title: "Supplier",
dataIndex: "supplier_name",
@ -140,13 +150,14 @@ export const ProductComponent = observer((props) => {
},
];
//if (store.authentication.userData.role === "Admin Partner") delete columns[2];
if (store.authentication.userData.role === "Admin Partner") delete columns[9];
if (store.authentication.userData.role === "Admin Partner") delete columns[10];
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[8];
if (store.authentication.userData.role !== "Admin Partner") delete columns[4];
if (store.authentication.userData.role !== "Admin") delete columns[9];
if (store.authentication.userData.role !== "Admin") delete columns[6];
if (store.authentication.userData.role !== "Admin") delete columns[7];
if (store.authentication.userData.role !== "Admin") delete columns[2];
if (store.authentication.userData.role === "Admin Partner") delete columns[7];
if (store.authentication.userData.role === "Admin Partner") delete columns[8];
//if (store.authentication.userData.role !== "Admin") delete columns[8];
//if (store.authentication.userData.role === "Admin Partner") delete columns[5];