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CAAC,SAM7CsE,OACElG,KAAKO,iBAAiBqC,SAAS,sEA9JtBuD,GAAsB5G,gDAAtB4G,EAAsBjG,ghDFXnCX,yBAEAA,yBAEEA,sBACEA,qBAAWA,gCAAoBA,QACjCA,QAEAA,sBAEEA,mBACEA,mBAEEA,oBAEEA,uBAA+BA,4BAAeA,QAC9CA,0BAAWA,4DAO0BA,QAEvCA,QAEFA,QAEAA,oBAEEA,qBAEEA,wBAA+BA,2BAAcA,QAC7CA,0BAAWA,2DAO0BA,QAEvCA,QAEFA,QACFA,QAGAA,sBACEA,oBAEEA,yBAA4BA,gCAAS6G,WACnC7G,qCACAA,wBACFA,QACFA,QACFA,QAEAA,oBACEA,oBAEEA,wBACEA,sBAAWA,8BAAiBA,QAC9BA,QAEAA,8BAQAA,+BAmCFA,QACFA,QACFA,QAeFA,eA5HaA,gCAcQA,0CAkBAA,wCAgCWA,sEAQbA,02BE/DN4G,GAAb,KDKO,IAAME,EAAb,MAAM,sDAAOA,4DAHF,CAACC,cAAsB9B,IACtB8B,QAECD,GAAb,GEKaE,EAAb,MAAM,sDAAOA,4DATF,CACPC,KACAC,KACAC,KACAL,EACAM,QAISJ,GAAb,+DCfO,IAAMK,EAAb,MAAM,QASJjH,cANOK,oBAA2C,IAAI6G,KAAyB,GAGxE7G,4BAAkD,IAAI6G,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_r9","routes","sistemaService","SistemaDTO","ionViewWillEnter","findAll","sistemas","sort","a","b","nome","dismissLoading","save","sistema","url","presentLoading","showErrorAlert","insert","body","push","showAlert","edit","nomeSistema","setFocus","remove","index","delete","quit","GcCadastrarSistemaPage","ctx","GcCadastrarSistemaPageRoutingModule","RouterModule","GcCadastrarSistemaPageModule","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/controle-acesso/gc-cadastrar-sistema/gc-cadastrar-sistema.page.html","./src/app/pages/modulo-gc/controle-acesso/gc-cadastrar-sistema/gc-cadastrar-sistema-routing.module.ts","./src/app/pages/modulo-gc/controle-acesso/gc-cadastrar-sistema/gc-cadastrar-sistema.page.ts","./src/app/pages/modulo-gc/controle-acesso/gc-cadastrar-sistema/gc-cadastrar-sistema.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 CADASTRO DE SISTEMAS\n \n\n \n \n \n \n \n \n\n Nome do Sistema\n \n\n \n \n \n\n \n \n \n\n URL do Sistema\n \n\n \n \n \n \n\n \n \n \n \n \n Salvar Sistema  \n \n \n \n \n \n \n \n \n \n Lista de Sistemas \n \n\n \n \n \n Nenhuma Sistema\n \n \n \n\n 0\" class=\"ion-no-margin ion-no-padding\"> \n \n \n \n \n Nome\n \n \n URL\n \n \n \n \n \n\n \n \n \n \n {{sistema.nome}}\n \n\n \n {{sistema.url}}\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 { GcCadastrarSistemaPage } from './gc-cadastrar-sistema.page';\n\nconst routes: Routes = [\n {\n path: '',\n component: GcCadastrarSistemaPage\n }\n];\n\n@NgModule({\n imports: [RouterModule.forChild(routes)],\n exports: [RouterModule],\n})\nexport class GcCadastrarSistemaPageRoutingModule {}\n","import { SistemaService } from '../../../../services/sistema/sistema.service';\nimport { FunctionsService } from '../../../../services/common/functions.service';\nimport { SistemaDTO } from '../../../../models/controle-acesso/sistemaDTO';\nimport { IonInput } from '@ionic/angular';\nimport { Component, OnInit, ViewChild } from '@angular/core';\n\n@Component({\n selector: 'app-gc-cadastrar-sistema',\n templateUrl: './gc-cadastrar-sistema.page.html',\n styleUrls: ['./gc-cadastrar-sistema.page.scss'],\n})\nexport class GcCadastrarSistemaPage implements OnInit {\n\n @ViewChild('nomeSistema') nomeSistema: IonInput;\n\n sistema: SistemaDTO = new SistemaDTO();\n sistemas: SistemaDTO[] = [];\n \n\n constructor( private functionsService: FunctionsService\n , private sistemaService: SistemaService ) {\n\n \n \n }\n\n ngOnInit() {\n }\n\n\n ionViewWillEnter(){\n\n this.findAll();\n \n }\n\n \n\n findAll(){\n\n this.sistemaService.findAll().subscribe({\n next: (resp)=>{\n this.sistemas = resp;\n\n this.sistemas = this.sistemas.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: (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.sistema.nome){\n this.functionsService.showAlert('Atenção!','O nome do sistema é obrigatório', ['Ok']);\n return;\n \n }\n\n if(!this.sistema.url){\n this.functionsService.showAlert('Atenção!','A URL do sistema é obrigatória', ['Ok']);\n return;\n \n }\n\n this.functionsService.presentLoading();\n\n if(!this.sistema.id){\n \n this.sistemaService.insert(this.sistema).subscribe(\n resp=>{\n \n this.sistema = resp.body;\n this.sistemas.push(this.sistema);\n \n this.sistema = new SistemaDTO();\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 os dados do sistema.'\n , error\n , ['Ok']);\n }\n );\n\n }else{\n\n this.sistemaService.update(this.sistema).subscribe(\n resp=>{\n \n this.sistema.id = null;\n this.sistema.nome = ''; \n \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 os dados do sistema.'\n , error\n , ['Ok']);\n }\n );\n\n }\n \n\n }\n\n edit(sistema: SistemaDTO){\n this.sistema = sistema; \n this.nomeSistema.setFocus(); \n }\n\n remove(index: number){\n \n this.functionsService.presentLoading();\n\n let sistema = this.sistemas[index];\n\n this.sistemaService.delete(sistema.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 o sistema ' + this.sistema.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 { GcCadastrarSistemaPageRoutingModule } from './gc-cadastrar-sistema-routing.module';\n\nimport { GcCadastrarSistemaPage } from './gc-cadastrar-sistema.page';\n\n@NgModule({\n imports: [\n CommonModule,\n FormsModule,\n IonicModule,\n GcCadastrarSistemaPageRoutingModule,\n ComponentsModule\n ],\n declarations: [GcCadastrarSistemaPage]\n})\nexport class GcCadastrarSistemaPageModule {}\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":"1897.b863bbf4e4ded601.js"}