import { Box, ChevronUp, Edit, Eye, Filter, GitMerge, PlusCircle, RotateCcw, Sliders, StopCircle, Trash2, } from "feather-icons-react/build/IconComponents"; import React, { useState } from "react"; import { useDispatch, useSelector } from "react-redux"; import { Link } from "react-router-dom"; import Select from "react-select"; import ImageWithBasePath from "../../core/img/imagewithbasebath"; import Brand from "../../core/modals/inventory/brand"; import withReactContent from "sweetalert2-react-content"; import Swal from "sweetalert2"; import { all_routes } from "../../Router/all_routes"; import { OverlayTrigger, Tooltip } from "react-bootstrap"; import Table from "../../core/pagination/datatable"; import { setToogleHeader } from "../../core/redux/action"; import { Download } from "react-feather"; const ProductList = () => { const dataSource = useSelector((state) => state.product_list); const dispatch = useDispatch(); const data = useSelector((state) => state.toggle_header); const [isFilterVisible, setIsFilterVisible] = useState(false); const toggleFilterVisibility = () => { setIsFilterVisible((prevVisibility) => !prevVisibility); }; const route = all_routes; const options = [ { value: "sortByDate", label: "Sort by Date" }, { value: "140923", label: "14 09 23" }, { value: "110923", label: "11 09 23" }, ]; const productlist = [ { value: "choose", label: "Choose Product" }, { value: "lenovo", label: "Lenovo 3rd Generation" }, { value: "nike", label: "Nike Jordan" }, ]; const categorylist = [ { value: "choose", label: "Choose Category" }, { value: "laptop", label: "Laptop" }, { value: "shoe", label: "Shoe" }, ]; const subcategorylist = [ { value: "choose", label: "Choose Sub Category" }, { value: "computers", label: "Computers" }, { value: "fruits", label: "Fruits" }, ]; const brandlist = [ { value: "all", label: "All Brand" }, { value: "lenovo", label: "Lenovo" }, { value: "nike", label: "Nike" }, ]; const price = [ { value: "price", label: "Price" }, { value: "12500", label: "$12,500.00" }, { value: "13000", label: "$13,000.00" }, // Replace with your actual values ]; const columns = [ { title: "Product", dataIndex: "product", render: (text, record) => ( {text} ), sorter: (a, b) => a.product.length - b.product.length, }, { title: "SKU", dataIndex: "sku", sorter: (a, b) => a.sku.length - b.sku.length, }, { title: "Category", dataIndex: "category", sorter: (a, b) => a.category.length - b.category.length, }, { title: "Brand", dataIndex: "brand", sorter: (a, b) => a.brand.length - b.brand.length, }, { title: "Price", dataIndex: "price", sorter: (a, b) => a.price.length - b.price.length, }, { title: "Unit", dataIndex: "unit", sorter: (a, b) => a.unit.length - b.unit.length, }, { title: "Qty", dataIndex: "qty", sorter: (a, b) => a.qty.length - b.qty.length, }, { title: "Created By", dataIndex: "createdby", render: (text, record) => ( {text} ), sorter: (a, b) => a.createdby.length - b.createdby.length, }, { title: "Action", dataIndex: "action", render: () => (
), sorter: (a, b) => a.createdby.length - b.createdby.length, }, ]; const MySwal = withReactContent(Swal); const showConfirmationAlert = () => { MySwal.fire({ title: "Are you sure?", text: "You won't be able to revert this!", showCancelButton: true, confirmButtonColor: "#00ff00", confirmButtonText: "Yes, delete it!", cancelButtonColor: "#ff0000", cancelButtonText: "Cancel", }).then((result) => { if (result.isConfirmed) { MySwal.fire({ title: "Deleted!", text: "Your file has been deleted.", className: "btn btn-success", confirmButtonText: "OK", customClass: { confirmButton: "btn btn-success", }, }); } else { MySwal.close(); } }); }; const renderTooltip = (props) => ( Pdf ); const renderExcelTooltip = (props) => ( Excel ); const renderPrinterTooltip = (props) => ( Printer ); const renderRefreshTooltip = (props) => ( Refresh ); const renderCollapseTooltip = (props) => ( Collapse ); return (

Product List

Manage your products
  • { e.preventDefault(); dispatch(setToogleHeader(!data)); }} >
Add New Product
Import Product
{/* /product list */}
{" "} {" "} Search{" "}
{/* /Filter */}
{/* /product list */} ); }; export default ProductList;