Files
doneit-web/_platforms/browser/www/2344-es2015.38811b0d16ba5fb48b73.js
T
tiago.kayaya 24e2a8f518 save
2021-08-18 18:58:02 +01:00

1 line
32 KiB
JavaScript

(self.webpackChunkgabinete_digital=self.webpackChunkgabinete_digital||[]).push([[2344],{42344:function(t,e,o){"use strict";o.r(e),o.d(e,{ExpedientePrPageModule:function(){return B}});var n=o(38583),i=o(3679),s=o(35957),a=o(39895),c=o(64762),r=o(75008),d=o(45896),l=o(32379),p=o(83189),g=o(320),u=o(11513),h=o(4528),m=o(37716),f=o(28621),v=o(53760),Z=o(80106),b=o(37556),x=o(84465),k=o(20985),C=o(962);function w(t,e){if(1&t&&(m.TgZ(0,"div"),m.TgZ(1,"p"),m._uU(2),m.qZA(),m.qZA()),2&t){const t=e.$implicit;m.xp6(2),m.Oqu(t.Name)}}function M(t,e){if(1&t&&(m.TgZ(0,"div"),m.TgZ(1,"h5"),m._uU(2,"Com conhecimento"),m.qZA(),m.TgZ(3,"ion-item",26),m.TgZ(4,"ion-label"),m.YNc(5,w,3,1,"div",27),m.qZA(),m.qZA(),m.qZA()),2&t){const t=m.oxw(2);m.xp6(5),m.Q6J("ngForOf",t.cc)}}function P(t,e){if(1&t&&(m.TgZ(0,"div"),m.TgZ(1,"h5"),m._uU(2,"Detalhes"),m.qZA(),m.TgZ(3,"ion-item",26),m._UZ(4,"p",28),m.qZA(),m.qZA()),2&t){const t=m.oxw(2);m.xp6(4),m.Q6J("innerHTML",t.fulltask.workflowInstanceDataFields.TaskMessage,m.oJD)}}function A(t,e){if(1&t){const t=m.EpF();m.TgZ(0,"ion-item",29),m.TgZ(1,"ion-label",30),m.NdJ("click",function(){const e=m.CHM(t).$implicit;return m.oxw(2).viewDocument(e.DocId)}),m.TgZ(2,"p",31),m._uU(3),m.TgZ(4,"span",32),m._UZ(5,"ion-icon",33),m.qZA(),m.qZA(),m.TgZ(6,"p"),m.TgZ(7,"span",34),m._uU(8),m.qZA(),m.TgZ(9,"span",35),m._uU(10),m.ALo(11,"date"),m.qZA(),m.qZA(),m.qZA(),m.qZA()}if(2&t){const t=e.$implicit;m.xp6(3),m.Oqu(t.Assunto),m.xp6(5),m.Oqu(t.Sender),m.xp6(2),m.Oqu(m.xi3(11,3,t.DocDate,"dd/MM/yyyy HH:mm"))}}function _(t,e){if(1&t&&(m.TgZ(0,"p"),m._uU(1),m.ALo(2,"date"),m.ALo(3,"date"),m.qZA()),2&t){const t=m.oxw().$implicit;m.xp6(1),m.lnq("",m.xi3(2,3,t.StartDate,"d/M/yy")," - ",m.xi3(3,6,t.EndDate,"dd/mm/yy")," | ",t.Location,"")}}function T(t,e){if(1&t&&(m.TgZ(0,"p"),m._uU(1),m.ALo(2,"date"),m.qZA()),2&t){const t=m.oxw().$implicit;m.xp6(1),m.AsE("",m.xi3(2,2,t.StartDate,"d/M/yy")," | ",t.Location,"")}}function y(t,e){if(1&t){const t=m.EpF();m.TgZ(0,"ion-item",38),m.NdJ("click",function(){const e=m.CHM(t).$implicit;return m.oxw(4).viewEventDetail(e.EventId)}),m.TgZ(1,"div"),m.TgZ(2,"div",39),m.TgZ(3,"p"),m._uU(4),m.ALo(5,"date"),m.qZA(),m.TgZ(6,"p"),m._uU(7),m.ALo(8,"date"),m.qZA(),m.qZA(),m.TgZ(9,"div",40),m.YNc(10,_,4,9,"p",23),m.YNc(11,T,3,5,"p",23),m.TgZ(12,"h3"),m._uU(13),m.qZA(),m.qZA(),m.qZA(),m.qZA()}if(2&t){const t=e.$implicit,o=m.oxw(4);m.xp6(1),m.MT6("content-",o.profile,"-",t.CalendarName," width-100 "),m.xp6(3),m.Oqu(m.xi3(5,9,t.StartDate,"HH:mm")),m.xp6(3),m.Oqu(m.xi3(8,12,t.EndDate,"HH:mm")),m.xp6(3),m.Q6J("ngIf",t.StartDate!=t.EndDate),m.xp6(1),m.Q6J("ngIf",t.StartDate==t.EndDate),m.xp6(2),m.Oqu(t.Subject)}}function q(t,e){if(1&t&&(m.TgZ(0,"div"),m.TgZ(1,"ion-item-sliding"),m.YNc(2,y,14,15,"ion-item",37),m.qZA(),m.qZA()),2&t){const t=m.oxw(3);m.xp6(2),m.Q6J("ngForOf",t.eventsList)}}function O(t,e){if(1&t&&(m.TgZ(0,"div"),m.TgZ(1,"h3",36),m._uU(2,"Eventos Associados"),m.qZA(),m.TgZ(3,"ion-list"),m.YNc(4,q,3,1,"div",23),m.qZA(),m.qZA()),2&t){const t=m.oxw(2);m.xp6(4),m.Q6J("ngIf",t.eventsList)}}function D(t,e){if(1&t){const t=m.EpF();m.TgZ(0,"div",6),m.TgZ(1,"div",7),m.TgZ(2,"div",8),m.TgZ(3,"div",9),m.NdJ("click",function(){return m.CHM(t),m.oxw().goBack()}),m._UZ(4,"ion-icon",10),m.qZA(),m.TgZ(5,"div",11),m.TgZ(6,"ion-label",12),m._uU(7),m.qZA(),m.qZA(),m.TgZ(8,"div",13),m.TgZ(9,"button",14),m.NdJ("click",function(){return m.CHM(t),m.oxw().openOptions()}),m._UZ(10,"ion-icon",15),m.qZA(),m.qZA(),m.qZA(),m.qZA(),m.TgZ(11,"div",16),m.TgZ(12,"div",17),m.TgZ(13,"ion-label"),m.TgZ(14,"p"),m.TgZ(15,"span",18),m._uU(16),m.qZA(),m.TgZ(17,"span",19),m._uU(18),m.qZA(),m.qZA(),m.qZA(),m.qZA(),m.qZA(),m._UZ(19,"div",20),m.TgZ(20,"div",21),m.TgZ(21,"div",22),m.YNc(22,M,6,1,"div",23),m.YNc(23,P,5,1,"div",23),m.qZA(),m.TgZ(24,"div",24),m.TgZ(25,"ion-list"),m.TgZ(26,"h5"),m._uU(27,"Documentos Anexados"),m.qZA(),m.YNc(28,A,12,6,"ion-item",25),m.qZA(),m.qZA(),m.YNc(29,O,5,1,"div",23),m.qZA(),m.qZA()}if(2&t){const t=m.oxw();m.xp6(7),m.Oqu(t.task.Folio),m.xp6(9),m.Oqu(t.customDate),m.xp6(2),m.Oqu(t.task.activityInstanceName),m.xp6(4),m.Q6J("ngIf",t.cc.length>0),m.xp6(1),m.Q6J("ngIf",t.fulltask.workflowInstanceDataFields.TaskMessage),m.xp6(5),m.Q6J("ngForOf",t.fulltask.Documents),m.xp6(1),m.Q6J("ngIf",t.eventsList)}}function S(t,e){if(1&t){const t=m.EpF();m.TgZ(0,"button",44),m.NdJ("click",function(){return m.CHM(t),m.oxw(3).sendExpedienteToPending()}),m._uU(1,"Enviar para Pendentes"),m.qZA()}}function N(t,e){if(1&t){const t=m.EpF();m.TgZ(0,"div",43),m.TgZ(1,"button",44),m.NdJ("click",function(){return m.CHM(t),m.oxw(2).openAddNoteModal("Aprovar")}),m._uU(2,"Aprovar"),m.qZA(),m.TgZ(3,"button",44),m.NdJ("click",function(){return m.CHM(t),m.oxw(2).openAddNoteModal("Revis\xe3o")}),m._uU(4,"Mandar para Revis\xe3o"),m.qZA(),m._UZ(5,"div",45),m.TgZ(6,"button",44),m.NdJ("click",function(){return m.CHM(t),m.oxw(2).distartExpedientModal("descartar")}),m._uU(7,"Descartar"),m.qZA(),m._UZ(8,"div",46),m.TgZ(9,"button",47),m._uU(10,"Delegar"),m.qZA(),m.YNc(11,S,2,0,"button",48),m.TgZ(12,"button",44),m.NdJ("click",function(){return m.CHM(t),m.oxw(2).attachDocument()}),m._uU(13,"Anexar Documento "),m._UZ(14,"br"),m._uU(15,"(Gest\xe3o Documental)"),m.qZA(),m.qZA()}if(2&t){const t=m.oxw(2);m.xp6(11),m.Q6J("ngIf","Pending"!=t.task.Status)}}function I(t,e){if(1&t){const t=m.EpF();m.TgZ(0,"button",44),m.NdJ("click",function(){return m.CHM(t),m.oxw(3).sendExpedienteToPending()}),m._uU(1,"Enviar para Pendentes"),m.qZA()}}function U(t,e){if(1&t){const t=m.EpF();m.TgZ(0,"div",43),m.TgZ(1,"button",49),m.NdJ("click",function(){m.CHM(t);const e=m.oxw(2);return e.openExpedientActionsModal("0",e.fulltask)}),m._uU(2,"Efetuar Despacho"),m.qZA(),m.TgZ(3,"button",44),m.NdJ("click",function(){return m.CHM(t),m.oxw(2).distartExpedientModal("descartar")}),m._uU(4,"Descartar"),m.qZA(),m._UZ(5,"div",45),m.TgZ(6,"button",44),m.NdJ("click",function(){m.CHM(t);const e=m.oxw(2);return e.openExpedientActionsModal("1",e.fulltask)}),m._uU(7,"Solicitar Parecer"),m.qZA(),m.TgZ(8,"button",44),m.NdJ("click",function(){m.CHM(t);const e=m.oxw(2);return e.openBookMeetingModal(e.task)}),m._uU(9,"Marcar Reuni\xe3o"),m.qZA(),m.YNc(10,I,2,0,"button",48),m._UZ(11,"div",46),m.TgZ(12,"button",47),m._uU(13,"Delegar"),m.qZA(),m.qZA()}if(2&t){const t=m.oxw(2);m.xp6(10),m.Q6J("ngIf","Pending"!=t.task.Status)}}function F(t,e){if(1&t&&(m.TgZ(0,"div",41),m.YNc(1,N,16,1,"div",42),m.YNc(2,U,14,1,"div",42),m.qZA()),2&t){const t=m.oxw();m.xp6(1),m.Q6J("ngIf","MDGPR"==t.loggeduser.Profile),m.xp6(1),m.Q6J("ngIf","PR"==t.loggeduser.Profile)}}function J(t,e){1&t&&(m.TgZ(0,"div",50),m.TgZ(1,"ion-list"),m.TgZ(2,"ion-list-header"),m.TgZ(3,"ion-label"),m._UZ(4,"ion-skeleton-text",51),m.qZA(),m.qZA(),m.TgZ(5,"ion-item"),m.TgZ(6,"ion-label"),m.TgZ(7,"h3"),m._UZ(8,"ion-skeleton-text",51),m.qZA(),m.TgZ(9,"p"),m._UZ(10,"ion-skeleton-text",52),m.qZA(),m.qZA(),m.qZA(),m.TgZ(11,"ion-item"),m.TgZ(12,"ion-label"),m.TgZ(13,"h3"),m._UZ(14,"ion-skeleton-text",51),m.qZA(),m.TgZ(15,"p"),m._UZ(16,"ion-skeleton-text",52),m.qZA(),m.qZA(),m.qZA(),m.TgZ(17,"ion-item"),m.TgZ(18,"ion-label"),m.TgZ(19,"h3"),m._UZ(20,"ion-skeleton-text",51),m.qZA(),m.TgZ(21,"p"),m._UZ(22,"ion-skeleton-text",52),m.qZA(),m.qZA(),m.qZA(),m.qZA(),m.qZA())}const E=[{path:"",component:(()=>{class t{constructor(t,e,o,n,i,s,a,c,r,d,l,p){this.processes=t,this.iab=e,this.events=o,this.menu=n,this.modalController=i,this.popoverController=s,this.activatedRoute=a,this.userAuth=c,this.animationController=r,this.toastService=d,this.attachmentsService=l,this.location=p,this.months=["Janeiro","Fevereiro","Mar\xe7o","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"],this.days=["Domingo","Segunda-feira","Ter\xe7a-feira","Quarta-feira","Quinta-feira","Sexta-feira","S\xe1bado"],this.cc=[],this.documents=[],this.loggeduser=c.ValidatedUser,this.activatedRoute.paramMap.subscribe(t=>{t.params.SerialNumber&&(this.serialnumber=t.params.SerialNumber),t.params.caller&&(this.caller=t.params.caller)})}ngOnInit(){this.profile="mdgpr",this.activatedRoute.paramMap.subscribe(t=>{t.has("SerialNumber")&&this.LoadTaskDetail(this.serialnumber)})}toDateString(t){return new Date(t).toDateString()}close(){this.modalController.dismiss()}goBack(){this.location.back()}sendExpedienteToPending(){this.processes.SetTaskToPending(this.serialnumber).subscribe(t=>{console.log(t),this.toastService.successMessage("Processo enviado para pendentes"),this.goBack()},t=>{this.toastService.badRequest("Processo n\xe3o enviado para pendentes")})}LoadTaskDetail(t){return(0,c.mG)(this,void 0,void 0,function*(){this.processes.GetTask(t).subscribe(t=>{let e=new Date(t.taskStartDate);e.setMonth(e.getMonth()+1);let o=e.getFullYear()+"-"+e.getMonth()+"-"+e.getDate()+" "+e.getHours()+":"+e.getMinutes()+":"+e.getSeconds();this.task={SerialNumber:t.serialNumber,Folio:t.workflowInstanceDataFields.Subject,Senders:t.originator.email,CreateDate:o,DocumentURL:t.workflowInstanceDataFields.ViewerRequest,Remetente:t.workflowInstanceDataFields.Sender,Note:t.workflowInstanceDataFields.TaskMessage||t.workflowInstanceDataFields.Note,FolderId:t.workflowInstanceDataFields.FolderID,FsId:t.workflowInstanceDataFields.FsId,DocId:t.workflowInstanceDataFields.DocId||t.workflowInstanceDataFields.DocID,WorkflowName:t.workflowDisplayName,activityInstanceName:t.activityInstanceName,Status:t.workflowInstanceDataFields.Status},this.fulltask=t;let n=new Date(this.task.CreateDate);this.customDate=this.days[n.getDay()]+", "+n.getDate()+" de "+this.months[n.getMonth()],this.processes.GetTaskParticipants(this.task.FolderId).subscribe(t=>{this.intervenientes=t.filter(t=>"I"==t.Type),this.cc=t.filter(t=>"CC"==t.Type)})},t=>{try{this.toastService.badRequest("Processo n\xe3o encontrado"),this.goBack()}catch(e){window.history.back()}finally{this.toastService.badRequest(0==t.status?"N\xe3o \xe9 poss\xedvel visualizar este processo no modo offline":"Processo n\xe3o encontrado")}})})}viewDocument(t){this.processes.GetDocumentUrl(t,this.task.FsId).subscribe(t=>{console.log(t);const e=t.replace("webTRIX.Viewer","webTRIX.Viewer.Branch1");this.iab.create(e,"_blank").show()})}attachDocument(){this.getDoc()}getDoc(){return(0,c.mG)(this,void 0,void 0,function*(){const t=yield this.modalController.create({component:h.Z,cssClass:"modal-width-100-width-background modal",componentProps:{type:"AccoesPresidenciais & ArquivoDespachoElect",showSearchInput:!0,select:!0}});yield t.present(),t.onDidDismiss().then(t=>{t&&(console.log(t),this.documents.push(t.data.selected),console.log("RES"+this.documents))})})}removeAttachment(t){this.documents=this.documents.filter((e,o)=>t!=o)}openMenu(){this.menu.open(),this.modalController.dismiss()}approve(t,e){return(0,c.mG)(this,void 0,void 0,function*(){let o={serialNumber:this.serialnumber,action:"Aprovar",ActionTypeId:100000004,dataFields:{ReviewUserComment:t},AttachmentList:e};console.log(o);const n=this.toastService.loading();try{yield this.processes.CompleteTask(o).toPromise(),this.close(),this.toastService.successMessage("Processo aprovado")}catch(i){this.toastService.badRequest("Processo n\xe3o aprovado")}finally{n.remove()}})}sendToReview(t,e){return(0,c.mG)(this,void 0,void 0,function*(){let o={serialNumber:this.serialnumber,action:"Retificar",ActionTypeId:99999877,dataFields:{ReviewUserComment:t},AttachmentList:e};const n=this.toastService.loading();try{yield this.processes.CompleteTask(o).toPromise(),this.close(),this.toastService.successMessage()}catch(i){this.toastService.badRequest()}finally{n.remove()}})}openAddNoteModal(t){return(0,c.mG)(this,void 0,void 0,function*(){let e;e=window.innerWidth<801?"modal modal-desktop":"add-note-modal";const o=yield this.modalController.create({component:g.C,componentProps:{showAttachmentBtn:!1},cssClass:e});yield o.present(),o.onDidDismiss().then(e=>{if(console.log(e),e.data){let o={ProcessInstanceID:"",Attachments:e.data.documents.map(t=>({ApplicationId:t.ApplicationType,SourceId:t.Id}))};"Aprovar"==t?this.approve(e.data.note,o):"Revis\xe3o"==t&&this.sendToReview(e.data.note,o),this.goBack()}})})}openExpedientActionsModal(t,e){return(0,c.mG)(this,void 0,void 0,function*(){let o;o=window.innerWidth<=800?"modal modal-desktop":"modal modal-desktop showAsideOptions";const n=yield this.modalController.create({component:l.F,componentProps:{taskAction:t,task:e,profile:this.profile},cssClass:o});yield n.present(),n.onDidDismiss().then(t=>(0,c.mG)(this,void 0,void 0,function*(){let e=t.data;if(t.data){const t=this.toastService.loading();try{yield this.processes.CompleteTask(e).toPromise(),this.goBack()}catch(o){}finally{t.remove()}}else this.close()}))})}distartExpedientModal(t){return(0,c.mG)(this,void 0,void 0,function*(){const e=yield this.modalController.create({component:d.Q,componentProps:{},cssClass:"discart-expedient-modal",backdropDismiss:!1});yield e.present(),e.onDidDismiss().then(e=>(0,c.mG)(this,void 0,void 0,function*(){if(console.log(e.data),"descartar"==t){if("Yes"==e.data){let t={serialNumber:this.task.SerialNumber,action:"Passivo",ActionTypeId:99999877,dataFields:{Note:""}};const e=this.toastService.loading();try{yield this.processes.CompleteTask(t).toPromise(),this.toastService.successMessage("Processo descartado"),this.goBack()}catch(o){this.toastService.badRequest("Processo n\xe3o descartado")}finally{e.remove()}}}else if("Yes"==e.data){const e=this.toastService.loading();try{yield this.processes.CompleteTask(t).toPromise(),this.goBack()}catch(o){}finally{e.remove()}this.goBack()}else if("No"==e.data){console.log("Update");const t=this.toastService.loading();try{yield this.processes.UpdateTaskStatus(this.task.FolderId).toPromise(),this.toastService.successMessage(),this.goBack()}catch(o){this.toastService.badRequest()}finally{t.remove()}}}))})}distartExpedientModal2(t){return(0,c.mG)(this,void 0,void 0,function*(){const e=yield this.modalController.create({component:d.Q,componentProps:{serialNumber:t.serialNumber,folderId:t.workflowInstanceDataFields.FolderID,action:"discart"},cssClass:"discart-expedient-modal",backdropDismiss:!1});yield e.present(),e.onDidDismiss()})}openBookMeetingModal(t){return(0,c.mG)(this,void 0,void 0,function*(){let t;t=window.innerWidth<=800?"book-meeting-modal modal modal-desktop":"modal modal-desktop showAsideOptions";const e=yield this.modalController.create({component:p.k,componentProps:{task:this.task},cssClass:t,backdropDismiss:!1});yield e.present(),e.onDidDismiss()})}viewEventDetail(t){return(0,c.mG)(this,void 0,void 0,function*(){console.log(this.profile);const e=yield this.modalController.create({component:r.u,componentProps:{eventId:t,profile:this.profile},cssClass:"modal modal-desktop",backdropDismiss:!1});yield e.present(),e.onDidDismiss().then(t=>{})})}openOptions(t){return(0,c.mG)(this,void 0,void 0,function*(){const e=yield this.popoverController.create({component:u.S,cssClass:"exp-options",componentProps:{task:this.task,fulltask:this.fulltask,taskAction:t},translucent:!0});return yield e.present()})}}return t.\u0275fac=function(e){return new(e||t)(m.Y36(f.$),m.Y36(v.i),m.Y36(Z.n),m.Y36(s._q),m.Y36(s.IN),m.Y36(s.Dh),m.Y36(a.gz),m.Y36(b.e),m.Y36(s.vB),m.Y36(x.k),m.Y36(k.o),m.Y36(n.Ye))},t.\u0275cmp=m.Xpm({type:t,selectors:[["app-expediente-pr"]],decls:9,vars:3,consts:[[1,"ion-no-border"],["id","main-content",1,"ion-page","d-none"],[1,"main-content","d-flex","height-100"],["class","content d-flex flex-column",4,"ngIf"],["class","aside-right flex-column height-100",4,"ngIf"],["class","width-100",4,"ngIf"],[1,"content","d-flex","flex-column"],[1,"main-header",2,"overflow","unset !important"],[1,"title-content","width-100","d-flex","justify-between"],["defaultHref","#",1,"font-30","cursor-pointer",3,"click"],["slot","end","src","assets/images/icons-arrow-arrow-left.svg"],[1,"middle","flex-grow-1"],[1,"title"],[1,"menu-ptions"],[1,"btn-no-color",3,"click"],["src","assets/images/icons-menu.svg"],[1,"upper-content",2,"overflow","unset !important"],[1,"content-details"],[1,"date"],[1,"label"],[1,"line"],[1,"overflow-y-auto"],[1,"middle-content"],[4,"ngIf"],[1,"bottom-content","width-100"],["class","ion-no-margin ion-no-padding cursor-pointer",4,"ngFor","ngForOf"],[1,"ion-no-margin","ion-no-padding"],[4,"ngFor","ngForOf"],[3,"innerHTML"],[1,"ion-no-margin","ion-no-padding","cursor-pointer"],[1,"d-block",3,"click"],[1,"attach-title-item"],[1,"span-right","color-red","btn-size"],["hidden","","name","close"],[1,"span-left"],[1,"span-right"],[1,"h3-event-title"],["class","Rectangle","lines","none",3,"click",4,"ngFor","ngForOf"],["lines","none",1,"Rectangle",3,"click"],[1,"approve-event-time"],[1,"approve-event-detail"],[1,"aside-right","flex-column","height-100"],["class","buttons",4,"ngIf"],[1,"buttons"],["shape","round",1,"btn-cancel",3,"click"],[1,"solid"],["hidden","",1,"solid"],["hidden","","shape","round",1,"btn-cancel"],["class","btn-cancel","shape","round",3,"click",4,"ngIf"],["shape","round",1,"btn-ok",3,"click"],[1,"width-100"],["animated","",2,"width","50%"],["animated","",2,"width","80%"]],template:function(t,e){1&t&&(m.TgZ(0,"ion-header",0),m._UZ(1,"app-header"),m.qZA(),m.TgZ(2,"div",1),m._UZ(3,"ion-menu-button"),m.qZA(),m.TgZ(4,"ion-content"),m.TgZ(5,"div",2),m.YNc(6,D,30,7,"div",3),m.YNc(7,F,3,2,"div",4),m.YNc(8,J,23,0,"div",5),m.qZA(),m.qZA()),2&t&&(m.xp6(6),m.Q6J("ngIf",e.task),m.xp6(1),m.Q6J("ngIf",e.task),m.xp6(1),m.Q6J("ngIf",!e.task))},directives:[s.Gu,C.E,s.fG,s.W2,n.O5,s.gu,s.Q$,s.q_,n.sg,s.Ie,s.td,s.yh,s.CK],pipes:[n.uU],styles:[".main-content[_ngcontent-%COMP%]{background-color:#fff!important;border-top-left-radius:25px;border-top-right-radius:25px}.content[_ngcontent-%COMP%]{padding:30px 20px 0!important;margin:0;float:left}.color-red[_ngcontent-%COMP%]{font-weight:500;color:#d30a0a!important}.btn-size[_ngcontent-%COMP%]{font-size:18px!important}.main-header[_ngcontent-%COMP%]{font-family:Roboto;border-top-left-radius:25px;border-top-right-radius:25px;background-color:#fff;overflow:auto;color:#000;transform:translate3d(0,1px,0)}.main-header[_ngcontent-%COMP%] .header-top[_ngcontent-%COMP%]{width:360px;margin:0 auto;overflow:auto;padding:0!important;background:#fff}.main-header[_ngcontent-%COMP%] .header-top[_ngcontent-%COMP%] .middle[_ngcontent-%COMP%]{padding:0!important;float:left;width:280px;margin:2.5px 0 0 5px;display:flex;align-items:center}.main-header[_ngcontent-%COMP%] .header-top[_ngcontent-%COMP%] .right[_ngcontent-%COMP%]{padding:0!important;float:right;font-size:25px;color:#0782c9;margin:5px 0 0}.main-header[_ngcontent-%COMP%] .header-bottom[_ngcontent-%COMP%]{width:310px;overflow:auto;margin:0 auto}.main-header[_ngcontent-%COMP%] .header-bottom[_ngcontent-%COMP%] .header-bottom-icon[_ngcontent-%COMP%]{width:30px;font-size:25px;float:left;padding:2px}.main-header[_ngcontent-%COMP%] .header-bottom[_ngcontent-%COMP%] .header-bottom-contacts[_ngcontent-%COMP%]{width:275px;font-size:15px;color:#797979;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;float:left;padding:5px;margin:1px}.main-header[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{font-size:25px;overflow:auto;float:left;padding-top:4px;padding-left:5px}.main-header[_ngcontent-%COMP%] .btn-no-color[_ngcontent-%COMP%] icon[_ngcontent-%COMP%]{font-size:15px;border:1px solid red}ion-item-group[_ngcontent-%COMP%]{margin:15px}ion-button[_ngcontent-%COMP%]{display:block;width:80%;margin:20px auto}.upper-content[_ngcontent-%COMP%]{font-family:Roboto;margin-left:41px;overflow:auto;font-size:18px}.upper-content[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{border-radius:20px;background:#ffb703;float:right;padding:5px 13.5px;color:#fff}.upper-content[_ngcontent-%COMP%] .button-calendar-type[_ngcontent-%COMP%] ion-button[_ngcontent-%COMP%]{height:25px}.upper-content[_ngcontent-%COMP%] .content-details[_ngcontent-%COMP%]{font-size:17px}.upper-content[_ngcontent-%COMP%] .content-details[_ngcontent-%COMP%] .date[_ngcontent-%COMP%]{color:#797979}.middle-conten[_ngcontent-%COMP%] .middle-content[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font-size:16px}.bottom-content[_ngcontent-%COMP%]{margin:0 auto}.bottom-content[_ngcontent-%COMP%] .bottom-content[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font-size:16px;margin:0 0 0 10px}.bottom-content[_ngcontent-%COMP%] .attach-document[_ngcontent-%COMP%]{font-size:15px;color:#0d89d1;margin:5px 5px 5px 10px;padding:5px;float:left}.bottom-content[_ngcontent-%COMP%] .attach-icon[_ngcontent-%COMP%]{width:37px;font-size:35px;float:left}.bottom-content[_ngcontent-%COMP%] .attach-title-item[_ngcontent-%COMP%]{font-size:18px;width:100%;color:#0d89d1;padding-bottom:5px}.bottom-content[_ngcontent-%COMP%] .span-left[_ngcontent-%COMP%]{float:left;font-size:15x}.bottom-content[_ngcontent-%COMP%] .span-right[_ngcontent-%COMP%]{text-align:right;float:right;font-size:13px}.aside-right[_ngcontent-%COMP%]{padding:30px 20px 0!important}.aside-right[_ngcontent-%COMP%] .arrow-right[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;margin-bottom:20px}.aside-right[_ngcontent-%COMP%] .arrow-right[_ngcontent-%COMP%] .arrow-right-icon[_ngcontent-%COMP%]{width:37px;float:right;font-size:35px;overflow:hidden}.aside-right[_ngcontent-%COMP%] .buttons[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;justify-content:space-between}.aside-right[_ngcontent-%COMP%] .buttons[_ngcontent-%COMP%] .btn-cancel[_ngcontent-%COMP%], .aside-right[_ngcontent-%COMP%] .buttons[_ngcontent-%COMP%] .btn-delete[_ngcontent-%COMP%], .aside-right[_ngcontent-%COMP%] .buttons[_ngcontent-%COMP%] .btn-ok[_ngcontent-%COMP%]{height:auto!important;font-size:16px!important;font-weight:600!important;width:100%!important;margin-bottom:10px!important;padding:15px!important}.aside-right[_ngcontent-%COMP%] .solid[_ngcontent-%COMP%]{display:block;width:90%;border-top:1px solid #ebebeb;margin:0 auto 10px!important}@media only screen and (max-width: 800px){.content[_ngcontent-%COMP%]{width:100%!important}.aside-right[_ngcontent-%COMP%]{display:none}}@media only screen and (min-width: 801px){.menu-ptions[_ngcontent-%COMP%]{display:none}.content[_ngcontent-%COMP%]{width:65%;border-right:1px solid #d8d8d8}.aside-right[_ngcontent-%COMP%]{width:35%}}@media only screen and (min-width: 1024px){.content[_ngcontent-%COMP%]{width:70%}.aside-right[_ngcontent-%COMP%]{width:30%}}@media only screen and (min-width: 1140px){.content[_ngcontent-%COMP%]{width:75%}.aside-right[_ngcontent-%COMP%]{width:25%}}"]}),t})()}];let R=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=m.oAB({type:t}),t.\u0275inj=m.cJS({imports:[[a.Bz.forChild(E)],a.Bz]}),t})();var Y=o(6527),H=o(4502);let B=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=m.oAB({type:t}),t.\u0275inj=m.cJS({imports:[[n.ez,i.u5,s.Pc,R,Y.a,H.F]]}),t})()},11513:function(t,e,o){"use strict";o.d(e,{S:function(){return k}});var n=o(64762),i=o(320),s=o(45896),a=o(83189),c=o(32379),r=o(4528),d=o(37716),l=o(35957),p=o(28621),g=o(20985),u=o(39895),h=o(37556),m=o(84465),f=o(38583);function v(t,e){if(1&t){const t=d.EpF();d.TgZ(0,"div",6),d.TgZ(1,"button",7),d.NdJ("click",function(){return d.CHM(t),d.oxw(2).openAddNoteModal("Aprovar")}),d._uU(2,"Aprovar"),d.qZA(),d.TgZ(3,"button",7),d.NdJ("click",function(){return d.CHM(t),d.oxw(2).openAddNoteModal("Revis\xe3o")}),d._uU(4,"Mandar para Revis\xe3o"),d.qZA(),d._UZ(5,"div",8),d.TgZ(6,"button",9),d.NdJ("click",function(){return d.CHM(t),d.oxw(2).distartExpedientModal("descartar")}),d._uU(7,"Descartar"),d.qZA(),d._UZ(8,"div",10),d.TgZ(9,"button",11),d._uU(10,"Delegar"),d.qZA(),d.TgZ(11,"button",7),d.NdJ("click",function(){return d.CHM(t),d.oxw(2).attachDocument()}),d._uU(12,"Anexar Documento"),d.qZA(),d.qZA()}}function Z(t,e){if(1&t){const t=d.EpF();d.TgZ(0,"button",7),d.NdJ("click",function(){return d.CHM(t),d.oxw(3).sendExpedienteToPending()}),d._uU(1,"Enviar para Pendentes"),d.qZA()}}function b(t,e){if(1&t){const t=d.EpF();d.TgZ(0,"div",6),d.TgZ(1,"button",12),d.NdJ("click",function(){d.CHM(t);const e=d.oxw(2);return e.openExpedientActionsModal("0",e.fulltask)}),d._uU(2,"Efetuar Despacho"),d.qZA(),d.TgZ(3,"button",9),d.NdJ("click",function(){return d.CHM(t),d.oxw(2).distartExpedientModal("descartar")}),d._uU(4,"Descartar"),d.qZA(),d._UZ(5,"div",8),d.TgZ(6,"button",7),d.NdJ("click",function(){d.CHM(t);const e=d.oxw(2);return e.openExpedientActionsModal("1",e.fulltask)}),d._uU(7,"Solicitar Parecer"),d.qZA(),d.TgZ(8,"button",7),d.NdJ("click",function(){d.CHM(t);const e=d.oxw(2);return e.openBookMeetingModal(e.task)}),d._uU(9,"Marcar Reuni\xe3o"),d.qZA(),d.YNc(10,Z,2,0,"button",13),d._UZ(11,"div",10),d.TgZ(12,"button",11),d._uU(13,"Delegar"),d.qZA(),d.qZA()}if(2&t){const t=d.oxw(2);d.xp6(10),d.Q6J("ngIf","Pending"!=t.task.Status)}}function x(t,e){if(1&t&&(d.TgZ(0,"div"),d.YNc(1,v,13,0,"div",5),d.YNc(2,b,14,1,"div",5),d.qZA()),2&t){const t=d.oxw();d.xp6(1),d.Q6J("ngIf","MDGPR"==t.loggeduser.Profile),d.xp6(1),d.Q6J("ngIf","PR"==t.loggeduser.Profile)}}let k=(()=>{class t{constructor(t,e,o,n,i,s,a,c,r,d,l){this.popoverController=t,this.modalController=e,this.processes=o,this.attachmentsService=n,this.activatedRoute=i,this.userAuth=s,this.navParams=a,this.animationController=c,this.router=r,this.toastService=d,this.location=l,this.months=["Janeiro","Fevereiro","Mar\xe7o","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"],this.days=["Domingo","Segunda-feira","Ter\xe7a-feira","Quarta-feira","Quinta-feira","Sexta-feira","S\xe1bado"],this.documents=[],this.showEnviarPendentes=!1,this.task=this.navParams.get("task"),this.fulltask=this.navParams.get("fulltask"),this.loggeduser=s.ValidatedUser,"Pending"!=this.task.Status&&(this.showEnviarPendentes=!0)}ngOnInit(){}close(){window.innerWidth<=1024?this.popoverController.dismiss():this.modalController.dismiss()}openAddNoteModal(t){return(0,n.mG)(this,void 0,void 0,function*(){let e;this.popoverController.dismiss(),window,e="modal modal-desktop";const o=yield this.modalController.create({component:i.C,componentProps:{},cssClass:"modal modal-desktop",backdropDismiss:!0});yield o.present(),o.onDidDismiss().then(e=>(0,n.mG)(this,void 0,void 0,function*(){if(console.log(e),e.data){let o={ProcessInstanceID:"",Attachments:e.data.documents.map(t=>({ApplicationId:t.ApplicationType,SourceId:t.Id}))};"Aprovar"==t?yield this.approve(e.data.note,o):"Revis\xe3o"==t&&(yield this.sendToReview(e.data.note,o)),this.goBack()}}))})}approve(t,e){return(0,n.mG)(this,void 0,void 0,function*(){this.popoverController.dismiss();let o={serialNumber:this.task.SerialNumber,action:"Aprovar",ActionTypeId:100000004,dataFields:{ReviewUserComment:t},AttachmentList:e};const n=this.toastService.loading();try{yield this.processes.CompleteTask(o).toPromise(),this.close(),this.toastService.successMessage()}catch(i){this.toastService.badRequest()}finally{n.remove()}})}distartExpedientModal(t){return(0,n.mG)(this,void 0,void 0,function*(){this.popoverController.dismiss();const e=yield this.modalController.create({component:s.Q,componentProps:{},cssClass:"discart-expedient-modal",backdropDismiss:!1});yield e.present(),e.onDidDismiss().then(e=>(0,n.mG)(this,void 0,void 0,function*(){if(console.log(e.data),"descartar"==t){if("Yes"==e.data){let t={serialNumber:this.task.SerialNumber,action:"Passivo",ActionTypeId:99999877,dataFields:{Note:""}};const e=this.toastService.loading();try{yield this.processes.CompleteTask(t).toPromise(),this.toastService.successMessage("Processo descartado"),this.goBack()}catch(o){this.toastService.badRequest("Processo n\xe3o descartado")}finally{e.remove()}}}else if("Yes"==e.data){const e=this.toastService.loading();try{yield this.processes.CompleteTask(t).toPromise(),this.goBack()}catch(o){this.toastService.badRequest("Processo n\xe3o descartado")}finally{e.remove()}this.goBack()}else if("No"==e.data){console.log("Update");const t=this.toastService.loading();try{yield this.processes.UpdateTaskStatus(this.task.FolderId).toPromise(),this.toastService.successMessage(),this.goBack()}catch(o){this.toastService.badRequest()}finally{t.remove()}}}))})}sendToReview(t,e){return(0,n.mG)(this,void 0,void 0,function*(){let o={serialNumber:this.task.SerialNumber,action:"Retificar",ActionTypeId:99999877,dataFields:{ReviewUserComment:t},AttachmentList:e};const n=this.toastService.loading();try{yield this.processes.CompleteTask(o).toPromise(),this.close(),this.toastService.successMessage()}catch(i){this.toastService.badRequest()}finally{n.remove()}})}sendExpedienteToPending(){this.popoverController.dismiss(),this.processes.SetTaskToPending(this.task.SerialNumber).subscribe(t=>{console.log(t),this.close()},()=>{this.toastService.badRequest("Processo n\xe3o encontrado")})}openExpedientActionsModal(t,e){return(0,n.mG)(this,void 0,void 0,function*(){let o;this.popoverController.dismiss(),o=window.innerWidth<=800?"modal modal-desktop":"modal modal-desktop showAsideOptions";const i=yield this.modalController.create({component:c.F,componentProps:{taskAction:t,task:e,profile:this.profile},cssClass:o});yield i.present(),i.onDidDismiss().then(t=>(0,n.mG)(this,void 0,void 0,function*(){console.log(t.data);let e=t.data;if(t.data){console.log("open discart");const t=this.toastService.loading();try{yield this.processes.CompleteTask(e).toPromise(),this.goBack()}catch(o){this.toastService.badRequest("Processo n\xe3o descartado")}finally{t.remove()}}else console.log("Not open")}))})}openBookMeetingModal(t){return(0,n.mG)(this,void 0,void 0,function*(){let t;this.popoverController.dismiss(),t=window.innerWidth<=800?"book-meeting-modal modal modal-desktop":"modal modal-desktop showAsideOptions";const e=yield this.modalController.create({component:a.k,componentProps:{task:this.task},cssClass:t,backdropDismiss:!1});yield e.present(),e.onDidDismiss()})}goBack(){this.location.back()}getAttachments(t){this.attachmentsService.getAttachmentsBySerial(t).subscribe(t=>{this.attachments=t})}attachDocument(){this.popoverController.dismiss(),this.getDoc()}getDoc(){return(0,n.mG)(this,void 0,void 0,function*(){const t=yield this.modalController.create({component:r.Z,cssClass:"modal-width-100-width-background modal",componentProps:{type:"AccoesPresidenciais & ArquivoDespachoElect",showSearchInput:!0,select:!0}});yield t.present(),t.onDidDismiss().then(t=>{t&&(this.documents.push(t.data.selected),console.log(this.documents),this.documents.forEach(t=>{this.attachmentsService.setEventAttachmentById({Source:"1",SourceId:t.Id,SourceTitle:t.Assunto,SerialNumber:this.task.SerialNumber,ApplicationId:t.ApplicationType}).subscribe(t=>{this.getAttachments(this.task.SerialNumber)})}))})})}}return t.\u0275fac=function(e){return new(e||t)(d.Y36(l.Dh),d.Y36(l.IN),d.Y36(p.$),d.Y36(g.o),d.Y36(u.gz),d.Y36(h.e),d.Y36(l.X1),d.Y36(l.vB),d.Y36(u.F0),d.Y36(m.k),d.Y36(f.Ye))},t.\u0275cmp=d.Xpm({type:t,selectors:[["app-opts-expediente-pr"]],decls:5,vars:1,consts:[[1,"container"],[1,"arrow-right",3,"click"],[1,"btn-no-color"],["slot","end","src","assets/images/icons-arrow-arrow-right.svg",1,"arrow-right-icon"],[4,"ngIf"],["class","buttons",4,"ngIf"],[1,"buttons"],["shape","round",1,"btn-cancel",3,"click"],[1,"solid"],["full","","shape","round",1,"btn-ok",3,"click"],["hidden","",1,"solid"],["hidden","","shape","round",1,"btn-cancel"],["shape","round",1,"btn-ok",3,"click"],["class","btn-cancel","shape","round",3,"click",4,"ngIf"]],template:function(t,e){1&t&&(d.TgZ(0,"ion-content",0),d.TgZ(1,"div",1),d.NdJ("click",function(){return e.close()}),d.TgZ(2,"button",2),d._UZ(3,"ion-icon",3),d.qZA(),d.qZA(),d.YNc(4,x,3,2,"div",4),d.qZA()),2&t&&(d.xp6(4),d.Q6J("ngIf",e.task))},directives:[l.W2,l.gu,f.O5],styles:[".container[_ngcontent-%COMP%]{--padding-top:20px!important;--padding-bottom:20px!important;--padding-start:20px!important;--padding-end:20px!important}.arrow-right[_ngcontent-%COMP%]{display:none;margin-bottom:20px}.arrow-right[_ngcontent-%COMP%] .arrow-right-icon[_ngcontent-%COMP%]{width:37px;float:right;font-size:35px;overflow:hidden}.buttons[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;justify-content:space-around}.solid[_ngcontent-%COMP%]{display:none;width:90%;border-top:1px solid #bbb;margin:0 auto!important}.btn-cancel[_ngcontent-%COMP%], .btn-ok[_ngcontent-%COMP%]{margin-bottom:5px!important;margin-top:5px!important}@media only screen and (max-width: 800px){.btn-cancel[_ngcontent-%COMP%], .btn-delete[_ngcontent-%COMP%], .btn-ok[_ngcontent-%COMP%]{width:47%!important}}@media only screen and (min-width: 1024px){.arrow-right[_ngcontent-%COMP%]{display:flex;justify-content:flex-end}.btn-cancel[_ngcontent-%COMP%]{display:none}.btn-cancel[_ngcontent-%COMP%], .btn-delete[_ngcontent-%COMP%], .btn-ok[_ngcontent-%COMP%]{width:100%!important;margin-bottom:10px!important}.btn-delete[_ngcontent-%COMP%], .btn-ok[_ngcontent-%COMP%]{margin-top:10px!important}}"]}),t})()}}]);