{"version":3,"sources":["services/ServiceConstants.js","services/baseService.js","helpers/authUtils.js","redux/auth/actions.js","helpers/ISMHelpers.js","redux/ism/ismactions.js","constants/actionTypes.js","services/ISMServices.js","routes.js","App.js","serviceWorker.js","redux/auth/reducers.js","redux/ism/reducers.js","redux/reducers.js","services/ServiceHelper.js","redux/auth/saga.js","redux/ism/saga.js","redux/sagas.js","redux/store.js","index.js"],"names":["__webpack_require__","d","__webpack_exports__","GET_HOSPITAL_FACILITIES","GET_OUTPATIENT_ORDERS","GET_HOSPITAL_FACILITIES_CLINICS","PRINT_ORDER","GET_HOSPITAL_PRINTERS","SAVE_FLAG","USER_LOGIN","API_SAVE_ISM_DEVICECLINIC","API_GET_ISM_DEVICECLINIC","VIEW_PRESCRIPTION","baseURL","ServiceToken","FetchData","FetchDataOldAPI","jquery__WEBPACK_IMPORTED_MODULE_0__","jquery__WEBPACK_IMPORTED_MODULE_0___default","n","RequestMethod","RequestData","reqBody","FormData","append","$","ajax","type","beforeSend","request","setRequestHeader","url","data","processData","contentType","isUserAuthenticated","getLoggedInUser","getCurrentFacility","getCurrentClinic","getCurrentPrinter","getCurrentPrinterPath","getUserPicture","react_cookie__WEBPACK_IMPORTED_MODULE_1__","user","console","log","Cookies","get","JSON","parse","UserPicture","localStorage","getItem","facility","printer","printerPath","clinic","loginUser","loginUserSuccess","loginUserFailed","registerUser","registerUserSuccess","registerUserFailed","logoutUser","forgetPasswordSuccess","forgetPasswordFailed","_constants_actionTypes__WEBPACK_IMPORTED_MODULE_0__","username","password","LOGIN_USER","payload","LOGIN_USER_SUCCESS","error","LOGIN_USER_FAILED","fullname","email","REGISTER_USER","REGISTER_USER_SUCCESS","REGISTER_USER_FAILED","history","LOGOUT_USER","passwordResetStatus","FORGET_PASSWORD_SUCCESS","FORGET_PASSWORD_FAILED","SetPreferences","userpreference","expires","Date","setDate","now","cookies","set","stringify","path","maxAge","savePreference","loadPreference","savePreferenceSuccess","savePreferenceFailed","SAVE_PREFERENCE","hostname","LOAD_PREFERENCE","SAVE_PREFERENCE_SUCCESS","SAVE_PREFERENCE_FAILED","FORGET_PASSWORD","LOAD_PREFERENCE_SUCCESS","LOAD_PREFERENCE_FAILED","SEND_EMAIL","SEND_EMAIL_SUCCESS","SEND_EMAIL_FAILED","keymirror__WEBPACK_IMPORTED_MODULE_0__","keyMirror","HIDE_MODAL","SHOW_MODAL","GetHospitalFacilityList","SaveFlag","GetOutpatientOrders","GetHospitalFacilityClinicsList","PrintOrderAPI","GetHospitalPrinters","ViewPrescriptionAPI","_baseService__WEBPACK_IMPORTED_MODULE_0__","_ServiceConstants__WEBPACK_IMPORTED_MODULE_1__","result","resolve","reject","done","response","ResponseResult","requestData","Dashboard","React","lazy","Promise","all","e","then","bind","Login","Logout","ForgetPassword","Register","ConfirmAccount","PrivateRoute","_ref","Component","component","roles","rest","Object","objectWithoutProperties","react_default","a","createElement","react_router","assign","render","props","to","pathname","state","from","location","loggedInUser","indexOf","role","routes","name","route","Route","exact","loading","NonAuthLayout","Loadable","loader","loaded","default","AuthLayout","withLayout","WrappedComponent","HOC","_Component","classCallCheck","this","possibleConstructorReturn","getPrototypeOf","apply","arguments","inherits","createClass","key","value","connect","App","getLayout","_this2","react_router_dom","Fragment","map","index","Layout","react","fallback","dist_default","isAuthenticated","Auth","Boolean","window","match","INIT_STATE","length","undefined","action","objectSpread","ISM","combineReducers","fetchJSONUsingPOST","options","body","method","headers","_token","fetch","status","json","catch","login","logout","register","forgetPassword","watchLoginUser","watchLogoutUser","watchRegisterUser","watchForgetPassword","authSaga","fetchJSON","setSession","remove","setUserPicture","setItem","_ref$payload","responsefromAPI","message","regenerator_default","wrap","_context","prev","next","call","UserID","Password","sent","LoginStatusID","id","firstName","CSSAUserModel","Name","lastName","Role","ComputerName","UserPictureExists","token","put","t0","t1","abrupt","stop","_marked","_ref2","_context2","push","_marked2","_ref3","_ref3$payload","_response","_message","_context3","Content-Type","_marked3","_ref4","_response2","_message2","_context4","_marked4","_context5","takeEvery","_marked5","_context6","_marked6","_context7","_marked7","_context8","_marked8","_context9","fork","_marked9","SaveUserPreference","LoadUserPreference","SendEmail","watchSavePreference","watchLoadPreference","watchEmail","ismSaga","clinics","temp_clinic","o","CLINICID","DEVICEID","PRINTERNAME","FACILITYID","Clinics","saga_marked","_responsefromAPI","_clinics","_temp_clinic","_data","datax","label","CLINICNAME","PRINTERPATH","FacilityName","saga_marked2","saga_marked3","saga_marked4","saga_marked5","saga_marked6","saga_marked7","rootSaga","getState","sagas_marked","sagaMiddleware","createSagaMiddleware","middlewares","ReactDOM","es","store","initialState","composeEnhancers","__REDUX_DEVTOOLS_EXTENSION_COMPOSE__","compose","createStore","reducers","applyMiddleware","run","sagas","configureStore","src_App","document","getElementById","navigator","serviceWorker","ready","registration","unregister"],"mappings":"yFAAAA,EAAAC,EAAAC,EAAA,sBAAAC,IAAAH,EAAAC,EAAAC,EAAA,sBAAAE,IAAAJ,EAAAC,EAAAC,EAAA,sBAAAG,IAAAL,EAAAC,EAAAC,EAAA,sBAAAI,IAAAN,EAAAC,EAAAC,EAAA,sBAAAK,IAAAP,EAAAC,EAAAC,EAAA,sBAAAM,IAAAR,EAAAC,EAAAC,EAAA,sBAAAO,IAAAT,EAAAC,EAAAC,EAAA,sBAAAQ,IAAAV,EAAAC,EAAAC,EAAA,sBAAAS,IAAAX,EAAAC,EAAAC,EAAA,sBAAAU,IAEO,IAAMT,EACX,2CAEWC,EAAwB,8BAExBC,EACX,iDAEWC,EAAc,2CAEdC,EAAwB,uCACxBC,EAAY,+BAEZC,EAAa,mBAEbC,EAA4B,kCAC5BC,EAA2B,iCAG3BC,EAAoB,oECrBjCZ,EAAAC,EAAAC,EAAA,sBAAAW,IAAAb,EAAAC,EAAAC,EAAA,sBAAAY,IAAAd,EAAAC,EAAAC,EAAA,sBAAAa,IAAAf,EAAAC,EAAAC,EAAA,sBAAAc,IAAA,IAAAC,EAAAjB,EAAA,IAAAkB,EAAAlB,EAAAmB,EAAAF,GAEaJ,EAAU,4CAKVC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\n\r\nexport const GET_HOSPITAL_FACILITIES =\r\n \"HISSharedManager.GetHospitalFacilityList\";\r\n\r\nexport const GET_OUTPATIENT_ORDERS = \"ISMManager.GetWorklistQueue\";\r\n\r\nexport const GET_HOSPITAL_FACILITIES_CLINICS =\r\n \"HISSharedManager.GetHospitalFacilityClinicList\";\r\n\r\nexport const PRINT_ORDER = \"PrintManager.PrintOutpatientPrescription\";\r\n\r\nexport const GET_HOSPITAL_PRINTERS = \"HISSharedManager.GetHospitalPrinters\";\r\nexport const SAVE_FLAG = \"ISMManager.SaveISMOrderQueue\";\r\n\r\nexport const USER_LOGIN = \"ISMManager.Login\";\r\n\r\nexport const API_SAVE_ISM_DEVICECLINIC = \"ISMManager.SaveISMDeviceClinics\";\r\nexport const API_GET_ISM_DEVICECLINIC = \"ISMManager.GetISMDeviceClinics\";\r\nexport const API_GET_COMPUTER_NAME = \"ISMManager.GetComputerName\";\r\n\r\nexport const VIEW_PRESCRIPTION = \"PrintManager.PatientPrescription\";//Added by MA on 15-5-2020\r\n\r\n","import $ from \"jquery\";\r\n\r\nexport const baseURL = \"https://hisapimpwebconnectxyz.aku.edu/api\";\r\n//export const baseURL = \"http://localhost:33158/api\";\r\nconst baseURLOLDAPI = \"https://mypatientswebapi.aku.edu/api/CPOE\";\r\n//const baseURLOLDAPI = \"http://localhost:33158/api/CPOE\";\r\n\r\nexport const ServiceToken =\r\n \"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhdWQiOiJ3d3cuYWt1LmVkdSIsInN1YiI6Im1ubUBtbm0uY29tIiwiaXNzIjoiTW5NIn0.PRbF6RNmjYm7ai8jQNShBmyDLlZfIWv2Z6V2KosJgjE\";\r\n\r\nexport let FetchData = (RequestMethod, RequestData) => {\r\n var reqBody = new FormData();\r\n reqBody.append(\"RequestMethod\", RequestMethod);\r\n reqBody.append(\"RequestData\", RequestData);\r\n\r\n return $.ajax({\r\n type: \"POST\",\r\n beforeSend: function (request) {\r\n request.setRequestHeader(\"_token\", ServiceToken);\r\n },\r\n url: baseURL,\r\n data: reqBody,\r\n processData: false,\r\n contentType: false,\r\n });\r\n};\r\n\r\nexport let FetchDataOldAPI = (RequestMethod, RequestData) => {\r\n var reqBody = new FormData();\r\n reqBody.append(\"requestmethod\", RequestMethod);\r\n reqBody.append(\"requestdata\", RequestData);\r\n\r\n return $.ajax({\r\n type: \"POST\",\r\n beforeSend: function (request) {\r\n request.setRequestHeader(\"_token\", ServiceToken);\r\n },\r\n url: baseURLOLDAPI,\r\n data: reqBody,\r\n processData: false,\r\n contentType: false,\r\n });\r\n};\r\n","import jwtDecode from \"jwt-decode\";\nimport { Cookies } from \"react-cookie\";\n\n/**\n * Checks if user is authenticated\n */\nconst isUserAuthenticated = () => {\n\n const user = getLoggedInUser();\n console.log(\"user: \", user);\n if (!user) {\n return false;\n }\n\n // const decoded = jwtDecode(user.token);\n\n // const currentTime = Date.now() / 1000;\n // if (decoded.exp < currentTime) {\n // console.warn(\"access token expired\");\n // return false;\n // } else {\n // return true;\n // }\n\n return true;\n};\n\n/**\n * Returns the logged in user\n */\nconst getLoggedInUser = () => {\n const cookies = new Cookies();\n const user = cookies.get(\"user\");\n return user ? (typeof user == \"object\" ? user : JSON.parse(user)) : null;\n};\n\nconst getUserPicture = () => {\n const UserPicture = localStorage.getItem(\"UserPicture\");\n return typeof UserPicture == \"string\" ? UserPicture : \"\";\n};\nconst getCurrentFacility = () => {\n const cookies = new Cookies();\n const facility = cookies.get(\"facility\");\n let response = facility\n ? typeof facility == \"object\"\n ? facility\n : JSON.parse(facility)\n : null;\n\n return response;\n};\nconst getCurrentPrinter = () => {\n const cookies = new Cookies();\n const printer = cookies.get(\"printer\");\n\n return typeof printer == \"string\" ? printer : \"\";\n};\n\nconst getCurrentPrinterPath = () => {\n const cookies = new Cookies();\n const printerPath = cookies.get(\"printerPath\");\n\n return typeof printerPath == \"string\" ? printerPath : \"\";\n};\n\nconst getCurrentClinic = () => {\n const cookies = new Cookies();\n const clinic = cookies.get(\"clinic\");\n\n return clinic\n ? typeof clinic == \"object\"\n ? clinic\n : JSON.parse(clinic)\n : null;\n};\n\nexport {\n isUserAuthenticated,\n getLoggedInUser,\n getCurrentFacility,\n getCurrentClinic,\n getCurrentPrinter,\n getCurrentPrinterPath,\n getUserPicture\n};\n","// @flow\nimport {\n LOGIN_USER,\n LOGIN_USER_SUCCESS,\n LOGIN_USER_FAILED,\n LOGOUT_USER,\n REGISTER_USER,\n REGISTER_USER_SUCCESS,\n REGISTER_USER_FAILED,\n FORGET_PASSWORD,\n FORGET_PASSWORD_SUCCESS,\n FORGET_PASSWORD_FAILED\n} from \"../../constants/actionTypes\";\n\n/*type AuthAction = { type: string, payload: {} | string };*/\n\nexport const loginUser = (username/*: string*/, password/*: string*/)/*: AuthAction*/ => ({\n type: LOGIN_USER,\n payload: { username, password }\n});\n\nexport const loginUserSuccess = (user/*: string*/)/*: AuthAction*/ => ({\n type: LOGIN_USER_SUCCESS,\n payload: user\n});\n\nexport const loginUserFailed = (error/*: string*/)/*: AuthAction*/ => ({\n type: LOGIN_USER_FAILED,\n payload: error\n});\n\nexport const registerUser = (\n fullname/*: string*/,\n email/*: string*/,\n password/*: string*/\n)/*: AuthAction*/ => ({\n type: REGISTER_USER,\n payload: { fullname, email, password }\n});\n\nexport const registerUserSuccess = (user/*: {}*/)/*: AuthAction*/ => ({\n type: REGISTER_USER_SUCCESS,\n payload: user\n});\n\nexport const registerUserFailed = (error/*: string*/)/*: AuthAction*/ => ({\n type: REGISTER_USER_FAILED,\n payload: error\n});\n\nexport const logoutUser = (history/*: any*/)/*: AuthAction*/ => ({\n type: LOGOUT_USER,\n payload: { history }\n});\n\nexport const forgetPassword = (username/*: string*/)/*: AuthAction*/ => ({\n type: FORGET_PASSWORD,\n payload: { username }\n});\n\nexport const forgetPasswordSuccess = (\n passwordResetStatus/*: string*/\n)/*: AuthAction*/ => ({\n type: FORGET_PASSWORD_SUCCESS,\n payload: passwordResetStatus\n});\n\nexport const forgetPasswordFailed = (error/*: string*/)/*: AuthAction*/ => ({\n type: FORGET_PASSWORD_FAILED,\n payload: error\n});\n","import { useEffect, useState } from \"react\";\r\nimport { Cookies } from \"react-cookie\";\r\n\r\nexport function useTimer(time, callback) {\r\n const [date, setDate] = useState(new Date());\r\n\r\n useEffect(() => {\r\n var timerID = setInterval(() => tick(), time);\r\n return function cleanup() {\r\n clearInterval(timerID);\r\n };\r\n });\r\n\r\n function tick() {\r\n setDate(new Date());\r\n callback();\r\n }\r\n\r\n return date;\r\n}\r\n\r\nexport function formatString() {\r\n // The string containing the format items (e.g. \"{0}\")\r\n // will and always has to be the first argument.\r\n let theString = arguments[0];\r\n\r\n // start with the second argument (i = 1)\r\n for (let i = 1; i < arguments.length; i++) {\r\n // \"gm\" = RegEx options for Global search (more than one instance)\r\n // and for Multiline search\r\n let regEx = new RegExp(\"\\\\{\" + (i - 1) + \"\\\\}\", \"gm\");\r\n theString = theString.replace(regEx, arguments[i]);\r\n }\r\n\r\n return theString;\r\n}\r\n\r\nexport const SetPreferences = userpreference => {\r\n if (userpreference === null) return;\r\n\r\n const expires = new Date();\r\n expires.setDate(Date.now() + 1000 * 60 * 60 * 24 * 365);\r\n let maxAge = 60 * 60 * 24 * 365;\r\n console.log(expires);\r\n let cookies = new Cookies();\r\n\r\n if (userpreference.facility) {\r\n cookies.set(\"facility\", JSON.stringify(userpreference.facility), {\r\n path: \"/\",\r\n expires,\r\n maxAge\r\n });\r\n }\r\n if (userpreference.clinic) {\r\n cookies.set(\"clinic\", JSON.stringify(userpreference.clinic), {\r\n path: \"/\",\r\n expires,\r\n maxAge\r\n });\r\n }\r\n if (userpreference.printer) {\r\n cookies.set(\"printer\", JSON.stringify(userpreference.printer), {\r\n path: \"/\",\r\n expires,\r\n maxAge\r\n });\r\n }\r\n if (userpreference.printerPath) {\r\n cookies.set(\"printerPath\", JSON.stringify(userpreference.printerPath), {\r\n path: \"/\",\r\n expires,\r\n maxAge\r\n });\r\n }\r\n};\r\n\r\nexport const GetIP = () => {\r\n var IP = new Promise(r => {\r\n var w = window,\r\n a = new (w.RTCPeerConnection ||\r\n w.mozRTCPeerConnection ||\r\n w.webkitRTCPeerConnection)({ iceServers: [] }),\r\n b = () => { };\r\n a.createDataChannel(\"\");\r\n a.createOffer(c => a.setLocalDescription(c, b, b), b);\r\n a.onicecandidate = c => {\r\n try {\r\n c.candidate.candidate\r\n .match(\r\n /([0-9]{1,3}(\\.[0-9]{1,3}){3}|[a-f0-9]{1,4}(:[a-f0-9]{1,4}){7})/g\r\n )\r\n\r\n .forEach(r);\r\n console.log(\"GET IP\", r)\r\n } catch (e) {\r\n console.log(\"Exception GetIP: \", e);\r\n }\r\n };\r\n });\r\n return IP;\r\n};\r\n\r\n\r\n// export const GetIP = () => {\r\n// var IP = new Promise(r => {\r\n// // if(!r){\r\n// // return null\r\n// // }\r\n// var w = window,\r\n// a = new (w.RTCPeerConnection ||\r\n// w.mozRTCPeerConnection ||\r\n// w.webkitRTCPeerConnection)({ iceServers: [] }),\r\n// b = () => {};\r\n// a.createDataChannel(\"\");\r\n// a.createOffer(c => a.setLocalDescription(c, b, b), b); \r\n// a.onicecandidate = c => {\r\n// console.log(\"cccc: \", c);\r\n// try {\r\n\r\n// if(c.candidate){\r\n// console.log(\"c.candidate.candidate: \", c.candidate.candidate)\r\n// console.log(\"c.candidate.candidate typeof: \",c.candidate.candidate\r\n// .match(\r\n// /([0-9]{1,3}(\\.[0-9]{1,3}){3}|[a-f0-9]{1,4}(:[a-f0-9]{1,4}){7})/g\r\n// ))\r\n// c.candidate.candidate\r\n// .match(\r\n// /([0-9]{1,3}(\\.[0-9]{1,3}){3}|[a-f0-9]{1,4}(:[a-f0-9]{1,4}){7})/g\r\n// )\r\n// .forEach(r);\r\n// }\r\n// else{\r\n// return null;\r\n// }\r\n\r\n// } catch (e) {\r\n// console.log(\"exception: \",e);\r\n// }\r\n// };\r\n// });\r\n// console.log(\"IP: \", IP);\r\n// return IP;\r\n// };\r\n\r\n\r\n/*Usage example*/\r\n//GetIP.then(ip => document.write(\"your ip: \", ip)).catch(e => console.error(e));\r\n","import {\r\n SAVE_PREFERENCE,\r\n SAVE_PREFERENCE_SUCCESS,\r\n LOAD_PREFERENCE_SUCCESS,\r\n SAVE_PREFERENCE_FAILED,\r\n LOAD_PREFERENCE_FAILED,\r\n LOAD_PREFERENCE,\r\n SEND_EMAIL,\r\n SEND_EMAIL_SUCCESS,\r\n SEND_EMAIL_FAILED\r\n} from \"../../constants/actionTypes\";\r\n\r\n/*type ISMAction = { type: string, payload: {} | any };*/\r\n\r\nexport const savePreference = (userpreference)/*: ISMAction*/ => ({\r\n type: SAVE_PREFERENCE,\r\n payload: userpreference\r\n});\r\n\r\nexport const loadPreference = (hostname)/*: ISMAction*/ => ({\r\n type: LOAD_PREFERENCE,\r\n payload: hostname\r\n});\r\n\r\nexport const savePreferenceSuccess = (userpreference)/*: ISMAction*/ => ({\r\n type: SAVE_PREFERENCE_SUCCESS,\r\n payload: userpreference\r\n});\r\n\r\nexport const savePreferenceFailed = (error)/*: ISMAction*/ => ({\r\n type: SAVE_PREFERENCE_FAILED,\r\n payload: error\r\n});\r\n\r\nexport const loadPreferenceSuccess = (userpreference)/*: ISMAction*/ => ({\r\n type: LOAD_PREFERENCE_SUCCESS,\r\n payload: userpreference\r\n});\r\n\r\nexport const loadPreferenceFailed = (error)/*: ISMAction*/ => ({\r\n type: LOAD_PREFERENCE_FAILED,\r\n payload: error\r\n});\r\n\r\nexport const sendEmail = (userpreference)/*: ISMAction*/ => ({\r\n type: SEND_EMAIL,\r\n payload: userpreference\r\n});\r\n\r\nexport const sendEmailSuccess = (userpreference)/*: ISMAction*/ => ({\r\n type: SEND_EMAIL_SUCCESS,\r\n payload: userpreference\r\n});\r\n\r\nexport const sendEmailFailed = (error)/*: ISMAction*/ => ({\r\n type: SEND_EMAIL_FAILED,\r\n payload: error\r\n});","import keyMirror from \"keymirror\";\n\n/* AUTH */\nexport const LOGIN_USER = \"LOGIN_USER\";\nexport const LOGIN_USER_SUCCESS = \"LOGIN_USER_SUCCESS\";\nexport const LOGIN_USER_FAILED = \"LOGIN_USER_FAILED\";\nexport const REGISTER_USER = \"REGISTER_USER\";\nexport const REGISTER_USER_SUCCESS = \"REGISTER_USER_SUCCESS\";\nexport const REGISTER_USER_FAILED = \"REGISTER_USER_FAILED\";\nexport const LOGOUT_USER = \"LOGOUT_USER\";\nexport const FORGET_PASSWORD = \"FORGET_PASSWORD\";\nexport const FORGET_PASSWORD_SUCCESS = \"FORGET_PASSWORD_SUCCESS\";\nexport const FORGET_PASSWORD_FAILED = \"FORGET_PASSWORD_FAILED\";\n\n// ISM\n\n/* #region ISM PREFERENCE */\nexport const SAVE_PREFERENCE = \"SAVE_PREFERENCE\";\nexport const LOAD_PREFERENCE = \"LOAD_PREFERENCE\";\nexport const SAVE_PREFERENCE_SUCCESS = \"SAVE_PREFERENCE_SUCCESS\";\nexport const LOAD_PREFERENCE_SUCCESS = \"LOAD_PREFERENCE_SUCCESS\";\nexport const SAVE_PREFERENCE_FAILED = \"SAVE_PREFERENCE_FAILED\";\nexport const LOAD_PREFERENCE_FAILED = \"LOAD_PREFERENCE_FAILED\";\nexport const SEND_EMAIL = \"SEND_EMAIL\";\nexport const SEND_EMAIL_SUCCESS = \"SEND_EMAIL_SUCCESS\";\nexport const SEND_EMAIL_FAILED = \"SEND_EMAIL_FAILED\";\n\n/* #endregion */\nconst actionTypes = keyMirror({\n HIDE_MODAL: null,\n SHOW_MODAL: null\n});\n\nexport default actionTypes;\n","import { FetchData, FetchDataOldAPI } from \"./baseService\";\r\nimport {\r\n GET_HOSPITAL_FACILITIES,\r\n GET_HOSPITAL_FACILITIES_CLINICS,\r\n GET_OUTPATIENT_ORDERS,\r\n PRINT_ORDER,\r\n GET_HOSPITAL_PRINTERS,\r\n USER_LOGIN,\r\n SAVE_FLAG,\r\n API_GET_ISM_DEVICECLINIC,\r\n GET_PATIENT_EMAIL,\r\n // API_SAVE_ISM_DEVICECLINIC,//MIDHAT\r\n VIEW_PRESCRIPTION,//Added by MA on 15-5-2020\r\n} from \"./ServiceConstants\";\r\n\r\nlet result = \"\";\r\n\r\nexport function GetHospitalFacilityList(resolve, reject) {\r\n FetchData(GET_HOSPITAL_FACILITIES, \"\").done(response => {\r\n result = response.ResponseResult;\r\n\r\n if (result) {\r\n resolve(result);\r\n } else {\r\n reject(\"No Facilities\");\r\n }\r\n });\r\n}\r\n\r\nexport function GetUserDeviceClinic(resolve, reject, requestData) {\r\n FetchData(API_GET_ISM_DEVICECLINIC, requestData).done(response => {\r\n result = response.ResponseResult;\r\n\r\n if (result) {\r\n resolve(result);\r\n } else {\r\n reject(\"No User Preference Saved\");\r\n }\r\n });\r\n}\r\n\r\nexport function SaveFlag(resolve, reject, requestData) {\r\n FetchData(SAVE_FLAG, requestData).done(response => {\r\n result = response.ResponseResult;\r\n\r\n if (result) {\r\n console.log(response);\r\n resolve(result);\r\n } else {\r\n reject(\"Couldnt Save\");\r\n }\r\n });\r\n}\r\n\r\nexport function GetOutpatientOrders(resolve, reject, requestData) {\r\n console.log(\"getoutpatientorder: \", requestData);\r\n FetchData(GET_OUTPATIENT_ORDERS, requestData).done(response => {\r\n result = response.ResponseResult;\r\n console.log(\"resulttttt: \", result);\r\n if (result) {\r\n resolve(result);\r\n } else {\r\n reject(\"No Orders\");\r\n }\r\n });\r\n}\r\n\r\nexport function GetHospitalFacilityClinicsList(resolve, reject, requestData) {\r\n FetchData(GET_HOSPITAL_FACILITIES_CLINICS, requestData).done(response => {\r\n result = response.ResponseResult;\r\n\r\n if (result) {\r\n resolve(result);\r\n } else {\r\n reject(\"No Clinics\");\r\n }\r\n });\r\n}\r\n\r\nexport function PrintOrderAPI(resolve, reject, requestData) {\r\n FetchDataOldAPI(PRINT_ORDER, requestData).done(response => {\r\n result = response.ResponseResult;\r\n if (result) {\r\n resolve(result);\r\n } else {\r\n reject(result);\r\n }\r\n });\r\n}\r\nexport function GetHospitalPrinters(resolve, reject, requestData) {\r\n FetchData(GET_HOSPITAL_PRINTERS, requestData).done(response => {\r\n console.log(\"AMQ\",response);\r\n result = response.ResponseResult;\r\n\r\n if (result) {\r\n resolve(result);\r\n } else {\r\n reject(\"No Printer\");\r\n }\r\n });\r\n}\r\n\r\nexport function LoginUser(resolve, reject, requestData) {\r\n FetchData(USER_LOGIN, requestData).done(response => {\r\n result = response.ResponseResult;\r\n if (result) {\r\n resolve(result);\r\n } else {\r\n reject(result);\r\n }\r\n });\r\n}\r\n\r\n// Added by MA on 15-5-2020\r\n\r\nexport function ViewPrescriptionAPI(resolve, reject, requestData) {\r\n FetchDataOldAPI(VIEW_PRESCRIPTION, requestData).done(response => {\r\n result = response.ResponseResult;\r\n if (result) {\r\n resolve(result);\r\n } else {\r\n reject(result);\r\n }\r\n });\r\n}\r\n//Addition by MA ends here\r\n\r\n//Midhat \r\n\r\n// export function SavePreferenceNew(resolve, reject, requestData) {\r\n// FetchData(API_SAVE_ISM_DEVICECLINIC\r\n// , requestData).done(response => {\r\n// result = response.ResponseResult;\r\n\r\n\r\n// if (result) {\r\n// console.log(\"USER PREF RESP\", response);\r\n// resolve(result);\r\n// } else {\r\n// reject(\"Couldnt Save\");\r\n// }\r\n// });\r\n// }","import React from \"react\";\nimport { Redirect } from \"react-router-dom\";\nimport { Route } from \"react-router-dom\";\n\nimport { isUserAuthenticated, getLoggedInUser } from \"./helpers/authUtils\";\n\n// lazy load all the views\nconst Dashboard = React.lazy(() => import(\"./pages/dashboards/index\"));\n\n// auth\nconst Login = React.lazy(() => import(\"./pages/auth/Login\"));\nconst Logout = React.lazy(() => import(\"./pages/auth/Logout\"));\nconst ForgetPassword = React.lazy(() =>\n import(\"./pages/account/ForgetPassword\")\n);\nconst Register = React.lazy(() => import(\"./pages/account/Register\"));\nconst ConfirmAccount = React.lazy(() => import(\"./pages/account/Confirm\"));\nconst UserPreference = React.lazy(() =>\n import(\"../src/components/Modals/UserPreferenceModal\")\n);\n\n// handle auth and authorization\n\nconst PrivateRoute = ({ component: Component, roles, ...rest }) => (\n {\n const isAuthTokenValid = isUserAuthenticated();\n if (!isAuthTokenValid) {\n // not logged in so redirect to login page with the return url\n return (\n \n );\n }\n \n const loggedInUser = getLoggedInUser();\n console.log(\"loggedinuser: \", loggedInUser);\n // check if route is restricted by role\n if (roles && roles.indexOf(loggedInUser.role) === -1) {\n // role not authorised so redirect to home page \n return ;\n }\n\n // authorised so return component\n return ;\n }}\n />\n);\n\nconst routes = [\n // auth and account\n { path: \"/login\", name: \"Login\", component: Login, route: Route },\n { path: \"/logout\", name: \"Logout\", component: Logout, route: Route },\n {\n path: \"/forget-password\",\n name: \"Forget Password\",\n component: ForgetPassword,\n route: Route\n },\n { path: \"/register\", name: \"Register\", component: Register, route: Route },\n {\n path: \"/confirm\",\n name: \"Confirm\",\n component: ConfirmAccount,\n route: Route\n },\n\n // other pages\n {\n path: \"/dashboard\",\n name: \"Dashboard\",\n component: Dashboard,\n route: PrivateRoute,\n roles: [\"Admin\", \"ADMIN\",\"COLLECTIONPOINT\"]\n },\n {\n path: \"/\",\n exact: true,\n component: () => ,\n route: PrivateRoute\n }\n //Custom Routes\n // { path: '/UserPreference', name: 'User Preference', component: UserPreference, route: Route },\n];\n\nexport { routes, PrivateRoute };\n","import React, { Component, Suspense } from \"react\";\nimport { BrowserRouter } from \"react-router-dom\";\nimport { connect } from \"react-redux\";\nimport Loadable from \"react-loadable\";\nimport ReactNotification from \"react-notifications-component\";\nimport Modal from \"react-modal\";\n\nimport { routes } from \"./routes\";\n\n// setup backend\n// import { configureBackend } from \"./helpers\";\nimport { isUserAuthenticated } from \"./helpers/authUtils\";\n\n// Themes\nimport \"./assets/scss/DefaultTheme.scss\";\n\n// Lazy loading and code splitting -\n// Derieved idea from https://blog.logrocket.com/lazy-loading-components-in-react-16-6-6cea535c0b52\nconst loading = () =>
;\n\n// All layouts/containers\nconst NonAuthLayout = Loadable({\n loader: () => import(\"./components/NonAuthLayout\"),\n render(loaded, props) {\n let Component = loaded.default;\n return ;\n },\n loading\n});\n\nconst AuthLayout = Loadable({\n loader: () => import(\"./components/AuthLayout\"),\n render(loaded, props) {\n let Component = loaded.default;\n return ;\n },\n loading\n});\n\n// configure backend\n//configureBackend();\n\n/**\n * Exports the component with layout wrapped to it\n * @param {} WrappedComponent\n */\nconst withLayout = WrappedComponent => {\n const HOC = class extends Component {\n render() {\n return ;\n }\n };\n\n return connect()(HOC);\n};\n\n/**\n * Main app component\n */\n\nclass App extends Component {\n /**\n * Returns the layout component based on different properties\n * @param {*} props\n *\n *\n */\n\n getLayout = () => {\n return isUserAuthenticated() ? AuthLayout : NonAuthLayout;\n };\n\n render() {\n return (\n // rendering the router with layout\n \n \n {routes.map((route, index) => {\n return (\n {\n const Layout = this.getLayout();\n return (\n \n \n \n \n \n );\n })}\n />\n );\n })}\n \n \n \n );\n }\n}\n\nconst mapStateToProps = state => {\n return {\n isAuthenticated: state.Auth.isAuthenticated\n };\n};\n\nexport default connect(\n mapStateToProps,\n null\n)(App);\n","// This optional code is used to register a service worker.\n// register() is not called by default.\n\n// This lets the app load faster on subsequent visits in production, and gives\n// it offline capabilities. However, it also means that developers (and users)\n// will only see deployed updates on subsequent visits to a page, after all the\n// existing tabs open on the page have been closed, since previously cached\n// resources are updated in the background.\n\n// To learn more about the benefits of this model and instructions on how to\n// opt-in, read http://bit.ly/CRA-PWA\n\nconst isLocalhost = Boolean(\n window.location.hostname === 'localhost' ||\n // [::1] is the IPv6 localhost address.\n window.location.hostname === '[::1]' ||\n // 127.0.0.1/8 is considered localhost for IPv4.\n window.location.hostname.match(\n /^127(?:\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/\n )\n);\n\nexport function register(config) {\n if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) {\n // The URL constructor is available in all browsers that support SW.\n const publicUrl = new URL(process.env.PUBLIC_URL, window.location.href);\n if (publicUrl.origin !== window.location.origin) {\n // Our service worker won't work if PUBLIC_URL is on a different origin\n // from what our page is served on. This might happen if a CDN is used to\n // serve assets; see https://github.com/facebook/create-react-app/issues/2374\n return;\n }\n\n window.addEventListener('load', () => {\n const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`;\n\n if (isLocalhost) {\n // This is running on localhost. Let's check if a service worker still exists or not.\n checkValidServiceWorker(swUrl, config);\n\n // Add some additional logging to localhost, pointing developers to the\n // service worker/PWA documentation.\n navigator.serviceWorker.ready.then(() => {\n console.log(\n 'This web app is being served cache-first by a service ' +\n 'worker. To learn more, visit http://bit.ly/CRA-PWA'\n );\n });\n } else {\n // Is not localhost. Just register service worker\n registerValidSW(swUrl, config);\n }\n });\n }\n}\n\nfunction registerValidSW(swUrl, config) {\n navigator.serviceWorker\n .register(swUrl)\n .then(registration => {\n registration.onupdatefound = () => {\n const installingWorker = registration.installing;\n if (installingWorker == null) {\n return;\n }\n installingWorker.onstatechange = () => {\n if (installingWorker.state === 'installed') {\n if (navigator.serviceWorker.controller) {\n // At this point, the updated precached content has been fetched,\n // but the previous service worker will still serve the older\n // content until all client tabs are closed.\n console.log(\n 'New content is available and will be used when all ' +\n 'tabs for this page are closed. See http://bit.ly/CRA-PWA.'\n );\n\n // Execute callback\n if (config && config.onUpdate) {\n config.onUpdate(registration);\n }\n } else {\n // At this point, everything has been precached.\n // It's the perfect time to display a\n // \"Content is cached for offline use.\" message.\n console.log('Content is cached for offline use.');\n\n // Execute callback\n if (config && config.onSuccess) {\n config.onSuccess(registration);\n }\n }\n }\n };\n };\n })\n .catch(error => {\n console.error('Error during service worker registration:', error);\n });\n}\n\nfunction checkValidServiceWorker(swUrl, config) {\n // Check if the service worker can be found. If it can't reload the page.\n fetch(swUrl)\n .then(response => {\n // Ensure service worker exists, and that we really are getting a JS file.\n const contentType = response.headers.get('content-type');\n if (\n response.status === 404 ||\n (contentType != null && contentType.indexOf('javascript') === -1)\n ) {\n // No service worker found. Probably a different app. Reload the page.\n navigator.serviceWorker.ready.then(registration => {\n registration.unregister().then(() => {\n window.location.reload();\n });\n });\n } else {\n // Service worker found. Proceed as normal.\n registerValidSW(swUrl, config);\n }\n })\n .catch(() => {\n console.log(\n 'No internet connection found. App is running in offline mode.'\n );\n });\n}\n\nexport function unregister() {\n if ('serviceWorker' in navigator) {\n navigator.serviceWorker.ready.then(registration => {\n registration.unregister();\n });\n }\n}\n","// @flow\nimport {\n LOGIN_USER,\n LOGIN_USER_SUCCESS,\n LOGIN_USER_FAILED,\n LOGOUT_USER,\n REGISTER_USER,\n REGISTER_USER_SUCCESS,\n REGISTER_USER_FAILED,\n FORGET_PASSWORD,\n FORGET_PASSWORD_SUCCESS,\n FORGET_PASSWORD_FAILED\n} from \"../../constants/actionTypes\";\n\nimport { getLoggedInUser } from \"../../helpers/authUtils\";\n\nconst INIT_STATE = {\n user: getLoggedInUser(),\n loading: false\n};\n\ntype AuthAction = { type: string, payload: {} | string };\ntype State = { user?: {} | null, loading?: boolean, +value?: boolean };\n\nconst Auth = (state: State = INIT_STATE, action: AuthAction) => {\n switch (action.type) {\n case LOGIN_USER:\n console.log(\"In reducer : LOGIN_USER\");\n return { ...state, loading: true };\n case LOGIN_USER_SUCCESS:\n console.log(\"LOGIN_USER_SUCCESS\");\n console.log(action);\n return { ...state, user: action.payload, loading: false, error: null };\n case LOGIN_USER_FAILED:\n return { ...state, error: action.payload, loading: false };\n case REGISTER_USER:\n return { ...state, loading: true };\n case REGISTER_USER_SUCCESS:\n return { ...state, user: action.payload, loading: false, error: null };\n case REGISTER_USER_FAILED:\n return { ...state, error: action.payload, loading: false };\n case LOGOUT_USER:\n return { ...state, user: null };\n case FORGET_PASSWORD:\n return { ...state, loading: true };\n case FORGET_PASSWORD_SUCCESS:\n return {\n ...state,\n passwordResetStatus: action.payload,\n loading: false,\n error: null\n };\n case FORGET_PASSWORD_FAILED:\n return { ...state, error: action.payload, loading: false };\n default:\n return { ...state };\n }\n};\n\nexport default Auth;\n","// @flow\nimport {\n SAVE_PREFERENCE,\n SAVE_PREFERENCE_SUCCESS,\n LOAD_PREFERENCE\n} from \"../../constants/actionTypes\";\n\nimport {\n getCurrentFacility,\n getCurrentPrinter,\n getCurrentClinic,\n getCurrentPrinterPath\n} from \"../../helpers/authUtils\";\n\nconst INIT_STATE = {\n userpreference: {\n facility: getCurrentFacility(),\n clinic: getCurrentClinic(),\n printer: getCurrentPrinter(),\n printerPath: getCurrentPrinterPath()\n },\n loading: false\n};\n\n// type ISMAction = { type: string, payload: {} | string };\n// type State = {\n// userpreference: {} | null\n// };\n\n//const ISM = (state: State = INIT_STATE, action: ISMAction) => {\n\n/*type ISMAction = { type: string, payload: {} | any };\ntype State = {\n userpreference: {} | null,\n loading: boolean\n};*/\n\nconst ISM = (state/*: State*/ = INIT_STATE, action/*: ISMAction*/) => {\n // const ISM = (state = INIT_STATE, action) => {\n switch (action.type) {\n case SAVE_PREFERENCE:\n console.log(\"In reducer : SAVE_PREFERENCE\");\n return {\n ...state,\n loading: true\n };\n case SAVE_PREFERENCE_SUCCESS:\n console.log(\"In reducer : SAVE_PREFERENCE_SUCCESS\");\n console.log(action.payload);\n return {\n ...state,\n userpreference: action.payload,\n loading: false\n };\n case LOAD_PREFERENCE:\n return {\n ...state,\n loading: true\n };\n default:\n return { ...state };\n }\n};\n\nexport default ISM;\n","import { combineReducers } from \"redux\";\nimport Auth from \"./auth/reducers\";\nimport ISM from \"./ism/reducers\";\n// import { reducer as toast } from \"material-ui-toast-redux\";\n\n// import modal from './modal'\nexport default combineReducers({\n // modal,\n Auth,\n ISM\n // toast\n});\n","import { ServiceToken, baseURL } from \"./baseService\";\r\n\r\nexport const fetchJSONUsingPOST = (RequestMethod, RequestData) => {\r\n var reqBody = new FormData();\r\n console.log(\"RequestMethod: \", RequestMethod);\r\n console.log(\"RequestData: \", RequestData);\r\n reqBody.append(\"requestmethod\", RequestMethod);\r\n reqBody.append(\"requestdata\", JSON.stringify(RequestData));\r\n\r\n\r\n const options = {\r\n body: reqBody,\r\n method: \"POST\",\r\n headers: {\r\n _token: ServiceToken\r\n }\r\n };\r\n\r\n return fetch(baseURL, options)\r\n .then(response => {\r\n if (!response.status === 200) {\r\n throw response.json();\r\n }\r\n return response.json();\r\n })\r\n .then(json => {\r\n return json;\r\n })\r\n .catch(error => {\r\n throw error;\r\n });\r\n};\r\n","// @flow\r\nimport { Cookies } from \"react-cookie\";\r\nimport { all, call, fork, put, takeEvery } from \"redux-saga/effects\";\r\nimport { fetchJSONUsingPOST } from \"../../services/ServiceHelper\";\r\nimport {\r\n LOGIN_USER,\r\n LOGOUT_USER,\r\n REGISTER_USER,\r\n FORGET_PASSWORD\r\n} from \"../../constants/actionTypes\";\r\n\r\nimport {\r\n loginUserSuccess,\r\n loginUserFailed,\r\n registerUserSuccess,\r\n registerUserFailed,\r\n forgetPasswordSuccess,\r\n forgetPasswordFailed\r\n} from \"./actions\";\r\n\r\nimport { GetIP } from \"../../helpers/ISMHelpers\";\r\nimport {\r\n USER_LOGIN,\r\n API_GET_COMPUTER_NAME\r\n} from \"../../services/ServiceConstants\";\r\nimport { ServiceToken, baseURL } from \"../../services/baseService\";\r\n\r\nimport { formatString } from \"../../helpers/ISMHelpers\";\r\n/**\r\n * Fetch data from given url\r\n * @param {*} url\r\n * @param {*} options\r\n */\r\n\r\n/**\r\n * Fetch data from given url\r\n * @param {*} url\r\n * @param {*} options\r\n */\r\nconst fetchJSON = (url, options = {}) => {\r\n return fetch(url, options)\r\n .then(response => {\r\n if (!response.status === 200) {\r\n throw response.json();\r\n }\r\n return response.json();\r\n })\r\n .then(json => {\r\n return json;\r\n })\r\n .catch(error => {\r\n throw error;\r\n });\r\n};\r\n\r\n/**\r\n * Sets the session\r\n * @param {*} user\r\n */\r\nconst setSession = user => {\r\n let cookies = new Cookies();\r\n if (user) cookies.set(\"user\", JSON.stringify(user), { path: \"/\" });\r\n else cookies.remove(\"user\");\r\n};\r\n\r\nconst setUserPicture = UserPicture => {\r\n localStorage.setItem(\"UserPicture\", UserPicture);\r\n};\r\n/**\r\n * Login the user\r\n * @param {*} payload - username and password\r\n */\r\nfunction* login({ payload: { username, password } }) {\r\n try {\r\n const responsefromAPI = yield call(fetchJSONUsingPOST, USER_LOGIN, {\r\n UserID: username,\r\n Password: password\r\n });\r\n console.log(\"LOGGED IN DATA\", responsefromAPI);\r\n\r\n let ResponseResult = responsefromAPI.ResponseResult;\r\n const responseCNAME = \"\";\r\n //--midhat uncomment\r\n //const responseIP = yield call(GetIP);\r\n // responseCNAME = yield call(\r\n // fetchJSONUsingPOST,\r\n // API_GET_COMPUTER_NAME,\r\n // {\r\n // IP: responseIP\r\n // }\r\n // );\r\n // // console.log(\"PC VALUE\", responseCNAME)\r\n //----------------------\r\n\r\n if (ResponseResult.LoginStatusID === \"Success\") {\r\n console.log(\"Login Result: \", ResponseResult);\r\n let response = {\r\n id: ResponseResult.UserID,\r\n username: ResponseResult.UserID,\r\n firstName: ResponseResult.CSSAUserModel.Name,\r\n lastName: \"\",\r\n role: ResponseResult.CSSAUserModel.Role,\r\n ComputerName: \"test\", //responseCNAME.ResponseResult,\r\n UserPictureExists: ResponseResult.CSSAUserModel.UserPictureExists,\r\n //UserPicture: JSON.stringify(ResponseResult.CSSAUserModel.UserPicture),\r\n token:\r\n \"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJDb2RlcnRoZW1lIiwiaWF0IjoxNTU1NjgyNTc1LCJleHAiOjE1ODcyMTg1NzUsImF1ZCI6ImNvZGVydGhlbWVzLmNvbSIsInN1YiI6InRlc3QiLCJmaXJzdG5hbWUiOiJIeXBlciIsImxhc3RuYW1lIjoiVGVzdCIsIkVtYWlsIjoidGVzdEBoeXBlci5jb2RlcnRoZW1lcy5jb20iLCJSb2xlIjoiQWRtaW4ifQ.8qHJDbs5nw4FBTr3F8Xc1NJYOMSJmGnRma7pji0YwB4\"\r\n };\r\n setSession(response);\r\n setUserPicture(ResponseResult.CSSAUserModel.UserPicture);\r\n console.log(\"loginusersuccess*************\");\r\n yield put(loginUserSuccess(response));\r\n } else {\r\n yield put(loginUserFailed(\"Invalid credentials\"));\r\n }\r\n } catch (error) {\r\n let message;\r\n switch (error.status) {\r\n case 500:\r\n message = \"Internal Server Error\";\r\n break;\r\n case 401:\r\n message = \"Invalid credentials\";\r\n break;\r\n default:\r\n message = error;\r\n }\r\n yield put(loginUserFailed(message));\r\n setSession(null);\r\n }\r\n}\r\n\r\n/**\r\n * Logout the user\r\n * @param {*} param0\r\n */\r\nfunction* logout({ payload: { history } }) {\r\n try {\r\n setSession(null);\r\n yield call(() => {\r\n history.push(\"/login\");\r\n });\r\n } catch (error) { }\r\n}\r\n\r\n/**\r\n * Register the user\r\n */\r\nfunction* register({ payload: { fullname, email, password } }) {\r\n const options = {\r\n body: JSON.stringify({ fullname, email, password }),\r\n method: \"POST\",\r\n headers: { \"Content-Type\": \"application/json\" }\r\n };\r\n\r\n try {\r\n const response = yield call(fetchJSON, \"/users/register\", options);\r\n yield put(registerUserSuccess(response));\r\n } catch (error) {\r\n let message;\r\n switch (error.status) {\r\n case 500:\r\n message = \"Internal Server Error\";\r\n break;\r\n case 401:\r\n message = \"Invalid credentials\";\r\n break;\r\n default:\r\n message = error;\r\n }\r\n yield put(registerUserFailed(message));\r\n }\r\n}\r\n\r\n/**\r\n * forget password\r\n */\r\nfunction* forgetPassword({ payload: { username } }) {\r\n const options = {\r\n body: JSON.stringify({ username }),\r\n method: \"POST\",\r\n headers: { \"Content-Type\": \"application/json\" }\r\n };\r\n\r\n try {\r\n const response = yield call(fetchJSON, \"/users/password-reset\", options);\r\n yield put(forgetPasswordSuccess(response.message));\r\n } catch (error) {\r\n let message;\r\n switch (error.status) {\r\n case 500:\r\n message = \"Internal Server Error\";\r\n break;\r\n case 401:\r\n message = \"Invalid credentials\";\r\n break;\r\n default:\r\n message = error;\r\n }\r\n yield put(forgetPasswordFailed(message));\r\n }\r\n}\r\n\r\nexport function* watchLoginUser()/*: any*/ {\r\n yield takeEvery(LOGIN_USER, login);\r\n}\r\n\r\nexport function* watchLogoutUser()/*: any*/ {\r\n yield takeEvery(LOGOUT_USER, logout);\r\n}\r\n\r\nexport function* watchRegisterUser()/*: any*/ {\r\n yield takeEvery(REGISTER_USER, register);\r\n}\r\n\r\nexport function* watchForgetPassword()/*: any*/ {\r\n yield takeEvery(FORGET_PASSWORD, forgetPassword);\r\n}\r\n\r\nfunction* authSaga()/*: any*/ {\r\n yield all([\r\n fork(watchLoginUser),\r\n fork(watchLogoutUser),\r\n fork(watchRegisterUser),\r\n fork(watchForgetPassword)\r\n ]);\r\n}\r\n\r\nexport default authSaga;\r\n","import { all, call, fork, put, takeEvery } from \"redux-saga/effects\";\r\nimport {\r\n API_SAVE_ISM_DEVICECLINIC,\r\n API_GET_ISM_DEVICECLINIC\r\n} from \"../../services/ServiceConstants\";\r\nimport { fetchJSONUsingPOST } from \"../../services/ServiceHelper\";\r\nimport { LOAD_PREFERENCE, SAVE_PREFERENCE, SEND_EMAIL } from \"../../constants/actionTypes\";\r\nimport { SetPreferences } from \"../../helpers/ISMHelpers\";\r\n\r\nimport { savePreferenceSuccess, savePreferenceFailed, sendEmailSuccess, sendEmailFailed } from \"./ismactions\";\r\nimport { SavePreferenceNew } from \"../../services/ISMServices\";\r\n\r\n/**\r\n * Fetch data from given url\r\n * @param {*} url\r\n * @param {*} options\r\n */\r\n\r\nfunction* SaveUserPreference({ payload }) {\r\n try {\r\n SetPreferences(payload);\r\n console.log(\"In Saga : SaveUserPreference\");\r\n console.log(payload);\r\n\r\n let clinics = [];\r\n let temp_clinic = {};\r\n\r\n payload.clinic.map(function (data, o) {\r\n temp_clinic = { CLINICID: data.value, DEVICEID: payload.hostname };\r\n clinics.push(temp_clinic);\r\n });\r\n const data = {\r\n DEVICEID: payload.hostname,\r\n PRINTERNAME: payload.printer,\r\n FACILITYID: payload.facility.value,\r\n Clinics: clinics\r\n };\r\n console.log(\"USER PREF\", data)\r\n const responsefromAPI = yield call(\r\n fetchJSONUsingPOST,\r\n API_SAVE_ISM_DEVICECLINIC,\r\n data\r\n );\r\n //MIDHAT\r\n // const responsefromAPI = new Promise((resolve, reject) => {\r\n // SavePreferenceNew(resolve, reject, JSON.stringify(data));\r\n // });\r\n //----\r\n console.log(\"ISM DATA HERE :::\", responsefromAPI);\r\n\r\n yield put(savePreferenceSuccess(payload));\r\n } catch (error) {\r\n let message;\r\n switch (error.status) {\r\n case 500:\r\n message = \"Internal Server Error\";\r\n break;\r\n case 401:\r\n message = \"401 Error Occured\";\r\n break;\r\n default:\r\n message = error;\r\n }\r\n yield put(savePreferenceFailed(message));\r\n SetPreferences(null);\r\n }\r\n}\r\n\r\nfunction* LoadUserPreference({ payload }) {\r\n try {\r\n const responsefromAPI = yield call(\r\n fetchJSONUsingPOST,\r\n API_GET_ISM_DEVICECLINIC,\r\n payload\r\n );\r\n\r\n let clinics = [];\r\n let temp_clinic = {};\r\n console.log(\"ism device clinics\");\r\n console.log(responsefromAPI);\r\n let ResponseResult = responsefromAPI.ResponseResult;\r\n if (ResponseResult) {\r\n if (ResponseResult.Clinics) {\r\n ResponseResult.Clinics.map(function (datax, o) {\r\n temp_clinic = { value: datax.CLINICID, label: datax.CLINICNAME };\r\n clinics.push(temp_clinic);\r\n });\r\n }\r\n }\r\n\r\n\r\n const data = {\r\n hostname: ResponseResult.DEVICEID,\r\n printer: ResponseResult.PRINTERNAME,\r\n printerPath: ResponseResult.PRINTERPATH,\r\n facility: {\r\n value: ResponseResult.FACILITYID,\r\n label: ResponseResult.FacilityName\r\n },\r\n clinic: clinics\r\n };\r\n\r\n SetPreferences(data);\r\n\r\n yield put(savePreferenceSuccess(data));\r\n } catch (error) {\r\n console.log(error);\r\n let message;\r\n switch (error.status) {\r\n case 500:\r\n message = \"Internal Server Error\";\r\n break;\r\n case 401:\r\n message = \"401 Error Occured\";\r\n break;\r\n default:\r\n message = error;\r\n }\r\n yield put(savePreferenceFailed(message));\r\n SetPreferences(null);\r\n }\r\n}\r\n\r\nfunction* SendEmail({ payload }) {\r\n try {\r\n console.log(\"In Saga : SendEmail\");\r\n console.log(payload);\r\n\r\n\r\n // const data = {\r\n // DEVICEID: payload.hostname,\r\n // PRINTERNAME: payload.printer,\r\n // FACILITYID: payload.facility.value,\r\n // Clinics: clinics\r\n // };\r\n\r\n // const responsefromAPI = yield call(\r\n // fetchJSONUsingPOST,\r\n // API_SAVE_ISM_DEVICECLINIC,\r\n // data\r\n // );\r\n // console.log(responsefromAPI);\r\n\r\n // yield put(sendEmailSuccess(payload));\r\n } catch (error) {\r\n let message;\r\n switch (error.status) {\r\n case 500:\r\n message = \"Internal Server Error\";\r\n break;\r\n case 401:\r\n message = \"401 Error Occured\";\r\n break;\r\n default:\r\n message = error;\r\n }\r\n // yield put(sendEmailFailed(message));\r\n\r\n }\r\n}\r\n\r\nexport function* watchSavePreference()/*: any*/ {\r\n yield takeEvery(SAVE_PREFERENCE, SaveUserPreference);\r\n}\r\n\r\nexport function* watchLoadPreference()/*: any*/ {\r\n yield takeEvery(LOAD_PREFERENCE, LoadUserPreference);\r\n}\r\n\r\nexport function* watchEmail()/*: any*/ {\r\n yield takeEvery(SEND_EMAIL, SendEmail);\r\n}\r\n\r\n\r\nfunction* ismSaga()/*: any*/ {\r\n yield all([fork(watchSavePreference), fork(watchLoadPreference), fork(watchEmail)]);\r\n}\r\n\r\nexport default ismSaga;\r\n","import { all } from \"redux-saga/effects\";\nimport authSaga from \"./auth/saga\";\nimport ismSaga from \"./ism/saga\";\n\nexport default function* rootSaga(getState) {\n yield all([authSaga(), ismSaga()]);\n}\n","import { createStore, applyMiddleware, compose } from 'redux';\nimport createSagaMiddleware from \"redux-saga\";\nimport reducers from './reducers';\nimport sagas from \"./sagas\";\n\nconst sagaMiddleware = createSagaMiddleware();\nconst middlewares = [sagaMiddleware];\n\nexport function configureStore(initialState) {\n const composeEnhancers = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose;\n\n const store = createStore(\n reducers,\n initialState,\n composeEnhancers(\n applyMiddleware(...middlewares)\n ),\n );\n sagaMiddleware.run(sagas);\n return store;\n}\n","import React from 'react';\nimport ReactDOM from 'react-dom';\nimport App from './App';\nimport * as serviceWorker from './serviceWorker';\n\nimport { Provider } from 'react-redux';\nimport { configureStore } from './redux/store';\n\n\nReactDOM.render(\n \n, document.getElementById('root'));\n\n// If you want your app to work offline and load faster, you can change\n// unregister() to register() below. Note this comes with some pitfalls.\n// Learn more about service workers: http://bit.ly/CRA-PWA\nserviceWorker.unregister();\n"],"sourceRoot":""}