fix: key on menu list & product table
This commit is contained in:
parent
6b00b4bb13
commit
1be4d4531d
|
@ -88,7 +88,7 @@ export const MenuList = observer((props) => {
|
||||||
)}
|
)}
|
||||||
{store.authentication.userData.role !== "Retail" && (
|
{store.authentication.userData.role !== "Retail" && (
|
||||||
<SubMenu
|
<SubMenu
|
||||||
key="product"
|
key="product-main"
|
||||||
icon={<ProfileOutlined />}
|
icon={<ProfileOutlined />}
|
||||||
title="Product"
|
title="Product"
|
||||||
>
|
>
|
||||||
|
@ -98,13 +98,13 @@ export const MenuList = observer((props) => {
|
||||||
<span>Product</span>
|
<span>Product</span>
|
||||||
</Link>
|
</Link>
|
||||||
</Menu.Item>
|
</Menu.Item>
|
||||||
<Menu.Item key="product">
|
<Menu.Item key="category">
|
||||||
<Link to={LINKS.CATEGORY}>
|
<Link to={LINKS.CATEGORY}>
|
||||||
<FileAddOutlined />
|
<FileAddOutlined />
|
||||||
<span>Category</span>
|
<span>Category</span>
|
||||||
</Link>
|
</Link>
|
||||||
</Menu.Item>
|
</Menu.Item>
|
||||||
<Menu.Item key="product">
|
<Menu.Item key="sub-category">
|
||||||
<Link to={LINKS.PRODUCT}>
|
<Link to={LINKS.PRODUCT}>
|
||||||
<FileSyncOutlined />
|
<FileSyncOutlined />
|
||||||
<span>Sub Category</span>
|
<span>Sub Category</span>
|
||||||
|
@ -121,7 +121,7 @@ export const MenuList = observer((props) => {
|
||||||
</Menu.Item>
|
</Menu.Item>
|
||||||
)}
|
)}
|
||||||
{store.authentication.userData.role !== "Retail" && (
|
{store.authentication.userData.role !== "Retail" && (
|
||||||
<Menu.Item key="product">
|
<Menu.Item key="retail">
|
||||||
<Link to={LINKS.PRODUCT}>
|
<Link to={LINKS.PRODUCT}>
|
||||||
<DatabaseOutlined/>
|
<DatabaseOutlined/>
|
||||||
<span>Product</span>
|
<span>Product</span>
|
||||||
|
|
|
@ -31,7 +31,7 @@ export const Product = observer(() => {
|
||||||
|
|
||||||
const handleChangeTabPane = async (key) => {
|
const handleChangeTabPane = async (key) => {
|
||||||
store.product.filterCategory = key;
|
store.product.filterCategory = key;
|
||||||
console.log(key);
|
// console.log(key);
|
||||||
await store.product.getData();
|
await store.product.getData();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -73,7 +73,7 @@ export const Product = observer(() => {
|
||||||
</Row>
|
</Row>
|
||||||
|
|
||||||
<Tabs onChange={handleChangeTabPane} size="default" tabBarGutter="50">
|
<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}>
|
<TabPane tab={item.name} key={item.id}>
|
||||||
{/* <ProductComponent category={item.name} /> */}
|
{/* <ProductComponent category={item.name} /> */}
|
||||||
<ProductComponent />
|
<ProductComponent />
|
||||||
|
|
|
@ -33,8 +33,6 @@ export class Product {
|
||||||
}) ?? []
|
}) ?? []
|
||||||
|
|
||||||
this.total_data = response.body.total_data ?? 0
|
this.total_data = response.body.total_data ?? 0
|
||||||
|
|
||||||
console.log(response.body.data, this.filterCategory);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async getDataSubCategories() {
|
async getDataSubCategories() {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user