import React, {useEffect, useState} from "react"; 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"; import {ProductComponent} from "../../component/ProductComponent"; import {LINKS} from "../../routes/app"; const {TabPane} = Tabs; const {Search} = Input; const {Option} = Select; export const Product = observer(() => { const [isLoading, setIsLoading] = useState(false); const store = useStore(); useEffect(() => { const init = async () => { try { setIsLoading(true); await Promise.allSettled([ store.supplier.getData(), store.product.getDataCategories(), store.product.getDataSubCategories(), store.category.getData(), store.category.getDataSubCategories(), ]); await store.product.getData(); setIsLoading(false); } catch (e) { setIsLoading(false); } }; init(); }, []); const routeData = [ { route: LINKS.HOME, name: "Home", }, { route: LINKS.PRODUCT, name: Product, }, ]; return (