\n
\n {(value) => {\n this.showInfoMessage = value.info;\n this.showSuccessMessage = value.success;\n this.showWarningMessage = value.warning;\n this.showErrorMessage = value.error;\n }}\n \n
\n
\n - \n \n Filtrar por categoria\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 FilterBar;","import React, {Component} from 'react';\nimport {Container} from \"reactstrap\";\nimport LearningPlansCard from \"../LearningPlans/LearningPlansCard\";\nimport SearchBar from \"./SearchBar\";\nimport FilterBar from \"./FilterBar\";\n// import LearningPlanRatingModal from \"../Course/LearningPlanRatingModal\";\nimport { AlertContext } from \"../../providers/AlertProvider\";\nimport ServicesLearningPlans from \"../../services/LearningPlans/LearningPlansServices\";\nimport InfiniteScroll from 'react-infinite-scroller';\n\n\nclass Home extends Component {\n constructor(props) {\n super(props);\n this.state = {\n learningPlans: [],\n totalItens: 8,\n page: 0,\n showLoadingBottom: false,\n loading: true\n }\n\n this.setplans = this.setplans.bind(this);\n this.setLoading = this.setLoading.bind(this);\n }\n\n componentDidMount() {\n window.addEventListener('scroll', this.loadMore);\n this.getLearningPlans(this.state.page, this.state.totalItens);\n }\n\n componentWillUnmount(){\n window.removeEventListener('scroll', this.loadMore);\n }\n\n loadMore = () => {\n if (window.innerHeight + document.documentElement.scrollTop === document.scrollingElement.scrollHeight && this.state.showLoadingBottom == false) { \n this.setState({\n showLoadingBottom: true,\n page: (this.state.page + 1)\n }); \n\n this.getLearningPlans(this.state.page, this.state.totalItens);\n\n }else{\n this.setState({\n showLoadingBottom: false\n });\n }\n\n this.render();\n }\n\n setplans(learningPlans) { \n this.setState({\n learningPlans: learningPlans\n })\n }\n\n setLoading(statusLoading) { \n this.setState({\n loading: statusLoading\n })\n }\n \n getLearningPlans(page, totalItens){ \n ServicesLearningPlans.getData(page, totalItens, (data) => {\n if(data.length > 0){\n this.setState(prevState => ({ \n learningPlans: [...prevState.learningPlans, ...data].sort((a,b) => (a.name.normalize(\"NFD\").replace(/[\\u0300-\\u036f]/g, \"\") > b.name.normalize(\"NFD\").replace(/[\\u0300-\\u036f]/g, \"\")) ? 1 : ((b.name.normalize(\"NFD\").replace(/[\\u0300-\\u036f]/g, \"\") > a.name.normalize(\"NFD\").replace(/[\\u0300-\\u036f]/g, \"\")) ? -1 : 0)),\n loading: false,\n showLoadingBottom: false\n })); \n }else{\n this.setState({\n showLoadingBottom: false\n });\n }\n }, (err) => {\n this.showErrorMessage(err.message || err.response.data.Error);\n });\n }\n\n loadingBottom = () => {\n if(this.state.showLoadingBottom){\n return(\n
\n \n Carregando mais itens...
\n \n )\n }\n }\n\n renderLeaningPlans(learningPlans){\n \n if (learningPlans.length == 0) {\n return(\n
\n \n Nenhum dado encontado.
\n \n \n )\n }else{\n return(\n
\n \n {learningPlans.filter(x => x.learningStep != null && x.learningStep != undefined).map((value, i) =>\n )} \n {this.loadingBottom()} \n \n \n \n )\n }\n }\n\n renderLoading(){\n if(this.state.loading){\n return (\n
\n )\n }\n }\n\n render() {\n const learningPlans = this.state.learningPlans;\n \n \n\n return (\n
\n
\n {(value) => {\n this.showInfoMessage = value.info;\n this.showSuccessMessage = value.success;\n this.showWarningMessage = value.warning;\n this.showErrorMessage = value.error;\n }}\n \n
\n \n {this.renderLoading()}\n {this.state.loading == false && (this.renderLeaningPlans(learningPlans))} \n \n ) \n }\n}\n\nexport default Home;\n\n","import React, { Component } from 'react';\n\nclass Footer extends Component {\n render() {\n return (\n
\n )\n }\n}\n\nexport default Footer;","import React, { Component } from 'react';\nimport {Container} from \"reactstrap\";\nimport {Link} from \"react-router-dom\";\n\n\nclass Header extends Component {\n render(){\n return(\n
\n \n \n
\n \n \n \n )\n }\n}\n\nexport default Header;","import React, {Component} from 'react';\nimport {Container, Col} from 'reactstrap';\nimport Footer from './Footer';\n//import Sidebar from './Sidebar';\nimport Header from './Header';\nimport AlertProvider from \"../../providers/AlertProvider\";\nimport '../../assets/css/styles.css';\nclass LayoutDefault extends Component {\n constructor(props) {\n super(props);\n this.state = {\n collapsed: false,\n };\n }\n\n onCollapse = () => {\n let active = !this.state.collapsed;\n this.setState({collapsed: active});\n };\n\n render() {\n return (\n
\n
\n
\n
\n {this.props.children}\n \n
\n
\n
\n )\n }\n}\n\nexport default LayoutDefault;\n","import BaseService from '../Base/BaseServices'\nimport Config from '../../core/constants';\nimport HttpUtil from '../../core/network/httpUtil';\n\nlet Base = new BaseService('SkillCompetences');\n\nclass SkillCompetencesServices {\n constructor(){\n }\n\n static services = Base.services;\n\n static getData(page, pageSize, cb, errorCb) {\n return this.services.getData(page, pageSize, cb, errorCb);\n }\n static updateData(id, data, cb, errorCb){\n return this.services.updateData(id, data, cb, errorCb);\n }\n static removeData(id, cb, errorCb){\n return this.services.removeData(id, cb, errorCb);\n }\n static saveData(data, cb, errorCb) {\n return this.services.saveData(data, cb, errorCb);\n }\n static getDetails(id, cb, errorCb) {\n return this.services.getDetails(id, cb, errorCb);\n }\n static search(data, cb, errorCb){\n if (data.hasOwnProperty('active')){\n if (typeof data.active !== \"boolean\"){\n data.active = data.active === 'true';\n }\n }\n data.removed = false;\n return this.services.search(data, cb, errorCb);\n }\n\n static getSkillCompetencesDisciplinesByLearningPlanId = (learningPlanId, cb, errorCb) => {\n let urlApi = process.env.PUBLIC_URL || Config.URLS.API;\n \n return HttpUtil.GET(`${urlApi}SkillCompetences/GetSkillCompetencesDisciplinesByLearningPlanId/${learningPlanId}`,\n response => cb(response.data),\n errorCb);\n };\n\n static getSkillCompetencesExperienceFieldsByLearningPlanId = (learningPlanId, cb, errorCb) => {\n let urlApi = process.env.PUBLIC_URL || Config.URLS.API;\n \n return HttpUtil.GET(`${urlApi}SkillCompetences/GetSkillCompetencesExperienceFieldsByLearningPlanId/${learningPlanId}`,\n response => cb(response.data),\n errorCb);\n };\n\n static getSkillCompetencesDisciplinesByLearningStepId = (learningStepId, cb, errorCb) => {\n let urlApi = process.env.PUBLIC_URL || Config.URLS.API;\n \n return HttpUtil.GET(`${urlApi}SkillCompetences/GetSkillCompetencesDisciplinesByLearningStepId/${learningStepId}`,\n response => cb(response.data),\n errorCb);\n };\n\n static getSkillCompetencesExperienceFieldsByLearningStepId = (learningStepId, cb, errorCb) => {\n let urlApi = process.env.PUBLIC_URL || Config.URLS.API;\n \n return HttpUtil.GET(`${urlApi}SkillCompetences/GetSkillCompetencesExperienceFieldsByLearningStepId/${learningStepId}`,\n response => cb(response.data),\n errorCb);\n };\n}\n\nexport default SkillCompetencesServices;","import React, {Component} from 'react';\nimport {Container, Row, Col} from \"reactstrap\";\nimport {Link, withRouter} from \"react-router-dom\";\nimport LearningPlanServices from \"../../services/LearningPlans/LearningPlansServices\"\nimport SkillCompetencesServices from '../../services/SkillCompetences/SkillCompetencesServices';\nimport {AlertContext} from \"../../providers/AlertProvider\";\n\n\nclass LearningPlansDetails extends Component {\n constructor(props) {\n super(props);\n\n this.state = {\n model: null,\n id: null,\n bnccCapabilities: [],\n curriculumComponents: [],\n educationCapabilities: [],\n downloadUrl: '',\n description: '',\n subLevel: 1,\n listSkillCompetencesDisciplines: [],\n listSkillCompetencesExperienceFields: []\n };\n }\n\n componentDidMount() {\n const {match: {params}} = this.props;\n if (params.id !== undefined) {\n LearningPlanServices.getDetails(params.id, (data) => { \n if (data) {\n this.setState({\n id: params.id,\n model: data,\n description: data.name,\n subLevel: data.learningStep.subLevel\n }); \n }\n\n if(this.state.subLevel == 1){\n this.getSkillCompetencesExperienceFieldsByLearningPlanId(data.id);\n }else{\n this.getSkillCompetencesDisciplinesByLearningPlanId(data.id);\n }\n\n }, (err) => {\n debugger\n this.showErrorMessage(err.message || err.response.data.Error);\n });\n\n } else {\n this.showErrorMessage(\"Invalid\");\n }\n }\n\n getSkillCompetencesDisciplinesByLearningPlanId = (id, state) => {\n \n this.setState({ loading: true });\n SkillCompetencesServices.getSkillCompetencesDisciplinesByLearningPlanId(id, (data) => {\n this.setState({\n listSkillCompetencesDisciplines: data,\n pages: data.pages,\n loading: false\n });\n\n }, (err) => {\n this.showErrorMessage(err.message || err.response.data.Error);\n });\n };\n\n getSkillCompetencesExperienceFieldsByLearningPlanId = (id, state) => {\n \n this.setState({ loading: true });\n SkillCompetencesServices.getSkillCompetencesExperienceFieldsByLearningPlanId(id, (data) => {\n this.setState({\n listSkillCompetencesExperienceFields: data,\n pages: data.pages,\n loading: false\n });\n \n }, (err) => {\n this.showErrorMessage(err.message || err.response.data.Error);\n });\n };\n\n handleDownload = (e) => {\n const id = this.state.id;\n LearningPlanServices.downloadMaterial(id).then((response) => {\n\n var element = document.createElement('a');\n element.setAttribute('href', 'data:text/plain;base64,' + response.data);\n element.setAttribute('download', id+\".zip\");\n element.style.display = 'none';\n document.body.appendChild(element);\n element.click();\n document.body.removeChild(element);\n\n\n }).catch((err) => {\n this.showErrorMessage(err);\n });\n };\n\n handlePrint = (e) => {\n window.print();\n };\n\n htmlAttachments = (attachments) => {\n let rawData = attachments;\n \n return rawData.map((item, index) => {\n let style = {};\n let imgUrl = \"/img/i-anexo.png\";\n\n if (item.mimeType.indexOf(\"image/\") !== -1) {\n style = {\n 'background': `url(${item.url})`\n };\n }\n \n if (item.mimeType.indexOf(\"word\") !== -1 || item.mimeType.indexOf(\"wordprocessingml\") !== -1){\n imgUrl = \"/img/i-word.png\";\n }\n \n if (item.mimeType.indexOf(\"excel\") !== -1 || item.mimeType.indexOf(\"spreadsheetml\") !== -1){\n imgUrl = \"/img/i-excel.png\";\n }\n \n if (item.mimeType.indexOf(\"powerpoint\") !== -1 || item.mimeType.indexOf(\"presentationml\") !== -1){\n imgUrl = \"/img/i-ppt.png\";\n } \n\n return (\n
\n \n {imgUrl !== \"\" ?
: }\n
{item.name}
\n \n \n );\n })\n };\n\n htmlSkillCompetences(){ \n if(this.state.subLevel == 1){\n return(\n
\n {this.state.listSkillCompetencesExperienceFields.length > 0 && this.state.listSkillCompetencesExperienceFields.map((item) => { \n return(\n
\n
\n
{item.name}
\n {item.listSkillCompetences.map((ItemSkillCompetence) => {\n return(\n
\n
\n ({ItemSkillCompetence.skillCompetencesCode})\n
\n
\n {ItemSkillCompetence.name}\n
\n
\n )\n })\n }\n
\n )\n })\n }\n \n )\n }else{\n return(\n
\n { this.state.listSkillCompetencesDisciplines.length > 0 && this.state.listSkillCompetencesDisciplines.map((item) => { \n return(\n
\n
{item.knowledgeAreaName}
\n { item.disciplines.map((itemDisciplina) => { \n return(\n
\n
{itemDisciplina.name} \n { itemDisciplina.skillCompetences.map((ItemSkillCompetence) => { \n return( \n
\n
\n ({ItemSkillCompetence.skillCompetencesCode})\n
\n
\n {ItemSkillCompetence.name}\n
\n
\n
\n ) \n })\n }\n
\n ) \n })\n }\n
\n )\n })\n }\n \n )\n }\n }\n\n render() {\n \n const plan = this.state.model;\n\n if (!plan) {\n return
\n }\n\n return (\n
\n
\n {(value) => {\n this.showInfoMessage = value.info;\n this.showSuccessMessage = value.success;\n this.showWarningMessage = value.warning;\n this.showErrorMessage = value.error;\n }}\n \n
\n
\n
\n
\n Home \n \n \n {plan.name}\n
\n
\n {'< Voltar'}\n
\n
\n
\n
\n\n
\n \n \n \n {plan.name}
\n Objetivo geral
\n \n
\n \n Objetivos específicos
\n \n
\n \n Estratégias de aprendizagem
\n \n
\n \n Recursos didáticos
\n \n
\n \n Avaliação
\n \n
\n \n Referências
\n \n
\n \n \n \n \n \n {this.state.model.learningPlansAttachments.length > 0 && (Anexos
)}\n \n - \n {this.htmlAttachments(this.state.model.learningPlansAttachments)}\n
\n
\n \n \n \n
this.handleDownload()}/>\n
this.handlePrint()}/>\n Etapa de ensino
\n \n
\n \n Habilidades e competências relacionados
\n {this.htmlSkillCompetences()}\n Palavras-chave
\n \n
\n \n Duração
\n \n
\n \n \n {this.state.model.learningPlansDigitalTools.length > 0 && (Ferramentas digitais
)}\n {this.state.model.learningPlansDigitalTools.length > 0 && this.state.model.learningPlansDigitalTools\n .map(t => t.name)\n .reduce((prev, curr) => [prev, ', ', curr])}
\n {this.state.model.learningPlansRelateds.length > 0}\n \n {this.state.model.learningPlansRelateds.length > 0 && (Roteiros relacionados
)}\n {this.state.model.learningPlansRelateds.length > 0 && this.state.model.learningPlansRelateds.map((item) => { \n return(\n \n \n )\n })\n }\n \n
\n \n
\n )\n }\n}\n\nexport default withRouter(LearningPlansDetails);","import React, { Component } from 'react';\nimport { Route, BrowserRouter, Switch, Redirect } from 'react-router-dom';\n\nimport Home from './components/Home/Home';\nimport LayoutDefault from './components/layouts/LayoutDefault';\nimport LearningPlansDetails from \"./components/LearningPlans/LearningPlansDetails\";\n\nclass Routes extends Component {\n render() {\n return (\n
\n \n \n \n \n \n \n \n \n \n \n \n } />\n \n \n );\n }\n}\n\nexport default Routes;","import React from 'react';\nimport ReactDOM from 'react-dom';\n\n\nimport * as serviceWorker from './serviceWorker';\nimport Routes from './routes';\n\nReactDOM.render(
, document.getElementById('root'));\n\n// If you want your app to work offline and load faster, you can change\n// unregister() to register() below. Note this comes with some pitfalls.\n// Learn more about service workers: https://bit.ly/CRA-PWA\nserviceWorker.unregister();","// GLOBAL CONSTANTS\n// -----------------------------------\n\nexport const STORAGE_KEYS = {\n JWT_KEY: 'learningPlan.jwt',\n JWT_REF_KEY: 'learningPlan.ref_jwt',\n JWT_EXP_KEY: 'learningPlan.exp_jwt',\n USER_NAME: 'learningPlan.full_user_name',\n USER_EMAIL: 'learningPlan.full_user_email'\n};\n\nexport const URLS = {\n //LOCALHOST\n //API: \"https://localhost:44397/api/\",\n //REDIRECT: \"http://localhost:44325/\"\n\n //DEV\n // API: \"https://appservice-roteiros-dev.azurewebsites.net/api/\",\n // REDIRECT: \"https://webapp-roteirosprofessor-dev.azurewebsites.net/\"\n\n //DEMO\n //API: \"https://appservice-roteiros-demo.azurewebsites.net/api/\",\n //REDIRECT: \"https://webapp-roteirosprofessor-demo.azurewebsites.net/\"\n\n //PROD\n API: \"https://appservice-roteiros-prod.azurewebsites.net/api/\",\n REDIRECT: \"https://roteiros.bigbrain.com.br\"\n}\n\nexport const ADAL = {\n TENANT: \"esatnet.onmicrosoft.com\",\n CLIENT_ID: \"fe3ee87f-1bef-4a74-867c-70d4cb403103\",\n CLIENT_SECRET: \"b91h2iO9Fz.4Rm1._E8NMJWa9-Rny.VaY~\"\n}\n\nexport default {\n STORAGE_KEYS,\n URLS,\n ADAL\n}","import { AuthenticationContext, adalFetch, withAdalLogin } from 'react-adal';\nimport dotenv from 'dotenv';\nimport {Constants} from './core';\n\ndotenv.config();\n\nexport const endpoint =process.env.REACT_APP_CLIENT_ID;\n\nexport const adalConfig = {\n tenant: \"common\",\n clientId: Constants.ADAL.CLIENT_ID,\n redirectUri: Constants.URLS.REDIRECT,\n endpoints: {\n api: 'https://login.microsoftonline.com/',\n },\n cacheLocation: 'sessionStorage'\n};\n \nexport const authContext = new AuthenticationContext(adalConfig);\n \nexport const adalApiFetch = (fetch, url, options) =>\n adalFetch(authContext, adalConfig.endpoints.api, fetch, url, options);\n \nexport const withAdalLoginApi = withAdalLogin(authContext, adalConfig.endpoints.api);","import { runWithAdal } from 'react-adal';\nimport { authContext } from './adalConfig';\n \nconst DO_NOT_LOGIN = false;\n \nrunWithAdal(authContext, () => {\n \n // eslint-disable-next-line\n require('./indexApp.js');\n \n},DO_NOT_LOGIN);"],"sourceRoot":""}