Simplified profile page BOD-323
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
import React from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { Table, Button } from "antd";
|
||||
import { Table, Button, Typography } from "antd";
|
||||
export default function ProfileShopsComponent({
|
||||
loading,
|
||||
data,
|
||||
updateActiveShop
|
||||
updateActiveShop,
|
||||
}) {
|
||||
const { t } = useTranslation();
|
||||
|
||||
@@ -14,14 +14,14 @@ export default function ProfileShopsComponent({
|
||||
dataIndex: "shopname",
|
||||
key: "shopname",
|
||||
width: "25%",
|
||||
render: (text, record) => <span>{record.bodyshop.shopname}</span>
|
||||
render: (text, record) => <span>{record.bodyshop.shopname}</span>,
|
||||
},
|
||||
{
|
||||
title: t("associations.fields.active"),
|
||||
dataIndex: "active",
|
||||
key: "active",
|
||||
width: "25%",
|
||||
render: (text, record) => <span>{record.active ? "Yes" : "No"}</span>
|
||||
render: (text, record) => <span>{record.active ? "Yes" : "No"}</span>,
|
||||
},
|
||||
{
|
||||
title: t("associations.labels.actions"),
|
||||
@@ -36,15 +36,20 @@ export default function ProfileShopsComponent({
|
||||
</Button>
|
||||
)}
|
||||
</span>
|
||||
)
|
||||
}
|
||||
),
|
||||
},
|
||||
];
|
||||
|
||||
return (
|
||||
<Table
|
||||
title={() => (
|
||||
<Typography.Title level={4}>
|
||||
{t("profile.labels.activeshop")}
|
||||
</Typography.Title>
|
||||
)}
|
||||
loading={loading}
|
||||
size="small"
|
||||
columns={columns.map(item => ({ ...item }))}
|
||||
columns={columns.map((item) => ({ ...item }))}
|
||||
rowKey="id"
|
||||
dataSource={data}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user