0 ? 'inherit' : 'medium'}\r\n />\r\n );\r\n\r\n return (\r\n <>\r\n 1 ? 'transparent !important' : 'inherit',\r\n py: level > 1 ? 1 : 1.25,\r\n pl: `${level * 24}px`\r\n }}\r\n selected={selected === menu.id}\r\n onClick={handleClick}\r\n >\r\n {menuIcon}\r\n \r\n {menu.title}\r\n \r\n }\r\n secondary={\r\n menu.caption && (\r\n \r\n {menu.caption}\r\n \r\n )\r\n }\r\n />\r\n {open ? (\r\n \r\n ) : (\r\n \r\n )}\r\n \r\n \r\n \r\n {menus}\r\n
\r\n \r\n >\r\n );\r\n};\r\n\r\nNavCollapse.propTypes = {\r\n menu: PropTypes.object,\r\n level: PropTypes.number\r\n};\r\n\r\nexport default NavCollapse;\r\n","import PropTypes from 'prop-types';\r\n\r\n// i18n\r\nimport { Trans } from 'react-i18next';\r\n\r\n// material-ui\r\nimport { useTheme } from '@mui/material/styles';\r\nimport { Divider, List, Typography } from '@mui/material';\r\n\r\n// project imports\r\nimport NavItem from '../NavItem';\r\nimport NavCollapse from '../NavCollapse';\r\n\r\n// permissions\r\nimport { Can } from 'context/permissionContext';\r\n\r\n// ==============================|| SIDEBAR MENU LIST GROUP ||============================== //\r\n\r\nconst NavGroup = ({ item }) => {\r\n const theme = useTheme();\r\n // menu list collapse & items\r\n const items = item.children?.map((menu) => {\r\n switch (menu.type) {\r\n case 'collapse':\r\n return ;\r\n case 'item':\r\n if (menu.subject) {\r\n return (\r\n \r\n \r\n \r\n );\r\n }\r\n return ;\r\n\r\n default:\r\n return (\r\n \r\n Menu Items Error\r\n \r\n );\r\n }\r\n });\r\n\r\n return (\r\n \r\n {(allowed) =>\r\n allowed || !item.subject ? (\r\n <>\r\n \r\n {item.title}\r\n {item.caption && (\r\n \r\n {item.caption}\r\n \r\n )}\r\n \r\n )\r\n }\r\n >\r\n {items}\r\n
\r\n\r\n {/* group divider */}\r\n \r\n >\r\n ) : null\r\n }\r\n \r\n );\r\n};\r\n\r\nNavGroup.propTypes = {\r\n item: PropTypes.object\r\n};\r\n\r\nexport default NavGroup;\r\n","// material-ui\r\nimport { Skeleton, Stack, Typography } from '@mui/material';\r\n\r\n// project imports\r\nimport NavGroup from './NavGroup';\r\nimport { useSelector } from 'react-redux';\r\n// import menuItems from 'menu-items';\r\nimport { withSkeleton } from '@qubiteq/qublib';\r\nimport { useMe } from 'hooks/useMe';\r\n\r\n// ==============================|| SIDEBAR MENU LIST ||============================== //\r\n\r\nconst NavGroupSkeleton = () => {\r\n return (\r\n \r\n \r\n {[1, 2, 3, 4, 5].map((_, index) => (\r\n \r\n ))}\r\n \r\n );\r\n};\r\n\r\nconst NavGroupWithSkeleton = withSkeleton(NavGroup, NavGroupSkeleton);\r\n\r\nconst MenuList = () => {\r\n const { menuItems } = useSelector((state) => state.menu);\r\n const { status } = useMe();\r\n const navItems = menuItems?.map((item) => {\r\n switch (item.type) {\r\n case 'group':\r\n return ;\r\n default:\r\n return (\r\n \r\n Menu Items Error\r\n \r\n );\r\n }\r\n });\r\n\r\n return <>{navItems}>;\r\n};\r\n\r\nexport default MenuList;\r\n","import PropTypes from 'prop-types';\r\n\r\n// material-ui\r\nimport { useTheme } from '@mui/material/styles';\r\nimport { Box, Drawer, useMediaQuery } from '@mui/material';\r\n\r\n// third-party\r\nimport PerfectScrollbar from 'react-perfect-scrollbar';\r\nimport { BrowserView, MobileView } from 'react-device-detect';\r\n\r\n// project imports\r\nimport MenuList from './MenuList';\r\nimport LogoSection from '../LogoSection';\r\n/* import MenuCard from './MenuCard'; */\r\nimport { drawerWidth } from 'store/constant';\r\n\r\n// ==============================|| SIDEBAR DRAWER ||============================== //\r\n\r\nconst Sidebar = ({ drawerOpen, drawerToggle, window }) => {\r\n const theme = useTheme();\r\n const matchUpMd = useMediaQuery(theme.breakpoints.up('md'));\r\n\r\n const drawer = (\r\n <>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n >\r\n );\r\n\r\n const container = window !== undefined ? () => window.document.body : undefined;\r\n\r\n return (\r\n \r\n \r\n {drawer}\r\n \r\n \r\n );\r\n};\r\n\r\nSidebar.propTypes = {\r\n drawerOpen: PropTypes.bool,\r\n drawerToggle: PropTypes.func,\r\n window: PropTypes.object\r\n};\r\n\r\nexport default Sidebar;\r\n","// assets\r\nimport { IconDashboard, IconTool, IconUser, IconUsers, IconReportAnalytics, IconHome2, IconSettings } from '@tabler/icons';\r\n\r\n// constant\r\nconst icons = { IconHome2, IconTool, IconUsers, IconReportAnalytics, IconDashboard, IconUser, IconSettings };\r\n// ==============================|| DASHBOARD MENU ITEMS ||============================== //\r\n\r\nconst dashboard = {\r\n id: 'dashboard',\r\n title: 'Dashboard',\r\n type: 'group',\r\n children: [\r\n {\r\n id: 'Home.View',\r\n title: 'Home',\r\n type: 'item',\r\n url: '/home',\r\n icon: icons.IconHome2\r\n },\r\n {\r\n id: 'Users.View',\r\n title: 'Users',\r\n type: 'item',\r\n url: '/users/view',\r\n icon: icons.IconUser,\r\n breadcrumbs: true,\r\n subject: 'Users'\r\n },\r\n {\r\n id: 'Roles.View',\r\n title: 'Roles',\r\n type: 'item',\r\n url: '/roles/view',\r\n icon: icons.IconUsers,\r\n breadcrumbs: true,\r\n subject: 'Roles'\r\n },\r\n {\r\n id: 'AccountSettings.View',\r\n title: 'AccountSettings',\r\n type: 'item',\r\n url: '/user/settings',\r\n icon: icons.IconSettings\r\n }\r\n ]\r\n};\r\n\r\nexport default dashboard;\r\n","import dashboard from './dashboard';\r\n\r\n// ==============================|| MENU ITEMS ||============================== //\r\n\r\nconst menuItems = {\r\n items: [dashboard]\r\n};\r\n\r\nexport default menuItems;\r\n","import { useEffect } from 'react';\r\nimport { useDispatch, useSelector } from 'react-redux';\r\nimport { Outlet } from 'react-router-dom';\r\n\r\n// material-ui\r\nimport { styled, useTheme } from '@mui/material/styles';\r\nimport { AppBar, Box, CssBaseline, Toolbar, useMediaQuery } from '@mui/material';\r\n\r\n// project imports\r\nimport Breadcrumbs from 'ui-component/extended/Breadcrumbs';\r\nimport Header from './Header';\r\nimport Sidebar from './Sidebar';\r\nimport navigation from 'menu-items';\r\nimport { drawerWidth } from 'store/constant';\r\nimport { SET_MENU } from 'store/actions';\r\n\r\n// assets\r\nimport { IconChevronRight } from '@tabler/icons';\r\n\r\n// styles\r\nconst Main = styled('main', { shouldForwardProp: (prop) => prop !== 'open' })(({ theme, open }) => ({\r\n ...theme.typography.mainContent,\r\n ...(!open && {\r\n borderBottomLeftRadius: 0,\r\n borderBottomRightRadius: 0,\r\n transition: theme.transitions.create('margin', {\r\n easing: theme.transitions.easing.sharp,\r\n duration: theme.transitions.duration.leavingScreen\r\n }),\r\n [theme.breakpoints.up('md')]: {\r\n marginLeft: -(drawerWidth - 20),\r\n width: `calc(100% - ${drawerWidth}px)`\r\n },\r\n [theme.breakpoints.down('md')]: {\r\n marginLeft: '20px',\r\n width: `calc(100% - ${drawerWidth}px)`,\r\n padding: '16px'\r\n },\r\n [theme.breakpoints.down('sm')]: {\r\n marginLeft: '10px',\r\n width: `calc(100% - ${drawerWidth}px)`,\r\n padding: '16px',\r\n marginRight: '10px'\r\n }\r\n }),\r\n ...(open && {\r\n transition: theme.transitions.create('margin', {\r\n easing: theme.transitions.easing.easeOut,\r\n duration: theme.transitions.duration.enteringScreen\r\n }),\r\n marginLeft: 0,\r\n borderBottomLeftRadius: 0,\r\n borderBottomRightRadius: 0,\r\n width: `calc(100% - ${drawerWidth}px)`,\r\n [theme.breakpoints.down('md')]: {\r\n marginLeft: '20px'\r\n },\r\n [theme.breakpoints.down('sm')]: {\r\n marginLeft: '10px'\r\n }\r\n })\r\n}));\r\n\r\n// ==============================|| MAIN LAYOUT ||============================== //\r\n\r\nconst MainLayout = () => {\r\n const theme = useTheme();\r\n const matchDownMd = useMediaQuery(theme.breakpoints.down('lg'));\r\n\r\n // Handle left drawer\r\n const leftDrawerOpened = useSelector((state) => state.menu.opened);\r\n const dispatch = useDispatch();\r\n const handleLeftDrawerToggle = () => {\r\n dispatch({ type: SET_MENU, opened: !leftDrawerOpened });\r\n };\r\n\r\n useEffect(() => {\r\n dispatch({ type: SET_MENU, opened: !matchDownMd });\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, [matchDownMd]);\r\n\r\n return (\r\n \r\n \r\n {/* header */}\r\n \r\n \r\n \r\n \r\n \r\n\r\n {/* drawer */}\r\n \r\n\r\n {/* main content */}\r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nexport default MainLayout;\r\n","// mui\r\nimport { Stack, Grid, Typography, Box, Button } from '@mui/material';\r\n\r\n// colors\r\nimport colors from 'assets/scss/_themes-vars.module.scss';\r\n\r\n// Apis\r\nimport { auth } from 'apis';\r\n\r\n// react-router-dom\r\nimport { useNavigate } from 'react-router-dom';\r\n\r\n// store\r\nimport { VERIFY_EMAIL } from 'store/actions';\r\nimport { useDispatch, useSelector } from 'react-redux';\r\n\r\nimport { PinInput } from '@qubiteq/qublib';\r\n\r\nimport { useSnackbar } from 'notistack';\r\n\r\nimport { useMe } from 'hooks/useMe';\r\n\r\nimport { useQueryClient } from 'react-query';\r\n\r\nconst Verification = () => {\r\n const dispatch = useDispatch();\r\n const { isLoggedIn } = useSelector((state) => state.auth);\r\n const queryClient = useQueryClient();\r\n const { whoami } = useMe();\r\n const { enqueueSnackbar } = useSnackbar();\r\n const navigate = useNavigate();\r\n const userIdentifier = whoami?.email;\r\n\r\n const onComplete = (pin) => {\r\n auth.ValidateVerificationPin({ userIdentifier, value: Number(pin) })\r\n .then((res) => {\r\n if (res.success === 1) {\r\n if (!isLoggedIn) {\r\n navigate('/login');\r\n }\r\n dispatch({ type: VERIFY_EMAIL });\r\n queryClient.invalidateQueries('me');\r\n enqueueSnackbar('Το email επιβεβαιώθηκε με επιτυχία', {\r\n variant: 'success'\r\n });\r\n }\r\n if (res.success === 0) {\r\n enqueueSnackbar('Το email δεν επιβεβαιώθηκε', {\r\n variant: 'error'\r\n });\r\n }\r\n })\r\n .catch((error) => {\r\n console.log('error', error);\r\n });\r\n };\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n Enter the verification code\r\n \r\n An email with the verification code was sent to your email account\r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nexport default Verification;\r\n","// mui\r\nimport { Grid, Stack, Typography } from '@mui/material';\r\n\r\n// icons\r\nimport { IconLockAccess } from '@tabler/icons';\r\n\r\n// colors\r\nimport colors from 'assets/scss/_themes-vars.module.scss';\r\n\r\nexport default () => {\r\n return (\r\n \r\n \r\n \r\n \r\n Restricted permission\r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n","// project imports\r\nimport VerificationPrompt from 'views/verification';\r\n\r\nimport { PermissionDenied } from './components';\r\n\r\nimport { useMe } from 'hooks/useMe';\r\n\r\nexport const withPermission =\r\n (Component, { action, subject, unrestricted }) =>\r\n (props) => {\r\n const { whoami, isLoading, isError } = useMe();\r\n const isEmailVerified = whoami?.isEmailVerified;\r\n const hasPermission = whoami?.permissions?.can(action, subject);\r\n\r\n if (isLoading || isError) {\r\n return null;\r\n }\r\n if (!isEmailVerified) {\r\n return ;\r\n }\r\n if (!hasPermission && !unrestricted) {\r\n return ;\r\n }\r\n return ;\r\n };\r\n","import { lazy } from 'react';\r\n\r\n// project imports\r\nimport MainLayout from 'layout/MainLayout';\r\nimport { Loadable } from '@qubiteq/qublib';\r\n\r\n// permission\r\nimport { withPermission } from 'hoc';\r\n\r\n// react-router\r\nimport { Navigate } from 'react-router-dom';\r\n\r\n// dashboard routing\r\n\r\nconst HomeView = withPermission(Loadable(lazy(() => import('views/dashboard/Home'))), {\r\n unrestricted: true\r\n});\r\nconst AccountSettings = withPermission(Loadable(lazy(() => import('views/settings/AccountSettings'))), {\r\n unrestricted: true\r\n});\r\nconst UsersView = withPermission(Loadable(lazy(() => import('views/dashboard/Users').then((module) => ({ default: module.View })))), {\r\n action: 'View',\r\n subject: 'Users'\r\n});\r\nconst UsersManage = withPermission(Loadable(lazy(() => import('views/dashboard/Users').then((module) => ({ default: module.Manage })))), {\r\n action: 'Manage',\r\n subject: 'Users'\r\n});\r\nconst RolesView = withPermission(Loadable(lazy(() => import('views/dashboard/Roles').then((module) => ({ default: module.View })))), {\r\n action: 'View',\r\n subject: 'Roles'\r\n});\r\nconst ProductsView = withPermission(Loadable(lazy(() => import('views/dashboard/Products').then((module) => ({ default: module.View })))), {\r\n action: 'View',\r\n subject: 'Products'\r\n});\r\nconst RolesManage = withPermission(Loadable(lazy(() => import('views/dashboard/Roles').then((module) => ({ default: module.Manage })))), {\r\n action: 'Manage',\r\n subject: 'Roles'\r\n});\r\nconst FunctionsView = withPermission(\r\n Loadable(lazy(() => import('views/dashboard/Functions').then((module) => ({ default: module.View })))),\r\n {\r\n action: 'View',\r\n subject: 'Functions'\r\n }\r\n);\r\n// admin routing\r\nconst ImpersonationView = withPermission(Loadable(lazy(() => import('views/admin/Impersonation'))), {\r\n action: 'Impersonation',\r\n subject: 'Admin'\r\n});\r\nconst HomologationView = withPermission(\r\n Loadable(lazy(() => import('views/dashboard/Homologation').then((module) => ({ default: module.View })))),\r\n {\r\n action: 'View',\r\n subject: 'Homologation'\r\n }\r\n);\r\nconst HomologationManage = withPermission(\r\n Loadable(lazy(() => import('views/dashboard/Homologation').then((module) => ({ default: module.Manage })))),\r\n {\r\n action: 'Manage',\r\n subject: 'Homologation'\r\n }\r\n);\r\nconst DutiesView = withPermission(Loadable(lazy(() => import('views/dashboard/Duties').then((module) => ({ default: module.View })))), {\r\n action: 'View',\r\n subject: 'Duties'\r\n});\r\nconst DutiesManage = withPermission(Loadable(lazy(() => import('views/dashboard/Duties').then((module) => ({ default: module.Manage })))), {\r\n action: 'Manage',\r\n subject: 'Duties'\r\n});\r\nconst RankingListTypeView = withPermission(\r\n Loadable(lazy(() => import('views/dashboard/RankingListType').then((module) => ({ default: module.View })))),\r\n {\r\n action: 'View',\r\n subject: 'RankingListType'\r\n }\r\n);\r\n\r\nconst PaymentLandingPage = withPermission(Loadable(lazy(() => import('views/payments/').then((module) => ({ default: module.Manage })))), {\r\n action: 'Manage',\r\n subject: 'Duties'\r\n});\r\n\r\nconst PageNotFound = Loadable(lazy(() => import('views/PageNotFound')));\r\nconst ServerError = Loadable(lazy(() => import('views/ServerError')));\r\nconst PageUnderConstruction = Loadable(lazy(() => import('views/PageUnderConstruction')));\r\n\r\n// user manage\r\nconst UserDetails = Loadable(lazy(() => import('views/dashboard/Users/Manage/Details')));\r\nconst UserRoles = Loadable(lazy(() => import('views/dashboard/Users/Manage/Roles')));\r\nconst UserPermissions = Loadable(lazy(() => import('views/dashboard/Users/Manage/Permissions')));\r\n\r\n// role manage\r\nconst RolesDetails = Loadable(lazy(() => import('views/dashboard/Roles/Manage/Details')));\r\nconst RolesPermissions = Loadable(lazy(() => import('views/dashboard/Roles/Manage/Permissions')));\r\n// ==============================|| MAIN ROUTING ||============================== //\r\n\r\nconst MainRoutes = () => [\r\n {\r\n path: '',\r\n element: ,\r\n children: [\r\n {\r\n path: 'home',\r\n element: \r\n },\r\n {\r\n path: 'user/settings',\r\n element: \r\n },\r\n {\r\n path: '',\r\n element: \r\n },\r\n {\r\n path: 'site-is-temporarily-unavailable',\r\n element: \r\n },\r\n {\r\n path: '/invite',\r\n element: (\r\n \r\n Παρακαλώ αποσυνδεθείτε για να αποδεχθείτε την πρόσκληση!\r\n
\r\n )\r\n },\r\n {\r\n path: '*',\r\n element: \r\n }\r\n ]\r\n },\r\n {\r\n path: 'users',\r\n element: ,\r\n children: [\r\n {\r\n path: 'view',\r\n element: \r\n },\r\n {\r\n path: 'manage/:id',\r\n element: ,\r\n children: [\r\n {\r\n path: 'details',\r\n element: \r\n },\r\n {\r\n path: 'roles',\r\n element: \r\n },\r\n {\r\n path: 'permissions',\r\n element: \r\n }\r\n ]\r\n }\r\n ]\r\n },\r\n {\r\n path: 'roles',\r\n element: ,\r\n children: [\r\n {\r\n path: 'view',\r\n element: \r\n },\r\n {\r\n path: 'manage/:id',\r\n element: ,\r\n children: [\r\n {\r\n path: 'details',\r\n element: \r\n },\r\n {\r\n path: 'permissions',\r\n element: \r\n }\r\n ]\r\n }\r\n ]\r\n },\r\n {\r\n path: 'products',\r\n element: ,\r\n children: [\r\n {\r\n path: 'view',\r\n element: \r\n }\r\n ]\r\n },\r\n {\r\n path: 'admin',\r\n element: ,\r\n children: [\r\n {\r\n path: 'impersonation',\r\n element: \r\n }\r\n ]\r\n },\r\n {\r\n path: 'homologation',\r\n element: ,\r\n children: [\r\n {\r\n path: 'view',\r\n element: \r\n },\r\n {\r\n path: 'manage/:id',\r\n element: \r\n }\r\n ]\r\n },\r\n {\r\n path: 'duties',\r\n element: ,\r\n children: [\r\n {\r\n path: 'view',\r\n element: \r\n },\r\n {\r\n path: 'manage/:id',\r\n element: \r\n }\r\n ]\r\n },\r\n {\r\n path: 'functions',\r\n element: ,\r\n children: [\r\n {\r\n path: 'view',\r\n element: \r\n }\r\n ]\r\n },\r\n {\r\n path: 'payments',\r\n element: ,\r\n children: [\r\n {\r\n path: 'view',\r\n element: \r\n }\r\n ]\r\n }\r\n];\r\n\r\nexport default MainRoutes;\r\n","// material-ui\r\nimport { styled } from '@mui/material/styles';\r\n\r\n// ==============================|| WRAPPER ||============================== //\r\n\r\nexport const MinimalWrapper = styled('div')(({ theme }) => ({\r\n backgroundColor: theme.palette.primary.light,\r\n minHeight: '100vh'\r\n}));\r\n","import { MinimalWrapper } from 'ui-component/wrappers';\r\nimport { Stack, Box } from '@mui/material';\r\nimport { Outlet } from 'react-router-dom';\r\nimport LanguageSection from 'layout/MainLayout/Header/LanguageSection';\r\n// ==============================|| MINIMAL LAYOUT ||============================== //\r\n\r\nconst MinimalLayout = () => (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n);\r\n\r\nexport default MinimalLayout;\r\n","import { lazy } from 'react';\r\nimport { Navigate } from 'react-router-dom';\r\n\r\n// project imports\r\nimport { Loadable } from '@qubiteq/qublib';\r\nimport MinimalLayout from 'layout/MinimalLayout';\r\nimport { element } from 'prop-types';\r\n\r\n// login option 3 routing\r\nconst AuthLogin3 = Loadable(lazy(() => import('views/authentication/authentication3/Login3')));\r\nconst AuthRegister3 = Loadable(lazy(() => import('views/authentication/authentication3/Register3')));\r\nconst ResetPassword = Loadable(lazy(() => import('views/authentication/forgotPassword')));\r\nconst UserInvitation = Loadable(lazy(() => import('views/authentication/userInvitation')));\r\nconst Transaction = Loadable(lazy(() => import('views/authentication/transaction')));\r\nconst Success = Loadable(lazy(() => import('views/authentication/transaction/response')));\r\nconst Cancel = Loadable(lazy(() => import('views/authentication/transaction/response')));\r\n\r\n// ==============================|| AUTHENTICATION ROUTING ||============================== //\r\n\r\nconst AuthenticationRoutes = () => [\r\n {\r\n path: '/',\r\n element: ,\r\n children: [\r\n {\r\n path: '/login',\r\n element: \r\n },\r\n {\r\n path: '/register',\r\n element: \r\n },\r\n {\r\n path: '/reset/:token',\r\n element: \r\n },\r\n {\r\n path: '/invite',\r\n element: \r\n },\r\n {\r\n path: '/',\r\n element: \r\n },\r\n {\r\n path: '/transaction',\r\n element: \r\n },\r\n {\r\n path: '/success',\r\n element: \r\n },\r\n {\r\n path: '/cancel',\r\n element: \r\n }\r\n ]\r\n },\r\n {\r\n path: '*',\r\n element: \r\n }\r\n];\r\n\r\nexport default AuthenticationRoutes;\r\n","import { memo } from 'react';\r\nimport { useRoutes } from 'react-router-dom';\r\n\r\n// routes\r\nimport MainRoutes from './MainRoutes';\r\nimport AuthenticationRoutes from './AuthenticationRoutes';\r\nimport config from 'config';\r\n\r\n// store\r\nimport { useSelector } from 'react-redux';\r\n\r\n// ==============================|| ROUTING RENDER ||============================== //\r\n\r\nconst Routes = memo(() => {\r\n const { isLoggedIn } = useSelector((state) => state.auth);\r\n const routes = isLoggedIn ? MainRoutes() : AuthenticationRoutes();\r\n return useRoutes(routes, config.basename);\r\n});\r\n\r\nexport default Routes;\r\n","/**\r\n * Color intention that you want to used in your theme\r\n * @param {JsonObject} theme Theme customization object\r\n */\r\n\r\nexport default function themePalette(theme) {\r\n return {\r\n mode: theme?.customization?.navType,\r\n common: {\r\n black: theme.colors?.darkPaper\r\n },\r\n primary: {\r\n light: theme.colors?.primaryLight,\r\n main: theme.colors?.primaryMain,\r\n dark: theme.colors?.primaryDark,\r\n 200: theme.colors?.primary200,\r\n 800: theme.colors?.primary800\r\n },\r\n secondary: {\r\n light: theme.colors?.secondaryLight,\r\n main: theme.colors?.secondaryMain,\r\n dark: theme.colors?.secondaryDark,\r\n 200: theme.colors?.secondary200,\r\n 800: theme.colors?.secondary800\r\n },\r\n error: {\r\n light: theme.colors?.errorLight,\r\n main: theme.colors?.errorMain,\r\n dark: theme.colors?.errorDark\r\n },\r\n orange: {\r\n light: theme.colors?.orangeLight,\r\n main: theme.colors?.orangeMain,\r\n dark: theme.colors?.orangeDark\r\n },\r\n warning: {\r\n light: theme.colors?.warningLight,\r\n main: theme.colors?.warningMain,\r\n dark: theme.colors?.warningDark\r\n },\r\n success: {\r\n light: theme.colors?.successLight,\r\n 200: theme.colors?.success200,\r\n main: theme.colors?.successMain,\r\n dark: theme.colors?.successDark\r\n },\r\n grey: {\r\n 50: theme.colors?.grey50,\r\n 100: theme.colors?.grey100,\r\n 500: theme.darkTextSecondary,\r\n 600: theme.heading,\r\n 700: theme.darkTextPrimary,\r\n 900: theme.textDark\r\n },\r\n dark: {\r\n light: theme.colors?.darkTextPrimary,\r\n main: theme.colors?.darkLevel1,\r\n dark: theme.colors?.darkLevel2,\r\n 800: theme.colors?.darkBackground,\r\n 900: theme.colors?.darkPaper\r\n },\r\n text: {\r\n primary: theme.darkTextPrimary,\r\n secondary: theme.darkTextSecondary,\r\n dark: theme.textDark,\r\n hint: theme.colors?.grey100\r\n },\r\n background: {\r\n paper: theme.paper,\r\n default: theme.backgroundDefault\r\n }\r\n };\r\n}\r\n","/**\r\n * Typography used in theme\r\n * @param {JsonObject} theme theme customization object\r\n */\r\n\r\nexport default function themeTypography(theme) {\r\n return {\r\n fontFamily: theme?.customization?.fontFamily,\r\n h6: {\r\n fontWeight: 600,\r\n color: theme.heading,\r\n fontSize: '0.75rem'\r\n },\r\n h5: {\r\n fontSize: '0.875rem',\r\n color: theme.heading,\r\n fontWeight: 600\r\n },\r\n h4: {\r\n fontSize: '1rem',\r\n color: theme.heading,\r\n fontWeight: 800\r\n },\r\n h3: {\r\n fontSize: '1.25rem',\r\n color: theme.heading,\r\n fontWeight: 800\r\n },\r\n h2: {\r\n fontSize: '1.5rem',\r\n color: theme.heading,\r\n fontWeight: 800\r\n },\r\n h1: {\r\n fontSize: '2.125rem',\r\n color: theme.heading,\r\n fontWeight: 800\r\n },\r\n subtitle1: {\r\n fontSize: '0.875rem',\r\n fontWeight: 400,\r\n color: theme.textDarkPrimary\r\n },\r\n subtitle2: {\r\n fontSize: '0.8rem',\r\n fontWeight: 400,\r\n color: theme.darkTextSecondary\r\n },\r\n caption: {\r\n fontSize: '0.75rem',\r\n color: theme.darkTextSecondary,\r\n fontWeight: 600\r\n },\r\n body1: {\r\n fontSize: '0.875rem',\r\n fontWeight: 400,\r\n lineHeight: '1.334em'\r\n },\r\n body2: {\r\n letterSpacing: '0em',\r\n fontWeight: 400,\r\n lineHeight: '1.5em',\r\n color: theme.darkTextPrimary\r\n },\r\n error: {\r\n color: theme.colors.errorMain\r\n },\r\n button: {\r\n textTransform: 'capitalize'\r\n },\r\n customInput: {\r\n marginTop: 1,\r\n marginBottom: 1,\r\n '& > label': {\r\n top: 23,\r\n left: 0,\r\n color: theme.grey500,\r\n '&[data-shrink=\"false\"]': {\r\n top: 5\r\n }\r\n },\r\n '& > div > input': {\r\n padding: '30.5px 14px 11.5px !important'\r\n },\r\n '& legend': {\r\n display: 'none'\r\n },\r\n '& fieldset': {\r\n top: 0\r\n }\r\n },\r\n mainContent: {\r\n backgroundColor: theme.background,\r\n width: '100%',\r\n minHeight: 'calc(100vh - 88px)',\r\n flexGrow: 1,\r\n padding: '20px',\r\n marginTop: '88px',\r\n marginRight: '20px',\r\n borderRadius: `${theme?.customization?.borderRadius}px`\r\n },\r\n menuCaption: {\r\n fontSize: '0.875rem',\r\n fontWeight: 500,\r\n color: theme.heading,\r\n padding: '6px',\r\n textTransform: 'capitalize',\r\n marginTop: '10px'\r\n },\r\n subMenuCaption: {\r\n fontSize: '0.6875rem',\r\n fontWeight: 500,\r\n color: theme.darkTextSecondary,\r\n textTransform: 'capitalize'\r\n },\r\n commonAvatar: {\r\n cursor: 'pointer',\r\n borderRadius: '8px'\r\n },\r\n smallAvatar: {\r\n width: '22px',\r\n height: '22px',\r\n fontSize: '1rem'\r\n },\r\n mediumAvatar: {\r\n width: '34px',\r\n height: '34px',\r\n fontSize: '1.2rem'\r\n },\r\n largeAvatar: {\r\n width: '44px',\r\n height: '44px',\r\n fontSize: '1.5rem'\r\n }\r\n };\r\n}\r\n","import { createTheme } from '@mui/material/styles';\r\n\r\n// assets\r\nimport colors from 'assets/scss/_themes-vars.module.scss';\r\n\r\n// project imports\r\nimport componentStyleOverrides from './compStyleOverride';\r\nimport themePalette from './palette';\r\nimport themeTypography from './typography';\r\n\r\n/**\r\n * Represent theme style and structure as per Material-UI\r\n * @param {JsonObject} customization customization parameter object\r\n */\r\n\r\nexport const theme = (customization) => {\r\n const color = colors;\r\n\r\n const themeOption = {\r\n colors: color,\r\n heading: color.grey900,\r\n paper: color.paper,\r\n backgroundDefault: color.paper,\r\n background: color.primaryLight,\r\n darkTextPrimary: color.grey700,\r\n darkTextSecondary: color.grey500,\r\n textDark: color.grey900,\r\n menuSelected: color.secondaryDark,\r\n menuSelectedBack: color.secondaryLight,\r\n divider: color.grey200,\r\n customization\r\n };\r\n\r\n const themeOptions = {\r\n direction: 'ltr',\r\n palette: themePalette(themeOption),\r\n mixins: {\r\n toolbar: {\r\n minHeight: '48px',\r\n padding: '16px',\r\n '@media (min-width: 600px)': {\r\n minHeight: '48px'\r\n }\r\n }\r\n },\r\n typography: themeTypography(themeOption)\r\n };\r\n\r\n const themes = createTheme(themeOptions);\r\n themes.components = componentStyleOverrides(themeOption);\r\n\r\n return themes;\r\n};\r\n\r\nexport default theme;\r\n","export default function componentStyleOverrides(theme) {\r\n const bgColor = theme.colors?.paper;\r\n return {\r\n MuiButton: {\r\n styleOverrides: {\r\n root: {\r\n fontWeight: 500,\r\n borderRadius: '4px'\r\n }\r\n }\r\n },\r\n MuiPaper: {\r\n defaultProps: {\r\n elevation: 0\r\n },\r\n styleOverrides: {\r\n root: {\r\n backgroundImage: 'none'\r\n },\r\n rounded: {\r\n borderRadius: `${theme?.customization?.borderRadius}px`\r\n }\r\n }\r\n },\r\n MuiCardHeader: {\r\n styleOverrides: {\r\n root: {\r\n color: theme.colors?.textDark,\r\n padding: '24px'\r\n },\r\n title: {\r\n fontSize: '1.125rem'\r\n }\r\n }\r\n },\r\n MuiCardContent: {\r\n styleOverrides: {\r\n root: {\r\n padding: '24px'\r\n }\r\n }\r\n },\r\n MuiCardActions: {\r\n styleOverrides: {\r\n root: {\r\n padding: '24px'\r\n }\r\n }\r\n },\r\n MuiListItemButton: {\r\n styleOverrides: {\r\n root: {\r\n color: theme.darkTextPrimary,\r\n paddingTop: '10px',\r\n paddingBottom: '10px',\r\n '&.Mui-selected': {\r\n color: theme.menuSelected,\r\n backgroundColor: theme.menuSelectedBack,\r\n '&:hover': {\r\n backgroundColor: theme.menuSelectedBack\r\n },\r\n '& .MuiListItemIcon-root': {\r\n color: theme.menuSelected\r\n }\r\n },\r\n '&:hover': {\r\n backgroundColor: theme.menuSelectedBack,\r\n color: theme.menuSelected,\r\n '& .MuiListItemIcon-root': {\r\n color: theme.menuSelected\r\n }\r\n }\r\n }\r\n }\r\n },\r\n MuiListItemIcon: {\r\n styleOverrides: {\r\n root: {\r\n color: theme.darkTextPrimary,\r\n minWidth: '36px'\r\n }\r\n }\r\n },\r\n MuiListItemText: {\r\n styleOverrides: {\r\n primary: {\r\n color: theme.textDark\r\n }\r\n }\r\n },\r\n MuiInputBase: {\r\n styleOverrides: {\r\n input: {\r\n color: theme.textDark,\r\n '&::placeholder': {\r\n color: theme.darkTextSecondary,\r\n fontSize: '0.875rem',\r\n fontWeight: 'bold'\r\n }\r\n }\r\n }\r\n },\r\n MuiOutlinedInput: {\r\n styleOverrides: {\r\n root: {\r\n background: bgColor,\r\n borderRadius: `${theme?.customization?.borderRadius}px`,\r\n '& .MuiOutlinedInput-notchedOutline': {\r\n borderColor: theme.colors?.grey400\r\n },\r\n '&:hover $notchedOutline': {\r\n borderColor: theme.colors?.primaryLight\r\n },\r\n '&.MuiInputBase-multiline': {\r\n padding: 1\r\n }\r\n },\r\n input: {\r\n fontWeight: 500,\r\n background: bgColor,\r\n padding: '15.5px 14px',\r\n borderRadius: `${theme?.customization?.borderRadius}px`,\r\n '&.MuiInputBase-inputSizeSmall': {\r\n padding: '10px 14px',\r\n '&.MuiInputBase-inputAdornedStart': {\r\n paddingLeft: 0\r\n }\r\n }\r\n },\r\n inputAdornedStart: {\r\n paddingLeft: 4\r\n },\r\n notchedOutline: {\r\n borderRadius: `${theme?.customization?.borderRadius}px`\r\n }\r\n }\r\n },\r\n MuiSlider: {\r\n styleOverrides: {\r\n root: {\r\n '&.Mui-disabled': {\r\n color: theme.colors?.grey300\r\n }\r\n },\r\n mark: {\r\n backgroundColor: theme.paper,\r\n width: '4px'\r\n },\r\n valueLabel: {\r\n color: theme?.colors?.primaryLight\r\n }\r\n }\r\n },\r\n MuiDivider: {\r\n styleOverrides: {\r\n root: {\r\n borderColor: theme.divider,\r\n opacity: 1\r\n }\r\n }\r\n },\r\n MuiAvatar: {\r\n styleOverrides: {\r\n root: {\r\n color: theme.colors?.primaryDark,\r\n background: theme.colors?.primary200\r\n }\r\n }\r\n },\r\n MuiChip: {\r\n styleOverrides: {\r\n root: {\r\n '&.MuiChip-deletable .MuiChip-deleteIcon': {\r\n color: 'inherit'\r\n }\r\n }\r\n }\r\n },\r\n MuiTooltip: {\r\n styleOverrides: {\r\n tooltip: {\r\n color: theme.paper,\r\n background: theme.colors?.grey700\r\n }\r\n }\r\n }\r\n };\r\n}\r\n","import PropTypes from 'prop-types';\r\nimport { useEffect } from 'react';\r\nimport { useLocation } from 'react-router-dom';\r\n\r\n// ==============================|| NAVIGATION SCROLL TO TOP ||============================== //\r\n\r\nconst NavigationScroll = ({ children }) => {\r\n const location = useLocation();\r\n const { pathname } = location;\r\n\r\n useEffect(() => {\r\n window.scrollTo({\r\n top: 0,\r\n left: 0,\r\n behavior: 'smooth'\r\n });\r\n }, [pathname]);\r\n\r\n return children || null;\r\n};\r\n\r\nNavigationScroll.propTypes = {\r\n children: PropTypes.node\r\n};\r\n\r\nexport default NavigationScroll;\r\n","import { useSelector } from 'react-redux';\r\n\r\nimport { PaymentLandingPage } from 'views/payments/';\r\n\r\nimport { ThemeProvider } from '@mui/material/styles';\r\nimport { CssBaseline, StyledEngineProvider, Slide } from '@mui/material';\r\n\r\n// routing\r\nimport Routes from 'routes';\r\n\r\n// defaultTheme\r\nimport themes from 'themes';\r\n\r\n// project imports\r\nimport NavigationScroll from 'layout/NavigationScroll';\r\n\r\nimport { QueryClient, QueryClientProvider } from 'react-query';\r\n\r\nimport { SnackbarProvider } from 'notistack';\r\n\r\n// permissions\r\nimport { PermissionProvider } from 'context/permissionContext';\r\n\r\nimport { UserProvider } from 'context/userContext';\r\n\r\nimport { setLicenseKey } from '@grapecity/wijmo';\r\n\r\n// paypal\r\nimport { PayPalScriptProvider } from '@paypal/react-paypal-js';\r\n\r\nconst queryClient = new QueryClient();\r\n\r\n// ==============================|| APP ||============================== //\r\n\r\nconst App = () => {\r\n const customization = useSelector((state) => state.customization);\r\n\r\n console.log('window', window);\r\n const data = window.localStorage.getItem('CONFIG');\r\n window.CONFIG = JSON.parse(data);\r\n\r\n console.log(window.CONFIG);\r\n setLicenseKey(window.CONFIG.WIJMO_LICENSE_KEY);\r\n\r\n const initialOptions = {\r\n 'client-id': process.env.REACT_APP_PAYPAL_CLIENT_ID,\r\n currency: 'USD',\r\n intent: 'capture',\r\n components: 'buttons,marks,funding-eligibility'\r\n };\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nexport default App;\r\n","import i18n from 'i18next';\r\nimport { initReactI18next } from 'react-i18next';\r\nimport LanguageDetector from 'i18next-browser-languagedetector';\r\n\r\ni18n.use(LanguageDetector)\r\n .use(initReactI18next)\r\n .init({\r\n debug: true,\r\n fallbackLng: 'en',\r\n interpolation: {\r\n escapeValue: false\r\n },\r\n resources: {\r\n en: {\r\n translation: {\r\n Home: 'Home',\r\n Users: 'Users',\r\n Roles: 'Roles',\r\n Analytics: 'Analytics',\r\n AccountSettings: 'Account Settings',\r\n GoodMorning: 'Good Morning',\r\n GoodEvening: 'Good Evening',\r\n Dashboard: 'Dashboard',\r\n SelectLanguage: 'Select language',\r\n EnterCredsContinue: 'Enter your credentials to continue',\r\n LoginEmailUsername: 'Login with email or username',\r\n Login: 'Login',\r\n Logout: 'Logout',\r\n ForgotPassword: 'Forgot my password',\r\n DontHaveAcount: \"Don't have an account?\",\r\n LoginSuccess: 'Login successful',\r\n SomethingWrong: 'Something went wrong!',\r\n Email: 'Email',\r\n Password: 'Password',\r\n ConfirmPassword: 'Confirm password',\r\n RequiredField: 'Required field',\r\n CreateAccount: 'Create account',\r\n YourCreds: 'Enter your credentials',\r\n AcceptTerms: 'Accept terms and conditions',\r\n AcceptTermsError: 'You have to accept the terms and conditions',\r\n AlreadyAccount: 'Already have an account?',\r\n SignUp: 'Sign up',\r\n Firstname: 'Firstname',\r\n Lastname: 'Lastname',\r\n PhoneNumber: 'Phone number',\r\n PasswordsNotMatching: 'Passwords do not match',\r\n InvalidDate: 'Invalid date',\r\n InvalidPhone: 'Invalid phone',\r\n InvalidEmail: 'Invalid email',\r\n SiteUnavailable: 'Site is temporarily unavailable :(',\r\n PageNotFound: 'Page not found :(',\r\n PageUnderConstruction: '🚚 Page is under construction 🚚',\r\n SelectTransactionsStep: 'Athlete Selection',\r\n SelectPaymentMethodStep: 'Payment Method',\r\n PaymentDetailsStep: 'Payment Details',\r\n PaymentReviewStep: 'Transaction Result'\r\n }\r\n },\r\n gre: {\r\n translation: {\r\n Home: 'Αρχική',\r\n Users: 'Χρήστες',\r\n Roles: 'Ρολοι',\r\n Analytics: 'Aναλυτικά στοιχεία',\r\n AccountSettings: 'Ρυθμίσεις λογαριασμού',\r\n GoodMorning: 'Καλημέρα',\r\n GoodEvening: 'Καλησπέρα',\r\n Dashboard: 'Ταμπλό',\r\n SelectLanguage: 'Επιλογή γλώσσας',\r\n EnterCredsContinue: 'Εισάγεται τα στοιχεία σας για να συνεχίσετε',\r\n LoginEmailUsername: 'Σύνδεση μέσω Email ή Όνομα Χρήστη',\r\n Login: 'Σύνδεση',\r\n Logout: 'Αποσύνδεση',\r\n ForgotPassword: 'Ξέχασα τον κωδικό μου',\r\n DontHaveAcount: 'Δεν έχετε λογαριασμό;',\r\n LoginSuccess: 'Επιτυχία σύνδεσης',\r\n SomethingWrong: 'Κάτι πήγε λάθος',\r\n Email: 'Δ/νση Ηλ. Ταχυδρομίου',\r\n Password: 'Κωδικός πρόσβασης',\r\n ConfirmPassword: 'Επιβεβαιώση κωδικού πρόσβασης',\r\n RequiredField: 'Υπορχρεωτικό πεδίο',\r\n CreateAccount: 'Δημιουργία λογαριασμού',\r\n YourCreds: 'Καταχωρήστε τα στοιχεία σας',\r\n AcceptTerms: 'Αποδεχθείτε τους όρους χρήσης',\r\n AcceptTermsError: 'Πρέπει να αποδεχθείτε τους όρους χρήσης',\r\n AlreadyAccount: 'Έχετε ήδη λογαριασμό;',\r\n SignUp: 'Εγγραφή',\r\n Firstname: 'Όνομα',\r\n Lastname: 'Επώνυμο',\r\n PhoneNumber: 'Αριθμός τηλεφώνου',\r\n PasswordsNotMatching: 'Οι κωδικοί δεν ταιριάζουν',\r\n InvalidDate: 'Μη έγκυρη ημερομηνία',\r\n InvalidPhone: 'Μη έγκυρος αριθμός τηλεφώνου',\r\n InvalidEmail: 'Μη έγκυρο email',\r\n SiteUnavailable: 'Η ιστοσελίδα είναι προσωρινά μη διαθέσιμη :(',\r\n PageNotFound: 'Η σελίδα δεν βρέθηκε :(',\r\n PageUnderConstruction: '🚚 Η σελίδα είναι υπό κατασκευή 🚚',\r\n SelectTransactionsStep: 'Επιλογή Αθλητών',\r\n SelectPaymentMethodStep: 'Επιλογή Μεθόδου Πληρωμής',\r\n PaymentDetailsStep: 'Λεπτομέρειες Πληρωμής',\r\n PaymentReviewStep: 'Αναφορά Πληρωμής'\r\n }\r\n }\r\n }\r\n });\r\n\r\nexport default i18n;\r\n","import ReactDOM from 'react-dom';\r\n\r\n// third party\r\nimport { BrowserRouter } from 'react-router-dom';\r\nimport { Provider } from 'react-redux';\r\nimport { PersistGate } from 'redux-persist/integration/react';\r\n\r\n// project imports\r\nimport * as serviceWorker from 'serviceWorker';\r\nimport App from 'App';\r\nimport { store, persistor } from 'store';\r\nimport './assets/main.css';\r\n\r\n// style + assets\r\nimport 'assets/scss/style.scss';\r\nimport '@grapecity/wijmo.styles/wijmo.css';\r\n\r\n// i18n\r\nimport './i18n';\r\n\r\nimport '@qubiteq/datagrid/dist/datagrid.cjs.development.css';\r\n\r\n/* eslint-disable */\r\n// ==============================|| REACT DOM RENDER ||============================== //\r\n\r\nReactDOM.render(\r\n \r\n \r\n \r\n \r\n \r\n \r\n ,\r\n document.getElementById('root')\r\n);\r\n\r\n// If you want your app to work offline and load faster, you can change\r\n// unregister() to register() below. Note this comes with some pitfalls.\r\n// Learn more about service workers: https://bit.ly/CRA-PWA\r\nserviceWorker.unregister();\r\n","/* eslint-disable jsx-a11y/accessible-emoji */\r\nimport React, { useState } from 'react';\r\nimport { Dropdown } from '@qubiteq/qublib';\r\nimport { PayPalButtons, usePayPalScriptReducer, PayPalMarks } from '@paypal/react-paypal-js';\r\n\r\nconst Checkout = () => {\r\n const [{ options, isPending }, dispatch] = usePayPalScriptReducer();\r\n const [currency, setCurrency] = useState(options.currency);\r\n const fundingSources = ['paypal', 'card', 'paylater'];\r\n const [selectedFundingSource, setSelectedFundingSource] = useState(fundingSources[0]);\r\n\r\n const onCurrencyChange = ({ target: { value } }) => {\r\n setCurrency(value);\r\n dispatch({\r\n type: 'resetOptions',\r\n value: {\r\n ...options,\r\n currency: value\r\n }\r\n });\r\n };\r\n\r\n const onCreateOrder = (data, actions) => {\r\n return actions.order.create({\r\n purchase_units: [\r\n {\r\n amount: {\r\n value: '20.70'\r\n }\r\n }\r\n ]\r\n });\r\n };\r\n\r\n const onApproveOrder = (data, actions) => {\r\n return actions.order.capture().then((details) => {\r\n console.log(details);\r\n const name = details.payer.name.given_name;\r\n alert(`Transaction completed by ${name}`);\r\n });\r\n };\r\n\r\n const onChange = ({ target: { value } }) => {\r\n setSelectedFundingSource(value);\r\n };\r\n return (\r\n \r\n {isPending ? (\r\n
LOADING...
\r\n ) : (\r\n <>\r\n
\r\n
onCreateOrder(data, actions)}\r\n onApprove={(data, actions) => onApproveOrder(data, actions)}\r\n />\r\n >\r\n )}\r\n \r\n );\r\n};\r\n\r\nexport default Checkout;\r\n","// project imports\r\nimport MainCard from 'ui-component/cards/MainCard';\r\nimport Checkout from './Checkout/Chekcout';\r\n\r\n// ==============================|| PAYMENTS ||============================== //\r\n\r\nexport const PaymentLandingPage = () => (\r\n \r\n \r\n \r\n);\r\n\r\nexport default PaymentLandingPage;\r\n","import axios from 'axios';\r\nimport { store } from 'store';\r\nimport { LOGOUT, REFRESH_TOKEN } from 'store/actions';\r\nimport moment from 'moment';\r\n/* eslint-disable import/no-cycle */\r\n/* eslint-disable no-underscore-dangle */\r\nimport { refreshToken } from 'apis/controllers/auth';\r\n\r\nconst axiosInstance = axios.create({\r\n withCredentials: true,\r\n baseURL: process.env.REACT_APP_BASE_URL\r\n});\r\n\r\naxiosInstance.interceptors.request.use((config) => {\r\n if (config.data) {\r\n Object.keys(config.data).forEach(async (key) => {\r\n // Find a valid date object and format it\r\n if (config.data[key] instanceof Date && !Number.isNaN(config.data[key])) {\r\n config.data[key] = moment(config.data[key]).format('YYYY-MM-DDTHH:mm');\r\n }\r\n });\r\n }\r\n const state = store.getState();\r\n config.headers = {\r\n ...config.headers,\r\n Authorization: `Bearer ${state.auth.token}`\r\n };\r\n return config;\r\n});\r\n\r\naxiosInstance.interceptors.response.use(\r\n (response) => {\r\n return response;\r\n },\r\n async (error) => {\r\n console.log('error', error);\r\n const originalRequest = error.config;\r\n if (error?.message === 'Network Error') {\r\n const errorObject = {\r\n response: {\r\n message: error.message,\r\n status: 503\r\n }\r\n };\r\n return Promise.reject(errorObject);\r\n }\r\n if (error?.response?.status === 453 && !originalRequest._retry) {\r\n const { dispatch } = store;\r\n dispatch({ type: LOGOUT });\r\n }\r\n if (error?.response?.status === 401 && !originalRequest._retry) {\r\n const state = store.getState();\r\n const { dispatch } = store;\r\n originalRequest._retry = true;\r\n try {\r\n const refreshResponse = await refreshToken({\r\n refreshToken: state.auth.refreshToken\r\n });\r\n dispatch({ type: REFRESH_TOKEN, payload: refreshResponse });\r\n return axiosInstance(originalRequest);\r\n } catch (ex) {\r\n return Promise.reject(error);\r\n }\r\n }\r\n return Promise.reject(error);\r\n }\r\n);\r\n\r\nexport default axiosInstance;\r\n","const config = {\r\n basename: '',\r\n defaultPath: '/',\r\n fontFamily: `'Roboto', sans-serif`,\r\n language: 'en',\r\n borderRadius: 12\r\n};\r\n\r\nexport default config;\r\n","// theme constant\r\nexport const gridSpacing = 3;\r\nexport const drawerWidth = 260;\r\nexport const appDrawerWidth = 320;\r\n"],"sourceRoot":""}