Reparing Menu

This commit is contained in:
2021-12-23 17:05:03 +07:00
parent 1a0a1756b0
commit bd2696efca
4 changed files with 61 additions and 145 deletions

View File

@@ -34,32 +34,6 @@ export const CategoryComponent = observer((props) => {
dataIndex: "name",
key: "name",
},
// {
// title: "Gangguan",
// dataIndex: "status",
// key: "status",
// render: (text, record) => (
// <Tag
// color={record?.status === "ACTIVE" ? "blue" : "#E3E8EE"}
// style={{color: "#4F566B"}}
// >
// {capitalize(record?.status)}
// </Tag>
// ),
// },
// {
// title: "Tersedia",
// dataIndex: "tersedia",
// key: "tersedia",
// render: (text, record) => (
// <Tag
// color={record?.status === "ACTIVE" ? "blue" : "#E3E8EE"}
// style={{color: "#4F566B"}}
// >
// {record?.status === "ACTIVE" ? " Ya" : "Tidak"}
// </Tag>
// ),
// },
{
title: "Action",
key: "action",

View File

@@ -79,23 +79,16 @@ export const ProductComponent = observer((props) => {
currency: "IDR",
}).format(text),
},
// {
// title: "Gangguan",
// dataIndex: "status",
// key: "status",
// render: (text, record) => (
// <Tag
// color={record?.status === "ACTIVE" ? "blue" : "#E3E8EE"}
// style={{color: "#4F566B"}}
// >
// {capitalize(record?.status)}
// </Tag>
// ),
// },
{
title: "Supplier",
dataIndex: "supplier",
key: "supplier",
dataIndex: "supplier_name",
key: "supplier_name",
},
{
title: "Sub Category",
dataIndex: "sub_categories_name",
key: "sub_categories_name",
},
{
title: "Tersedia",
@@ -128,6 +121,8 @@ export const ProductComponent = observer((props) => {
},
];
if (store.authentication.userData.role !== "Admin") columns.pop();
//if (store.authentication.userData.role !== "Admin") columns.shift();
if (store.authentication.userData.role !== "Admin") delete columns[4];
const deleteData = async (id) => {
try {
console.log(id);