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J,4BAAkD,IAAI2J,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_r24","ctx_r27","ctx_r29","routes","arquivoService","route","permissaoAcessoService","ionViewDidEnter","checkAccessControl","findByFilter","canCreateAndEdit","window","href","canCreateEdit","canRemove","changeSort","sort","presentLoading","mensagem","findByPath","ENTIDADE","DIRETORIO","toPromise","arquivos","Promise","all","map","arquivo","__awaiter","isOfficeFile","nome","nomeDestino","getTime","getExtensaoArquivo","respCP","copyAndPaste","tipo","safePath","getSafeViewerPath","body","arquivosTemp","push","idArquivo","snapshot","params","idCurso","moveItemToStart","dismissLoading","ionViewDidLeave","deleteByPath","fileName","split","pop","toLowerCase","getFilePublicURL","fullPath","API_CONFIG","delete","showConfirmAlert","index","splice","showErrorAlert","view","url","isImage","test","isPDF","isUnknownFile","copyToClipboard","navigator","clipboard","writeText","showAlert","catch","ListarArquivosPage","ctx","ListarArquivosPageRoutingModule","RouterModule","ListarArquivosPageModule","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/documentacao/gc-listar-arquivos/listar-arquivos.page.html","./src/app/pages/modulo-gc/documentacao/gc-listar-arquivos/listar-arquivos-routing.module.ts","./src/app/pages/modulo-gc/documentacao/gc-listar-arquivos/listar-arquivos.page.ts","./src/app/pages/modulo-gc/documentacao/gc-listar-arquivos/listar-arquivos.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 REPOSITÓRIO DE ARQUIVOS\n \n \n\n \n \n \n \n \n \n Filtro\n \n \n \n\n \n Filtrar \n \n\n \n \n\n \n \n  {{mensagem}}\n \n \n \n =1\">\n A - Z\n Z - A\n \n \n \n \n \n \n \n \n \n \"Imagem\"/\n \n \n \n\n \n \n \n\n \n \n \n \n \n {{arquivo.nome}}
\n {{getFilePublicURL(arquivo.path,arquivo.nome)}}
\n \n
\n
\n Tamanho: {{arquivo.kiloBytes}} Kb
\n
\n
\n Criado em {{arquivo.dataGravacao | date: \"dd/MM/yyyy HH:mm:ss\"}} por {{arquivo.nomeCriador}}
\n
\n
\n Última atualização em {{arquivo.dataUltimaAtualizacao | date: \"dd/MM/yyyy HH:mm:ss\"}} por {{arquivo.nomeUltimoAtualizador}}
\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 { ListarArquivosPage } from './listar-arquivos.page';\n\nconst routes: Routes = [\n {\n path: '',\n component: ListarArquivosPage\n }\n];\n\n@NgModule({\n imports: [RouterModule.forChild(routes)],\n exports: [RouterModule],\n})\nexport class ListarArquivosPageRoutingModule {}\n","import { Component, OnInit } from '@angular/core';\nimport { ActivatedRoute } from '@angular/router';\nimport { API_CONFIG } from 'src/app/config/api.config';\nimport { DIRETORIO } from 'src/app/config/diretorio.config';\nimport { ENTIDADE } from 'src/app/config/entidade.config';\nimport { ArquivoDTO } from 'src/app/models/arquivoDTO';\nimport { ArquivoService } from 'src/app/services/arquivo/arquivo.service';\nimport { FunctionsService } from 'src/app/services/common/functions.service';\nimport { PermissaoAcessoService } from 'src/app/services/permissao-acesso/permissao-acesso.service';\n\n\n@Component({\n selector: 'app-listar-arquivos',\n templateUrl: './listar-arquivos.page.html',\n styleUrls: ['./listar-arquivos.page.scss'],\n})\nexport class ListarArquivosPage implements OnInit {\n\n canCreateEdit: boolean;\n canRemove: boolean; \n \n sort: string = 'ASC';\n arquivos: ArquivoDTO[] = [];\n filtro: string = '';\n mensagem: string = '';\n\n arquivosTemp: ArquivoDTO[] = [];\n\n constructor(\n private arquivoService: ArquivoService,\n private functionsService: FunctionsService,\n private route: ActivatedRoute,\n private permissaoAcessoService: PermissaoAcessoService,\n ) { }\n\n ngOnInit() {\n \n }\n\n ionViewDidEnter(){\n\n //verificar as permissões de acesso\n this.checkAccessControl();\n\n this.findByFilter();\n \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 changeSort(){\n if(this.sort === 'ASC'){\n this.sort = 'DESC';\n }else{\n this.sort = 'ASC';\n }\n\n this.findByFilter();\n }\n\n\n async findByFilter() {\n this.functionsService.presentLoading();\n this.mensagem = 'Aguarde...';\n\n try {\n const resp = await this.arquivoService.findByPath(ENTIDADE.REPOSITORIO, 0, DIRETORIO.REPOSITORIO_ARQUIVOS).toPromise();\n this.arquivos = resp;\n\n // 🔹 Processa cada arquivo de forma assíncrona\n await Promise.all(this.arquivos.map(async (arquivo) => {\n if (this.isOfficeFile(arquivo.nome)) {\n const nomeDestino = `${arquivo.nome}_${new Date().getTime()}.${this.getExtensaoArquivo(arquivo.nome)}`;\n\n try {\n const respCP = await this.arquivoService\n .copyAndPaste(arquivo.path, arquivo.nome, \"\", 0, arquivo.tipo, DIRETORIO.TEMP, nomeDestino)\n .toPromise();\n\n arquivo.safePath = this.arquivoService.getSafeViewerPath(respCP.body);\n this.arquivosTemp.push(respCP.body);\n } catch (error) {\n console.log('Erro ao copiar arquivo:', error);\n }\n } else {\n arquivo.safePath = this.arquivoService.getSafeViewerPath(arquivo);\n }\n }));\n\n // 🔹 Define a mensagem final após todos os arquivos serem processados\n if (this.arquivos.length === 0) {\n this.mensagem = 'A consulta não retornou registros.';\n } else if (this.arquivos.length === 1) {\n this.mensagem = '1 arquivo encontrado.';\n } else {\n this.mensagem = `${this.arquivos.length} arquivos encontrados.`;\n }\n\n // 🔹 Destaca em primeiro lugar o arquivo que está no parâmetro\n const idArquivo = this.route.snapshot.params['idCurso'];\n if (idArquivo) {\n this.functionsService.moveItemToStart(this.arquivos, idArquivo);\n }\n\n } catch (error) {\n console.log('Erro ao buscar arquivos:', error);\n } finally {\n this.functionsService.dismissLoading();\n console.log(this.arquivosTemp)\n }\n }\n\n\n ionViewDidLeave(){\n //apaga os arquiso temp\n\n for(var arquivo of this.arquivosTemp){\n console.log('del',arquivo.path,arquivo.nome)\n this.arquivoService.deleteByPath(DIRETORIO.TEMP,arquivo.nome).subscribe();\n }\n \n }\n\n getExtensaoArquivo(fileName: string): string { \n return fileName ? fileName.split('.').pop().toLowerCase() : '';\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 \n return this.arquivoService.getFilePublicURL(fullPath, fileName);\n }\n\n\n \n\n async delete(arquivo: ArquivoDTO){\n \n const id = arquivo.id;\n const confirma = await this.functionsService.showConfirmAlert( \"Confirma?\"\n , \"Confirma a exclusão do arquivo \" + arquivo.nome + \"?\"\n , \"Confirmar\"\n , \"Cancelar\");\n \n if(confirma){\n this.functionsService.presentLoading();\n \n this.arquivoService.delete(id).subscribe(\n resp=>{\n \n const index = this.arquivos.indexOf(arquivo);\n this.arquivos.splice(index,1)\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 view(arquivo: ArquivoDTO){\n \n const url = this.getFilePublicURL(arquivo.path, arquivo.nome);\n \n this.functionsService.goToPath(url, true);\n \n }\n\n\n isImage(nome: string): boolean {\n return /\\.(jpg|jpeg|png|gif)$/i.test(nome);\n }\n \n isPDF(nome: string): boolean {\n return /\\.pdf$/i.test(nome);\n }\n \n isOfficeFile(nome: string): boolean {\n return /\\.(docx|xlsx|pptx)$/i.test(nome);\n }\n \n isUnknownFile(nome: string): boolean {\n return !this.isImage(nome) && !this.isPDF(nome) && !this.isOfficeFile(nome);\n }\n\n\n copyToClipboard(url: string): void {\n navigator.clipboard.writeText(url).then(() => {\n this.functionsService.showAlert('Copiado!','URL copiada para a área de transferência!', ['Ok']);\n }).catch((error) => {\n this.functionsService.showErrorAlert('Erro!', 'Não foi possível copiar a URL.', error, ['Ok']);\n });\n }\n \n \n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormsModule } from '@angular/forms';\n\nimport { IonicModule } from '@ionic/angular';\n\nimport { ListarArquivosPageRoutingModule } from './listar-arquivos-routing.module';\n\nimport { ListarArquivosPage } from './listar-arquivos.page';\nimport { ComponentsModule } from 'src/app/components/components.module';\n\n@NgModule({\n imports: [\n CommonModule,\n FormsModule,\n IonicModule,\n ComponentsModule,\n ListarArquivosPageRoutingModule\n ],\n declarations: [ListarArquivosPage]\n})\nexport class ListarArquivosPageModule {}\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":"5868.738353e956d49624.js"}