{"version":3,"sources":["services/logService.js","services/httpService.js","services/userAccountService.js","utilities/data.js","contexts/userContext.jsx","contexts/tabContext.jsx","utilities/requireAuth.jsx","services/storeService.js","contexts/confirmationDialogContext.jsx","components/common/searchBar.jsx","components/common/useTable.jsx","pages/stores/Stores.jsx","services/companyService.js","pages/companies/Company.jsx","services/userService.js","contexts/formContext.jsx","pages/users/users.jsx","services/salesService.js","utilities/dataConfiguration.js","pages/sales/sales.jsx","components/common/formInput.jsx","utilities/handleErrors.js","components/common/formTemplate.jsx","utilities/formInputHook.jsx","pages/sales/salesForms.jsx","pages/profile/Profile.jsx","components/common/GoogleMap.jsx","utilities/mapStyles.js","pages/stores/storesForm.jsx","pages/companies/assignUserToCompany.jsx","services/categoriesService.js","pages/companies/companyForm.jsx","pages/profile/myCompany.jsx","pages/users/userForm.jsx","services/pointsService.js","pages/users/userPoints.jsx","pages/users/pointsForm.jsx","pages/login/LoginCustomInput.jsx","pages/login/LoginPage.jsx","contexts/tabbarSectionContext.jsx","components/sidebar/MenuTile.jsx","components/sidebar/MenuComponent.jsx","components/sidebar/Sidebar.jsx","components/topbar/TopbarSection.jsx","components/topbar/Topbar.jsx","components/mobileNavigation.jsx","pages/mainPage.jsx","pages/login/externalLoginPage.jsx","components/widgets/WidgetLg.jsx","services/statistics.js","components/common/horizontalBarChart.jsx","pages/analytics/Analytics.jsx","pages/categories/Categories.jsx","pages/categories/categoryForm.jsx","routes.jsx","App.jsx","index.js"],"names":["init","log","error","console","axios","defaults","withCredentials","interceptors","response","use","status","logger","Promise","reject","get","post","put","delete","apiEndpoint","apiUrl","login","model","a","http","widthCredentials","result","data","register","user","registerUser","updateAccount","updateUser","checkUserRole","email","checkUser","requestResetPassword","resetPassword","dashboardMenu","id","icon","Timeline","className","title","tab","tabs","Analytics","TrendingUp","Sales","Store","Companies","PermIdentity","Users","Stores","Category","Categories","UserContext","createContext","UserContextProvider","props","auth","useState","username","role","authed","companyId","setAuthed","companyOwnerEmail","setCompanyOwnerEmail","menu","setMenu","useEffect","isAdmin","filter","c","userLogin","userDetails","checkIfAdmin","roles","Administrator","CompanyOwner","length","userRole","includes","userObject","userName","setUserContextObject","userDetailObject","changeCompanyOnwer","useAuth","Provider","value","children","TabContext","TabContextProvider","setTab","changeTab","newTab","RequireAuth","admin","useContext","Dashboard","addStore","newStore","addNew","getStoreById","getStores","updateStore","store","deleteStore","getStoreByEmail","ConfirmationDialogContext","ConfirmationDialogContextProvider","state","show","details","body","yesButton","noButton","confirmCallback","dialogState","setDialogState","resetDialog","onDismiss","onConfirm","openDialog","callback","useConfirmContexState","Dialog","open","onClose","DialogTitle","DialogContent","DialogContentText","DialogActions","Button","onClick","autoFocus","useStyles","makeStyles","theme","searchBar","maxWidth","SearchBar","onChange","classes","TextField","e","target","label","variant","InputProps","startAdornment","InputAdornment","position","Search","table","minWidth","marginTop","breakpoints","down","width","display","overflowX","fontWeight","color","palette","primary","main","backgroundColor","light","cursor","useTable","records","headCells","searchKeys","pages","page","setPage","filteredRecords","setFilteredRecords","rowsPerPage","setRowsPerPage","search","setSearch","order","setOrder","orderBy","setOrderBy","newFilter","record","satisfied","forEach","item","avoidSearch","_","String","toLowerCase","handleChangePage","event","newPage","handleChangeRowsPerPage","parseInt","TableContainer","Box","flexDirection","Table","TableHeader","TableHead","TableRow","map","headCell","TableCell","TableSortLabel","active","direction","cellId","TablePaginationCustom","TablePagination","component","rowsPerPageOptions","count","onPageChange","onRowsPerPageChange","recordsAfterPaging","array","slice","locationState","setLocationState","stores","setStores","navigate","useNavigate","location","useLocation","handleDelete","storesInitial","storesTemp","Init","allStores","CompanyId","OwnerEmail","Container","justifyContent","flexWrap","alignItems","IconButton","ArrowBack","Typography","pathname","startIcon","Add","style","marginRight","size","preventDefault","addPath","TableBody","align","colSpan","address","row","Edit","DeleteOutline","getAllCompanies","allCompanies","addCompany","newCompany","pointsToEuroRatio","pointsToEuro","euroToPointsRatio","euroToPoints","ownerEmail","formData","FormData","append","name","logo","logoFile","website","twitter","instagram","facebook","categoryId","updateCompany","company","getCompanyByUserEmail","getCompany","assignUserToCompany","assignToCompany","deleteCompany","Company","companies","setCompanies","fromCategories","setFromCategories","useSearchParams","searchParams","companiesInitial","companiesTemp","category","Tooltip","Visibility","Loyalty","stateDemo","getAllUsers","users","getUsersByCompany","deleteUser","getUser","authenticateUser","endpoint","logOut","FormContext","FormContextProvoder","methods","addMethod","updateMethod","validation","setUsers","setAdmin","usersInitial","usersTemp","addSale","newSale","imageFile","image","dateStart","dateEnd","description","getSaleById","getSales","updateSale","sale","deleteSale","dateConfiguration","dateString","split","sales","setSales","userEmail","handleOnDelete","params","salesInitial","salesTemp","Grid","xs","formInputField","border","padding","outline","borderRadius","fontSize","resize","height","FormInput","objKey","valueChange","disableInput","maxPrice","minPrice","type","updateImage","imageObj","imageName","selectList","selectValueKey","selectNameKey","inputType","handleOnChange","checked","currentTarget","handleImageChange","files","imageFileTemp","reader","FileReader","onload","x","readAsDataURL","margin","marginBottom","disabled","min","src","accept","pattern","rows","Select","MenuItem","renderInput","handleErrors","ex","setErrors","errorMessage","Alert","React","forwardRef","ref","elevation","wrapper","buttonProgress","green","top","left","marginLeft","errors","listStyle","FormTemplate","dataForm","setDataForm","formType","handleDisableInput","addText","validations","customHandleClick","showSnackbar","setShowSnackbar","edit","setEdit","loading","setLoading","addTextTitle","checkValidations","handleClick","formTypes","view","add","addErrors","updateErrors","initialData","handleSnackbarClose","reason","container","spacing","Paper","CircularProgress","index","Snackbar","autoHideDuration","severity","sx","FormInputHook","defaultData","setDisableInput","updateValue","key","newValue","prevState","set","SalesForm","trim","push","dataEnd","Date","parse","addSaleValidation","updateSaleValidation","handleImageUpdate","Profile","mapContainerStyle","options","styles","disableDefaultUI","zoomControl","mapWrapper","mapHeader","zIndex","GoogleMapContainer","marker","center","lat","lng","useLoadScript","googleMapsApiKey","config","REACT_APP_GOOGLE_MAPS_API_KEY","libraries","isLoaded","loadError","mapRef","useRef","useCallback","current","zoom","StoresForm","Geocode","setApiKey","process","setOpen","long","setMarker","locationError","setLocationError","handleClickOpen","s","fromAddress","results","geometry","sendModel","latitude","longitude","handleUpdate","handleClose","handleCheck","r","AssignUserToCompany","getCategories","categories","updateCategory","addCategory","deleteCategory","CompanyForm","redeemPoints","setRedeemPoints","setCategories","redeemEuroResult","setRedeemEuroResult","exchangeEuro","setExchangeEuro","earnPoints","setEarnPoints","Forward","Divider","MyComapny","dataResponse","owner","UserForm","addUserValidation","updateUserValidation","updatePoints","getUserPointsPerCompany","userPoints","getUserPointsAllCompanies","addPoints","points","euro","redeem","UserPoints","setUserPoints","textAlign","total","userId","applicationUserId","PointsForm","redeemForm","pointsAddMethod","redeemPointsValidation","addPointsValidation","inputWrapper","inputWrapperIcon","LoginCustomInput","Icon","placeHolder","placeholder","boxWrapper","opacity","loginPageWrapper","personIcon","right","bottom","applicationColors","greenBg","transform","loginFormWrapper","paddingLeft","paddingTop","paddingRight","paddingBottom","loginInput","signInButton","greenBgHover","signInGoogle","errorsList","listStylePosition","wordWrap","bgcolor","boxShadow","p","LoginPage","setEmail","password","setPassword","person","Person","passwordIcon","Lock","openModal","setOpenModal","forgotPassRespond","setForgotPassRespond","forgotEmail","setForgotEmail","handleLoginClick","handleResetPasswordButton","onSubmit","method","action","window","origin","toString","Modal","mt","TabBarSectionContext","TabbarSectionContextProvider","setDisplay","menuTileWrapper","textDecoration","borderLeft","menuTileIconTitle","menuTileIcon","activeMobile","menuTileWrapperMobile","MenuTile","mobile","Reports","clsx","to","menuTileTitle","ArrowForwardIos","MenuComponent","items","sidebar","sidebarTitle","divider","sidebarTitleWrapper","sidebarLogo","Sidebar","topbarSectionWrapper","hideTopbarSection","TopbarSection","hide","hideCompany","setHideCompany","handleLogout","List","ListItem","button","ListItemIcon","AccountBox","ListItemText","Business","PowerSettingsNew","tobar","hamburgerMenu","fontDisplay","alignSelf","transition","marginRightAndLeft","Topbar","showMenu","toggle","setToggle","md","Menu","hamubergerMenuIcon","Avatar","mobileNavigation","letterSpacing","mobileNavigationList","mobileNavigationClose","mobileNavigationCloseIcon","hideMenu","sidebarGrayBg","MobileNavigation","Close","sidebarLightGray","MainPage","setHide","routes","createRoutes","toggleTopbarSection","setToggleTopbarSection","obj","ExternalLoginPage","providerKey","loginProvider","WidgetLg","bodyNumber","footerNumber","footerTitle","getTotalUsers","totalUsers","getTotalStores","totalStores","getTotalActiveSales","totalActiveSales","getLast6Months","last6monthts","getTop30Users","top30Users","HorizontalBarChart","tableWrapper","horizontalChartWrapper","verticalChartWrapper","setTotalUsers","setTotalStores","totalSales","setTotalSales","last6Months","setLast6Months","setTop30Users","activeSales","background","dateJoined","ResponsiveContainer","BarChart","CartesianGrid","strokeDasharray","XAxis","dataKey","interval","dx","dy","minTickGap","YAxis","Legend","Bar","fill","categoriesInitial","categoriesTemp","CategoryForm","addCategoryValidation","updateCategoryValidation","path","element","telephone","createTheme","App","ThemeProvider","CssBaseline","ReactDOM","render","StrictMode","document","getElementById"],"mappings":"4PASc,OACVA,KARJ,aASIC,IAPJ,SAAaC,GAETC,QAAQD,MAAMA,KCHlBE,IAAMC,SAASC,iBAAkB,EACjCF,IAAMG,aAAaC,SAASC,IAAI,MAAM,SAAAP,GASlC,OAPIA,EAAMM,UACNN,EAAMM,SAASE,QAAU,KACzBR,EAAMM,SAASE,OAAS,KAExBC,EAAOV,IAAIC,GAGRU,QAAQC,OAAOX,MAIX,OACXY,IAAKV,IAAMU,IACXC,KAAMX,IAAMW,KACZC,IAAIZ,IAAMY,IACVC,OAAOb,IAAMa,QCjBXC,G,OAAcC,SAAS,iBAGtB,SAAeC,EAAtB,kC,4CAAO,WAAqBC,GAArB,iBAAAC,EAAA,6DAECF,EAAQF,EAAa,aAFtB,SAGkBK,EAAKR,KAAKK,EAAMC,EAAM,CAACG,kBAAiB,IAH1D,cAGGC,EAHH,yBAIIA,EAAOC,MAJX,4C,sBAQA,SAAeC,EAAtB,kC,4CAAO,WAAwBC,GAAxB,iBAAAN,EAAA,6DACCO,EAAeX,EAAa,oBAD7B,SA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ETyX,SAAUc,YAAUC,WAK5B,cAAC,IAAD,CACE0S,KAAI,2BACJC,QACE,cAAC,EAAD,UACE,cAAC,GAAD,QAIN,cAAC,IAAD,CACED,KAAI,qCACJC,QACE,cAAC,EAAD,UACE,cAAC,GAAD,CACE1R,YAAa,CACX6F,KAAM,GAER7H,SAAUc,YAAUE,IACpB8G,QAAQ,QAKhB,cAAC,IAAD,CACE2L,KAAI,wCACJC,QACE,cAAC,EAAD,UACE,cAAC,GAAD,CACE1R,YAAa,CACX8F,OAAQ,GAEV9H,SAAUc,YAAUE,IACpB8G,QAAQ,QAMhB,cAAC,IAAD,CAAO2L,KAAK,QAAQC,QAAS,cAAClJ,GAAD,MAC7B,cAAC,IAAD,CAAOiJ,KAAK,IAAIC,QAAS,cAAC,IAAD,CAAU5G,GAAG,Y,8BClYpC7d,GAAQ2kB,aAAY,CACxBjjB,QAAS,KAoBIkjB,OAjBf,WAEE,IAAM3D,EDkBN,cAAC,IAAD,UACE,eAAC,IAAD,WACE,cAAC,IAAD,CAAOuD,KAAK,SAASC,QAAS,cAAClJ,GAAD,MAC9B,cAAC,IAAD,CAAOiJ,KAAK,kBAAkBC,QAAS,cAAC,GAAD,MACvC,cAAC,IAAD,CAAOD,KAAK,KAAKC,QAAS,cAAC,GAAD,WCrB9B,OACE,mCACE,cAACI,GAAA,EAAD,CAAe7kB,MAAOA,GAAtB,SACE,cAAClF,EAAD,UACE,eAAC,GAAD,WACE,cAACgqB,GAAA,EAAD,IACC,CAAC7D,aCbd8D,IAASC,OACP,cAAC,IAAMC,WAAP,UACE,cAAC,GAAD,MAEFC,SAASC,eAAe,U","file":"static/js/main.697e01f0.chunk.js","sourcesContent":["\r\n\r\nfunction init(){}\r\n\r\nfunction log(error)\r\n{\r\n console.error(error);\r\n}\r\n\r\nexport default{\r\n init,\r\n log\r\n}","import axios from \"axios\";\r\nimport logger from \"./logService\";\r\n\r\naxios.defaults.withCredentials = true;\r\naxios.interceptors.response.use(null, error => {\r\n const expectedError = \r\n error.response &&\r\n error.response.status >= 400 &&\r\n error.response.status < 500;\r\n if(!expectedError){\r\n logger.log(error);\r\n }\r\n\r\n return Promise.reject(error);\r\n});\r\n\r\n\r\nexport default {\r\n get: axios.get,\r\n post: axios.post,\r\n put:axios.put,\r\n delete:axios.delete,\r\n //setJwt\r\n}\r\n","import http, { setJwt} from \"./httpService\";\r\nimport { apiUrl } from \"../config.json\";\r\nimport jwtDecode from \"jwt-decode\";\r\n\r\nconst apiEndpoint = apiUrl + \"/useraccount/\";\r\nconst tokenKey = \"token\";\r\nconst userObject = \"user\";\r\nexport async function login(model)\r\n{\r\n let login = apiEndpoint +\"loginAdmin\"; \r\n const result = await http.post(login,model,{widthCredentials:true});\r\n return result.data;\r\n}\r\n\r\n\r\nexport async function register(user) {\r\n let registerUser = apiEndpoint +\"registerfromadmin\";\r\n const result = await http.post(registerUser,user);\r\n return result;\r\n}\r\n\r\nexport async function updateAccount(model) {\r\n let updateUser = apiEndpoint +\"updateUser\";\r\n const result = await http.post(updateUser,model);\r\n return result;\r\n}\r\n\r\nexport async function checkUserRole(email)\r\n{\r\n let checkUser = apiEndpoint + `checkRole?email=${email}`;\r\n const { data } = await http.get(checkUser);\r\n return data;\r\n}\r\n\r\nexport async function requestResetPassword(email)\r\n{\r\n let resetPassword = apiEndpoint + `requestResetPassword?email=${email}`;\r\n const result = await http.get(resetPassword);\r\n}","import {\r\n Home,\r\n Store,\r\n PermIdentity,\r\n TrendingUp,\r\n Timeline,\r\n AttachMoney,\r\n BarChart,\r\n Category,\r\n} from \"@material-ui/icons\";\r\nimport { tabs } from \"../config.json\";\r\n\r\nexport const dashboardMenu = [\r\n {\r\n id: 1,\r\n icon: ,\r\n title: \"Analytics\",\r\n tab: tabs.Analytics,\r\n },\r\n {\r\n id: 2,\r\n icon: ,\r\n title: \"Προσφορές\",\r\n tab: tabs.Sales,\r\n },\r\n {\r\n id: 3,\r\n icon: ,\r\n title: \"Επιχείρηση\",\r\n tab: tabs.Companies,\r\n },\r\n {\r\n id: 4,\r\n icon: ,\r\n title: \"Χρήστες\",\r\n tab: tabs.Users,\r\n },\r\n {\r\n id: 5,\r\n icon: ,\r\n title: \"Καταστήματα\",\r\n tab: tabs.Stores,\r\n },\r\n {\r\n id: 6,\r\n icon: ,\r\n title: \"Κατηγορίες\",\r\n tab: tabs.Categories,\r\n },\r\n ];","import React, { createContext, useState } from \"react\";\r\nimport { useEffect } from \"react\";\r\nimport { roles, tabs } from \"../config.json\";\r\nimport { login, checkIfExpired, getUser } from \"../services/userAccountService\";\r\nimport { dashboardMenu } from \"../utilities/data\";\r\n\r\nexport function useAuth() {\r\n const [authed, setAuthed] = useState({\r\n id: \"\",\r\n username: \"\",\r\n email: \"\",\r\n role: \"\",\r\n authed: false,\r\n companyId: null,\r\n });\r\n\r\n // if we are admin\r\n const [companyOwnerEmail, setCompanyOwnerEmail] = useState(null);\r\n const [menu, setMenu] = useState(dashboardMenu);\r\n\r\n useEffect(() => {\r\n if (isAdmin()) {\r\n setMenu(\r\n dashboardMenu.filter(\r\n (c) => c.tab !== tabs.Stores && c.tab !== tabs.Sales\r\n )\r\n );\r\n } else {\r\n setMenu(\r\n dashboardMenu.filter(\r\n (c) => c.tab !== tabs.Companies && c.tab !== tabs.Categories\r\n )\r\n );\r\n }\r\n }, [authed]);\r\n\r\n const userLogin = async (model) => {\r\n const userDetails = await login(model);\r\n const checkIfAdmin = userDetails.roles.filter(\r\n (c) => c === roles.Administrator || c === roles.CompanyOwner\r\n );\r\n if (checkIfAdmin.length === 0) throw \"Access denied\";\r\n // setJwtUser(userDetails);\r\n const userRole = checkIfAdmin.includes(roles.Administrator)\r\n ? roles.Administrator\r\n : roles.CompanyOwner;\r\n // se the user here!!\r\n const userObject = {\r\n id: userDetails.id,\r\n username: userDetails.userName,\r\n email: userDetails.email,\r\n role: userRole,\r\n companyId: userDetails.companyId,\r\n };\r\n // setUser(userObject);\r\n setAuthed({ ...userObject, authed: true });\r\n };\r\n\r\n const userDetailObject = (userDetails) => {\r\n const check = userDetails.roles.filter(\r\n (c) => c === roles.Administrator || c === roles.CompanyOwner\r\n );\r\n const role = check.includes(roles.Administrator)\r\n ? roles.Administrator\r\n : roles.CompanyOwner;\r\n // se the user here!!\r\n const obj = {\r\n id: userDetails.id,\r\n username: userDetails.userName,\r\n email: userDetails.email,\r\n role: role,\r\n companyId: userDetails.companyId,\r\n };\r\n return obj;\r\n };\r\n\r\n const setUserContextObject = (response) => {\r\n setAuthed({ ...authed, ...response, authed: true });\r\n };\r\n const isAdmin = () => {\r\n if (authed.role === roles.Administrator) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n };\r\n\r\n const changeCompanyOnwer = (email) => {\r\n setCompanyOwnerEmail(email);\r\n };\r\n\r\n return {\r\n authed,\r\n userLogin,\r\n setUserContextObject,\r\n isAdmin,\r\n menu,\r\n userDetailObject,\r\n setAuthed,\r\n companyOwnerEmail,\r\n changeCompanyOnwer,\r\n };\r\n}\r\n\r\nexport const UserContext = createContext();\r\nexport function UserContextProvider(props) {\r\n const auth = useAuth();\r\n\r\n return (\r\n \r\n {props.children}\r\n \r\n );\r\n}\r\n","import React, { createContext, useState } from \"react\";\r\nimport { tabs } from \"../config.json\";\r\n\r\nexport const TabContext = createContext();\r\nexport function TabContextProvider(props) {\r\n const [tab, setTab] = useState(tabs.Analytics);\r\n\r\n const changeTab = (newTab) => {\r\n setTab(newTab);\r\n };\r\n\r\n return (\r\n \r\n {props.children}\r\n \r\n );\r\n}\r\n","import React, { useContext, useState } from \"react\";\r\nimport { Navigate, useNavigate } from \"react-router-dom\";\r\nimport { useAuth } from \"../contexts/userContext\";\r\nimport { roles, tabs } from \"../config.json\";\r\nimport { TabContext } from \"../contexts/tabContext\";\r\nimport { UserContext } from \"../contexts/userContext\";\r\nimport { useEffect } from \"react\";\r\n\r\nfunction RequireAuth({ children, admin }) {\r\n const { authed } = useContext(UserContext);\r\n const { changeTab } = useContext(TabContext);\r\n const navigateFunction = () => {\r\n if (admin && authed.role !== roles.Administrator) {\r\n changeTab(tabs.Dashboard);\r\n return;\r\n } else {\r\n return children;\r\n }\r\n };\r\n\r\n return authed.email !== \"\" ? navigateFunction() : \"\";\r\n}\r\n\r\nexport default RequireAuth;\r\n","import http from \"./httpService\";\r\nimport { apiUrl } from \"../config.json\";\r\n\r\n\r\nconst apiEndpoint = apiUrl + \"/stores/\";\r\nexport async function addStore(newStore)\r\n{\r\n let addNew = apiEndpoint + \"addStore\";\r\n const { data } = await http.post(addNew, newStore);\r\n return data;\r\n}\r\n\r\nexport async function getStoreById(id)\r\n{\r\n let getStores = apiEndpoint+`getStores?id=${id}`;\r\n const { data } = await http.get(getStores);\r\n return data;\r\n}\r\n\r\nexport async function updateStore(store)\r\n{\r\n let updateStore = apiEndpoint + `updateStore`;\r\n const { data } = await http.put(updateStore, store);\r\n return data;\r\n}\r\n\r\nexport async function deleteStore(id)\r\n{\r\n let deleteStore = apiEndpoint + `deleteStore?Id=${id}`;\r\n const { data } = await http.delete(deleteStore);\r\n return data;\r\n}\r\n\r\nexport async function getStores(id)\r\n{\r\n let getStores = apiEndpoint +`getStores?id=${id}`;\r\n const {data} = await http.get(getStores);\r\n return data;\r\n}\r\n\r\nexport async function getStoreByEmail(email)\r\n{\r\n let getStores = apiEndpoint +`getStores?email=${email}`;\r\n const {data} = await http.get(getStores);\r\n return data;\r\n}","import {\r\n Dialog,\r\n DialogActions,\r\n DialogContent,\r\n DialogContentText,\r\n DialogTitle,\r\n Button,\r\n} from \"@material-ui/core\";\r\nimport React, { createContext, useState } from \"react\";\r\n\r\nexport function useConfirmContexState() {\r\n const [dialogState, setDialogState] = useState({\r\n show: false,\r\n details: {\r\n title: \"\",\r\n body: \"\",\r\n yesButton: \"\",\r\n noButton: \"\",\r\n confirmCallback: () => {},\r\n },\r\n });\r\n\r\n const onDismiss = () => {\r\n setDialogState({ ...dialogState, show: false });\r\n };\r\n\r\n const openDialog = ({ title, body, yesButton, noButton, callback }) => {\r\n console.log(\"Mphke sto openDialog\");\r\n setDialogState({\r\n ...dialogState,\r\n show: true,\r\n details: {\r\n title,\r\n body,\r\n yesButton,\r\n noButton,\r\n confirmCallback: () => callback(),\r\n },\r\n });\r\n };\r\n\r\n const resetDialog = () => {\r\n console.log(\"clicked!!!\");\r\n setDialogState({ ...dialogState, show: false });\r\n };\r\n\r\n const onConfirm = () => {\r\n resetDialog();\r\n // call the callback function!!\r\n dialogState.details.confirmCallback();\r\n };\r\n\r\n return {\r\n dialogState,\r\n setDialogState,\r\n onDismiss,\r\n resetDialog,\r\n onConfirm,\r\n openDialog,\r\n };\r\n}\r\n\r\nexport const ConfirmationDialogContext = createContext();\r\n\r\nexport function ConfirmationDialogContextProvider(props) {\r\n const state = useConfirmContexState();\r\n return (\r\n <>\r\n \r\n {props.children}\r\n \r\n \r\n {state.dialogState?.details?.title}\r\n \r\n \r\n \r\n {state.dialogState?.details?.body}\r\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 ConfirmationDialogContextProvider;\r\n","import { InputAdornment, makeStyles, TextField } from \"@material-ui/core\";\r\nimport { Search } from \"@material-ui/icons\";\r\nimport React from \"react\";\r\n\r\nconst useStyles = makeStyles((theme) => ({\r\n searchBar: {\r\n maxWidth: \"400px\",\r\n },\r\n}));\r\n\r\nfunction SearchBar({ value, onChange }) {\r\n const classes = useStyles();\r\n return (\r\n <>\r\n onChange(e.target.value)}\r\n id=\"outlined-basic\"\r\n label=\"Search\"\r\n variant=\"outlined\"\r\n InputProps={{\r\n startAdornment: (\r\n \r\n \r\n \r\n ),\r\n }}\r\n />\r\n \r\n );\r\n}\r\n\r\nexport default SearchBar;\r\n","import {\r\n Box,\r\n makeStyles,\r\n Table,\r\n TableCell,\r\n TableHead,\r\n TablePagination,\r\n TableRow,\r\n TableSortLabel,\r\n} from \"@material-ui/core\";\r\nimport React from \"react\";\r\nimport { useState } from \"react\";\r\nimport _ from \"lodash\";\r\nimport { useEffect } from \"react\";\r\nimport SearchBar from \"./searchBar\";\r\n\r\nconst useStyles = makeStyles((theme) => ({\r\n table: {\r\n minWidth: \"800px\",\r\n marginTop: \"10px\",\r\n [theme.breakpoints.down(\"sm\")]: {\r\n minWidth: \"auto\",\r\n width:\"100%\",\r\n display:\"block\",\r\n overflowX:\"auto\"\r\n },\r\n \"& thead th\": {\r\n fontWeight: \"600\",\r\n color: theme.palette.primary.main,\r\n backgroundColor: theme.palette.primary.light,\r\n },\r\n \"& tbody td\": {\r\n fontWeight: \"300\",\r\n },\r\n \"& tbody tr:hover\": {\r\n cursor: \"pointer\",\r\n },\r\n \r\n },\r\n}));\r\n\r\nexport default function useTable(records, headCells, searchKeys) {\r\n const classes = useStyles();\r\n const pages = [5, 10, 25];\r\n const [page, setPage] = useState(0);\r\n let [filteredRecords, setFilteredRecords] = useState(records);\r\n const [rowsPerPage, setRowsPerPage] = useState(5);\r\n const [search, setSearch] = useState(\"\");\r\n // order is asc or desc\r\n const [order, setOrder] = useState();\r\n // orderby einai to id tou cell sto opoio exw pathsei\r\n const [orderBy, setOrderBy] = useState();\r\n\r\n useEffect(() => {\r\n setFilteredRecords(records === null ? [] : records);\r\n }, [records]);\r\n\r\n useEffect(() => {\r\n const newFilter = records.filter((record) => {\r\n //console.log(record);\r\n let satisfied = false;\r\n searchKeys.forEach((item) => {\r\n if (item.avoidSearch) return;\r\n var showKey = _.get(record, item);\r\n var result = String(_.get(record, item))\r\n .toLowerCase()\r\n .includes(search.toLowerCase());\r\n //console.log(\"To result\", result);\r\n if (result) {\r\n satisfied = true;\r\n return true;\r\n }\r\n });\r\n if (satisfied) return true;\r\n return false;\r\n });\r\n setFilteredRecords(newFilter);\r\n }, [search]);\r\n\r\n const TableContainer = (props) => (\r\n \r\n \r\n \r\n {props.children}\r\n
\r\n
\r\n );\r\n\r\n const TableHeader = (props) => {\r\n const handleSortRequest = (cellId) => {\r\n const isAsc = orderBy === cellId && order === \"asc\";\r\n setOrder(isAsc ? \"desc\" : \"asc\");\r\n setOrderBy(cellId);\r\n };\r\n return (\r\n \r\n \r\n {headCells.map((headCell) => (\r\n \r\n {\r\n handleSortRequest(headCell.id);\r\n }}\r\n >\r\n {headCell.label}\r\n \r\n \r\n ))}\r\n \r\n \r\n );\r\n };\r\n\r\n const handleChangePage = (event, newPage) => {\r\n setPage(newPage);\r\n };\r\n\r\n const handleChangeRowsPerPage = (event) => {\r\n setRowsPerPage(parseInt(event.target.value, 10));\r\n setPage(0);\r\n };\r\n\r\n const TablePaginationCustom = () => (\r\n \r\n );\r\n\r\n function stableSort(array) {\r\n return _.orderBy(array, [orderBy], [order]);\r\n }\r\n\r\n const recordsAfterPaging = () => {\r\n return stableSort(filteredRecords).slice(\r\n page * rowsPerPage,\r\n (page + 1) * rowsPerPage\r\n );\r\n };\r\n\r\n return {\r\n TableContainer,\r\n TableHeader,\r\n TablePaginationCustom,\r\n recordsAfterPaging,\r\n };\r\n}\r\n","import React, { useContext, useEffect, useState } from \"react\";\r\n\r\nimport { TabContext } from \"../../contexts/tabContext\";\r\nimport { tabs } from \"../../config.json\";\r\nimport { useLocation, useNavigate } from \"react-router-dom\";\r\nimport {\r\n getStoreById,\r\n getStoreByEmail,\r\n deleteStore,\r\n} from \"../../services/storeService\";\r\nimport { UserContext } from \"../../contexts/userContext\";\r\nimport {\r\n Box,\r\n Button,\r\n Container,\r\n IconButton,\r\n TableBody,\r\n TableCell,\r\n TableRow,\r\n Typography,\r\n} from \"@material-ui/core\";\r\nimport { Edit, DeleteOutline, Add, ArrowBack } from \"@material-ui/icons\";\r\nimport { ConfirmationDialogContext } from \"../../contexts/confirmationDialogContext\";\r\nimport { red } from \"@material-ui/core/colors\";\r\nimport useTable from \"../../components/common/useTable\";\r\n\r\nexport default function Stores() {\r\n const { changeTab } = useContext(TabContext);\r\n const [locationState, setLocationState] = useState();\r\n const { isAdmin, authed } = useContext(UserContext);\r\n const [admin, setAdmin] = useState(isAdmin());\r\n const [stores, setStores] = useState([]);\r\n const { openDialog } = useContext(ConfirmationDialogContext);\r\n const navigate = useNavigate();\r\n const location = useLocation();\r\n const storesColumn = [\r\n { id: \"address\", label: \"Address\" },\r\n { id: \"actions\", label: \"Actions\", avoidSearch: true },\r\n ];\r\n const {\r\n TableContainer,\r\n TableHeader,\r\n TablePaginationCustom,\r\n recordsAfterPaging,\r\n } = useTable(stores, storesColumn, [\"address\"]);\r\n\r\n const handleDelete = async (id) => {\r\n // try catch? prwta 8a kanw to set state wste na dei3w oti ola comple\r\n // kai meta 8a kalesw to api gia na kanw delete!!!\r\n let storesInitial = [...stores];\r\n try {\r\n if (id === null) return;\r\n let storesTemp = stores.filter((c) => c.id !== id);\r\n setStores([...storesTemp]);\r\n // call the api!!\r\n await deleteStore(id);\r\n } catch (e) {\r\n // delete the store here!!!\r\n setStores([...storesInitial]);\r\n }\r\n };\r\n\r\n const handleAddStore = (e) => {\r\n e.preventDefault();\r\n const addPath = location.pathname + \"/add\";\r\n navigate(addPath, { state: { ...locationState } });\r\n };\r\n\r\n const handleAssignUser = () => {\r\n navigate(`${location.pathname}/assignUser`, { state: locationState });\r\n };\r\n\r\n useEffect(() => {\r\n const Init = async () => {\r\n try {\r\n // console.log(`To company id:${companyId}`);\r\n if (isAdmin()) {\r\n changeTab(tabs.Companies);\r\n const { data: allStores } = await getStoreById(location.state.id);\r\n setStores(allStores);\r\n setLocationState({ CompanyId: location.state.id });\r\n } else {\r\n changeTab(tabs.Stores);\r\n const { data: store } = await getStoreByEmail(authed.email);\r\n setStores(store);\r\n // setCompanyId(authed.companyId);\r\n setLocationState({ OwnerEmail: authed.email });\r\n }\r\n } catch (ex) {\r\n // show snackbar? that something went wrong on loading the data!\r\n }\r\n };\r\n Init();\r\n }, [authed]);\r\n\r\n const handleEditClick = (row) => {\r\n navigate(`${location.pathname}/${row.id}`, {\r\n state: {\r\n ...row,\r\n },\r\n });\r\n };\r\n\r\n return (\r\n \r\n \r\n {admin ? (\r\n navigate(-1)}>\r\n \r\n \r\n ) : (\r\n
\r\n )}\r\n\r\n Καταστήματα\r\n \r\n }\r\n style={{ marginRight: \"10px\" }}\r\n variant=\"contained\"\r\n size=\"small\"\r\n >\r\n Αναθεση Χρηστη \r\n \r\n }\r\n variant=\"contained\"\r\n size=\"small\"\r\n >\r\n Προσθηκη Καταστηματος\r\n \r\n \r\n
\r\n \r\n \r\n \r\n \r\n {recordsAfterPaging()?.length === 0 ? (\r\n \r\n \r\n No Results\r\n \r\n \r\n ) : (\r\n <>\r\n {recordsAfterPaging().map((item) => (\r\n \r\n {item.address}\r\n \r\n \r\n handleEditClick(item)}\r\n color=\"primary\"\r\n >\r\n \r\n \r\n {\r\n openDialog({\r\n title: \"Delete store?\",\r\n body: \"Are you sure you want to delete this store?\",\r\n yesButton: \"Yes\",\r\n noButton: \"No\",\r\n callback: () => handleDelete(item.id),\r\n });\r\n }}\r\n >\r\n \r\n \r\n \r\n \r\n \r\n ))}\r\n \r\n )}\r\n \r\n \r\n \r\n \r\n
\r\n );\r\n}\r\n","import http from \"./httpService\";\r\nimport { apiUrl } from \"../config.json\";\r\n\r\n\r\nconst apiEndpoint = apiUrl + \"/companies/\";\r\n\r\nexport async function getAllCompanies()\r\n{\r\n let allCompanies = apiEndpoint + \"getAllCompanies\";\r\n const { data } = await http.get(allCompanies);\r\n return data;\r\n}\r\n\r\nexport async function addCompany(newCompany)\r\n{\r\n newCompany.pointsToEuroRatio = newCompany.pointsToEuro;\r\n newCompany.euroToPointsRatio = newCompany.euroToPoints;\r\n newCompany.email = newCompany.ownerEmail;\r\n const formData = new FormData();\r\n formData.append(\"name\",newCompany.name);\r\n formData.append(\"logo\",newCompany.logo);\r\n formData.append(\"logoFile\",newCompany.logoFile);\r\n formData.append(\"website\",newCompany.website);\r\n formData.append(\"twitter\",newCompany.twitter);\r\n formData.append(\"instagram\",newCompany.instagram);\r\n formData.append(\"facebook\",newCompany.facebook);\r\n formData.append(\"euroToPointsRatio\",newCompany.euroToPointsRatio);\r\n formData.append(\"pointsToEuroRatio\",newCompany.pointsToEuro);\r\n formData.append(\"email\", newCompany.ownerEmail);\r\n formData.append(\"categoryId\",newCompany.categoryId);\r\n \r\n let addNew = apiEndpoint + \"addCompany\";\r\n const { data } = await http.post(addNew, formData);\r\n return data;\r\n}\r\n\r\nexport async function getCompanyById(id)\r\n{\r\n let getCompany = apiEndpoint+`getcompanybyid?Id=${id}`;\r\n const { data } = await http.get(getCompany);\r\n return data;\r\n}\r\n\r\nexport async function updateCompany(company)\r\n{\r\n company.pointsToEuroRatio = company.pointsToEuro;\r\n company.euroToPointsRatio = company.euroToPoints;\r\n const formData = new FormData();\r\n formData.append(\"id\",company.id)\r\n formData.append(\"name\",company.name);\r\n formData.append(\"logo\",company.logo);\r\n formData.append(\"logoFile\",company.logoFile);\r\n formData.append(\"website\",company.website);\r\n formData.append(\"twitter\",company.twitter);\r\n formData.append(\"instagram\",company.instagram);\r\n formData.append(\"facebook\",company.facebook);\r\n formData.append(\"euroToPointsRatio\",company.euroToPointsRatio);\r\n formData.append(\"pointsToEuroRatio\", company.pointsToEuro);\r\n formData.append(\"ownerEmail\", company.ownerEmail);\r\n formData.append(\"categoryId\",company.categoryId);\r\n let updateCompany = apiEndpoint + `updateCompany`;\r\n const { data } = await http.put(updateCompany, formData);\r\n return data;\r\n}\r\n\r\nexport async function getCompanyByUserEmail(email)\r\n{\r\n let getCompany = apiEndpoint+`getcompanybyemail?email=${email}`;\r\n const { data } = await http.get(getCompany);\r\n return data;\r\n}\r\n\r\n\r\nexport async function assignUserToCompany(model)\r\n{\r\n // let model = { Id: companyId, email: userEmail };\r\n let assignToCompany = apiEndpoint + `addUserToCompany`;\r\n const { data } = await http.post(assignToCompany, model);\r\n return data;\r\n}\r\n\r\n\r\nexport async function deleteCompany(id)\r\n{\r\n let deleteCompany = apiEndpoint + `deleteCompany?Id=${id}`;\r\n const { data } = await http.delete(deleteCompany);\r\n return data;\r\n}","import React, { useContext, useEffect, useState } from \"react\";\r\nimport { TabContext } from \"../../contexts/tabContext\";\r\nimport { tabs } from \"../../config.json\";\r\nimport { useNavigate, useSearchParams } from \"react-router-dom\";\r\nimport { getAllCompanies, deleteCompany } from \"../../services/companyService\";\r\nimport {\r\n Box,\r\n Button,\r\n Container,\r\n IconButton,\r\n TableBody,\r\n TableCell,\r\n TableRow,\r\n Tooltip,\r\n Typography,\r\n} from \"@material-ui/core\";\r\nimport {\r\n Edit,\r\n Visibility,\r\n DeleteOutline,\r\n Add,\r\n Loyalty,\r\n ArrowBack,\r\n} from \"@material-ui/icons\";\r\nimport { ConfirmationDialogContext } from \"../../contexts/confirmationDialogContext\";\r\nimport useTable from \"../../components/common/useTable\";\r\nimport { UserContext } from \"../../contexts/userContext\";\r\n\r\nfunction Company() {\r\n const [companies, setCompanies] = useState([]);\r\n const [fromCategories, setFromCategories] = useState(false);\r\n const { changeTab } = useContext(TabContext);\r\n const { openDialog } = useContext(ConfirmationDialogContext);\r\n const { changeCompanyOnwer } = useContext(UserContext);\r\n const navigate = useNavigate();\r\n const [searchParams] = useSearchParams();\r\n const companiesColumn = [\r\n { id: \"name\", label: \"Name\" },\r\n { id: \"category\", label: \"Category\" },\r\n { id: \"ownerEmail\", label: \"Owner\" },\r\n { id: \"actions\", label: \"Actions\", avoidSearch: true },\r\n ];\r\n const {\r\n TableContainer,\r\n TableHeader,\r\n TablePaginationCustom,\r\n recordsAfterPaging,\r\n } = useTable(companies, companiesColumn, [\"name\", \"ownerEmail\"]);\r\n\r\n useEffect(async () => {\r\n changeTab(tabs.Companies);\r\n const { data } = await getAllCompanies();\r\n const categoryId = searchParams.get(\"category\");\r\n if (categoryId !== null) {\r\n setFromCategories(true);\r\n setCompanies(data.filter((c) => c.categoryId === parseInt(categoryId)));\r\n } else {\r\n setCompanies(data);\r\n }\r\n }, []);\r\n\r\n const handleEditClick = (stateDemo) => {\r\n navigate(`/companies/${stateDemo.id}`, {\r\n state: {\r\n euroToPoints: stateDemo.euroToPointsRatio,\r\n pointsToEuro: stateDemo.pointsToEuroRatio,\r\n ...stateDemo,\r\n },\r\n });\r\n };\r\n\r\n const handleDelete = async (id) => {\r\n let companiesInitial = [...companies];\r\n try {\r\n if (id === null) return;\r\n let companiesTemp = companies.filter((c) => c.id !== id);\r\n setCompanies([...companiesTemp]);\r\n await deleteCompany(id);\r\n } catch (e) {\r\n setCompanies([...companiesInitial]);\r\n }\r\n };\r\n\r\n const handleViewClick = (row) => {\r\n changeCompanyOnwer(row.ownerEmail);\r\n navigate(`/companies/${row.id}/stores`, {\r\n state: {\r\n id: row.id,\r\n },\r\n });\r\n };\r\n\r\n const handleViewSales = (row) => {\r\n changeCompanyOnwer(row.ownerEmail);\r\n navigate(\"/companies/sales\", {\r\n state: {\r\n id: row.id,\r\n },\r\n });\r\n };\r\n\r\n return (\r\n \r\n \r\n {fromCategories ? (\r\n navigate(-1)}>\r\n \r\n \r\n ) : (\r\n
\r\n )}\r\n Companies\r\n navigate(\"/companies/add\")}\r\n color=\"primary\"\r\n startIcon={}\r\n variant=\"contained\"\r\n size=\"small\"\r\n >\r\n Add Company\r\n \r\n
\r\n \r\n \r\n \r\n \r\n {recordsAfterPaging()?.length === 0 ? (\r\n \r\n \r\n No Results\r\n \r\n \r\n ) : (\r\n <>\r\n {recordsAfterPaging().map((item) => (\r\n \r\n {item.name}\r\n \r\n {item.category ? item.category : \"None\"}\r\n \r\n \r\n {item.ownerEmail ? item.ownerEmail : \"Not found\"}\r\n \r\n \r\n \r\n \r\n handleViewClick(item)}\r\n color=\"primary\"\r\n >\r\n \r\n \r\n \r\n \r\n handleViewSales(item)}\r\n color=\"primary\"\r\n >\r\n \r\n \r\n \r\n \r\n handleEditClick(item)}\r\n color=\"primary\"\r\n >\r\n \r\n \r\n \r\n \r\n {\r\n openDialog({\r\n title: \"Delete company?\",\r\n body: \"Are you sure you want to delete this company?\",\r\n yesButton: \"Yes\",\r\n noButton: \"No\",\r\n callback: () => handleDelete(item.id),\r\n });\r\n }}\r\n >\r\n \r\n \r\n \r\n \r\n \r\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 Company;\r\n","import http from \"./httpService\";\r\nimport { apiUrl } from \"../config.json\";\r\n\r\nconst apiEndpoint = apiUrl + \"/useraccount/\";\r\n\r\nexport async function getAllUsers()\r\n{\r\n let users = apiEndpoint + \"getAllUsers\";\r\n const { data } = await http.get(users);\r\n return data;\r\n}\r\n\r\n\r\nexport async function getUsersByCompany(email)\r\n{\r\n let users = apiEndpoint+`getUsersByCompany?email=${email}`;\r\n const { data } = await http.get(users);\r\n return data;\r\n}\r\n\r\nexport async function deleteUser(email)\r\n{\r\n let deleteUser = apiEndpoint + `deleteUser?email=${email}`;\r\n const result = await http.delete(deleteUser);\r\n}\r\n\r\nexport async function getUser(email)\r\n{\r\n let user = apiEndpoint + `getUser?email=${email}`;\r\n const { data } = await http.get(user);\r\n return data;\r\n}\r\n\r\nexport async function authenticateUser()\r\n{\r\n let endpoint = apiEndpoint + \"authenticateUser\";\r\n const { data } = await http.post(endpoint);\r\n return data;\r\n}\r\n\r\nexport async function logOut()\r\n{\r\n let endpoint = apiEndpoint + \"logout\";\r\n const result = await http.post(endpoint);\r\n}\r\n\r\n\r\n","import React, { createContext, useState } from \"react\";\r\n\r\nexport const FormContext = createContext();\r\nfunction FormContextProvoder(props) {\r\n const [data, setData] = useState({\r\n data: \"\",\r\n methods: {\r\n addMethod: () => {},\r\n updateMethod: () => {},\r\n },\r\n validation: () => {},\r\n });\r\n return (\r\n \r\n {props.children}\r\n \r\n );\r\n}\r\n\r\nexport default FormContextProvoder;\r\n","import React, { useContext, useEffect, useState } from \"react\";\r\n\r\nimport { useLocation } from \"react-router\";\r\nimport { TabContext } from \"../../contexts/tabContext\";\r\nimport { tabs } from \"../../config.json\";\r\nimport { useNavigate } from \"react-router-dom\";\r\nimport {\r\n getAllUsers,\r\n deleteUser,\r\n getUsersByCompany,\r\n} from \"../../services/userService\";\r\nimport { FormContext } from \"../../contexts/formContext\";\r\nimport {\r\n Box,\r\n Button,\r\n Container,\r\n IconButton,\r\n TableBody,\r\n TableCell,\r\n TableRow,\r\n Typography,\r\n} from \"@material-ui/core\";\r\nimport { Edit, Visibility, DeleteOutline, Add } from \"@material-ui/icons\";\r\nimport { ConfirmationDialogContext } from \"../../contexts/confirmationDialogContext\";\r\nimport { UserContext } from \"../../contexts/userContext\";\r\nimport useTable from \"../../components/common/useTable\";\r\n\r\nfunction Users() {\r\n const [users, setUsers] = useState([]);\r\n const { authed, isAdmin } = useContext(UserContext);\r\n const [admin, setAdmin] = useState(isAdmin());\r\n const data = useContext(FormContext);\r\n const { changeTab } = useContext(TabContext);\r\n const { openDialog } = useContext(ConfirmationDialogContext);\r\n const location = useLocation();\r\n const navigate = useNavigate();\r\n const [locationState, setLocationState] = useState();\r\n const usersColumn = [\r\n // { id: \"userName\", label: \"UserName\" },\r\n { id: \"email\", label: \"Email\" },\r\n { id: \"actions\", label: \"Actions\", avoidSearch: true },\r\n ];\r\n const {\r\n TableContainer,\r\n TableHeader,\r\n TablePaginationCustom,\r\n recordsAfterPaging,\r\n } = useTable(users, usersColumn, [\"email\"]);\r\n\r\n useEffect(() => {\r\n const Init = async () => {\r\n if (authed.email === \"\") return;\r\n changeTab(tabs.Users);\r\n try {\r\n if (isAdmin()) {\r\n setAdmin(true);\r\n var { data } = await getAllUsers();\r\n } else {\r\n setAdmin(false);\r\n var { data } = await getUsersByCompany(authed.email);\r\n }\r\n setUsers(data);\r\n setLocationState({ OwnerEmail: authed.email });\r\n } catch (ex) {}\r\n };\r\n Init();\r\n }, [authed]);\r\n\r\n const handleEditClick = (row) => {\r\n navigate(`${location.pathname}/${row.id}`, {\r\n state: {\r\n ...row,\r\n },\r\n });\r\n };\r\n\r\n const handleDelete = async (email) => {\r\n let usersInitial = [...users];\r\n try {\r\n if (email === null) return;\r\n let usersTemp = users.filter((c) => c.email !== email);\r\n setUsers([...usersTemp]);\r\n // call the api!!\r\n await deleteUser(email);\r\n } catch (e) {\r\n // delete the store here!!!\r\n setUsers([...usersInitial]);\r\n }\r\n };\r\n\r\n const handleViewClick = (row) => {\r\n navigate(`${location.pathname}/userPoints/${row.id}`, {\r\n state: {\r\n email: row.email,\r\n },\r\n });\r\n };\r\n\r\n const handleAssignUser = () => {\r\n navigate(`../stores/assignUser`, { state: locationState });\r\n };\r\n\r\n\r\n return (\r\n <>\r\n \r\n \r\n
\r\n Χρηστες\r\n \r\n \r\n {!admin ?\r\n }\r\n style={{ marginRight: \"10px\" }}\r\n variant=\"contained\"\r\n size=\"small\"\r\n >\r\n Αναθεση Χρηστη \r\n \r\n :
}\r\n }\r\n variant=\"contained\"\r\n onClick={() => {\r\n navigate(\"/users/add\");\r\n }}\r\n >\r\n Προσθηκη Χρηστη\r\n \r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n {recordsAfterPaging()?.length === 0 ? (\r\n \r\n \r\n No Results\r\n \r\n \r\n ) : (\r\n <>\r\n {recordsAfterPaging().map((item) => (\r\n \r\n {/* {item.userName} */}\r\n {item.email}\r\n \r\n \r\n handleViewClick(item)}\r\n startIcon={}\r\n >\r\n View Points\r\n \r\n {admin && (\r\n \r\n handleEditClick(item)}\r\n color=\"primary\"\r\n >\r\n \r\n \r\n {\r\n openDialog({\r\n title: \"Delete user?\",\r\n body: \"Are you sure you want to delete this user?\",\r\n yesButton: \"Yes\",\r\n noButton: \"No\",\r\n callback: () => handleDelete(item.email),\r\n });\r\n }}\r\n >\r\n \r\n \r\n \r\n )}\r\n \r\n \r\n \r\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 Users;\r\n","import http from \"./httpService\";\r\nimport { apiUrl } from \"../config.json\";\r\n\r\n\r\nconst apiEndpoint = apiUrl + \"/sales/\";\r\n\r\nexport async function getAllSales()\r\n{\r\n let allSales = apiEndpoint + \"getAllSales\";\r\n const { data } = await http.get(allSales);\r\n return data;\r\n}\r\n\r\nexport async function addSale(newSale)\r\n{\r\n const formData = new FormData();\r\n formData.append(\"imageFile\",newSale.imageFile);\r\n formData.append(\"image\",newSale.image)\r\n formData.append(\"title\", newSale.title)\r\n formData.append(\"dateStart\", newSale.dateStart);\r\n formData.append(\"dateEnd\", newSale.dateEnd);\r\n formData.append(\"description\", newSale.description);\r\n formData.append(\"email\", newSale.email);\r\n let addNew = apiEndpoint + \"addSale\";\r\n console.log(\"addNew: \"+addNew);\r\n console.log(\"formData: \"+formData);\r\n const { data } = await http.post(addNew, formData);\r\n return data;\r\n}\r\n\r\nexport async function getSaleById(email,id=null)\r\n{\r\n let getSales = apiEndpoint+`getSales?`;\r\n if (id !== null)\r\n {\r\n getSales += `id=${id}`;\r\n }\r\n else {\r\n getSales+=`email=${email}`\r\n }\r\n const { data } = await http.get(getSales);\r\n return data;\r\n}\r\n\r\nexport async function updateSale(sale)\r\n{\r\n const formData = new FormData();\r\n formData.append(\"imageFile\",sale.imageFile);\r\n formData.append(\"image\",sale.image)\r\n formData.append(\"title\", sale.title)\r\n formData.append(\"dateStart\", sale.dateStart);\r\n formData.append(\"dateEnd\", sale.dateEnd);\r\n formData.append(\"description\", sale.description);\r\n formData.append(\"email\", sale.email);\r\n formData.append(\"id\", sale.id);\r\n let updateCompany = apiEndpoint + `updateSale`;\r\n const { data } = await http.put(updateCompany, formData);\r\n return data;\r\n}\r\n\r\n\r\nexport async function deleteSale(id)\r\n{\r\n let deleteSale = apiEndpoint + `deleteSale?Id=${id}`;\r\n const { data } = await http.delete(deleteSale);\r\n return data;\r\n}","export function dateConfiguration(dateString)\r\n{\r\n if (dateString)\r\n {\r\n \r\n const splitArrayTemp = dateString.split(\"T\");\r\n return splitArrayTemp[0];\r\n }\r\n else {\r\n return \"\";\r\n }\r\n}","import React, { useContext } from \"react\";\r\nimport { TabContext } from \"../../contexts/tabContext\";\r\nimport { tabs } from \"../../config.json\";\r\nimport { Link, useLocation, useNavigate } from \"react-router-dom\";\r\nimport {\r\n getSaleById,\r\n getAllSales,\r\n addSale,\r\n updateSale,\r\n deleteSale,\r\n} from \"../../services/salesService\";\r\nimport { useState } from \"react\";\r\nimport { useEffect } from \"react\";\r\nimport { UserContext } from \"../../contexts/userContext\";\r\nimport {\r\n Box,\r\n Button,\r\n Container,\r\n IconButton,\r\n TableBody,\r\n TableCell,\r\n TableRow,\r\n Typography,\r\n Grid\r\n} from \"@material-ui/core\";\r\nimport { Edit, DeleteOutline, ArrowBack, Add } from \"@material-ui/icons\";\r\nimport { red } from \"@material-ui/core/colors\";\r\nimport { ConfirmationDialogContext } from \"../../contexts/confirmationDialogContext\";\r\nimport useTable from \"../../components/common/useTable\";\r\nimport { dateConfiguration } from \"../../utilities/dataConfiguration\";\r\n\r\nfunction Sales() {\r\n const [sales, setSales] = useState([]);\r\n const { authed, isAdmin, companyOwnerEmail } = useContext(UserContext);\r\n const [admin, setAdmin] = useState(isAdmin());\r\n const { openDialog } = useContext(ConfirmationDialogContext);\r\n const location = useLocation();\r\n const userEmail = isAdmin() ? companyOwnerEmail : authed.email;\r\n const navigate = useNavigate();\r\n const salesColumn = [\r\n { id: \"title\", label: \"Title\" },\r\n { id: \"dateStart\", label: \"Date Start\" },\r\n { id: \"dateEnd\", label: \"Date End\" },\r\n { id: \"actions\", label: \"Action\", avoidSearch: true },\r\n ];\r\n const {\r\n TableContainer,\r\n TableHeader,\r\n TablePaginationCustom,\r\n recordsAfterPaging,\r\n } = useTable(sales, salesColumn, [\"title\", \"dateStart\", \"dateEnd\"]);\r\n useEffect(() => {\r\n const Init = async () => {\r\n const { data } = await getSaleById(userEmail);\r\n setSales(data);\r\n };\r\n Init();\r\n }, [authed, companyOwnerEmail]);\r\n\r\n useEffect(() => {\r\n setAdmin(isAdmin());\r\n }, [authed]);\r\n\r\n const handleAddSale = (e) => {\r\n e.preventDefault();\r\n let addPath = location.pathname + \"/add\";\r\n navigate(addPath);\r\n };\r\n\r\n const handleAdd = async (neew) => {\r\n await addSale(neew);\r\n };\r\n\r\n const handleOnDelete = (params) => {\r\n openDialog({\r\n title: \"Delete sale?\",\r\n body: \"Are you sure you want to delete this sale?\",\r\n yesButton: \"Yes\",\r\n noButton: \"No\",\r\n callback: () => handleDelete(params.row.id),\r\n });\r\n };\r\n\r\n const handleDelete = async (id) => {\r\n let salesInitial = [...sales];\r\n try {\r\n if (id === null) return;\r\n let salesTemp = sales.filter((c) => c.id !== id);\r\n setSales([...salesTemp]);\r\n // call the api!!\r\n await deleteSale(id);\r\n } catch (e) {\r\n // delete the store here!!!\r\n setSales([...salesInitial]);\r\n }\r\n };\r\n\r\n const handleEditClick = (row) => {\r\n navigate(`/sales/${row.id}`, {\r\n state: {\r\n ...row,\r\n },\r\n });\r\n };\r\n\r\n \r\n return (\r\n \r\n \r\n {admin ? (\r\n navigate(-1)}>\r\n \r\n \r\n ) : (\r\n
\r\n )}\r\n\r\n {/* navigate(-1)}>\r\n \r\n */}\r\n Προσφορές\r\n }\r\n variant=\"contained\"\r\n size=\"small\"\r\n >\r\n Προσθηκη Προσφορας\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n {recordsAfterPaging()?.length === 0 ? (\r\n \r\n \r\n No Results\r\n \r\n \r\n ) : (\r\n <>\r\n {recordsAfterPaging().map((item) => (\r\n \r\n {item.title}\r\n {dateConfiguration(item.dateStart)}\r\n {dateConfiguration(item.dateEnd)}\r\n \r\n \r\n handleEditClick(item)}\r\n color=\"primary\"\r\n >\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n ))}\r\n \r\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 Sales;\r\n","import {\r\n Box,\r\n makeStyles,\r\n Menu,\r\n MenuItem,\r\n Select,\r\n Typography,\r\n} from \"@material-ui/core\";\r\nimport _ from \"lodash\";\r\nimport React from \"react\";\r\n\r\nconst useStyles = makeStyles((theme) => ({\r\n formInputField: {\r\n \"& input:not([type=file]),& textarea\": {\r\n border: \"none\",\r\n backgroundColor: \"rgb(234,239,239)\",\r\n padding: \"10px\",\r\n outline: \"none\",\r\n width: \"100%\",\r\n borderRadius: \"5px\",\r\n fontSize: \"15px\",\r\n resize: \"none\",\r\n color: \"rgb(120,130,146)\",\r\n },\r\n \"& img\": {\r\n width: \"80px\",\r\n height: \"80px\",\r\n borderRadius: \"15px\",\r\n },\r\n },\r\n}));\r\n\r\nfunction FormInput({\r\n label,\r\n value,\r\n objKey,\r\n valueChange,\r\n disableInput,\r\n maxPrice,\r\n minPrice,\r\n type,\r\n imageObj,\r\n updateImage,\r\n imageName,\r\n imageFile,\r\n selectList,\r\n selectValueKey,\r\n selectNameKey,\r\n}) {\r\n const inputType = type ?? \"text\";\r\n const classes = useStyles();\r\n const handleOnChange = (e) => {\r\n if (inputType === \"checkbox\") {\r\n valueChange(objKey, e.target.checked);\r\n } else if (inputType === \"select\") {\r\n valueChange(objKey, e.target.value);\r\n } else {\r\n if (maxPrice) {\r\n if (e.currentTarget.value > maxPrice) return;\r\n }\r\n if (minPrice !== null) {\r\n if (e.currentTarget.value < minPrice) {\r\n valueChange(objKey, \"\");\r\n return;\r\n }\r\n }\r\n valueChange(objKey, e.currentTarget.value);\r\n }\r\n };\r\n\r\n const handleImageChange = (e) => {\r\n // check if we selected an image!!!\r\n if (e.target.files && e.target.files[0]) {\r\n let imageFileTemp = e.target.files[0];\r\n const reader = new FileReader();\r\n reader.onload = (x) => {\r\n updateImage(x.target.result, imageFileTemp);\r\n };\r\n reader.readAsDataURL(imageFileTemp);\r\n } else {\r\n updateImage(\"\", null);\r\n }\r\n };\r\n\r\n const renderInput = () => {\r\n switch (inputType) {\r\n case \"checkbox\":\r\n return (\r\n <>\r\n \r\n \r\n );\r\n case \"image\":\r\n return (\r\n <>\r\n \r\n {imageName !== null && imageName !== \"\" && (\r\n \r\n )}\r\n\r\n \r\n \r\n \r\n );\r\n case \"tel\":\r\n return (\r\n \r\n );\r\n case \"textarea\":\r\n return (\r\n \r\n );\r\n case \"select\":\r\n console.log(\"To value poio einai?:\", value);\r\n return (\r\n \r\n None\r\n {selectList?.map((model) => (\r\n \r\n {_.get(model, selectNameKey)}\r\n \r\n ))}\r\n \r\n );\r\n default:\r\n return (\r\n <>\r\n \r\n \r\n );\r\n }\r\n };\r\n\r\n return (\r\n <>\r\n \r\n \r\n {label}\r\n \r\n {/*
\r\n

{label}

\r\n
*/}\r\n
{renderInput()}
\r\n \r\n \r\n );\r\n}\r\n\r\nexport default FormInput;\r\n","export function handleErrors(ex,setErrors)\r\n{\r\n const { response } = ex;\r\n if (response) {\r\n const {\r\n response: {\r\n data: { errorMessage },\r\n },\r\n } = ex;\r\n if (errorMessage) {\r\n if (typeof errorMessage === \"string\") {\r\n setErrors([errorMessage]);\r\n } else {\r\n setErrors(errorMessage);\r\n }\r\n }\r\n }\r\n else {\r\n setErrors([ex]);\r\n }\r\n}","import React from \"react\";\r\nimport { useState } from \"react\";\r\nimport _ from \"lodash\";\r\nimport { formTypes } from \"../../config.json\";\r\nimport { handleErrors } from \"../../utilities/handleErrors\";\r\nimport Snackbar from \"@material-ui/core/Snackbar\";\r\nimport MuiAlert from \"@material-ui/lab/Alert\";\r\nimport { useEffect } from \"react\";\r\nimport { useNavigate } from \"react-router-dom\";\r\nimport { ArrowBack } from \"@material-ui/icons\";\r\nimport { green } from \"@material-ui/core/colors\";\r\nimport {\r\n Box,\r\n Button,\r\n CircularProgress,\r\n Container,\r\n Grid,\r\n IconButton,\r\n makeStyles,\r\n Paper,\r\n} from \"@material-ui/core\";\r\nconst Alert = React.forwardRef(function Alert(props, ref) {\r\n return ;\r\n});\r\n\r\nconst useStyles = makeStyles((theme) => ({\r\n wrapper: {\r\n margin: \"5px\",\r\n position: \"relative\",\r\n },\r\n buttonProgress: {\r\n color: green[500],\r\n position: \"absolute\",\r\n top: \"50%\",\r\n left: \"50%\",\r\n marginTop: -12,\r\n marginLeft: -12,\r\n },\r\n errors: {\r\n margin: \"5px\",\r\n \"& ul\": {\r\n listStyle: \"none\",\r\n },\r\n \"& li\": {\r\n display: \"flex\",\r\n color: \"red\",\r\n },\r\n },\r\n}));\r\n\r\nfunction FormTemplate({\r\n dataForm,\r\n setDataForm,\r\n addMethod,\r\n updateMethod,\r\n formType,\r\n children,\r\n handleDisableInput,\r\n addText,\r\n validations,\r\n customHandleClick,\r\n}) {\r\n const [errors, setErrors] = useState([]);\r\n const [showSnackbar, setShowSnackbar] = useState(false);\r\n const [edit, setEdit] = useState(false);\r\n const [loading, setLoading] = useState(false);\r\n const navigate = useNavigate();\r\n const addTextTitle = addText ? addText : \"Add\";\r\n const checkValidations = validations ? validations : () => [];\r\n const classes = useStyles();\r\n\r\n useEffect(() => {\r\n handleDisableInput(edit);\r\n }, [edit]);\r\n\r\n const handleClick = async () => {\r\n if (loading) return;\r\n if (formType === formTypes.view && !edit) {\r\n // ara einai sto view ara handle to edit click edw pera!!\r\n setEdit(true);\r\n return;\r\n }\r\n try {\r\n setLoading(true);\r\n setErrors([]);\r\n if (formType === formTypes.add) {\r\n // handle the add click\r\n let addErrors = checkValidations();\r\n if (addErrors.length > 0) {\r\n setErrors([...addErrors]);\r\n } else {\r\n console.log({ ...dataForm.details });\r\n await addMethod({ ...dataForm.details });\r\n setShowSnackbar(true);\r\n }\r\n } else {\r\n let updateErrors = checkValidations();\r\n if (updateErrors.length > 0) {\r\n setErrors([...updateErrors]);\r\n } else {\r\n await updateMethod({ ...dataForm.details });\r\n setDataForm({ ...dataForm, initialData: { ...dataForm.details } });\r\n setEdit(false);\r\n setShowSnackbar(true);\r\n }\r\n }\r\n } catch (ex) {\r\n handleErrors(ex, setErrors);\r\n } finally {\r\n setLoading(false);\r\n }\r\n };\r\n\r\n const handleSnackbarClose = (event, reason) => {\r\n if (reason === \"clickaway\") {\r\n return;\r\n }\r\n setShowSnackbar(false);\r\n };\r\n\r\n const handleCancelClick = () => {\r\n setEdit(false);\r\n setDataForm({ ...dataForm, details: { ...dataForm.initialData } });\r\n };\r\n return (\r\n <>\r\n \r\n \r\n navigate(-1)}>\r\n \r\n \r\n \r\n \r\n \r\n {children}\r\n \r\n {edit && (\r\n
\r\n \r\n Cancel\r\n \r\n
\r\n )}\r\n
\r\n \r\n {formType === formTypes.view && (\r\n <>{edit ? \"Update\" : \"Edit\"}\r\n )}\r\n {formType === formTypes.add && addTextTitle}\r\n \r\n {loading && (\r\n \r\n )}\r\n
\r\n \r\n
\r\n
    \r\n {errors.map((error, index) => (\r\n
  • {error}
  • \r\n ))}\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n Changes applied successfully!!\r\n \r\n \r\n \r\n );\r\n}\r\n\r\nexport default FormTemplate;\r\n","import React, { useEffect } from \"react\";\r\nimport { useLocation } from \"react-router-dom\";\r\nimport { useState } from \"react\";\r\nimport { formTypes } from \"../config.json\";\r\nimport _ from \"lodash\";\r\nexport function FormInputHook({ defaultData, formType }) {\r\n const location = useLocation();\r\n const data = location.state;\r\n const [dataForm, setDataForm] = useState({\r\n initialData: { ...defaultData, ...data },\r\n details: { ...defaultData, ...data },\r\n });\r\n const [disableInput, setDisableInput] = useState(true);\r\n useEffect(() => {\r\n if (formType === formTypes.add) setDisableInput(false);\r\n }, []);\r\n // const initialValue = data;\r\n const updateValue = (key, newValue) => {\r\n const prevState = { ...dataForm.details };\r\n _.set(prevState, key, newValue);\r\n setDataForm({ ...dataForm, details: { ...prevState } });\r\n };\r\n\r\n const handleDisableInput = (edit) => {\r\n if (formType == formTypes.view && !edit) setDisableInput(true);\r\n else setDisableInput(false);\r\n };\r\n return {\r\n dataForm,\r\n setDataForm,\r\n disableInput,\r\n setDisableInput,\r\n updateValue,\r\n handleDisableInput,\r\n };\r\n}\r\n","import React from \"react\";\r\nimport FormInput from \"../../components/common/formInput\";\r\nimport { addSale, updateSale } from \"../../services/salesService\";\r\nimport FormTemplate from \"../../components/common/formTemplate\";\r\nimport { FormInputHook } from \"../../utilities/formInputHook\";\r\nimport { formTypes } from \"../../config.json\";\r\nimport { useContext } from \"react\";\r\nimport { UserContext } from \"../../contexts/userContext\";\r\nimport { useEffect } from \"react\";\r\n\r\nfunction SalesForm({ defaultData, formType }) {\r\n const { authed, companyOwnerEmail, isAdmin } = useContext(UserContext);\r\n const {\r\n dataForm,\r\n setDataForm,\r\n disableInput,\r\n updateValue,\r\n handleDisableInput,\r\n } = FormInputHook({ defaultData, formType });\r\n const updateImage = (imageName, imageFile) => {\r\n setDataForm({\r\n ...dataForm,\r\n details: {\r\n ...dataForm.details,\r\n image: imageName,\r\n imageFile,\r\n email: isAdmin() ? companyOwnerEmail : authed.email,\r\n },\r\n });\r\n };\r\n\r\n useEffect(() => {\r\n setDataForm({\r\n ...dataForm,\r\n details: {\r\n ...dataForm.details,\r\n email: isAdmin() ? companyOwnerEmail : authed.email,\r\n },\r\n });\r\n }, [authed]);\r\n\r\n const addSaleValidation = () => {\r\n const errors = [];\r\n const data = { ...dataForm.details };\r\n if (data.title === null || data.title.trim() === \"\") {\r\n errors.push(\"Title is required.\");\r\n }\r\n if (data.description === null || data.description.trim() === \"\") {\r\n errors.push(\"Description is required.\");\r\n }\r\n if (data.dateStart === 0) {\r\n errors.push(\"Date start is required.\");\r\n }\r\n if (data.dateEnd === 0) {\r\n errors.push(\"Date end is required.\");\r\n }\r\n if (data.dateStart !== 0 && data.dataEnd !== 0) {\r\n if (Date.parse(data.dateStart) >= Date.parse(data.dateEnd)) {\r\n errors.push(\"Date start must be less than date end\");\r\n }\r\n }\r\n return errors;\r\n };\r\n const updateSaleValidation = () => {\r\n const errors = [];\r\n const data = { ...dataForm.details };\r\n if (data.title === null || data.title.trim() === \"\") {\r\n errors.push(\"Title is required.\");\r\n }\r\n if (data.description === null || data.description.trim() === \"\") {\r\n errors.push(\"Description is required.\");\r\n }\r\n if (data.dateStart === 0) {\r\n errors.push(\"Date start is required.\");\r\n }\r\n if (data.dateEnd === 0) {\r\n errors.push(\"Date end is required.\");\r\n }\r\n if (data.dateStart !== 0 && data.dataEnd !== 0) {\r\n if (Date.parse(data.dateStart) >= Date.parse(data.dateEnd)) {\r\n errors.push(\"Date start must be less than date end\");\r\n }\r\n }\r\n return errors;\r\n };\r\n const validations = () => {\r\n if (formType === formTypes.add) {\r\n return addSaleValidation();\r\n } else {\r\n return updateSaleValidation();\r\n }\r\n };\r\n\r\n return (\r\n \r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n \r\n );\r\n}\r\n\r\nexport default SalesForm;\r\n","import React, { useState, useContext, useEffect } from \"react\";\r\nimport FormInput from \"../../components/common/formInput\";\r\nimport FormTemplate from \"../../components/common/formTemplate\";\r\nimport { FormInputHook } from \"../../utilities/formInputHook\";\r\nimport { updateAccount } from \"../../services/userAccountService\";\r\nimport { getUser } from \"../../services/userService\";\r\nimport { UserContext } from \"../../contexts/userContext\";\r\nimport { formTypes } from \"../../config.json\";\r\n\r\nfunction Profile() {\r\n const formType = formTypes.view;\r\n const defaultData = {};\r\n const {\r\n dataForm,\r\n setDataForm,\r\n disableInput,\r\n updateValue,\r\n handleDisableInput,\r\n } = FormInputHook({ defaultData, formType });\r\n const { authed } = useContext(UserContext);\r\n useEffect(() => {\r\n const Init = async () => {\r\n // get the user details!!\r\n if (authed.email === \"\") return;\r\n const { data } = await getUser(authed.email);\r\n setDataForm({\r\n ...dataForm,\r\n initialData: { ...data },\r\n details: { ...data },\r\n });\r\n };\r\n Init();\r\n }, [authed]);\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\nexport default Profile;\r\n","import React, { useCallback, useRef, useState } from \"react\";\r\nimport { GoogleMap, useLoadScript, Marker } from \"@react-google-maps/api\";\r\nimport mapStyles from \"../../utilities/mapStyles\";\r\nimport { Box, makeStyles, Typography } from \"@material-ui/core\";\r\nimport config from \"../../config.json\";\r\n\r\nconst mapContainerStyle = {\r\n width: \"100%\",\r\n height: \"100%\",\r\n};\r\n\r\nconst options = {\r\n styles: mapStyles,\r\n disableDefaultUI: true,\r\n zoomControl: true,\r\n};\r\n\r\nconst useStyles = makeStyles((theme) => ({\r\n mapWrapper: {\r\n position: \"relative\",\r\n width: \"100%\",\r\n height: \"100%\",\r\n },\r\n mapHeader: {\r\n position: \"absolute\",\r\n top: \"1%\",\r\n left: \"1%\",\r\n zIndex: \"2\",\r\n },\r\n}));\r\n\r\nexport function GoogleMapContainer({ marker }) {\r\n const center = {\r\n lat: marker.lat,\r\n lng: marker.lng,\r\n };\r\n const { isLoaded, loadError } = useLoadScript({\r\n // googleMapsApiKey: process.env.REACT_APP_GOOGLE_MAPS_API_KEY,\r\n googleMapsApiKey: config.REACT_APP_GOOGLE_MAPS_API_KEY,\r\n libraries: [\"places\"],\r\n });\r\n const classes = useStyles();\r\n const [markers, setMarkers] = useState([]);\r\n // const onMapClick = useCallback((event) => {\r\n // setMarkers([\r\n // ...markers,\r\n // {\r\n // lat: event.latLng.lat(),\r\n // lng: event.latLng.lng(),\r\n // time: new Date(),\r\n // },\r\n // ]);\r\n // }, []);\r\n\r\n const mapRef = useRef();\r\n const onMapLoad = useCallback((map) => {\r\n mapRef.current = map;\r\n }, []);\r\n\r\n if (loadError) return \"Error loading maps\";\r\n if (!isLoaded) return \"Loading Maps\";\r\n return (\r\n <>\r\n
\r\n \r\n \r\n Λειβαδιά Loayalty\r\n \r\n \r\n \r\n \r\n
\r\n \r\n );\r\n}\r\n\r\nexport default GoogleMapContainer;\r\n","export default [\r\n {\r\n \"featureType\": \"water\",\r\n \"elementType\": \"geometry\",\r\n \"stylers\": [\r\n {\r\n \"color\": \"#e9e9e9\"\r\n },\r\n {\r\n \"lightness\": 17\r\n }\r\n ]\r\n },\r\n {\r\n \"featureType\": \"landscape\",\r\n \"elementType\": \"geometry\",\r\n \"stylers\": [\r\n {\r\n \"color\": \"#f5f5f5\"\r\n },\r\n {\r\n \"lightness\": 20\r\n }\r\n ]\r\n },\r\n {\r\n \"featureType\": \"road.highway\",\r\n \"elementType\": \"geometry.fill\",\r\n \"stylers\": [\r\n {\r\n \"color\": \"#ffffff\"\r\n },\r\n {\r\n \"lightness\": 17\r\n }\r\n ]\r\n },\r\n {\r\n \"featureType\": \"road.highway\",\r\n \"elementType\": \"geometry.stroke\",\r\n \"stylers\": [\r\n {\r\n \"color\": \"#ffffff\"\r\n },\r\n {\r\n \"lightness\": 29\r\n },\r\n {\r\n \"weight\": 0.2\r\n }\r\n ]\r\n },\r\n {\r\n \"featureType\": \"road.arterial\",\r\n \"elementType\": \"geometry\",\r\n \"stylers\": [\r\n {\r\n \"color\": \"#ffffff\"\r\n },\r\n {\r\n \"lightness\": 18\r\n }\r\n ]\r\n },\r\n {\r\n \"featureType\": \"road.local\",\r\n \"elementType\": \"geometry\",\r\n \"stylers\": [\r\n {\r\n \"color\": \"#ffffff\"\r\n },\r\n {\r\n \"lightness\": 16\r\n }\r\n ]\r\n },\r\n {\r\n \"featureType\": \"poi\",\r\n \"elementType\": \"geometry\",\r\n \"stylers\": [\r\n {\r\n \"color\": \"#f5f5f5\"\r\n },\r\n {\r\n \"lightness\": 21\r\n }\r\n ]\r\n },\r\n {\r\n \"featureType\": \"poi.park\",\r\n \"elementType\": \"geometry\",\r\n \"stylers\": [\r\n {\r\n \"color\": \"#dedede\"\r\n },\r\n {\r\n \"lightness\": 21\r\n }\r\n ]\r\n },\r\n {\r\n \"elementType\": \"labels.text.stroke\",\r\n \"stylers\": [\r\n {\r\n \"visibility\": \"on\"\r\n },\r\n {\r\n \"color\": \"#ffffff\"\r\n },\r\n {\r\n \"lightness\": 16\r\n }\r\n ]\r\n },\r\n {\r\n \"elementType\": \"labels.text.fill\",\r\n \"stylers\": [\r\n {\r\n \"saturation\": 36\r\n },\r\n {\r\n \"color\": \"#333333\"\r\n },\r\n {\r\n \"lightness\": 40\r\n }\r\n ]\r\n },\r\n {\r\n \"elementType\": \"labels.icon\",\r\n \"stylers\": [\r\n {\r\n \"visibility\": \"off\"\r\n }\r\n ]\r\n },\r\n {\r\n \"featureType\": \"transit\",\r\n \"elementType\": \"geometry\",\r\n \"stylers\": [\r\n {\r\n \"color\": \"#f2f2f2\"\r\n },\r\n {\r\n \"lightness\": 19\r\n }\r\n ]\r\n },\r\n {\r\n \"featureType\": \"administrative\",\r\n \"elementType\": \"geometry.fill\",\r\n \"stylers\": [\r\n {\r\n \"color\": \"#fefefe\"\r\n },\r\n {\r\n \"lightness\": 20\r\n }\r\n ]\r\n },\r\n {\r\n \"featureType\": \"administrative\",\r\n \"elementType\": \"geometry.stroke\",\r\n \"stylers\": [\r\n {\r\n \"color\": \"#fefefe\"\r\n },\r\n {\r\n \"lightness\": 17\r\n },\r\n {\r\n \"weight\": 1.2\r\n }\r\n ]\r\n }\r\n]","import React, { useEffect } from \"react\";\r\nimport FormInput from \"../../components/common/formInput\";\r\nimport { useLocation } from \"react-router-dom\";\r\nimport { useState } from \"react\";\r\nimport { formTypes } from \"../../config.json\";\r\nimport FormTemplate from \"../../components/common/formTemplate\";\r\nimport { addStore, updateStore } from \"../../services/storeService\";\r\nimport _ from \"lodash\";\r\nimport { FormInputHook } from \"../../utilities/formInputHook\";\r\nimport { useContext } from \"react\";\r\nimport { UserContext } from \"../../contexts/userContext\";\r\nimport config from \"../../config.json\";\r\nimport {\r\n Box,\r\n Button,\r\n Dialog,\r\n DialogActions,\r\n DialogContent,\r\n DialogContentText,\r\n DialogTitle,\r\n} from \"@material-ui/core\";\r\nimport Geocode from \"react-geocode\";\r\nimport { Typography } from \"@material-ui/core\";\r\nimport { GoogleMapContainer } from \"../../components/common/GoogleMap\";\r\n\r\nfunction StoresForm({ defaultData, formType }) {\r\n Geocode.setApiKey(process.env.REACT_APP_GOOGLE_MAPS_API_KEY);\r\n Geocode.setApiKey(config.REACT_APP_GOOGLE_MAPS_API_KEY);\r\n const { authed } = useContext(UserContext);\r\n const [open, setOpen] = useState(false);\r\n const location = useLocation();\r\n const [marker, setMarker] = useState({\r\n lat: 0,\r\n long: 0,\r\n });\r\n const {\r\n dataForm,\r\n setDataForm,\r\n disableInput,\r\n updateValue,\r\n handleDisableInput,\r\n } = FormInputHook({\r\n defaultData: { ...defaultData, ...location.state },\r\n formType,\r\n });\r\n\r\n // console.log(location.state);\r\n const [locationError, setLocationError] = useState(\"\");\r\n const validations = () => {\r\n const errors = [];\r\n const data = { ...dataForm.details };\r\n console.log(data);\r\n if (data.address === null || data.address.trim() === \"\") {\r\n errors.push(\"Address is required.\");\r\n }\r\n return errors;\r\n };\r\n\r\n const handleClickOpen = async (s) => {\r\n // edw to geocode na dw an einai legit to address !!!\r\n console.log(\"To address:\", dataForm.details.address);\r\n try {\r\n var response = await Geocode.fromAddress(dataForm.details.address);\r\n // take the lng and lat!!!\r\n const { lat, lng } = response.results[0].geometry.location;\r\n const sendModel = { ...dataForm.details, latitude: lat, longitude: lng };\r\n console.log(response);\r\n await addStore(sendModel);\r\n setDataForm({ ...dataForm, details: { ...sendModel } });\r\n console.log(response);\r\n } catch (ex) {\r\n console.log(ex);\r\n throw \"Address is not valid!\";\r\n }\r\n console.log(\"open\");\r\n //setOpen(true);\r\n };\r\n\r\n const handleUpdate = async () => {\r\n // edw to geocode na dw an einai legit to address !!!\r\n console.log(\"To address sto update:\", dataForm.details.address);\r\n try {\r\n var response = await Geocode.fromAddress(dataForm.details.address);\r\n // take the lng and lat!!!\r\n const { lat, lng } = response.results[0].geometry.location;\r\n const sendModel = { ...dataForm.details, latitude: lat, longitude: lng };\r\n console.log(response);\r\n await updateStore(sendModel);\r\n setDataForm({ ...dataForm, details: { ...sendModel } });\r\n console.log(response);\r\n } catch (ex) {\r\n console.log(ex);\r\n throw \"Address is not valid!\";\r\n }\r\n console.log(\"open\");\r\n };\r\n\r\n const handleClose = (s) => {\r\n setOpen(false);\r\n };\r\n\r\n const handleCheck = async () => {\r\n // check the validation first and then check if the address is valid!!\r\n // if it is valid then open the dialog with the map and pass the marker\r\n const data = { ...dataForm.details };\r\n console.log(\"sto edit:\", data);\r\n setLocationError(\"\");\r\n\r\n if (data.address === null || data.address.trim() === \"\") {\r\n setLocationError(\"Address field is required!\");\r\n return;\r\n }\r\n try {\r\n console.log(\"To details address\", dataForm.details.address);\r\n var response = await Geocode.fromAddress(dataForm.details.address);\r\n const { lat, lng } = response.results[0].geometry.location;\r\n setMarker({ lat, lng });\r\n setOpen(true);\r\n } catch (ex) {\r\n setLocationError(\"Address is not valid\");\r\n }\r\n };\r\n\r\n const handleCustomClick = (r) => {\r\n console.log(dataForm);\r\n //var resposne = await Geocode.fromAddress(dataForm.details.address);\r\n //setOpen(true);\r\n };\r\n\r\n const handleConfirm = () => {\r\n console.log(\"Confirm!!\");\r\n };\r\n\r\n return (\r\n <>\r\n \r\n
\r\n \r\n \r\n For more accurate location please pass the postal code or location\r\n for example:\r\n Filonos 49-43, 321 00 or Filonos 49-43, Leivadia\r\n \r\n \r\n \r\n \r\n Check\r\n \r\n \r\n {locationError}\r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n \r\n {\"Confirm location\"}\r\n \r\n \r\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 StoresForm;\r\n","import React from \"react\";\r\nimport FormInput from \"../../components/common/formInput\";\r\nimport FormTemplate from \"../../components/common/formTemplate\";\r\nimport { FormInputHook } from \"../../utilities/formInputHook\";\r\nimport { assignUserToCompany } from \"../../services/companyService\";\r\n\r\nfunction AssignUserToCompany({ defaultData, formType }) {\r\n const {\r\n dataForm,\r\n setDataForm,\r\n disableInput,\r\n updateValue,\r\n handleDisableInput,\r\n } = FormInputHook({ defaultData, formType });\r\n const validations = () => {\r\n const errors = [];\r\n const data = { ...dataForm.details };\r\n if (data.email === null || data.email.trim() === \"\") {\r\n errors.push(\"User email is required.\");\r\n }\r\n return errors;\r\n };\r\n return (\r\n null}\r\n handleDisableInput={handleDisableInput}\r\n validations={validations}\r\n >\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n );\r\n}\r\n\r\nexport default AssignUserToCompany;\r\n","import http from \"./httpService\";\r\nimport { apiUrl } from \"../config.json\";\r\n\r\n\r\nconst apiEndpoint = apiUrl + \"/categories/\";\r\n\r\nexport async function getCategories()\r\n{\r\n let categories = apiEndpoint + \"getCategories\";\r\n const { data } = await http.get(categories);\r\n return data;\r\n}\r\n\r\nexport async function getCategoryById(id)\r\n{\r\n let category = apiEndpoint + `getCategory?Id=${id}`;\r\n const { data } = await http.get(category);\r\n return data;\r\n}\r\n\r\nexport async function updateCategory(category)\r\n{\r\n let updateCategory = apiEndpoint + \"updateCategory\";\r\n const { data } = await http.put(updateCategory, category);\r\n return data;\r\n}\r\n\r\nexport async function addCategory(category)\r\n{\r\n let addCategory = apiEndpoint + \"addCategory\";\r\n const { data } = await http.post(addCategory,category);\r\n}\r\n\r\nexport async function deleteCategory(id)\r\n{\r\n let deleteCategory = apiEndpoint + `deleteCategory?id=${id}`;\r\n const { data } = await http.delete(deleteCategory);\r\n return data;\r\n}","import { DetailsOutlined, Forward } from \"@material-ui/icons\";\r\nimport React, { useEffect } from \"react\";\r\nimport FormInput from \"../../components/common/formInput\";\r\nimport FormTemplate from \"../../components/common/formTemplate\";\r\nimport { FormInputHook } from \"../../utilities/formInputHook\";\r\nimport { addCompany, updateCompany } from \"../../services/companyService\";\r\nimport { getCategories } from \"../../services/categoriesService\";\r\nimport {\r\n Box,\r\n Divider,\r\n Grid,\r\n Paper,\r\n TextField,\r\n Typography,\r\n} from \"@material-ui/core\";\r\nimport { useState } from \"react\";\r\n\r\nexport function CompanyForm({ defaultData, formType }) {\r\n // const handleUpdate =\r\n const {\r\n dataForm,\r\n setDataForm,\r\n disableInput,\r\n updateValue,\r\n handleDisableInput,\r\n } = FormInputHook({ defaultData, formType });\r\n const updateImage = (imageName, imageFile) => {\r\n setDataForm({\r\n ...dataForm,\r\n details: { ...dataForm.details, logo: imageName, logoFile: imageFile },\r\n });\r\n };\r\n\r\n const [redeemPoints, setRedeemPoints] = useState(1);\r\n const [categories, setCategories] = useState([]);\r\n const [redeemEuroResult, setRedeemEuroResult] = useState(\r\n dataForm.details[\"pointsToEuro\"] * redeemPoints\r\n );\r\n\r\n const [exchangeEuro, setExchangeEuro] = useState(1);\r\n const [earnPoints, setEarnPoints] = useState(\r\n dataForm.details[\"euroToPoints\"] * exchangeEuro\r\n );\r\n\r\n useEffect(() => {\r\n const Init = async () => {\r\n const { data } = await getCategories();\r\n setCategories(data);\r\n };\r\n Init();\r\n }, []);\r\n\r\n useEffect(() => {\r\n setRedeemEuroResult(redeemPoints / dataForm.details[\"pointsToEuro\"]);\r\n }, [redeemPoints]);\r\n\r\n useEffect(() => {\r\n setEarnPoints(dataForm.details[\"euroToPoints\"] * exchangeEuro);\r\n }, [exchangeEuro]);\r\n\r\n const validations = () => {\r\n const errors = [];\r\n const data = { ...dataForm.details };\r\n if (data.name === null || data.name.trim() === \"\") {\r\n errors.push(\"Company name is required\");\r\n }\r\n if (data.euroToPoints === null || data.euroToPoints <= 0) {\r\n errors.push(\"Euro to points ratio must be positive and greater than 0.\");\r\n }\r\n if (data.pointsToEuro === null || data.pointsToEuro <= 0) {\r\n errors.push(\"Points to euro ratio must be positive and greater than 0.\");\r\n }\r\n return errors;\r\n };\r\n\r\n return (\r\n \r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Loyalty points\r\n \r\n \r\n \r\n or you can test it below\r\n \r\n \r\n setRedeemPoints(e.target.value)}\r\n type=\"number\"\r\n variant=\"outlined\"\r\n />\r\n \r\n \r\n \r\n \r\n \r\n \r\n setExchangeEuro(e.target.value)}\r\n type=\"number\"\r\n variant=\"outlined\"\r\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 CompanyForm;\r\n","import React, { useEffect, useContext, useState } from \"react\";\r\nimport { UserContext } from \"../../contexts/userContext\";\r\nimport {\r\n getCompanyByUserEmail,\r\n addCompany,\r\n updateCompany,\r\n} from \"../../services/companyService\";\r\nimport { formTypes } from \"../../config.json\";\r\nimport FormTemplate from \"../../components/common/formTemplate\";\r\nimport { FormInputHook } from \"../../utilities/formInputHook\";\r\nimport FormInput from \"../../components/common/formInput\";\r\nimport { getCategories } from \"../../services/categoriesService\";\r\n\r\nfunction MyComapny({}) {\r\n const { authed } = useContext(UserContext);\r\n const formType = formTypes.view;\r\n const [data, setData] = useState({});\r\n const [categories, setCategories] = useState([]);\r\n const {\r\n dataForm,\r\n setDataForm,\r\n disableInput,\r\n updateValue,\r\n handleDisableInput,\r\n } = FormInputHook({ defaultData: data, formType });\r\n useEffect(() => {\r\n const Init = async () => {\r\n if (authed.email === \"\") return;\r\n const { data } = await getCategories();\r\n setCategories(data);\r\n const dataResponse = await getCompanyByUserEmail(authed.email);\r\n console.log(\"To mycompany:\", dataResponse);\r\n dataResponse.ownerEmail = dataResponse.owner.email;\r\n dataResponse.pointsToEuro = dataResponse.pointsToEuroRatio;\r\n dataResponse.euroToPoints = dataResponse.euroToPointsRatio;\r\n setDataForm({\r\n ...dataForm,\r\n initialData: { ...dataResponse },\r\n details: { ...dataResponse },\r\n });\r\n };\r\n Init();\r\n }, [authed]);\r\n\r\n const updateImage = (imageName, imageFile) => {\r\n setDataForm({\r\n ...dataForm,\r\n details: { ...dataForm.details, logo: imageName, logoFile: imageFile },\r\n });\r\n };\r\n return (\r\n <>\r\n \r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n

Πόντοι Loyalty ανά Ευρώ

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

\r\n Για κάθε {dataForm.details[\"pointsToEuro\"]} πόντους εξαργυρώνεται\r\n 1 €\r\n

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

\r\n Για κάθε 1 € ανατίθενται {dataForm.details[\"euroToPoints\"]} πόντοι\r\n

\r\n
\r\n
\r\n
\r\n \r\n \r\n );\r\n}\r\n\r\nexport default MyComapny;\r\n","import React, { useContext, useState } from \"react\";\r\nimport { useEffect } from \"react\";\r\nimport FormInput from \"../../components/common/formInput\";\r\nimport { formTypes } from \"../../config.json\";\r\nimport { checkUserRole } from \"../../services/userAccountService\";\r\nimport { FormInputHook } from \"../../utilities/formInputHook\";\r\nimport FormTemplate from \"../../components/common/formTemplate\";\r\nimport { register, updateAccount } from \"../../services/userAccountService\";\r\nimport { UserContext } from \"../../contexts/userContext\";\r\n\r\nfunction UserForm({ defaultData, formType }) {\r\n const {\r\n dataForm,\r\n setDataForm,\r\n disableInput,\r\n updateValue,\r\n handleDisableInput,\r\n } = FormInputHook({ defaultData, formType });\r\n const { authed, isAdmin } = useContext(UserContext);\r\n useEffect(() => {\r\n const init = async () => {\r\n if (formType === formTypes.view) {\r\n // get user role!!! check if his roles!!\r\n let result = await checkUserRole(dataForm.details[\"email\"]);\r\n setDataForm({\r\n initialData: { ...dataForm.initialData, owner: result },\r\n details: { ...dataForm.details, owner: result },\r\n });\r\n } else {\r\n // to formtype einai view!!! ara dwse to email tou company owner!!\r\n // alliws ama einai admin tote dwse to emfanise to checkbox ean 8elei o\r\n // xrhsths na valei enan companyowner user!!!\r\n if (isAdmin()) {\r\n // kane aplo register!!!\r\n } else {\r\n // einai company owner!!! passare to company owner email!!!\r\n setDataForm({\r\n initialData: {\r\n ...dataForm.initialData,\r\n companyOwnerEmail: authed.email,\r\n },\r\n details: {\r\n ...dataForm.details,\r\n companyOwnerEmail: authed.email,\r\n },\r\n });\r\n }\r\n }\r\n };\r\n init();\r\n }, []);\r\n\r\n const addUserValidation = () => {\r\n const errors = [];\r\n const data = { ...dataForm.details };\r\n if (data.userName === null || data.userName.trim() === \"\") {\r\n errors.push(\"Username is required.\");\r\n }\r\n if (data.email === null || data.email.trim() === \"\") {\r\n errors.push(\"Email is required.\");\r\n }\r\n return errors;\r\n };\r\n const updateUserValidation = () => {\r\n const errors = [];\r\n const data = { ...dataForm.details };\r\n if (data.userName === null || data.userName.trim() === \"\") {\r\n errors.push(\"Username is required.\");\r\n }\r\n if (data.email === null || data.email.trim() === \"\") {\r\n errors.push(\"Email is required.\");\r\n }\r\n return errors;\r\n };\r\n const validations = () => {\r\n if (formType === formTypes.add) {\r\n return addUserValidation();\r\n } else {\r\n return updateUserValidation();\r\n }\r\n };\r\n\r\n return (\r\n \r\n
\r\n
\r\n \r\n \r\n {isAdmin() && (\r\n \r\n )}\r\n
\r\n
\r\n \r\n );\r\n}\r\n\r\nexport default UserForm;\r\n","import http from \"./httpService\";\r\nimport { apiUrl } from \"../config.json\";\r\n\r\nconst apiEndpoint = apiUrl + \"/points/\";\r\n\r\nexport async function updatePoints(user)\r\n{\r\n let updatePoints = apiEndpoint + `setPoints`;\r\n const { data } = await http.put(updatePoints, user);\r\n return data;\r\n}\r\n\r\nexport async function getUserPointsPerCompany(email,ownerEmail)\r\n{\r\n let userPoints = apiEndpoint + `getUserPointsPerCompany?email=${email}&ownerEmail=${ownerEmail}`;\r\n const { data } = await http.get(userPoints);\r\n return data;\r\n}\r\n\r\nexport async function getUserPointsAllCompanies(email)\r\n{\r\n let userPoints = apiEndpoint + `getUserPointsAllCompanies?email=${email}`;\r\n const { data } = await http.get(userPoints);\r\n return data;\r\n}\r\n\r\nexport async function assignUserToCompany()\r\n{\r\n \r\n}\r\n\r\nexport async function addPoints(model)\r\n{\r\n\r\n let points = model.euro * model.euroToPointsRatio;\r\n let addPoints = apiEndpoint + \"addPoints\";\r\n model.points = points;\r\n const { data } = await http.post(addPoints, model);\r\n return data;\r\n}\r\n\r\n\r\nexport async function redeemPoints(model)\r\n{\r\n let redeemPoints = apiEndpoint + \"addPoints\";\r\n model.points = model.redeem*-1;\r\n const { data } = await http.post(redeemPoints, model);\r\n console.log();\r\n return data;\r\n}","import React, { useEffect, useState } from \"react\";\r\nimport { useLocation, useNavigate } from \"react-router-dom\";\r\nimport {\r\n getUserPointsAllCompanies,\r\n getUserPointsPerCompany,\r\n} from \"../../services/pointsService\";\r\nimport {\r\n Box,\r\n Button,\r\n Container,\r\n IconButton,\r\n TableBody,\r\n TableCell,\r\n TableRow,\r\n Typography,\r\n} from \"@material-ui/core\";\r\nimport { Add, AttachMoney, ArrowBack } from \"@material-ui/icons\";\r\nimport useTable from \"../../components/common/useTable\";\r\nimport { useContext } from \"react\";\r\nimport { UserContext } from \"../../contexts/userContext\";\r\n\r\nfunction UserPoints() {\r\n const [userPoints, setUserPoints] = useState([]);\r\n const { authed, isAdmin } = useContext(UserContext);\r\n const location = useLocation();\r\n const navigate = useNavigate();\r\n const userPointsColumns = [\r\n { id: \"name\", label: \"Company Name\" },\r\n { id: \"total\", label: \"Points\" },\r\n { id: \"actions\", label: \"Actions\" },\r\n ];\r\n const {\r\n TableContainer,\r\n TableHeader,\r\n TablePaginationCustom,\r\n recordsAfterPaging,\r\n } = useTable(userPoints, userPointsColumns, [\"company.name\", \"total\"]);\r\n useEffect(async () => {\r\n // call the api to get the user's points!!\r\n try {\r\n if (isAdmin())\r\n var { data } = await getUserPointsAllCompanies(location.state.email);\r\n else\r\n var { data } = await getUserPointsPerCompany(\r\n location.state.email,\r\n authed.email\r\n );\r\n setUserPoints(data);\r\n } catch (ex) {}\r\n }, []);\r\n\r\n const handleViewCompany = (row) => {\r\n navigate(`${location.pathname}/${row.company.name}`, {\r\n state: {\r\n ...row,\r\n },\r\n });\r\n };\r\n\r\n const handleAddRemovePoints = (row) => {\r\n navigate(`${location.pathname}/setPoints`, {\r\n state: {\r\n companyId: row.company.id,\r\n userId: row.applicationUserId,\r\n euroToPointsRatio: row.company.euroToPointsRatio,\r\n },\r\n });\r\n };\r\n\r\n const handleRedeemPoints = (row) => {\r\n navigate(`${location.pathname}/redeemPoints`, {\r\n state: {\r\n companyId: row.company.id,\r\n userId: row.applicationUserId,\r\n pointsToEuroRatio: row.company.pointsToEuroRatio,\r\n points: row.total,\r\n },\r\n });\r\n };\r\n\r\n return (\r\n <>\r\n \r\n \r\n navigate(-1)}>\r\n \r\n \r\n
\r\n Πόντοι Χρήστη\r\n ({location.state.email})\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n {recordsAfterPaging()?.length === 0 ? (\r\n \r\n \r\n No Results\r\n \r\n \r\n ) : (\r\n <>\r\n {recordsAfterPaging().map((item) => (\r\n \r\n {item.company.name}\r\n {item.total}\r\n \r\n \r\n handleAddRemovePoints(item)}\r\n startIcon={}\r\n >\r\n Προσθηκη Ποντων\r\n \r\n\r\n \r\n handleRedeemPoints(item)}\r\n color=\"primary\"\r\n startIcon={}\r\n >\r\n Εξαργυρωση\r\n \r\n \r\n \r\n \r\n \r\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 UserPoints;\r\n","import React from \"react\";\r\nimport FormInput from \"../../components/common/formInput\";\r\nimport { FormInputHook } from \"../../utilities/formInputHook\";\r\nimport {\r\n addPoints,\r\n updatePoints,\r\n redeemPoints,\r\n} from \"../../services/pointsService\";\r\nimport FormTemplate from \"../../components/common/formTemplate\";\r\n\r\nfunction PointsForm({ defaultData, formType, redeem }) {\r\n const {\r\n dataForm,\r\n setDataForm,\r\n disableInput,\r\n updateValue,\r\n handleDisableInput,\r\n } = FormInputHook({ defaultData, formType });\r\n const redeemForm = redeem ?? false;\r\n const title = redeemForm ? \"Εξαργυρωση\" : \"Προσθηκη\";\r\n const pointsAddMethod = async (data) => {\r\n if (redeemForm) {\r\n await redeemPoints(data);\r\n } else {\r\n await addPoints(data);\r\n }\r\n };\r\n\r\n const addPointsValidation = () => {\r\n const data = { ...dataForm.details };\r\n const errors = [];\r\n if (data.euro <= 0) {\r\n errors.push(\"Please input a valid number of euro\");\r\n }\r\n return errors;\r\n };\r\n\r\n const redeemPointsValidation = () => {\r\n const data = { ...dataForm.details };\r\n const errors = [];\r\n if (data.redeem <= 0) {\r\n errors.push(\"Please input a valid number of points.\");\r\n }\r\n if (data.redeem > data.points) {\r\n errors.push(\"Not enought points\");\r\n }\r\n return errors;\r\n };\r\n\r\n const validations = () => {\r\n if (redeemForm) {\r\n return redeemPointsValidation();\r\n } else {\r\n return addPointsValidation();\r\n }\r\n };\r\n\r\n const pointsBodyRender = () => {\r\n if (redeemForm) {\r\n return (\r\n <>\r\n

Ο χρήστης {dataForm.details[\"username\"]} έχει {dataForm.details[\"points\"]} Loyalty πόντους

\r\n

\r\n Για κάθε {dataForm.details[\"pointsToEuroRatio\"]} πόντοι αντιστοιχεί 1 €\r\n

\r\n \r\n

\r\n Σε ευρώ:\r\n {dataForm.details[\"redeem\"] / dataForm.details[\"pointsToEuroRatio\"] } €\r\n

\r\n \r\n );\r\n } else {\r\n return (\r\n <>\r\n

\r\n Για κάθε 1 € αντιστοιχεί {dataForm.details[\"euroToPointsRatio\"]} Loyalty πόντοι\r\n

\r\n \r\n

\r\n Σε πόντους:\r\n {dataForm.details[\"euroToPointsRatio\"] * dataForm.details[\"euro\"]}\r\n

\r\n \r\n );\r\n }\r\n };\r\n\r\n return (\r\n
\r\n
\r\n <>\r\n \r\n {pointsBodyRender()}\r\n \r\n \r\n
\r\n
\r\n );\r\n}\r\n\r\nexport default PointsForm;\r\n","import { Box, makeStyles } from \"@material-ui/core\";\r\n//import \"./LoginCustomInput.css\";\r\n\r\nconst useStyles = makeStyles((theme) => ({\r\n inputWrapper: {\r\n marginBottom: \"5px\",\r\n backgroundColor: \"lightgray\",\r\n borderRadius: \"5px\",\r\n padding: \"2px\",\r\n \"& input\": {\r\n border: \"0\",\r\n padding: \"10px\",\r\n fontSize: \"20px\",\r\n width: \"100%\",\r\n outline: \"none !important\",\r\n },\r\n },\r\n inputWrapperIcon: {\r\n padding: \"8px\",\r\n },\r\n}));\r\n\r\nexport default function LoginCustomInput({\r\n Icon,\r\n value,\r\n handleOnChange,\r\n type,\r\n placeHolder,\r\n}) {\r\n const classes = useStyles();\r\n const inputType = type != null ? type : \"text\";\r\n return (\r\n <>\r\n \r\n
{Icon}
\r\n handleOnChange(newValue)}\r\n />\r\n
\r\n \r\n );\r\n}\r\n","import { Person, Lock, Facebook } from \"@material-ui/icons\";\r\nimport LoginCustomInput from \"./LoginCustomInput\";\r\nimport { useContext, useState, useEffect } from \"react\";\r\nimport { useNavigate } from \"react-router-dom\";\r\nimport { handleErrors } from \"../../utilities/handleErrors\";\r\nimport { UserContext } from \"../../contexts/userContext\";\r\nimport { useLocation } from \"react-router-dom\";\r\nimport {\r\n Box,\r\n Button,\r\n makeStyles,\r\n Paper,\r\n Typography,\r\n TextField,\r\n} from \"@material-ui/core\";\r\nimport { applicationColors, apiUrl } from \"../../config.json\";\r\nimport { authenticateUser } from \"../../services/userService\";\r\nimport Modal from \"@material-ui/core/Modal\";\r\nimport { requestResetPassword } from \"../../services/userAccountService\";\r\n\r\nconst useStyles = makeStyles((theme) => ({\r\n boxWrapper: {\r\n height: \"100vh\",\r\n backgroundColor: \"black\",\r\n opacity: \"0.7\",\r\n justifyContent: \"center\",\r\n alignItems: \"center\",\r\n },\r\n loginPageWrapper: {\r\n width: \"700px\",\r\n borderRadius: \"15px\",\r\n position: \"relative\",\r\n [theme.breakpoints.down(\"sm\")]: {\r\n width: \"550px\",\r\n },\r\n },\r\n personIcon: {\r\n position: \"absolute\",\r\n right: \"50%\",\r\n bottom: \"0\",\r\n width: \"100px\",\r\n borderRadius: \"50%\",\r\n height: \"100px\",\r\n backgroundColor: applicationColors.greenBg,\r\n top: \"-50px\",\r\n color: \"white\",\r\n padding: \"10px\",\r\n transform: \"translateX(50px)\",\r\n marginLeft: \"50px\",\r\n },\r\n loginFormWrapper: {\r\n paddingLeft: \"60px\",\r\n paddingTop: \"80px\",\r\n paddingRight: \"60px\",\r\n paddingBottom: \"50px\",\r\n [theme.breakpoints.down(\"sm\")]: {\r\n padding: \"20px\",\r\n paddingTop: \"50px\",\r\n },\r\n },\r\n loginInput: {},\r\n signInButton: {\r\n margin: \"10px\",\r\n backgroundColor: applicationColors.greenBg,\r\n \"&:hover\": {\r\n backgroundColor: applicationColors.greenBgHover,\r\n },\r\n padding: \"10px 100px\",\r\n },\r\n signInGoogle: {\r\n backgroundColor: \"white\",\r\n color: \"black\",\r\n },\r\n\r\n errorsList: {\r\n \"& li\": {\r\n color: \"red\",\r\n marginTop: \"10px\",\r\n listStylePosition: \"inside\",\r\n wordWrap: \"break-word\",\r\n },\r\n },\r\n}));\r\n\r\nconst style = {\r\n position: \"absolute\",\r\n top: \"50%\",\r\n left: \"50%\",\r\n transform: \"translate(-50%, -50%)\",\r\n width: 400,\r\n bgcolor: \"background.paper\",\r\n border: \"2px solid #000\",\r\n boxShadow: 24,\r\n p: 4,\r\n};\r\n\r\nexport default function LoginPage() {\r\n const [errors, setErrors] = useState([]);\r\n const [email, setEmail] = useState(\"\");\r\n const [password, setPassword] = useState(\"\");\r\n const person = ;\r\n const passwordIcon = ;\r\n const location = useLocation();\r\n const { userLogin } = useContext(UserContext);\r\n const classes = useStyles();\r\n let navigate = useNavigate();\r\n const [openModal, setOpenModal] = useState(false);\r\n const handleOpen = () => setOpenModal(true);\r\n const handleClose = () => setOpenModal(false);\r\n const [forgotPassRespond, setForgotPassRespond] = useState(\"\");\r\n const [forgotEmail, setForgotEmail] = useState(\"\");\r\n\r\n const handleLoginClick = async () => {\r\n try {\r\n setErrors([]);\r\n await userLogin({ email, password });\r\n navigate(\"/\");\r\n } catch (ex) {\r\n handleErrors(ex, setErrors);\r\n }\r\n };\r\n\r\n const handleResetPassword = () => {\r\n handleOpen();\r\n };\r\n\r\n const handleResetPasswordButton = async () => {\r\n const result = await requestResetPassword(forgotEmail);\r\n setForgotPassRespond(\"A reset email was send. Check your emails \");\r\n };\r\n\r\n useEffect(() => {\r\n const Init = async () => {\r\n try {\r\n const result = await authenticateUser();\r\n if (result.roles.length === 0) return;\r\n navigate(\"/\");\r\n } catch (ex) {}\r\n if (location.state === null) return;\r\n setErrors([location.state.error.ex]);\r\n };\r\n Init();\r\n }, []);\r\n\r\n const handleEmailChange = (newValue) => {\r\n setEmail(newValue.target.value);\r\n };\r\n const handlePasswordChange = (newValue) => {\r\n setPassword(newValue.target.value);\r\n };\r\n\r\n return (\r\n <>\r\n \r\n \r\n \r\n \r\n {\r\n e.preventDefault();\r\n handleLoginClick();\r\n }}\r\n >\r\n \r\n \r\n \r\n \r\n \r\n
    \r\n {errors.map((error) => (\r\n
  • {error}
  • \r\n ))}\r\n
\r\n
\r\n \r\n \r\n Sign in\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n Sign in with Google\r\n \r\n \r\n \r\n \r\n {/* \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n Sign in with Facebook\r\n \r\n \r\n \r\n \r\n \r\n */}\r\n \r\n \r\n Reset Password\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n RESET PASSWORD\r\n \r\n setForgotEmail(e.currentTarget.value)}\r\n value={forgotEmail}\r\n />\r\n \r\n Reset Password\r\n \r\n \r\n {forgotPassRespond}\r\n \r\n \r\n \r\n \r\n );\r\n}\r\n","import React, { createContext, useState } from \"react\";\r\n\r\nexport const TabBarSectionContext = createContext();\r\nexport function TabbarSectionContextProvider(props) {\r\n const [display, setDisplay] = useState(true);\r\n return (\r\n \r\n {props.children}\r\n \r\n );\r\n}\r\n","import React, { useContext } from \"react\";\r\nimport { ArrowForwardIos } from \"@material-ui/icons\";\r\nimport { TabContext } from \"../../contexts/tabContext\";\r\nimport { tabs } from \"../../config.json\";\r\nimport { Link } from \"react-router-dom\";\r\nimport clsx from \"clsx\";\r\nimport { makeStyles } from \"@material-ui/core\";\r\n\r\nconst useStyles = makeStyles((theme) => ({\r\n menuTileWrapper: {\r\n padding: \"20px\",\r\n display: \"flex\",\r\n alignItems: \"center\",\r\n justifyContent: \"space-between\",\r\n cursor: \"pointer\",\r\n color: \"rgb(120, 130, 146)\",\r\n textDecoration: \"none\",\r\n \"&:hover\": {\r\n backgroundColor: \"rgb(48,57,75)\",\r\n borderLeft: \"3px solid rgb(45,197,139)\",\r\n color: \"white\",\r\n },\r\n },\r\n menuTileIconTitle: {\r\n display: \"flex\",\r\n alignItems: \"center\",\r\n },\r\n menuTileIcon: {\r\n marginRight: \"10px\",\r\n },\r\n active: {\r\n color: \"white\",\r\n backgroundColor: \"rgb(48,57,75)\",\r\n borderLeft: \"3px solid rgb(45,197,139)\",\r\n },\r\n activeMobile: {\r\n color: \"white\",\r\n borderLeft: \"3px solid rgb(45,197,139)\",\r\n },\r\n menuTileWrapperMobile: {\r\n display: \"flex\",\r\n alignItems: \"center\",\r\n color: \"rgb(120,130,146)\",\r\n textDecoration: \"none\",\r\n },\r\n}));\r\n\r\nexport default function MenuTile({ item, mobile }) {\r\n const classes = useStyles();\r\n // const { tab, changeTab } = useContext(TabContextProvider);\r\n const { tab, changeTab } = useContext(TabContext);\r\n let newTab;\r\n switch (item.tab) {\r\n case tabs.Dashboard:\r\n newTab = \"/\";\r\n break;\r\n case tabs.Stores:\r\n newTab = \"/stores\";\r\n break;\r\n case tabs.Analytics:\r\n newTab = \"/analytics\";\r\n break;\r\n case tabs[\"Product Sales\"]:\r\n newTab = \"/productSales\";\r\n break;\r\n case tabs.Users:\r\n newTab = \"/users\";\r\n break;\r\n case tabs.Reports:\r\n newTab = \"/reports\";\r\n break;\r\n case tabs.Sales:\r\n newTab = \"/sales\";\r\n break;\r\n case tabs.Companies:\r\n newTab = \"/companies\";\r\n break;\r\n case tabs.Categories:\r\n newTab = \"/categories\";\r\n break;\r\n default:\r\n newTab = \"/\";\r\n break;\r\n }\r\n\r\n let styles = clsx({\r\n [classes.menuTileWrapper]: !mobile,\r\n [classes.active]: item.tab === tab && !mobile,\r\n });\r\n\r\n return (\r\n changeTab(item.tab)}>\r\n
\r\n {/* */}\r\n {!mobile && item.icon}\r\n
{item.title}
\r\n
\r\n {!mobile && }\r\n \r\n );\r\n}\r\n","import React from \"react\";\r\nimport { useContext } from \"react\";\r\nimport { useEffect } from \"react\";\r\nimport { UserContext } from \"../../contexts/userContext\";\r\nimport MenuTile from \"./MenuTile\";\r\n\r\nexport default function MenuComponent({ items }) {\r\n const { isAdmin, authed } = useContext(UserContext);\r\n return (\r\n
\r\n {items.map((item) => (\r\n \r\n ))}\r\n
\r\n );\r\n}\r\n","import { Facebook } from \"@material-ui/icons\";\r\nimport React from \"react\";\r\nimport MenuComponent from \"./MenuComponent\";\r\nimport { makeStyles, Typography } from \"@material-ui/core\";\r\n\r\nconst useStyles = makeStyles((theme) => ({\r\n sidebar: {\r\n height: \"100vh\",\r\n backgroundColor: \"rgb(57,67,87)\",\r\n color: \"rgb(120,130,146)\",\r\n },\r\n sidebarTitle: {\r\n color: \"white\",\r\n padding: \"20px\",\r\n },\r\n divider: {\r\n border: \"1px solid rgb(120,130,146)\",\r\n },\r\n sidebarTitleWrapper: {\r\n display: \"flex\",\r\n alignItems: \"center\",\r\n marginLeft: \"0px\",\r\n height: \"60px\",\r\n },\r\n sidebarLogo: {\r\n color: \"rgb(45,197,139)\",\r\n },\r\n logo: {\r\n height: \"60px\",\r\n width: \"60px\",\r\n },\r\n}));\r\nexport default function Sidebar({ menu }) {\r\n const classes = useStyles();\r\n return (\r\n
\r\n
\r\n {/* */}\r\n \r\n \r\n Loyalty Admin\r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n );\r\n}\r\n","import { useNavigate } from \"react-router-dom\";\r\nimport { useContext, useEffect } from \"react\";\r\nimport { UserContext } from \"../../contexts/userContext\";\r\nimport { useState } from \"react\";\r\nimport {\r\n Box,\r\n List,\r\n ListItem,\r\n ListItemIcon,\r\n ListItemText,\r\n makeStyles,\r\n} from \"@material-ui/core\";\r\nimport clsx from \"clsx\";\r\nimport { AccountBox, Business, PowerSettingsNew } from \"@material-ui/icons\";\r\nimport { logOut } from \"../../services/userService\";\r\n\r\nconst useStyles = makeStyles((theme) => ({\r\n topbarSectionWrapper: {\r\n position: \"fixed\",\r\n height: \"auto\",\r\n padding: \"0px\",\r\n width: \"200px\",\r\n top: \"60px\",\r\n backgroundColor: \"white\",\r\n borderRadius: \"0px 0px 5px 5px\",\r\n right: \"20px\",\r\n zIndex: \"999\",\r\n },\r\n hideTopbarSection: {\r\n display: \"none\",\r\n },\r\n}));\r\n\r\nexport default function TopbarSection({ hide, handleClick }) {\r\n const { authed, isAdmin } = useContext(UserContext);\r\n const [hideCompany, setHideCompany] = useState(false);\r\n const navigate = useNavigate();\r\n const classes = useStyles();\r\n useEffect(() => {\r\n if (authed.email === \"\") return;\r\n if (isAdmin()) {\r\n setHideCompany(true);\r\n } else {\r\n setHideCompany(false);\r\n }\r\n }, [authed]);\r\n const styles = clsx({\r\n [classes.topbarSectionWrapper]: true,\r\n [classes.hideTopbarSection]: hide,\r\n });\r\n const handleLogout = async () => {\r\n // clear local storage and then redirect to login page!!\r\n const result = await logOut();\r\n navigate(\"/login\");\r\n };\r\n return (\r\n <>\r\n \r\n \r\n navigate(\"/profile\")}>\r\n \r\n \r\n \r\n \r\n \r\n {!hideCompany && (\r\n navigate(\"/mycompany\")}>\r\n \r\n \r\n \r\n \r\n \r\n )}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n}\r\n","import { Notifications, Settings, Menu } from \"@material-ui/icons\";\r\n\r\nimport TopbarSection from \"./TopbarSection\";\r\nimport { useAuth, UserContext } from \"../../contexts/userContext\";\r\nimport { useContext } from \"react\";\r\nimport { Avatar, Box, Grid, makeStyles, Typography } from \"@material-ui/core\";\r\n\r\nconst useStyles = makeStyles((theme) => ({\r\n tobar: {\r\n backgroundColor: \"white\",\r\n height: \"60px\",\r\n padding: \"10px\",\r\n },\r\n hamburgerMenu: {\r\n fontDisplay: \"flex\",\r\n alignSelf: \"center\",\r\n paddingLeft: \"20px\",\r\n transition: \"all 0.2ms ease-out\",\r\n \"&:hover\": {\r\n transform: \"scale(1.1)\",\r\n cursor: \"pointer\",\r\n },\r\n },\r\n marginRightAndLeft: {\r\n marginRight: \"10px\",\r\n marginLeft: \"10px\",\r\n },\r\n}));\r\n\r\nexport default function Topbar({ showMenu, toggle, setToggle }) {\r\n const classes = useStyles();\r\n const { authed } = useContext(UserContext);\r\n const toggleTopbarSection = () => {\r\n setToggle(!toggle);\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 {authed.username}\r\n \r\n \r\n \r\n
\r\n );\r\n}\r\n","import { makeStyles } from \"@material-ui/core\";\r\nimport { Close } from \"@material-ui/icons\";\r\nimport React from \"react\";\r\nimport MenuTile from \"./sidebar/MenuTile\";\r\nimport clsx from \"clsx\";\r\n\r\nconst useStyles = makeStyles((theme) => ({\r\n mobileNavigation: {\r\n height: \"100vh\",\r\n width: \"100vw\",\r\n position: \"fixed\",\r\n zIndex: \"999\",\r\n \"& ul li\": {\r\n padding: \"20px\",\r\n fontSize: \"20px\",\r\n fontWeight: \"bold\",\r\n letterSpacing: \"2px\",\r\n borderRadius: \"5px\",\r\n listStyle: \"none\",\r\n },\r\n \"& ul li a\": {\r\n textDecoration: \"none\",\r\n color: \"inherit\",\r\n },\r\n \"& ul li:hover\": {\r\n backgroundColor: \"rgb(45, 197, 139)\",\r\n cursor: \"pointer\",\r\n color: \"white\",\r\n },\r\n },\r\n mobileNavigationList: {\r\n display: \"flex\",\r\n height: \"60%\",\r\n alignItems: \"center\",\r\n justifyContent: \"center\",\r\n },\r\n mobileNavigationClose: {\r\n boxShadow: \"5px 5px 15px 5px rgb(45, 197, 139)\",\r\n display: \"inline-block\",\r\n margin: \"20px\",\r\n borderRadius: \"50%\",\r\n padding: \"10px\",\r\n cursor: \"pointer\",\r\n transition: \"all 0.2ms ease-out\",\r\n \"&:hover\": {\r\n transform: \"scale(1.1)\",\r\n },\r\n },\r\n mobileNavigationCloseIcon: {\r\n color: \"white\",\r\n transition: \"all 0.2ms ease-out\",\r\n },\r\n hideMenu: {\r\n display: \"none\",\r\n },\r\n sidebarGrayBg: {\r\n backgroundColor: \"rgb(58,67,87)\",\r\n },\r\n}));\r\n\r\nfunction MobileNavigation({ hide, hideMenu, menu }) {\r\n const classes = useStyles();\r\n const styles = clsx({\r\n [classes.mobileNavigation]: true,\r\n [classes.hideMenu]: hide,\r\n [classes.sidebarGrayBg]: true,\r\n });\r\n return (\r\n <>\r\n
\r\n
\r\n \r\n
\r\n
\r\n
    \r\n {menu.map((item) => (\r\n
  • hideMenu()}>\r\n \r\n
  • \r\n ))}\r\n
\r\n
\r\n
\r\n \r\n );\r\n}\r\n\r\nexport default MobileNavigation;\r\n","import React, { useState, useEffect, useContext } from \"react\";\r\nimport { TabContextProvider } from \"../contexts/tabContext\";\r\nimport { Grid, Box } from \"@material-ui/core\";\r\nimport { TabbarSectionContextProvider } from \"../contexts/tabbarSectionContext\";\r\nimport Sidebar from \"../components/sidebar/Sidebar\";\r\nimport Topbar from \"../components/topbar/Topbar\";\r\nimport { UserContext } from \"../contexts/userContext\";\r\nimport FormContextProvoder from \"../contexts/formContext\";\r\nimport { createRoutes } from \"../routes\";\r\nimport MobileNavigation from \"../components/mobileNavigation\";\r\nimport { authenticateUser } from \"../services/userService\";\r\nimport { useNavigate } from \"react-router-dom\";\r\n\r\nfunction MainPage() {\r\n const [hide, setHide] = useState(true);\r\n const routes = createRoutes();\r\n const navigate = useNavigate();\r\n const { userDetailObject, menu, authed, setAuthed } = useContext(UserContext);\r\n const [toggleTopbarSection, setToggleTopbarSection] = useState(true);\r\n const hideMenu = () => {\r\n setHide(!hide);\r\n };\r\n\r\n useEffect(() => {\r\n const Init = async () => {\r\n if (authed.email === \"\") {\r\n try {\r\n console.log(\"------------------> Check MainaPage\");\r\n const response = await authenticateUser();\r\n if (response.roles.length === 0) throw \"asdfasdf\";\r\n const obj = userDetailObject(response);\r\n setAuthed({ ...obj });\r\n return;\r\n } catch (ex) {\r\n navigate(\"/login\");\r\n }\r\n }\r\n };\r\n Init();\r\n }, []);\r\n\r\n const handleClick = () => {\r\n if (!toggleTopbarSection) {\r\n setToggleTopbarSection(!toggleTopbarSection);\r\n }\r\n };\r\n return (\r\n \r\n \r\n \r\n \r\n handleClick()}>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {routes}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n}\r\n\r\nexport default MainPage;\r\n","import React, { useEffect, useContext } from \"react\";\r\nimport { Link, useSearchParams, useNavigate } from \"react-router-dom\";\r\nimport { UserContext } from \"../../contexts/userContext\";\r\n\r\nfunction ExternalLoginPage() {\r\n const { userLogin, authed } = useContext(UserContext);\r\n const [searchParams] = useSearchParams();\r\n const navigate = useNavigate();\r\n useEffect(() => {\r\n const Init = async () => {\r\n // take the params from there and show it to the console!!!!\r\n const email = searchParams.get(\"email\");\r\n const providerKey = searchParams.get(\"providerKey\");\r\n const loginProvider = searchParams.get(\"loginProvider\");\r\n if (email !== null && providerKey !== null && loginProvider !== null) {\r\n // go to the login\r\n try {\r\n await userLogin({ email, providerKey, loginProvider });\r\n navigate(\"/\");\r\n } catch (ex) {\r\n console.log(ex);\r\n //let response = ex.response.data.errorMessage;\r\n navigate(\"/login\", {\r\n state: {\r\n error: { ex },\r\n },\r\n });\r\n }\r\n }\r\n };\r\n Init();\r\n }, []);\r\n\r\n return
Redirecting please wait....
;\r\n}\r\n\r\nexport default ExternalLoginPage;\r\n","import React from \"react\";\r\nimport \"./WidgetLg.css\";\r\n\r\nexport default function WidgetLg({\r\n style,\r\n title,\r\n bodyNumber,\r\n Icon,\r\n footerNumber,\r\n footerTitle,\r\n}) {\r\n return (\r\n
\r\n
{title}
\r\n
\r\n

{bodyNumber}

\r\n {Icon}\r\n
\r\n
\r\n );\r\n}\r\n","import http from \"./httpService\";\r\nimport { apiUrl } from \"../config.json\";\r\n\r\nconst apiEndpoint = apiUrl + \"/Statistics/\";\r\n\r\n\r\nexport async function getTotalUsers(email = null)\r\n{\r\n let totalUsers = apiEndpoint + \"getTotalUsers\";\r\n const { data } = await http.post(totalUsers, {\r\n companyOwnerEmail:email\r\n });\r\n return data;\r\n}\r\n\r\n\r\nexport async function getTotalStores(email = null)\r\n{\r\n let totalStores = apiEndpoint + \"getTotalStores\";\r\n const { data } = await http.post(totalStores, {\r\n companyOwnerEmail:email\r\n });\r\n return data;\r\n}\r\n\r\nexport async function getTotalActiveSales(email = null)\r\n{\r\n let totalActiveSales = apiEndpoint + \"getTotalActiveSales\";\r\n const { data } = await http.post(totalActiveSales, {\r\n companyOwnerEmail:email\r\n });\r\n return data;\r\n}\r\n\r\n\r\nexport async function getLast6Months(email = null)\r\n{\r\n let last6monthts = apiEndpoint + \"getLast6Months\";\r\n const { data } = await http.post(last6monthts, {\r\n companyOwnerEmail:email\r\n });\r\n return data;\r\n}\r\n\r\nexport async function getTotalRedeemEarnedPoints(email = null)\r\n{\r\n let totalRedeemEarnedPoints = apiEndpoint + \"getTotalEarnedAndRedeemPoint\";\r\n const { data } = await http.post(totalRedeemEarnedPoints, {\r\n companyOwnerEmail:email\r\n });\r\n return data;\r\n}\r\n\r\nexport async function getTop30Users(email = null)\r\n{\r\n let top30Users = apiEndpoint + \"getTop30Users\";\r\n const { data } = await http.post(top30Users, {\r\n companyOwnerEmail:email\r\n });\r\n return data;\r\n}\r\n\r\n","import { Typography } from \"@material-ui/core\";\r\nimport React from \"react\";\r\nimport {\r\n Bar,\r\n BarChart,\r\n CartesianGrid,\r\n Rectangle,\r\n ResponsiveContainer,\r\n Tooltip,\r\n XAxis,\r\n YAxis,\r\n} from \"recharts\";\r\n\r\nfunction HorizontalBarChart({ data }) {\r\n return (\r\n <>\r\n \r\n Last 6 months\r\n \r\n \r\n \r\n \r\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 HorizontalBarChart;\r\n","import { useContext } from \"react\";\r\nimport {\r\n Box,\r\n Container,\r\n Divider,\r\n Grid,\r\n TableBody,\r\n TableCell,\r\n TableRow,\r\n Typography,\r\n} from \"@material-ui/core\";\r\nimport WidgetLg from \"../../components/widgets/WidgetLg\";\r\nimport _ from \"lodash\";\r\nimport { Store, Loyalty, PermIdentity } from \"@material-ui/icons\";\r\nimport { useEffect } from \"react\";\r\nimport { useState } from \"react\";\r\nimport {\r\n getLast6Months,\r\n getTop30Users,\r\n getTotalActiveSales,\r\n getTotalRedeemEarnedPoints,\r\n getTotalStores,\r\n getTotalUsers,\r\n} from \"../../services/statistics\";\r\nimport { UserContext } from \"../../contexts/userContext\";\r\nimport useTable from \"../../components/common/useTable\";\r\nimport HorizontalBarChart from \"../../components/common/horizontalBarChart\";\r\nimport {\r\n Bar,\r\n BarChart,\r\n CartesianGrid,\r\n Legend,\r\n Tooltip,\r\n XAxis,\r\n YAxis,\r\n ResponsiveContainer\r\n} from \"recharts\";\r\nimport { makeStyles } from \"@material-ui/styles\";\r\nimport { dateConfiguration } from \"../../utilities/dataConfiguration\";\r\n\r\nconst useStyles = makeStyles((theme) => ({\r\n tableWrapper: {\r\n marginTop: \"20px\",\r\n },\r\n horizontalChartWrapper: {},\r\n verticalChartWrapper: {},\r\n}));\r\nexport default function Analytics() {\r\n \r\n const { isAdmin, authed } = useContext(UserContext);\r\n const [totalUsers, setTotalUsers] = useState(0);\r\n const [totalStores, setTotalStores] = useState(0);\r\n const [totalSales, setTotalSales] = useState(0);\r\n const [last6Months, setLast6Months] = useState([]);\r\n const [top30Users, setTop30Users] = useState([]);\r\n const classes = useStyles();\r\n const top30UsersColumns = [\r\n { id: \"username\", label: \"Username\" },\r\n { id: \"email\", label: \"Email\" },\r\n { id: \"total\", label: \"Total\" },\r\n { id: \"dateJoined\", label: \"Date Joined\" },\r\n ];\r\n const {\r\n TableContainer,\r\n TableHeader,\r\n TablePaginationCustom,\r\n recordsAfterPaging,\r\n } = useTable(top30Users, top30UsersColumns, [\"username\", \"email\", \"total\"]);\r\n const totalRedeemAdmin = [\r\n {\r\n name: \"Redeem\",\r\n value: 0,\r\n },\r\n {\r\n name: \"Earned\",\r\n value: 0,\r\n },\r\n ];\r\n const last6MonthsAdmin = [\r\n {\r\n name: \"Month1\",\r\n value: 0,\r\n },\r\n {\r\n name: \"Month2\",\r\n value: 0,\r\n },\r\n {\r\n name: \"Month3\",\r\n value: 0,\r\n },\r\n {\r\n name: \"Month4\",\r\n value: 0,\r\n },\r\n {\r\n name: \"Month5\",\r\n value: 0,\r\n },\r\n {\r\n name: \"Month6\",\r\n value: 0,\r\n },\r\n ];\r\n\r\n \r\n useEffect(() => {\r\n const Init = async () => {\r\n try {\r\n const userEmail = isAdmin() ? null : authed.email;\r\n const activeSales = await getTotalActiveSales(userEmail);\r\n const users = await getTotalUsers(userEmail);\r\n const stores = await getTotalStores(userEmail);\r\n let last6Months;\r\n let totalPoints;\r\n const top30Users = await getTop30Users(userEmail);\r\n setTop30Users(top30Users.data);\r\n if (isAdmin()) {\r\n last6Months = await getLast6Months(authed.email); \r\n // last6Months = [...last6MonthsAdmin];\r\n // totalPoints = [...totalRedeemAdmin];\r\n // console.log(last6Months);\r\n setLast6Months(last6Months.data);\r\n } else {\r\n last6Months = await getLast6Months(userEmail);\r\n setLast6Months(last6Months.data);\r\n }\r\n\r\n setTotalUsers(users.data);\r\n setTotalStores(stores.data);\r\n setTotalSales(activeSales.data);\r\n } catch (ex) {}\r\n };\r\n Init();\r\n }, [authed]);\r\n\r\n return (\r\n \r\n \r\n \r\n }\r\n footerNumber={20}\r\n footerTitle=\"Last Month\"\r\n />\r\n \r\n \r\n }\r\n footerNumber={2}\r\n footerTitle=\"Last Month\"\r\n />\r\n \r\n \r\n }\r\n footerNumber={30}\r\n footerTitle=\"Last Month\"\r\n />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Top 30 Users\r\n \r\n \r\n \r\n \r\n {recordsAfterPaging().map((item) => (\r\n \r\n {item.username}\r\n {item.email}\r\n {item.total}\r\n {dateConfiguration(item.dateJoined)}\r\n \r\n ))}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Total Earned and Redeem Points in the last 6 Months\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n}\r\n","import {\r\n Box,\r\n Button,\r\n Container,\r\n IconButton,\r\n TableBody,\r\n TableCell,\r\n TableRow,\r\n Tooltip,\r\n Typography,\r\n} from \"@material-ui/core\";\r\nimport {\r\n Add,\r\n DeleteOutline,\r\n Edit,\r\n Loyalty,\r\n Visibility,\r\n} from \"@material-ui/icons\";\r\nimport { tabs } from \"../../config.json\";\r\nimport React, { useContext, useEffect, useState } from \"react\";\r\nimport { useNavigate } from \"react-router-dom\";\r\nimport useTable from \"../../components/common/useTable\";\r\nimport { ConfirmationDialogContext } from \"../../contexts/confirmationDialogContext\";\r\nimport { TabContext } from \"../../contexts/tabContext\";\r\nimport {\r\n deleteCategory,\r\n getCategories,\r\n} from \"../../services/categoriesService\";\r\n\r\nfunction Categories() {\r\n const [categories, setCategories] = useState([]);\r\n const { changeTab } = useContext(TabContext);\r\n const { openDialog } = useContext(ConfirmationDialogContext);\r\n const navigate = useNavigate();\r\n const categoriesColumn = [\r\n { id: \"id\", label: \"ID\" },\r\n { id: \"name\", label: \"Name\" },\r\n { id: \"actions\", label: \"Actions\", avoidSearch: true },\r\n ];\r\n\r\n useEffect(() => {\r\n const Init = async () => {\r\n changeTab(tabs.Categories);\r\n const { data } = await getCategories();\r\n setCategories(data);\r\n };\r\n Init();\r\n }, []);\r\n\r\n const handleEditClick = (stateDemo) => {\r\n navigate(`/categories/${stateDemo.id}`, {\r\n state: {\r\n ...stateDemo,\r\n },\r\n });\r\n };\r\n\r\n const handleDelete = async (id) => {\r\n let categoriesInitial = [...categories];\r\n try {\r\n if (id === null) return;\r\n let categoriesTemp = categories.filter((c) => c.id !== id);\r\n setCategories([...categoriesTemp]);\r\n await deleteCategory(id);\r\n } catch (e) {\r\n setCategories([...categoriesInitial]);\r\n }\r\n };\r\n\r\n const {\r\n TableContainer,\r\n TableHeader,\r\n TablePaginationCustom,\r\n recordsAfterPaging,\r\n } = useTable(categories, categoriesColumn, [\"id\", \"name\"]);\r\n\r\n return (\r\n \r\n \r\n
\r\n Categories\r\n navigate(\"/categories/add\")}\r\n color=\"primary\"\r\n startIcon={}\r\n variant=\"contained\"\r\n size=\"small\"\r\n >\r\n Add Category\r\n \r\n
\r\n \r\n \r\n \r\n \r\n {recordsAfterPaging()?.length === 0 ? (\r\n \r\n \r\n No Results\r\n \r\n \r\n ) : (\r\n <>\r\n {recordsAfterPaging().map((item) => (\r\n \r\n {item.id}\r\n {item.name}\r\n \r\n \r\n \r\n \r\n navigate(`/companies?category=${item.id}`)\r\n }\r\n color=\"primary\"\r\n >\r\n \r\n \r\n \r\n \r\n handleEditClick(item)}\r\n color=\"primary\"\r\n >\r\n \r\n \r\n \r\n \r\n {\r\n openDialog({\r\n title: \"Delete category?\",\r\n body: \"Are you sure you want to delete this category?\",\r\n yesButton: \"Yes\",\r\n noButton: \"No\",\r\n callback: () => handleDelete(item.id),\r\n });\r\n }}\r\n >\r\n \r\n \r\n \r\n \r\n \r\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 Categories;\r\n","import React, { useContext, useEffect } from \"react\";\r\nimport { FormInputHook } from \"../../utilities/formInputHook\";\r\nimport { formTypes } from \"../../config.json\";\r\nimport FormTemplate from \"../../components/common/formTemplate\";\r\nimport FormInput from \"../../components/common/formInput\";\r\nimport { addCategory, updateCategory } from \"../../services/categoriesService\";\r\nimport { UserContext } from \"../../contexts/userContext\";\r\n\r\nfunction CategoryForm({ defaultData, formType }) {\r\n const { authed } = useContext(UserContext);\r\n const {\r\n dataForm,\r\n setDataForm,\r\n disableInput,\r\n updateValue,\r\n handleDisableInput,\r\n } = FormInputHook({ defaultData, formType });\r\n\r\n useEffect(() => {\r\n setDataForm({\r\n ...dataForm,\r\n details: {\r\n ...dataForm.details,\r\n },\r\n });\r\n }, [authed]);\r\n\r\n const addCategoryValidation = () => {\r\n const errors = [];\r\n const data = { ...dataForm.details };\r\n if (data.name === null || data.name.trim() === \"\") {\r\n errors.push(\"Name is required.\");\r\n }\r\n return errors;\r\n };\r\n const updateCategoryValidation = () => {\r\n const errors = [];\r\n const data = { ...dataForm.details };\r\n if (data.name === null || data.name.trim() === \"\") {\r\n errors.push(\"Name is required.\");\r\n }\r\n return errors;\r\n };\r\n const validations = () => {\r\n if (formType === formTypes.add) {\r\n return addCategoryValidation();\r\n } else {\r\n return updateCategoryValidation();\r\n }\r\n };\r\n return (\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n );\r\n}\r\n\r\nexport default CategoryForm;\r\n","import {\r\n BrowserRouter as Router,\r\n Routes,\r\n Route,\r\n Navigate,\r\n} from \"react-router-dom\";\r\nimport RequireAuth from \"./utilities/requireAuth\";\r\nimport Stores from \"./pages/stores/Stores\";\r\nimport Company from \"./pages/companies/Company\";\r\nimport Users from \"./pages/users/users\";\r\nimport Sales from \"./pages/sales/sales\";\r\nimport SalesForm from \"./pages/sales/salesForms\";\r\nimport { formTypes } from \"./config.json\";\r\nimport Profile from \"./pages/profile/Profile\";\r\nimport StoresForm from \"./pages/stores/storesForm\";\r\nimport AssignUserToCompany from \"./pages/companies/assignUserToCompany\";\r\nimport CompanyForm from \"./pages/companies/companyForm\";\r\nimport MyComapny from \"./pages/profile/myCompany\";\r\nimport UserForm from \"./pages/users/userForm\";\r\nimport UserPoints from \"./pages/users/userPoints\";\r\nimport PointsForm from \"./pages/users/pointsForm\";\r\nimport LoginPage from \"./pages/login/LoginPage\";\r\n\r\nimport MainPage from \"./pages/mainPage\";\r\nimport ExternalLoginPage from \"./pages/login/externalLoginPage\";\r\nimport Analytics from \"./pages/analytics/Analytics\";\r\nimport Categories from \"./pages/categories/Categories\";\r\nimport CategoryForm from \"./pages/categories/categoryForm\";\r\n\r\nexport const mainRoutes = () => (\r\n \r\n \r\n } />\r\n } />\r\n } />\r\n \r\n \r\n);\r\n\r\nexport const createRoutes = () => (\r\n \r\n \r\n \r\n \r\n }\r\n />\r\n \r\n \r\n \r\n }\r\n />\r\n \r\n \r\n \r\n }\r\n />\r\n \r\n \r\n \r\n }\r\n />\r\n \r\n \r\n \r\n }\r\n />\r\n \r\n \r\n \r\n }\r\n />\r\n \r\n \r\n \r\n }\r\n />\r\n \r\n \r\n \r\n }\r\n />\r\n \r\n \r\n \r\n }\r\n />\r\n \r\n \r\n \r\n }\r\n />\r\n \r\n \r\n \r\n }\r\n />\r\n\r\n \r\n \r\n \r\n }\r\n />\r\n \r\n \r\n \r\n }\r\n />\r\n \r\n \r\n \r\n }\r\n />\r\n \r\n \r\n \r\n }\r\n />\r\n \r\n \r\n \r\n }\r\n />\r\n \r\n \r\n \r\n }\r\n />\r\n \r\n \r\n \r\n }\r\n />\r\n \r\n \r\n \r\n }\r\n />\r\n \r\n \r\n \r\n }\r\n />\r\n \r\n \r\n \r\n }\r\n />\r\n \r\n \r\n \r\n }\r\n />\r\n \r\n \r\n \r\n }\r\n />\r\n \r\n \r\n \r\n }\r\n />\r\n \r\n \r\n \r\n }\r\n />\r\n \r\n \r\n \r\n }\r\n />\r\n \r\n \r\n \r\n }\r\n />\r\n \r\n \r\n \r\n }\r\n />\r\n\r\n } />\r\n } />\r\n \r\n);\r\n","import \"./App.css\";\r\nimport { UserContextProvider } from \"./contexts/userContext\";\r\nimport { mainRoutes } from \"./routes\";\r\nimport ConfirmationDialogContextProvider from \"./contexts/confirmationDialogContext\";\r\nimport { createTheme, CssBaseline, ThemeProvider } from \"@material-ui/core\";\r\n\r\nconst theme = createTheme({\r\n palette: {},\r\n});\r\n\r\nfunction App() {\r\n // const { setUserContextObject, authed } = useContext(UserContext);\r\n const routes = mainRoutes();\r\n return (\r\n <>\r\n \r\n \r\n \r\n \r\n {[routes]}\r\n \r\n \r\n \r\n \r\n );\r\n}\r\n\r\nexport default App;\r\n","import React from 'react';\r\nimport ReactDOM from 'react-dom';\r\nimport App from './App';\r\nimport { UserContextProvider } from \"./contexts/userContext\";\r\nimport {ConfirmationDialogContextProvider} from \"./contexts/confirmationDialogContext\";\r\n\r\nReactDOM.render(\r\n \r\n \r\n ,\r\n document.getElementById('root')\r\n);\r\n"],"sourceRoot":""}