fix: key on menu list & product table

This commit is contained in:
rarsyansyahr 2021-12-15 15:54:03 +07:00
parent 6b00b4bb13
commit 1be4d4531d
3 changed files with 6 additions and 8 deletions

View File

@ -88,7 +88,7 @@ export const MenuList = observer((props) => {
)}
{store.authentication.userData.role !== "Retail" && (
<SubMenu
key="product"
key="product-main"
icon={<ProfileOutlined />}
title="Product"
>
@ -98,13 +98,13 @@ export const MenuList = observer((props) => {
<span>Product</span>
</Link>
</Menu.Item>
<Menu.Item key="product">
<Menu.Item key="category">
<Link to={LINKS.CATEGORY}>
<FileAddOutlined />
<span>Category</span>
</Link>
</Menu.Item>
<Menu.Item key="product">
<Menu.Item key="sub-category">
<Link to={LINKS.PRODUCT}>
<FileSyncOutlined />
<span>Sub Category</span>
@ -121,7 +121,7 @@ export const MenuList = observer((props) => {
</Menu.Item>
)}
{store.authentication.userData.role !== "Retail" && (
<Menu.Item key="product">
<Menu.Item key="retail">
<Link to={LINKS.PRODUCT}>
<DatabaseOutlined/>
<span>Product</span>

View File

@ -31,7 +31,7 @@ export const Product = observer(() => {
const handleChangeTabPane = async (key) => {
store.product.filterCategory = key;
console.log(key);
// console.log(key);
await store.product.getData();
};
@ -73,7 +73,7 @@ export const Product = observer(() => {
</Row>
<Tabs onChange={handleChangeTabPane} size="default" tabBarGutter="50">
{store.product.dataCategories.map((item) => (
{store.product.dataCategories.map((item, idx) => (
<TabPane tab={item.name} key={item.id}>
{/* <ProductComponent category={item.name} /> */}
<ProductComponent />

View File

@ -33,8 +33,6 @@ export class Product {
}) ?? []
this.total_data = response.body.total_data ?? 0
console.log(response.body.data, this.filterCategory);
}
async getDataSubCategories() {