From 8ce42aeb2d6d043162f63474943ce10e2021c3b8 Mon Sep 17 00:00:00 2001 From: roshangarg Date: Wed, 17 Apr 2024 17:13:35 +0530 Subject: [PATCH 1/4] updated the add cusstomer fileds --- src/index.js | 2 +- src/views/customerDetails/addCustomer.js | 46 +++++++++++++++++++ .../customerDetails/singleUserAllDetails.js | 4 ++ 3 files changed, 51 insertions(+), 1 deletion(-) diff --git a/src/index.js b/src/index.js index 466639c..3e4516a 100644 --- a/src/index.js +++ b/src/index.js @@ -14,7 +14,7 @@ import { cibGmail } from "@coreui/icons"; import { createRoot } from "react-dom/client"; const setupAxios = () => { - //axios.defaults.baseURL = "http://localhost:5000"; + // axios.defaults.baseURL = "http://localhost:5000"; axios.defaults.baseURL = "https://api.smellika.com"; axios.defaults.headers = { diff --git a/src/views/customerDetails/addCustomer.js b/src/views/customerDetails/addCustomer.js index 2f0dc20..025e7ab 100644 --- a/src/views/customerDetails/addCustomer.js +++ b/src/views/customerDetails/addCustomer.js @@ -42,6 +42,8 @@ const AddCustomer = () => { state: "", postalCode: "", country: "", + company_name: "", + gst_number: Number, }); // console.log(data); @@ -373,6 +375,50 @@ const AddCustomer = () => { /> + + + + Company Name + + handleChange(e)} + + // value={accountDetails.firstname} + // onChange={handerInputChanges} + /> + + + + + + GST Number + + handleChange(e)} + + // value={accountDetails.firstname} + // onChange={handerInputChanges} + /> + + +// +// +// +// + +//
+//
+//
+//
+//
+//
+//
+// +//
+//
+//
+// +// +//
+//
+// +// +//
+//
+// +//
+//
+ +//
+// +// +// +// +// +// + +// +// +// +// +// +// +// {!loading && showData.length === 0 && ( +// +// +// +// )} +// {loading ? ( +// +// +// +// ) : query === "" && filterCategory == "" ? ( +// showData.map((product, i) => { +// return ( +// +// +// +// +// +// +// +// +// ); +// }) +// ) : query !== "" ? ( +// queryData.map((product, i) => { +// return ( +// +// +// +// +// +// +// +// +// ); +// }) +// ) : ( +// query == "" && +// filterData.map((product, i) => { +// return ( +// +// +// +// +// +// +// +// +// ); +// }) +// )} +// +//
ImageProductCategoryPriceAdded OnActions
+//
No Data Available
+//
+// Loading... +//
+// {product.image && +// product.image.map((i, j) => ( +// +// ))} +// {product.name} +// {product.category?.categoryName !== "" +// ? product.category?.categoryName +// : "Category Not selected "} +// +// ₹ +// {product?.total_amount +// ? product?.total_amount +// : product?.variants[0]?.price} +// +// {new Date(product.createdAt).toLocaleString( +// "en-IN", +// { +// weekday: "short", +// month: "short", +// day: "numeric", +// year: "numeric", +// hour: "numeric", +// minute: "numeric", +// hour12: true, +// } +// )} +// +// +// +// +// +// +// +// +// +// +//
+// {product.image && +// product.image.map((i, j) => ( +// +// ))} +// {product.name} +// {product.category !== "" +// ? product.category?.categoryName +// : "Category Not selected "} +// ₹{product.price} +// {new Date(product.createdAt).toLocaleString( +// "en-IN", +// { +// weekday: "short", +// month: "short", +// day: "numeric", +// year: "numeric", +// hour: "numeric", +// minute: "numeric", +// hour12: true, +// } +// )} +// +// +// +// +// +// +// +// +// +// +//
+// {product.image && +// product.image.map((i, j) => ( +// +// ))} +// {product.name} +// {product.category?.categoryName} +// ₹{product.price} +// {new Date(product.createdAt).toLocaleString( +// "en-IN", +// { +// weekday: "short", +// month: "short", +// day: "numeric", +// year: "numeric", +// hour: "numeric", +// minute: "numeric", +// hour12: true, +// } +// )} +// +// +// +// +// +// +// +// +// +// +//
+//
+ +//
+//
+//
+// Showing {currentPage * itemPerPage - itemPerPage + 1} to{" "} +// {Math.min( +// currentPage * itemPerPage, +// productsData.length +// )}{" "} +// of {productsData.length} entries +//
+//
+ +//
+//
+//
    +//
  • +// setCurrentPage((prev) => prev - 1)} +// > +// Previous +// +//
  • + +// {!(currentPage - 1 < 1) && ( +//
  • +// +// setCurrentPage((prev) => prev - 1) +// } +// > +// {currentPage - 1} +// +//
  • +// )} + +//
  • +// +// {currentPage} +// +//
  • + +// {!( +// (currentPage + 1) * itemPerPage - itemPerPage > +// productsData.length - 1 +// ) && ( +//
  • +// { +// setCurrentPage((prev) => prev + 1); +// }} +// > +// {currentPage + 1} +// +//
  • +// )} + +//
  • +// productsData.length - 1 +// ) +// ? "paginate_button page-item next" +// : "paginate_button page-item next disabled" +// } +// > +// setCurrentPage((prev) => prev + 1)} +// > +// Next +// +//
  • +//
+//
+//
+//
+//
+//
+//
+//
+// +// +// +// ); +// }; + +// export default Products; + +import React, { useState, useEffect, useRef } from "react"; import { Link } from "react-router-dom"; +import axios from "axios"; import Button from "@material-ui/core/Button"; import { useNavigate } from "react-router-dom"; -import axios from "axios"; import { isAutheticated } from "src/auth"; import swal from "sweetalert"; -import { - Box, - FormControl, - IconButton, - InputLabel, - MenuItem, - Select, - TextField, -} from "@mui/material"; -import SearchIcon from "@mui/icons-material/Search"; -import Fuse from "fuse.js"; -import { Typography } from "@material-ui/core"; const Products = () => { const token = isAutheticated(); - const [query, setQuery] = useState(""); const navigate = useNavigate(); - const [loading, setLoading] = useState(true); + const [loading, setLoading] = useState(false); const [success, setSuccess] = useState(true); const [productsData, setProductsData] = useState([]); - const [filterData, setFilterData] = useState([]); - const [queryData, setQueryData] = useState([]); + const [categories, setCategories] = useState([]); + + const nameRef = useRef(); + const categoryRef = useRef(); const [currentPage, setCurrentPage] = useState(1); const [itemPerPage, setItemPerPage] = useState(10); - const [showData, setShowData] = useState(productsData); - - const handleShowEntries = (e) => { - setCurrentPage(1); - setItemPerPage(e.target.value); - }; - + const [totalData, setTotalData] = useState(0); + // const { + // edit, + // add, + // delete: deletepermission, + // } = checkPermission("Product Master"); const getProductsData = async () => { + setLoading(true); + axios - .get(`/api/product/getAll/`, { + .get(`/api/product/getAll/admin/`, { headers: { Authorization: `Bearer ${token}`, }, + params: { + page: currentPage, + show: itemPerPage, + name: nameRef.current.value, + category: categoryRef.current.value, + }, }) .then((res) => { + console.log("res.data?.data", res.data?.product); setProductsData(res.data?.product); + setTotalData(res.data?.total_data); setLoading(false); }) - .catch((error) => { - const msg = error?.response?.data?.message || "Something went wrong!"; - + .catch((err) => { + const msg = err?.response?.data?.message || "Something went wrong!"; swal({ - title: error, + title: err, text: msg, icon: "error", button: "Retry", @@ -59,20 +784,30 @@ const Products = () => { }); setLoading(false); }); + + setLoading(false); + }; + + const getCatagories = () => { + axios + .get(`/api/category/getCategories`, { + headers: { + "Access-Control-Allow-Origin": "*", + Authorization: `Bearer ${token}`, + }, + }) + .then((res) => { + setCategories(res?.data?.categories); + }); }; useEffect(() => { - getProductsData(); - }, [success]); + getCatagories(); + }, []); useEffect(() => { - const loadData = () => { - const indexOfLastPost = currentPage * itemPerPage; - const indexOfFirstPost = indexOfLastPost - itemPerPage; - setShowData(productsData.slice(indexOfFirstPost, indexOfLastPost)); - }; - loadData(); - }, [currentPage, itemPerPage, productsData]); + getProductsData(); + }, [success, itemPerPage, currentPage]); const handleDelete = (id) => { swal({ @@ -101,11 +836,9 @@ const Products = () => { setSuccess((prev) => !prev); }) .catch((err) => { - const msg = err?.response?.data?.message || "Something went wrong!"; - swal({ title: "Warning", - text: msg, + text: "Something went wrong!", icon: "error", button: "Retry", dangerMode: true, @@ -114,57 +847,44 @@ const Products = () => { } }); }; - const [filterCategory, setFilterCategory] = useState(""); - - const handleSearchClick = (query) => { - const option = { - isCaseSensitive: true, - includeScore: false, - shouldSort: true, - includeMatches: false, - findAllMatches: false, - minMatchCharLength: 1, - location: 0, - threshold: 0.6, - distance: 100, - useExtendedSearch: true, - ignoreLocation: false, - ignoreFieldNorm: false, - fieldNormWeight: 1, - keys: ["name"], - }; - - const fuse = new Fuse(productsData, option); - const result = fuse.search(query); - - const searchedResult = result.map((result) => result.item); - console.log(searchedResult); - setQueryData(searchedResult); - }; - useEffect(() => { - if (query !== "") { - setFilterCategory(""); - } - setTimeout(() => handleSearchClick(query), 100); - }, [query]); - const uniqueCategoryNames = [ - ...new Set(showData?.map((product) => product?.category?.categoryName)), - ]; - useEffect(() => { - setTimeout(() => { - if (filterCategory !== "") { - const filteredProducts = productsData.filter( - (product) => product.category?.categoryName === filterCategory - ); - - setFilterData(filteredProducts); - } else { - // If no category is selected, show all products - setShowData(productsData); - // setFilterData(filteredProducts); + const handleStatus = (id) => { + swal({ + title: "Are you sure?", + icon: "warning", + buttons: { + Yes: { text: "Yes", value: true }, + Cancel: { text: "Cancel", value: "cancel" }, + }, + }).then((value) => { + if (value === true) { + axios + .patch(`/api/product/admin/status/${id}`, { + headers: { + "Access-Control-Allow-Origin": "*", + Authorization: `Bearer ${token}`, + }, + }) + .then((res) => { + swal({ + title: "Chenged", + text: "Product status changed successfully!", + icon: "success", + button: "ok", + }); + setSuccess((prev) => !prev); + }) + .catch((err) => { + swal({ + title: "Warning", + text: "Something went wrong!", + icon: "error", + button: "Retry", + dangerMode: true, + }); + }); } - }, 100); - }, [filterCategory, productsData]); + }); + }; return (
@@ -182,7 +902,6 @@ const Products = () => {
Products
-
+
@@ -337,21 +993,22 @@ const Products = () => { style={{ border: "1px solid" }} > Image Product Category - Price + Status + Added On Actions - {!loading && showData.length === 0 && ( + {!loading && productsData?.length === 0 && (
No Data Available
@@ -364,21 +1021,30 @@ const Products = () => { Loading... - ) : query === "" && filterCategory == "" ? ( - showData.map((product, i) => { + ) : ( + productsData?.map((product, i) => { return ( - {product.image && - product.image.map((i, j) => ( + {product?.image && + product?.image?.length !== 0 ? ( + <> - ))} + + ) : ( +
+

No

+

image

+

uploaded!

+
+ )} {product.name} @@ -393,208 +1059,21 @@ const Products = () => { : product?.variants[0]?.price} - {new Date(product.createdAt).toLocaleString( - "en-IN", - { - weekday: "short", - month: "short", - day: "numeric", - year: "numeric", - hour: "numeric", - minute: "numeric", - hour12: true, - } - )} - - - - - - - - - + - + {product?.product_Status} + - - ); - }) - ) : query !== "" ? ( - queryData.map((product, i) => { - return ( - - - {product.image && - product.image.map((i, j) => ( - - ))} - - {product.name} - - {product.category !== "" - ? product.category?.categoryName - : "Category Not selected "} - - ₹{product.price} - - {new Date(product.createdAt).toLocaleString( - "en-IN", - { - weekday: "short", - month: "short", - day: "numeric", - year: "numeric", - hour: "numeric", - minute: "numeric", - hour12: true, - } - )} - - - - - - - - - - - - - - ); - }) - ) : ( - query == "" && - filterData.map((product, i) => { - return ( - - - {product.image && - product.image.map((i, j) => ( - - ))} - - {product.name} - - {product.category?.categoryName} - - ₹{product.price} {new Date(product.createdAt).toLocaleString( "en-IN", @@ -609,7 +1088,23 @@ const Products = () => { } )} + + {/* + + */} + + { aria-live="polite" > Showing {currentPage * itemPerPage - itemPerPage + 1} to{" "} - {Math.min( - currentPage * itemPerPage, - productsData.length - )}{" "} - of {productsData.length} entries + {Math.min(currentPage * itemPerPage, totalData)} of{" "} + {totalData} entries
@@ -710,6 +1204,7 @@ const Products = () => { className="page-link" style={{ cursor: "pointer" }} onClick={() => setCurrentPage((prev) => prev - 1)} + disabled={loading} > Previous @@ -723,6 +1218,7 @@ const Products = () => { onClick={(e) => setCurrentPage((prev) => prev - 1) } + disabled={loading} > {currentPage - 1} @@ -740,7 +1236,7 @@ const Products = () => { {!( (currentPage + 1) * itemPerPage - itemPerPage > - productsData.length - 1 + totalData - 1 ) && (
  • { onClick={() => { setCurrentPage((prev) => prev + 1); }} + disabled={loading} > {currentPage + 1} @@ -759,7 +1256,7 @@ const Products = () => { className={ !( (currentPage + 1) * itemPerPage - itemPerPage > - productsData.length - 1 + totalData - 1 ) ? "paginate_button page-item next" : "paginate_button page-item next disabled" @@ -769,6 +1266,7 @@ const Products = () => { className="page-link" style={{ cursor: "pointer" }} onClick={() => setCurrentPage((prev) => prev + 1)} + disabled={loading} > Next diff --git a/src/views/orders/ViewOrders.js b/src/views/orders/ViewOrders.js index 81a6f8a..345ceca 100644 --- a/src/views/orders/ViewOrders.js +++ b/src/views/orders/ViewOrders.js @@ -523,8 +523,7 @@ function ViewOrders() {

    Subtotal: ₹ - {productDetails?.quantity * - productDetails?.total_Amount} + {productDetails?.product_Subtotal}

    From 63aecdaaa3e6522b20434fb6b96dae47e19ce06e Mon Sep 17 00:00:00 2001 From: pawan-dot <71133473+pawan-dot@users.noreply.github.com> Date: Fri, 26 Apr 2024 15:38:06 +0530 Subject: [PATCH 3/4] change product and razorpay --- src/index.js | 2 +- src/views/Products/Products.js | 82 ++++++++++++++++++++++++++++++++-- 2 files changed, 80 insertions(+), 4 deletions(-) diff --git a/src/index.js b/src/index.js index 3e4516a..466639c 100644 --- a/src/index.js +++ b/src/index.js @@ -14,7 +14,7 @@ import { cibGmail } from "@coreui/icons"; import { createRoot } from "react-dom/client"; const setupAxios = () => { - // axios.defaults.baseURL = "http://localhost:5000"; + //axios.defaults.baseURL = "http://localhost:5000"; axios.defaults.baseURL = "https://api.smellika.com"; axios.defaults.headers = { diff --git a/src/views/Products/Products.js b/src/views/Products/Products.js index 4cb6d68..c11f724 100644 --- a/src/views/Products/Products.js +++ b/src/views/Products/Products.js @@ -743,6 +743,7 @@ const Products = () => { const nameRef = useRef(); const categoryRef = useRef(); + const FeatureProductRef = useRef(); const [currentPage, setCurrentPage] = useState(1); const [itemPerPage, setItemPerPage] = useState(10); @@ -765,6 +766,7 @@ const Products = () => { show: itemPerPage, name: nameRef.current.value, category: categoryRef.current.value, + FeatureProduct: FeatureProductRef.current.value, }, }) .then((res) => { @@ -836,9 +838,12 @@ const Products = () => { setSuccess((prev) => !prev); }) .catch((err) => { + let msg = err?.response?.data?.message + ? err?.response?.data?.message + : "Something went wrong!"; swal({ title: "Warning", - text: "Something went wrong!", + text: msg, icon: "error", button: "Retry", dangerMode: true, @@ -847,6 +852,47 @@ const Products = () => { } }); }; + const handleFeaturedProduct = (id) => { + swal({ + title: "Are you sure?", + icon: "warning", + buttons: { + Yes: { text: "Yes", value: true }, + Cancel: { text: "Cancel", value: "cancel" }, + }, + }).then((value) => { + if (value === true) { + axios + .patch(`/api/product/admin/feature_product/status/${id}`, { + headers: { + "Access-Control-Allow-Origin": "*", + Authorization: `Bearer ${token}`, + }, + }) + .then((res) => { + swal({ + title: "Changed", + text: " Feature Product status changed successfully!", + icon: "success", + button: "ok", + }); + setSuccess((prev) => !prev); + }) + .catch((err) => { + let msg = err?.response?.data?.msg + ? err?.response?.data?.msg + : "Something went wrong!"; + swal({ + title: "Warning", + text: msg, + icon: "warning", + button: "ok", + dangerMode: true, + }); + }); + } + }); + }; const handleStatus = (id) => { swal({ title: "Are you sure?", @@ -866,7 +912,7 @@ const Products = () => { }) .then((res) => { swal({ - title: "Chenged", + title: "Changed", text: "Product status changed successfully!", icon: "success", button: "ok", @@ -973,6 +1019,18 @@ const Products = () => { ))}
    +
    + + +
    + ₹ {product?.total_amount @@ -1088,7 +1165,6 @@ const Products = () => { } )} - {/* + +
    + + + {/* setTitle(e.target.value)} + variant="outlined" + size="small" + fullWidth + /> */} + + {" "} + Email Confiramtion:{" "} + + +
    + + + setWelcomeMsg(e.target.value)} + /> +
    + App Name : Smellika +
    + + + + setSubject(e.target.value)} + /> +
    + +
    + + + setWelcomeMsgForDescription(e.target.value)} + /> + + +
    +
    + + ); +} diff --git a/src/views/EmployeeAccess/Employee.js b/src/views/EmployeeAccess/Employee.js new file mode 100644 index 0000000..c1b20b4 --- /dev/null +++ b/src/views/EmployeeAccess/Employee.js @@ -0,0 +1,479 @@ +import React, { useState, useEffect } from "react"; +import { Link } from "react-router-dom"; +import Button from "@material-ui/core/Button"; +import { useNavigate } from "react-router-dom"; +import axios from "axios"; +import { isAutheticated } from "src/auth"; +import swal from "sweetalert"; +import { + Box, + FormControl, + IconButton, + InputLabel, + MenuItem, + Select, + TextField, +} from "@mui/material"; +import SearchIcon from "@mui/icons-material/Search"; +import Fuse from "fuse.js"; +import { Typography } from "@material-ui/core"; +// import OrderDetails from "./orderDetails"; +const Employee = () => { + const token = isAutheticated(); + const [query, setQuery] = useState(""); + const navigate = useNavigate(); + const [loading, setLoading] = useState(true); + const [loading1, setLoading1] = useState(true); + const [success, setSuccess] = useState(true); + const [users, setUsers] = useState([]); + + const [currentPage, setCurrentPage] = useState(1); + const [itemPerPage, setItemPerPage] = useState(10); + const [showData, setShowData] = useState(users); + + const handleShowEntries = (e) => { + setCurrentPage(1); + setItemPerPage(e.target.value); + }; + + // const getUsers = async () => { + // axios + // .get(`/api/v1/admin/users`, { + // headers: { + // Authorization: `Bearer ${token}`, + // }, + // }) + // .then((res) => { + // setUsers(res.data.users); + // setLoading(false); + // }) + // .catch((error) => { + // swal({ + // title: error, + // text: "please login to access the resource or refresh the page ", + // icon: "error", + // button: "Retry", + // dangerMode: true, + // }); + // setLoading(false); + // }); + // }; + + // useEffect(() => { + // getUsers(); + // }, [success]); + // console.log(users); + + // useEffect(() => { + // const loadData = () => { + // const indexOfLastPost = currentPage * itemPerPage; + // const indexOfFirstPost = indexOfLastPost - itemPerPage; + // setShowData(users.slice(indexOfFirstPost, indexOfLastPost)); + // }; + // loadData(); + // }, [currentPage, itemPerPage, users]); + // console.log(users); + + // const handleDelete = (id) => { + // swal({ + // title: "Are you sure?", + // icon: "error", + // buttons: { + // Yes: { text: "Yes", value: true }, + // Cancel: { text: "Cancel", value: "cancel" }, + // }, + // }).then((value) => { + // if (value === true) { + // axios + // .delete(`/api/user-address/deleteAddress/${id}`, { + // headers: { + // "Access-Control-Allow-Origin": "*", + // Authorization: `Bearer ${token}`, + // }, + // }) + // .then((res) => { + // swal({ + // title: "Deleted", + // text: "Address Deleted successfully!", + // icon: "success", + // button: "ok", + // }); + // setSuccess((prev) => !prev); + // }) + // .catch((err) => { + // swal({ + // title: "Warning", + // text: "Something went wrong!", + // icon: "error", + // button: "Retry", + // dangerMode: true, + // }); + // }); + // } + // }); + // }; + + return ( +
    +
    +
    +
    +
    +
    +
    + All Employees +
    + +
    + +
    +
    +
    +
    + +
    +
    +
    +
    +
    +
    +
    + +
    +
    +
    + +
    + + + + + + + + + + + + + {!loading && showData.length === 0 && ( + + + + )} + {!loading ? ( + + + + ) : ( + // showData.map((user, i) => { + // return ( + // + // + // + + // + // {loading1 && ( + // <> + // + // + // + // )} + + // + + // + // + // ); + // }) + + + + {/* */} + + + {/* + */} + + + )} + +
    Employee NameEmailAccess to Action
    +
    No Data Available
    +
    + Loading... +
    {user.name}{user._id} + // {new Date(user.createdAt).toLocaleString( + // "en-IN", + // { + // weekday: "short", + // month: "short", + // day: "numeric", + // year: "numeric", + // hour: "numeric", + // minute: "numeric", + // hour12: true, + // } + // )} + // loading...loading... + // {/* + // + // + // + // + // + // + // + // */} + // + // + // + //
    Roshan Gargroshan@gmail.comProfile ImagedashboardLast PurchaseOrders + + +
    +
    + +
    +
    +
    + Showing {currentPage * itemPerPage - itemPerPage + 1} to{" "} + {Math.min(currentPage * itemPerPage, users.length)} of{" "} + {users.length} entries +
    +
    + +
    +
    +
      +
    • + setCurrentPage((prev) => prev - 1)} + > + Previous + +
    • + + {!(currentPage - 1 < 1) && ( +
    • + + setCurrentPage((prev) => prev - 1) + } + > + {currentPage - 1} + +
    • + )} + +
    • + + {currentPage} + +
    • + + {!( + (currentPage + 1) * itemPerPage - itemPerPage > + users.length - 1 + ) && ( +
    • + { + setCurrentPage((prev) => prev + 1); + }} + > + {currentPage + 1} + +
    • + )} + +
    • + users.length - 1 + ) + ? "paginate_button page-item next" + : "paginate_button page-item next disabled" + } + > + setCurrentPage((prev) => prev + 1)} + > + Next + +
    • +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    + ); +}; + +export default Employee; diff --git a/src/views/EmployeeAccess/addEmployee.js b/src/views/EmployeeAccess/addEmployee.js new file mode 100644 index 0000000..b0efd0d --- /dev/null +++ b/src/views/EmployeeAccess/addEmployee.js @@ -0,0 +1,123 @@ +import { Box, Button, Typography } from "@mui/material"; +import React, { useState } from "react"; +import FormGroup from "@mui/material/FormGroup"; +import FormControlLabel from "@mui/material/FormControlLabel"; +import Checkbox from "@mui/material/Checkbox"; +import { useNavigate } from "react-router-dom"; +import _nav from "src/_nav"; + +const AddEmployee = () => { + const [employeeName, setEmployeeName] = useState(""); + const [email, setEmail] = useState(""); + const navigate = useNavigate(); + const [checkedItems, setCheckedItems] = useState({}); + const filteredNav = _nav.filter((item) => item.name !== "Employee"); + const handleCheckboxChange = (name) => (event) => { + setCheckedItems({ + ...checkedItems, + [name]: event.target.checked, + }); + }; + console.log(checkedItems); + + return ( +
    + + {/* setTitle(e.target.value)} + variant="outlined" + size="small" + fullWidth + /> */} + + {" "} + Add Employee:{" "} + + +
    + + + setEmployeeName(e.target.value)} + /> +
    + +
    + + + setEmail(e.target.value)} + /> +
    + + +
    + {filteredNav.map((item, index) => ( +
    + + {item.name} +
    + ))} +
    +
    +
    + + +
    +
    +
    + ); +}; + +export default AddEmployee;