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BAAiBgF,iBAEtBvF,KAAKO,iBAAiBuF,eAAe,iBAAW,6CAA2ClE,EAAO,CAAC,YAS3GmE,2BAA2BN,GAGzB,OAAIA,EAASO,yBAA2BP,EAASE,KACxCF,EAASE,KAGX3F,KAAKwE,qBAAqByB,YAAYR,EAASO,yBAIxDE,iBAAiBC,EAAkBC,GAEjC,OAAID,GAAaC,EAIVpG,KAAK0E,eAAewB,iBAAiBC,EAAUC,GAH7CC,2BAAoC,gEA3IpCC,GAA0B/G,sEAA1B+G,EAA0BpG,ksDFbvCX,yBAEAA,yBAEEA,qBACEA,kCAGFA,QAEAA,sBACEA,qBAAWA,+BAAmBA,QAEhCA,QAIAA,sBACEA,mBAEEA,mBACEA,uBACEA,wBAA+BA,yBAAYA,QAC3CA,wBAAWA,sDAA0CA,QACvDA,QACFA,QAEAA,sBACEA,yBAAYA,gCAASgH,mBAAgBhH,oBAAOA,QAC9CA,QAEFA,QACFA,QAGAA,8BAMAA,8BAKAA,gCA2DFA,eAvGaA,gCAG6DA,uCAkBrDA,oCAYeA,uCAMoBA,6CAKVA,0sBEjCjC+G,GAAb,KDGO,IAAME,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,QASJpH,cANOK,oBAA2C,IAAIgH,KAAyB,GAGxEhH,4BAAkD,IAAIgH,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_r16","routes","templateEmailService","permissaoAcessoService","arquivoService","ionViewWillEnter","checkAccessControl","findByFilter","canCreateAndEdit","window","href","canCreateEdit","canRemove","presentLoading","mensagem","filtro","templates","dismissLoading","delete","template","showConfirmAlert","nome","index","splice","showErrorAlert","getNomeTemplateSelecionado","tipoTemplateNaoEditavel","getNomeTipo","getFilePublicURL","fullPath","fileName","API_CONFIG","GcListarTemplatesEmailPage","ctx","GcListarTemplatesEmailPageRoutingModule","RouterModule","GcListarTemplatesEmailPageModule","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/comunicacao/gc-listar-templates-email/gc-listar-templates-email.page.html","./src/app/pages/modulo-gc/comunicacao/gc-listar-templates-email/gc-listar-templates-email-routing.module.ts","./src/app/pages/modulo-gc/comunicacao/gc-listar-templates-email/gc-listar-templates-email.page.ts","./src/app/pages/modulo-gc/comunicacao/gc-listar-templates-email/gc-listar-templates-email.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 \n \n \n\n \n TEMPLATES DE E-MAIL\n \n \n\n\n \n \n \n\n \n \n Filtro Texto\n \n \n \n \n \n Filtrar\n \n \n \n \n\n \n \n \n  {{mensagem}}\n \n \n \n =1\">\n 1\">{{templates.length}} registros retornados\n 1 registro retornado\n \n \n \n \n \n\n
\n \n
\n\n \n\n \n \n \n
\n {{getNomeTemplateSelecionado(template)}}\n
\n
\n Assunto: {{template.assunto}} \n
\n\n
\n
\n Configuração: {{template.configuracao.nome}}\n
\n
\n Definição de configuração pendente\n
\n
\n Configuração não editável\n
\n
\n\n
\n \n
\n\n
\n \n
\n
\n Criado em {{template.dataCriacao | date: \"dd/MM/yyyy HH:mm:ss\"}} por {{template.criador?.funcionario.nome}} {{template.criador?.funcionario.sobrenome}}
\n
\n
\n Última alteração em {{template.dataUltimaEdicao | date: \"dd/MM/yyyy HH:mm:ss\"}} por {{template.ultimoEditor?.funcionario.nome}} {{template.ultimoEditor?.funcionario.sobrenome}}\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 { GcListarTemplatesEmailPage } from './gc-listar-templates-email.page';\n\nconst routes: Routes = [\n {\n path: '',\n component: GcListarTemplatesEmailPage\n }\n];\n\n@NgModule({\n imports: [RouterModule.forChild(routes)],\n exports: [RouterModule],\n})\nexport class GcListarTemplatesEmailPageRoutingModule {}\n","import { TemplateEmailDTO } from '../../../../models/comunicacao/templateEmailDTO';\nimport { PermissaoAcessoService } from '../../../../services/permissao-acesso/permissao-acesso.service';\nimport { FunctionsService } from '../../../../services/common/functions.service';\nimport { TemplateEmailService } from '../../../../services/template-email/template-email.service';\nimport { Component, OnInit } from '@angular/core';\nimport { API_CONFIG } from 'src/app/config/api.config';\nimport { ArquivoService } from 'src/app/services/arquivo/arquivo.service';\n\n@Component({\n selector: 'app-gc-listar-templates-email',\n templateUrl: './gc-listar-templates-email.page.html',\n styleUrls: ['./gc-listar-templates-email.page.scss'],\n})\nexport class GcListarTemplatesEmailPage implements OnInit {\n\n filtro: string = \"\";\n \n canCreateEdit: boolean;\n canRemove: boolean; \n\n templates: TemplateEmailDTO[] = [];\n mensagem: string = '';\n\n constructor( private templateEmailService: TemplateEmailService \n , private functionsService: FunctionsService\n , private permissaoAcessoService: PermissaoAcessoService\n , private arquivoService: ArquivoService ) { \n\n \n\n }\n\n ngOnInit() {\n }\n\n \n \n\n\n ionViewWillEnter(){\n \n //verificar as permissões de acesso\n this.checkAccessControl();\n\n this.findByFilter();\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 findByFilter(){\n\n this.functionsService.presentLoading();\n\n this.mensagem = 'Aguarde...';\n \n this.templateEmailService.findByFilter(this.filtro).subscribe(\n resp=>{\n\n this.templates = resp;\n\n if(this.templates.length===0){\n this.mensagem = 'A consulta não retornou registros.'\n }else{\n this.mensagem = '';\n }\n\n this.functionsService.dismissLoading();\n\n },\n error=>{\n\n console.log(error);\n this.functionsService.dismissLoading();\n\n });\n\n }\n\n\n \n async delete(template: TemplateEmailDTO){\n \n const id = template.id;\n const confirma = await this.functionsService.showConfirmAlert( \"Confirma?\"\n , \"Confirma a exclusão do template \" + template.nome + \"?\"\n , \"Confirmar\"\n , \"Cancelar\");\n\n if(confirma){\n this.functionsService.presentLoading();\n\n this.templateEmailService.delete(id).subscribe(\n resp=>{\n\n const index = this.templates.indexOf(template);\n this.templates.splice(index,1)\n\n if(this.templates.length==0){\n this.mensagem = 'A consulta não retornou registros.';\n }\n \n this.functionsService.dismissLoading();\n },\n error=>{\n this.functionsService.dismissLoading();\n\n this.functionsService.showErrorAlert('Atenção!','Ocorreu um erro ao executar a exclusão.', error, ['Ok']);\n }\n );\n } \n\n }\n\n\n\n getNomeTemplateSelecionado(template: TemplateEmailDTO): string{\n\n \n if(!template.tipoTemplateNaoEditavel && template.nome){\n return template.nome;\n }\n\n return this.templateEmailService.getNomeTipo(template.tipoTemplateNaoEditavel);\n }\n \n\n getFilePublicURL(fullPath: string, fileName: string): string{\n \n if(!fullPath || !fileName){\n return API_CONFIG.iisVirtualDirectoryURL + 'empty_photo.jpg';\n }\n\n return this.arquivoService.getFilePublicURL(fullPath, fileName);\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 { GcListarTemplatesEmailPageRoutingModule } from './gc-listar-templates-email-routing.module';\n\nimport { GcListarTemplatesEmailPage } from './gc-listar-templates-email.page';\n\n@NgModule({\n imports: [\n CommonModule,\n FormsModule,\n IonicModule,\n GcListarTemplatesEmailPageRoutingModule,\n ComponentsModule\n ],\n declarations: [GcListarTemplatesEmailPage]\n})\nexport class GcListarTemplatesEmailPageModule {}\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":"652.566e143d7e40d16a.js"}