import React, { useState } from 'react' import { OverlayTrigger, Tooltip } from 'react-bootstrap'; import { Link } from 'react-router-dom'; import ImageWithBasePath from '../../core/img/imagewithbasebath'; import { Archive, Box, ChevronUp, Mail, RotateCcw, Sliders, Zap } from 'feather-icons-react/build/IconComponents'; import { useDispatch, useSelector } from 'react-redux'; import { setToogleHeader } from '../../core/redux/action'; import Select from 'react-select'; import { Filter } from 'react-feather'; import EditLowStock from '../../core/modals/inventory/editlowstock'; import withReactContent from 'sweetalert2-react-content'; import Swal from 'sweetalert2'; import Table from '../../core/pagination/datatable' const LowStock = () => { const dispatch = useDispatch(); const data = useSelector((state) => state.toggle_header); const dataSource = useSelector((state) => state.lowstock_data); const [isFilterVisible, setIsFilterVisible] = useState(false); const toggleFilterVisibility = () => { setIsFilterVisible((prevVisibility) => !prevVisibility); }; const oldandlatestvalue = [ { value: 'date', label: 'Sort by Date' }, { value: 'newest', label: 'Newest' }, { value: 'oldest', label: 'Oldest' }, ]; const productlist = [ { value: 'chooseProduct', label: 'Choose Product' }, { value: 'lenovo3rdGen', label: 'Lenovo 3rd Generation' }, { value: 'nikeJordan', label: 'Nike Jordan' }, { value: 'amazonEchoDot', label: 'Amazon Echo Dot' }, ]; const category = [ { value: 'chooseCategory', label: 'Choose Category' }, { value: 'laptop', label: 'Laptop' }, { value: 'shoe', label: 'Shoe' }, { value: 'speaker', label: 'Speaker' }, ]; const warehouse = [ { value: 'chooseWarehouse', label: 'Choose Warehouse' }, { value: 'lavishWarehouse', label: 'Lavish Warehouse' }, { value: 'lobarHandy', label: 'Lobar Handy' }, { value: 'traditionalWarehouse', label: 'Traditional Warehouse' }, ]; const renderTooltip = (props) => ( Pdf ); const renderExcelTooltip = (props) => ( Excel ); const renderPrinterTooltip = (props) => ( Printer ); const renderRefreshTooltip = (props) => ( Refresh ); const renderCollapseTooltip = (props) => ( Collapse ); const columns = [ { title: "Warehouse", dataIndex: "warehouse", sorter: (a, b) => a.warehouse.length - b.warehouse.length, width: "5%" }, { title: "Store", dataIndex: "store", sorter: (a, b) => a.store.length - b.store.length, }, { title: "Product", dataIndex: "product", render: (text, record) => ( {text} ), sorter: (a, b) => a.product.length - b.product.length, }, { title: "Category", dataIndex: "category", sorter: (a, b) => a.category.length - b.category.length, }, { title: "SkU", dataIndex: "sku", sorter: (a, b) => a.sku.length - b.sku.length, }, { title: "Qty", dataIndex: "qty", sorter: (a, b) => a.qty.length - b.qty.length, }, { title: "Qty Alert", dataIndex: "qtyalert", sorter: (a, b) => a.qtyalert.length - b.qtyalert.length, }, { title: 'Actions', dataIndex: 'actions', key: 'actions', render: () => (
) }, ] 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(); } }); }; return (

Low Stocks

Manage your low stocks
  • Notify
  • Send Email
  • { dispatch(setToogleHeader(!data)) }} >
{/* /product list */}
{" "} {" "} Search{" "}
{/* /Filter */}
{/* /product list */}
{/* /product list */}
{" "} {" "} Search{" "}
{/* /Filter */}
{/* /product list */} ) } export default LowStock