fix: get product

This commit is contained in:
ilham 2021-12-20 13:07:21 +07:00
parent c73f642b93
commit ead2d51fd8

View File

@ -43,32 +43,32 @@ export const ProductComponent = observer((props) => {
}, },
{ {
title: "Produk", title: "Produk",
dataIndex: "name", dataIndex: ["name"],
key: "name", key: "name",
}, },
{ {
title: "Harga Beli", title: "Harga Beli",
dataIndex: "price", dataIndex: ["currentPrice","price"],
key: "price", key: ["currentPrice","price"],
}, },
{ {
title: "Harga Jual", title: "Harga Jual",
dataIndex: "basePrice", dataIndex: ["currentPrice","mark_up_price"],
key: "basePrice", key: ["currentPrice","mark_up_price"],
},
{
title: "Gangguan",
dataIndex: "status",
key: "status",
render: (text, record) => (
<Tag
color={record?.status === "ACTIVE" ? "blue" : "#E3E8EE"}
style={{color: "#4F566B"}}
>
{capitalize(record?.status)}
</Tag>
),
}, },
// {
// 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", title: "Tersedia",
dataIndex: "tersedia", dataIndex: "tersedia",
@ -78,7 +78,7 @@ export const ProductComponent = observer((props) => {
color={record?.status === "ACTIVE" ? "blue" : "#E3E8EE"} color={record?.status === "ACTIVE" ? "blue" : "#E3E8EE"}
style={{color: "#4F566B"}} style={{color: "#4F566B"}}
> >
{record?.status === "ACTIVE" ? " Ya" : "Tidak"} {record?.status === "ACTIVE" ? " Tersedia" : "Tidak"}
</Tag> </Tag>
), ),
} }