{"version":3,"sources":["auth/Auth.js","views/workflowmanagement/WorkflowConfig.js","views/workordersmanagement/WorkordersConfig.js","views/warehousemanagement/WarehouseConfig.js","views/stockmanagement/StockConfig.js","views/customermanagement/CustomerConfig.js","views/productmanagement/ProductConfig.js","views/accountmanagement/AccountConfig.js","views/dealermanagement/DealerConfig.js","views/templatemanagement/TemplateConfig.js","views/guaranteemanagement/GuaranteeConfig.js","Router.js","components/@vuexy/rippleButton/RippleButton.js","App.js","redux/withReducer.js","utility/context/Permission.js","components/@vuexy/spinner/Loading-spinner.js"],"names":["AuthService","jwtService","Auth","children","useState","waitAuthCheck","setWaitAuthCheck","dispatch","useDispatch","location","useLocation","auth","useSelector","login","useEffect","Promise","all","jwtCheck","then","resolve","on","signInWithToken","user","AuthActions","pathname","path","history","push","catch","error","message","document","removeEventListener","startsWith","emit","locked","type","init","Fragment","WorkflowConfig","routes","component","React","lazy","WorkordersConfig","WarehouseConfig","StockConfig","CustomerConfig","ProductConfig","AccountConfig","DealerConfig","TemplateConfig","GuaranteeConfig","routeConfigs","Home","loginActivate","ServiceRegister","CustomerRegister","RegisterHome","forgot_password","lock_screen","accountSettings","roleManagement","permissionManagement","customizationManagement","calendarManagement","UserCreate","UserList","ProductList","SellerList","WorkorderList","WorkorderCreate","AppRoute","withReducer","reducer","connect","state","userRole","Component","fullLayout","centeredLayout","permission","rest","render","props","Consumer","context","LayoutTag","activeLayout","horizontalLayout","VerticalLayout","fallback","AppRouter","ref","idleTimer","timeout","onActive","args","onIdle","onAction","debounce","Permission","exact","Utils","generateRoutesFromConfigs","map","item","key","position","Button","Ripple","rippleColor","during","block","color","className","App","Router","WrappedComponent","injectReducer","this","PureComponent","PermissionContext","createContext","userPermissions","checkPermission","PermissionContextProvider","currentUser","permissions","Provider","value","anyOne","isValid","Array","isArray","length","i","includes","usePermissionContext","useContext","ComponentSpinner"],"mappings":"oSAkGO,IAAMA,EAAcC,IAEZC,EA5Ff,YAA6B,IAAbC,EAAY,EAAZA,SAEd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AAuB,WACzB,OAAOC,qBAAWjB,K,2GCnDhBkB,G,mKACJ,WACE,OACE,yBAAKzB,UAAU,oBACb,yBAAKA,UAAU,4BACb,yBAAKA,UAAU,qBACf,yBAAKA,UAAU,qBACf,yBAAKA,UAAU,2B,GAPMzE,IAAMoC,YActB8D,O","file":"static/js/45.5d2bdefe.chunk.js","sourcesContent":["import React, {useState, useEffect} from 'react'\nimport * as AuthActions from '../redux/actions/auth/loginActions';\nimport {history} from \"../history\"\nimport {useLocation} from \"react-router-dom\";\nimport Spinner from '../components/@vuexy/spinner/Loading-spinner';\nimport jwtService from '../services/jwtService';\nimport {useDispatch, useSelector} from \"react-redux\";\n\nfunction Auth({ children }) {\n\n const [waitAuthCheck, setWaitAuthCheck] = useState(true);\n const dispatch = useDispatch();\n const location = useLocation();\n\n const auth = useSelector(({auth}) => {\n return auth ? auth.login : {};\n });\n\n useEffect(() => {\n Promise.all([\n jwtCheck()\n ]).then(() => {\n setWaitAuthCheck(false);\n })\n }, [])\n\n const jwtCheck = () => new Promise(resolve => {\n\n jwtService.on('onAutoLogin', () => {\n /**\n * Sign in and retrieve user data from Api\n */\n jwtService.signInWithToken()\n .then(user => {\n dispatch(AuthActions.setUserData(user))\n if (location.pathname === \"/login\") {\n if (user.path) {\n history.push(user.path);\n } else {\n history.push('/notfountinitialpage');\n }\n }\n resolve();\n })\n .catch(error => {\n //this.props.showMessage({message: error});\n\n resolve();\n })\n });\n\n jwtService.on('onAutoLogout', (message) => {\n dispatch(AuthActions.logout())\n resolve();\n });\n\n jwtService.on('permissionDenied', (message) => {\n document.removeEventListener(\"permissionDenied\", null, false);\n resolve();\n });\n\n jwtService.on('onNoAccessToken', () => {\n if (location.pathname.startsWith('/login/activate')) {\n return resolve();\n }\n history.push({\n pathname: '/login'\n });\n resolve();\n });\n\n jwtService.on('onLogoutFailed', () => {\n // TODO: Toaster show error\n });\n\n jwtService.on('changedUserInfo', () => {\n jwtService.emit('onAutoLogin');\n });\n\n jwtService.on('onIdleTimeout', () => {\n if (!auth.locked && !location.pathname.startsWith('/login') && !location.pathname.startsWith('/forgotPassword')) {\n dispatch({\n type: AuthActions.LOCK_USER\n })\n if (location.pathname != \"/lockscreen\" && !location.pathname.startsWith('/login') && !location.pathname.startsWith('/forgotPassword')) {\n history.push('/lockscreen');\n }\n }\n });\n\n jwtService.init();\n\n return Promise.resolve();\n });\n\n return waitAuthCheck ? : ;\n}\n\nexport const AuthService = jwtService;\n\nexport default Auth;\n","import React from 'react'\n\nexport const WorkflowConfig = {\n routes: [\n {\n path: \"/workflow/create\",\n component: React.lazy(() => import('./WorkflowCreateScreen'))\n },\n {\n path: \"/workflow/edit/:workflowId\",\n component: React.lazy(() => import('./WorkflowCreateScreen'))\n },\n {\n path: \"/workflow/list\",\n component: React.lazy(() => import('./WorkflowListScreen'))\n }\n ]\n};\n\n","import React from 'react'\n\nexport const WorkordersConfig = {\n routes: [\n {\n path: \"/workorder/create\",\n component: React.lazy(() => import('./WorkorderCreateScreen'))\n },\n {\n path: \"/workorder/edit/:workorderId\",\n component: React.lazy(() => import('./WorkorderCreateScreen'))\n },\n {\n path: \"/workorder/show/:workorderId\",\n component: React.lazy(() => import('./WorkorderShowScreen'))\n },\n {\n path: \"/workorder/list\",\n component: React.lazy(() => import('./WorkorderListScreen'))\n }\n ]\n};\n","import React from 'react'\n\nexport const WarehouseConfig = {\n routes: [\n {\n path: \"/warehouse/create\",\n component: React.lazy(() => import('./WarehouseCreateScreen'))\n },\n {\n path: \"/warehouse/edit/:warehouseId\",\n component: React.lazy(() => import('./WarehouseCreateScreen'))\n },\n {\n path: \"/warehouse/list\",\n component: React.lazy(() => import('./WarehouseListScreen'))\n }\n ]\n};\n","import React from 'react'\n\nexport const StockConfig = {\n routes: [\n {\n path: \"/stock/edit/:actionType\",\n component: React.lazy(() => import('./StockEditScreen'))\n },\n {\n path: \"/stock/list\",\n component: React.lazy(() => import('./StockListScreen'))\n }\n ]\n};\n","import React from 'react'\n\nexport const CustomerConfig = {\n routes: [\n {\n path: \"/customer/create\",\n component: React.lazy(() => import('./CustomerForm'))\n },\n {\n path: \"/customer/edit/:customerId\",\n component: React.lazy(() => import('./CustomerForm'))\n },\n {\n path: \"/customer/list\",\n component: React.lazy(() => import('./CustomerListScreen'))\n }\n ]\n};\n","import React from 'react'\n\nexport const ProductConfig = {\n routes: [\n {\n path: \"/product/create\",\n component: React.lazy(() => import('./ProductCreateScreen'))\n },\n {\n path: \"/product/edit/:productId\",\n component: React.lazy(() => import('./ProductCreateScreen'))\n },\n {\n path: \"/product/list\",\n component: React.lazy(() => import('./ProductListScreen'))\n }\n ]\n};\n","import React from 'react'\n\nexport const AccountConfig = {\n routes: [\n {\n path: \"/account/create\",\n component: React.lazy(() => import('./AccountForm'))\n },\n {\n path: \"/account/edit/:accountId\",\n component: React.lazy(() => import('./AccountForm'))\n },\n {\n path: \"/account/list\",\n component: React.lazy(() => import('./AccountListScreen'))\n }\n ]\n};\n","import React from 'react'\n\nexport const DealerConfig = {\n routes: [\n {\n path: \"/dealer/create\",\n component: React.lazy(() => import('./DealerCreateScreen'))\n },\n {\n path: \"/dealer/edit/:dealerId\",\n component: React.lazy(() => import('./DealerCreateScreen'))\n },\n {\n path: \"/dealer/list\",\n component: React.lazy(() => import('./DealerListScreen'))\n }\n ]\n};\n","import React from 'react'\n\nexport const TemplateConfig = {\n routes: [\n // {\n // path: \"/template/create\",\n // component: React.lazy(() => import('./TemplateCreateScreen'))\n // },\n // {\n // path: \"/template/edit/:templateId\",\n // component: React.lazy(() => import('./TemplateCreateScreen'))\n // },\n {\n path: \"/templates/list\",\n component: React.lazy(() => import('./TemplateListScreen'))\n }\n ]\n};\n","import React from 'react'\n\nexport const GuaranteeConfig = {\n routes: [\n {\n path: \"/guarantee/list\",\n component: React.lazy(() => import('./GuaranteeListScreen'))\n }\n ]\n};\n","import React, {Suspense, lazy} from \"react\"\nimport {Router, Switch, Route} from \"react-router-dom\"\nimport IdleTimer from 'react-idle-timer'\nimport {history} from \"./history\"\nimport {connect} from \"react-redux\"\nimport Spinner from \"./components/@vuexy/spinner/Loading-spinner\"\nimport {ContextLayout} from \"utility/context/Layout\"\nimport Auth, {AuthService} from \"./auth/Auth\";\nimport Utils from 'utility/Utils';\nimport withReducer from \"./redux/withReducer\";\nimport reducer from \"./redux/reducers/auth\"\nimport {ToastContainer} from 'react-toastify'\nimport \"react-toastify/dist/ReactToastify.css\"\nimport \"react-table/react-table.css\"\nimport \"assets/scss/plugins/extensions/react-tables.scss\"\nimport \"assets/scss/plugins/extensions/react-paginate.scss\"\nimport \"assets/scss/pages/data-list.scss\"\nimport {PermissionContextProvider} from 'utility/context/Permission'\n\nimport {WorkflowConfig} from './views/workflowmanagement/WorkflowConfig'\nimport {WorkordersConfig} from './views/workordersmanagement/WorkordersConfig'\nimport {WarehouseConfig} from './views/warehousemanagement/WarehouseConfig'\nimport {StockConfig} from './views/stockmanagement/StockConfig'\nimport {CustomerConfig} from './views/customermanagement/CustomerConfig'\nimport {ProductConfig} from './views/productmanagement/ProductConfig'\nimport {AccountConfig} from './views/accountmanagement/AccountConfig'\nimport {DealerConfig} from './views/dealermanagement/DealerConfig'\nimport {TemplateConfig} from './views/templatemanagement/TemplateConfig'\nimport {GuaranteeConfig} from './views/guaranteemanagement/GuaranteeConfig'\n\nconst routeConfigs = [\n WorkflowConfig,\n StockConfig,\n WorkordersConfig,\n CustomerConfig,\n ProductConfig,\n AccountConfig,\n DealerConfig,\n WarehouseConfig,\n TemplateConfig,\n GuaranteeConfig\n];\n\n// Route-based code splitting\nconst Home = lazy(() =>\n import(\"./views/dashboard/Home\")\n)\n\nconst login = lazy(() =>\n import(\"./views/authentication/login/Login\")\n)\n\nconst loginActivate = lazy(() => import(\"./views/authentication/activate/Activate\"));\nconst ServiceRegister = lazy(() => import(\"./views/authentication/register/ServiceRegister\"));\nconst CustomerRegister = lazy(() => import(\"./views/authentication/register/ServiceRegister\"));\nconst RegisterHome = lazy(() => import(\"./views/authentication/register/RegisterHome\"));\n\nconst forgot_password = lazy(() =>\n import(\"./views/authentication/login/ForgotPassword\")\n)\n\nconst lock_screen = lazy(() => import(\"./views/authentication/login/LockScreen\"))\n\nconst accountSettings = lazy(() =>\n import(\"./views/accountsettings/AccountSettings\")\n)\n\nconst roleManagement = lazy(() =>\n import(\"./views/rolemanagement/RoleManagement\")\n)\n\nconst permissionManagement = lazy(() =>\n import(\"./views/permissionmanagement/PermissionManagement\")\n)\n\nconst customizationManagement = lazy(() =>\n import(\"./views/customizationmanagement/CustomizationManagement\")\n)\n\nconst calendarManagement = lazy(() =>\n import(\"./views/calendarManagement/CalendarScreen\")\n)\n\nconst UserCreate = lazy(() => import('./views/usermanagement/UserCreateScreen'));\nconst UserList = lazy(() => import('./views/usermanagement/UserListScreen'));\nconst ProductList = lazy(() => import(\"./views/productmanagement/ProductListScreen\"));\nconst SellerList = lazy(() => import(\"./views/sellermanagement/SellerListScreen\"));\nconst WorkorderList = lazy(() => import('./views/workordersmanagement/WorkorderListScreen'));\nconst WorkorderCreate = lazy(() => import('./views/workordersmanagement/WorkorderCreateScreen'));\n\n// Set Layout and Component Using App Route\nconst RouteConfig = (\n {\n component: Component,\n fullLayout,\n permission,\n centeredLayout,\n user,\n ...rest\n }) => (\n {\n return (\n \n {context => {\n let LayoutTag =\n fullLayout === true\n ? context.fullLayout\n : context.state.activeLayout === \"horizontal\"\n ? context.horizontalLayout\n : context.VerticalLayout\n return (\n \n }>\n \n \n \n )\n }}\n \n )\n }}\n />);\n\nconst mapStateToProps = state => {\n return {\n user: state.auth.login.userRole\n }\n}\n\nconst AppRoute = withReducer(\"routerReducer\", reducer)(connect(mapStateToProps)(RouteConfig))\n\nclass AppRouter extends React.Component {\n render() {\n return (\n // Set the directory path if you are deploying in sub-folder\n \n \n {\n this.idleTimer = ref\n }}\n timeout={600000} //10 minutes\n onActive={(...args) => {\n AuthService.emit('onIdleActive', ...args)\n }}\n onIdle={(...args) => {\n AuthService.emit('onIdleTimeout', ...args)\n }}\n onAction={(...args) => {\n AuthService.emit('onIdleAction', ...args)\n }}\n debounce={250}\n />\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n {Utils.generateRoutesFromConfigs(routeConfigs).map(item => {\n return \n })}\n \n \n \n \n \n )\n }\n}\n\nexport default AppRouter\n","import React from \"react\"\nimport PropTypes from \"prop-types\"\nimport { Button } from \"reactstrap\"\nimport Ripples from \"react-ripples\"\n\nconst RippleButton = ({ rippleColor, during, block, ...rest }) => (\n \n