feat: style column

This commit is contained in:
caturbgs 2021-12-17 01:49:38 +07:00
parent 9269ae0858
commit dfc3ea466f

View File

@ -58,38 +58,42 @@ export const SupplierComponent = observer((props) => {
title: "Kode", title: "Kode",
dataIndex: "code", dataIndex: "code",
key: "code", key: "code",
width: "5%",
}, },
{ {
title: "Saldo", title: "Saldo",
dataIndex: ["coa","amount"], dataIndex: ["coa", "amount"],
key: ["coa","amount"], key: ["coa", "amount"],
width: "20%",
}, },
{ {
title: "Status", title: "Status",
dataIndex: "status", dataIndex: "status",
key: "status", key: "status",
width: "5%",
render: (text, record) => ( render: (text, record) => (
<Tag <Tag
color={record?.status === true ? "processing" : "#E3E8EE"} color={record?.status === true ? "processing" : "#E3E8EE"}
style={{ color: "#4F566B" }} style={{color: "#4F566B"}}
> >
{record?.status === true ? " ACTIVE" : "INACTIVE"} {record?.status === true ? " ACTIVE" : "INACTIVE"}
</Tag> </Tag>
), ),
}, },
{ {
title: "Action", title: "Action",
key: "action", key: "action",
width: "20%",
render: (text, record) => ( render: (text, record) => (
<Space size="middle"> <Space size="middle">
<Button <Button
type={record?.status === true ? "danger" : "primary"} type={record?.status === true ? "danger" : "primary"}
onClick={() => changeStatus(record?.id, record?.status)} onClick={() => changeStatus(record?.id, record?.status)}
> >
{record?.status === true ? "INACTIVE" : "ACTIVE"} {record?.status === true ? "INACTIVE" : "ACTIVE"}
</Button> </Button>
<Button onClick={() => handleTopup(record)}> Top Up Saldo</Button> <Button onClick={() => handleTopup(record)}> Top Up Saldo</Button>
<Button onClick={() => handleEditButton(record)}>Edit</Button> <Button onClick={() => handleEditButton(record)}>Edit</Button>
</Space> </Space>
), ),
}, },