-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintcache
1 lines (1 loc) · 36.5 KB
/
.eslintcache
1
[{"E:\\project\\flipkart-clone\\admin-app\\src\\index.js":"1","E:\\project\\flipkart-clone\\admin-app\\src\\App.js":"2","E:\\project\\flipkart-clone\\admin-app\\src\\reportWebVitals.js":"3","E:\\project\\flipkart-clone\\admin-app\\src\\Containers\\Home\\index.js":"4","E:\\project\\flipkart-clone\\admin-app\\src\\Containers\\Signin\\index.js":"5","E:\\project\\flipkart-clone\\admin-app\\src\\Containers\\Signup\\index.js":"6","E:\\project\\flipkart-clone\\admin-app\\src\\Components\\Layout\\index.js":"7","E:\\project\\flipkart-clone\\admin-app\\src\\Components\\Header\\index.js":"8","E:\\project\\flipkart-clone\\admin-app\\src\\Components\\UI\\Input\\index.js":"9","E:\\project\\flipkart-clone\\admin-app\\src\\store\\index.js":"10","E:\\project\\flipkart-clone\\admin-app\\src\\reducers\\index.js":"11","E:\\project\\flipkart-clone\\admin-app\\src\\actions\\index.js":"12","E:\\project\\flipkart-clone\\admin-app\\src\\actions\\auth.actions.js":"13","E:\\project\\flipkart-clone\\admin-app\\src\\actions\\constants.js":"14","E:\\project\\flipkart-clone\\admin-app\\src\\reducers\\auth.reducers.js":"15","E:\\project\\flipkart-clone\\admin-app\\src\\helpers\\axios.js":"16","E:\\project\\flipkart-clone\\admin-app\\src\\urlConfig.js":"17","E:\\project\\flipkart-clone\\admin-app\\src\\Components\\HOC\\privateRoute.js":"18","E:\\project\\flipkart-clone\\admin-app\\src\\actions\\user.actions.js":"19","E:\\project\\flipkart-clone\\admin-app\\src\\reducers\\user.reducers.js":"20","E:\\project\\flipkart-clone\\admin-app\\src\\Containers\\Products\\index.js":"21","E:\\project\\flipkart-clone\\admin-app\\src\\Containers\\Orders\\index.js":"22","E:\\project\\flipkart-clone\\admin-app\\src\\actions\\orders.actions.js":"23","E:\\project\\flipkart-clone\\admin-app\\src\\actions\\category.actions.js":"24","E:\\project\\flipkart-clone\\admin-app\\src\\actions\\product.actions.js":"25","E:\\project\\flipkart-clone\\admin-app\\src\\reducers\\category.reducers.js":"26","E:\\project\\flipkart-clone\\admin-app\\src\\reducers\\product.reducers.js":"27","E:\\project\\flipkart-clone\\admin-app\\src\\reducers\\orders.reducers.js":"28","E:\\project\\flipkart-clone\\admin-app\\src\\Containers\\Category\\index.js":"29","E:\\project\\flipkart-clone\\admin-app\\src\\Components\\UI\\Modal\\index.js":"30","E:\\project\\flipkart-clone\\admin-app\\src\\actions\\initialData.actions.js":"31"},{"size":736,"mtime":1609479606895,"results":"32","hashOfConfig":"33"},{"size":1223,"mtime":1609839404510,"results":"34","hashOfConfig":"33"},{"size":362,"mtime":499162500000,"results":"35","hashOfConfig":"33"},{"size":259,"mtime":1609772973935,"results":"36","hashOfConfig":"33"},{"size":2132,"mtime":1609497595115,"results":"37","hashOfConfig":"33"},{"size":3841,"mtime":1609499456882,"results":"38","hashOfConfig":"33"},{"size":1287,"mtime":1609772879387,"results":"39","hashOfConfig":"33"},{"size":1791,"mtime":1609772670160,"results":"40","hashOfConfig":"33"},{"size":630,"mtime":1608798431762,"results":"41","hashOfConfig":"33"},{"size":219,"mtime":1609153433516,"results":"42","hashOfConfig":"33"},{"size":493,"mtime":1609575474906,"results":"43","hashOfConfig":"33"},{"size":206,"mtime":1609839350907,"results":"44","hashOfConfig":"33"},{"size":2072,"mtime":1609558529126,"results":"45","hashOfConfig":"33"},{"size":1435,"mtime":1609944252564,"results":"46","hashOfConfig":"33"},{"size":1413,"mtime":1609510662512,"results":"47","hashOfConfig":"33"},{"size":290,"mtime":1609511754887,"results":"48","hashOfConfig":"33"},{"size":154,"mtime":1609909629975,"results":"49","hashOfConfig":"33"},{"size":445,"mtime":1609475892395,"results":"50","hashOfConfig":"33"},{"size":832,"mtime":1609496953172,"results":"51","hashOfConfig":"33"},{"size":894,"mtime":1609502426032,"results":"52","hashOfConfig":"33"},{"size":8877,"mtime":1609920646492,"results":"53","hashOfConfig":"33"},{"size":263,"mtime":1609558211956,"results":"54","hashOfConfig":"33"},{"size":0,"mtime":1609564659691,"results":"55","hashOfConfig":"33"},{"size":1355,"mtime":1609741153566,"results":"56","hashOfConfig":"33"},{"size":405,"mtime":1609944815549,"results":"57","hashOfConfig":"33"},{"size":2220,"mtime":1609772178377,"results":"58","hashOfConfig":"33"},{"size":397,"mtime":1609943913583,"results":"59","hashOfConfig":"33"},{"size":0,"mtime":1609564713774,"results":"60","hashOfConfig":"33"},{"size":4037,"mtime":1609834173062,"results":"61","hashOfConfig":"33"},{"size":664,"mtime":1609903159166,"results":"62","hashOfConfig":"33"},{"size":663,"mtime":1609855683887,"results":"63","hashOfConfig":"33"},{"filePath":"64","messages":"65","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"66"},"1q7o5aa",{"filePath":"67","messages":"68","errorCount":0,"warningCount":2,"fixableErrorCount":0,"fixableWarningCount":0,"source":"69","usedDeprecatedRules":"66"},{"filePath":"70","messages":"71","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"66"},{"filePath":"72","messages":"73","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"66"},{"filePath":"74","messages":"75","errorCount":0,"warningCount":3,"fixableErrorCount":0,"fixableWarningCount":0,"source":"76","usedDeprecatedRules":"66"},{"filePath":"77","messages":"78","errorCount":0,"warningCount":2,"fixableErrorCount":0,"fixableWarningCount":0,"source":"79","usedDeprecatedRules":"66"},{"filePath":"80","messages":"81","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"66"},{"filePath":"82","messages":"83","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"84"},{"filePath":"85","messages":"86","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"66"},{"filePath":"87","messages":"88","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"66"},{"filePath":"89","messages":"90","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"66"},{"filePath":"91","messages":"92","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"66"},{"filePath":"93","messages":"94","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"66"},{"filePath":"95","messages":"96","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"66"},{"filePath":"97","messages":"98","errorCount":0,"warningCount":2,"fixableErrorCount":0,"fixableWarningCount":0,"source":"99","usedDeprecatedRules":"66"},{"filePath":"100","messages":"101","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"66"},{"filePath":"102","messages":"103","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"66"},{"filePath":"104","messages":"105","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"66"},{"filePath":"106","messages":"107","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"66"},{"filePath":"108","messages":"109","errorCount":0,"warningCount":2,"fixableErrorCount":0,"fixableWarningCount":0,"source":"110","usedDeprecatedRules":"66"},{"filePath":"111","messages":"112","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"113","usedDeprecatedRules":"66"},{"filePath":"114","messages":"115","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"66"},{"filePath":"116","messages":"117","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"66"},{"filePath":"118","messages":"119","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"66"},{"filePath":"120","messages":"121","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"66"},{"filePath":"122","messages":"123","errorCount":0,"warningCount":4,"fixableErrorCount":0,"fixableWarningCount":0,"source":"124","usedDeprecatedRules":"66"},{"filePath":"125","messages":"126","errorCount":0,"warningCount":2,"fixableErrorCount":0,"fixableWarningCount":0,"source":"127","usedDeprecatedRules":"66"},{"filePath":"128","messages":"129","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"66"},{"filePath":"130","messages":"131","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"66"},{"filePath":"132","messages":"133","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"66"},{"filePath":"134","messages":"135","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"66"},"E:\\project\\flipkart-clone\\admin-app\\src\\index.js",[],["136","137"],"E:\\project\\flipkart-clone\\admin-app\\src\\App.js",["138","139"],"import { Route, Switch } from 'react-router-dom'\nimport Home from './Containers/Home'\nimport Signin from './Containers/Signin'\nimport Signup from './Containers/Signup'\nimport PrivateRoute from './Components/HOC/privateRoute'\nimport './App.css';\nimport { getAllCategory, getInitialData, isUserLoggedIn } from './actions'\nimport { useEffect } from 'react'\nimport { useDispatch, useSelector } from 'react-redux'\nimport Products from './Containers/Products'\nimport Orders from './Containers/Orders'\nimport Category from './Containers/Category'\n\nfunction App() {\n const auth = useSelector(state => state.auth)\n const dispatch = useDispatch()\n\n useEffect(() => {\n if (!auth.authenticate) {\n dispatch(isUserLoggedIn())\n }\n dispatch(getInitialData())\n\n }, [])\n return (\n <div className=\"App\">\n <Switch>\n <PrivateRoute path=\"/\" exact component={Home} />\n <PrivateRoute path=\"/category\" component={Category} />\n <PrivateRoute path=\"/products\" component={Products} />\n <PrivateRoute path=\"/orders\" component={Orders} />\n <Route path=\"/signin\" component={Signin} />\n <Route path=\"/signup\" component={Signup} />\n </Switch>\n </div>\n );\n}\n\nexport default App;\n","E:\\project\\flipkart-clone\\admin-app\\src\\reportWebVitals.js",[],"E:\\project\\flipkart-clone\\admin-app\\src\\Containers\\Home\\index.js",[],"E:\\project\\flipkart-clone\\admin-app\\src\\Containers\\Signin\\index.js",["140","141","142"],"import React, { useEffect, useState } from 'react'\r\nimport { Form, Button, Container, Row, Col } from 'react-bootstrap';\r\nimport Input from '../../Components/UI/Input'\r\nimport Layout from '../../Components/Layout'\r\nimport { login } from '../../actions'\r\nimport { useDispatch, useSelector } from 'react-redux';\r\nimport { Redirect } from 'react-router-dom';\r\n\r\n/**\r\n* @author\r\n* @function Signin\r\n**/\r\n\r\nconst Signin = (props) => {\r\n const auth = useSelector(state => state.auth)\r\n const [email, setEmail] = useState('')\r\n const [password, setPassword] = useState('')\r\n const [error, setError] = useState('')\r\n const dispatch = useDispatch()\r\n const userLogin = (e) => {\r\n e.preventDefault()\r\n const user = {\r\n email, password\r\n }\r\n dispatch(login(user))\r\n }\r\n if (auth.authenticate) {\r\n return <Redirect to={`/`} />\r\n }\r\n\r\n return (\r\n <Layout>\r\n <Container>\r\n <Row style={{ marginTop: \"50px\" }}>\r\n <Col md={{ span: 6, offset: 3 }}>\r\n <Form onSubmit={userLogin}>\r\n <Input\r\n label=\"Email\"\r\n placeholder=\"Enter Email\"\r\n type=\"email\"\r\n value={email}\r\n onChange={(e) => setEmail(e.target.value)}\r\n />\r\n <Input\r\n label=\"Password\"\r\n placeholder=\"Enter password\"\r\n type=\"password\"\r\n value={password}\r\n onChange={(e) => setPassword(e.target.value)}\r\n />\r\n\r\n <Button variant=\"primary\" type=\"submit\">\r\n Signin\r\n </Button>\r\n </Form>\r\n </Col>\r\n </Row>\r\n </Container>\r\n\r\n </Layout>\r\n )\r\n\r\n}\r\n\r\nexport default Signin","E:\\project\\flipkart-clone\\admin-app\\src\\Containers\\Signup\\index.js",["143","144"],"import React, { useState } from 'react'\r\nimport { Form, Button, Container, Row, Col } from 'react-bootstrap';\r\nimport { useDispatch, useSelector } from 'react-redux';\r\nimport { Redirect } from 'react-router-dom';\r\nimport { signup } from '../../actions';\r\n\r\nimport Layout from '../../Components/Layout'\r\nimport Input from '../../Components/UI/Input'\r\n\r\n/**\r\n* @author\r\n* @function Signup\r\n**/\r\n\r\nconst Signup = (props) => {\r\n const auth = useSelector(state => state.auth)\r\n const user = useSelector(state => state.user)\r\n\r\n const [firstName, setFirstName] = useState('')\r\n const [lastName, setLastname] = useState('')\r\n const [email, setEmail] = useState('')\r\n const [userName, setUserName] = useState('')\r\n const [password, setPassword] = useState('')\r\n const [error, setError] = useState('')\r\n\r\n const dispatch = useDispatch()\r\n\r\n const userSignUp = (e) => {\r\n e.preventDefault();\r\n const user = { firstName, lastName, email, userName, password }\r\n dispatch(signup(user))\r\n }\r\n\r\n if (auth.authenticate) {\r\n return <Redirect to={`/`} />\r\n }\r\n if (user.loading) {\r\n return <h1>Loading....</h1>\r\n }\r\n return (\r\n <Layout>\r\n <Container>\r\n <Row style={{ marginTop: \"50px\" }}>\r\n <Col md={{ span: 6, offset: 3 }}>\r\n <Form onSubmit={userSignUp}>\r\n <Row>\r\n <Col md={6}>\r\n <Input\r\n label=\"First Name\"\r\n placeholder=\"Enter First Name\"\r\n type=\"text\"\r\n value={firstName}\r\n onChange={(e) => setFirstName(e.target.value)}\r\n />\r\n </Col>\r\n <Col md={6}>\r\n <Input\r\n label=\"Last Name\"\r\n placeholder=\"Enter Last Name\"\r\n type=\"text\"\r\n value={lastName}\r\n onChange={(e) => setLastname(e.target.value)}\r\n />\r\n </Col>\r\n </Row>\r\n <Input\r\n label=\"Email\"\r\n placeholder=\"Enter Email \"\r\n type=\"email\"\r\n value={email}\r\n onChange={(e) => setEmail(e.target.value)}\r\n />\r\n <Input\r\n label=\"User Name\"\r\n placeholder=\"Enter Use Name \"\r\n type=\"text\"\r\n value={userName}\r\n onChange={(e) => setUserName(e.target.value)}\r\n />\r\n\r\n <Input\r\n label=\"Password\"\r\n placeholder=\"Enter Password\"\r\n type=\"password\"\r\n value={password}\r\n onChange={(e) => setPassword(e.target.value)}\r\n />\r\n <Button variant=\"primary\" type=\"submit\">\r\n Sign Up\r\n </Button>\r\n </Form>\r\n </Col>\r\n </Row>\r\n </Container>\r\n\r\n </Layout>\r\n )\r\n\r\n}\r\n\r\nexport default Signup","E:\\project\\flipkart-clone\\admin-app\\src\\Components\\Layout\\index.js",[],"E:\\project\\flipkart-clone\\admin-app\\src\\Components\\Header\\index.js",[],["145","146"],"E:\\project\\flipkart-clone\\admin-app\\src\\Components\\UI\\Input\\index.js",[],"E:\\project\\flipkart-clone\\admin-app\\src\\store\\index.js",[],"E:\\project\\flipkart-clone\\admin-app\\src\\reducers\\index.js",[],"E:\\project\\flipkart-clone\\admin-app\\src\\actions\\index.js",[],"E:\\project\\flipkart-clone\\admin-app\\src\\actions\\auth.actions.js",[],"E:\\project\\flipkart-clone\\admin-app\\src\\actions\\constants.js",[],"E:\\project\\flipkart-clone\\admin-app\\src\\reducers\\auth.reducers.js",["147","148"],"import { authConstants } from \"../actions/constants\";\r\n\r\nconst initState = {\r\n token: null,\r\n user: {\r\n firstName: '',\r\n lastName: '',\r\n email: '',\r\n picture: ''\r\n },\r\n authenticate: false,\r\n authenticating: false,\r\n loading: false,\r\n error: null,\r\n message: ''\r\n}\r\nexport default (state = initState, action) => {\r\n console.log(action)\r\n switch (action.type) {\r\n case authConstants.LOGIN_REQUEST:\r\n state = {\r\n ...state,\r\n authenticating: true\r\n }\r\n\r\n break;\r\n case authConstants.LOGIN_SUCCESS:\r\n state = {\r\n ...state,\r\n user: action.payload.user,\r\n token: action.payload.token,\r\n authenticating: false,\r\n authenticate: true\r\n }\r\n break;\r\n case authConstants.LOGOUT_REQUEST:\r\n state = {\r\n ...state,\r\n loading: true\r\n }\r\n break;\r\n case authConstants.LOGOUT_SUCCESS:\r\n state = {\r\n ...initState\r\n }\r\n break;\r\n case authConstants.LOGOUT_FAILURE:\r\n state = {\r\n ...initState,\r\n error: action.payload.error,\r\n loading: false\r\n }\r\n break;\r\n\r\n }\r\n return state\r\n}","E:\\project\\flipkart-clone\\admin-app\\src\\helpers\\axios.js",[],"E:\\project\\flipkart-clone\\admin-app\\src\\urlConfig.js",[],"E:\\project\\flipkart-clone\\admin-app\\src\\Components\\HOC\\privateRoute.js",[],"E:\\project\\flipkart-clone\\admin-app\\src\\actions\\user.actions.js",[],"E:\\project\\flipkart-clone\\admin-app\\src\\reducers\\user.reducers.js",["149","150"],"import { userConstant } from \"../actions/constants\";\r\n\r\nconst initState = {\r\n user: {\r\n error: null,\r\n message: '',\r\n loading: false\r\n }\r\n}\r\nexport default (state = initState, action) => {\r\n console.log(action)\r\n switch (action.type) {\r\n case userConstant.USER_REGISTER_REQUEST:\r\n state = {\r\n ...state,\r\n loading: true\r\n }\r\n break;\r\n case userConstant.USER_REGISTER_SUCCESS:\r\n state = {\r\n ...state,\r\n loading: false,\r\n message: action.payload.message\r\n }\r\n break;\r\n case userConstant.USER_REGISTER_FAILURE:\r\n state = {\r\n ...state,\r\n loading: false,\r\n error: action.payload.error\r\n }\r\n break;\r\n\r\n }\r\n return state\r\n}","E:\\project\\flipkart-clone\\admin-app\\src\\Containers\\Products\\index.js",["151"],"import React, { useState } from 'react'\r\nimport Layout from '../../Components/Layout'\r\nimport { Col, Container, Row, Button, Table } from 'react-bootstrap'\r\nimport Input from '../../Components/UI/Input'\r\nimport { useDispatch, useSelector } from 'react-redux'\r\nimport { addProduct } from '../../actions'\r\nimport Modal from '../../Components/UI/Modal'\r\nimport './style.css';\r\nimport { generatePublicUrl } from '../../urlConfig'\r\n\r\n\r\n/**\r\n* @author\r\n* @function Products\r\n**/\r\n\r\nconst Products = (props) => {\r\n const [show, setShow] = useState(false);\r\n const [productDetailModal, setProductDetailModal] = useState(false)\r\n const [productDetails, setProductDetails] = useState(null)\r\n const [name, setName] = useState('');\r\n const [price, setPrice] = useState('');\r\n const [description, setDescription] = useState('');\r\n const [quantity, setQuantity] = useState('');\r\n const [productPictures, setProductPictures] = useState('');\r\n const [categoryId, setCategoryId] = useState([]);\r\n const dispatch = useDispatch();\r\n const category = useSelector(state => state.category)\r\n const product = useSelector(state => state.product)\r\n const handleClose = () => {\r\n const form = new FormData()\r\n form.append('name', name);\r\n form.append('price', price);\r\n form.append('description', description);\r\n form.append('quantity', quantity);\r\n form.append('category', categoryId);\r\n for (let pic of productPictures) {\r\n form.append('productPicture', pic)\r\n }\r\n dispatch(addProduct(form))\r\n\r\n setShow(false);\r\n }\r\n const handleShow = () => setShow(true);\r\n const createCategoryList = (categories, options = []) => {\r\n for (let category of categories) {\r\n options.push({ value: category._id, name: category.name });\r\n if (category.children.length > 0) {\r\n createCategoryList(category.children, options)\r\n }\r\n }\r\n return options\r\n }\r\n const handleProductImage = (e) => {\r\n\r\n setProductPictures([\r\n ...productPictures,\r\n e.target.files[0]\r\n ])\r\n }\r\n const renderProduct = () => {\r\n return (\r\n <Table style={{ fontSize: '12px' }} responsive=\"sm\">\r\n <thead>\r\n <tr>\r\n <th>SN</th>\r\n <th>Name</th>\r\n <th>Price</th>\r\n <th>Quantity</th>\r\n <th>Category</th>\r\n </tr>\r\n </thead>\r\n <tbody>\r\n {\r\n product.products.length > 0 ?\r\n product.products.map(product =>\r\n <tr onClick={() => showProductDetailModal(product)} key={product._id}>\r\n <td>1</td>\r\n <td>{product.name}</td>\r\n <td>{product.price}</td>\r\n <td>{product.quantity}</td>\r\n <td>{product.category.name}</td>\r\n </tr>\r\n ) : null\r\n }\r\n\r\n </tbody>\r\n </Table>\r\n )\r\n }\r\n const renderAddProductModel = () => {\r\n return (\r\n <Modal\r\n show={show}\r\n handleClose={handleClose}\r\n modalTitle={`Add New product`}\r\n >\r\n <Input\r\n label=\"Name\"\r\n placeholder=\"Product Name\"\r\n type=\"text\"\r\n value={name}\r\n onChange={(e) => setName(e.target.value)}\r\n />\r\n <Input\r\n label=\"Price\"\r\n placeholder=\"Enter price\"\r\n type=\"text\"\r\n value={price}\r\n onChange={(e) => setPrice(e.target.value)}\r\n />\r\n <Input\r\n label=\"Quantity\"\r\n placeholder=\"Enter Quantity\"\r\n type=\"text\"\r\n value={quantity}\r\n onChange={(e) => setQuantity(e.target.value)}\r\n />\r\n <Input\r\n label=\"Description\"\r\n placeholder=\"Product Name\"\r\n type=\"text\"\r\n value={description}\r\n onChange={(e) => setDescription(e.target.value)}\r\n />\r\n <select\r\n className=\"form-control\"\r\n value={categoryId}\r\n onChange={(e) => setCategoryId(e.target.value)}\r\n >\r\n <option> Select Category </option>\r\n {\r\n createCategoryList(category.categories).map(option =>\r\n <option key={option.value} value={option.value}>{option.name}</option>\r\n )\r\n }\r\n </select>\r\n {\r\n productPictures.length > 0 ?\r\n productPictures.map((pic, index) => <div key={index}>{pic.name}</div>) : null\r\n }\r\n <Input\r\n type=\"file\"\r\n name=\"productPictures\"\r\n onChange={handleProductImage}\r\n />\r\n </Modal>\r\n\r\n )\r\n }\r\n const handleCloseProductDetailModal = () => {\r\n setProductDetailModal(false)\r\n\r\n }\r\n const showProductDetailModal = (product) => {\r\n setProductDetails(product)\r\n setProductDetailModal(true)\r\n console.log(product)\r\n }\r\n const renderProductDetailsModal = () => {\r\n if (!productDetails) {\r\n return null\r\n }\r\n return (\r\n <Modal\r\n show={productDetailModal}\r\n handleClose={handleCloseProductDetailModal}\r\n modalTitle={`Product Details`}\r\n size=\"lg\"\r\n >\r\n <Row>\r\n <Col md=\"6\">\r\n <label className='key'>Name</label>\r\n <p className='value'>{productDetails.name}</p>\r\n </Col>\r\n <Col md=\"6\">\r\n <label className='key'>Price</label>\r\n <p className='value'>{productDetails.price}</p>\r\n </Col>\r\n </Row>\r\n <Row>\r\n <Col md=\"6\">\r\n <label className='key'>Quantity</label>\r\n <p className='value'>{productDetails.quantity}</p>\r\n </Col>\r\n <Col md=\"6\">\r\n <label className='key'>Category</label>\r\n <p className='value'>{productDetails.category.name}</p>\r\n </Col>\r\n </Row>\r\n <Row>\r\n <Col md=\"12\">\r\n <label className='key'>Description</label>\r\n <p className='value'>{productDetails.description}</p>\r\n </Col>\r\n\r\n </Row>\r\n <Row>\r\n <Col>\r\n <label className='key'>Product Picture</label>\r\n <div style={{ display: 'flex' }}>\r\n {\r\n productDetails.productPictures.map(picture =>\r\n <div className='productImgContainer'>\r\n <img src={generatePublicUrl(picture.img)} />\r\n </div>\r\n )\r\n\r\n }\r\n </div>\r\n\r\n </Col>\r\n\r\n </Row>\r\n\r\n\r\n </Modal>\r\n )\r\n }\r\n return (\r\n <Layout sidebar>\r\n <Container>\r\n <Row>\r\n\r\n <Col md={12} >\r\n <div style={{ display: 'flex', justifyContent: 'space-between', marginTop: '5px' }}>\r\n <h3>Product</h3>\r\n <Button variant=\"outline-primary\" onClick={handleShow}>Add Product</Button>\r\n </div>\r\n </Col>\r\n\r\n </Row>\r\n <Row style={{ marginTop: '10px' }}>\r\n <Col>\r\n {\r\n renderProduct()\r\n }\r\n </Col>\r\n </Row>\r\n </Container>\r\n {renderAddProductModel()}\r\n {renderProductDetailsModal()}\r\n </Layout>\r\n )\r\n\r\n}\r\n\r\nexport default Products","E:\\project\\flipkart-clone\\admin-app\\src\\Containers\\Orders\\index.js",[],"E:\\project\\flipkart-clone\\admin-app\\src\\actions\\orders.actions.js",[],"E:\\project\\flipkart-clone\\admin-app\\src\\actions\\category.actions.js",[],"E:\\project\\flipkart-clone\\admin-app\\src\\actions\\product.actions.js",[],"E:\\project\\flipkart-clone\\admin-app\\src\\reducers\\category.reducers.js",["152","153","154","155"],"import { categoryConstant } from \"../actions/constants\"\r\n\r\nconst initState = {\r\n categories: [],\r\n loading: false,\r\n error: null\r\n}\r\nconst buildNewCategories = (parentId, categories, category) => {\r\n let myCategories = [];\r\n if (parentId == undefined) {\r\n return [\r\n ...categories,\r\n {\r\n _id: category._id,\r\n name: category.name,\r\n slug: category.slug,\r\n children: []\r\n }\r\n ]\r\n }\r\n for (let cat of categories) {\r\n if (cat._id == parentId)\r\n myCategories.push({\r\n ...cat,\r\n children: cat.children ? buildNewCategories(parentId, [...cat.children, {\r\n _id: category._id,\r\n name: category.name,\r\n slug: category.slug,\r\n parentId: category.parentId,\r\n children: category.children\r\n }], category) : []\r\n })\r\n else {\r\n myCategories.push({\r\n ...cat,\r\n children: cat.children ? buildNewCategories(parentId, cat.children, category) : []\r\n\r\n })\r\n }\r\n\r\n }\r\n return myCategories\r\n}\r\nexport default (state = initState, action) => {\r\n switch (action.type) {\r\n case categoryConstant.GET_ALL_CATEGORY_SUCCESS:\r\n state = {\r\n ...state,\r\n categories: action.payload.categories\r\n }\r\n break;\r\n case categoryConstant.ADD_NEW_CATEGORY_REQUEST:\r\n state = {\r\n ...state,\r\n loading: true\r\n }\r\n break;\r\n case categoryConstant.ADD_NEW_CATEGORY_SUCCESS:\r\n const category = action.payload.category;\r\n const updatedCategories = buildNewCategories(category.parentId, state.categories, category)\r\n state = {\r\n ...state,\r\n categories: updatedCategories,\r\n loading: false\r\n }\r\n break;\r\n case categoryConstant.ADD_NEW_CATEGORY_FAILURE:\r\n state = {\r\n ...initState\r\n }\r\n }\r\n return state;\r\n}","E:\\project\\flipkart-clone\\admin-app\\src\\reducers\\product.reducers.js",["156","157"],"import { productConstant } from \"../actions/constants\";\r\n\r\n\r\nconst initState = {\r\n products: []\r\n}\r\nexport default (state = initState, action) => {\r\n switch (action.type) {\r\n case productConstant.GET_ALL_PRODUCT_SUCCESS:\r\n state = {\r\n ...state,\r\n products: action.payload.products\r\n }\r\n break;\r\n }\r\n return state\r\n}","E:\\project\\flipkart-clone\\admin-app\\src\\reducers\\orders.reducers.js",[],"E:\\project\\flipkart-clone\\admin-app\\src\\Containers\\Category\\index.js",[],"E:\\project\\flipkart-clone\\admin-app\\src\\Components\\UI\\Modal\\index.js",[],"E:\\project\\flipkart-clone\\admin-app\\src\\actions\\initialData.actions.js",[],{"ruleId":"158","replacedBy":"159"},{"ruleId":"160","replacedBy":"161"},{"ruleId":"162","severity":1,"message":"163","line":7,"column":10,"nodeType":"164","messageId":"165","endLine":7,"endColumn":24},{"ruleId":"166","severity":1,"message":"167","line":24,"column":6,"nodeType":"168","endLine":24,"endColumn":8,"suggestions":"169"},{"ruleId":"162","severity":1,"message":"170","line":1,"column":17,"nodeType":"164","messageId":"165","endLine":1,"endColumn":26},{"ruleId":"162","severity":1,"message":"171","line":18,"column":12,"nodeType":"164","messageId":"165","endLine":18,"endColumn":17},{"ruleId":"162","severity":1,"message":"172","line":18,"column":19,"nodeType":"164","messageId":"165","endLine":18,"endColumn":27},{"ruleId":"162","severity":1,"message":"171","line":24,"column":12,"nodeType":"164","messageId":"165","endLine":24,"endColumn":17},{"ruleId":"162","severity":1,"message":"172","line":24,"column":19,"nodeType":"164","messageId":"165","endLine":24,"endColumn":27},{"ruleId":"158","replacedBy":"173"},{"ruleId":"160","replacedBy":"174"},{"ruleId":"175","severity":1,"message":"176","line":17,"column":1,"nodeType":"177","endLine":57,"endColumn":2},{"ruleId":"178","severity":1,"message":"179","line":19,"column":5,"nodeType":"180","messageId":"181","endLine":55,"endColumn":6},{"ruleId":"175","severity":1,"message":"176","line":10,"column":1,"nodeType":"177","endLine":36,"endColumn":2},{"ruleId":"178","severity":1,"message":"179","line":12,"column":5,"nodeType":"180","messageId":"181","endLine":34,"endColumn":6},{"ruleId":"182","severity":1,"message":"183","line":205,"column":41,"nodeType":"184","endLine":205,"endColumn":85},{"ruleId":"185","severity":1,"message":"186","line":10,"column":18,"nodeType":"187","messageId":"188","endLine":10,"endColumn":20},{"ruleId":"185","severity":1,"message":"186","line":22,"column":21,"nodeType":"187","messageId":"188","endLine":22,"endColumn":23},{"ruleId":"175","severity":1,"message":"176","line":44,"column":1,"nodeType":"177","endLine":73,"endColumn":2},{"ruleId":"178","severity":1,"message":"179","line":45,"column":5,"nodeType":"180","messageId":"181","endLine":71,"endColumn":6},{"ruleId":"175","severity":1,"message":"176","line":7,"column":1,"nodeType":"177","endLine":17,"endColumn":2},{"ruleId":"178","severity":1,"message":"179","line":8,"column":5,"nodeType":"180","messageId":"181","endLine":15,"endColumn":6},"no-native-reassign",["189"],"no-negated-in-lhs",["190"],"no-unused-vars","'getAllCategory' is defined but never used.","Identifier","unusedVar","react-hooks/exhaustive-deps","React Hook useEffect has missing dependencies: 'auth.authenticate' and 'dispatch'. Either include them or remove the dependency array.","ArrayExpression",["191"],"'useEffect' is defined but never used.","'error' is assigned a value but never used.","'setError' is assigned a value but never used.",["189"],["190"],"import/no-anonymous-default-export","Assign arrow function to a variable before exporting as module default","ExportDefaultDeclaration","default-case","Expected a default case.","SwitchStatement","missingDefaultCase","jsx-a11y/alt-text","img elements must have an alt prop, either with meaningful text, or an empty string for decorative images.","JSXOpeningElement","eqeqeq","Expected '===' and instead saw '=='.","BinaryExpression","unexpected","no-global-assign","no-unsafe-negation",{"desc":"192","fix":"193"},"Update the dependencies array to be: [auth.authenticate, dispatch]",{"range":"194","text":"195"},[766,768],"[auth.authenticate, dispatch]"]