diff --git a/client/build/asset-manifest.json b/client/build/asset-manifest.json
index 839f0ba..24cd91b 100644
--- a/client/build/asset-manifest.json
+++ b/client/build/asset-manifest.json
@@ -1,8 +1,8 @@
{
"files": {
"main.css": "/static/css/main.6de86a19.chunk.css",
- "main.js": "/static/js/main.2e815323.chunk.js",
- "main.js.map": "/static/js/main.2e815323.chunk.js.map",
+ "main.js": "/static/js/main.50d9a2a0.chunk.js",
+ "main.js.map": "/static/js/main.50d9a2a0.chunk.js.map",
"runtime-main.js": "/static/js/runtime-main.a06e69b5.js",
"runtime-main.js.map": "/static/js/runtime-main.a06e69b5.js.map",
"static/css/2.56001c6a.chunk.css": "/static/css/2.56001c6a.chunk.css",
@@ -27,6 +27,6 @@
"static/css/2.56001c6a.chunk.css",
"static/js/2.044ed35c.chunk.js",
"static/css/main.6de86a19.chunk.css",
- "static/js/main.2e815323.chunk.js"
+ "static/js/main.50d9a2a0.chunk.js"
]
}
\ No newline at end of file
diff --git a/client/build/index.html b/client/build/index.html
index 78475e9..94fc116 100644
--- a/client/build/index.html
+++ b/client/build/index.html
@@ -1 +1 @@
-
Plant Land
\ No newline at end of file
+Plant Land
\ No newline at end of file
diff --git a/client/build/static/js/main.2e815323.chunk.js.map b/client/build/static/js/main.2e815323.chunk.js.map
deleted file mode 100644
index ebc0e9d..0000000
--- a/client/build/static/js/main.2e815323.chunk.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["constants/blogConstant.js","constants/productConstants.js","redux/actions/blogActions.js","components/Ecommerce/Loader.js","components/Blog/BlogCard.js","components/Blog/BlogSeedData.js","components/Blog/Blog.js","components/Ecommerce/Message.js","components/Blog/BlogDetails.js","components/Ecommerce/ToastMessage.js","components/Blog/BlogCategory.js","components/Blog/NewBlog.js","components/Ecommerce/Footer.js","constants/userConstants.js","redux/actions/userActions.js","components/Ecommerce/Header.js","constants/cartConstants.js","redux/actions/cartActions.js","components/Ecommerce/Screen/CartScreen.js","components/Ecommerce/FormContainer.js","components/Ecommerce/Screen/ForgetPasswordScreen.js","redux/actions/productActions.js","components/Ecommerce/FilterCategory.js","components/Ecommerce/FilterSort.js","components/Ecommerce/Paginate.js","components/Ecommerce/Rating.js","components/Ecommerce/Product.js","components/Ecommerce/SearchBox.js","components/Ecommerce/Screen/HomeScreen.js","components/Ecommerce/GoogleAuth.js","components/Ecommerce/Screen/LoginScreen.js","constants/orderConstants.js","redux/actions/orderActions.js","components/Ecommerce/Sidebar.js","components/Ecommerce/Screen/OrderDataScreen.js","components/Ecommerce/Screen/OrderListScreen.js","components/Ecommerce/Screen/OrderScreen.js","components/Ecommerce/Screen/PasswordResetScreen.js","components/Ecommerce/CheckoutSteps.js","components/Ecommerce/Screen/PaymentScreen.js","components/Ecommerce/Screen/PlaceOrderScreen.js","components/Ecommerce/Screen/ProductEditScreen.js","components/Ecommerce/Screen/ProductListScreen.js","components/Ecommerce/Screen/ProductScreen.js","components/Ecommerce/Screen/ProfileScreen.js","components/Ecommerce/Screen/RegisterScreen.js","components/Ecommerce/Charts/BarChart.js","components/Ecommerce/Charts/LineChart.js","components/Ecommerce/Charts/MonthBarChart.js","components/Ecommerce/Charts/ProductSaleBarChart.js","components/Ecommerce/Charts/SalesPieChart.js","components/Ecommerce/CSVReportGeneration.js","components/Ecommerce/EcommSeedData.js","components/Ecommerce/SaleDataCategory.js","components/Ecommerce/Screen/SaleDataScreen.js","components/Ecommerce/Screen/ShippingScreen.js","components/Ecommerce/Screen/UserListScreen.js","components/PlantIdentify/PIDetailsModal.js","components/PlantIdentify/PlantIdentify.js","components/PlantSearch/PlantDetails.js","images/not.svg","images/sample-plant.jpg","components/PlantSearch/PlantSearchCard.js","components/PlantSearch/PlantSearch.js","images/blog.svg","images/diary.svg","images/online-community.svg","images/search.svg","images/server.svg","images/store.svg","components/LandingPage/FeatureCard.js","components/LandingPage/Feature.js","images/pngwing.com.png","components/LandingPage/HeroSection.js","components/LandingPage/Navbar.js","pages/LandingPage.js","pages/MainPage.js","App.js","store.js","redux/reducers/productReducers.js","redux/reducers/userReducers.js","redux/reducers/cartReducers.js","redux/reducers/orderReducers.js","redux/reducers/blogReducers.js","index.js"],"names":["BLOG_FETCH_REQUEST","BLOG_FETCH_SUCCESS","BLOG_FETCH_FAIL","BLOG_DETAILS_REQUEST","BLOG_DETAILS_SUCCESS","BLOG_DETAILS_FAIL","PRODUCT_LIST_REQUEST","PRODUCT_LIST_SUCCESS","PRODUCT_LIST_FAIL","PRODUCT_DETAILS_REQUEST","PRODUCT_DETAILS_SUCCESS","PRODUCT_DETAILS_FAIL","PRODUCT_CREATE_REVIEW_REQUEST","PRODUCT_CREATE_REVIEW_SUCCESS","PRODUCT_CREATE_REVIEW_FAIL","PRODUCT_CREATE_REVIEW_RESET","PRODUCT_DELETE_REQUEST","PRODUCT_DELETE_SUCCESS","PRODUCT_DELETE_FAIL","PRODUCT_CREATE_REQUEST","PRODUCT_CREATE_SUCCESS","PRODUCT_CREATE_FAIL","PRODUCT_CREATE_RESET","PRODUCT_UPDATE_REQUEST","PRODUCT_UPDATE_SUCCESS","PRODUCT_UPDATE_FAIL","PRODUCT_UPDATE_RESET","baseUrl","Loader","Spinner","animation","variant","role","style","width","height","margin","display","className","BlogCard","blog","history","useHistory","Card","minWidth","to","_id","Img","padding","src","image","Body","Title","title","tags","map","tag","index","Badge","Text","ReactHtmlParser","description","justifyContent","Button","onClick","id","push","aria-hidden","blogCategories","blogTags","Blog","dispatch","useDispatch","blogList","useSelector","state","loading","blogs","useEffect","a","type","axios","get","data","payload","console","log","response","message","Row","Col","md","xs","lg","xl","Message","children","Alert","defaultProps","BlogDetails","match","blogDetails","error","params","Container","alt","author","category","createdAt","Date","toDateString","toast","configure","toastSuccessMessage","success","autoClose","toastInfoMessage","info","toastErrorMessage","position","useState","React","label","BlogCategory","onCategorySelect","isOpen","setOpen","items","selectedItem","setSelectedItem","find","item","e","target","NewBlog","setTitle","setCategory","setTags","setImage","content","setContent","handleFileUpload","file","files","formData","FormData","append","config","headers","post","clearInputs","onSubmit","preventDefault","blogData","allTags","split","blogPost","getState","userInfo","userLogin","Authorization","token","err","htmlFor","name","onChange","placeholder","autoFocus","value","editor","ClassicEditor","ckfinder","uploadUrl","event","getData","Footer","USER_LOGIN_REQUEST","USER_LOGIN_SUCCESS","USER_LOGIN_FAIL","USER_LOGOUT","USER_REGISTER_REQUEST","USER_REGISTER_SUCCESS","USER_REGISTER_FAIL","USER_DETAILS_REQUEST","USER_DETAILS_SUCCESS","USER_DETAILS_FAIL","USER_PROFILE_UPDATE_REQUEST","USER_PROFILE_UPDATE_SUCCESS","USER_PROFILE_UPDATE_FAIL","USER_LIST_REQUEST","USER_LIST_SUCCESS","USER_LIST_FAIL","USER_LIST_RESET","USER_DELETE_REQUEST","USER_DELETE_SUCCESS","USER_DELETE_FAIL","googleLogin","localStorage","setItem","JSON","stringify","Header","Navbar","collapseOnSelect","expand","Brand","Toggle","aria-controls","Collapse","Nav","Link","NavDropdown","user","Item","href","removeItem","isAdmin","CART_ADD_ITEM","CART_REMOVE_ITEM","CART_SAVE_SHIPPING_ADDRESS","CART_SAVE_PAYMENT_METHOD","addToCart","qty","productId","price","countInStock","cart","cartItems","CartScreen","location","search","Number","removeFromCartHandler","removeFromCart","length","ListGroup","Image","fluid","rounded","fontSize","FormControl","as","Array","keys","p","reduce","acc","toFixed","disabled","FormContainer","ForgetPasswordScreen","email","setEmail","setError","handleSubmit","setTimeout","Form","Group","controlId","Label","Control","fetchProducts","keyword","pageNumber","sort","fetchProductById","FilterCategory","handleCategoryChange","DropdownButton","alignRight","onSelect","Dropdown","eventKey","handleSortChange","Paginate","page","numOfPages","Pagination","active","Rating","text","color","Product","product","rating","numReviews","SearchBox","setKeyword","trim","inline","HomeScreen","productCategory","setProductCategory","productSort","setProductSort","productList","products","toLowerCase","FilterSort","GoogleAuth","googleSuccess","res","profileObj","tokenId","clientId","render","renderProps","onSuccess","onFailure","cookiePolicy","LoginScreen","password","setPassword","redirect","login","ORDER_CREATE_REQUEST","ORDER_CREATE_SUCCESS","ORDER_CREATE_FAIL","ORDER_DETAILS_REQUEST","ORDER_DETAILS_SUCCESS","ORDER_DETAILS_FAIL","ORDER_MY_LIST_REQUEST","ORDER_MY_LIST_SUCCESS","ORDER_MY_LIST_FAIL","ORDER_LIST_REQUEST","ORDER_LIST_SUCCESS","ORDER_LIST_FAIL","ORDER_PAY_REQUEST","ORDER_PAY_SUCCESS","ORDER_PAY_FAIL","ORDER_PAY_RESET","ORDER_DELIVER_REQUEST","ORDER_DELIVER_SUCCESS","ORDER_DELIVER_FAIL","ORDER_DELIVER_RESET","ORDER_DATA_REQUEST","ORDER_DATA_SUCCESS","ORDER_DATA_FAIL","ORDER_SALE_DATA_REQUEST","ORDER_SALE_DATA_SUCCESS","ORDER_SALE_DATA_FAIL","Sidebar","marginTop","OrderDataScreen","order","orderData","totalOrder","totalPaidOrder","totalDelivered","sm","Table","striped","bordered","productSaleData","total","customerBuyData","customer","customer_name","customer_email","Math","ceil","OrderListScreen","orderList","orders","hover","substring","marginRight","totalPrice","isPaid","paidAt","isDelivered","deliverAt","OrderScreen","num","orderId","sdkReady","setSdkReady","orderDetails","orderPay","loadingPay","successPay","successDeliver","orderDeliver","itemsPrice","orderedItems","round","addPayPalScript","req","script","document","createElement","async","onload","body","appendChild","window","paypal","shippingAddress","address","city","thana","houseNumber","paymentMethod","shippingPrice","amount","paymentResult","put","payOrder","deliverOrder","confirmPassword","setConfirmPassword","clear","errorText","resetToken","CheckoutSteps","step1","step2","step3","step4","PaymentScreen","setPaymentMethod","Check","checked","PlaceOrderScreen","orderCreate","createOrder","orderItems","ProductEditScreen","setName","setDescription","setPrice","setCountInStock","uploading","setUploading","productDetails","productUpdate","loadingUpdate","errorUpdate","successUpdate","updateProduct","File","custom","ProductListScreen","productCreate","loadingCreate","errorCreate","successCreate","createdProduct","productDelete","loadingDelete","errorDelete","successDelete","handleDelete","confirm","delete","deleteProduct","handleCreateProduct","float","ProductScreen","setQty","setRating","comment","setComment","productReview","productCreateReview","reviewError","reviewSuccess","reviews","r","review","ProfileScreen","useLocation","userDetails","myOrderList","loadingOrders","errorOrders","updateUserProfile","RegisterScreen","userRegister","register","BarChart","saleByMonth","od","numOfOrder","labels","datasets","backgroundColor","borderColor","borderWidth","options","scales","yAxes","ticks","beginAtZero","LineChart","fill","pointRadius","monthSaleData","i","daysOfMonthLabel","colorArray","colorArrayBorder","ProductSaleBarChart","monthWiseQty","productName","SalesPieChart","pie_data","dataLabel","dataValues","pd","val","parseInt","bgColPalette","borderColPalette","background","border","CSVReportGeneration","csvReport","filename","key","textAlign","marginBottom","fontFamily","monthData","SaleDataCategory","SaleDataScreen","graphType","setGraphType","monthSale","setMonthSale","productSale","setProductSale","setSearch","reportData","setReportData","salesPieData","setSalesPieData","orderSaleData","onMonthSelect","selectedMonth","handleSearchSubmit","product_id","MonthBarChart","aria-label","el","month","saleData","date","product_name","product_price","product_qty","from","m","set","Map","ShippingScreen","setAddress","setCity","setThana","setHouseNumber","required","UserListScreen","userList","deleteSuccess","userDelete","users","deleteUser","PIDetailsModal","desc","synonyms","taxonomy","authority","common_names","show","setShow","handleClose","Modal","onHide","closeButton","cn","kingdom","phylum","class","family","genus","syn","PlantIdentify","setFile","imageUrl","setImageUrl","plantSuggestion","setPlantSuggestion","setLoading","getPlantInfo","plantSuggestions","covertNumber","n","toString","multiple","onDone","base64","plant","similar_images","url","plant_name","plant_details","scientific_name","structured_name","species","name_authority","wiki_description","probability","PlantDetails","plantData","setPlantData","plantSearchAPI","fetchPlant","attributes","binomial_name","taxon","sun_requirements","sowing_method","growing_degree_days","row_spacing","PlantSearchCard","d","cursor","main_image_path","includes","sample","PlantSearch","searchTerm","setSearchTerm","result","setResult","found","setFound","notFound","useStyles","makeStyles","root","borderTop","marginLeft","FeatureCard","classes","CardContent","Typography","gutterBottom","component","container","gridContainer","Feature","market","db","diary","forum","Grid","spacing","elevate","HeroSection","heroImg","NavBar","bg","fixed","LandingPage","MainPage","path","exact","PasswordResetScreen","App","reducer","combineReducers","action","userProfileUpdate","isItemExist","filter","DELIVERload","comments","cartItemsFromStorage","getItem","parse","userInfoFromStorage","initialState","middlewares","thunk","store","createStore","composeWithDevTools","applyMiddleware","ReactDOM","StrictMode","getElementById"],"mappings":"oZAAaA,EAAqB,qBACrBC,EAAqB,qBACrBC,EAAkB,kBAElBC,EAAuB,uBACvBC,EAAuB,uBACvBC,EAAoB,oBCNpBC,EAAuB,uBACvBC,EAAuB,uBACvBC,EAAoB,oBAEpBC,EAA0B,0BAC1BC,EAA0B,0BAC1BC,EAAuB,uBAEvBC,EAAgC,gCAChCC,EAAgC,gCAChCC,EAA6B,6BAC7BC,EAA8B,8BAE9BC,EAAyB,yBACzBC,EAAyB,yBACzBC,EAAsB,sBAEtBC,EAAyB,yBACzBC,EAAyB,yBACzBC,EAAsB,sBACtBC,EAAuB,uBAEvBC,EAAyB,yBACzBC,EAAyB,yBACzBC,EAAsB,sBACtBC,EAAuB,uBCrB9BC,EAAU,kC,yBCiBDC,MAlBf,WACI,OACI,cAACC,EAAA,EAAD,CACIC,UAAU,SACVC,QAAQ,UACRC,KAAK,SACLC,MAAO,CACHC,MAAO,QACPC,OAAQ,QACRC,OAAQ,OACRC,QAAQ,SARhB,SAWI,sBAAMC,UAAU,UAAhB,2B,mCCyBGC,OAnCf,YAA6B,IAATC,EAAQ,EAARA,KACVC,EAAUC,cAIhB,OACI,8BACI,eAACC,EAAA,EAAD,CAAMV,MAAO,CAAEC,MAAO,QAASU,SAAU,SAAzC,UACI,cAAC,OAAD,CAAMC,GAAE,gBAAWL,EAAKM,KAAxB,SACA,cAACH,EAAA,EAAKI,IAAN,CAAUd,MAAO,CAAEe,QAAS,SAASb,OAAO,SAAUJ,QAAQ,MAAMkB,IAAKT,EAAKU,UAG9E,eAACP,EAAA,EAAKQ,KAAN,WACI,cAACR,EAAA,EAAKS,MAAN,CAAYd,UAAU,kBAAtB,SAAyCE,EAAKa,QAC7Cb,EAAKc,KAAKC,KAAI,SAACC,EAAIC,GAAL,OACX,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CACnBxc,KAAM,CACJC,UAAWmc,GACXzR,gBAP+BxM,aAAake,QAAQ,mBACpDhe,KAAKie,MAAMne,aAAake,QAAQ,oBAChC,IAOFxgB,UAAW,CAAED,SAAU2gB,KAGnBE,GAAc,CAACC,MAQNC,GANDC,uBACZhB,GACAY,GACAK,+BAAoBC,mBAAe,WAAf,EAAmBL,M,OM5DzCM,IAAShY,OACP,mCACE,eAAC,IAAMiY,WAAP,WACE,cAAC,IAAD,CAAUL,MAAOA,GAAjB,SACE,cAAC,GAAD,MAFJ,SAMFxS,SAAS8S,eAAe,U","file":"static/js/main.2e815323.chunk.js","sourcesContent":["export const BLOG_FETCH_REQUEST = \"BLOG_FETCH_REQUEST\"\r\nexport const BLOG_FETCH_SUCCESS = \"BLOG_FETCH_SUCCESS\"\r\nexport const BLOG_FETCH_FAIL = \"BLOG_FETCH_FAIL\"\r\n\r\nexport const BLOG_DETAILS_REQUEST = \"BLOG_DETAILS_REQUEST\"\r\nexport const BLOG_DETAILS_SUCCESS = \"BLOG_DETAILS_SUCCESS\"\r\nexport const BLOG_DETAILS_FAIL = \"BLOG_DETAILS_FAIL\"\r\n\r\n\r\nexport const BLOG_CREATE_REQUEST = \"BLOG_CREATE_REQUEST\"\r\nexport const BLOG_CREATE_SUCCESS = \"BLOG_CREATE_SUCCESS\"\r\nexport const BLOG_CREATE_FAIL = \"BLOG_CREATE_FAIL\"","export const PRODUCT_LIST_REQUEST = \"PRODUCT_LIST_REQUEST\"\r\nexport const PRODUCT_LIST_SUCCESS = \"PRODUCT_LIST_SUCCESS\"\r\nexport const PRODUCT_LIST_FAIL = \"PRODUCT_LIST_FAIL\"\r\n\r\nexport const PRODUCT_DETAILS_REQUEST = \"PRODUCT_DETAILS_REQUEST\"\r\nexport const PRODUCT_DETAILS_SUCCESS = \"PRODUCT_DETAILS_SUCCESS\"\r\nexport const PRODUCT_DETAILS_FAIL = \"PRODUCT_DETAILS_FAIL\"\r\n\r\nexport const PRODUCT_CREATE_REVIEW_REQUEST = \"PRODUCT_CREATE_REVIEW_REQUEST\"\r\nexport const PRODUCT_CREATE_REVIEW_SUCCESS = \"PRODUCT_CREATE_REVIEW_SUCCESS\"\r\nexport const PRODUCT_CREATE_REVIEW_FAIL = \"PRODUCT_CREATE_REVIEW_FAIL\"\r\nexport const PRODUCT_CREATE_REVIEW_RESET = \"PRODUCT_CREATE_REVIEW_RESET\"\r\n\r\nexport const PRODUCT_DELETE_REQUEST = \"PRODUCT_DELETE_REQUEST\"\r\nexport const PRODUCT_DELETE_SUCCESS = \"PRODUCT_DELETE_SUCCESS\"\r\nexport const PRODUCT_DELETE_FAIL = \"PRODUCT_DELETE_FAIL\"\r\n\r\nexport const PRODUCT_CREATE_REQUEST = \"PRODUCT_CREATE_REQUEST\"\r\nexport const PRODUCT_CREATE_SUCCESS = \"PRODUCT_CREATE_SUCCESS\"\r\nexport const PRODUCT_CREATE_FAIL = \"PRODUCT_CREATE_FAIL\"\r\nexport const PRODUCT_CREATE_RESET = \"PRODUCT_CREATE_RESET\"\r\n\r\nexport const PRODUCT_UPDATE_REQUEST = \"PRODUCT_UPDATE_REQUEST\"\r\nexport const PRODUCT_UPDATE_SUCCESS = \"PRODUCT_UPDATE_SUCCESS\"\r\nexport const PRODUCT_UPDATE_FAIL = \"PRODUCT_UPDATE_FAIL\"\r\nexport const PRODUCT_UPDATE_RESET = \"PRODUCT_UPDATE_RESET\"","import axios from \"axios\"\r\nimport { BLOG_DETAILS_REQUEST, BLOG_DETAILS_SUCCESS, BLOG_FETCH_FAIL, BLOG_FETCH_REQUEST, BLOG_FETCH_SUCCESS } from \"../../constants/blogConstant\"\r\nimport { PRODUCT_DETAILS_FAIL } from \"../../constants/productConstants\"\r\n\r\nconst baseUrl = 'https://plantland.herokuapp.com'\r\n// @ GET blogs\r\nexport const fetchBlogs = () => async (dispatch) => {\r\n try {\r\n dispatch({ type:BLOG_FETCH_REQUEST})\r\n\r\n const { data } = await axios.get(`${baseUrl}/api/blogs`)\r\n\r\n dispatch({\r\n type: BLOG_FETCH_SUCCESS,\r\n payload: data\r\n })\r\n \r\n } catch (error) {\r\n console.log(error);\r\n dispatch({\r\n type: BLOG_FETCH_FAIL,\r\n payload: error.response && error.response.data.message ? error.response.data.message : error.message\r\n })\r\n }\r\n}\r\n\r\n// Get a blog by id\r\nexport const fetchBlogById = (id) => async (dispatch) => {\r\n try {\r\n dispatch({ type: BLOG_DETAILS_REQUEST })\r\n\r\n const { data } = await axios.get(`${baseUrl}/api/blogs/${id}`)\r\n dispatch({\r\n type: BLOG_DETAILS_SUCCESS,\r\n payload: data\r\n })\r\n \r\n } catch (error) {\r\n console.log(error);\r\n dispatch({\r\n type: PRODUCT_DETAILS_FAIL,\r\n payload: error.response && error.response.data.message ? error.response.data.message : error.message\r\n })\r\n }\r\n\r\n}\r\n\r\n// Create blog\r\nexport const createBlog = (blogData) => async (dispatch,getState) => {\r\n\r\n try {\r\n // dispatch({\r\n // type:BLOG_CREATE_REQUEST\r\n // })\r\n\r\n const { userLogin: { userInfo } } = getState()\r\n \r\n \r\n const config = {\r\n headers: {\r\n 'Content-Type': 'application/json',\r\n Authorization: `Bearer ${userInfo.token}`\r\n }\r\n }\r\n\r\n const { data } = await axios.post(`${baseUrl}/api/blogs`,blogData,config)\r\n\r\n console.log(data);\r\n // dispatch({\r\n // type: BLOG_CREATE_SUCCESS,\r\n // payload:data\r\n // })\r\n \r\n } catch (error) {\r\n console.log(error);\r\n // dispatch({\r\n // type: PRODUCT_CREATE_FAIL,\r\n // payload: error.response && error.response.data.message ? error.response.data.message : error.message\r\n \r\n // })\r\n \r\n }\r\n \r\n}","import React from 'react';\r\nimport { Spinner } from 'react-bootstrap';\r\n\r\nfunction Loader() {\r\n return (\r\n \r\n Loading...\r\n \r\n )\r\n}\r\n\r\nexport default Loader\r\n","import React from 'react'\r\nimport { Badge, Button, Card } from 'react-bootstrap'\r\nimport ReactHtmlParser from 'react-html-parser'\r\nimport { Link, useHistory } from 'react-router-dom'\r\nimport \"../../styles/blog.css\"\r\n\r\nfunction BlogCard({ blog }) {\r\n const history = useHistory()\r\n const handleViewBlog = (id) => {\r\n history.push(`/blog/${id}`)\r\n }\r\n return (\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n {blog.title}\r\n {blog.tags.map((tag,index) => (\r\n {tag}\r\n ))}\r\n \r\n {ReactHtmlParser(blog.description)}\r\n \r\n\r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n\r\n \r\n \r\n
\r\n )\r\n}\r\n\r\nexport default BlogCard\r\n","export const blogCategories = ['All', 'Plant', 'Gardening', 'Plant Diseases', 'Green Living', 'Gardening Tools', 'Others']\r\n\r\nexport const blogTags=[\"plants\", \"nature\", \"flowers\", \"plantsofinstagram\", \"garden\", \"plantsmakepeoplehappy\",\"plant\", \"green\", \"gardening\", \"houseplants\", \"photography\", \"naturephotography\",\"flower\", \"plantlover\", \"love\", \"indoorplants\", \"succulents\", \"urbanjungle\", \"cactus\", \"art\", \"beautiful\", \"plantlife\", \"photooftheday\", \"plantas\", \"plantstagram\", \"homedecor\", \"flowerstagram\", \"spring\", \"naturelovers\", \"bhfyp\"]\r\n\r\n","import React, { useEffect } from 'react'\r\nimport { Button, Col, Row } from 'react-bootstrap'\r\nimport { useDispatch, useSelector } from 'react-redux'\r\nimport { useHistory } from 'react-router-dom'\r\nimport { fetchBlogs } from '../../redux/actions/blogActions'\r\nimport '../../styles/blog.css'\r\nimport Loader from '../Ecommerce/Loader'\r\nimport BlogCard from './BlogCard'\r\nimport { blogCategories, blogTags } from './BlogSeedData'\r\n\r\nfunction Blog() {\r\n\r\n const history = useHistory()\r\n const dispatch = useDispatch()\r\n\r\n const blogList = useSelector(state => state.blogList)\r\n const { loading, blogs} = blogList\r\n\r\n useEffect(() => {\r\n dispatch(fetchBlogs())\r\n }, [dispatch])\r\n\r\n function handleCreateBlog(){\r\n history.push(\"/newblog\")\r\n }\r\n return (\r\n <>\r\n \r\n
\r\n
Blogs
\r\n
We all need a little green in our lives
\r\n
\r\n
\r\n
\r\n
Latest Articles
\r\n \r\n \r\n
Discover the most outstanding articles in all topics related to Plants
\r\n
\r\n \r\n
\r\n \r\n \r\n
Category
\r\n {blogCategories.map(blog => (\r\n
{blog}
\r\n ))}\r\n
\r\n \r\n
Discover Tags
\r\n
\r\n {blogTags.map(tag => (\r\n
{tag}
\r\n ))}\r\n
\r\n
\r\n \r\n {loading ? : (\r\n \r\n \r\n {blogs && blogs.map((blog,index) => (\r\n \r\n \r\n \r\n ))}\r\n
\r\n \r\n )}\r\n
\r\n
\r\n >\r\n )\r\n}\r\n\r\nexport default Blog\r\n","import React from 'react'\r\nimport { Alert } from 'react-bootstrap'\r\n\r\nfunction Message({variant,children}) {\r\n return (\r\n \r\n {children}\r\n \r\n )\r\n}\r\n\r\nMessage.defaultProps = {\r\n variant:'info'\r\n}\r\n\r\nexport default Message\r\n","import React, { useEffect } from 'react'\r\nimport { Badge, Container } from 'react-bootstrap'\r\nimport ReactHtmlParser from 'react-html-parser'\r\nimport { useDispatch, useSelector } from 'react-redux'\r\nimport { fetchBlogById } from '../../redux/actions/blogActions'\r\nimport '../../styles/blog.css'\r\nimport Loader from '../Ecommerce/Loader'\r\nimport Message from '../Ecommerce/Message'\r\n\r\nfunction BlogDetails({match}) {\r\n const dispatch = useDispatch()\r\n const blogDetails = useSelector(state => state.blogDetails)\r\n const { loading, blog, error } = blogDetails\r\n useEffect(() => {\r\n dispatch(fetchBlogById(match.params.id))\r\n }, [dispatch,match])\r\n \r\n return (\r\n \r\n {loading ? : error ? {error} : blog && (\r\n <>\r\n \r\n \r\n {blog.title}
\r\n \r\n
\r\n
By {blog.author}
\r\n
Published in {blog.category}
\r\n
{blog.createdAt && new Date(blog.createdAt).toDateString()}
\r\n
\r\n {/*
\r\n 5\r\n 4\r\n
*/}\r\n
\r\n \r\n \r\n {ReactHtmlParser(blog.description)}\r\n
\r\n \r\n {blog.tags && blog.tags.map((tag, index) => ( \r\n {tag} \r\n ))}\r\n
\r\n >\r\n \r\n )}\r\n \r\n \r\n \r\n )\r\n}\r\n\r\nexport default BlogDetails\r\n","import { toast } from 'react-toastify'\r\nimport 'react-toastify/dist/ReactToastify.css'\r\n\r\ntoast.configure()\r\n\r\nexport const toastSuccessMessage = (message) => {\r\n toast.success(message,{\r\n autoClose: 3000,\r\n })\r\n}\r\n\r\nexport const toastInfoMessage = (message) => {\r\n toast.info(message,{\r\n autoClose: 3000,\r\n })\r\n}\r\n\r\nexport const toastErrorMessage = (message) => {\r\n toast.error(message, {\r\n autoClose: 3000,\r\n position:'bottom-right'\r\n })\r\n}","import React from \"react\";\r\nconst { useState} = React;\r\n\r\nconst data = [{ id: \"plant\", label: \"Plant\" },\r\n { id: \"garden\", label: \"Gardening\" },\r\n { id: \"diseases\", label: \"Plant Diseases\" },\r\n { id: \"green\", label: \"Green Living\" },\r\n { id: \"tools\", label: \"Gardening Tools\" },\r\n { id: \"others\", label: \"Others\" },\r\n];\r\n\r\nconst BlogCategory = ({onCategorySelect}) => {\r\n const [isOpen, setOpen] = useState(false);\r\n const [items] = useState(data);\r\n const [selectedItem, setSelectedItem] = useState(null);\r\n \r\n const toggleDropdown = () => setOpen(!isOpen);\r\n \r\n const handleItemClick = (id) => {\r\n onCategorySelect(id)\r\n selectedItem === id ? setSelectedItem(null) : setSelectedItem(id);\r\n }\r\n \r\n return (\r\n \r\n
\r\n {selectedItem ? items.find(item => item.id === selectedItem).label : \"Select Blog Category\"}\r\n \r\n
\r\n
\r\n {items.map(item => (\r\n
handleItemClick(e.target.id)} id={item.id}>\r\n • \r\n {item.label}\r\n
\r\n ))}\r\n
\r\n
\r\n )\r\n}\r\n\r\nexport default BlogCategory","import ClassicEditor from '@ckeditor/ckeditor5-build-classic'\r\nimport { CKEditor } from '@ckeditor/ckeditor5-react'\r\nimport axios from 'axios'\r\nimport React, { useState } from 'react'\r\nimport { Button } from 'react-bootstrap'\r\nimport { useDispatch } from 'react-redux'\r\nimport { useHistory } from 'react-router-dom'\r\nimport { createBlog } from '../../redux/actions/blogActions'\r\nimport { toastSuccessMessage } from '../Ecommerce/ToastMessage'\r\nimport BlogDropdown from './BlogCategory'\r\n\r\nfunction NewBlog() {\r\n const history = useHistory()\r\n const dispatch = useDispatch()\r\n\r\n const [title, setTitle] = useState(\"\")\r\n const [category, setCategory] = useState(\"\")\r\n const [tags, setTags] = useState(\"\")\r\n const [image, setImage] = useState(\"\")\r\n const [content, setContent] = useState(\"\")\r\n\r\n\r\n const onCategorySelect = (category) => {\r\n setCategory(category)\r\n }\r\n\r\n const handleFormSubmit = (e) => {\r\n e.preventDefault()\r\n console.log(\"off\")\r\n const allTags = tags.split(\",\")\r\n const blogPost = {\r\n title,description:content,category,tags:allTags,image\r\n }\r\n try {\r\n dispatch(createBlog(blogPost))\r\n clearInputs()\r\n toastSuccessMessage(\"Blog Published\")\r\n } catch (err) {\r\n console.log(err);\r\n }\r\n\r\n }\r\n\r\n const handleFileUpload = async (e) => {\r\n const file = e.target.files[0] \r\n const formData = new FormData()\r\n formData.append('image', file)\r\n\r\n try {\r\n const config = {\r\n headers: {\r\n 'Content-Type':'multipart/form-data'\r\n }\r\n }\r\n const { data } = await axios.post(`/api/uploads`, formData, config)\r\n setImage(data)\r\n } catch (error) {\r\n console.log(error)\r\n }\r\n }\r\n \r\n const clearInputs = () => {\r\n setTitle(\"\")\r\n setContent(\"\")\r\n setTags(\"\")\r\n setCategory(\"\")\r\n setImage(\"\")\r\n }\r\n\r\n return (\r\n \r\n {image ?
: ( \r\n
\r\n ) }\r\n
\r\n
\r\n
\r\n )\r\n}\r\n\r\nexport default NewBlog\r\n","import React from 'react'\r\nimport { Col, Container, Row } from 'react-bootstrap'\r\n\r\nfunction Footer() {\r\n return (\r\n \r\n )\r\n}\r\n\r\nexport default Footer\r\n","export const USER_LOGIN_REQUEST = \"USER_LOGIN_REQUEST\"\r\nexport const USER_LOGIN_SUCCESS = \"USER_LOGIN_SUCCESS\"\r\nexport const USER_LOGIN_FAIL = \"USER_LOGIN_FAIL\"\r\n\r\nexport const USER_LOGOUT = \"USER_LOGOUT\"\r\n\r\nexport const USER_REGISTER_REQUEST = \"USER_REGISTER_REQUEST\"\r\nexport const USER_REGISTER_SUCCESS = \"USER_REGISTER_SUCCESS\"\r\nexport const USER_REGISTER_FAIL = \"USER_REGISTER_FAIL\"\r\n\r\nexport const USER_DETAILS_REQUEST = \"USER_DETAILS_REQUEST\"\r\nexport const USER_DETAILS_SUCCESS = \"USER_DETAILS_SUCCESS\"\r\nexport const USER_DETAILS_FAIL = \"USER_DETAILS_FAIL\"\r\n\r\nexport const USER_PROFILE_UPDATE_REQUEST = \"USER_PROFILE_UPDATE_REQUEST\"\r\nexport const USER_PROFILE_UPDATE_SUCCESS = \"USER_PROFILE_UPDATE_SUCCESS\"\r\nexport const USER_PROFILE_UPDATE_FAIL = \"USER_PROFILE_UPDATE_FAIL\"\r\nexport const USER_PROFILE_UPDATE_RESET = \"USER_PROFILE_UPDATE_RESET\"\r\n\r\nexport const USER_LIST_REQUEST = \"USER_LIST_REQUEST\"\r\nexport const USER_LIST_SUCCESS = \"USER_LIST_SUCCESS\"\r\nexport const USER_LIST_FAIL = \"USER_LIST_FAIL\"\r\nexport const USER_LIST_RESET = \"USER_LIST_RESET\"\r\n\r\nexport const USER_DELETE_REQUEST = \"USER_DELETE_REQUEST\"\r\nexport const USER_DELETE_SUCCESS = \"USER_DELETE_SUCCESS\"\r\nexport const USER_DELETE_FAIL = \"USER_DELETE_FAIL\"","import axios from 'axios'\r\nimport { USER_DELETE_FAIL, USER_DELETE_REQUEST, USER_DELETE_SUCCESS, USER_DETAILS_FAIL, USER_DETAILS_REQUEST, USER_DETAILS_SUCCESS, USER_LIST_FAIL, USER_LIST_REQUEST, USER_LIST_RESET, USER_LIST_SUCCESS, USER_LOGIN_FAIL, USER_LOGIN_REQUEST, USER_LOGIN_SUCCESS, USER_LOGOUT, USER_PROFILE_UPDATE_FAIL, USER_PROFILE_UPDATE_REQUEST, USER_PROFILE_UPDATE_SUCCESS, USER_REGISTER_FAIL, USER_REGISTER_REQUEST, USER_REGISTER_SUCCESS } from '../../constants/userConstants'\r\n\r\nconst baseUrl = 'https://plantland.herokuapp.com'\r\n\r\nexport const login = (email,password) => async (dispatch) => {\r\n\r\n try {\r\n dispatch({\r\n type:USER_LOGIN_REQUEST\r\n })\r\n \r\n const config = {\r\n headers: {\r\n 'Content-Type':'application/json'\r\n }\r\n }\r\n\r\n const { data } = await axios.post(`${baseUrl}/api/users/login`,\r\n {email, password },config)\r\n\r\n dispatch({\r\n type: USER_LOGIN_SUCCESS,\r\n payload:data\r\n })\r\n\r\n localStorage.setItem('userInfo',JSON.stringify(data))\r\n \r\n } catch (error) {\r\n console.log(error);\r\n dispatch({\r\n type: USER_LOGIN_FAIL,\r\n payload: error.response && error.response.data.message ? error.response.data.message : error.message\r\n \r\n })\r\n \r\n }\r\n \r\n}\r\n\r\n\r\nexport const googleLogin = (data) => async (dispatch) => {\r\n try {\r\n dispatch({\r\n type:USER_LOGIN_REQUEST\r\n })\r\n\r\n dispatch({\r\n type: USER_LOGIN_SUCCESS,\r\n payload:data\r\n })\r\n\r\n localStorage.setItem('userInfo',JSON.stringify(data))\r\n \r\n } catch (error) {\r\n console.log(error);\r\n dispatch({\r\n type: USER_LOGIN_FAIL,\r\n payload: error.response && error.response.data.message ? error.response.data.message : error.message\r\n \r\n })\r\n }\r\n}\r\n\r\n\r\nexport const logout = () => (dispatch) => {\r\n localStorage.removeItem('userInfo')\r\n dispatch({\r\n type:USER_LOGOUT\r\n })\r\n dispatch({\r\n type:USER_LIST_RESET\r\n })\r\n}\r\n\r\n\r\nexport const register = (name,email,password,confirmPassword) => async (dispatch) => {\r\n\r\n try {\r\n dispatch({\r\n type:USER_REGISTER_REQUEST\r\n })\r\n \r\n const config = {\r\n headers: {\r\n 'Content-Type':'application/json'\r\n }\r\n }\r\n\r\n const { data } = await axios.post(`${baseUrl}/api/users/register`,\r\n {name,email,password,confirmPassword},config)\r\n\r\n dispatch({\r\n type: USER_REGISTER_SUCCESS,\r\n payload:data\r\n })\r\n \r\n } catch (error) {\r\n console.log(error);\r\n dispatch({\r\n type: USER_REGISTER_FAIL,\r\n payload: error.response && error.response.data.message ? error.response.data.message : error.message\r\n \r\n })\r\n \r\n }\r\n \r\n}\r\n\r\n\r\nexport const getUserDetails = (id) => async (dispatch,getState) => {\r\n\r\n try {\r\n dispatch({\r\n type:USER_DETAILS_REQUEST\r\n })\r\n\r\n const { userLogin: { userInfo } } = getState()\r\n \r\n \r\n const config = {\r\n headers: {\r\n 'Content-Type': 'application/json',\r\n Authorization: `Bearer ${userInfo.token}`\r\n }\r\n }\r\n\r\n const { data } = await axios.get(`${baseUrl}/api/users/${id}`, config)\r\n\r\n dispatch({\r\n type: USER_DETAILS_SUCCESS,\r\n payload:data\r\n })\r\n \r\n } catch (error) {\r\n console.log(error);\r\n dispatch({\r\n type: USER_DETAILS_FAIL,\r\n payload: error.response && error.response.data.message ? error.response.data.message : error.message\r\n \r\n })\r\n \r\n }\r\n \r\n}\r\n\r\n\r\nexport const updateUserProfile = (user) => async (dispatch,getState) => {\r\n\r\n try {\r\n dispatch({\r\n type:USER_PROFILE_UPDATE_REQUEST\r\n })\r\n\r\n const { userLogin: { userInfo } } = getState()\r\n \r\n \r\n const config = {\r\n headers: {\r\n 'Content-Type': 'application/json',\r\n Authorization: `Bearer ${userInfo.token}`\r\n }\r\n }\r\n\r\n const { data } = await axios.put(`${baseUrl}/api/users/profile`,user, config)\r\n \r\n console.log(data);\r\n\r\n dispatch({\r\n type: USER_PROFILE_UPDATE_SUCCESS,\r\n payload:data\r\n })\r\n \r\n } catch (error) {\r\n console.log(error);\r\n dispatch({\r\n type: USER_PROFILE_UPDATE_FAIL,\r\n payload: error.response && error.response.data.message ? error.response.data.message : error.message\r\n \r\n })\r\n \r\n }\r\n \r\n}\r\n\r\n\r\nexport const getUserList = () => async (dispatch,getState) => {\r\n\r\n try {\r\n dispatch({\r\n type:USER_LIST_REQUEST\r\n })\r\n\r\n const { userLogin: { userInfo } } = getState()\r\n \r\n \r\n const config = {\r\n headers: {\r\n 'Content-Type': 'application/json',\r\n Authorization: `Bearer ${userInfo.token}`\r\n }\r\n }\r\n\r\n const { data } = await axios.get(`${baseUrl}/api/users`,config)\r\n\r\n dispatch({\r\n type: USER_LIST_SUCCESS,\r\n payload:data\r\n })\r\n \r\n } catch (error) {\r\n console.log(error);\r\n dispatch({\r\n type: USER_LIST_FAIL,\r\n payload: error.response && error.response.data.message ? error.response.data.message : error.message\r\n \r\n })\r\n \r\n }\r\n \r\n}\r\n\r\n\r\nexport const deleteUser = (id) => async (dispatch,getState) => {\r\n\r\n try {\r\n dispatch({\r\n type:USER_DELETE_REQUEST\r\n })\r\n\r\n const { userLogin: { userInfo } } = getState()\r\n \r\n \r\n const config = {\r\n headers: {\r\n 'Content-Type': 'application/json',\r\n Authorization: `Bearer ${userInfo.token}`\r\n }\r\n }\r\n\r\n await axios.delete(`${baseUrl}/api/users/${id}`,config)\r\n\r\n dispatch({\r\n type: USER_DELETE_SUCCESS,\r\n })\r\n \r\n } catch (error) {\r\n console.log(error);\r\n dispatch({\r\n type: USER_DELETE_FAIL,\r\n payload: error.response && error.response.data.message ? error.response.data.message : error.message\r\n \r\n })\r\n \r\n }\r\n \r\n}","import React from 'react'\r\nimport { Container, Nav, Navbar, NavDropdown } from 'react-bootstrap'\r\nimport { useDispatch, useSelector } from 'react-redux'\r\nimport { LinkContainer } from 'react-router-bootstrap'\r\nimport { useHistory } from 'react-router-dom'\r\nimport { logout } from '../../redux/actions/userActions'\r\nimport { toastErrorMessage } from './ToastMessage'\r\n\r\n\r\nfunction Header() {\r\n const { userInfo } = useSelector(state => state.userLogin)\r\n const dispatch = useDispatch()\r\n const history = useHistory()\r\n\r\n const handleLogout = () => {\r\n dispatch(logout())\r\n history.push(\"/market\")\r\n toastErrorMessage(\"You're logged out\")\r\n }\r\n \r\n return (\r\n <>\r\n \r\n \r\n \r\n Plant Land\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n >\r\n )\r\n}\r\n\r\nexport default Header\r\n","export const CART_ADD_ITEM = \"CART_ADD_ITEM\";\r\nexport const CART_REMOVE_ITEM = \"CART_REMOVE_ITEM\";\r\nexport const CART_SAVE_SHIPPING_ADDRESS = \"CART_SAVE_SHIPPING_ADDRESS\";\r\nexport const CART_SAVE_PAYMENT_METHOD = \"CART_SAVE_PAYMENT_METHOD\";\r\nexport const CART_RESET = 'CART_RESET'\r\n","import axios from \"axios\";\r\nimport {\r\n CART_ADD_ITEM,\r\n CART_REMOVE_ITEM, CART_SAVE_PAYMENT_METHOD, CART_SAVE_SHIPPING_ADDRESS\r\n} from \"../../constants/cartConstants\";\r\n\r\nconst baseUrl = 'https://plantland.herokuapp.com'\r\n\r\nexport const addToCart = (id, qty) => async (dispatch, getState) => {\r\n try {\r\n const { data } = await axios.get(`${baseUrl}/api/products/${id}`);\r\n\r\n dispatch({\r\n type: CART_ADD_ITEM,\r\n payload: {\r\n productId: data._id,\r\n name: data.name,\r\n image: data.image,\r\n price: data.price,\r\n countInStock: data.countInStock,\r\n qty,\r\n },\r\n });\r\n\r\n localStorage.setItem(\r\n \"cartItems\",\r\n JSON.stringify(getState().cart.cartItems)\r\n );\r\n } catch (error) {\r\n console.log(\"Gg\", error);\r\n }\r\n};\r\n\r\nexport const removeFromCart = (id) => async (dispatch, getState) => {\r\n try {\r\n dispatch({\r\n type: CART_REMOVE_ITEM,\r\n payload: id,\r\n });\r\n\r\n localStorage.setItem(\r\n \"cartItems\",\r\n JSON.stringify(getState().cart.cartItems)\r\n );\r\n } catch (error) {\r\n console.log(\"Gg\", error);\r\n }\r\n};\r\n\r\nexport const saveShippingAddress = (data) => (dispatch) => {\r\n dispatch({\r\n type: CART_SAVE_SHIPPING_ADDRESS,\r\n payload: data,\r\n });\r\n\r\n localStorage.setItem(\"shippingAddress\", JSON.stringify(data));\r\n};\r\n\r\nexport const savePaymentMethod = (data) => (dispatch) => {\r\n dispatch({\r\n type: CART_SAVE_PAYMENT_METHOD,\r\n payload: data,\r\n });\r\n\r\n localStorage.setItem(\"paymentMethod\", JSON.stringify(data));\r\n};\r\n","import React, { useEffect } from 'react'\r\nimport { Button, Card, Col, FormControl, Image, ListGroup, Row } from 'react-bootstrap'\r\nimport { useDispatch, useSelector } from 'react-redux'\r\nimport { Link } from 'react-router-dom'\r\nimport { addToCart, removeFromCart } from '../../../redux/actions/cartActions'\r\nimport Message from '../Message'\r\n\r\n\r\nfunction CartScreen({ match, history, location }) {\r\n const dispatch = useDispatch()\r\n \r\n const productId = match.params.id\r\n const qty = location.search ? Number(location.search.split(\"=\")[1]) : 1\r\n\r\n const {cartItems} = useSelector(state => state.cart)\r\n\r\n useEffect(() => {\r\n if(productId)\r\n dispatch(addToCart(productId,qty))\r\n }, [dispatch, productId, qty])\r\n \r\n const removeFromCartHandler = (id) => {\r\n dispatch(removeFromCart(id))\r\n }\r\n const checkoutHandler = () => {\r\n history.push(\"/login?redirect=shipping\")\r\n }\r\n\r\n return (\r\n \r\n \r\n Shopping Cart
\r\n \r\n {cartItems.length === 0 ? Your cart is empty. Go Back : (\r\n \r\n {cartItems.map(item => (\r\n \r\n \r\n \r\n \r\n \r\n \r\n {item.name}\r\n \r\n \r\n ৳ {item.price}\r\n \r\n \r\n dispatch(addToCart(item.productId,Number(e.target.value)))}\r\n >\r\n {[...Array(item.countInStock).keys()].map(p => (\r\n \r\n ))}\r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n ))}\r\n \r\n \r\n )}\r\n \r\n \r\n \r\n \r\n \r\n \r\n Subtotal ({cartItems.reduce((acc,item)=>acc+item.qty,0)}) items
\r\n \r\n \r\n \r\n Price \r\n {cartItems.reduce((acc,item)=>acc + item.qty * item.price,0).toFixed(2)} \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n )\r\n}\r\n\r\nexport default CartScreen\r\n","import React from 'react'\r\nimport { Col, Container, Row } from 'react-bootstrap'\r\n\r\nfunction FormContainer({children}) {\r\n return (\r\n \r\n \r\n {children} \r\n
\r\n \r\n )\r\n}\r\n\r\nexport default FormContainer\r\n","import axios from 'axios'\r\nimport React, { useState } from 'react'\r\nimport { Button, Form } from 'react-bootstrap'\r\nimport FormContainer from '../FormContainer'\r\nimport Message from '../Message'\r\nimport { toastInfoMessage } from '../ToastMessage'\r\n\r\nfunction ForgetPasswordScreen() {\r\n const [email, setEmail] = useState('')\r\n const [error, setError] = useState('')\r\n\r\n const handleSubmit = async (e) => {\r\n e.preventDefault()\r\n\r\n const config = {\r\n headers: {\r\n 'Content-Type': 'application/json'\r\n }\r\n }\r\n \r\n try {\r\n await axios.post(\"/api/users/forget-password\", { email }, config)\r\n toastInfoMessage(\"Instructions to reset your password has been sent to your email\")\r\n \r\n } catch (error) {\r\n setError(error.response && error.response.data.message ? error.response.data.message : error.message)\r\n setEmail('')\r\n setTimeout(() => {\r\n setError(\"\")\r\n }, 3000);\r\n\r\n }\r\n }\r\n return (\r\n \r\n Forget Password ?
\r\n Enter the email address you used when you joined and we’ll send you instructions to reset your password.
\r\n {error && {error}}\r\n\r\n \r\n Email Address\r\n setEmail(e.target.value)} />\r\n \r\n\r\n \r\n \r\n \r\n )\r\n}\r\n\r\nexport default ForgetPasswordScreen\r\n","import axios from 'axios';\r\nimport { PRODUCT_CREATE_FAIL, PRODUCT_CREATE_REQUEST, PRODUCT_CREATE_REVIEW_FAIL, PRODUCT_CREATE_REVIEW_REQUEST, PRODUCT_CREATE_REVIEW_SUCCESS, PRODUCT_CREATE_SUCCESS, PRODUCT_DELETE_FAIL, PRODUCT_DELETE_REQUEST, PRODUCT_DELETE_SUCCESS, PRODUCT_DETAILS_FAIL, PRODUCT_DETAILS_REQUEST, PRODUCT_DETAILS_SUCCESS, PRODUCT_LIST_FAIL, PRODUCT_LIST_REQUEST, PRODUCT_LIST_SUCCESS, PRODUCT_UPDATE_FAIL, PRODUCT_UPDATE_REQUEST, PRODUCT_UPDATE_SUCCESS } from '../../constants/productConstants';\r\n\r\nconst baseUrl = 'https://plantland.herokuapp.com'\r\n\r\n// @ GET products\r\nexport const fetchProducts = (keyword='',pageNumber='',category='',sort='') => async (dispatch) => {\r\n try {\r\n dispatch({ type: PRODUCT_LIST_REQUEST })\r\n\r\n const { data } = await axios.get(`${baseUrl}/api/products?category=${category}&keyword=${keyword}&pageNumber=${pageNumber}&sort=${sort}`)\r\n\r\n dispatch({\r\n type: PRODUCT_LIST_SUCCESS,\r\n payload: data\r\n })\r\n \r\n } catch (error) {\r\n console.log(error);\r\n dispatch({\r\n type: PRODUCT_LIST_FAIL,\r\n payload: error.response && error.response.data.message ? error.response.data.message : error.message\r\n })\r\n }\r\n\r\n \r\n}\r\n\r\n// @ GET one product\r\nexport const fetchProductById = (id) => async (dispatch) => {\r\n try {\r\n \r\n dispatch({ type: PRODUCT_DETAILS_REQUEST })\r\n\r\n const { data } = await axios.get(`${baseUrl}/api/products/${id}`)\r\n dispatch({\r\n type: PRODUCT_DETAILS_SUCCESS,\r\n payload: data\r\n })\r\n \r\n } catch (error) {\r\n console.log(error);\r\n dispatch({\r\n type: PRODUCT_DETAILS_FAIL,\r\n payload: error.response && error.response.data.message ? error.response.data.message : error.message\r\n })\r\n }\r\n\r\n}\r\n\r\n\r\n// @ Create product review\r\nexport const createProductReview = (productId,review) => async (dispatch,getState) => {\r\n try {\r\n dispatch({ type: PRODUCT_CREATE_REVIEW_REQUEST })\r\n\r\n const { userLogin: { userInfo } } = getState()\r\n const config = {\r\n headers: {\r\n 'Content-Type': 'application/json',\r\n Authorization: `Bearer ${userInfo.token}`\r\n }\r\n }\r\n\r\n await axios.post(`${baseUrl}/api/products/${productId}/reviews`,review,config)\r\n\r\n dispatch({\r\n type: PRODUCT_CREATE_REVIEW_SUCCESS,\r\n })\r\n \r\n \r\n } catch (error) {\r\n console.log(error);\r\n dispatch({\r\n type: PRODUCT_CREATE_REVIEW_FAIL,\r\n payload: error.response && error.response.data.message ? error.response.data.message : error.message\r\n })\r\n }\r\n\r\n}\r\n\r\n// Delete products\r\nexport const deleteProduct = (id) => async (dispatch,getState) => {\r\n\r\n try {\r\n dispatch({\r\n type:PRODUCT_DELETE_REQUEST\r\n })\r\n\r\n const { userLogin: { userInfo } } = getState()\r\n \r\n \r\n const config = {\r\n headers: {\r\n 'Content-Type': 'application/json',\r\n Authorization: `Bearer ${userInfo.token}`\r\n }\r\n }\r\n\r\n await axios.delete(`${baseUrl}/api/products/${id}`,config)\r\n\r\n dispatch({\r\n type: PRODUCT_DELETE_SUCCESS,\r\n })\r\n \r\n } catch (error) {\r\n console.log(error);\r\n dispatch({\r\n type: PRODUCT_DELETE_FAIL,\r\n payload: error.response && error.response.data.message ? error.response.data.message : error.message\r\n \r\n })\r\n \r\n }\r\n \r\n}\r\n\r\n// Create products\r\nexport const createProduct = () => async (dispatch,getState) => {\r\n\r\n try {\r\n dispatch({\r\n type:PRODUCT_CREATE_REQUEST\r\n })\r\n\r\n const { userLogin: { userInfo } } = getState()\r\n \r\n \r\n const config = {\r\n headers: {\r\n 'Content-Type': 'application/json',\r\n Authorization: `Bearer ${userInfo.token}`\r\n }\r\n }\r\n\r\n const { data } = await axios.post(`/api/products`,{},config)\r\n\r\n dispatch({\r\n type: PRODUCT_CREATE_SUCCESS,\r\n payload:data\r\n })\r\n \r\n } catch (error) {\r\n console.log(error);\r\n dispatch({\r\n type: PRODUCT_CREATE_FAIL,\r\n payload: error.response && error.response.data.message ? error.response.data.message : error.message\r\n \r\n })\r\n \r\n }\r\n \r\n}\r\n\r\n// Update Products\r\nexport const updateProduct = (product) => async (dispatch,getState) => {\r\n\r\n try {\r\n dispatch({\r\n type:PRODUCT_UPDATE_REQUEST\r\n })\r\n\r\n const { userLogin: { userInfo } } = getState()\r\n \r\n \r\n const config = {\r\n headers: {\r\n 'Content-Type': 'application/json',\r\n Authorization: `Bearer ${userInfo.token}`\r\n }\r\n }\r\n\r\n const { data } = await axios.put(`/api/products/${product._id}`,product,config)\r\n\r\n dispatch({\r\n type: PRODUCT_UPDATE_SUCCESS,\r\n payload:data\r\n })\r\n \r\n } catch (error) {\r\n console.log(error);\r\n dispatch({\r\n type: PRODUCT_UPDATE_FAIL,\r\n payload: error.response && error.response.data.message ? error.response.data.message : error.message\r\n \r\n })\r\n \r\n }\r\n \r\n}\r\n","import React from 'react'\r\nimport { Dropdown, DropdownButton } from 'react-bootstrap'\r\n\r\nfunction FilterCategory({ handleCategoryChange }) {\r\n const categoryList = [\"Plant\",\"Flower\",\"Seed\",\"Pesticide\",\"Tool\"]\r\n return (\r\n <>\r\n \r\n >\r\n\r\n )\r\n}\r\n\r\nexport default FilterCategory\r\n","import React from 'react'\r\nimport { Dropdown, DropdownButton } from 'react-bootstrap'\r\n\r\nfunction FilterCategory({handleSortChange}) {\r\n return (\r\n <>\r\n \r\n >\r\n\r\n )\r\n}\r\n\r\nexport default FilterCategory\r\n","import React from 'react';\r\nimport { Pagination } from 'react-bootstrap';\r\nimport { LinkContainer } from 'react-router-bootstrap';\r\n\r\nfunction Paginate({ page, numOfPages, keyword = '', sort = '', isAdmin = false }) {\r\n return (\r\n numOfPages > 1 && (\r\n \r\n {[...Array(numOfPages).keys()].map(p => (\r\n \r\n {p + 1}\r\n \r\n ))}\r\n \r\n )\r\n\r\n )\r\n}\r\n\r\nexport default Paginate\r\n","import React from 'react'\r\nimport '../../styles/ecommerce.css'\r\n\r\nfunction Rating({ value, text }) {\r\n return (\r\n \r\n
\r\n \r\n =1 ? 'fas fa-star': value >=0.5 ? 'fas fa-star-half-alt' : 'far fas-star'}>\r\n \r\n \r\n =2 ? 'fas fa-star': value >=1.5 ? 'fas fa-star-half-alt' : 'far fas-star'}>\r\n \r\n \r\n =3 ? 'fas fa-star': value >=2.5 ? 'fas fa-star-half-alt' : 'far fas-star'}>\r\n \r\n \r\n =4 ? 'fas fa-star': value >=3.5 ? 'fas fa-star-half-alt' : 'far fas-star'}>\r\n \r\n \r\n =5 ? 'fas fa-star': value >=4.5 ? 'fas fa-star-half-alt' : 'far fas-star'}>\r\n \r\n
\r\n\r\n {text !== 'hidden' && (\r\n
\r\n {text ? `${text} reviews` : 'No reviews yet'}\r\n
\r\n )}\r\n\r\n
\r\n )\r\n}\r\n\r\nexport default Rating\r\n","import React from 'react'\r\nimport { Button, Card } from 'react-bootstrap'\r\nimport { Link, useHistory } from 'react-router-dom'\r\nimport \"../../styles/ecommerce.css\"\r\nimport Rating from './Rating'\r\n\r\nfunction Product({ product }) {\r\n\r\n const history = useHistory()\r\n const HandleViewDetails = (id) => {\r\n history.push(`/product/${id}`)\r\n }\r\n \r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n {product.name} \r\n \r\n \r\n \r\n\r\n \r\n ৳ {product.price}\r\n \r\n\r\n \r\n \r\n \r\n )\r\n}\r\n\r\nexport default Product\r\n","import React, { useState } from 'react'\r\nimport { Button, Form } from 'react-bootstrap'\r\nimport { useHistory } from 'react-router-dom'\r\n\r\nfunction SearchBox() {\r\n const [keyword, setKeyword] = useState('')\r\n const history = useHistory()\r\n\r\n const handleSubmit = (e) => {\r\n e.preventDefault()\r\n if (keyword.trim()) {\r\n history.push(`/search/${keyword}`)\r\n }else history.push(\"/market\")\r\n }\r\n\r\n return (\r\n <>\r\n setKeyword(e.target.value)}\r\n >\r\n \r\n \r\n >\r\n )\r\n}\r\n\r\nexport default SearchBox\r\n","import React, { useEffect, useState } from 'react'\r\nimport { Col, Row } from 'react-bootstrap'\r\nimport { useDispatch, useSelector } from 'react-redux'\r\nimport { fetchProducts } from '../../../redux/actions/productActions'\r\nimport \"../../../styles/ecommerce.css\"\r\nimport FilterCategory from '../FilterCategory'\r\nimport FilterSort from \"../FilterSort\"\r\nimport Loader from '../Loader'\r\nimport Message from '../Message'\r\nimport Paginate from '../Paginate'\r\nimport Product from '../Product'\r\nimport SearchBox from '../SearchBox'\r\n\r\n\r\nfunction HomeScreen({ match }) {\r\n \r\n const [productCategory, setProductCategory] = useState('')\r\n const [productSort, setProductSort] = useState('')\r\n\r\n const dispatch = useDispatch()\r\n const productList = useSelector(state => state.productList)\r\n const { loading, error, products, page, numOfPages } = productList\r\n \r\n const keyword = match.params.keyword\r\n const pageNumber = match.params.pageNumber || 1\r\n const category = productCategory\r\n const sort = productSort\r\n\r\n useEffect(() => {\r\n dispatch(fetchProducts(keyword,pageNumber,category,sort))\r\n }, [dispatch,keyword,pageNumber,category,sort])\r\n\r\n const handleCategoryChange = (e) => {\r\n setProductCategory(e.toLowerCase());\r\n }\r\n\r\n const handleSortChange = (e) => {\r\n setProductSort(e);\r\n }\r\n\r\n return (\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n
Latest Products
\r\n\r\n {loading ?
: error ?
{error} : (\r\n <>\r\n
\r\n {products.map(product => (\r\n \r\n \r\n \r\n ))}\r\n
\r\n
\r\n >\r\n \r\n )}\r\n \r\n\r\n \r\n \r\n
\r\n )\r\n}\r\n\r\nexport default HomeScreen\r\n","import React from 'react'\r\nimport { Button } from 'react-bootstrap'\r\nimport { GoogleLogin } from 'react-google-login'\r\nimport { useDispatch } from 'react-redux'\r\nimport { useHistory } from 'react-router-dom'\r\nimport { googleLogin } from '../../redux/actions/userActions'\r\n\r\nfunction GoogleAuth() {\r\n \r\n const dispatch = useDispatch()\r\n const history = useHistory()\r\n\r\n const googleSuccess = async (res) => {\r\n // console.log(res);\r\n const user = res?.profileObj;\r\n const token = res?.tokenId\r\n \r\n try {\r\n const data = { user, token }\r\n dispatch(googleLogin(data))\r\n history.push(\"/market\")\r\n } catch (error) {\r\n console.log(error);\r\n }\r\n \r\n }\r\n const googleFailure = () => {\r\n console.log(\"Google Sign in was unsuccessful. Try again later\");\r\n }\r\n return (\r\n \r\n (\r\n \r\n )}\r\n onSuccess={googleSuccess}\r\n onFailure={googleFailure}\r\n cookiePolicy=\"single_host_origin\"\r\n /> \r\n
\r\n )\r\n}\r\n\r\nexport default GoogleAuth\r\n","import React, { useEffect, useState } from 'react'\r\nimport { Button, Col, Form, Row } from 'react-bootstrap'\r\nimport { useDispatch, useSelector } from 'react-redux'\r\nimport { Link } from 'react-router-dom'\r\nimport { login } from '../../../redux/actions/userActions'\r\nimport FormContainer from '../FormContainer'\r\nimport GoogleAuth from '../GoogleAuth'\r\nimport Loader from '../Loader'\r\nimport Message from '../Message'\r\nimport { toastInfoMessage } from '../ToastMessage'\r\n\r\nfunction LoginScreen({location,history}) {\r\n\r\n const [email, setEmail] = useState('')\r\n const [password, setPassword] = useState('')\r\n\r\n const redirect = location.search ? location.search.split(\"=\")[1] : \"/market\"\r\n\r\n const dispatch = useDispatch()\r\n const userLogin = useSelector(state => state.userLogin)\r\n const { loading, error, userInfo } = userLogin\r\n \r\n useEffect(() => {\r\n if (userInfo) {\r\n toastInfoMessage(`Hey, nice to see you back ${userInfo.user.name}`)\r\n history.push(redirect)\r\n }\r\n }, [history,redirect,userInfo])\r\n\r\n const handleSubmit = (e) => {\r\n e.preventDefault()\r\n dispatch(login(email, password))\r\n }\r\n\r\n return (\r\n \r\n Sign In
\r\n {error && {error}}\r\n {loading && }\r\n \r\n Email Address\r\n setEmail(e.target.value)} />\r\n \r\n\r\n \r\n Password\r\n setPassword(e.target.value)} />\r\n \r\n Forget Password ?\r\n\r\n \r\n \r\n\r\n \r\n Or
\r\n
\r\n\r\n \r\n \r\n
\r\n\r\n \r\n \r\n Don't have an Account ? Create one\r\n \r\n
\r\n \r\n \r\n )\r\n}\r\n\r\nexport default LoginScreen\r\n","export const ORDER_CREATE_REQUEST = \"ORDER_CREATE_REQUEST\";\r\nexport const ORDER_CREATE_SUCCESS = \"ORDER_CREATE_SUCCESS\";\r\nexport const ORDER_CREATE_FAIL = \"ORDER_CREATE_FAIL\";\r\n\r\nexport const ORDER_DETAILS_REQUEST = \"ORDER_DETAILS_REQUEST\";\r\nexport const ORDER_DETAILS_SUCCESS = \"ORDER_DETAILS_SUCCESS\";\r\nexport const ORDER_DETAILS_FAIL = \"ORDER_DETAILS_FAIL\";\r\n\r\nexport const ORDER_MY_LIST_REQUEST = \"ORDER_MY_LIST_REQUEST\";\r\nexport const ORDER_MY_LIST_SUCCESS = \"ORDER_MY_LIST_SUCCESS\";\r\nexport const ORDER_MY_LIST_FAIL = \"ORDER_MY_LIST_FAIL\";\r\n\r\nexport const ORDER_LIST_REQUEST = \"ORDER_LIST_REQUEST\";\r\nexport const ORDER_LIST_SUCCESS = \"ORDER_LIST_SUCCESS\";\r\nexport const ORDER_LIST_FAIL = \"ORDER_LIST_FAIL\";\r\n\r\nexport const ORDER_PAY_REQUEST = \"ORDER_PAY_REQUEST\";\r\nexport const ORDER_PAY_SUCCESS = \"ORDER_PAY_SUCCESS\";\r\nexport const ORDER_PAY_FAIL = \"ORDER_PAY_FAIL\";\r\nexport const ORDER_PAY_RESET = \"ORDER_PAY_RESET\";\r\n\r\nexport const ORDER_DELIVER_REQUEST = \"ORDER_DELIVER_REQUEST\";\r\nexport const ORDER_DELIVER_SUCCESS = \"ORDER_DELIVER_SUCCESS\";\r\nexport const ORDER_DELIVER_FAIL = \"ORDER_DELIVER_FAIL\";\r\nexport const ORDER_DELIVER_RESET = \"ORDER_DELIVER_RESET\";\r\n\r\nexport const ORDER_DATA_REQUEST = \"ORDER_DATA_REQUEST\";\r\nexport const ORDER_DATA_SUCCESS = \"ORDER_DATA_SUCCESS\";\r\nexport const ORDER_DATA_FAIL = \"ORDER_DATA_FAIL\";\r\n\r\nexport const ORDER_SALE_DATA_REQUEST = \"ORDER_SALE_DATA_REQUEST\";\r\nexport const ORDER_SALE_DATA_SUCCESS = \"ORDER_SALE_DATA_SUCCESS\";\r\nexport const ORDER_SALE_DATA_FAIL = \"ORDER_SALE_DATA_FAIL\";\r\n\r\n\r\n","import axios from \"axios\";\r\nimport {\r\n ORDER_CREATE_FAIL, ORDER_CREATE_REQUEST, ORDER_CREATE_SUCCESS, ORDER_DATA_FAIL, ORDER_DATA_REQUEST, ORDER_DATA_SUCCESS, ORDER_DELIVER_FAIL, ORDER_DELIVER_REQUEST, ORDER_DELIVER_SUCCESS, ORDER_DETAILS_FAIL, ORDER_DETAILS_REQUEST, ORDER_DETAILS_SUCCESS, ORDER_LIST_FAIL, ORDER_LIST_REQUEST, ORDER_LIST_SUCCESS, ORDER_MY_LIST_FAIL, ORDER_MY_LIST_REQUEST, ORDER_MY_LIST_SUCCESS, ORDER_PAY_FAIL, ORDER_PAY_REQUEST, ORDER_PAY_SUCCESS, ORDER_SALE_DATA_FAIL, ORDER_SALE_DATA_REQUEST, ORDER_SALE_DATA_SUCCESS\r\n} from \"../../constants/orderConstants\";\r\n\r\nconst baseUrl = 'https://plantland.herokuapp.com'\r\n\r\nexport const createOrder = (order) => async (dispatch, getState) => {\r\n try {\r\n dispatch({\r\n type: ORDER_CREATE_REQUEST,\r\n });\r\n\r\n const {\r\n userLogin: { userInfo },\r\n } = getState();\r\n\r\n const config = {\r\n headers: {\r\n \"Content-Type\": \"application/json\",\r\n Authorization: `Bearer ${userInfo.token}`,\r\n },\r\n };\r\n\r\n const { data } = await axios.post(`${baseUrl}/api/orders`, order, config);\r\n\r\n dispatch({\r\n type: ORDER_CREATE_SUCCESS,\r\n payload: data,\r\n });\r\n /* dispatch({\r\n type: CART_CLEAR_ITEMS,\r\n payload: data,\r\n }) */\r\n /* localStorage.removeItem('cartItems') */\r\n } catch (error) {\r\n console.log(error);\r\n dispatch({\r\n type: ORDER_CREATE_FAIL,\r\n payload:\r\n error.response && error.response.data.message\r\n ? error.response.data.message\r\n : error.message,\r\n });\r\n /* if (message === 'Not authorized, token failed') {\r\n dispatch(logout())\r\n }\r\n dispatch({\r\n type: ORDER_CREATE_FAIL,\r\n payload: message,\r\n }) */\r\n }\r\n};\r\n\r\n\r\nexport const getOrderList = () => async (dispatch,getState) => {\r\n\r\n try {\r\n dispatch({\r\n type:ORDER_LIST_REQUEST\r\n })\r\n\r\n const { userLogin: { userInfo } } = getState()\r\n \r\n \r\n const config = {\r\n headers: {\r\n 'Content-Type': 'application/json',\r\n Authorization: `Bearer ${userInfo.token}`\r\n }\r\n }\r\n\r\n const { data } = await axios.get(`${baseUrl}/api/orders`,config)\r\n\r\n dispatch({\r\n type: ORDER_LIST_SUCCESS,\r\n payload:data\r\n })\r\n \r\n } catch (error) {\r\n console.log(error);\r\n dispatch({\r\n type: ORDER_LIST_FAIL,\r\n payload: error.response && error.response.data.message ? error.response.data.message : error.message\r\n \r\n })\r\n \r\n }\r\n \r\n}\r\n\r\nexport const getMyOrders = () => async (dispatch,getState) => {\r\n\r\n try {\r\n dispatch({\r\n type:ORDER_MY_LIST_REQUEST\r\n })\r\n\r\n const { userLogin: { userInfo } } = getState()\r\n \r\n \r\n const config = {\r\n headers: {\r\n 'Content-Type': 'application/json',\r\n Authorization: `Bearer ${userInfo.token}`\r\n }\r\n }\r\n\r\n const { data } = await axios.get(`${baseUrl}/api/orders/my-orders`,config)\r\n\r\n dispatch({\r\n type: ORDER_MY_LIST_SUCCESS,\r\n payload:data\r\n })\r\n \r\n } catch (error) {\r\n console.log(error);\r\n dispatch({\r\n type: ORDER_MY_LIST_FAIL,\r\n payload: error.response && error.response.data.message ? error.response.data.message : error.message\r\n \r\n })\r\n \r\n }\r\n \r\n}\r\n\r\nexport const getOrderDetails = (id) => async (dispatch,getState) => {\r\n\r\n try {\r\n \r\n dispatch({\r\n type:ORDER_DETAILS_REQUEST\r\n })\r\n\r\n const { userLogin: { userInfo } } = getState()\r\n \r\n \r\n const config = {\r\n headers: {\r\n 'Content-Type': 'application/json',\r\n Authorization: `Bearer ${userInfo.token}`\r\n }\r\n \r\n }\r\n \r\n\r\n const { data } = await axios.get(`${baseUrl}/api/orders/${id}`,config)\r\n dispatch({\r\n type: ORDER_DETAILS_SUCCESS,\r\n payload:data\r\n })\r\n \r\n } catch (error) {\r\n console.log(error);\r\n dispatch({\r\n type: ORDER_DETAILS_FAIL,\r\n payload: error.response && error.response.data.message ? error.response.data.message : error.message\r\n \r\n })\r\n \r\n }\r\n}\r\n\r\nexport const payOrder = (id,paymentResult) => async (dispatch,getState) => {\r\n\r\n try {\r\n dispatch({\r\n type:ORDER_PAY_REQUEST\r\n })\r\n\r\n const { userLogin: { userInfo } } = getState()\r\n \r\n \r\n const config = {\r\n headers: {\r\n 'Content-Type': 'application/json',\r\n Authorization: `Bearer ${userInfo.token}`\r\n }\r\n \r\n }\r\n\r\n const { data } = await axios.put(`${baseUrl}/api/orders/${id}/pay`,paymentResult,config)\r\n\r\n console.log(data);\r\n dispatch({\r\n type: ORDER_PAY_SUCCESS,\r\n payload:data\r\n })\r\n \r\n } catch (error) {\r\n console.log(error);\r\n dispatch({\r\n type: ORDER_PAY_FAIL,\r\n payload: error.response && error.response.data.message ? error.response.data.message : error.message\r\n \r\n })\r\n \r\n }\r\n \r\n}\r\n\r\nexport const deliverOrder = (order) => async (dispatch,getState) => {\r\n\r\n try {\r\n dispatch({\r\n type: ORDER_DELIVER_REQUEST\r\n })\r\n\r\n const { userLogin: { userInfo } } = getState()\r\n \r\n \r\n const config = {\r\n headers: {\r\n 'Content-Type': 'application/json',\r\n Authorization: `Bearer ${userInfo.token}`\r\n }\r\n \r\n }\r\n\r\n const { data } = await axios.put(`${baseUrl}/api/orders/${order._id}/deliver`,{},config)\r\n\r\n console.log(data);\r\n dispatch({\r\n type: ORDER_DELIVER_SUCCESS,\r\n payload:data\r\n })\r\n \r\n } catch (error) {\r\n console.log(error);\r\n dispatch({\r\n type: ORDER_DELIVER_FAIL,\r\n payload: error.response && error.response.data.message ? error.response.data.message : error.message\r\n \r\n })\r\n \r\n }\r\n \r\n}\r\n\r\n\r\n\r\nexport const getOrderData = () => async (dispatch,getState) => {\r\n\r\n try {\r\n dispatch({\r\n type:ORDER_DATA_REQUEST\r\n })\r\n\r\n const { userLogin: { userInfo } } = getState()\r\n \r\n \r\n const config = {\r\n headers: {\r\n 'Content-Type': 'application/json',\r\n Authorization: `Bearer ${userInfo.token}`\r\n }\r\n }\r\n\r\n const { data } = await axios.get(`${baseUrl}/api/orders/order-data`, config)\r\n\r\n dispatch({\r\n type: ORDER_DATA_SUCCESS,\r\n payload:data\r\n })\r\n \r\n } catch (error) {\r\n console.log(error);\r\n dispatch({\r\n type: ORDER_DATA_FAIL,\r\n payload: error.response && error.response.data.message ? error.response.data.message : error.message\r\n \r\n })\r\n \r\n }\r\n \r\n}\r\n\r\n\r\nexport const getSaleData = () => async (dispatch,getState) => {\r\n\r\n try {\r\n dispatch({\r\n type:ORDER_SALE_DATA_REQUEST\r\n })\r\n\r\n const { userLogin: { userInfo } } = getState()\r\n \r\n \r\n const config = {\r\n headers: {\r\n 'Content-Type': 'application/json',\r\n Authorization: `Bearer ${userInfo.token}`\r\n }\r\n }\r\n\r\n const { data } = await axios.get(`${baseUrl}/api/orders/saleDataByYear`, config)\r\n\r\n dispatch({\r\n type: ORDER_SALE_DATA_SUCCESS,\r\n payload:data\r\n })\r\n \r\n } catch (error) {\r\n console.log(error);\r\n dispatch({\r\n type: ORDER_SALE_DATA_FAIL,\r\n payload: error.response && error.response.data.message ? error.response.data.message : error.message\r\n \r\n })\r\n \r\n }\r\n \r\n}","import React from 'react'\r\nimport \"../../styles/ecommerce.css\"\r\nfunction Sidebar() {\r\n return (\r\n \r\n )\r\n}\r\n\r\nexport default Sidebar\r\n","import React, { useEffect } from 'react'\r\nimport { Col, Row, Table } from 'react-bootstrap'\r\nimport { useDispatch, useSelector } from 'react-redux'\r\nimport { getOrderData } from '../../../redux/actions/orderActions'\r\nimport \"../../../styles/ecommerce.css\"\r\nimport Loader from \"../Loader\"\r\nimport Message from \"../Message\"\r\nimport Sidebar from \"../Sidebar\"\r\n\r\n\r\nfunction OrderDataScreen({history}) {\r\n\r\n const dispatch = useDispatch()\r\n const { userInfo: { user } } = useSelector(state => state.userLogin)\r\n\r\n const order = useSelector(state => state.orderData)\r\n const { loading, error, orderData } = order\r\n\r\n // if(orderData) console.log(orderData)\r\n\r\n useEffect(() => {\r\n if (user && user.isAdmin) {\r\n dispatch(getOrderData())\r\n } else {\r\n history.push(\"/login\")\r\n }\r\n }, [dispatch,history,user])\r\n\r\n return (\r\n <>\r\n \r\n \r\n \r\n {loading ? : error ? {error} : (\r\n <>\r\n {orderData &&\r\n <>\r\n \r\n\r\n {/* Card-data */}\r\n \r\n
\r\n
\r\n \r\n
Total Orders
\r\n \r\n
{orderData.totalOrder}
\r\n
\r\n \r\n
\r\n \r\n
\r\n \r\n
Order Paid
\r\n \r\n
{orderData.totalPaidOrder}
\r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n
Order Delivered
\r\n \r\n
{orderData.totalDelivered}
\r\n
\r\n
\r\n
\r\n\r\n \r\n \r\n Top Sold Products
\r\n \r\n \r\n \r\n Plant | \r\n Quantity Sold | \r\n
\r\n \r\n \r\n {orderData?.productSaleData?.map(product => (\r\n \r\n {product._id} | \r\n {product.total} | \r\n
\r\n ))}\r\n \r\n
\r\n \r\n \r\n \r\n Top Buyers
\r\n \r\n \r\n \r\n Name | \r\n Email | \r\n Amount | \r\n
\r\n \r\n \r\n {orderData?.customerBuyData?.map(customer => (\r\n \r\n {customer.customer_name} | \r\n {customer.customer_email} | \r\n {Math.ceil(customer.total)} | \r\n
\r\n ))}\r\n \r\n
\r\n \r\n \r\n
\r\n\r\n >\r\n }\r\n \r\n \r\n >\r\n )}\r\n \r\n
\r\n \r\n >\r\n )\r\n}\r\n\r\nexport default OrderDataScreen\r\n","import React, { useEffect } from 'react'\r\nimport { Button, Col, Row, Table } from 'react-bootstrap'\r\nimport { useDispatch, useSelector } from 'react-redux'\r\nimport { LinkContainer } from 'react-router-bootstrap'\r\nimport { getOrderList } from '../../../redux/actions/orderActions'\r\nimport Loader from '../Loader'\r\nimport Message from '../Message'\r\nimport Sidebar from '../Sidebar'\r\n\r\nfunction OrderListScreen({history}) {\r\n\r\n const dispatch = useDispatch()\r\n const { userInfo: { user } } = useSelector(state => state.userLogin)\r\n \r\n \r\n const orderList = useSelector(state => state.orderList)\r\n const { loading, error, orders } = orderList\r\n \r\n useEffect(() => {\r\n if (user && user.isAdmin) {\r\n dispatch(getOrderList())\r\n } else {\r\n history.push(\"/login\")\r\n }\r\n }, [dispatch,history,user])\r\n\r\n\r\n return (\r\n <>\r\n \r\n \r\n \r\n \r\n \r\n {loading ? : error ? {error} : (\r\n <>\r\n All Orders
\r\n \r\n \r\n \r\n USER | \r\n DATE | \r\n TOTAL | \r\n PAID | \r\n Delivered | \r\n
\r\n \r\n \r\n {orders.map(order=>(\r\n \r\n {order.user && order.user.name} | \r\n {order.createdAt.substring(0, 10)} | \r\n ৳ {order.totalPrice} | \r\n \r\n {order?.isPaid ? order.paidAt.substring(0,10) : }\r\n | \r\n \r\n {order?.isDelivered ? order.deliverAt.substring(0,10) : }\r\n | \r\n \r\n \r\n \r\n \r\n | \r\n
\r\n ))}\r\n \r\n
\r\n >\r\n )}\r\n \r\n \r\n
\r\n \r\n > \r\n )\r\n}\r\n\r\nexport default OrderListScreen\r\n","import axios from \"axios\";\r\nimport React, { useEffect, useState } from \"react\";\r\nimport { Button, Card, Col, Image, ListGroup, Row } from \"react-bootstrap\";\r\nimport { PayPalButton } from 'react-paypal-button-v2';\r\nimport { useDispatch, useSelector } from \"react-redux\";\r\nimport { Link } from \"react-router-dom\";\r\nimport { ORDER_DELIVER_RESET, ORDER_PAY_RESET } from '../../../constants/orderConstants';\r\nimport { deliverOrder, getOrderDetails, payOrder } from \"../../../redux/actions/orderActions\";\r\nimport Loader from \"../Loader\";\r\nimport Message from \"../Message\";\r\n\r\nconst OrderScreen = ({ match,history }) => {\r\n\r\n const orderId = match.params.id\r\n const dispatch = useDispatch();\r\n\r\n const [sdkReady, setSdkReady] = useState(false)\r\n \r\n \r\n const orderDetails = useSelector((state) => state.orderDetails);\r\n const { order, loading, error } = orderDetails;\r\n \r\n const orderPay = useSelector((state) => state.orderPay);\r\n const { loading: loadingPay, success: successPay } = orderPay;\r\n \r\n const orderDeliver = useSelector((state) => state.orderDeliver);\r\n const { success: successDeliver } = orderDeliver;\r\n \r\n const userLogin = useSelector((state) => state.userLogin);\r\n const { userInfo:{user} } = userLogin;\r\n\r\n\r\n if (!loading) {\r\n const addDecimals = (num) => {\r\n return (Math.round(num * 100) / 100).toFixed(2);\r\n \r\n };\r\n order.itemsPrice = addDecimals(\r\n order?.orderedItems?.reduce((acc, item) => acc + item.price * item.qty, 0)\r\n ); \r\n }\r\n\r\n\r\n\r\n useEffect(() => {\r\n if (!user) {\r\n return history.push('/login')\r\n }\r\n \r\n const addPayPalScript = async (req, res) => {\r\n const { data: clientId } = await axios.get('/api/config/paypal')\r\n console.log(clientId);\r\n\r\n const script = document.createElement('script')\r\n script.type = 'text/javascript'\r\n script.src = `https://www.paypal.com/sdk/js?client-id=${clientId}`\r\n script.async = true\r\n script.onload = () => {\r\n setSdkReady(true)\r\n }\r\n document.body.appendChild(script)\r\n \r\n }\r\n \r\n if (!order || successPay) {\r\n dispatch({ type: ORDER_PAY_RESET })\r\n dispatch({ type: ORDER_DELIVER_RESET })\r\n dispatch(getOrderDetails(orderId))\r\n } else if (!order.isPaid) {\r\n if (!window.paypal) {\r\n addPayPalScript()\r\n }else setSdkReady(true)\r\n }\r\n\r\n }, [dispatch,order,orderId,successPay,successDeliver,history,user])\r\n\r\n const successPaymentHandler = (paymentResult) => {\r\n dispatch(payOrder(orderId,paymentResult))\r\n }\r\n\r\n const handleDeliver = () => {\r\n dispatch(deliverOrder(order))\r\n }\r\n\r\n // console.log(order._id)\r\n\r\n return loading ? : error ? {error} :\r\n <>\r\n Order {order._id}
\r\n \r\n \r\n \r\n \r\n Shipping
\r\n Name: {order.user.name}
\r\n Email: {order.user.email}
\r\n \r\n Address: \r\n {order.shippingAddress.address}, {order.shippingAddress.city}{\" \"}\r\n {order.shippingAddress.thana}, {order.shippingAddress.houseNumber}\r\n
\r\n {order.isDelivered ? Delivery Done : Not Delivered}\r\n \r\n \r\n \r\n\r\n \r\n Payment Method
\r\n \r\n Method: \r\n {order.paymentMethod}\r\n
\r\n\r\n {order.isPaid ? Payment Done : Not Paid }\r\n \r\n \r\n \r\n Order Items
\r\n {order?.orderedItems?.length === 0 ? (\r\n Order is empty\r\n ) : (\r\n \r\n {order?.orderedItems?.map((item, index) => (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {item.name}\r\n \r\n \r\n \r\n {item.qty} x ৳{item.price} = ৳{item.qty * item.price}\r\n \r\n
\r\n \r\n ))}\r\n \r\n )}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Order Summary
\r\n \r\n \r\n \r\n Items\r\n ৳{order.itemsPrice}\r\n
\r\n \r\n \r\n \r\n Delivery Charge\r\n ৳{order.shippingPrice}\r\n
\r\n \r\n\r\n \r\n \r\n Total\r\n ৳{order.totalPrice}\r\n
\r\n \r\n \r\n {user && !user.isAdmin && !order.isPaid && (\r\n \r\n {loadingPay && }\r\n {!sdkReady ? : (\r\n \r\n )}\r\n \r\n \r\n )}\r\n\r\n {user && user.isAdmin && order.isPaid && !order.isDelivered && (\r\n \r\n \r\n \r\n )}\r\n \r\n \r\n \r\n \r\n
\r\n >\r\n \r\n};\r\n\r\nexport default OrderScreen;\r\n","import axios from 'axios'\r\nimport React, { useState } from 'react'\r\nimport { Button, Form } from 'react-bootstrap'\r\nimport FormContainer from '../FormContainer'\r\nimport Message from '../Message'\r\nimport { toastSuccessMessage } from '../ToastMessage'\r\n\r\nfunction ForgetPasswordScreen({match,history}) {\r\n const [password, setPassword] = useState('')\r\n const [confirmPassword, setConfirmPassword] = useState('')\r\n const [error, setError] = useState('')\r\n\r\n const clear = (errorText) => {\r\n setPassword(\"\")\r\n setConfirmPassword(\"\")\r\n setTimeout(() => {\r\n setError(\"\")\r\n }, 3000);\r\n return setError(errorText)\r\n }\r\n\r\n const handleSubmit = async (e) => {\r\n e.preventDefault()\r\n\r\n if (password.length < 6) {\r\n return clear(\"Password must be at least 6 characters\")\r\n } \r\n if (password !== confirmPassword) {\r\n return clear(\"Password doesn't match\")\r\n }\r\n\r\n\r\n const config = {\r\n headers: {\r\n 'Content-Type': 'application/json'\r\n }\r\n }\r\n\r\n \r\n try {\r\n await axios.put(`/api/users/reset-password/${match.params.resetToken}`, { password }, config)\r\n toastSuccessMessage(\"You're password has been updated\")\r\n history.push(\"/login\")\r\n \r\n } catch (error) {\r\n setError(error.response && error.response.data.message ? error.response.data.message : error.message)\r\n setPassword(\"\")\r\n setConfirmPassword(\"\")\r\n setTimeout(() => {\r\n setError(\"\")\r\n }, 3000);\r\n\r\n }\r\n }\r\n return (\r\n \r\n Reset Your Password
\r\n {error && {error}}\r\n \r\n Password\r\n setPassword(e.target.value)} />\r\n \r\n\r\n \r\n Retype Password\r\n setConfirmPassword(e.target.value)} />\r\n \r\n\r\n \r\n \r\n \r\n )\r\n}\r\n\r\nexport default ForgetPasswordScreen\r\n","import React from \"react\";\r\nimport { Nav } from \"react-bootstrap\";\r\nimport { LinkContainer } from \"react-router-bootstrap\";\r\n\r\nconst CheckoutSteps = ({ step1, step2, step3, step4 }) => {\r\n return (\r\n \r\n );\r\n};\r\n\r\nexport default CheckoutSteps;\r\n","import React, { useState } from \"react\";\r\nimport { Form, Button, Col } from \"react-bootstrap\";\r\nimport { useDispatch, useSelector } from \"react-redux\";\r\nimport FormContainer from \"../FormContainer\";\r\nimport CheckoutSteps from \"../CheckoutSteps\";\r\nimport { savePaymentMethod } from \"../../../redux/actions/cartActions\";\r\n\r\nconst PaymentScreen = ({ history }) => {\r\n const cart = useSelector((state) => state.cart);\r\n const { shippingAddress } = cart;\r\n\r\n if (!shippingAddress.address) {\r\n history.push(\"/shipping\");\r\n }\r\n\r\n const [paymentMethod, setPaymentMethod] = useState(\"PayPal\");\r\n\r\n const dispatch = useDispatch();\r\n\r\n const submitHandler = (e) => {\r\n e.preventDefault();\r\n dispatch(savePaymentMethod(paymentMethod));\r\n history.push(\"/placeorder\");\r\n };\r\n\r\n return (\r\n \r\n \r\n Payment Method
\r\n \r\n Select Method \r\n \r\n setPaymentMethod(e.target.value)}\r\n >\r\n setPaymentMethod(e.target.value)}\r\n >\r\n\r\n setPaymentMethod(e.target.value)}\r\n >\r\n \r\n \r\n\r\n \r\n \r\n \r\n );\r\n};\r\n\r\nexport default PaymentScreen;\r\n","import React, { useEffect } from \"react\";\r\nimport { Button, Card, Col, Image, ListGroup, Row } from \"react-bootstrap\";\r\nimport { useDispatch, useSelector } from \"react-redux\";\r\nimport { Link } from \"react-router-dom\";\r\nimport { createOrder } from \"../../../redux/actions/orderActions\";\r\nimport CheckoutSteps from \"../CheckoutSteps\";\r\nimport Message from \"../Message\";\r\nimport { toastSuccessMessage } from \"../ToastMessage\";\r\n\r\nconst PlaceOrderScreen = ({ history }) => {\r\n const dispatch = useDispatch();\r\n\r\n const cart = useSelector((state) => state.cart);\r\n\r\n const orderCreate = useSelector((state) => state.orderCreate);\r\n const { order,success,error } = orderCreate;\r\n\r\n useEffect(() => {\r\n if (success) {\r\n history.push(`/order/${order._id}`);\r\n }\r\n // eslint-disable-next-line\r\n }, [history, success]);\r\n\r\n const placeOrderHandler = () => {\r\n\r\n dispatch(\r\n createOrder({\r\n orderItems: cart.cartItems,\r\n shippingAddress: cart.shippingAddress,\r\n paymentMethod: cart.paymentMethod,\r\n itemsPrice: cart.itemsPrice,\r\n shippingPrice: cart.shippingPrice,\r\n totalPrice: cart.totalPrice,\r\n })\r\n );\r\n toastSuccessMessage(\"You're order has been placed\")\r\n \r\n };\r\n //Calculate Price\r\n const addDecimals = (num) => {\r\n return (Math.round(num * 100) / 100).toFixed(2);\r\n };\r\n\r\n cart.itemsPrice = addDecimals(\r\n cart.cartItems.reduce((acc, item) => acc + item.price * item.qty, 0)\r\n );\r\n cart.shippingPrice = 30;\r\n\r\n cart.totalPrice = Number(cart.itemsPrice) + Number(cart.shippingPrice);\r\n\r\n return (\r\n <>\r\n \r\n \r\n \r\n \r\n \r\n Delivery Location
\r\n \r\n Address:\r\n {cart.shippingAddress.address}, {cart.shippingAddress.city}{\" \"}\r\n {cart.shippingAddress.thana}, {cart.shippingAddress.houseNumber}\r\n
\r\n \r\n\r\n \r\n Payment Method
\r\n Method: \r\n {cart.paymentMethod}\r\n \r\n \r\n Order Items
\r\n {cart.cartItems.length === 0 ? (\r\n Your cart is empty\r\n ) : (\r\n \r\n {cart.cartItems.map((item, index) => (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {item.name}\r\n \r\n \r\n \r\n {item.qty} x ৳{item.price} = ৳{item.qty * item.price}\r\n \r\n
\r\n \r\n ))}\r\n \r\n )}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Order Summary
\r\n \r\n \r\n \r\n Items\r\n ৳{cart.itemsPrice}\r\n
\r\n \r\n \r\n \r\n Delivery Charge\r\n ৳{cart.shippingPrice}\r\n
\r\n \r\n {/* \r\n \r\n Tax\r\n ${cart.taxPrice}\r\n
\r\n */}\r\n \r\n \r\n Total\r\n ৳{cart.totalPrice}\r\n
\r\n \r\n \r\n {error && {error}}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n >\r\n );\r\n};\r\n\r\nexport default PlaceOrderScreen;\r\n","import axios from 'axios'\r\nimport React, { useEffect, useState } from 'react'\r\nimport { Button, Form } from 'react-bootstrap'\r\nimport { useDispatch, useSelector } from 'react-redux'\r\nimport { Link } from 'react-router-dom'\r\nimport { PRODUCT_UPDATE_RESET } from '../../../constants/productConstants'\r\nimport { fetchProductById, updateProduct } from '../../../redux/actions/productActions'\r\nimport FormContainer from '../FormContainer'\r\nimport Loader from '../Loader'\r\nimport Message from '../Message'\r\nimport { toastSuccessMessage } from '../ToastMessage'\r\n\r\nconst ProductEditScreen = ({ match, history }) => {\r\n const productId = match.params.id\r\n\r\n const [name, setName] = useState('')\r\n const [description, setDescription] = useState('')\r\n const [category, setCategory] = useState('')\r\n const [price, setPrice] = useState(0)\r\n const [countInStock, setCountInStock] = useState(0)\r\n const [image, setImage] = useState('')\r\n const [uploading, setUploading] = useState(false)\r\n\r\n const dispatch = useDispatch()\r\n\r\n const productDetails = useSelector((state) => state.productDetails)\r\n const { loading, error, product } = productDetails\r\n const productUpdate = useSelector((state) => state.productUpdate)\r\n const { loading:loadingUpdate, error:errorUpdate, success:successUpdate } = productUpdate\r\n\r\n\r\n useEffect(() => {\r\n if (successUpdate) {\r\n dispatch({ type: PRODUCT_UPDATE_RESET })\r\n toastSuccessMessage(\"Product Updated\")\r\n history.push(\"/admin/productlist\")\r\n\r\n } else {\r\n if (!product.name || product._id !== productId) {\r\n dispatch(fetchProductById(productId))\r\n } else { \r\n setName(product.name)\r\n setDescription(product.description)\r\n setCategory(product.category)\r\n setImage(product.image)\r\n setPrice(product.price)\r\n setCountInStock(product.countInStock)\r\n }\r\n }\r\n\r\n }, [dispatch,product,productId,successUpdate,history])\r\n\r\n const submitHandler = (e) => {\r\n e.preventDefault()\r\n dispatch(updateProduct({\r\n _id: product._id,name,description,image,category,price,countInStock\r\n }))\r\n }\r\n\r\n const handleFileUpload = async (e) => {\r\n const file = e.target.files[0]\r\n const formData = new FormData()\r\n formData.append('image', file)\r\n setUploading(true)\r\n\r\n try {\r\n const config = {\r\n headers: {\r\n 'Content-Type':'multipart/form-data'\r\n }\r\n }\r\n const { data } = await axios.post(`/api/uploads`, formData, config)\r\n console.log(data);\r\n setImage(data)\r\n setUploading(false)\r\n\r\n } catch (error) {\r\n console.log(error)\r\n setUploading(false)\r\n }\r\n }\r\n\r\n return (\r\n <>\r\n \r\n Go Back\r\n \r\n \r\n Edit Product
\r\n {loadingUpdate && }\r\n {errorUpdate && {errorUpdate}}\r\n {loading ? (\r\n \r\n ) : error ? (\r\n {error}\r\n ) : (\r\n \r\n Name\r\n setName(e.target.value)}\r\n >\r\n \r\n\r\n \r\n Description\r\n setDescription(e.target.value)}\r\n >\r\n \r\n\r\n \r\n Category\r\n setCategory(e.target.value)}\r\n >\r\n \r\n \r\n \r\n Enter Image URL\r\n setImage(e.target.value)}\r\n >\r\n \r\n \r\n {uploading && }\r\n \r\n \r\n \r\n Price\r\n setPrice(e.target.value)}\r\n >\r\n \r\n \r\n \r\n Count In Stock\r\n setCountInStock(e.target.value)}\r\n >\r\n \r\n \r\n \r\n )}\r\n \r\n >\r\n )\r\n}\r\n\r\nexport default ProductEditScreen","import React, { useEffect } from 'react'\r\nimport { Button, Col, Row, Table } from 'react-bootstrap'\r\nimport { useDispatch, useSelector } from 'react-redux'\r\nimport { LinkContainer } from 'react-router-bootstrap'\r\nimport { PRODUCT_CREATE_RESET } from '../../../constants/productConstants'\r\nimport { createProduct, deleteProduct, fetchProducts } from '../../../redux/actions/productActions'\r\nimport Loader from '../Loader'\r\nimport Message from '../Message'\r\nimport Sidebar from '../Sidebar'\r\nimport { toastErrorMessage } from '../ToastMessage'\r\n\r\nfunction ProductListScreen({history}) {\r\n\r\n const dispatch = useDispatch()\r\n\r\n const { userInfo: { user } } = useSelector(state => state.userLogin)\r\n \r\n const productList = useSelector(state => state.productList)\r\n const { loading, error, products } = productList\r\n\r\n const productCreate = useSelector(state => state.productCreate)\r\n const { loading: loadingCreate, error: errorCreate, success: successCreate, product:createdProduct } = productCreate\r\n const productDelete = useSelector(state => state.productDelete)\r\n const { loading:loadingDelete, error:errorDelete, success:successDelete } = productDelete\r\n \r\n\r\n useEffect(() => {\r\n dispatch({ type: PRODUCT_CREATE_RESET })\r\n \r\n if (!user.isAdmin) \r\n history.push('/login')\r\n\r\n if (successCreate) {\r\n history.push(`/admin/product/${createdProduct._id}/edit`)\r\n } \r\n else {\r\n dispatch(fetchProducts())\r\n }\r\n }, [dispatch,history,user,successDelete,successCreate,createdProduct])\r\n\r\n const handleDelete = (id) => {\r\n if (window.confirm('Are you sure you want to delete this product ?')) {\r\n dispatch(deleteProduct(id))\r\n if(!errorDelete)\r\n toastErrorMessage(\"Product deleted\")\r\n }\r\n }\r\n const handleCreateProduct = () => {\r\n dispatch(createProduct())\r\n }\r\n\r\n return (\r\n <>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Products
\r\n \r\n \r\n \r\n \r\n
\r\n \r\n {loadingCreate && }\r\n {errorCreate && {errorCreate}}\r\n {loadingDelete && }\r\n {errorDelete && {errorDelete}}\r\n \r\n {loading ? : error ? {error} : (\r\n \r\n <>\r\n \r\n \r\n \r\n \r\n \r\n Product ID | \r\n Name | \r\n Price | \r\n Category | \r\n In Stock | \r\n
\r\n \r\n \r\n {products.map(product=>(\r\n \r\n {product._id} | \r\n {product.name} | \r\n ৳ {product.price} | \r\n {product.category} | \r\n {product.countInStock} | \r\n \r\n \r\n \r\n \r\n | \r\n \r\n \r\n | \r\n
\r\n ))}\r\n \r\n \r\n
\r\n >\r\n )}\r\n \r\n
\r\n \r\n > \r\n )\r\n}\r\n\r\nexport default ProductListScreen\r\n","import React, { useEffect, useState } from 'react'\r\nimport { Button, Card, Col, Form, FormControl, Image, ListGroup, Row } from 'react-bootstrap'\r\nimport { useDispatch, useSelector } from 'react-redux'\r\nimport { Link } from 'react-router-dom'\r\nimport { PRODUCT_CREATE_REVIEW_RESET } from '../../../constants/productConstants'\r\nimport { createProductReview, fetchProductById } from '../../../redux/actions/productActions'\r\nimport '../../../styles/ecommerce.css'\r\nimport Loader from '../Loader'\r\nimport Message from '../Message'\r\nimport Rating from '../Rating'\r\nimport { toastSuccessMessage } from '../ToastMessage'\r\n\r\nfunction ProductScreen({ match,history }) {\r\n \r\n const [qty, setQty] = useState(1)\r\n const [rating, setRating] = useState(0)\r\n const [comment, setComment] = useState(\"\")\r\n\r\n const dispatch = useDispatch()\r\n\r\n const productDetails = useSelector(state => state.productDetails)\r\n const { loading, error, product } = productDetails\r\n\r\n const productReview = useSelector(state => state.productCreateReview)\r\n const { error: reviewError, success: reviewSuccess } = productReview\r\n \r\n const userLogin = useSelector(state => state.userLogin)\r\n const { userInfo } = userLogin\r\n\r\n useEffect(() => {\r\n if (reviewSuccess) {\r\n toastSuccessMessage('Thank you for submitting a review')\r\n setRating(0)\r\n setComment('')\r\n dispatch({type:PRODUCT_CREATE_REVIEW_RESET})\r\n }\r\n else if (reviewError) {\r\n setTimeout(() => {\r\n dispatch({type:PRODUCT_CREATE_REVIEW_RESET})\r\n }, 4000);\r\n }\r\n dispatch(fetchProductById(match.params.id))\r\n }, [dispatch,match,reviewSuccess,reviewError])\r\n\r\n const addToCartHandler = () => {\r\n history.push(`/cart/${match.params.id}?qty=${qty}`)\r\n }\r\n\r\n const handleSubmit = (e) => {\r\n e.preventDefault()\r\n dispatch(createProductReview(match.params.id, {\r\n rating,\r\n comment\r\n }))\r\n }\r\n\r\n return (\r\n \r\n
Go Back\r\n {loading ?
: error ?
{error} : (\r\n <> \r\n
\r\n \r\n \r\n \r\n\r\n \r\n \r\n {product.name}
\r\n {product.description}\r\n \r\n ৳ {product.price}\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n Price : \r\n {product.price} Taka\r\n
\r\n \r\n \r\n \r\n Status : \r\n {product.countInStock > 0 ? \"In Stock \" : \"Out of Stock\"}\r\n
\r\n \r\n {product.countInStock > 0 && (\r\n \r\n \r\n Qty\r\n \r\n setQty(e.target.value)}\r\n >\r\n {[...Array(product.countInStock).keys()].map(p => (\r\n \r\n ))}\r\n \r\n \r\n
\r\n \r\n )}\r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n
\r\n \r\n {product.reviews.length === 0 && No Reviews}\r\n \r\n {product.reviews.map(r => (\r\n \r\n {r.name}\r\n \r\n {r.createdAt.substring(0,10)}
\r\n {r.comment}
\r\n \r\n ))}\r\n \r\n Write a review
\r\n {userInfo ? (<>\r\n {reviewError && {reviewError}}\r\n \r\n Give a rating\r\n setRating(e.target.value)}>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Write a comment\r\n setComment(e.target.value)} />\r\n \r\n\r\n \r\n\r\n \r\n \r\n >) : Please sign in to write a review}\r\n \r\n
\r\n >\r\n )}\r\n \r\n
\r\n\r\n )\r\n}\r\n\r\nexport default ProductScreen\r\n","import React, { useEffect, useState } from 'react'\r\nimport { Button, Col, Form, Row, Table } from 'react-bootstrap'\r\nimport { useDispatch, useSelector } from 'react-redux'\r\nimport { LinkContainer } from 'react-router-bootstrap'\r\nimport { useLocation } from 'react-router-dom'\r\nimport { getMyOrders } from '../../../redux/actions/orderActions'\r\nimport { getUserDetails, updateUserProfile } from '../../../redux/actions/userActions'\r\nimport Loader from '../Loader'\r\nimport Message from '../Message'\r\nimport { toastSuccessMessage } from '../ToastMessage'\r\n\r\n\r\nfunction ProfileScreen({history}) {\r\n\r\n const [email, setEmail] = useState('')\r\n const [name, setName] = useState('')\r\n const [password, setPassword] = useState('')\r\n const [confirmPassword, setConfirmPassword] = useState('')\r\n\r\n const dispatch = useDispatch()\r\n const location = useLocation()\r\n\r\n const userLogin = useSelector(state => state.userLogin)\r\n const {userInfo} = userLogin\r\n\r\n const userDetails = useSelector(state => state.userDetails)\r\n const { loading, error, user } = userDetails\r\n\r\n const myOrderList = useSelector(state => state.myOrderList)\r\n const { loading: loadingOrders, error: errorOrders, orders } = myOrderList\r\n\r\n \r\n useEffect(() => {\r\n if (!userInfo) {\r\n history.push(\"/login\")\r\n }\r\n else {\r\n // for google users\r\n if (userInfo.token.length > 500) {\r\n setEmail(userInfo.user.email)\r\n setName(userInfo.user.name)\r\n \r\n } else {\r\n if (!user.name) { \r\n dispatch(getUserDetails('profile'))\r\n dispatch(getMyOrders())\r\n }\r\n \r\n else {\r\n setEmail(user.email)\r\n setName(user.name)\r\n }\r\n }\r\n }\r\n }, [history,userInfo,dispatch,user,location,name])\r\n\r\n const handleSubmit = (e) => {\r\n e.preventDefault()\r\n dispatch(updateUserProfile({ id: user._id, email, name, password }))\r\n toastSuccessMessage(\"Your profile has been updated\")\r\n }\r\n\r\n return (\r\n \r\n \r\n User Profile
\r\n {error && {error}}\r\n {loading && }\r\n \r\n Name\r\n setName(e.target.value)} />\r\n \r\n\r\n \r\n Email Address\r\n setEmail(e.target.value)} />\r\n \r\n\r\n \r\n Password\r\n setPassword(e.target.value)} />\r\n \r\n\r\n \r\n Retype Password\r\n setConfirmPassword(e.target.value)} />\r\n \r\n\r\n \r\n \r\n \r\n \r\n <>\r\n MY Orders
\r\n {loadingOrders ? : errorOrders ? {errorOrders} : (\r\n \r\n \r\n \r\n ID | \r\n DATE | \r\n TOTAL | \r\n PAID | \r\n Delivered | \r\n | \r\n
\r\n \r\n \r\n {orders.map(order=>(\r\n \r\n {order._id} | \r\n {order.createdAt.substring(0, 10)} | \r\n ৳ {order.totalPrice} | \r\n \r\n {order.isPaid ? order.paidAt.substring(0,10) : }\r\n | \r\n \r\n {order.isDelivered ? order.deliverAt.substring(0,10) : }\r\n | \r\n \r\n \r\n \r\n \r\n | \r\n
\r\n ))}\r\n \r\n
\r\n )}\r\n >\r\n \r\n
\r\n )\r\n}\r\n\r\nexport default ProfileScreen\r\n","import React, { useEffect, useState } from 'react'\r\nimport { Button, Col, Form, Row } from 'react-bootstrap'\r\nimport { useDispatch, useSelector } from 'react-redux'\r\nimport { Link } from 'react-router-dom'\r\nimport { toast } from 'react-toastify'\r\nimport 'react-toastify/dist/ReactToastify.css'\r\nimport { register } from '../../../redux/actions/userActions'\r\nimport FormContainer from '../FormContainer'\r\nimport GoogleAuth from '../GoogleAuth'\r\nimport Loader from '../Loader'\r\nimport Message from '../Message'\r\ntoast.configure()\r\n\r\nfunction RegisterScreen({location,history}) {\r\n\r\n const [name, setName] = useState('')\r\n const [email, setEmail] = useState('')\r\n const [password, setPassword] = useState('')\r\n const [confirmPassword, setConfirmPassword] = useState('')\r\n\r\n const redirect = location.search ? location.search.split(\"=\")[1] : \"/login\"\r\n\r\n const dispatch = useDispatch()\r\n const userRegister = useSelector(state => state.userRegister)\r\n const { loading, error, userInfo } = userRegister\r\n \r\n useEffect(() => {\r\n if (userInfo) {\r\n toast.success(\"Account created successfully. Please login to see profile\", {autoClose: 3000,})\r\n history.push(\"/login\")\r\n }\r\n }, [history,redirect,userInfo])\r\n\r\n const handleSubmit = (e) => {\r\n e.preventDefault()\r\n dispatch(register(name,email,password,confirmPassword))\r\n }\r\n\r\n return (\r\n \r\n Sign Up
\r\n {error && {error}}\r\n {loading && }\r\n \r\n Name\r\n setName(e.target.value)} />\r\n \r\n\r\n \r\n Email Address\r\n setEmail(e.target.value)} />\r\n \r\n\r\n \r\n Password\r\n setPassword(e.target.value)} />\r\n \r\n\r\n \r\n Retype Password\r\n setConfirmPassword(e.target.value)} />\r\n \r\n\r\n \r\n \r\n\r\n \r\n Or
\r\n
\r\n\r\n \r\n \r\n
\r\n\r\n \r\n \r\n Already Have an Account ? Sign in\r\n \r\n
\r\n \r\n \r\n \r\n )\r\n}\r\n\r\nexport default RegisterScreen\r\n","import React from 'react';\r\nimport { Bar } from 'react-chartjs-2';\r\n\r\nfunction BarChart({ orderData }) {\r\n \r\n const saleByMonth = []\r\n if (orderData) {\r\n for (let od of orderData) {\r\n saleByMonth.push(od.numOfOrder)\r\n }\r\n }\r\n\r\n\r\n const data = {\r\n labels: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"],\r\n datasets: [\r\n {\r\n label: '# of Sales by Months',\r\n data: saleByMonth,\r\n backgroundColor: [\r\n 'rgba(0,158,96, 0.2)',\r\n 'rgba(0,158,96, 0.2)',\r\n 'rgba(0,158,96, 0.2)',\r\n 'rgba(0,158,96, 0.2)',\r\n 'rgba(0,158,96, 0.2)',\r\n 'rgba(0,158,96, 0.2)',\r\n 'rgba(0,158,96, 0.2)',\r\n 'rgba(0,158,96, 0.2)',\r\n 'rgba(0,158,96, 0.2)',\r\n 'rgba(0,158,96, 0.2)',\r\n 'rgba(0,158,96, 0.2)',\r\n 'rgba(0,158,96, 0.2)',\r\n \r\n ],\r\n \r\n borderColor: [\r\n 'rgba(0,158,96, 0.8)',\r\n 'rgba(0,158,96, 0.8)',\r\n 'rgba(0,158,96, 0.8)',\r\n 'rgba(0,158,96, 0.8)',\r\n 'rgba(0,158,96, 0.8)',\r\n 'rgba(0,158,96, 0.8)',\r\n 'rgba(0,158,96, 0.8)',\r\n 'rgba(0,158,96, 0.8)',\r\n 'rgba(0,158,96, 0.8)',\r\n 'rgba(0,158,96, 0.8)',\r\n 'rgba(0,158,96, 0.8)',\r\n 'rgba(0,158,96, 0.8)',\r\n 'rgba(0,158,96, 0.8)',\r\n ],\r\n \r\n borderWidth: 1,\r\n },\r\n ],\r\n };\r\n \r\n const options = {\r\n scales: {\r\n yAxes: [\r\n {\r\n ticks: {\r\n beginAtZero: true,\r\n },\r\n },\r\n ],\r\n },\r\n };\r\n return (\r\n \r\n \r\n
\r\n )\r\n}\r\n\r\nexport default BarChart\r\n","import React from 'react';\r\nimport { Line } from 'react-chartjs-2';\r\n\r\nfunction LineChart({ orderData }) {\r\n const saleByMonth=[]\r\n if (orderData) {\r\n for (let od of orderData) {\r\n saleByMonth.push(od.numOfOrder)\r\n }\r\n }\r\n const data = {\r\n \r\n labels: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"],\r\n datasets: [\r\n {\r\n label: '# of Sales By Month',\r\n data: saleByMonth,\r\n fill: false,\r\n pointRadius:5,\r\n backgroundColor: 'rgb(0,158,96)',\r\n borderColor: 'rgba(0,158,96, 0.2)',\r\n },\r\n ],\r\n };\r\n \r\n\r\n const options = {\r\n scales: {\r\n yAxes: [\r\n {\r\n ticks: {\r\n beginAtZero: true,\r\n },\r\n },\r\n ],\r\n },\r\n };\r\n\r\n return (\r\n \r\n \r\n
\r\n )\r\n}\r\n\r\nexport default LineChart\r\n","import React from 'react';\r\nimport { Bar } from 'react-chartjs-2';\r\n\r\nfunction BarChart({ monthSaleData }) {\r\n \r\n const saleByMonth = []\r\n if (monthSaleData) {\r\n for (let i = 1; i <= monthSaleData.length;i++) {\r\n saleByMonth.push(monthSaleData[i])\r\n }\r\n }\r\n\r\n const daysOfMonthLabel = []\r\n const colorArray = []\r\n const colorArrayBorder = []\r\n\r\n for (let i = 0; i < monthSaleData.length; i++) {\r\n daysOfMonthLabel[i] = i + 1\r\n colorArray[i] = 'rgba(0,158,96, 0.2)'\r\n colorArrayBorder[i]='rgba(0,158,96, 0.8)'\r\n }\r\n\r\n const data = {\r\n labels: daysOfMonthLabel,\r\n datasets: [\r\n {\r\n label: 'Sale per day',\r\n data: saleByMonth,\r\n backgroundColor: colorArray,\r\n borderColor: colorArrayBorder,\r\n \r\n borderWidth: 1,\r\n },\r\n ],\r\n };\r\n \r\n const options = {\r\n scales: {\r\n yAxes: [\r\n {\r\n ticks: {\r\n beginAtZero: true,\r\n },\r\n },\r\n ],\r\n },\r\n };\r\n return (\r\n \r\n \r\n
\r\n )\r\n}\r\n\r\nexport default BarChart\r\n","import React from 'react';\r\nimport { Bar } from 'react-chartjs-2';\r\n\r\nfunction ProductSaleBarChart({ monthWiseQty,productName}) {\r\n\r\n\r\n const data = {\r\n labels: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"],\r\n datasets: [\r\n {\r\n label: `Sale of ${productName} by each month`,\r\n data: monthWiseQty,\r\n backgroundColor: [\r\n 'rgba(0,158,96, 0.2)',\r\n 'rgba(0,158,96, 0.2)',\r\n 'rgba(0,158,96, 0.2)',\r\n 'rgba(0,158,96, 0.2)',\r\n 'rgba(0,158,96, 0.2)',\r\n 'rgba(0,158,96, 0.2)',\r\n 'rgba(0,158,96, 0.2)',\r\n 'rgba(0,158,96, 0.2)',\r\n 'rgba(0,158,96, 0.2)',\r\n 'rgba(0,158,96, 0.2)',\r\n 'rgba(0,158,96, 0.2)',\r\n 'rgba(0,158,96, 0.2)',\r\n \r\n ],\r\n \r\n borderColor: [\r\n 'rgba(0,158,96, 0.8)',\r\n 'rgba(0,158,96, 0.8)',\r\n 'rgba(0,158,96, 0.8)',\r\n 'rgba(0,158,96, 0.8)',\r\n 'rgba(0,158,96, 0.8)',\r\n 'rgba(0,158,96, 0.8)',\r\n 'rgba(0,158,96, 0.8)',\r\n 'rgba(0,158,96, 0.8)',\r\n 'rgba(0,158,96, 0.8)',\r\n 'rgba(0,158,96, 0.8)',\r\n 'rgba(0,158,96, 0.8)',\r\n 'rgba(0,158,96, 0.8)',\r\n 'rgba(0,158,96, 0.8)',\r\n ],\r\n \r\n borderWidth: 1,\r\n },\r\n ],\r\n };\r\n \r\n const options = {\r\n scales: {\r\n yAxes: [\r\n {\r\n ticks: {\r\n beginAtZero: true,\r\n },\r\n },\r\n ],\r\n },\r\n };\r\n return (\r\n \r\n \r\n
\r\n )\r\n}\r\n\r\nexport default ProductSaleBarChart\r\n","import React from 'react';\r\nimport { Pie } from 'react-chartjs-2';\r\n\r\nfunction SalesPieChart({ pie_data }) {\r\n \r\n\r\n const dataLabel = []\r\n const dataValues = []\r\n\r\n for (let pd of pie_data) {\r\n const val = parseInt(pd.value)\r\n dataLabel.push(pd.name)\r\n dataValues.push(val)\r\n }\r\n\r\n const bgColPalette = [\r\n 'rgba(255, 99, 132, 0.2)', //Red\r\n 'rgba(54, 162, 235, 0.2)', //Blue\r\n 'rgba(255, 206, 86, 0.2)', // Yellow\r\n 'rgba(75, 192, 192, 0.2)', // Green\r\n 'rgba(153, 102, 255, 0.2)', // Purple\r\n 'rgba(255, 159, 64, 0.2)', // Orange\r\n 'rgba(255, 99, 132, 0.8)', //Red\r\n 'rgba(54, 162, 235, 0.8)', //Blue\r\n 'rgba(255, 206, 86, 0.8)', // Yellow\r\n 'rgba(75, 192, 192, 0.8)', // Green\r\n 'rgba(153, 102, 255, 0.8)', // Purple\r\n 'rgba(255, 159, 64, 0.8)', // Orange\r\n 'rgba(255, 99, 132,1)', //Red\r\n 'rgba(54, 162, 235, 1)', //Blue\r\n 'rgba(255, 206, 86, 1)', // Yellow\r\n 'rgba(75, 192, 192, 1)', // Green\r\n 'rgba(153, 102, 255, 1)', // Purple\r\n 'rgba(255, 159, 64, 1)', // Orange\r\n ]\r\n const borderColPalette = [\r\n 'rgba(255, 99, 132, 1)',\r\n 'rgba(54, 162, 235, 1)',\r\n 'rgba(255, 206, 86, 1)',\r\n 'rgba(75, 192, 192, 1)',\r\n 'rgba(153, 102, 255, 1)',\r\n 'rgba(255, 159, 64, 1)',\r\n 'rgba(255, 99, 132, 1)',\r\n 'rgba(54, 162, 235, 1)',\r\n 'rgba(255, 206, 86, 1)',\r\n 'rgba(75, 192, 192, 1)',\r\n 'rgba(153, 102, 255, 1)',\r\n 'rgba(255, 159, 64, 1)',\r\n 'rgba(255, 99, 132, 1)',\r\n 'rgba(54, 162, 235, 1)',\r\n 'rgba(255, 206, 86, 1)',\r\n 'rgba(75, 192, 192, 1)',\r\n 'rgba(153, 102, 255, 1)',\r\n 'rgba(255, 159, 64, 1)',\r\n ]\r\n\r\n\r\n const background = []\r\n const border = []\r\n\r\n for (let i = 0; i < pie_data.length; i++){\r\n background[i] = bgColPalette[i]\r\n border[i] = borderColPalette[i]\r\n }\r\n\r\n const data = {\r\n labels: dataLabel,\r\n datasets: [\r\n {\r\n label: 'Contribution of each product',\r\n data: dataValues,\r\n backgroundColor:background ,\r\n borderColor:border,\r\n borderWidth: 1,\r\n },\r\n ],\r\n \r\n };\r\n \r\n return (\r\n \r\n \r\n )\r\n}\r\n\r\nexport default SalesPieChart\r\n","import React from 'react';\r\nimport { CSVLink } from 'react-csv';\r\n\r\nfunction CSVReportGeneration({ data }) {\r\n \r\n const csv_data = data\r\n const headers = [\r\n { label: \"Date\", key: \"date\" },\r\n { label: \"Product ID\", key: \"product_id\" },\r\n { label: \"Product Name\", key: \"product_name\" },\r\n { label: \"Price/Per unit\", key: \"product_price\" },\r\n { label: \"Quantity\", key: \"product_qty\" },\r\n { label: \"Total\", key: \"total\" },\r\n ]\r\n\r\n const csvReport = {\r\n filename: 'SalesReport.csv',\r\n headers,\r\n data:csv_data\r\n }\r\n \r\n\r\n return (\r\n \r\n Export to CSV\r\n
\r\n )\r\n}\r\n\r\nexport default CSVReportGeneration\r\n","export const monthData = [\r\n { id: \"jan\", label: \"January\" },\r\n { id: \"feb\", label: \"February\" },\r\n { id: \"mar\", label: \"March\" },\r\n { id: \"apr\", label: \"April\" },\r\n { id: \"may\", label: \"May\" },\r\n { id: \"jun\", label: \"June\" },\r\n { id: \"jul\", label: \"July\" },\r\n { id: \"aug\", label: \"August\" },\r\n { id: \"sep\", label: \"September\" },\r\n { id: \"oct\", label: \"October\" },\r\n { id: \"nov\", label: \"November\" },\r\n { id: \"dec\", label: \"December\" },\r\n];\r\n\r\n\r\n\r\n","import React from \"react\";\r\nconst { useState} = React;\r\n\r\nconst SaleDataCategory = ({onSelect,data}) => {\r\n const [isOpen, setOpen] = useState(false);\r\n const [items] = useState(data);\r\n const [selectedItem, setSelectedItem] = useState(null);\r\n \r\n const toggleDropdown = () => setOpen(!isOpen);\r\n \r\n const handleItemClick = (id) => {\r\n onSelect(id)\r\n selectedItem === id ? setSelectedItem(null) : setSelectedItem(id);\r\n setOpen(false)\r\n }\r\n \r\n return (\r\n \r\n
\r\n {selectedItem ? items.find(item => item.id === selectedItem).label : \"Select Month\"}\r\n \r\n
\r\n
\r\n {items.map(item => (\r\n
handleItemClick(e.target.id)} id={item.id}>\r\n • \r\n {item.label}\r\n
\r\n ))}\r\n
\r\n
\r\n )\r\n}\r\n\r\nexport default SaleDataCategory","import axios from 'axios';\r\nimport React, { useEffect, useState } from 'react';\r\nimport { Button, Col, Dropdown, DropdownButton, Form, FormControl, Row } from 'react-bootstrap';\r\nimport { useDispatch, useSelector } from 'react-redux';\r\nimport { getSaleData } from '../../../redux/actions/orderActions';\r\nimport \"../../../styles/ecommerce.css\";\r\nimport BarChart from '../Charts/BarChart';\r\nimport LineChart from '../Charts/LineChart';\r\nimport MonthBarChart from '../Charts/MonthBarChart';\r\nimport ProductSaleBarChart from '../Charts/ProductSaleBarChart';\r\nimport SalesPieChart from '../Charts/SalesPieChart';\r\nimport CSVReportGeneration from '../CSVReportGeneration';\r\nimport { monthData } from \"../EcommSeedData\";\r\nimport SaleDataCategory from '../SaleDataCategory';\r\nimport Sidebar from '../Sidebar';\r\n\r\nfunction SaleDataScreen({ history }) {\r\n \r\n const [graphType, setGraphType] = useState(\"line\")\r\n const [monthSale, setMonthSale] = useState(\"\")\r\n const [productSale, setProductSale] = useState(\"\")\r\n const [search, setSearch] = useState(\"\")\r\n const [reportData, setReportData] = useState(\"\")\r\n const [salesPieData, setSalesPieData] = useState(\"\")\r\n\r\n const dispatch = useDispatch()\r\n const { userInfo: { user,token } } = useSelector(state => state.userLogin)\r\n\r\n const order = useSelector(state => state.orderSaleData)\r\n const { orderSaleData } = order\r\n\r\n\r\n useEffect(() => {\r\n if (user && user.isAdmin) {\r\n dispatch(getSaleData())\r\n } else {\r\n history.push(\"/login\")\r\n }\r\n }, [dispatch, history, user])\r\n \r\n const handleSelect = (e) => {\r\n setGraphType(e)\r\n }\r\n\r\n const onSalesMonthSelect = (e) => {\r\n const { totalOrder } = orderSaleData?.find(el => el.month === e)\r\n const saleData = []\r\n const salesPieData = []\r\n\r\n for (let data of totalOrder) {\r\n for (let pd of data.orderedItems) {\r\n const date = data.createdAt.substring(0, 10);\r\n const product_id = pd._id;\r\n const product_name = pd.name;\r\n const product_price = pd.price;\r\n const product_qty = pd.qty;\r\n const total = pd.price * pd.qty\r\n saleData.push({ date, product_id, product_name, product_price, product_qty, total })\r\n\r\n // for pie chart\r\n salesPieData.push({ name: product_name, value: total })\r\n \r\n }\r\n }\r\n\r\n // console.log(salesPieData);\r\n\r\n // for pie chart\r\n const res = Array.from(salesPieData.reduce(\r\n (m, { name, value }) => m.set(name, (m.get(name) || 0) + value), new\r\n Map()), ([name, value]) => ({ name, value }));\r\n \r\n setSalesPieData(res)\r\n setReportData(saleData)\r\n }\r\n\r\n const onMonthSelect = async (e) => {\r\n try {\r\n const selectedMonth = e;\r\n\r\n const config = {\r\n headers: {\r\n 'Content-Type': 'application/json',\r\n Authorization: `Bearer ${token}`\r\n }\r\n }\r\n const { data } = await axios.post(`/api/orders/saleDataByMonth`, { selectedMonth }, config)\r\n setMonthSale(data)\r\n \r\n } catch (error) {\r\n console.log(error)\r\n }\r\n }\r\n\r\n const handleSearchSubmit = async(e) => {\r\n e.preventDefault()\r\n console.log(search);\r\n // 60ee9cc0da14312998e1a300\r\n try {\r\n const config = {\r\n headers: {\r\n 'Content-Type': 'application/json',\r\n Authorization: `Bearer ${token}`\r\n }\r\n }\r\n const { data } = await axios.post(`/api/orders/saleByAProduct`, {product_id:search }, config)\r\n setProductSale(data)\r\n \r\n } catch (error) {\r\n console.log(error)\r\n }\r\n }\r\n\r\n return (\r\n <>\r\n \r\n \r\n \r\n <>\r\n \r\n
Month wise sale
\r\n
\r\n \r\n
\r\n
\r\n {orderSaleData && <>{graphType === 'line' ? : } >}\r\n \r\n\r\n Day wise Sales of a Month
\r\n \r\n {monthSale && }\r\n\r\n \r\n
Sale of a product by each month
\r\n \r\n \r\n {productSale && }\r\n \r\n \r\n
Sales Report Generation
\r\n
\r\n {reportData &&
}\r\n {salesPieData &&\r\n
\r\n
Contribution of sold products
\r\n \r\n \r\n }\r\n
\r\n\r\n \r\n >\r\n \r\n
\r\n >\r\n )\r\n}\r\n\r\nexport default SaleDataScreen\r\n","import React, { useState } from \"react\";\r\nimport { Button, Form } from \"react-bootstrap\";\r\nimport { useDispatch, useSelector } from \"react-redux\";\r\nimport { saveShippingAddress } from \"../../../redux/actions/cartActions\";\r\nimport CheckoutSteps from \"../CheckoutSteps\";\r\nimport FormContainer from \"../FormContainer\";\r\n\r\nconst ShippingScreen = ({ history }) => {\r\n const cart = useSelector((state) => state.cart);\r\n const { shippingAddress } = cart;\r\n\r\n const [address, setAddress] = useState(shippingAddress.address || \"\");\r\n const [city, setCity] = useState(shippingAddress.city || \"\");\r\n const [thana, setThana] = useState(shippingAddress.thana || \"\");\r\n const [houseNumber, setHouseNumber] = useState(\r\n shippingAddress.houseNumber || \"\"\r\n );\r\n const dispatch = useDispatch();\r\n\r\n const submitHandler = (e) => {\r\n e.preventDefault();\r\n dispatch(saveShippingAddress({ address, city, thana, houseNumber }));\r\n history.push(\"/payment\");\r\n };\r\n\r\n return (\r\n \r\n \r\n Shipping
\r\n \r\n Address\r\n setAddress(e.target.value)}\r\n >\r\n \r\n\r\n \r\n City\r\n setCity(e.target.value)}\r\n >\r\n \r\n\r\n \r\n Thana\r\n setThana(e.target.value)}\r\n >\r\n \r\n\r\n \r\n House Number\r\n setHouseNumber(e.target.value)}\r\n >\r\n \r\n\r\n \r\n \r\n \r\n );\r\n};\r\n\r\nexport default ShippingScreen;\r\n","import React, { useEffect } from 'react'\r\nimport { Button, Col, Row, Table } from 'react-bootstrap'\r\nimport { useDispatch, useSelector } from 'react-redux'\r\nimport { deleteUser, getUserList } from '../../../redux/actions/userActions'\r\nimport Loader from '../Loader'\r\nimport Message from '../Message'\r\nimport Sidebar from '../Sidebar'\r\nimport { toastErrorMessage } from '../ToastMessage'\r\n\r\nfunction UserListScreen({history}) {\r\n\r\n const dispatch = useDispatch()\r\n const userList = useSelector(state => state.userList)\r\n const { userInfo: { user } } = useSelector(state => state.userLogin)\r\n const { success: deleteSuccess } = useSelector(state => state.userDelete)\r\n \r\n\r\n const { loading, error, users } = userList\r\n \r\n useEffect(() => {\r\n if (user && user.isAdmin) {\r\n dispatch(getUserList())\r\n } else {\r\n history.push(\"/login\")\r\n }\r\n }, [dispatch,history,user,deleteSuccess])\r\n\r\n const handleDelete = (id) => {\r\n if (window.confirm('Are you sure you want to delete this user ?')) {\r\n dispatch(deleteUser(id))\r\n toastErrorMessage(\"User deleted\")\r\n }\r\n }\r\n\r\n return (\r\n <>\r\n \r\n \r\n \r\n \r\n \r\n {loading ? : error ? {error} : (\r\n <>\r\n All Users
\r\n \r\n \r\n \r\n ID | \r\n Name | \r\n Email | \r\n Admin | \r\n
\r\n \r\n \r\n {users.map(user=>(\r\n \r\n {user._id} | \r\n {user.name} | \r\n \r\n {user.email}\r\n | \r\n \r\n {user.isAdmin ?\r\n :\r\n \r\n }\r\n | \r\n {/* \r\n \r\n \r\n \r\n | */}\r\n \r\n \r\n | \r\n
\r\n ))}\r\n \r\n
\r\n >\r\n )}\r\n \r\n
\r\n > \r\n )\r\n}\r\n\r\nexport default UserListScreen\r\n","import React, { useState } from 'react';\r\nimport { Button, Modal } from 'react-bootstrap';\r\nimport \"../../styles/plant-identify.css\";\r\n\r\nfunction PIDetailsModal({ name, desc, synonyms, taxonomy, authority, common_names }) {\r\n const [show, setShow] = useState(false);\r\n\r\n const handleClose = () => setShow(false);\r\n const handleShow = () => setShow(true);\r\n\r\n return (\r\n <>\r\n \r\n\r\n \r\n \r\n {name}\r\n {authority}\r\n \r\n \r\n Common Names
\r\n {common_names?.map(cn => (\r\n {cn}
\r\n ))}\r\n \r\n \r\n \r\n Description
\r\n {desc}
\r\n \r\n \r\n Taxonomy
\r\n \r\n
Kingdom: {taxonomy.kingdom}
\r\n
Phylum: {taxonomy.phylum}
\r\n
Class: {taxonomy.class}
\r\n
Order: {taxonomy.order}
\r\n
Family: {taxonomy.family}
\r\n
Genus: {taxonomy.genus}
\r\n
\r\n \r\n \r\n \r\n Synonyms
\r\n {synonyms?.map(syn => (\r\n {syn}
\r\n ))}\r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n >\r\n );\r\n}\r\n\r\nexport default PIDetailsModal\r\n","import axios from 'axios';\r\nimport React, { useState } from 'react';\r\nimport { Button, Col, Form, Row } from 'react-bootstrap';\r\nimport FileBase64 from 'react-file-base64';\r\nimport \"../../styles/plant-identify.css\";\r\nimport Loader from \"../Ecommerce/Loader\";\r\nimport PIDetailsModal from './PIDetailsModal';\r\n\r\nfunction PlantIdentify() {\r\n const [file, setFile] = useState()\r\n const [imageUrl, setImageUrl] = useState(\"\")\r\n const [plantSuggestion, setPlantSuggestion] = useState([])\r\n const [loading, setLoading] = useState(false)\r\n\r\n const handleFileInput = (e) => {\r\n e.preventDefault()\r\n getPlantInfo()\r\n setLoading(true)\r\n }\r\n\r\n const getPlantInfo = async () => {\r\n try {\r\n const {data} = await axios.post(`/api/identify-plant`, { file })\r\n setImageUrl(data.imageUrl)\r\n setPlantSuggestion(data.plantSuggestions)\r\n setLoading(false)\r\n } catch (error) {\r\n console.log('Error',error);\r\n }\r\n }\r\n\r\n const covertNumber = (num) => {\r\n let n = num.toFixed(2)\r\n n *= 100\r\n if (n.toString().length > 2) n = n.toFixed()\r\n return `${n} %`\r\n }\r\n\r\n \r\n return (\r\n \r\n
\r\n\r\n {loading ?
: (\r\n <>\r\n {imageUrl && \r\n
\r\n
\r\n
\r\n }\r\n\r\n {plantSuggestion &&\r\n
\r\n {plantSuggestion.map(plant => (\r\n
\r\n \r\n \r\n {plant.similar_images.map(i =>\r\n (\r\n
\r\n )\r\n )}\r\n
\r\n \r\n \r\n \r\n
{plant.plant_name}
\r\n
Scientific Name:{plant.plant_details.scientific_name}
\r\n
Genus:{plant.plant_details.structured_name.genus}
\r\n
Species:{plant.plant_details.structured_name.species}
\r\n \r\n
\r\n
\r\n \r\n \r\n \r\n {/*
{`${((plant.probability).toFixed(2)) * 100} %`}
*/}\r\n
{covertNumber(plant.probability)}
\r\n
\r\n \r\n \r\n
\r\n ))}\r\n
\r\n \r\n }\r\n\r\n >\r\n\r\n )}\r\n \r\n \r\n
\r\n )\r\n}\r\n\r\nexport default PlantIdentify\r\n","import axios from 'axios';\r\nimport React, { useEffect, useState } from 'react';\r\nimport { Table } from 'react-bootstrap';\r\nimport '../../styles/plant-search.css';\r\n\r\nfunction PlantDetails({ match }) {\r\n \r\n const [plantData, setPlantData] = useState(\"\")\r\n const plantSearchAPI = \"https://openfarm.cc/api/v1/crops\"\r\n useEffect(() => {\r\n async function fetchPlant() {\r\n const res = await axios.get(`${plantSearchAPI}/${match.params.id}`)\r\n setPlantData(res.data.data)\r\n }\r\n fetchPlant()\r\n\r\n }, [match])\r\n return (\r\n \r\n {plantData && (\r\n
\r\n \r\n \r\n \r\n \r\n Name | \r\n {plantData.attributes.name} | \r\n
\r\n \r\n Binomial Name | \r\n {plantData.attributes.binomial_name} | \r\n
\r\n \r\n Taxon | \r\n {plantData.attributes.taxon} | \r\n
\r\n \r\n Description | \r\n {plantData.attributes.description} | \r\n
\r\n \r\n Sun Requirements | \r\n {plantData.attributes.sun_requirements} | \r\n
\r\n \r\n Sowing Method | \r\n {plantData.attributes.sowing_method} | \r\n
\r\n \r\n Growing Degree Days | \r\n {plantData.attributes.growing_degree_days} | \r\n
\r\n \r\n Row Spacing | \r\n {plantData.attributes.row_spacing} cm | \r\n
\r\n \r\n Height | \r\n {plantData.attributes.height} cm | \r\n
\r\n \r\n \r\n
\r\n )}\r\n
\r\n )\r\n}\r\n\r\nexport default PlantDetails\r\n","export default __webpack_public_path__ + \"static/media/not.6ea7f4d0.svg\";","export default __webpack_public_path__ + \"static/media/sample-plant.31640ee6.jpg\";","import React from 'react';\r\nimport { Col, Row } from 'react-bootstrap';\r\nimport { LinkContainer } from 'react-router-bootstrap';\r\nimport sample from '../../images/sample-plant.jpg';\r\n\r\nfunction PlantSearchCard({ data }) {\r\n \r\n return (\r\n <>\r\n {data &&\r\n \r\n {data.map(d => (\r\n \r\n \r\n \r\n {d.attributes.main_image_path.includes(\"/assets/baren_field_square\") ?
:
}\r\n \r\n
\r\n
{d.attributes.name}
\r\n
Binomial Name: {d.attributes.binomial_name}
\r\n
\r\n
\r\n \r\n \r\n \r\n ))}\r\n
\r\n }\r\n >\r\n \r\n )\r\n}\r\n\r\nexport default PlantSearchCard\r\n","import axios from 'axios'\r\nimport React, { useState } from 'react'\r\nimport notFound from '../../images/not.svg'\r\nimport '../../styles/plant-search.css'\r\nimport Loader from '../Ecommerce/Loader'\r\nimport PlantSearchCard from './PlantSearchCard'\r\n\r\nfunction PlantSearch() {\r\n\r\n const [searchTerm, setSearchTerm] = useState(\"\")\r\n const [result, setResult] = useState([])\r\n const [found,setFound] = useState(true)\r\n const [loading,setLoading] = useState(false)\r\n\r\n const plantSearchAPI = \"https://openfarm.cc/api/v1/crops\"\r\n\r\n const handlePlantSearch = (e) => {\r\n e.preventDefault()\r\n console.log(searchTerm);\r\n setLoading(true)\r\n fetchPlant(searchTerm)\r\n }\r\n \r\n const fetchPlant = async (plant) => {\r\n const { data } = await axios.get(`${plantSearchAPI}?filter=${plant}`)\r\n \r\n if (data?.data.length === 0) {\r\n setFound(false)\r\n }\r\n else {\r\n setResult(data.data)\r\n setFound(true)\r\n }\r\n setLoading(false)\r\n }\r\n return (\r\n <>\r\n \r\n\r\n {loading ? :\r\n (\r\n \r\n {found ?\r\n
\r\n :\r\n
\r\n
\r\n
No Result
\r\n
\r\n }\r\n
\r\n )\r\n }\r\n >\r\n \r\n )\r\n}\r\n\r\nexport default PlantSearch\r\n","export default __webpack_public_path__ + \"static/media/blog.fc0941d6.svg\";","export default __webpack_public_path__ + \"static/media/diary.d6286fce.svg\";","export default __webpack_public_path__ + \"static/media/online-community.1ac5ba23.svg\";","export default __webpack_public_path__ + \"static/media/search.7b1accb2.svg\";","export default __webpack_public_path__ + \"static/media/server.b628c0c9.svg\";","export default __webpack_public_path__ + \"static/media/store.2b5ae666.svg\";","import Card from '@material-ui/core/Card';\r\nimport CardContent from '@material-ui/core/CardContent';\r\nimport { makeStyles } from '@material-ui/core/styles';\r\nimport Typography from '@material-ui/core/Typography';\r\nimport React from 'react';\r\n\r\nconst useStyles = makeStyles({\r\n root: {\r\n minWidth: 200,\r\n height:'250px',\r\n borderTop:'5px solid #81fbb8',\r\n margin:'auto'\r\n },\r\n title: {\r\n fontSize: '1.7rem',\r\n fontFamily:'Asap',\r\n textAlign:'center'\r\n },\r\n text: {\r\n textAlign: 'center',\r\n fontFamily: 'Lato',\r\n fontSize:'1.1rem'\r\n },\r\n image: {\r\n height: '75px',\r\n marginLeft:'70%'\r\n }\r\n});\r\n\r\nfunction FeatureCard({ title, text,image }) {\r\n const classes = useStyles();\r\n\r\n return (\r\n \r\n \r\n \r\n {title}\r\n \r\n \r\n {text}\r\n \r\n \r\n \r\n \r\n );\r\n}\r\n\r\nexport default FeatureCard","import { Container, Grid } from '@material-ui/core';\r\nimport { makeStyles } from '@material-ui/core/styles';\r\nimport React from 'react';\r\nimport blog from '../../images/blog.svg';\r\nimport diary from '../../images/diary.svg';\r\nimport forum from '../../images/online-community.svg';\r\nimport search from '../../images/search.svg';\r\nimport db from '../../images/server.svg';\r\nimport market from '../../images/store.svg';\r\nimport FeatureCard from './FeatureCard';\r\n\r\n\r\nconst useStyles = makeStyles({\r\n container: {\r\n backgroundColor: '#f7f7f7',\r\n // margin:'5rem auto'\r\n },\r\n gridContainer:{\r\n padding:'10rem auto'\r\n },\r\n text: {\r\n textAlign: 'center',\r\n padding: '2rem 0rem'\r\n }\r\n});\r\n\r\nfunction Feature() {\r\n const data = [\r\n {\r\n title: \"Market Place\",\r\n text: \"Platform for buying plants, flowers, seeds and other equipments\",\r\n image: market\r\n },\r\n {\r\n title: \"Plant Database\",\r\n text:\"A database that contains plant related information\",\r\n image: db \r\n },\r\n {\r\n title: \"Plant Identification\",\r\n text:\"Identify any plants just by uploading it in the website\",\r\n image: search\r\n },\r\n {\r\n title: \"Plant Diary\",\r\n text:\"In a personalized gardening notebook, keep track of your plants progress\",\r\n image: diary\r\n },\r\n {\r\n title: \"Blog\",\r\n text:\"Read blog about plants, nature and environmental issues\",\r\n image: blog\r\n },\r\n {\r\n title: \"Community\",\r\n text:\"Ask and give answers regarding plant related questions\",\r\n image: forum\r\n },\r\n ]\r\n\r\n const classes = useStyles();\r\n\r\n return (\r\n \r\n
Features
\r\n \r\n \r\n {data.map(d => (\r\n \r\n \r\n \r\n ))} \r\n \r\n \r\n \r\n\r\n )\r\n \r\n}\r\n\r\nexport default Feature\r\n\r\n","export default __webpack_public_path__ + \"static/media/pngwing.com.d99df108.png\";","import React from 'react'\r\nimport heroImg from '../../images/pngwing.com.png'\r\nimport '../../styles/landingPage.css'\r\n\r\nfunction HeroSection() {\r\n return (\r\n \r\n
\r\n
Plant Land
\r\n
A place where plant enthusiastic people meet and get along with each other
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n )\r\n}\r\n\r\nexport default HeroSection\r\n","import React from 'react'\r\nimport { Container, Nav, Navbar } from 'react-bootstrap'\r\nimport '../../styles/landingPage.css'\r\nfunction NavBar() {\r\n return (\r\n <>\r\n \r\n \r\n PlantLand\r\n \r\n \r\n \r\n \r\n \r\n \r\n >\r\n )\r\n}\r\n\r\nexport default NavBar\r\n","import React from 'react'\r\nimport Feature from '../components/LandingPage/Feature'\r\nimport HeroSection from '../components/LandingPage/HeroSection'\r\nimport NavBar from '../components/LandingPage/Navbar'\r\n\r\nfunction LandingPage() {\r\n return (\r\n \r\n \r\n \r\n \r\n
\r\n )\r\n}\r\n\r\nexport default LandingPage\r\n","import React from \"react\";\r\nimport { Container } from \"react-bootstrap\";\r\nimport { BrowserRouter as Router, Route } from \"react-router-dom\";\r\n// Blog Section\r\nimport Blog from \"../components/Blog/Blog\";\r\nimport BlogDetails from \"../components/Blog/BlogDetails\";\r\nimport NewBlog from \"../components/Blog/NewBlog\";\r\n// E-Commerce Section\r\nimport Footer from \"../components/Ecommerce/Footer\";\r\nimport Header from '../components/Ecommerce/Header';\r\nimport CartScreen from '../components/Ecommerce/Screen/CartScreen';\r\nimport ForgetPasswordScreen from '../components/Ecommerce/Screen/ForgetPasswordScreen';\r\nimport HomeScreen from '../components/Ecommerce/Screen/HomeScreen';\r\nimport LoginScreen from '../components/Ecommerce/Screen/LoginScreen';\r\nimport OrderDataScreen from \"../components/Ecommerce/Screen/OrderDataScreen\";\r\nimport OrderListScreen from \"../components/Ecommerce/Screen/OrderListScreen\";\r\nimport OrderScreen from \"../components/Ecommerce/Screen/OrderScreen\";\r\nimport PasswordResetScreen from '../components/Ecommerce/Screen/PasswordResetScreen';\r\nimport PaymentScreen from \"../components/Ecommerce/Screen/PaymentScreen\";\r\nimport PlaceOrderScreen from \"../components/Ecommerce/Screen/PlaceOrderScreen\";\r\nimport ProductEditScreen from \"../components/Ecommerce/Screen/ProductEditScreen\";\r\nimport ProductListScreen from \"../components/Ecommerce/Screen/ProductListScreen\";\r\nimport ProductScreen from '../components/Ecommerce/Screen/ProductScreen';\r\nimport ProfileScreen from '../components/Ecommerce/Screen/ProfileScreen';\r\nimport RegisterScreen from '../components/Ecommerce/Screen/RegisterScreen';\r\nimport SaleDataScreen from \"../components/Ecommerce/Screen/SaleDataScreen\";\r\nimport ShippingScreen from \"../components/Ecommerce/Screen/ShippingScreen\";\r\nimport UserListScreen from \"../components/Ecommerce/Screen/UserListScreen\";\r\nimport PlantIdentify from \"../components/PlantIdentify/PlantIdentify\";\r\nimport PlantDetails from \"../components/PlantSearch/PlantDetails\";\r\n// Plant Search Page\r\nimport PlantSearch from \"../components/PlantSearch/PlantSearch\";\r\nimport '../styles/ecommerce.css';\r\n// Landing Page\r\nimport LandingPage from './LandingPage';\r\n\r\n\r\nfunction MainPage() {\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n {/* Ecommerce Routes */}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n {/* Blog Routes */}\r\n \r\n \r\n \r\n {/* Plant Search */}\r\n \r\n \r\n {/* Plant Identify */}\r\n \r\n\r\n \r\n \r\n \r\n )\r\n}\r\nexport default MainPage;\r\n","import \"bootstrap/dist/css/bootstrap.min.css\";\r\nimport MainPage from \"./pages/MainPage\";\r\nimport \"./styles/bootstrap.min.css\";\r\n\r\nfunction App() {\r\n return (\r\n \r\n )\r\n}\r\n\r\nexport default App;\r\n","import { applyMiddleware, combineReducers, createStore } from \"redux\";\r\nimport { composeWithDevTools } from \"redux-devtools-extension\";\r\nimport thunk from \"redux-thunk\";\r\nimport { blogDetailsReducer, blogListReducer } from \"./redux/reducers/blogReducers\";\r\nimport { cartReducer } from \"./redux/reducers/cartReducers\";\r\nimport { myOrderListReducer, orderCreateReducer, orderDataReducer, orderDeliverReducer, orderDetailsReducer, orderListReducer, orderPayReducer, orderSaleDataReducer } from \"./redux/reducers/orderReducers\";\r\nimport {\r\n productCreateReducer, productCreateReviewReducer, productDeleteReducer, productDetailsReducer,\r\n productListReducer, productUpdateReducer\r\n} from \"./redux/reducers/productReducers\";\r\nimport {\r\n userDeleteReducer, userDetailsReducer, userListReducer, userLoginReducer,\r\n userProfileUpdateReducer,\r\n userRegisterReducer\r\n} from \"./redux/reducers/userReducers\";\r\n\r\n\r\nconst reducer = combineReducers({\r\n productList: productListReducer,\r\n productDetails: productDetailsReducer,\r\n productCreateReview: productCreateReviewReducer,\r\n productDelete: productDeleteReducer,\r\n productCreate: productCreateReducer,\r\n productUpdate: productUpdateReducer,\r\n userLogin: userLoginReducer,\r\n userRegister: userRegisterReducer,\r\n userDetails: userDetailsReducer,\r\n userProfileUpdate: userProfileUpdateReducer,\r\n userList: userListReducer,\r\n userDelete: userDeleteReducer,\r\n cart: cartReducer,\r\n orderCreate: orderCreateReducer,\r\n orderList: orderListReducer,\r\n orderData: orderDataReducer,\r\n orderDetails:orderDetailsReducer,\r\n orderSaleData: orderSaleDataReducer,\r\n orderPay: orderPayReducer,\r\n orderDeliver: orderDeliverReducer,\r\n myOrderList:myOrderListReducer,\r\n blogList: blogListReducer,\r\n blogDetails: blogDetailsReducer\r\n});\r\n\r\nconst cartItemsFromStorage = localStorage.getItem(\"cartItems\")\r\n ? JSON.parse(localStorage.getItem(\"cartItems\"))\r\n : [];\r\n\r\nconst userInfoFromStorage = localStorage.getItem(\"userInfo\")\r\n ? JSON.parse(localStorage.getItem(\"userInfo\"))\r\n : null;\r\nconst shippingAddressFromStorage = localStorage.getItem(\"shippingAddress\")\r\n ? JSON.parse(localStorage.getItem(\"shippingAddress\"))\r\n : {};\r\n\r\nconst initialState = {\r\n cart: {\r\n cartItems: cartItemsFromStorage,\r\n shippingAddress: shippingAddressFromStorage,\r\n },\r\n userLogin: { userInfo: userInfoFromStorage },\r\n};\r\n\r\nconst middlewares = [thunk];\r\n\r\nconst store = createStore(\r\n reducer,\r\n initialState,\r\n composeWithDevTools(applyMiddleware(...middlewares))\r\n);\r\n\r\nexport default store;\r\n","import { PRODUCT_CREATE_FAIL, PRODUCT_CREATE_REQUEST, PRODUCT_CREATE_RESET, PRODUCT_CREATE_REVIEW_FAIL, PRODUCT_CREATE_REVIEW_REQUEST, PRODUCT_CREATE_REVIEW_RESET, PRODUCT_CREATE_REVIEW_SUCCESS, PRODUCT_CREATE_SUCCESS, PRODUCT_DELETE_FAIL, PRODUCT_DELETE_REQUEST, PRODUCT_DELETE_SUCCESS, PRODUCT_DETAILS_FAIL, PRODUCT_DETAILS_REQUEST, PRODUCT_DETAILS_SUCCESS, PRODUCT_LIST_FAIL, PRODUCT_LIST_REQUEST, PRODUCT_LIST_SUCCESS, PRODUCT_UPDATE_FAIL, PRODUCT_UPDATE_REQUEST, PRODUCT_UPDATE_RESET, PRODUCT_UPDATE_SUCCESS } from '../../constants/productConstants'\r\n\r\nexport const productListReducer = (state = { products: [] }, action) => {\r\n switch (action.type) {\r\n case PRODUCT_LIST_REQUEST:\r\n return { loading: true, products: [] }\r\n \r\n case PRODUCT_LIST_SUCCESS:\r\n return { loading: false, products: action.payload.products,page:action.payload.page,numOfPages:action.payload.numOfPages }\r\n \r\n case PRODUCT_LIST_FAIL:\r\n return { loading: false, error: action.payload }\r\n \r\n default:\r\n return state\r\n }\r\n}\r\n\r\nexport const productDetailsReducer = (state = { product: {reviews:[]} }, action) => {\r\n switch (action.type) {\r\n case PRODUCT_DETAILS_REQUEST:\r\n return { loading: true, ...state }\r\n \r\n case PRODUCT_DETAILS_SUCCESS:\r\n return { loading: false, product: action.payload }\r\n \r\n case PRODUCT_DETAILS_FAIL:\r\n return { loading: false, error: action.payload }\r\n \r\n default:\r\n return state\r\n }\r\n}\r\n\r\nexport const productCreateReviewReducer = (state = {}, action) => {\r\n switch (action.type) {\r\n case PRODUCT_CREATE_REVIEW_REQUEST:\r\n return { loading: true }\r\n \r\n case PRODUCT_CREATE_REVIEW_SUCCESS:\r\n return { loading: false,success:true}\r\n \r\n case PRODUCT_CREATE_REVIEW_FAIL:\r\n return { loading: false, error: action.payload }\r\n \r\n case PRODUCT_CREATE_REVIEW_RESET:\r\n return {}\r\n \r\n default:\r\n return state\r\n }\r\n}\r\n\r\nexport const productDeleteReducer = (state = {}, action) => {\r\n switch (action.type) {\r\n case PRODUCT_DELETE_REQUEST:\r\n return { loading: true }\r\n \r\n case PRODUCT_DELETE_SUCCESS:\r\n return { loading: false,success:true}\r\n \r\n case PRODUCT_DELETE_FAIL:\r\n return { loading: false, error: action.payload }\r\n \r\n default:\r\n return state\r\n }\r\n}\r\n\r\nexport const productCreateReducer = (state = {}, action) => {\r\n switch (action.type) {\r\n case PRODUCT_CREATE_REQUEST:\r\n return { loading: true }\r\n \r\n case PRODUCT_CREATE_SUCCESS:\r\n return { loading: false,success:true,product:action.payload}\r\n \r\n case PRODUCT_CREATE_FAIL:\r\n return { loading: false, error: action.payload }\r\n \r\n case PRODUCT_CREATE_RESET:\r\n return {}\r\n \r\n default:\r\n return state\r\n }\r\n}\r\n\r\nexport const productUpdateReducer = (state = {product:{}}, action) => {\r\n switch (action.type) {\r\n case PRODUCT_UPDATE_REQUEST:\r\n return { loading: true }\r\n \r\n case PRODUCT_UPDATE_SUCCESS:\r\n return { loading: false,success:true,product:action.payload}\r\n \r\n case PRODUCT_UPDATE_FAIL:\r\n return { loading: false, error: action.payload }\r\n \r\n case PRODUCT_UPDATE_RESET:\r\n return { product: {} }\r\n \r\n default:\r\n return state\r\n }\r\n}","import { USER_DELETE_FAIL, USER_DELETE_REQUEST, USER_DELETE_SUCCESS, USER_DETAILS_FAIL, USER_DETAILS_REQUEST, USER_DETAILS_SUCCESS, USER_LIST_FAIL, USER_LIST_REQUEST, USER_LIST_RESET, USER_LIST_SUCCESS, USER_LOGIN_FAIL, USER_LOGIN_REQUEST, USER_LOGIN_SUCCESS, USER_LOGOUT, USER_PROFILE_UPDATE_FAIL, USER_PROFILE_UPDATE_REQUEST, USER_PROFILE_UPDATE_SUCCESS, USER_REGISTER_FAIL, USER_REGISTER_REQUEST, USER_REGISTER_SUCCESS } from \"../../constants/userConstants\"\r\n\r\n\r\nexport const userLoginReducer = (state = {}, action) => {\r\n switch (action.type) {\r\n case USER_LOGIN_REQUEST:\r\n return { loading: true }\r\n \r\n case USER_LOGIN_SUCCESS:\r\n return { loading: false, userInfo: action.payload }\r\n \r\n case USER_LOGIN_FAIL:\r\n return { loading: false, error: action.payload }\r\n \r\n case USER_LOGOUT:\r\n return {}\r\n \r\n default:\r\n return state\r\n }\r\n}\r\n\r\nexport const userRegisterReducer = (state = {}, action) => {\r\n switch (action.type) {\r\n case USER_REGISTER_REQUEST:\r\n return { loading: true }\r\n \r\n case USER_REGISTER_SUCCESS:\r\n return { loading: false, userInfo: action.payload }\r\n \r\n case USER_REGISTER_FAIL:\r\n return { loading: false, error: action.payload }\r\n \r\n default:\r\n return state\r\n }\r\n}\r\n\r\nexport const userDetailsReducer = (state = {user:{}}, action) => {\r\n switch (action.type) {\r\n case USER_DETAILS_REQUEST:\r\n return { ...state,loading: true }\r\n \r\n case USER_DETAILS_SUCCESS:\r\n return { loading: false, user: action.payload }\r\n \r\n case USER_DETAILS_FAIL:\r\n return { loading: false, error: action.payload }\r\n \r\n default:\r\n return state\r\n }\r\n}\r\n\r\nexport const userProfileUpdateReducer = (state = {}, action) => {\r\n switch (action.type) {\r\n case USER_PROFILE_UPDATE_REQUEST:\r\n return { ...state,loading: true }\r\n \r\n case USER_PROFILE_UPDATE_SUCCESS:\r\n return { loading: false,success:true, userInfo: action.payload }\r\n \r\n case USER_PROFILE_UPDATE_FAIL:\r\n return { loading: false, error: action.payload }\r\n \r\n default:\r\n return state\r\n }\r\n}\r\n\r\nexport const userListReducer = (state = { users: [] }, action) => {\r\n switch (action.type) {\r\n case USER_LIST_REQUEST:\r\n return { ...state,loading: true }\r\n \r\n case USER_LIST_SUCCESS:\r\n return { loading: false, users: action.payload }\r\n \r\n case USER_LIST_FAIL:\r\n return { loading: false, error: action.payload }\r\n \r\n case USER_LIST_RESET:\r\n return { users: [] }\r\n \r\n default:\r\n return state\r\n }\r\n}\r\n\r\nexport const userDeleteReducer = (state = {}, action) => {\r\n switch (action.type) {\r\n case USER_DELETE_REQUEST:\r\n return { ...state,loading: true }\r\n \r\n case USER_DELETE_SUCCESS:\r\n return { loading: false,success:true }\r\n \r\n case USER_DELETE_FAIL:\r\n return { loading: false, error: action.payload }\r\n\r\n default:\r\n return state\r\n }\r\n}","import {\r\n CART_ADD_ITEM,\r\n CART_REMOVE_ITEM, CART_SAVE_PAYMENT_METHOD, CART_SAVE_SHIPPING_ADDRESS\r\n} from \"../../constants/cartConstants\";\r\n\r\nexport const cartReducer = (\r\n state = { cartItems: [], shippingAddress: {} },\r\n action\r\n) => {\r\n switch (action.type) {\r\n case CART_ADD_ITEM:\r\n const item = action.payload;\r\n\r\n const isItemExist = state.cartItems.find(\r\n (p) => p.productId === item.productId\r\n );\r\n if (isItemExist) {\r\n return {\r\n ...state,\r\n cartItems: state.cartItems.map((p) =>\r\n p.productId === item.productId ? item : p\r\n ),\r\n };\r\n } else {\r\n return {\r\n ...state,\r\n cartItems: [...state.cartItems, item],\r\n };\r\n }\r\n case CART_REMOVE_ITEM:\r\n return {\r\n ...state,\r\n cartItems: state.cartItems.filter(\r\n (p) => p.productId !== action.payload\r\n ),\r\n };\r\n case CART_SAVE_SHIPPING_ADDRESS:\r\n return {\r\n ...state,\r\n shippingAddress: action.payload,\r\n };\r\n\r\n case CART_SAVE_PAYMENT_METHOD:\r\n return {\r\n ...state,\r\n paymentMethod: action.payload,\r\n };\r\n default:\r\n return state;\r\n }\r\n};\r\n","import {\r\n ORDER_CREATE_FAIL, ORDER_CREATE_REQUEST, ORDER_CREATE_SUCCESS, ORDER_DATA_FAIL, ORDER_DATA_REQUEST, ORDER_DATA_SUCCESS, ORDER_DELIVER_FAIL, ORDER_DELIVER_REQUEST, ORDER_DELIVER_RESET, ORDER_DELIVER_SUCCESS, ORDER_DETAILS_FAIL, ORDER_DETAILS_REQUEST, ORDER_DETAILS_SUCCESS, ORDER_LIST_FAIL, ORDER_LIST_REQUEST, ORDER_LIST_SUCCESS, ORDER_MY_LIST_FAIL, ORDER_MY_LIST_REQUEST, ORDER_MY_LIST_SUCCESS, ORDER_PAY_FAIL, ORDER_PAY_REQUEST, ORDER_PAY_RESET, ORDER_PAY_SUCCESS, ORDER_SALE_DATA_FAIL, ORDER_SALE_DATA_REQUEST, ORDER_SALE_DATA_SUCCESS\r\n} from \"../../constants/orderConstants\";\r\n\r\nexport const orderCreateReducer = (state = {}, action) => {\r\n switch (action.type) {\r\n case ORDER_CREATE_REQUEST:\r\n return {\r\n loading: true,\r\n };\r\n case ORDER_CREATE_SUCCESS:\r\n return {\r\n loading: false,\r\n success: true,\r\n order: action.payload,\r\n };\r\n case ORDER_CREATE_FAIL:\r\n return {\r\n loading: false,\r\n error: action.payload,\r\n };\r\n default:\r\n return state;\r\n /* case ORDER_CREATE_RESET:\r\n return {}\r\n default:\r\n return state */\r\n }\r\n};\r\n\r\nexport const orderListReducer = (state = { orders: [] }, action) => {\r\n switch (action.type) {\r\n case ORDER_LIST_REQUEST:\r\n return { ...state,loading: true }\r\n \r\n case ORDER_LIST_SUCCESS:\r\n return { loading: false, orders: action.payload }\r\n \r\n case ORDER_LIST_FAIL:\r\n return { loading: false, error: action.payload }\r\n \r\n \r\n default:\r\n return state\r\n }\r\n}\r\n\r\nexport const myOrderListReducer = (state = { orders: [] }, action) => {\r\n switch (action.type) {\r\n case ORDER_MY_LIST_REQUEST:\r\n return { ...state,loading: true }\r\n \r\n case ORDER_MY_LIST_SUCCESS:\r\n return { loading: false, orders: action.payload }\r\n \r\n case ORDER_MY_LIST_FAIL:\r\n return { loading: false, error: action.payload }\r\n \r\n \r\n default:\r\n return state\r\n }\r\n}\r\n\r\nexport const orderDetailsReducer = (state = { loading:true,orderItems: [],shippingAddress:{} }, action) => {\r\n switch (action.type) {\r\n case ORDER_DETAILS_REQUEST:\r\n return { ...state,loading: true }\r\n \r\n case ORDER_DETAILS_SUCCESS:\r\n return { loading: false, order: action.payload }\r\n \r\n case ORDER_DETAILS_FAIL:\r\n return { loading: false, error: action.payload }\r\n \r\n default:\r\n return state\r\n }\r\n}\r\n\r\n\r\nexport const orderPayReducer = (state ={}, action) => {\r\n switch (action.type) {\r\n case ORDER_PAY_REQUEST:\r\n return { loading: true }\r\n \r\n case ORDER_PAY_SUCCESS:\r\n return { loading: false, success: true }\r\n \r\n case ORDER_PAY_FAIL:\r\n return { loading: false, error: action.payload }\r\n \r\n case ORDER_PAY_RESET:\r\n return { }\r\n \r\n default:\r\n return state\r\n }\r\n}\r\n\r\n\r\nexport const orderDeliverReducer = (state ={}, action) => {\r\n switch (action.type) {\r\n case ORDER_DELIVER_REQUEST:\r\n return { loading: true }\r\n \r\n case ORDER_DELIVER_SUCCESS:\r\n return { loading: false, success: true }\r\n \r\n case ORDER_DELIVER_FAIL:\r\n return { loading: false, error: action.DELIVERload }\r\n \r\n case ORDER_DELIVER_RESET:\r\n return { }\r\n \r\n default:\r\n return state\r\n }\r\n}\r\n\r\n\r\nexport const orderDataReducer = (state = { orderData: [] }, action) => {\r\n switch (action.type) {\r\n case ORDER_DATA_REQUEST:\r\n return { ...state,loading: true }\r\n \r\n case ORDER_DATA_SUCCESS:\r\n return { loading: false, orderData: action.payload }\r\n \r\n case ORDER_DATA_FAIL:\r\n return { loading: false, error: action.payload }\r\n \r\n \r\n default:\r\n return state\r\n }\r\n}\r\n\r\n\r\nexport const orderSaleDataReducer = (state = { orderSaleData: [] }, action) => {\r\n switch (action.type) {\r\n case ORDER_SALE_DATA_REQUEST:\r\n return { ...state,loading: true }\r\n \r\n case ORDER_SALE_DATA_SUCCESS:\r\n return { loading: false, orderSaleData: action.payload }\r\n \r\n case ORDER_SALE_DATA_FAIL:\r\n return { loading: false, error: action.payload }\r\n \r\n \r\n default:\r\n return state\r\n }\r\n}\r\n","import { BLOG_DETAILS_FAIL, BLOG_DETAILS_REQUEST, BLOG_DETAILS_SUCCESS, BLOG_FETCH_FAIL, BLOG_FETCH_REQUEST, BLOG_FETCH_SUCCESS } from \"../../constants/blogConstant\"\r\n\r\nexport const blogListReducer = ( blogs=[], action) => {\r\n switch (action.type) {\r\n case BLOG_FETCH_REQUEST:\r\n return { loading: true, blogs: [] }\r\n \r\n case BLOG_FETCH_SUCCESS:\r\n return { loading: false, blogs: action.payload}\r\n \r\n case BLOG_FETCH_FAIL:\r\n return { loading: false, error: action.payload }\r\n \r\n default:\r\n return blogs\r\n }\r\n}\r\n\r\nexport const blogDetailsReducer = (state = { blog: {comments:[]} }, action) => {\r\n switch (action.type) {\r\n case BLOG_DETAILS_REQUEST:\r\n return { loading: true, ...state }\r\n \r\n case BLOG_DETAILS_SUCCESS:\r\n return { loading: false, blog: action.payload }\r\n \r\n case BLOG_DETAILS_FAIL:\r\n return { loading: false, error: action.payload }\r\n \r\n default:\r\n return state\r\n }\r\n}","import React from 'react';\r\nimport ReactDOM from 'react-dom';\r\nimport { Provider } from 'react-redux';\r\nimport App from './App';\r\nimport store from './store';\r\nimport './styles/index.css';\r\n\r\nReactDOM.render(\r\n <>\r\n \r\n \r\n \r\n ,\r\n \r\n >,\r\n document.getElementById('root')\r\n);\r\n\r\n"],"sourceRoot":""}
\ No newline at end of file
diff --git a/client/build/static/js/main.2e815323.chunk.js b/client/build/static/js/main.50d9a2a0.chunk.js
similarity index 71%
rename from client/build/static/js/main.2e815323.chunk.js
rename to client/build/static/js/main.50d9a2a0.chunk.js
index 4df2887..d8dede6 100644
--- a/client/build/static/js/main.2e815323.chunk.js
+++ b/client/build/static/js/main.50d9a2a0.chunk.js
@@ -1,2 +1,2 @@
-(this.webpackJsonpclient=this.webpackJsonpclient||[]).push([[0],{118:function(e,t,a){},198:function(e,t,a){},199:function(e,t,a){},200:function(e,t,a){},276:function(e,t){},420:function(e,t,a){},421:function(e,t,a){},422:function(e,t,a){"use strict";a.r(t);var r=a(1),n=a.n(r),c=a(30),s=a.n(c),i=a(10),o=(a(231),a(448)),l=a(16),d=a(22),j=a(203),u=a(446),b=a(204),h=a(7),p=a.n(h),O=a(11),m=a(12),x=a.n(m),g="BLOG_FETCH_REQUEST",f="BLOG_FETCH_SUCCESS",v="BLOG_FETCH_FAIL",y="BLOG_DETAILS_REQUEST",S="BLOG_DETAILS_SUCCESS",E="BLOG_DETAILS_FAIL",C="PRODUCT_LIST_REQUEST",I="PRODUCT_LIST_SUCCESS",N="PRODUCT_LIST_FAIL",_="PRODUCT_DETAILS_REQUEST",k="PRODUCT_DETAILS_SUCCESS",w="PRODUCT_DETAILS_FAIL",L="PRODUCT_CREATE_REVIEW_REQUEST",D="PRODUCT_CREATE_REVIEW_SUCCESS",A="PRODUCT_CREATE_REVIEW_FAIL",T="PRODUCT_CREATE_REVIEW_RESET",R="PRODUCT_DELETE_REQUEST",P="PRODUCT_DELETE_SUCCESS",U="PRODUCT_DELETE_FAIL",F="PRODUCT_CREATE_REQUEST",G="PRODUCT_CREATE_SUCCESS",B="PRODUCT_CREATE_FAIL",M="PRODUCT_CREATE_RESET",z="PRODUCT_UPDATE_REQUEST",Q="PRODUCT_UPDATE_SUCCESS",q="PRODUCT_UPDATE_FAIL",J="PRODUCT_UPDATE_RESET",W="https://plantland.herokuapp.com",Y=(a(118),a(444)),V=a(0);var H=function(){return Object(V.jsx)(Y.a,{animation:"border",variant:"success",role:"status",style:{width:"100px",height:"100px",margin:"auto",display:"block"},children:Object(V.jsx)("span",{className:"sr-only",children:"Loading..."})})},K=a(462),Z=a(445),X=a(95),$=a.n(X);var ee=function(e){var t=e.blog,a=Object(d.k)();return Object(V.jsx)("div",{children:Object(V.jsxs)(K.a,{style:{width:"24rem",minWidth:"18rem"},children:[Object(V.jsx)(l.Link,{to:"/blog/".concat(t._id),children:Object(V.jsx)(K.a.Img,{style:{padding:"0.7rem",height:"20rem"},variant:"top",src:t.image})}),Object(V.jsxs)(K.a.Body,{children:[Object(V.jsx)(K.a.Title,{className:"blog-card-title",children:t.title}),t.tags.map((function(e,t){return Object(V.jsx)(Z.a,{className:"blog-card-badge",children:e},t)})),Object(V.jsx)(K.a.Text,{className:"blog-card-desc",children:$()(t.description)}),Object(V.jsxs)("div",{style:{display:"flex",justifyContent:"space-between"},children:[Object(V.jsxs)(j.a,{className:"bg-col-primary",onClick:function(){return e=t._id,void a.push("/blog/".concat(e));var e},children:["Read More \xa0 ",Object(V.jsx)("i",{className:"fa fa-chevron-right"})," "]}),Object(V.jsxs)("div",{className:"blog-card-icons",children:[Object(V.jsx)("i",{className:"far fa-thumbs-up blog-card-like","aria-hidden":"true"}),Object(V.jsx)("i",{className:"far fa-bookmark blog-card-bookmark","aria-hidden":"true"})]})]})]})]})})},te=["All","Plant","Gardening","Plant Diseases","Green Living","Gardening Tools","Others"],ae=["plants","nature","flowers","plantsofinstagram","garden","plantsmakepeoplehappy","plant","green","gardening","houseplants","photography","naturephotography","flower","plantlover","love","indoorplants","succulents","urbanjungle","cactus","art","beautiful","plantlife","photooftheday","plantas","plantstagram","homedecor","flowerstagram","spring","naturelovers","bhfyp"];var re=function(){var e=Object(d.k)(),t=Object(i.b)(),a=Object(i.c)((function(e){return e.blogList})),n=a.loading,c=a.blogs;return Object(r.useEffect)((function(){t(function(){var e=Object(O.a)(p.a.mark((function e(t){var a,r;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,t({type:g}),e.next=4,x.a.get("".concat(W,"/api/blogs"));case 4:a=e.sent,r=a.data,t({type:f,payload:r}),e.next=13;break;case 9:e.prev=9,e.t0=e.catch(0),console.log(e.t0),t({type:v,payload:e.t0.response&&e.t0.response.data.message?e.t0.response.data.message:e.t0.message});case 13:case"end":return e.stop()}}),e,null,[[0,9]])})));return function(t){return e.apply(this,arguments)}}())}),[t]),Object(V.jsx)(V.Fragment,{children:Object(V.jsxs)("div",{className:"blog-home",children:[Object(V.jsxs)("div",{className:"blog-home-img",children:[Object(V.jsx)("h1",{children:"Blogs"}),Object(V.jsx)("p",{children:"We all need a little green in our lives"})]}),Object(V.jsxs)("div",{className:"blog-home-text",children:[Object(V.jsxs)("div",{style:{display:"flex",justifyContent:"space-between"},children:[Object(V.jsx)("h3",{children:"Latest Articles"}),Object(V.jsxs)(j.a,{onClick:function(){e.push("/newblog")},className:"blog-btn bg-col-primary",children:[Object(V.jsx)("i",{className:"fas fa-plus-circle"})," \xa0Create Blog"]})]}),Object(V.jsx)("p",{children:"Discover the most outstanding articles in all topics related to Plants"})]}),Object(V.jsxs)(u.a,{className:"blog-row",children:[Object(V.jsxs)(b.a,{md:2,xs:12,children:[Object(V.jsxs)("div",{className:"blog-category",children:[Object(V.jsx)("h5",{children:"Category"}),te.map((function(e){return Object(V.jsx)("div",{className:"blog-category-item",children:e},e)}))]}),Object(V.jsxs)("div",{className:"blog-tags",children:[Object(V.jsx)("h4",{children:"Discover Tags"}),Object(V.jsx)("div",{className:"blog-tag-div",children:ae.map((function(e){return Object(V.jsx)("div",{className:"blog-tag",children:e},e)}))})]})]}),n?Object(V.jsx)(H,{}):Object(V.jsx)(b.a,{md:10,xs:12,children:Object(V.jsx)(u.a,{children:c&&c.map((function(e,t){return Object(V.jsx)(b.a,{xs:12,md:6,lg:4,xl:4,className:"blog-card",children:Object(V.jsx)(ee,{blog:e})},t)}))})})]})]})})},ne=a(447);function ce(e){var t=e.variant,a=e.children;return Object(V.jsx)(ne.a,{variant:t,children:a})}ce.defaultProps={variant:"info"};var se=ce;var ie=function(e){var t=e.match,a=Object(i.b)(),n=Object(i.c)((function(e){return e.blogDetails})),c=n.loading,s=n.blog,l=n.error;return Object(r.useEffect)((function(){var e;a((e=t.params.id,function(){var t=Object(O.a)(p.a.mark((function t(a){var r,n;return p.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,a({type:y}),t.next=4,x.a.get("".concat(W,"/api/blogs/").concat(e));case 4:r=t.sent,n=r.data,a({type:S,payload:n}),t.next=13;break;case 9:t.prev=9,t.t0=t.catch(0),console.log(t.t0),a({type:w,payload:t.t0.response&&t.t0.response.data.message?t.t0.response.data.message:t.t0.message});case 13:case"end":return t.stop()}}),t,null,[[0,9]])})));return function(e){return t.apply(this,arguments)}}()))}),[a,t]),Object(V.jsx)(o.a,{className:"blog-det-container",children:c?Object(V.jsx)(H,{}):l?Object(V.jsx)(se,{variant:"alert",children:l}):s&&Object(V.jsxs)(V.Fragment,{children:[Object(V.jsx)("img",{className:"blog-det-image",src:s.image,alt:"blog hero"}),Object(V.jsx)("h1",{className:"blog-det-title",children:s.title}),Object(V.jsx)("div",{className:"blog-det-info-div",children:Object(V.jsxs)("div",{className:"blog-det-info",children:[Object(V.jsxs)("p",{children:["By ",Object(V.jsx)("span",{className:"info-span",children:s.author})]}),Object(V.jsxs)("p",{children:["Published in ",Object(V.jsx)("span",{className:"info-span",children:s.category})]}),Object(V.jsx)("p",{children:s.createdAt&&new Date(s.createdAt).toDateString()})]})}),Object(V.jsx)("div",{className:"blog-det-desc",children:$()(s.description)}),Object(V.jsx)("div",{className:"blog-det-tags",children:s.tags&&s.tags.map((function(e,t){return Object(V.jsx)(Z.a,{className:"blog-card-badge blog-det-badge",children:e},t)}))})]})})},oe=a(9),le=a(205),de=a.n(le),je=a(206),ue=a(56);a(174);ue.a.configure();var be=function(e){ue.a.success(e,{autoClose:3e3})},he=function(e){ue.a.info(e,{autoClose:3e3})},pe=function(e){ue.a.error(e,{autoClose:3e3,position:"bottom-right"})},Oe=n.a.useState,me=[{id:"plant",label:"Plant"},{id:"garden",label:"Gardening"},{id:"diseases",label:"Plant Diseases"},{id:"green",label:"Green Living"},{id:"tools",label:"Gardening Tools"},{id:"others",label:"Others"}],xe=function(e){var t=e.onCategorySelect,a=Oe(!1),r=Object(oe.a)(a,2),n=r[0],c=r[1],s=Oe(me),i=Object(oe.a)(s,1)[0],o=Oe(null),l=Object(oe.a)(o,2),d=l[0],j=l[1];return Object(V.jsxs)("div",{className:"dropdown",children:[Object(V.jsxs)("div",{className:"dropdown-header",onClick:function(){return c(!n)},children:[d?i.find((function(e){return e.id===d})).label:"Select Blog Category",Object(V.jsx)("i",{className:"fa fa-chevron-right icon ".concat(n&&"open")})]}),Object(V.jsx)("div",{className:"dropdown-body ".concat(n&&"open"),children:i.map((function(e){return Object(V.jsxs)("div",{className:"dropdown-item",onClick:function(e){return a=e.target.id,t(a),void j(d===a?null:a);var a},id:e.id,children:[Object(V.jsx)("span",{className:"dropdown-item-dot ".concat(e.id===d&&"selected"),children:"\u2022 "}),e.label]},e.id)}))})]})};var ge=function(){var e=Object(d.k)(),t=Object(i.b)(),a=Object(r.useState)(""),n=Object(oe.a)(a,2),c=n[0],s=n[1],o=Object(r.useState)(""),l=Object(oe.a)(o,2),u=l[0],b=l[1],h=Object(r.useState)(""),m=Object(oe.a)(h,2),g=m[0],f=m[1],v=Object(r.useState)(""),y=Object(oe.a)(v,2),S=y[0],E=y[1],C=Object(r.useState)(""),I=Object(oe.a)(C,2),N=I[0],_=I[1],k=function(){var e=Object(O.a)(p.a.mark((function e(t){var a,r,n,c,s;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.target.files[0],(r=new FormData).append("image",a),e.prev=3,n={headers:{"Content-Type":"multipart/form-data"}},e.next=7,x.a.post("/api/uploads",r,n);case 7:c=e.sent,s=c.data,E(s),e.next=15;break;case 12:e.prev=12,e.t0=e.catch(3),console.log(e.t0);case 15:case"end":return e.stop()}}),e,null,[[3,12]])})));return function(t){return e.apply(this,arguments)}}(),w=function(){s(""),_(""),f(""),b(""),E("")};return Object(V.jsxs)("div",{className:"write",children:[S?Object(V.jsx)("img",{className:"writeImage",src:S,alt:"blog hero"}):Object(V.jsx)("img",{className:"writeImage",src:"https://images.pexels.com/photos/9513908/pexels-photo-9513908.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940",alt:"blog hero"}),Object(V.jsxs)("form",{className:"writeForm",onSubmit:function(e){e.preventDefault(),console.log("off");var a,r=g.split(","),n={title:c,description:N,category:u,tags:r,image:S};try{t((a=n,function(){var e=Object(O.a)(p.a.mark((function e(t,r){var n,c,s,i,o;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,n=r(),c=n.userLogin.userInfo,s={headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(c.token)}},e.next=5,x.a.post("".concat(W,"/api/blogs"),a,s);case 5:i=e.sent,o=i.data,console.log(o),e.next=13;break;case 10:e.prev=10,e.t0=e.catch(0),console.log(e.t0);case 13:case"end":return e.stop()}}),e,null,[[0,10]])})));return function(t,a){return e.apply(this,arguments)}}())),w(),be("Blog Published")}catch(s){console.log(s)}},children:[Object(V.jsxs)("div",{className:"writeFormGroup",children:[Object(V.jsx)("label",{htmlFor:"blogImage",children:Object(V.jsx)("i",{className:"writeIcon fas fa-plus"})}),Object(V.jsx)("input",{type:"file",name:"blogImage",id:"blogImage",style:{display:"none"},onChange:k}),Object(V.jsx)("input",{type:"text",name:"title",id:"title",placeholder:"Title",autoFocus:!0,className:"writeInput writeTitle",value:c,onChange:function(e){return s(e.target.value)}})]}),Object(V.jsx)("div",{className:"writeCategory",children:Object(V.jsx)(xe,{onCategorySelect:function(e){b(e)}})}),Object(V.jsx)("div",{className:"writeFormGroup",children:Object(V.jsx)("input",{type:"text",name:"tags",id:"tags",className:"writeInput writeTags",placeholder:"Add tags, separated by comma...",value:g,onChange:function(e){return f(e.target.value)}})}),Object(V.jsx)(je.CKEditor,{editor:de.a,data:N,config:{ckfinder:{uploadUrl:"http://localhost:5000/api/uploads/ck-image"}},onChange:function(e,t){var a=t.getData();console.log(a),_(a)}}),Object(V.jsx)(j.a,{type:"submit",className:"writeSubmit bg-col-primary",children:"Publish"})]}),Object(V.jsx)(j.a,{className:"blogBack",onClick:function(){return e.push("/blog")},children:"Back"})]})};var fe=function(){return Object(V.jsx)("footer",{children:Object(V.jsx)(o.a,{children:Object(V.jsx)(u.a,{children:Object(V.jsx)(b.a,{className:"text-center py-3",children:"copyright \xa9 Plant Land"})})})})},ve=a(461),ye=a(463),Se=a(449),Ee=a(25),Ce="USER_LOGIN_REQUEST",Ie="USER_LOGIN_SUCCESS",Ne="USER_LOGIN_FAIL",_e="USER_LOGOUT",ke="USER_REGISTER_REQUEST",we="USER_REGISTER_SUCCESS",Le="USER_REGISTER_FAIL",De="USER_DETAILS_REQUEST",Ae="USER_DETAILS_SUCCESS",Te="USER_DETAILS_FAIL",Re="USER_PROFILE_UPDATE_REQUEST",Pe="USER_PROFILE_UPDATE_SUCCESS",Ue="USER_PROFILE_UPDATE_FAIL",Fe="USER_LIST_REQUEST",Ge="USER_LIST_SUCCESS",Be="USER_LIST_FAIL",Me="USER_LIST_RESET",ze="USER_DELETE_REQUEST",Qe="USER_DELETE_SUCCESS",qe="USER_DELETE_FAIL",Je="https://plantland.herokuapp.com",We=function(e){return function(){var t=Object(O.a)(p.a.mark((function t(a){return p.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:try{a({type:Ce}),a({type:Ie,payload:e}),localStorage.setItem("userInfo",JSON.stringify(e))}catch(r){console.log(r),a({type:Ne,payload:r.response&&r.response.data.message?r.response.data.message:r.message})}case 1:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()};var Ye=function(){var e=Object(i.c)((function(e){return e.userLogin})).userInfo,t=Object(i.b)(),a=Object(d.k)();return Object(V.jsx)(V.Fragment,{children:Object(V.jsx)(ve.a,{collapseOnSelect:!0,expand:"lg",variant:"dark",className:"bg-pm-col-only",children:Object(V.jsxs)(o.a,{children:[Object(V.jsx)(Ee.LinkContainer,{to:"/",children:Object(V.jsx)(ve.a.Brand,{children:"Plant Land"})}),Object(V.jsx)(ve.a.Toggle,{"aria-controls":"responsive-navbar-nav"}),Object(V.jsxs)(ve.a.Collapse,{id:"responsive-navbar-nav",children:[Object(V.jsx)(ye.a,{className:"me-auto"}),Object(V.jsxs)(ye.a,{children:[Object(V.jsx)(Ee.LinkContainer,{to:"/cart",children:Object(V.jsxs)(ye.a.Link,{children:[Object(V.jsx)("i",{className:"fas fa-shopping-cart"}),"Cart"]})}),e?Object(V.jsxs)(Se.a,{title:e.user.name,id:"name",variant:"success",children:[Object(V.jsx)(Se.a.Item,{href:"/profile",children:"Profile"}),Object(V.jsx)(Se.a.Item,{onClick:function(){t((function(e){localStorage.removeItem("userInfo"),e({type:_e}),e({type:Me})})),a.push("/market"),pe("You're logged out")},children:"Logout"})]}):Object(V.jsx)(Ee.LinkContainer,{to:"/login",children:Object(V.jsxs)(ye.a.Link,{children:[Object(V.jsx)("i",{className:"fas fa-user"}),"Sign In"]})}),e&&e.user.isAdmin&&Object(V.jsx)(Se.a,{title:"Admin",id:"admin",variant:"success",children:Object(V.jsx)(Ee.LinkContainer,{to:"/admin/orderData",children:Object(V.jsx)(Se.a.Item,{children:"Dashboard"})})})]})]})]})})})},Ve=a(21),He=a(464),Ke=a(450),Ze=a(207),Xe="CART_ADD_ITEM",$e="CART_REMOVE_ITEM",et="CART_SAVE_SHIPPING_ADDRESS",tt="CART_SAVE_PAYMENT_METHOD",at=function(e,t){return function(){var a=Object(O.a)(p.a.mark((function a(r,n){var c,s;return p.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return a.prev=0,a.next=3,x.a.get("".concat("https://plantland.herokuapp.com","/api/products/").concat(e));case 3:c=a.sent,s=c.data,r({type:Xe,payload:{productId:s._id,name:s.name,image:s.image,price:s.price,countInStock:s.countInStock,qty:t}}),localStorage.setItem("cartItems",JSON.stringify(n().cart.cartItems)),a.next=12;break;case 9:a.prev=9,a.t0=a.catch(0),console.log("Gg",a.t0);case 12:case"end":return a.stop()}}),a,null,[[0,9]])})));return function(e,t){return a.apply(this,arguments)}}()};var rt=function(e){var t=e.match,a=e.history,n=e.location,c=Object(i.b)(),s=t.params.id,o=n.search?Number(n.search.split("=")[1]):1,d=Object(i.c)((function(e){return e.cart})).cartItems;Object(r.useEffect)((function(){s&&c(at(s,o))}),[c,s,o]);var h=function(e){c(function(e){return function(){var t=Object(O.a)(p.a.mark((function t(a,r){return p.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:try{a({type:$e,payload:e}),localStorage.setItem("cartItems",JSON.stringify(r().cart.cartItems))}catch(n){console.log("Gg",n)}case 1:case"end":return t.stop()}}),t)})));return function(e,a){return t.apply(this,arguments)}}()}(e))};return Object(V.jsx)("div",{children:Object(V.jsxs)(u.a,{children:[Object(V.jsx)("h2",{style:{padding:"1rem"},children:"Shopping Cart"}),Object(V.jsx)(b.a,{md:8,children:0===d.length?Object(V.jsxs)(se,{children:["Your cart is empty. ",Object(V.jsx)(l.Link,{to:"/market",children:"Go Back"})]}):Object(V.jsx)(He.a,{variant:"flush",children:d.map((function(e){return Object(V.jsx)(He.a.Item,{children:Object(V.jsxs)(u.a,{children:[Object(V.jsx)(b.a,{md:2,children:Object(V.jsx)(Ke.a,{src:e.image,alt:e.name,fluid:!0,rounded:!0})}),Object(V.jsx)(b.a,{md:4,children:Object(V.jsx)(l.Link,{to:"/product/".concat(e.productId),children:e.name})}),Object(V.jsxs)(b.a,{md:2,style:{fontSize:"1.2rem"},children:[Object(V.jsx)("span",{style:{fontSize:"1.3rem"},children:"\u09f3"}),"\xa0",e.price]}),Object(V.jsx)(b.a,{md:2,children:Object(V.jsx)(Ze.a,{as:"select",value:e.qty,onChange:function(t){return c(at(e.productId,Number(t.target.value)))},children:Object(Ve.a)(Array(e.countInStock).keys()).map((function(e){return Object(V.jsx)("option",{value:e+1,children:e+1},e+1)}))})}),Object(V.jsx)(b.a,{md:2,children:Object(V.jsx)(j.a,{variant:"light",type:"button",onClick:function(){return h(e.productId)},children:Object(V.jsx)("i",{className:"fas fa-trash"})})})]})},e.productId)}))})}),Object(V.jsx)(b.a,{md:1}),Object(V.jsx)(b.a,{md:3,children:Object(V.jsx)(K.a,{children:Object(V.jsxs)(He.a,{variant:"flush",children:[Object(V.jsx)(He.a.Item,{children:Object(V.jsxs)("h3",{children:["Subtotal (",d.reduce((function(e,t){return e+t.qty}),0),") items"]})}),Object(V.jsx)(He.a.Item,{children:Object(V.jsxs)(u.a,{children:[Object(V.jsx)(b.a,{children:"Price"}),Object(V.jsx)(b.a,{children:d.reduce((function(e,t){return e+t.qty*t.price}),0).toFixed(2)})]})}),Object(V.jsx)(He.a.Item,{children:Object(V.jsx)(j.a,{type:"button",className:"btn-block",variant:"success",disabled:0===d.length,style:{width:"100%"},onClick:function(){a.push("/login?redirect=shipping")},children:"Proceed to checkout"})})]})})})]})})},nt=a(460);var ct=function(e){var t=e.children;return Object(V.jsx)(o.a,{children:Object(V.jsx)(u.a,{className:"justify-content-md-center",children:Object(V.jsxs)(b.a,{xs:12,md:4,children:[" ",t," "]})})})};var st=function(){var e=Object(r.useState)(""),t=Object(oe.a)(e,2),a=t[0],n=t[1],c=Object(r.useState)(""),s=Object(oe.a)(c,2),i=s[0],o=s[1],l=function(){var e=Object(O.a)(p.a.mark((function e(t){var r;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.preventDefault(),r={headers:{"Content-Type":"application/json"}},e.prev=2,e.next=5,x.a.post("/api/users/forget-password",{email:a},r);case 5:he("Instructions to reset your password has been sent to your email"),e.next=13;break;case 8:e.prev=8,e.t0=e.catch(2),o(e.t0.response&&e.t0.response.data.message?e.t0.response.data.message:e.t0.message),n(""),setTimeout((function(){o("")}),3e3);case 13:case"end":return e.stop()}}),e,null,[[2,8]])})));return function(t){return e.apply(this,arguments)}}();return Object(V.jsxs)(ct,{children:[Object(V.jsx)("h1",{className:"py-2",children:"Forget Password ?"}),Object(V.jsx)("p",{className:"mb-5",children:"Enter the email address you used when you joined and we\u2019ll send you instructions to reset your password."}),i&&Object(V.jsx)(se,{variant:"danger",children:i}),Object(V.jsxs)(nt.a,{onSubmit:l,children:[Object(V.jsxs)(nt.a.Group,{controlId:"email",className:"mb-3 mt-5",children:[Object(V.jsx)(nt.a.Label,{children:"Email Address"}),Object(V.jsx)(nt.a.Control,{type:"email",placeholder:"Enter email",value:a,onChange:function(e){return n(e.target.value)}})]}),Object(V.jsx)(j.a,{type:"submit",variant:"primary",className:"auth-btn bg-col-primary",children:"Submit"})]})]})},it="https://plantland.herokuapp.com",ot=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"";return function(){var n=Object(O.a)(p.a.mark((function n(c){var s,i;return p.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,c({type:C}),n.next=4,x.a.get("".concat(it,"/api/products?category=").concat(a,"&keyword=").concat(e,"&pageNumber=").concat(t,"&sort=").concat(r));case 4:s=n.sent,i=s.data,c({type:I,payload:i}),n.next=13;break;case 9:n.prev=9,n.t0=n.catch(0),console.log(n.t0),c({type:N,payload:n.t0.response&&n.t0.response.data.message?n.t0.response.data.message:n.t0.message});case 13:case"end":return n.stop()}}),n,null,[[0,9]])})));return function(e){return n.apply(this,arguments)}}()},lt=function(e){return function(){var t=Object(O.a)(p.a.mark((function t(a){var r,n;return p.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,a({type:_}),t.next=4,x.a.get("".concat(it,"/api/products/").concat(e));case 4:r=t.sent,n=r.data,a({type:k,payload:n}),t.next=13;break;case 9:t.prev=9,t.t0=t.catch(0),console.log(t.t0),a({type:w,payload:t.t0.response&&t.t0.response.data.message?t.t0.response.data.message:t.t0.message});case 13:case"end":return t.stop()}}),t,null,[[0,9]])})));return function(e){return t.apply(this,arguments)}}()},dt=(a(52),a(451)),jt=a(46);var ut=function(e){var t=e.handleCategoryChange;return Object(V.jsx)(V.Fragment,{children:Object(V.jsxs)(dt.a,{alignRight:!0,title:"Product Category",id:"dropdown-menu-align-right",onSelect:t,children:[["Plant","Flower","Seed","Pesticide","Tool"].map((function(e){return Object(V.jsx)(jt.a.Item,{eventKey:e,children:e},e)})),Object(V.jsx)(jt.a.Item,{eventKey:"soil",children:"Soil and Fertilizer"},"soil")]})})};var bt=function(e){var t=e.handleSortChange;return Object(V.jsx)(V.Fragment,{children:Object(V.jsxs)(dt.a,{alignRight:!0,title:"Sort By",id:"dropdown-menu-align-right",onSelect:t,children:[Object(V.jsx)(jt.a.Item,{eventKey:"rating",children:"Highest Rated"},"rating"),Object(V.jsx)(jt.a.Item,{eventKey:"newest",children:"Newest"},"newest"),Object(V.jsx)(jt.a.Item,{eventKey:"lowest",children:"Price: Low to High"},"lowest"),Object(V.jsx)(jt.a.Item,{eventKey:"highest",children:"Price: High to Low"},"highest")]})})},ht=a(465);var pt=function(e){var t=e.page,a=e.numOfPages,r=e.keyword,n=void 0===r?"":r;return e.sort,e.isAdmin,a>1&&Object(V.jsx)(ht.a,{children:Object(Ve.a)(Array(a).keys()).map((function(e){return Object(V.jsx)(Ee.LinkContainer,{to:n?"/search/".concat(n,"/page/").concat(e+1):"/page/".concat(e+1),children:Object(V.jsx)(ht.a.Item,{active:t===e+1,children:e+1},e+1)},e+1)}))})};var Ot=function(e){var t=e.value,a=e.text;return Object(V.jsxs)("div",{className:"rating",children:[Object(V.jsxs)("div",{style:{color:"#faef67"},children:[Object(V.jsx)("span",{children:Object(V.jsx)("i",{className:t>=1?"fas fa-star":t>=.5?"fas fa-star-half-alt":"far fas-star"})}),Object(V.jsx)("span",{children:Object(V.jsx)("i",{className:t>=2?"fas fa-star":t>=1.5?"fas fa-star-half-alt":"far fas-star"})}),Object(V.jsx)("span",{children:Object(V.jsx)("i",{className:t>=3?"fas fa-star":t>=2.5?"fas fa-star-half-alt":"far fas-star"})}),Object(V.jsx)("span",{children:Object(V.jsx)("i",{className:t>=4?"fas fa-star":t>=3.5?"fas fa-star-half-alt":"far fas-star"})}),Object(V.jsx)("span",{children:Object(V.jsx)("i",{className:t>=5?"fas fa-star":t>=4.5?"fas fa-star-half-alt":"far fas-star"})})]}),"hidden"!==a&&Object(V.jsx)("div",{className:"rating_text",children:Object(V.jsx)("span",{children:a?"".concat(a," reviews"):"No reviews yet"})})]})};var mt=function(e){var t=e.product,a=Object(d.k)();return Object(V.jsxs)(K.a,{className:"my-3 p-3",children:[Object(V.jsx)(l.Link,{to:"/product/".concat(t._id),children:Object(V.jsx)(K.a.Img,{variant:"top",src:t.image})}),Object(V.jsxs)(K.a.Body,{children:[Object(V.jsx)(K.a.Title,{className:"product_name",children:t.name}),Object(V.jsx)(K.a.Text,{as:"div",className:"my-3",children:Object(V.jsx)(Ot,{value:t.rating,text:t.numReviews})}),Object(V.jsxs)(K.a.Text,{as:"h5",className:"product_name",children:[Object(V.jsx)("span",{style:{fontSize:"1.3rem"},children:"\u09f3"}),"\xa0",t.price]}),Object(V.jsx)(j.a,{className:"bg-col-primary",onClick:function(){return e=t._id,void a.push("/product/".concat(e));var e},children:"View Details"})]})]})};var xt=function(){var e=Object(r.useState)(""),t=Object(oe.a)(e,2),a=t[0],n=t[1],c=Object(d.k)();return Object(V.jsx)(V.Fragment,{children:Object(V.jsxs)(nt.a,{onSubmit:function(e){e.preventDefault(),a.trim()?c.push("/search/".concat(a)):c.push("/market")},inline:!0,className:"d-flex",children:[Object(V.jsx)(nt.a.Control,{type:"text",placeholder:"Search Products...",className:"mr-sm-2 ml-sm-5",name:"q",onChange:function(e){return n(e.target.value)}}),Object(V.jsx)(j.a,{className:"btn btn-outline-light home-submit-btn",type:"submit",children:"Search"})]})})};var gt=function(e){var t=e.match,a=Object(r.useState)(""),n=Object(oe.a)(a,2),c=n[0],s=n[1],o=Object(r.useState)(""),l=Object(oe.a)(o,2),d=l[0],j=l[1],h=Object(i.b)(),p=Object(i.c)((function(e){return e.productList})),O=p.loading,m=p.error,x=p.products,g=p.page,f=p.numOfPages,v=t.params.keyword,y=t.params.pageNumber||1,S=c,E=d;return Object(r.useEffect)((function(){h(ot(v,y,S,E))}),[h,v,y,S,E]),Object(V.jsxs)("div",{children:[Object(V.jsxs)(u.a,{className:"home-filter-info",children:[Object(V.jsx)(b.a,{xs:12,md:3,className:"home-filter-dropdown",children:Object(V.jsx)(ut,{handleCategoryChange:function(e){s(e.toLowerCase())}})}),Object(V.jsx)(b.a,{xs:12,md:6,children:Object(V.jsx)(xt,{})}),Object(V.jsx)(b.a,{xs:12,md:3,className:"home-filter-dropdown",children:Object(V.jsx)(bt,{handleSortChange:function(e){j(e)}})})]}),Object(V.jsx)("h2",{children:"Latest Products"}),O?Object(V.jsx)(H,{}):m?Object(V.jsx)(se,{variant:"danger",children:m}):Object(V.jsxs)(V.Fragment,{children:[Object(V.jsx)(u.a,{children:x.map((function(e){return Object(V.jsx)(b.a,{xs:12,md:6,lg:4,xl:3,children:Object(V.jsx)(mt,{product:e})},e._id)}))}),Object(V.jsx)(pt,{numOfPages:f,page:g,sort:E||" ",keyword:v||""})]})]})},ft=a(208);var vt=function(){var e=Object(i.b)(),t=Object(d.k)(),a=function(){var a=Object(O.a)(p.a.mark((function a(r){var n,c;return p.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:n=null===r||void 0===r?void 0:r.profileObj,c=null===r||void 0===r?void 0:r.tokenId;try{e(We({user:n,token:c})),t.push("/market")}catch(s){console.log(s)}case 3:case"end":return a.stop()}}),a)})));return function(e){return a.apply(this,arguments)}}();return Object(V.jsx)("div",{children:Object(V.jsx)(ft.GoogleLogin,{clientId:"194822757324-85cbm8js64av331n4ouf1aqr4ot4veju.apps.googleusercontent.com",render:function(e){return Object(V.jsx)(j.a,{onClick:e.onClick,disabled:e.disabled,className:"google-btn login-with-google-btn",children:"Google Sign in"})},onSuccess:a,onFailure:function(){console.log("Google Sign in was unsuccessful. Try again later")},cookiePolicy:"single_host_origin"})})};var yt=function(e){var t=e.location,a=e.history,n=Object(r.useState)(""),c=Object(oe.a)(n,2),s=c[0],o=c[1],d=Object(r.useState)(""),h=Object(oe.a)(d,2),m=h[0],g=h[1],f=t.search?t.search.split("=")[1]:"/market",v=Object(i.b)(),y=Object(i.c)((function(e){return e.userLogin})),S=y.loading,E=y.error,C=y.userInfo;return Object(r.useEffect)((function(){C&&(he("Hey, nice to see you back ".concat(C.user.name)),a.push(f))}),[a,f,C]),Object(V.jsxs)(ct,{children:[Object(V.jsx)("h1",{className:"text-center",children:"Sign In"}),E&&Object(V.jsx)(se,{variant:"danger",children:E}),S&&Object(V.jsx)(H,{}),Object(V.jsxs)(nt.a,{onSubmit:function(e){e.preventDefault(),v(function(e,t){return function(){var a=Object(O.a)(p.a.mark((function a(r){var n,c,s;return p.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return a.prev=0,r({type:Ce}),n={headers:{"Content-Type":"application/json"}},a.next=5,x.a.post("".concat(Je,"/api/users/login"),{email:e,password:t},n);case 5:c=a.sent,s=c.data,r({type:Ie,payload:s}),localStorage.setItem("userInfo",JSON.stringify(s)),a.next=15;break;case 11:a.prev=11,a.t0=a.catch(0),console.log(a.t0),r({type:Ne,payload:a.t0.response&&a.t0.response.data.message?a.t0.response.data.message:a.t0.message});case 15:case"end":return a.stop()}}),a,null,[[0,11]])})));return function(e){return a.apply(this,arguments)}}()}(s,m))},children:[Object(V.jsxs)(nt.a.Group,{controlId:"email",className:"mb-3 mt-3",children:[Object(V.jsx)(nt.a.Label,{children:"Email Address"}),Object(V.jsx)(nt.a.Control,{type:"email",placeholder:"Enter email",value:s,onChange:function(e){return o(e.target.value)}})]}),Object(V.jsxs)(nt.a.Group,{controlId:"password",className:"mb-1",children:[Object(V.jsx)(nt.a.Label,{children:"Password"}),Object(V.jsx)(nt.a.Control,{type:"password",placeholder:"Enter password",value:m,onChange:function(e){return g(e.target.value)}})]}),Object(V.jsx)(l.Link,{to:"/forget-password",children:"Forget Password ?"}),Object(V.jsx)(j.a,{type:"submit",variant:"primary",className:"auth-btn mb-2 mt-4 bg-col-primary",children:"Sign In"})]}),Object(V.jsx)(u.a,{children:Object(V.jsx)(b.a,{className:"text-center my-1",children:Object(V.jsx)("h6",{children:"Or"})})}),Object(V.jsx)(u.a,{children:Object(V.jsxs)(b.a,{children:[" ",Object(V.jsx)(vt,{})," "]})}),Object(V.jsx)(u.a,{className:"py-3",children:Object(V.jsxs)(b.a,{children:["Don't have an Account ? ",Object(V.jsx)(l.Link,{to:f?"/register?redirect=".concat(f):"/",children:"Create one"})]})})]})},St=a(452),Et="ORDER_CREATE_REQUEST",Ct="ORDER_CREATE_SUCCESS",It="ORDER_CREATE_FAIL",Nt="ORDER_DETAILS_REQUEST",_t="ORDER_DETAILS_SUCCESS",kt="ORDER_DETAILS_FAIL",wt="ORDER_MY_LIST_REQUEST",Lt="ORDER_MY_LIST_SUCCESS",Dt="ORDER_MY_LIST_FAIL",At="ORDER_LIST_REQUEST",Tt="ORDER_LIST_SUCCESS",Rt="ORDER_LIST_FAIL",Pt="ORDER_PAY_REQUEST",Ut="ORDER_PAY_SUCCESS",Ft="ORDER_PAY_FAIL",Gt="ORDER_PAY_RESET",Bt="ORDER_DELIVER_REQUEST",Mt="ORDER_DELIVER_SUCCESS",zt="ORDER_DELIVER_FAIL",Qt="ORDER_DELIVER_RESET",qt="ORDER_DATA_REQUEST",Jt="ORDER_DATA_SUCCESS",Wt="ORDER_DATA_FAIL",Yt="ORDER_SALE_DATA_REQUEST",Vt="ORDER_SALE_DATA_SUCCESS",Ht="ORDER_SALE_DATA_FAIL",Kt="https://plantland.herokuapp.com";var Zt=function(){return Object(V.jsxs)("div",{className:"s-layout__sidebar",children:[Object(V.jsx)("a",{className:"s-sidebar__trigger",href:"#0",children:Object(V.jsx)("i",{className:"fa fa-bars"})}),Object(V.jsx)("nav",{className:"s-sidebar__nav",children:Object(V.jsxs)("ul",{children:[Object(V.jsx)("li",{children:Object(V.jsxs)("a",{className:"s-sidebar__nav-link",href:"/market",style:{marginTop:"-5px"},children:[Object(V.jsx)("i",{className:"fa fa-home"}),Object(V.jsx)("em",{children:"Market"})]})}),Object(V.jsx)("li",{children:Object(V.jsxs)("a",{className:"s-sidebar__nav-link",href:"/admin/orderData",children:[Object(V.jsx)("i",{className:"fas fa-th-large"}),Object(V.jsx)("em",{children:"Dashboard"})]})}),Object(V.jsx)("li",{children:Object(V.jsxs)("a",{className:"s-sidebar__nav-link",href:"/admin/orderList",children:[Object(V.jsx)("i",{className:"fas fa-shopping-cart"}),Object(V.jsx)("em",{children:"Orders"})]})}),Object(V.jsx)("li",{children:Object(V.jsxs)("a",{className:"s-sidebar__nav-link",href:"/admin/productList",children:[Object(V.jsx)("i",{className:"fas fa-shopping-bag"}),Object(V.jsx)("em",{children:"Products"})]})}),Object(V.jsx)("li",{children:Object(V.jsxs)("a",{className:"s-sidebar__nav-link",href:"/admin/saleData",children:[Object(V.jsx)("i",{className:"fas fa-chart-line"}),Object(V.jsx)("em",{children:"Analytics"})]})}),Object(V.jsx)("li",{children:Object(V.jsxs)("a",{className:"s-sidebar__nav-link",href:"/admin/userList",children:[Object(V.jsx)("i",{className:"fas fa-users"}),Object(V.jsx)("em",{children:"Users"})]})})]})})]})};var Xt=function(e){var t,a,n=e.history,c=Object(i.b)(),s=Object(i.c)((function(e){return e.userLogin})).userInfo.user,o=Object(i.c)((function(e){return e.orderData})),l=o.loading,d=o.error,j=o.orderData;return Object(r.useEffect)((function(){s&&s.isAdmin?c(function(){var e=Object(O.a)(p.a.mark((function e(t,a){var r,n,c,s,i;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,t({type:qt}),r=a(),n=r.userLogin.userInfo,c={headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(n.token)}},e.next=6,x.a.get("".concat(Kt,"/api/orders/order-data"),c);case 6:s=e.sent,i=s.data,t({type:Jt,payload:i}),e.next=15;break;case 11:e.prev=11,e.t0=e.catch(0),console.log(e.t0),t({type:Wt,payload:e.t0.response&&e.t0.response.data.message?e.t0.response.data.message:e.t0.message});case 15:case"end":return e.stop()}}),e,null,[[0,11]])})));return function(t,a){return e.apply(this,arguments)}}()):n.push("/login")}),[c,n,s]),Object(V.jsx)(V.Fragment,{children:Object(V.jsxs)(u.a,{children:[Object(V.jsxs)(b.a,{md:2,children:[Object(V.jsx)(Zt,{})," "]}),Object(V.jsx)(b.a,{md:10,children:l?Object(V.jsx)(H,{}):d?Object(V.jsx)(se,{variant:"danger",children:d}):Object(V.jsx)(V.Fragment,{children:j&&Object(V.jsxs)(V.Fragment,{children:[Object(V.jsx)(u.a,{children:Object(V.jsxs)("div",{className:"order-data-card",children:[Object(V.jsxs)("div",{className:"order-data order-total",children:[Object(V.jsxs)("div",{children:[Object(V.jsx)("i",{className:"fas fa-shopping-cart"}),Object(V.jsx)("h4",{children:"Total Orders"})]}),Object(V.jsx)("p",{children:j.totalOrder})]}),Object(V.jsxs)("div",{className:"order-data order-pending",children:[Object(V.jsxs)("div",{children:[Object(V.jsx)("i",{className:"fas fa-clipboard-check op-i"}),Object(V.jsx)("h4",{children:"Order Paid"})]}),Object(V.jsx)("p",{children:j.totalPaidOrder})]}),Object(V.jsxs)("div",{className:"order-data order-delivered",children:[Object(V.jsxs)("div",{children:[Object(V.jsx)("i",{className:"fas fa-truck"}),Object(V.jsx)("h4",{children:"Order Delivered"})]}),Object(V.jsx)("p",{children:j.totalDelivered})]})]})}),Object(V.jsxs)(u.a,{className:"order-data-table",children:[Object(V.jsxs)(b.a,{md:6,sm:12,xs:12,children:[Object(V.jsx)("h3",{className:"odt-heading",children:"Top Sold Products"}),Object(V.jsxs)(St.a,{striped:!0,bordered:!0,children:[Object(V.jsx)("thead",{children:Object(V.jsxs)("tr",{children:[Object(V.jsx)("th",{children:"Plant"}),Object(V.jsx)("th",{children:"Quantity Sold"})]})}),Object(V.jsx)("tbody",{children:null===j||void 0===j||null===(t=j.productSaleData)||void 0===t?void 0:t.map((function(e){return Object(V.jsxs)("tr",{children:[Object(V.jsx)("td",{children:e._id}),Object(V.jsx)("td",{children:e.total})]},e._id)}))})]})]}),Object(V.jsx)(b.a,{md:1,children:" "}),Object(V.jsxs)(b.a,{md:5,sm:12,xs:12,children:[Object(V.jsx)("h3",{className:"odt-heading",children:"Top Buyers"}),Object(V.jsxs)(St.a,{striped:!0,bordered:!0,children:[Object(V.jsx)("thead",{children:Object(V.jsxs)("tr",{children:[Object(V.jsx)("th",{children:"Name"}),Object(V.jsx)("th",{children:"Email"}),Object(V.jsx)("th",{children:"Amount"})]})}),Object(V.jsx)("tbody",{children:null===j||void 0===j||null===(a=j.customerBuyData)||void 0===a?void 0:a.map((function(e){return Object(V.jsxs)("tr",{children:[Object(V.jsx)("td",{children:e.customer_name}),Object(V.jsx)("td",{children:e.customer_email}),Object(V.jsx)("td",{children:Math.ceil(e.total)})]},e.customer_email)}))})]})]})]})]})})})]})})};var $t=function(e){var t=e.history,a=Object(i.b)(),n=Object(i.c)((function(e){return e.userLogin})).userInfo.user,c=Object(i.c)((function(e){return e.orderList})),s=c.loading,o=c.error,l=c.orders;return Object(r.useEffect)((function(){n&&n.isAdmin?a(function(){var e=Object(O.a)(p.a.mark((function e(t,a){var r,n,c,s,i;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,t({type:At}),r=a(),n=r.userLogin.userInfo,c={headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(n.token)}},e.next=6,x.a.get("".concat(Kt,"/api/orders"),c);case 6:s=e.sent,i=s.data,t({type:Tt,payload:i}),e.next=15;break;case 11:e.prev=11,e.t0=e.catch(0),console.log(e.t0),t({type:Rt,payload:e.t0.response&&e.t0.response.data.message?e.t0.response.data.message:e.t0.message});case 15:case"end":return e.stop()}}),e,null,[[0,11]])})));return function(t,a){return e.apply(this,arguments)}}()):t.push("/login")}),[a,t,n]),Object(V.jsx)(V.Fragment,{children:Object(V.jsxs)(u.a,{children:[Object(V.jsx)(b.a,{md:2,children:Object(V.jsx)(Zt,{})}),Object(V.jsx)(b.a,{md:10,children:s?Object(V.jsx)(H,{}):o?Object(V.jsx)(se,{variant:"danger",children:o}):Object(V.jsxs)(V.Fragment,{children:[Object(V.jsx)("h1",{children:"All Orders"}),Object(V.jsxs)(St.a,{striped:!0,bordered:!0,hover:!0,children:[Object(V.jsx)("thead",{children:Object(V.jsxs)("tr",{children:[Object(V.jsx)("th",{children:"USER"}),Object(V.jsx)("th",{children:"DATE"}),Object(V.jsx)("th",{children:"TOTAL"}),Object(V.jsx)("th",{children:"PAID"}),Object(V.jsx)("th",{children:"Delivered"})]})}),Object(V.jsx)("tbody",{children:l.map((function(e){return Object(V.jsxs)("tr",{children:[Object(V.jsx)("td",{children:e.user&&e.user.name}),Object(V.jsx)("td",{children:e.createdAt.substring(0,10)}),Object(V.jsxs)("td",{children:[Object(V.jsx)("span",{style:{fontSize:"1.5rem",marginRight:"0.1rem"},children:"\u09f3"}),"\xa0",e.totalPrice]}),Object(V.jsx)("td",{children:(null===e||void 0===e?void 0:e.isPaid)?e.paidAt.substring(0,10):Object(V.jsx)(j.a,{variant:"light",children:Object(V.jsx)("i",{className:"fas fa-times",style:{color:"red"}})})}),Object(V.jsx)("td",{children:(null===e||void 0===e?void 0:e.isDelivered)?e.deliverAt.substring(0,10):Object(V.jsx)(j.a,{variant:"light",children:Object(V.jsx)("i",{className:"fas fa-times",style:{color:"red"}})})}),Object(V.jsx)("td",{children:Object(V.jsx)(Ee.LinkContainer,{to:"/order/".concat(e._id),children:Object(V.jsx)(j.a,{className:"bg-col-primary btn-sm",children:"Details"})})})]},e._id)}))})]})]})})]})})},ea=a(209),ta=function(e){var t,a,n,c=e.match,s=e.history,o=c.params.id,d=Object(i.b)(),h=Object(r.useState)(!1),m=Object(oe.a)(h,2),g=m[0],f=m[1],v=Object(i.c)((function(e){return e.orderDetails})),y=v.order,S=v.loading,E=v.error,C=Object(i.c)((function(e){return e.orderPay})),I=C.loading,N=C.success,_=Object(i.c)((function(e){return e.orderDeliver})).success,k=Object(i.c)((function(e){return e.userLogin})).userInfo.user;if(!S){var w;y.itemsPrice=(n=null===y||void 0===y||null===(w=y.orderedItems)||void 0===w?void 0:w.reduce((function(e,t){return e+t.price*t.qty}),0),(Math.round(100*n)/100).toFixed(2))}Object(r.useEffect)((function(){if(!k)return s.push("/login");var e,t=function(){var e=Object(O.a)(p.a.mark((function e(t,a){var r,n,c;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,x.a.get("/api/config/paypal");case 2:r=e.sent,n=r.data,console.log(n),(c=document.createElement("script")).type="text/javascript",c.src="https://www.paypal.com/sdk/js?client-id=".concat(n),c.async=!0,c.onload=function(){f(!0)},document.body.appendChild(c);case 11:case"end":return e.stop()}}),e)})));return function(t,a){return e.apply(this,arguments)}}();!y||N?(d({type:Gt}),d({type:Qt}),d((e=o,function(){var t=Object(O.a)(p.a.mark((function t(a,r){var n,c,s,i,o;return p.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,a({type:Nt}),n=r(),c=n.userLogin.userInfo,s={headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(c.token)}},t.next=6,x.a.get("".concat(Kt,"/api/orders/").concat(e),s);case 6:i=t.sent,o=i.data,a({type:_t,payload:o}),t.next=15;break;case 11:t.prev=11,t.t0=t.catch(0),console.log(t.t0),a({type:kt,payload:t.t0.response&&t.t0.response.data.message?t.t0.response.data.message:t.t0.message});case 15:case"end":return t.stop()}}),t,null,[[0,11]])})));return function(e,a){return t.apply(this,arguments)}}()))):y.isPaid||(window.paypal?f(!0):t())}),[d,y,o,N,_,s,k]);return S?Object(V.jsx)(H,{}):E?Object(V.jsx)(se,{variant:"danger",children:E}):Object(V.jsxs)(V.Fragment,{children:[Object(V.jsxs)("h1",{children:["Order ",y._id]}),Object(V.jsxs)(u.a,{children:[Object(V.jsx)(b.a,{md:8,children:Object(V.jsxs)(He.a,{variant:"flush",children:[Object(V.jsxs)(He.a.Item,{children:[Object(V.jsx)("h2",{children:"Shipping"}),Object(V.jsxs)("p",{children:[Object(V.jsx)("strong",{children:"Name: \xa0 "})," ",y.user.name]}),Object(V.jsxs)("p",{children:[Object(V.jsx)("strong",{children:"Email: \xa0"})," ",y.user.email]}),Object(V.jsxs)("p",{children:[Object(V.jsx)("strong",{children:"Address: \xa0"}),y.shippingAddress.address,", ",y.shippingAddress.city," ",y.shippingAddress.thana,", ",y.shippingAddress.houseNumber]}),y.isDelivered?Object(V.jsx)(se,{variant:"success",children:"Delivery Done"}):Object(V.jsx)(se,{variant:"danger",children:"Not Delivered"})]}),Object(V.jsxs)(He.a.Item,{children:[Object(V.jsx)("h2",{children:"Payment Method"}),Object(V.jsxs)("p",{children:[Object(V.jsx)("strong",{children:"Method: "}),y.paymentMethod]}),y.isPaid?Object(V.jsx)(se,{variant:"success",children:"Payment Done"}):Object(V.jsx)(se,{variant:"danger",children:"Not Paid"})]}),Object(V.jsxs)(He.a.Item,{children:[Object(V.jsx)("h2",{children:"Order Items"}),0===(null===y||void 0===y||null===(t=y.orderedItems)||void 0===t?void 0:t.length)?Object(V.jsx)(se,{children:"Order is empty"}):Object(V.jsx)(He.a,{variant:"flush",children:null===y||void 0===y||null===(a=y.orderedItems)||void 0===a?void 0:a.map((function(e,t){return Object(V.jsx)(He.a.Item,{children:Object(V.jsxs)(u.a,{children:[Object(V.jsx)(b.a,{md:1,children:Object(V.jsx)(Ke.a,{src:e.image,alt:e.name,fluid:!0,rounded:!0})}),Object(V.jsx)(b.a,{children:Object(V.jsx)(l.Link,{to:"/product/".concat(e.product),children:e.name})}),Object(V.jsxs)(b.a,{md:4,children:[e.qty," x \u09f3",e.price," = \u09f3",e.qty*e.price]})]})},t)}))})]})]})}),Object(V.jsx)(b.a,{md:4,children:Object(V.jsx)(K.a,{children:Object(V.jsxs)(He.a,{variant:"flush",children:[Object(V.jsx)(He.a.Item,{children:Object(V.jsx)("h3",{children:"Order Summary"})}),Object(V.jsx)(He.a.Item,{children:Object(V.jsxs)(u.a,{children:[Object(V.jsx)(b.a,{children:"Items"}),Object(V.jsxs)(b.a,{children:["\u09f3",y.itemsPrice]})]})}),Object(V.jsx)(He.a.Item,{children:Object(V.jsxs)(u.a,{children:[Object(V.jsx)(b.a,{children:"Delivery Charge"}),Object(V.jsxs)(b.a,{children:["\u09f3",y.shippingPrice]})]})}),Object(V.jsx)(He.a.Item,{children:Object(V.jsxs)(u.a,{children:[Object(V.jsx)(b.a,{children:"Total"}),Object(V.jsxs)(b.a,{children:["\u09f3",y.totalPrice]})]})}),k&&!k.isAdmin&&!y.isPaid&&Object(V.jsxs)(He.a.Item,{children:[I&&Object(V.jsx)(H,{}),g?Object(V.jsx)(ea.PayPalButton,{amount:y.totalPrice,onSuccess:function(e){d(function(e,t){return function(){var a=Object(O.a)(p.a.mark((function a(r,n){var c,s,i,o,l;return p.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return a.prev=0,r({type:Pt}),c=n(),s=c.userLogin.userInfo,i={headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(s.token)}},a.next=6,x.a.put("".concat(Kt,"/api/orders/").concat(e,"/pay"),t,i);case 6:o=a.sent,l=o.data,console.log(l),r({type:Ut,payload:l}),a.next=16;break;case 12:a.prev=12,a.t0=a.catch(0),console.log(a.t0),r({type:Ft,payload:a.t0.response&&a.t0.response.data.message?a.t0.response.data.message:a.t0.message});case 16:case"end":return a.stop()}}),a,null,[[0,12]])})));return function(e,t){return a.apply(this,arguments)}}()}(o,e))}}):Object(V.jsx)(H,{})]}),k&&k.isAdmin&&y.isPaid&&!y.isDelivered&&Object(V.jsx)(He.a.Item,{children:Object(V.jsx)(j.a,{className:"bg-col-primary",style:{width:"100%"},onClick:function(){d(function(e){return function(){var t=Object(O.a)(p.a.mark((function t(a,r){var n,c,s,i,o;return p.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,a({type:Bt}),n=r(),c=n.userLogin.userInfo,s={headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(c.token)}},t.next=6,x.a.put("".concat(Kt,"/api/orders/").concat(e._id,"/deliver"),{},s);case 6:i=t.sent,o=i.data,console.log(o),a({type:Mt,payload:o}),t.next=16;break;case 12:t.prev=12,t.t0=t.catch(0),console.log(t.t0),a({type:zt,payload:t.t0.response&&t.t0.response.data.message?t.t0.response.data.message:t.t0.message});case 16:case"end":return t.stop()}}),t,null,[[0,12]])})));return function(e,a){return t.apply(this,arguments)}}()}(y))},children:" Mark as Delivered"})})]})})})]})]})};var aa=function(e){var t=e.match,a=e.history,n=Object(r.useState)(""),c=Object(oe.a)(n,2),s=c[0],i=c[1],o=Object(r.useState)(""),l=Object(oe.a)(o,2),d=l[0],u=l[1],b=Object(r.useState)(""),h=Object(oe.a)(b,2),m=h[0],g=h[1],f=function(e){return i(""),u(""),setTimeout((function(){g("")}),3e3),g(e)},v=function(){var e=Object(O.a)(p.a.mark((function e(r){var n;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r.preventDefault(),!(s.length<6)){e.next=3;break}return e.abrupt("return",f("Password must be at least 6 characters"));case 3:if(s===d){e.next=5;break}return e.abrupt("return",f("Password doesn't match"));case 5:return n={headers:{"Content-Type":"application/json"}},e.prev=6,e.next=9,x.a.put("/api/users/reset-password/".concat(t.params.resetToken),{password:s},n);case 9:be("You're password has been updated"),a.push("/login"),e.next=19;break;case 13:e.prev=13,e.t0=e.catch(6),g(e.t0.response&&e.t0.response.data.message?e.t0.response.data.message:e.t0.message),i(""),u(""),setTimeout((function(){g("")}),3e3);case 19:case"end":return e.stop()}}),e,null,[[6,13]])})));return function(t){return e.apply(this,arguments)}}();return Object(V.jsxs)(ct,{children:[Object(V.jsx)("h2",{className:"py-3 text-center",children:"Reset Your Password"}),m&&Object(V.jsx)(se,{variant:"danger",children:m}),Object(V.jsxs)(nt.a,{onSubmit:v,children:[Object(V.jsxs)(nt.a.Group,{controlId:"password",className:"mb-3",children:[Object(V.jsx)(nt.a.Label,{children:"Password"}),Object(V.jsx)(nt.a.Control,{type:"password",placeholder:"Enter password",value:s,onChange:function(e){return i(e.target.value)}})]}),Object(V.jsxs)(nt.a.Group,{controlId:"confirmPassword",className:"mb-4",children:[Object(V.jsx)(nt.a.Label,{children:"Retype Password"}),Object(V.jsx)(nt.a.Control,{type:"password",placeholder:"Confirm Password",value:d,onChange:function(e){return u(e.target.value)}})]}),Object(V.jsx)(j.a,{type:"submit",variant:"primary",className:"auth-btn bg-col-primary",children:"Submit"})]})]})},ra=function(e){var t=e.step1,a=e.step2,r=e.step3,n=e.step4;return Object(V.jsxs)(ye.a,{className:"justify-content-center mb-4",children:[Object(V.jsx)(ye.a.Item,{children:t?Object(V.jsx)(Ee.LinkContainer,{to:"/login",children:Object(V.jsx)(ye.a.Link,{children:"Sign In"})}):Object(V.jsx)(ye.a.Link,{disabled:!0,children:"Sign In"})}),Object(V.jsx)(ye.a.Item,{children:a?Object(V.jsx)(Ee.LinkContainer,{to:"/shipping",children:Object(V.jsx)(ye.a.Link,{children:"Shipping"})}):Object(V.jsx)(ye.a.Link,{disabled:!0,children:"Shipping"})}),Object(V.jsx)(ye.a.Item,{children:r?Object(V.jsx)(Ee.LinkContainer,{to:"/payment",children:Object(V.jsx)(ye.a.Link,{children:"Payment"})}):Object(V.jsx)(ye.a.Link,{disabled:!0,children:"Payment"})}),Object(V.jsx)(ye.a.Item,{children:n?Object(V.jsx)(Ee.LinkContainer,{to:"/placeorder",children:Object(V.jsx)(ye.a.Link,{children:"Place Order"})}):Object(V.jsx)(ye.a.Link,{disabled:!0,children:"Place Order"})})]})},na=function(e){var t=e.history;Object(i.c)((function(e){return e.cart})).shippingAddress.address||t.push("/shipping");var a=Object(r.useState)("PayPal"),n=Object(oe.a)(a,2),c=n[0],s=n[1],o=Object(i.b)();return Object(V.jsxs)(ct,{children:[Object(V.jsx)(ra,{step1:!0,step2:!0,step3:!0}),Object(V.jsx)("h1",{children:"Payment Method"}),Object(V.jsxs)(nt.a,{onSubmit:function(e){var a;e.preventDefault(),o((a=c,function(e){e({type:tt,payload:a}),localStorage.setItem("paymentMethod",JSON.stringify(a))})),t.push("/placeorder")},children:[Object(V.jsxs)(nt.a.Group,{children:[Object(V.jsx)(nt.a.Label,{as:"legend",children:"Select Method "}),Object(V.jsxs)(b.a,{children:[Object(V.jsx)(nt.a.Check,{type:"radio",label:"PayPal or Credit Card",id:"PayPal",name:"paymentMethod",value:"PayPal",checked:"PayPal"===c,onChange:function(e){return s(e.target.value)}}),Object(V.jsx)(nt.a.Check,{type:"radio",label:"Stripe",id:"Stripe",name:"paymentMethod",value:"Stripe",checked:"PayPal"===c,onChange:function(e){return s(e.target.value)}}),Object(V.jsx)(nt.a.Check,{type:"radio",label:"SSL E-Commerce",id:"SSL E-Commerce",name:"paymentMethod",value:"SSL E-Commerce",checked:"SSL E-Commerce"===c,onChange:function(e){return s(e.target.value)}})]})]}),Object(V.jsx)(j.a,{type:"submit",variant:"primary",children:"Continue"})]})]})},ca=function(e){var t=e.history,a=Object(i.b)(),n=Object(i.c)((function(e){return e.cart})),c=Object(i.c)((function(e){return e.orderCreate})),s=c.order,o=c.success,d=c.error;Object(r.useEffect)((function(){o&&t.push("/order/".concat(s._id))}),[t,o]);var h;return n.itemsPrice=(h=n.cartItems.reduce((function(e,t){return e+t.price*t.qty}),0),(Math.round(100*h)/100).toFixed(2)),n.shippingPrice=30,n.totalPrice=Number(n.itemsPrice)+Number(n.shippingPrice),Object(V.jsxs)(V.Fragment,{children:[Object(V.jsx)(ra,{step1:!0,step2:!0,step3:!0,step4:!0}),Object(V.jsxs)(u.a,{children:[Object(V.jsx)(b.a,{md:8,children:Object(V.jsxs)(He.a,{variant:"flush",children:[Object(V.jsxs)(He.a.Item,{children:[Object(V.jsx)("h2",{children:"Delivery Location"}),Object(V.jsxs)("p",{children:[Object(V.jsx)("strong",{children:"Address:"}),n.shippingAddress.address,", ",n.shippingAddress.city," ",n.shippingAddress.thana,", ",n.shippingAddress.houseNumber]})]}),Object(V.jsxs)(He.a.Item,{children:[Object(V.jsx)("h2",{children:"Payment Method"}),Object(V.jsx)("strong",{children:"Method: "}),n.paymentMethod]}),Object(V.jsxs)(He.a.Item,{children:[Object(V.jsx)("h2",{children:"Order Items"}),0===n.cartItems.length?Object(V.jsx)(se,{children:"Your cart is empty"}):Object(V.jsx)(He.a,{variant:"flush",children:n.cartItems.map((function(e,t){return Object(V.jsx)(He.a.Item,{children:Object(V.jsxs)(u.a,{children:[Object(V.jsx)(b.a,{md:1,children:Object(V.jsx)(Ke.a,{src:e.image,alt:e.name,fluid:!0,rounded:!0})}),Object(V.jsx)(b.a,{children:Object(V.jsx)(l.Link,{to:"/product/".concat(e.product),children:e.name})}),Object(V.jsxs)(b.a,{md:4,children:[e.qty," x \u09f3",e.price," = \u09f3",e.qty*e.price]})]})},t)}))})]})]})}),Object(V.jsx)(b.a,{md:4,children:Object(V.jsx)(K.a,{children:Object(V.jsxs)(He.a,{variant:"flush",children:[Object(V.jsx)(He.a.Item,{children:Object(V.jsx)("h2",{children:"Order Summary"})}),Object(V.jsx)(He.a.Item,{children:Object(V.jsxs)(u.a,{children:[Object(V.jsx)(b.a,{children:"Items"}),Object(V.jsxs)(b.a,{children:["\u09f3",n.itemsPrice]})]})}),Object(V.jsx)(He.a.Item,{children:Object(V.jsxs)(u.a,{children:[Object(V.jsx)(b.a,{children:"Delivery Charge"}),Object(V.jsxs)(b.a,{children:["\u09f3",n.shippingPrice]})]})}),Object(V.jsx)(He.a.Item,{children:Object(V.jsxs)(u.a,{children:[Object(V.jsx)(b.a,{children:"Total"}),Object(V.jsxs)(b.a,{children:["\u09f3",n.totalPrice]})]})}),Object(V.jsx)(He.a.Item,{children:d&&Object(V.jsx)(se,{variant:"danger",children:d})}),Object(V.jsx)(He.a.Item,{children:Object(V.jsx)(j.a,{type:"button",className:"btn-block",disabled:0===n.cartItems,onClick:function(){a(function(e){return function(){var t=Object(O.a)(p.a.mark((function t(a,r){var n,c,s,i,o;return p.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,a({type:Et}),n=r(),c=n.userLogin.userInfo,s={headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(c.token)}},t.next=6,x.a.post("".concat(Kt,"/api/orders"),e,s);case 6:i=t.sent,o=i.data,a({type:Ct,payload:o}),t.next=15;break;case 11:t.prev=11,t.t0=t.catch(0),console.log(t.t0),a({type:It,payload:t.t0.response&&t.t0.response.data.message?t.t0.response.data.message:t.t0.message});case 15:case"end":return t.stop()}}),t,null,[[0,11]])})));return function(e,a){return t.apply(this,arguments)}}()}({orderItems:n.cartItems,shippingAddress:n.shippingAddress,paymentMethod:n.paymentMethod,itemsPrice:n.itemsPrice,shippingPrice:n.shippingPrice,totalPrice:n.totalPrice})),be("You're order has been placed")},children:"Place Order"})})]})})})]})]})},sa=function(e){var t=e.match,a=e.history,n=t.params.id,c=Object(r.useState)(""),s=Object(oe.a)(c,2),o=s[0],d=s[1],u=Object(r.useState)(""),b=Object(oe.a)(u,2),h=b[0],m=b[1],g=Object(r.useState)(""),f=Object(oe.a)(g,2),v=f[0],y=f[1],S=Object(r.useState)(0),E=Object(oe.a)(S,2),C=E[0],I=E[1],N=Object(r.useState)(0),_=Object(oe.a)(N,2),k=_[0],w=_[1],L=Object(r.useState)(""),D=Object(oe.a)(L,2),A=D[0],T=D[1],R=Object(r.useState)(!1),P=Object(oe.a)(R,2),U=P[0],F=P[1],G=Object(i.b)(),B=Object(i.c)((function(e){return e.productDetails})),M=B.loading,W=B.error,Y=B.product,K=Object(i.c)((function(e){return e.productUpdate})),Z=K.loading,X=K.error,$=K.success;Object(r.useEffect)((function(){$?(G({type:J}),be("Product Updated"),a.push("/admin/productlist")):Y.name&&Y._id===n?(d(Y.name),m(Y.description),y(Y.category),T(Y.image),I(Y.price),w(Y.countInStock)):G(lt(n))}),[G,Y,n,$,a]);var ee=function(){var e=Object(O.a)(p.a.mark((function e(t){var a,r,n,c,s;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.target.files[0],(r=new FormData).append("image",a),F(!0),e.prev=4,n={headers:{"Content-Type":"multipart/form-data"}},e.next=8,x.a.post("/api/uploads",r,n);case 8:c=e.sent,s=c.data,console.log(s),T(s),F(!1),e.next=19;break;case 15:e.prev=15,e.t0=e.catch(4),console.log(e.t0),F(!1);case 19:case"end":return e.stop()}}),e,null,[[4,15]])})));return function(t){return e.apply(this,arguments)}}();return Object(V.jsxs)(V.Fragment,{children:[Object(V.jsx)(l.Link,{to:"/admin/productlist",className:"btn btn-light my-3",children:"Go Back"}),Object(V.jsxs)(ct,{children:[Object(V.jsx)("h1",{children:"Edit Product"}),Z&&Object(V.jsx)(H,{}),X&&Object(V.jsx)(se,{variant:"danger",children:X}),M?Object(V.jsx)(H,{}):W?Object(V.jsx)(se,{variant:"danger",children:W}):Object(V.jsxs)(nt.a,{onSubmit:function(e){e.preventDefault(),G(function(e){return function(){var t=Object(O.a)(p.a.mark((function t(a,r){var n,c,s,i,o;return p.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,a({type:z}),n=r(),c=n.userLogin.userInfo,s={headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(c.token)}},t.next=6,x.a.put("/api/products/".concat(e._id),e,s);case 6:i=t.sent,o=i.data,a({type:Q,payload:o}),t.next=15;break;case 11:t.prev=11,t.t0=t.catch(0),console.log(t.t0),a({type:q,payload:t.t0.response&&t.t0.response.data.message?t.t0.response.data.message:t.t0.message});case 15:case"end":return t.stop()}}),t,null,[[0,11]])})));return function(e,a){return t.apply(this,arguments)}}()}({_id:Y._id,name:o,description:h,image:A,category:v,price:C,countInStock:k}))},children:[Object(V.jsxs)(nt.a.Group,{controlId:"name",children:[Object(V.jsx)(nt.a.Label,{children:"Name"}),Object(V.jsx)(nt.a.Control,{type:"name",placeholder:"Enter name",value:o,onChange:function(e){return d(e.target.value)}})]}),Object(V.jsxs)(nt.a.Group,{controlId:"description",children:[Object(V.jsx)(nt.a.Label,{children:"Description"}),Object(V.jsx)(nt.a.Control,{type:"text",placeholder:"Write Description",value:h,onChange:function(e){return m(e.target.value)}})]}),Object(V.jsxs)(nt.a.Group,{controlId:"category",children:[Object(V.jsx)(nt.a.Label,{children:"Category"}),Object(V.jsx)(nt.a.Control,{placeholder:"Enter Category",type:"text",value:v,onChange:function(e){return y(e.target.value)}})]}),Object(V.jsxs)(nt.a.Group,{controlId:"image",children:[Object(V.jsx)(nt.a.Label,{children:"Enter Image URL"}),Object(V.jsx)(nt.a.Control,{type:"text",placeholder:"Enter image url",value:A,onChange:function(e){return T(e.target.value)}}),Object(V.jsx)(nt.a.File,{id:"image-file",custom:!0,onChange:ee}),U&&Object(V.jsx)(H,{})]}),Object(V.jsxs)(nt.a.Group,{controlId:"price",children:[Object(V.jsx)(nt.a.Label,{children:"Price"}),Object(V.jsx)(nt.a.Control,{type:"number",placeholder:"Enter Price",value:C,onChange:function(e){return I(e.target.value)}})]}),Object(V.jsxs)(nt.a.Group,{controlId:"countInStock",children:[Object(V.jsx)(nt.a.Label,{children:"Count In Stock"}),Object(V.jsx)(nt.a.Control,{type:"number",placeholder:"Enter Stock",value:k,onChange:function(e){return w(e.target.value)}})]}),Object(V.jsx)(j.a,{type:"submit",className:"bg-col-primary auth-btn",children:"Update"})]})]})]})};var ia=function(e){var t=e.history,a=Object(i.b)(),n=Object(i.c)((function(e){return e.userLogin})).userInfo.user,c=Object(i.c)((function(e){return e.productList})),s=c.loading,o=c.error,l=c.products,d=Object(i.c)((function(e){return e.productCreate})),h=d.loading,m=d.error,g=d.success,f=d.product,v=Object(i.c)((function(e){return e.productDelete})),y=v.loading,S=v.error,E=v.success;Object(r.useEffect)((function(){a({type:M}),n.isAdmin||t.push("/login"),g?t.push("/admin/product/".concat(f._id,"/edit")):a(ot())}),[a,t,n,E,g,f]);var C=function(e){window.confirm("Are you sure you want to delete this product ?")&&(a(function(e){return function(){var t=Object(O.a)(p.a.mark((function t(a,r){var n,c,s;return p.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,a({type:R}),n=r(),c=n.userLogin.userInfo,s={headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(c.token)}},t.next=6,x.a.delete("".concat(it,"/api/products/").concat(e),s);case 6:a({type:P}),t.next=13;break;case 9:t.prev=9,t.t0=t.catch(0),console.log(t.t0),a({type:U,payload:t.t0.response&&t.t0.response.data.message?t.t0.response.data.message:t.t0.message});case 13:case"end":return t.stop()}}),t,null,[[0,9]])})));return function(e,a){return t.apply(this,arguments)}}()}(e)),S||pe("Product deleted"))},I=function(){a(function(){var e=Object(O.a)(p.a.mark((function e(t,a){var r,n,c,s,i;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,t({type:F}),r=a(),n=r.userLogin.userInfo,c={headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(n.token)}},e.next=6,x.a.post("/api/products",{},c);case 6:s=e.sent,i=s.data,t({type:G,payload:i}),e.next=15;break;case 11:e.prev=11,e.t0=e.catch(0),console.log(e.t0),t({type:B,payload:e.t0.response&&e.t0.response.data.message?e.t0.response.data.message:e.t0.message});case 15:case"end":return e.stop()}}),e,null,[[0,11]])})));return function(t,a){return e.apply(this,arguments)}}())};return Object(V.jsx)(V.Fragment,{children:Object(V.jsxs)(u.a,{children:[Object(V.jsx)(b.a,{md:2,children:Object(V.jsx)(Zt,{})}),Object(V.jsxs)(b.a,{md:10,children:[Object(V.jsxs)(u.a,{className:"align-items-center",children:[Object(V.jsx)(b.a,{children:Object(V.jsx)("h1",{children:"Products"})}),Object(V.jsx)(b.a,{className:"text-right",children:Object(V.jsxs)(j.a,{className:"my-3 block bg-col-primary",style:{float:"right"},onClick:I,children:[Object(V.jsx)("i",{className:"fas fa-plus",onClick:I})," Create Product"]})})]}),h&&Object(V.jsx)(H,{}),m&&Object(V.jsx)(se,{variant:"danger",children:m}),y&&Object(V.jsx)(H,{}),S&&Object(V.jsx)(se,{variant:"danger",children:S}),s?Object(V.jsx)(H,{}):o?Object(V.jsx)(se,{variant:"danger",children:o}):Object(V.jsx)(V.Fragment,{children:Object(V.jsxs)(St.a,{striped:!0,bordered:!0,hover:!0,children:[Object(V.jsx)("thead",{children:Object(V.jsxs)("tr",{children:[Object(V.jsx)("th",{children:"Product ID"}),Object(V.jsx)("th",{children:"Name"}),Object(V.jsx)("th",{children:"Price"}),Object(V.jsx)("th",{children:"Category"}),Object(V.jsx)("th",{children:"In Stock"})]})}),Object(V.jsx)("tbody",{children:l.map((function(e){return Object(V.jsxs)("tr",{children:[Object(V.jsx)("td",{children:e._id}),Object(V.jsx)("td",{children:e.name}),Object(V.jsxs)("td",{children:[Object(V.jsx)("span",{style:{fontSize:"1.5rem",marginRight:"0.1rem"},children:"\u09f3"}),"\xa0",e.price]}),Object(V.jsx)("td",{children:e.category}),Object(V.jsx)("td",{children:e.countInStock}),Object(V.jsx)("td",{children:Object(V.jsx)(Ee.LinkContainer,{to:"/admin/product/".concat(e._id,"/edit"),children:Object(V.jsx)(j.a,{className:"bg-col-primary",children:Object(V.jsx)("i",{className:"fas fa-edit"})})})}),Object(V.jsx)("td",{children:Object(V.jsx)(j.a,{variant:"light",onClick:function(){return C(e._id)},children:Object(V.jsx)("i",{className:"fas fa-trash"})})})]},e._id)}))})]})})]})]})})};var oa=function(e){var t=e.match,a=e.history,n=Object(r.useState)(1),c=Object(oe.a)(n,2),s=c[0],o=c[1],d=Object(r.useState)(0),h=Object(oe.a)(d,2),m=h[0],g=h[1],f=Object(r.useState)(""),v=Object(oe.a)(f,2),y=v[0],S=v[1],E=Object(i.b)(),C=Object(i.c)((function(e){return e.productDetails})),I=C.loading,N=C.error,_=C.product,k=Object(i.c)((function(e){return e.productCreateReview})),w=k.error,R=k.success,P=Object(i.c)((function(e){return e.userLogin})).userInfo;return Object(r.useEffect)((function(){R?(be("Thank you for submitting a review"),g(0),S(""),E({type:T})):w&&setTimeout((function(){E({type:T})}),4e3),E(lt(t.params.id))}),[E,t,R,w]),Object(V.jsxs)("div",{children:[Object(V.jsx)(l.Link,{className:"btn btn-light my-3",to:"/market",children:"Go Back"}),I?Object(V.jsx)(H,{}):N?Object(V.jsx)(se,{variant:"alert",children:N}):Object(V.jsxs)(V.Fragment,{children:[Object(V.jsxs)(u.a,{children:[Object(V.jsx)(b.a,{md:5,children:Object(V.jsx)(Ke.a,{src:_.image,alt:_.name,fluid:!0})}),Object(V.jsx)(b.a,{md:4,children:Object(V.jsxs)(He.a,{variant:"flush",children:[Object(V.jsx)(He.a.Item,{className:"product_heading",children:Object(V.jsx)("h2",{children:_.name})}),Object(V.jsx)(He.a.Item,{className:"product_desc",children:_.description}),Object(V.jsx)(He.a.Item,{children:Object(V.jsx)(Ot,{value:_.rating,text:_.numReviews})}),Object(V.jsxs)(He.a.Item,{className:"product_price",children:[Object(V.jsx)("span",{style:{fontSize:"2rem"},children:"\u09f3"}),"\xa0",_.price]})]})}),Object(V.jsx)(b.a,{md:3,children:Object(V.jsx)(K.a,{children:Object(V.jsxs)(He.a,{variant:"flush",children:[Object(V.jsx)(He.a.Item,{children:Object(V.jsxs)(u.a,{children:[Object(V.jsx)(b.a,{children:"Price : "}),Object(V.jsxs)(b.a,{children:[Object(V.jsx)("strong",{children:_.price})," \xa0 Taka"]})]})}),Object(V.jsx)(He.a.Item,{children:Object(V.jsxs)(u.a,{children:[Object(V.jsx)(b.a,{children:"Status : "}),Object(V.jsx)(b.a,{children:_.countInStock>0?"In Stock ":"Out of Stock"})]})}),_.countInStock>0&&Object(V.jsx)(He.a.Item,{children:Object(V.jsxs)(u.a,{children:[Object(V.jsx)(b.a,{children:"Qty"}),Object(V.jsx)(b.a,{children:Object(V.jsx)(Ze.a,{as:"select",value:s,onChange:function(e){return o(e.target.value)},children:Object(Ve.a)(Array(_.countInStock).keys()).map((function(e){return Object(V.jsx)("option",{value:e+1,children:e+1},e+1)}))})})]})}),Object(V.jsx)(He.a.Item,{children:Object(V.jsx)(j.a,{style:{width:"100%"},className:"btn bg-col-primary",disabled:0===_.countInStock,onClick:function(){a.push("/cart/".concat(t.params.id,"?qty=").concat(s))},children:"Add to cart"})})]})})})]}),Object(V.jsx)(u.a,{children:Object(V.jsxs)(b.a,{md:5,children:[0===_.reviews.length&&Object(V.jsx)(se,{children:"No Reviews"}),Object(V.jsx)(He.a,{children:_.reviews.map((function(e){return Object(V.jsxs)(He.a.Item,{children:[Object(V.jsx)("strong",{children:e.name}),Object(V.jsx)(Ot,{value:e.rating,text:"hidden"}),Object(V.jsx)("p",{children:e.createdAt.substring(0,10)}),Object(V.jsx)("p",{children:e.comment})]},e._id)}))}),Object(V.jsx)("h2",{children:"Write a review"}),P?Object(V.jsxs)(V.Fragment,{children:[w&&Object(V.jsx)(se,{variant:"danger",children:w}),Object(V.jsxs)(nt.a,{onSubmit:function(e){var a,r;e.preventDefault(),E((a=t.params.id,r={rating:m,comment:y},function(){var e=Object(O.a)(p.a.mark((function e(t,n){var c,s,i;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,t({type:L}),c=n(),s=c.userLogin.userInfo,i={headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(s.token)}},e.next=6,x.a.post("".concat(it,"/api/products/").concat(a,"/reviews"),r,i);case 6:t({type:D}),e.next=13;break;case 9:e.prev=9,e.t0=e.catch(0),console.log(e.t0),t({type:A,payload:e.t0.response&&e.t0.response.data.message?e.t0.response.data.message:e.t0.message});case 13:case"end":return e.stop()}}),e,null,[[0,9]])})));return function(t,a){return e.apply(this,arguments)}}()))},children:[Object(V.jsxs)(nt.a.Group,{controlId:"rating",className:"mb-3 mt-3",children:[Object(V.jsx)(nt.a.Label,{children:"Give a rating"}),Object(V.jsxs)(nt.a.Control,{as:"select",value:m,onChange:function(e){return g(e.target.value)},children:[Object(V.jsx)("option",{value:"",children:"Select..."}),Object(V.jsx)("option",{value:"1",children:"1 - Poor"}),Object(V.jsx)("option",{value:"2",children:"2 - Fair"}),Object(V.jsx)("option",{value:"3",children:"3 - Good"}),Object(V.jsx)("option",{value:"4",children:"4 - Very Good"}),Object(V.jsx)("option",{value:"5",children:"5 - Excellent"})]})]}),Object(V.jsxs)(nt.a.Group,{controlId:"comment",className:"mb-4",children:[Object(V.jsx)(nt.a.Label,{children:"Write a comment"}),Object(V.jsx)(nt.a.Control,{as:"textarea",value:y,onChange:function(e){return S(e.target.value)}})]}),Object(V.jsx)(j.a,{type:"submit",variant:"primary",className:"auth-btn mb-2 bg-col-primary",children:"Submit"})]})]}):Object(V.jsxs)(se,{children:["Please ",Object(V.jsx)(l.Link,{to:"/login",children:"sign in"})," to write a review"]})]})})]})]})};var la=function(e){var t=e.history,a=Object(r.useState)(""),n=Object(oe.a)(a,2),c=n[0],s=n[1],o=Object(r.useState)(""),l=Object(oe.a)(o,2),h=l[0],m=l[1],g=Object(r.useState)(""),f=Object(oe.a)(g,2),v=f[0],y=f[1],S=Object(r.useState)(""),E=Object(oe.a)(S,2),C=E[0],I=E[1],N=Object(i.b)(),_=Object(d.l)(),k=Object(i.c)((function(e){return e.userLogin})).userInfo,w=Object(i.c)((function(e){return e.userDetails})),L=w.loading,D=w.error,A=w.user,T=Object(i.c)((function(e){return e.myOrderList})),R=T.loading,P=T.error,U=T.orders;return Object(r.useEffect)((function(){var e;k?k.token.length>500?(s(k.user.email),m(k.user.name)):A.name?(s(A.email),m(A.name)):(N((e="profile",function(){var t=Object(O.a)(p.a.mark((function t(a,r){var n,c,s,i,o;return p.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,a({type:De}),n=r(),c=n.userLogin.userInfo,s={headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(c.token)}},t.next=6,x.a.get("".concat(Je,"/api/users/").concat(e),s);case 6:i=t.sent,o=i.data,a({type:Ae,payload:o}),t.next=15;break;case 11:t.prev=11,t.t0=t.catch(0),console.log(t.t0),a({type:Te,payload:t.t0.response&&t.t0.response.data.message?t.t0.response.data.message:t.t0.message});case 15:case"end":return t.stop()}}),t,null,[[0,11]])})));return function(e,a){return t.apply(this,arguments)}}())),N(function(){var e=Object(O.a)(p.a.mark((function e(t,a){var r,n,c,s,i;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,t({type:wt}),r=a(),n=r.userLogin.userInfo,c={headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(n.token)}},e.next=6,x.a.get("".concat(Kt,"/api/orders/my-orders"),c);case 6:s=e.sent,i=s.data,t({type:Lt,payload:i}),e.next=15;break;case 11:e.prev=11,e.t0=e.catch(0),console.log(e.t0),t({type:Dt,payload:e.t0.response&&e.t0.response.data.message?e.t0.response.data.message:e.t0.message});case 15:case"end":return e.stop()}}),e,null,[[0,11]])})));return function(t,a){return e.apply(this,arguments)}}())):t.push("/login")}),[t,k,N,A,_,h]),Object(V.jsxs)(u.a,{children:[Object(V.jsxs)(b.a,{md:4,children:[Object(V.jsx)("h2",{children:"User Profile"}),D&&Object(V.jsx)(se,{variant:"danger",children:D}),L&&Object(V.jsx)(H,{}),Object(V.jsxs)(nt.a,{onSubmit:function(e){e.preventDefault(),N(function(e){return function(){var t=Object(O.a)(p.a.mark((function t(a,r){var n,c,s,i,o;return p.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,a({type:Re}),n=r(),c=n.userLogin.userInfo,s={headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(c.token)}},t.next=6,x.a.put("".concat(Je,"/api/users/profile"),e,s);case 6:i=t.sent,o=i.data,console.log(o),a({type:Pe,payload:o}),t.next=16;break;case 12:t.prev=12,t.t0=t.catch(0),console.log(t.t0),a({type:Ue,payload:t.t0.response&&t.t0.response.data.message?t.t0.response.data.message:t.t0.message});case 16:case"end":return t.stop()}}),t,null,[[0,12]])})));return function(e,a){return t.apply(this,arguments)}}()}({id:A._id,email:c,name:h,password:v})),be("Your profile has been updated")},children:[Object(V.jsxs)(nt.a.Group,{controlId:"name",children:[Object(V.jsx)(nt.a.Label,{children:"Name"}),Object(V.jsx)(nt.a.Control,{type:"name",placeholder:"Enter name",value:h,onChange:function(e){return m(e.target.value)}})]}),Object(V.jsxs)(nt.a.Group,{controlId:"email",children:[Object(V.jsx)(nt.a.Label,{children:"Email Address"}),Object(V.jsx)(nt.a.Control,{type:"email",placeholder:"Enter email",value:c,onChange:function(e){return s(e.target.value)}})]}),Object(V.jsxs)(nt.a.Group,{controlId:"password",children:[Object(V.jsx)(nt.a.Label,{children:"Password"}),Object(V.jsx)(nt.a.Control,{type:"password",placeholder:"Enter password",value:v,onChange:function(e){return y(e.target.value)}})]}),Object(V.jsxs)(nt.a.Group,{controlId:"confirmPassword",children:[Object(V.jsx)(nt.a.Label,{children:"Retype Password"}),Object(V.jsx)(nt.a.Control,{type:"password",placeholder:"Confirm Password",value:C,onChange:function(e){return I(e.target.value)}})]}),Object(V.jsx)(j.a,{type:"submit",className:"bg-col-primary",style:{marginTop:"2rem"},children:"Update"})]})]}),Object(V.jsx)(b.a,{md:8,children:Object(V.jsxs)(V.Fragment,{children:[Object(V.jsx)("h1",{children:"MY Orders"}),R?Object(V.jsx)(H,{}):P?Object(V.jsx)(se,{variant:"danger",children:P}):Object(V.jsxs)(St.a,{striped:!0,bordered:!0,hover:!0,children:[Object(V.jsx)("thead",{children:Object(V.jsxs)("tr",{children:[Object(V.jsx)("th",{children:"ID"}),Object(V.jsx)("th",{children:"DATE"}),Object(V.jsx)("th",{children:"TOTAL"}),Object(V.jsx)("th",{children:"PAID"}),Object(V.jsx)("th",{children:"Delivered"}),Object(V.jsx)("th",{})]})}),Object(V.jsx)("tbody",{children:U.map((function(e){return Object(V.jsxs)("tr",{children:[Object(V.jsx)("td",{children:e._id}),Object(V.jsx)("td",{children:e.createdAt.substring(0,10)}),Object(V.jsxs)("td",{children:[Object(V.jsx)("span",{style:{fontSize:"1.5rem",marginRight:"0.1rem"},children:"\u09f3"}),"\xa0",e.totalPrice]}),Object(V.jsx)("td",{children:e.isPaid?e.paidAt.substring(0,10):Object(V.jsx)(j.a,{variant:"light",children:Object(V.jsx)("i",{className:"fas fa-times",style:{color:"red"}})})}),Object(V.jsx)("td",{children:e.isDelivered?e.deliverAt.substring(0,10):Object(V.jsx)(j.a,{variant:"light",children:Object(V.jsx)("i",{className:"fas fa-times",style:{color:"red"}})})}),Object(V.jsx)("td",{children:Object(V.jsx)(Ee.LinkContainer,{to:"/order/".concat(e._id),children:Object(V.jsx)(j.a,{className:"bg-col-primary btn-sm",children:"Details"})})})]},e._id)}))})]})]})})]})};ue.a.configure();var da=function(e){var t=e.location,a=e.history,n=Object(r.useState)(""),c=Object(oe.a)(n,2),s=c[0],o=c[1],d=Object(r.useState)(""),h=Object(oe.a)(d,2),m=h[0],g=h[1],f=Object(r.useState)(""),v=Object(oe.a)(f,2),y=v[0],S=v[1],E=Object(r.useState)(""),C=Object(oe.a)(E,2),I=C[0],N=C[1],_=t.search?t.search.split("=")[1]:"/login",k=Object(i.b)(),w=Object(i.c)((function(e){return e.userRegister})),L=w.loading,D=w.error,A=w.userInfo;return Object(r.useEffect)((function(){A&&(ue.a.success("Account created successfully. Please login to see profile",{autoClose:3e3}),a.push("/login"))}),[a,_,A]),Object(V.jsxs)(ct,{children:[Object(V.jsx)("h1",{className:"text-center",children:"Sign Up"}),D&&Object(V.jsx)(se,{variant:"danger",children:D}),L&&Object(V.jsx)(H,{}),Object(V.jsxs)(nt.a,{onSubmit:function(e){e.preventDefault(),k(function(e,t,a,r){return function(){var n=Object(O.a)(p.a.mark((function n(c){var s,i,o;return p.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,c({type:ke}),s={headers:{"Content-Type":"application/json"}},n.next=5,x.a.post("".concat(Je,"/api/users/register"),{name:e,email:t,password:a,confirmPassword:r},s);case 5:i=n.sent,o=i.data,c({type:we,payload:o}),n.next=14;break;case 10:n.prev=10,n.t0=n.catch(0),console.log(n.t0),c({type:Le,payload:n.t0.response&&n.t0.response.data.message?n.t0.response.data.message:n.t0.message});case 14:case"end":return n.stop()}}),n,null,[[0,10]])})));return function(e){return n.apply(this,arguments)}}()}(s,m,y,I))},children:[Object(V.jsxs)(nt.a.Group,{controlId:"name",className:"mb-3 mt-2",children:[Object(V.jsx)(nt.a.Label,{children:"Name"}),Object(V.jsx)(nt.a.Control,{type:"name",placeholder:"Enter name",value:s,onChange:function(e){return o(e.target.value)}})]}),Object(V.jsxs)(nt.a.Group,{controlId:"email",className:"mb-3",children:[Object(V.jsx)(nt.a.Label,{children:"Email Address"}),Object(V.jsx)(nt.a.Control,{type:"email",placeholder:"Enter email",value:m,onChange:function(e){return g(e.target.value)}})]}),Object(V.jsxs)(nt.a.Group,{controlId:"password",className:"mb-3",children:[Object(V.jsx)(nt.a.Label,{children:"Password"}),Object(V.jsx)(nt.a.Control,{type:"password",placeholder:"Enter password",value:y,onChange:function(e){return S(e.target.value)}})]}),Object(V.jsxs)(nt.a.Group,{controlId:"confirmPassword",className:"mb-4",children:[Object(V.jsx)(nt.a.Label,{children:"Retype Password"}),Object(V.jsx)(nt.a.Control,{type:"password",placeholder:"Confirm Password",value:I,onChange:function(e){return N(e.target.value)}})]}),Object(V.jsx)(j.a,{type:"submit",variant:"primary",className:"auth-btn mb-2 bg-col-primary",children:"Sign Up"})]}),Object(V.jsx)(u.a,{children:Object(V.jsx)(b.a,{className:"text-center",children:Object(V.jsx)("h6",{children:"Or"})})}),Object(V.jsx)(u.a,{children:Object(V.jsxs)(b.a,{children:[" ",Object(V.jsx)(vt,{})," "]})}),Object(V.jsx)(u.a,{className:"py-3",children:Object(V.jsxs)(b.a,{children:["Already Have an Account ? ",Object(V.jsx)(l.Link,{to:_?"/login?redirect=".concat(_):"/login",children:"Sign in"})]})})]})},ja=a(15),ua=a(45);var ba=function(e){var t=e.orderData,a=[];if(t){var r,n=Object(ja.a)(t);try{for(n.s();!(r=n.n()).done;){var c=r.value;a.push(c.numOfOrder)}}catch(i){n.e(i)}finally{n.f()}}var s={labels:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],datasets:[{label:"# of Sales by Months",data:a,backgroundColor:["rgba(0,158,96, 0.2)","rgba(0,158,96, 0.2)","rgba(0,158,96, 0.2)","rgba(0,158,96, 0.2)","rgba(0,158,96, 0.2)","rgba(0,158,96, 0.2)","rgba(0,158,96, 0.2)","rgba(0,158,96, 0.2)","rgba(0,158,96, 0.2)","rgba(0,158,96, 0.2)","rgba(0,158,96, 0.2)","rgba(0,158,96, 0.2)"],borderColor:["rgba(0,158,96, 0.8)","rgba(0,158,96, 0.8)","rgba(0,158,96, 0.8)","rgba(0,158,96, 0.8)","rgba(0,158,96, 0.8)","rgba(0,158,96, 0.8)","rgba(0,158,96, 0.8)","rgba(0,158,96, 0.8)","rgba(0,158,96, 0.8)","rgba(0,158,96, 0.8)","rgba(0,158,96, 0.8)","rgba(0,158,96, 0.8)","rgba(0,158,96, 0.8)"],borderWidth:1}]};return Object(V.jsx)("div",{children:Object(V.jsx)(ua.a,{data:s,options:{scales:{yAxes:[{ticks:{beginAtZero:!0}}]}}})})};var ha=function(e){var t=e.orderData,a=[];if(t){var r,n=Object(ja.a)(t);try{for(n.s();!(r=n.n()).done;){var c=r.value;a.push(c.numOfOrder)}}catch(i){n.e(i)}finally{n.f()}}var s={labels:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],datasets:[{label:"# of Sales By Month",data:a,fill:!1,pointRadius:5,backgroundColor:"rgb(0,158,96)",borderColor:"rgba(0,158,96, 0.2)"}]};return Object(V.jsx)("div",{children:Object(V.jsx)(ua.b,{data:s,options:{scales:{yAxes:[{ticks:{beginAtZero:!0}}]}}})})};var pa=function(e){var t=e.monthSaleData,a=[];if(t)for(var r=1;r<=t.length;r++)a.push(t[r]);for(var n=[],c=[],s=[],i=0;i2&&(t=t.toFixed()),"".concat(t," %")};return Object(V.jsxs)("div",{children:[Object(V.jsxs)(nt.a,{onSubmit:function(e){e.preventDefault(),S(),y(!0)},className:"pi-form",children:[Object(V.jsx)(_a.a,{type:"file",multiple:!1,onDone:function(e){var t=e.base64;return n(t)}}),Object(V.jsx)(j.a,{type:"submit",className:"bg-col-primary",children:"Upload"})]}),v?Object(V.jsx)(H,{}):Object(V.jsxs)(V.Fragment,{children:[i&&Object(V.jsx)("div",{className:"pi-mainImg",children:Object(V.jsx)("img",{src:i,alt:"pi-img"})}),h&&Object(V.jsx)("div",{children:h.map((function(e){return Object(V.jsxs)(u.a,{className:"pi-plants",children:[Object(V.jsx)(b.a,{className:"pi-plants-info",md:5,sm:12,children:Object(V.jsx)("div",{className:"pi-plants-img",children:e.similar_images.map((function(e){return Object(V.jsx)("img",{src:e.url,alt:"plant-img"},e.id)}))})}),Object(V.jsx)(b.a,{md:5,sm:6,className:"pi-col-2",children:Object(V.jsxs)("div",{className:"pi-card-info",children:[Object(V.jsx)("h3",{className:"pi-name",children:e.plant_name}),Object(V.jsxs)("div",{children:[Object(V.jsx)("span",{children:"Scientific Name:"}),e.plant_details.scientific_name]}),Object(V.jsxs)("div",{children:[Object(V.jsx)("span",{children:"Genus:"}),e.plant_details.structured_name.genus]}),Object(V.jsxs)("div",{children:[Object(V.jsx)("span",{children:"Species:"}),e.plant_details.structured_name.species]}),Object(V.jsxs)("div",{className:"pi-col-2-info",children:[Object(V.jsx)(wa,{name:e.plant_name,authority:e.plant_details.name_authority,common_names:e.plant_details.common_names,synonyms:e.plant_details.synonyms,taxonomy:e.plant_details.taxonomy,desc:e.plant_details.wiki_description.value}),Object(V.jsxs)("a",{href:e.plant_details.url,children:[Object(V.jsx)("i",{className:"fas fa-globe"})," "]})]})]})}),Object(V.jsx)(b.a,{md:2,sm:6,children:Object(V.jsx)("div",{className:"pi-probability",children:Object(V.jsx)("p",{children:E(e.probability)})})})]},e.id)}))})]})]})};a(199);var Da=function(e){var t=e.match,a=Object(r.useState)(""),n=Object(oe.a)(a,2),c=n[0],s=n[1],i="https://openfarm.cc/api/v1/crops";return Object(r.useEffect)((function(){function e(){return(e=Object(O.a)(p.a.mark((function e(){var a;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,x.a.get("".concat(i,"/").concat(t.params.id));case 2:a=e.sent,s(a.data.data);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}!function(){e.apply(this,arguments)}()}),[t]),Object(V.jsx)("div",{children:c&&Object(V.jsxs)(St.a,{striped:!0,bordered:!0,style:{marginTop:"-1.5rem"},children:[Object(V.jsx)("thead",{}),Object(V.jsxs)("tbody",{className:"ps-table-info",children:[Object(V.jsxs)("tr",{children:[Object(V.jsx)("td",{children:"Name"}),Object(V.jsx)("td",{children:c.attributes.name})]}),Object(V.jsxs)("tr",{children:[Object(V.jsx)("td",{children:"Binomial Name"}),Object(V.jsx)("td",{children:c.attributes.binomial_name})]}),Object(V.jsxs)("tr",{children:[Object(V.jsx)("td",{children:"Taxon"}),Object(V.jsx)("td",{children:c.attributes.taxon})]}),Object(V.jsxs)("tr",{children:[Object(V.jsx)("td",{children:"Description"}),Object(V.jsx)("td",{children:c.attributes.description})]}),Object(V.jsxs)("tr",{children:[Object(V.jsx)("td",{children:"Sun Requirements"}),Object(V.jsx)("td",{children:c.attributes.sun_requirements})]}),Object(V.jsxs)("tr",{children:[Object(V.jsx)("td",{children:"Sowing Method"}),Object(V.jsx)("td",{children:c.attributes.sowing_method})]}),Object(V.jsxs)("tr",{children:[Object(V.jsx)("td",{children:"Growing Degree Days"}),Object(V.jsx)("td",{children:c.attributes.growing_degree_days})]}),Object(V.jsxs)("tr",{children:[Object(V.jsx)("td",{children:"Row Spacing"}),Object(V.jsxs)("td",{children:[c.attributes.row_spacing," cm"]})]}),Object(V.jsxs)("tr",{children:[Object(V.jsx)("td",{children:"Height"}),Object(V.jsxs)("td",{children:[c.attributes.height," cm"]})]})]})]})})},Aa=a.p+"static/media/not.6ea7f4d0.svg",Ta=a.p+"static/media/sample-plant.31640ee6.jpg";var Ra=function(e){var t=e.data;return Object(V.jsx)(V.Fragment,{children:t&&Object(V.jsx)(u.a,{className:"ps-container",children:t.map((function(e){return Object(V.jsx)(Ee.LinkContainer,{to:"/search-plant/".concat(e.id),style:{cursor:"pointer"},children:Object(V.jsx)(b.a,{md:4,lg:4,sm:6,xs:12,children:Object(V.jsxs)("div",{className:"ps-card",children:[e.attributes.main_image_path.includes("/assets/baren_field_square")?Object(V.jsx)("img",{src:Ta,alt:"sample",className:"ps-sample"}):Object(V.jsx)("img",{src:e.attributes.main_image_path,alt:"sample",className:"ps-sample"}),Object(V.jsxs)("div",{className:"ps-card-info",children:[Object(V.jsxs)("div",{className:"ps-card-name",children:[" ",e.attributes.name," ",Object(V.jsx)("br",{})," "]}),Object(V.jsxs)("div",{className:"ps-card-bi-name",children:[" ",Object(V.jsx)("span",{children:"Binomial Name:"})," ",e.attributes.binomial_name," "]})]})]})})},e.id)}))})})};var Pa=function(){var e=Object(r.useState)(""),t=Object(oe.a)(e,2),a=t[0],n=t[1],c=Object(r.useState)([]),s=Object(oe.a)(c,2),i=s[0],o=s[1],l=Object(r.useState)(!0),d=Object(oe.a)(l,2),j=d[0],u=d[1],b=Object(r.useState)(!1),h=Object(oe.a)(b,2),m=h[0],g=h[1],f=function(){var e=Object(O.a)(p.a.mark((function e(t){var a,r;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,x.a.get("".concat("https://openfarm.cc/api/v1/crops","?filter=").concat(t));case 2:a=e.sent,0===(null===(r=a.data)||void 0===r?void 0:r.data.length)?u(!1):(o(r.data),u(!0)),g(!1);case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();return Object(V.jsxs)(V.Fragment,{children:[Object(V.jsx)("form",{onSubmit:function(e){e.preventDefault(),console.log(a),g(!0),f(a)},children:Object(V.jsx)("div",{className:"wrap",children:Object(V.jsxs)("div",{className:"search",children:[Object(V.jsx)("input",{type:"text",className:"searchTerm",placeholder:"What plant are you looking for?",value:a,onChange:function(e){return n(e.target.value)}}),Object(V.jsx)("button",{type:"submit",className:"searchButton",children:Object(V.jsx)("i",{className:"fa fa-search"})})]})})}),m?Object(V.jsx)(H,{}):Object(V.jsx)("div",{children:j?Object(V.jsx)(Ra,{data:i}):Object(V.jsxs)("div",{children:[Object(V.jsx)("img",{src:Aa,alt:"not-found",className:"search-nf"}),Object(V.jsx)("h4",{className:"search-text-nf",children:"No Result"})]})})]})},Ua=a(457),Fa=a(458),Ga=a(453),Ba=a.p+"static/media/blog.fc0941d6.svg",Ma=a.p+"static/media/diary.d6286fce.svg",za=a.p+"static/media/online-community.1ac5ba23.svg",Qa=a.p+"static/media/search.7b1accb2.svg",qa=a.p+"static/media/server.b628c0c9.svg",Ja=a.p+"static/media/store.2b5ae666.svg",Wa=a(466),Ya=a(455),Va=a(456),Ha=Object(Ga.a)({root:{minWidth:200,height:"250px",borderTop:"5px solid #81fbb8",margin:"auto"},title:{fontSize:"1.7rem",fontFamily:"Asap",textAlign:"center"},text:{textAlign:"center",fontFamily:"Lato",fontSize:"1.1rem"},image:{height:"75px",marginLeft:"70%"}});var Ka=function(e){var t=e.title,a=e.text,r=e.image,n=Ha();return Object(V.jsxs)(Wa.a,{className:n.root,variant:"outlined",children:[Object(V.jsxs)(Ya.a,{children:[Object(V.jsx)(Va.a,{className:n.title,color:"textPrimary",gutterBottom:!0,children:t}),Object(V.jsx)(Va.a,{variant:"body1",component:"p",color:"textSecondary",className:n.text,children:a})]}),Object(V.jsx)("img",{src:r,alt:"card_img",className:n.image})]})},Za=Object(Ga.a)({container:{backgroundColor:"#f7f7f7"},gridContainer:{padding:"10rem auto"},text:{textAlign:"center",padding:"2rem 0rem"}});var Xa=function(){var e=[{title:"Market Place",text:"Platform for buying plants, flowers, seeds and other equipments",image:Ja},{title:"Plant Database",text:"A database that contains plant related information",image:qa},{title:"Plant Identification",text:"Identify any plants just by uploading it in the website",image:Qa},{title:"Plant Diary",text:"In a personalized gardening notebook, keep track of your plants progress",image:Ma},{title:"Blog",text:"Read blog about plants, nature and environmental issues",image:Ba},{title:"Community",text:"Ask and give answers regarding plant related questions",image:za}],t=Za();return Object(V.jsxs)("div",{className:t.container,children:[Object(V.jsx)("h1",{className:t.text,children:"Features"}),Object(V.jsx)(Ua.a,{className:t.gridContainer,children:Object(V.jsx)(Fa.a,{container:!0,spacing:5,elevate:3,children:e.map((function(e){return Object(V.jsx)(Fa.a,{item:!0,xs:12,sm:6,md:4,children:Object(V.jsx)(Ka,{title:e.title,text:e.text,image:e.image})},e.title)}))})})]})},$a=a.p+"static/media/pngwing.com.d99df108.png";a(200);var er=function(){return Object(V.jsxs)("div",{className:"hero",children:[Object(V.jsxs)("div",{className:"hero_text",children:[Object(V.jsx)("h1",{children:"Plant Land"}),Object(V.jsx)("p",{children:"A place where plant enthusiastic people meet and get along with each other"}),Object(V.jsx)("button",{className:"btn-grad",children:"Explore"})]}),Object(V.jsx)("div",{className:"hero_img",children:Object(V.jsx)("img",{src:$a,alt:"hero",height:"500px"})})]})};var tr=function(){return Object(V.jsx)(V.Fragment,{children:Object(V.jsx)(ve.a,{collapseOnSelect:!0,expand:"lg",bg:"light",className:"navbar",fixed:"top",children:Object(V.jsxs)(o.a,{children:[Object(V.jsx)(ve.a.Brand,{href:"#home",children:"PlantLand"}),Object(V.jsx)(ve.a.Toggle,{"aria-controls":"responsive-navbar-nav"}),Object(V.jsx)(ve.a.Collapse,{id:"responsive-navbar-nav",children:Object(V.jsxs)(ye.a,{className:"me-auto nav-item nav-main-item",children:[Object(V.jsx)(ye.a.Link,{href:"/search-plant",children:"Plant Search"}),Object(V.jsx)(ye.a.Link,{href:"/identify-plant",children:"Identify Plant"}),Object(V.jsx)(ye.a.Link,{href:"/blog",children:"Blog"}),Object(V.jsx)(ye.a.Link,{href:"/market",children:"Market Place"})]})})]})})})};var ar=function(){return Object(V.jsxs)("div",{children:[Object(V.jsx)(tr,{}),Object(V.jsx)(er,{}),Object(V.jsx)(Xa,{})]})};var rr=function(){return Object(V.jsxs)(l.BrowserRouter,{children:[Object(V.jsx)(Ye,{}),Object(V.jsxs)("main",{children:[Object(V.jsx)(d.d,{path:"/",exact:!0,component:ar}),Object(V.jsxs)(o.a,{children:[Object(V.jsx)(d.d,{path:"/market",exact:!0,component:gt}),Object(V.jsx)(d.d,{path:"/search/:keyword",component:gt,exact:!0}),Object(V.jsx)(d.d,{path:"/search/:keyword/page/:pageNumber",component:gt}),Object(V.jsx)(d.d,{path:"/page/:pageNumber?",component:gt}),Object(V.jsx)(d.d,{path:"/login",component:yt}),Object(V.jsx)(d.d,{path:"/register",component:da}),Object(V.jsx)(d.d,{path:"/forget-password",component:st}),Object(V.jsx)(d.d,{path:"/reset-password/:resetToken",component:aa}),Object(V.jsx)(d.d,{path:"/profile",component:la}),Object(V.jsx)(d.d,{path:"/admin/userlist",component:Ia}),Object(V.jsx)(d.d,{path:"/admin/productlist",component:ia}),Object(V.jsx)(d.d,{path:"/admin/orderlist",component:$t}),Object(V.jsx)(d.d,{path:"/admin/orderData",component:Xt}),Object(V.jsx)(d.d,{path:"/admin/saleData",component:Ea}),Object(V.jsx)(d.d,{path:"/admin/product/:id/edit",component:sa}),Object(V.jsx)(d.d,{path:"/product/:id",component:oa}),Object(V.jsx)(d.d,{path:"/order/:id",component:ta}),Object(V.jsx)(d.d,{path:"/cart/:id?",component:rt}),Object(V.jsx)(d.d,{path:"/shipping",component:Ca}),Object(V.jsx)(d.d,{path:"/placeorder",component:ca}),Object(V.jsx)(d.d,{path:"/payment",component:na})]}),Object(V.jsx)(d.d,{path:"/blog",exact:!0,component:re}),Object(V.jsx)(d.d,{path:"/newblog",component:ge}),Object(V.jsx)(d.d,{path:"/blog/:id",component:ie}),Object(V.jsx)(d.d,{path:"/search-plant",exact:!0,component:Pa}),Object(V.jsx)(d.d,{path:"/search-plant/:id",exact:!0,component:Da}),Object(V.jsx)(d.d,{path:"/identify-plant",exact:!0,component:La})]}),Object(V.jsx)(fe,{})]})};a(420);var nr=function(){return Object(V.jsx)(rr,{})},cr=a(82),sr=a(217),ir=a(218),or=Object(cr.combineReducers)({productList:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{products:[]},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case C:return{loading:!0,products:[]};case I:return{loading:!1,products:t.payload.products,page:t.payload.page,numOfPages:t.payload.numOfPages};case N:return{loading:!1,error:t.payload};default:return e}},productDetails:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{product:{reviews:[]}},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case _:return Object(xa.a)({loading:!0},e);case k:return{loading:!1,product:t.payload};case w:return{loading:!1,error:t.payload};default:return e}},productCreateReview:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case L:return{loading:!0};case D:return{loading:!1,success:!0};case A:return{loading:!1,error:t.payload};case T:return{};default:return e}},productDelete:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case R:return{loading:!0};case P:return{loading:!1,success:!0};case U:return{loading:!1,error:t.payload};default:return e}},productCreate:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case F:return{loading:!0};case G:return{loading:!1,success:!0,product:t.payload};case B:return{loading:!1,error:t.payload};case M:return{};default:return e}},productUpdate:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{product:{}},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case z:return{loading:!0};case Q:return{loading:!1,success:!0,product:t.payload};case q:return{loading:!1,error:t.payload};case J:return{product:{}};default:return e}},userLogin:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case Ce:return{loading:!0};case Ie:return{loading:!1,userInfo:t.payload};case Ne:return{loading:!1,error:t.payload};case _e:return{};default:return e}},userRegister:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case ke:return{loading:!0};case we:return{loading:!1,userInfo:t.payload};case Le:return{loading:!1,error:t.payload};default:return e}},userDetails:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{user:{}},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case De:return Object(xa.a)(Object(xa.a)({},e),{},{loading:!0});case Ae:return{loading:!1,user:t.payload};case Te:return{loading:!1,error:t.payload};default:return e}},userProfileUpdate:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case Re:return Object(xa.a)(Object(xa.a)({},e),{},{loading:!0});case Pe:return{loading:!1,success:!0,userInfo:t.payload};case Ue:return{loading:!1,error:t.payload};default:return e}},userList:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{users:[]},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case Fe:return Object(xa.a)(Object(xa.a)({},e),{},{loading:!0});case Ge:return{loading:!1,users:t.payload};case Be:return{loading:!1,error:t.payload};case Me:return{users:[]};default:return e}},userDelete:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case ze:return Object(xa.a)(Object(xa.a)({},e),{},{loading:!0});case Qe:return{loading:!1,success:!0};case qe:return{loading:!1,error:t.payload};default:return e}},cart:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{cartItems:[],shippingAddress:{}},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case Xe:var a=t.payload,r=e.cartItems.find((function(e){return e.productId===a.productId}));return r?Object(xa.a)(Object(xa.a)({},e),{},{cartItems:e.cartItems.map((function(e){return e.productId===a.productId?a:e}))}):Object(xa.a)(Object(xa.a)({},e),{},{cartItems:[].concat(Object(Ve.a)(e.cartItems),[a])});case $e:return Object(xa.a)(Object(xa.a)({},e),{},{cartItems:e.cartItems.filter((function(e){return e.productId!==t.payload}))});case et:return Object(xa.a)(Object(xa.a)({},e),{},{shippingAddress:t.payload});case tt:return Object(xa.a)(Object(xa.a)({},e),{},{paymentMethod:t.payload});default:return e}},orderCreate:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case Et:return{loading:!0};case Ct:return{loading:!1,success:!0,order:t.payload};case It:return{loading:!1,error:t.payload};default:return e}},orderList:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{orders:[]},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case At:return Object(xa.a)(Object(xa.a)({},e),{},{loading:!0});case Tt:return{loading:!1,orders:t.payload};case Rt:return{loading:!1,error:t.payload};default:return e}},orderData:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{orderData:[]},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case qt:return Object(xa.a)(Object(xa.a)({},e),{},{loading:!0});case Jt:return{loading:!1,orderData:t.payload};case Wt:return{loading:!1,error:t.payload};default:return e}},orderDetails:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{loading:!0,orderItems:[],shippingAddress:{}},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case Nt:return Object(xa.a)(Object(xa.a)({},e),{},{loading:!0});case _t:return{loading:!1,order:t.payload};case kt:return{loading:!1,error:t.payload};default:return e}},orderSaleData:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{orderSaleData:[]},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case Yt:return Object(xa.a)(Object(xa.a)({},e),{},{loading:!0});case Vt:return{loading:!1,orderSaleData:t.payload};case Ht:return{loading:!1,error:t.payload};default:return e}},orderPay:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case Pt:return{loading:!0};case Ut:return{loading:!1,success:!0};case Ft:return{loading:!1,error:t.payload};case Gt:return{};default:return e}},orderDeliver:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case Bt:return{loading:!0};case Mt:return{loading:!1,success:!0};case zt:return{loading:!1,error:t.DELIVERload};case Qt:return{};default:return e}},myOrderList:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{orders:[]},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case wt:return Object(xa.a)(Object(xa.a)({},e),{},{loading:!0});case Lt:return{loading:!1,orders:t.payload};case Dt:return{loading:!1,error:t.payload};default:return e}},blogList:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case g:return{loading:!0,blogs:[]};case f:return{loading:!1,blogs:t.payload};case v:return{loading:!1,error:t.payload};default:return e}},blogDetails:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{blog:{comments:[]}},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case y:return Object(xa.a)({loading:!0},e);case S:return{loading:!1,blog:t.payload};case E:return{loading:!1,error:t.payload};default:return e}}}),lr=localStorage.getItem("cartItems")?JSON.parse(localStorage.getItem("cartItems")):[],dr=localStorage.getItem("userInfo")?JSON.parse(localStorage.getItem("userInfo")):null,jr={cart:{cartItems:lr,shippingAddress:localStorage.getItem("shippingAddress")?JSON.parse(localStorage.getItem("shippingAddress")):{}},userLogin:{userInfo:dr}},ur=[ir.a],br=Object(cr.createStore)(or,jr,Object(sr.composeWithDevTools)(cr.applyMiddleware.apply(void 0,ur)));a(421);s.a.render(Object(V.jsx)(V.Fragment,{children:Object(V.jsxs)(n.a.StrictMode,{children:[Object(V.jsx)(i.a,{store:br,children:Object(V.jsx)(nr,{})}),","]})}),document.getElementById("root"))},52:function(e,t,a){}},[[422,1,2]]]);
-//# sourceMappingURL=main.2e815323.chunk.js.map
\ No newline at end of file
+(this.webpackJsonpclient=this.webpackJsonpclient||[]).push([[0],{118:function(e,t,a){},198:function(e,t,a){},199:function(e,t,a){},200:function(e,t,a){},276:function(e,t){},420:function(e,t,a){},421:function(e,t,a){},422:function(e,t,a){"use strict";a.r(t);var r=a(1),n=a.n(r),c=a(30),s=a.n(c),i=a(10),o=(a(231),a(448)),l=a(16),d=a(22),j=a(203),u=a(446),b=a(204),h=a(7),p=a.n(h),O=a(11),m=a(12),x=a.n(m),g="BLOG_FETCH_REQUEST",f="BLOG_FETCH_SUCCESS",v="BLOG_FETCH_FAIL",y="BLOG_DETAILS_REQUEST",S="BLOG_DETAILS_SUCCESS",E="BLOG_DETAILS_FAIL",C="PRODUCT_LIST_REQUEST",I="PRODUCT_LIST_SUCCESS",N="PRODUCT_LIST_FAIL",_="PRODUCT_DETAILS_REQUEST",k="PRODUCT_DETAILS_SUCCESS",w="PRODUCT_DETAILS_FAIL",L="PRODUCT_CREATE_REVIEW_REQUEST",D="PRODUCT_CREATE_REVIEW_SUCCESS",A="PRODUCT_CREATE_REVIEW_FAIL",T="PRODUCT_CREATE_REVIEW_RESET",R="PRODUCT_DELETE_REQUEST",P="PRODUCT_DELETE_SUCCESS",U="PRODUCT_DELETE_FAIL",F="PRODUCT_CREATE_REQUEST",G="PRODUCT_CREATE_SUCCESS",B="PRODUCT_CREATE_FAIL",M="PRODUCT_CREATE_RESET",z="PRODUCT_UPDATE_REQUEST",Q="PRODUCT_UPDATE_SUCCESS",q="PRODUCT_UPDATE_FAIL",J="PRODUCT_UPDATE_RESET",W="https://plantland.herokuapp.com",Y=(a(118),a(444)),V=a(0);var H=function(){return Object(V.jsx)(Y.a,{animation:"border",variant:"success",role:"status",style:{width:"100px",height:"100px",margin:"auto",display:"block"},children:Object(V.jsx)("span",{className:"sr-only",children:"Loading..."})})},K=a(462),Z=a(445),X=a(95),$=a.n(X);var ee=function(e){var t=e.blog,a=Object(d.k)();return Object(V.jsx)("div",{children:Object(V.jsxs)(K.a,{style:{width:"24rem",minWidth:"18rem"},children:[Object(V.jsx)(l.Link,{to:"/blog/".concat(t._id),children:Object(V.jsx)(K.a.Img,{style:{padding:"0.7rem",height:"20rem"},variant:"top",src:t.image})}),Object(V.jsxs)(K.a.Body,{children:[Object(V.jsx)(K.a.Title,{className:"blog-card-title",children:t.title}),t.tags.map((function(e,t){return Object(V.jsx)(Z.a,{className:"blog-card-badge",children:e},t)})),Object(V.jsx)(K.a.Text,{className:"blog-card-desc",children:$()(t.description)}),Object(V.jsxs)("div",{style:{display:"flex",justifyContent:"space-between"},children:[Object(V.jsxs)(j.a,{className:"bg-col-primary",onClick:function(){return e=t._id,void a.push("/blog/".concat(e));var e},children:["Read More \xa0 ",Object(V.jsx)("i",{className:"fa fa-chevron-right"})," "]}),Object(V.jsxs)("div",{className:"blog-card-icons",children:[Object(V.jsx)("i",{className:"far fa-thumbs-up blog-card-like","aria-hidden":"true"}),Object(V.jsx)("i",{className:"far fa-bookmark blog-card-bookmark","aria-hidden":"true"})]})]})]})]})})},te=["All","Plant","Gardening","Plant Diseases","Green Living","Gardening Tools","Others"],ae=["plants","nature","flowers","plantsofinstagram","garden","plantsmakepeoplehappy","plant","green","gardening","houseplants","photography","naturephotography","flower","plantlover","love","indoorplants","succulents","urbanjungle","cactus","art","beautiful","plantlife","photooftheday","plantas","plantstagram","homedecor","flowerstagram","spring","naturelovers","bhfyp"];var re=function(){var e=Object(d.k)(),t=Object(i.b)(),a=Object(i.c)((function(e){return e.blogList})),n=a.loading,c=a.blogs;return Object(r.useEffect)((function(){t(function(){var e=Object(O.a)(p.a.mark((function e(t){var a,r;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,t({type:g}),e.next=4,x.a.get("".concat(W,"/api/blogs"));case 4:a=e.sent,r=a.data,t({type:f,payload:r}),e.next=13;break;case 9:e.prev=9,e.t0=e.catch(0),console.log(e.t0),t({type:v,payload:e.t0.response&&e.t0.response.data.message?e.t0.response.data.message:e.t0.message});case 13:case"end":return e.stop()}}),e,null,[[0,9]])})));return function(t){return e.apply(this,arguments)}}())}),[t]),Object(V.jsx)(V.Fragment,{children:Object(V.jsxs)("div",{className:"blog-home",children:[Object(V.jsxs)("div",{className:"blog-home-img",children:[Object(V.jsx)("h1",{children:"Blogs"}),Object(V.jsx)("p",{children:"We all need a little green in our lives"})]}),Object(V.jsxs)("div",{className:"blog-home-text",children:[Object(V.jsxs)("div",{style:{display:"flex",justifyContent:"space-between"},children:[Object(V.jsx)("h3",{children:"Latest Articles"}),Object(V.jsxs)(j.a,{onClick:function(){e.push("/newblog")},className:"blog-btn bg-col-primary",children:[Object(V.jsx)("i",{className:"fas fa-plus-circle"})," \xa0Create Blog"]})]}),Object(V.jsx)("p",{children:"Discover the most outstanding articles in all topics related to Plants"})]}),Object(V.jsxs)(u.a,{className:"blog-row",children:[Object(V.jsxs)(b.a,{md:2,xs:12,children:[Object(V.jsxs)("div",{className:"blog-category",children:[Object(V.jsx)("h5",{children:"Category"}),te.map((function(e){return Object(V.jsx)("div",{className:"blog-category-item",children:e},e)}))]}),Object(V.jsxs)("div",{className:"blog-tags",children:[Object(V.jsx)("h4",{children:"Discover Tags"}),Object(V.jsx)("div",{className:"blog-tag-div",children:ae.map((function(e){return Object(V.jsx)("div",{className:"blog-tag",children:e},e)}))})]})]}),n?Object(V.jsx)(H,{}):Object(V.jsx)(b.a,{md:10,xs:12,children:Object(V.jsx)(u.a,{children:c&&c.map((function(e,t){return Object(V.jsx)(b.a,{xs:12,md:6,lg:4,xl:4,className:"blog-card",children:Object(V.jsx)(ee,{blog:e})},t)}))})})]})]})})},ne=a(447);function ce(e){var t=e.variant,a=e.children;return Object(V.jsx)(ne.a,{variant:t,children:a})}ce.defaultProps={variant:"info"};var se=ce;var ie=function(e){var t=e.match,a=Object(i.b)(),n=Object(i.c)((function(e){return e.blogDetails})),c=n.loading,s=n.blog,l=n.error;return Object(r.useEffect)((function(){var e;a((e=t.params.id,function(){var t=Object(O.a)(p.a.mark((function t(a){var r,n;return p.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,a({type:y}),t.next=4,x.a.get("".concat(W,"/api/blogs/").concat(e));case 4:r=t.sent,n=r.data,a({type:S,payload:n}),t.next=13;break;case 9:t.prev=9,t.t0=t.catch(0),console.log(t.t0),a({type:w,payload:t.t0.response&&t.t0.response.data.message?t.t0.response.data.message:t.t0.message});case 13:case"end":return t.stop()}}),t,null,[[0,9]])})));return function(e){return t.apply(this,arguments)}}()))}),[a,t]),Object(V.jsx)(o.a,{className:"blog-det-container",children:c?Object(V.jsx)(H,{}):l?Object(V.jsx)(se,{variant:"alert",children:l}):s&&Object(V.jsxs)(V.Fragment,{children:[Object(V.jsx)("img",{className:"blog-det-image",src:s.image,alt:"blog hero"}),Object(V.jsx)("h1",{className:"blog-det-title",children:s.title}),Object(V.jsx)("div",{className:"blog-det-info-div",children:Object(V.jsxs)("div",{className:"blog-det-info",children:[Object(V.jsxs)("p",{children:["By ",Object(V.jsx)("span",{className:"info-span",children:s.author})]}),Object(V.jsxs)("p",{children:["Published in ",Object(V.jsx)("span",{className:"info-span",children:s.category})]}),Object(V.jsx)("p",{children:s.createdAt&&new Date(s.createdAt).toDateString()})]})}),Object(V.jsx)("div",{className:"blog-det-desc",children:$()(s.description)}),Object(V.jsx)("div",{className:"blog-det-tags",children:s.tags&&s.tags.map((function(e,t){return Object(V.jsx)(Z.a,{className:"blog-card-badge blog-det-badge",children:e},t)}))})]})})},oe=a(9),le=a(205),de=a.n(le),je=a(206),ue=a(56);a(174);ue.a.configure();var be=function(e){ue.a.success(e,{autoClose:3e3})},he=function(e){ue.a.info(e,{autoClose:3e3})},pe=function(e){ue.a.error(e,{autoClose:3e3,position:"bottom-right"})},Oe=n.a.useState,me=[{id:"plant",label:"Plant"},{id:"garden",label:"Gardening"},{id:"diseases",label:"Plant Diseases"},{id:"green",label:"Green Living"},{id:"tools",label:"Gardening Tools"},{id:"others",label:"Others"}],xe=function(e){var t=e.onCategorySelect,a=Oe(!1),r=Object(oe.a)(a,2),n=r[0],c=r[1],s=Oe(me),i=Object(oe.a)(s,1)[0],o=Oe(null),l=Object(oe.a)(o,2),d=l[0],j=l[1];return Object(V.jsxs)("div",{className:"dropdown",children:[Object(V.jsxs)("div",{className:"dropdown-header",onClick:function(){return c(!n)},children:[d?i.find((function(e){return e.id===d})).label:"Select Blog Category",Object(V.jsx)("i",{className:"fa fa-chevron-right icon ".concat(n&&"open")})]}),Object(V.jsx)("div",{className:"dropdown-body ".concat(n&&"open"),children:i.map((function(e){return Object(V.jsxs)("div",{className:"dropdown-item",onClick:function(e){return a=e.target.id,t(a),void j(d===a?null:a);var a},id:e.id,children:[Object(V.jsx)("span",{className:"dropdown-item-dot ".concat(e.id===d&&"selected"),children:"\u2022 "}),e.label]},e.id)}))})]})};var ge=function(){var e=Object(d.k)(),t=Object(i.b)(),a=Object(r.useState)(""),n=Object(oe.a)(a,2),c=n[0],s=n[1],o=Object(r.useState)(""),l=Object(oe.a)(o,2),u=l[0],b=l[1],h=Object(r.useState)(""),m=Object(oe.a)(h,2),g=m[0],f=m[1],v=Object(r.useState)(""),y=Object(oe.a)(v,2),S=y[0],E=y[1],C=Object(r.useState)(""),I=Object(oe.a)(C,2),N=I[0],_=I[1],k=function(){var e=Object(O.a)(p.a.mark((function e(t){var a,r,n,c,s;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.target.files[0],(r=new FormData).append("image",a),e.prev=3,n={headers:{"Content-Type":"multipart/form-data"}},e.next=7,x.a.post("/api/uploads",r,n);case 7:c=e.sent,s=c.data,E(s),e.next=15;break;case 12:e.prev=12,e.t0=e.catch(3),console.log(e.t0);case 15:case"end":return e.stop()}}),e,null,[[3,12]])})));return function(t){return e.apply(this,arguments)}}(),w=function(){s(""),_(""),f(""),b(""),E("")};return Object(V.jsxs)("div",{className:"write",children:[S?Object(V.jsx)("img",{className:"writeImage",src:S,alt:"blog hero"}):Object(V.jsx)("img",{className:"writeImage",src:"https://images.pexels.com/photos/9513908/pexels-photo-9513908.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940",alt:"blog hero"}),Object(V.jsxs)("form",{className:"writeForm",onSubmit:function(e){e.preventDefault(),console.log("off");var a,r=g.split(","),n={title:c,description:N,category:u,tags:r,image:S};try{t((a=n,function(){var e=Object(O.a)(p.a.mark((function e(t,r){var n,c,s,i,o;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,n=r(),c=n.userLogin.userInfo,s={headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(c.token)}},e.next=5,x.a.post("".concat(W,"/api/blogs"),a,s);case 5:i=e.sent,o=i.data,console.log(o),e.next=13;break;case 10:e.prev=10,e.t0=e.catch(0),console.log(e.t0);case 13:case"end":return e.stop()}}),e,null,[[0,10]])})));return function(t,a){return e.apply(this,arguments)}}())),w(),be("Blog Published")}catch(s){console.log(s)}},children:[Object(V.jsxs)("div",{className:"writeFormGroup",children:[Object(V.jsx)("label",{htmlFor:"blogImage",children:Object(V.jsx)("i",{className:"writeIcon fas fa-plus"})}),Object(V.jsx)("input",{type:"file",name:"blogImage",id:"blogImage",style:{display:"none"},onChange:k}),Object(V.jsx)("input",{type:"text",name:"title",id:"title",placeholder:"Title",autoFocus:!0,className:"writeInput writeTitle",value:c,onChange:function(e){return s(e.target.value)}})]}),Object(V.jsx)("div",{className:"writeCategory",children:Object(V.jsx)(xe,{onCategorySelect:function(e){b(e)}})}),Object(V.jsx)("div",{className:"writeFormGroup",children:Object(V.jsx)("input",{type:"text",name:"tags",id:"tags",className:"writeInput writeTags",placeholder:"Add tags, separated by comma...",value:g,onChange:function(e){return f(e.target.value)}})}),Object(V.jsx)(je.CKEditor,{editor:de.a,data:N,config:{ckfinder:{uploadUrl:"http://localhost:5000/api/uploads/ck-image"}},onChange:function(e,t){var a=t.getData();console.log(a),_(a)}}),Object(V.jsx)(j.a,{type:"submit",className:"writeSubmit bg-col-primary",children:"Publish"})]}),Object(V.jsx)(j.a,{className:"blogBack",onClick:function(){return e.push("/blog")},children:"Back"})]})};var fe=function(){return Object(V.jsx)("footer",{children:Object(V.jsx)(o.a,{children:Object(V.jsx)(u.a,{children:Object(V.jsx)(b.a,{className:"text-center py-3",children:"copyright \xa9 Plant Land"})})})})},ve=a(461),ye=a(463),Se=a(449),Ee=a(25),Ce="USER_LOGIN_REQUEST",Ie="USER_LOGIN_SUCCESS",Ne="USER_LOGIN_FAIL",_e="USER_LOGOUT",ke="USER_REGISTER_REQUEST",we="USER_REGISTER_SUCCESS",Le="USER_REGISTER_FAIL",De="USER_DETAILS_REQUEST",Ae="USER_DETAILS_SUCCESS",Te="USER_DETAILS_FAIL",Re="USER_PROFILE_UPDATE_REQUEST",Pe="USER_PROFILE_UPDATE_SUCCESS",Ue="USER_PROFILE_UPDATE_FAIL",Fe="USER_LIST_REQUEST",Ge="USER_LIST_SUCCESS",Be="USER_LIST_FAIL",Me="USER_LIST_RESET",ze="USER_DELETE_REQUEST",Qe="USER_DELETE_SUCCESS",qe="USER_DELETE_FAIL",Je="https://plantland.herokuapp.com",We=function(e){return function(){var t=Object(O.a)(p.a.mark((function t(a){return p.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:try{a({type:Ce}),a({type:Ie,payload:e}),localStorage.setItem("userInfo",JSON.stringify(e))}catch(r){console.log(r),a({type:Ne,payload:r.response&&r.response.data.message?r.response.data.message:r.message})}case 1:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()};var Ye=function(){var e=Object(i.c)((function(e){return e.userLogin})).userInfo,t=Object(i.b)(),a=Object(d.k)();return Object(V.jsx)(V.Fragment,{children:Object(V.jsx)(ve.a,{collapseOnSelect:!0,expand:"lg",variant:"dark",className:"bg-pm-col-only",children:Object(V.jsxs)(o.a,{children:[Object(V.jsx)(Ee.LinkContainer,{to:"/",children:Object(V.jsx)(ve.a.Brand,{children:"Plant Land"})}),Object(V.jsx)(ve.a.Toggle,{"aria-controls":"responsive-navbar-nav"}),Object(V.jsxs)(ve.a.Collapse,{id:"responsive-navbar-nav",children:[Object(V.jsx)(ye.a,{className:"me-auto"}),Object(V.jsxs)(ye.a,{children:[Object(V.jsx)(Ee.LinkContainer,{to:"/cart",children:Object(V.jsxs)(ye.a.Link,{children:[Object(V.jsx)("i",{className:"fas fa-shopping-cart"}),"Cart"]})}),e?Object(V.jsxs)(Se.a,{title:e.user.name,id:"name",variant:"success",children:[Object(V.jsx)(Se.a.Item,{href:"/profile",children:"Profile"}),Object(V.jsx)(Se.a.Item,{onClick:function(){t((function(e){localStorage.removeItem("userInfo"),e({type:_e}),e({type:Me})})),a.push("/market"),pe("You're logged out")},children:"Logout"})]}):Object(V.jsx)(Ee.LinkContainer,{to:"/login",children:Object(V.jsxs)(ye.a.Link,{children:[Object(V.jsx)("i",{className:"fas fa-user"}),"Sign In"]})}),e&&e.user.isAdmin&&Object(V.jsx)(Se.a,{title:"Admin",id:"admin",variant:"success",children:Object(V.jsx)(Ee.LinkContainer,{to:"/admin/orderData",children:Object(V.jsx)(Se.a.Item,{children:"Dashboard"})})})]})]})]})})})},Ve=a(21),He=a(464),Ke=a(450),Ze=a(207),Xe="CART_ADD_ITEM",$e="CART_REMOVE_ITEM",et="CART_SAVE_SHIPPING_ADDRESS",tt="CART_SAVE_PAYMENT_METHOD",at=function(e,t){return function(){var a=Object(O.a)(p.a.mark((function a(r,n){var c,s;return p.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return a.prev=0,a.next=3,x.a.get("".concat("https://plantland.herokuapp.com","/api/products/").concat(e));case 3:c=a.sent,s=c.data,r({type:Xe,payload:{productId:s._id,name:s.name,image:s.image,price:s.price,countInStock:s.countInStock,qty:t}}),localStorage.setItem("cartItems",JSON.stringify(n().cart.cartItems)),a.next=12;break;case 9:a.prev=9,a.t0=a.catch(0),console.log("Gg",a.t0);case 12:case"end":return a.stop()}}),a,null,[[0,9]])})));return function(e,t){return a.apply(this,arguments)}}()};var rt=function(e){var t=e.match,a=e.history,n=e.location,c=Object(i.b)(),s=t.params.id,o=n.search?Number(n.search.split("=")[1]):1,d=Object(i.c)((function(e){return e.cart})).cartItems;Object(r.useEffect)((function(){s&&c(at(s,o))}),[c,s,o]);var h=function(e){c(function(e){return function(){var t=Object(O.a)(p.a.mark((function t(a,r){return p.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:try{a({type:$e,payload:e}),localStorage.setItem("cartItems",JSON.stringify(r().cart.cartItems))}catch(n){console.log("Gg",n)}case 1:case"end":return t.stop()}}),t)})));return function(e,a){return t.apply(this,arguments)}}()}(e))};return Object(V.jsx)("div",{children:Object(V.jsxs)(u.a,{children:[Object(V.jsx)("h2",{style:{padding:"1rem"},children:"Shopping Cart"}),Object(V.jsx)(b.a,{md:8,children:0===d.length?Object(V.jsxs)(se,{children:["Your cart is empty. ",Object(V.jsx)(l.Link,{to:"/market",children:"Go Back"})]}):Object(V.jsx)(He.a,{variant:"flush",children:d.map((function(e){return Object(V.jsx)(He.a.Item,{children:Object(V.jsxs)(u.a,{children:[Object(V.jsx)(b.a,{md:2,children:Object(V.jsx)(Ke.a,{src:e.image,alt:e.name,fluid:!0,rounded:!0})}),Object(V.jsx)(b.a,{md:4,children:Object(V.jsx)(l.Link,{to:"/product/".concat(e.productId),children:e.name})}),Object(V.jsxs)(b.a,{md:2,style:{fontSize:"1.2rem"},children:[Object(V.jsx)("span",{style:{fontSize:"1.3rem"},children:"\u09f3"}),"\xa0",e.price]}),Object(V.jsx)(b.a,{md:2,children:Object(V.jsx)(Ze.a,{as:"select",value:e.qty,onChange:function(t){return c(at(e.productId,Number(t.target.value)))},children:Object(Ve.a)(Array(e.countInStock).keys()).map((function(e){return Object(V.jsx)("option",{value:e+1,children:e+1},e+1)}))})}),Object(V.jsx)(b.a,{md:2,children:Object(V.jsx)(j.a,{variant:"light",type:"button",onClick:function(){return h(e.productId)},children:Object(V.jsx)("i",{className:"fas fa-trash"})})})]})},e.productId)}))})}),Object(V.jsx)(b.a,{md:1}),Object(V.jsx)(b.a,{md:3,children:Object(V.jsx)(K.a,{children:Object(V.jsxs)(He.a,{variant:"flush",children:[Object(V.jsx)(He.a.Item,{children:Object(V.jsxs)("h3",{children:["Subtotal (",d.reduce((function(e,t){return e+t.qty}),0),") items"]})}),Object(V.jsx)(He.a.Item,{children:Object(V.jsxs)(u.a,{children:[Object(V.jsx)(b.a,{children:"Price"}),Object(V.jsx)(b.a,{children:d.reduce((function(e,t){return e+t.qty*t.price}),0).toFixed(2)})]})}),Object(V.jsx)(He.a.Item,{children:Object(V.jsx)(j.a,{type:"button",className:"btn-block",variant:"success",disabled:0===d.length,style:{width:"100%"},onClick:function(){a.push("/login?redirect=shipping")},children:"Proceed to checkout"})})]})})})]})})},nt=a(460);var ct=function(e){var t=e.children;return Object(V.jsx)(o.a,{children:Object(V.jsx)(u.a,{className:"justify-content-md-center",children:Object(V.jsxs)(b.a,{xs:12,md:4,children:[" ",t," "]})})})};var st=function(){var e=Object(r.useState)(""),t=Object(oe.a)(e,2),a=t[0],n=t[1],c=Object(r.useState)(""),s=Object(oe.a)(c,2),i=s[0],o=s[1],l=function(){var e=Object(O.a)(p.a.mark((function e(t){var r;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.preventDefault(),r={headers:{"Content-Type":"application/json"}},e.prev=2,e.next=5,x.a.post("/api/users/forget-password",{email:a},r);case 5:he("Instructions to reset your password has been sent to your email"),e.next=13;break;case 8:e.prev=8,e.t0=e.catch(2),o(e.t0.response&&e.t0.response.data.message?e.t0.response.data.message:e.t0.message),n(""),setTimeout((function(){o("")}),3e3);case 13:case"end":return e.stop()}}),e,null,[[2,8]])})));return function(t){return e.apply(this,arguments)}}();return Object(V.jsxs)(ct,{children:[Object(V.jsx)("h1",{className:"py-2",children:"Forget Password ?"}),Object(V.jsx)("p",{className:"mb-5",children:"Enter the email address you used when you joined and we\u2019ll send you instructions to reset your password."}),i&&Object(V.jsx)(se,{variant:"danger",children:i}),Object(V.jsxs)(nt.a,{onSubmit:l,children:[Object(V.jsxs)(nt.a.Group,{controlId:"email",className:"mb-3 mt-5",children:[Object(V.jsx)(nt.a.Label,{children:"Email Address"}),Object(V.jsx)(nt.a.Control,{type:"email",placeholder:"Enter email",value:a,onChange:function(e){return n(e.target.value)}})]}),Object(V.jsx)(j.a,{type:"submit",variant:"primary",className:"auth-btn bg-col-primary",children:"Submit"})]})]})},it="https://plantland.herokuapp.com",ot=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"";return function(){var n=Object(O.a)(p.a.mark((function n(c){var s,i;return p.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,c({type:C}),n.next=4,x.a.get("".concat(it,"/api/products?category=").concat(a,"&keyword=").concat(e,"&pageNumber=").concat(t,"&sort=").concat(r));case 4:s=n.sent,i=s.data,c({type:I,payload:i}),n.next=13;break;case 9:n.prev=9,n.t0=n.catch(0),console.log(n.t0),c({type:N,payload:n.t0.response&&n.t0.response.data.message?n.t0.response.data.message:n.t0.message});case 13:case"end":return n.stop()}}),n,null,[[0,9]])})));return function(e){return n.apply(this,arguments)}}()},lt=function(e){return function(){var t=Object(O.a)(p.a.mark((function t(a){var r,n;return p.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,a({type:_}),t.next=4,x.a.get("".concat(it,"/api/products/").concat(e));case 4:r=t.sent,n=r.data,a({type:k,payload:n}),t.next=13;break;case 9:t.prev=9,t.t0=t.catch(0),console.log(t.t0),a({type:w,payload:t.t0.response&&t.t0.response.data.message?t.t0.response.data.message:t.t0.message});case 13:case"end":return t.stop()}}),t,null,[[0,9]])})));return function(e){return t.apply(this,arguments)}}()},dt=(a(52),a(451)),jt=a(46);var ut=function(e){var t=e.handleCategoryChange;return Object(V.jsx)(V.Fragment,{children:Object(V.jsxs)(dt.a,{alignRight:!0,title:"Product Category",id:"dropdown-menu-align-right",onSelect:t,children:[["Plant","Flower","Seed","Pesticide","Tool"].map((function(e){return Object(V.jsx)(jt.a.Item,{eventKey:e,children:e},e)})),Object(V.jsx)(jt.a.Item,{eventKey:"soil",children:"Soil and Fertilizer"},"soil")]})})};var bt=function(e){var t=e.handleSortChange;return Object(V.jsx)(V.Fragment,{children:Object(V.jsxs)(dt.a,{alignRight:!0,title:"Sort By",id:"dropdown-menu-align-right",onSelect:t,children:[Object(V.jsx)(jt.a.Item,{eventKey:"rating",children:"Highest Rated"},"rating"),Object(V.jsx)(jt.a.Item,{eventKey:"newest",children:"Newest"},"newest"),Object(V.jsx)(jt.a.Item,{eventKey:"lowest",children:"Price: Low to High"},"lowest"),Object(V.jsx)(jt.a.Item,{eventKey:"highest",children:"Price: High to Low"},"highest")]})})},ht=a(465);var pt=function(e){var t=e.page,a=e.numOfPages,r=e.keyword,n=void 0===r?"":r;return e.sort,e.isAdmin,a>1&&Object(V.jsx)(ht.a,{children:Object(Ve.a)(Array(a).keys()).map((function(e){return Object(V.jsx)(Ee.LinkContainer,{to:n?"/search/".concat(n,"/page/").concat(e+1):"/page/".concat(e+1),children:Object(V.jsx)(ht.a.Item,{active:t===e+1,children:e+1},e+1)},e+1)}))})};var Ot=function(e){var t=e.value,a=e.text;return Object(V.jsxs)("div",{className:"rating",children:[Object(V.jsxs)("div",{style:{color:"#faef67"},children:[Object(V.jsx)("span",{children:Object(V.jsx)("i",{className:t>=1?"fas fa-star":t>=.5?"fas fa-star-half-alt":"far fas-star"})}),Object(V.jsx)("span",{children:Object(V.jsx)("i",{className:t>=2?"fas fa-star":t>=1.5?"fas fa-star-half-alt":"far fas-star"})}),Object(V.jsx)("span",{children:Object(V.jsx)("i",{className:t>=3?"fas fa-star":t>=2.5?"fas fa-star-half-alt":"far fas-star"})}),Object(V.jsx)("span",{children:Object(V.jsx)("i",{className:t>=4?"fas fa-star":t>=3.5?"fas fa-star-half-alt":"far fas-star"})}),Object(V.jsx)("span",{children:Object(V.jsx)("i",{className:t>=5?"fas fa-star":t>=4.5?"fas fa-star-half-alt":"far fas-star"})})]}),"hidden"!==a&&Object(V.jsx)("div",{className:"rating_text",children:Object(V.jsx)("span",{children:a?"".concat(a," reviews"):"No reviews yet"})})]})};var mt=function(e){var t=e.product,a=Object(d.k)();return Object(V.jsxs)(K.a,{className:"my-3 p-3",children:[Object(V.jsx)(l.Link,{to:"/product/".concat(t._id),children:Object(V.jsx)(K.a.Img,{variant:"top",src:t.image})}),Object(V.jsxs)(K.a.Body,{children:[Object(V.jsx)(K.a.Title,{className:"product_name",children:t.name}),Object(V.jsx)(K.a.Text,{as:"div",className:"my-3",children:Object(V.jsx)(Ot,{value:t.rating,text:t.numReviews})}),Object(V.jsxs)(K.a.Text,{as:"h5",className:"product_name",children:[Object(V.jsx)("span",{style:{fontSize:"1.3rem"},children:"\u09f3"}),"\xa0",t.price]}),Object(V.jsx)(j.a,{className:"bg-col-primary",onClick:function(){return e=t._id,void a.push("/product/".concat(e));var e},children:"View Details"})]})]})};var xt=function(){var e=Object(r.useState)(""),t=Object(oe.a)(e,2),a=t[0],n=t[1],c=Object(d.k)();return Object(V.jsx)(V.Fragment,{children:Object(V.jsxs)(nt.a,{onSubmit:function(e){e.preventDefault(),a.trim()?c.push("/search/".concat(a)):c.push("/market")},inline:!0,className:"d-flex",children:[Object(V.jsx)(nt.a.Control,{type:"text",placeholder:"Search Products...",className:"mr-sm-2 ml-sm-5",name:"q",onChange:function(e){return n(e.target.value)}}),Object(V.jsx)(j.a,{className:"btn btn-outline-light home-submit-btn",type:"submit",children:"Search"})]})})};var gt=function(e){var t=e.match,a=Object(r.useState)(""),n=Object(oe.a)(a,2),c=n[0],s=n[1],o=Object(r.useState)(""),l=Object(oe.a)(o,2),d=l[0],j=l[1],h=Object(i.b)(),p=Object(i.c)((function(e){return e.productList})),O=p.loading,m=p.error,x=p.products,g=p.page,f=p.numOfPages,v=t.params.keyword,y=t.params.pageNumber||1,S=c,E=d;return Object(r.useEffect)((function(){h(ot(v,y,S,E))}),[h,v,y,S,E]),Object(V.jsxs)("div",{children:[Object(V.jsxs)(u.a,{className:"home-filter-info",children:[Object(V.jsx)(b.a,{xs:12,md:3,className:"home-filter-dropdown",children:Object(V.jsx)(ut,{handleCategoryChange:function(e){s(e.toLowerCase())}})}),Object(V.jsx)(b.a,{xs:12,md:6,children:Object(V.jsx)(xt,{})}),Object(V.jsx)(b.a,{xs:12,md:3,className:"home-filter-dropdown",children:Object(V.jsx)(bt,{handleSortChange:function(e){j(e)}})})]}),Object(V.jsx)("h2",{children:"Latest Products"}),O?Object(V.jsx)(H,{}):m?Object(V.jsx)(se,{variant:"danger",children:m}):Object(V.jsxs)(V.Fragment,{children:[Object(V.jsx)(u.a,{children:x.map((function(e){return Object(V.jsx)(b.a,{xs:12,md:6,lg:4,xl:3,children:Object(V.jsx)(mt,{product:e})},e._id)}))}),Object(V.jsx)(pt,{numOfPages:f,page:g,sort:E||" ",keyword:v||""})]})]})},ft=a(208);var vt=function(){var e=Object(i.b)(),t=Object(d.k)(),a=function(){var a=Object(O.a)(p.a.mark((function a(r){var n,c;return p.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:n=null===r||void 0===r?void 0:r.profileObj,c=null===r||void 0===r?void 0:r.tokenId;try{e(We({user:n,token:c})),t.push("/market")}catch(s){console.log(s)}case 3:case"end":return a.stop()}}),a)})));return function(e){return a.apply(this,arguments)}}();return Object(V.jsx)("div",{children:Object(V.jsx)(ft.GoogleLogin,{clientId:"194822757324-85cbm8js64av331n4ouf1aqr4ot4veju.apps.googleusercontent.com",render:function(e){return Object(V.jsx)(j.a,{onClick:e.onClick,disabled:e.disabled,className:"google-btn login-with-google-btn",children:"Google Sign in"})},onSuccess:a,onFailure:function(){console.log("Google Sign in was unsuccessful. Try again later")},cookiePolicy:"single_host_origin"})})};var yt=function(e){var t=e.location,a=e.history,n=Object(r.useState)(""),c=Object(oe.a)(n,2),s=c[0],o=c[1],d=Object(r.useState)(""),h=Object(oe.a)(d,2),m=h[0],g=h[1],f=t.search?t.search.split("=")[1]:"/market",v=Object(i.b)(),y=Object(i.c)((function(e){return e.userLogin})),S=y.loading,E=y.error,C=y.userInfo;return Object(r.useEffect)((function(){C&&(he("Hey, nice to see you back ".concat(C.user.name)),a.push(f))}),[a,f,C]),Object(V.jsxs)(ct,{children:[Object(V.jsx)("h1",{className:"text-center",children:"Sign In"}),E&&Object(V.jsx)(se,{variant:"danger",children:E}),S&&Object(V.jsx)(H,{}),Object(V.jsxs)(nt.a,{onSubmit:function(e){e.preventDefault(),v(function(e,t){return function(){var a=Object(O.a)(p.a.mark((function a(r){var n,c,s;return p.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return a.prev=0,r({type:Ce}),n={headers:{"Content-Type":"application/json"}},a.next=5,x.a.post("".concat(Je,"/api/users/login"),{email:e,password:t},n);case 5:c=a.sent,s=c.data,r({type:Ie,payload:s}),localStorage.setItem("userInfo",JSON.stringify(s)),a.next=15;break;case 11:a.prev=11,a.t0=a.catch(0),console.log(a.t0),r({type:Ne,payload:a.t0.response&&a.t0.response.data.message?a.t0.response.data.message:a.t0.message});case 15:case"end":return a.stop()}}),a,null,[[0,11]])})));return function(e){return a.apply(this,arguments)}}()}(s,m))},children:[Object(V.jsxs)(nt.a.Group,{controlId:"email",className:"mb-3 mt-3",children:[Object(V.jsx)(nt.a.Label,{children:"Email Address"}),Object(V.jsx)(nt.a.Control,{type:"email",placeholder:"Enter email",value:s,onChange:function(e){return o(e.target.value)}})]}),Object(V.jsxs)(nt.a.Group,{controlId:"password",className:"mb-1",children:[Object(V.jsx)(nt.a.Label,{children:"Password"}),Object(V.jsx)(nt.a.Control,{type:"password",placeholder:"Enter password",value:m,onChange:function(e){return g(e.target.value)}})]}),Object(V.jsx)(l.Link,{to:"/forget-password",children:"Forget Password ?"}),Object(V.jsx)(j.a,{type:"submit",variant:"primary",className:"auth-btn mb-2 mt-4 bg-col-primary",children:"Sign In"})]}),Object(V.jsx)(u.a,{children:Object(V.jsx)(b.a,{className:"text-center my-1",children:Object(V.jsx)("h6",{children:"Or"})})}),Object(V.jsx)(u.a,{children:Object(V.jsxs)(b.a,{children:[" ",Object(V.jsx)(vt,{})," "]})}),Object(V.jsx)(u.a,{className:"py-3",children:Object(V.jsxs)(b.a,{children:["Don't have an Account ? ",Object(V.jsx)(l.Link,{to:f?"/register?redirect=".concat(f):"/",children:"Create one"})]})})]})},St=a(452),Et="ORDER_CREATE_REQUEST",Ct="ORDER_CREATE_SUCCESS",It="ORDER_CREATE_FAIL",Nt="ORDER_DETAILS_REQUEST",_t="ORDER_DETAILS_SUCCESS",kt="ORDER_DETAILS_FAIL",wt="ORDER_MY_LIST_REQUEST",Lt="ORDER_MY_LIST_SUCCESS",Dt="ORDER_MY_LIST_FAIL",At="ORDER_LIST_REQUEST",Tt="ORDER_LIST_SUCCESS",Rt="ORDER_LIST_FAIL",Pt="ORDER_PAY_REQUEST",Ut="ORDER_PAY_SUCCESS",Ft="ORDER_PAY_FAIL",Gt="ORDER_PAY_RESET",Bt="ORDER_DELIVER_REQUEST",Mt="ORDER_DELIVER_SUCCESS",zt="ORDER_DELIVER_FAIL",Qt="ORDER_DELIVER_RESET",qt="ORDER_DATA_REQUEST",Jt="ORDER_DATA_SUCCESS",Wt="ORDER_DATA_FAIL",Yt="ORDER_SALE_DATA_REQUEST",Vt="ORDER_SALE_DATA_SUCCESS",Ht="ORDER_SALE_DATA_FAIL",Kt="https://plantland.herokuapp.com";var Zt=function(){return Object(V.jsxs)("div",{className:"s-layout__sidebar",children:[Object(V.jsx)("a",{className:"s-sidebar__trigger",href:"#0",children:Object(V.jsx)("i",{className:"fa fa-bars"})}),Object(V.jsx)("nav",{className:"s-sidebar__nav",children:Object(V.jsxs)("ul",{children:[Object(V.jsx)("li",{children:Object(V.jsxs)("a",{className:"s-sidebar__nav-link",href:"/market",style:{marginTop:"-5px"},children:[Object(V.jsx)("i",{className:"fa fa-home"}),Object(V.jsx)("em",{children:"Market"})]})}),Object(V.jsx)("li",{children:Object(V.jsxs)("a",{className:"s-sidebar__nav-link",href:"/admin/orderData",children:[Object(V.jsx)("i",{className:"fas fa-th-large"}),Object(V.jsx)("em",{children:"Dashboard"})]})}),Object(V.jsx)("li",{children:Object(V.jsxs)("a",{className:"s-sidebar__nav-link",href:"/admin/orderList",children:[Object(V.jsx)("i",{className:"fas fa-shopping-cart"}),Object(V.jsx)("em",{children:"Orders"})]})}),Object(V.jsx)("li",{children:Object(V.jsxs)("a",{className:"s-sidebar__nav-link",href:"/admin/productList",children:[Object(V.jsx)("i",{className:"fas fa-shopping-bag"}),Object(V.jsx)("em",{children:"Products"})]})}),Object(V.jsx)("li",{children:Object(V.jsxs)("a",{className:"s-sidebar__nav-link",href:"/admin/saleData",children:[Object(V.jsx)("i",{className:"fas fa-chart-line"}),Object(V.jsx)("em",{children:"Analytics"})]})}),Object(V.jsx)("li",{children:Object(V.jsxs)("a",{className:"s-sidebar__nav-link",href:"/admin/userList",children:[Object(V.jsx)("i",{className:"fas fa-users"}),Object(V.jsx)("em",{children:"Users"})]})})]})})]})};var Xt=function(e){var t,a,n=e.history,c=Object(i.b)(),s=Object(i.c)((function(e){return e.userLogin})).userInfo.user,o=Object(i.c)((function(e){return e.orderData})),l=o.loading,d=o.error,j=o.orderData;return Object(r.useEffect)((function(){s&&s.isAdmin?c(function(){var e=Object(O.a)(p.a.mark((function e(t,a){var r,n,c,s,i;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,t({type:qt}),r=a(),n=r.userLogin.userInfo,c={headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(n.token)}},e.next=6,x.a.get("".concat(Kt,"/api/orders/order-data"),c);case 6:s=e.sent,i=s.data,t({type:Jt,payload:i}),e.next=15;break;case 11:e.prev=11,e.t0=e.catch(0),console.log(e.t0),t({type:Wt,payload:e.t0.response&&e.t0.response.data.message?e.t0.response.data.message:e.t0.message});case 15:case"end":return e.stop()}}),e,null,[[0,11]])})));return function(t,a){return e.apply(this,arguments)}}()):n.push("/login")}),[c,n,s]),Object(V.jsx)(V.Fragment,{children:Object(V.jsxs)(u.a,{children:[Object(V.jsxs)(b.a,{md:2,children:[Object(V.jsx)(Zt,{})," "]}),Object(V.jsx)(b.a,{md:10,children:l?Object(V.jsx)(H,{}):d?Object(V.jsx)(se,{variant:"danger",children:d}):Object(V.jsx)(V.Fragment,{children:j&&Object(V.jsxs)(V.Fragment,{children:[Object(V.jsx)(u.a,{children:Object(V.jsxs)("div",{className:"order-data-card",children:[Object(V.jsxs)("div",{className:"order-data order-total",children:[Object(V.jsxs)("div",{children:[Object(V.jsx)("i",{className:"fas fa-shopping-cart"}),Object(V.jsx)("h4",{children:"Total Orders"})]}),Object(V.jsx)("p",{children:j.totalOrder})]}),Object(V.jsxs)("div",{className:"order-data order-pending",children:[Object(V.jsxs)("div",{children:[Object(V.jsx)("i",{className:"fas fa-clipboard-check op-i"}),Object(V.jsx)("h4",{children:"Order Paid"})]}),Object(V.jsx)("p",{children:j.totalPaidOrder})]}),Object(V.jsxs)("div",{className:"order-data order-delivered",children:[Object(V.jsxs)("div",{children:[Object(V.jsx)("i",{className:"fas fa-truck"}),Object(V.jsx)("h4",{children:"Order Delivered"})]}),Object(V.jsx)("p",{children:j.totalDelivered})]})]})}),Object(V.jsxs)(u.a,{className:"order-data-table",children:[Object(V.jsxs)(b.a,{md:6,sm:12,xs:12,children:[Object(V.jsx)("h3",{className:"odt-heading",children:"Top Sold Products"}),Object(V.jsxs)(St.a,{striped:!0,bordered:!0,children:[Object(V.jsx)("thead",{children:Object(V.jsxs)("tr",{children:[Object(V.jsx)("th",{children:"Plant"}),Object(V.jsx)("th",{children:"Quantity Sold"})]})}),Object(V.jsx)("tbody",{children:null===j||void 0===j||null===(t=j.productSaleData)||void 0===t?void 0:t.map((function(e){return Object(V.jsxs)("tr",{children:[Object(V.jsx)("td",{children:e._id}),Object(V.jsx)("td",{children:e.total})]},e._id)}))})]})]}),Object(V.jsx)(b.a,{md:1,children:" "}),Object(V.jsxs)(b.a,{md:5,sm:12,xs:12,children:[Object(V.jsx)("h3",{className:"odt-heading",children:"Top Buyers"}),Object(V.jsxs)(St.a,{striped:!0,bordered:!0,children:[Object(V.jsx)("thead",{children:Object(V.jsxs)("tr",{children:[Object(V.jsx)("th",{children:"Name"}),Object(V.jsx)("th",{children:"Email"}),Object(V.jsx)("th",{children:"Amount"})]})}),Object(V.jsx)("tbody",{children:null===j||void 0===j||null===(a=j.customerBuyData)||void 0===a?void 0:a.map((function(e){return Object(V.jsxs)("tr",{children:[Object(V.jsx)("td",{children:e.customer_name}),Object(V.jsx)("td",{children:e.customer_email}),Object(V.jsx)("td",{children:Math.ceil(e.total)})]},e.customer_email)}))})]})]})]})]})})})]})})};var $t=function(e){var t=e.history,a=Object(i.b)(),n=Object(i.c)((function(e){return e.userLogin})).userInfo.user,c=Object(i.c)((function(e){return e.orderList})),s=c.loading,o=c.error,l=c.orders;return Object(r.useEffect)((function(){n&&n.isAdmin?a(function(){var e=Object(O.a)(p.a.mark((function e(t,a){var r,n,c,s,i;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,t({type:At}),r=a(),n=r.userLogin.userInfo,c={headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(n.token)}},e.next=6,x.a.get("".concat(Kt,"/api/orders"),c);case 6:s=e.sent,i=s.data,t({type:Tt,payload:i}),e.next=15;break;case 11:e.prev=11,e.t0=e.catch(0),console.log(e.t0),t({type:Rt,payload:e.t0.response&&e.t0.response.data.message?e.t0.response.data.message:e.t0.message});case 15:case"end":return e.stop()}}),e,null,[[0,11]])})));return function(t,a){return e.apply(this,arguments)}}()):t.push("/login")}),[a,t,n]),Object(V.jsx)(V.Fragment,{children:Object(V.jsxs)(u.a,{children:[Object(V.jsx)(b.a,{md:2,children:Object(V.jsx)(Zt,{})}),Object(V.jsx)(b.a,{md:10,children:s?Object(V.jsx)(H,{}):o?Object(V.jsx)(se,{variant:"danger",children:o}):Object(V.jsxs)(V.Fragment,{children:[Object(V.jsx)("h1",{children:"All Orders"}),Object(V.jsxs)(St.a,{striped:!0,bordered:!0,hover:!0,children:[Object(V.jsx)("thead",{children:Object(V.jsxs)("tr",{children:[Object(V.jsx)("th",{children:"USER"}),Object(V.jsx)("th",{children:"DATE"}),Object(V.jsx)("th",{children:"TOTAL"}),Object(V.jsx)("th",{children:"PAID"}),Object(V.jsx)("th",{children:"Delivered"})]})}),Object(V.jsx)("tbody",{children:l.map((function(e){return Object(V.jsxs)("tr",{children:[Object(V.jsx)("td",{children:e.user&&e.user.name}),Object(V.jsx)("td",{children:e.createdAt.substring(0,10)}),Object(V.jsxs)("td",{children:[Object(V.jsx)("span",{style:{fontSize:"1.5rem",marginRight:"0.1rem"},children:"\u09f3"}),"\xa0",e.totalPrice]}),Object(V.jsx)("td",{children:(null===e||void 0===e?void 0:e.isPaid)?e.paidAt.substring(0,10):Object(V.jsx)(j.a,{variant:"light",children:Object(V.jsx)("i",{className:"fas fa-times",style:{color:"red"}})})}),Object(V.jsx)("td",{children:(null===e||void 0===e?void 0:e.isDelivered)?e.deliverAt.substring(0,10):Object(V.jsx)(j.a,{variant:"light",children:Object(V.jsx)("i",{className:"fas fa-times",style:{color:"red"}})})}),Object(V.jsx)("td",{children:Object(V.jsx)(Ee.LinkContainer,{to:"/order/".concat(e._id),children:Object(V.jsx)(j.a,{className:"bg-col-primary btn-sm",children:"Details"})})})]},e._id)}))})]})]})})]})})},ea=a(209),ta=function(e){var t,a,n,c=e.match,s=e.history,o=c.params.id,d=Object(i.b)(),h=Object(r.useState)(!1),m=Object(oe.a)(h,2),g=m[0],f=m[1],v=Object(i.c)((function(e){return e.orderDetails})),y=v.order,S=v.loading,E=v.error,C=Object(i.c)((function(e){return e.orderPay})),I=C.loading,N=C.success,_=Object(i.c)((function(e){return e.orderDeliver})).success,k=Object(i.c)((function(e){return e.userLogin})).userInfo.user;if(!S){var w;y.itemsPrice=(n=null===y||void 0===y||null===(w=y.orderedItems)||void 0===w?void 0:w.reduce((function(e,t){return e+t.price*t.qty}),0),(Math.round(100*n)/100).toFixed(2))}Object(r.useEffect)((function(){if(!k)return s.push("/login");var e,t=function(){var e=Object(O.a)(p.a.mark((function e(t,a){var r,n,c;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,x.a.get("/api/config/paypal");case 2:r=e.sent,n=r.data,console.log(n),(c=document.createElement("script")).type="text/javascript",c.src="https://www.paypal.com/sdk/js?client-id=".concat(n),c.async=!0,c.onload=function(){f(!0)},document.body.appendChild(c);case 11:case"end":return e.stop()}}),e)})));return function(t,a){return e.apply(this,arguments)}}();!y||N?(d({type:Gt}),d({type:Qt}),d((e=o,function(){var t=Object(O.a)(p.a.mark((function t(a,r){var n,c,s,i,o;return p.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,a({type:Nt}),n=r(),c=n.userLogin.userInfo,s={headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(c.token)}},t.next=6,x.a.get("".concat(Kt,"/api/orders/").concat(e),s);case 6:i=t.sent,o=i.data,a({type:_t,payload:o}),t.next=15;break;case 11:t.prev=11,t.t0=t.catch(0),console.log(t.t0),a({type:kt,payload:t.t0.response&&t.t0.response.data.message?t.t0.response.data.message:t.t0.message});case 15:case"end":return t.stop()}}),t,null,[[0,11]])})));return function(e,a){return t.apply(this,arguments)}}()))):y.isPaid||(window.paypal?f(!0):t())}),[d,y,o,N,_,s,k]);return S?Object(V.jsx)(H,{}):E?Object(V.jsx)(se,{variant:"danger",children:E}):Object(V.jsxs)(V.Fragment,{children:[Object(V.jsxs)("h1",{children:["Order ",y._id]}),Object(V.jsxs)(u.a,{children:[Object(V.jsx)(b.a,{md:8,children:Object(V.jsxs)(He.a,{variant:"flush",children:[Object(V.jsxs)(He.a.Item,{children:[Object(V.jsx)("h2",{children:"Shipping"}),Object(V.jsxs)("p",{children:[Object(V.jsx)("strong",{children:"Name: \xa0 "})," ",y.user.name]}),Object(V.jsxs)("p",{children:[Object(V.jsx)("strong",{children:"Email: \xa0"})," ",y.user.email]}),Object(V.jsxs)("p",{children:[Object(V.jsx)("strong",{children:"Address: \xa0"}),y.shippingAddress.address,", ",y.shippingAddress.city," ",y.shippingAddress.thana,", ",y.shippingAddress.houseNumber]}),y.isDelivered?Object(V.jsx)(se,{variant:"success",children:"Delivery Done"}):Object(V.jsx)(se,{variant:"danger",children:"Not Delivered"})]}),Object(V.jsxs)(He.a.Item,{children:[Object(V.jsx)("h2",{children:"Payment Method"}),Object(V.jsxs)("p",{children:[Object(V.jsx)("strong",{children:"Method: "}),y.paymentMethod]}),y.isPaid?Object(V.jsx)(se,{variant:"success",children:"Payment Done"}):Object(V.jsx)(se,{variant:"danger",children:"Not Paid"})]}),Object(V.jsxs)(He.a.Item,{children:[Object(V.jsx)("h2",{children:"Order Items"}),0===(null===y||void 0===y||null===(t=y.orderedItems)||void 0===t?void 0:t.length)?Object(V.jsx)(se,{children:"Order is empty"}):Object(V.jsx)(He.a,{variant:"flush",children:null===y||void 0===y||null===(a=y.orderedItems)||void 0===a?void 0:a.map((function(e,t){return Object(V.jsx)(He.a.Item,{children:Object(V.jsxs)(u.a,{children:[Object(V.jsx)(b.a,{md:1,children:Object(V.jsx)(Ke.a,{src:e.image,alt:e.name,fluid:!0,rounded:!0})}),Object(V.jsx)(b.a,{children:Object(V.jsx)(l.Link,{to:"/product/".concat(e.product),children:e.name})}),Object(V.jsxs)(b.a,{md:4,children:[e.qty," x \u09f3",e.price," = \u09f3",e.qty*e.price]})]})},t)}))})]})]})}),Object(V.jsx)(b.a,{md:4,children:Object(V.jsx)(K.a,{children:Object(V.jsxs)(He.a,{variant:"flush",children:[Object(V.jsx)(He.a.Item,{children:Object(V.jsx)("h3",{children:"Order Summary"})}),Object(V.jsx)(He.a.Item,{children:Object(V.jsxs)(u.a,{children:[Object(V.jsx)(b.a,{children:"Items"}),Object(V.jsxs)(b.a,{children:["\u09f3",y.itemsPrice]})]})}),Object(V.jsx)(He.a.Item,{children:Object(V.jsxs)(u.a,{children:[Object(V.jsx)(b.a,{children:"Delivery Charge"}),Object(V.jsxs)(b.a,{children:["\u09f3",y.shippingPrice]})]})}),Object(V.jsx)(He.a.Item,{children:Object(V.jsxs)(u.a,{children:[Object(V.jsx)(b.a,{children:"Total"}),Object(V.jsxs)(b.a,{children:["\u09f3",y.totalPrice]})]})}),k&&!k.isAdmin&&!y.isPaid&&Object(V.jsxs)(He.a.Item,{children:[I&&Object(V.jsx)(H,{}),g?Object(V.jsx)(ea.PayPalButton,{amount:y.totalPrice,onSuccess:function(e){d(function(e,t){return function(){var a=Object(O.a)(p.a.mark((function a(r,n){var c,s,i,o,l;return p.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return a.prev=0,r({type:Pt}),c=n(),s=c.userLogin.userInfo,i={headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(s.token)}},a.next=6,x.a.put("".concat(Kt,"/api/orders/").concat(e,"/pay"),t,i);case 6:o=a.sent,l=o.data,console.log(l),r({type:Ut,payload:l}),a.next=16;break;case 12:a.prev=12,a.t0=a.catch(0),console.log(a.t0),r({type:Ft,payload:a.t0.response&&a.t0.response.data.message?a.t0.response.data.message:a.t0.message});case 16:case"end":return a.stop()}}),a,null,[[0,12]])})));return function(e,t){return a.apply(this,arguments)}}()}(o,e))}}):Object(V.jsx)(H,{})]}),k&&k.isAdmin&&y.isPaid&&!y.isDelivered&&Object(V.jsx)(He.a.Item,{children:Object(V.jsx)(j.a,{className:"bg-col-primary",style:{width:"100%"},onClick:function(){d(function(e){return function(){var t=Object(O.a)(p.a.mark((function t(a,r){var n,c,s,i,o;return p.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,a({type:Bt}),n=r(),c=n.userLogin.userInfo,s={headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(c.token)}},t.next=6,x.a.put("".concat(Kt,"/api/orders/").concat(e._id,"/deliver"),{},s);case 6:i=t.sent,o=i.data,console.log(o),a({type:Mt,payload:o}),t.next=16;break;case 12:t.prev=12,t.t0=t.catch(0),console.log(t.t0),a({type:zt,payload:t.t0.response&&t.t0.response.data.message?t.t0.response.data.message:t.t0.message});case 16:case"end":return t.stop()}}),t,null,[[0,12]])})));return function(e,a){return t.apply(this,arguments)}}()}(y))},children:" Mark as Delivered"})})]})})})]})]})};var aa=function(e){var t=e.match,a=e.history,n=Object(r.useState)(""),c=Object(oe.a)(n,2),s=c[0],i=c[1],o=Object(r.useState)(""),l=Object(oe.a)(o,2),d=l[0],u=l[1],b=Object(r.useState)(""),h=Object(oe.a)(b,2),m=h[0],g=h[1],f=function(e){return i(""),u(""),setTimeout((function(){g("")}),3e3),g(e)},v=function(){var e=Object(O.a)(p.a.mark((function e(r){var n;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r.preventDefault(),!(s.length<6)){e.next=3;break}return e.abrupt("return",f("Password must be at least 6 characters"));case 3:if(s===d){e.next=5;break}return e.abrupt("return",f("Password doesn't match"));case 5:return n={headers:{"Content-Type":"application/json"}},e.prev=6,e.next=9,x.a.put("/api/users/reset-password/".concat(t.params.resetToken),{password:s},n);case 9:be("You're password has been updated"),a.push("/login"),e.next=19;break;case 13:e.prev=13,e.t0=e.catch(6),g(e.t0.response&&e.t0.response.data.message?e.t0.response.data.message:e.t0.message),i(""),u(""),setTimeout((function(){g("")}),3e3);case 19:case"end":return e.stop()}}),e,null,[[6,13]])})));return function(t){return e.apply(this,arguments)}}();return Object(V.jsxs)(ct,{children:[Object(V.jsx)("h2",{className:"py-3 text-center",children:"Reset Your Password"}),m&&Object(V.jsx)(se,{variant:"danger",children:m}),Object(V.jsxs)(nt.a,{onSubmit:v,children:[Object(V.jsxs)(nt.a.Group,{controlId:"password",className:"mb-3",children:[Object(V.jsx)(nt.a.Label,{children:"Password"}),Object(V.jsx)(nt.a.Control,{type:"password",placeholder:"Enter password",value:s,onChange:function(e){return i(e.target.value)}})]}),Object(V.jsxs)(nt.a.Group,{controlId:"confirmPassword",className:"mb-4",children:[Object(V.jsx)(nt.a.Label,{children:"Retype Password"}),Object(V.jsx)(nt.a.Control,{type:"password",placeholder:"Confirm Password",value:d,onChange:function(e){return u(e.target.value)}})]}),Object(V.jsx)(j.a,{type:"submit",variant:"primary",className:"auth-btn bg-col-primary",children:"Submit"})]})]})},ra=function(e){var t=e.step1,a=e.step2,r=e.step3,n=e.step4;return Object(V.jsxs)(ye.a,{className:"justify-content-center mb-4",children:[Object(V.jsx)(ye.a.Item,{children:t?Object(V.jsx)(Ee.LinkContainer,{to:"/login",children:Object(V.jsx)(ye.a.Link,{children:"Sign In"})}):Object(V.jsx)(ye.a.Link,{disabled:!0,children:"Sign In"})}),Object(V.jsx)(ye.a.Item,{children:a?Object(V.jsx)(Ee.LinkContainer,{to:"/shipping",children:Object(V.jsx)(ye.a.Link,{children:"Shipping"})}):Object(V.jsx)(ye.a.Link,{disabled:!0,children:"Shipping"})}),Object(V.jsx)(ye.a.Item,{children:r?Object(V.jsx)(Ee.LinkContainer,{to:"/payment",children:Object(V.jsx)(ye.a.Link,{children:"Payment"})}):Object(V.jsx)(ye.a.Link,{disabled:!0,children:"Payment"})}),Object(V.jsx)(ye.a.Item,{children:n?Object(V.jsx)(Ee.LinkContainer,{to:"/placeorder",children:Object(V.jsx)(ye.a.Link,{children:"Place Order"})}):Object(V.jsx)(ye.a.Link,{disabled:!0,children:"Place Order"})})]})},na=function(e){var t=e.history;Object(i.c)((function(e){return e.cart})).shippingAddress.address||t.push("/shipping");var a=Object(r.useState)("PayPal"),n=Object(oe.a)(a,2),c=n[0],s=n[1],o=Object(i.b)();return Object(V.jsxs)(ct,{children:[Object(V.jsx)(ra,{step1:!0,step2:!0,step3:!0}),Object(V.jsx)("h1",{children:"Payment Method"}),Object(V.jsxs)(nt.a,{onSubmit:function(e){var a;e.preventDefault(),o((a=c,function(e){e({type:tt,payload:a}),localStorage.setItem("paymentMethod",JSON.stringify(a))})),t.push("/placeorder")},children:[Object(V.jsxs)(nt.a.Group,{children:[Object(V.jsx)(nt.a.Label,{as:"legend",children:"Select Method "}),Object(V.jsxs)(b.a,{children:[Object(V.jsx)(nt.a.Check,{type:"radio",label:"PayPal or Credit Card",id:"PayPal",name:"paymentMethod",value:"PayPal",checked:"PayPal"===c,onChange:function(e){return s(e.target.value)}}),Object(V.jsx)(nt.a.Check,{type:"radio",label:"Stripe",id:"Stripe",name:"paymentMethod",value:"Stripe",checked:"PayPal"===c,onChange:function(e){return s(e.target.value)}}),Object(V.jsx)(nt.a.Check,{type:"radio",label:"SSL E-Commerce",id:"SSL E-Commerce",name:"paymentMethod",value:"SSL E-Commerce",checked:"SSL E-Commerce"===c,onChange:function(e){return s(e.target.value)}})]})]}),Object(V.jsx)(j.a,{type:"submit",variant:"primary",children:"Continue"})]})]})},ca=function(e){var t=e.history,a=Object(i.b)(),n=Object(i.c)((function(e){return e.cart})),c=Object(i.c)((function(e){return e.orderCreate})),s=c.order,o=c.success,d=c.error;Object(r.useEffect)((function(){o&&t.push("/order/".concat(s._id))}),[t,o]);var h;return n.itemsPrice=(h=n.cartItems.reduce((function(e,t){return e+t.price*t.qty}),0),(Math.round(100*h)/100).toFixed(2)),n.shippingPrice=30,n.totalPrice=Number(n.itemsPrice)+Number(n.shippingPrice),Object(V.jsxs)(V.Fragment,{children:[Object(V.jsx)(ra,{step1:!0,step2:!0,step3:!0,step4:!0}),Object(V.jsxs)(u.a,{children:[Object(V.jsx)(b.a,{md:8,children:Object(V.jsxs)(He.a,{variant:"flush",children:[Object(V.jsxs)(He.a.Item,{children:[Object(V.jsx)("h2",{children:"Delivery Location"}),Object(V.jsxs)("p",{children:[Object(V.jsx)("strong",{children:"Address:"}),n.shippingAddress.address,", ",n.shippingAddress.city," ",n.shippingAddress.thana,", ",n.shippingAddress.houseNumber]})]}),Object(V.jsxs)(He.a.Item,{children:[Object(V.jsx)("h2",{children:"Payment Method"}),Object(V.jsx)("strong",{children:"Method: "}),n.paymentMethod]}),Object(V.jsxs)(He.a.Item,{children:[Object(V.jsx)("h2",{children:"Order Items"}),0===n.cartItems.length?Object(V.jsx)(se,{children:"Your cart is empty"}):Object(V.jsx)(He.a,{variant:"flush",children:n.cartItems.map((function(e,t){return Object(V.jsx)(He.a.Item,{children:Object(V.jsxs)(u.a,{children:[Object(V.jsx)(b.a,{md:1,children:Object(V.jsx)(Ke.a,{src:e.image,alt:e.name,fluid:!0,rounded:!0})}),Object(V.jsx)(b.a,{children:Object(V.jsx)(l.Link,{to:"/product/".concat(e.product),children:e.name})}),Object(V.jsxs)(b.a,{md:4,children:[e.qty," x \u09f3",e.price," = \u09f3",e.qty*e.price]})]})},t)}))})]})]})}),Object(V.jsx)(b.a,{md:4,children:Object(V.jsx)(K.a,{children:Object(V.jsxs)(He.a,{variant:"flush",children:[Object(V.jsx)(He.a.Item,{children:Object(V.jsx)("h2",{children:"Order Summary"})}),Object(V.jsx)(He.a.Item,{children:Object(V.jsxs)(u.a,{children:[Object(V.jsx)(b.a,{children:"Items"}),Object(V.jsxs)(b.a,{children:["\u09f3",n.itemsPrice]})]})}),Object(V.jsx)(He.a.Item,{children:Object(V.jsxs)(u.a,{children:[Object(V.jsx)(b.a,{children:"Delivery Charge"}),Object(V.jsxs)(b.a,{children:["\u09f3",n.shippingPrice]})]})}),Object(V.jsx)(He.a.Item,{children:Object(V.jsxs)(u.a,{children:[Object(V.jsx)(b.a,{children:"Total"}),Object(V.jsxs)(b.a,{children:["\u09f3",n.totalPrice]})]})}),Object(V.jsx)(He.a.Item,{children:d&&Object(V.jsx)(se,{variant:"danger",children:d})}),Object(V.jsx)(He.a.Item,{children:Object(V.jsx)(j.a,{type:"button",className:"btn-block",disabled:0===n.cartItems,onClick:function(){a(function(e){return function(){var t=Object(O.a)(p.a.mark((function t(a,r){var n,c,s,i,o;return p.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,a({type:Et}),n=r(),c=n.userLogin.userInfo,s={headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(c.token)}},t.next=6,x.a.post("".concat(Kt,"/api/orders"),e,s);case 6:i=t.sent,o=i.data,a({type:Ct,payload:o}),t.next=15;break;case 11:t.prev=11,t.t0=t.catch(0),console.log(t.t0),a({type:It,payload:t.t0.response&&t.t0.response.data.message?t.t0.response.data.message:t.t0.message});case 15:case"end":return t.stop()}}),t,null,[[0,11]])})));return function(e,a){return t.apply(this,arguments)}}()}({orderItems:n.cartItems,shippingAddress:n.shippingAddress,paymentMethod:n.paymentMethod,itemsPrice:n.itemsPrice,shippingPrice:n.shippingPrice,totalPrice:n.totalPrice})),be("You're order has been placed")},children:"Place Order"})})]})})})]})]})},sa=function(e){var t=e.match,a=e.history,n=t.params.id,c=Object(r.useState)(""),s=Object(oe.a)(c,2),o=s[0],d=s[1],u=Object(r.useState)(""),b=Object(oe.a)(u,2),h=b[0],m=b[1],g=Object(r.useState)(""),f=Object(oe.a)(g,2),v=f[0],y=f[1],S=Object(r.useState)(0),E=Object(oe.a)(S,2),C=E[0],I=E[1],N=Object(r.useState)(0),_=Object(oe.a)(N,2),k=_[0],w=_[1],L=Object(r.useState)(""),D=Object(oe.a)(L,2),A=D[0],T=D[1],R=Object(r.useState)(!1),P=Object(oe.a)(R,2),U=P[0],F=P[1],G=Object(i.b)(),B=Object(i.c)((function(e){return e.productDetails})),M=B.loading,W=B.error,Y=B.product,K=Object(i.c)((function(e){return e.productUpdate})),Z=K.loading,X=K.error,$=K.success;Object(r.useEffect)((function(){$?(G({type:J}),be("Product Updated"),a.push("/admin/productlist")):Y.name&&Y._id===n?(d(Y.name),m(Y.description),y(Y.category),T(Y.image),I(Y.price),w(Y.countInStock)):G(lt(n))}),[G,Y,n,$,a]);var ee=function(){var e=Object(O.a)(p.a.mark((function e(t){var a,r,n,c,s;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.target.files[0],(r=new FormData).append("image",a),F(!0),e.prev=4,n={headers:{"Content-Type":"multipart/form-data"}},e.next=8,x.a.post("/api/uploads",r,n);case 8:c=e.sent,s=c.data,console.log(s),T(s),F(!1),e.next=19;break;case 15:e.prev=15,e.t0=e.catch(4),console.log(e.t0),F(!1);case 19:case"end":return e.stop()}}),e,null,[[4,15]])})));return function(t){return e.apply(this,arguments)}}();return Object(V.jsxs)(V.Fragment,{children:[Object(V.jsx)(l.Link,{to:"/admin/productlist",className:"btn btn-light my-3",children:"Go Back"}),Object(V.jsxs)(ct,{children:[Object(V.jsx)("h1",{children:"Edit Product"}),Z&&Object(V.jsx)(H,{}),X&&Object(V.jsx)(se,{variant:"danger",children:X}),M?Object(V.jsx)(H,{}):W?Object(V.jsx)(se,{variant:"danger",children:W}):Object(V.jsxs)(nt.a,{onSubmit:function(e){e.preventDefault(),G(function(e){return function(){var t=Object(O.a)(p.a.mark((function t(a,r){var n,c,s,i,o;return p.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,a({type:z}),n=r(),c=n.userLogin.userInfo,s={headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(c.token)}},t.next=6,x.a.put("/api/products/".concat(e._id),e,s);case 6:i=t.sent,o=i.data,a({type:Q,payload:o}),t.next=15;break;case 11:t.prev=11,t.t0=t.catch(0),console.log(t.t0),a({type:q,payload:t.t0.response&&t.t0.response.data.message?t.t0.response.data.message:t.t0.message});case 15:case"end":return t.stop()}}),t,null,[[0,11]])})));return function(e,a){return t.apply(this,arguments)}}()}({_id:Y._id,name:o,description:h,image:A,category:v,price:C,countInStock:k}))},children:[Object(V.jsxs)(nt.a.Group,{controlId:"name",children:[Object(V.jsx)(nt.a.Label,{children:"Name"}),Object(V.jsx)(nt.a.Control,{type:"name",placeholder:"Enter name",value:o,onChange:function(e){return d(e.target.value)}})]}),Object(V.jsxs)(nt.a.Group,{controlId:"description",children:[Object(V.jsx)(nt.a.Label,{children:"Description"}),Object(V.jsx)(nt.a.Control,{type:"text",placeholder:"Write Description",value:h,onChange:function(e){return m(e.target.value)}})]}),Object(V.jsxs)(nt.a.Group,{controlId:"category",children:[Object(V.jsx)(nt.a.Label,{children:"Category"}),Object(V.jsx)(nt.a.Control,{placeholder:"Enter Category",type:"text",value:v,onChange:function(e){return y(e.target.value)}})]}),Object(V.jsxs)(nt.a.Group,{controlId:"image",children:[Object(V.jsx)(nt.a.Label,{children:"Enter Image URL"}),Object(V.jsx)(nt.a.Control,{type:"text",placeholder:"Enter image url",value:A,onChange:function(e){return T(e.target.value)}}),Object(V.jsx)(nt.a.File,{id:"image-file",custom:!0,onChange:ee}),U&&Object(V.jsx)(H,{})]}),Object(V.jsxs)(nt.a.Group,{controlId:"price",children:[Object(V.jsx)(nt.a.Label,{children:"Price"}),Object(V.jsx)(nt.a.Control,{type:"number",placeholder:"Enter Price",value:C,onChange:function(e){return I(e.target.value)}})]}),Object(V.jsxs)(nt.a.Group,{controlId:"countInStock",children:[Object(V.jsx)(nt.a.Label,{children:"Count In Stock"}),Object(V.jsx)(nt.a.Control,{type:"number",placeholder:"Enter Stock",value:k,onChange:function(e){return w(e.target.value)}})]}),Object(V.jsx)(j.a,{type:"submit",className:"bg-col-primary auth-btn",children:"Update"})]})]})]})};var ia=function(e){var t=e.history,a=Object(i.b)(),n=Object(i.c)((function(e){return e.userLogin})).userInfo.user,c=Object(i.c)((function(e){return e.productList})),s=c.loading,o=c.error,l=c.products,d=Object(i.c)((function(e){return e.productCreate})),h=d.loading,m=d.error,g=d.success,f=d.product,v=Object(i.c)((function(e){return e.productDelete})),y=v.loading,S=v.error,E=v.success;Object(r.useEffect)((function(){a({type:M}),n.isAdmin||t.push("/login"),g?t.push("/admin/product/".concat(f._id,"/edit")):a(ot())}),[a,t,n,E,g,f]);var C=function(e){window.confirm("Are you sure you want to delete this product ?")&&(a(function(e){return function(){var t=Object(O.a)(p.a.mark((function t(a,r){var n,c,s;return p.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,a({type:R}),n=r(),c=n.userLogin.userInfo,s={headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(c.token)}},t.next=6,x.a.delete("".concat(it,"/api/products/").concat(e),s);case 6:a({type:P}),t.next=13;break;case 9:t.prev=9,t.t0=t.catch(0),console.log(t.t0),a({type:U,payload:t.t0.response&&t.t0.response.data.message?t.t0.response.data.message:t.t0.message});case 13:case"end":return t.stop()}}),t,null,[[0,9]])})));return function(e,a){return t.apply(this,arguments)}}()}(e)),S||pe("Product deleted"))},I=function(){a(function(){var e=Object(O.a)(p.a.mark((function e(t,a){var r,n,c,s,i;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,t({type:F}),r=a(),n=r.userLogin.userInfo,c={headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(n.token)}},e.next=6,x.a.post("/api/products",{},c);case 6:s=e.sent,i=s.data,t({type:G,payload:i}),e.next=15;break;case 11:e.prev=11,e.t0=e.catch(0),console.log(e.t0),t({type:B,payload:e.t0.response&&e.t0.response.data.message?e.t0.response.data.message:e.t0.message});case 15:case"end":return e.stop()}}),e,null,[[0,11]])})));return function(t,a){return e.apply(this,arguments)}}())};return Object(V.jsx)(V.Fragment,{children:Object(V.jsxs)(u.a,{children:[Object(V.jsx)(b.a,{md:2,children:Object(V.jsx)(Zt,{})}),Object(V.jsxs)(b.a,{md:10,children:[Object(V.jsxs)(u.a,{className:"align-items-center",children:[Object(V.jsx)(b.a,{children:Object(V.jsx)("h1",{children:"Products"})}),Object(V.jsx)(b.a,{className:"text-right",children:Object(V.jsxs)(j.a,{className:"my-3 block bg-col-primary",style:{float:"right"},onClick:I,children:[Object(V.jsx)("i",{className:"fas fa-plus",onClick:I})," Create Product"]})})]}),h&&Object(V.jsx)(H,{}),m&&Object(V.jsx)(se,{variant:"danger",children:m}),y&&Object(V.jsx)(H,{}),S&&Object(V.jsx)(se,{variant:"danger",children:S}),s?Object(V.jsx)(H,{}):o?Object(V.jsx)(se,{variant:"danger",children:o}):Object(V.jsx)(V.Fragment,{children:Object(V.jsxs)(St.a,{striped:!0,bordered:!0,hover:!0,children:[Object(V.jsx)("thead",{children:Object(V.jsxs)("tr",{children:[Object(V.jsx)("th",{children:"Product ID"}),Object(V.jsx)("th",{children:"Name"}),Object(V.jsx)("th",{children:"Price"}),Object(V.jsx)("th",{children:"Category"}),Object(V.jsx)("th",{children:"In Stock"})]})}),Object(V.jsx)("tbody",{children:l.map((function(e){return Object(V.jsxs)("tr",{children:[Object(V.jsx)("td",{children:e._id}),Object(V.jsx)("td",{children:e.name}),Object(V.jsxs)("td",{children:[Object(V.jsx)("span",{style:{fontSize:"1.5rem",marginRight:"0.1rem"},children:"\u09f3"}),"\xa0",e.price]}),Object(V.jsx)("td",{children:e.category}),Object(V.jsx)("td",{children:e.countInStock}),Object(V.jsx)("td",{children:Object(V.jsx)(Ee.LinkContainer,{to:"/admin/product/".concat(e._id,"/edit"),children:Object(V.jsx)(j.a,{className:"bg-col-primary",children:Object(V.jsx)("i",{className:"fas fa-edit"})})})}),Object(V.jsx)("td",{children:Object(V.jsx)(j.a,{variant:"light",onClick:function(){return C(e._id)},children:Object(V.jsx)("i",{className:"fas fa-trash"})})})]},e._id)}))})]})})]})]})})};var oa=function(e){var t=e.match,a=e.history,n=Object(r.useState)(1),c=Object(oe.a)(n,2),s=c[0],o=c[1],d=Object(r.useState)(0),h=Object(oe.a)(d,2),m=h[0],g=h[1],f=Object(r.useState)(""),v=Object(oe.a)(f,2),y=v[0],S=v[1],E=Object(i.b)(),C=Object(i.c)((function(e){return e.productDetails})),I=C.loading,N=C.error,_=C.product,k=Object(i.c)((function(e){return e.productCreateReview})),w=k.error,R=k.success,P=Object(i.c)((function(e){return e.userLogin})).userInfo;return Object(r.useEffect)((function(){R?(be("Thank you for submitting a review"),g(0),S(""),E({type:T})):w&&setTimeout((function(){E({type:T})}),4e3),E(lt(t.params.id))}),[E,t,R,w]),Object(V.jsxs)("div",{children:[Object(V.jsx)(l.Link,{className:"btn btn-light my-3",to:"/market",children:"Go Back"}),I?Object(V.jsx)(H,{}):N?Object(V.jsx)(se,{variant:"alert",children:N}):Object(V.jsxs)(V.Fragment,{children:[Object(V.jsxs)(u.a,{children:[Object(V.jsx)(b.a,{md:5,children:Object(V.jsx)(Ke.a,{src:_.image,alt:_.name,fluid:!0})}),Object(V.jsx)(b.a,{md:4,children:Object(V.jsxs)(He.a,{variant:"flush",children:[Object(V.jsx)(He.a.Item,{className:"product_heading",children:Object(V.jsx)("h2",{children:_.name})}),Object(V.jsx)(He.a.Item,{className:"product_desc",children:_.description}),Object(V.jsx)(He.a.Item,{children:Object(V.jsx)(Ot,{value:_.rating,text:_.numReviews})}),Object(V.jsxs)(He.a.Item,{className:"product_price",children:[Object(V.jsx)("span",{style:{fontSize:"2rem"},children:"\u09f3"}),"\xa0",_.price]})]})}),Object(V.jsx)(b.a,{md:3,children:Object(V.jsx)(K.a,{children:Object(V.jsxs)(He.a,{variant:"flush",children:[Object(V.jsx)(He.a.Item,{children:Object(V.jsxs)(u.a,{children:[Object(V.jsx)(b.a,{children:"Price : "}),Object(V.jsxs)(b.a,{children:[Object(V.jsx)("strong",{children:_.price})," \xa0 Taka"]})]})}),Object(V.jsx)(He.a.Item,{children:Object(V.jsxs)(u.a,{children:[Object(V.jsx)(b.a,{children:"Status : "}),Object(V.jsx)(b.a,{children:_.countInStock>0?"In Stock ":"Out of Stock"})]})}),_.countInStock>0&&Object(V.jsx)(He.a.Item,{children:Object(V.jsxs)(u.a,{children:[Object(V.jsx)(b.a,{children:"Qty"}),Object(V.jsx)(b.a,{children:Object(V.jsx)(Ze.a,{as:"select",value:s,onChange:function(e){return o(e.target.value)},children:Object(Ve.a)(Array(_.countInStock).keys()).map((function(e){return Object(V.jsx)("option",{value:e+1,children:e+1},e+1)}))})})]})}),Object(V.jsx)(He.a.Item,{children:Object(V.jsx)(j.a,{style:{width:"100%"},className:"btn bg-col-primary",disabled:0===_.countInStock,onClick:function(){a.push("/cart/".concat(t.params.id,"?qty=").concat(s))},children:"Add to cart"})})]})})})]}),Object(V.jsx)(u.a,{children:Object(V.jsxs)(b.a,{md:5,children:[0===_.reviews.length&&Object(V.jsx)(se,{children:"No Reviews"}),Object(V.jsx)(He.a,{children:_.reviews.map((function(e){return Object(V.jsxs)(He.a.Item,{children:[Object(V.jsx)("strong",{children:e.name}),Object(V.jsx)(Ot,{value:e.rating,text:"hidden"}),Object(V.jsx)("p",{children:e.createdAt.substring(0,10)}),Object(V.jsx)("p",{children:e.comment})]},e._id)}))}),Object(V.jsx)("h2",{children:"Write a review"}),P?Object(V.jsxs)(V.Fragment,{children:[w&&Object(V.jsx)(se,{variant:"danger",children:w}),Object(V.jsxs)(nt.a,{onSubmit:function(e){var a,r;e.preventDefault(),E((a=t.params.id,r={rating:m,comment:y},function(){var e=Object(O.a)(p.a.mark((function e(t,n){var c,s,i;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,t({type:L}),c=n(),s=c.userLogin.userInfo,i={headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(s.token)}},e.next=6,x.a.post("".concat(it,"/api/products/").concat(a,"/reviews"),r,i);case 6:t({type:D}),e.next=13;break;case 9:e.prev=9,e.t0=e.catch(0),console.log(e.t0),t({type:A,payload:e.t0.response&&e.t0.response.data.message?e.t0.response.data.message:e.t0.message});case 13:case"end":return e.stop()}}),e,null,[[0,9]])})));return function(t,a){return e.apply(this,arguments)}}()))},children:[Object(V.jsxs)(nt.a.Group,{controlId:"rating",className:"mb-3 mt-3",children:[Object(V.jsx)(nt.a.Label,{children:"Give a rating"}),Object(V.jsxs)(nt.a.Control,{as:"select",value:m,onChange:function(e){return g(e.target.value)},children:[Object(V.jsx)("option",{value:"",children:"Select..."}),Object(V.jsx)("option",{value:"1",children:"1 - Poor"}),Object(V.jsx)("option",{value:"2",children:"2 - Fair"}),Object(V.jsx)("option",{value:"3",children:"3 - Good"}),Object(V.jsx)("option",{value:"4",children:"4 - Very Good"}),Object(V.jsx)("option",{value:"5",children:"5 - Excellent"})]})]}),Object(V.jsxs)(nt.a.Group,{controlId:"comment",className:"mb-4",children:[Object(V.jsx)(nt.a.Label,{children:"Write a comment"}),Object(V.jsx)(nt.a.Control,{as:"textarea",value:y,onChange:function(e){return S(e.target.value)}})]}),Object(V.jsx)(j.a,{type:"submit",variant:"primary",className:"auth-btn mb-2 bg-col-primary",children:"Submit"})]})]}):Object(V.jsxs)(se,{children:["Please ",Object(V.jsx)(l.Link,{to:"/login",children:"sign in"})," to write a review"]})]})})]})]})};var la=function(e){var t=e.history,a=Object(r.useState)(""),n=Object(oe.a)(a,2),c=n[0],s=n[1],o=Object(r.useState)(""),l=Object(oe.a)(o,2),h=l[0],m=l[1],g=Object(r.useState)(""),f=Object(oe.a)(g,2),v=f[0],y=f[1],S=Object(r.useState)(""),E=Object(oe.a)(S,2),C=E[0],I=E[1],N=Object(i.b)(),_=Object(d.l)(),k=Object(i.c)((function(e){return e.userLogin})).userInfo,w=Object(i.c)((function(e){return e.userDetails})),L=w.loading,D=w.error,A=w.user,T=Object(i.c)((function(e){return e.myOrderList})),R=T.loading,P=T.error,U=T.orders;return Object(r.useEffect)((function(){var e;k?k.token.length>500?(s(k.user.email),m(k.user.name)):A.name?(s(A.email),m(A.name)):(N((e="profile",function(){var t=Object(O.a)(p.a.mark((function t(a,r){var n,c,s,i,o;return p.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,a({type:De}),n=r(),c=n.userLogin.userInfo,s={headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(c.token)}},t.next=6,x.a.get("".concat(Je,"/api/users/").concat(e),s);case 6:i=t.sent,o=i.data,a({type:Ae,payload:o}),t.next=15;break;case 11:t.prev=11,t.t0=t.catch(0),console.log(t.t0),a({type:Te,payload:t.t0.response&&t.t0.response.data.message?t.t0.response.data.message:t.t0.message});case 15:case"end":return t.stop()}}),t,null,[[0,11]])})));return function(e,a){return t.apply(this,arguments)}}())),N(function(){var e=Object(O.a)(p.a.mark((function e(t,a){var r,n,c,s,i;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,t({type:wt}),r=a(),n=r.userLogin.userInfo,c={headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(n.token)}},e.next=6,x.a.get("".concat(Kt,"/api/orders/my-orders"),c);case 6:s=e.sent,i=s.data,t({type:Lt,payload:i}),e.next=15;break;case 11:e.prev=11,e.t0=e.catch(0),console.log(e.t0),t({type:Dt,payload:e.t0.response&&e.t0.response.data.message?e.t0.response.data.message:e.t0.message});case 15:case"end":return e.stop()}}),e,null,[[0,11]])})));return function(t,a){return e.apply(this,arguments)}}())):t.push("/login")}),[t,k,N,A,_,h]),Object(V.jsxs)(u.a,{children:[Object(V.jsxs)(b.a,{md:4,children:[Object(V.jsx)("h2",{children:"User Profile"}),D&&Object(V.jsx)(se,{variant:"danger",children:D}),L&&Object(V.jsx)(H,{}),Object(V.jsxs)(nt.a,{onSubmit:function(e){e.preventDefault(),N(function(e){return function(){var t=Object(O.a)(p.a.mark((function t(a,r){var n,c,s,i,o;return p.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,a({type:Re}),n=r(),c=n.userLogin.userInfo,s={headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(c.token)}},t.next=6,x.a.put("".concat(Je,"/api/users/profile"),e,s);case 6:i=t.sent,o=i.data,console.log(o),a({type:Pe,payload:o}),t.next=16;break;case 12:t.prev=12,t.t0=t.catch(0),console.log(t.t0),a({type:Ue,payload:t.t0.response&&t.t0.response.data.message?t.t0.response.data.message:t.t0.message});case 16:case"end":return t.stop()}}),t,null,[[0,12]])})));return function(e,a){return t.apply(this,arguments)}}()}({id:A._id,email:c,name:h,password:v})),be("Your profile has been updated")},children:[Object(V.jsxs)(nt.a.Group,{controlId:"name",children:[Object(V.jsx)(nt.a.Label,{children:"Name"}),Object(V.jsx)(nt.a.Control,{type:"name",placeholder:"Enter name",value:h,onChange:function(e){return m(e.target.value)}})]}),Object(V.jsxs)(nt.a.Group,{controlId:"email",children:[Object(V.jsx)(nt.a.Label,{children:"Email Address"}),Object(V.jsx)(nt.a.Control,{type:"email",placeholder:"Enter email",value:c,onChange:function(e){return s(e.target.value)}})]}),Object(V.jsxs)(nt.a.Group,{controlId:"password",children:[Object(V.jsx)(nt.a.Label,{children:"Password"}),Object(V.jsx)(nt.a.Control,{type:"password",placeholder:"Enter password",value:v,onChange:function(e){return y(e.target.value)}})]}),Object(V.jsxs)(nt.a.Group,{controlId:"confirmPassword",children:[Object(V.jsx)(nt.a.Label,{children:"Retype Password"}),Object(V.jsx)(nt.a.Control,{type:"password",placeholder:"Confirm Password",value:C,onChange:function(e){return I(e.target.value)}})]}),Object(V.jsx)(j.a,{type:"submit",className:"bg-col-primary",style:{marginTop:"2rem"},children:"Update"})]})]}),Object(V.jsx)(b.a,{md:8,children:Object(V.jsxs)(V.Fragment,{children:[Object(V.jsx)("h1",{children:"MY Orders"}),R?Object(V.jsx)(H,{}):P?Object(V.jsx)(se,{variant:"danger",children:P}):Object(V.jsxs)(St.a,{striped:!0,bordered:!0,hover:!0,children:[Object(V.jsx)("thead",{children:Object(V.jsxs)("tr",{children:[Object(V.jsx)("th",{children:"ID"}),Object(V.jsx)("th",{children:"DATE"}),Object(V.jsx)("th",{children:"TOTAL"}),Object(V.jsx)("th",{children:"PAID"}),Object(V.jsx)("th",{children:"Delivered"}),Object(V.jsx)("th",{})]})}),Object(V.jsx)("tbody",{children:U.map((function(e){return Object(V.jsxs)("tr",{children:[Object(V.jsx)("td",{children:e._id}),Object(V.jsx)("td",{children:e.createdAt.substring(0,10)}),Object(V.jsxs)("td",{children:[Object(V.jsx)("span",{style:{fontSize:"1.5rem",marginRight:"0.1rem"},children:"\u09f3"}),"\xa0",e.totalPrice]}),Object(V.jsx)("td",{children:e.isPaid?e.paidAt.substring(0,10):Object(V.jsx)(j.a,{variant:"light",children:Object(V.jsx)("i",{className:"fas fa-times",style:{color:"red"}})})}),Object(V.jsx)("td",{children:e.isDelivered?e.deliverAt.substring(0,10):Object(V.jsx)(j.a,{variant:"light",children:Object(V.jsx)("i",{className:"fas fa-times",style:{color:"red"}})})}),Object(V.jsx)("td",{children:Object(V.jsx)(Ee.LinkContainer,{to:"/order/".concat(e._id),children:Object(V.jsx)(j.a,{className:"bg-col-primary btn-sm",children:"Details"})})})]},e._id)}))})]})]})})]})};ue.a.configure();var da=function(e){var t=e.location,a=e.history,n=Object(r.useState)(""),c=Object(oe.a)(n,2),s=c[0],o=c[1],d=Object(r.useState)(""),h=Object(oe.a)(d,2),m=h[0],g=h[1],f=Object(r.useState)(""),v=Object(oe.a)(f,2),y=v[0],S=v[1],E=Object(r.useState)(""),C=Object(oe.a)(E,2),I=C[0],N=C[1],_=t.search?t.search.split("=")[1]:"/login",k=Object(i.b)(),w=Object(i.c)((function(e){return e.userRegister})),L=w.loading,D=w.error,A=w.userInfo;return Object(r.useEffect)((function(){A&&(ue.a.success("Account created successfully. Please login to see profile",{autoClose:3e3}),a.push("/login"))}),[a,_,A]),Object(V.jsxs)(ct,{children:[Object(V.jsx)("h1",{className:"text-center",children:"Sign Up"}),D&&Object(V.jsx)(se,{variant:"danger",children:D}),L&&Object(V.jsx)(H,{}),Object(V.jsxs)(nt.a,{onSubmit:function(e){e.preventDefault(),k(function(e,t,a,r){return function(){var n=Object(O.a)(p.a.mark((function n(c){var s,i,o;return p.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,c({type:ke}),s={headers:{"Content-Type":"application/json"}},n.next=5,x.a.post("".concat(Je,"/api/users/register"),{name:e,email:t,password:a,confirmPassword:r},s);case 5:i=n.sent,o=i.data,c({type:we,payload:o}),n.next=14;break;case 10:n.prev=10,n.t0=n.catch(0),console.log(n.t0),c({type:Le,payload:n.t0.response&&n.t0.response.data.message?n.t0.response.data.message:n.t0.message});case 14:case"end":return n.stop()}}),n,null,[[0,10]])})));return function(e){return n.apply(this,arguments)}}()}(s,m,y,I))},children:[Object(V.jsxs)(nt.a.Group,{controlId:"name",className:"mb-3 mt-2",children:[Object(V.jsx)(nt.a.Label,{children:"Name"}),Object(V.jsx)(nt.a.Control,{type:"name",placeholder:"Enter name",value:s,onChange:function(e){return o(e.target.value)}})]}),Object(V.jsxs)(nt.a.Group,{controlId:"email",className:"mb-3",children:[Object(V.jsx)(nt.a.Label,{children:"Email Address"}),Object(V.jsx)(nt.a.Control,{type:"email",placeholder:"Enter email",value:m,onChange:function(e){return g(e.target.value)}})]}),Object(V.jsxs)(nt.a.Group,{controlId:"password",className:"mb-3",children:[Object(V.jsx)(nt.a.Label,{children:"Password"}),Object(V.jsx)(nt.a.Control,{type:"password",placeholder:"Enter password",value:y,onChange:function(e){return S(e.target.value)}})]}),Object(V.jsxs)(nt.a.Group,{controlId:"confirmPassword",className:"mb-4",children:[Object(V.jsx)(nt.a.Label,{children:"Retype Password"}),Object(V.jsx)(nt.a.Control,{type:"password",placeholder:"Confirm Password",value:I,onChange:function(e){return N(e.target.value)}})]}),Object(V.jsx)(j.a,{type:"submit",variant:"primary",className:"auth-btn mb-2 bg-col-primary",children:"Sign Up"})]}),Object(V.jsx)(u.a,{children:Object(V.jsx)(b.a,{className:"text-center",children:Object(V.jsx)("h6",{children:"Or"})})}),Object(V.jsx)(u.a,{children:Object(V.jsxs)(b.a,{children:[" ",Object(V.jsx)(vt,{})," "]})}),Object(V.jsx)(u.a,{className:"py-3",children:Object(V.jsxs)(b.a,{children:["Already Have an Account ? ",Object(V.jsx)(l.Link,{to:_?"/login?redirect=".concat(_):"/login",children:"Sign in"})]})})]})},ja=a(15),ua=a(45);var ba=function(e){var t=e.orderData,a=[];if(t){var r,n=Object(ja.a)(t);try{for(n.s();!(r=n.n()).done;){var c=r.value;a.push(c.numOfOrder)}}catch(i){n.e(i)}finally{n.f()}}var s={labels:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],datasets:[{label:"# of Sales by Months",data:a,backgroundColor:["rgba(0,158,96, 0.2)","rgba(0,158,96, 0.2)","rgba(0,158,96, 0.2)","rgba(0,158,96, 0.2)","rgba(0,158,96, 0.2)","rgba(0,158,96, 0.2)","rgba(0,158,96, 0.2)","rgba(0,158,96, 0.2)","rgba(0,158,96, 0.2)","rgba(0,158,96, 0.2)","rgba(0,158,96, 0.2)","rgba(0,158,96, 0.2)"],borderColor:["rgba(0,158,96, 0.8)","rgba(0,158,96, 0.8)","rgba(0,158,96, 0.8)","rgba(0,158,96, 0.8)","rgba(0,158,96, 0.8)","rgba(0,158,96, 0.8)","rgba(0,158,96, 0.8)","rgba(0,158,96, 0.8)","rgba(0,158,96, 0.8)","rgba(0,158,96, 0.8)","rgba(0,158,96, 0.8)","rgba(0,158,96, 0.8)","rgba(0,158,96, 0.8)"],borderWidth:1}]};return Object(V.jsx)("div",{children:Object(V.jsx)(ua.a,{data:s,options:{scales:{yAxes:[{ticks:{beginAtZero:!0}}]}}})})};var ha=function(e){var t=e.orderData,a=[];if(t){var r,n=Object(ja.a)(t);try{for(n.s();!(r=n.n()).done;){var c=r.value;a.push(c.numOfOrder)}}catch(i){n.e(i)}finally{n.f()}}var s={labels:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],datasets:[{label:"# of Sales By Month",data:a,fill:!1,pointRadius:5,backgroundColor:"rgb(0,158,96)",borderColor:"rgba(0,158,96, 0.2)"}]};return Object(V.jsx)("div",{children:Object(V.jsx)(ua.b,{data:s,options:{scales:{yAxes:[{ticks:{beginAtZero:!0}}]}}})})};var pa=function(e){var t=e.monthSaleData,a=[];if(t)for(var r=1;r<=t.length;r++)a.push(t[r]);for(var n=[],c=[],s=[],i=0;i2&&(t=t.toFixed()),"".concat(t," %")};return Object(V.jsxs)("div",{children:[Object(V.jsxs)(nt.a,{onSubmit:function(e){e.preventDefault(),S(),y(!0)},className:"pi-form",children:[Object(V.jsx)(ka.a,{type:"file",multiple:!1,onDone:function(e){var t=e.base64;return n(t)}}),Object(V.jsx)(j.a,{type:"submit",className:"bg-col-primary",children:"Upload"})]}),v?Object(V.jsx)(H,{}):Object(V.jsxs)(V.Fragment,{children:[i&&Object(V.jsx)("div",{className:"pi-mainImg",children:Object(V.jsx)("img",{src:i,alt:"pi-img"})}),h&&Object(V.jsx)("div",{children:h.map((function(e){return Object(V.jsxs)(u.a,{className:"pi-plants",children:[Object(V.jsx)(b.a,{className:"pi-plants-info",md:5,sm:12,children:Object(V.jsx)("div",{className:"pi-plants-img",children:e.similar_images.map((function(e){return Object(V.jsx)("img",{src:e.url,alt:"plant-img"},e.id)}))})}),Object(V.jsx)(b.a,{md:5,sm:6,className:"pi-col-2",children:Object(V.jsxs)("div",{className:"pi-card-info",children:[Object(V.jsx)("h3",{className:"pi-name",children:e.plant_name}),Object(V.jsxs)("div",{children:[Object(V.jsx)("span",{children:"Scientific Name:"}),e.plant_details.scientific_name]}),Object(V.jsxs)("div",{children:[Object(V.jsx)("span",{children:"Genus:"}),e.plant_details.structured_name.genus]}),Object(V.jsxs)("div",{children:[Object(V.jsx)("span",{children:"Species:"}),e.plant_details.structured_name.species]}),Object(V.jsxs)("div",{className:"pi-col-2-info",children:[Object(V.jsx)(La,{name:e.plant_name,authority:e.plant_details.name_authority,common_names:e.plant_details.common_names,synonyms:e.plant_details.synonyms,taxonomy:e.plant_details.taxonomy,desc:e.plant_details.wiki_description.value}),Object(V.jsxs)("a",{href:e.plant_details.url,children:[Object(V.jsx)("i",{className:"fas fa-globe"})," "]})]})]})}),Object(V.jsx)(b.a,{md:2,sm:6,children:Object(V.jsx)("div",{className:"pi-probability",children:Object(V.jsx)("p",{children:E(e.probability)})})})]},e.id)}))})]})]})};a(199);var Aa=function(e){var t=e.match,a=Object(r.useState)(""),n=Object(oe.a)(a,2),c=n[0],s=n[1],i="https://openfarm.cc/api/v1/crops";return Object(r.useEffect)((function(){function e(){return(e=Object(O.a)(p.a.mark((function e(){var a;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,x.a.get("".concat(i,"/").concat(t.params.id));case 2:a=e.sent,s(a.data.data);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}!function(){e.apply(this,arguments)}()}),[t]),Object(V.jsx)("div",{children:c&&Object(V.jsxs)(St.a,{striped:!0,bordered:!0,style:{marginTop:"-1.5rem"},children:[Object(V.jsx)("thead",{}),Object(V.jsxs)("tbody",{className:"ps-table-info",children:[Object(V.jsxs)("tr",{children:[Object(V.jsx)("td",{children:"Name"}),Object(V.jsx)("td",{children:c.attributes.name})]}),Object(V.jsxs)("tr",{children:[Object(V.jsx)("td",{children:"Binomial Name"}),Object(V.jsx)("td",{children:c.attributes.binomial_name})]}),Object(V.jsxs)("tr",{children:[Object(V.jsx)("td",{children:"Taxon"}),Object(V.jsx)("td",{children:c.attributes.taxon})]}),Object(V.jsxs)("tr",{children:[Object(V.jsx)("td",{children:"Description"}),Object(V.jsx)("td",{children:c.attributes.description})]}),Object(V.jsxs)("tr",{children:[Object(V.jsx)("td",{children:"Sun Requirements"}),Object(V.jsx)("td",{children:c.attributes.sun_requirements})]}),Object(V.jsxs)("tr",{children:[Object(V.jsx)("td",{children:"Sowing Method"}),Object(V.jsx)("td",{children:c.attributes.sowing_method})]}),Object(V.jsxs)("tr",{children:[Object(V.jsx)("td",{children:"Growing Degree Days"}),Object(V.jsx)("td",{children:c.attributes.growing_degree_days})]}),Object(V.jsxs)("tr",{children:[Object(V.jsx)("td",{children:"Row Spacing"}),Object(V.jsxs)("td",{children:[c.attributes.row_spacing," cm"]})]}),Object(V.jsxs)("tr",{children:[Object(V.jsx)("td",{children:"Height"}),Object(V.jsxs)("td",{children:[c.attributes.height," cm"]})]})]})]})})},Ta=a.p+"static/media/not.6ea7f4d0.svg",Ra=a.p+"static/media/sample-plant.31640ee6.jpg";var Pa=function(e){var t=e.data;return Object(V.jsx)(V.Fragment,{children:t&&Object(V.jsx)(u.a,{className:"ps-container",children:t.map((function(e){return Object(V.jsx)(Ee.LinkContainer,{to:"/search-plant/".concat(e.id),style:{cursor:"pointer"},children:Object(V.jsx)(b.a,{md:4,lg:4,sm:6,xs:12,children:Object(V.jsxs)("div",{className:"ps-card",children:[e.attributes.main_image_path.includes("/assets/baren_field_square")?Object(V.jsx)("img",{src:Ra,alt:"sample",className:"ps-sample"}):Object(V.jsx)("img",{src:e.attributes.main_image_path,alt:"sample",className:"ps-sample"}),Object(V.jsxs)("div",{className:"ps-card-info",children:[Object(V.jsxs)("div",{className:"ps-card-name",children:[" ",e.attributes.name," ",Object(V.jsx)("br",{})," "]}),Object(V.jsxs)("div",{className:"ps-card-bi-name",children:[" ",Object(V.jsx)("span",{children:"Binomial Name:"})," ",e.attributes.binomial_name," "]})]})]})})},e.id)}))})})};var Ua=function(){var e=Object(r.useState)(""),t=Object(oe.a)(e,2),a=t[0],n=t[1],c=Object(r.useState)([]),s=Object(oe.a)(c,2),i=s[0],o=s[1],l=Object(r.useState)(!0),d=Object(oe.a)(l,2),j=d[0],u=d[1],b=Object(r.useState)(!1),h=Object(oe.a)(b,2),m=h[0],g=h[1],f=function(){var e=Object(O.a)(p.a.mark((function e(t){var a,r;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,x.a.get("".concat("https://openfarm.cc/api/v1/crops","?filter=").concat(t));case 2:a=e.sent,0===(null===(r=a.data)||void 0===r?void 0:r.data.length)?u(!1):(o(r.data),u(!0)),g(!1);case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();return Object(V.jsxs)(V.Fragment,{children:[Object(V.jsx)("form",{onSubmit:function(e){e.preventDefault(),console.log(a),g(!0),f(a)},children:Object(V.jsx)("div",{className:"wrap",children:Object(V.jsxs)("div",{className:"search",children:[Object(V.jsx)("input",{type:"text",className:"searchTerm",placeholder:"What plant are you looking for?",value:a,onChange:function(e){return n(e.target.value)}}),Object(V.jsx)("button",{type:"submit",className:"searchButton",children:Object(V.jsx)("i",{className:"fa fa-search"})})]})})}),m?Object(V.jsx)(H,{}):Object(V.jsx)("div",{children:j?Object(V.jsx)(Pa,{data:i}):Object(V.jsxs)("div",{children:[Object(V.jsx)("img",{src:Ta,alt:"not-found",className:"search-nf"}),Object(V.jsx)("h4",{className:"search-text-nf",children:"No Result"})]})})]})},Fa=a(457),Ga=a(458),Ba=a(453),Ma=a.p+"static/media/blog.fc0941d6.svg",za=a.p+"static/media/diary.d6286fce.svg",Qa=a.p+"static/media/online-community.1ac5ba23.svg",qa=a.p+"static/media/search.7b1accb2.svg",Ja=a.p+"static/media/server.b628c0c9.svg",Wa=a.p+"static/media/store.2b5ae666.svg",Ya=a(466),Va=a(455),Ha=a(456),Ka=Object(Ba.a)({root:{minWidth:200,height:"250px",borderTop:"5px solid #81fbb8",margin:"auto"},title:{fontSize:"1.7rem",fontFamily:"Asap",textAlign:"center"},text:{textAlign:"center",fontFamily:"Lato",fontSize:"1.1rem"},image:{height:"75px",marginLeft:"70%"}});var Za=function(e){var t=e.title,a=e.text,r=e.image,n=Ka();return Object(V.jsxs)(Ya.a,{className:n.root,variant:"outlined",children:[Object(V.jsxs)(Va.a,{children:[Object(V.jsx)(Ha.a,{className:n.title,color:"textPrimary",gutterBottom:!0,children:t}),Object(V.jsx)(Ha.a,{variant:"body1",component:"p",color:"textSecondary",className:n.text,children:a})]}),Object(V.jsx)("img",{src:r,alt:"card_img",className:n.image})]})},Xa=Object(Ba.a)({container:{backgroundColor:"#f7f7f7"},gridContainer:{padding:"10rem auto"},text:{textAlign:"center",padding:"2rem 0rem"}});var $a=function(){var e=[{title:"Market Place",text:"Platform for buying plants, flowers, seeds and other equipments",image:Wa},{title:"Plant Database",text:"A database that contains plant related information",image:Ja},{title:"Plant Identification",text:"Identify any plants just by uploading it in the website",image:qa},{title:"Plant Diary",text:"In a personalized gardening notebook, keep track of your plants progress",image:za},{title:"Blog",text:"Read blog about plants, nature and environmental issues",image:Ma},{title:"Community",text:"Ask and give answers regarding plant related questions",image:Qa}],t=Xa();return Object(V.jsxs)("div",{className:t.container,children:[Object(V.jsx)("h1",{className:t.text,children:"Features"}),Object(V.jsx)(Fa.a,{className:t.gridContainer,children:Object(V.jsx)(Ga.a,{container:!0,spacing:5,elevate:3,children:e.map((function(e){return Object(V.jsx)(Ga.a,{item:!0,xs:12,sm:6,md:4,children:Object(V.jsx)(Za,{title:e.title,text:e.text,image:e.image})},e.title)}))})})]})},er=a.p+"static/media/pngwing.com.d99df108.png";a(200);var tr=function(){return Object(V.jsxs)("div",{className:"hero",children:[Object(V.jsxs)("div",{className:"hero_text",children:[Object(V.jsx)("h1",{children:"Plant Land"}),Object(V.jsx)("p",{children:"A place where plant enthusiastic people meet and get along with each other"}),Object(V.jsx)("button",{className:"btn-grad",children:"Explore"})]}),Object(V.jsx)("div",{className:"hero_img",children:Object(V.jsx)("img",{src:er,alt:"hero",height:"500px"})})]})};var ar=function(){return Object(V.jsx)(V.Fragment,{children:Object(V.jsx)(ve.a,{collapseOnSelect:!0,expand:"lg",bg:"light",className:"navbar",fixed:"top",children:Object(V.jsxs)(o.a,{children:[Object(V.jsx)(ve.a.Brand,{href:"#home",children:"PlantLand"}),Object(V.jsx)(ve.a.Toggle,{"aria-controls":"responsive-navbar-nav"}),Object(V.jsx)(ve.a.Collapse,{id:"responsive-navbar-nav",children:Object(V.jsxs)(ye.a,{className:"me-auto nav-item nav-main-item",children:[Object(V.jsx)(ye.a.Link,{href:"/search-plant",children:"Plant Search"}),Object(V.jsx)(ye.a.Link,{href:"/identify-plant",children:"Identify Plant"}),Object(V.jsx)(ye.a.Link,{href:"/blog",children:"Blog"}),Object(V.jsx)(ye.a.Link,{href:"/market",children:"Market Place"})]})})]})})})};var rr=function(){return Object(V.jsxs)("div",{children:[Object(V.jsx)(ar,{}),Object(V.jsx)(tr,{}),Object(V.jsx)($a,{})]})};var nr=function(){return Object(V.jsxs)(l.BrowserRouter,{children:[Object(V.jsx)(Ye,{}),Object(V.jsxs)("main",{children:[Object(V.jsx)(d.d,{path:"/",exact:!0,component:rr}),Object(V.jsxs)(o.a,{children:[Object(V.jsx)(d.d,{path:"/market",exact:!0,component:gt}),Object(V.jsx)(d.d,{path:"/search/:keyword",component:gt,exact:!0}),Object(V.jsx)(d.d,{path:"/search/:keyword/page/:pageNumber",component:gt}),Object(V.jsx)(d.d,{path:"/page/:pageNumber?",component:gt}),Object(V.jsx)(d.d,{path:"/login",component:yt}),Object(V.jsx)(d.d,{path:"/register",component:da}),Object(V.jsx)(d.d,{path:"/forget-password",component:st}),Object(V.jsx)(d.d,{path:"/reset-password/:resetToken",component:aa}),Object(V.jsx)(d.d,{path:"/profile",component:la}),Object(V.jsx)(d.d,{path:"/admin/userlist",component:Na}),Object(V.jsx)(d.d,{path:"/admin/productlist",component:ia}),Object(V.jsx)(d.d,{path:"/admin/orderlist",component:$t}),Object(V.jsx)(d.d,{path:"/admin/orderData",component:Xt}),Object(V.jsx)(d.d,{path:"/admin/saleData",component:Ca}),Object(V.jsx)(d.d,{path:"/admin/product/:id/edit",component:sa}),Object(V.jsx)(d.d,{path:"/product/:id",component:oa}),Object(V.jsx)(d.d,{path:"/order/:id",component:ta}),Object(V.jsx)(d.d,{path:"/cart/:id?",component:rt}),Object(V.jsx)(d.d,{path:"/shipping",component:Ia}),Object(V.jsx)(d.d,{path:"/placeorder",component:ca}),Object(V.jsx)(d.d,{path:"/payment",component:na})]}),Object(V.jsx)(d.d,{path:"/blog",exact:!0,component:re}),Object(V.jsx)(d.d,{path:"/newblog",component:ge}),Object(V.jsx)(d.d,{path:"/blog/:id",component:ie}),Object(V.jsx)(d.d,{path:"/search-plant",exact:!0,component:Ua}),Object(V.jsx)(d.d,{path:"/search-plant/:id",exact:!0,component:Aa}),Object(V.jsx)(d.d,{path:"/identify-plant",exact:!0,component:Da})]}),Object(V.jsx)(fe,{})]})};a(420);var cr=function(){return Object(V.jsx)(nr,{})},sr=a(82),ir=a(217),or=a(218),lr=Object(sr.combineReducers)({productList:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{products:[]},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case C:return{loading:!0,products:[]};case I:return{loading:!1,products:t.payload.products,page:t.payload.page,numOfPages:t.payload.numOfPages};case N:return{loading:!1,error:t.payload};default:return e}},productDetails:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{product:{reviews:[]}},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case _:return Object(xa.a)({loading:!0},e);case k:return{loading:!1,product:t.payload};case w:return{loading:!1,error:t.payload};default:return e}},productCreateReview:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case L:return{loading:!0};case D:return{loading:!1,success:!0};case A:return{loading:!1,error:t.payload};case T:return{};default:return e}},productDelete:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case R:return{loading:!0};case P:return{loading:!1,success:!0};case U:return{loading:!1,error:t.payload};default:return e}},productCreate:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case F:return{loading:!0};case G:return{loading:!1,success:!0,product:t.payload};case B:return{loading:!1,error:t.payload};case M:return{};default:return e}},productUpdate:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{product:{}},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case z:return{loading:!0};case Q:return{loading:!1,success:!0,product:t.payload};case q:return{loading:!1,error:t.payload};case J:return{product:{}};default:return e}},userLogin:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case Ce:return{loading:!0};case Ie:return{loading:!1,userInfo:t.payload};case Ne:return{loading:!1,error:t.payload};case _e:return{};default:return e}},userRegister:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case ke:return{loading:!0};case we:return{loading:!1,userInfo:t.payload};case Le:return{loading:!1,error:t.payload};default:return e}},userDetails:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{user:{}},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case De:return Object(xa.a)(Object(xa.a)({},e),{},{loading:!0});case Ae:return{loading:!1,user:t.payload};case Te:return{loading:!1,error:t.payload};default:return e}},userProfileUpdate:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case Re:return Object(xa.a)(Object(xa.a)({},e),{},{loading:!0});case Pe:return{loading:!1,success:!0,userInfo:t.payload};case Ue:return{loading:!1,error:t.payload};default:return e}},userList:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{users:[]},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case Fe:return Object(xa.a)(Object(xa.a)({},e),{},{loading:!0});case Ge:return{loading:!1,users:t.payload};case Be:return{loading:!1,error:t.payload};case Me:return{users:[]};default:return e}},userDelete:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case ze:return Object(xa.a)(Object(xa.a)({},e),{},{loading:!0});case Qe:return{loading:!1,success:!0};case qe:return{loading:!1,error:t.payload};default:return e}},cart:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{cartItems:[],shippingAddress:{}},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case Xe:var a=t.payload,r=e.cartItems.find((function(e){return e.productId===a.productId}));return r?Object(xa.a)(Object(xa.a)({},e),{},{cartItems:e.cartItems.map((function(e){return e.productId===a.productId?a:e}))}):Object(xa.a)(Object(xa.a)({},e),{},{cartItems:[].concat(Object(Ve.a)(e.cartItems),[a])});case $e:return Object(xa.a)(Object(xa.a)({},e),{},{cartItems:e.cartItems.filter((function(e){return e.productId!==t.payload}))});case et:return Object(xa.a)(Object(xa.a)({},e),{},{shippingAddress:t.payload});case tt:return Object(xa.a)(Object(xa.a)({},e),{},{paymentMethod:t.payload});default:return e}},orderCreate:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case Et:return{loading:!0};case Ct:return{loading:!1,success:!0,order:t.payload};case It:return{loading:!1,error:t.payload};default:return e}},orderList:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{orders:[]},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case At:return Object(xa.a)(Object(xa.a)({},e),{},{loading:!0});case Tt:return{loading:!1,orders:t.payload};case Rt:return{loading:!1,error:t.payload};default:return e}},orderData:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{orderData:[]},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case qt:return Object(xa.a)(Object(xa.a)({},e),{},{loading:!0});case Jt:return{loading:!1,orderData:t.payload};case Wt:return{loading:!1,error:t.payload};default:return e}},orderDetails:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{loading:!0,orderItems:[],shippingAddress:{}},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case Nt:return Object(xa.a)(Object(xa.a)({},e),{},{loading:!0});case _t:return{loading:!1,order:t.payload};case kt:return{loading:!1,error:t.payload};default:return e}},orderSaleData:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{orderSaleData:[]},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case Yt:return Object(xa.a)(Object(xa.a)({},e),{},{loading:!0});case Vt:return{loading:!1,orderSaleData:t.payload};case Ht:return{loading:!1,error:t.payload};default:return e}},orderPay:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case Pt:return{loading:!0};case Ut:return{loading:!1,success:!0};case Ft:return{loading:!1,error:t.payload};case Gt:return{};default:return e}},orderDeliver:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case Bt:return{loading:!0};case Mt:return{loading:!1,success:!0};case zt:return{loading:!1,error:t.DELIVERload};case Qt:return{};default:return e}},myOrderList:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{orders:[]},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case wt:return Object(xa.a)(Object(xa.a)({},e),{},{loading:!0});case Lt:return{loading:!1,orders:t.payload};case Dt:return{loading:!1,error:t.payload};default:return e}},blogList:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case g:return{loading:!0,blogs:[]};case f:return{loading:!1,blogs:t.payload};case v:return{loading:!1,error:t.payload};default:return e}},blogDetails:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{blog:{comments:[]}},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case y:return Object(xa.a)({loading:!0},e);case S:return{loading:!1,blog:t.payload};case E:return{loading:!1,error:t.payload};default:return e}}}),dr=localStorage.getItem("cartItems")?JSON.parse(localStorage.getItem("cartItems")):[],jr=localStorage.getItem("userInfo")?JSON.parse(localStorage.getItem("userInfo")):null,ur={cart:{cartItems:dr,shippingAddress:localStorage.getItem("shippingAddress")?JSON.parse(localStorage.getItem("shippingAddress")):{}},userLogin:{userInfo:jr}},br=[or.a],hr=Object(sr.createStore)(lr,ur,Object(ir.composeWithDevTools)(sr.applyMiddleware.apply(void 0,br)));a(421);s.a.render(Object(V.jsx)(V.Fragment,{children:Object(V.jsxs)(n.a.StrictMode,{children:[Object(V.jsx)(i.a,{store:hr,children:Object(V.jsx)(cr,{})}),","]})}),document.getElementById("root"))},52:function(e,t,a){}},[[422,1,2]]]);
+//# sourceMappingURL=main.50d9a2a0.chunk.js.map
\ No newline at end of file
diff --git a/client/build/static/js/main.50d9a2a0.chunk.js.map b/client/build/static/js/main.50d9a2a0.chunk.js.map
new file mode 100644
index 0000000..4e970c0
--- /dev/null
+++ b/client/build/static/js/main.50d9a2a0.chunk.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["constants/blogConstant.js","constants/productConstants.js","redux/actions/blogActions.js","components/Ecommerce/Loader.js","components/Blog/BlogCard.js","components/Blog/BlogSeedData.js","components/Blog/Blog.js","components/Ecommerce/Message.js","components/Blog/BlogDetails.js","components/Ecommerce/ToastMessage.js","components/Blog/BlogCategory.js","components/Blog/NewBlog.js","components/Ecommerce/Footer.js","constants/userConstants.js","redux/actions/userActions.js","components/Ecommerce/Header.js","constants/cartConstants.js","redux/actions/cartActions.js","components/Ecommerce/Screen/CartScreen.js","components/Ecommerce/FormContainer.js","components/Ecommerce/Screen/ForgetPasswordScreen.js","redux/actions/productActions.js","components/Ecommerce/FilterCategory.js","components/Ecommerce/FilterSort.js","components/Ecommerce/Paginate.js","components/Ecommerce/Rating.js","components/Ecommerce/Product.js","components/Ecommerce/SearchBox.js","components/Ecommerce/Screen/HomeScreen.js","components/Ecommerce/GoogleAuth.js","components/Ecommerce/Screen/LoginScreen.js","constants/orderConstants.js","redux/actions/orderActions.js","components/Ecommerce/Sidebar.js","components/Ecommerce/Screen/OrderDataScreen.js","components/Ecommerce/Screen/OrderListScreen.js","components/Ecommerce/Screen/OrderScreen.js","components/Ecommerce/Screen/PasswordResetScreen.js","components/Ecommerce/CheckoutSteps.js","components/Ecommerce/Screen/PaymentScreen.js","components/Ecommerce/Screen/PlaceOrderScreen.js","components/Ecommerce/Screen/ProductEditScreen.js","components/Ecommerce/Screen/ProductListScreen.js","components/Ecommerce/Screen/ProductScreen.js","components/Ecommerce/Screen/ProfileScreen.js","components/Ecommerce/Screen/RegisterScreen.js","components/Ecommerce/Charts/BarChart.js","components/Ecommerce/Charts/LineChart.js","components/Ecommerce/Charts/MonthBarChart.js","components/Ecommerce/Charts/ProductSaleBarChart.js","components/Ecommerce/Charts/SalesPieChart.js","components/Ecommerce/CSVReportGeneration.js","components/Ecommerce/EcommSeedData.js","components/Ecommerce/SaleDataCategory.js","components/Ecommerce/Screen/SaleDataScreen.js","components/Ecommerce/Screen/ShippingScreen.js","components/Ecommerce/Screen/UserListScreen.js","components/PlantIdentify/PIDetailsModal.js","components/PlantIdentify/PlantIdentify.js","components/PlantSearch/PlantDetails.js","images/not.svg","images/sample-plant.jpg","components/PlantSearch/PlantSearchCard.js","components/PlantSearch/PlantSearch.js","images/blog.svg","images/diary.svg","images/online-community.svg","images/search.svg","images/server.svg","images/store.svg","components/LandingPage/FeatureCard.js","components/LandingPage/Feature.js","images/pngwing.com.png","components/LandingPage/HeroSection.js","components/LandingPage/Navbar.js","pages/LandingPage.js","pages/MainPage.js","App.js","store.js","redux/reducers/productReducers.js","redux/reducers/userReducers.js","redux/reducers/cartReducers.js","redux/reducers/orderReducers.js","redux/reducers/blogReducers.js","index.js"],"names":["BLOG_FETCH_REQUEST","BLOG_FETCH_SUCCESS","BLOG_FETCH_FAIL","BLOG_DETAILS_REQUEST","BLOG_DETAILS_SUCCESS","BLOG_DETAILS_FAIL","PRODUCT_LIST_REQUEST","PRODUCT_LIST_SUCCESS","PRODUCT_LIST_FAIL","PRODUCT_DETAILS_REQUEST","PRODUCT_DETAILS_SUCCESS","PRODUCT_DETAILS_FAIL","PRODUCT_CREATE_REVIEW_REQUEST","PRODUCT_CREATE_REVIEW_SUCCESS","PRODUCT_CREATE_REVIEW_FAIL","PRODUCT_CREATE_REVIEW_RESET","PRODUCT_DELETE_REQUEST","PRODUCT_DELETE_SUCCESS","PRODUCT_DELETE_FAIL","PRODUCT_CREATE_REQUEST","PRODUCT_CREATE_SUCCESS","PRODUCT_CREATE_FAIL","PRODUCT_CREATE_RESET","PRODUCT_UPDATE_REQUEST","PRODUCT_UPDATE_SUCCESS","PRODUCT_UPDATE_FAIL","PRODUCT_UPDATE_RESET","baseUrl","Loader","Spinner","animation","variant","role","style","width","height","margin","display","className","BlogCard","blog","history","useHistory","Card","minWidth","to","_id","Img","padding","src","image","Body","Title","title","tags","map","tag","index","Badge","Text","ReactHtmlParser","description","justifyContent","Button","onClick","id","push","aria-hidden","blogCategories","blogTags","Blog","dispatch","useDispatch","blogList","useSelector","state","loading","blogs","useEffect","a","type","axios","get","data","payload","console","log","response","message","Row","Col","md","xs","lg","xl","Message","children","Alert","defaultProps","BlogDetails","match","blogDetails","error","params","Container","alt","author","category","createdAt","Date","toDateString","toast","configure","toastSuccessMessage","success","autoClose","toastInfoMessage","info","toastErrorMessage","position","useState","React","label","BlogCategory","onCategorySelect","isOpen","setOpen","items","selectedItem","setSelectedItem","find","item","e","target","NewBlog","setTitle","setCategory","setTags","setImage","content","setContent","handleFileUpload","file","files","formData","FormData","append","config","headers","post","clearInputs","onSubmit","preventDefault","blogData","allTags","split","blogPost","getState","userInfo","userLogin","Authorization","token","err","htmlFor","name","onChange","placeholder","autoFocus","value","editor","ClassicEditor","ckfinder","uploadUrl","event","getData","Footer","USER_LOGIN_REQUEST","USER_LOGIN_SUCCESS","USER_LOGIN_FAIL","USER_LOGOUT","USER_REGISTER_REQUEST","USER_REGISTER_SUCCESS","USER_REGISTER_FAIL","USER_DETAILS_REQUEST","USER_DETAILS_SUCCESS","USER_DETAILS_FAIL","USER_PROFILE_UPDATE_REQUEST","USER_PROFILE_UPDATE_SUCCESS","USER_PROFILE_UPDATE_FAIL","USER_LIST_REQUEST","USER_LIST_SUCCESS","USER_LIST_FAIL","USER_LIST_RESET","USER_DELETE_REQUEST","USER_DELETE_SUCCESS","USER_DELETE_FAIL","googleLogin","localStorage","setItem","JSON","stringify","Header","Navbar","collapseOnSelect","expand","Brand","Toggle","aria-controls","Collapse","Nav","Link","NavDropdown","user","Item","href","removeItem","isAdmin","CART_ADD_ITEM","CART_REMOVE_ITEM","CART_SAVE_SHIPPING_ADDRESS","CART_SAVE_PAYMENT_METHOD","addToCart","qty","productId","price","countInStock","cart","cartItems","CartScreen","location","search","Number","removeFromCartHandler","removeFromCart","length","ListGroup","Image","fluid","rounded","fontSize","FormControl","as","Array","keys","p","reduce","acc","toFixed","disabled","FormContainer","ForgetPasswordScreen","email","setEmail","setError","handleSubmit","setTimeout","Form","Group","controlId","Label","Control","fetchProducts","keyword","pageNumber","sort","fetchProductById","FilterCategory","handleCategoryChange","DropdownButton","alignRight","onSelect","Dropdown","eventKey","handleSortChange","Paginate","page","numOfPages","Pagination","active","Rating","text","color","Product","product","rating","numReviews","SearchBox","setKeyword","trim","inline","HomeScreen","productCategory","setProductCategory","productSort","setProductSort","productList","products","toLowerCase","FilterSort","GoogleAuth","googleSuccess","res","profileObj","tokenId","clientId","render","renderProps","onSuccess","onFailure","cookiePolicy","LoginScreen","password","setPassword","redirect","login","ORDER_CREATE_REQUEST","ORDER_CREATE_SUCCESS","ORDER_CREATE_FAIL","ORDER_DETAILS_REQUEST","ORDER_DETAILS_SUCCESS","ORDER_DETAILS_FAIL","ORDER_MY_LIST_REQUEST","ORDER_MY_LIST_SUCCESS","ORDER_MY_LIST_FAIL","ORDER_LIST_REQUEST","ORDER_LIST_SUCCESS","ORDER_LIST_FAIL","ORDER_PAY_REQUEST","ORDER_PAY_SUCCESS","ORDER_PAY_FAIL","ORDER_PAY_RESET","ORDER_DELIVER_REQUEST","ORDER_DELIVER_SUCCESS","ORDER_DELIVER_FAIL","ORDER_DELIVER_RESET","ORDER_DATA_REQUEST","ORDER_DATA_SUCCESS","ORDER_DATA_FAIL","ORDER_SALE_DATA_REQUEST","ORDER_SALE_DATA_SUCCESS","ORDER_SALE_DATA_FAIL","Sidebar","marginTop","OrderDataScreen","order","orderData","totalOrder","totalPaidOrder","totalDelivered","sm","Table","striped","bordered","productSaleData","total","customerBuyData","customer","customer_name","customer_email","Math","ceil","OrderListScreen","orderList","orders","hover","substring","marginRight","totalPrice","isPaid","paidAt","isDelivered","deliverAt","OrderScreen","num","orderId","sdkReady","setSdkReady","orderDetails","orderPay","loadingPay","successPay","successDeliver","orderDeliver","itemsPrice","orderedItems","round","addPayPalScript","req","script","document","createElement","async","onload","body","appendChild","window","paypal","shippingAddress","address","city","thana","houseNumber","paymentMethod","shippingPrice","amount","paymentResult","put","payOrder","deliverOrder","confirmPassword","setConfirmPassword","clear","errorText","resetToken","CheckoutSteps","step1","step2","step3","step4","PaymentScreen","setPaymentMethod","Check","checked","PlaceOrderScreen","orderCreate","createOrder","orderItems","ProductEditScreen","setName","setDescription","setPrice","setCountInStock","uploading","setUploading","productDetails","productUpdate","loadingUpdate","errorUpdate","successUpdate","updateProduct","File","custom","ProductListScreen","productCreate","loadingCreate","errorCreate","successCreate","createdProduct","productDelete","loadingDelete","errorDelete","successDelete","handleDelete","confirm","delete","deleteProduct","handleCreateProduct","float","ProductScreen","setQty","setRating","comment","setComment","productReview","productCreateReview","reviewError","reviewSuccess","reviews","r","review","ProfileScreen","useLocation","userDetails","myOrderList","loadingOrders","errorOrders","updateUserProfile","RegisterScreen","userRegister","register","BarChart","saleByMonth","od","numOfOrder","labels","datasets","backgroundColor","borderColor","borderWidth","options","scales","yAxes","ticks","beginAtZero","LineChart","fill","pointRadius","monthSaleData","i","daysOfMonthLabel","colorArray","colorArrayBorder","ProductSaleBarChart","monthWiseQty","productName","SalesPieChart","pie_data","dataLabel","dataValues","pd","val","parseInt","bgColPalette","borderColPalette","background","border","CSVReportGeneration","csvReport","filename","key","textAlign","marginBottom","fontFamily","monthData","SaleDataCategory","SaleDataScreen","graphType","setGraphType","monthSale","setMonthSale","productSale","setProductSale","setSearch","reportData","setReportData","salesPieData","setSalesPieData","orderSaleData","onMonthSelect","selectedMonth","handleSearchSubmit","product_id","MonthBarChart","aria-label","el","month","saleData","date","product_name","product_price","product_qty","from","m","set","Map","ShippingScreen","setAddress","setCity","setThana","setHouseNumber","required","UserListScreen","userList","deleteSuccess","userDelete","users","deleteUser","PIDetailsModal","desc","synonyms","taxonomy","authority","common_names","show","setShow","handleClose","Modal","onHide","closeButton","cn","kingdom","phylum","class","family","genus","syn","PlantIdentify","setFile","imageUrl","setImageUrl","plantSuggestion","setPlantSuggestion","setLoading","getPlantInfo","plantSuggestions","covertNumber","n","toString","multiple","onDone","base64","plant","similar_images","url","plant_name","plant_details","scientific_name","structured_name","species","name_authority","wiki_description","probability","PlantDetails","plantData","setPlantData","plantSearchAPI","fetchPlant","attributes","binomial_name","taxon","sun_requirements","sowing_method","growing_degree_days","row_spacing","PlantSearchCard","d","cursor","main_image_path","includes","sample","PlantSearch","searchTerm","setSearchTerm","result","setResult","found","setFound","notFound","useStyles","makeStyles","root","borderTop","marginLeft","FeatureCard","classes","CardContent","Typography","gutterBottom","component","container","gridContainer","Feature","market","db","diary","forum","Grid","spacing","elevate","HeroSection","heroImg","NavBar","bg","fixed","LandingPage","MainPage","path","exact","PasswordResetScreen","App","reducer","combineReducers","action","userProfileUpdate","isItemExist","filter","DELIVERload","comments","cartItemsFromStorage","getItem","parse","userInfoFromStorage","initialState","middlewares","thunk","store","createStore","composeWithDevTools","applyMiddleware","ReactDOM","StrictMode","getElementById"],"mappings":"oZAAaA,EAAqB,qBACrBC,EAAqB,qBACrBC,EAAkB,kBAElBC,EAAuB,uBACvBC,EAAuB,uBACvBC,EAAoB,oBCNpBC,EAAuB,uBACvBC,EAAuB,uBACvBC,EAAoB,oBAEpBC,EAA0B,0BAC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P,mCACE,eAAC,IAAMiY,WAAP,WACE,cAAC,IAAD,CAAUL,MAAOA,GAAjB,SACE,cAAC,GAAD,MAFJ,SAMFxS,SAAS8S,eAAe,U","file":"static/js/main.50d9a2a0.chunk.js","sourcesContent":["export const BLOG_FETCH_REQUEST = \"BLOG_FETCH_REQUEST\"\r\nexport const BLOG_FETCH_SUCCESS = \"BLOG_FETCH_SUCCESS\"\r\nexport const BLOG_FETCH_FAIL = \"BLOG_FETCH_FAIL\"\r\n\r\nexport const BLOG_DETAILS_REQUEST = \"BLOG_DETAILS_REQUEST\"\r\nexport const BLOG_DETAILS_SUCCESS = \"BLOG_DETAILS_SUCCESS\"\r\nexport const BLOG_DETAILS_FAIL = \"BLOG_DETAILS_FAIL\"\r\n\r\n\r\nexport const BLOG_CREATE_REQUEST = \"BLOG_CREATE_REQUEST\"\r\nexport const BLOG_CREATE_SUCCESS = \"BLOG_CREATE_SUCCESS\"\r\nexport const BLOG_CREATE_FAIL = \"BLOG_CREATE_FAIL\"","export const PRODUCT_LIST_REQUEST = \"PRODUCT_LIST_REQUEST\"\r\nexport const PRODUCT_LIST_SUCCESS = \"PRODUCT_LIST_SUCCESS\"\r\nexport const PRODUCT_LIST_FAIL = \"PRODUCT_LIST_FAIL\"\r\n\r\nexport const PRODUCT_DETAILS_REQUEST = \"PRODUCT_DETAILS_REQUEST\"\r\nexport const PRODUCT_DETAILS_SUCCESS = \"PRODUCT_DETAILS_SUCCESS\"\r\nexport const PRODUCT_DETAILS_FAIL = \"PRODUCT_DETAILS_FAIL\"\r\n\r\nexport const PRODUCT_CREATE_REVIEW_REQUEST = \"PRODUCT_CREATE_REVIEW_REQUEST\"\r\nexport const PRODUCT_CREATE_REVIEW_SUCCESS = \"PRODUCT_CREATE_REVIEW_SUCCESS\"\r\nexport const PRODUCT_CREATE_REVIEW_FAIL = \"PRODUCT_CREATE_REVIEW_FAIL\"\r\nexport const PRODUCT_CREATE_REVIEW_RESET = \"PRODUCT_CREATE_REVIEW_RESET\"\r\n\r\nexport const PRODUCT_DELETE_REQUEST = \"PRODUCT_DELETE_REQUEST\"\r\nexport const PRODUCT_DELETE_SUCCESS = \"PRODUCT_DELETE_SUCCESS\"\r\nexport const PRODUCT_DELETE_FAIL = \"PRODUCT_DELETE_FAIL\"\r\n\r\nexport const PRODUCT_CREATE_REQUEST = \"PRODUCT_CREATE_REQUEST\"\r\nexport const PRODUCT_CREATE_SUCCESS = \"PRODUCT_CREATE_SUCCESS\"\r\nexport const PRODUCT_CREATE_FAIL = \"PRODUCT_CREATE_FAIL\"\r\nexport const PRODUCT_CREATE_RESET = \"PRODUCT_CREATE_RESET\"\r\n\r\nexport const PRODUCT_UPDATE_REQUEST = \"PRODUCT_UPDATE_REQUEST\"\r\nexport const PRODUCT_UPDATE_SUCCESS = \"PRODUCT_UPDATE_SUCCESS\"\r\nexport const PRODUCT_UPDATE_FAIL = \"PRODUCT_UPDATE_FAIL\"\r\nexport const PRODUCT_UPDATE_RESET = \"PRODUCT_UPDATE_RESET\"","import axios from \"axios\"\r\nimport { BLOG_DETAILS_REQUEST, BLOG_DETAILS_SUCCESS, BLOG_FETCH_FAIL, BLOG_FETCH_REQUEST, BLOG_FETCH_SUCCESS } from \"../../constants/blogConstant\"\r\nimport { PRODUCT_DETAILS_FAIL } from \"../../constants/productConstants\"\r\n\r\nconst baseUrl = 'https://plantland.herokuapp.com'\r\n// @ GET blogs\r\nexport const fetchBlogs = () => async (dispatch) => {\r\n try {\r\n dispatch({ type:BLOG_FETCH_REQUEST})\r\n\r\n const { data } = await axios.get(`${baseUrl}/api/blogs`)\r\n\r\n dispatch({\r\n type: BLOG_FETCH_SUCCESS,\r\n payload: data\r\n })\r\n \r\n } catch (error) {\r\n console.log(error);\r\n dispatch({\r\n type: BLOG_FETCH_FAIL,\r\n payload: error.response && error.response.data.message ? error.response.data.message : error.message\r\n })\r\n }\r\n}\r\n\r\n// Get a blog by id\r\nexport const fetchBlogById = (id) => async (dispatch) => {\r\n try {\r\n dispatch({ type: BLOG_DETAILS_REQUEST })\r\n\r\n const { data } = await axios.get(`${baseUrl}/api/blogs/${id}`)\r\n dispatch({\r\n type: BLOG_DETAILS_SUCCESS,\r\n payload: data\r\n })\r\n \r\n } catch (error) {\r\n console.log(error);\r\n dispatch({\r\n type: PRODUCT_DETAILS_FAIL,\r\n payload: error.response && error.response.data.message ? error.response.data.message : error.message\r\n })\r\n }\r\n\r\n}\r\n\r\n// Create blog\r\nexport const createBlog = (blogData) => async (dispatch,getState) => {\r\n\r\n try {\r\n // dispatch({\r\n // type:BLOG_CREATE_REQUEST\r\n // })\r\n\r\n const { userLogin: { userInfo } } = getState()\r\n \r\n \r\n const config = {\r\n headers: {\r\n 'Content-Type': 'application/json',\r\n Authorization: `Bearer ${userInfo.token}`\r\n }\r\n }\r\n\r\n const { data } = await axios.post(`${baseUrl}/api/blogs`,blogData,config)\r\n\r\n console.log(data);\r\n // dispatch({\r\n // type: BLOG_CREATE_SUCCESS,\r\n // payload:data\r\n // })\r\n \r\n } catch (error) {\r\n console.log(error);\r\n // dispatch({\r\n // type: PRODUCT_CREATE_FAIL,\r\n // payload: error.response && error.response.data.message ? error.response.data.message : error.message\r\n \r\n // })\r\n \r\n }\r\n \r\n}","import React from 'react';\r\nimport { Spinner } from 'react-bootstrap';\r\n\r\nfunction Loader() {\r\n return (\r\n \r\n Loading...\r\n \r\n )\r\n}\r\n\r\nexport default Loader\r\n","import React from 'react'\r\nimport { Badge, Button, Card } from 'react-bootstrap'\r\nimport ReactHtmlParser from 'react-html-parser'\r\nimport { Link, useHistory } from 'react-router-dom'\r\nimport \"../../styles/blog.css\"\r\n\r\nfunction BlogCard({ blog }) {\r\n const history = useHistory()\r\n const handleViewBlog = (id) => {\r\n history.push(`/blog/${id}`)\r\n }\r\n return (\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n {blog.title}\r\n {blog.tags.map((tag,index) => (\r\n {tag}\r\n ))}\r\n \r\n {ReactHtmlParser(blog.description)}\r\n \r\n\r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n\r\n \r\n \r\n
\r\n )\r\n}\r\n\r\nexport default BlogCard\r\n","export const blogCategories = ['All', 'Plant', 'Gardening', 'Plant Diseases', 'Green Living', 'Gardening Tools', 'Others']\r\n\r\nexport const blogTags=[\"plants\", \"nature\", \"flowers\", \"plantsofinstagram\", \"garden\", \"plantsmakepeoplehappy\",\"plant\", \"green\", \"gardening\", \"houseplants\", \"photography\", \"naturephotography\",\"flower\", \"plantlover\", \"love\", \"indoorplants\", \"succulents\", \"urbanjungle\", \"cactus\", \"art\", \"beautiful\", \"plantlife\", \"photooftheday\", \"plantas\", \"plantstagram\", \"homedecor\", \"flowerstagram\", \"spring\", \"naturelovers\", \"bhfyp\"]\r\n\r\n","import React, { useEffect } from 'react'\r\nimport { Button, Col, Row } from 'react-bootstrap'\r\nimport { useDispatch, useSelector } from 'react-redux'\r\nimport { useHistory } from 'react-router-dom'\r\nimport { fetchBlogs } from '../../redux/actions/blogActions'\r\nimport '../../styles/blog.css'\r\nimport Loader from '../Ecommerce/Loader'\r\nimport BlogCard from './BlogCard'\r\nimport { blogCategories, blogTags } from './BlogSeedData'\r\n\r\nfunction Blog() {\r\n\r\n const history = useHistory()\r\n const dispatch = useDispatch()\r\n\r\n const blogList = useSelector(state => state.blogList)\r\n const { loading, blogs} = blogList\r\n\r\n useEffect(() => {\r\n dispatch(fetchBlogs())\r\n }, [dispatch])\r\n\r\n function handleCreateBlog(){\r\n history.push(\"/newblog\")\r\n }\r\n return (\r\n <>\r\n \r\n
\r\n
Blogs
\r\n
We all need a little green in our lives
\r\n
\r\n
\r\n
\r\n
Latest Articles
\r\n \r\n \r\n
Discover the most outstanding articles in all topics related to Plants
\r\n
\r\n \r\n
\r\n \r\n \r\n
Category
\r\n {blogCategories.map(blog => (\r\n
{blog}
\r\n ))}\r\n
\r\n \r\n
Discover Tags
\r\n
\r\n {blogTags.map(tag => (\r\n
{tag}
\r\n ))}\r\n
\r\n
\r\n \r\n {loading ? : (\r\n \r\n \r\n {blogs && blogs.map((blog,index) => (\r\n \r\n \r\n \r\n ))}\r\n
\r\n \r\n )}\r\n
\r\n
\r\n >\r\n )\r\n}\r\n\r\nexport default Blog\r\n","import React from 'react'\r\nimport { Alert } from 'react-bootstrap'\r\n\r\nfunction Message({variant,children}) {\r\n return (\r\n \r\n {children}\r\n \r\n )\r\n}\r\n\r\nMessage.defaultProps = {\r\n variant:'info'\r\n}\r\n\r\nexport default Message\r\n","import React, { useEffect } from 'react'\r\nimport { Badge, Container } from 'react-bootstrap'\r\nimport ReactHtmlParser from 'react-html-parser'\r\nimport { useDispatch, useSelector } from 'react-redux'\r\nimport { fetchBlogById } from '../../redux/actions/blogActions'\r\nimport '../../styles/blog.css'\r\nimport Loader from '../Ecommerce/Loader'\r\nimport Message from '../Ecommerce/Message'\r\n\r\nfunction BlogDetails({match}) {\r\n const dispatch = useDispatch()\r\n const blogDetails = useSelector(state => state.blogDetails)\r\n const { loading, blog, error } = blogDetails\r\n useEffect(() => {\r\n dispatch(fetchBlogById(match.params.id))\r\n }, [dispatch,match])\r\n \r\n return (\r\n \r\n {loading ? : error ? {error} : blog && (\r\n <>\r\n \r\n \r\n {blog.title}
\r\n \r\n
\r\n
By {blog.author}
\r\n
Published in {blog.category}
\r\n
{blog.createdAt && new Date(blog.createdAt).toDateString()}
\r\n
\r\n {/*
\r\n 5\r\n 4\r\n
*/}\r\n
\r\n \r\n \r\n {ReactHtmlParser(blog.description)}\r\n
\r\n \r\n {blog.tags && blog.tags.map((tag, index) => ( \r\n {tag} \r\n ))}\r\n
\r\n >\r\n \r\n )}\r\n \r\n \r\n \r\n )\r\n}\r\n\r\nexport default BlogDetails\r\n","import { toast } from 'react-toastify'\r\nimport 'react-toastify/dist/ReactToastify.css'\r\n\r\ntoast.configure()\r\n\r\nexport const toastSuccessMessage = (message) => {\r\n toast.success(message,{\r\n autoClose: 3000,\r\n })\r\n}\r\n\r\nexport const toastInfoMessage = (message) => {\r\n toast.info(message,{\r\n autoClose: 3000,\r\n })\r\n}\r\n\r\nexport const toastErrorMessage = (message) => {\r\n toast.error(message, {\r\n autoClose: 3000,\r\n position:'bottom-right'\r\n })\r\n}","import React from \"react\";\r\nconst { useState} = React;\r\n\r\nconst data = [{ id: \"plant\", label: \"Plant\" },\r\n { id: \"garden\", label: \"Gardening\" },\r\n { id: \"diseases\", label: \"Plant Diseases\" },\r\n { id: \"green\", label: \"Green Living\" },\r\n { id: \"tools\", label: \"Gardening Tools\" },\r\n { id: \"others\", label: \"Others\" },\r\n];\r\n\r\nconst BlogCategory = ({onCategorySelect}) => {\r\n const [isOpen, setOpen] = useState(false);\r\n const [items] = useState(data);\r\n const [selectedItem, setSelectedItem] = useState(null);\r\n \r\n const toggleDropdown = () => setOpen(!isOpen);\r\n \r\n const handleItemClick = (id) => {\r\n onCategorySelect(id)\r\n selectedItem === id ? setSelectedItem(null) : setSelectedItem(id);\r\n }\r\n \r\n return (\r\n \r\n
\r\n {selectedItem ? items.find(item => item.id === selectedItem).label : \"Select Blog Category\"}\r\n \r\n
\r\n
\r\n {items.map(item => (\r\n
handleItemClick(e.target.id)} id={item.id}>\r\n • \r\n {item.label}\r\n
\r\n ))}\r\n
\r\n
\r\n )\r\n}\r\n\r\nexport default BlogCategory","import ClassicEditor from '@ckeditor/ckeditor5-build-classic'\r\nimport { CKEditor } from '@ckeditor/ckeditor5-react'\r\nimport axios from 'axios'\r\nimport React, { useState } from 'react'\r\nimport { Button } from 'react-bootstrap'\r\nimport { useDispatch } from 'react-redux'\r\nimport { useHistory } from 'react-router-dom'\r\nimport { createBlog } from '../../redux/actions/blogActions'\r\nimport { toastSuccessMessage } from '../Ecommerce/ToastMessage'\r\nimport BlogDropdown from './BlogCategory'\r\n\r\nfunction NewBlog() {\r\n const history = useHistory()\r\n const dispatch = useDispatch()\r\n\r\n const [title, setTitle] = useState(\"\")\r\n const [category, setCategory] = useState(\"\")\r\n const [tags, setTags] = useState(\"\")\r\n const [image, setImage] = useState(\"\")\r\n const [content, setContent] = useState(\"\")\r\n\r\n\r\n const onCategorySelect = (category) => {\r\n setCategory(category)\r\n }\r\n\r\n const handleFormSubmit = (e) => {\r\n e.preventDefault()\r\n console.log(\"off\")\r\n const allTags = tags.split(\",\")\r\n const blogPost = {\r\n title,description:content,category,tags:allTags,image\r\n }\r\n try {\r\n dispatch(createBlog(blogPost))\r\n clearInputs()\r\n toastSuccessMessage(\"Blog Published\")\r\n } catch (err) {\r\n console.log(err);\r\n }\r\n\r\n }\r\n\r\n const handleFileUpload = async (e) => {\r\n const file = e.target.files[0] \r\n const formData = new FormData()\r\n formData.append('image', file)\r\n\r\n try {\r\n const config = {\r\n headers: {\r\n 'Content-Type':'multipart/form-data'\r\n }\r\n }\r\n const { data } = await axios.post(`/api/uploads`, formData, config)\r\n setImage(data)\r\n } catch (error) {\r\n console.log(error)\r\n }\r\n }\r\n \r\n const clearInputs = () => {\r\n setTitle(\"\")\r\n setContent(\"\")\r\n setTags(\"\")\r\n setCategory(\"\")\r\n setImage(\"\")\r\n }\r\n\r\n return (\r\n \r\n {image ?
: ( \r\n
\r\n ) }\r\n
\r\n
\r\n
\r\n )\r\n}\r\n\r\nexport default NewBlog\r\n","import React from 'react'\r\nimport { Col, Container, Row } from 'react-bootstrap'\r\n\r\nfunction Footer() {\r\n return (\r\n \r\n )\r\n}\r\n\r\nexport default Footer\r\n","export const USER_LOGIN_REQUEST = \"USER_LOGIN_REQUEST\"\r\nexport const USER_LOGIN_SUCCESS = \"USER_LOGIN_SUCCESS\"\r\nexport const USER_LOGIN_FAIL = \"USER_LOGIN_FAIL\"\r\n\r\nexport const USER_LOGOUT = \"USER_LOGOUT\"\r\n\r\nexport const USER_REGISTER_REQUEST = \"USER_REGISTER_REQUEST\"\r\nexport const USER_REGISTER_SUCCESS = \"USER_REGISTER_SUCCESS\"\r\nexport const USER_REGISTER_FAIL = \"USER_REGISTER_FAIL\"\r\n\r\nexport const USER_DETAILS_REQUEST = \"USER_DETAILS_REQUEST\"\r\nexport const USER_DETAILS_SUCCESS = \"USER_DETAILS_SUCCESS\"\r\nexport const USER_DETAILS_FAIL = \"USER_DETAILS_FAIL\"\r\n\r\nexport const USER_PROFILE_UPDATE_REQUEST = \"USER_PROFILE_UPDATE_REQUEST\"\r\nexport const USER_PROFILE_UPDATE_SUCCESS = \"USER_PROFILE_UPDATE_SUCCESS\"\r\nexport const USER_PROFILE_UPDATE_FAIL = \"USER_PROFILE_UPDATE_FAIL\"\r\nexport const USER_PROFILE_UPDATE_RESET = \"USER_PROFILE_UPDATE_RESET\"\r\n\r\nexport const USER_LIST_REQUEST = \"USER_LIST_REQUEST\"\r\nexport const USER_LIST_SUCCESS = \"USER_LIST_SUCCESS\"\r\nexport const USER_LIST_FAIL = \"USER_LIST_FAIL\"\r\nexport const USER_LIST_RESET = \"USER_LIST_RESET\"\r\n\r\nexport const USER_DELETE_REQUEST = \"USER_DELETE_REQUEST\"\r\nexport const USER_DELETE_SUCCESS = \"USER_DELETE_SUCCESS\"\r\nexport const USER_DELETE_FAIL = \"USER_DELETE_FAIL\"","import axios from 'axios'\r\nimport { USER_DELETE_FAIL, USER_DELETE_REQUEST, USER_DELETE_SUCCESS, USER_DETAILS_FAIL, USER_DETAILS_REQUEST, USER_DETAILS_SUCCESS, USER_LIST_FAIL, USER_LIST_REQUEST, USER_LIST_RESET, USER_LIST_SUCCESS, USER_LOGIN_FAIL, USER_LOGIN_REQUEST, USER_LOGIN_SUCCESS, USER_LOGOUT, USER_PROFILE_UPDATE_FAIL, USER_PROFILE_UPDATE_REQUEST, USER_PROFILE_UPDATE_SUCCESS, USER_REGISTER_FAIL, USER_REGISTER_REQUEST, USER_REGISTER_SUCCESS } from '../../constants/userConstants'\r\n\r\nconst baseUrl = 'https://plantland.herokuapp.com'\r\n\r\nexport const login = (email,password) => async (dispatch) => {\r\n\r\n try {\r\n dispatch({\r\n type:USER_LOGIN_REQUEST\r\n })\r\n \r\n const config = {\r\n headers: {\r\n 'Content-Type':'application/json'\r\n }\r\n }\r\n\r\n const { data } = await axios.post(`${baseUrl}/api/users/login`,\r\n {email, password },config)\r\n\r\n dispatch({\r\n type: USER_LOGIN_SUCCESS,\r\n payload:data\r\n })\r\n\r\n localStorage.setItem('userInfo',JSON.stringify(data))\r\n \r\n } catch (error) {\r\n console.log(error);\r\n dispatch({\r\n type: USER_LOGIN_FAIL,\r\n payload: error.response && error.response.data.message ? error.response.data.message : error.message\r\n \r\n })\r\n \r\n }\r\n \r\n}\r\n\r\n\r\nexport const googleLogin = (data) => async (dispatch) => {\r\n try {\r\n dispatch({\r\n type:USER_LOGIN_REQUEST\r\n })\r\n\r\n dispatch({\r\n type: USER_LOGIN_SUCCESS,\r\n payload:data\r\n })\r\n\r\n localStorage.setItem('userInfo',JSON.stringify(data))\r\n \r\n } catch (error) {\r\n console.log(error);\r\n dispatch({\r\n type: USER_LOGIN_FAIL,\r\n payload: error.response && error.response.data.message ? error.response.data.message : error.message\r\n \r\n })\r\n }\r\n}\r\n\r\n\r\nexport const logout = () => (dispatch) => {\r\n localStorage.removeItem('userInfo')\r\n dispatch({\r\n type:USER_LOGOUT\r\n })\r\n dispatch({\r\n type:USER_LIST_RESET\r\n })\r\n}\r\n\r\n\r\nexport const register = (name,email,password,confirmPassword) => async (dispatch) => {\r\n\r\n try {\r\n dispatch({\r\n type:USER_REGISTER_REQUEST\r\n })\r\n \r\n const config = {\r\n headers: {\r\n 'Content-Type':'application/json'\r\n }\r\n }\r\n\r\n const { data } = await axios.post(`${baseUrl}/api/users/register`,\r\n {name,email,password,confirmPassword},config)\r\n\r\n dispatch({\r\n type: USER_REGISTER_SUCCESS,\r\n payload:data\r\n })\r\n \r\n } catch (error) {\r\n console.log(error);\r\n dispatch({\r\n type: USER_REGISTER_FAIL,\r\n payload: error.response && error.response.data.message ? error.response.data.message : error.message\r\n \r\n })\r\n \r\n }\r\n \r\n}\r\n\r\n\r\nexport const getUserDetails = (id) => async (dispatch,getState) => {\r\n\r\n try {\r\n dispatch({\r\n type:USER_DETAILS_REQUEST\r\n })\r\n\r\n const { userLogin: { userInfo } } = getState()\r\n \r\n \r\n const config = {\r\n headers: {\r\n 'Content-Type': 'application/json',\r\n Authorization: `Bearer ${userInfo.token}`\r\n }\r\n }\r\n\r\n const { data } = await axios.get(`${baseUrl}/api/users/${id}`, config)\r\n\r\n dispatch({\r\n type: USER_DETAILS_SUCCESS,\r\n payload:data\r\n })\r\n \r\n } catch (error) {\r\n console.log(error);\r\n dispatch({\r\n type: USER_DETAILS_FAIL,\r\n payload: error.response && error.response.data.message ? error.response.data.message : error.message\r\n \r\n })\r\n \r\n }\r\n \r\n}\r\n\r\n\r\nexport const updateUserProfile = (user) => async (dispatch,getState) => {\r\n\r\n try {\r\n dispatch({\r\n type:USER_PROFILE_UPDATE_REQUEST\r\n })\r\n\r\n const { userLogin: { userInfo } } = getState()\r\n \r\n \r\n const config = {\r\n headers: {\r\n 'Content-Type': 'application/json',\r\n Authorization: `Bearer ${userInfo.token}`\r\n }\r\n }\r\n\r\n const { data } = await axios.put(`${baseUrl}/api/users/profile`,user, config)\r\n \r\n console.log(data);\r\n\r\n dispatch({\r\n type: USER_PROFILE_UPDATE_SUCCESS,\r\n payload:data\r\n })\r\n \r\n } catch (error) {\r\n console.log(error);\r\n dispatch({\r\n type: USER_PROFILE_UPDATE_FAIL,\r\n payload: error.response && error.response.data.message ? error.response.data.message : error.message\r\n \r\n })\r\n \r\n }\r\n \r\n}\r\n\r\n\r\nexport const getUserList = () => async (dispatch,getState) => {\r\n\r\n try {\r\n dispatch({\r\n type:USER_LIST_REQUEST\r\n })\r\n\r\n const { userLogin: { userInfo } } = getState()\r\n \r\n \r\n const config = {\r\n headers: {\r\n 'Content-Type': 'application/json',\r\n Authorization: `Bearer ${userInfo.token}`\r\n }\r\n }\r\n\r\n const { data } = await axios.get(`${baseUrl}/api/users`,config)\r\n\r\n dispatch({\r\n type: USER_LIST_SUCCESS,\r\n payload:data\r\n })\r\n \r\n } catch (error) {\r\n console.log(error);\r\n dispatch({\r\n type: USER_LIST_FAIL,\r\n payload: error.response && error.response.data.message ? error.response.data.message : error.message\r\n \r\n })\r\n \r\n }\r\n \r\n}\r\n\r\n\r\nexport const deleteUser = (id) => async (dispatch,getState) => {\r\n\r\n try {\r\n dispatch({\r\n type:USER_DELETE_REQUEST\r\n })\r\n\r\n const { userLogin: { userInfo } } = getState()\r\n \r\n \r\n const config = {\r\n headers: {\r\n 'Content-Type': 'application/json',\r\n Authorization: `Bearer ${userInfo.token}`\r\n }\r\n }\r\n\r\n await axios.delete(`${baseUrl}/api/users/${id}`,config)\r\n\r\n dispatch({\r\n type: USER_DELETE_SUCCESS,\r\n })\r\n \r\n } catch (error) {\r\n console.log(error);\r\n dispatch({\r\n type: USER_DELETE_FAIL,\r\n payload: error.response && error.response.data.message ? error.response.data.message : error.message\r\n \r\n })\r\n \r\n }\r\n \r\n}","import React from 'react'\r\nimport { Container, Nav, Navbar, NavDropdown } from 'react-bootstrap'\r\nimport { useDispatch, useSelector } from 'react-redux'\r\nimport { LinkContainer } from 'react-router-bootstrap'\r\nimport { useHistory } from 'react-router-dom'\r\nimport { logout } from '../../redux/actions/userActions'\r\nimport { toastErrorMessage } from './ToastMessage'\r\n\r\n\r\nfunction Header() {\r\n const { userInfo } = useSelector(state => state.userLogin)\r\n const dispatch = useDispatch()\r\n const history = useHistory()\r\n\r\n const handleLogout = () => {\r\n dispatch(logout())\r\n history.push(\"/market\")\r\n toastErrorMessage(\"You're logged out\")\r\n }\r\n \r\n return (\r\n <>\r\n \r\n \r\n \r\n Plant Land\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n >\r\n )\r\n}\r\n\r\nexport default Header\r\n","export const CART_ADD_ITEM = \"CART_ADD_ITEM\";\r\nexport const CART_REMOVE_ITEM = \"CART_REMOVE_ITEM\";\r\nexport const CART_SAVE_SHIPPING_ADDRESS = \"CART_SAVE_SHIPPING_ADDRESS\";\r\nexport const CART_SAVE_PAYMENT_METHOD = \"CART_SAVE_PAYMENT_METHOD\";\r\nexport const CART_RESET = 'CART_RESET'\r\n","import axios from \"axios\";\r\nimport {\r\n CART_ADD_ITEM,\r\n CART_REMOVE_ITEM, CART_SAVE_PAYMENT_METHOD, CART_SAVE_SHIPPING_ADDRESS\r\n} from \"../../constants/cartConstants\";\r\n\r\nconst baseUrl = 'https://plantland.herokuapp.com'\r\n\r\nexport const addToCart = (id, qty) => async (dispatch, getState) => {\r\n try {\r\n const { data } = await axios.get(`${baseUrl}/api/products/${id}`);\r\n\r\n dispatch({\r\n type: CART_ADD_ITEM,\r\n payload: {\r\n productId: data._id,\r\n name: data.name,\r\n image: data.image,\r\n price: data.price,\r\n countInStock: data.countInStock,\r\n qty,\r\n },\r\n });\r\n\r\n localStorage.setItem(\r\n \"cartItems\",\r\n JSON.stringify(getState().cart.cartItems)\r\n );\r\n } catch (error) {\r\n console.log(\"Gg\", error);\r\n }\r\n};\r\n\r\nexport const removeFromCart = (id) => async (dispatch, getState) => {\r\n try {\r\n dispatch({\r\n type: CART_REMOVE_ITEM,\r\n payload: id,\r\n });\r\n\r\n localStorage.setItem(\r\n \"cartItems\",\r\n JSON.stringify(getState().cart.cartItems)\r\n );\r\n } catch (error) {\r\n console.log(\"Gg\", error);\r\n }\r\n};\r\n\r\nexport const saveShippingAddress = (data) => (dispatch) => {\r\n dispatch({\r\n type: CART_SAVE_SHIPPING_ADDRESS,\r\n payload: data,\r\n });\r\n\r\n localStorage.setItem(\"shippingAddress\", JSON.stringify(data));\r\n};\r\n\r\nexport const savePaymentMethod = (data) => (dispatch) => {\r\n dispatch({\r\n type: CART_SAVE_PAYMENT_METHOD,\r\n payload: data,\r\n });\r\n\r\n localStorage.setItem(\"paymentMethod\", JSON.stringify(data));\r\n};\r\n","import React, { useEffect } from 'react'\r\nimport { Button, Card, Col, FormControl, Image, ListGroup, Row } from 'react-bootstrap'\r\nimport { useDispatch, useSelector } from 'react-redux'\r\nimport { Link } from 'react-router-dom'\r\nimport { addToCart, removeFromCart } from '../../../redux/actions/cartActions'\r\nimport Message from '../Message'\r\n\r\n\r\nfunction CartScreen({ match, history, location }) {\r\n const dispatch = useDispatch()\r\n \r\n const productId = match.params.id\r\n const qty = location.search ? Number(location.search.split(\"=\")[1]) : 1\r\n\r\n const {cartItems} = useSelector(state => state.cart)\r\n\r\n useEffect(() => {\r\n if(productId)\r\n dispatch(addToCart(productId,qty))\r\n }, [dispatch, productId, qty])\r\n \r\n const removeFromCartHandler = (id) => {\r\n dispatch(removeFromCart(id))\r\n }\r\n const checkoutHandler = () => {\r\n history.push(\"/login?redirect=shipping\")\r\n }\r\n\r\n return (\r\n \r\n \r\n Shopping Cart
\r\n \r\n {cartItems.length === 0 ? Your cart is empty. Go Back : (\r\n \r\n {cartItems.map(item => (\r\n \r\n \r\n \r\n \r\n \r\n \r\n {item.name}\r\n \r\n \r\n ৳ {item.price}\r\n \r\n \r\n dispatch(addToCart(item.productId,Number(e.target.value)))}\r\n >\r\n {[...Array(item.countInStock).keys()].map(p => (\r\n \r\n ))}\r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n ))}\r\n \r\n \r\n )}\r\n \r\n \r\n \r\n \r\n \r\n \r\n Subtotal ({cartItems.reduce((acc,item)=>acc+item.qty,0)}) items
\r\n \r\n \r\n \r\n Price \r\n {cartItems.reduce((acc,item)=>acc + item.qty * item.price,0).toFixed(2)} \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n )\r\n}\r\n\r\nexport default CartScreen\r\n","import React from 'react'\r\nimport { Col, Container, Row } from 'react-bootstrap'\r\n\r\nfunction FormContainer({children}) {\r\n return (\r\n \r\n \r\n {children} \r\n
\r\n \r\n )\r\n}\r\n\r\nexport default FormContainer\r\n","import axios from 'axios'\r\nimport React, { useState } from 'react'\r\nimport { Button, Form } from 'react-bootstrap'\r\nimport FormContainer from '../FormContainer'\r\nimport Message from '../Message'\r\nimport { toastInfoMessage } from '../ToastMessage'\r\n\r\nfunction ForgetPasswordScreen() {\r\n const [email, setEmail] = useState('')\r\n const [error, setError] = useState('')\r\n\r\n const handleSubmit = async (e) => {\r\n e.preventDefault()\r\n\r\n const config = {\r\n headers: {\r\n 'Content-Type': 'application/json'\r\n }\r\n }\r\n \r\n try {\r\n await axios.post(\"/api/users/forget-password\", { email }, config)\r\n toastInfoMessage(\"Instructions to reset your password has been sent to your email\")\r\n \r\n } catch (error) {\r\n setError(error.response && error.response.data.message ? error.response.data.message : error.message)\r\n setEmail('')\r\n setTimeout(() => {\r\n setError(\"\")\r\n }, 3000);\r\n\r\n }\r\n }\r\n return (\r\n \r\n Forget Password ?
\r\n Enter the email address you used when you joined and we’ll send you instructions to reset your password.
\r\n {error && {error}}\r\n\r\n \r\n Email Address\r\n setEmail(e.target.value)} />\r\n \r\n\r\n \r\n \r\n \r\n )\r\n}\r\n\r\nexport default ForgetPasswordScreen\r\n","import axios from 'axios';\r\nimport { PRODUCT_CREATE_FAIL, PRODUCT_CREATE_REQUEST, PRODUCT_CREATE_REVIEW_FAIL, PRODUCT_CREATE_REVIEW_REQUEST, PRODUCT_CREATE_REVIEW_SUCCESS, PRODUCT_CREATE_SUCCESS, PRODUCT_DELETE_FAIL, PRODUCT_DELETE_REQUEST, PRODUCT_DELETE_SUCCESS, PRODUCT_DETAILS_FAIL, PRODUCT_DETAILS_REQUEST, PRODUCT_DETAILS_SUCCESS, PRODUCT_LIST_FAIL, PRODUCT_LIST_REQUEST, PRODUCT_LIST_SUCCESS, PRODUCT_UPDATE_FAIL, PRODUCT_UPDATE_REQUEST, PRODUCT_UPDATE_SUCCESS } from '../../constants/productConstants';\r\n\r\nconst baseUrl = 'https://plantland.herokuapp.com'\r\n\r\n// @ GET products\r\nexport const fetchProducts = (keyword='',pageNumber='',category='',sort='') => async (dispatch) => {\r\n try {\r\n dispatch({ type: PRODUCT_LIST_REQUEST })\r\n\r\n const { data } = await axios.get(`${baseUrl}/api/products?category=${category}&keyword=${keyword}&pageNumber=${pageNumber}&sort=${sort}`)\r\n\r\n dispatch({\r\n type: PRODUCT_LIST_SUCCESS,\r\n payload: data\r\n })\r\n \r\n } catch (error) {\r\n console.log(error);\r\n dispatch({\r\n type: PRODUCT_LIST_FAIL,\r\n payload: error.response && error.response.data.message ? error.response.data.message : error.message\r\n })\r\n }\r\n\r\n \r\n}\r\n\r\n// @ GET one product\r\nexport const fetchProductById = (id) => async (dispatch) => {\r\n try {\r\n \r\n dispatch({ type: PRODUCT_DETAILS_REQUEST })\r\n\r\n const { data } = await axios.get(`${baseUrl}/api/products/${id}`)\r\n dispatch({\r\n type: PRODUCT_DETAILS_SUCCESS,\r\n payload: data\r\n })\r\n \r\n } catch (error) {\r\n console.log(error);\r\n dispatch({\r\n type: PRODUCT_DETAILS_FAIL,\r\n payload: error.response && error.response.data.message ? error.response.data.message : error.message\r\n })\r\n }\r\n\r\n}\r\n\r\n\r\n// @ Create product review\r\nexport const createProductReview = (productId,review) => async (dispatch,getState) => {\r\n try {\r\n dispatch({ type: PRODUCT_CREATE_REVIEW_REQUEST })\r\n\r\n const { userLogin: { userInfo } } = getState()\r\n const config = {\r\n headers: {\r\n 'Content-Type': 'application/json',\r\n Authorization: `Bearer ${userInfo.token}`\r\n }\r\n }\r\n\r\n await axios.post(`${baseUrl}/api/products/${productId}/reviews`,review,config)\r\n\r\n dispatch({\r\n type: PRODUCT_CREATE_REVIEW_SUCCESS,\r\n })\r\n \r\n \r\n } catch (error) {\r\n console.log(error);\r\n dispatch({\r\n type: PRODUCT_CREATE_REVIEW_FAIL,\r\n payload: error.response && error.response.data.message ? error.response.data.message : error.message\r\n })\r\n }\r\n\r\n}\r\n\r\n// Delete products\r\nexport const deleteProduct = (id) => async (dispatch,getState) => {\r\n\r\n try {\r\n dispatch({\r\n type:PRODUCT_DELETE_REQUEST\r\n })\r\n\r\n const { userLogin: { userInfo } } = getState()\r\n \r\n \r\n const config = {\r\n headers: {\r\n 'Content-Type': 'application/json',\r\n Authorization: `Bearer ${userInfo.token}`\r\n }\r\n }\r\n\r\n await axios.delete(`${baseUrl}/api/products/${id}`,config)\r\n\r\n dispatch({\r\n type: PRODUCT_DELETE_SUCCESS,\r\n })\r\n \r\n } catch (error) {\r\n console.log(error);\r\n dispatch({\r\n type: PRODUCT_DELETE_FAIL,\r\n payload: error.response && error.response.data.message ? error.response.data.message : error.message\r\n \r\n })\r\n \r\n }\r\n \r\n}\r\n\r\n// Create products\r\nexport const createProduct = () => async (dispatch,getState) => {\r\n\r\n try {\r\n dispatch({\r\n type:PRODUCT_CREATE_REQUEST\r\n })\r\n\r\n const { userLogin: { userInfo } } = getState()\r\n \r\n \r\n const config = {\r\n headers: {\r\n 'Content-Type': 'application/json',\r\n Authorization: `Bearer ${userInfo.token}`\r\n }\r\n }\r\n\r\n const { data } = await axios.post(`/api/products`,{},config)\r\n\r\n dispatch({\r\n type: PRODUCT_CREATE_SUCCESS,\r\n payload:data\r\n })\r\n \r\n } catch (error) {\r\n console.log(error);\r\n dispatch({\r\n type: PRODUCT_CREATE_FAIL,\r\n payload: error.response && error.response.data.message ? error.response.data.message : error.message\r\n \r\n })\r\n \r\n }\r\n \r\n}\r\n\r\n// Update Products\r\nexport const updateProduct = (product) => async (dispatch,getState) => {\r\n\r\n try {\r\n dispatch({\r\n type:PRODUCT_UPDATE_REQUEST\r\n })\r\n\r\n const { userLogin: { userInfo } } = getState()\r\n \r\n \r\n const config = {\r\n headers: {\r\n 'Content-Type': 'application/json',\r\n Authorization: `Bearer ${userInfo.token}`\r\n }\r\n }\r\n\r\n const { data } = await axios.put(`/api/products/${product._id}`,product,config)\r\n\r\n dispatch({\r\n type: PRODUCT_UPDATE_SUCCESS,\r\n payload:data\r\n })\r\n \r\n } catch (error) {\r\n console.log(error);\r\n dispatch({\r\n type: PRODUCT_UPDATE_FAIL,\r\n payload: error.response && error.response.data.message ? error.response.data.message : error.message\r\n \r\n })\r\n \r\n }\r\n \r\n}\r\n","import React from 'react'\r\nimport { Dropdown, DropdownButton } from 'react-bootstrap'\r\n\r\nfunction FilterCategory({ handleCategoryChange }) {\r\n const categoryList = [\"Plant\",\"Flower\",\"Seed\",\"Pesticide\",\"Tool\"]\r\n return (\r\n <>\r\n \r\n >\r\n\r\n )\r\n}\r\n\r\nexport default FilterCategory\r\n","import React from 'react'\r\nimport { Dropdown, DropdownButton } from 'react-bootstrap'\r\n\r\nfunction FilterCategory({handleSortChange}) {\r\n return (\r\n <>\r\n \r\n >\r\n\r\n )\r\n}\r\n\r\nexport default FilterCategory\r\n","import React from 'react';\r\nimport { Pagination } from 'react-bootstrap';\r\nimport { LinkContainer } from 'react-router-bootstrap';\r\n\r\nfunction Paginate({ page, numOfPages, keyword = '', sort = '', isAdmin = false }) {\r\n return (\r\n numOfPages > 1 && (\r\n \r\n {[...Array(numOfPages).keys()].map(p => (\r\n \r\n {p + 1}\r\n \r\n ))}\r\n \r\n )\r\n\r\n )\r\n}\r\n\r\nexport default Paginate\r\n","import React from 'react'\r\nimport '../../styles/ecommerce.css'\r\n\r\nfunction Rating({ value, text }) {\r\n return (\r\n \r\n
\r\n \r\n =1 ? 'fas fa-star': value >=0.5 ? 'fas fa-star-half-alt' : 'far fas-star'}>\r\n \r\n \r\n =2 ? 'fas fa-star': value >=1.5 ? 'fas fa-star-half-alt' : 'far fas-star'}>\r\n \r\n \r\n =3 ? 'fas fa-star': value >=2.5 ? 'fas fa-star-half-alt' : 'far fas-star'}>\r\n \r\n \r\n =4 ? 'fas fa-star': value >=3.5 ? 'fas fa-star-half-alt' : 'far fas-star'}>\r\n \r\n \r\n =5 ? 'fas fa-star': value >=4.5 ? 'fas fa-star-half-alt' : 'far fas-star'}>\r\n \r\n
\r\n\r\n {text !== 'hidden' && (\r\n
\r\n {text ? `${text} reviews` : 'No reviews yet'}\r\n
\r\n )}\r\n\r\n
\r\n )\r\n}\r\n\r\nexport default Rating\r\n","import React from 'react'\r\nimport { Button, Card } from 'react-bootstrap'\r\nimport { Link, useHistory } from 'react-router-dom'\r\nimport \"../../styles/ecommerce.css\"\r\nimport Rating from './Rating'\r\n\r\nfunction Product({ product }) {\r\n\r\n const history = useHistory()\r\n const HandleViewDetails = (id) => {\r\n history.push(`/product/${id}`)\r\n }\r\n \r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n {product.name} \r\n \r\n \r\n \r\n\r\n \r\n ৳ {product.price}\r\n \r\n\r\n \r\n \r\n \r\n )\r\n}\r\n\r\nexport default Product\r\n","import React, { useState } from 'react'\r\nimport { Button, Form } from 'react-bootstrap'\r\nimport { useHistory } from 'react-router-dom'\r\n\r\nfunction SearchBox() {\r\n const [keyword, setKeyword] = useState('')\r\n const history = useHistory()\r\n\r\n const handleSubmit = (e) => {\r\n e.preventDefault()\r\n if (keyword.trim()) {\r\n history.push(`/search/${keyword}`)\r\n }else history.push(\"/market\")\r\n }\r\n\r\n return (\r\n <>\r\n setKeyword(e.target.value)}\r\n >\r\n \r\n \r\n >\r\n )\r\n}\r\n\r\nexport default SearchBox\r\n","import React, { useEffect, useState } from 'react'\r\nimport { Col, Row } from 'react-bootstrap'\r\nimport { useDispatch, useSelector } from 'react-redux'\r\nimport { fetchProducts } from '../../../redux/actions/productActions'\r\nimport \"../../../styles/ecommerce.css\"\r\nimport FilterCategory from '../FilterCategory'\r\nimport FilterSort from \"../FilterSort\"\r\nimport Loader from '../Loader'\r\nimport Message from '../Message'\r\nimport Paginate from '../Paginate'\r\nimport Product from '../Product'\r\nimport SearchBox from '../SearchBox'\r\n\r\n\r\nfunction HomeScreen({ match }) {\r\n \r\n const [productCategory, setProductCategory] = useState('')\r\n const [productSort, setProductSort] = useState('')\r\n\r\n const dispatch = useDispatch()\r\n const productList = useSelector(state => state.productList)\r\n const { loading, error, products, page, numOfPages } = productList\r\n \r\n const keyword = match.params.keyword\r\n const pageNumber = match.params.pageNumber || 1\r\n const category = productCategory\r\n const sort = productSort\r\n\r\n useEffect(() => {\r\n dispatch(fetchProducts(keyword,pageNumber,category,sort))\r\n }, [dispatch,keyword,pageNumber,category,sort])\r\n\r\n const handleCategoryChange = (e) => {\r\n setProductCategory(e.toLowerCase());\r\n }\r\n\r\n const handleSortChange = (e) => {\r\n setProductSort(e);\r\n }\r\n\r\n return (\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n
Latest Products
\r\n\r\n {loading ?
: error ?
{error} : (\r\n <>\r\n
\r\n {products.map(product => (\r\n \r\n \r\n \r\n ))}\r\n
\r\n
\r\n >\r\n \r\n )}\r\n \r\n\r\n \r\n \r\n
\r\n )\r\n}\r\n\r\nexport default HomeScreen\r\n","import React from 'react'\r\nimport { Button } from 'react-bootstrap'\r\nimport { GoogleLogin } from 'react-google-login'\r\nimport { useDispatch } from 'react-redux'\r\nimport { useHistory } from 'react-router-dom'\r\nimport { googleLogin } from '../../redux/actions/userActions'\r\n\r\nfunction GoogleAuth() {\r\n \r\n const dispatch = useDispatch()\r\n const history = useHistory()\r\n\r\n const googleSuccess = async (res) => {\r\n // console.log(res);\r\n const user = res?.profileObj;\r\n const token = res?.tokenId\r\n \r\n try {\r\n const data = { user, token }\r\n dispatch(googleLogin(data))\r\n history.push(\"/market\")\r\n } catch (error) {\r\n console.log(error);\r\n }\r\n \r\n }\r\n const googleFailure = () => {\r\n console.log(\"Google Sign in was unsuccessful. Try again later\");\r\n }\r\n return (\r\n \r\n (\r\n \r\n )}\r\n onSuccess={googleSuccess}\r\n onFailure={googleFailure}\r\n cookiePolicy=\"single_host_origin\"\r\n /> \r\n
\r\n )\r\n}\r\n\r\nexport default GoogleAuth\r\n","import React, { useEffect, useState } from 'react'\r\nimport { Button, Col, Form, Row } from 'react-bootstrap'\r\nimport { useDispatch, useSelector } from 'react-redux'\r\nimport { Link } from 'react-router-dom'\r\nimport { login } from '../../../redux/actions/userActions'\r\nimport FormContainer from '../FormContainer'\r\nimport GoogleAuth from '../GoogleAuth'\r\nimport Loader from '../Loader'\r\nimport Message from '../Message'\r\nimport { toastInfoMessage } from '../ToastMessage'\r\n\r\nfunction LoginScreen({location,history}) {\r\n\r\n const [email, setEmail] = useState('')\r\n const [password, setPassword] = useState('')\r\n\r\n const redirect = location.search ? location.search.split(\"=\")[1] : \"/market\"\r\n\r\n const dispatch = useDispatch()\r\n const userLogin = useSelector(state => state.userLogin)\r\n const { loading, error, userInfo } = userLogin\r\n \r\n useEffect(() => {\r\n if (userInfo) {\r\n toastInfoMessage(`Hey, nice to see you back ${userInfo.user.name}`)\r\n history.push(redirect)\r\n }\r\n }, [history,redirect,userInfo])\r\n\r\n const handleSubmit = (e) => {\r\n e.preventDefault()\r\n dispatch(login(email, password))\r\n }\r\n\r\n return (\r\n \r\n Sign In
\r\n {error && {error}}\r\n {loading && }\r\n \r\n Email Address\r\n setEmail(e.target.value)} />\r\n \r\n\r\n \r\n Password\r\n setPassword(e.target.value)} />\r\n \r\n Forget Password ?\r\n\r\n \r\n \r\n\r\n \r\n Or
\r\n
\r\n\r\n \r\n \r\n
\r\n\r\n \r\n \r\n Don't have an Account ? Create one\r\n \r\n
\r\n \r\n \r\n )\r\n}\r\n\r\nexport default LoginScreen\r\n","export const ORDER_CREATE_REQUEST = \"ORDER_CREATE_REQUEST\";\r\nexport const ORDER_CREATE_SUCCESS = \"ORDER_CREATE_SUCCESS\";\r\nexport const ORDER_CREATE_FAIL = \"ORDER_CREATE_FAIL\";\r\n\r\nexport const ORDER_DETAILS_REQUEST = \"ORDER_DETAILS_REQUEST\";\r\nexport const ORDER_DETAILS_SUCCESS = \"ORDER_DETAILS_SUCCESS\";\r\nexport const ORDER_DETAILS_FAIL = \"ORDER_DETAILS_FAIL\";\r\n\r\nexport const ORDER_MY_LIST_REQUEST = \"ORDER_MY_LIST_REQUEST\";\r\nexport const ORDER_MY_LIST_SUCCESS = \"ORDER_MY_LIST_SUCCESS\";\r\nexport const ORDER_MY_LIST_FAIL = \"ORDER_MY_LIST_FAIL\";\r\n\r\nexport const ORDER_LIST_REQUEST = \"ORDER_LIST_REQUEST\";\r\nexport const ORDER_LIST_SUCCESS = \"ORDER_LIST_SUCCESS\";\r\nexport const ORDER_LIST_FAIL = \"ORDER_LIST_FAIL\";\r\n\r\nexport const ORDER_PAY_REQUEST = \"ORDER_PAY_REQUEST\";\r\nexport const ORDER_PAY_SUCCESS = \"ORDER_PAY_SUCCESS\";\r\nexport const ORDER_PAY_FAIL = \"ORDER_PAY_FAIL\";\r\nexport const ORDER_PAY_RESET = \"ORDER_PAY_RESET\";\r\n\r\nexport const ORDER_DELIVER_REQUEST = \"ORDER_DELIVER_REQUEST\";\r\nexport const ORDER_DELIVER_SUCCESS = \"ORDER_DELIVER_SUCCESS\";\r\nexport const ORDER_DELIVER_FAIL = \"ORDER_DELIVER_FAIL\";\r\nexport const ORDER_DELIVER_RESET = \"ORDER_DELIVER_RESET\";\r\n\r\nexport const ORDER_DATA_REQUEST = \"ORDER_DATA_REQUEST\";\r\nexport const ORDER_DATA_SUCCESS = \"ORDER_DATA_SUCCESS\";\r\nexport const ORDER_DATA_FAIL = \"ORDER_DATA_FAIL\";\r\n\r\nexport const ORDER_SALE_DATA_REQUEST = \"ORDER_SALE_DATA_REQUEST\";\r\nexport const ORDER_SALE_DATA_SUCCESS = \"ORDER_SALE_DATA_SUCCESS\";\r\nexport const ORDER_SALE_DATA_FAIL = \"ORDER_SALE_DATA_FAIL\";\r\n\r\n\r\n","import axios from \"axios\";\r\nimport {\r\n ORDER_CREATE_FAIL, ORDER_CREATE_REQUEST, ORDER_CREATE_SUCCESS, ORDER_DATA_FAIL, ORDER_DATA_REQUEST, ORDER_DATA_SUCCESS, ORDER_DELIVER_FAIL, ORDER_DELIVER_REQUEST, ORDER_DELIVER_SUCCESS, ORDER_DETAILS_FAIL, ORDER_DETAILS_REQUEST, ORDER_DETAILS_SUCCESS, ORDER_LIST_FAIL, ORDER_LIST_REQUEST, ORDER_LIST_SUCCESS, ORDER_MY_LIST_FAIL, ORDER_MY_LIST_REQUEST, ORDER_MY_LIST_SUCCESS, ORDER_PAY_FAIL, ORDER_PAY_REQUEST, ORDER_PAY_SUCCESS, ORDER_SALE_DATA_FAIL, ORDER_SALE_DATA_REQUEST, ORDER_SALE_DATA_SUCCESS\r\n} from \"../../constants/orderConstants\";\r\n\r\nconst baseUrl = 'https://plantland.herokuapp.com'\r\n\r\nexport const createOrder = (order) => async (dispatch, getState) => {\r\n try {\r\n dispatch({\r\n type: ORDER_CREATE_REQUEST,\r\n });\r\n\r\n const {\r\n userLogin: { userInfo },\r\n } = getState();\r\n\r\n const config = {\r\n headers: {\r\n \"Content-Type\": \"application/json\",\r\n Authorization: `Bearer ${userInfo.token}`,\r\n },\r\n };\r\n\r\n const { data } = await axios.post(`${baseUrl}/api/orders`, order, config);\r\n\r\n dispatch({\r\n type: ORDER_CREATE_SUCCESS,\r\n payload: data,\r\n });\r\n /* dispatch({\r\n type: CART_CLEAR_ITEMS,\r\n payload: data,\r\n }) */\r\n /* localStorage.removeItem('cartItems') */\r\n } catch (error) {\r\n console.log(error);\r\n dispatch({\r\n type: ORDER_CREATE_FAIL,\r\n payload:\r\n error.response && error.response.data.message\r\n ? error.response.data.message\r\n : error.message,\r\n });\r\n /* if (message === 'Not authorized, token failed') {\r\n dispatch(logout())\r\n }\r\n dispatch({\r\n type: ORDER_CREATE_FAIL,\r\n payload: message,\r\n }) */\r\n }\r\n};\r\n\r\n\r\nexport const getOrderList = () => async (dispatch,getState) => {\r\n\r\n try {\r\n dispatch({\r\n type:ORDER_LIST_REQUEST\r\n })\r\n\r\n const { userLogin: { userInfo } } = getState()\r\n \r\n \r\n const config = {\r\n headers: {\r\n 'Content-Type': 'application/json',\r\n Authorization: `Bearer ${userInfo.token}`\r\n }\r\n }\r\n\r\n const { data } = await axios.get(`${baseUrl}/api/orders`,config)\r\n\r\n dispatch({\r\n type: ORDER_LIST_SUCCESS,\r\n payload:data\r\n })\r\n \r\n } catch (error) {\r\n console.log(error);\r\n dispatch({\r\n type: ORDER_LIST_FAIL,\r\n payload: error.response && error.response.data.message ? error.response.data.message : error.message\r\n \r\n })\r\n \r\n }\r\n \r\n}\r\n\r\nexport const getMyOrders = () => async (dispatch,getState) => {\r\n\r\n try {\r\n dispatch({\r\n type:ORDER_MY_LIST_REQUEST\r\n })\r\n\r\n const { userLogin: { userInfo } } = getState()\r\n \r\n \r\n const config = {\r\n headers: {\r\n 'Content-Type': 'application/json',\r\n Authorization: `Bearer ${userInfo.token}`\r\n }\r\n }\r\n\r\n const { data } = await axios.get(`${baseUrl}/api/orders/my-orders`,config)\r\n\r\n dispatch({\r\n type: ORDER_MY_LIST_SUCCESS,\r\n payload:data\r\n })\r\n \r\n } catch (error) {\r\n console.log(error);\r\n dispatch({\r\n type: ORDER_MY_LIST_FAIL,\r\n payload: error.response && error.response.data.message ? error.response.data.message : error.message\r\n \r\n })\r\n \r\n }\r\n \r\n}\r\n\r\nexport const getOrderDetails = (id) => async (dispatch,getState) => {\r\n\r\n try {\r\n \r\n dispatch({\r\n type:ORDER_DETAILS_REQUEST\r\n })\r\n\r\n const { userLogin: { userInfo } } = getState()\r\n \r\n \r\n const config = {\r\n headers: {\r\n 'Content-Type': 'application/json',\r\n Authorization: `Bearer ${userInfo.token}`\r\n }\r\n \r\n }\r\n \r\n\r\n const { data } = await axios.get(`${baseUrl}/api/orders/${id}`,config)\r\n dispatch({\r\n type: ORDER_DETAILS_SUCCESS,\r\n payload:data\r\n })\r\n \r\n } catch (error) {\r\n console.log(error);\r\n dispatch({\r\n type: ORDER_DETAILS_FAIL,\r\n payload: error.response && error.response.data.message ? error.response.data.message : error.message\r\n \r\n })\r\n \r\n }\r\n}\r\n\r\nexport const payOrder = (id,paymentResult) => async (dispatch,getState) => {\r\n\r\n try {\r\n dispatch({\r\n type:ORDER_PAY_REQUEST\r\n })\r\n\r\n const { userLogin: { userInfo } } = getState()\r\n \r\n \r\n const config = {\r\n headers: {\r\n 'Content-Type': 'application/json',\r\n Authorization: `Bearer ${userInfo.token}`\r\n }\r\n \r\n }\r\n\r\n const { data } = await axios.put(`${baseUrl}/api/orders/${id}/pay`,paymentResult,config)\r\n\r\n console.log(data);\r\n dispatch({\r\n type: ORDER_PAY_SUCCESS,\r\n payload:data\r\n })\r\n \r\n } catch (error) {\r\n console.log(error);\r\n dispatch({\r\n type: ORDER_PAY_FAIL,\r\n payload: error.response && error.response.data.message ? error.response.data.message : error.message\r\n \r\n })\r\n \r\n }\r\n \r\n}\r\n\r\nexport const deliverOrder = (order) => async (dispatch,getState) => {\r\n\r\n try {\r\n dispatch({\r\n type: ORDER_DELIVER_REQUEST\r\n })\r\n\r\n const { userLogin: { userInfo } } = getState()\r\n \r\n \r\n const config = {\r\n headers: {\r\n 'Content-Type': 'application/json',\r\n Authorization: `Bearer ${userInfo.token}`\r\n }\r\n \r\n }\r\n\r\n const { data } = await axios.put(`${baseUrl}/api/orders/${order._id}/deliver`,{},config)\r\n\r\n console.log(data);\r\n dispatch({\r\n type: ORDER_DELIVER_SUCCESS,\r\n payload:data\r\n })\r\n \r\n } catch (error) {\r\n console.log(error);\r\n dispatch({\r\n type: ORDER_DELIVER_FAIL,\r\n payload: error.response && error.response.data.message ? error.response.data.message : error.message\r\n \r\n })\r\n \r\n }\r\n \r\n}\r\n\r\n\r\n\r\nexport const getOrderData = () => async (dispatch,getState) => {\r\n\r\n try {\r\n dispatch({\r\n type:ORDER_DATA_REQUEST\r\n })\r\n\r\n const { userLogin: { userInfo } } = getState()\r\n \r\n \r\n const config = {\r\n headers: {\r\n 'Content-Type': 'application/json',\r\n Authorization: `Bearer ${userInfo.token}`\r\n }\r\n }\r\n\r\n const { data } = await axios.get(`${baseUrl}/api/orders/order-data`, config)\r\n\r\n dispatch({\r\n type: ORDER_DATA_SUCCESS,\r\n payload:data\r\n })\r\n \r\n } catch (error) {\r\n console.log(error);\r\n dispatch({\r\n type: ORDER_DATA_FAIL,\r\n payload: error.response && error.response.data.message ? error.response.data.message : error.message\r\n \r\n })\r\n \r\n }\r\n \r\n}\r\n\r\n\r\nexport const getSaleData = () => async (dispatch,getState) => {\r\n\r\n try {\r\n dispatch({\r\n type:ORDER_SALE_DATA_REQUEST\r\n })\r\n\r\n const { userLogin: { userInfo } } = getState()\r\n \r\n \r\n const config = {\r\n headers: {\r\n 'Content-Type': 'application/json',\r\n Authorization: `Bearer ${userInfo.token}`\r\n }\r\n }\r\n\r\n const { data } = await axios.get(`${baseUrl}/api/orders/saleDataByYear`, config)\r\n\r\n dispatch({\r\n type: ORDER_SALE_DATA_SUCCESS,\r\n payload:data\r\n })\r\n \r\n } catch (error) {\r\n console.log(error);\r\n dispatch({\r\n type: ORDER_SALE_DATA_FAIL,\r\n payload: error.response && error.response.data.message ? error.response.data.message : error.message\r\n \r\n })\r\n \r\n }\r\n \r\n}","import React from 'react'\r\nimport \"../../styles/ecommerce.css\"\r\nfunction Sidebar() {\r\n return (\r\n \r\n )\r\n}\r\n\r\nexport default Sidebar\r\n","import React, { useEffect } from 'react'\r\nimport { Col, Row, Table } from 'react-bootstrap'\r\nimport { useDispatch, useSelector } from 'react-redux'\r\nimport { getOrderData } from '../../../redux/actions/orderActions'\r\nimport \"../../../styles/ecommerce.css\"\r\nimport Loader from \"../Loader\"\r\nimport Message from \"../Message\"\r\nimport Sidebar from \"../Sidebar\"\r\n\r\n\r\nfunction OrderDataScreen({history}) {\r\n\r\n const dispatch = useDispatch()\r\n const { userInfo: { user } } = useSelector(state => state.userLogin)\r\n\r\n const order = useSelector(state => state.orderData)\r\n const { loading, error, orderData } = order\r\n\r\n // if(orderData) console.log(orderData)\r\n\r\n useEffect(() => {\r\n if (user && user.isAdmin) {\r\n dispatch(getOrderData())\r\n } else {\r\n history.push(\"/login\")\r\n }\r\n }, [dispatch,history,user])\r\n\r\n return (\r\n <>\r\n \r\n \r\n \r\n {loading ? : error ? {error} : (\r\n <>\r\n {orderData &&\r\n <>\r\n \r\n\r\n {/* Card-data */}\r\n \r\n
\r\n
\r\n \r\n
Total Orders
\r\n \r\n
{orderData.totalOrder}
\r\n
\r\n \r\n
\r\n \r\n
\r\n \r\n
Order Paid
\r\n \r\n
{orderData.totalPaidOrder}
\r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n
Order Delivered
\r\n \r\n
{orderData.totalDelivered}
\r\n
\r\n
\r\n
\r\n\r\n \r\n \r\n Top Sold Products
\r\n \r\n \r\n \r\n Plant | \r\n Quantity Sold | \r\n
\r\n \r\n \r\n {orderData?.productSaleData?.map(product => (\r\n \r\n {product._id} | \r\n {product.total} | \r\n
\r\n ))}\r\n \r\n
\r\n \r\n \r\n \r\n Top Buyers
\r\n \r\n \r\n \r\n Name | \r\n Email | \r\n Amount | \r\n
\r\n \r\n \r\n {orderData?.customerBuyData?.map(customer => (\r\n \r\n {customer.customer_name} | \r\n {customer.customer_email} | \r\n {Math.ceil(customer.total)} | \r\n
\r\n ))}\r\n \r\n
\r\n \r\n \r\n
\r\n\r\n >\r\n }\r\n \r\n \r\n >\r\n )}\r\n \r\n
\r\n \r\n >\r\n )\r\n}\r\n\r\nexport default OrderDataScreen\r\n","import React, { useEffect } from 'react'\r\nimport { Button, Col, Row, Table } from 'react-bootstrap'\r\nimport { useDispatch, useSelector } from 'react-redux'\r\nimport { LinkContainer } from 'react-router-bootstrap'\r\nimport { getOrderList } from '../../../redux/actions/orderActions'\r\nimport Loader from '../Loader'\r\nimport Message from '../Message'\r\nimport Sidebar from '../Sidebar'\r\n\r\nfunction OrderListScreen({history}) {\r\n\r\n const dispatch = useDispatch()\r\n const { userInfo: { user } } = useSelector(state => state.userLogin)\r\n \r\n \r\n const orderList = useSelector(state => state.orderList)\r\n const { loading, error, orders } = orderList\r\n \r\n useEffect(() => {\r\n if (user && user.isAdmin) {\r\n dispatch(getOrderList())\r\n } else {\r\n history.push(\"/login\")\r\n }\r\n }, [dispatch,history,user])\r\n\r\n\r\n return (\r\n <>\r\n \r\n \r\n \r\n \r\n \r\n {loading ? : error ? {error} : (\r\n <>\r\n All Orders
\r\n \r\n \r\n \r\n USER | \r\n DATE | \r\n TOTAL | \r\n PAID | \r\n Delivered | \r\n
\r\n \r\n \r\n {orders.map(order=>(\r\n \r\n {order.user && order.user.name} | \r\n {order.createdAt.substring(0, 10)} | \r\n ৳ {order.totalPrice} | \r\n \r\n {order?.isPaid ? order.paidAt.substring(0,10) : }\r\n | \r\n \r\n {order?.isDelivered ? order.deliverAt.substring(0,10) : }\r\n | \r\n \r\n \r\n \r\n \r\n | \r\n
\r\n ))}\r\n \r\n
\r\n >\r\n )}\r\n \r\n \r\n
\r\n \r\n > \r\n )\r\n}\r\n\r\nexport default OrderListScreen\r\n","import axios from \"axios\";\r\nimport React, { useEffect, useState } from \"react\";\r\nimport { Button, Card, Col, Image, ListGroup, Row } from \"react-bootstrap\";\r\nimport { PayPalButton } from 'react-paypal-button-v2';\r\nimport { useDispatch, useSelector } from \"react-redux\";\r\nimport { Link } from \"react-router-dom\";\r\nimport { ORDER_DELIVER_RESET, ORDER_PAY_RESET } from '../../../constants/orderConstants';\r\nimport { deliverOrder, getOrderDetails, payOrder } from \"../../../redux/actions/orderActions\";\r\nimport Loader from \"../Loader\";\r\nimport Message from \"../Message\";\r\n\r\nconst OrderScreen = ({ match,history }) => {\r\n\r\n const orderId = match.params.id\r\n const dispatch = useDispatch();\r\n\r\n const [sdkReady, setSdkReady] = useState(false)\r\n \r\n \r\n const orderDetails = useSelector((state) => state.orderDetails);\r\n const { order, loading, error } = orderDetails;\r\n \r\n const orderPay = useSelector((state) => state.orderPay);\r\n const { loading: loadingPay, success: successPay } = orderPay;\r\n \r\n const orderDeliver = useSelector((state) => state.orderDeliver);\r\n const { success: successDeliver } = orderDeliver;\r\n \r\n const userLogin = useSelector((state) => state.userLogin);\r\n const { userInfo:{user} } = userLogin;\r\n\r\n\r\n if (!loading) {\r\n const addDecimals = (num) => {\r\n return (Math.round(num * 100) / 100).toFixed(2);\r\n \r\n };\r\n order.itemsPrice = addDecimals(\r\n order?.orderedItems?.reduce((acc, item) => acc + item.price * item.qty, 0)\r\n ); \r\n }\r\n\r\n\r\n\r\n useEffect(() => {\r\n if (!user) {\r\n return history.push('/login')\r\n }\r\n \r\n const addPayPalScript = async (req, res) => {\r\n const { data: clientId } = await axios.get('/api/config/paypal')\r\n console.log(clientId);\r\n\r\n const script = document.createElement('script')\r\n script.type = 'text/javascript'\r\n script.src = `https://www.paypal.com/sdk/js?client-id=${clientId}`\r\n script.async = true\r\n script.onload = () => {\r\n setSdkReady(true)\r\n }\r\n document.body.appendChild(script)\r\n \r\n }\r\n \r\n if (!order || successPay) {\r\n dispatch({ type: ORDER_PAY_RESET })\r\n dispatch({ type: ORDER_DELIVER_RESET })\r\n dispatch(getOrderDetails(orderId))\r\n } else if (!order.isPaid) {\r\n if (!window.paypal) {\r\n addPayPalScript()\r\n }else setSdkReady(true)\r\n }\r\n\r\n }, [dispatch,order,orderId,successPay,successDeliver,history,user])\r\n\r\n const successPaymentHandler = (paymentResult) => {\r\n dispatch(payOrder(orderId,paymentResult))\r\n }\r\n\r\n const handleDeliver = () => {\r\n dispatch(deliverOrder(order))\r\n }\r\n\r\n // console.log(order._id)\r\n\r\n return loading ? : error ? {error} :\r\n <>\r\n Order {order._id}
\r\n \r\n \r\n \r\n \r\n Shipping
\r\n Name: {order.user.name}
\r\n Email: {order.user.email}
\r\n \r\n Address: \r\n {order.shippingAddress.address}, {order.shippingAddress.city}{\" \"}\r\n {order.shippingAddress.thana}, {order.shippingAddress.houseNumber}\r\n
\r\n {order.isDelivered ? Delivery Done : Not Delivered}\r\n \r\n \r\n \r\n\r\n \r\n Payment Method
\r\n \r\n Method: \r\n {order.paymentMethod}\r\n
\r\n\r\n {order.isPaid ? Payment Done : Not Paid }\r\n \r\n \r\n \r\n Order Items
\r\n {order?.orderedItems?.length === 0 ? (\r\n Order is empty\r\n ) : (\r\n \r\n {order?.orderedItems?.map((item, index) => (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {item.name}\r\n \r\n \r\n \r\n {item.qty} x ৳{item.price} = ৳{item.qty * item.price}\r\n \r\n
\r\n \r\n ))}\r\n \r\n )}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Order Summary
\r\n \r\n \r\n \r\n Items\r\n ৳{order.itemsPrice}\r\n
\r\n \r\n \r\n \r\n Delivery Charge\r\n ৳{order.shippingPrice}\r\n
\r\n \r\n\r\n \r\n \r\n Total\r\n ৳{order.totalPrice}\r\n
\r\n \r\n \r\n {user && !user.isAdmin && !order.isPaid && (\r\n \r\n {loadingPay && }\r\n {!sdkReady ? : (\r\n \r\n )}\r\n \r\n \r\n )}\r\n\r\n {user && user.isAdmin && order.isPaid && !order.isDelivered && (\r\n \r\n \r\n \r\n )}\r\n \r\n \r\n \r\n \r\n
\r\n >\r\n \r\n};\r\n\r\nexport default OrderScreen;\r\n","import axios from 'axios'\r\nimport React, { useState } from 'react'\r\nimport { Button, Form } from 'react-bootstrap'\r\nimport FormContainer from '../FormContainer'\r\nimport Message from '../Message'\r\nimport { toastSuccessMessage } from '../ToastMessage'\r\n\r\nfunction ForgetPasswordScreen({match,history}) {\r\n const [password, setPassword] = useState('')\r\n const [confirmPassword, setConfirmPassword] = useState('')\r\n const [error, setError] = useState('')\r\n\r\n const clear = (errorText) => {\r\n setPassword(\"\")\r\n setConfirmPassword(\"\")\r\n setTimeout(() => {\r\n setError(\"\")\r\n }, 3000);\r\n return setError(errorText)\r\n }\r\n\r\n const handleSubmit = async (e) => {\r\n e.preventDefault()\r\n\r\n if (password.length < 6) {\r\n return clear(\"Password must be at least 6 characters\")\r\n } \r\n if (password !== confirmPassword) {\r\n return clear(\"Password doesn't match\")\r\n }\r\n\r\n\r\n const config = {\r\n headers: {\r\n 'Content-Type': 'application/json'\r\n }\r\n }\r\n\r\n \r\n try {\r\n await axios.put(`/api/users/reset-password/${match.params.resetToken}`, { password }, config)\r\n toastSuccessMessage(\"You're password has been updated\")\r\n history.push(\"/login\")\r\n \r\n } catch (error) {\r\n setError(error.response && error.response.data.message ? error.response.data.message : error.message)\r\n setPassword(\"\")\r\n setConfirmPassword(\"\")\r\n setTimeout(() => {\r\n setError(\"\")\r\n }, 3000);\r\n\r\n }\r\n }\r\n return (\r\n \r\n Reset Your Password
\r\n {error && {error}}\r\n \r\n Password\r\n setPassword(e.target.value)} />\r\n \r\n\r\n \r\n Retype Password\r\n setConfirmPassword(e.target.value)} />\r\n \r\n\r\n \r\n \r\n \r\n )\r\n}\r\n\r\nexport default ForgetPasswordScreen\r\n","import React from \"react\";\r\nimport { Nav } from \"react-bootstrap\";\r\nimport { LinkContainer } from \"react-router-bootstrap\";\r\n\r\nconst CheckoutSteps = ({ step1, step2, step3, step4 }) => {\r\n return (\r\n \r\n );\r\n};\r\n\r\nexport default CheckoutSteps;\r\n","import React, { useState } from \"react\";\r\nimport { Form, Button, Col } from \"react-bootstrap\";\r\nimport { useDispatch, useSelector } from \"react-redux\";\r\nimport FormContainer from \"../FormContainer\";\r\nimport CheckoutSteps from \"../CheckoutSteps\";\r\nimport { savePaymentMethod } from \"../../../redux/actions/cartActions\";\r\n\r\nconst PaymentScreen = ({ history }) => {\r\n const cart = useSelector((state) => state.cart);\r\n const { shippingAddress } = cart;\r\n\r\n if (!shippingAddress.address) {\r\n history.push(\"/shipping\");\r\n }\r\n\r\n const [paymentMethod, setPaymentMethod] = useState(\"PayPal\");\r\n\r\n const dispatch = useDispatch();\r\n\r\n const submitHandler = (e) => {\r\n e.preventDefault();\r\n dispatch(savePaymentMethod(paymentMethod));\r\n history.push(\"/placeorder\");\r\n };\r\n\r\n return (\r\n \r\n \r\n Payment Method
\r\n \r\n Select Method \r\n \r\n setPaymentMethod(e.target.value)}\r\n >\r\n setPaymentMethod(e.target.value)}\r\n >\r\n\r\n setPaymentMethod(e.target.value)}\r\n >\r\n \r\n \r\n\r\n \r\n \r\n \r\n );\r\n};\r\n\r\nexport default PaymentScreen;\r\n","import React, { useEffect } from \"react\";\r\nimport { Button, Card, Col, Image, ListGroup, Row } from \"react-bootstrap\";\r\nimport { useDispatch, useSelector } from \"react-redux\";\r\nimport { Link } from \"react-router-dom\";\r\nimport { createOrder } from \"../../../redux/actions/orderActions\";\r\nimport CheckoutSteps from \"../CheckoutSteps\";\r\nimport Message from \"../Message\";\r\nimport { toastSuccessMessage } from \"../ToastMessage\";\r\n\r\nconst PlaceOrderScreen = ({ history }) => {\r\n const dispatch = useDispatch();\r\n\r\n const cart = useSelector((state) => state.cart);\r\n\r\n const orderCreate = useSelector((state) => state.orderCreate);\r\n const { order,success,error } = orderCreate;\r\n\r\n useEffect(() => {\r\n if (success) {\r\n history.push(`/order/${order._id}`);\r\n }\r\n // eslint-disable-next-line\r\n }, [history, success]);\r\n\r\n const placeOrderHandler = () => {\r\n\r\n dispatch(\r\n createOrder({\r\n orderItems: cart.cartItems,\r\n shippingAddress: cart.shippingAddress,\r\n paymentMethod: cart.paymentMethod,\r\n itemsPrice: cart.itemsPrice,\r\n shippingPrice: cart.shippingPrice,\r\n totalPrice: cart.totalPrice,\r\n })\r\n );\r\n toastSuccessMessage(\"You're order has been placed\")\r\n \r\n };\r\n //Calculate Price\r\n const addDecimals = (num) => {\r\n return (Math.round(num * 100) / 100).toFixed(2);\r\n };\r\n\r\n cart.itemsPrice = addDecimals(\r\n cart.cartItems.reduce((acc, item) => acc + item.price * item.qty, 0)\r\n );\r\n cart.shippingPrice = 30;\r\n\r\n cart.totalPrice = Number(cart.itemsPrice) + Number(cart.shippingPrice);\r\n\r\n return (\r\n <>\r\n \r\n \r\n \r\n \r\n \r\n Delivery Location
\r\n \r\n Address:\r\n {cart.shippingAddress.address}, {cart.shippingAddress.city}{\" \"}\r\n {cart.shippingAddress.thana}, {cart.shippingAddress.houseNumber}\r\n
\r\n \r\n\r\n \r\n Payment Method
\r\n Method: \r\n {cart.paymentMethod}\r\n \r\n \r\n Order Items
\r\n {cart.cartItems.length === 0 ? (\r\n Your cart is empty\r\n ) : (\r\n \r\n {cart.cartItems.map((item, index) => (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {item.name}\r\n \r\n \r\n \r\n {item.qty} x ৳{item.price} = ৳{item.qty * item.price}\r\n \r\n
\r\n \r\n ))}\r\n \r\n )}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Order Summary
\r\n \r\n \r\n \r\n Items\r\n ৳{cart.itemsPrice}\r\n
\r\n \r\n \r\n \r\n Delivery Charge\r\n ৳{cart.shippingPrice}\r\n
\r\n \r\n {/* \r\n \r\n Tax\r\n ${cart.taxPrice}\r\n
\r\n */}\r\n \r\n \r\n Total\r\n ৳{cart.totalPrice}\r\n
\r\n \r\n \r\n {error && {error}}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n >\r\n );\r\n};\r\n\r\nexport default PlaceOrderScreen;\r\n","import axios from 'axios'\r\nimport React, { useEffect, useState } from 'react'\r\nimport { Button, Form } from 'react-bootstrap'\r\nimport { useDispatch, useSelector } from 'react-redux'\r\nimport { Link } from 'react-router-dom'\r\nimport { PRODUCT_UPDATE_RESET } from '../../../constants/productConstants'\r\nimport { fetchProductById, updateProduct } from '../../../redux/actions/productActions'\r\nimport FormContainer from '../FormContainer'\r\nimport Loader from '../Loader'\r\nimport Message from '../Message'\r\nimport { toastSuccessMessage } from '../ToastMessage'\r\n\r\nconst ProductEditScreen = ({ match, history }) => {\r\n const productId = match.params.id\r\n\r\n const [name, setName] = useState('')\r\n const [description, setDescription] = useState('')\r\n const [category, setCategory] = useState('')\r\n const [price, setPrice] = useState(0)\r\n const [countInStock, setCountInStock] = useState(0)\r\n const [image, setImage] = useState('')\r\n const [uploading, setUploading] = useState(false)\r\n\r\n const dispatch = useDispatch()\r\n\r\n const productDetails = useSelector((state) => state.productDetails)\r\n const { loading, error, product } = productDetails\r\n const productUpdate = useSelector((state) => state.productUpdate)\r\n const { loading:loadingUpdate, error:errorUpdate, success:successUpdate } = productUpdate\r\n\r\n\r\n useEffect(() => {\r\n if (successUpdate) {\r\n dispatch({ type: PRODUCT_UPDATE_RESET })\r\n toastSuccessMessage(\"Product Updated\")\r\n history.push(\"/admin/productlist\")\r\n\r\n } else {\r\n if (!product.name || product._id !== productId) {\r\n dispatch(fetchProductById(productId))\r\n } else { \r\n setName(product.name)\r\n setDescription(product.description)\r\n setCategory(product.category)\r\n setImage(product.image)\r\n setPrice(product.price)\r\n setCountInStock(product.countInStock)\r\n }\r\n }\r\n\r\n }, [dispatch,product,productId,successUpdate,history])\r\n\r\n const submitHandler = (e) => {\r\n e.preventDefault()\r\n dispatch(updateProduct({\r\n _id: product._id,name,description,image,category,price,countInStock\r\n }))\r\n }\r\n\r\n const handleFileUpload = async (e) => {\r\n const file = e.target.files[0]\r\n const formData = new FormData()\r\n formData.append('image', file)\r\n setUploading(true)\r\n\r\n try {\r\n const config = {\r\n headers: {\r\n 'Content-Type':'multipart/form-data'\r\n }\r\n }\r\n const { data } = await axios.post(`/api/uploads`, formData, config)\r\n console.log(data);\r\n setImage(data)\r\n setUploading(false)\r\n\r\n } catch (error) {\r\n console.log(error)\r\n setUploading(false)\r\n }\r\n }\r\n\r\n return (\r\n <>\r\n \r\n Go Back\r\n \r\n \r\n Edit Product
\r\n {loadingUpdate && }\r\n {errorUpdate && {errorUpdate}}\r\n {loading ? (\r\n \r\n ) : error ? (\r\n {error}\r\n ) : (\r\n \r\n Name\r\n setName(e.target.value)}\r\n >\r\n \r\n\r\n \r\n Description\r\n setDescription(e.target.value)}\r\n >\r\n \r\n\r\n \r\n Category\r\n setCategory(e.target.value)}\r\n >\r\n \r\n \r\n \r\n Enter Image URL\r\n setImage(e.target.value)}\r\n >\r\n \r\n \r\n {uploading && }\r\n \r\n \r\n \r\n Price\r\n setPrice(e.target.value)}\r\n >\r\n \r\n \r\n \r\n Count In Stock\r\n setCountInStock(e.target.value)}\r\n >\r\n \r\n \r\n \r\n )}\r\n \r\n >\r\n )\r\n}\r\n\r\nexport default ProductEditScreen","import React, { useEffect } from 'react'\r\nimport { Button, Col, Row, Table } from 'react-bootstrap'\r\nimport { useDispatch, useSelector } from 'react-redux'\r\nimport { LinkContainer } from 'react-router-bootstrap'\r\nimport { PRODUCT_CREATE_RESET } from '../../../constants/productConstants'\r\nimport { createProduct, deleteProduct, fetchProducts } from '../../../redux/actions/productActions'\r\nimport Loader from '../Loader'\r\nimport Message from '../Message'\r\nimport Sidebar from '../Sidebar'\r\nimport { toastErrorMessage } from '../ToastMessage'\r\n\r\nfunction ProductListScreen({history}) {\r\n\r\n const dispatch = useDispatch()\r\n\r\n const { userInfo: { user } } = useSelector(state => state.userLogin)\r\n \r\n const productList = useSelector(state => state.productList)\r\n const { loading, error, products } = productList\r\n\r\n const productCreate = useSelector(state => state.productCreate)\r\n const { loading: loadingCreate, error: errorCreate, success: successCreate, product:createdProduct } = productCreate\r\n const productDelete = useSelector(state => state.productDelete)\r\n const { loading:loadingDelete, error:errorDelete, success:successDelete } = productDelete\r\n \r\n\r\n useEffect(() => {\r\n dispatch({ type: PRODUCT_CREATE_RESET })\r\n \r\n if (!user.isAdmin) \r\n history.push('/login')\r\n\r\n if (successCreate) {\r\n history.push(`/admin/product/${createdProduct._id}/edit`)\r\n } \r\n else {\r\n dispatch(fetchProducts())\r\n }\r\n }, [dispatch,history,user,successDelete,successCreate,createdProduct])\r\n\r\n const handleDelete = (id) => {\r\n if (window.confirm('Are you sure you want to delete this product ?')) {\r\n dispatch(deleteProduct(id))\r\n if(!errorDelete)\r\n toastErrorMessage(\"Product deleted\")\r\n }\r\n }\r\n const handleCreateProduct = () => {\r\n dispatch(createProduct())\r\n }\r\n\r\n return (\r\n <>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Products
\r\n \r\n \r\n \r\n \r\n
\r\n \r\n {loadingCreate && }\r\n {errorCreate && {errorCreate}}\r\n {loadingDelete && }\r\n {errorDelete && {errorDelete}}\r\n \r\n {loading ? : error ? {error} : (\r\n \r\n <>\r\n \r\n \r\n \r\n \r\n \r\n Product ID | \r\n Name | \r\n Price | \r\n Category | \r\n In Stock | \r\n
\r\n \r\n \r\n {products.map(product=>(\r\n \r\n {product._id} | \r\n {product.name} | \r\n ৳ {product.price} | \r\n {product.category} | \r\n {product.countInStock} | \r\n \r\n \r\n \r\n \r\n | \r\n \r\n \r\n | \r\n
\r\n ))}\r\n \r\n \r\n
\r\n >\r\n )}\r\n \r\n
\r\n \r\n > \r\n )\r\n}\r\n\r\nexport default ProductListScreen\r\n","import React, { useEffect, useState } from 'react'\r\nimport { Button, Card, Col, Form, FormControl, Image, ListGroup, Row } from 'react-bootstrap'\r\nimport { useDispatch, useSelector } from 'react-redux'\r\nimport { Link } from 'react-router-dom'\r\nimport { PRODUCT_CREATE_REVIEW_RESET } from '../../../constants/productConstants'\r\nimport { createProductReview, fetchProductById } from '../../../redux/actions/productActions'\r\nimport '../../../styles/ecommerce.css'\r\nimport Loader from '../Loader'\r\nimport Message from '../Message'\r\nimport Rating from '../Rating'\r\nimport { toastSuccessMessage } from '../ToastMessage'\r\n\r\nfunction ProductScreen({ match,history }) {\r\n \r\n const [qty, setQty] = useState(1)\r\n const [rating, setRating] = useState(0)\r\n const [comment, setComment] = useState(\"\")\r\n\r\n const dispatch = useDispatch()\r\n\r\n const productDetails = useSelector(state => state.productDetails)\r\n const { loading, error, product } = productDetails\r\n\r\n const productReview = useSelector(state => state.productCreateReview)\r\n const { error: reviewError, success: reviewSuccess } = productReview\r\n \r\n const userLogin = useSelector(state => state.userLogin)\r\n const { userInfo } = userLogin\r\n\r\n useEffect(() => {\r\n if (reviewSuccess) {\r\n toastSuccessMessage('Thank you for submitting a review')\r\n setRating(0)\r\n setComment('')\r\n dispatch({type:PRODUCT_CREATE_REVIEW_RESET})\r\n }\r\n else if (reviewError) {\r\n setTimeout(() => {\r\n dispatch({type:PRODUCT_CREATE_REVIEW_RESET})\r\n }, 4000);\r\n }\r\n dispatch(fetchProductById(match.params.id))\r\n }, [dispatch,match,reviewSuccess,reviewError])\r\n\r\n const addToCartHandler = () => {\r\n history.push(`/cart/${match.params.id}?qty=${qty}`)\r\n }\r\n\r\n const handleSubmit = (e) => {\r\n e.preventDefault()\r\n dispatch(createProductReview(match.params.id, {\r\n rating,\r\n comment\r\n }))\r\n }\r\n\r\n return (\r\n \r\n
Go Back\r\n {loading ?
: error ?
{error} : (\r\n <> \r\n
\r\n \r\n \r\n \r\n\r\n \r\n \r\n {product.name}
\r\n {product.description}\r\n \r\n ৳ {product.price}\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n Price : \r\n {product.price} Taka\r\n
\r\n \r\n \r\n \r\n Status : \r\n {product.countInStock > 0 ? \"In Stock \" : \"Out of Stock\"}\r\n
\r\n \r\n {product.countInStock > 0 && (\r\n \r\n \r\n Qty\r\n \r\n setQty(e.target.value)}\r\n >\r\n {[...Array(product.countInStock).keys()].map(p => (\r\n \r\n ))}\r\n \r\n \r\n
\r\n \r\n )}\r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n
\r\n \r\n {product.reviews.length === 0 && No Reviews}\r\n \r\n {product.reviews.map(r => (\r\n \r\n {r.name}\r\n \r\n {r.createdAt.substring(0,10)}
\r\n {r.comment}
\r\n \r\n ))}\r\n \r\n Write a review
\r\n {userInfo ? (<>\r\n {reviewError && {reviewError}}\r\n \r\n Give a rating\r\n setRating(e.target.value)}>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Write a comment\r\n setComment(e.target.value)} />\r\n \r\n\r\n \r\n\r\n \r\n \r\n >) : Please sign in to write a review}\r\n \r\n
\r\n >\r\n )}\r\n \r\n
\r\n\r\n )\r\n}\r\n\r\nexport default ProductScreen\r\n","import React, { useEffect, useState } from 'react'\r\nimport { Button, Col, Form, Row, Table } from 'react-bootstrap'\r\nimport { useDispatch, useSelector } from 'react-redux'\r\nimport { LinkContainer } from 'react-router-bootstrap'\r\nimport { useLocation } from 'react-router-dom'\r\nimport { getMyOrders } from '../../../redux/actions/orderActions'\r\nimport { getUserDetails, updateUserProfile } from '../../../redux/actions/userActions'\r\nimport Loader from '../Loader'\r\nimport Message from '../Message'\r\nimport { toastSuccessMessage } from '../ToastMessage'\r\n\r\n\r\nfunction ProfileScreen({history}) {\r\n\r\n const [email, setEmail] = useState('')\r\n const [name, setName] = useState('')\r\n const [password, setPassword] = useState('')\r\n const [confirmPassword, setConfirmPassword] = useState('')\r\n\r\n const dispatch = useDispatch()\r\n const location = useLocation()\r\n\r\n const userLogin = useSelector(state => state.userLogin)\r\n const {userInfo} = userLogin\r\n\r\n const userDetails = useSelector(state => state.userDetails)\r\n const { loading, error, user } = userDetails\r\n\r\n const myOrderList = useSelector(state => state.myOrderList)\r\n const { loading: loadingOrders, error: errorOrders, orders } = myOrderList\r\n\r\n \r\n useEffect(() => {\r\n if (!userInfo) {\r\n history.push(\"/login\")\r\n }\r\n else {\r\n // for google users\r\n if (userInfo.token.length > 500) {\r\n setEmail(userInfo.user.email)\r\n setName(userInfo.user.name)\r\n \r\n } else {\r\n if (!user.name) { \r\n dispatch(getUserDetails('profile'))\r\n dispatch(getMyOrders())\r\n }\r\n \r\n else {\r\n setEmail(user.email)\r\n setName(user.name)\r\n }\r\n }\r\n }\r\n }, [history,userInfo,dispatch,user,location,name])\r\n\r\n const handleSubmit = (e) => {\r\n e.preventDefault()\r\n dispatch(updateUserProfile({ id: user._id, email, name, password }))\r\n toastSuccessMessage(\"Your profile has been updated\")\r\n }\r\n\r\n return (\r\n \r\n \r\n User Profile
\r\n {error && {error}}\r\n {loading && }\r\n \r\n Name\r\n setName(e.target.value)} />\r\n \r\n\r\n \r\n Email Address\r\n setEmail(e.target.value)} />\r\n \r\n\r\n \r\n Password\r\n setPassword(e.target.value)} />\r\n \r\n\r\n \r\n Retype Password\r\n setConfirmPassword(e.target.value)} />\r\n \r\n\r\n \r\n \r\n \r\n \r\n <>\r\n MY Orders
\r\n {loadingOrders ? : errorOrders ? {errorOrders} : (\r\n \r\n \r\n \r\n ID | \r\n DATE | \r\n TOTAL | \r\n PAID | \r\n Delivered | \r\n | \r\n
\r\n \r\n \r\n {orders.map(order=>(\r\n \r\n {order._id} | \r\n {order.createdAt.substring(0, 10)} | \r\n ৳ {order.totalPrice} | \r\n \r\n {order.isPaid ? order.paidAt.substring(0,10) : }\r\n | \r\n \r\n {order.isDelivered ? order.deliverAt.substring(0,10) : }\r\n | \r\n \r\n \r\n \r\n \r\n | \r\n
\r\n ))}\r\n \r\n
\r\n )}\r\n >\r\n \r\n
\r\n )\r\n}\r\n\r\nexport default ProfileScreen\r\n","import React, { useEffect, useState } from 'react'\r\nimport { Button, Col, Form, Row } from 'react-bootstrap'\r\nimport { useDispatch, useSelector } from 'react-redux'\r\nimport { Link } from 'react-router-dom'\r\nimport { toast } from 'react-toastify'\r\nimport 'react-toastify/dist/ReactToastify.css'\r\nimport { register } from '../../../redux/actions/userActions'\r\nimport FormContainer from '../FormContainer'\r\nimport GoogleAuth from '../GoogleAuth'\r\nimport Loader from '../Loader'\r\nimport Message from '../Message'\r\ntoast.configure()\r\n\r\nfunction RegisterScreen({location,history}) {\r\n\r\n const [name, setName] = useState('')\r\n const [email, setEmail] = useState('')\r\n const [password, setPassword] = useState('')\r\n const [confirmPassword, setConfirmPassword] = useState('')\r\n\r\n const redirect = location.search ? location.search.split(\"=\")[1] : \"/login\"\r\n\r\n const dispatch = useDispatch()\r\n const userRegister = useSelector(state => state.userRegister)\r\n const { loading, error, userInfo } = userRegister\r\n \r\n useEffect(() => {\r\n if (userInfo) {\r\n toast.success(\"Account created successfully. Please login to see profile\", {autoClose: 3000,})\r\n history.push(\"/login\")\r\n }\r\n }, [history,redirect,userInfo])\r\n\r\n const handleSubmit = (e) => {\r\n e.preventDefault()\r\n dispatch(register(name,email,password,confirmPassword))\r\n }\r\n\r\n return (\r\n \r\n Sign Up
\r\n {error && {error}}\r\n {loading && }\r\n \r\n Name\r\n setName(e.target.value)} />\r\n \r\n\r\n \r\n Email Address\r\n setEmail(e.target.value)} />\r\n \r\n\r\n \r\n Password\r\n setPassword(e.target.value)} />\r\n \r\n\r\n \r\n Retype Password\r\n setConfirmPassword(e.target.value)} />\r\n \r\n\r\n \r\n \r\n\r\n \r\n Or
\r\n
\r\n\r\n \r\n \r\n
\r\n\r\n \r\n \r\n Already Have an Account ? Sign in\r\n \r\n
\r\n \r\n \r\n \r\n )\r\n}\r\n\r\nexport default RegisterScreen\r\n","import React from 'react';\r\nimport { Bar } from 'react-chartjs-2';\r\n\r\nfunction BarChart({ orderData }) {\r\n \r\n const saleByMonth = []\r\n if (orderData) {\r\n for (let od of orderData) {\r\n saleByMonth.push(od.numOfOrder)\r\n }\r\n }\r\n\r\n\r\n const data = {\r\n labels: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"],\r\n datasets: [\r\n {\r\n label: '# of Sales by Months',\r\n data: saleByMonth,\r\n backgroundColor: [\r\n 'rgba(0,158,96, 0.2)',\r\n 'rgba(0,158,96, 0.2)',\r\n 'rgba(0,158,96, 0.2)',\r\n 'rgba(0,158,96, 0.2)',\r\n 'rgba(0,158,96, 0.2)',\r\n 'rgba(0,158,96, 0.2)',\r\n 'rgba(0,158,96, 0.2)',\r\n 'rgba(0,158,96, 0.2)',\r\n 'rgba(0,158,96, 0.2)',\r\n 'rgba(0,158,96, 0.2)',\r\n 'rgba(0,158,96, 0.2)',\r\n 'rgba(0,158,96, 0.2)',\r\n \r\n ],\r\n \r\n borderColor: [\r\n 'rgba(0,158,96, 0.8)',\r\n 'rgba(0,158,96, 0.8)',\r\n 'rgba(0,158,96, 0.8)',\r\n 'rgba(0,158,96, 0.8)',\r\n 'rgba(0,158,96, 0.8)',\r\n 'rgba(0,158,96, 0.8)',\r\n 'rgba(0,158,96, 0.8)',\r\n 'rgba(0,158,96, 0.8)',\r\n 'rgba(0,158,96, 0.8)',\r\n 'rgba(0,158,96, 0.8)',\r\n 'rgba(0,158,96, 0.8)',\r\n 'rgba(0,158,96, 0.8)',\r\n 'rgba(0,158,96, 0.8)',\r\n ],\r\n \r\n borderWidth: 1,\r\n },\r\n ],\r\n };\r\n \r\n const options = {\r\n scales: {\r\n yAxes: [\r\n {\r\n ticks: {\r\n beginAtZero: true,\r\n },\r\n },\r\n ],\r\n },\r\n };\r\n return (\r\n \r\n \r\n
\r\n )\r\n}\r\n\r\nexport default BarChart\r\n","import React from 'react';\r\nimport { Line } from 'react-chartjs-2';\r\n\r\nfunction LineChart({ orderData }) {\r\n const saleByMonth=[]\r\n if (orderData) {\r\n for (let od of orderData) {\r\n saleByMonth.push(od.numOfOrder)\r\n }\r\n }\r\n const data = {\r\n \r\n labels: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"],\r\n datasets: [\r\n {\r\n label: '# of Sales By Month',\r\n data: saleByMonth,\r\n fill: false,\r\n pointRadius:5,\r\n backgroundColor: 'rgb(0,158,96)',\r\n borderColor: 'rgba(0,158,96, 0.2)',\r\n },\r\n ],\r\n };\r\n \r\n\r\n const options = {\r\n scales: {\r\n yAxes: [\r\n {\r\n ticks: {\r\n beginAtZero: true,\r\n },\r\n },\r\n ],\r\n },\r\n };\r\n\r\n return (\r\n \r\n \r\n
\r\n )\r\n}\r\n\r\nexport default LineChart\r\n","import React from 'react';\r\nimport { Bar } from 'react-chartjs-2';\r\n\r\nfunction BarChart({ monthSaleData }) {\r\n \r\n const saleByMonth = []\r\n if (monthSaleData) {\r\n for (let i = 1; i <= monthSaleData.length;i++) {\r\n saleByMonth.push(monthSaleData[i])\r\n }\r\n }\r\n\r\n const daysOfMonthLabel = []\r\n const colorArray = []\r\n const colorArrayBorder = []\r\n\r\n for (let i = 0; i < monthSaleData.length; i++) {\r\n daysOfMonthLabel[i] = i + 1\r\n colorArray[i] = 'rgba(0,158,96, 0.2)'\r\n colorArrayBorder[i]='rgba(0,158,96, 0.8)'\r\n }\r\n\r\n const data = {\r\n labels: daysOfMonthLabel,\r\n datasets: [\r\n {\r\n label: 'Sale per day',\r\n data: saleByMonth,\r\n backgroundColor: colorArray,\r\n borderColor: colorArrayBorder,\r\n \r\n borderWidth: 1,\r\n },\r\n ],\r\n };\r\n \r\n const options = {\r\n scales: {\r\n yAxes: [\r\n {\r\n ticks: {\r\n beginAtZero: true,\r\n },\r\n },\r\n ],\r\n },\r\n };\r\n return (\r\n \r\n \r\n
\r\n )\r\n}\r\n\r\nexport default BarChart\r\n","import React from 'react';\r\nimport { Bar } from 'react-chartjs-2';\r\n\r\nfunction ProductSaleBarChart({ monthWiseQty,productName}) {\r\n\r\n\r\n const data = {\r\n labels: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"],\r\n datasets: [\r\n {\r\n label: `Sale of ${productName} by each month`,\r\n data: monthWiseQty,\r\n backgroundColor: [\r\n 'rgba(0,158,96, 0.2)',\r\n 'rgba(0,158,96, 0.2)',\r\n 'rgba(0,158,96, 0.2)',\r\n 'rgba(0,158,96, 0.2)',\r\n 'rgba(0,158,96, 0.2)',\r\n 'rgba(0,158,96, 0.2)',\r\n 'rgba(0,158,96, 0.2)',\r\n 'rgba(0,158,96, 0.2)',\r\n 'rgba(0,158,96, 0.2)',\r\n 'rgba(0,158,96, 0.2)',\r\n 'rgba(0,158,96, 0.2)',\r\n 'rgba(0,158,96, 0.2)',\r\n \r\n ],\r\n \r\n borderColor: [\r\n 'rgba(0,158,96, 0.8)',\r\n 'rgba(0,158,96, 0.8)',\r\n 'rgba(0,158,96, 0.8)',\r\n 'rgba(0,158,96, 0.8)',\r\n 'rgba(0,158,96, 0.8)',\r\n 'rgba(0,158,96, 0.8)',\r\n 'rgba(0,158,96, 0.8)',\r\n 'rgba(0,158,96, 0.8)',\r\n 'rgba(0,158,96, 0.8)',\r\n 'rgba(0,158,96, 0.8)',\r\n 'rgba(0,158,96, 0.8)',\r\n 'rgba(0,158,96, 0.8)',\r\n 'rgba(0,158,96, 0.8)',\r\n ],\r\n \r\n borderWidth: 1,\r\n },\r\n ],\r\n };\r\n \r\n const options = {\r\n scales: {\r\n yAxes: [\r\n {\r\n ticks: {\r\n beginAtZero: true,\r\n },\r\n },\r\n ],\r\n },\r\n };\r\n return (\r\n \r\n \r\n
\r\n )\r\n}\r\n\r\nexport default ProductSaleBarChart\r\n","import React from 'react';\r\nimport { Pie } from 'react-chartjs-2';\r\n\r\nfunction SalesPieChart({ pie_data }) {\r\n \r\n\r\n const dataLabel = []\r\n const dataValues = []\r\n\r\n for (let pd of pie_data) {\r\n const val = parseInt(pd.value)\r\n dataLabel.push(pd.name)\r\n dataValues.push(val)\r\n }\r\n\r\n const bgColPalette = [\r\n 'rgba(255, 99, 132, 0.2)', //Red\r\n 'rgba(54, 162, 235, 0.2)', //Blue\r\n 'rgba(255, 206, 86, 0.2)', // Yellow\r\n 'rgba(75, 192, 192, 0.2)', // Green\r\n 'rgba(153, 102, 255, 0.2)', // Purple\r\n 'rgba(255, 159, 64, 0.2)', // Orange\r\n 'rgba(255, 99, 132, 0.8)', //Red\r\n 'rgba(54, 162, 235, 0.8)', //Blue\r\n 'rgba(255, 206, 86, 0.8)', // Yellow\r\n 'rgba(75, 192, 192, 0.8)', // Green\r\n 'rgba(153, 102, 255, 0.8)', // Purple\r\n 'rgba(255, 159, 64, 0.8)', // Orange\r\n 'rgba(255, 99, 132,1)', //Red\r\n 'rgba(54, 162, 235, 1)', //Blue\r\n 'rgba(255, 206, 86, 1)', // Yellow\r\n 'rgba(75, 192, 192, 1)', // Green\r\n 'rgba(153, 102, 255, 1)', // Purple\r\n 'rgba(255, 159, 64, 1)', // Orange\r\n ]\r\n const borderColPalette = [\r\n 'rgba(255, 99, 132, 1)',\r\n 'rgba(54, 162, 235, 1)',\r\n 'rgba(255, 206, 86, 1)',\r\n 'rgba(75, 192, 192, 1)',\r\n 'rgba(153, 102, 255, 1)',\r\n 'rgba(255, 159, 64, 1)',\r\n 'rgba(255, 99, 132, 1)',\r\n 'rgba(54, 162, 235, 1)',\r\n 'rgba(255, 206, 86, 1)',\r\n 'rgba(75, 192, 192, 1)',\r\n 'rgba(153, 102, 255, 1)',\r\n 'rgba(255, 159, 64, 1)',\r\n 'rgba(255, 99, 132, 1)',\r\n 'rgba(54, 162, 235, 1)',\r\n 'rgba(255, 206, 86, 1)',\r\n 'rgba(75, 192, 192, 1)',\r\n 'rgba(153, 102, 255, 1)',\r\n 'rgba(255, 159, 64, 1)',\r\n ]\r\n\r\n\r\n const background = []\r\n const border = []\r\n\r\n for (let i = 0; i < pie_data.length; i++){\r\n background[i] = bgColPalette[i]\r\n border[i] = borderColPalette[i]\r\n }\r\n\r\n const data = {\r\n labels: dataLabel,\r\n datasets: [\r\n {\r\n label: 'Contribution of each product',\r\n data: dataValues,\r\n backgroundColor:background ,\r\n borderColor:border,\r\n borderWidth: 1,\r\n },\r\n ],\r\n \r\n };\r\n \r\n return (\r\n \r\n \r\n )\r\n}\r\n\r\nexport default SalesPieChart\r\n","import React from 'react';\r\nimport { CSVLink } from 'react-csv';\r\n\r\nfunction CSVReportGeneration({ data }) {\r\n \r\n const csv_data = data\r\n const headers = [\r\n { label: \"Date\", key: \"date\" },\r\n { label: \"Product ID\", key: \"product_id\" },\r\n { label: \"Product Name\", key: \"product_name\" },\r\n { label: \"Price/Per unit\", key: \"product_price\" },\r\n { label: \"Quantity\", key: \"product_qty\" },\r\n { label: \"Total\", key: \"total\" },\r\n ]\r\n\r\n const csvReport = {\r\n filename: 'SalesReport.csv',\r\n headers,\r\n data:csv_data\r\n }\r\n \r\n\r\n return (\r\n \r\n Export to CSV\r\n
\r\n )\r\n}\r\n\r\nexport default CSVReportGeneration\r\n","export const monthData = [\r\n { id: \"jan\", label: \"January\" },\r\n { id: \"feb\", label: \"February\" },\r\n { id: \"mar\", label: \"March\" },\r\n { id: \"apr\", label: \"April\" },\r\n { id: \"may\", label: \"May\" },\r\n { id: \"jun\", label: \"June\" },\r\n { id: \"jul\", label: \"July\" },\r\n { id: \"aug\", label: \"August\" },\r\n { id: \"sep\", label: \"September\" },\r\n { id: \"oct\", label: \"October\" },\r\n { id: \"nov\", label: \"November\" },\r\n { id: \"dec\", label: \"December\" },\r\n];\r\n\r\n\r\n\r\n","import React from \"react\";\r\nconst { useState} = React;\r\n\r\nconst SaleDataCategory = ({onSelect,data}) => {\r\n const [isOpen, setOpen] = useState(false);\r\n const [items] = useState(data);\r\n const [selectedItem, setSelectedItem] = useState(null);\r\n \r\n const toggleDropdown = () => setOpen(!isOpen);\r\n \r\n const handleItemClick = (id) => {\r\n onSelect(id)\r\n selectedItem === id ? setSelectedItem(null) : setSelectedItem(id);\r\n setOpen(false)\r\n }\r\n \r\n return (\r\n \r\n
\r\n {selectedItem ? items.find(item => item.id === selectedItem).label : \"Select Month\"}\r\n \r\n
\r\n
\r\n {items.map(item => (\r\n
handleItemClick(e.target.id)} id={item.id}>\r\n • \r\n {item.label}\r\n
\r\n ))}\r\n
\r\n
\r\n )\r\n}\r\n\r\nexport default SaleDataCategory","import axios from 'axios';\r\nimport React, { useEffect, useState } from 'react';\r\nimport { Button, Col, Dropdown, DropdownButton, Form, FormControl, Row } from 'react-bootstrap';\r\nimport { useDispatch, useSelector } from 'react-redux';\r\nimport { getSaleData } from '../../../redux/actions/orderActions';\r\nimport \"../../../styles/ecommerce.css\";\r\nimport BarChart from '../Charts/BarChart';\r\nimport LineChart from '../Charts/LineChart';\r\nimport MonthBarChart from '../Charts/MonthBarChart';\r\nimport ProductSaleBarChart from '../Charts/ProductSaleBarChart';\r\nimport SalesPieChart from '../Charts/SalesPieChart';\r\nimport CSVReportGeneration from '../CSVReportGeneration';\r\nimport { monthData } from \"../EcommSeedData\";\r\nimport SaleDataCategory from '../SaleDataCategory';\r\nimport Sidebar from '../Sidebar';\r\nconst baseUrl = 'https://plantland.herokuapp.com'\r\n\r\nfunction SaleDataScreen({ history }) {\r\n \r\n const [graphType, setGraphType] = useState(\"line\")\r\n const [monthSale, setMonthSale] = useState(\"\")\r\n const [productSale, setProductSale] = useState(\"\")\r\n const [search, setSearch] = useState(\"\")\r\n const [reportData, setReportData] = useState(\"\")\r\n const [salesPieData, setSalesPieData] = useState(\"\")\r\n\r\n const dispatch = useDispatch()\r\n const { userInfo: { user,token } } = useSelector(state => state.userLogin)\r\n\r\n const order = useSelector(state => state.orderSaleData)\r\n const { orderSaleData } = order\r\n\r\n\r\n useEffect(() => {\r\n if (user && user.isAdmin) {\r\n dispatch(getSaleData())\r\n } else {\r\n history.push(\"/login\")\r\n }\r\n }, [dispatch, history, user])\r\n \r\n const handleSelect = (e) => {\r\n setGraphType(e)\r\n }\r\n\r\n const onSalesMonthSelect = (e) => {\r\n const { totalOrder } = orderSaleData?.find(el => el.month === e)\r\n const saleData = []\r\n const salesPieData = []\r\n\r\n for (let data of totalOrder) {\r\n for (let pd of data.orderedItems) {\r\n const date = data.createdAt.substring(0, 10);\r\n const product_id = pd._id;\r\n const product_name = pd.name;\r\n const product_price = pd.price;\r\n const product_qty = pd.qty;\r\n const total = pd.price * pd.qty\r\n saleData.push({ date, product_id, product_name, product_price, product_qty, total })\r\n\r\n // for pie chart\r\n salesPieData.push({ name: product_name, value: total })\r\n \r\n }\r\n }\r\n\r\n // console.log(salesPieData);\r\n\r\n // for pie chart\r\n const res = Array.from(salesPieData.reduce(\r\n (m, { name, value }) => m.set(name, (m.get(name) || 0) + value), new\r\n Map()), ([name, value]) => ({ name, value }));\r\n \r\n setSalesPieData(res)\r\n setReportData(saleData)\r\n }\r\n\r\n const onMonthSelect = async (e) => {\r\n try {\r\n const selectedMonth = e;\r\n\r\n const config = {\r\n headers: {\r\n 'Content-Type': 'application/json',\r\n Authorization: `Bearer ${token}`\r\n }\r\n }\r\n const { data } = await axios.post(`${baseUrl}/api/orders/saleDataByMonth`, { selectedMonth }, config)\r\n setMonthSale(data)\r\n \r\n } catch (error) {\r\n console.log(error)\r\n }\r\n }\r\n\r\n const handleSearchSubmit = async(e) => {\r\n e.preventDefault()\r\n console.log(search);\r\n // 60ee9cc0da14312998e1a300\r\n try {\r\n const config = {\r\n headers: {\r\n 'Content-Type': 'application/json',\r\n Authorization: `Bearer ${token}`\r\n }\r\n }\r\n const { data } = await axios.post(`${baseUrl}/api/orders/saleByAProduct`, {product_id:search }, config)\r\n setProductSale(data)\r\n \r\n } catch (error) {\r\n console.log(error)\r\n }\r\n }\r\n\r\n return (\r\n <>\r\n \r\n \r\n \r\n <>\r\n \r\n
Month wise sale
\r\n
\r\n \r\n
\r\n
\r\n {orderSaleData && <>{graphType === 'line' ? : } >}\r\n \r\n\r\n Day wise Sales of a Month
\r\n \r\n {monthSale && }\r\n\r\n \r\n
Sale of a product by each month
\r\n \r\n \r\n {productSale && }\r\n \r\n \r\n
Sales Report Generation
\r\n
\r\n {reportData &&
}\r\n {salesPieData &&\r\n
\r\n
Contribution of sold products
\r\n \r\n \r\n }\r\n
\r\n\r\n \r\n >\r\n \r\n
\r\n >\r\n )\r\n}\r\n\r\nexport default SaleDataScreen\r\n","import React, { useState } from \"react\";\r\nimport { Button, Form } from \"react-bootstrap\";\r\nimport { useDispatch, useSelector } from \"react-redux\";\r\nimport { saveShippingAddress } from \"../../../redux/actions/cartActions\";\r\nimport CheckoutSteps from \"../CheckoutSteps\";\r\nimport FormContainer from \"../FormContainer\";\r\n\r\nconst ShippingScreen = ({ history }) => {\r\n const cart = useSelector((state) => state.cart);\r\n const { shippingAddress } = cart;\r\n\r\n const [address, setAddress] = useState(shippingAddress.address || \"\");\r\n const [city, setCity] = useState(shippingAddress.city || \"\");\r\n const [thana, setThana] = useState(shippingAddress.thana || \"\");\r\n const [houseNumber, setHouseNumber] = useState(\r\n shippingAddress.houseNumber || \"\"\r\n );\r\n const dispatch = useDispatch();\r\n\r\n const submitHandler = (e) => {\r\n e.preventDefault();\r\n dispatch(saveShippingAddress({ address, city, thana, houseNumber }));\r\n history.push(\"/payment\");\r\n };\r\n\r\n return (\r\n \r\n \r\n Shipping
\r\n \r\n Address\r\n setAddress(e.target.value)}\r\n >\r\n \r\n\r\n \r\n City\r\n setCity(e.target.value)}\r\n >\r\n \r\n\r\n \r\n Thana\r\n setThana(e.target.value)}\r\n >\r\n \r\n\r\n \r\n House Number\r\n setHouseNumber(e.target.value)}\r\n >\r\n \r\n\r\n \r\n \r\n \r\n );\r\n};\r\n\r\nexport default ShippingScreen;\r\n","import React, { useEffect } from 'react'\r\nimport { Button, Col, Row, Table } from 'react-bootstrap'\r\nimport { useDispatch, useSelector } from 'react-redux'\r\nimport { deleteUser, getUserList } from '../../../redux/actions/userActions'\r\nimport Loader from '../Loader'\r\nimport Message from '../Message'\r\nimport Sidebar from '../Sidebar'\r\nimport { toastErrorMessage } from '../ToastMessage'\r\n\r\nfunction UserListScreen({history}) {\r\n\r\n const dispatch = useDispatch()\r\n const userList = useSelector(state => state.userList)\r\n const { userInfo: { user } } = useSelector(state => state.userLogin)\r\n const { success: deleteSuccess } = useSelector(state => state.userDelete)\r\n \r\n\r\n const { loading, error, users } = userList\r\n \r\n useEffect(() => {\r\n if (user && user.isAdmin) {\r\n dispatch(getUserList())\r\n } else {\r\n history.push(\"/login\")\r\n }\r\n }, [dispatch,history,user,deleteSuccess])\r\n\r\n const handleDelete = (id) => {\r\n if (window.confirm('Are you sure you want to delete this user ?')) {\r\n dispatch(deleteUser(id))\r\n toastErrorMessage(\"User deleted\")\r\n }\r\n }\r\n\r\n return (\r\n <>\r\n \r\n \r\n \r\n \r\n \r\n {loading ? : error ? {error} : (\r\n <>\r\n All Users
\r\n \r\n \r\n \r\n ID | \r\n Name | \r\n Email | \r\n Admin | \r\n
\r\n \r\n \r\n {users.map(user=>(\r\n \r\n {user._id} | \r\n {user.name} | \r\n \r\n {user.email}\r\n | \r\n \r\n {user.isAdmin ?\r\n :\r\n \r\n }\r\n | \r\n {/* \r\n \r\n \r\n \r\n | */}\r\n \r\n \r\n | \r\n
\r\n ))}\r\n \r\n
\r\n >\r\n )}\r\n \r\n
\r\n > \r\n )\r\n}\r\n\r\nexport default UserListScreen\r\n","import React, { useState } from 'react';\r\nimport { Button, Modal } from 'react-bootstrap';\r\nimport \"../../styles/plant-identify.css\";\r\n\r\nfunction PIDetailsModal({ name, desc, synonyms, taxonomy, authority, common_names }) {\r\n const [show, setShow] = useState(false);\r\n\r\n const handleClose = () => setShow(false);\r\n const handleShow = () => setShow(true);\r\n\r\n return (\r\n <>\r\n \r\n\r\n \r\n \r\n {name}\r\n {authority}\r\n \r\n \r\n Common Names
\r\n {common_names?.map(cn => (\r\n {cn}
\r\n ))}\r\n \r\n \r\n \r\n Description
\r\n {desc}
\r\n \r\n \r\n Taxonomy
\r\n \r\n
Kingdom: {taxonomy.kingdom}
\r\n
Phylum: {taxonomy.phylum}
\r\n
Class: {taxonomy.class}
\r\n
Order: {taxonomy.order}
\r\n
Family: {taxonomy.family}
\r\n
Genus: {taxonomy.genus}
\r\n
\r\n \r\n \r\n \r\n Synonyms
\r\n {synonyms?.map(syn => (\r\n {syn}
\r\n ))}\r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n >\r\n );\r\n}\r\n\r\nexport default PIDetailsModal\r\n","import axios from 'axios';\r\nimport React, { useState } from 'react';\r\nimport { Button, Col, Form, Row } from 'react-bootstrap';\r\nimport FileBase64 from 'react-file-base64';\r\nimport \"../../styles/plant-identify.css\";\r\nimport Loader from \"../Ecommerce/Loader\";\r\nimport PIDetailsModal from './PIDetailsModal';\r\n\r\nconst baseUrl = 'https://plantland.herokuapp.com'\r\n\r\nfunction PlantIdentify() {\r\n const [file, setFile] = useState()\r\n const [imageUrl, setImageUrl] = useState(\"\")\r\n const [plantSuggestion, setPlantSuggestion] = useState([])\r\n const [loading, setLoading] = useState(false)\r\n\r\n const handleFileInput = (e) => {\r\n e.preventDefault()\r\n getPlantInfo()\r\n setLoading(true)\r\n }\r\n\r\n const getPlantInfo = async () => {\r\n try {\r\n const {data} = await axios.post(`${baseUrl}/api/identify-plant`, { file })\r\n setImageUrl(data.imageUrl)\r\n setPlantSuggestion(data.plantSuggestions)\r\n setLoading(false)\r\n } catch (error) {\r\n console.log('Error',error);\r\n }\r\n }\r\n\r\n const covertNumber = (num) => {\r\n let n = num.toFixed(2)\r\n n *= 100\r\n if (n.toString().length > 2) n = n.toFixed()\r\n return `${n} %`\r\n }\r\n\r\n \r\n return (\r\n \r\n
\r\n\r\n {loading ?
: (\r\n <>\r\n {imageUrl && \r\n
\r\n
\r\n
\r\n }\r\n\r\n {plantSuggestion &&\r\n
\r\n {plantSuggestion.map(plant => (\r\n
\r\n \r\n \r\n {plant.similar_images.map(i =>\r\n (\r\n
\r\n )\r\n )}\r\n
\r\n \r\n \r\n \r\n
{plant.plant_name}
\r\n
Scientific Name:{plant.plant_details.scientific_name}
\r\n
Genus:{plant.plant_details.structured_name.genus}
\r\n
Species:{plant.plant_details.structured_name.species}
\r\n \r\n
\r\n
\r\n \r\n \r\n \r\n {/*
{`${((plant.probability).toFixed(2)) * 100} %`}
*/}\r\n
{covertNumber(plant.probability)}
\r\n
\r\n \r\n \r\n
\r\n ))}\r\n
\r\n \r\n }\r\n\r\n >\r\n\r\n )}\r\n \r\n \r\n
\r\n )\r\n}\r\n\r\nexport default PlantIdentify\r\n","import axios from 'axios';\r\nimport React, { useEffect, useState } from 'react';\r\nimport { Table } from 'react-bootstrap';\r\nimport '../../styles/plant-search.css';\r\n\r\nfunction PlantDetails({ match }) {\r\n \r\n const [plantData, setPlantData] = useState(\"\")\r\n const plantSearchAPI = \"https://openfarm.cc/api/v1/crops\"\r\n useEffect(() => {\r\n async function fetchPlant() {\r\n const res = await axios.get(`${plantSearchAPI}/${match.params.id}`)\r\n setPlantData(res.data.data)\r\n }\r\n fetchPlant()\r\n\r\n }, [match])\r\n return (\r\n \r\n {plantData && (\r\n
\r\n \r\n \r\n \r\n \r\n Name | \r\n {plantData.attributes.name} | \r\n
\r\n \r\n Binomial Name | \r\n {plantData.attributes.binomial_name} | \r\n
\r\n \r\n Taxon | \r\n {plantData.attributes.taxon} | \r\n
\r\n \r\n Description | \r\n {plantData.attributes.description} | \r\n
\r\n \r\n Sun Requirements | \r\n {plantData.attributes.sun_requirements} | \r\n
\r\n \r\n Sowing Method | \r\n {plantData.attributes.sowing_method} | \r\n
\r\n \r\n Growing Degree Days | \r\n {plantData.attributes.growing_degree_days} | \r\n
\r\n \r\n Row Spacing | \r\n {plantData.attributes.row_spacing} cm | \r\n
\r\n \r\n Height | \r\n {plantData.attributes.height} cm | \r\n
\r\n \r\n \r\n
\r\n )}\r\n
\r\n )\r\n}\r\n\r\nexport default PlantDetails\r\n","export default __webpack_public_path__ + \"static/media/not.6ea7f4d0.svg\";","export default __webpack_public_path__ + \"static/media/sample-plant.31640ee6.jpg\";","import React from 'react';\r\nimport { Col, Row } from 'react-bootstrap';\r\nimport { LinkContainer } from 'react-router-bootstrap';\r\nimport sample from '../../images/sample-plant.jpg';\r\n\r\nfunction PlantSearchCard({ data }) {\r\n \r\n return (\r\n <>\r\n {data &&\r\n \r\n {data.map(d => (\r\n \r\n \r\n \r\n {d.attributes.main_image_path.includes(\"/assets/baren_field_square\") ?
:
}\r\n \r\n
\r\n
{d.attributes.name}
\r\n
Binomial Name: {d.attributes.binomial_name}
\r\n
\r\n
\r\n \r\n \r\n \r\n ))}\r\n
\r\n }\r\n >\r\n \r\n )\r\n}\r\n\r\nexport default PlantSearchCard\r\n","import axios from 'axios'\r\nimport React, { useState } from 'react'\r\nimport notFound from '../../images/not.svg'\r\nimport '../../styles/plant-search.css'\r\nimport Loader from '../Ecommerce/Loader'\r\nimport PlantSearchCard from './PlantSearchCard'\r\n\r\nfunction PlantSearch() {\r\n\r\n const [searchTerm, setSearchTerm] = useState(\"\")\r\n const [result, setResult] = useState([])\r\n const [found,setFound] = useState(true)\r\n const [loading,setLoading] = useState(false)\r\n\r\n const plantSearchAPI = \"https://openfarm.cc/api/v1/crops\"\r\n\r\n const handlePlantSearch = (e) => {\r\n e.preventDefault()\r\n console.log(searchTerm);\r\n setLoading(true)\r\n fetchPlant(searchTerm)\r\n }\r\n \r\n const fetchPlant = async (plant) => {\r\n const { data } = await axios.get(`${plantSearchAPI}?filter=${plant}`)\r\n \r\n if (data?.data.length === 0) {\r\n setFound(false)\r\n }\r\n else {\r\n setResult(data.data)\r\n setFound(true)\r\n }\r\n setLoading(false)\r\n }\r\n return (\r\n <>\r\n \r\n\r\n {loading ? :\r\n (\r\n \r\n {found ?\r\n
\r\n :\r\n
\r\n
\r\n
No Result
\r\n
\r\n }\r\n
\r\n )\r\n }\r\n >\r\n \r\n )\r\n}\r\n\r\nexport default PlantSearch\r\n","export default __webpack_public_path__ + \"static/media/blog.fc0941d6.svg\";","export default __webpack_public_path__ + \"static/media/diary.d6286fce.svg\";","export default __webpack_public_path__ + \"static/media/online-community.1ac5ba23.svg\";","export default __webpack_public_path__ + \"static/media/search.7b1accb2.svg\";","export default __webpack_public_path__ + \"static/media/server.b628c0c9.svg\";","export default __webpack_public_path__ + \"static/media/store.2b5ae666.svg\";","import Card from '@material-ui/core/Card';\r\nimport CardContent from '@material-ui/core/CardContent';\r\nimport { makeStyles } from '@material-ui/core/styles';\r\nimport Typography from '@material-ui/core/Typography';\r\nimport React from 'react';\r\n\r\nconst useStyles = makeStyles({\r\n root: {\r\n minWidth: 200,\r\n height:'250px',\r\n borderTop:'5px solid #81fbb8',\r\n margin:'auto'\r\n },\r\n title: {\r\n fontSize: '1.7rem',\r\n fontFamily:'Asap',\r\n textAlign:'center'\r\n },\r\n text: {\r\n textAlign: 'center',\r\n fontFamily: 'Lato',\r\n fontSize:'1.1rem'\r\n },\r\n image: {\r\n height: '75px',\r\n marginLeft:'70%'\r\n }\r\n});\r\n\r\nfunction FeatureCard({ title, text,image }) {\r\n const classes = useStyles();\r\n\r\n return (\r\n \r\n \r\n \r\n {title}\r\n \r\n \r\n {text}\r\n \r\n \r\n \r\n \r\n );\r\n}\r\n\r\nexport default FeatureCard","import { Container, Grid } from '@material-ui/core';\r\nimport { makeStyles } from '@material-ui/core/styles';\r\nimport React from 'react';\r\nimport blog from '../../images/blog.svg';\r\nimport diary from '../../images/diary.svg';\r\nimport forum from '../../images/online-community.svg';\r\nimport search from '../../images/search.svg';\r\nimport db from '../../images/server.svg';\r\nimport market from '../../images/store.svg';\r\nimport FeatureCard from './FeatureCard';\r\n\r\n\r\nconst useStyles = makeStyles({\r\n container: {\r\n backgroundColor: '#f7f7f7',\r\n // margin:'5rem auto'\r\n },\r\n gridContainer:{\r\n padding:'10rem auto'\r\n },\r\n text: {\r\n textAlign: 'center',\r\n padding: '2rem 0rem'\r\n }\r\n});\r\n\r\nfunction Feature() {\r\n const data = [\r\n {\r\n title: \"Market Place\",\r\n text: \"Platform for buying plants, flowers, seeds and other equipments\",\r\n image: market\r\n },\r\n {\r\n title: \"Plant Database\",\r\n text:\"A database that contains plant related information\",\r\n image: db \r\n },\r\n {\r\n title: \"Plant Identification\",\r\n text:\"Identify any plants just by uploading it in the website\",\r\n image: search\r\n },\r\n {\r\n title: \"Plant Diary\",\r\n text:\"In a personalized gardening notebook, keep track of your plants progress\",\r\n image: diary\r\n },\r\n {\r\n title: \"Blog\",\r\n text:\"Read blog about plants, nature and environmental issues\",\r\n image: blog\r\n },\r\n {\r\n title: \"Community\",\r\n text:\"Ask and give answers regarding plant related questions\",\r\n image: forum\r\n },\r\n ]\r\n\r\n const classes = useStyles();\r\n\r\n return (\r\n \r\n
Features
\r\n \r\n \r\n {data.map(d => (\r\n \r\n \r\n \r\n ))} \r\n \r\n \r\n \r\n\r\n )\r\n \r\n}\r\n\r\nexport default Feature\r\n\r\n","export default __webpack_public_path__ + \"static/media/pngwing.com.d99df108.png\";","import React from 'react'\r\nimport heroImg from '../../images/pngwing.com.png'\r\nimport '../../styles/landingPage.css'\r\n\r\nfunction HeroSection() {\r\n return (\r\n \r\n
\r\n
Plant Land
\r\n
A place where plant enthusiastic people meet and get along with each other
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n )\r\n}\r\n\r\nexport default HeroSection\r\n","import React from 'react'\r\nimport { Container, Nav, Navbar } from 'react-bootstrap'\r\nimport '../../styles/landingPage.css'\r\nfunction NavBar() {\r\n return (\r\n <>\r\n \r\n \r\n PlantLand\r\n \r\n \r\n \r\n \r\n \r\n \r\n >\r\n )\r\n}\r\n\r\nexport default NavBar\r\n","import React from 'react'\r\nimport Feature from '../components/LandingPage/Feature'\r\nimport HeroSection from '../components/LandingPage/HeroSection'\r\nimport NavBar from '../components/LandingPage/Navbar'\r\n\r\nfunction LandingPage() {\r\n return (\r\n \r\n \r\n \r\n \r\n
\r\n )\r\n}\r\n\r\nexport default LandingPage\r\n","import React from \"react\";\r\nimport { Container } from \"react-bootstrap\";\r\nimport { BrowserRouter as Router, Route } from \"react-router-dom\";\r\n// Blog Section\r\nimport Blog from \"../components/Blog/Blog\";\r\nimport BlogDetails from \"../components/Blog/BlogDetails\";\r\nimport NewBlog from \"../components/Blog/NewBlog\";\r\n// E-Commerce Section\r\nimport Footer from \"../components/Ecommerce/Footer\";\r\nimport Header from '../components/Ecommerce/Header';\r\nimport CartScreen from '../components/Ecommerce/Screen/CartScreen';\r\nimport ForgetPasswordScreen from '../components/Ecommerce/Screen/ForgetPasswordScreen';\r\nimport HomeScreen from '../components/Ecommerce/Screen/HomeScreen';\r\nimport LoginScreen from '../components/Ecommerce/Screen/LoginScreen';\r\nimport OrderDataScreen from \"../components/Ecommerce/Screen/OrderDataScreen\";\r\nimport OrderListScreen from \"../components/Ecommerce/Screen/OrderListScreen\";\r\nimport OrderScreen from \"../components/Ecommerce/Screen/OrderScreen\";\r\nimport PasswordResetScreen from '../components/Ecommerce/Screen/PasswordResetScreen';\r\nimport PaymentScreen from \"../components/Ecommerce/Screen/PaymentScreen\";\r\nimport PlaceOrderScreen from \"../components/Ecommerce/Screen/PlaceOrderScreen\";\r\nimport ProductEditScreen from \"../components/Ecommerce/Screen/ProductEditScreen\";\r\nimport ProductListScreen from \"../components/Ecommerce/Screen/ProductListScreen\";\r\nimport ProductScreen from '../components/Ecommerce/Screen/ProductScreen';\r\nimport ProfileScreen from '../components/Ecommerce/Screen/ProfileScreen';\r\nimport RegisterScreen from '../components/Ecommerce/Screen/RegisterScreen';\r\nimport SaleDataScreen from \"../components/Ecommerce/Screen/SaleDataScreen\";\r\nimport ShippingScreen from \"../components/Ecommerce/Screen/ShippingScreen\";\r\nimport UserListScreen from \"../components/Ecommerce/Screen/UserListScreen\";\r\nimport PlantIdentify from \"../components/PlantIdentify/PlantIdentify\";\r\nimport PlantDetails from \"../components/PlantSearch/PlantDetails\";\r\n// Plant Search Page\r\nimport PlantSearch from \"../components/PlantSearch/PlantSearch\";\r\nimport '../styles/ecommerce.css';\r\n// Landing Page\r\nimport LandingPage from './LandingPage';\r\n\r\n\r\nfunction MainPage() {\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n {/* Ecommerce Routes */}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n {/* Blog Routes */}\r\n \r\n \r\n \r\n {/* Plant Search */}\r\n \r\n \r\n {/* Plant Identify */}\r\n \r\n\r\n \r\n \r\n \r\n )\r\n}\r\nexport default MainPage;\r\n","import \"bootstrap/dist/css/bootstrap.min.css\";\r\nimport MainPage from \"./pages/MainPage\";\r\nimport \"./styles/bootstrap.min.css\";\r\n\r\nfunction App() {\r\n return (\r\n \r\n )\r\n}\r\n\r\nexport default App;\r\n","import { applyMiddleware, combineReducers, createStore } from \"redux\";\r\nimport { composeWithDevTools } from \"redux-devtools-extension\";\r\nimport thunk from \"redux-thunk\";\r\nimport { blogDetailsReducer, blogListReducer } from \"./redux/reducers/blogReducers\";\r\nimport { cartReducer } from \"./redux/reducers/cartReducers\";\r\nimport { myOrderListReducer, orderCreateReducer, orderDataReducer, orderDeliverReducer, orderDetailsReducer, orderListReducer, orderPayReducer, orderSaleDataReducer } from \"./redux/reducers/orderReducers\";\r\nimport {\r\n productCreateReducer, productCreateReviewReducer, productDeleteReducer, productDetailsReducer,\r\n productListReducer, productUpdateReducer\r\n} from \"./redux/reducers/productReducers\";\r\nimport {\r\n userDeleteReducer, userDetailsReducer, userListReducer, userLoginReducer,\r\n userProfileUpdateReducer,\r\n userRegisterReducer\r\n} from \"./redux/reducers/userReducers\";\r\n\r\n\r\nconst reducer = combineReducers({\r\n productList: productListReducer,\r\n productDetails: productDetailsReducer,\r\n productCreateReview: productCreateReviewReducer,\r\n productDelete: productDeleteReducer,\r\n productCreate: productCreateReducer,\r\n productUpdate: productUpdateReducer,\r\n userLogin: userLoginReducer,\r\n userRegister: userRegisterReducer,\r\n userDetails: userDetailsReducer,\r\n userProfileUpdate: userProfileUpdateReducer,\r\n userList: userListReducer,\r\n userDelete: userDeleteReducer,\r\n cart: cartReducer,\r\n orderCreate: orderCreateReducer,\r\n orderList: orderListReducer,\r\n orderData: orderDataReducer,\r\n orderDetails:orderDetailsReducer,\r\n orderSaleData: orderSaleDataReducer,\r\n orderPay: orderPayReducer,\r\n orderDeliver: orderDeliverReducer,\r\n myOrderList:myOrderListReducer,\r\n blogList: blogListReducer,\r\n blogDetails: blogDetailsReducer\r\n});\r\n\r\nconst cartItemsFromStorage = localStorage.getItem(\"cartItems\")\r\n ? JSON.parse(localStorage.getItem(\"cartItems\"))\r\n : [];\r\n\r\nconst userInfoFromStorage = localStorage.getItem(\"userInfo\")\r\n ? JSON.parse(localStorage.getItem(\"userInfo\"))\r\n : null;\r\nconst shippingAddressFromStorage = localStorage.getItem(\"shippingAddress\")\r\n ? JSON.parse(localStorage.getItem(\"shippingAddress\"))\r\n : {};\r\n\r\nconst initialState = {\r\n cart: {\r\n cartItems: cartItemsFromStorage,\r\n shippingAddress: shippingAddressFromStorage,\r\n },\r\n userLogin: { userInfo: userInfoFromStorage },\r\n};\r\n\r\nconst middlewares = [thunk];\r\n\r\nconst store = createStore(\r\n reducer,\r\n initialState,\r\n composeWithDevTools(applyMiddleware(...middlewares))\r\n);\r\n\r\nexport default store;\r\n","import { PRODUCT_CREATE_FAIL, PRODUCT_CREATE_REQUEST, PRODUCT_CREATE_RESET, PRODUCT_CREATE_REVIEW_FAIL, PRODUCT_CREATE_REVIEW_REQUEST, PRODUCT_CREATE_REVIEW_RESET, PRODUCT_CREATE_REVIEW_SUCCESS, PRODUCT_CREATE_SUCCESS, PRODUCT_DELETE_FAIL, PRODUCT_DELETE_REQUEST, PRODUCT_DELETE_SUCCESS, PRODUCT_DETAILS_FAIL, PRODUCT_DETAILS_REQUEST, PRODUCT_DETAILS_SUCCESS, PRODUCT_LIST_FAIL, PRODUCT_LIST_REQUEST, PRODUCT_LIST_SUCCESS, PRODUCT_UPDATE_FAIL, PRODUCT_UPDATE_REQUEST, PRODUCT_UPDATE_RESET, PRODUCT_UPDATE_SUCCESS } from '../../constants/productConstants'\r\n\r\nexport const productListReducer = (state = { products: [] }, action) => {\r\n switch (action.type) {\r\n case PRODUCT_LIST_REQUEST:\r\n return { loading: true, products: [] }\r\n \r\n case PRODUCT_LIST_SUCCESS:\r\n return { loading: false, products: action.payload.products,page:action.payload.page,numOfPages:action.payload.numOfPages }\r\n \r\n case PRODUCT_LIST_FAIL:\r\n return { loading: false, error: action.payload }\r\n \r\n default:\r\n return state\r\n }\r\n}\r\n\r\nexport const productDetailsReducer = (state = { product: {reviews:[]} }, action) => {\r\n switch (action.type) {\r\n case PRODUCT_DETAILS_REQUEST:\r\n return { loading: true, ...state }\r\n \r\n case PRODUCT_DETAILS_SUCCESS:\r\n return { loading: false, product: action.payload }\r\n \r\n case PRODUCT_DETAILS_FAIL:\r\n return { loading: false, error: action.payload }\r\n \r\n default:\r\n return state\r\n }\r\n}\r\n\r\nexport const productCreateReviewReducer = (state = {}, action) => {\r\n switch (action.type) {\r\n case PRODUCT_CREATE_REVIEW_REQUEST:\r\n return { loading: true }\r\n \r\n case PRODUCT_CREATE_REVIEW_SUCCESS:\r\n return { loading: false,success:true}\r\n \r\n case PRODUCT_CREATE_REVIEW_FAIL:\r\n return { loading: false, error: action.payload }\r\n \r\n case PRODUCT_CREATE_REVIEW_RESET:\r\n return {}\r\n \r\n default:\r\n return state\r\n }\r\n}\r\n\r\nexport const productDeleteReducer = (state = {}, action) => {\r\n switch (action.type) {\r\n case PRODUCT_DELETE_REQUEST:\r\n return { loading: true }\r\n \r\n case PRODUCT_DELETE_SUCCESS:\r\n return { loading: false,success:true}\r\n \r\n case PRODUCT_DELETE_FAIL:\r\n return { loading: false, error: action.payload }\r\n \r\n default:\r\n return state\r\n }\r\n}\r\n\r\nexport const productCreateReducer = (state = {}, action) => {\r\n switch (action.type) {\r\n case PRODUCT_CREATE_REQUEST:\r\n return { loading: true }\r\n \r\n case PRODUCT_CREATE_SUCCESS:\r\n return { loading: false,success:true,product:action.payload}\r\n \r\n case PRODUCT_CREATE_FAIL:\r\n return { loading: false, error: action.payload }\r\n \r\n case PRODUCT_CREATE_RESET:\r\n return {}\r\n \r\n default:\r\n return state\r\n }\r\n}\r\n\r\nexport const productUpdateReducer = (state = {product:{}}, action) => {\r\n switch (action.type) {\r\n case PRODUCT_UPDATE_REQUEST:\r\n return { loading: true }\r\n \r\n case PRODUCT_UPDATE_SUCCESS:\r\n return { loading: false,success:true,product:action.payload}\r\n \r\n case PRODUCT_UPDATE_FAIL:\r\n return { loading: false, error: action.payload }\r\n \r\n case PRODUCT_UPDATE_RESET:\r\n return { product: {} }\r\n \r\n default:\r\n return state\r\n }\r\n}","import { USER_DELETE_FAIL, USER_DELETE_REQUEST, USER_DELETE_SUCCESS, USER_DETAILS_FAIL, USER_DETAILS_REQUEST, USER_DETAILS_SUCCESS, USER_LIST_FAIL, USER_LIST_REQUEST, USER_LIST_RESET, USER_LIST_SUCCESS, USER_LOGIN_FAIL, USER_LOGIN_REQUEST, USER_LOGIN_SUCCESS, USER_LOGOUT, USER_PROFILE_UPDATE_FAIL, USER_PROFILE_UPDATE_REQUEST, USER_PROFILE_UPDATE_SUCCESS, USER_REGISTER_FAIL, USER_REGISTER_REQUEST, USER_REGISTER_SUCCESS } from \"../../constants/userConstants\"\r\n\r\n\r\nexport const userLoginReducer = (state = {}, action) => {\r\n switch (action.type) {\r\n case USER_LOGIN_REQUEST:\r\n return { loading: true }\r\n \r\n case USER_LOGIN_SUCCESS:\r\n return { loading: false, userInfo: action.payload }\r\n \r\n case USER_LOGIN_FAIL:\r\n return { loading: false, error: action.payload }\r\n \r\n case USER_LOGOUT:\r\n return {}\r\n \r\n default:\r\n return state\r\n }\r\n}\r\n\r\nexport const userRegisterReducer = (state = {}, action) => {\r\n switch (action.type) {\r\n case USER_REGISTER_REQUEST:\r\n return { loading: true }\r\n \r\n case USER_REGISTER_SUCCESS:\r\n return { loading: false, userInfo: action.payload }\r\n \r\n case USER_REGISTER_FAIL:\r\n return { loading: false, error: action.payload }\r\n \r\n default:\r\n return state\r\n }\r\n}\r\n\r\nexport const userDetailsReducer = (state = {user:{}}, action) => {\r\n switch (action.type) {\r\n case USER_DETAILS_REQUEST:\r\n return { ...state,loading: true }\r\n \r\n case USER_DETAILS_SUCCESS:\r\n return { loading: false, user: action.payload }\r\n \r\n case USER_DETAILS_FAIL:\r\n return { loading: false, error: action.payload }\r\n \r\n default:\r\n return state\r\n }\r\n}\r\n\r\nexport const userProfileUpdateReducer = (state = {}, action) => {\r\n switch (action.type) {\r\n case USER_PROFILE_UPDATE_REQUEST:\r\n return { ...state,loading: true }\r\n \r\n case USER_PROFILE_UPDATE_SUCCESS:\r\n return { loading: false,success:true, userInfo: action.payload }\r\n \r\n case USER_PROFILE_UPDATE_FAIL:\r\n return { loading: false, error: action.payload }\r\n \r\n default:\r\n return state\r\n }\r\n}\r\n\r\nexport const userListReducer = (state = { users: [] }, action) => {\r\n switch (action.type) {\r\n case USER_LIST_REQUEST:\r\n return { ...state,loading: true }\r\n \r\n case USER_LIST_SUCCESS:\r\n return { loading: false, users: action.payload }\r\n \r\n case USER_LIST_FAIL:\r\n return { loading: false, error: action.payload }\r\n \r\n case USER_LIST_RESET:\r\n return { users: [] }\r\n \r\n default:\r\n return state\r\n }\r\n}\r\n\r\nexport const userDeleteReducer = (state = {}, action) => {\r\n switch (action.type) {\r\n case USER_DELETE_REQUEST:\r\n return { ...state,loading: true }\r\n \r\n case USER_DELETE_SUCCESS:\r\n return { loading: false,success:true }\r\n \r\n case USER_DELETE_FAIL:\r\n return { loading: false, error: action.payload }\r\n\r\n default:\r\n return state\r\n }\r\n}","import {\r\n CART_ADD_ITEM,\r\n CART_REMOVE_ITEM, CART_SAVE_PAYMENT_METHOD, CART_SAVE_SHIPPING_ADDRESS\r\n} from \"../../constants/cartConstants\";\r\n\r\nexport const cartReducer = (\r\n state = { cartItems: [], shippingAddress: {} },\r\n action\r\n) => {\r\n switch (action.type) {\r\n case CART_ADD_ITEM:\r\n const item = action.payload;\r\n\r\n const isItemExist = state.cartItems.find(\r\n (p) => p.productId === item.productId\r\n );\r\n if (isItemExist) {\r\n return {\r\n ...state,\r\n cartItems: state.cartItems.map((p) =>\r\n p.productId === item.productId ? item : p\r\n ),\r\n };\r\n } else {\r\n return {\r\n ...state,\r\n cartItems: [...state.cartItems, item],\r\n };\r\n }\r\n case CART_REMOVE_ITEM:\r\n return {\r\n ...state,\r\n cartItems: state.cartItems.filter(\r\n (p) => p.productId !== action.payload\r\n ),\r\n };\r\n case CART_SAVE_SHIPPING_ADDRESS:\r\n return {\r\n ...state,\r\n shippingAddress: action.payload,\r\n };\r\n\r\n case CART_SAVE_PAYMENT_METHOD:\r\n return {\r\n ...state,\r\n paymentMethod: action.payload,\r\n };\r\n default:\r\n return state;\r\n }\r\n};\r\n","import {\r\n ORDER_CREATE_FAIL, ORDER_CREATE_REQUEST, ORDER_CREATE_SUCCESS, ORDER_DATA_FAIL, ORDER_DATA_REQUEST, ORDER_DATA_SUCCESS, ORDER_DELIVER_FAIL, ORDER_DELIVER_REQUEST, ORDER_DELIVER_RESET, ORDER_DELIVER_SUCCESS, ORDER_DETAILS_FAIL, ORDER_DETAILS_REQUEST, ORDER_DETAILS_SUCCESS, ORDER_LIST_FAIL, ORDER_LIST_REQUEST, ORDER_LIST_SUCCESS, ORDER_MY_LIST_FAIL, ORDER_MY_LIST_REQUEST, ORDER_MY_LIST_SUCCESS, ORDER_PAY_FAIL, ORDER_PAY_REQUEST, ORDER_PAY_RESET, ORDER_PAY_SUCCESS, ORDER_SALE_DATA_FAIL, ORDER_SALE_DATA_REQUEST, ORDER_SALE_DATA_SUCCESS\r\n} from \"../../constants/orderConstants\";\r\n\r\nexport const orderCreateReducer = (state = {}, action) => {\r\n switch (action.type) {\r\n case ORDER_CREATE_REQUEST:\r\n return {\r\n loading: true,\r\n };\r\n case ORDER_CREATE_SUCCESS:\r\n return {\r\n loading: false,\r\n success: true,\r\n order: action.payload,\r\n };\r\n case ORDER_CREATE_FAIL:\r\n return {\r\n loading: false,\r\n error: action.payload,\r\n };\r\n default:\r\n return state;\r\n /* case ORDER_CREATE_RESET:\r\n return {}\r\n default:\r\n return state */\r\n }\r\n};\r\n\r\nexport const orderListReducer = (state = { orders: [] }, action) => {\r\n switch (action.type) {\r\n case ORDER_LIST_REQUEST:\r\n return { ...state,loading: true }\r\n \r\n case ORDER_LIST_SUCCESS:\r\n return { loading: false, orders: action.payload }\r\n \r\n case ORDER_LIST_FAIL:\r\n return { loading: false, error: action.payload }\r\n \r\n \r\n default:\r\n return state\r\n }\r\n}\r\n\r\nexport const myOrderListReducer = (state = { orders: [] }, action) => {\r\n switch (action.type) {\r\n case ORDER_MY_LIST_REQUEST:\r\n return { ...state,loading: true }\r\n \r\n case ORDER_MY_LIST_SUCCESS:\r\n return { loading: false, orders: action.payload }\r\n \r\n case ORDER_MY_LIST_FAIL:\r\n return { loading: false, error: action.payload }\r\n \r\n \r\n default:\r\n return state\r\n }\r\n}\r\n\r\nexport const orderDetailsReducer = (state = { loading:true,orderItems: [],shippingAddress:{} }, action) => {\r\n switch (action.type) {\r\n case ORDER_DETAILS_REQUEST:\r\n return { ...state,loading: true }\r\n \r\n case ORDER_DETAILS_SUCCESS:\r\n return { loading: false, order: action.payload }\r\n \r\n case ORDER_DETAILS_FAIL:\r\n return { loading: false, error: action.payload }\r\n \r\n default:\r\n return state\r\n }\r\n}\r\n\r\n\r\nexport const orderPayReducer = (state ={}, action) => {\r\n switch (action.type) {\r\n case ORDER_PAY_REQUEST:\r\n return { loading: true }\r\n \r\n case ORDER_PAY_SUCCESS:\r\n return { loading: false, success: true }\r\n \r\n case ORDER_PAY_FAIL:\r\n return { loading: false, error: action.payload }\r\n \r\n case ORDER_PAY_RESET:\r\n return { }\r\n \r\n default:\r\n return state\r\n }\r\n}\r\n\r\n\r\nexport const orderDeliverReducer = (state ={}, action) => {\r\n switch (action.type) {\r\n case ORDER_DELIVER_REQUEST:\r\n return { loading: true }\r\n \r\n case ORDER_DELIVER_SUCCESS:\r\n return { loading: false, success: true }\r\n \r\n case ORDER_DELIVER_FAIL:\r\n return { loading: false, error: action.DELIVERload }\r\n \r\n case ORDER_DELIVER_RESET:\r\n return { }\r\n \r\n default:\r\n return state\r\n }\r\n}\r\n\r\n\r\nexport const orderDataReducer = (state = { orderData: [] }, action) => {\r\n switch (action.type) {\r\n case ORDER_DATA_REQUEST:\r\n return { ...state,loading: true }\r\n \r\n case ORDER_DATA_SUCCESS:\r\n return { loading: false, orderData: action.payload }\r\n \r\n case ORDER_DATA_FAIL:\r\n return { loading: false, error: action.payload }\r\n \r\n \r\n default:\r\n return state\r\n }\r\n}\r\n\r\n\r\nexport const orderSaleDataReducer = (state = { orderSaleData: [] }, action) => {\r\n switch (action.type) {\r\n case ORDER_SALE_DATA_REQUEST:\r\n return { ...state,loading: true }\r\n \r\n case ORDER_SALE_DATA_SUCCESS:\r\n return { loading: false, orderSaleData: action.payload }\r\n \r\n case ORDER_SALE_DATA_FAIL:\r\n return { loading: false, error: action.payload }\r\n \r\n \r\n default:\r\n return state\r\n }\r\n}\r\n","import { BLOG_DETAILS_FAIL, BLOG_DETAILS_REQUEST, BLOG_DETAILS_SUCCESS, BLOG_FETCH_FAIL, BLOG_FETCH_REQUEST, BLOG_FETCH_SUCCESS } from \"../../constants/blogConstant\"\r\n\r\nexport const blogListReducer = ( blogs=[], action) => {\r\n switch (action.type) {\r\n case BLOG_FETCH_REQUEST:\r\n return { loading: true, blogs: [] }\r\n \r\n case BLOG_FETCH_SUCCESS:\r\n return { loading: false, blogs: action.payload}\r\n \r\n case BLOG_FETCH_FAIL:\r\n return { loading: false, error: action.payload }\r\n \r\n default:\r\n return blogs\r\n }\r\n}\r\n\r\nexport const blogDetailsReducer = (state = { blog: {comments:[]} }, action) => {\r\n switch (action.type) {\r\n case BLOG_DETAILS_REQUEST:\r\n return { loading: true, ...state }\r\n \r\n case BLOG_DETAILS_SUCCESS:\r\n return { loading: false, blog: action.payload }\r\n \r\n case BLOG_DETAILS_FAIL:\r\n return { loading: false, error: action.payload }\r\n \r\n default:\r\n return state\r\n }\r\n}","import React from 'react';\r\nimport ReactDOM from 'react-dom';\r\nimport { Provider } from 'react-redux';\r\nimport App from './App';\r\nimport store from './store';\r\nimport './styles/index.css';\r\n\r\nReactDOM.render(\r\n <>\r\n \r\n \r\n \r\n ,\r\n \r\n >,\r\n document.getElementById('root')\r\n);\r\n\r\n"],"sourceRoot":""}
\ No newline at end of file
diff --git a/client/src/components/Ecommerce/Screen/OrderScreen.js b/client/src/components/Ecommerce/Screen/OrderScreen.js
index e7599de..2f7f22a 100644
--- a/client/src/components/Ecommerce/Screen/OrderScreen.js
+++ b/client/src/components/Ecommerce/Screen/OrderScreen.js
@@ -9,6 +9,8 @@ import { deliverOrder, getOrderDetails, payOrder } from "../../../redux/actions/
import Loader from "../Loader";
import Message from "../Message";
+const baseUrl = 'https://plantland.herokuapp.com'
+
const OrderScreen = ({ match,history }) => {
const orderId = match.params.id
@@ -48,7 +50,7 @@ const OrderScreen = ({ match,history }) => {
}
const addPayPalScript = async (req, res) => {
- const { data: clientId } = await axios.get('/api/config/paypal')
+ const { data: clientId } = await axios.get(`${baseUrl}/api/config/paypal`)
console.log(clientId);
const script = document.createElement('script')