{"version":3,"sources":["shared/services/api.ts","helpers/appHistory.ts","mainRouter.tsx","shared/components/ApplicationTheme/index.tsx","shared/components/ApplicationTheme/ApplicationTheme.tsx","shared/components/ProgressIndicator/index.tsx","shared/components/ProgressIndicator/ProgressIndicator.tsx","App.tsx","serviceWorker.ts","index.tsx","redux/types.ts","redux/reducers/auth/authReducer.ts","env.ts","redux/reducers/classification/classificationReducer.ts","redux/reducers/schoolUnit/schoolUnitReducer.ts","redux/reducers/header/headerReducer.ts","redux/reducers/progressIndicator/progressIndicatorReducer.ts","redux/reducers/theme/themeReducer.ts","redux/reducers/index.ts","redux/store.ts","redux/reducers/enrollment/enrollmentReducer.ts","shared/components/RouteProgressIndicator/RouteProgressIndicator.tsx","shared/components/RouteProgressIndicator/index.tsx"],"names":["api","axios","create","baseURL","env","REACT_APP_API_URL","appHistory","createBrowserHistory","publicModule","lazy","MainRouter","dispatch","useDispatch","useEffect","fetchUserInfo","history","fallback","RouteProgressIndicator","path","component","ApplicationTheme","props","theme","useSelector","state","themeReducer","children","colors","type","appTheme","createMuiTheme","palette","primary","main","primaryColor","secondary","secondaryColor","ThemeProvider","ProgressIndicator","ids","progressIndicatorReducer","onFetchingData","Backdrop","style","zIndex","open","length","Card","Box","display","flexDirection","justifyContent","alignItems","p","CircularProgress","color","pt","ml","mr","Typography","variant","App","Boolean","window","location","hostname","match","ReactDOM","render","store","document","getElementById","navigator","serviceWorker","ready","then","registration","unregister","catch","error","console","message","PROGRESS_INDICATOR_ADD","PROGRESS_INDICATOR_REMOVE","THEME_CHANGE_COLORS","THEME_CHANGE_TYPE","USER_SIGN_IN","USER_LOG_OFF","USER_LOADING","HEADER_CHANGE_TITLE","ENROLLMENT_LANDING_READ","ENROLLMENT_SUCCESS","ENROLLMENT_RESET","ENROLLMENTS_LOAD","SCHOOLUNITS_LOAD","SCHOOLUNIT_SELECT","SCHOOLUNITS_TOGGLE_SUCCESS","SCHOOLUNITS_TOGGLE_ERROR","CLASSIFICATION_LOAD","CLASSIFICATION_LOAD_CLASSROOMS","CLASSIFICATION_LOAD_SEARCH_CLASSROOMS","CLASSIFICATION_SELECT","CLASSIFICATION_TOGGLE_SUCCESS","CLASSIFICATION_TOGGLE_ERROR","CLASSIFICATION_RESET","CLASSIFICATION_CHANGE_SCHOOL","CLASSIFICATION_CHANGE_LAST_SCHOOL","CLASSIFICATION_CHANGE_CLASSROOM","CLASSIFICATION_CHANGE_FILTER","CLASSIFICATION_CHANGE_SEARCH","CLASSIFICATION_CHANGE_SEARCH_SCHOOL","CLASSIFICATION_CHANGE_STALEMATE","CLASSIFICATION_CLEAR","CLASSIFICATION_CLEAR_SELECTED_SCHOOL","initialState","isAuthenticated","loading","user","key","action","sessionStorage","setItem","payload","token","removeItem","a","getItem","get","headers","Authorization","response","data","process","REACT_APP_BASE_URL","REACT_APP_ENV","REACT_APP_API_KEY","REACT_APP_AUTH_DOMAIN","REACT_APP_DATABASE_URL","REACT_APP_PROJECT_ID","REACT_APP_STORAGE_BUCKET","REACT_APP_MESSAGING_SENDER_ID","REACT_APP_APP_ID","REACT_APP_MEASUREMENT_ID","REACT_APP_GOOGLE_API_KEY","isProduction","isDevelopment","isLocal","selected","selectedSchool","previousSuccessfulSchool","classrooms","emptyClassrooms","loadedClassrooms","selectedClassroom","searchClassrooms","searchField","searchFilter","searchSchool","isEmpty","isLoaded","success","stalemate","changeSearchSchool","fetchClassrooms","changeSelectedSchool","search","getState","authReducer","guid","classificationReducer","updateClassification","put","currentSelectedClassification","updatedSelectedClassification","quitAfter","fallbackClassroom","find","x","id","classroomId","Swal","fire","icon","title","text","updateStudentInfo","transferClassification","solveStalemate","clearSelectedSchool","fetchSchoolUnits","formattedResponse","i","totalVacancy","j","vacancy","createSchoolUnit","post","updateSchoolUnit","schools","schoolUnitReducer","updatedSchools","map","school","classroom","updatedClassroom","c","activeNumber","headerTitle","filter","localStorageOpinion","localStorage","loadType","rootReducer","combineReducers","enrollmentReducer","headerReducer","reduxDevtools","__REDUX_DEVTOOLS_EXTENSION__","composeStoreWithMiddleware","applyMiddleware","thunk","createStore","isSuccessful","successData","sentEnrollmentsData","isLoading","landingRead","fetchEnrollments","enrollmentsArr","forEach","enrollment","index","cityResident","responsibleForChild","familyIncome","toFixed","familyHousing","socialProgram","motherOccupation","familyChildrenQty","cpf","replace","birthDate","split","cancelEnrollment","delete","useStyle","makeStyles","container","width","height","classes","className"],"mappings":"iIAAA,6BAGMA,EAAMC,IAAMC,OAAO,CAAEC,QAASC,IAAIC,oBAEzBL,O,sGCHFM,EAAaC,c,gBCKpBC,EAAeC,gBAAK,kBAAM,yDAoBjBC,EAlBc,WACzB,IAAMC,EAAWC,cAMjB,OAJAC,qBAAU,WACNF,EAASG,iBACV,IAGC,kBAAC,IAAD,CAAQC,QAAST,GACb,kBAAC,WAAD,CAAUU,SAAU,kBAACC,EAAA,EAAD,OAChB,kBAAC,IAAD,KACI,kBAAC,IAAD,CAAOC,KAAK,IAAIC,UAAWX,Q,iBClBhCY,ECS2B,SAACC,GAEvC,IAAMC,EAAoBC,aAAY,SAACC,GAAD,OAAsBA,EAAMC,gBAE1DC,EAAaL,EAAbK,SACAC,EAAiBL,EAAjBK,OAAQC,EAASN,EAATM,KAEVC,EAAWC,YAAe,CAE5BC,QAAS,CACLH,OACAI,QAAS,CACLC,KAAMN,EAAOO,cAEjBC,UAAW,CACPF,KAAMN,EAAOS,mBAKzB,OACI,6BACI,kBAACC,EAAA,EAAD,CAAef,MAAOO,GACjBH,K,6CChCFY,ECS6C,SAACjB,GAAW,IAAD,EAE7DkB,EAAMhB,aAAY,SAACC,GAAD,OAAsBA,EAAMgB,yBAAyBC,kBAErEf,EAAaL,EAAbK,SAER,OACI,6BACI,kBAACgB,EAAA,EAAD,CAAUC,MAAO,CAAEC,OAAQ,MAAQC,MAAM,iBAACN,QAAD,IAACA,OAAD,EAACA,EAAKO,cAAN,QAAgB,GAAK,GAC1D,kBAACC,EAAA,EAAD,KACI,kBAACC,EAAA,EAAD,CACIL,MAAO,CACHM,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AeLnC,EAX0B,WAErC,IAAM0O,EAAUL,IAEhB,OACI,yBAAKM,UAAWD,EAAQH,WACpB,kBAAClM,EAAA,EAAD,QCnBGrC,O","file":"static/js/main.1ce96d90.chunk.js","sourcesContent":["import axios from 'axios';\r\nimport { env } from '../../env';\r\n\r\nconst api = axios.create({ baseURL: env.REACT_APP_API_URL });\r\n\r\nexport default api;","import { createBrowserHistory } from 'history';\r\n\r\nexport const appHistory = createBrowserHistory();","import React, { lazy, Suspense, useEffect } from 'react';\r\nimport { Switch, Route, Router } from 'react-router-dom';\r\nimport RouteProgressIndicator from './shared/components/RouteProgressIndicator';\r\nimport { appHistory } from './helpers/appHistory';\r\nimport { useDispatch } from 'react-redux';\r\nimport { fetchUserInfo } from './redux/reducers/auth/authReducer';\r\n\r\nconst publicModule = lazy(() => import('./modules/public/index'));\r\n\r\nconst MainRouter: React.FC = () => {\r\n const dispatch = useDispatch();\r\n\r\n useEffect(() => {\r\n dispatch(fetchUserInfo());\r\n }, []) // eslint-disable-line\r\n\r\n return (\r\n \r\n }>\r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nexport default MainRouter;\r\n","import ApplicationTheme from './ApplicationTheme';\r\n\r\nexport default ApplicationTheme;","import React, { ReactElement } from 'react';\r\nimport { createMuiTheme, ThemeProvider } from '@material-ui/core';\r\nimport { useSelector } from 'react-redux';\r\nimport { RootState, ThemeState } from '../../../redux/types';\r\n\r\n\r\nexport interface AppThemeProps {\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n children?: ReactElement\r\n}\r\n\r\nconst AppTheme: React.FC = (props) => {\r\n\r\n const theme: ThemeState = useSelector((state: RootState) => state.themeReducer);\r\n\r\n const { children } = props;\r\n const { colors, type } = theme;\r\n\r\n const appTheme = createMuiTheme({\r\n\r\n palette: {\r\n type,\r\n primary: {\r\n main: colors.primaryColor,\r\n },\r\n secondary: {\r\n main: colors.secondaryColor,\r\n },\r\n },\r\n });\r\n\r\n return (\r\n
\r\n \r\n {children}\r\n \r\n
\r\n );\r\n}\r\n\r\nexport default AppTheme;","import ProgressIndicator from './ProgressIndicator';\r\n\r\nexport default ProgressIndicator;","import React, { ReactElement } from 'react';\r\nimport { useSelector } from 'react-redux';\r\nimport { Backdrop, Box, Card, CircularProgress, Typography } from '@material-ui/core';\r\nimport { RootState } from '../../../redux/types';\r\n\r\ninterface ProgressIndicatorProps {\r\n ids?: Array\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n children?: ReactElement\r\n}\r\n\r\nconst ProgressIndicator: React.FC = (props) => {\r\n\r\n const ids = useSelector((state: RootState) => state.progressIndicatorReducer.onFetchingData);\r\n\r\n const { children } = props;\r\n\r\n return (\r\n
\r\n 0}>\r\n \r\n \r\n \r\n \r\n \r\n Por favor aguarde...\r\n \r\n \r\n \r\n \r\n \r\n {children}\r\n
\r\n )\r\n\r\n}\r\n\r\nexport default ProgressIndicator;","import React from 'react';\r\nimport MainRouter from './mainRouter';\r\nimport AppTheme from './shared/components/ApplicationTheme';\r\nimport ProgressIndicator from './shared/components/ProgressIndicator';\r\n\r\nconst App: React.FC = () => (\r\n \r\n \r\n \r\n \r\n \r\n);\r\n \r\nexport default App;\r\n","// This optional code is used to register a service worker.\r\n// register() is not called by default.\r\n\r\n// This lets the app load faster on subsequent visits in production, and gives\r\n// it offline capabilities. However, it also means that developers (and users)\r\n// will only see deployed updates on subsequent visits to a page, after all the\r\n// existing tabs open on the page have been closed, since previously cached\r\n// resources are updated in the background.\r\n\r\n// To learn more about the benefits of this model and instructions on how to\r\n// opt-in, read https://bit.ly/CRA-PWA\r\n\r\nconst isLocalhost = Boolean(\r\n window.location.hostname === 'localhost' ||\r\n // [::1] is the IPv6 localhost address.\r\n window.location.hostname === '[::1]' ||\r\n // 127.0.0.0/8 are considered localhost for IPv4.\r\n window.location.hostname.match(\r\n /^127(?:\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/\r\n )\r\n);\r\n\r\ntype Config = {\r\n onSuccess?: (registration: ServiceWorkerRegistration) => void;\r\n onUpdate?: (registration: ServiceWorkerRegistration) => void;\r\n};\r\n\r\nexport function register(config?: Config) {\r\n if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) {\r\n // The URL constructor is available in all browsers that support SW.\r\n const publicUrl = new URL(\r\n process.env.PUBLIC_URL,\r\n window.location.href\r\n );\r\n if (publicUrl.origin !== window.location.origin) {\r\n // Our service worker won't work if PUBLIC_URL is on a different origin\r\n // from what our page is served on. This might happen if a CDN is used to\r\n // serve assets; see https://github.com/facebook/create-react-app/issues/2374\r\n return;\r\n }\r\n\r\n window.addEventListener('load', () => {\r\n const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`;\r\n\r\n if (isLocalhost) {\r\n // This is running on localhost. Let's check if a service worker still exists or not.\r\n checkValidServiceWorker(swUrl, config);\r\n\r\n // Add some additional logging to localhost, pointing developers to the\r\n // service worker/PWA documentation.\r\n navigator.serviceWorker.ready.then(() => {\r\n // console.log(\r\n // 'This web app is being served cache-first by a service ' +\r\n // 'worker. To learn more, visit https://bit.ly/CRA-PWA'\r\n // );\r\n });\r\n } else {\r\n // Is not localhost. Just register service worker\r\n registerValidSW(swUrl, config);\r\n }\r\n });\r\n }\r\n}\r\n\r\nfunction registerValidSW(swUrl: string, config?: Config) {\r\n navigator.serviceWorker\r\n .register(swUrl)\r\n .then(registration => {\r\n registration.onupdatefound = () => {\r\n const installingWorker = registration.installing;\r\n if (installingWorker == null) {\r\n return;\r\n }\r\n installingWorker.onstatechange = () => {\r\n if (installingWorker.state === 'installed') {\r\n if (navigator.serviceWorker.controller) {\r\n // At this point, the updated precached content has been fetched,\r\n // but the previous service worker will still serve the older\r\n // content until all client tabs are closed.\r\n // console.log(\r\n // 'New content is available and will be used when all ' +\r\n // 'tabs for this page are closed. See https://bit.ly/CRA-PWA.'\r\n // );\r\n\r\n // Execute callback\r\n if (config && config.onUpdate) {\r\n config.onUpdate(registration);\r\n }\r\n } else {\r\n // At this point, everything has been precached.\r\n // It's the perfect time to display a\r\n // \"Content is cached for offline use.\" message.\r\n // console.log('Content is cached for offline use.');\r\n\r\n // Execute callback\r\n if (config && config.onSuccess) {\r\n config.onSuccess(registration);\r\n }\r\n }\r\n }\r\n };\r\n };\r\n })\r\n .catch(error => {\r\n console.error('Error during service worker registration:', error);\r\n });\r\n}\r\n\r\nfunction checkValidServiceWorker(swUrl: string, config?: Config) {\r\n // Check if the service worker can be found. If it can't reload the page.\r\n fetch(swUrl, {\r\n headers: { 'Service-Worker': 'script' }\r\n })\r\n .then(response => {\r\n // Ensure service worker exists, and that we really are getting a JS file.\r\n const contentType = response.headers.get('content-type');\r\n if (\r\n response.status === 404 ||\r\n (contentType != null && contentType.indexOf('javascript') === -1)\r\n ) {\r\n // No service worker found. Probably a different app. Reload the page.\r\n navigator.serviceWorker.ready.then(registration => {\r\n registration.unregister().then(() => {\r\n window.location.reload();\r\n });\r\n });\r\n } else {\r\n // Service worker found. Proceed as normal.\r\n registerValidSW(swUrl, config);\r\n }\r\n })\r\n .catch(() => {\r\n // console.log(\r\n // 'No internet connection found. App is running in offline mode.'\r\n // );\r\n });\r\n}\r\n\r\nexport function unregister() {\r\n if ('serviceWorker' in navigator) {\r\n navigator.serviceWorker.ready\r\n .then(registration => {\r\n registration.unregister();\r\n })\r\n .catch(error => {\r\n console.error(error.message);\r\n });\r\n }\r\n}\r\n","import React from 'react';\r\nimport ReactDOM from 'react-dom';\r\nimport App from './App';\r\nimport * as serviceWorker from './serviceWorker';\r\nimport { Provider } from 'react-redux';\r\nimport store from './redux/store';\r\n\r\nReactDOM.render(\r\n \r\n \r\n ,\r\n document.getElementById('root')\r\n);\r\n\r\n// If you want your app to work offline and load faster, you can change\r\n// unregister() to register() below. Note this comes with some pitfalls.\r\n// Learn more about service workers: https://bit.ly/CRA-PWA\r\nserviceWorker.unregister();\r\n","import { PaletteType } from '@material-ui/core';\r\nimport rootReducer from './reducers';\r\nimport store from './store';\r\n\r\nexport type AppDispatch = typeof store.dispatch;\r\nexport type RootState = ReturnType;\r\n\r\nexport interface GenericAction {\r\n type: string;\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n payload?: any;\r\n}\r\n\r\nexport interface ProgressIndicatorState {\r\n onFetchingData: Array;\r\n}\r\n\r\nexport const PROGRESS_INDICATOR_ADD = 'PROGRESS_INDICATOR_ADD';\r\nexport const PROGRESS_INDICATOR_REMOVE = 'PROGRESS_INDICATOR_REMOVE';\r\n\r\nexport interface ThemeColors {\r\n primaryColor: string;\r\n secondaryColor: string;\r\n}\r\n\r\nexport interface ThemeState {\r\n colors: ThemeColors;\r\n type: PaletteType;\r\n}\r\n\r\nexport const THEME_CHANGE_COLORS = 'THEME_CHANGE_COLORS';\r\nexport const THEME_CHANGE_TYPE = 'THEME_CHANGE_DARK';\r\n\r\nexport interface AuthState {\r\n isAuthenticated: boolean;\r\n loading: boolean;\r\n user: UserInfo | null;\r\n}\r\n\r\nexport interface UserInfo {\r\n guid: string;\r\n name: string;\r\n email: string;\r\n cpf: string;\r\n cellphone: string;\r\n role: string;\r\n token: string;\r\n}\r\n\r\nexport const USER_SIGN_IN = 'USER_SIGN_IN';\r\nexport const USER_LOG_OFF = 'USER_LOG_OFF';\r\nexport const USER_LOADING = 'USER_LOADING';\r\n\r\nexport interface HeaderState {\r\n headerTitle: string;\r\n}\r\n\r\nexport const HEADER_CHANGE_TITLE = 'HEADER_CHANGE_TITLE';\r\n\r\nexport interface EnrollmentState {\r\n isSuccessful: boolean;\r\n successData: any[];\r\n sentEnrollmentsData: any[];\r\n isLoading: boolean;\r\n landingRead: boolean;\r\n}\r\n\r\nexport const ENROLLMENT_LANDING_READ = 'ENROLLMENT_LANDING_READ';\r\nexport const ENROLLMENT_SUCCESS = 'ENROLLMENT_SUCCESS';\r\nexport const ENROLLMENT_RESET = 'ENROLLMENT_RESET';\r\nexport const ENROLLMENTS_LOAD = 'ENROLLMENTS_LOAD';\r\n\r\nexport interface SchoolUnit {\r\n guid: string;\r\n id: SchoolUnit['guid'];\r\n name: string;\r\n position: string;\r\n countryside: number;\r\n totalVacancy: number;\r\n classrooms: Classroom[];\r\n}\r\n\r\ntype Classroom = {\r\n guid: string;\r\n name: string;\r\n vacancy: number;\r\n bornFrom: string;\r\n bornUntil: string;\r\n schoolUnitId: number;\r\n enrollments: any | null;\r\n id: number;\r\n createdDate: string;\r\n updatedDate: string;\r\n activeNumber: number;\r\n};\r\n\r\nexport interface SchoolUnitState {\r\n data: SchoolUnit[];\r\n selected: SchoolUnit['guid'];\r\n isEmpty: boolean;\r\n isLoaded: boolean;\r\n success: 'no' | 'create' | 'update';\r\n error: boolean;\r\n}\r\n\r\nexport const SCHOOLUNITS_LOAD = 'SCHOOLUNITS_LOAD';\r\nexport const SCHOOLUNIT_SELECT = 'SCHOOLUNIT_SELECT';\r\nexport const SCHOOLUNITS_TOGGLE_SUCCESS = 'SCHOOLUNITS_TOGGLE_SUCCESS';\r\nexport const SCHOOLUNITS_TOGGLE_ERROR = 'SCHOOLUNITS_TOGGLE_ERROR';\r\n\r\nexport interface ClassificationState {\r\n data: any[];\r\n selected: string | Object;\r\n selectedSchool: string | Object;\r\n previousSuccessfulSchool: Object;\r\n classrooms: any[];\r\n searchClassrooms: any[];\r\n emptyClassrooms: boolean;\r\n loadedClassrooms: boolean;\r\n selectedClassroom: Object;\r\n searchField: string;\r\n searchFilter: string;\r\n searchSchool: string;\r\n isEmpty: boolean;\r\n isLoaded: boolean;\r\n success: 'no' | 'update';\r\n error: boolean;\r\n stalemate: any[];\r\n}\r\n\r\nexport const CLASSIFICATION_LOAD = 'CLASSIFICATION_LOAD';\r\nexport const CLASSIFICATION_LOAD_CLASSROOMS = 'CLASSIFICATION_LOAD_CLASSROOMS';\r\nexport const CLASSIFICATION_LOAD_SEARCH_CLASSROOMS =\r\n 'CLASSIFICATION_LOAD_SEARCH_CLASSROOMS';\r\nexport const CLASSIFICATION_SELECT = 'CLASSIFICATION_SELECT';\r\nexport const CLASSIFICATION_PREP_CLASSROOMS_RELOAD =\r\n 'CLASSIFICATION_PREP_CLASSROOMS_RELOAD';\r\nexport const CLASSIFICATION_TOGGLE_SUCCESS = 'CLASSIFICATION_TOGGLE_SUCCESS';\r\nexport const CLASSIFICATION_TOGGLE_ERROR = 'CLASSIFICATION_TOGGLE_ERROR';\r\nexport const CLASSIFICATION_RESET = 'CLASSIFICATION_RESET';\r\nexport const CLASSIFICATION_CHANGE_SCHOOL = 'CLASSIFICATION_CHANGE_SCHOOL';\r\nexport const CLASSIFICATION_CHANGE_LAST_SCHOOL =\r\n 'CLASSIFICATION_CHANGE_LAST_SCHOOL';\r\nexport const CLASSIFICATION_CHANGE_CLASSROOM =\r\n 'CLASSIFICATION_CHANGE_CLASSROOM';\r\nexport const CLASSIFICATION_CHANGE_STATUS = 'CLASSIFICATION_CHANGE_STATUS';\r\nexport const CLASSIFICATION_CHANGE_FILTER = 'CLASSIFICATION_CHANGE_FILTER';\r\nexport const CLASSIFICATION_CHANGE_SEARCH = 'CLASSIFICATION_CHANGE_SEARCH';\r\nexport const CLASSIFICATION_CHANGE_SEARCH_SCHOOL =\r\n 'CLASSIFICATION_CHANGE_SEARCH_SCHOOL';\r\nexport const CLASSIFICATION_CHANGE_STALEMATE =\r\n 'CLASSIFICATION_CHANGE_STALEMATE';\r\nexport const CLASSIFICATION_CLEAR = 'CLASSIFICATION_CLEAR';\r\nexport const CLASSIFICATION_CLEAR_SELECTED_SCHOOL = 'CLASSIFICATION_CLEAR_SELECTED_SCHOOL';\r\n","import api from '../../../shared/services/api';\r\n\r\nimport {\r\n USER_SIGN_IN,\r\n USER_LOG_OFF,\r\n USER_LOADING,\r\n GenericAction,\r\n AuthState,\r\n} from '../../types';\r\n\r\nconst initialState: AuthState = {\r\n isAuthenticated: false,\r\n loading: false,\r\n user: null,\r\n};\r\n\r\nconst key = 'pikachu';\r\n\r\nexport default function (state = initialState, action: GenericAction) {\r\n switch (action.type) {\r\n case USER_SIGN_IN:\r\n sessionStorage.setItem(key, action.payload.token);\r\n\r\n return {\r\n ...state,\r\n isAuthenticated: true,\r\n user: action.payload,\r\n };\r\n case USER_LOADING:\r\n\r\n return {\r\n ...state,\r\n loading: action.payload.loading\r\n };\r\n case USER_LOG_OFF:\r\n sessionStorage.removeItem(key);\r\n\r\n return {\r\n ...initialState,\r\n };\r\n default:\r\n return state;\r\n }\r\n}\r\n\r\nexport const fetchUserInfo = () => async dispatch => {\r\n const token = sessionStorage.getItem(key);\r\n\r\n if (token !== null) {\r\n await api\r\n .get('/users/me', {\r\n headers: { Authorization: `Bearer ${token}` },\r\n })\r\n .then(response => {\r\n dispatch({\r\n type: 'USER_SIGN_IN',\r\n payload: { token, ...response.data },\r\n });\r\n });\r\n }\r\n};\r\n","const {\r\n REACT_APP_API_URL,\r\n REACT_APP_BASE_URL,\r\n REACT_APP_ENV,\r\n REACT_APP_API_KEY,\r\n REACT_APP_AUTH_DOMAIN,\r\n REACT_APP_DATABASE_URL,\r\n REACT_APP_PROJECT_ID,\r\n REACT_APP_STORAGE_BUCKET,\r\n REACT_APP_MESSAGING_SENDER_ID,\r\n REACT_APP_APP_ID,\r\n REACT_APP_MEASUREMENT_ID,\r\n REACT_APP_GOOGLE_API_KEY,\r\n} = process.env;\r\n\r\nconst isProduction = REACT_APP_ENV === 'production';\r\nconst isDevelopment = REACT_APP_ENV === 'development';\r\nconst isLocal = REACT_APP_ENV === 'local';\r\n\r\nexport const env = {\r\n REACT_APP_API_URL,\r\n REACT_APP_BASE_URL,\r\n REACT_APP_ENV,\r\n REACT_APP_API_KEY,\r\n REACT_APP_AUTH_DOMAIN,\r\n REACT_APP_DATABASE_URL,\r\n REACT_APP_PROJECT_ID,\r\n REACT_APP_STORAGE_BUCKET,\r\n REACT_APP_MESSAGING_SENDER_ID,\r\n REACT_APP_APP_ID,\r\n REACT_APP_MEASUREMENT_ID,\r\n REACT_APP_GOOGLE_API_KEY,\r\n isProduction,\r\n isDevelopment,\r\n isLocal\r\n}\r\n","import Swal from 'sweetalert2';\r\nimport api from '../../../shared/services/api';\r\nimport store from '../../store';\r\nimport {\r\n ClassificationState,\r\n GenericAction,\r\n CLASSIFICATION_TOGGLE_SUCCESS,\r\n CLASSIFICATION_TOGGLE_ERROR,\r\n CLASSIFICATION_SELECT,\r\n CLASSIFICATION_LOAD,\r\n CLASSIFICATION_RESET,\r\n CLASSIFICATION_CHANGE_CLASSROOM,\r\n CLASSIFICATION_CHANGE_SCHOOL,\r\n CLASSIFICATION_CLEAR,\r\n CLASSIFICATION_CHANGE_FILTER,\r\n CLASSIFICATION_CHANGE_SEARCH,\r\n CLASSIFICATION_LOAD_CLASSROOMS,\r\n CLASSIFICATION_CHANGE_STALEMATE,\r\n CLASSIFICATION_CHANGE_SEARCH_SCHOOL,\r\n CLASSIFICATION_LOAD_SEARCH_CLASSROOMS,\r\n CLASSIFICATION_CHANGE_LAST_SCHOOL,\r\n CLASSIFICATION_CLEAR_SELECTED_SCHOOL,\r\n} from '../../types';\r\n\r\nconst initialState: ClassificationState = {\r\n data: [],\r\n selected: '',\r\n selectedSchool: '',\r\n previousSuccessfulSchool: {},\r\n classrooms: [],\r\n emptyClassrooms: true,\r\n loadedClassrooms: false,\r\n selectedClassroom: {},\r\n searchClassrooms: [],\r\n searchField: '',\r\n searchFilter: 'ALL',\r\n searchSchool: '',\r\n isEmpty: true,\r\n isLoaded: false,\r\n success: 'no',\r\n error: false,\r\n stalemate: [],\r\n};\r\n\r\nexport default function (state = initialState, action: GenericAction) {\r\n switch (action.type) {\r\n case CLASSIFICATION_LOAD:\r\n const data = [...action.payload];\r\n\r\n let isEmpty = true;\r\n if (action.payload.length !== 0) {\r\n isEmpty = false;\r\n }\r\n\r\n return {\r\n ...state,\r\n data,\r\n isEmpty,\r\n isLoaded: true,\r\n };\r\n\r\n case CLASSIFICATION_LOAD_CLASSROOMS:\r\n const classrooms = [...action.payload];\r\n\r\n return {\r\n ...state,\r\n classrooms,\r\n loadedClassrooms: true,\r\n };\r\n\r\n case CLASSIFICATION_LOAD_SEARCH_CLASSROOMS:\r\n const searchClassrooms = [...action.payload];\r\n\r\n let emptyClassrooms = true;\r\n if (action.payload.length !== 0) {\r\n emptyClassrooms = false;\r\n }\r\n\r\n return {\r\n ...state,\r\n searchClassrooms,\r\n emptyClassrooms,\r\n loadedClassrooms: true,\r\n isLoaded: false,\r\n searchField: '',\r\n };\r\n\r\n case CLASSIFICATION_CLEAR:\r\n return {\r\n ...state,\r\n data: [],\r\n isEmpty: true,\r\n isLoaded: false,\r\n selected: '',\r\n selectedClassroom: {},\r\n };\r\n\r\n case CLASSIFICATION_TOGGLE_SUCCESS:\r\n return {\r\n ...state,\r\n success: action.payload,\r\n };\r\n\r\n case CLASSIFICATION_TOGGLE_ERROR:\r\n return {\r\n ...state,\r\n error: !state.error,\r\n };\r\n\r\n case CLASSIFICATION_SELECT:\r\n return {\r\n ...state,\r\n selected: action.payload,\r\n };\r\n\r\n case CLASSIFICATION_CHANGE_SCHOOL:\r\n return {\r\n ...state,\r\n selectedSchool: action.payload,\r\n selectedClassroom: {},\r\n isLoaded: false,\r\n loadedClassrooms: false,\r\n };\r\n\r\n case CLASSIFICATION_CHANGE_LAST_SCHOOL:\r\n return {\r\n ...state,\r\n previousSuccessfulSchool: action.payload,\r\n };\r\n\r\n case CLASSIFICATION_CHANGE_CLASSROOM:\r\n return {\r\n ...state,\r\n selectedClassroom: action.payload,\r\n };\r\n\r\n case CLASSIFICATION_CHANGE_FILTER:\r\n return {\r\n ...state,\r\n searchFilter: action.payload,\r\n };\r\n\r\n case CLASSIFICATION_CHANGE_SEARCH:\r\n return {\r\n ...state,\r\n searchField: action.payload,\r\n };\r\n\r\n case CLASSIFICATION_CHANGE_SEARCH_SCHOOL:\r\n return {\r\n ...state,\r\n searchSchool: action.payload,\r\n previousSuccessfulSchool: action.payload,\r\n };\r\n\r\n case CLASSIFICATION_CHANGE_STALEMATE:\r\n return {\r\n ...state,\r\n stalemate: action.payload,\r\n };\r\n\r\n case CLASSIFICATION_RESET:\r\n return { ...initialState };\r\n \r\n case CLASSIFICATION_CLEAR_SELECTED_SCHOOL:\r\n return {\r\n ...state,\r\n selectedSchool: '',\r\n selectedClassroom: {},\r\n searchSchool: '',\r\n };\r\n\r\n default:\r\n return state;\r\n }\r\n}\r\n\r\nexport const changeSearchSchool = data => dispatch => {\r\n dispatch({ type: CLASSIFICATION_CHANGE_SEARCH_SCHOOL, payload: data });\r\n\r\n dispatch(fetchClassrooms(true));\r\n};\r\n\r\nexport const changeSelectedSchool = data => dispatch => {\r\n dispatch({ type: CLASSIFICATION_CHANGE_SCHOOL, payload: data });\r\n\r\n dispatch(fetchClassrooms(false));\r\n};\r\n\r\nexport const fetchClassrooms = (search: boolean) => async dispatch => {\r\n const token = store.getState().authReducer.user.token;\r\n const guid = search\r\n ? store.getState().classificationReducer.searchSchool.guid\r\n : store.getState().classificationReducer.selectedSchool.guid;\r\n\r\n api.get(`/classifications/${guid}`, {\r\n headers: { Authorization: `Bearer ${token}` },\r\n }).then(response => {\r\n if (search) {\r\n dispatch({\r\n type: CLASSIFICATION_LOAD_SEARCH_CLASSROOMS,\r\n payload: response.data.classrooms,\r\n });\r\n } else {\r\n dispatch({\r\n type: CLASSIFICATION_LOAD_CLASSROOMS,\r\n payload: response.data.classrooms,\r\n });\r\n }\r\n });\r\n};\r\n\r\nexport const updateClassification = (data: any) => async dispatch => {\r\n const token = store.getState().authReducer.user.token;\r\n\r\n await api\r\n .put(\r\n `/enrollments/${data.guid}`,\r\n { ...data },\r\n { headers: { Authorization: `Bearer ${token}` } },\r\n )\r\n .then(response => {\r\n const currentSelectedClassification = store.getState()\r\n .classificationReducer.selected;\r\n const updatedSelectedClassification = {\r\n ...currentSelectedClassification,\r\n ...data,\r\n };\r\n\r\n\r\n if (currentSelectedClassification.guid === data.guid) {\r\n dispatch({\r\n type: CLASSIFICATION_SELECT,\r\n payload: updatedSelectedClassification,\r\n });\r\n }\r\n\r\n dispatch(fetchClassrooms(true));\r\n dispatch(fetchClassrooms(false));\r\n\r\n if (data.quitAfter) {\r\n dispatch({\r\n type: CLASSIFICATION_TOGGLE_SUCCESS,\r\n payload: 'updateAlt',\r\n });\r\n } else {\r\n dispatch({\r\n type: CLASSIFICATION_TOGGLE_SUCCESS,\r\n payload: 'update',\r\n });\r\n }\r\n })\r\n .catch(error => {\r\n console.error(error);\r\n\r\n const fallbackClassroom = store\r\n .getState()\r\n .classificationReducer.selectedSchool.classrooms.find(\r\n x =>\r\n x.id ===\r\n store.getState().classificationReducer.selected\r\n .classroomId,\r\n );\r\n\r\n dispatch({\r\n type: CLASSIFICATION_CHANGE_CLASSROOM,\r\n payload: fallbackClassroom,\r\n });\r\n\r\n Swal.fire({\r\n icon: 'error',\r\n title: 'Erro ao atualizar dados',\r\n text: error.response?.data.message,\r\n });\r\n });\r\n};\r\n\r\nexport const updateStudentInfo = (data: any) => async dispatch => {\r\n const token = store.getState().authReducer.user.token;\r\n\r\n await api\r\n .put(\r\n `/students/${data.guid}`,\r\n { ...data },\r\n { headers: { Authorization: `Bearer ${token}` } },\r\n )\r\n .then(response => {\r\n const currentSelectedClassification = store.getState()\r\n .classificationReducer.selected;\r\n const updatedSelectedClassification = {\r\n ...currentSelectedClassification,\r\n ...data,\r\n };\r\n\r\n if (currentSelectedClassification.guid === data.guid) {\r\n dispatch({\r\n type: CLASSIFICATION_SELECT,\r\n payload: updatedSelectedClassification,\r\n });\r\n }\r\n\r\n dispatch(fetchClassrooms(true));\r\n dispatch(fetchClassrooms(false));\r\n\r\n if (data.quitAfter) {\r\n dispatch({\r\n type: CLASSIFICATION_TOGGLE_SUCCESS,\r\n payload: 'updateAlt',\r\n });\r\n } else {\r\n dispatch({\r\n type: CLASSIFICATION_TOGGLE_SUCCESS,\r\n payload: 'update',\r\n });\r\n }\r\n })\r\n .catch(error => {\r\n console.error(error);\r\n\r\n const fallbackClassroom = store\r\n .getState()\r\n .classificationReducer.selectedSchool.classrooms.find(\r\n x =>\r\n x.id ===\r\n store.getState().classificationReducer.selected\r\n .classroomId,\r\n );\r\n\r\n dispatch({\r\n type: CLASSIFICATION_CHANGE_CLASSROOM,\r\n payload: fallbackClassroom,\r\n });\r\n\r\n Swal.fire({\r\n icon: 'error',\r\n title: 'Erro ao atualizar dados',\r\n text: error.response?.data.message,\r\n });\r\n });\r\n};\r\n\r\nexport const transferClassification = (data: any) => async dispatch => {\r\n const token = store.getState().authReducer.user.token;\r\n\r\n await api\r\n .put(\r\n `/enrollments/transfer/${data.guid}`,\r\n { ...data },\r\n { headers: { Authorization: `Bearer ${token}` } },\r\n )\r\n .then(response => {\r\n // console.log(response);\r\n\r\n dispatch(fetchClassrooms(true));\r\n dispatch(fetchClassrooms(false));\r\n\r\n dispatch({\r\n type: CLASSIFICATION_CHANGE_LAST_SCHOOL,\r\n payload: store.getState().classificationReducer.selectedSchool,\r\n });\r\n\r\n dispatch({\r\n type: CLASSIFICATION_TOGGLE_SUCCESS,\r\n payload: 'update',\r\n });\r\n })\r\n .catch(error => {\r\n console.error(error);\r\n\r\n dispatch(\r\n changeSelectedSchool(\r\n store.getState().classificationReducer\r\n .previousSuccessfulSchool,\r\n ),\r\n );\r\n\r\n Swal.fire({\r\n icon: 'error',\r\n title: 'Erro na transferência',\r\n text: error.response?.data.message,\r\n });\r\n });\r\n};\r\n\r\nexport const solveStalemate = (data: any) => async dispatch => {\r\n const token = store.getState().authReducer.user.token;\r\n\r\n await api\r\n .get(`/enrollments/stalemate/${data}`, {\r\n headers: { Authorization: `Bearer ${token}` },\r\n })\r\n .then(response => {\r\n dispatch(fetchClassrooms(true));\r\n\r\n dispatch({ type: CLASSIFICATION_CHANGE_STALEMATE, payload: [] });\r\n\r\n dispatch({\r\n type: CLASSIFICATION_TOGGLE_SUCCESS,\r\n payload: 'stalemate',\r\n });\r\n })\r\n .catch(error => {\r\n console.error(error);\r\n\r\n dispatch({ type: CLASSIFICATION_CHANGE_STALEMATE, payload: [] });\r\n\r\n dispatch({\r\n type: CLASSIFICATION_TOGGLE_ERROR,\r\n });\r\n });\r\n};\r\n\r\nexport const clearSelectedSchool = () => dispatch => {\r\n dispatch({ type: CLASSIFICATION_CLEAR_SELECTED_SCHOOL });\r\n};","import {\r\n SchoolUnitState,\r\n SCHOOLUNITS_LOAD,\r\n GenericAction,\r\n SCHOOLUNITS_TOGGLE_SUCCESS,\r\n SCHOOLUNITS_TOGGLE_ERROR,\r\n SCHOOLUNIT_SELECT,\r\n SchoolUnit,\r\n} from '../../types';\r\n\r\nimport api from '../../../shared/services/api';\r\nimport store from '../../store';\r\nimport { SchoolUnitFormValues } from '../../../modules/public/pages/SchoolUnitsPage/types';\r\n\r\nconst initialState: SchoolUnitState = {\r\n data: [],\r\n selected: '',\r\n isEmpty: true,\r\n isLoaded: false,\r\n success: 'no',\r\n error: false,\r\n};\r\n\r\nexport default function (state = initialState, action: GenericAction) {\r\n switch (action.type) {\r\n case SCHOOLUNITS_LOAD:\r\n const data = [...action.payload];\r\n\r\n let isEmpty = true;\r\n if (action.payload.length !== 0) {\r\n isEmpty = false;\r\n }\r\n\r\n return {\r\n ...state,\r\n data,\r\n isEmpty,\r\n isLoaded: true,\r\n };\r\n\r\n case SCHOOLUNITS_TOGGLE_SUCCESS:\r\n return {\r\n ...state,\r\n success: action.payload,\r\n };\r\n\r\n case SCHOOLUNITS_TOGGLE_ERROR:\r\n return {\r\n ...state,\r\n error: !state.error,\r\n };\r\n\r\n case SCHOOLUNIT_SELECT:\r\n return {\r\n ...state,\r\n selected: action.payload,\r\n };\r\n\r\n default:\r\n return state;\r\n }\r\n}\r\n\r\nexport const fetchSchoolUnits = () => async dispatch => {\r\n const token = store.getState().authReducer.user.token;\r\n\r\n await api\r\n .get(`/schoolunits`, {\r\n headers: { Authorization: `Bearer ${token}` },\r\n })\r\n .then(response => {\r\n let formattedResponse = response.data;\r\n\r\n for (let i = 0; i < formattedResponse.length; i++) {\r\n formattedResponse[i].totalVacancy = 0;\r\n\r\n for (\r\n let j = 0;\r\n j < formattedResponse[i].classrooms.length;\r\n j++\r\n ) {\r\n formattedResponse[i].totalVacancy +=\r\n formattedResponse[i].classrooms[j].vacancy;\r\n }\r\n\r\n formattedResponse[i].id = formattedResponse[i].guid;\r\n }\r\n\r\n dispatch({\r\n type: 'SCHOOLUNITS_LOAD',\r\n payload: formattedResponse,\r\n });\r\n });\r\n};\r\n\r\nexport const createSchoolUnit = (data: any) => async dispatch => {\r\n const token = store.getState().authReducer.user.token;\r\n\r\n await api\r\n .post(\r\n '/schoolunits',\r\n { ...data },\r\n { headers: { Authorization: `Bearer ${token}` } },\r\n )\r\n .then(response => {\r\n dispatch(fetchSchoolUnits());\r\n\r\n dispatch({\r\n type: 'SCHOOLUNITS_TOGGLE_SUCCESS',\r\n payload: 'create',\r\n });\r\n })\r\n .catch(error => {\r\n console.error(error);\r\n\r\n dispatch({\r\n type: 'SCHOOLUNITS_TOGGLE_ERROR',\r\n });\r\n });\r\n};\r\n\r\nexport const updateSchoolUnit = (data: SchoolUnitFormValues) => async dispatch => {\r\n const token = store.getState().authReducer.user.token;\r\n const schools = store.getState().schoolUnitReducer as SchoolUnitState;\r\n\r\n const updatedSchools = schools.data.map((school: SchoolUnit) => {\r\n if (school.id === data.guid) {\r\n return {\r\n ...school,\r\n classrooms: school.classrooms.map(classroom => {\r\n const updatedClassroom = data.classrooms.find(c => c.id === classroom.id);\r\n if (updatedClassroom) {\r\n return {\r\n ...classroom,\r\n activeNumber: updatedClassroom.activeNumber\r\n };\r\n }\r\n return classroom;\r\n })\r\n };\r\n }\r\n return school;\r\n });\r\n\r\n await api\r\n .put(\r\n `/schoolunits/${data.guid}`,\r\n { ...data },\r\n { headers: { Authorization: `Bearer ${token}` } },\r\n )\r\n .then(response => {\r\n\r\n // Atualiza o estado localmente\r\n dispatch({\r\n type: SCHOOLUNITS_LOAD,\r\n payload: updatedSchools,\r\n });\r\n\r\n dispatch(fetchSchoolUnits())\r\n\r\n dispatch({\r\n type: 'SCHOOLUNITS_TOGGLE_SUCCESS',\r\n payload: 'update',\r\n });\r\n })\r\n .catch(error => {\r\n console.error(error);\r\n\r\n dispatch({\r\n type: 'SCHOOLUNITS_TOGGLE_ERROR',\r\n });\r\n });\r\n};","import { GenericAction, HeaderState, HEADER_CHANGE_TITLE } from '../../types';\r\n\r\nconst initialState: HeaderState = {\r\n headerTitle: 'Central de Vagas',\r\n};\r\n\r\nexport default function (state = initialState, action: GenericAction) {\r\n switch (action.type) {\r\n case HEADER_CHANGE_TITLE:\r\n return {\r\n ...state,\r\n headerTitle: action.payload,\r\n };\r\n default:\r\n return state;\r\n }\r\n}\r\n","import {\r\n GenericAction,\r\n PROGRESS_INDICATOR_ADD,\r\n PROGRESS_INDICATOR_REMOVE,\r\n ProgressIndicatorState\r\n} from \"../../types\";\r\n\r\n\r\nconst initialState: ProgressIndicatorState = {\r\n onFetchingData: []\r\n}\r\n\r\nconst progressIndicatorReducer = (state = initialState, action: GenericAction): ProgressIndicatorState => {\r\n\r\n switch (action.type) {\r\n case PROGRESS_INDICATOR_ADD:\r\n return {\r\n ...state,\r\n onFetchingData: [...state.onFetchingData, action.payload]\r\n }\r\n case PROGRESS_INDICATOR_REMOVE:\r\n return {\r\n ...state,\r\n onFetchingData: state.onFetchingData.filter(i => i !== action.payload)\r\n }\r\n default:\r\n return state;\r\n }\r\n}\r\n\r\n\r\nexport default progressIndicatorReducer;","import { PaletteType } from \"@material-ui/core\";\r\nimport { GenericAction, THEME_CHANGE_COLORS, THEME_CHANGE_TYPE, ThemeState } from \"../../types\";\r\n\r\nconst loadType = (): PaletteType => {\r\n const localStorageOpinion: any = localStorage.getItem('themeType');\r\n \r\n if (localStorageOpinion !== null) {\r\n return localStorageOpinion;\r\n }\r\n else {\r\n return 'light';\r\n }\r\n} \r\n\r\n\r\nconst initialState: ThemeState = {\r\n colors: {\r\n primaryColor: '#3B72A7',\r\n secondaryColor: '#4E8F48',\r\n },\r\n type: loadType()\r\n}\r\n\r\nconst themeReducer = (state = initialState, action: GenericAction): ThemeState => {\r\n\r\n switch (action.type) {\r\n case THEME_CHANGE_COLORS:\r\n return {\r\n ...state,\r\n colors: action.payload\r\n }\r\n case THEME_CHANGE_TYPE:\r\n const type = state.type === 'dark' ? 'light' : 'dark';\r\n localStorage.setItem('themeType', type);\r\n\r\n return {\r\n ...state,\r\n type\r\n }\r\n default:\r\n return state;\r\n }\r\n\r\n}\r\n\r\nexport default themeReducer;\r\n","import { combineReducers } from 'redux';\r\nimport authReducer from './auth/authReducer';\r\nimport classificationReducer from './classification/classificationReducer';\r\nimport enrollmentReducer from './enrollment/enrollmentReducer';\r\nimport headerReducer from './header/headerReducer';\r\nimport progressIndicatorReducer from './progressIndicator/progressIndicatorReducer';\r\nimport schoolUnitReducer from './schoolUnit/schoolUnitReducer';\r\nimport themeReducer from './theme/themeReducer';\r\n\r\nconst rootReducer = combineReducers({\r\n authReducer,\r\n classificationReducer,\r\n enrollmentReducer,\r\n headerReducer,\r\n progressIndicatorReducer,\r\n schoolUnitReducer,\r\n themeReducer,\r\n});\r\n\r\nexport default rootReducer;\r\n","import { createStore, applyMiddleware } from 'redux';\r\nimport thunk from 'redux-thunk';\r\nimport rootReducer from './reducers';\r\n\r\n\r\n\r\n// eslint-disable-next-line @typescript-eslint/ban-ts-ignore\r\n// @ts-ignore\r\n// eslint-disable-next-line no-underscore-dangle\r\nconst reduxDevtools = window.__REDUX_DEVTOOLS_EXTENSION__ && window.__REDUX_DEVTOOLS_EXTENSION__();\r\n\r\nconst composeStoreWithMiddleware = applyMiddleware(\r\n thunk\r\n)(createStore)\r\n\r\nexport default composeStoreWithMiddleware(rootReducer, reduxDevtools);","import api from '../../../shared/services/api';\r\nimport store from '../../store';\r\nimport {\r\n GenericAction,\r\n EnrollmentState,\r\n ENROLLMENT_SUCCESS,\r\n ENROLLMENT_RESET,\r\n ENROLLMENT_LANDING_READ,\r\n ENROLLMENTS_LOAD,\r\n} from '../../types';\r\n\r\nconst initialState: EnrollmentState = {\r\n isSuccessful: false,\r\n successData: [],\r\n sentEnrollmentsData: [],\r\n isLoading: true,\r\n landingRead: false,\r\n};\r\n\r\nexport default function (state = initialState, action: GenericAction) {\r\n switch (action.type) {\r\n case ENROLLMENT_SUCCESS:\r\n return {\r\n ...state,\r\n isSuccessful: true,\r\n successData: action.payload,\r\n };\r\n case ENROLLMENT_RESET:\r\n return {\r\n ...state,\r\n ...initialState,\r\n };\r\n case ENROLLMENT_LANDING_READ:\r\n return {\r\n ...state,\r\n landingRead: true,\r\n };\r\n case ENROLLMENTS_LOAD:\r\n return {\r\n ...state,\r\n sentEnrollmentsData: action.payload,\r\n isLoading: false,\r\n };\r\n default:\r\n return state;\r\n }\r\n}\r\n\r\nexport const fetchEnrollments = () => async dispatch => {\r\n const token = store.getState().authReducer.user.token;\r\n\r\n await api\r\n .get(`/users/enrollments`, {\r\n headers: { Authorization: `Bearer ${token}` },\r\n })\r\n .then(response => {\r\n const minimumWage = 1045;\r\n let enrollmentsArr = [...response.data];\r\n enrollmentsArr.forEach((enrollment, index) => {\r\n switch (enrollment.cityResident) {\r\n case 0:\r\n enrollment.cityResident = 'Não';\r\n break;\r\n case 1:\r\n enrollment.cityResident = 'Sim';\r\n break;\r\n }\r\n\r\n switch (enrollment.responsibleForChild) {\r\n case 0:\r\n enrollment.responsibleForChild = 'Pais';\r\n break;\r\n case 1:\r\n enrollment.responsibleForChild =\r\n 'Crianças cuja a reponsabilidade é de terceiros';\r\n break;\r\n case 2:\r\n enrollment.responsibleForChild =\r\n 'Situação de vulnerabilidade social e/ou risco pessoal, encaminhadas pelos órgãos públicos';\r\n break;\r\n }\r\n\r\n switch (enrollment.familyIncome) {\r\n case 0:\r\n enrollment.familyIncome = `Renda de até R$ ${(\r\n minimumWage * 0.5\r\n ).toFixed(2)}`;\r\n break;\r\n case 1:\r\n enrollment.familyIncome = `Renda de R$ ${(\r\n minimumWage * 0.6\r\n ).toFixed(2)} até R$ ${minimumWage.toFixed(2)}`;\r\n break;\r\n case 2:\r\n enrollment.familyIncome = `Renda de R$ ${(\r\n minimumWage * 1.1\r\n ).toFixed(2)} até R$ ${(minimumWage * 1.3).toFixed(2)}`;\r\n break;\r\n case 3:\r\n enrollment.familyIncome = `Renda de R$ ${(\r\n minimumWage * 1.4\r\n ).toFixed(2)} até R$ ${(minimumWage * 1.3).toFixed(2)}`;\r\n break;\r\n case 4:\r\n enrollment.familyIncome = `Renda acima de R$ ${(\r\n minimumWage * 1.6\r\n ).toFixed(2)}`;\r\n break;\r\n }\r\n\r\n switch (enrollment.familyHousing) {\r\n case 0:\r\n enrollment.familyHousing = 'Família possui imóvel';\r\n break;\r\n case 1:\r\n enrollment.familyHousing =\r\n 'Família reside em casa cedida';\r\n break;\r\n case 2:\r\n enrollment.familyHousing =\r\n 'Família paga financiamento do imóvel';\r\n break;\r\n case 3:\r\n enrollment.familyHousing =\r\n 'Família reside em casa alugada';\r\n break;\r\n }\r\n\r\n switch (enrollment.socialProgram) {\r\n case 0:\r\n enrollment.socialProgram = 'Possui Bolsa Família';\r\n break;\r\n case 1:\r\n enrollment.socialProgram = 'Não possui Bolsa Família';\r\n break;\r\n }\r\n\r\n switch (enrollment.motherOccupation) {\r\n case 0:\r\n enrollment.motherOccupation =\r\n 'Mães que trabalham fora do lar';\r\n break;\r\n case 1:\r\n enrollment.motherOccupation =\r\n 'Mães que trabalham com faxina todos os dias da semana';\r\n break;\r\n case 2:\r\n enrollment.motherOccupation =\r\n 'Mães que trabalham com faxina alguns dias da semana';\r\n break;\r\n case 3:\r\n enrollment.motherOccupation =\r\n 'Mães que não trabalham fora do lar';\r\n break;\r\n }\r\n\r\n switch (enrollment.familyChildrenQty) {\r\n case 0:\r\n enrollment.familyChildrenQty = 'Até 2 filhos';\r\n break;\r\n case 1:\r\n enrollment.familyChildrenQty = 'Até 4 filhos';\r\n break;\r\n case 2:\r\n enrollment.familyChildrenQty = 'A partir de 5 filhos';\r\n break;\r\n }\r\n\r\n enrollment.cpf = enrollment.cpf.replace(\r\n /^(\\d{3})(\\d{3})(\\d{1,3})(\\d{1,2})$/g,\r\n '$1.$2.$3-$4',\r\n );\r\n\r\n enrollment.birthDate = enrollment.birthDate.split('T', 1);\r\n });\r\n\r\n dispatch({\r\n type: 'ENROLLMENTS_LOAD',\r\n payload: enrollmentsArr,\r\n });\r\n });\r\n};\r\n\r\nexport const cancelEnrollment = (guid: string) => async dispatch => {\r\n const token = store.getState().authReducer.user.token;\r\n\r\n await api\r\n .delete(`/enrollments/${guid}`, {\r\n headers: { Authorization: `Bearer ${token}` },\r\n })\r\n .then(response => {\r\n dispatch(fetchEnrollments());\r\n });\r\n};\r\n","import { makeStyles } from '@material-ui/core/styles';\r\nimport React from 'react';\r\nimport { CircularProgress } from '@material-ui/core';\r\n\r\n\r\nconst useStyle = makeStyles(theme => ({\r\n container: { \r\n display: 'flex',\r\n width: '100%',\r\n height: '100vh',\r\n justifyContent: 'center',\r\n alignItems: 'center'\r\n }\r\n}));\r\n\r\nconst RouteProgressIndicator: React.FC = () => {\r\n\r\n const classes = useStyle();\r\n\r\n return (\r\n
\r\n \r\n
\r\n );\r\n}\r\n\r\nexport default RouteProgressIndicator;","import RouteProgressIndicator from './RouteProgressIndicator';\r\n\r\nexport default RouteProgressIndicator;"],"sourceRoot":""}