{"version":3,"sources":["modules/Navigation/index.js","views/PageNotFound.js","modules/Auth/index.js","base.js","axios/API.js","redux/actions/cartAction.js","components/HomeCartView/index.js","components/MobileMenu/index.js","modules/mediaQuery/index.js","axios/LoginService.js","ServerRequest/index.js","redux/actions/LoginAction.js","utils/Validator/index.js","utils/Validator/rule/index.js","components/LoadingButton/index.js","components/LoginRegisterModal/LoginForm.js","redux/actions/RegisterAction.js","components/LoginRegisterModal/RegisterForm.js","components/LoginRegisterModal/index.js","components/NavBar/NavBar.js","redux/actions/langAction.js","redux/actions/CurrencyAction.js","components/NavBar/NavBarContainer.js","components/Footer/index.js","layouts/BaseLayout.js","axios/ProductService.js","redux/actions/productAction.js","axios/SliderService.js","components/HomeBanner/index.js","axios/CategoryService.js","components/Heading/index.js","components/CategoryBanner/CategoryBanner.js","components/Products/color-slider.js","components/Products/SingleProduct.js","components/Products/NewArrivals.js","components/Products/BestSeller.js","components/Benefit/index.js","components/Advertisement/index.js","views/Home/Home.js","views/Home/HomeContainer.js","views/Product/SingleProduct.js","redux/actions/variantsAction.js","views/Product/SingleProductContainer.js","redux/actions/categoryAction.js","views/Category/components/product-grid-skeleton.js","views/Category/Category.js","views/Category/CategoryContainer.js","views/Cart/CartItem.js","axios/cartService.js","views/Cart/Cart.js","routes/HomeRoutes.js","views/Cart/CartContainer.js","axios/OrdersService.js","redux/actions/OrdersAction.js","components/orders/info-card.js","components/orders/single-order.js","views/orders/Orders.js","routes/PrivateRoutes.js","views/orders/OrdersContainer.js","routes/index.js","App.js","serviceWorker.js","redux/reducers/LoginReducer.js","redux/reducers/RegisterReducer.js","redux/actions/DepartmentAction.js","redux/reducers/DepartmentReducer.js","redux/reducers/productReducer.js","redux/reducers/variantsReducer.js","redux/reducers/cartReducer.js","redux/reducers/categoryReducer.js","redux/reducers/langReducer.js","redux/reducers/CurrencyReducer.js","redux/reducers/OrdersReducer.js","redux/reducers/index.js","redux/store/index.js","index.js","assets/images/emptyCart.png","assets/images/logo_bg.png","assets/images/deal_ofthe_week.png","assets/images/empty_cart.png"],"names":["history","registerNav","ref","console","error","jumpTo","uri","push","PageNotFound","props","state","className","href","Component","this","user_token","JSON","parse","localStorage","getItem","token","user","id","new_token","setItem","stringify","removeItem","BASE_URL_SHORT","process","REACT_APP_API_KEY","TOKEN","authStorage","_headers","Authorization","configs","baseURL","httpsAgent","https","Agent","rejectUnauthorized","headers","instance","axios","create","defaults","common","interceptors","response","use","data","success","log","status","toast","type","result","message","postCart","productId","count","_color","price","image","en_name","ar_name","dispatch","POST_CART_BEGIN","items","parseInt","sub","product","subTotal","color","_products","products","_product","filter","e","index","indexOf","undefined","_sub","splice","_total","reduce","acc","a","_totalQty","total","totalQty","POST_CART_SUCCESS","payload","removeProductFromCart","REMOVE_PRODUCT_FROM_CART_BEGIN","REMOVE_PRODUCT_FROM_CART_SUCCESS","CLEAR_CART","GET_CART_BY_USERID_BEGIN","GET_CART_BY_USERID_SUCCESS","GET_CART_BY_USERID_FAIL","HomeCartView","goToChechout","cart","window","setState","Modal","Header","style","direction","lang","textAlign","display","gap","justifyContent","alignItems","Title","fontSize","minWidth","Object","keys","length","onClick","Body","src","EmptyCart","map","key","alt","flexDirection","background","width","borderRadius","height","border","Button","backgroundColor","borderColor","size","marginTop","connect","MobileMenu","clear","activeClass","onClose","aria-hidden","to","setLanguage","setCurrency","currency","Auth","getUserDetails","getToken","name","logout","loginClicked","device","min","mobileS","mobileM","mobileL","tablet","tabletL","laptop","laptopL","desktop","desktopL","max","LoginService","_email","_password","email","password","fcm_token","post","then","resp","new_user","setUserToken","catch","v_pasword","address","c_password","api","login","Login","register","Register","LOGIN_BEGIN","LOGIN_SUCCESS","LOGIN_FAIL","minLengthValidator","value","minLength","maxLengthValidator","maxLength","requiredValidator","trim","emailValidator","test","String","toLowerCase","validate","rules","isValid","rule","DEFAULT_RULE","isRequired","EMAIL_RULE","isEmail","LoadingButton","classNames","loading","disabled","children","defaultProps","LoginForm","handleChange","target","handleSubmit","Validator","userLogin","res","location","reload","placeholder","onChange","autoComplete","forgotPasswordClicked","registerClicked","cursor","mapDispatchToProps","login_loading","login_error","POST_REGISTER_BEGIN","POST_REGISTER_SUCCESS","POST_REGISTER_FAIL","RegisterForm","v_password","userRegister","register_loading","register_error","LoginRegister","showlogin","aria-labelledby","centered","onHide","NavBar","showHideModal","modalShow","showLoginHideModal","loginShow","handleMenuClicked","activeclass","preventDefault","setLang","activeLink","includes","logo","float","bind","marginBottom","marginRight","query","show","getLang","GET_LANG","SET_LANG","getCurrency","GET_Currency","SET_Currency","curr","Footer","BaseLayout","handleScroll","event","scrollY","topHaderClass","scrollTo","addEventListener","removeEventListener","NavBarContainer","ProductService","get","params","APPLY_FILTERS_BEGIN","APPLY_FILTERS_SUCCESS","APPLY_FILTERS_FAIL","SEARCH_BEGIN","SEARCH_SUCCESS","SEARCH_FAIL","GET_ALL_PRODUCTS_BEGIN","GET_ALL_PRODUCTS_SUCCESS","GET_ALL_PRODUCTS_FAIL","GET_PRODUCT_BEGIN","GET_PRODUCT_SUCCESS","GET_PRODUCT_FAIL","GET_PRODUCTS_BY_CATEGORY_BEGIN","GET_PRODUCTS_BY_CATEGORY_SUCCESS","GET_PRODUCTS_BY_CATEGORY_FAIL","GET_NEW_ARRIVAL_PRODUCT_BEGIN","GET_NEW_ARRIVAL_PRODUCT_SUCCESS","GET_NEW_ARRIVAL_PRODUCT_FAIL","SliderService","HomeBanner","useState","sliders","setSliders","useEffect","GetSlider","Carousel","slide","Item","backgroundImage","data-aos","en_title","en_title1","CategoryService","Heading","title","CategoryBanner","categories","setCategories","searchedCats","setSearchedCats","GetCategories","_val","_cats","name_a","cat","fontWeight","textDecoration","product_count","ColorSlider","colors","selectedColor","onColorClick","useKeenSlider","mode","slides","perView","spacing","rtl","sliderRef","boxShadow","SingleProduct","productItem","initialColorFromCart","setColor","qty","setQty","isProductAddedToCart","isProductAdded","setIsproductAdded","curProd","el","toString","onAddClicked","curColor","selling_price","images","path","source","lineHeight","padStart","Benefit","Advertisement","days","hours","sec","interval","setInterval","date","calculateCountdown","stop","endDate","diff","Date","timeLeft","years","millisec","Math","floor","clearInterval","countDown","DEALOFWEEK","addLeadingZeros","getTime","Home","addToBag","applyFilters","filter_string","API","method","url","getQuantity","cartItems","quantity","addToFav","addToFavorite","fav","er","handleThumbnailClick","item","pic","imagePath","selectedSize","_id","cartItem","pathname","split","slice","onRemoveClicked","productInCart","bigImage","handleImageClick","getProduct","getVariantsByProductId","prevProps","prevState","class","marginLeft","category","textTransform","name_en","name_ar","brand","en_availability","ar_availability","en_description","ar_description","paddingRight","paddingLeft","code","entity","depth","fontWeigh","paddingTop","visibility","position","left","right","GET_VARIANTS_QUERY_BEGIN","GET_VARIANTS_QUERY_SUCCESS","GET_VARIANTS_QUERY_FAIL","GetProduct","variants","variant","GET_ALL_CATEGORIES_BEGIN","GET_ALL_CATEGORIES_SUCCESS","GET_ALL_CATEGORIES_FAIL","GET_CATEGORY_BEGIN","GET_CATEGORY_SUCCESS","GET_CATEGORY_FAIL","ProductGridSkeleton","paddingBottom","Category","getProuctInitialColorFromCart","getDefaultCategory","Array","isArray","selected","filteredProducts","active","URLSearchParams","search","pageIndex","pageLength","productLoading","getAllCategories","catIdFromUrl","getAllProducts","category_id","persist","debounce","handleInputChange","options","values","labelField","valueField","searchable","searchBy","separator","showModal","last_page","current_page","newValue","from","_","i","withRouter","GetAllProducts","CartItem","handleClick","removeProduct","margin","CartService","Cart","setAddress","val","setCoupon","coupon","setName","recipient_name","setPhone","recipient_phone","setNotes","recipient_notes","checkout","payment_method","CheckOut","clearCart","GuestCheckOut","maxHeight","maxWidth","routes","exact","layout","component","SingleProductContainer","CategoryContainer","OrdersService","GET_ORDERS_BY_USERID_BEGIN","GET_ORDERS_BY_USERID_SUCCESS","GET_ORDERS_BY_USERID_FAIL","InfoCard","elements","element","SingleOrder","padding","overflowY","order","order_status","latitude","longitude","flexWrap","minHeight","payment_manually","Orders","toggleOrderModalState","newOrder","showOrder","selectedOrder","orders","pageSize","getMyOrders","meta","PrivateRoutes","GetMyOrders","PrivateRouter","Routes","createBrowserHistory","HomeRoutes","homeRoute","privateRoute","Redirect","App","AOS","init","Boolean","hostname","match","initialState","GET_DEPARTMENTS_BEGIN","GET_DEPARTMENTS_SUCCESS","GET_DEPARTMENTS_FAIL","departments","newArrivalProducts","combineReducers","department","action","signin_loading","per_page","middlewares","thunk","composeEnhancers","__REDUX_DEVTOOLS_EXTENSION_COMPOSE__","compose","store","createStore","rootReducer","applyMiddleware","ReactDOM","render","document","getElementById","navigator","serviceWorker","ready","registration","unregister","module","exports"],"mappings":"+VAAIA,E,iIACSC,EAAc,SAACC,GACtBA,GAAOA,EAAIF,QACbA,EAAUE,EAAIF,QAEdG,QAAQC,MAAM,mDAUHC,EANA,SAACC,GACdN,EAAQO,KAAKD,I,QCwBAE,E,kDA/Bb,WAAaC,GAAQ,IAAD,8BAClB,cAAOA,IACFC,MAAQ,GAFK,E,qDAKlB,OACE,yBAAKC,UAAU,6BACb,yBAAKA,UAAU,yDACb,yBAAKA,UAAU,yBACb,wBAAIA,UAAU,YAAd,SACA,wBAAIA,UAAU,cAAd,yBAEF,yBAAKA,UAAU,yBACb,uIAKA,uBACEC,KAAK,IACLD,UAAU,0DAFZ,yB,GAnBeE,a,kCCwBZ,G,OAAA,I,WAvBb,aAAe,oBACbC,KAAKC,WAAaC,KAAKC,MAAMC,aAAaC,QAAQ,UAAY,G,uDAG9D,OAAOL,KAAKC,WAAWK,Q,kCAEZ,IAAD,EACV,iBAAON,KAAKC,WAAWM,YAAvB,aAAO,EAAsBC,K,uCAI7B,OAAOR,KAAKC,WAAWM,O,mCAGZE,GACXT,KAAKC,WAAaQ,EAClBL,aAAaM,QAAQ,OAAQR,KAAKS,UAAUF,M,+BAG5CL,aAAaQ,WAAW,QACxBR,aAAaQ,WAAW,Y,wBCtBfC,EAAiBC,gC,GACPA,oOAAYC,kBACdD,oOAAYE,M,yCCE3BC,EAAcb,aAAaC,QAAQ,QACnCC,EAAQW,GAAW,UA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MoD,a,wCezI5BqhB,EAAOC,QAAU,IAA0B,uC,mBCA3CD,EAAOC,QAAU,IAA0B,qC,mBCA3CD,EAAOC,QAAU,IAA0B,6C,mBCA3CD,EAAOC,QAAU,IAA0B,yC","file":"static/js/main.b3774b9f.chunk.js","sourcesContent":["let history;\r\nexport const registerNav = (ref) => {\r\n if (ref && ref.history) {\r\n history = ref.history;\r\n } else {\r\n console.error(\"Invalid ref object or missing history property\");\r\n }\r\n};\r\n\r\nconst jumpTo = (uri) => {\r\n history.push(uri);\r\n};\r\nexport const go = (uri) => {\r\n history.go(uri);\r\n};\r\nexport default jumpTo;\r\n","import React, {Component} from 'react';\r\n\r\nclass PageNotFound extends Component {\r\n constructor (props) {\r\n super (props);\r\n this.state = {};\r\n }\r\n render () {\r\n return (\r\n
\r\n
\r\n
\r\n

Oops!

\r\n

404 - PAGE NOT FOUND

\r\n
\r\n
\r\n

\r\n The page you are looking for might have been removed had its name\r\n changed or is temporarily unavailable.\r\n

\r\n\r\n \r\n GOTO HOME PAGE\r\n \r\n
\r\n
\r\n
\r\n );\r\n }\r\n}\r\n\r\nexport default PageNotFound;\r\n","\r\n\r\nclass Auth {\r\n constructor() {\r\n this.user_token = JSON.parse(localStorage.getItem(\"auth\")) || {};\r\n }\r\n getToken() {\r\n return this.user_token.token;\r\n }\r\n getUserId() {\r\n return this.user_token.user?.id;\r\n }\r\n\r\n getUserDetails() {\r\n return this.user_token.user;\r\n }\r\n\r\n setUserToken(new_token) {\r\n this.user_token = new_token;\r\n localStorage.setItem(\"auth\", JSON.stringify(new_token));\r\n }\r\n logout() {\r\n localStorage.removeItem(\"auth\");\r\n localStorage.removeItem(\"cart\");\r\n }\r\n}\r\nexport default new Auth();\r\n","export const BASE_URL = process.env.REACT_APP_BASE_URL;\r\nexport const BASE_URL_SHORT = process.env.REACT_APP_BASE_URL_SHORT;\r\nexport const API_KEY = process.env.REACT_APP_API_KEY;\r\nexport const TOKEN = process.env.TOKEN;\r\n","import axios from \"axios\";\r\nimport https from \"https\";\r\nimport { AxiosRequestConfig } from \"axios/index\";\r\nimport { toast } from \"react-toastify\";\r\n\r\nconst authStorage = localStorage.getItem(\"auth\");\r\nconst token = authStorage ? JSON.parse(authStorage).token ?? null : null;\r\nconst _headers = {\r\n Authorization: token ? `Bearer ${token}` : null,\r\n};\r\n\r\nconst configs = {\r\n baseURL: process.env.REACT_APP_BASE_URL,\r\n httpsAgent: new https.Agent({\r\n rejectUnauthorized: false,\r\n }),\r\n headers: _headers,\r\n};\r\nconst instance = axios.create(configs);\r\ninstance.defaults.headers.common[\"Content-Type\"] =\r\n \"application/json;charset=utf-8\";\r\n// instance.defaults.timeout = 2500;\r\n\r\ninstance.interceptors.response.use(\r\n (response) => {\r\n if (!response.data.success) {\r\n let result = response.data;\r\n return result;\r\n }\r\n return response;\r\n },\r\n (error) => {\r\n console.log(error);\r\n if (error.response.status === 401) {\r\n toast(\"You're unauthorized to do this!\", {\r\n type: \"error\",\r\n });\r\n } else if (error.response.status === 403) {\r\n toast(\"Session expired! Please login again.\", {\r\n type: \"error\",\r\n });\r\n } else {\r\n if (!error.response.data.success) {\r\n let result = error.response.data;\r\n console.log(result);\r\n toast(result.message, {\r\n type: \"error\",\r\n });\r\n }\r\n }\r\n }\r\n);\r\n\r\nexport default instance;\r\n","import API from \"../../axios/API\";\r\nimport Auth from \"../../modules/Auth\";\r\n\r\nexport const getCartByUserId = () => (dispatch) => {\r\n let userId = Auth.getUserId();\r\n dispatch({\r\n type: GET_CART_BY_USERID_BEGIN,\r\n });\r\n return API({\r\n method: \"GET\",\r\n url: `users/${userId}/cart`,\r\n })\r\n .then((res) => {\r\n dispatch({\r\n type: GET_CART_BY_USERID_SUCCESS,\r\n payload: res,\r\n });\r\n return res;\r\n })\r\n .catch((error) => {\r\n dispatch({\r\n type: GET_CART_BY_USERID_FAIL,\r\n payload: {\r\n error,\r\n },\r\n });\r\n return error;\r\n });\r\n};\r\nexport const clearCart = () => (dispatch) => {\r\n dispatch({\r\n type: CLEAR_CART,\r\n });\r\n};\r\nexport const postCart =\r\n (productId, count, _color, price, image, en_name, ar_name) => (dispatch) => {\r\n dispatch({\r\n type: POST_CART_BEGIN,\r\n });\r\n let items = JSON.parse(localStorage.getItem(\"cart\")) || {};\r\n count = parseInt(count);\r\n if (JSON.stringify(items) == \"{}\") {\r\n let sub = parseInt(price) * parseInt(count);\r\n let product = {\r\n id: productId,\r\n en_name: en_name,\r\n ar_name: ar_name,\r\n count: count,\r\n price: parseInt(price),\r\n subTotal: sub,\r\n color: _color,\r\n image: image,\r\n };\r\n let _products = [];\r\n _products.push(product);\r\n items = {\r\n products: _products,\r\n };\r\n } else {\r\n console.log(items);\r\n let products = items.products;\r\n let _product = products.filter(\r\n (e, index) => e.id == productId && e.color === _color\r\n )[0];\r\n let index = products.indexOf(_product);\r\n if (_product !== undefined) {\r\n _product.count = parseInt(count);\r\n let _sub = parseInt(price) * parseInt(count);\r\n _product.subTotal = _sub;\r\n _product.count = count;\r\n products.splice(index, 1, _product);\r\n } else {\r\n let _sub = parseInt(price) * parseInt(count);\r\n let product = {\r\n id: productId,\r\n en_name: en_name,\r\n ar_name: ar_name,\r\n count: count,\r\n price: parseInt(price),\r\n subTotal: _sub,\r\n color: _color,\r\n image: image,\r\n };\r\n products.push(product);\r\n }\r\n items.products = products;\r\n }\r\n let _total = items.products.reduce((acc, a) => acc + a.subTotal, 0);\r\n let _totalQty = items.products.reduce((acc, a) => acc + a.count, 0);\r\n items.total = _total;\r\n items.totalQty = _totalQty;\r\n dispatch({\r\n type: POST_CART_SUCCESS,\r\n payload: items,\r\n });\r\n localStorage.setItem(\"cart\", JSON.stringify(items));\r\n };\r\n\r\nexport const removeProductFromCart = (productId, _color) => (dispatch) => {\r\n dispatch({\r\n type: REMOVE_PRODUCT_FROM_CART_BEGIN,\r\n });\r\n let items = JSON.parse(localStorage.getItem(\"cart\")) || {};\r\n if (items && items.products) {\r\n let _product = items.products.filter(\r\n (e, index) => e.id === productId && e.color === _color\r\n )[0];\r\n let index = items.products.indexOf(_product);\r\n if (_product) {\r\n items.products.splice(index, 1);\r\n\r\n let _total = items.products.reduce((acc, a) => acc + a.subTotal, 0);\r\n let _totalQty = items.products.reduce((acc, a) => acc + a.count, 0);\r\n items.total = _total;\r\n items.totalQty = _totalQty;\r\n console.log(items);\r\n\r\n dispatch({\r\n type: REMOVE_PRODUCT_FROM_CART_SUCCESS,\r\n payload: items,\r\n });\r\n localStorage.setItem(\"cart\", JSON.stringify(items));\r\n }\r\n }\r\n};\r\n\r\nexport const POST_CART_BEGIN = \"POST_CART_BEGIN\";\r\nexport const POST_CART_SUCCESS = \"POST_CART_SUCCESS\";\r\nexport const POST_CART_FAIL = \"POST_CART_FAIL\";\r\nexport const CLEAR_CART = \"CLEAR_CART\";\r\n\r\nexport const GET_CART_BY_USERID_BEGIN = \"GET_CART_BY_USERID_BEGIN\";\r\nexport const GET_CART_BY_USERID_SUCCESS = \"GET_CART_BY_USERID_SUCCESS\";\r\nexport const GET_CART_BY_USERID_FAIL = \"GET_CART_BY_USERID_FAIL\";\r\n\r\nexport const REMOVE_PRODUCT_FROM_CART_BEGIN = \"REMOVE_PRODUCT_FROM_CART_BEGIN\";\r\nexport const REMOVE_PRODUCT_FROM_CART_SUCCESS =\r\n \"REMOVE_PRODUCT_FROM_CART_SUCCESS\";\r\n","import React, { Component } from \"react\";\r\nimport { Modal, Button } from \"react-bootstrap\";\r\nimport \"./style.css\";\r\nimport Auth from \"../../modules/Auth\";\r\nimport EmptyCart from \"../../assets/images/emptyCart.png\";\r\nimport jumpTo from \"../../modules/Navigation\";\r\nimport { connect } from \"react-redux\";\r\nimport { BASE_URL_SHORT } from \"../../base\";\r\nimport { removeProductFromCart } from \"../../redux/actions/cartAction\";\r\n\r\nclass HomeCartView extends Component {\r\n constructor(props) {\r\n super(props);\r\n this.state = {\r\n cart: {},\r\n };\r\n }\r\n goToChechout = () => {\r\n jumpTo(\"/cart\");\r\n };\r\n componentDidMount() {\r\n if (typeof window !== \"undefined\") {\r\n this.setState({ cart: JSON.parse(window.localStorage.getItem(\"cart\")) });\r\n }\r\n }\r\n render() {\r\n const products = this.props.cart.cart.products;\r\n const total = this.props.cart.cart.total;\r\n const totalQty = this.props.cart.cart.totalQty;\r\n return (\r\n \r\n \r\n \r\n {this.props.lang == \"en\" ? `Your Cart` : `سلة المنتجات`}\r\n \r\n {products !== undefined &&\r\n products !== null &&\r\n Object.keys(products).length > 0 && (\r\n this.goToChechout()}\r\n >\r\n {this.props.lang == \"en\" ? `checkout` : `تأكيد الطلب`}\r\n \r\n )}\r\n \r\n \r\n
\r\n {products !== undefined &&\r\n products !== null &&\r\n Object.keys(products).length > 0 ? null : (\r\n
\r\n \r\n

\r\n {this.props.lang == \"en\" ? `Empty cart` : `السلة فارغة`}\r\n

\r\n
\r\n )}\r\n
\r\n\r\n {products !== undefined &&\r\n products !== null &&\r\n Object.keys(products).map((id) => {\r\n return (\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n {this.props.lang == \"en\"\r\n ? products[id].en_name\r\n : products[id].ar_name}\r\n
\r\n
\r\n
\r\n
\r\n \r\n {this.props.lang == \"en\" ? `Quantity: ` : \" الكمية: \"}\r\n \r\n \r\n {products[id].count}\r\n \r\n
\r\n
\r\n \r\n {this.props.lang == \"en\" ? `Price: ` : \" السعر: \"}\r\n \r\n {`${\r\n products[id].price\r\n } ${this.props.lang === \"en\" ? \"Dinar\" : \"دينار\"}`}\r\n
\r\n
\r\n \r\n {this.props.lang == \"en\"\r\n ? ` SubTotal: `\r\n : \" المجموع الجزئي: \"}\r\n \r\n \r\n {/* {this.props.currency == \"dollar\"\r\n ? `$${products[id].subTotal}`\r\n : `${(products[id].subTotal * 235.17).toFixed(\r\n 2\r\n )} YRI`} */}\r\n {`${products[id].subTotal} ${\r\n this.props.lang === \"en\" ? \"Dinar\" : \"دينار\"\r\n }`}\r\n \r\n
\r\n \r\n \r\n \r\n this.props.removeProductFromCart(\r\n products[id].id,\r\n products[id].color\r\n )\r\n }\r\n style={{\r\n borderRadius: \"50%\",\r\n backgroundColor: \"red\",\r\n borderColor: \"red\",\r\n }}\r\n size=\"sm\"\r\n >\r\n X\r\n \r\n \r\n \r\n );\r\n })}\r\n {products !== undefined &&\r\n products !== null &&\r\n Object.keys(products).length > 0 && (\r\n
\r\n

\r\n \r\n \r\n {this.props.lang == \"en\" ? ` Total: ` : \" المجموع: \"}\r\n \r\n \r\n \r\n {/* {this.props.currency == \"dollar\"\r\n ? `$${total}`\r\n : `${(total * 235.17).toFixed(2)} YRI`} */}\r\n {`${total} ${this.props.lang === \"en\" ? \"Dinar\" : \"دينار\"}`}\r\n \r\n

\r\n this.goToChechout()}\r\n >\r\n \r\n {this.props.lang == \"en\" ? `Checkout ` : \" تأكيد \"}\r\n \r\n \r\n
\r\n )}\r\n \r\n
\r\n );\r\n }\r\n}\r\n\r\nconst mapStoreToProps = (state) => ({\r\n cart: state.cart,\r\n});\r\nconst mapDispatchToProps = (dispatch) => ({\r\n // getAllProducts: () => dispatch(getAllProducts()),\r\n // applyFilters: filter_string => dispatch(applyFilters(filter_string)),\r\n // postCart: (productId,count,color, price, image) => dispatch(postCart(productId, count, color, price, image))\r\n removeProductFromCart: (productId, _color) =>\r\n dispatch(removeProductFromCart(productId, _color)),\r\n});\r\n\r\nexport default connect(mapStoreToProps, mapDispatchToProps)(HomeCartView);\r\n","import React, { Component } from \"react\";\r\nimport PropTypes from \"prop-types\";\r\nimport { Link } from \"react-router-dom/cjs/react-router-dom.min\";\r\nimport Auth from \"../../modules/Auth\";\r\n\r\nclass MobileMenu extends Component {\r\n constructor(props) {\r\n super(props);\r\n console.clear();\r\n console.log(\"mobile\", props);\r\n this.state = {};\r\n }\r\n render() {\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\nMobileMenu.propTypes = {\r\n activeClass: PropTypes.bool,\r\n onClose: PropTypes.func,\r\n};\r\n\r\nexport default MobileMenu;\r\n","\r\n\r\nexport const size = {\r\n mobileS: \"320px\",\r\n mobileM: \"375px\",\r\n mobileL: \"425px\",\r\n tablet: \"768px\",\r\n tabletL: \"991px\",\r\n laptop: \"1024px\",\r\n laptopL: \"1440px\",\r\n desktop: \"2560px\",\r\n};\r\nconst device = {\r\n min: {\r\n mobileS: `(min-width: ${size.mobileS})`,\r\n mobileM: `(min-width: ${size.mobileM})`,\r\n mobileL: `(min-width: ${size.mobileL})`,\r\n tablet: `(min-width: ${size.tablet})`,\r\n tabletL: `(min-width: ${size.tabletL})`,\r\n laptop: `(min-width: ${size.laptop})`,\r\n laptopL: `(min-width: ${size.laptopL})`,\r\n desktop: `(min-width: ${size.desktop})`,\r\n desktopL: `(min-width: ${size.desktop})`,\r\n },\r\n max: {\r\n mobileS: `(max-width: ${size.mobileS})`,\r\n mobileM: `(max-width: ${size.mobileM})`,\r\n mobileL: `(max-width: ${size.mobileL})`,\r\n tablet: `(max-width: ${size.tablet})`,\r\n tabletL: `(max-width: ${size.tabletL})`,\r\n laptop: `(max-width: ${size.laptop})`,\r\n laptopL: `(max-width: ${size.laptopL})`,\r\n desktop: `(max-width: ${size.desktop})`,\r\n desktopL: `(max-width: ${size.desktop})`,\r\n },\r\n};\r\n\r\nexport default device;\r\n","import api from \"./API\";\r\nimport instance from \"./API\";\r\nimport axios from \"axios\";\r\nimport https from \"https\";\r\nimport Auth from \"../modules/Auth\";\r\nexport default class LoginService {\r\n instance = axios.create({\r\n baseURL: process.env.REACT_APP_BASE_URL,\r\n httpsAgent: new https.Agent({\r\n rejectUnauthorized: false,\r\n }),\r\n headers: {\r\n \"Content-Type\":\r\n \"multipart/form-data; boundary=\",\r\n },\r\n });\r\n static async Login(_email, _password) {\r\n const payload = {\r\n email: _email,\r\n password: _password,\r\n fcm_token: \"afasdasd\",\r\n };\r\n return instance\r\n .post(\"/login\", payload)\r\n .then((resp) => {\r\n if (resp.data.success) {\r\n const new_user = {\r\n token: resp.data.data.token,\r\n user: resp.data.data.user,\r\n };\r\n Auth.setUserToken(new_user);\r\n return resp.data.data;\r\n }\r\n })\r\n .catch((error) => {\r\n console.log(\"Api Error:\", error);\r\n throw error;\r\n });\r\n }\r\n static async Register(name, email, password, v_pasword, address) {\r\n const payload = {\r\n name: name,\r\n email: email,\r\n password: password,\r\n c_password: v_pasword,\r\n address: address,\r\n fcm_token: \"frfr\",\r\n };\r\n return instance\r\n .post(\"/register\", payload)\r\n .then((resp) => {\r\n console.log(\"serv\", resp.data);\r\n if (resp.data.success) {\r\n return resp.data;\r\n }\r\n })\r\n .catch((error) => {\r\n console.log(\"Api Error:\", error);\r\n throw error;\r\n });\r\n }\r\n static async LoginWithGoogle(_email, _password) {\r\n const payload = {\r\n email: _email,\r\n password: _password,\r\n fcm_token: \"afasdasd\",\r\n };\r\n return api\r\n .post(\"/auth/google\", payload)\r\n .then((resp) => {\r\n if (resp.data.success) return resp.data.data;\r\n })\r\n .catch((error) => {\r\n console.log(\"Api Error:\", error);\r\n throw error;\r\n });\r\n }\r\n static async LoginWithFacebook(_email, _password) {\r\n const payload = {\r\n email: _email,\r\n password: _password,\r\n fcm_token: \"afasdasd\",\r\n };\r\n return api\r\n .post(\"/auth/facebook\", payload)\r\n .then((resp) => {\r\n if (resp.data.success) return resp.data.data;\r\n })\r\n .catch((error) => {\r\n console.log(\"Api Error:\", error);\r\n throw error;\r\n });\r\n }\r\n}\r\n","import API from \"../axios/API\";\r\nimport Auth from \"../modules/Auth\";\r\nimport LoginService from \"../axios/LoginService\";\r\n\r\n\r\nexport const login = async (email, password) => {\r\n return LoginService.Login(email, password)\r\n .then(resp => {\r\n console.log(resp)\r\n return resp.data.data\r\n }).catch(error => {\r\n console.clear()\r\n console.error(error)\r\n })\r\n};\r\nexport const register = async (name, email, password, v_pasword, address) => {\r\n return LoginService.Register(name, email, password, v_pasword, address)\r\n .then(resp => {\r\n return resp\r\n }).catch(error => {\r\n console.clear()\r\n console.error(error)\r\n })\r\n};","import {\r\n login,\r\n} from \"../../ServerRequest\";\r\n\r\nexport const userLogin = (email, password) => dispatch => {\r\n dispatch({\r\n type: LOGIN_BEGIN\r\n });\r\n return login(email, password)\r\n .then(res => {\r\n console.clear()\r\n console.log(res)\r\n dispatch({\r\n type: LOGIN_SUCCESS,\r\n payload: res\r\n });\r\n return res;\r\n })\r\n .catch(error => {\r\n dispatch({\r\n type: LOGIN_FAIL,\r\n payload: {\r\n error\r\n }\r\n });\r\n throw error;\r\n });\r\n};\r\n\r\nexport const insertToken = () => dispatch => {\r\n let token;\r\n if (localStorage.getItem(\"auth\")) {\r\n token = JSON.parse(localStorage.getItem(\"auth\"));\r\n dispatch({\r\n type: INSERT_TOKEN_SUCCESS,\r\n payload: token\r\n });\r\n } else {\r\n dispatch({\r\n type: INSERT_TOKEN_FAIL\r\n });\r\n }\r\n};\r\n\r\nexport const LOGIN_BEGIN = \"LOGIN_BEGIN\";\r\nexport const LOGIN_SUCCESS = \"LOGIN_SUCCESS\";\r\nexport const LOGIN_FAIL = \"LOGIN_FAIL\";\r\nexport const INSERT_TOKEN_SUCCESS = \"INSERT_TOKEN_SUCCESS\";\r\nexport const INSERT_TOKEN_FAIL = \"INSERT_TOKEN_FAIL\";","\r\n\r\nconst validate = (value, rules) => {\r\n let isValid = true;\r\n\r\n for (let rule in rules) {\r\n switch (rule) {\r\n case \"minLength\":\r\n isValid = isValid && minLengthValidator(value, rules[rule]);\r\n break;\r\n\r\n case \"maxLength\":\r\n isValid = isValid && maxLengthValidator(value, rules[rule]);\r\n break;\r\n\r\n case \"isRequired\":\r\n isValid = isValid && requiredValidator(value);\r\n break;\r\n\r\n case \"isEmail\":\r\n isValid = isValid && emailValidator(value);\r\n break;\r\n\r\n default:\r\n isValid = true;\r\n }\r\n }\r\n\r\n return isValid;\r\n};\r\n\r\n/**\r\n * minLength Val\r\n * @param value\r\n * @param minLength\r\n * @return\r\n */\r\nconst minLengthValidator = (value, minLength) => {\r\n return value.length >= minLength;\r\n};\r\n\r\n/**\r\n * minLength Val\r\n * @param value\r\n * @param minLength\r\n * @return\r\n */\r\nconst maxLengthValidator = (value, maxLength) => {\r\n return value.length == maxLength;\r\n};\r\n\r\n/**\r\n * Check to confirm that feild is required\r\n *\r\n * @param value\r\n * @return\r\n */\r\nconst requiredValidator = value => {\r\n return value !== null && value.trim() !== \"\";\r\n};\r\n\r\n/**\r\n * Email validation\r\n *\r\n * @param value\r\n * @return\r\n */\r\nconst emailValidator = value => {\r\n var re = /^(([^<>()\\[\\]\\\\.,;:\\s@\"]+(\\.[^<>()\\[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/;\r\n return re.test(String(value).toLowerCase());\r\n};\r\n\r\n/**\r\n * Name validation\r\n *\r\n * @param value\r\n * @return\r\n */\r\nconst nameValidator = value => {\r\n var re = /^[a-zA-Z]+((['. ][a-zA-Z ])?[a-zA-Z]*)*$/;\r\n return re.test(String(value).toLowerCase());\r\n};\r\n/**\r\n * Name validation\r\n *\r\n * @param value\r\n * @return\r\n */\r\nconst mobileValidator = value => {\r\n var re = /^[0-9]*$/;\r\n return re.test(String(value).toLowerCase());\r\n};\r\n/**\r\n * IP validation\r\n *\r\n * @param value\r\n * @return\r\n */\r\nconst ipValidator = value => {\r\n var re = /^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$/;\r\n return re.test(String(value));\r\n};\r\n/**\r\n * IP validation\r\n *\r\n * @param value\r\n * @return\r\n */\r\nconst dateValidator = value => {\r\n var re = /^((0?[13578]|10|12)(-|\\/)(([1-9])|(0[1-9])|([12])([0-9]?)|(3[01]?))(-|\\/)((19)([2-9])(\\d{1})|(20)([01])(\\d{1})|([8901])(\\d{1}))|(0?[2469]|11)(-|\\/)(([1-9])|(0[1-9])|([12])([0-9]?)|(3[0]?))(-|\\/)((19)([2-9])(\\d{1})|(20)([01])(\\d{1})|([8901])(\\d{1})))$/;\r\n return re.test(String(value));\r\n};\r\n\r\nexport default validate;\r\n","\r\n\r\nexport const DEFAULT_RULE = {\r\n isRequired: true\r\n};\r\nexport const NAME_RULE = {\r\n isRequired: true,\r\n minLength: 3\r\n};\r\nexport const PHONE_RULE = {\r\n isRequired: true,\r\n maxLength: 15,\r\n minLength: 10\r\n};\r\nexport const EMAIL_RULE = {\r\n isRequired: true,\r\n isEmail: true\r\n};\r\n","\r\n\r\nimport React, { Component } from \"react\";\r\nimport PropTypes from \"prop-types\";\r\nimport classNames from \"classnames\";\r\nimport \"./style.css\";\r\nfunction LoadingButton(props) {\r\n return (\r\n \r\n {props.loading ? \"Please Wait...\" : {props.children}}\r\n \r\n );\r\n}\r\n\r\nLoadingButton.propTypes = {\r\n className: PropTypes.string,\r\n loading: PropTypes.bool,\r\n onClick: PropTypes.func,\r\n type: PropTypes.string\r\n};\r\n\r\nLoadingButton.defaultProps = {\r\n className: \"btn-primary btn-7\",\r\n loading: false,\r\n type: \"button\"\r\n};\r\n\r\nexport default LoadingButton;\r\n","\r\n\r\nimport React, { Component } from \"react\";\r\nimport { connect } from \"react-redux\";\r\nimport { userLogin } from \"../../redux/actions/LoginAction\";\r\nimport jumpTo from \"../../modules/Navigation\";\r\nimport Validator from \"../../utils/Validator\";\r\nimport { DEFAULT_RULE, EMAIL_RULE } from \"../../utils/Validator/rule\";\r\nimport PropTypes from \"prop-types\";\r\nimport LoadingButton from \"../LoadingButton\";\r\n\r\nclass LoginForm extends Component {\r\n constructor(props) {\r\n super(props);\r\n this.state = {\r\n email: \"\",\r\n password: \"\",\r\n loading: false\r\n };\r\n }\r\n\r\n handleChange = e => {\r\n const { name, value } = e.target;\r\n this.setState({ [name]: value });\r\n };\r\n\r\n handleSubmit = () => {\r\n // let email = \"bob@bob.com\";\r\n // let password = \"Ab123123\";\r\n const { email, password } = this.state;\r\n if (!Validator(email, EMAIL_RULE)) {\r\n console.log(\"email Error\");\r\n return;\r\n }\r\n if (!Validator(password, DEFAULT_RULE)) {\r\n console.log(\"Password Error\");\r\n return;\r\n }\r\n this.setState({ loading: true });\r\n this.props\r\n .userLogin(email, password)\r\n .then(res => {\r\n console.log(res);\r\n this.setState({ loading: false });\r\n window.location.reload();\r\n })\r\n .catch(error => {\r\n // console.log('loginsignin error')\r\n console.log(error.response);\r\n this.setState({ loading: false });\r\n });\r\n };\r\n\r\n render() {\r\n return (\r\n
\r\n
\r\n

Login

\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n Invalid Credentials\r\n \r\n Lost your password?\r\n \r\n this.handleSubmit()}\r\n >\r\n Log in\r\n \r\n \r\n New user ? Please Register\r\n
\r\n
\r\n \r\n );\r\n }\r\n}\r\n\r\nLoginForm.propTypes = {\r\n forgotPasswordClicked: PropTypes.func,\r\n registerClicked: PropTypes.func\r\n};\r\n\r\nconst mapDispatchToProps = {\r\n userLogin\r\n};\r\nconst mapStoreToProps = state => ({\r\n login_loading: state.login.login_loading,\r\n login_error: state.login.error\r\n});\r\n\r\nexport default connect(mapStoreToProps, mapDispatchToProps)(LoginForm);\r\n","\r\n\r\nimport { register } from \"../../ServerRequest\";\r\n\r\nexport const userRegister = (name, email, password, v_pasword, address) => dispatch => {\r\n dispatch({\r\n type: POST_REGISTER_BEGIN\r\n });\r\n return register(name, email, password, v_pasword, address)\r\n .then(res => {\r\n dispatch({\r\n type: POST_REGISTER_SUCCESS,\r\n payload: res\r\n });\r\n return res;\r\n })\r\n .catch(error => {\r\n dispatch({\r\n type: POST_REGISTER_FAIL,\r\n payload: {\r\n error\r\n }\r\n });\r\n\r\n throw error;\r\n });\r\n}\r\nexport const POST_REGISTER_BEGIN = \"POST_REGISTER_BEGIN\";\r\nexport const POST_REGISTER_SUCCESS = \"POST_REGISTER_SUCCESS\";\r\nexport const POST_REGISTER_FAIL = \"POST_REGISTER_FAIL\";\r\n","\r\n\r\nimport React, { Component } from \"react\";\r\nimport jumpTo from \"../../modules/Navigation\";\r\nimport Validator from \"../../utils/Validator\";\r\nimport { DEFAULT_RULE, EMAIL_RULE } from \"../../utils/Validator/rule\";\r\nimport PropTypes from \"prop-types\";\r\nimport { connect } from \"react-redux\";\r\nimport { userRegister } from \"../../redux/actions/RegisterAction\";\r\nimport LoadingButton from \"../LoadingButton\";\r\nimport { toast } from \"react-toastify\";\r\n\r\nclass RegisterForm extends Component {\r\n constructor(props) {\r\n super(props);\r\n this.state = {\r\n name: \"\",\r\n email: \"\",\r\n password: \"\",\r\n v_password: \"\",\r\n address: \"\",\r\n loading: false\r\n };\r\n }\r\n handleChange = e => {\r\n const { name, value } = e.target;\r\n this.setState({ [name]: value });\r\n };\r\n\r\n handleSubmit = () => {\r\n const { name, email, password, v_password, address } = this.state;\r\n if (!Validator(name, DEFAULT_RULE)) {\r\n console.log(\"Name Error\");\r\n return;\r\n }\r\n if (!Validator(email, EMAIL_RULE)) {\r\n console.log(\"email Error\");\r\n return;\r\n }\r\n if (!Validator(password, DEFAULT_RULE)) {\r\n console.log(\"Password Error\");\r\n return;\r\n }\r\n if(password !== v_password )\r\n {\r\n console.log(\"Password and Confirm Password don't match\");\r\n return;\r\n }\r\n this.setState({ loading: true });\r\n this.props\r\n .userRegister(name, email, password, v_password, address)\r\n .then(res => {\r\n this.setState({ loading: false });\r\n if(res.success) {\r\n this.props.lang == 'en' ? toast.success(\"You've successfully signed up, please login\") : toast.success('لقد تم إنشاء الحساب بنجاح، الرجاء تسجيل الدخول')\r\n }\r\n })\r\n .catch(error => {\r\n // console.log('loginsignin error')\r\n console.log(error.response);\r\n this.setState({ loading: false });\r\n });\r\n };\r\n\r\n render() {\r\n return (\r\n
\r\n
\r\n

Register

\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 Invalid Credentials\r\n this.handleSubmit()}\r\n >\r\n Register\r\n \r\n \r\n Already have an account ? Please login.\r\n
\r\n
\r\n \r\n );\r\n }\r\n}\r\n\r\nRegisterForm.propTypes = {\r\n loginClicked: PropTypes.func\r\n};\r\n\r\nconst mapDispatchToProps = {\r\n userRegister\r\n};\r\nconst mapStoreToProps = state => ({\r\n register_loading: state.register.register_loading,\r\n register_error: state.register.error,\r\n lang: state.lang.lang\r\n});\r\n\r\nexport default connect(mapStoreToProps, mapDispatchToProps)(RegisterForm);\r\n","\r\n\r\nimport React, { Component } from \"react\";\r\nimport { Modal, Button } from \"react-bootstrap\";\r\nimport LoginForm from \"./LoginForm\";\r\nimport RegisterForm from \"./RegisterForm\";\r\nimport \"./style.css\";\r\nimport PropTypes from \"prop-types\";\r\nclass LoginRegister extends Component {\r\n constructor(props) {\r\n super(props);\r\n this.state = {\r\n showlogin: this.props.showlogin\r\n };\r\n }\r\n\r\n render() {\r\n return (\r\n \r\n \r\n
\r\n \r\n
\r\n {this.props.login ? (\r\n this.props.registerClicked()} />\r\n ) : (\r\n this.props.loginClicked()} />\r\n )}\r\n
\r\n \r\n );\r\n }\r\n}\r\nLoginRegister.propTypes = {\r\n login: PropTypes.bool,\r\n registerClicked: PropTypes.func,\r\n loginClicked: PropTypes.func\r\n};\r\nexport default LoginRegister;\r\n","import React, { Component } from \"react\";\r\nimport { Link } from \"react-router-dom\";\r\nimport HomeCartView from \"../HomeCartView\";\r\nimport MobileMenu from \"../MobileMenu\";\r\nimport device, { size } from \"../../modules/mediaQuery\";\r\nimport MediaQuery from \"react-responsive\";\r\nimport Auth from \"../../modules/Auth\";\r\nimport LoginRegister from \"../LoginRegisterModal\";\r\nimport logo from \"../../assets/images/logo_bg.png\";\r\nimport jumpTo from \"../../modules/Navigation\";\r\nimport { useLocation } from \"react-router-dom/cjs/react-router-dom\";\r\nclass NavBar extends Component {\r\n constructor(props) {\r\n super(props);\r\n this.state = {\r\n modalShow: false,\r\n loginShow: false,\r\n activeclass: false,\r\n lang: this.props.lang.lang,\r\n currency: this.props.currency.currency,\r\n activeLink: \"\",\r\n };\r\n }\r\n // componentDidMount() {\r\n // if (Object.keys(this.props.cart).length < 1) {\r\n // this.props.getCartByUserId();\r\n // }\r\n // }\r\n\r\n showHideModal = () => {\r\n this.setState({ modalShow: !this.state.modalShow });\r\n };\r\n showLoginHideModal = () => {\r\n this.setState({ loginShow: !this.state.loginShow });\r\n };\r\n handleMenuClicked = () => {\r\n this.setState({ activeclass: !this.state.activeclass });\r\n };\r\n logout = (e) => {\r\n e.preventDefault();\r\n Auth.logout();\r\n window.location.href = \"/\";\r\n };\r\n loginClicked = () => {\r\n this.setState({ loginShow: true, login: true });\r\n };\r\n registerClicked = () => {\r\n this.setState({ loginShow: true, login: false });\r\n };\r\n setLanguage = (payload) => {\r\n this.setState({ lang: payload });\r\n this.props.setLang(payload);\r\n };\r\n setCurrency = (payload) => {\r\n this.setState({ currency: payload });\r\n this.props.setCurrency(payload);\r\n };\r\n componentDidMount() {\r\n const href = window.location.href;\r\n if (href.includes(\"categories\")) {\r\n this.setState({ activeLink: \"categories\" });\r\n } else {\r\n this.setState({ activeLink: \"home\" });\r\n }\r\n }\r\n render() {\r\n const cart = this.props.cart;\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
  • \r\n \r\n {this.state.lang == \"en\" ? \"Currency\" : \"العملة\"}\r\n\r\n \r\n \r\n
    \r\n
    \r\n
    \r\n
      \r\n
    • \r\n \r\n {this.state.lang === \"en\" ? \"Dinar\" : \"الدينار\"}\r\n \r\n
    • \r\n
    \r\n
    \r\n
    \r\n
    \r\n
  • \r\n
  • \r\n \r\n
  • \r\n this.showHideModal()}\r\n style={{ cursor: \"pointer\" }}\r\n >\r\n {/* this.showHideModal()}\r\n style={{ cursor: \"pointer\" }}\r\n > */}\r\n {/* */}\r\n \r\n {cart.totalQty !== undefined && (\r\n \r\n {cart.totalQty} sd;cmdm l,ald;aw ,;law al;w l;\r\n \r\n )}\r\n {/* */}\r\n \r\n {Auth.getUserDetails() !== undefined &&\r\n Auth.getUserDetails() !== null &&\r\n Auth.getToken() !== undefined && (\r\n jumpTo(\"/orders\")}\r\n style={{ cursor: \"pointer\" }}\r\n >\r\n {this.state.lang == \"en\" ? \"Orders\" : \"طلباتي\"}\r\n \r\n )}\r\n {Auth.getUserDetails() !== undefined &&\r\n Auth.getUserDetails() !== null &&\r\n Auth.getToken() !== undefined && (\r\n \r\n \r\n {this.state.lang == \"en\"\r\n ? `Welcome ${Auth.getUserDetails().name}`\r\n : `مرحباً ${Auth.getUserDetails().name}`}\r\n \r\n \r\n \r\n
    \r\n \r\n \r\n )}\r\n {(Auth.getUserDetails() === undefined ||\r\n Auth.getUserDetails() === null ||\r\n Auth.getToken() === undefined) && (\r\n
  • \r\n this.loginClicked()}\r\n >\r\n {this.state.lang == \"en\" ? \"Login\" : \"تسجيل الدخول\"}\r\n \r\n
  • \r\n )}\r\n \r\n {/*
      */}\r\n this.handleMenuClicked()}\r\n >\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n this.handleMenuClicked()}\r\n />\r\n \r\n {this.state.loginShow ? (\r\n this.registerClicked()}\r\n loginClicked={() => this.loginClicked()}\r\n onHide={() => this.showLoginHideModal()}\r\n />\r\n ) : null}\r\n {this.state.modalShow ? (\r\n this.showHideModal()}\r\n />\r\n ) : null}\r\n \r\n );\r\n }\r\n}\r\n\r\nexport default NavBar;\r\n","import API from \"../../axios/API\";\r\nimport Auth from \"../../modules/Auth\";\r\n\r\nexport const setLang = (lang) => (dispatch) => {\r\n dispatch({\r\n type: SET_LANG,\r\n payload: lang,\r\n });\r\n localStorage.setItem(\"lang\", lang);\r\n};\r\nexport const getLang = () => (dispatch) => {\r\n dispatch({\r\n type: GET_LANG,\r\n });\r\n return localStorage.getItem(\"lang\");\r\n};\r\nexport const SET_LANG = \"SET_LANG\";\r\nexport const GET_LANG = \"GET_LANG\";\r\n","export const setCurrency = (currency) => (dispatch) => {\r\n dispatch({\r\n type: SET_Currency,\r\n payload: currency,\r\n });\r\n localStorage.setItem(\"currency\", currency);\r\n};\r\nexport const getCurrency = () => (dispatch) => {\r\n dispatch({\r\n type: GET_Currency,\r\n });\r\n return localStorage.getItem(\"currency\");\r\n};\r\nexport const SET_Currency = \"SET_Currency\";\r\nexport const GET_Currency = \"GET_Currency\";\r\n","import { connect } from \"react-redux\";\r\nimport NavBar from \"./NavBar\";\r\n// import { getDepartments } from \"../../redux/actions/DepartmentAction\";\r\nimport // getCartByUserId\r\n\"../../redux/actions/cartAction\";\r\nimport { getLang, setLang } from \"../../redux/actions/langAction\";\r\nimport { setCurrency, getCurrency } from \"../../redux/actions/CurrencyAction\";\r\nconst mapStoreToProps = (state) => ({\r\n // departments: state.department.departments,\r\n cart: state.cart,\r\n lang: state.lang,\r\n currency: state.currency,\r\n});\r\n\r\nconst mapDispatchToProps = (dispatch) => ({\r\n // getDepartments: dispatch(getDepartments()),\r\n // getCartByUserId: () => dispatch(getCartByUserId()),\r\n setLang: (lang) => dispatch(setLang(lang)),\r\n getLang: dispatch(getLang),\r\n setCurrency: (curr) => dispatch(setCurrency(curr)),\r\n getCurrency: dispatch(getCurrency),\r\n});\r\n\r\nexport default connect(mapStoreToProps, mapDispatchToProps)(NavBar);\r\n","import React from \"react\";\r\n\r\nfunction Footer(props) {\r\n return (\r\n \r\n );\r\n}\r\n\r\nexport default Footer;\r\n","\r\n\r\nimport React, { Component } from \"react\";\r\nimport NavBarContainer from \"../components/NavBar/NavBarContainer\";\r\nimport Footer from \"../components/Footer\";\r\n\r\nclass BaseLayout extends Component {\r\n constructor(props) {\r\n super(props);\r\n this.state = {\r\n topHaderClass: \"show\",\r\n };\r\n this.handleScroll = this.handleScroll.bind(this);\r\n }\r\n componentDidMount() {\r\n window.scrollTo(0, 0);\r\n window.addEventListener(\"scroll\", this.handleScroll);\r\n }\r\n\r\n componentWillMount() {\r\n window.scrollTo(0, 0);\r\n }\r\n\r\n componentWillUnmount() {\r\n window.removeEventListener(\"scroll\", this.handleScroll);\r\n }\r\n\r\n handleScroll = (event) => {\r\n if (window.scrollY >= 50) {\r\n this.setState({ topHaderClass: \"hide\" });\r\n } else {\r\n this.setState({ topHaderClass: \"show\" });\r\n }\r\n };\r\n render() {\r\n return (\r\n
      \r\n
      \r\n
      \r\n \r\n
      \r\n
      {this.props.children}
      \r\n
      \r\n
      \r\n
      \r\n );\r\n }\r\n}\r\n\r\nexport default BaseLayout;\r\n","import api from \"./API\";\r\n\r\nexport default class ProductService {\r\n static async GetNewArriveProducts() {\r\n return api\r\n .get(\"/newarrive\")\r\n .then((resp) => {\r\n if (resp.data.success) return resp.data.data;\r\n })\r\n .catch((error) => {\r\n console.log(\"Api Error:\", error);\r\n throw error;\r\n });\r\n }\r\n static async GetProduct(id) {\r\n return api\r\n .get(\"/products/\" + id)\r\n .then((resp) => {\r\n if (resp.data.success) return resp.data.data;\r\n })\r\n .catch((error) => {\r\n console.log(\"Api Error:\", error);\r\n throw error;\r\n });\r\n }\r\n static async addToFavorite(id) {\r\n return api\r\n .post(\"/favorite/\" + id)\r\n .then((resp) => {\r\n if (resp.data.success) return resp.data.data;\r\n })\r\n .catch((error) => {\r\n console.log(\"Api Error:\", error);\r\n throw error;\r\n });\r\n }\r\n static async GetAllProducts(filter) {\r\n console.log(filter);\r\n return api\r\n .get(\"/products\", { params: filter })\r\n .then((resp) => {\r\n if (resp) return resp;\r\n })\r\n .catch((error) => {\r\n console.log(\"Api Error:\", error);\r\n throw error;\r\n });\r\n }\r\n}\r\n","import API from \"../../axios/API\";\r\nimport ProductService from \"../../axios/ProductService\";\r\n\r\nexport const getAllProducts = (filter) => (dispatch) => {\r\n dispatch({\r\n type: GET_ALL_PRODUCTS_BEGIN,\r\n });\r\n return ProductService.GetAllProducts(filter)\r\n .then((result) => {\r\n dispatch({\r\n type: GET_ALL_PRODUCTS_SUCCESS,\r\n payload: {\r\n data: result,\r\n search: filter.search || undefined,\r\n active: filter.category_id || undefined,\r\n },\r\n });\r\n return result;\r\n })\r\n .catch((error) => {\r\n dispatch({\r\n type: GET_ALL_PRODUCTS_FAIL,\r\n payload: {\r\n error,\r\n },\r\n });\r\n return error;\r\n });\r\n};\r\nexport const getNewArrivalProducts = () => (dispatch) => {\r\n dispatch({\r\n type: GET_NEW_ARRIVAL_PRODUCT_BEGIN,\r\n });\r\n return ProductService.GetNewArriveProducts()\r\n .then((result) => {\r\n dispatch({\r\n type: GET_NEW_ARRIVAL_PRODUCT_SUCCESS,\r\n payload: result,\r\n });\r\n return result;\r\n })\r\n .catch((error) => {\r\n dispatch({\r\n type: GET_NEW_ARRIVAL_PRODUCT_FAIL,\r\n payload: {\r\n error,\r\n },\r\n });\r\n return error;\r\n });\r\n};\r\n\r\nexport const getProduct = (id) => (dispatch) => {\r\n dispatch({\r\n type: GET_PRODUCT_BEGIN,\r\n });\r\n return ProductService.GetProduct(id)\r\n .then((res) => {\r\n dispatch({\r\n type: GET_PRODUCT_SUCCESS,\r\n payload: res,\r\n });\r\n console.log(res);\r\n return res;\r\n })\r\n .catch((error) => {\r\n dispatch({\r\n type: GET_PRODUCT_FAIL,\r\n payload: {\r\n error,\r\n },\r\n });\r\n return error;\r\n });\r\n};\r\n\r\nexport const getProductsByCategory = (c) => (dispatch) => {\r\n dispatch({\r\n type: GET_PRODUCTS_BY_CATEGORY_BEGIN,\r\n });\r\n return API({\r\n method: \"GET\",\r\n url: `/products?category=${c}`,\r\n })\r\n .then((res) => {\r\n dispatch({\r\n type: GET_PRODUCTS_BY_CATEGORY_SUCCESS,\r\n payload: res,\r\n });\r\n return res;\r\n })\r\n .catch((error) => {\r\n dispatch({\r\n type: GET_PRODUCTS_BY_CATEGORY_FAIL,\r\n payload: {\r\n error,\r\n },\r\n });\r\n return error;\r\n });\r\n};\r\n\r\nexport const search = (text) => (dispatch) => {\r\n dispatch({\r\n type: SEARCH_BEGIN,\r\n });\r\n return API({\r\n method: \"GET\",\r\n url: `/search?query=${text}`,\r\n })\r\n .then((res) => {\r\n dispatch({\r\n type: SEARCH_SUCCESS,\r\n payload: res,\r\n });\r\n return res;\r\n })\r\n .catch((error) => {\r\n dispatch({\r\n type: SEARCH_FAIL,\r\n payload: {\r\n error,\r\n },\r\n });\r\n return error;\r\n });\r\n};\r\n\r\nexport const applyFilters = (filter_string) => (dispatch) => {\r\n dispatch({\r\n type: APPLY_FILTERS_BEGIN,\r\n });\r\n return API({\r\n method: \"GET\",\r\n url: `/products?${filter_string}`,\r\n })\r\n .then((res) => {\r\n dispatch({\r\n type: APPLY_FILTERS_SUCCESS,\r\n payload: res,\r\n });\r\n return res;\r\n })\r\n .catch((error) => {\r\n dispatch({\r\n type: APPLY_FILTERS_FAIL,\r\n payload: {\r\n error,\r\n },\r\n });\r\n return error;\r\n });\r\n};\r\n\r\nexport const APPLY_FILTERS_BEGIN = \"APPLY_FILTERS_BEGIN\";\r\nexport const APPLY_FILTERS_SUCCESS = \"APPLY_FILTERS_SUCCESS\";\r\nexport const APPLY_FILTERS_FAIL = \"APPLY_FILTERS_FAIL\";\r\n\r\nexport const SEARCH_BEGIN = \"SEARCH_BEGIN\";\r\nexport const SEARCH_SUCCESS = \"SEARCH_SUCCESS\";\r\nexport const SEARCH_FAIL = \"SEARCH_FAIL\";\r\n\r\nexport const GET_ALL_PRODUCTS_BEGIN = \"GET_ALL_PRODUCTS_BEGIN\";\r\nexport const GET_ALL_PRODUCTS_SUCCESS = \"GET_ALL_PRODUCTS_SUCCESS\";\r\nexport const GET_ALL_PRODUCTS_FAIL = \"GET_ALL_PRODUCTS_FAIL\";\r\n\r\nexport const GET_PRODUCT_BEGIN = \"GET_PRODUCT_BEGIN\";\r\nexport const GET_PRODUCT_SUCCESS = \"GET_PRODUCT_SUCCESS\";\r\nexport const GET_PRODUCT_FAIL = \"GET_PRODUCT_FAIL\";\r\n\r\nexport const GET_PRODUCTS_BY_CATEGORY_BEGIN = \"GET_PRODUCTS_BY_CATEGORY_BEGIN\";\r\nexport const GET_PRODUCTS_BY_CATEGORY_SUCCESS =\r\n \"GET_PRODUCTS_BY_CATEGORY_SUCCESS\";\r\nexport const GET_PRODUCTS_BY_CATEGORY_FAIL = \"GET_PRODUCTS_BY_CATEGORY_FAIL\";\r\n\r\nexport const GET_NEW_ARRIVAL_PRODUCT_BEGIN = \"GET_NEW_ARRIVAL_PRODUCT_BEGIN\";\r\nexport const GET_NEW_ARRIVAL_PRODUCT_SUCCESS =\r\n \"GET_NEW_ARRIVAL_PRODUCT_SUCCESS\";\r\nexport const GET_NEW_ARRIVAL_PRODUCT_FAIL = \"GET_NEW_ARRIVAL_PRODUCT_FAIL\";\r\n","import api from \"./API\";\r\n\r\nexport default class SliderService {\r\n static async GetSlider() {\r\n return api\r\n .get(\"/slider\")\r\n .then((resp) => {\r\n if (resp.data.success) return resp.data.data;\r\n })\r\n .catch((error) => {\r\n console.log(\"Api Error:\", error);\r\n throw error;\r\n });\r\n }\r\n}\r\n","import React, { useEffect, useState } from \"react\";\r\nimport { Carousel } from \"react-bootstrap\";\r\nimport SliderService from \"../../axios/SliderService\";\r\nimport { BASE_URL, BASE_URL_SHORT } from \"../../base\";\r\n\r\nfunction HomeBanner(props) {\r\n const [sliders, setSliders] = useState([]);\r\n useEffect(() => {\r\n SliderService.GetSlider().then((result) => {\r\n setSliders(result);\r\n });\r\n }, []);\r\n return (\r\n \r\n {sliders.map((slide, index) => {\r\n return (\r\n \r\n \r\n
      \r\n
      \r\n
      \r\n
      \r\n
      {slide.en_title}
      \r\n

      {slide.en_title1}

      \r\n
      \r\n shop now\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 HomeBanner;\r\n","import api from './API';\r\n\r\nexport default class CategoryService {\r\n static async GetCategories() {\r\n return api.get('/category').then(resp => {\r\n if (resp.data.success)\r\n return resp.data.data\r\n }).catch((error) => {\r\n console.log(\"Api Error:\", error);\r\n throw error;\r\n });\r\n }\r\n}","\r\n\r\nimport React from \"react\";\r\n\r\nfunction Heading(props) {\r\n return (\r\n
      \r\n
      \r\n

      {props.title}

      \r\n
      \r\n
      \r\n );\r\n}\r\n\r\nexport default Heading;\r\n","import React, { useEffect, useState } from \"react\";\r\nimport CategoryService from \"../../axios/CategoryService\";\r\nimport { BASE_URL, BASE_URL_SHORT } from \"../../base\";\r\nimport Heading from \"../Heading\";\r\nimport { Link } from \"react-router-dom/cjs/react-router-dom\";\r\n\r\nfunction CategoryBanner(props) {\r\n const [categories, setCategories] = useState([]);\r\n const [searchedCats, setSearchedCats] = useState([]);\r\n useEffect(() => {\r\n CategoryService.GetCategories().then((result) => {\r\n setCategories(result);\r\n setSearchedCats(result);\r\n });\r\n }, []);\r\n const searchCats = (event) => {\r\n let _val = event.target.value;\r\n let _cats = [];\r\n if (!!_val) {\r\n if (props.lang == \"en\") {\r\n _cats = categories?.filter((e) =>\r\n e.name.toLowerCase().includes(_val.toLowerCase())\r\n );\r\n setSearchedCats(_cats);\r\n } else {\r\n _cats = categories?.filter((e) =>\r\n e.name_a.toLowerCase().includes(_val.toLowerCase())\r\n );\r\n setSearchedCats(_cats);\r\n }\r\n } else setSearchedCats(categories);\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 {searchedCats.map((cat, index) => {\r\n return (\r\n
      \r\n \r\n
      \r\n \r\n \r\n {props.lang == \"en\" ? `${cat.name}` : `${cat.name_a}`}\r\n \r\n \r\n {props.lang == \"en\"\r\n ? `${cat.product_count} items`\r\n : `${cat.product_count} منتج`}\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 CategoryBanner;\r\n","import React from \"react\";\r\nimport { useKeenSlider } from \"keen-slider/react\";\r\nimport \"keen-slider/keen-slider.min.css\";\r\nimport \"./custom-styles.css\";\r\nconst ColorSlider = ({ colors, selectedColor, onColorClick, lang }) => {\r\n const [sliderRef] = useKeenSlider({\r\n mode: \"snap\",\r\n slides: {\r\n perView: \"auto\", // Adjust as needed\r\n spacing: 4,\r\n },\r\n rtl: lang !== \"en\",\r\n });\r\n\r\n return (\r\n
      \r\n {JSON.parse(colors).map((color) => (\r\n \r\n onColorClick(color)}\r\n />\r\n
      \r\n ))}\r\n \r\n );\r\n};\r\n\r\nexport default ColorSlider;\r\n","import React, { useEffect, useState } from \"react\";\r\nimport jumpTo from \"../../modules/Navigation\";\r\nimport { BASE_URL_SHORT } from \"../../base\";\r\nimport ColorSlider from \"./color-slider\";\r\n\r\nfunction SingleProduct(props) {\r\n const { productItem } = props;\r\n const [color, setColor] = useState(props.initialColorFromCart);\r\n const [qty, setQty] = useState(0);\r\n\r\n const [isProductAdded, setIsproductAdded] = useState(\r\n props.isProductAddedToCart\r\n );\r\n useEffect(() => {\r\n const items = props.cart;\r\n if (items && items.products) {\r\n const curProd = items.products.filter(\r\n (el) => el.id === productItem.id.toString() && el.color === color\r\n )[0];\r\n if (curProd) {\r\n setQty(curProd.count);\r\n setIsproductAdded(true);\r\n } else {\r\n setQty(0);\r\n setIsproductAdded(false);\r\n }\r\n } else {\r\n setQty(0);\r\n setIsproductAdded(false);\r\n }\r\n }, [color, props.cart]);\r\n const addToCart = (id, price, image, name) => {\r\n props.addToBag(id, qty, color, price, image, name);\r\n };\r\n\r\n const onAddClicked = () => {\r\n let curColor = color;\r\n if (curColor === \"\") {\r\n curColor = JSON.parse(productItem.color)[0];\r\n setColor(curColor);\r\n }\r\n setQty(qty + 1);\r\n props.postCart(\r\n productItem.id.toString(),\r\n qty + 1,\r\n curColor,\r\n productItem.selling_price,\r\n productItem.images[0].path,\r\n productItem.en_name,\r\n productItem.ar_name\r\n );\r\n setIsproductAdded(true);\r\n };\r\n\r\n const onRemoveClicked = () => {\r\n if (qty > 0) {\r\n setQty(qty - 1);\r\n if (qty === 1) {\r\n props.removeProductFromCart(productItem.id.toString(), color);\r\n setIsproductAdded(false);\r\n } else {\r\n props.postCart(\r\n productItem.id.toString(),\r\n qty - 1,\r\n color,\r\n productItem.selling_price,\r\n productItem.images[0].path,\r\n productItem.en_name,\r\n productItem.ar_name\r\n );\r\n }\r\n }\r\n };\r\n\r\n let source = \"\";\r\n if (\r\n productItem.images &&\r\n productItem.images[0] &&\r\n productItem.images[0].path\r\n ) {\r\n source = productItem.images[0].path;\r\n } else {\r\n source = productItem.image;\r\n }\r\n\r\n return (\r\n \r\n
      \r\n jumpTo(`/single-product/${productItem.id}`)}\r\n >\r\n \r\n
      \r\n
      \r\n \r\n
      \r\n\r\n
      \r\n

      \r\n

      \r\n {props.lang == \"en\" ? productItem.en_name : productItem.ar_name}\r\n
      \r\n

      \r\n
      \r\n setColor(color)}\r\n selectedColor={color}\r\n lang={props.lang}\r\n />\r\n
      \r\n \r\n

      \r\n {`${productItem.selling_price} ${\r\n props.lang === \"en\" ? \"Dinar\" : \"دينار\"\r\n }`}\r\n

      \r\n {!isProductAdded && (\r\n onAddClicked()}\r\n />\r\n )}\r\n {isProductAdded && (\r\n \r\n onRemoveClicked()}\r\n />\r\n \r\n {qty.toString().padStart(2, \"0\")}\r\n \r\n onAddClicked()}\r\n />\r\n
      \r\n )}\r\n \r\n {/* \r\n \r\n 0 ? \"minus\" : \"minus disabled\"}\r\n onClick={() => onRemoveClicked()}\r\n >\r\n \r\n \r\n {qty}\r\n onAddClicked()}>\r\n \r\n \r\n \r\n \r\n onAddClicked()}\r\n style={{\r\n visibility: isProductAdded ? \"hidden\" : \"visible\",\r\n marginTop: \"-40px\",\r\n cursor: \"pointer\",\r\n borderRadius: \"4px\",\r\n }}\r\n >\r\n
      \r\n {props.lang == \"en\" ? `add to cart` : `إضافة إلى السلة`}\r\n
      \r\n */}\r\n \r\n \r\n \r\n );\r\n}\r\n\r\nexport default SingleProduct;\r\n","import React, { Component } from \"react\";\r\nimport SingleProduct from \"./SingleProduct\";\r\nimport Heading from \"../Heading\";\r\nimport PropTypes from \"prop-types\";\r\nimport CategoryService from \"../../axios/CategoryService\";\r\nclass NewArrivals extends Component {\r\n constructor(props) {\r\n super(props);\r\n this.state = {\r\n products: this.props.products,\r\n filteredProducts: this.props.products,\r\n searchedProducts: this.props.products,\r\n categories: null,\r\n selectedOption: 0,\r\n search: \"\",\r\n };\r\n }\r\n componentDidMount() {\r\n CategoryService.GetCategories()\r\n .then((res) => {\r\n this.setState({\r\n categories: res,\r\n });\r\n })\r\n .catch((err) => {});\r\n }\r\n optionClicked(id) {\r\n if (id === 0)\r\n this.setState({\r\n filteredProducts: this.state.products,\r\n searchedProducts: this.state.products,\r\n selectedOption: id,\r\n });\r\n else\r\n this.setState({\r\n filteredProducts: this.state.products.filter(\r\n (e) => e.category_id == id\r\n ),\r\n searchedProducts: this.state.products.filter(\r\n (e) => e.category_id == id\r\n ),\r\n selectedOption: id,\r\n });\r\n }\r\n searchProds = (_val) => {\r\n let _prods = [];\r\n if (_val) {\r\n if (this.props.lang == \"en\") {\r\n _prods = this.state.filteredProducts\r\n ?.slice()\r\n ?.filter((e) => e.en_name.toLowerCase().includes(_val.toLowerCase()));\r\n this.setState({ searchedProducts: _prods });\r\n } else {\r\n _prods = this.state.filteredProducts\r\n ?.slice()\r\n ?.filter((e) => e.ar_name.toLowerCase().includes(_val.toLowerCase()));\r\n this.setState({ searchedProducts: _prods });\r\n }\r\n } else {\r\n let _prods = this.state.filteredProducts;\r\n this.setState({ searchedProducts: _prods });\r\n }\r\n };\r\n render() {\r\n const { products } = this.state;\r\n return (\r\n
      \r\n
      \r\n
      \r\n \r\n
      \r\n
      \r\n this.searchProds(event.target.value)}\r\n className=\"form-control\"\r\n placeholder={\r\n this.props.lang == \"en\"\r\n ? \"Search Products....\"\r\n : \"بحث عن منتج...\"\r\n }\r\n style={\r\n this.props.lang == \"en\"\r\n ? { direction: \"ltr\", backgroundColor: \"beige\" }\r\n : { direction: \"rtl\", backgroundColor: \"beige\" }\r\n }\r\n />\r\n
      \r\n
      \r\n
      \r\n
      \r\n
        \r\n {this.props.lang == \"en\" && (\r\n this.optionClicked(0)}\r\n className={`grid_sorting_button button d-flex flex-column justify-content-center align-items-center ${\r\n this.state.selectedOption == 0\r\n ? \"active is-checked\"\r\n : null\r\n }`}\r\n >\r\n {this.props.lang == \"en\" ? `all` : `الكل`}\r\n \r\n )}\r\n {this.state.categories != null &&\r\n this.state.categories.map((cat) => {\r\n return (\r\n this.optionClicked(`${cat.id}`)}\r\n >\r\n {this.props.lang == \"en\"\r\n ? `${cat.name}`\r\n : `${cat.name_a}`}\r\n \r\n );\r\n })}\r\n {this.props.lang == \"ar\" && (\r\n this.optionClicked(0)}\r\n className={`grid_sorting_button button d-flex flex-column justify-content-center align-items-center ${\r\n this.state.selectedOption == 0\r\n ? \"active is-checked\"\r\n : null\r\n }`}\r\n >\r\n {this.props.lang == \"en\" ? `all` : `الكل`}\r\n \r\n )}\r\n
      \r\n
      \r\n
      \r\n
      \r\n
      \r\n {this.state.searchedProducts &&\r\n this.state.searchedProducts.slice(0, 8).map((item, index) => {\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\nNewArrivals.propTypes = {\r\n addToCart: PropTypes.func,\r\n};\r\n\r\nexport default NewArrivals;\r\n","\r\n\r\nimport React, { Component } from \"react\";\r\nimport SingleProduct from \"./SingleProduct\";\r\nimport Heading from \"../Heading\";\r\n\r\nclass BestSeller extends Component {\r\n constructor(props) {\r\n super(props);\r\n this.state = {\r\n products: this.props.products\r\n };\r\n }\r\n \r\n render() {\r\n const { products } = this.state;\r\n\r\n return (\r\n
      \r\n
      \r\n
      \r\n \r\n
      \r\n\r\n
      \r\n {products &&\r\n products.slice(5, 9).map((item, index) => {\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\nexport default BestSeller;\r\n","\r\n\r\nimport React from \"react\";\r\n\r\nfunction Benefit(params) {\r\n return (\r\n
      \r\n
      \r\n
      \r\n
      \r\n
      \r\n
      \r\n \r\n
      \r\n
      \r\n
      free shipping
      \r\n

      Suffered Alteration in Some Form

      \r\n
      \r\n
      \r\n
      \r\n
      \r\n
      \r\n
      \r\n \r\n
      \r\n
      \r\n
      cach on delivery
      \r\n

      The Internet Tend To Repeat

      \r\n
      \r\n
      \r\n
      \r\n
      \r\n
      \r\n
      \r\n \r\n
      \r\n
      \r\n
      45 days return
      \r\n

      Making it Look Like Readable

      \r\n
      \r\n
      \r\n
      \r\n
      \r\n
      \r\n
      \r\n \r\n
      \r\n
      \r\n
      opening all week
      \r\n

      8AM - 09PM

      \r\n
      \r\n
      \r\n
      \r\n
      \r\n
      \r\n
      \r\n );\r\n}\r\n\r\nexport default Benefit;\r\n","\r\n\r\nimport React, { Component } from \"react\";\r\nimport PropTypes from \"prop-types\";\r\n\r\nimport DEALOFWEEK from \"../../assets/images/deal_ofthe_week.png\";\r\nclass Advertisement extends Component {\r\n constructor(props) {\r\n super(props);\r\n this.state = {\r\n days: 0,\r\n hours: 0,\r\n min: 0,\r\n sec: 0\r\n };\r\n }\r\n\r\n componentDidMount() {\r\n // update every second\r\n this.interval = setInterval(() => {\r\n const date = this.calculateCountdown(this.props.date);\r\n date ? this.setState(date) : this.stop();\r\n }, 1000);\r\n }\r\n\r\n componentWillUnmount() {\r\n this.stop();\r\n }\r\n\r\n calculateCountdown(endDate) {\r\n let diff = (Date.parse(new Date(endDate)) - Date.parse(new Date())) / 1000;\r\n\r\n // clear countdown when date is reached\r\n if (diff <= 0) return false;\r\n\r\n const timeLeft = {\r\n years: 0,\r\n days: 0,\r\n hours: 0,\r\n min: 0,\r\n sec: 0,\r\n millisec: 0\r\n };\r\n\r\n // calculate time difference between now and expected date\r\n if (diff >= 365.25 * 86400) {\r\n // 365.25 * 24 * 60 * 60\r\n timeLeft.years = Math.floor(diff / (365.25 * 86400));\r\n diff -= timeLeft.years * 365.25 * 86400;\r\n }\r\n if (diff >= 86400) {\r\n // 24 * 60 * 60\r\n timeLeft.days = Math.floor(diff / 86400);\r\n diff -= timeLeft.days * 86400;\r\n }\r\n if (diff >= 3600) {\r\n // 60 * 60\r\n timeLeft.hours = Math.floor(diff / 3600);\r\n diff -= timeLeft.hours * 3600;\r\n }\r\n if (diff >= 60) {\r\n timeLeft.min = Math.floor(diff / 60);\r\n diff -= timeLeft.min * 60;\r\n }\r\n timeLeft.sec = diff;\r\n\r\n return timeLeft;\r\n }\r\n\r\n stop() {\r\n clearInterval(this.interval);\r\n }\r\n\r\n addLeadingZeros(value) {\r\n value = String(value);\r\n while (value.length < 2) {\r\n value = \"0\" + value;\r\n }\r\n return value;\r\n }\r\n\r\n render() {\r\n const countDown = this.state;\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

      Deal Of The Week

      \r\n
      \r\n
        \r\n
      • \r\n
        \r\n {this.addLeadingZeros(countDown.days)}{\" \"}\r\n
        \r\n
        \r\n {countDown.days === 1 ? \"Day\" : \"Days\"}\r\n
        \r\n
      • \r\n
      • \r\n
        \r\n {this.addLeadingZeros(countDown.hours)}\r\n
        \r\n
        Hours
        \r\n
      • \r\n
      • \r\n
        \r\n {this.addLeadingZeros(countDown.min)}\r\n
        \r\n
        Mins
        \r\n
      • \r\n
      • \r\n
        \r\n {this.addLeadingZeros(countDown.sec)}\r\n
        \r\n
        Sec
        \r\n
      • \r\n
      \r\n
      \r\n shop now\r\n
      \r\n
      \r\n
      \r\n
      \r\n
      \r\n
      \r\n );\r\n }\r\n}\r\n\r\nAdvertisement.propTypes = {\r\n date: PropTypes.string.isRequired\r\n};\r\n\r\nAdvertisement.defaultProps = {\r\n date: new Date(new Date().getTime() + 5 * 24 * 60 * 60 * 1000).toString()\r\n};\r\n\r\nexport default Advertisement;\r\n","import React, { Component } from \"react\";\r\nimport { login } from \"../../ServerRequest\";\r\nimport API from \"../../axios/API\";\r\nimport Auth from \"../../modules/Auth\";\r\nimport HomeBanner from \"../../components/HomeBanner\";\r\nimport CategoryBanner from \"../../components/CategoryBanner/CategoryBanner\";\r\nimport NewArrivals from \"../../components/Products/NewArrivals\";\r\nimport BestSeller from \"../../components/Products/BestSeller\";\r\nimport Benefit from \"../../components/Benefit\";\r\nimport Advertisement from \"../../components/Advertisement\";\r\nimport PropTypes from \"prop-types\";\r\nimport jumpTo from \"../../modules/Navigation\";\r\nimport LoginRegister from \"../../components/LoginRegisterModal\";\r\nimport { toast } from \"react-toastify\";\r\n\r\nclass Home extends Component {\r\n constructor(props) {\r\n super(props);\r\n this.state = {\r\n data: null,\r\n modalShow: false,\r\n login: true,\r\n lang: props.lang.lang,\r\n currency: props.currency.currency,\r\n };\r\n this.addToBag = this.addToBag.bind(this);\r\n }\r\n\r\n // componentDidMount() {\r\n // if (!this.props.newArrivalProducts) {\r\n // this.props.getNewArrivalProducts();\r\n // }\r\n // }\r\n // componentDidUpdate(prevProps) {\r\n // console.log(prevProps.products);\r\n // console.log(this.props.products);\r\n // }\r\n\r\n showHideModal = () => {\r\n this.setState({ modalShow: false });\r\n };\r\n\r\n loginClicked = () => {\r\n this.setState({ modalShow: true, login: true });\r\n };\r\n registerClicked = () => {\r\n this.setState({ modalShow: true, login: false });\r\n };\r\n\r\n addToBag = (id, count, color, price, image, name) => {\r\n if (\r\n Auth.getUserDetails() !== undefined &&\r\n Auth.getUserDetails() !== null &&\r\n Auth.getToken() !== undefined\r\n ) {\r\n if (color == \"\")\r\n this.props.lang.lang == \"en\"\r\n ? toast.error(\"you must select color\")\r\n : toast.error(\"يجب تحديد لون المنتج الذي تريده\");\r\n else {\r\n let cart = this.props.postCart(id, count, color, price, image, name);\r\n this.props.lang.lang == \"en\"\r\n ? toast.success(\"Product added to cart successfully\")\r\n : toast.success(\"تم إضافة المنتج بنجاح إلى السلة\");\r\n }\r\n } else {\r\n this.setState({ modalShow: true });\r\n }\r\n };\r\n\r\n render() {\r\n // const { newArrivalProducts } = this.props;\r\n // console.log(this.props.newArrivalProducts);\r\n return (\r\n
      \r\n \r\n \r\n {/* {newArrivalProducts ? (\r\n \r\n ) : null} */}\r\n \r\n {/* {products ? (\r\n \r\n ) : null} */}\r\n this.registerClicked()}\r\n loginClicked={() => this.loginClicked()}\r\n onHide={() => this.showHideModal()}\r\n />\r\n
      \r\n );\r\n }\r\n}\r\n\r\nexport default Home;\r\n","import {\r\n getAllProducts,\r\n applyFilters,\r\n getNewArrivalProducts,\r\n} from \"../../redux/actions/productAction\";\r\nimport { connect } from \"react-redux\";\r\nimport Home from \"./Home\";\r\nimport { postCart } from \"../../redux/actions/cartAction\";\r\n\r\nconst mapStoreToProps = (state) => ({\r\n // newArrivalProducts: state.product.newArrivalProducts,\r\n loading: state.product.loading,\r\n lang: state.lang,\r\n currency: state.currency,\r\n});\r\nconst mapDispatchToProps = (dispatch) => ({\r\n // getNewArrivalProducts: () => dispatch(getNewArrivalProducts()),\r\n applyFilters: (filter_string) => dispatch(applyFilters(filter_string)),\r\n postCart: (productId, count, color, price, image, name) =>\r\n dispatch(postCart(productId, count, color, price, image, name)),\r\n});\r\n\r\nexport default connect(mapStoreToProps, mapDispatchToProps)(Home);\r\n","import React, { Component, useState } from \"react\";\r\nimport LoginRegister from \"../../components/LoginRegisterModal\";\r\nimport Auth from \"../../modules/Auth\";\r\nimport { BASE_URL } from \"../../base\";\r\nimport ProductService from \"../../axios/ProductService\";\r\nimport { toast } from \"react-toastify\";\r\nimport jumpTo from \"../../modules/Navigation\";\r\n\r\nclass SingleProduct extends Component {\r\n constructor(props) {\r\n super(props);\r\n this.state = {\r\n color: \"\",\r\n size: \"\",\r\n pic: \"\",\r\n selectedSize: \"\",\r\n id: \"\",\r\n quantity: 0,\r\n modalShow: false,\r\n login: true,\r\n fav: false,\r\n currency: this.props.currency.currency,\r\n product: null,\r\n bigImage:\r\n this.props.product &&\r\n this.props.product.images &&\r\n this.props.product.images.length > 0\r\n ? this.props.product.images[0]\r\n : null,\r\n };\r\n this.addToFav = this.addToFav.bind(this);\r\n this.handleImageClick = this.handleImageClick.bind(this);\r\n }\r\n\r\n componentDidMount() {\r\n if (\r\n !this.props.product ||\r\n this.props.location.pathname.split(\"/\").slice(-1)[0] !==\r\n this.props.product.id.toString()\r\n ) {\r\n this.props.getProduct(\r\n this.props.location.pathname.split(\"/\").slice(-1)[0]\r\n );\r\n this.props.getVariantsByProductId(\r\n this.props.location.pathname.split(\"/\").slice(-1)[0]\r\n );\r\n } else {\r\n this.setState({\r\n bigImage: this.props.product.images[0],\r\n color: JSON.parse(this.props.product.color)[0],\r\n quantity: this.getQuantity(),\r\n });\r\n }\r\n }\r\n componentDidUpdate(prevProps, prevState) {\r\n if (prevProps.product !== this.props.product) {\r\n this.setState({\r\n bigImage:\r\n this.props.product.images.length > 0\r\n ? this.props.product.images[0]\r\n : null,\r\n color: JSON.parse(this.props.product.color)[0],\r\n // quantity: this.getQuantity(),\r\n });\r\n }\r\n if (prevState.color !== this.state.color) {\r\n this.getQuantity();\r\n }\r\n }\r\n getQuantity = () => {\r\n const cartItems = JSON.parse(window.localStorage.getItem(\"cart\"));\r\n if (cartItems && cartItems.products) {\r\n const curProd = cartItems.products.filter(\r\n (el) =>\r\n el.id === this.props.product.id.toString() &&\r\n el.color === this.state.color\r\n )[0];\r\n if (curProd) {\r\n this.setState({ quantity: curProd.count });\r\n } else {\r\n this.setState({ quantity: 0 });\r\n }\r\n } else {\r\n this.setState({ quantity: 0 });\r\n }\r\n };\r\n showHideModal = () => {\r\n this.setState({ modalShow: false });\r\n };\r\n\r\n loginClicked = () => {\r\n this.setState({ modalShow: true, login: true });\r\n };\r\n registerClicked = () => {\r\n this.setState({ modalShow: true, login: false });\r\n };\r\n addToFav = (id) => {\r\n ProductService.addToFavorite(id)\r\n .then((resp) => {\r\n this.setState({ fav: true });\r\n toast.success(resp);\r\n })\r\n .catch((er) => console.error(er));\r\n };\r\n handleImageClick(image) {\r\n this.setState({ bigImage: image });\r\n }\r\n handleThumbnailClick = (item) => {\r\n this.setState({\r\n color: item.color,\r\n size: item.size,\r\n pic: item.imagePath,\r\n selectedSize: \"\",\r\n id: item._id,\r\n cartItem: null,\r\n });\r\n };\r\n\r\n onAddClicked = () => {\r\n if (\r\n Auth.getUserDetails() !== undefined &&\r\n Auth.getUserDetails() !== null &&\r\n Auth.getToken() !== undefined\r\n ) {\r\n this.setState({ quantity: this.state.quantity + 1 });\r\n this.props.postCart(\r\n this.state.id || this.props.location.pathname.split(\"/\").slice(-1)[0],\r\n this.state.quantity + 1,\r\n this.state.color,\r\n this.props.product.selling_price,\r\n this.props.product.images[0].path,\r\n this.props.product.en_name,\r\n this.props.product.ar_name\r\n );\r\n } else {\r\n this.setState({ modalShow: true });\r\n }\r\n };\r\n onRemoveClicked = () => {\r\n if (\r\n Auth.getUserDetails() !== undefined &&\r\n Auth.getUserDetails() !== null &&\r\n Auth.getToken() !== undefined\r\n ) {\r\n if (this.state.quantity > 0) {\r\n this.setState({ quantity: this.state.quantity - 1 });\r\n if (this.state.quantity === 1) {\r\n this.props.removeProductFromCart(\r\n this.state.id ||\r\n this.props.location.pathname.split(\"/\").slice(-1)[0],\r\n this.state.color\r\n );\r\n } else {\r\n this.props.postCart(\r\n this.state.id ||\r\n this.props.location.pathname.split(\"/\").slice(-1)[0],\r\n this.state.quantity - 1,\r\n this.state.color,\r\n this.props.product.selling_price,\r\n this.props.product.images[0].path,\r\n this.props.product.en_name,\r\n this.props.product.ar_name\r\n );\r\n }\r\n }\r\n } else {\r\n this.setState({ modalShow: true });\r\n }\r\n };\r\n\r\n addToBag = () => {\r\n if (\r\n Auth.getUserDetails() !== undefined &&\r\n Auth.getUserDetails() !== null &&\r\n Auth.getToken() !== undefined\r\n ) {\r\n this.props.postCart(\r\n this.state.id || this.props.location.pathname.split(\"/\").slice(-1)[0],\r\n this.state.quantity,\r\n this.state.color,\r\n this.props.product.selling_price,\r\n this.props.product.images[0].path,\r\n this.props.product.en_name\r\n );\r\n } else {\r\n this.setState({ modalShow: true });\r\n }\r\n };\r\n\r\n productInCart = () => {\r\n let available = false;\r\n return available;\r\n };\r\n\r\n render() {\r\n return (\r\n
      \r\n {this.props.product &&\r\n this.props.product.id.toString() ===\r\n this.props.location.pathname.split(\"/\").slice(-1)[0] && (\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 {this.props.product.images.map((image, index) => (\r\n
      \r\n this.handleImageClick(image)}\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 {this.props.lang.lang == \"en\"\r\n ? this.props.product.en_name\r\n : this.props.product.ar_name}\r\n

      \r\n

      \r\n /\r\n

      \r\n

      \r\n {this.props.product.brand}\r\n

      \r\n
      \r\n {(this.props.product.en_availability ||\r\n this.props.product.ar_availability) && (\r\n
      \r\n \r\n {`${\r\n this.props.lang.lang === \"en\"\r\n ? this.props.product.en_availability\r\n : this.props.product.ar_availability\r\n }`}\r\n \r\n
      \r\n )}\r\n \r\n \r\n {this.props.lang.lang == \"en\"\r\n ? this.props.product.en_description\r\n : this.props.product.ar_description}\r\n

      \r\n
      \r\n
      \r\n
      \r\n \r\n {/* {this.props.currency.currency == \"dollar\"\r\n ? `${this.props.product.selling_price} $`\r\n : `${this.props.product.selling_price * 250.27} YRI`} */}\r\n {`${this.props.product.selling_price} ${\r\n this.props.lang.lang === \"en\" ? \"Dinar\" : \"دينار\"\r\n }`}\r\n \r\n
      \r\n
      \r\n
      \r\n {this.props.lang.lang == \"en\"\r\n ? `Code: `\r\n : \"رمز المنتج: \"}\r\n
      \r\n\r\n \r\n {this.props.product.code}\r\n \r\n
      \r\n
      \r\n
      \r\n {this.props.lang.lang == \"en\"\r\n ? `Quantity: `\r\n : \"الكمية: \"}\r\n
      \r\n\r\n \r\n {this.props.product.entity}\r\n \r\n
      \r\n
      \r\n
      \r\n {this.props.lang.lang == \"en\" ? `Colors ` : \"الألوان \"}\r\n
      \r\n \r\n {JSON.parse(this.props.product.color).map((e) => (\r\n this.setState({ color: `${e}` })}\r\n >
      \r\n ))}\r\n
      \r\n \r\n {(this.props.product.width ||\r\n this.props.product.height ||\r\n this.props.product.depth) && (\r\n
      \r\n
      \r\n {this.props.lang.lang == \"en\"\r\n ? `Dimensions `\r\n : \"الأبعاد \"}\r\n
      \r\n \r\n \r\n \r\n \r\n {this.props.lang.lang === \"en\"\r\n ? \"Width (cm)\"\r\n : \"عرض (سم)\"}\r\n \r\n \r\n {this.props.lang.lang === \"en\"\r\n ? \"Height (cm)\"\r\n : \"ارتفاع (سم)\"}\r\n \r\n \r\n {this.props.lang.lang === \"en\"\r\n ? \"Depth (cm)\"\r\n : \"عمق (سم)\"}\r\n \r\n \r\n \r\n \r\n \r\n \r\n {this.props.product.width\r\n ? this.props.product.width\r\n : \"\"}\r\n \r\n \r\n {this.props.product.height\r\n ? this.props.product.height\r\n : \"\"}\r\n \r\n \r\n {this.props.product.depth\r\n ? this.props.product.depth\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 {this.props.lang.lang == \"en\"\r\n ? ` Quantity:`\r\n : `الكمية:`}\r\n \r\n \r\n 0 ? \"minus\" : \"minus disabled\"\r\n }\r\n onClick={() => this.onRemoveClicked()}\r\n >\r\n \r\n \r\n {this.state.quantity}\r\n this.onAddClicked()}\r\n >\r\n \r\n \r\n \r\n this.onAddClicked()}\r\n style={{\r\n visibility:\r\n this.state.quantity !== 0 ? \"hidden\" : \"visible\",\r\n minWidth: \"max-content\",\r\n width: \"50%\",\r\n cursor: \"pointer\",\r\n borderRadius: \"16px\",\r\n position: \"absolute\",\r\n left: this.props.lang.lang === \"en\" ? 0 : \"auto\",\r\n right: this.props.lang.lang === \"ar\" ? 0 : \"auto\",\r\n }}\r\n >\r\n
      \r\n {this.props.lang.lang == \"en\"\r\n ? `add to cart`\r\n : `إضافة إلى السلة`}\r\n
      \r\n \r\n\r\n this.addToFav(this.props.product.id)}\r\n className=\"product_favorite d-flex flex-column align-items-center justify-content-center\"\r\n >\r\n
      \r\n \r\n \r\n \r\n \r\n \r\n \r\n )}\r\n this.registerClicked()}\r\n loginClicked={() => this.loginClicked()}\r\n onHide={() => this.showHideModal()}\r\n />\r\n \r\n );\r\n }\r\n}\r\n\r\nexport default SingleProduct;\r\n","\r\n\r\nimport API from \"../../axios/API\";\r\nimport ProductService from \"../../axios/ProductService\";\r\n\r\nexport const getVariantsByProductId = productId => dispatch => {\r\n dispatch({\r\n type: GET_VARIANTS_QUERY_BEGIN\r\n });\r\n return ProductService.GetProduct(productId)\r\n .then(result => {\r\n dispatch({\r\n type: GET_VARIANTS_QUERY_SUCCESS,\r\n payload: result\r\n });\r\n return result;\r\n }).catch(error => {\r\n dispatch({\r\n type: GET_VARIANTS_QUERY_FAIL,\r\n payload: {\r\n error\r\n }\r\n });\r\n return error;\r\n });\r\n};\r\n\r\nexport const GET_VARIANTS_QUERY_BEGIN = \"GET_VARIANTS_QUERY_BEGIN\";\r\nexport const GET_VARIANTS_QUERY_SUCCESS = \"GET_VARIANTS_QUERY_SUCCESS\";\r\nexport const GET_VARIANTS_QUERY_FAIL = \"GET_VARIANTS_QUERY_FAIL\";\r\n","import { connect } from \"react-redux\";\r\nimport SingleProduct from \"./SingleProduct\";\r\nimport { getProduct } from \"../../redux/actions/productAction\";\r\nimport { getVariantsByProductId } from \"../../redux/actions/variantsAction\";\r\nimport {\r\n postCart,\r\n removeProductFromCart,\r\n} from \"../../redux/actions/cartAction\";\r\n\r\nconst mapStoreToProps = (state) => ({\r\n product: state.product.product,\r\n variants: state.variant.variants,\r\n currency: state.currency,\r\n lang: state.lang,\r\n});\r\nconst mapDispatchToProps = {\r\n getProduct,\r\n getVariantsByProductId,\r\n postCart,\r\n removeProductFromCart,\r\n};\r\n\r\nexport default connect(mapStoreToProps, mapDispatchToProps)(SingleProduct);\r\n","import API from \"../../axios/API\";\r\nimport CategoryService from \"../../axios/CategoryService\";\r\n\r\nexport const getAllCategories = () => dispatch => {\r\n dispatch({\r\n type: GET_ALL_CATEGORIES_BEGIN\r\n });\r\n return CategoryService.GetCategories()\r\n .then(result => {\r\n dispatch({\r\n type: GET_ALL_CATEGORIES_SUCCESS,\r\n payload: result\r\n });\r\n return result;\r\n }).catch(error => {\r\n dispatch({\r\n type: GET_ALL_CATEGORIES_FAIL,\r\n payload: {\r\n error\r\n }\r\n });\r\n return error;\r\n })\r\n};\r\n\r\nexport const getCATEGORY = id => dispatch => {\r\n dispatch({\r\n type: GET_CATEGORY_BEGIN\r\n });\r\n return API({\r\n method: \"GET\",\r\n url: `/CATEGORIES/${id}`\r\n })\r\n .then(res => {\r\n dispatch({\r\n type: GET_CATEGORY_SUCCESS,\r\n payload: res\r\n });\r\n return res;\r\n })\r\n .catch(error => {\r\n dispatch({\r\n type: GET_CATEGORY_FAIL,\r\n payload: {\r\n error\r\n }\r\n });\r\n return error;\r\n });\r\n};\r\n\r\nexport const getCATEGORIESByCategory = c => dispatch => {\r\n dispatch({\r\n type: GET_CATEGORIES_BY_CATEGORY_BEGIN\r\n });\r\n return API({\r\n method: \"GET\",\r\n url: `/CATEGORIES?category=${c}`\r\n })\r\n .then(res => {\r\n dispatch({\r\n type: GET_CATEGORIES_BY_CATEGORY_SUCCESS,\r\n payload: res\r\n });\r\n return res;\r\n })\r\n .catch(error => {\r\n dispatch({\r\n type: GET_CATEGORIES_BY_CATEGORY_FAIL,\r\n payload: {\r\n error\r\n }\r\n });\r\n return error;\r\n });\r\n};\r\n\r\nexport const search = text => dispatch => {\r\n dispatch({\r\n type: SEARCH_BEGIN\r\n });\r\n return API({\r\n method: \"GET\",\r\n url: `/search?query=${text}`\r\n })\r\n .then(res => {\r\n dispatch({\r\n type: SEARCH_SUCCESS,\r\n payload: res\r\n });\r\n return res;\r\n })\r\n .catch(error => {\r\n dispatch({\r\n type: SEARCH_FAIL,\r\n payload: {\r\n error\r\n }\r\n });\r\n return error;\r\n });\r\n};\r\n\r\n// export const applyFilters = filter_string => dispatch => {\r\n// dispatch({\r\n// type: APPLY_FILTERS_BEGIN\r\n// });\r\n// return API({\r\n// method: \"GET\",\r\n// url: `/CATEGORIES?${filter_string}`\r\n// })\r\n// .then(res => {\r\n// dispatch({\r\n// type: APPLY_FILTERS_SUCCESS,\r\n// payload: res\r\n// });\r\n// return res;\r\n// })\r\n// .catch(error => {\r\n// dispatch({\r\n// type: APPLY_FILTERS_FAIL,\r\n// payload: {\r\n// error\r\n// }\r\n// });\r\n// return error;\r\n// });\r\n// };\r\n\r\n// export const APPLY_FILTERS_BEGIN = \"APPLY_FILTERS_BEGIN\";\r\n// export const APPLY_FILTERS_SUCCESS = \"APPLY_FILTERS_SUCCESS\";\r\n// export const APPLY_FILTERS_FAIL = \"APPLY_FILTERS_FAIL\";\r\n\r\nexport const SEARCH_BEGIN = \"SEARCH_BEGIN\";\r\nexport const SEARCH_SUCCESS = \"SEARCH_SUCCESS\";\r\nexport const SEARCH_FAIL = \"SEARCH_FAIL\";\r\n\r\nexport const GET_ALL_CATEGORIES_BEGIN = \"GET_ALL_CATEGORIES_BEGIN\";\r\nexport const GET_ALL_CATEGORIES_SUCCESS = \"GET_ALL_CATEGORIES_SUCCESS\";\r\nexport const GET_ALL_CATEGORIES_FAIL = \"GET_ALL_CATEGORIES_FAIL\";\r\n\r\nexport const GET_CATEGORY_BEGIN = \"GET_CATEGORY_BEGIN\";\r\nexport const GET_CATEGORY_SUCCESS = \"GET_CATEGORY_SUCCESS\";\r\nexport const GET_CATEGORY_FAIL = \"GET_CATEGORY_FAIL\";\r\n\r\nexport const GET_CATEGORIES_BY_CATEGORY_BEGIN = \"GET_CATEGORIES_BY_CATEGORY_BEGIN\";\r\nexport const GET_CATEGORIES_BY_CATEGORY_SUCCESS =\r\n \"GET_CATEGORIES_BY_CATEGORY_SUCCESS\";\r\nexport const GET_CATEGORIES_BY_CATEGORY_FAIL = \"GET_CATEGORIES_BY_CATEGORY_FAIL\";","import React from \"react\";\r\n\r\nconst ProductGridSkeleton = () => {\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 \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 ProductGridSkeleton;\r\n","import React, { Component } from \"react\";\r\nimport SingleProduct from \"../../components/Products/SingleProduct\";\r\nimport Auth from \"../../modules/Auth\";\r\nimport LoginRegister from \"../../components/LoginRegisterModal\";\r\nimport { toast } from \"react-toastify\";\r\nimport { withRouter } from \"react-router-dom/cjs/react-router-dom\";\r\nimport jumpTo from \"../../modules/Navigation\";\r\nimport { debounce } from \"lodash\";\r\nimport Select from \"react-dropdown-select\";\r\nimport \"./custom-select-style.css\";\r\nimport ProductGridSkeleton from \"./components/product-grid-skeleton\";\r\n\r\nclass Category extends Component {\r\n constructor(props) {\r\n super(props);\r\n this.state = {\r\n categories: this.props.categories,\r\n products: this.props.products,\r\n filteredProducts: this.props.products,\r\n currency: props.currency.currency,\r\n modalShow: false,\r\n login: true,\r\n active:\r\n parseInt(\r\n new URLSearchParams(this.props.location.search).get(\"category_id\")\r\n ) || this.props.active,\r\n pageIndex: this.props.pageIndex,\r\n pageLength: this.props.pageLength,\r\n search: this.props.search,\r\n lang: this.props.lang.lang,\r\n loading: this.props.productLoading,\r\n cart: this.props.cart,\r\n };\r\n this.addToBag = this.addToBag.bind(this);\r\n }\r\n componentDidMount() {\r\n if (!this.props.categories) {\r\n this.props.getAllCategories();\r\n }\r\n const catIdFromUrl = parseInt(\r\n new URLSearchParams(this.props.location.search).get(\"category_id\")\r\n );\r\n if (!this.props.products || catIdFromUrl) {\r\n this.props.getAllProducts({\r\n pageIndex: this.state.pageIndex,\r\n pageLength: this.state.pageLength,\r\n category_id: catIdFromUrl\r\n ? catIdFromUrl\r\n : this.state.active > 0\r\n ? this.state.active\r\n : undefined,\r\n });\r\n }\r\n }\r\n handleInputChange(event) {\r\n if (event.target != null) {\r\n this.setState({ search: event.target.value });\r\n }\r\n }\r\n\r\n showHideModal = () => {\r\n this.setState({ modalShow: false });\r\n };\r\n\r\n loginClicked = () => {\r\n this.setState({ modalShow: true, login: true });\r\n };\r\n registerClicked = () => {\r\n this.setState({ modalShow: true, login: false });\r\n };\r\n\r\n addToBag = (id, count, color, price, image, name) => {\r\n if (\r\n Auth.getUserDetails() !== undefined &&\r\n Auth.getUserDetails() !== null &&\r\n Auth.getToken() !== undefined\r\n ) {\r\n if (color == \"\")\r\n this.props.lang.lang == \"en\"\r\n ? toast.error(\"you must select color\")\r\n : toast.error(\"يجب تحديد لون المنتج الذي تريده\");\r\n else {\r\n let cart = this.props.postCart(id, count, color, price, image, name);\r\n this.props.lang.lang == \"en\"\r\n ? toast.success(\"Product added to cart successfully\")\r\n : toast.success(\"تم إضافة المنتج بنجاح إلى السلة\");\r\n }\r\n } else {\r\n this.setState({ modalShow: true });\r\n }\r\n };\r\n componentDidUpdate(prevProps, prevState) {\r\n if (prevProps.products != this.props.products)\r\n this.setState({\r\n products: this.props.products,\r\n // filteredProducts: this.props.products,\r\n });\r\n if (prevProps.productLoading != this.props.productLoading)\r\n this.setState({\r\n loading: this.props.productLoading,\r\n // filteredProducts: this.props.products,\r\n });\r\n if (prevProps.cart != this.props.cart)\r\n this.setState({\r\n cart: this.props.cart,\r\n // filteredProducts: this.props.products,\r\n });\r\n if (prevState.pageIndex !== this.state.pageIndex) {\r\n this.props.getAllProducts({\r\n pageIndex: this.state.pageIndex,\r\n pageLength: this.state.pageLength,\r\n category_id: this.state.active > 0 ? this.state.active : undefined,\r\n });\r\n }\r\n if (prevState.active !== this.state.active) {\r\n this.setState({ pageIndex: 1, pageLength: this.state.pageLength });\r\n this.props.getAllProducts({\r\n pageIndex: 1,\r\n pageLength: this.state.pageLength,\r\n category_id: this.state.active > 0 ? this.state.active : undefined,\r\n });\r\n }\r\n if (prevState.search !== this.state.search) {\r\n this.setState({ pageIndex: 1, pageLength: this.state.pageLength });\r\n this.props.getAllProducts({\r\n pageIndex: 1,\r\n pageLength: this.state.pageLength,\r\n category_id: this.state.active > 0 ? this.state.active : undefined,\r\n search: this.state.search,\r\n });\r\n }\r\n if (prevProps.lang.lang !== this.props.lang.lang) {\r\n }\r\n // if (prevState.loading !== this.state.loading) {\r\n // this.setState({ filteredProducts: [] });\r\n // }\r\n }\r\n isProductAddedToCart = (id) => {\r\n if (typeof window !== \"undefined\") {\r\n const items = this.state.cart;\r\n if (items && items.products) {\r\n const curProd = items.products.filter(\r\n (el) => el.id === id.toString()\r\n )[0];\r\n if (curProd) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }\r\n }\r\n };\r\n getProuctInitialColorFromCart = (id) => {\r\n if (this.isProductAddedToCart(id)) {\r\n const items = this.state.cart;\r\n const curProd = items.products.filter((el) => el.id === id.toString())[0];\r\n return curProd.color;\r\n } else {\r\n return \"\";\r\n }\r\n };\r\n getDefaultCategory = (id) => {\r\n const { categories } = this.props;\r\n if (\r\n categories &&\r\n Array.isArray(categories) &&\r\n categories.length > 0 &&\r\n id !== -1\r\n ) {\r\n const selected = categories.filter((el) => el.id === id);\r\n if (selected.length > 0) {\r\n return [selected[0]];\r\n } else {\r\n return [];\r\n }\r\n } else {\r\n return [];\r\n }\r\n };\r\n render() {\r\n const { categories, products, applyFilters } = this.props;\r\n console.log(this.state.cart);\r\n return (\r\n
      \r\n
      \r\n
      \r\n \r\n
        \r\n jumpTo(\"/\")}\r\n style={{ color: \"gray\", cursor: \"pointer\" }}\r\n >\r\n {this.props.lang.lang == \"en\" ? `Home` : `الصفحة الرئيسية`}\r\n \r\n
      • \r\n \r\n {this.props.lang.lang == \"en\" ? `Categories` : `الأصناف`}\r\n
      • \r\n
      \r\n
      \r\n
      \r\n \r\n
      \r\n
      \r\n \r\n \r\n {this.props.lang.lang === \"en\" ? \"Search\" : \"ابحث\"}\r\n \r\n {\r\n event.persist();\r\n debounce(() => this.handleInputChange(event), 1000)();\r\n }}\r\n className=\"form-control-helper\"\r\n placeholder={\r\n this.props.lang.lang == \"en\"\r\n ? \"By name or item code\"\r\n : \"حسب الاسم أو رمز المنتج\"\r\n }\r\n style={{\r\n direction:\r\n this.props.lang.lang === \"en\" ? \"ltr\" : \"rtl\",\r\n marginBottom: \"14px\",\r\n // borderRadius: \"8px\",\r\n width: \"80%\",\r\n // boxShadow: \" 0 0 3px 1px rgba(#ff0000, 0.5)\",\r\n }}\r\n />\r\n
      \r\n
      \r\n
      \r\n \r\n \r\n {this.props.lang.lang === \"en\" ? \"Category\" : \"الصنف\"}\r\n \r\n {\r\n if (value.length > 0) {\r\n this.setState({ active: value[0].id });\r\n } else {\r\n this.setState({ active: -1 });\r\n }\r\n }}\r\n labelField={\r\n this.props.lang.lang === \"en\" ? \"name\" : \"name_a\"\r\n }\r\n valueField=\"id\"\r\n placeholder={\r\n this.props.lang.lang === \"en\" ? \"All\" : \"الكل\"\r\n }\r\n searchable={true}\r\n searchBy={\r\n this.props.lang.lang === \"en\" ? \"name\" : \"name_a\"\r\n }\r\n color=\"#fbba1b\"\r\n direction={\r\n this.props.lang.lang === \"en\" ? \"ltr\" : \"rtl\"\r\n }\r\n style={{\r\n borderRadius: \"8px\",\r\n border: \"none\",\r\n width: \"80%\",\r\n }}\r\n separator\r\n />\r\n
      \r\n
      \r\n
      \r\n \r\n {this.state.loading && }\r\n {!this.state.loading &&\r\n this.state.products &&\r\n this.state.products.data.map((item, index) => {\r\n return (\r\n \r\n this.setState({ modalShow: true })}\r\n postCart={this.props.postCart}\r\n removeProductFromCart={\r\n this.props.removeProductFromCart\r\n }\r\n />\r\n
      \r\n );\r\n })}\r\n \r\n \r\n {this.state.products &&\r\n this.state.products.data.length > 0 &&\r\n this.state.products.last_page !== 1 && (\r\n \r\n {/* Render the productsToDisplay here */}\r\n \r\n this.setState({\r\n pageIndex: this.state.pageIndex - 1,\r\n })\r\n }\r\n style={{\r\n width: \"102px\",\r\n height: \"26px\",\r\n borderRadius: \"8px\",\r\n border: \"none\",\r\n backgroundColor:\r\n this.state.products.current_page === 1\r\n ? \"#12121280\"\r\n : \"#FABA1C\",\r\n // borderRadius: \"4px\",\r\n }}\r\n disabled={this.state.products.current_page === 1}\r\n >\r\n \r\n {this.props.lang.lang == \"en\"\r\n ? \"Previous\"\r\n : \"السابق\"}\r\n

      \r\n \r\n
      \r\n {this.state.products.last_page > 6 ? (\r\n {\r\n // Get the current value and ensure it's a number\r\n let newValue =\r\n parseInt(e.target.value, 10) || \"\"; // Handle empty input as \"\"\r\n\r\n // Validate the entered value against min and max\r\n if (\r\n newValue < 1 ||\r\n newValue > this.state.products.last_page\r\n ) {\r\n // Prevent invalid input from changing state\r\n return; // Exit the function if out of range\r\n }\r\n\r\n // Update state only with valid input\r\n this.setState({ pageIndex: newValue });\r\n }}\r\n min=\"1\"\r\n max={this.state.products.last_page}\r\n className=\"form-control-helper\"\r\n style={{\r\n height: \"30px\",\r\n width: \"60px\",\r\n textAlign: \"center\",\r\n fontSize: \"14px\",\r\n fontWeight: 600,\r\n lineHeight: \"24px\",\r\n // borderRadius: \"8px\",\r\n }}\r\n />\r\n ) : (\r\n \r\n {Array.from(\r\n {\r\n length: this.state.products.last_page,\r\n },\r\n (_, i) => (\r\n \r\n this.setState({ pageIndex: i + 1 })\r\n }\r\n style={{\r\n height: \"30px\",\r\n width: \"30px\",\r\n display: \"flex\",\r\n alignItems: \"center\",\r\n justifyContent: \"center\",\r\n // border: \"1px black solid\",\r\n color:\r\n this.state.products.current_page ===\r\n i + 1\r\n ? \"#FABA1C\"\r\n : \"black\",\r\n cursor: \"pointer\",\r\n fontSize: \"15px\",\r\n fontWeight: 600,\r\n lineHeight: \"24px\",\r\n }}\r\n >\r\n {(i + 1).toString().padStart(2, \"0\")}\r\n
      \r\n )\r\n )}\r\n \r\n )}\r\n \r\n \r\n this.setState({\r\n pageIndex: this.state.pageIndex + 1,\r\n })\r\n }\r\n style={{\r\n width: \"102px\",\r\n height: \"26px\",\r\n borderRadius: \"8px\",\r\n border: \"none\",\r\n backgroundColor:\r\n this.state.products &&\r\n this.state.products.current_page ===\r\n this.state.products.last_page\r\n ? \"#12121280\"\r\n : \"#FABA1C\",\r\n // borderRadius: \"4px\",\r\n }}\r\n disabled={\r\n this.state.products &&\r\n this.state.products.current_page ===\r\n this.state.products.last_page\r\n }\r\n >\r\n \r\n {this.props.lang.lang == \"en\" ? \"Next\" : \"التالي\"}\r\n

      \r\n \r\n \r\n )}\r\n \r\n \r\n \r\n \r\n \r\n this.registerClicked()}\r\n loginClicked={() => this.loginClicked()}\r\n onHide={() => this.showHideModal()}\r\n />\r\n \r\n );\r\n }\r\n}\r\n\r\nexport default withRouter(Category);\r\n","import {\r\n getAllProducts,\r\n applyFilters,\r\n} from \"../../redux/actions/productAction\";\r\nimport { getAllCategories } from \"../../redux/actions/categoryAction\";\r\nimport { connect } from \"react-redux\";\r\nimport Category from \"./Category\";\r\nimport {\r\n postCart,\r\n removeProductFromCart,\r\n} from \"../../redux/actions/cartAction\";\r\n\r\nconst mapStoreToProps = (state) => ({\r\n categories: state.category.categories,\r\n products: state.product.products,\r\n productLoading: state.product.loading,\r\n loading: state.category.loading,\r\n lang: state.lang,\r\n currency: state.currency,\r\n active: state.product.active,\r\n pageIndex: state.product.pageIndex,\r\n pageLength: state.product.pageLength,\r\n search: state.product.search,\r\n cart: state.cart.cart,\r\n});\r\nconst mapDispatchToProps = (dispatch) => ({\r\n getAllCategories: () => dispatch(getAllCategories()),\r\n getAllProducts: (filter) => dispatch(getAllProducts(filter)),\r\n postCart: (productId, count, color, price, image, en_name, ar_name) =>\r\n dispatch(postCart(productId, count, color, price, image, en_name, ar_name)),\r\n removeProductFromCart: (productId, _color) =>\r\n dispatch(removeProductFromCart(productId, _color)),\r\n});\r\n\r\nexport default connect(mapStoreToProps, mapDispatchToProps)(Category);\r\n","import React from \"react\";\r\nimport { BASE_URL_SHORT } from \"../../base\";\r\nimport { Button } from \"react-bootstrap\";\r\n\r\nfunction CartItem({ items, handleClick, lang, currency, removeProduct }) {\r\n console.log(items);\r\n return (\r\n
      \r\n {items !== undefined &&\r\n items !== null &&\r\n Object.keys(items).map((id) => (\r\n \r\n
      \r\n
      \r\n \r\n
      \r\n
      \r\n
      \r\n \r\n \r\n {lang === \"en\" ? items[id].en_name : items[id].ar_name}\r\n \r\n
      \r\n \r\n \r\n {lang == \"en\" ? \" Quantity: \" : \" الكمية: \"}\r\n \r\n \r\n {items[id].count}\r\n \r\n
      \r\n \r\n \r\n {lang == \"en\" ? \" Color: \" : \" اللون: \"}\r\n \r\n \r\n \r\n \r\n \r\n {lang == \"en\" ? \" Price: \" : \" السعر: \"}\r\n \r\n \r\n {/* {currency == \"dollar\"\r\n ? `$${items[id].price}`\r\n : `${(items[id].price * 250.27).toFixed(2)} YRI`} */}\r\n {`${items[id].price} ${lang === \"en\" ? \"Dinar\" : \"دينار\"}`}\r\n \r\n \r\n \r\n
      \r\n \r\n removeProduct(items[id].id, items[id].color)}\r\n color=\"red\"\r\n >\r\n {lang === \"en\" ? \"Remove\" : \"حذف\"}\r\n \r\n
      \r\n \r\n \r\n ))}\r\n \r\n );\r\n}\r\n\r\nexport default CartItem;\r\n","import api from \"./API\";\r\n\r\nexport default class CartService {\r\n static async CheckOut(payload) {\r\n return api\r\n .post(\"/orders/check-out\", payload)\r\n .then((resp) => {\r\n if (resp.data.success) {\r\n localStorage.removeItem(\"cart\");\r\n return resp.data.data;\r\n }\r\n })\r\n .catch((error) => {\r\n console.log(\"Api Error:\", error);\r\n throw error;\r\n });\r\n }\r\n\r\n static async GuestCheckOut(payload) {\r\n return api\r\n .post(\"/orders/guest-check-out\", payload)\r\n .then((resp) => {\r\n if (resp.data.success) {\r\n localStorage.removeItem(\"cart\");\r\n return resp.data.data;\r\n }\r\n })\r\n .catch((error) => {\r\n console.log(error.message);\r\n throw error;\r\n });\r\n }\r\n}\r\n","import React, { Component } from \"react\";\r\nimport Heading from \"../../components/Heading\";\r\nimport CartItem from \"./CartItem\";\r\nimport { Button } from \"react-bootstrap\";\r\nimport EmptyCart from \"../../assets/images/empty_cart.png\";\r\nimport CartService from \"../../axios/cartService\";\r\nimport { toast } from \"react-toastify\";\r\n\r\nclass Cart extends Component {\r\n constructor(props) {\r\n super(props);\r\n this.state = {\r\n address: \"\",\r\n coupon: \"\",\r\n recipient_name: \"\",\r\n recipient_phone: \"\",\r\n recipient_notes: \"\",\r\n };\r\n this.setAddress = this.setAddress.bind(this);\r\n this.setCoupon = this.setCoupon.bind(this);\r\n this.setPhone = this.setPhone.bind(this);\r\n this.setNotes = this.setNotes.bind(this);\r\n this.setName = this.setName.bind(this);\r\n this.checkout = this.checkout.bind(this);\r\n }\r\n setAddress = (val) => {\r\n this.setState({ address: val });\r\n };\r\n setCoupon = (val) => {\r\n this.setState({ coupon: val });\r\n };\r\n setName = (val) => {\r\n this.setState({ recipient_name: val });\r\n };\r\n setPhone = (val) => {\r\n this.setState({ recipient_phone: val });\r\n };\r\n setNotes = (val) => {\r\n this.setState({ recipient_notes: val });\r\n };\r\n checkout = () => {\r\n let _products = this.props.cart.cart.products.map((e) => {\r\n return {\r\n id: e.id,\r\n color: e.color,\r\n count: e.count,\r\n };\r\n });\r\n let payload = {\r\n payment_method: \"cache\",\r\n address: this.state.address,\r\n coupon: this.state.coupon,\r\n recipient_name: this.state.recipient_name,\r\n recipient_phone: this.state.recipient_phone,\r\n recipient_notes: this.state.recipient_notes,\r\n products: _products,\r\n };\r\n // let token = JSON.parse(localStorage.getItem(\"auth\"))?.token;\r\n let authStorage = localStorage.getItem(\"auth\");\r\n let token = null;\r\n if (authStorage) {\r\n token = JSON.parse(authStorage).token;\r\n }\r\n if (token !== null) {\r\n CartService.CheckOut(payload)\r\n .then((resp) => {\r\n this.props.clearCart();\r\n this.props.lang.lang == \"en\"\r\n ? toast.success(\"Order has been submitted successfully\")\r\n : toast.success(\"تم استلام طلبك بنجاح\");\r\n })\r\n .catch((error) =>\r\n this.props.lang.lang == \"en\"\r\n ? toast.error(\"An Error Occurred\")\r\n : toast.error(\"لقد حدث خطأ ما\")\r\n );\r\n } else {\r\n CartService.GuestCheckOut(payload)\r\n .then((resp) => {\r\n this.props.clearCart();\r\n this.props.lang.lang == \"en\"\r\n ? toast.success(\"Order has been submitted successfully\")\r\n : toast.success(\"تم استلام طلبك بنجاح\");\r\n })\r\n .catch((error) =>\r\n // this.props.lang.lang == \"en\"\r\n // ? toast.error(\"An Error Occurred\")\r\n // : toast.error(\"لقد حدث خطأ ما\")\r\n {}\r\n );\r\n }\r\n };\r\n\r\n render() {\r\n const products = this.props.cart.cart?.products;\r\n const total = this.props.cart.cart?.total;\r\n const totalQty = this.props.cart.cart?.totalQty;\r\n const postCart = this.props.postCart;\r\n console.log(products);\r\n return (\r\n
      \r\n
      \r\n
      \r\n
      \r\n \r\n
      \r\n
      \r\n \r\n {products !== undefined &&\r\n products !== null &&\r\n products.length > 0 ? (\r\n
      \r\n

      \r\n {this.props.lang.lang == \"en\" ? `Total: ` : \"المجموع: \"}\r\n \r\n {/* {this.props.currency.currency == \"dollar\"\r\n ? `${total} $`\r\n : `${(total * 250.27).toFixed(2)} YRI`} */}\r\n {`${total} ${\r\n this.props.lang.lang === \"en\" ? \"Dinar\" : \"دينار\"\r\n }`}\r\n \r\n {/* {this.props.lang.lang == \"ar\" && ` المجموع `} */}\r\n

      \r\n
      \r\n \r\n {\" \"}\r\n \r\n this.setAddress(event.target.value)}\r\n />\r\n
      \r\n \r\n {\" \"}\r\n \r\n this.setName(event.target.value)}\r\n />\r\n
      \r\n \r\n {\" \"}\r\n \r\n this.setPhone(event.target.value)}\r\n />\r\n
      \r\n \r\n {\" \"}\r\n \r\n this.setNotes(event.target.value)}\r\n />\r\n
      \r\n \r\n {\" \"}\r\n \r\n this.setCoupon(event.target.value)}\r\n />\r\n
      \r\n \r\n
      \r\n \r\n {this.props.lang.lang == \"en\"\r\n ? ` Confirm Checkout`\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 Cart;\r\n","import React, { Component } from \"react\";\r\nimport { Redirect } from \"react-router-dom\";\r\n\r\n// Layout Types\r\nimport BaseLayout from \"../layouts/BaseLayout\";\r\n\r\n// Route Views\r\nimport Home from \"../views/Home/HomeContainer\";\r\nimport SingleProductContainer from \"../views/Product/SingleProductContainer\";\r\nimport CategoryContainer from \"../views/Category/CategoryContainer\";\r\nimport CartContainer from \"../views/Cart/CartContainer\";\r\n\r\nvar routes = [\r\n {\r\n path: \"/\",\r\n exact: true,\r\n layout: BaseLayout,\r\n component: Home,\r\n },\r\n {\r\n path: \"/home\",\r\n layout: BaseLayout,\r\n component: () => ,\r\n },\r\n {\r\n path: \"/single-product/:id\",\r\n layout: BaseLayout,\r\n component: SingleProductContainer,\r\n },\r\n {\r\n path: \"/categories\",\r\n layout: BaseLayout,\r\n component: CategoryContainer,\r\n },\r\n {\r\n path: \"/cart\",\r\n layout: BaseLayout,\r\n component: CartContainer,\r\n },\r\n];\r\n\r\nexport default routes;\r\n","import { connect } from \"react-redux\";\r\nimport Cart from \"./Cart\";\r\nimport {\r\n // getCartByUserId,\r\n postCart,\r\n clearCart,\r\n removeProductFromCart,\r\n} from \"../../redux/actions/cartAction\";\r\n\r\nconst mapStoreToProps = (state) => ({\r\n cart: state.cart,\r\n lang: state.lang,\r\n currency: state.currency,\r\n});\r\nconst mapDispatchToProps = (dispatch) => ({\r\n // getCartByUserId: dispatch(getCartByUserId()),\r\n postCart: (productId, count, _color, price, image, en_name, ar_name) =>\r\n dispatch(\r\n postCart(productId, count, _color, price, image, en_name, ar_name)\r\n ),\r\n clearCart: () => dispatch(clearCart()),\r\n removeProductFromCart: (productId, _color) =>\r\n dispatch(removeProductFromCart(productId, _color)),\r\n});\r\n\r\nexport default connect(mapStoreToProps, mapDispatchToProps)(Cart);\r\n","import api from \"./API\";\r\n\r\nexport default class OrdersService {\r\n static async GetMyOrders(filter) {\r\n return api\r\n .get(\"/my-orders\", { params: filter })\r\n .then((resp) => {\r\n return resp;\r\n })\r\n .catch((error) => {\r\n throw error;\r\n });\r\n }\r\n}\r\n","import OrdersService from \"../../axios/OrdersService\";\r\n\r\nexport const getMyOrders = (filter) => (dispatch) => {\r\n // let userId = Auth.getUserId();\r\n dispatch({\r\n type: GET_ORDERS_BY_USERID_BEGIN,\r\n });\r\n return OrdersService.GetMyOrders(filter)\r\n .then((res) => {\r\n console.log(res);\r\n dispatch({\r\n type: GET_ORDERS_BY_USERID_SUCCESS,\r\n payload: res,\r\n });\r\n return res;\r\n })\r\n .catch((error) => {\r\n console.log(error);\r\n dispatch({\r\n type: GET_ORDERS_BY_USERID_FAIL,\r\n payload: {\r\n error,\r\n },\r\n });\r\n return error;\r\n });\r\n};\r\n\r\nexport const GET_ORDERS_BY_USERID_BEGIN = \"GET_ORDERS_BY_USERID_BEGIN\";\r\nexport const GET_ORDERS_BY_USERID_SUCCESS = \"GET_ORDERS_BY_USERID_SUCCESS\";\r\nexport const GET_ORDERS_BY_USERID_FAIL = \"GET_ORDERS_BY_USERID_FAIL\";\r\n","import React, { Component } from \"react\";\r\nimport \"./style.css\";\r\nclass InfoCard extends Component {\r\n constructor(props) {\r\n super(props);\r\n }\r\n\r\n render() {\r\n return (\r\n
      \r\n
      \r\n \r\n {this.props.title}\r\n \r\n
      \r\n
      \r\n \r\n \r\n {this.props.elements.map((element) => (\r\n \r\n \r\n {element.title}\r\n \r\n \r\n {element.value}\r\n {!element.value &&\r\n (this.props.lang === \"en\"\r\n ? \"No info applied\"\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 InfoCard;\r\n","import React, { Component } from \"react\";\r\nimport { Modal, Button } from \"react-bootstrap\";\r\nimport \"./style.css\";\r\nimport jumpTo from \"../../modules/Navigation\";\r\nimport { BASE_URL_SHORT } from \"../../base\";\r\nimport InfoCard from \"./info-card\";\r\nclass SingleOrder extends Component {\r\n constructor(props) {\r\n super(props);\r\n }\r\n\r\n render() {\r\n return (\r\n \r\n \r\n
      \r\n \r\n
      \r\n
      \r\n
      \r\n
      \r\n \r\n {this.props.lang == \"en\"\r\n ? this.props.order.order_status.en_name\r\n : this.props.order.order_status.ar_name}\r\n \r\n ),\r\n },\r\n {\r\n title:\r\n this.props.lang === \"en\" ? \"Date\" : \"تاريخ الإنشاء\",\r\n value: this.props.order.date,\r\n },\r\n {\r\n title:\r\n this.props.lang === \"en\"\r\n ? \"Payment method\"\r\n : \"آلية الدفع\",\r\n value: this.props.order.payment_method,\r\n },\r\n ]}\r\n lang={this.props.lang}\r\n />\r\n
      \r\n
      \r\n \r\n
      \r\n
      \r\n \r\n
      \r\n
      \r\n
      \r\n \r\n {this.props.order.items.map((item, index) => (\r\n \r\n \r\n jumpTo(`/single-product/${item.product.id}`)}\r\n >\r\n \r\n \r\n\r\n
      \r\n
      \r\n
      \r\n {this.props.lang == \"en\"\r\n ? item.product.en_name.length > 30\r\n ? item.product.en_name.slice(0, 30) + \"...\"\r\n : item.product.en_name\r\n : item.product.ar_name.length > 30\r\n ? item.product.ar_name.slice(0, 30) + \"...\"\r\n : item.product.ar_name}\r\n
      \r\n
      \r\n \r\n
      \r\n \r\n \r\n \r\n \r\n {this.props.lang === \"en\" ? \"Price: \" : \"السعر: \"}\r\n \r\n \r\n {`${item.product.selling_price} ${\r\n this.props.lang === \"en\" ? \"Dinar\" : \"دينار\"\r\n }`}\r\n \r\n \r\n \r\n \r\n {this.props.lang === \"en\" ? \"Quantity: \" : \"الكمية: \"}\r\n \r\n \r\n {item.count}\r\n \r\n \r\n \r\n\r\n \r\n \r\n {this.props.lang === \"en\" ? \"Total: \" : \"الإجمالي: \"}\r\n \r\n \r\n {`${item.total} ${\r\n this.props.lang === \"en\" ? \"Dinar\" : \"دينار\"\r\n }`}\r\n \r\n \r\n \r\n \r\n \r\n ))}\r\n \r\n
      \r\n
      \r\n
      \r\n {this.props.order.items.length > 0 && (\r\n \r\n {this.props.lang === \"en\"\r\n ? `${this.props.order.total} Dinar`\r\n : `${this.props.order.total} دينار`}\r\n \r\n ),\r\n },\r\n ]}\r\n lang={this.props.lang}\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 SingleOrder;\r\n","import React, { Component } from \"react\";\r\n\r\nimport Heading from \"../../components/Heading\";\r\nimport CartService from \"../../axios/cartService\";\r\nimport { toast } from \"react-toastify\";\r\nimport { BASE_URL_SHORT } from \"../../base\";\r\nimport jumpTo from \"../../modules/Navigation\";\r\nimport SingleOrder from \"../../components/orders/single-order\";\r\n\r\nclass Orders extends Component {\r\n constructor(props) {\r\n super(props);\r\n this.state = {\r\n orders: this.props.orders,\r\n pageIndex: this.props.pageIndex,\r\n pageSize: this.props.pageSize,\r\n showOrder: false,\r\n selectedOrder: null,\r\n };\r\n }\r\n\r\n toggleOrderModalState = (newOrder) => {\r\n this.setState({ showOrder: !this.state.showOrder });\r\n this.setState({ selectedOrder: newOrder });\r\n };\r\n\r\n componentDidMount() {\r\n this.props.getMyOrders({\r\n pageIndex: this.state.pageIndex,\r\n pageSize: this.state.pageSize,\r\n });\r\n }\r\n componentDidUpdate(prevProps, prevState) {\r\n if (prevProps.orders != this.props.orders)\r\n this.setState({\r\n orders: this.props.orders,\r\n });\r\n if (prevState.pageIndex !== this.state.pageIndex) {\r\n this.props.getMyOrders({\r\n pageIndex: this.state.pageIndex,\r\n pageSize: this.state.pageSize,\r\n });\r\n }\r\n }\r\n\r\n render() {\r\n return (\r\n
      \r\n
      \r\n
      \r\n
      \r\n \r\n
      \r\n
      \r\n \r\n {this.state.orders &&\r\n this.state.orders.data &&\r\n this.state.orders.data.length > 0 &&\r\n this.state.orders.data.map((order) => (\r\n \r\n \r\n {\" \"}\r\n \r\n {this.props.lang.lang == \"en\"\r\n ? order.order_status.en_name\r\n : order.order_status.ar_name}\r\n \r\n \r\n {`${order.total} ${\r\n this.props.lang.lang === \"en\" ? \"Dinar\" : \"دينار\"\r\n }`}\r\n \r\n this.toggleOrderModalState(order)}\r\n >\r\n {this.props.lang.lang === \"en\"\r\n ? \"View details\"\r\n : \"مشاهدة التفاصيل\"}\r\n \r\n
      \r\n \r\n {order.items.map((item, index) => (\r\n \r\n \r\n \r\n jumpTo(`/single-product/${item.product.id}`)\r\n }\r\n >\r\n \r\n
      \r\n\r\n
      \r\n \r\n
      \r\n {this.props.lang.lang == \"en\"\r\n ? item.product.en_name.length > 30\r\n ? item.product.en_name.slice(0, 30) +\r\n \"...\"\r\n : item.product.en_name\r\n : item.product.ar_name.length > 30\r\n ? item.product.ar_name.slice(0, 30) + \"...\"\r\n : item.product.ar_name}\r\n
      \r\n \r\n \r\n
      \r\n
      \r\n \r\n \r\n \r\n {this.props.lang.lang === \"en\"\r\n ? \"Price: \"\r\n : \"السعر: \"}\r\n \r\n \r\n {`${item.product.selling_price} ${\r\n this.props.lang.lang === \"en\"\r\n ? \"Dinar\"\r\n : \"دينار\"\r\n }`}\r\n \r\n \r\n \r\n \r\n {this.props.lang.lang === \"en\"\r\n ? \"Quantity: \"\r\n : \"الكمية: \"}\r\n \r\n \r\n {item.count}\r\n \r\n \r\n \r\n\r\n \r\n \r\n {this.props.lang.lang === \"en\"\r\n ? \"Total: \"\r\n : \"الإجمالي: \"}\r\n \r\n \r\n {`${item.total} ${\r\n this.props.lang.lang === \"en\"\r\n ? \"Dinar\"\r\n : \"دينار\"\r\n }`}\r\n \r\n \r\n \r\n \r\n \r\n ))}\r\n \r\n \r\n ))}\r\n {this.state.orders &&\r\n this.state.orders.meta &&\r\n this.state.orders.data.length > 0 &&\r\n this.state.orders.meta.last_page !== 1 && (\r\n \r\n {/* Render the productsToDisplay here */}\r\n \r\n this.setState({\r\n pageIndex: this.state.pageIndex - 1,\r\n })\r\n }\r\n style={{\r\n width: \"80px\",\r\n height: \"30px\",\r\n border: \"none\",\r\n backgroundColor:\r\n this.state.pageIndex === 1 ? \"gray\" : \"#B18432\",\r\n // borderRadius: \"4px\",\r\n }}\r\n disabled={this.state.pageIndex === 1}\r\n >\r\n \r\n {this.props.lang.lang == \"en\" ? \"Previous\" : \"السابق\"}\r\n

      \r\n \r\n
      \r\n {this.state.orders.meta.last_page > 6 ? (\r\n \r\n this.setState({\r\n pageIndex: parseInt(e.target.value),\r\n })\r\n }\r\n min=\"1\"\r\n max={this.state.orders.meta.last_page}\r\n style={{\r\n height: \"30px\",\r\n width: \"50px\",\r\n textAlign: \"center\",\r\n fontSize: \"13px\",\r\n }}\r\n />\r\n ) : (\r\n
      \r\n {Array.from(\r\n {\r\n length: this.state.orders.meta.last_page,\r\n },\r\n (_, i) => (\r\n \r\n this.setState({ pageIndex: i + 1 })\r\n }\r\n style={{\r\n height: \"30px\",\r\n width: \"30px\",\r\n display: \"flex\",\r\n alignItems: \"center\",\r\n justifyContent: \"center\",\r\n border: \"1px black solid\",\r\n color:\r\n this.state.pageIndex === i + 1\r\n ? \"#B18432\"\r\n : \"black\",\r\n cursor: \"pointer\",\r\n }}\r\n >\r\n {i + 1}\r\n
      \r\n )\r\n )}\r\n
      \r\n )}\r\n \r\n \r\n this.setState({\r\n pageIndex: this.state.pageIndex + 1,\r\n })\r\n }\r\n style={{\r\n width: \"80px\",\r\n height: \"30px\",\r\n border: \"none\",\r\n backgroundColor:\r\n this.state.orders.meta &&\r\n this.state.pageIndex ===\r\n this.state.orders.meta.last_page\r\n ? \"gray\"\r\n : \"#B18432\",\r\n // borderRadius: \"4px\",\r\n }}\r\n disabled={\r\n this.state.orders.meta &&\r\n this.state.pageIndex ===\r\n this.state.orders.meta.last_page\r\n }\r\n >\r\n \r\n {this.props.lang.lang == \"en\" ? \"Next\" : \"التالي\"}\r\n

      \r\n \r\n \r\n )}\r\n \r\n \r\n \r\n {this.state.showOrder ? (\r\n this.toggleOrderModalState()}\r\n order={this.state.selectedOrder}\r\n />\r\n ) : null}\r\n \r\n );\r\n }\r\n}\r\n\r\nexport default Orders;\r\n","// Route Views\r\nimport React, { Component } from \"react\";\r\nimport { Redirect } from \"react-router-dom\";\r\n\r\n// Layout Types\r\nimport BaseLayout from \"../layouts/BaseLayout\";\r\n\r\nimport OrdersContainer from \"../views/orders/OrdersContainer\";\r\n\r\nvar PrivateRoutes = [\r\n {\r\n path: \"/orders\",\r\n layout: BaseLayout,\r\n component: OrdersContainer,\r\n },\r\n];\r\n\r\nexport default PrivateRoutes;\r\n","import { connect } from \"react-redux\";\r\nimport { getMyOrders } from \"../../redux/actions/OrdersAction\";\r\nimport Orders from \"./Orders\";\r\n\r\nconst mapStoreToProps = (state) => {\r\n return {\r\n orders: state.orders.orders, // Use an empty object if orders is undefined\r\n lang: state.lang,\r\n currency: state.currency,\r\n pageIndex: state.orders.pageIndex, // Use default value if pageIndex is missing\r\n pageSize: state.orders.pageSize, // Use default value if pageLength is missing\r\n };\r\n};\r\nconst mapDispatchToProps = (dispatch) => ({\r\n getMyOrders: (filter) => dispatch(getMyOrders(filter)),\r\n});\r\n\r\nexport default connect(mapStoreToProps, mapDispatchToProps)(Orders);\r\n","\r\n\r\nimport React, { Component } from \"react\";\r\nimport {\r\n HashRouter as Router,\r\n Redirect,\r\n Route,\r\n Switch\r\n} from \"react-router-dom\";\r\nimport { registerNav } from \"../modules/Navigation\";\r\nimport { createBrowserHistory } from \"history\";\r\nimport PageNotFound from \"../views/PageNotFound\";\r\nimport HomeRoutes from \"./HomeRoutes\";\r\nimport PrivateRoutes from \"./PrivateRoutes\";\r\nimport Auth from \"../modules/Auth\";\r\nimport { connect } from \"react-redux\";\r\n\r\nconst PrivateRouter = ({ component, ...options }) => {\r\n const finalComponent =\r\n Auth.getUserDetails() !== undefined &&\r\n Auth.getUserDetails() !== null &&\r\n Auth.getToken() !== undefined ? (\r\n \r\n ) : (\r\n \r\n );\r\n\r\n return finalComponent;\r\n};\r\n\r\nclass Routes extends Component {\r\n constructor(props) {\r\n super(props);\r\n this.state = {};\r\n }\r\n\r\n render() {\r\n const browserHistory = createBrowserHistory();\r\n\r\n return (\r\n
      \r\n \r\n \r\n {HomeRoutes.map((homeRoute, index) => {\r\n return (\r\n {\r\n return (\r\n \r\n \r\n \r\n );\r\n }}\r\n />\r\n );\r\n })}\r\n {PrivateRoutes.map((privateRoute, index) => {\r\n return (\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 }\r\n}\r\nconst mapStoreToProps = state => ({\r\n lang: state.lang,\r\n});\r\nexport default connect(mapStoreToProps, null)(Routes);\r\n","\r\n\r\nimport React, { Component } from \"react\";\r\nimport \"./assets/css/style.css\";\r\nimport \"./assets/css/responsive.css\";\r\nimport AOS from \"aos\";\r\nimport \"aos/dist/aos.css\";\r\nimport Routes from \"./routes\";\r\nimport { ToastContainer, toast } from 'react-toastify';\r\nimport 'react-toastify/dist/ReactToastify.css';\r\nclass App extends Component {\r\n constructor(props) {\r\n super(props);\r\n this.state = {};\r\n }\r\n componentDidMount() {\r\n AOS.init();\r\n }\r\n render() {\r\n return (\r\n <>\r\n \r\n
      \r\n \r\n
      \r\n \r\n );\r\n }\r\n}\r\n\r\nexport default App;\r\n","// This optional code is used to register a service worker.\r\n// register() is not called by default.\r\n\r\n// This lets the app load faster on subsequent visits in production, and gives\r\n// it offline capabilities. However, it also means that developers (and users)\r\n// will only see deployed updates on subsequent visits to a page, after all the\r\n// existing tabs open on the page have been closed, since previously cached\r\n// resources are updated in the background.\r\n\r\n// To learn more about the benefits of this model and instructions on how to\r\n// opt-in, read https://bit.ly/CRA-PWA\r\n\r\nconst isLocalhost = Boolean(\r\n window.location.hostname === 'localhost' ||\r\n // [::1] is the IPv6 localhost address.\r\n window.location.hostname === '[::1]' ||\r\n // 127.0.0.0/8 are considered localhost for IPv4.\r\n window.location.hostname.match(\r\n /^127(?:\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/\r\n )\r\n);\r\n\r\nexport function register(config) {\r\n if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) {\r\n // The URL constructor is available in all browsers that support SW.\r\n const publicUrl = new URL(process.env.PUBLIC_URL, window.location.href);\r\n if (publicUrl.origin !== window.location.origin) {\r\n // Our service worker won't work if PUBLIC_URL is on a different origin\r\n // from what our page is served on. This might happen if a CDN is used to\r\n // serve assets; see https://github.com/facebook/create-react-app/issues/2374\r\n return;\r\n }\r\n\r\n window.addEventListener('load', () => {\r\n const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`;\r\n\r\n if (isLocalhost) {\r\n // This is running on localhost. Let's check if a service worker still exists or not.\r\n checkValidServiceWorker(swUrl, config);\r\n\r\n // Add some additional logging to localhost, pointing developers to the\r\n // service worker/PWA documentation.\r\n navigator.serviceWorker.ready.then(() => {\r\n console.log(\r\n 'This web app is being served cache-first by a service ' +\r\n 'worker. To learn more, visit https://bit.ly/CRA-PWA'\r\n );\r\n });\r\n } else {\r\n // Is not localhost. Just register service worker\r\n registerValidSW(swUrl, config);\r\n }\r\n });\r\n }\r\n}\r\n\r\nfunction registerValidSW(swUrl, config) {\r\n navigator.serviceWorker\r\n .register(swUrl)\r\n .then(registration => {\r\n registration.onupdatefound = () => {\r\n const installingWorker = registration.installing;\r\n if (installingWorker == null) {\r\n return;\r\n }\r\n installingWorker.onstatechange = () => {\r\n if (installingWorker.state === 'installed') {\r\n if (navigator.serviceWorker.controller) {\r\n // At this point, the updated precached content has been fetched,\r\n // but the previous service worker will still serve the older\r\n // content until all client tabs are closed.\r\n console.log(\r\n 'New content is available and will be used when all ' +\r\n 'tabs for this page are closed. See https://bit.ly/CRA-PWA.'\r\n );\r\n\r\n // Execute callback\r\n if (config && config.onUpdate) {\r\n config.onUpdate(registration);\r\n }\r\n } else {\r\n // At this point, everything has been precached.\r\n // It's the perfect time to display a\r\n // \"Content is cached for offline use.\" message.\r\n console.log('Content is cached for offline use.');\r\n\r\n // Execute callback\r\n if (config && config.onSuccess) {\r\n config.onSuccess(registration);\r\n }\r\n }\r\n }\r\n };\r\n };\r\n })\r\n .catch(error => {\r\n console.error('Error during service worker registration:', error);\r\n });\r\n}\r\n\r\nfunction checkValidServiceWorker(swUrl, config) {\r\n // Check if the service worker can be found. If it can't reload the page.\r\n fetch(swUrl, {\r\n headers: { 'Service-Worker': 'script' }\r\n })\r\n .then(response => {\r\n // Ensure service worker exists, and that we really are getting a JS file.\r\n const contentType = response.headers.get('content-type');\r\n if (\r\n response.status === 404 ||\r\n (contentType != null && contentType.indexOf('javascript') === -1)\r\n ) {\r\n // No service worker found. Probably a different app. Reload the page.\r\n navigator.serviceWorker.ready.then(registration => {\r\n registration.unregister().then(() => {\r\n window.location.reload();\r\n });\r\n });\r\n } else {\r\n // Service worker found. Proceed as normal.\r\n registerValidSW(swUrl, config);\r\n }\r\n })\r\n .catch(() => {\r\n console.log(\r\n 'No internet connection found. App is running in offline mode.'\r\n );\r\n });\r\n}\r\n\r\nexport function unregister() {\r\n if ('serviceWorker' in navigator) {\r\n navigator.serviceWorker.ready\r\n .then(registration => {\r\n registration.unregister();\r\n })\r\n .catch(error => {\r\n console.error(error.message);\r\n });\r\n }\r\n}\r\n","import {\r\n LOGIN_BEGIN,\r\n LOGIN_SUCCESS,\r\n LOGIN_FAIL\r\n} from \"../actions/LoginAction\";\r\n\r\nconst initialState = {\r\n login_loading: false,\r\n error: {}\r\n};\r\n\r\nexport default (state = initialState, action) => {\r\n switch (action.type) {\r\n case LOGIN_BEGIN:\r\n return {\r\n ...state,\r\n signin_loading: true\r\n };\r\n case LOGIN_SUCCESS:\r\n return {\r\n ...state,\r\n signin_loading: false\r\n };\r\n case LOGIN_FAIL:\r\n return {\r\n ...state,\r\n signin_loading: false,\r\n // error: action.payload.error.response.data\r\n };\r\n default:\r\n return state;\r\n }\r\n};","import {\r\n POST_REGISTER_BEGIN,\r\n POST_REGISTER_SUCCESS,\r\n POST_REGISTER_FAIL\r\n} from \"../actions/RegisterAction\";\r\n\r\nconst initialState = {\r\n register_loading: false,\r\n error: {}\r\n};\r\n\r\nexport default (state = initialState, action) => {\r\n switch (action.type) {\r\n case POST_REGISTER_BEGIN:\r\n return {\r\n ...state,\r\n register_loading: true\r\n };\r\n case POST_REGISTER_SUCCESS:\r\n return {\r\n ...state,\r\n register_loading: false\r\n };\r\n case POST_REGISTER_FAIL:\r\n return {\r\n ...state,\r\n register_loading: false,\r\n // error: action.payload.error.response.data\r\n };\r\n default:\r\n return state;\r\n }\r\n};","import API from \"../../axios/API\";\r\nexport const getDepartments = () => dispatch => {\r\n dispatch({\r\n type: GET_DEPARTMENTS_BEGIN\r\n });\r\n return API({\r\n method: \"GET\",\r\n url: \"/departments\"\r\n })\r\n .then(res => {\r\n dispatch({\r\n type: GET_DEPARTMENTS_SUCCESS,\r\n payload: res\r\n });\r\n return res;\r\n })\r\n .catch(error => {\r\n dispatch({\r\n type: GET_DEPARTMENTS_FAIL,\r\n payload: { error }\r\n });\r\n return error;\r\n });\r\n};\r\n\r\nexport const GET_DEPARTMENTS_BEGIN = \"GET_DEPARTMENTS_BEGIN\";\r\nexport const GET_DEPARTMENTS_SUCCESS = \"GET_DEPARTMENTS_SUCCESS\";\r\nexport const GET_DEPARTMENTS_FAIL = \"GET_DEPARTMENTS_FAIL\";\r\n","import {\r\n GET_DEPARTMENTS_BEGIN,\r\n GET_DEPARTMENTS_SUCCESS,\r\n GET_DEPARTMENTS_FAIL\r\n} from \"../actions/DepartmentAction\";\r\n\r\nconst initialState = {\r\n loading: false,\r\n departments: null,\r\n error: null\r\n};\r\n\r\nexport default (state = initialState, action) => {\r\n switch (action.type) {\r\n case GET_DEPARTMENTS_BEGIN:\r\n return {\r\n loading: true,\r\n error: null\r\n };\r\n case GET_DEPARTMENTS_SUCCESS:\r\n return {\r\n loading: false,\r\n departments: action.payload.data.departments\r\n };\r\n case GET_DEPARTMENTS_FAIL:\r\n return {\r\n loading: false,\r\n // error: action.payload.error.response.data\r\n };\r\n default:\r\n return state;\r\n }\r\n};","import {\r\n GET_ALL_PRODUCTS_BEGIN,\r\n GET_ALL_PRODUCTS_SUCCESS,\r\n GET_ALL_PRODUCTS_FAIL,\r\n GET_PRODUCT_BEGIN,\r\n GET_PRODUCT_SUCCESS,\r\n GET_PRODUCT_FAIL,\r\n GET_PRODUCTS_BY_CATEGORY_BEGIN,\r\n GET_PRODUCTS_BY_CATEGORY_SUCCESS,\r\n GET_PRODUCTS_BY_CATEGORY_FAIL,\r\n SEARCH_BEGIN,\r\n SEARCH_SUCCESS,\r\n SEARCH_FAIL,\r\n APPLY_FILTERS_BEGIN,\r\n APPLY_FILTERS_SUCCESS,\r\n APPLY_FILTERS_FAIL,\r\n GET_NEW_ARRIVAL_PRODUCT_BEGIN,\r\n GET_NEW_ARRIVAL_PRODUCT_SUCCESS,\r\n GET_NEW_ARRIVAL_PRODUCT_FAIL,\r\n} from \"../actions/productAction\";\r\n\r\nconst initialState = {\r\n products: null,\r\n newArrivalProducts: null,\r\n product: null,\r\n loading: false,\r\n error: null,\r\n pageLength: 10,\r\n pageIndex: 1,\r\n search: undefined,\r\n active: -1,\r\n};\r\n\r\nexport default (state = initialState, action) => {\r\n switch (action.type) {\r\n case GET_ALL_PRODUCTS_BEGIN:\r\n return {\r\n ...state,\r\n loading: true,\r\n error: null,\r\n };\r\n case GET_ALL_PRODUCTS_SUCCESS:\r\n return {\r\n ...state,\r\n loading: false,\r\n products: action.payload.data,\r\n pageLength: action.payload.data.per_page,\r\n pageIndex: action.payload.data.current_page,\r\n search: action.payload.search,\r\n active: action.payload.active,\r\n };\r\n case GET_ALL_PRODUCTS_FAIL:\r\n return {\r\n ...state,\r\n loading: false,\r\n // error: action.payload.error.response.data\r\n };\r\n case GET_NEW_ARRIVAL_PRODUCT_BEGIN:\r\n return {\r\n ...state,\r\n loading: true,\r\n error: null,\r\n };\r\n case GET_NEW_ARRIVAL_PRODUCT_SUCCESS:\r\n return {\r\n ...state,\r\n loading: false,\r\n newArrivalProducts: action.payload,\r\n };\r\n case GET_NEW_ARRIVAL_PRODUCT_FAIL:\r\n return {\r\n ...state,\r\n loading: false,\r\n // error: action.payload.error.response.data\r\n };\r\n case GET_PRODUCT_BEGIN:\r\n return {\r\n ...state,\r\n loading: true,\r\n error: null,\r\n };\r\n case GET_PRODUCT_SUCCESS:\r\n return {\r\n ...state,\r\n loading: false,\r\n product: action.payload,\r\n };\r\n case GET_PRODUCT_FAIL:\r\n return {\r\n ...state,\r\n loading: false,\r\n // error: action.payload.error.response.data\r\n };\r\n case GET_PRODUCTS_BY_CATEGORY_BEGIN:\r\n return {\r\n ...state,\r\n loading: true,\r\n error: null,\r\n };\r\n case GET_PRODUCTS_BY_CATEGORY_SUCCESS:\r\n return {\r\n ...state,\r\n loading: false,\r\n products: action.payload.data.products,\r\n };\r\n case GET_PRODUCTS_BY_CATEGORY_FAIL:\r\n return {\r\n ...state,\r\n loading: false,\r\n // error: action.payload.error.response.data\r\n };\r\n case SEARCH_BEGIN:\r\n return {\r\n ...state,\r\n loading: true,\r\n error: null,\r\n };\r\n case SEARCH_SUCCESS:\r\n return {\r\n ...state,\r\n loading: false,\r\n products: action.payload.data.products,\r\n };\r\n case SEARCH_FAIL:\r\n return {\r\n ...state,\r\n loading: false,\r\n // error: action.payload.error.response.data\r\n };\r\n case APPLY_FILTERS_BEGIN:\r\n return {\r\n ...state,\r\n loading: true,\r\n error: null,\r\n };\r\n case APPLY_FILTERS_SUCCESS:\r\n return {\r\n ...state,\r\n loading: false,\r\n products: action.payload.data.products,\r\n };\r\n case APPLY_FILTERS_FAIL:\r\n return {\r\n ...state,\r\n loading: false,\r\n // error: action.payload.error.response.data\r\n };\r\n default:\r\n return state;\r\n }\r\n};\r\n","\r\n\r\nimport {\r\n GET_VARIANTS_QUERY_BEGIN,\r\n GET_VARIANTS_QUERY_SUCCESS,\r\n GET_VARIANTS_QUERY_FAIL\r\n} from \"../actions/variantsAction\";\r\n\r\nconst initialState = {\r\n variants: null,\r\n loading: false,\r\n error: null\r\n};\r\n\r\nexport default (state = initialState, action) => {\r\n switch (action.type) {\r\n case GET_VARIANTS_QUERY_BEGIN:\r\n return {\r\n ...state,\r\n loading: true,\r\n error: null\r\n };\r\n case GET_VARIANTS_QUERY_SUCCESS:\r\n return {\r\n ...state,\r\n loading: false,\r\n variants: action.payload.data.variants\r\n };\r\n case GET_VARIANTS_QUERY_FAIL:\r\n return {\r\n ...state,\r\n loading: false,\r\n error: action.payload.error\r\n };\r\n default:\r\n return state;\r\n }\r\n};\r\n","import {\r\n POST_CART_BEGIN,\r\n POST_CART_SUCCESS,\r\n POST_CART_FAIL,\r\n GET_CART_BY_USERID_BEGIN,\r\n GET_CART_BY_USERID_SUCCESS,\r\n GET_CART_BY_USERID_FAIL,\r\n CLEAR_CART,\r\n REMOVE_PRODUCT_FROM_CART_BEGIN,\r\n REMOVE_PRODUCT_FROM_CART_SUCCESS,\r\n} from \"../actions/cartAction\";\r\n\r\nconst initialState = {\r\n cart: JSON.parse(window.localStorage.getItem(\"cart\")) || {},\r\n loading: false,\r\n error: {},\r\n};\r\n\r\nexport default (state = initialState, action) => {\r\n switch (action.type) {\r\n case POST_CART_BEGIN:\r\n return {\r\n ...state,\r\n loading: true,\r\n error: {},\r\n };\r\n case POST_CART_SUCCESS:\r\n return {\r\n ...state,\r\n cart: action.payload,\r\n loading: false,\r\n };\r\n case REMOVE_PRODUCT_FROM_CART_BEGIN:\r\n return {\r\n ...state,\r\n loading: true,\r\n error: {},\r\n };\r\n case REMOVE_PRODUCT_FROM_CART_SUCCESS:\r\n return {\r\n ...state,\r\n cart: action.payload,\r\n loading: false,\r\n };\r\n case CLEAR_CART:\r\n return {\r\n ...state,\r\n cart: {},\r\n loading: false,\r\n };\r\n case POST_CART_FAIL:\r\n return {\r\n ...state,\r\n loading: false,\r\n // error: action.payload.error.response.data\r\n };\r\n case GET_CART_BY_USERID_BEGIN:\r\n return {\r\n ...state,\r\n loading: true,\r\n error: {},\r\n };\r\n case GET_CART_BY_USERID_SUCCESS:\r\n return {\r\n ...state,\r\n cart: action.payload,\r\n loading: false,\r\n };\r\n case GET_CART_BY_USERID_FAIL:\r\n return {\r\n ...state,\r\n loading: false,\r\n // error: action.payload.error.response.data\r\n };\r\n default:\r\n return state;\r\n }\r\n};\r\n","import {\r\n GET_ALL_CATEGORIES_BEGIN,\r\n GET_ALL_CATEGORIES_SUCCESS,\r\n GET_ALL_CATEGORIES_FAIL,\r\n GET_CATEGORY_BEGIN,\r\n GET_CATEGORY_SUCCESS,\r\n GET_CATEGORY_FAIL,\r\n SEARCH_BEGIN,\r\n SEARCH_SUCCESS,\r\n SEARCH_FAIL,\r\n} from \"../actions/categoryAction\";\r\n\r\nconst initialState = {\r\n categories: null,\r\n category: null,\r\n loading: false,\r\n error: null\r\n};\r\n\r\nexport default (state = initialState, action) => {\r\n switch (action.type) {\r\n case GET_ALL_CATEGORIES_BEGIN:\r\n return {\r\n ...state,\r\n loading: true,\r\n error: null\r\n };\r\n case GET_ALL_CATEGORIES_SUCCESS:\r\n return {\r\n ...state,\r\n loading: false,\r\n categories: action.payload\r\n };\r\n case GET_ALL_CATEGORIES_FAIL:\r\n return {\r\n ...state,\r\n loading: false,\r\n // error: action.payload.error.response.data\r\n };\r\n case GET_CATEGORY_BEGIN:\r\n return {\r\n ...state,\r\n loading: true,\r\n error: null\r\n };\r\n case GET_CATEGORY_SUCCESS:\r\n return {\r\n ...state,\r\n loading: false,\r\n category: action.payload\r\n };\r\n case GET_CATEGORY_FAIL:\r\n return {\r\n ...state,\r\n loading: false,\r\n // error: action.payload.error.response.data\r\n };\r\n case SEARCH_BEGIN:\r\n return {\r\n ...state,\r\n loading: true,\r\n error: null\r\n };\r\n case SEARCH_SUCCESS:\r\n return {\r\n ...state,\r\n loading: false,\r\n categories: action.payload\r\n };\r\n case SEARCH_FAIL:\r\n return {\r\n ...state,\r\n loading: false,\r\n // error: action.payload.error.response.data\r\n };\r\n default:\r\n return state;\r\n }\r\n};","import { SET_LANG, GET_LANG } from \"../actions/langAction\";\r\n\r\nconst initialState = {\r\n lang: window.localStorage.getItem(\"lang\") || \"en\",\r\n loading: false,\r\n error: {},\r\n};\r\n\r\nexport default (state = initialState, action) => {\r\n switch (action.type) {\r\n case SET_LANG:\r\n console.log(\"action\", action.payload);\r\n return {\r\n ...state,\r\n lang: action.payload,\r\n };\r\n case GET_LANG:\r\n return {\r\n ...state,\r\n };\r\n default:\r\n return state;\r\n }\r\n};\r\n","import { SET_Currency, GET_Currency } from \"../actions/CurrencyAction\";\r\n\r\nconst initialState = {\r\n currency: \"dinar\",\r\n loading: false,\r\n error: {},\r\n};\r\n\r\nexport default (state = initialState, action) => {\r\n switch (action.type) {\r\n case SET_Currency:\r\n return {\r\n ...state,\r\n currency: action.payload,\r\n };\r\n case GET_Currency:\r\n return {\r\n ...state,\r\n };\r\n default:\r\n return state;\r\n }\r\n};\r\n","import {\r\n GET_ORDERS_BY_USERID_BEGIN,\r\n GET_ORDERS_BY_USERID_SUCCESS,\r\n} from \"../actions/OrdersAction\";\r\n\r\nconst initialState = {\r\n orders: null,\r\n loading: false,\r\n error: null,\r\n pageSize: 2,\r\n pageIndex: 1,\r\n};\r\n\r\nexport default (state = initialState, action) => {\r\n switch (action.type) {\r\n case GET_ORDERS_BY_USERID_BEGIN:\r\n return {\r\n ...state,\r\n loading: true,\r\n error: null,\r\n };\r\n case GET_ORDERS_BY_USERID_SUCCESS:\r\n return {\r\n ...state,\r\n orders: action.payload,\r\n loading: false,\r\n pageSize: action.payload.meta.per_page,\r\n pageIndex: action.payload.meta.current_page,\r\n };\r\n\r\n default:\r\n return state;\r\n }\r\n};\r\n","import { combineReducers } from \"redux\";\r\nimport login from \"./LoginReducer\";\r\nimport register from \"./RegisterReducer\";\r\nimport department from \"./DepartmentReducer\";\r\nimport product from \"./productReducer\";\r\nimport variant from \"./variantsReducer\";\r\nimport cart from \"./cartReducer\";\r\nimport category from \"./categoryReducer\";\r\nimport lang from \"./langReducer\";\r\nimport currency from \"./CurrencyReducer\";\r\n// import checkout from './checkoutReducer'\r\n// import filter from './filterReducer'\r\nimport orders from \"./OrdersReducer\";\r\n\r\nexport default combineReducers({\r\n department,\r\n login,\r\n register,\r\n product,\r\n category,\r\n variant,\r\n cart,\r\n lang,\r\n currency,\r\n orders,\r\n});\r\n","\r\n\r\nimport rootReducer from \"../reducers\";\r\nimport { createStore, applyMiddleware, compose } from \"redux\";\r\nimport thunk from \"redux-thunk\";\r\n\r\nconst initialState = {};\r\nconst middlewares = [thunk];\r\nconst composeEnhancers = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose;\r\n\r\nconst store = createStore(\r\n rootReducer,\r\n initialState,\r\n composeEnhancers(applyMiddleware(...middlewares))\r\n);\r\n\r\nexport default store;\r\n","import React from \"react\";\r\nimport ReactDOM from \"react-dom\";\r\n\r\nimport App from \"./App\";\r\nimport * as serviceWorker from \"./serviceWorker\";\r\nimport \"bootstrap/dist/css/bootstrap.min.css\";\r\n\r\nimport { Provider } from \"react-redux\";\r\nimport store from \"./redux/store\";\r\n\r\nReactDOM.render(\r\n \r\n \r\n ,\r\n document.getElementById(\"root\")\r\n);\r\n\r\n// If you want your app to work offline and load faster, you can change\r\n// unregister() to register() below. Note this comes with some pitfalls.\r\n// Learn more about service workers: https://bit.ly/CRA-PWA\r\nserviceWorker.unregister();\r\n","module.exports = __webpack_public_path__ + \"static/media/emptyCart.02800820.png\";","module.exports = __webpack_public_path__ + \"static/media/logo_bg.09baf877.png\";","module.exports = __webpack_public_path__ + \"static/media/deal_ofthe_week.18a6bbdf.png\";","module.exports = __webpack_public_path__ + \"static/media/empty_cart.abebef23.png\";"],"sourceRoot":""}