{"version":3,"sources":["app/auth/store/userSlice.js","app/main/apps/proposals/store/proposals.js","app/services/hammurabi/people.js","app/main/apps/people/store/people.js","pch/components/PchPaper/PchPaper.jsx","pch/components/PchLoading.jsx","app/main/apps/proposals/store/proposal.js","app/main/apps/payments/store/payments.js","app/main/apps/loans/store/analysis.js","app/services/socket/socketContext.js","app/services/socket/socketServiceConfig.js","app/services/socket/socketService.js","app/main/apps/loans/store/loan.js","app/main/apps/decisionLogic/store/banks.js","app/main/apps/pages/VerifyEmail.jsx","app/store/middleware/apiActions.js","app/store/entities/index.js","app/auth/store/index.js","app/store/decisionLogic/index.js","app/store/rootReducer.js","app/store/globals/messageSlice.js","app/store/middleware/apiSettings.js","app/store/middleware/api.js","app/store/index.js","app/config/theme.js","pch/hooks/useActiveMenu.js","app/layout/components/MobileFooter.jsx","app/services/hammurabi/auth.js","app/auth/protectedRoute.js","app/layout/components/UserActionButton.jsx","app/layout/components/TopBar.jsx","app/layout/SuspenseLoader.jsx","app/layout/components/Footer.jsx","hooks/useInactivityMonitor.js","app/layout/Layout.jsx","app/auth/auth0-provider-with-history.js","app/auth/components/signup-button.js","app/auth/components/login-button.js","app/main/login/Auth0.jsx","app/main/login/Login.jsx","app/services/socket/index.js","app/main/login/Logout.jsx","app/App.js","reportWebVitals.js","i18n/i18n.js","i18n/translations/en.js","i18n/translations/es.js","i18n/translations/fr.js","index.js","app/services/JWTService/JWTService.js","app/store/middleware/axiosInstance.js","app/auth/store/loginSlice.js","app/main/apps/people/store/person.js","pch/hooks/useSimplyTeam.js","app/main/apps/loans/store/loans.js"],"names":["initialState","role","first_name","last_name","avatar_url","status","life_cycle","tour_done","email","email_verified","hammurabi_preferences","shortcuts","theme","notifications","last_login","auth_id","userSlice","createSlice","name","reducers","setUser","state","action","payload","userLoggedOut","actions","slice","list","loading","lastFetch","updated","searchText","noProposals","proposalsRequestFailed","proposals","proposalsRequested","proposalsReceived","data","length","Date","now","proposalsAdded","_proposals$list","unshift","proposalsDeleted","index","findIndex","s","id","deletedId","proposalsUpdated","searchTextChanged","proposalsRelated","relatedUpdated","loadProposals","type","arguments","undefined","page","per_page","dispatch","getState","user","auth","apiCallBegan","api","url","params","user_id","onStart","onSuccess","onError","instance","constructor","getPerson","Promise","resolve","reject","axios","post","concat","process","headers","then","response","catch","e","getPersonById","allData","get","deleteInfo","delete","getSbId","axiosInstance","resendEmail","authId","getManagers","validateLegalStatus","peopleId","rejectLegalStatus","getPeople","getPersonHistory","getPersonClasification","getPersonRefinanceStatus","isActive","peopleRequestFailed","people","peopleRequested","peopleReceived","peopleAdded","push","peopleDeleted","splice","peopleUpdated","peopleRelated","PchPaper","_ref","children","props","_jsx","Paper","className","elevation","PchLoading","_jsxs","Typography","variant","CircularProgress","proposalSaved","proposal","proposalReceived","proposalReseted","proposalCreated","reducer","prepare","event","sb_id","total_amount","proposal_type","duration","number_of_instalments","instalments_amount","instalments_frequency","interest_rate","admin_fee","rejected_reasons","requested_at","moment","utc","user_approved_at","became_loan_at","sb_approved_at","last_rejected_at","previous_proposal_id","loan_id","created_at","updated_at","starting_date","saveProposal","method","loan","previous_proposal","noPayments","paymentsRequestFailed","payments","paymentsRequested","paymentsReceived","paymentsAdded","paymentsDeleted","nopPyments","paymentsUpdated","paymentsRelated","loadPayments","loanId","userId","transactions","analysisMonths","initialBalance","finalBalance","income","incomeMonthly","expenses","expensesMonthly","hiddenFlow","hiddenMonthly","otherFinancials","otherFinancialsMonthly","dailyBalances","totalDays","monthlyBalance","loanPayday","noTransactions","analysisRequestFailed","analysis","noanalysis","analysisRequested","analysisReceived","analysis_months","initial_balance","final_balance","hiddeexcenFlow","hidden_flow","hidden_monthly","income_monthly","expenses_monthly","other_financial","other_financial_monthly","dailyBalance","daily_balance","monthly_balance","loan_payday","analysisReseted","analysisAdded","analysisDeleted","analysisUpdated","analysisRelated","loadTransactionsAnalysis","SocketContext","React","createContext","displayName","SOCKET_CONFIG","useSocket","useContext","SocketService","socket","setSocket","useState","useEffect","Provider","value","loanSaved","loanReceived","loanReseted","getLoan","saveLoan","next","toast","previous_loan","documents","manager","previous_loan_id","loansAdded","loansUpdated","Object","keys","forEach","x","toastNotification","loanCreated","banksRequestFailed","banks","banksRequested","banksReceived","banksAdded","banksUpdated","banksDeleted","banksRelated","loadBanks","decisionLogic","diffMs","Math","floor","VerifyEmail","useSelector","src","alt","onClick","async","People","success","message","error","createAction","apiCallSuccess","apiCallFailed","entities","combineReducers","peopleReducer","person","personReducer","proposalsReducer","proposalReducer","paymentsReducer","loans","loansReducer","loanReducer","loanAnalysis","loanAnalysisReducer","authReducers","login","banksReducer","rootReducer","options","anchorOrigin","vertical","horizontal","autoHideDuration","messageSlice","showMessage","hideMessage","apiSettings","hammurabi","key","keyName","fullUrl","request","console","log","store","configureStore","middleware","getDefaultMiddleware","serializableCheck","devTools","sbFont","simplyGrey","createTheme","breakpoints","values","xs","sm","md","lg","xl","palette","primary","main","secondary","contrastText","icon","danger","typography","htmlFontSize","fontSize","fontFamily","h1","h2","fontWeight","h3","h4","h5","h6","overrides","MuiButton","contained","padding","borderRadius","color","boxShadow","backgroundColor","outlined","marginInline","MuiButtonBase","disableRipple","disableTouchRipple","size","background","extra","borderColor","useActiveMenu","location","useLocation","active","setActive","pathname","MobileFooter","setValue","history","useHistory","sb","useSimplyTeam","BottomNavigation","onChange","newValue","BottomNavigationAction","label","HomeIcon","AccountBalanceIcon","AccountBoxIcon","PeopleAlt","HelpIcon","ExitToAppIcon","validateToken","ProtectedRoute","component","Component","render","rest","isLoading","isAuthenticated","getIdTokenClaims","useAuth0","loginSuccess","_ref2","loggedInUser","_ref3","_ref4","useDispatch","wrongToken","setWrongToken","useCallback","Hammauth","token","code","getPersonAndUser","claims","__raw","Redirect","to","from","Route","localStorage","removeItem","WhiteButton","content","UserActionButton","handleNewLoan","handleProfile","profileIncomplete","_Fragment","withWidth","_user$role","anchorEl","setAnchorEl","logout","openProfile","Boolean","t","useTranslation","handleCloseProfile","handleActiveMenu","target","AppBar","position","Toolbar","Link","IconButton","currentTarget","Menu","keepMounted","transformOrigin","open","onClose","MenuItem","handleViewProfile","handleLogout","logoutUser","toUpperCase","SuspenseLoader","phase","Box","sx","left","top","width","height","display","alignItems","justifyContent","disableShrink","thickness","Footer","Container","maxWidth","year","ContactSupportIcon","useInactivityMonitor","isSbTeam","lastActivity","setLastActivity","debounceTimer","debouncedResetTimer","clearTimeout","setTimeout","window","addEventListener","intervalTimer","setInterval","checkInactivity","clear","returnTo","origin","removeEventListener","clearInterval","inactivityTimer","resetInactivityTimer","Loader","Suspense","fallback","Help","lazy","Payments","PCAProcess","LoanDetailCustomer","LoanDetailSB","LoanHistoryTable","DecisionLogicRequest","DecisionLogicCallback","PeopleDetail","ProposalVerification","Proposals","Profile","DeleteInformation","ProfileUpdated","VerifiedEmail","VerificationError","ErrorPage","DashBoard","MarketingLinks","LoanAnalysis","Settings","Unauthorized","CWAResults","ApproveCreditReport","ApprovedCreditReport","RejectedCreditReport","Layout","loadingSB","CssBaseline","TopBar","Switch","path","exact","Hidden","lgUp","Auth0ProviderWithHistory","Auth0Provider","domain","clientId","redirectUri","onRedirectCallback","appState","SignupButton","loginWithRedirect","Button","fullWidth","screen_hint","LoginButton","urlToRedirect","handleLogin","useStyles","makeStyles","root","image","backgroundImage","backgroundRepeat","grey","backgroundSize","backgroundPosition","paper","paddingTop","textAlign","margin","avatar","spacing","form","marginTop","submit","logo","Auth0","classes","bgNumber","setBgNumber","rndInt","random","Grid","container","item","clsx","square","style","Login","Logout","Sentry","dsn","integrations","tracesSampleRate","replaysSessionSampleRate","replaysOnErrorSampleRate","environment","queryString","search","urlParams","URLSearchParams","App","getItem","deleteLoginFromLocalStorage","setItem","AppContent","ToastContainer","BrowserRouter","ThemeProvider","reportWebVitals","onPerfEntry","Function","getCLS","getFID","getFCP","getLCP","getTTFB","resources","en","translation","SimplyBorrowed","Number","Amount","Status","Action","Close","Cancel","Confirm","Dashboard","Users","Marketing","Home","LOAN","IMPORTANT","Actions","Description","Payment","Balance","Order","Name","Signed","es","fr","i18n","use","Backend","LanguageDetector","initReactI18next","init","keySeparator","lng","fallbackLng","react","useSuspense","interpolation","escapeValue","ReactDOM","Fragment","document","getElementById","isAuthTokenValid","access_token","decoded","jwtDecode","currentTime","exp","baseURL","authTokens","JSON","parse","create","Authorization","_authTokens","fresh","interceptors","_authTokens4","_authTokens2","_authTokens3","defaults","req","JwtService","_authTokens5","refresh","href","stringify","username","password","loginSlice","logoutSuccess","loginError","extraReducers","auth0User","personData","sub","given_name","family_name","campaign_id","atob","userData","getUserFromPerson","savePerson","personReceived","redirect","loginUser","byId","initialUser","profileUpdated","savingProfile","personSaved","personReseted","personCreated","date_of_birth","phone","city","postal_code","citizenship","legal_status","status_expiration_date","years_in_canada","employer_name","employment_type","monthly_income","job_title","lead_source","address","login_network","manages","legal_docs","income_range","personId","updatedPerson","test","peopleSaved","setSb","loadingSb","setLoadingSb","noLoans","signers","loansRequestFailed","loansRequested","loansReceived","loansDeleted","loansRelated","updateSigners","loadLoans"],"mappings":"wGAAA,gFAEO,MAAMA,EAAe,CAC3BC,KAAM,GACNC,WAAY,GACZC,UAAW,GACXC,WAAY,GACZC,OAAQ,GACRC,WAAY,GACZC,UAAW,GACXC,MAAO,GACPC,eAAgB,GAChBC,sBAAuB,CACtBC,UAAW,GACXC,MAAO,QACPC,cAAe,CAAC,GAEjBC,WAAY,GACZC,QAAS,IAGJC,EAAYC,YAAY,CAC7BC,KAAM,YACNlB,eACAmB,SAAU,CACTC,QAASA,CAACC,EAAOC,IAAWA,EAAOC,YAIxB,QAAEH,EAAO,cAAEI,GAAkBR,EAAUS,QAErCT,MAAiB,O,mCC/BhC,0HAGA,MAAMU,EAAQT,YAAY,CACzBC,KAAM,YACNlB,aAAc,CACb2B,KAAM,KACNC,SAAS,EACTC,UAAW,KACXC,SAAS,EACTC,WAAY,GACZC,aAAa,GAEdb,SAAU,CACTc,uBAAwBA,CAACC,EAAWZ,KACnCY,EAAUN,SAAU,EACpBM,EAAUF,aAAc,CAA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D,QAEG+rB,EACZ,eAACjqB,EAAIC,UAAAlB,OAAA,QAAAmB,IAAAD,UAAA,GAAAA,UAAA,GAAG,OAAQE,EAAIF,UAAAlB,OAAA,QAAAmB,IAAAD,UAAA,GAAAA,UAAA,GAAG,EAAGG,EAAQH,UAAAlB,OAAA,QAAAmB,IAAAD,UAAA,GAAAA,UAAA,GAAG,GAAE,MACvC,CAACI,EAAUC,KACV,MAAMC,EAAOD,IAAWE,KAAKD,KAE7BF,EACCI,YAAa,CACZC,IAAK,YACLC,IAAK,SACLC,OAAQ,CACPZ,OACAa,QAASN,EAAKd,GACdU,OACAC,YAEDU,QAAS8oB,EAAe5pB,KACxBe,UAAW8oB,EAAc7pB,KACzBgB,QAAS2oB,EAAmB3pB,OAE7B,CACA,EAEY7B,MAAa,O","file":"static/js/main.b21f4936.chunk.js","sourcesContent":["import { createSlice } from '@reduxjs/toolkit';\n\nexport const initialState = {\n\trole: '',\n\tfirst_name: '',\n\tlast_name: '',\n\tavatar_url: '',\n\tstatus: '',\n\tlife_cycle: '',\n\ttour_done: '',\n\temail: '',\n\temail_verified: '',\n\thammurabi_preferences: {\n\t\tshortcuts: [],\n\t\ttheme: 'light',\n\t\tnotifications: {},\n\t},\n\tlast_login: '',\n\tauth_id: '',\n};\n\nconst userSlice = createSlice({\n\tname: 'auth/user',\n\tinitialState,\n\treducers: {\n\t\tsetUser: (state, action) => action.payload,\n\t},\n});\n\nexport const { setUser, userLoggedOut } = userSlice.actions;\n\nexport default userSlice.reducer;\n","import { createSlice } from '@reduxjs/toolkit';\nimport { apiCallBegan } from '../../../../store/middleware/apiActions';\n\nconst slice = createSlice({\n\tname: 'proposals',\n\tinitialState: {\n\t\tlist: null,\n\t\tloading: false,\n\t\tlastFetch: null,\n\t\tupdated: false,\n\t\tsearchText: '',\n\t\tnoProposals: false,\n\t},\n\treducers: {\n\t\tproposalsRequestFailed: (proposals, action) => {\n\t\t\tproposals.loading = false;\n\t\t\tproposals.noProposals = true;\n\t\t},\n\t\tproposalsRequested: (proposals, action) => {\n\t\t\tproposals.loading = true;\n\t\t},\n\t\tproposalsReceived: (proposals, action) => {\n\t\t\tproposals.list = action.payload.data;\n\t\t\tif (action.payload.data.length === 0) proposals.noProposals = true;\n\t\t\telse proposals.noProposals = false;\n\t\t\tproposals.loading = false;\n\t\t\tproposals.lastFetch = Date.now();\n\t\t\tproposals.updated = false;\n\t\t},\n\t\tproposalsAdded: (proposals, action) => {\n\t\t\tproposals?.list?.unshift(action.payload);\n\t\t\tproposals.updated = true;\n\t\t\tproposals.noProposals = false;\n\t\t},\n\t\tproposalsDeleted: (proposals, action) => {\n\t\t\tconst index = proposals.list.findIndex(s => s.id === action.payload.deletedId);\n\t\t\tproposals.list[index].status = 'CANCELLED';\n\t\t\tproposals.updated = true;\n\t\t\tif (proposals.list.length === 0) proposals.noProposals = true;\n\t\t},\n\t\tproposalsUpdated: (proposals, action) => {\n\t\t\tconst index = proposals.list.findIndex(s => s.id === action.payload.id);\n\t\t\tproposals.list[index] = action.payload;\n\t\t\tproposals.updated = true;\n\t\t\tproposals.noProposals = false;\n\t\t},\n\t\tsearchTextChanged: (proposals, action) => {\n\t\t\tproposals.searchText = action.payload;\n\t\t},\n\t\tproposalsRelated: (proposals, action) => {\n\t\t\tproposals.updated = true;\n\t\t},\n\t\trelatedUpdated: (proposals, action) => {\n\t\t\tproposals.updated = false;\n\t\t},\n\t},\n});\n\nexport const {\n\tproposalsAdded,\n\tproposalsReceived,\n\tproposalsRequested,\n\tproposalsRequestFailed,\n\tsearchTextChanged,\n\tproposalsUpdated,\n\tproposalsDeleted,\n\tproposalsRelated,\n\trelatedUpdated,\n} = slice.actions;\n\nexport const loadProposals =\n\t(type = 'user', page = 1, per_page = 100) =>\n\t(dispatch, getState) => {\n\t\tconst user = getState().auth.user;\n\n\t\tdispatch(\n\t\t\tapiCallBegan({\n\t\t\t\tapi: 'hammurabi',\n\t\t\t\turl: '/proposals',\n\t\t\t\tparams: {\n\t\t\t\t\ttype,\n\t\t\t\t\tuser_id: user.id,\n\t\t\t\t\tpage,\n\t\t\t\t\tper_page,\n\t\t\t\t},\n\t\t\t\tonStart: proposalsRequested.type,\n\t\t\t\tonSuccess: proposalsReceived.type,\n\t\t\t\tonError: proposalsRequestFailed.type,\n\t\t\t})\n\t\t);\n\t};\n\nexport default slice.reducer;\n","import axios from 'axios';\nimport axiosInstance from '../../store/middleware/axiosInstance';\n\nclass People {\n getPerson = (data) => {\n return new Promise((resolve, reject) => {\n axios\n .post(`${process.env.REACT_APP_HAMMURABI_API}/people/sub`, data, {\n headers: {\n 'X-Hammurabi-Key': `${process.env.REACT_APP_HAMMURABI_KEY}`\n }\n })\n .then((response) => {\n resolve(response.data);\n })\n .catch((e) => {\n reject(e);\n });\n });\n };\n getPersonById = (id, allData = false) => {\n let url = `${process.env.REACT_APP_HAMMURABI_API}/people/${id}`;\n if (allData) url = `${process.env.REACT_APP_HAMMURABI_API}/people/${id}?allData=1`;\n return new Promise((resolve, reject) => {\n axios\n .get(url, {\n headers: {\n 'X-Hammurabi-Key': `${process.env.REACT_APP_HAMMURABI_KEY}`\n }\n })\n .then((response) => {\n resolve(response.data);\n })\n .catch((e) => {\n reject(e);\n });\n });\n };\n\n deleteInfo = (id) => {\n let url = `${process.env.REACT_APP_HAMMURABI_API}/people/${id}/deleteinfo`;\n return new Promise((resolve, reject) => {\n axios\n .delete(url, {\n headers: {\n 'X-Hammurabi-Key': `${process.env.REACT_APP_HAMMURABI_KEY}`\n }\n })\n .then((response) => {\n resolve(response.data);\n })\n .catch((e) => {\n reject(e);\n });\n });\n };\n\n getSbId = () => {\n return new Promise((resolve, reject) => {\n axiosInstance\n .get(`${process.env.REACT_APP_HAMMURABI_API}/sbid`, {\n headers: {\n 'X-Hammurabi-Key': `${process.env.REACT_APP_HAMMURABI_KEY}`\n }\n })\n .then((response) => {\n resolve(response.data.data);\n })\n .catch((e) => {\n reject(e);\n });\n });\n };\n\n resendEmail = (authId) => {\n return new Promise((resolve, reject) => {\n axiosInstance\n .post(\n `${process.env.REACT_APP_HAMMURABI_API}/people/resend-verification/${authId}`,\n {},\n {\n headers: {\n 'X-Hammurabi-Key': `${process.env.REACT_APP_HAMMURABI_KEY}`\n }\n }\n )\n .then((response) => {\n resolve(response.data);\n })\n .catch((e) => {\n reject(e);\n });\n });\n };\n\n getManagers = () => {\n return new Promise((resolve, reject) => {\n axiosInstance\n .get(`${process.env.REACT_APP_HAMMURABI_API}/people/managers`, {\n headers: {\n 'X-Hammurabi-Key': `${process.env.REACT_APP_HAMMURABI_KEY}`\n }\n })\n .then((response) => {\n resolve(response.data);\n })\n .catch((e) => {\n reject(e);\n });\n });\n };\n\n validateLegalStatus = (peopleId) => {\n return new Promise((resolve, reject) => {\n axiosInstance\n .post(\n `${process.env.REACT_APP_HAMMURABI_API}/people/${peopleId}/validatelegal`,\n {},\n {\n headers: {\n 'X-Hammurabi-Key': `${process.env.REACT_APP_HAMMURABI_KEY}`\n }\n }\n )\n .then((response) => {\n resolve(response.data);\n })\n .catch((e) => {\n reject(e);\n });\n });\n };\n\n rejectLegalStatus = (peopleId) => {\n return new Promise((resolve, reject) => {\n axiosInstance\n .post(\n `${process.env.REACT_APP_HAMMURABI_API}/people/${peopleId}/rejectlegal`,\n {},\n {\n headers: {\n 'X-Hammurabi-Key': `${process.env.REACT_APP_HAMMURABI_KEY}`\n }\n }\n )\n .then((response) => {\n resolve(response.data);\n })\n .catch((e) => {\n reject(e);\n });\n });\n };\n\n getPeople = () => {\n return new Promise((resolve, reject) => {\n axiosInstance\n .get(`${process.env.REACT_APP_HAMMURABI_API}/people`, {\n headers: {\n 'X-Hammurabi-Key': `${process.env.REACT_APP_HAMMURABI_KEY}`\n }\n })\n .then((response) => {\n resolve(response.data);\n })\n .catch((e) => {\n reject(e);\n });\n });\n };\n\n getPersonHistory = (id) => {\n return new Promise((resolve, reject) => {\n axiosInstance\n .get(`${process.env.REACT_APP_HAMMURABI_API}/people/${id}/loan-history`, {\n headers: {\n 'X-Hammurabi-Key': `${process.env.REACT_APP_HAMMURABI_KEY}`\n }\n })\n .then((response) => {\n resolve(response.data);\n })\n .catch((e) => {\n reject(e);\n });\n });\n };\n\n getPersonClasification = (id) => {\n return new Promise((resolve, reject) => {\n axiosInstance\n .get(`${process.env.REACT_APP_HAMMURABI_API}/people/${id}/classification`, {\n headers: {\n 'X-Hammurabi-Key': `${process.env.REACT_APP_HAMMURABI_KEY}`\n }\n })\n .then((response) => {\n resolve(response.data);\n })\n .catch((e) => {\n reject(e);\n });\n });\n };\n\n getPersonRefinanceStatus = (id) => {\n return new Promise((resolve, reject) => {\n axiosInstance\n .get(`${process.env.REACT_APP_HAMMURABI_API}/people/${id}/refinancestatus`, {\n headers: {\n 'X-Hammurabi-Key': `${process.env.REACT_APP_HAMMURABI_KEY}`\n }\n })\n .then((response) => {\n resolve(response.data);\n })\n .catch((e) => {\n reject(e);\n });\n });\n };\n\n isActive = (id) => {\n return new Promise((resolve, reject) => {\n axiosInstance\n .get(`${process.env.REACT_APP_HAMMURABI_API}/people/${id}/isactive`, {})\n .then((response) => {\n resolve(response.data);\n })\n .catch((e) => {\n reject(e);\n });\n });\n };\n}\n\nconst instance = new People();\n\nexport default instance;\n","import { createSlice } from '@reduxjs/toolkit';\nimport { apiCallBegan } from '../../../../store/middleware/apiActions';\n\nconst slice = createSlice({\n\tname: 'people',\n\tinitialState: {\n\t\tlist: null,\n\t\tloading: false,\n\t\tlastFetch: null,\n\t\tupdated: false,\n\t\tsearchText: '',\n\t},\n\treducers: {\n\t\tpeopleRequestFailed: (people, action) => {\n\t\t\tpeople.loading = false;\n\t\t},\n\t\tpeopleRequested: (people, action) => {\n\t\t\tpeople.loading = true;\n\t\t},\n\t\tpeopleReceived: (people, action) => {\n\t\t\tpeople.list = action.payload;\n\t\t\tpeople.loading = false;\n\t\t\tpeople.lastFetch = Date.now();\n\t\t\tpeople.updated = false;\n\t\t},\n\t\tpeopleAdded: (people, action) => {\n\t\t\tpeople.list.push(action.payload);\n\t\t\tpeople.updated = true;\n\t\t},\n\t\tpeopleDeleted: (people, action) => {\n\t\t\tconst index = people.list.findIndex(s => s.id === action.payload.deletedId);\n\t\t\tpeople.list.splice(index, 1);\n\t\t\tpeople.updated = true;\n\t\t},\n\t\tpeopleUpdated: (people, action) => {\n\t\t\t// const index = people?.list?.findIndex(s => s.id === action.payload.id);\n\t\t\t// people.list[index] = action.payload;\n\t\t\t// people.updated = true;\n\t\t},\n\t\tsearchTextChanged: (people, action) => {\n\t\t\tpeople.searchText = action.payload;\n\t\t},\n\t\tpeopleRelated: (people, action) => {\n\t\t\tpeople.updated = true;\n\t\t},\n\t},\n});\n\nexport const {\n\tpeopleAdded,\n\tpeopleReceived,\n\tpeopleRequested,\n\tpeopleRequestFailed,\n\tsearchTextChanged,\n\tpeopleUpdated,\n\tpeopleDeleted,\n\tpeopleRelated,\n} = slice.actions;\n\nexport const loadPeople = () => (dispatch, getState) => {\n\t// const { lastFetch, list, updated } = getState().entities.people;\n\n\t// // var diffMs = Date.now() - lastFetch;\n\t// // var diffHrs = Math.floor((diffMs % 86400000) / 3600000);\n\n\t// // if (diffHrs < 4 && list.length > 0 && !updated) return;\n\n\tdispatch(\n\t\tapiCallBegan({\n\t\t\tapi: 'hammurabi',\n\t\t\turl: '/people',\n\t\t\tonStart: peopleRequested.type,\n\t\t\tonSuccess: peopleReceived.type,\n\t\t\tonError: peopleRequestFailed.type,\n\t\t})\n\t);\n};\n\nexport default slice.reducer;\n","import React from 'react';\nimport { Paper } from '@material-ui/core';\n\nfunction PchPaper({ children, ...props }) {\n\treturn (\n\t\t\n\t\t\t
{children}
\n\t\t
\n\t);\n}\n\nexport default PchPaper;\n","import React from 'react';\nimport { CircularProgress, Typography } from '@material-ui/core';\n\nfunction PchLoading() {\n\treturn (\n\t\t\n\t\t\tLoading... \n\t\t\n\t);\n}\n\nexport default PchLoading;\n","import { createSlice } from '@reduxjs/toolkit';\nimport { apiCallBegan } from '../../../../store/middleware/apiActions';\nimport { proposalsAdded, proposalsDeleted } from './proposals';\nimport moment from 'moment';\n\nconst slice = createSlice({\n\tname: 'proposal',\n\tinitialState: null,\n\treducers: {\n\t\tproposalSaved: (proposal, action) => action.payload,\n\t\tproposalReceived: (proposal, action) => action.payload,\n\t\tproposalReseted: () => null,\n\t\tproposalCreated: {\n\t\t\treducer: (proposal, action) => action.payload,\n\t\t\tprepare: event => ({\n\t\t\t\tpayload: {\n\t\t\t\t\tsb_id: '',\n\t\t\t\t\tuser_id: '',\n\t\t\t\t\ttotal_amount: 0.0,\n\t\t\t\t\tproposal_type: '',\n\t\t\t\t\tduration: 0.0,\n\t\t\t\t\tnumber_of_instalments: 0,\n\t\t\t\t\tinstalments_amount: 0.0,\n\t\t\t\t\tinstalments_frequency: '',\n\t\t\t\t\tinterest_rate: 0.0,\n\t\t\t\t\tadmin_fee: 0.0,\n\t\t\t\t\tstatus: 'REQUESTED',\n\t\t\t\t\trejected_reasons: [],\n\t\t\t\t\trequested_at: moment().utc(true),\n\t\t\t\t\tuser_approved_at: null,\n\t\t\t\t\tbecame_loan_at: null,\n\t\t\t\t\tsb_approved_at: null,\n\t\t\t\t\tlast_rejected_at: null,\n\t\t\t\t\tprevious_proposal_id: '',\n\t\t\t\t\tloan_id: '',\n\t\t\t\t\tcreated_at: moment().utc(true),\n\t\t\t\t\tupdated_at: moment().utc(true),\n\t\t\t\t\tstarting_date: moment().utc(true),\n\t\t\t\t},\n\t\t\t}),\n\t\t},\n\t},\n});\n\nexport const deleteProposal = proposalId => (dispatch, getState) => {\n\tdispatch(\n\t\tapiCallBegan({\n\t\t\tapi: 'hammurabi',\n\t\t\turl: `/proposals/${proposalId}`,\n\t\t\tmethod: 'DELETE',\n\t\t\tonSuccess: proposalsDeleted.type,\n\t\t})\n\t);\n};\n\nexport const saveProposal = proposal => (dispatch, getState) => {\n\tlet method = '';\n\tlet url = '';\n\tlet onSuccess = '';\n\n\tdelete proposal.user;\n\tdelete proposal.loan;\n\tdelete proposal.previous_proposal;\n\n\tif (proposal.id === undefined) {\n\t\tmethod = 'POST';\n\t\turl = '/proposals';\n\t\tif (proposal.loan_id === '') proposal.loan_id = null;\n\t\tif (proposal.previous_proposal_id === '') proposal.previous_proposal_id = null;\n\t\tproposal.requested_at = moment().utc(true);\n\t\tproposal.created_at = moment().utc(true);\n\t\tproposal.updated_at = moment().utc(true);\n\t\tonSuccess = proposalsAdded.type;\n\t} else {\n\t\t// method = 'PUT';\n\t\t// url = `/proposals/${proposal.id}`;\n\t\t// onSuccess = proposalsUpdated.type;\n\t\t// delete proposal.id;\n\t\t// proposal.updated_at = moment().utc(true);\n\t\t// Object.keys(proposal).forEach(x => {\n\t\t// \tproposal[x] === null && delete proposal[x];\n\t\t// });\n\t}\n\n\tdispatch(\n\t\tapiCallBegan({\n\t\t\tapi: 'hammurabi',\n\t\t\turl,\n\t\t\tmethod,\n\t\t\tdata: proposal,\n\t\t\tonSuccess,\n\t\t})\n\t);\n};\n\nexport const { proposalCreated, proposalSaved, proposalReceived, proposalReseted } = slice.actions;\n\nexport default slice.reducer;\n","import { createSlice } from '@reduxjs/toolkit';\nimport { apiCallBegan } from '../../../../store/middleware/apiActions';\n\nconst slice = createSlice({\n\tname: 'payments',\n\tinitialState: {\n\t\tlist: null,\n\t\tloading: false,\n\t\tlastFetch: null,\n\t\tupdated: false,\n\t\tsearchText: '',\n\t\tnoPayments: false,\n\t},\n\treducers: {\n\t\tpaymentsRequestFailed: (payments, action) => {\n\t\t\tpayments.loading = false;\n\t\t},\n\t\tpaymentsRequested: (payments, action) => {\n\t\t\tpayments.loading = true;\n\t\t},\n\t\tpaymentsReceived: (payments, action) => {\n\t\t\tpayments.list = action.payload.data;\n\t\t\tif (action.payload.data.length === 0) payments.noPayments = true;\n\t\t\telse payments.noPayments = false;\n\t\t\tpayments.loading = false;\n\t\t\tpayments.lastFetch = Date.now();\n\t\t\tpayments.updated = false;\n\t\t},\n\t\tpaymentsAdded: (payments, action) => {\n\t\t\tpayments.list.unshift(action.payload);\n\t\t\tpayments.updated = true;\n\t\t\tpayments.noPayments = false;\n\t\t},\n\t\tpaymentsDeleted: (payments, action) => {\n\t\t\tconst index = payments.list.findIndex(s => s.id === action.payload.deletedId);\n\t\t\tpayments.list.splice(index, 1);\n\t\t\tpayments.updated = true;\n\t\t\tif (payments.list.length === 0) payments.nopPyments = true;\n\t\t},\n\t\tpaymentsUpdated: (payments, action) => {\n\t\t\tconst index = payments.list.findIndex(s => s.id === action.payload.id);\n\t\t\tpayments.list[index] = action.payload;\n\t\t\tpayments.updated = true;\n\t\t\tpayments.noPayments = false;\n\t\t},\n\t\tsearchTextChanged: (payments, action) => {\n\t\t\tpayments.searchText = action.payload;\n\t\t},\n\t\tpaymentsRelated: (payments, action) => {\n\t\t\tpayments.updated = true;\n\t\t},\n\t},\n});\n\nexport const {\n\tpaymentsAdded,\n\tpaymentsReceived,\n\tpaymentsRequested,\n\tpaymentsRequestFailed,\n\tsearchTextChanged,\n\tpaymentsUpdated,\n\tpaymentsDeleted,\n\tpaymentsRelated,\n} = slice.actions;\n\nexport const loadPayments =\n\t(loanId = '', userId = '', type = 'user', page = 1, per_page = 160) =>\n\t(dispatch, getState) => {\n\t\tdispatch(\n\t\t\tapiCallBegan({\n\t\t\t\tapi: 'hammurabi',\n\t\t\t\tmethod: 'POST',\n\t\t\t\turl: '/payments',\n\t\t\t\tparams: {\n\t\t\t\t\ttype,\n\t\t\t\t\tloan_id: loanId,\n\t\t\t\t\tuser_id: userId,\n\t\t\t\t\tpage,\n\t\t\t\t\tper_page,\n\t\t\t\t},\n\t\t\t\tonStart: paymentsRequested.type,\n\t\t\t\tonSuccess: paymentsReceived.type,\n\t\t\t\tonError: paymentsRequestFailed.type,\n\t\t\t})\n\t\t);\n\t};\n\nexport default slice.reducer;\n","import { createSlice } from '@reduxjs/toolkit';\nimport { apiCallBegan } from '../../../../store/middleware/apiActions';\n\nconst initialState = {\n\ttransactions: [],\n\tanalysisMonths: [],\n\tinitialBalance: {},\n\tfinalBalance: {},\n\tincome: [],\n\tincomeMonthly: {},\n\texpenses: [],\n\texpensesMonthly: {},\n\thiddenFlow: [],\n\thiddenMonthly: {},\n\totherFinancials: [],\n\totherFinancialsMonthly: {},\n\tdailyBalances: [],\n\ttotalDays: 0,\n\tmonthlyBalance: [],\n\tloanPayday: false,\n\tloanId: null,\n\tloading: false,\n\tupdated: false,\n\tnoTransactions: false,\n};\n\nconst slice = createSlice({\n\tname: 'loan/analysis',\n\tinitialState,\n\treducers: {\n\t\tanalysisRequestFailed: (analysis, action) => {\n\t\t\tanalysis.loading = false;\n\t\t\tanalysis.noanalysis = true;\n\t\t},\n\t\tanalysisRequested: (analysis, action) => {\n\t\t\tanalysis.loading = true;\n\t\t},\n\t\tanalysisReceived: (analysis, action) => {\n\t\t\tconst { data } = action.payload;\n\t\t\tanalysis.transactions = data.transactions;\n\t\t\tanalysis.analysisMonths = data.analysis_months;\n\t\t\tanalysis.initialBalance = data.initial_balance;\n\t\t\tanalysis.finalBalance = data.final_balance;\n\t\t\tanalysis.hiddeexcenFlow = data.hidden_flow;\n\t\t\tanalysis.hiddenMonthly = data.hidden_monthly;\n\t\t\tanalysis.income = data.income;\n\t\t\tanalysis.incomeMonthly = data.income_monthly;\n\t\t\tanalysis.expenses = data.expenses;\n\t\t\tanalysis.expensesMonthly = data.expenses_monthly;\n\t\t\tanalysis.otherFinancials = data.other_financial;\n\t\t\tanalysis.otherFinancialsMonthly = data.other_financial_monthly;\n\t\t\tanalysis.dailyBalance = data.daily_balance;\n\t\t\tanalysis.monthlyBalance = data.monthly_balance;\n\t\t\tanalysis.loanPayday = data.loan_payday;\n\t\t\tanalysis.loanId = data.loan_id;\n\t\t\tif (action.payload.data.transactions.length === 0) analysis.noTransactions = true;\n\t\t\telse analysis.noTransactions = false;\n\t\t\tanalysis.loading = false;\n\t\t\tanalysis.lastFetch = Date.now();\n\t\t\tanalysis.updated = false;\n\t\t},\n\t\tanalysisReseted: (analysis, action) => (analysis = initialState),\n\t\tanalysisAdded: (analysis, action) => {},\n\t\tanalysisDeleted: (analysis, action) => {},\n\t\tanalysisUpdated: (analysis, action) => {},\n\t\tsearchTextChanged: (analysis, action) => {\n\t\t\tanalysis.searchText = action.payload;\n\t\t},\n\t\tanalysisRelated: (analysis, action) => {\n\t\t\tanalysis.updated = true;\n\t\t},\n\t},\n});\n\nexport const {\n\tanalysisAdded,\n\tanalysisReceived,\n\tanalysisRequested,\n\tanalysisRequestFailed,\n\tsearchTextChanged,\n\tanalysisUpdated,\n\tanalysisDeleted,\n\tanalysisRelated,\n\tanalysisReseted,\n} = slice.actions;\n\nexport const loadTransactionsAnalysis = loanId => (dispatch, getState) => {\n\tdispatch(\n\t\tapiCallBegan({\n\t\t\tapi: 'hammurabi',\n\t\t\turl: `/loans/${loanId}/transaction-analysis`,\n\t\t\tonStart: analysisRequested.type,\n\t\t\tonSuccess: analysisReceived.type,\n\t\t\tonError: analysisRequestFailed.type,\n\t\t})\n\t);\n};\n\nexport default slice.reducer;\n","import React from \"react\";\n\nconst SocketContext = React.createContext();\nSocketContext.displayName = \"SocketContext\";\n\nexport default SocketContext;\n","const SOCKET_CONFIG = {\n\tserver: process.env.REACT_APP_HAMMURABI_API,\n};\n\nexport default SOCKET_CONFIG;\n","import React, { useContext, useState, useEffect } from 'react';\nimport SocketContext from './socketContext';\nimport SOCKET_CONFIG from './socketServiceConfig';\nimport io from 'socket.io-client';\n\nexport function useSocket() {\n\treturn useContext(SocketContext);\n}\n\nexport default function SocketService({ children }) {\n\tconst [socket, setSocket] = useState();\n\n\tuseEffect(() => {\n\t\t// const newSocket = io(SOCKET_CONFIG.server, {\n\t\t// \ttransports: ['websocket'],\n\t\t// });\n\t\t// setSocket(newSocket);\n\t\t// return () => newSocket.close();\n\t}, []);\n\n\treturn {children};\n}\n","import { createSlice } from '@reduxjs/toolkit';\nimport { apiCallBegan } from '../../../../store/middleware/apiActions';\nimport { loansAdded, loansUpdated, loansDeleted } from './loans';\n\nconst slice = createSlice({\n\tname: 'loan',\n\tinitialState: null,\n\treducers: {\n\t\tloanSaved: (loan, action) => action.payload,\n\t\tloanReceived: (loan, action) => action.payload,\n\t\tloanReseted: () => null,\n\t},\n});\n\nexport const deleteLoan = loanId => (dispatch, getState) => {\n\tdispatch(\n\t\tapiCallBegan({\n\t\t\tapi: 'hammurabi',\n\t\t\turl: `/loans/${loanId}`,\n\t\t\tmethod: 'DELETE',\n\t\t\tonSuccess: loansDeleted.type,\n\t\t})\n\t);\n};\n\nexport const getLoan = loanId => (dispatch, getState) => {\n\tdispatch(\n\t\tapiCallBegan({\n\t\t\tapi: 'hammurabi',\n\t\t\turl: `/loans/${loanId}`,\n\t\t\tmethod: 'GET',\n\t\t\tonSuccess: loanReceived,\n\t\t})\n\t);\n};\n\nexport const saveLoan =\n\t(loan, next = null, toast = '') =>\n\t(dispatch, getState) => {\n\t\tlet method = '';\n\t\tlet url = '';\n\t\tlet onSuccess = '';\n\n\t\tdelete loan.user;\n\t\tdelete loan.loan;\n\t\tdelete loan.previous_loan;\n\t\tdelete loan.documents;\n\t\tdelete loan.payments;\n\t\tdelete loan.proposals;\n\t\tdelete loan.manager;\n\t\tdelete loan.transactions;\n\n\t\tif (loan.id === undefined) {\n\t\t\tmethod = 'POST';\n\t\t\turl = '/loans';\n\t\t\tif (loan.loan_id === '') loan.loan_id = null;\n\t\t\tif (loan.previous_loan_id === '') loan.previous_loan_id = null;\n\t\t\tloan.requested_at = new Date();\n\t\t\tloan.created_at = new Date();\n\t\t\tloan.updated_at = new Date();\n\t\t\tonSuccess = loansAdded.type;\n\t\t} else {\n\t\t\tmethod = 'PUT';\n\t\t\turl = `/loans/${loan.id}`;\n\t\t\tonSuccess = loansUpdated.type;\n\t\t\tdelete loan.id;\n\t\t\tloan.updated_at = new Date();\n\t\t\tObject.keys(loan).forEach(x => {\n\t\t\t\tloan[x] === null && delete loan[x];\n\t\t\t});\n\t\t}\n\n\t\tif (next) {\n\t\t\tonSuccess = next.type;\n\t\t}\n\n\t\tdispatch(\n\t\t\tapiCallBegan({\n\t\t\t\tapi: 'hammurabi',\n\t\t\t\turl,\n\t\t\t\tmethod,\n\t\t\t\tdata: loan,\n\t\t\t\tonSuccess,\n\t\t\t\ttoastNotification: toast,\n\t\t\t})\n\t\t);\n\t};\n\nexport const { loanCreated, loanSaved, loanReceived, loanReseted } = slice.actions;\n\nexport default slice.reducer;\n","import { createSlice } from '@reduxjs/toolkit';\nimport { apiCallBegan } from '../../../../store/middleware/apiActions';\n\nconst slice = createSlice({\n\tname: 'banks',\n\tinitialState: {\n\t\tlist: [],\n\t\tloading: false,\n\t\tlastFetch: null,\n\t},\n\treducers: {\n\t\tbanksRequestFailed: (banks, action) => {\n\t\t\tbanks.loading = false;\n\t\t},\n\t\tbanksRequested: (banks, action) => {\n\t\t\tbanks.loading = true;\n\t\t},\n\t\tbanksReceived: (banks, action) => {\n\t\t\tbanks.list = action.payload.data;\n\t\t\tbanks.loading = false;\n\t\t\tbanks.lastFetch = Date.now();\n\t\t},\n\t},\n});\n\nexport const {\n\tbanksAdded,\n\tbanksReceived,\n\tbanksRequested,\n\tbanksRequestFailed,\n\tsearchTextChanged,\n\tbanksUpdated,\n\tbanksDeleted,\n\tbanksRelated,\n} = slice.actions;\n\nexport const loadBanks = () => (dispatch, getState) => {\n\tconst { lastFetch, list, updated } = getState().decisionLogic.banks;\n\n\tvar diffMs = Date.now() - lastFetch;\n\tvar diffHrs = Math.floor((diffMs % 86400000) / 3600000);\n\n\tif (diffHrs < 4 && list.length > 0 && !updated) return;\n\n\tdispatch(\n\t\tapiCallBegan({\n\t\t\tapi: 'hammurabi',\n\t\t\turl: '/dl/banks',\n\t\t\tonStart: banksRequested.type,\n\t\t\tonSuccess: banksReceived.type,\n\t\t\tonError: banksRequestFailed.type,\n\t\t})\n\t);\n};\n\nexport default slice.reducer;\n","import React from 'react';\nimport People from '../../../services/hammurabi/people';\nimport PchPaper from '../../../../pch/components/PchPaper/PchPaper';\nimport { useSelector } from 'react-redux';\nimport { toast } from 'react-toastify';\n\nfunction VerifyEmail() {\n\tconst { user } = useSelector(({ auth }) => auth);\n\tconst resendEmail = async () => {\n\t\tif (user) {\n\t\t\ttry {\n\t\t\t\tlet response = await People.resendEmail(user.auth_id);\n\t\t\t\ttoast.success(response.message);\n\t\t\t} catch (error) {\n\t\t\t\ttoast.error('There was an error sending the email, please try again');\n\t\t\t}\n\t\t}\n\t};\n\n\treturn (\n\t\t\n\t\t\t
\n\t\t\t\tverify email\n\t\t\t\t
Please verify your email
\n\t\t\t\t

\n\t\t\t\t\tCheck your inbox (or Spam folder) and look for an email from SimplyBorrowed's Customer Portal to verify\n\t\t\t\t\tyour address. If you have not received it, please click{' '}\n\t\t\t\t\t\n\t\t\t\t\t\there\n\t\t\t\t\t{' '}\n\t\t\t\t\tto send it again\n\t\t\t\t

\n\t\t\t
\n\t\t
\n\t);\n}\n\nexport default VerifyEmail;\n","import { createAction } from '@reduxjs/toolkit';\n\nexport const apiCallBegan = createAction('api/callBegan');\nexport const apiCallSuccess = createAction('api/callSuccess');\nexport const apiCallFailed = createAction('api/callFailed');\n","import { combineReducers } from 'redux';\nimport proposalReducer from '../../main/apps/proposals/store/proposal';\nimport proposalsReducer from '../../main/apps/proposals/store/proposals';\nimport personReducer from '../../main/apps/people/store/person';\nimport peopleReducer from '../../main/apps/people/store/people';\nimport paymentsReducer from '../../main/apps/payments/store/payments';\nimport loansReducer from '../../main/apps/loans/store/loans';\nimport loanReducer from '../../main/apps/loans/store/loan';\nimport loanAnalysisReducer from '../../main/apps/loans/store/analysis';\n\n// combinasr los entities aqui\n\nconst entities = combineReducers({\n\tpeople: peopleReducer,\n\tperson: personReducer,\n\tproposals: proposalsReducer,\n\tproposal: proposalReducer,\n\tpayments: paymentsReducer,\n\tloans: loansReducer,\n\tloan: loanReducer,\n\tloanAnalysis: loanAnalysisReducer,\n});\n\nexport default entities;\n","import { combineReducers } from '@reduxjs/toolkit';\nimport login from './loginSlice';\nimport user from './userSlice';\n\nconst authReducers = combineReducers({\n\tuser,\n\tlogin,\n});\n\nexport default authReducers;\n","import { combineReducers } from 'redux';\nimport banksReducer from '../../main/apps/decisionLogic/store/banks';\n\n// combinasr los entities aqui\n\nconst decisionLogic = combineReducers({\n\tbanks: banksReducer,\n});\n\nexport default decisionLogic;\n","import { combineReducers } from '@reduxjs/toolkit';\nimport entities from './entities';\nimport authReducers from '../auth/store/index';\nimport decisionLogic from './decisionLogic';\n\n/// Aqui colocar el de auth store\n\nconst rootReducer = combineReducers({\n\tauth: authReducers,\n\tentities,\n\tdecisionLogic,\n});\n\nexport default rootReducer;\n","import { createSlice } from \"@reduxjs/toolkit\";\n\nconst initialState = {\n state: null,\n options: {\n anchorOrigin: {\n vertical: \"top\",\n horizontal: \"center\",\n },\n autoHideDuration: 6000,\n message: \"Hi\",\n variant: null,\n },\n};\nconst messageSlice = createSlice({\n name: \"message\",\n initialState,\n reducers: {\n showMessage: (state, action) => {\n state.state = true;\n state.options = {\n ...initialState.options,\n ...action.payload,\n };\n },\n hideMessage: (state, action) => {\n state.state = null;\n },\n },\n});\n\nexport const { hideMessage, showMessage } = messageSlice.actions;\n\nexport default messageSlice.reducer;\n","// CAmbiar toda esta vaina para que lea de las variables de ambiente\nconst apiSettings = {\n hammurabi: {\n url: process.env.REACT_APP_HAMMURABI_API,\n key: process.env.REACT_APP_HAMMURABI_KEY,\n keyName: process.env.REACT_APP_HAMMURABI_KEY_NAME,\n },\n};\n\nexport default apiSettings;\n","import axiosInstance from './axiosInstance';\nimport * as actions from './apiActions';\nimport { showMessage } from '../globals/messageSlice';\nimport apiSettings from './apiSettings';\nimport { toast } from 'react-toastify';\n\nconst api =\n\t({ dispatch }) =>\n\tnext =>\n\tasync action => {\n\t\tif (typeof action === 'function') {\n\t\t\treturn next(action);\n\t\t} else {\n\t\t\tif (action.type !== actions.apiCallBegan.type) return next(action);\n\t\t}\n\n\t\tconst { api, url, method, params, data, onStart, onSuccess, onError, toastNotification } = action.payload;\n\n\t\tif (onStart) dispatch({ type: onStart });\n\n\t\tnext(action);\n\n\t\tif (!api) {\n\t\t\tdispatch(\n\t\t\t\tshowMessage({\n\t\t\t\t\tmessage: 'No se ha especificado el API correspondiente ',\n\t\t\t\t})\n\t\t\t);\n\t\t}\n\t\ttry {\n\t\t\tconst fullUrl = `${apiSettings[api].url}${url}`;\n\t\t\tconst response = await axiosInstance.request({\n\t\t\t\theaders: {\n\t\t\t\t\t[apiSettings[api].keyName]: apiSettings[api].key,\n\t\t\t\t},\n\t\t\t\turl: fullUrl,\n\t\t\t\tmethod,\n\t\t\t\tparams,\n\t\t\t\tdata,\n\t\t\t});\n\t\t\tdispatch(actions.apiCallSuccess(response.data));\n\n\t\t\tif (onSuccess) {\n\t\t\t\ttypeof onSuccess === 'function'\n\t\t\t\t\t? dispatch(onSuccess(response.data))\n\t\t\t\t\t: dispatch({ type: onSuccess, payload: response.data });\n\n\t\t\t\tif (toastNotification && toastNotification !== '') toast.success(toastNotification);\n\t\t\t}\n\t\t} catch (error) {\n\t\t\tconsole.log(error);\n\t\t\tdispatch(actions.apiCallFailed(error.message));\n\t\t\ttoast.error(`We got on error from our server, please try again`);\n\t\t\tif (onError)\n\t\t\t\ttypeof onError === 'function' ? dispatch(onError(error)) : dispatch({ type: onError, payload: error });\n\t\t}\n\t};\n\nexport default api;\n","import { configureStore, getDefaultMiddleware } from '@reduxjs/toolkit';\nimport rootReducer from './rootReducer';\nimport api from './middleware/api';\n\nconst store = configureStore({\n\treducer: rootReducer,\n\tmiddleware: [...getDefaultMiddleware({ serializableCheck: false }), api],\n\tdevTools: process.env.NODE_ENV === 'development',\n});\n\nexport default store;\n","import { createTheme } from '@material-ui/core/styles';\n\nconst sbFont = \"'Nunito',sans-serif\";\nconst sbPfont = \"'Nunito',sans-serif\";\nconst secondary = '#90FFBE';\nconst primary = '#000000';\nconst simplyGrey = '#606060';\nconst brightBlue = '#86CDFF';\n\n// A custom theme for this app\nconst theme = createTheme({\n\tbreakpoints: {\n\t\tvalues: {\n\t\t\txs: 0,\n\t\t\tsm: 640,\n\t\t\tmd: 768,\n\t\t\tlg: 1024,\n\t\t\txl: 1280,\n\t\t},\n\t},\n\tpalette: {\n\t\ttype: 'light',\n\t\tprimary: {\n\t\t\tmain: primary,\n\t\t},\n\t\tsecondary: {\n\t\t\tmain: secondary,\n\t\t\tcontrastText: simplyGrey,\n\t\t},\n\t\ticon: '#000000',\n\t},\n\tstatus: {\n\t\tdanger: 'orange',\n\t},\n\ttypography: {\n\t\thtmlFontSize: 16,\n\t\tfontSize: 16,\n\t\tfontFamily: sbPfont,\n\t\th1: {\n\t\t\tfontFamily: sbFont,\n\t\t},\n\t\th2: {\n\t\t\tfontFamily: sbFont,\n\t\t\tfontWeight: 'bold',\n\t\t},\n\t\th3: {\n\t\t\tfontFamily: sbFont,\n\t\t\tfontWeight: 'medium',\n\t\t},\n\t\th4: {\n\t\t\tfontFamily: sbFont,\n\t\t\tfontWeight: 'medium',\n\t\t},\n\t\th5: {\n\t\t\tfontFamily: sbFont,\n\t\t\tfontWeight: 'medium',\n\t\t},\n\t\th6: {\n\t\t\tfontFamily: sbFont,\n\t\t},\n\t},\n\toverrides: {\n\t\tMuiButton: {\n\t\t\tcontained: {\n\t\t\t\tpadding: '24px 36px 24px 36px',\n\t\t\t\tborderRadius: '100px 100px 100px 100px',\n\t\t\t\tcolor: simplyGrey,\n\t\t\t\tboxShadow: 'none',\n\t\t\t\t'&.MuiButton-contained:hover': {\n\t\t\t\t\tbackgroundColor: brightBlue,\n\t\t\t\t\tcolor: '#fff',\n\t\t\t\t\tboxShadow: '0px 6px 8px 8px rgba(0, 0, 0, 0.05);',\n\t\t\t\t},\n\t\t\t},\n\t\t\toutlined: {\n\t\t\t\tpadding: '24px 36px 24px 36px',\n\t\t\t\tborderRadius: '100px 100px 100px 100px',\n\t\t\t\tboxShadow: 'none',\n\t\t\t\tmarginInline: '20px',\n\t\t\t},\n\t\t},\n\t},\n\tprops: {\n\t\tMuiButtonBase: {\n\t\t\tdisableRipple: true,\n\t\t\tdisableTouchRipple: true,\n\t\t},\n\t\tMuiButton: {\n\t\t\tvariant: 'contained',\n\t\t\tsize: 'large',\n\t\t},\n\t},\n});\n\nexport const darkTheme = createTheme({\n\tpalette: {\n\t\ttype: 'dark',\n\t\tprimary: {\n\t\t\tmain: '#7EB6DD',\n\t\t},\n\t\tsecondary: {\n\t\t\tmain: '#FFCF56',\n\t\t},\n\t\ticon: '#f2f2f2',\n\t},\n\tstatus: {\n\t\tdanger: 'orange',\n\t},\n\tbackground: {\n\t\textra: '#3c3c3c',\n\t},\n\toverrides: {\n\t\tMuiButton: {\n\t\t\tcontained: {\n\t\t\t\tbackgroundColor: '#7EB6DD',\n\t\t\t\tcolor: 'white',\n\t\t\t\tpadding: '0 30px',\n\t\t\t\t'&:hover': {\n\t\t\t\t\tbackgroundColor: '#7EB6DD',\n\t\t\t\t\tborderColor: '#0062cc',\n\t\t\t\t},\n\t\t\t},\n\t\t\toutlined: {\n\t\t\t\tcolor: '#7EB6DD',\n\t\t\t\tpadding: '0 30px',\n\t\t\t\tborderRadius: '100',\n\t\t\t\t'&:hover': {\n\t\t\t\t\tborderColor: '#0062cc',\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t},\n\tprops: {\n\t\tMuiButton: {\n\t\t\tvariant: 'contained',\n\t\t\tsize: 'small',\n\t\t},\n\t},\n});\n\nexport default theme;\n","import { useEffect, useState } from 'react';\nimport { useLocation } from 'react-router';\n\nfunction useActiveMenu() {\n\tconst location = useLocation();\n\tconst [active, setActive] = useState(null);\n\n\tuseEffect(() => {\n\t\tconst path = location.pathname;\n\t\tswitch (path) {\n\t\t\tcase '/loans':\n\t\t\t\tsetActive('loans');\n\t\t\t\tbreak;\n\t\t\tcase '/payments':\n\t\t\t\tsetActive('payments');\n\t\t\t\tbreak;\n\t\t\tcase '/':\n\t\t\t\tsetActive('dashboard');\n\t\t\t\tbreak;\n\t\t\tcase '/people':\n\t\t\t\tsetActive('people');\n\t\t\t\tbreak;\n\t\t\tcase '/help':\n\t\t\t\tsetActive('help');\n\t\t\t\tbreak;\n\t\t\tcase '/profile':\n\t\t\t\tsetActive('profile');\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tsetActive('none');\n\t\t\t\tbreak;\n\t\t}\n\t}, [location, active]);\n\n\treturn { active, setActive };\n}\n\nexport default useActiveMenu;\n","import React from 'react';\nimport { BottomNavigation, BottomNavigationAction } from '@material-ui/core';\nimport AccountBoxIcon from '@material-ui/icons/AccountBox';\nimport HomeIcon from '@material-ui/icons/Home';\nimport AccountBalanceIcon from '@material-ui/icons/AccountBalance';\nimport HelpIcon from '@material-ui/icons/Help';\nimport { useHistory } from 'react-router';\nimport useSimplyTeam from '../../../pch/hooks/useSimplyTeam';\nimport { PeopleAlt } from '@material-ui/icons';\nimport useActiveMenu from '../../../pch/hooks/useActiveMenu';\nimport ExitToAppIcon from '@material-ui/icons/ExitToApp';\n\nfunction MobileFooter() {\n\t// eslint-disable-next-line no-unused-vars\n\tconst [value, setValue] = React.useState(0);\n\tconst history = useHistory();\n\tconst { sb } = useSimplyTeam();\n\tconst { active } = useActiveMenu();\n\treturn (\n\t\t
\n\t\t\t {\n\t\t\t\t\tsetValue(newValue);\n\t\t\t\t}}\n\t\t\t\tclassName='rounded-full'\n\t\t\t>\n\t\t\t\t}\n\t\t\t\t\tonClick={() => history.push('/')}\n\t\t\t\t/>\n\t\t\t\t}\n\t\t\t\t\tonClick={() => history.push('/payments')}\n\t\t\t\t/>\n\t\t\t\t}\n\t\t\t\t\tonClick={() => history.push('/profile')}\n\t\t\t\t/>\n\n\t\t\t\t{sb ? (\n\t\t\t\t\t}\n\t\t\t\t\t\tonClick={() => history.push('/people')}\n\t\t\t\t\t/>\n\t\t\t\t) : (\n\t\t\t\t\t}\n\t\t\t\t\t\tonClick={() => history.push('/help')}\n\t\t\t\t\t/>\n\t\t\t\t)}\n\t\t\t\t}\n\t\t\t\t\tonClick={() => history.push('/logout')}\n\t\t\t\t/>\n\t\t\t\n\t\t
\n\t);\n}\n\nexport default MobileFooter;\n","import axios from 'axios';\n\nclass Hammauth {\n\tvalidateToken = data => {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\taxios\n\t\t\t\t.request({\n\t\t\t\t\theaders: {\n\t\t\t\t\t\t'X-Hammurabi-Key': `${process.env.REACT_APP_HAMMURABI_KEY}`,\n\t\t\t\t\t},\n\t\t\t\t\tmethod: 'POST',\n\t\t\t\t\turl: `${process.env.REACT_APP_HAMMURABI_API}/auth/validate`,\n\t\t\t\t\tdata: data,\n\t\t\t\t})\n\t\t\t\t.then(({ data }) => {\n\t\t\t\t\tresolve(data);\n\t\t\t\t})\n\t\t\t\t.catch(e => {\n\t\t\t\t\treject(e);\n\t\t\t\t});\n\t\t});\n\t};\n}\n\nconst instance = new Hammauth();\n\nexport default instance;\n","import { useAuth0 } from '@auth0/auth0-react';\nimport React, { useCallback, useEffect } from 'react';\nimport { useDispatch, useSelector } from 'react-redux';\nimport { Redirect, Route } from 'react-router-dom';\nimport VerifyEmail from '../main/apps/pages/VerifyEmail';\nimport { getPersonAndUser } from './store/loginSlice';\nimport { CircularProgress } from '@material-ui/core';\nimport Hammauth from '../services/hammurabi/auth';\nimport { toast } from 'react-toastify';\n\nfunction ProtectedRoute({ component: Component, render, ...rest }) {\n\tconst { isLoading, user, isAuthenticated, getIdTokenClaims } = useAuth0();\n\tconst loginSuccess = useSelector(({ auth }) => auth.login.success);\n\tconst loggedInUser = useSelector(({ auth }) => auth.user);\n\tconst person = useSelector(({ entities }) => entities.person.data);\n\tconst dispatch = useDispatch();\n\tconst [wrongToken, setWrongToken] = React.useState(false);\n\n\tconst validateToken = useCallback(\n\t\tasync token => {\n\t\t\ttry {\n\t\t\t\tconst response = await Hammauth.validateToken({ token });\n\t\t\t\tif (response.code === 200) {\n\t\t\t\t\tdispatch(getPersonAndUser(user, rest));\n\t\t\t\t} else {\n\t\t\t\t\tsetWrongToken(true);\n\t\t\t\t}\n\t\t\t} catch (e) {\n\t\t\t\tsetWrongToken(true);\n\t\t\t}\n\t\t},\n\t\t[user, rest, dispatch]\n\t);\n\n\tuseEffect(() => {\n\t\tif (user && !person) {\n\t\t\tsetWrongToken(false);\n\t\t\tgetIdTokenClaims().then(async claims => {\n\t\t\t\tconst token = claims.__raw;\n\t\t\t\tvalidateToken(token);\n\t\t\t});\n\t\t}\n\t}, [setWrongToken, user, person, getIdTokenClaims, dispatch, rest, validateToken]);\n\n\tif (wrongToken) {\n\t\ttoast.error('There was an error with your login information. Please log in again or contact us.');\n\n\t\treturn (\n\t\t\t\n\t\t);\n\t}\n\n\tif (isLoading) {\n\t\treturn (\n\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t
\n\t\t);\n\t}\n\n\tif (!isAuthenticated && !loginSuccess) {\n\t\tlocalStorage.removeItem('HammurabiAuth');\n\n\t\treturn (\n\t\t\t\n\t\t);\n\t}\n\n\tif (isAuthenticated && !loginSuccess) {\n\t\treturn (\n\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t
\n\t\t);\n\t}\n\n\tif (!loginSuccess) {\n\t\treturn (\n\t\t\t\n\t\t);\n\t}\n\n\tif (!loggedInUser.email_verified) {\n\t\treturn ;\n\t}\n\n\treturn (\n\t\t {\n\t\t\t\treturn Component ? : render(props);\n\t\t\t}}\n\t\t>\n\t);\n}\n\nexport default ProtectedRoute;\n","import React from 'react';\nimport { useSelector } from 'react-redux';\nimport { useHistory } from 'react-router-dom';\nimport { profileIncomplete } from '../../main/apps/people/store/person';\n\nconst WhiteButton = ({ content, onClick }) => {\n\treturn (\n\t\t\n\t\t\t{content}\n\t\t\n\t);\n};\n\nfunction UserActionButton() {\n\tconst proposals = useSelector(({ entities }) => entities.proposals.list);\n\tconst loans = useSelector(({ entities }) => entities.loans.list);\n\tconst person = useSelector(({ entities }) => entities.person.data);\n\tconst history = useHistory();\n\n\tconst handleNewLoan = () => {\n\t\thistory.push('/proposals/new');\n\t};\n\n\tconst handleProfile = e => {\n\t\thistory.push('/profile');\n\t};\n\n\tif (person && profileIncomplete(person)) {\n\t\treturn ;\n\t}\n\n\tif (proposals?.length === 0 && loans?.length === 0) {\n\t\treturn ;\n\t}\n\treturn <>;\n}\n\nexport default UserActionButton;\n","import React, { useCallback, useState } from 'react';\nimport AppBar from '@material-ui/core/AppBar';\nimport Toolbar from '@material-ui/core/Toolbar';\nimport IconButton from '@material-ui/core/IconButton';\nimport MenuItem from '@material-ui/core/MenuItem';\nimport Menu from '@material-ui/core/Menu';\nimport { Link } from 'react-router-dom';\nimport withWidth from '@material-ui/core/withWidth';\nimport { useAuth0 } from '@auth0/auth0-react';\nimport { useDispatch, useSelector } from 'react-redux';\nimport { logoutUser } from '../../auth/store/loginSlice';\nimport { useHistory } from 'react-router';\nimport useSimplyTeam from '../../../pch/hooks/useSimplyTeam';\nimport useActiveMenu from '../../../pch/hooks/useActiveMenu';\nimport UserActionButton from './UserActionButton';\nimport { useTranslation } from 'react-i18next';\n\nfunction TopBar(props) {\n\tconst [anchorEl, setAnchorEl] = useState(null);\n\tconst user = useSelector(({ auth }) => auth.user);\n\tconst { logout } = useAuth0();\n\tconst dispatch = useDispatch();\n\tconst openProfile = Boolean(anchorEl);\n\tconst history = useHistory();\n\tconst { sb } = useSimplyTeam();\n\tconst { active, setActive } = useActiveMenu();\n\tconst { t } = useTranslation();\n\n\tconst handleProfileMenuOpen = event => {\n\t\tsetAnchorEl(event.currentTarget);\n\t};\n\n\tconst handleCloseProfile = useCallback(() => {\n\t\tsetAnchorEl(null);\n\t}, []);\n\n\tconst handleViewProfile = () => {\n\t\thandleCloseProfile();\n\t\thistory.push('/profile');\n\t};\n\n\tconst handleLogout = () => {\n\t\tlogout();\n\t\tdispatch(logoutUser());\n\t};\n\n\tconst handleActiveMenu = e => {\n\t\tsetActive(e.target.id === 'logo' ? 'dashboard' : e.target.id);\n\t};\n\n\tconst activeMenu = () => {\n\t\treturn 'border-b-4 pb-4 border-green-400';\n\t};\n\n\treturn (\n\t\t<>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\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t
\n\t\t\t{/* \n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t\t\n\t\t\t\t\n\t\t\t */}\n\t\t\n\t);\n}\n\nexport default withWidth()(TopBar);\n","import { Box, CircularProgress } from '@material-ui/core';\n\nfunction SuspenseLoader({ phase = '' }) {\n\treturn (\n\t\t\n\t\t\t\n\t\t\t
{phase}
\n\t\t\n\t);\n}\n\nexport default SuspenseLoader;\n","import React from 'react';\nimport ContactSupportIcon from '@material-ui/icons/ContactSupport';\nimport { Container } from '@material-ui/core';\nimport { Link } from 'react-router-dom';\nimport moment from 'moment';\n\nfunction Footer() {\n return (\n
\n \n
\n
\n ©{moment().year()} - SimplyBorrowed Inc.{' '}\n
\n
\n \n Need Help {' '}\n \n
\n
\n SimplyBorrowed's Customer Portal\n
\n
\n
\n
\n );\n}\n\nexport default Footer;\n","import { useState, useEffect } from 'react';\nimport { useAuth0 } from '@auth0/auth0-react';\n\nconst INACTIVITY_TIMEOUT = 20 * 60 * 1000;\nconst CHECK_INTERVAL = 2 * 60 * 1000;\nconst DEBOUNCE_DELAY = 500;\n\nexport const useInactivityMonitor = (isSbTeam) => {\n const [lastActivity, setLastActivity] = useState(Date.now());\n const { logout } = useAuth0();\n\n useEffect(() => {\n if (isSbTeam) return;\n let inactivityTimer;\n let debounceTimer;\n\n const resetTimer = () => {\n setLastActivity(Date.now());\n };\n\n const debouncedResetTimer = () => {\n console.log('Event detected');\n clearTimeout(debounceTimer);\n debounceTimer = setTimeout(() => {\n resetTimer();\n }, DEBOUNCE_DELAY);\n };\n\n const checkInactivity = () => {\n const currentTime = Date.now();\n const timeSinceLastActivity = currentTime - lastActivity;\n\n if (timeSinceLastActivity >= INACTIVITY_TIMEOUT) {\n localStorage.clear();\n logout({ returnTo: window.location.origin });\n }\n };\n\n window.addEventListener('mousedown', debouncedResetTimer);\n\n const intervalTimer = setInterval(checkInactivity, CHECK_INTERVAL);\n\n return () => {\n window.removeEventListener('mousedown', debouncedResetTimer);\n clearInterval(intervalTimer);\n clearTimeout(inactivityTimer);\n clearTimeout(debounceTimer);\n };\n }, [lastActivity, logout]);\n\n const resetInactivityTimer = () => {\n if (!isSbTeam) {\n setLastActivity(Date.now());\n }\n };\n\n return { resetInactivityTimer };\n};\n","import React, { Suspense, lazy } from 'react';\nimport CssBaseline from '@material-ui/core/CssBaseline';\nimport { Hidden } from '@material-ui/core';\nimport MobileFooter from './components/MobileFooter';\nimport { Route, Switch } from 'react-router-dom';\nimport ProtectedRoute from '../auth/protectedRoute';\nimport useSimplyTeam from '../../pch/hooks/useSimplyTeam';\nimport PchLoading from '../../pch/components/PchLoading';\nimport TopBar from './components/TopBar';\nimport SuspenseLoader from './SuspenseLoader';\nimport Footer from './components/Footer';\nimport { useInactivityMonitor } from '../../hooks/useInactivityMonitor';\n\nconst Loader = (Component) => (props) =>\n (\n }>\n \n \n );\n\nconst Help = Loader(lazy(() => import('../main/apps/help/Help')));\nconst Payments = Loader(lazy(() => import('../main/apps/payments/Payments')));\n// const LoanAnalysis = Loader(lazy(() => import('../main/apps/loans/LoanAnalysis')));\nconst PCAProcess = Loader(lazy(() => import('../main/apps/loans/PCAProcess')));\nconst LoanDetailCustomer = Loader(lazy(() => import('../main/apps/loans/LoanDetailCustomer')));\nconst LoanDetailSB = Loader(lazy(() => import('../main/apps/loans/LoanDetailSB')));\nconst LoanHistoryTable = Loader(lazy(() => import('../main/apps/loans/LoanHistoryTable')));\nconst DecisionLogicRequest = Loader(\n lazy(() => import('../main/apps/decisionLogic/DecisionLogicRequest'))\n);\nconst DecisionLogicCallback = Loader(\n lazy(() => import('../main/apps/decisionLogic/DecisionLogicCallback'))\n);\nconst PeopleDetail = Loader(lazy(() => import('../main/apps/people/PeopleDetail')));\nconst People = Loader(lazy(() => import('../main/apps/people/People')));\nconst ProposalVerification = Loader(\n lazy(() => import('../main/apps/proposals/ProposalVerification'))\n);\nconst Proposals = Loader(lazy(() => import('../main/apps/proposals/Proposals')));\nconst Profile = Loader(lazy(() => import('../main/apps/people/Profile')));\nconst DeleteInformation = Loader(lazy(() => import('../main/apps/people/DeleteInformation')));\nconst ProfileUpdated = Loader(lazy(() => import('../main/apps/people/ProfileUpdated')));\nconst VerifyEmail = Loader(lazy(() => import('../main/apps/pages/VerifyEmail')));\nconst VerifiedEmail = Loader(lazy(() => import('../main/apps/pages/VerifiedEmail')));\nconst VerificationError = Loader(lazy(() => import('../main/apps/proposals/VerificationError')));\nconst ErrorPage = Loader(lazy(() => import('../main/apps/pages/ErrorPage')));\nconst DashBoard = Loader(lazy(() => import('../main/apps/dashboard/DashBoard')));\nconst MarketingLinks = Loader(lazy(() => import('../main/apps/marketing/MarketingLinks')));\nconst LoanAnalysis = Loader(lazy(() => import('../main/apps/loans/LoanAnalysis')));\nconst Settings = Loader(lazy(() => import('../main/apps/settings/SettingsHome')));\nconst Unauthorized = Loader(lazy(() => import('../main/apps/pages/Unauthorized')));\nconst CWAResults = Loader(lazy(() => import('../main/apps/cwa/CWAResults')));\n\nconst ApproveCreditReport = Loader(lazy(() => import('../main/apps/pages/ApproveCreditReport')));\n\nconst ApprovedCreditReport = Loader(lazy(() => import('../main/apps/pages/ApprovedCreditReport')));\n\nconst RejectedCreditReport = Loader(lazy(() => import('../main/apps/pages/RejectedCreditReport')));\n\nfunction Layout(props) {\n const { loadingSB, sb } = useSimplyTeam();\n useInactivityMonitor(sb);\n return (\n
\n \n \n
\n
\n {loadingSB ? (\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 \n \n \n \n \n \n \n \n \n \n \n )}\n
\n\n
\n \n \n \n
\n
\n );\n}\n\nexport default Layout;\n","import React from 'react';\nimport { useHistory } from 'react-router-dom';\nimport { Auth0Provider } from '@auth0/auth0-react';\n\nconst Auth0ProviderWithHistory = ({ children }) => {\n\tconst domain = process.env.REACT_APP_AUTH0_DOMAIN;\n\tconst clientId = process.env.REACT_APP_AUTH0_CLIENT_ID;\n\n\tconst history = useHistory();\n\n\tconst onRedirectCallback = appState => {\n\t\t// console.log('appState', appState);\n\t\t// console.log('returnTo', window.location.pathname);\n\t\t// console.log('history', history);\n\t\t// console.log('history.location', history.location);\n\t\t// console.log('history.location.pathname', history.location.pathname);\n\t\t// console.log('window location pathname', window.location);\n\n\t\thistory.push(appState?.returnTo || window.location.pathname);\n\t};\n\n\treturn (\n\t\t\n\t\t\t{children}\n\t\t\n\t);\n};\n\nexport default Auth0ProviderWithHistory;\n","import React from 'react';\nimport { useAuth0 } from '@auth0/auth0-react';\nimport { Button } from '@material-ui/core';\n\nconst SignupButton = () => {\n\tconst { loginWithRedirect } = useAuth0();\n\treturn (\n\t\t
\n\t\t\t\n\t\t\t\t\tloginWithRedirect({\n\t\t\t\t\t\tscreen_hint: 'signup',\n\t\t\t\t\t})\n\t\t\t\t}\n\t\t\t>\n\t\t\t\tSign Up\n\t\t\t\n\t\t
\n\t);\n};\n\nexport default SignupButton;\n","import React from 'react';\nimport { useAuth0 } from '@auth0/auth0-react';\nimport { Button, CircularProgress } from '@material-ui/core';\n\nconst LoginButton = ({ urlToRedirect }) => {\n const { loginWithRedirect, isLoading } = useAuth0();\n\n const handleLogin = () => {\n if (urlToRedirect) {\n loginWithRedirect({\n appState: { returnTo: urlToRedirect }\n });\n } else {\n loginWithRedirect();\n }\n };\n\n if (isLoading) {\n ;\n }\n\n return (\n
\n \n Log In\n \n
\n );\n};\n\nexport default LoginButton;\n","import React, { useEffect, useState } from 'react';\nimport { CircularProgress, CssBaseline, Grid, makeStyles, Paper, Typography } from '@material-ui/core';\nimport SignupButton from '../../auth/components/signup-button';\nimport LoginButton from '../../auth/components/login-button';\nimport clsx from 'clsx';\n\nconst useStyles = makeStyles(theme => ({\n\troot: {\n\t\theight: '100vh',\n\t},\n\timage: {\n\t\tbackgroundImage: \"url('https://hammurabi-app.s3.ca-central-1.amazonaws.com/public/iStock-1068078956.jpeg')\",\n\t\tbackgroundRepeat: 'no-repeat',\n\t\tbackgroundColor: theme.palette.type === 'light' ? theme.palette.grey[50] : theme.palette.grey[900],\n\t\tbackgroundSize: 'cover',\n\t\tbackgroundPosition: 'center',\n\t},\n\tpaper: {\n\t\tpaddingTop: 40,\n\t\talignItems: 'center',\n\t\ttextAlign: 'center',\n\t\twidth: '90%',\n\t\tmargin: 'auto',\n\t},\n\tavatar: {\n\t\tmargin: theme.spacing(1),\n\t\tbackgroundColor: theme.palette.secondary.main,\n\t},\n\tform: {\n\t\twidth: '100%', // Fix IE 11 issue.\n\t\tmarginTop: theme.spacing(1),\n\t},\n\tsubmit: {\n\t\tmargin: theme.spacing(3, 0, 2),\n\t},\n\n\tlogo: {\n\t\tmaxWidth: '400px',\n\t},\n}));\n\nfunction Auth0({ isLoading, isAuthenticated, urlToRedirect }) {\n\tconst classes = useStyles();\n\tconst [bgNumber, setBgNumber] = useState(null);\n\n\tuseEffect(() => {\n\t\tif (!bgNumber) {\n\t\t\tconst rndInt = Math.floor(Math.random() * 6) + 1;\n\t\t\tsetBgNumber(rndInt);\n\t\t}\n\t\treturn () => {};\n\t\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\t}, []);\n\n\tif (isLoading) {\n\t\treturn (\n\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t
\n\t\t);\n\t}\n\n\treturn (\n\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t{isLoading ? (\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t) : (\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tIn order to continue you can create a account by signing up\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tOr if you already have an account you can Login\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t)}\n\t\t\t\t\n\t\t\t\n\t\t\n\t);\n}\n\nexport default Auth0;\n","import React from 'react';\nimport { useAuth0 } from '@auth0/auth0-react';\nimport { useLocation } from 'react-router-dom';\n\nimport Auth0 from './Auth0';\n\nexport default function Login(props) {\n const { isAuthenticated, isLoading } = useAuth0();\n const location = useLocation();\n let urlToRedirect = undefined;\n if (location.state && location.state.from && location.state.from.pathname !== '/') {\n urlToRedirect = location.state.from.pathname;\n }\n console.log(urlToRedirect);\n\n return (\n \n );\n}\n","import SocketService from \"./socketService\";\n\nexport default SocketService;\n","import { useAuth0 } from '@auth0/auth0-react';\nimport React, { useEffect, useState } from 'react';\nimport { useDispatch } from 'react-redux';\nimport { logoutUser } from '../../auth/store/loginSlice';\nimport { CssBaseline, Grid, Paper, Typography, makeStyles } from '@material-ui/core';\nimport clsx from 'clsx';\n\nconst useStyles = makeStyles(theme => ({\n\troot: {\n\t\theight: '100vh',\n\t},\n\timage: {\n\t\tbackgroundRepeat: 'no-repeat',\n\t\tbackgroundColor: theme.palette.type === 'light' ? theme.palette.grey[50] : theme.palette.grey[900],\n\t\tbackgroundSize: 'cover',\n\t\tbackgroundPosition: 'center',\n\t},\n\tpaper: {\n\t\tpaddingTop: 40,\n\t\talignItems: 'center',\n\t\ttextAlign: 'center',\n\t\twidth: '90%',\n\t\tmargin: 'auto',\n\t},\n\tavatar: {\n\t\tmargin: theme.spacing(1),\n\t\tbackgroundColor: theme.palette.secondary.main,\n\t},\n\tform: {\n\t\twidth: '100%', // Fix IE 11 issue.\n\t\tmarginTop: theme.spacing(1),\n\t},\n\tsubmit: {\n\t\tmargin: theme.spacing(3, 0, 2),\n\t},\n\n\tlogo: {\n\t\tmaxWidth: '400px',\n\t},\n}));\n\nfunction Logout() {\n\tconst classes = useStyles();\n\tconst { logout } = useAuth0();\n\tconst dispatch = useDispatch();\n\n\tuseEffect(() => {\n\t\tlocalStorage.removeItem('HammurabiAuth');\n\t\tlogout();\n\t\tdispatch(logoutUser());\n\t}, [dispatch, logout]);\n\n\tconst [bgNumber, setBgNumber] = useState(null);\n\n\tuseEffect(() => {\n\t\tif (!bgNumber) {\n\t\t\tconst rndInt = Math.floor(Math.random() * 6) + 1;\n\t\t\tsetBgNumber(rndInt);\n\t\t}\n\t\treturn () => {};\n\t\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\t}, []);\n\n\treturn (\n\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tLogging you Out, please wait...\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\n\t);\n}\n\nexport default Logout;\n","import React, { useEffect } from 'react';\nimport './css/Fonts.css';\nimport './css/dl.css';\nimport Provider from 'react-redux/es/components/Provider';\nimport store from './store';\nimport theme from './config/theme';\nimport { CssBaseline, ThemeProvider } from '@material-ui/core';\nimport { BrowserRouter, Route, Switch } from 'react-router-dom';\nimport Layout from './layout/Layout';\nimport Auth0ProviderWithHistory from './auth/auth0-provider-with-history';\nimport Login from './main/login/Login';\nimport SocketService from './services/socket';\nimport { ToastContainer } from 'react-toastify';\nimport 'react-toastify/dist/ReactToastify.css';\nimport { deleteLoginFromLocalStorage } from './auth/store/loginSlice';\nimport 'react-datepicker/dist/react-datepicker.css';\nimport Logout from './main/login/Logout';\nimport * as Sentry from '@sentry/react';\n\n// Solo inicializa Sentry si estamos en producción\nif (process.env.NODE_ENV === 'production') {\n Sentry.init({\n dsn: 'https://019450a85c096d06f50ebc1b9fc4e805@o4507476336967680.ingest.us.sentry.io/4508122679410688',\n integrations: [\n Sentry.browserTracingIntegration(),\n Sentry.replayIntegration(),\n ],\n tracesSampleRate: 1.0,\n replaysSessionSampleRate: 1.0,\n replaysOnErrorSampleRate: 1.0,\n environment: 'production' // Cambiado a 'production'\n });\n}\n\nconst queryString = window.location.search;\nconst urlParams = new URLSearchParams(queryString);\n\nfunction App() {\n if (localStorage.getItem('hammurabi-user')) {\n deleteLoginFromLocalStorage();\n }\n\n useEffect(() => {\n if (urlParams.get('sbm')) {\n localStorage.setItem('HammMID', urlParams.get('sbm'));\n }\n if (urlParams.get('lr')) {\n localStorage.setItem('HammLoginRedirect', urlParams.get('lr'));\n }\n }, []);\n\n // Envuelve el componente con ErrorBoundary solo en producción\n const AppContent = () => (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n );\n\n return process.env.NODE_ENV === 'production' ? (\n \n \n \n ) : (\n \n );\n}\n\nexport default App;","const reportWebVitals = onPerfEntry => {\n if (onPerfEntry && onPerfEntry instanceof Function) {\n import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => {\n getCLS(onPerfEntry);\n getFID(onPerfEntry);\n getFCP(onPerfEntry);\n getLCP(onPerfEntry);\n getTTFB(onPerfEntry);\n });\n }\n};\n\nexport default reportWebVitals;\n","import i18n from 'i18next';\n\nimport { initReactI18next } from 'react-i18next';\n\nimport Backend from 'i18next-http-backend';\nimport LanguageDetector from 'i18next-browser-languagedetector';\n\n// import LanguageDetector from 'i18next-browser-languagedetector';\nimport enJSON from './translations/en';\nimport esJSON from './translations/es';\nimport frJSON from './translations/fr';\n\nconst resources = {\n\ten: { translation: enJSON },\n\tes: { translation: esJSON },\n\tfr: { translation: frJSON },\n};\n\ni18n\n\t// .use(LanguageDetector)\n\t.use(Backend)\n\t.use(LanguageDetector)\n\t.use(initReactI18next)\n\t.init({\n\t\tresources,\n\t\tkeySeparator: false,\n\t\tlng: 'en',\n\t\tfallbackLng: 'en',\n\t\treact: {\n\t\t\tuseSuspense: true,\n\t\t},\n\t\tinterpolation: {\n\t\t\tescapeValue: false,\n\t\t},\n\t});\n\nexport default i18n;\n","const enJSON = {\n\tSimplyBorrowed: 'SimplyBorrowed',\n\t'Customer Portal': 'Customer Portal',\n\t'Apply for a loan': 'Apply for a loan',\n\t'Please complete your profile before applying for a loan.':\n\t\t'Please complete your profile before applying for a loan.',\n\t'Complete my profile': 'Complete my profile',\n\t'Your legal status document has been rejected.': 'Your legal status document has been rejected.',\n\t'Update my legal status document.': 'Update my legal status document.',\n\t'Loans Information': 'Loans Information',\n\t'Details about loans that you have requested.': 'Details about loans that you have requested.',\n\tNumber: 'Number',\n\tAmount: 'Amount',\n\tStatus: 'Status',\n\tAction: 'Action',\n\tClose: 'Close',\n\tCancel: 'Cancel',\n\tConfirm: 'Confirm',\n\t'Pending Loan Requests': 'Pending Loan Requests',\n\t\"You have a loan request that has not finish it's verification process\":\n\t\t\"You have a loan request that has not finish it's verification process.\",\n\t'Ask for a new one': 'Ask for a new one',\n\t'NOTE: You can only have one active loan or request on your profile. If you need to cancel a requested loan you could write us at info@simplyborrowed.ca.':\n\t\t'NOTE: You can only have one active loan or request on your profile. If you need to cancel a requested loan you could write us at info@simplyborrowed.ca.',\n\tDashboard: 'Dashboard',\n\tPayments: 'Payments',\n\tUsers: 'Users',\n\tMarketing: 'Marketing',\n\tSettings: 'Settings',\n\tHelp: 'Help',\n\tProfile: 'Profile',\n\tLogout: 'Logout',\n\tHome: 'Home',\n\tLOAN: 'LOAN',\n\t'Server is not responding': 'Server is not responding.',\n\t'You cannot refinance this loan until your next payment is completed':\n\t\t'You cannot refinance this loan until your next payment is completed',\n\t\"You can't pay the full balance while having due instalments\":\n\t\t\"You can't pay the full balance while having due instalments\",\n\t\"You can't pay the full balance when your next payment is due within the next 5 business days.\":\n\t\t\"You can't pay the full balance when your next payment is due within the next 5 business days.\",\n\t\"You will be able to pay your loan's full balance, once your loan has been funded.\":\n\t\t\"You will be able to pay your loan's full balance, once your loan has been funded.\",\n\t\"You will be able to refinance after you have paid all your due instalments'\":\n\t\t'You will be able to refinance after you have paid all your due instalments',\n\t'You will be able to refinance your loan after 60 days from your last payment':\n\t\t'You will be able to refinance your loan after 60 days from your last payment',\n\t'Go back to all Loans': 'Go back to all Loans',\n\t'This loan has been suspended. Please contact us for more information at info@simplyborrowed.ca':\n\t\t'This loan has been suspended. Please contact us for more information at info@simplyborrowed.ca',\n\t'This loan has some documents requested. Please scroll down and upload them as soon as possible.':\n\t\t'This loan has some documents requested. Please scroll down and upload them as soon as possible.',\n\t'General conditions': 'General Conditions',\n\t'Bank Information': 'Bank Information',\n\t'Change bank information': 'Change bank information',\n\t\"You've already requested a Bank Change\": \"You've already requested a Bank Change\",\n\t'Your last bank change request was cancelled, you could request a new one':\n\t\t'Your last bank change request was cancelled, you could request a new one',\n\t'Instalments Payed': 'Instalments Payed',\n\t'Your current Balance is:': 'Your current Balance is:',\n\t'You have already requested a FULL PAYMENT of your Loan. You will be notified by email once the transaction is completed.':\n\t\t'You have already requested a FULL PAYMENT of your Loan. You will be\\n\\t\\tnotified by email once the transaction is completed.',\n\n\t'Pay full balance': 'Pay full balance',\n\t'Refinance loan': 'Refinance loan',\n\t'Interest rate': 'Interest Rate',\n\t'Admin fees': 'Admin fees',\n\t'Payment Schedule': 'Payment Schedule',\n\t'No payment has been registered for this loan.': 'No payment has been registered for this loan',\n\t'Your Next Payment is Due on': 'Your Next Payment is Due on',\n\t'Contract Information': 'Contract Information',\n\t'Additional Documents': 'Additional Documents',\n\t'Account Number is required': 'Account Number is required',\n\t'Account Number should be 12 digits max': 'Account Number should be 12 digits max',\n\t'Transit Number is required': 'Transit Number is required',\n\t'Transit Number should be a 5 digit number': 'Transit Number should be a 5 digit number',\n\t'Fi Number is required': 'Fi Number is required',\n\t'Transit Number should be a 3 digit number': 'Transit Number should be a 3 digit number',\n\t'Account Number is already registered': 'Account Number is already registered',\n\t'Routing Number is already registered': 'Routing Number is already registered',\n\t'Requesting Bank Change, please wait': 'Requesting Bank Change, please wait',\n\t'Something went wrong when trying to change your bank, please tray again':\n\t\t'Something went wrong when trying to change your bank, please tray again',\n\t'Deferred Payments': 'Deferred Payments',\n\tIMPORTANT: 'IMPORTANT',\n\t'You currently have instalments that were deferred by the SimplyBorrowed Team and that need to be paid before paying or refinancing the full balance of your Loan.':\n\t\t'You currently have instalments that were deferred by the SimplyBorrowed Team and that need to be paid before paying or refinancing the full balance of your Loan.',\n\t'Number of Deferred Payments': 'Number of Deferred Payments',\n\t'Total amount of Deferred Payments': 'Total amount of Deferred Payments',\n\t'Please, click the button to generate a payment request that will be sent to your email.':\n\t\t'Please, click the button to generate a payment request that will be sent to your email.',\n\t'Pay deferred payments': 'Pay deferred payments',\n\t'Please confirm the action by writing the correct phrase': 'Please confirm the action by writing the correct phrase',\n\t'This action cannot be undone. Once you click confirm, you authorize SimplyBorrowed to debit the following bank account, the specified amount.':\n\t\t'This action cannot be undone. Once you click confirm, you authorize SimplyBorrowed to debit the following bank account, the specified amount.',\n\t'Bank name': 'Bank name',\n\t'Transit Number': 'Transit Number',\n\t'FI Number': 'FI Number',\n\t'Please write pay full balance in the box, before confirming':\n\t\t'Please write pay full balance in the box, before confirming.',\n\t'There was a problem uploading the documents, please try again':\n\t\t'There was a problem uploading the documents, please try again',\n\t'Documents uploaded successfully': 'Documents uploaded successfully',\n\t'Uploading documents, please wait': 'Uploading documents, please wait...',\n\tActions: 'Actions',\n\tDescription: 'Description',\n\t'Updated At': 'Updated At',\n\t'Upload documents': 'Upload documents',\n\t'View Rejection Reason': 'View Rejection Reason',\n\t'Submit again': 'Submit again',\n\t'Rejection Reason': 'Rejection Reason',\n\t'Payment Number': 'Payment Number',\n\t'Date Due': 'Date Due',\n\tPayment: 'Payment',\n\tBalance: 'Balance',\n\t'Document was resend to those who have not signed the document yet, through DocuSign reminder.':\n\t\t'Document was resend to those who have not signed the document yet, through DocuSign reminder',\n\t'Something wrong happened when trying to resend the documents, please try again':\n\t\t'Something wrong happened when trying to resend the documents, please tru again',\n\t'The Documentation process has not started yet': 'The Documentation process has not started yet',\n\t'Documentation process has completed': 'Documentation process has completed',\n\t'Documentation was created but has not finished the signing process':\n\t\t'Documentation was created but has not finished the signing process',\n\t'Here are some details of the signing process': 'Here are some details of the signing process',\n\tOrder: 'Order',\n\tName: 'Name',\n\t'Delivered at': 'Delivered at',\n\t'Signed at': 'Signed at',\n\t'Not delivered': 'Not Delivered',\n\tSigned: 'Signed',\n\t'Not signed': 'Not Signed',\n\t'Open docusign envelope': 'Open docusign envelope',\n\t'Resend Document to Pending Signers': 'Resend Document to Pending Signers',\n\t'Something happened when tried to fetch the document information, please refresh the page':\n\t\t'Something happened when tried to fetch the document information, please refresh the page',\n\t'There was a problem uploading the void cheque image': 'There was a problem uploading the void cheque image',\n\t'There was a problem uploading the picture, please try again':\n\t\t'There was a problem uploading the picture, please try again',\n\t'Select your Bank': 'Select your Bank',\n\t'Upload Void Cheque Image': 'Upload Void Cheque Image',\n\t'This Client is not eligible for Bonus Points.': 'This Client is not eligible for Bonus Points.',\n};\n\nexport default enJSON;\n","const esJSON = {};\n\nexport default esJSON;\n","const frJSON = {};\n\nexport default frJSON;\n","import React from 'react';\nimport ReactDOM from 'react-dom';\nimport './index.css';\nimport App from './app/App';\nimport reportWebVitals from './reportWebVitals';\nimport './i18n/i18n';\n\nReactDOM.render(\n\t\n\t\t\n\t,\n\tdocument.getElementById('root')\n);\n\n// If you want to start measuring performance in your app, pass a function\n// to log results (for example: reportWebVitals(console.log))\n// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals\nreportWebVitals();\n","import jwtDecode from 'jwt-decode';\n/* eslint-disable camelcase */\n\nclass JwtService {\n\tisAuthTokenValid = access_token => {\n\t\tif (!access_token) {\n\t\t\treturn false;\n\t\t}\n\t\tconst decoded = jwtDecode(access_token);\n\t\tconst currentTime = Date.now() / 1000;\n\n\t\tif (decoded.exp < currentTime) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t};\n}\n\nconst instance = new JwtService();\n\nexport default instance;\n","import JwtService from '../../services/JWTService/JWTService';\nimport axios from 'axios';\n\nconst baseURL = `${process.env.REACT_APP_HAMMURABI_API}`;\n\nlet authTokens = localStorage.getItem('HammurabiAuth') ? JSON.parse(localStorage.getItem('HammurabiAuth')) : null;\n\nconst axiosInstance = axios.create({\n\tbaseURL,\n\theaders: { Authorization: `Bearer ${authTokens?.fresh}` },\n});\n\naxiosInstance.interceptors.request.use(async req => {\n\tif (!authTokens) {\n\t\tauthTokens = localStorage.getItem('HammurabiAuth') ? JSON.parse(localStorage.getItem('HammurabiAuth')) : null;\n\t\taxiosInstance.defaults.headers.Authorization = `Bearer ${authTokens?.fresh}`;\n\t\treq.headers.Authorization = `Bearer ${authTokens?.fresh}`;\n\t}\n\n\tconst isValid = JwtService.isAuthTokenValid(authTokens?.fresh);\n\n\tif (isValid) return req;\n\n\ttry {\n\t\tconst response = await axios.post(\n\t\t\t`${baseURL}/auth/refresh`,\n\t\t\t{},\n\t\t\t{\n\t\t\t\theaders: {\n\t\t\t\t\tAuthorization: `Bearer ${authTokens?.refresh}`,\n\t\t\t\t},\n\t\t\t}\n\t\t);\n\n\t\tif (!response || response.code === 401) {\n\t\t\twindow.location.href = '/logout';\n\t\t}\n\n\t\tlocalStorage.setItem(\n\t\t\t'HammurabiAuth',\n\t\t\tJSON.stringify({ fresh: response.data.token, refresh: response.data.refresh })\n\t\t);\n\t\taxiosInstance.defaults.headers.Authorization = `Bearer ${response.data.token}`;\n\t\treq.headers.Authorization = `Bearer ${response.data.token}`;\n\n\t\treturn req;\n\t} catch (error) {\n\t\twindow.location.href = '/logout';\n\t\treturn error;\n\t}\n});\n\nexport default axiosInstance;\n","import { createSlice } from '@reduxjs/toolkit';\nimport { setUser } from './userSlice';\nimport { personReceived, savePerson } from '../../main/apps/people/store/person';\nimport People from '../../services/hammurabi/people';\nimport { initialState as initialUser } from '../../auth/store/userSlice';\nimport axiosInstance from '../../store/middleware/axiosInstance';\n\nconst initialState = {\n success: false,\n error: {\n username: null,\n password: null\n }\n};\n\nconst loginSlice = createSlice({\n name: 'auth/login',\n initialState,\n reducers: {\n loginSuccess: (state, action) => {\n state.success = true;\n },\n logoutSuccess: (state, action) => {\n state = initialState;\n },\n loginError: (state, action) => {\n state.success = false;\n state.error = action.payload;\n }\n },\n extraReducers: {}\n});\n\nexport const loginUser =\n (user, redirect = null) =>\n (dispatch, getState) => {\n dispatch(loginSuccess());\n dispatch(setUser(user));\n\n if (redirect) {\n const { history, location } = redirect;\n console.log('redirecting to', location.state.from.pathname);\n history.push(location.state.from.pathname);\n }\n };\n\nexport const logoutUser = () => (dispatch, getState) => {\n deleteLoginFromLocalStorage();\n dispatch(logoutSuccess());\n};\n\nexport const deleteLoginFromLocalStorage = () => {\n if (localStorage.getItem('HammurabiAuth')) {\n localStorage.removeItem('HammurabiAuth');\n }\n};\n\nexport const getPersonAndUser = (auth0User, props) => async (dispatch, getState) => {\n try {\n let personData = await getPerson({\n email: auth0User.email,\n auth_id: auth0User.sub,\n email_verified: auth0User.email_verified,\n role: 'client',\n first_name: auth0User.given_name || '',\n last_name: auth0User.family_name || '',\n last_login: new Date(),\n status: 'ACTIVE',\n life_cycle: 'SIGNED UP',\n campaign_id: atob(localStorage.getItem('HammMID')) || null\n });\n\n localStorage.setItem(\n 'HammurabiAuth',\n JSON.stringify({ fresh: personData.token, refresh: personData.refresh })\n );\n let person = personData.person;\n\n axiosInstance.defaults.headers.Authorization = `Bearer ${personData?.token}`;\n\n let userData = getUserFromPerson(person);\n if (auth0User.email_verified && auth0User.email_verified !== person.email_verified) {\n person = { ...person, email_verified: auth0User.email_verified };\n userData = { ...userData, email_verified: auth0User.email_verified };\n dispatch(savePerson({ ...person, email_verified: auth0User.email_verified }));\n }\n dispatch(personReceived(person));\n dispatch(loginUser(userData));\n } catch (e) {}\n};\n\nconst getPerson = async (data, byId = false) => {\n try {\n const person = byId ? await People.getPersonById(data.id) : await People.getPerson(data);\n return person;\n } catch (error) {\n console.log(error);\n }\n};\n\nconst getUserFromPerson = (person) => {\n let userData = {};\n Object.keys(initialUser).forEach((x) => {\n userData[x] = person[x];\n });\n userData.id = person.id;\n return userData;\n};\n\nexport const { loginSuccess, loginError, logoutSuccess } = loginSlice.actions;\n\nexport default loginSlice.reducer;\n","import { createSlice } from '@reduxjs/toolkit';\nimport { apiCallBegan } from '../../../../store/middleware/apiActions';\nimport { peopleUpdated, peopleDeleted } from './people';\n\nconst slice = createSlice({\n\tname: 'person',\n\tinitialState: { loading: false, data: null, profileUpdated: false },\n\treducers: {\n\t\tsavingProfile: (person, action) => {\n\t\t\tperson.loading = true;\n\t\t},\n\t\tpersonSaved: (person, action) => {\n\t\t\tperson.loading = false;\n\t\t\tperson.profileUpdated = true;\n\t\t},\n\t\tpersonReceived: (person, action) => {\n\t\t\tperson.loading = false;\n\t\t\tperson.data = action.payload;\n\t\t},\n\t\tprofileUpdated: (person, action) => {\n\t\t\tperson.profileUpdated = false;\n\t\t},\n\t\tpersonReseted: () => null,\n\t\tpersonCreated: {\n\t\t\treducer: (person, action) => action.payload,\n\t\t\tprepare: event => ({\n\t\t\t\tpayload: {\n\t\t\t\t\tloading: true,\n\t\t\t\t\tdata: {\n\t\t\t\t\t\tfirst_name: '',\n\t\t\t\t\t\tlast_name: '',\n\t\t\t\t\t\trole: '',\n\t\t\t\t\t\temail: '',\n\t\t\t\t\t\tdate_of_birth: '',\n\t\t\t\t\t\tphone: '',\n\t\t\t\t\t\tstate: '',\n\t\t\t\t\t\tcity: '',\n\t\t\t\t\t\tpostal_code: '',\n\t\t\t\t\t\tcitizenship: '',\n\t\t\t\t\t\tlegal_status: '',\n\t\t\t\t\t\tstatus_expiration_date: '',\n\t\t\t\t\t\tyears_in_canada: 0,\n\t\t\t\t\t\temployer_name: '',\n\t\t\t\t\t\temployment_type: '',\n\t\t\t\t\t\tmonthly_income: 0.0,\n\t\t\t\t\t\tjob_title: '',\n\t\t\t\t\t\tlead_source: '',\n\t\t\t\t\t\tbanks: '',\n\t\t\t\t\t\taddress: '',\n\t\t\t\t\t\tavatar_url: '',\n\t\t\t\t\t\tlogin_network: '',\n\t\t\t\t\t\tstatus: '',\n\t\t\t\t\t\tlife_cycle: '',\n\t\t\t\t\t\ttour_done: false,\n\t\t\t\t\t\tcreated_at: new Date(),\n\t\t\t\t\t\tupdated_at: new Date(),\n\t\t\t\t\t\tlast_login: '',\n\t\t\t\t\t\tauth_id: '',\n\t\t\t\t\t\thammurabi_preferences: {},\n\t\t\t\t\t\tloans: [],\n\t\t\t\t\t\tmanages: [],\n\t\t\t\t\t\tproposals: [],\n\t\t\t\t\t\tpayments: [],\n\t\t\t\t\t\tlegal_docs: [],\n\t\t\t\t\t\ttransactions: [],\n\t\t\t\t\t\tincome_range: '',\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t}),\n\t\t},\n\t},\n});\n\nexport const getPerson = personId => (dispatch, getState) => {\n\tdispatch(\n\t\tapiCallBegan({\n\t\t\tapi: 'hammurabi',\n\t\t\turl: `/people/${personId}`,\n\t\t\tmethod: 'GET',\n\t\t\tonSuccess: personReceived.type,\n\t\t})\n\t);\n};\n\nexport const deleteperson = personId => (dispatch, getState) => {\n\tdispatch(\n\t\tapiCallBegan({\n\t\t\tapi: 'person',\n\t\t\turl: `/people/${personId}`,\n\t\t\tmethod: 'DELETE',\n\t\t\tonSuccess: peopleDeleted.type,\n\t\t})\n\t);\n};\n\nexport const updatedPerson = person => (dispatch, getState) => {\n\tdispatch(personReceived(person));\n\tdispatch(personSaved());\n\tdispatch(peopleUpdated(person));\n};\n\nexport const profileIncomplete = person => {\n\tif (!person) return true;\n\tlet test = false;\n\tif (person.first_name === '' || person.first_name === null) test = true;\n\tif (person.last_name === '' || person.last_name === null) test = true;\n\t// if (person.date_of_birth === \"\" || person.date_of_birth === null)\n\t// test = true;\n\tif (person.phone === '' || person.phone === null) test = true;\n\tif (person.state === '' || person.state === null) test = true;\n\tif (person.city === '' || person.city === null) test = true;\n\tif (person.postal_code === '' || person.postal_code === null) test = true;\n\tif (person.citizenship === '' || person.citizenship === null) test = true;\n\tif (person.legal_status === '' || person.legal_status === null) test = true;\n\t// if (\n\t// person.status_expiration_date === \"\" ||\n\t// person.status_expiration_date === null\n\t// )\n\t// test = true;\n\tif (person.employer_name === '' || person.employer_name === null) test = true;\n\tif (person.employment_type === '' || person.employment_type === null) test = true;\n\tif (person.income_range === 0 || person.income_range === null) test = true;\n\tif (person.job_title === '' || person.job_title === null) test = true;\n\t// if (person.banks === \"\" || person.banks === null) test = true;\n\tif (person.address === '' || person.address === null) test = true;\n\treturn test;\n};\n\nexport const canRequestLoan = person => {};\n\nexport const getLoansAndProposals = person => {};\n\nexport const { personCreated, peopleSaved, personReceived, personReseted, savingProfile, profileUpdated, personSaved } =\n\tslice.actions;\n\nexport const savePerson =\n\t(person, toast = '') =>\n\t(dispatch, getState) => {\n\t\tlet method = 'PUT';\n\t\tlet url = `/people/${person.id}`;\n\n\t\tdelete person.id;\n\n\t\tlet onSuccess = updatedPerson;\n\n\t\tperson.updated_at = new Date();\n\t\tObject.keys(person).forEach(x => {\n\t\t\tperson[x] === null && delete person[x];\n\t\t});\n\n\t\tdelete person.loans;\n\t\tdelete person.manages;\n\t\tdelete person.proposals;\n\t\tdelete person.payments;\n\t\tdelete person.legal_docs;\n\t\tdelete person.transactions;\n\n\t\tdispatch(\n\t\t\tapiCallBegan({\n\t\t\t\tapi: 'hammurabi',\n\t\t\t\turl,\n\t\t\t\tmethod,\n\t\t\t\tdata: person,\n\t\t\t\tonSuccess,\n\t\t\t\tonStart: savingProfile.type,\n\t\t\t\ttoastNotification: toast,\n\t\t\t})\n\t\t);\n\t};\n\nexport default slice.reducer;\n","import { useState, useEffect } from 'react';\nimport { useSelector } from 'react-redux';\n\nfunction useSimplyTeam() {\n\tconst user = useSelector(({ auth }) => auth.user);\n\tconst [sb, setSb] = useState(null);\n\tconst [loadingSb, setLoadingSb] = useState(true);\n\n\tuseEffect(() => {\n\t\tif (user?.role !== '') {\n\t\t\tswitch (user.role.toUpperCase()) {\n\t\t\t\tcase 'CLIENT':\n\t\t\t\t\tsetSb(false);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'ANALYST':\n\t\t\t\tcase 'MANAGER':\n\t\t\t\tcase 'ADMIN':\n\t\t\t\t\tsetSb(true);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tsetSb(false);\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\tsetLoadingSb(false);\n\t\t} else {\n\t\t\tsetLoadingSb(true);\n\t\t}\n\t}, [user]);\n\n\treturn { sb, loadingSb };\n}\n\nexport default useSimplyTeam;\n","import { createSlice } from '@reduxjs/toolkit';\nimport { apiCallBegan } from '../../../../store/middleware/apiActions';\n\nconst slice = createSlice({\n\tname: 'loans',\n\tinitialState: {\n\t\tlist: null,\n\t\tloading: false,\n\t\tlastFetch: null,\n\t\tupdated: false,\n\t\tsearchText: '',\n\t\tnoLoans: false,\n\t\tsigners: {},\n\t},\n\treducers: {\n\t\tloansRequestFailed: (loans, action) => {\n\t\t\tloans.loading = false;\n\t\t\tloans.noLoans = true;\n\t\t},\n\t\tloansRequested: (loans, action) => {\n\t\t\tloans.loading = true;\n\t\t},\n\t\tloansReceived: (loans, action) => {\n\t\t\tloans.list = action.payload.data;\n\t\t\tif (action.payload.data.length === 0) loans.noLoans = true;\n\t\t\telse loans.noLoans = false;\n\t\t\tloans.loading = false;\n\t\t\tloans.lastFetch = Date.now();\n\t\t\tloans.updated = false;\n\t\t},\n\t\tloansAdded: (loans, action) => {\n\t\t\tloans.list.unshift(action.payload);\n\t\t\tloans.updated = true;\n\t\t\tloans.noLoans = false;\n\t\t},\n\t\tloansDeleted: (loans, action) => {\n\t\t\tconsole.log(action.payload);\n\t\t\tconst index = loans.list.findIndex(s => s.id === action.payload.deletedId);\n\t\t\tloans.list.splice(index, 1);\n\t\t\tloans.updated = true;\n\t\t\tif (loans.list.length === 0) loans.noLoans = true;\n\t\t},\n\t\tloansUpdated: (loans, action) => {\n\t\t\tconst index = loans.list.findIndex(s => s.id === action.payload.id);\n\t\t\tloans.list[index] = action.payload;\n\t\t\tloans.updated = true;\n\t\t\tloans.noLoans = false;\n\t\t},\n\t\tsearchTextChanged: (loans, action) => {\n\t\t\tloans.searchText = action.payload;\n\t\t},\n\t\tloansRelated: (loans, action) => {\n\t\t\tloans.updated = true;\n\t\t},\n\t\tupdateSigners: (loans, { payload }) => {\n\t\t\tloans.signers[payload.key] = payload.values;\n\t\t},\n\t},\n});\n\nexport const {\n\tloansAdded,\n\tloansReceived,\n\tloansRequested,\n\tloansRequestFailed,\n\tsearchTextChanged,\n\tloansUpdated,\n\tloansDeleted,\n\tloansRelated,\n\tupdateSigners,\n} = slice.actions;\n\nexport const loadLoans =\n\t(type = 'user', page = 1, per_page = 10) =>\n\t(dispatch, getState) => {\n\t\tconst user = getState().auth.user;\n\n\t\tdispatch(\n\t\t\tapiCallBegan({\n\t\t\t\tapi: 'hammurabi',\n\t\t\t\turl: '/loans',\n\t\t\t\tparams: {\n\t\t\t\t\ttype,\n\t\t\t\t\tuser_id: user.id,\n\t\t\t\t\tpage,\n\t\t\t\t\tper_page,\n\t\t\t\t},\n\t\t\t\tonStart: loansRequested.type,\n\t\t\t\tonSuccess: loansReceived.type,\n\t\t\t\tonError: loansRequestFailed.type,\n\t\t\t})\n\t\t);\n\t};\n\nexport default slice.reducer;\n"],"sourceRoot":""}