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

1 line
10 KiB
JavaScript

(self.webpackChunkgabinete_digital=self.webpackChunkgabinete_digital||[]).push([[6133],{96133:function(t,e,o){"use strict";o.r(e),o.d(e,{OptsExpedientePrPageModule:function(){return p}});var s=o(38583),n=o(3679),i=o(35957),a=o(39895),r=o(11513),c=o(37716);const d=[{path:"",component:r.S}];let l=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=c.oAB({type:t}),t.\u0275inj=c.cJS({imports:[[a.Bz.forChild(d)],a.Bz]}),t})(),p=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=c.oAB({type:t}),t.\u0275inj=c.cJS({imports:[[s.ez,n.u5,i.Pc,l]]}),t})()},11513:function(t,e,o){"use strict";o.d(e,{S:function(){return P}});var s=o(64762),n=o(320),i=o(45896),a=o(83189),r=o(32379),c=o(4528),d=o(37716),l=o(35957),p=o(28621),h=o(20985),u=o(39895),m=o(37556),g=o(84465),v=o(38583);function f(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 b(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 k(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,b,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 C(t,e){if(1&t&&(d.TgZ(0,"div"),d.YNc(1,f,13,0,"div",5),d.YNc(2,k,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 P=(()=>{class t{constructor(t,e,o,s,n,i,a,r,c,d,l){this.popoverController=t,this.modalController=e,this.processes=o,this.attachmentsService=s,this.activatedRoute=n,this.userAuth=i,this.navParams=a,this.animationController=r,this.router=c,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=i.ValidatedUser,"Pending"!=this.task.Status&&(this.showEnviarPendentes=!0)}ngOnInit(){}close(){window.innerWidth<=1024?this.popoverController.dismiss():this.modalController.dismiss()}openAddNoteModal(t){return(0,s.mG)(this,void 0,void 0,function*(){let e;this.popoverController.dismiss(),window,e="modal modal-desktop";const o=yield this.modalController.create({component:n.C,componentProps:{},cssClass:"modal modal-desktop",backdropDismiss:!0});yield o.present(),o.onDidDismiss().then(e=>(0,s.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,s.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 s=this.toastService.loading();try{yield this.processes.CompleteTask(o).toPromise(),this.close(),this.toastService.successMessage()}catch(n){this.toastService.badRequest()}finally{s.remove()}})}distartExpedientModal(t){return(0,s.mG)(this,void 0,void 0,function*(){this.popoverController.dismiss();const e=yield this.modalController.create({component:i.Q,componentProps:{},cssClass:"discart-expedient-modal",backdropDismiss:!1});yield e.present(),e.onDidDismiss().then(e=>(0,s.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,s.mG)(this,void 0,void 0,function*(){let o={serialNumber:this.task.SerialNumber,action:"Retificar",ActionTypeId:99999877,dataFields:{ReviewUserComment:t},AttachmentList:e};const s=this.toastService.loading();try{yield this.processes.CompleteTask(o).toPromise(),this.close(),this.toastService.successMessage()}catch(n){this.toastService.badRequest()}finally{s.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,s.mG)(this,void 0,void 0,function*(){let o;this.popoverController.dismiss(),o=window.innerWidth<=800?"modal modal-desktop":"modal modal-desktop showAsideOptions";const n=yield this.modalController.create({component:r.F,componentProps:{taskAction:t,task:e,profile:this.profile},cssClass:o});yield n.present(),n.onDidDismiss().then(t=>(0,s.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,s.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,s.mG)(this,void 0,void 0,function*(){const t=yield this.modalController.create({component:c.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(h.o),d.Y36(u.gz),d.Y36(m.e),d.Y36(l.X1),d.Y36(l.vB),d.Y36(u.F0),d.Y36(g.k),d.Y36(v.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,C,3,2,"div",4),d.qZA()),2&t&&(d.xp6(4),d.Q6J("ngIf",e.task))},directives:[l.W2,l.gu,v.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})()}}]);