From 34a9cd972b32531f22233d06895eac88a7768b95 Mon Sep 17 00:00:00 2001 From: ajat91 Date: Thu, 16 Dec 2021 17:47:05 +0700 Subject: [PATCH] Pages Product --- src/pages/Product/Product.js | 48 +++++++++++++++++++----------------- 1 file changed, 26 insertions(+), 22 deletions(-) diff --git a/src/pages/Product/Product.js b/src/pages/Product/Product.js index 0f80346..3586974 100644 --- a/src/pages/Product/Product.js +++ b/src/pages/Product/Product.js @@ -1,6 +1,10 @@ import React, { useEffect, useState } from "react"; -import { Button, Card, Col, Input, Row, Select, Tabs } from "antd"; -import { FilterOutlined, PlusSquareOutlined } from "@ant-design/icons"; +import { Button, Card, Col, Input, Row, Select, Tabs, Upload } from "antd"; +import { + FilterOutlined, + PlusSquareOutlined, + UploadOutlined, +} from "@ant-design/icons"; import { BreadcumbComponent } from "../../component/BreadcumbComponent"; import { useStore } from "../../utils/useStore"; import { observer } from "mobx-react-lite"; @@ -13,14 +17,17 @@ const { Option } = Select; export const Product = observer(() => { const [isLoading, setIsLoading] = useState(false); + const [uploadProduct, setUpload] = useState(true); const store = useStore(); useEffect(() => { const init = async () => { try { setIsLoading(true); + await store.supplier.getData(); await store.product.getDataCategories(); await store.product.getData(); + //await store.supplier.data; setIsLoading(false); } catch (e) { setIsLoading(false); @@ -30,12 +37,6 @@ export const Product = observer(() => { init(); }, []); - const handleChangeTabPane = async (key) => { - store.product.filterCategory = key; - // console.log(key); - await store.product.getData(); - }; - const routeData = [ { route: LINKS.HOME, @@ -46,7 +47,7 @@ export const Product = observer(() => { name: Product, }, ]; - + return (
@@ -72,28 +73,31 @@ export const Product = observer(() => { - - + + + + + + - - {/* - {store.product.dataCategories.map((item, idx) => ( - */} - {/* */} - {/* - ))} - */}
);