feat: add column supplier and profit produk in history

This commit is contained in:
rahman 2022-07-19 11:24:50 +07:00
parent bb75451a4e
commit e0dac8c405

View File

@ -196,6 +196,18 @@ export const DetailUser = observer(() => {
dataIndex: "name", dataIndex: "name",
key: "name", key: "name",
}, },
{
title: "Supplier",
dataIndex: "supplier_name",
key: "supplier_name",
},
{
title: "Profit Produk",
dataIndex: "profit_produk",
key: "",
render: (text, record) =>
record.price - record.product_price
},
{ {
title: "Harga", title: "Harga",
dataIndex: "price", dataIndex: "price",
@ -274,6 +286,8 @@ export const DetailUser = observer(() => {
key: "failed_reason", key: "failed_reason",
}, },
]; ];
if (store.authentication.userData.role !== "Admin") delete columns[1];
if (store.authentication.userData.role !== "Admin") delete columns[2];
const routeData = [ const routeData = [
{ {