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,iBACA,2DACAnE,EACA,CAAC,UAzB3C5B,KAAKO,iBAAiB2F,UAAU,iBAAW,wDAAgD,CAAC,OAyDhGC,KAAKC,GACHpG,KAAK4F,iBAAiB3B,GAAKmC,EAAiBnC,GAC5CjE,KAAK4F,iBAAiBH,KAAOW,EAAiBX,KAGhDY,OAAOC,GAELtG,KAAKO,iBAAiBsF,iBAItB7F,KAAK0E,wBAAwB6B,OAFLvG,KAAKqF,kBAAkBiB,GAEMrC,IAAI7C,UACvDM,IAEE1B,KAAKO,iBAAiBmF,iBAGtB1F,KAAK+E,WAEPnD,IACEC,QAAQC,IAAIF,GACZ5B,KAAKO,iBAAiBmF,iBAEtB1F,KAAKO,iBAAiBwF,eAAgB,iBACA,4DAAqD/F,KAAK4F,iBAAiBH,KAAO,IAClF7D,EACA,CAAC,SAM7C4E,OACExG,KAAKO,iBAAiBqC,SAAS,sEA5KtB6D,GAA+BlH,2DAA/BkH,EAA+BvG,iqCFX5CX,yBAEAA,yBAGEA,sBACEA,qBAAWA,gDAAiCA,QAC9CA,QAEAA,sBAEEA,2BAoBAA,2BAUAA,mBACEA,mBAEEA,uBACEA,sBAAWA,+CAA+BA,QAC5CA,QAEAA,6BAQAA,6BA4BFA,QACFA,QACFA,QAeFA,eAnGaA,gCASCA,uCAoBwBA,uCAiBNA,uFAQbA,w2BE7CNkH,GAAb,KDKO,IAAMC,EAAb,MAAM,sDAAOA,4DAHF,CAACC,cAAsBlC,IACtBkC,QAECD,GAAb,GEKaE,EAAb,MAAM,sDAAOA,4DATF,CACPC,KACAC,KACAC,KACAL,EACAM,QAISJ,GAAb,+DCfO,IAAMK,EAAb,MAAM,QASJtH,cANOK,oBAA2C,IAAIkH,KAAyB,GAGxElH,4BAAkD,IAAIkH,IAAwB,iDAN1ED,gCAAkBE,QAAlBF,EAAkB,qBAFjB,SAEDA,GAAb","names":["i0","ctx_r2","oxw","PopoverListarInscricoesComponent","constructor","popoverController","ngOnInit","find","idInscricao","this","dismiss","selectors","ctx_r3","ctx_r5","HeaderGcComponent","storageService","functionsService","inscricaoService","dataSharingService","usuarioLogado","getUsuarioLogado","location","pathname","indexOf","showNotificacaoNovosDocsEnviados","getMostRecentUpdated","source","interval","subscription","subscribe","val","unsubscribe","tipoDocumentos","findByUltimosDocsInscricaoEnviados","next","resp","inscricoesRecentementeAtualizadas","error","console","log","findByUltimosDocsMatriculaEnviados","ngOnDestroy","hideSubmenu","event","idSubmenu","element","document","getElementById","style","visibility","showSubmenu","showingSubmenu","showHideSubmenu","goToPath","path","logoff","setUsuarioLogado","openPopoverListarInscricoes","popover","create","component","componentProps","inscricoes","translucent","showBackdrop","backdropDismiss","trigger","present","onDidDismiss","then","data","idInscricaoSelecionada","i","length","id","dataUltimaVisualizacaoDocumentacaoInscricao","Date","dataUltimaVisualizacaoDocumentacaoMatricula","update","ctx_r7","ctx_r14","ctx_r17","routes","areaConhecimentoService","permissaoAcessoService","AreaConhecimentoDTO","ionViewWillEnter","checkAccessControl","findAll","canCreateAndEdit","window","href","canCreateEdit","canRemove","areasConhecimento","sort","a","b","nome","dismissLoading","save","areaConhecimento","presentLoading","body","showErrorAlert","insert","push","showAlert","edit","areaconhecimento","remove","index","delete","quit","GcCadastrarAreaConhecimentoPage","GcCadastrarAreaConhecimentoPageRoutingModule","RouterModule","GcCadastrarAreaConhecimentoPageModule","CommonModule","FormsModule","IonicModule","ComponentsModule","DataSharingService","BehaviorSubject","factory"],"sources":["./src/app/components/header-gc/components/popover-listar-inscricoes/popover-listar-inscricoes.component.html","./src/app/components/header-gc/components/popover-listar-inscricoes/popover-listar-inscricoes.component.ts","./src/app/components/header-gc/header-gc.component.html","./src/app/components/header-gc/header-gc.component.ts","./src/app/pages/modulo-gc/curso/gc-cadastrar-area-conhecimento/gc-cadastrar-area-conhecimento.page.html","./src/app/pages/modulo-gc/curso/gc-cadastrar-area-conhecimento/gc-cadastrar-area-conhecimento-routing.module.ts","./src/app/pages/modulo-gc/curso/gc-cadastrar-area-conhecimento/gc-cadastrar-area-conhecimento.page.ts","./src/app/pages/modulo-gc/curso/gc-cadastrar-area-conhecimento/gc-cadastrar-area-conhecimento.module.ts","./src/app/services/common/data-sharing.service.ts"],"sourcesContent":["
\n\n
\n \n {{inscricao.candidato.nome}} {{inscricao.candidato.sobrenome}}, inscrição {{inscricao.id}}, enviou nova documentação.\n \n
\n\n
","import { PopoverController } from '@ionic/angular';\nimport { InscricaoDTO } from '../../../../models/vestibular/inscricaoDTO';\nimport { Component, OnInit } from '@angular/core';\n\n@Component({\n selector: 'app-popover-listar-inscricoes',\n templateUrl: './popover-listar-inscricoes.component.html',\n styleUrls: ['./popover-listar-inscricoes.component.scss'],\n})\nexport class PopoverListarInscricoesComponent implements OnInit {\n\n constructor( private popoverController: PopoverController ) { }\n\n inscricoes: InscricaoDTO[];\n\n ngOnInit() {}\n\n\n find(idInscricao: number){\n\n //fecha o popover e indica o id da inscrição para disparar o método find do componente header-gc\n this.popoverController.dismiss(idInscricao);\n }\n}\n"," \n\n \n \"logo\"\n\n \n\n 0\">\n {{inscricoesRecentementeAtualizadas.length}}\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","import { DataSharingService } from './../../services/common/data-sharing.service';\nimport { PopoverListarInscricoesComponent } from './components/popover-listar-inscricoes/popover-listar-inscricoes.component';\nimport { PopoverController } from '@ionic/angular';\nimport { InscricaoDTO } from '../../models/vestibular/inscricaoDTO';\nimport { InscricaoService } from './../../services/inscricao/inscricao.service';\nimport { UsuarioDTO } from '../../models/controle-acesso/usuarioDTO';\nimport { StorageService } from './../../services/storage/storage.service';\nimport { FunctionsService } from './../../services/common/functions.service';\nimport { Component, OnInit, ViewChild } from '@angular/core';\nimport { interval, Subscription } from 'rxjs';\n\n@Component({\n selector: 'app-header-gc',\n templateUrl: './header-gc.component.html',\n styleUrls: ['./header-gc.component.scss'],\n})\nexport class HeaderGcComponent implements OnInit {\n\n \n\n showingSubmenu = '';\n menuGCItems = [];\n usuarioLogado: UsuarioDTO = null;\n\n showNotificacaoNovosDocsEnviados: boolean = false;\n inscricoesRecentementeAtualizadas: InscricaoDTO[] = [];\n\n subscription: Subscription;\n\n constructor( private storageService : StorageService\n , private functionsService: FunctionsService\n , private inscricaoService: InscricaoService\n , private popoverController: PopoverController\n , private dataSharingService: DataSharingService ) { \n\n this.usuarioLogado = this.storageService.getUsuarioLogado(); \n \n if(location.pathname.indexOf('modulo-gc/gc-analisar-documentacao-inscricao')>-1){\n this.showNotificacaoNovosDocsEnviados = true;\n \n this.getMostRecentUpdated('inscrição');\n\n //repetir a consulta de inscrições recentemente atualizadas a cada 60 segundos\n const source = interval(60000);\n this.subscription = source.subscribe(val => this.getMostRecentUpdated('inscrição'));\n\n }else if(location.pathname.indexOf('modulo-gc/gc-analisar-documentacao-matricula')>-1){\n \n this.showNotificacaoNovosDocsEnviados = true;\n this.getMostRecentUpdated('matrícula');\n\n //repetir a consulta de inscrições recentemente atualizadas a cada 60 segundos\n const source = interval(60000);\n this.subscription = source.subscribe(val => this.getMostRecentUpdated('matrícula'));\n }else {\n // Cancelar a execução de this.getMostRecentUpdated\n this.showNotificacaoNovosDocsEnviados = false;\n if (this.subscription) {\n this.subscription.unsubscribe();\n }\n }\n }\n\n getMostRecentUpdated(tipoDocumentos: string){\n\n if(tipoDocumentos=='inscrição'){\n this.inscricaoService.findByUltimosDocsInscricaoEnviados().subscribe({\n next:(resp)=>{\n this.inscricoesRecentementeAtualizadas = resp;\n \n },\n error:(error)=>{\n console.log(error);\n }\n });\n \n }else if(tipoDocumentos == 'matrícula'){\n\n this.inscricaoService.findByUltimosDocsMatriculaEnviados().subscribe({\n next:(resp)=>{\n this.inscricoesRecentementeAtualizadas = resp;\n \n },\n error:(error)=>{\n console.log(error);\n }\n });\n\n }\n \n\n }\n\n ngOnInit() {\n \n }\n\n ngOnDestroy() {\n \n //mata a repetição das consultas de atualização da tela\n if(this.subscription){\n this.subscription.unsubscribe();\n }\n \n }\n\n /**\n * método disparado pelo evento mouseout \n */\n hideSubmenu(event, idSubmenu: string) { \n \n let element = document.getElementById(idSubmenu);\n //this.showingSubmenu = idSubmenu; \n if(element){\n element.style.visibility = 'hidden';\n }\n \n \n }\n\n /**\n * método disparado pelo evento mouseenter \n */\n showSubmenu(idSubmenu: string){\n \n this.showingSubmenu = idSubmenu;\n\n let element = document.getElementById(idSubmenu);\n \n if(element){\n element.style.visibility = 'visible';\n }\n \n\n }\n\n\n /*\n método usado para tablets, disparado através do click no menu, pois em tablet não tem cursor do mouse\n */\n showHideSubmenu(idSubmenu: string){\n \n this.showingSubmenu = idSubmenu;\n\n let element = document.getElementById(idSubmenu);\n \n if(element){\n\n if(element.style.visibility === 'visible'){\n element.style.visibility = 'hidden';\n }else{\n element.style.visibility = 'visible';\n }\n }\n \n }\n\n\n \n goToPath(path:string){\n\n if(path){\n this.functionsService.goToPath(path);\n }\n }\n \n\n logoff(){\n this.storageService.setUsuarioLogado(null);\n this.functionsService.goToPath('modulo-gc/gc-login');\n\n }\n\n\n async openPopoverListarInscricoes(event) {\n \n let tipoDocumentos = 'inscrição';\n if(location.pathname.indexOf('modulo-gc/gc-analisar-documentacao-matricula')>-1){\n tipoDocumentos = 'matrícula'\n }\n const popover = await this.popoverController.create({\n component: PopoverListarInscricoesComponent,\n componentProps: { 'inscricoes': this.inscricoesRecentementeAtualizadas\n , 'tipoDocumentos': tipoDocumentos},\n translucent: false,\n showBackdrop: true,\n backdropDismiss: true,\n event: event,\n trigger: event,\n //cssClass: 'popover-listar-inscricoes', //definido no global.css \n \n });\n\n await popover.present();\n \n //quando fechar o popover\n await popover.onDidDismiss().then((data)=>{\n\n //se tiver selecionado uma inscrição o campo data.data estará preenchido do contrário será null\n if(data && data.data){\n\n //informa ao serviço de notificação/compartilhamento de dados entre componentes o id da inscrição selecionada\n //este id será utilizado para preencher a tela de análise de docs com a inscrição selecionada\n this.dataSharingService.idInscricaoSelecionada.next( data.data ); \n\n //atualiza a inscrição selecionada para ela sair da lista\n for(var i=0; i{\n\n //atualizar o contador no ícone de notificações\n this.getMostRecentUpdated(tipoDocumentos);\n\n },\n error:(error)=>{\n console.log(error);\n }\n });\n\n }\n }\n \n }\n \n });\n \n }\n}\n","\n\n\n\n \n \n CADASTRO DE ÁREAS DE CONHECIMENTO\n \n\n \n \n \n \n \n \n\n Nome da Área de Conhecimento\n \n\n \n \n \n \n\n \n \n \n \n Salvar Área Conhecimento  \n \n \n \n \n \n \n \n \n \n Lista de ÁREAS DE CONHECIMENTOS \n \n\n \n \n \n Nenhuma Área de Conhecimento\n \n \n \n\n 0\" class=\"ion-no-margin ion-no-padding\"> \n \n \n \n \n Nome\n \n \n \n \n \n\n \n \n \n \n {{areaConhecimento.nome}}\n \n \n \n \n \n \n \n\n \n \n \n \n \n \n\n\n \n \n \n\n","import { NgModule } from '@angular/core';\nimport { Routes, RouterModule } from '@angular/router';\n\nimport { GcCadastrarAreaConhecimentoPage } from './gc-cadastrar-area-conhecimento.page';\n\nconst routes: Routes = [\n {\n path: '',\n component: GcCadastrarAreaConhecimentoPage\n }\n];\n\n@NgModule({\n imports: [RouterModule.forChild(routes)],\n exports: [RouterModule],\n})\nexport class GcCadastrarAreaConhecimentoPageRoutingModule {}\n","import { PermissaoAcessoService } from '../../../../services/permissao-acesso/permissao-acesso.service';\nimport { AreaConhecimentoService } from '../../../../services/area-conhecimento/area-conhecimento.service';\nimport { FunctionsService } from '../../../../services/common/functions.service';\nimport { AreaConhecimentoDTO } from '../../../../models/curso/areaConhecimentoDTO';\nimport { Component, OnInit } from '@angular/core';\n\n@Component({\n selector: 'app-gc-cadastrar-area-conhecimento',\n templateUrl: './gc-cadastrar-area-conhecimento.page.html',\n styleUrls: ['./gc-cadastrar-area-conhecimento.page.scss'],\n})\nexport class GcCadastrarAreaConhecimentoPage implements OnInit {\n\n canCreateEdit: boolean;\n canRemove: boolean; \n\n areaConhecimento: AreaConhecimentoDTO = new AreaConhecimentoDTO();\n areasConhecimento: AreaConhecimentoDTO[] = [];\n\n constructor( private functionsService: FunctionsService\n , private areaConhecimentoService: AreaConhecimentoService\n , private permissaoAcessoService: PermissaoAcessoService ) { }\n\n ngOnInit() {\n }\n\n\n ionViewWillEnter(){\n\n //verificar as permissões de acesso\n this.checkAccessControl();\n\n this.findAll();\n }\n\n\n checkAccessControl(){\n\n this.permissaoAcessoService.canCreateAndEdit(window.location.href).subscribe({\n next:(resp)=>{\n this.canCreateEdit = resp;\n },\n error:(error)=>{\n this.canCreateEdit = false;\n }\n });\n\n this.permissaoAcessoService.canRemove(window.location.href).subscribe({\n next:(resp)=>{\n this.canRemove = resp;\n },\n error:(error)=>{\n this.canRemove = false;\n }\n });\n\n\n }\n \n\n findAll(){\n\n this.areaConhecimentoService.findAll().subscribe(\n resp=>{\n this.areasConhecimento = resp;\n\n this.areasConhecimento = this.areasConhecimento.sort(function (a, b) {\n if (a.nome > b.nome) {\n return 1;\n }\n if (a.nome < b.nome) {\n return -1;\n } \n });\n \n this.functionsService.dismissLoading();\n },\n error=>{\n \n console.log(error);\n this.functionsService.dismissLoading();\n \n }\n ); \n\n }\n\n \n\n\n save(){\n \n if(!this.areaConhecimento.nome){\n this.functionsService.showAlert('Atenção!','O nome da área de conhecimento é obrigatório', ['Ok']);\n return;\n \n }\n\n this.functionsService.presentLoading();\n\n if(!this.areaConhecimento.id){\n\n this.areaConhecimentoService.insert(this.areaConhecimento).subscribe(\n resp=>{\n \n this.areaConhecimento = resp.body;\n this.areasConhecimento.push(this.areaConhecimento);\n this.areaConhecimento = new AreaConhecimentoDTO();\n \n this.functionsService.dismissLoading();\n },\n error=>{\n \n this.functionsService.dismissLoading();\n\n this.functionsService.showErrorAlert( 'Atenção!'\n , 'Não foi possível salvar a área de conhecimento.'\n , error\n , ['Ok']);\n }\n );\n\n }else{\n\n this.areaConhecimentoService.update(this.areaConhecimento).subscribe(\n resp=>{\n \n this.areaConhecimento = resp.body;\n this.areaConhecimento = new AreaConhecimentoDTO();\n this.functionsService.dismissLoading();\n\n this.findAll();\n \n },\n error=>{\n \n this.functionsService.dismissLoading();\n\n this.functionsService.showErrorAlert( 'Atenção!'\n , 'Não foi possível salvar a área de conhecimento.'\n , error\n , ['Ok']);\n }\n );\n\n }\n \n\n }\n\n edit(areaconhecimento: AreaConhecimentoDTO){\n this.areaConhecimento.id = areaconhecimento.id;\n this.areaConhecimento.nome = areaconhecimento.nome; \n }\n\n remove(index: number){\n \n this.functionsService.presentLoading();\n\n let areaconhecimento = this.areasConhecimento[index];\n\n this.areaConhecimentoService.delete(areaconhecimento.id).subscribe(\n resp=>{\n\n this.functionsService.dismissLoading();\n\n //atualiza a lista de popups \n this.findAll();\n },\n error=>{\n console.log(error);\n this.functionsService.dismissLoading();\n\n this.functionsService.showErrorAlert( 'Atenção!'\n , 'Não foi possível excluir a área de conhecimento ' + this.areaConhecimento.nome + '.'\n , error\n , ['Ok']);\n }\n );\n }\n\n\n quit(){\n this.functionsService.goToPath('modulo-gc/gc-funcoes');\n }\n\n}\n","import { ComponentsModule } from '../../../../components/components.module';\nimport { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormsModule } from '@angular/forms';\n\nimport { IonicModule } from '@ionic/angular';\n\nimport { GcCadastrarAreaConhecimentoPageRoutingModule } from './gc-cadastrar-area-conhecimento-routing.module';\n\nimport { GcCadastrarAreaConhecimentoPage } from './gc-cadastrar-area-conhecimento.page';\n\n@NgModule({\n imports: [\n CommonModule,\n FormsModule,\n IonicModule,\n GcCadastrarAreaConhecimentoPageRoutingModule,\n ComponentsModule\n ],\n declarations: [GcCadastrarAreaConhecimentoPage]\n})\nexport class GcCadastrarAreaConhecimentoPageModule {}\n","import { Injectable } from '@angular/core';\nimport { BehaviorSubject } from 'rxjs';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class DataSharingService {\n\n //serviço usado para emitir a mensagem para outros componentes que precisem saber quando o usuário está logado ou não\n public isUserLoggedIn: BehaviorSubject = new BehaviorSubject(false);\n \n //serviço usado para emitir a mensagem do header para a página gc-analisar-documentacao\n public idInscricaoSelecionada: BehaviorSubject = new BehaviorSubject(0);\n \n \n constructor() { }\n\n}\n"],"sourceRoot":"webpack:///","file":"3330.49ee55f447e41fb8.js"}