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

1 line
14 KiB
JavaScript

!function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function t(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(self.webpackChunkgabinete_digital=self.webpackChunkgabinete_digital||[]).push([[6133],{96133:function(e,n,o){"use strict";o.r(n),o.d(n,{OptsExpedientePrPageModule:function(){return h}});var r,s=o(38583),i=o(3679),a=o(35957),c=o(39895),u=o(11513),d=o(37716),p=[{path:"",component:u.S}],l=function(){var e=function e(){t(this,e)};return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=d.oAB({type:e}),e.\u0275inj=d.cJS({imports:[[c.Bz.forChild(p)],c.Bz]}),e}(),h=((r=function e(){t(this,e)}).\u0275fac=function(e){return new(e||r)},r.\u0275mod=d.oAB({type:r}),r.\u0275inj=d.cJS({imports:[[s.ez,i.u5,a.Pc,l]]}),r)},11513:function(n,o,r){"use strict";r.d(o,{S:function(){return P}});var s=r(64762),i=r(320),a=r(45896),c=r(83189),u=r(32379),d=r(4528),p=r(37716),l=r(35957),h=r(28621),m=r(20985),v=r(39895),f=r(37556),g=r(84465),k=r(38583);function b(e,t){if(1&e){var n=p.EpF();p.TgZ(0,"div",6),p.TgZ(1,"button",7),p.NdJ("click",function(){return p.CHM(n),p.oxw(2).openAddNoteModal("Aprovar")}),p._uU(2,"Aprovar"),p.qZA(),p.TgZ(3,"button",7),p.NdJ("click",function(){return p.CHM(n),p.oxw(2).openAddNoteModal("Revis\xe3o")}),p._uU(4,"Mandar para Revis\xe3o"),p.qZA(),p._UZ(5,"div",8),p.TgZ(6,"button",9),p.NdJ("click",function(){return p.CHM(n),p.oxw(2).distartExpedientModal("descartar")}),p._uU(7,"Descartar"),p.qZA(),p._UZ(8,"div",10),p.TgZ(9,"button",11),p._uU(10,"Delegar"),p.qZA(),p.TgZ(11,"button",7),p.NdJ("click",function(){return p.CHM(n),p.oxw(2).attachDocument()}),p._uU(12,"Anexar Documento"),p.qZA(),p.qZA()}}function x(e,t){if(1&e){var n=p.EpF();p.TgZ(0,"button",7),p.NdJ("click",function(){return p.CHM(n),p.oxw(3).sendExpedienteToPending()}),p._uU(1,"Enviar para Pendentes"),p.qZA()}}function w(e,t){if(1&e){var n=p.EpF();p.TgZ(0,"div",6),p.TgZ(1,"button",12),p.NdJ("click",function(){p.CHM(n);var e=p.oxw(2);return e.openExpedientActionsModal("0",e.fulltask)}),p._uU(2,"Efetuar Despacho"),p.qZA(),p.TgZ(3,"button",9),p.NdJ("click",function(){return p.CHM(n),p.oxw(2).distartExpedientModal("descartar")}),p._uU(4,"Descartar"),p.qZA(),p._UZ(5,"div",8),p.TgZ(6,"button",7),p.NdJ("click",function(){p.CHM(n);var e=p.oxw(2);return e.openExpedientActionsModal("1",e.fulltask)}),p._uU(7,"Solicitar Parecer"),p.qZA(),p.TgZ(8,"button",7),p.NdJ("click",function(){p.CHM(n);var e=p.oxw(2);return e.openBookMeetingModal(e.task)}),p._uU(9,"Marcar Reuni\xe3o"),p.qZA(),p.YNc(10,x,2,0,"button",13),p._UZ(11,"div",10),p.TgZ(12,"button",11),p._uU(13,"Delegar"),p.qZA(),p.qZA()}if(2&e){var o=p.oxw(2);p.xp6(10),p.Q6J("ngIf","Pending"!=o.task.Status)}}function C(e,t){if(1&e&&(p.TgZ(0,"div"),p.YNc(1,b,13,0,"div",5),p.YNc(2,w,14,1,"div",5),p.qZA()),2&e){var n=p.oxw();p.xp6(1),p.Q6J("ngIf","MDGPR"==n.loggeduser.Profile),p.xp6(1),p.Q6J("ngIf","PR"==n.loggeduser.Profile)}}var P=function(){var n=function(){function n(e,o,r,s,i,a,c,u,d,p,l){t(this,n),this.popoverController=e,this.modalController=o,this.processes=r,this.attachmentsService=s,this.activatedRoute=i,this.userAuth=a,this.navParams=c,this.animationController=u,this.router=d,this.toastService=p,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=a.ValidatedUser,"Pending"!=this.task.Status&&(this.showEnviarPendentes=!0)}var o,r,p;return o=n,(r=[{key:"ngOnInit",value:function(){}},{key:"close",value:function(){window.innerWidth<=1024?this.popoverController.dismiss():this.modalController.dismiss()}},{key:"openAddNoteModal",value:function(e){return(0,s.mG)(this,void 0,void 0,regeneratorRuntime.mark(function t(){var n,o=this;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return this.popoverController.dismiss(),window,t.next=3,this.modalController.create({component:i.C,componentProps:{},cssClass:"modal modal-desktop",backdropDismiss:!0});case 3:return n=t.sent,t.next=6,n.present();case 6:n.onDidDismiss().then(function(t){return(0,s.mG)(o,void 0,void 0,regeneratorRuntime.mark(function n(){var o;return regeneratorRuntime.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:if(console.log(t),!t.data){n.next=12;break}if(o={ProcessInstanceID:"",Attachments:t.data.documents.map(function(e){return{ApplicationId:e.ApplicationType,SourceId:e.Id}})},"Aprovar"!=e){n.next=7;break}return n.next=5,this.approve(t.data.note,o);case 5:n.next=11;break;case 7:if(n.t0="Revis\xe3o"==e,!n.t0){n.next=11;break}return n.next=11,this.sendToReview(t.data.note,o);case 11:this.goBack();case 12:case"end":return n.stop()}},n,this)}))});case 7:case"end":return t.stop()}},t,this)}))}},{key:"approve",value:function(e,t){return(0,s.mG)(this,void 0,void 0,regeneratorRuntime.mark(function n(){var o,r;return regeneratorRuntime.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return this.popoverController.dismiss(),o={serialNumber:this.task.SerialNumber,action:"Aprovar",ActionTypeId:100000004,dataFields:{ReviewUserComment:e},AttachmentList:t},r=this.toastService.loading(),n.prev=3,n.next=6,this.processes.CompleteTask(o).toPromise();case 6:this.close(),this.toastService.successMessage(),n.next=13;break;case 10:n.prev=10,n.t0=n.catch(3),this.toastService.badRequest();case 13:return n.prev=13,r.remove(),n.finish(13);case 16:case"end":return n.stop()}},n,this,[[3,10,13,16]])}))}},{key:"distartExpedientModal",value:function(e){return(0,s.mG)(this,void 0,void 0,regeneratorRuntime.mark(function t(){var n,o=this;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return this.popoverController.dismiss(),t.next=3,this.modalController.create({component:a.Q,componentProps:{},cssClass:"discart-expedient-modal",backdropDismiss:!1});case 3:return n=t.sent,t.next=6,n.present();case 6:n.onDidDismiss().then(function(t){return(0,s.mG)(o,void 0,void 0,regeneratorRuntime.mark(function n(){var o,r,s,i;return regeneratorRuntime.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:if(console.log(t.data),"descartar"!=e){n.next=19;break}if("Yes"!=t.data){n.next=17;break}return o={serialNumber:this.task.SerialNumber,action:"Passivo",ActionTypeId:99999877,dataFields:{Note:""}},r=this.toastService.loading(),n.prev=4,n.next=7,this.processes.CompleteTask(o).toPromise();case 7:this.toastService.successMessage("Processo descartado"),this.goBack(),n.next=14;break;case 11:n.prev=11,n.t0=n.catch(4),this.toastService.badRequest("Processo n\xe3o descartado");case 14:return n.prev=14,r.remove(),n.finish(14);case 17:n.next=52;break;case 19:if("Yes"!=t.data){n.next=36;break}return s=this.toastService.loading(),n.prev=21,n.next=24,this.processes.CompleteTask(e).toPromise();case 24:this.goBack(),n.next=30;break;case 27:n.prev=27,n.t1=n.catch(21),this.toastService.badRequest("Processo n\xe3o descartado");case 30:return n.prev=30,s.remove(),n.finish(30);case 33:this.goBack(),n.next=52;break;case 36:if("No"!=t.data){n.next=52;break}return console.log("Update"),i=this.toastService.loading(),n.prev=39,n.next=42,this.processes.UpdateTaskStatus(this.task.FolderId).toPromise();case 42:this.toastService.successMessage(),this.goBack(),n.next=49;break;case 46:n.prev=46,n.t2=n.catch(39),this.toastService.badRequest();case 49:return n.prev=49,i.remove(),n.finish(49);case 52:case"end":return n.stop()}},n,this,[[4,11,14,17],[21,27,30,33],[39,46,49,52]])}))});case 7:case"end":return t.stop()}},t,this)}))}},{key:"sendToReview",value:function(e,t){return(0,s.mG)(this,void 0,void 0,regeneratorRuntime.mark(function n(){var o,r;return regeneratorRuntime.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return o={serialNumber:this.task.SerialNumber,action:"Retificar",ActionTypeId:99999877,dataFields:{ReviewUserComment:e},AttachmentList:t},r=this.toastService.loading(),n.prev=2,n.next=5,this.processes.CompleteTask(o).toPromise();case 5:this.close(),this.toastService.successMessage(),n.next=12;break;case 9:n.prev=9,n.t0=n.catch(2),this.toastService.badRequest();case 12:return n.prev=12,r.remove(),n.finish(12);case 15:case"end":return n.stop()}},n,this,[[2,9,12,15]])}))}},{key:"sendExpedienteToPending",value:function(){var e=this;this.popoverController.dismiss(),this.processes.SetTaskToPending(this.task.SerialNumber).subscribe(function(t){console.log(t),e.close()},function(){e.toastService.badRequest("Processo n\xe3o encontrado")})}},{key:"openExpedientActionsModal",value:function(e,t){return(0,s.mG)(this,void 0,void 0,regeneratorRuntime.mark(function n(){var o,r,i=this;return regeneratorRuntime.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return this.popoverController.dismiss(),o=window.innerWidth<=800?"modal modal-desktop":"modal modal-desktop showAsideOptions",n.next=3,this.modalController.create({component:u.F,componentProps:{taskAction:e,task:t,profile:this.profile},cssClass:o});case 3:return r=n.sent,n.next=6,r.present();case 6:r.onDidDismiss().then(function(e){return(0,s.mG)(i,void 0,void 0,regeneratorRuntime.mark(function t(){var n,o;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(console.log(e.data),n=e.data,!e.data){t.next=19;break}return console.log("open discart"),o=this.toastService.loading(),t.prev=5,t.next=8,this.processes.CompleteTask(n).toPromise();case 8:this.goBack(),t.next=14;break;case 11:t.prev=11,t.t0=t.catch(5),this.toastService.badRequest("Processo n\xe3o descartado");case 14:return t.prev=14,o.remove(),t.finish(14);case 17:t.next=20;break;case 19:console.log("Not open");case 20:case"end":return t.stop()}},t,this,[[5,11,14,17]])}))});case 7:case"end":return n.stop()}},n,this)}))}},{key:"openBookMeetingModal",value:function(e){return(0,s.mG)(this,void 0,void 0,regeneratorRuntime.mark(function e(){var t,n;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return this.popoverController.dismiss(),t=window.innerWidth<=800?"book-meeting-modal modal modal-desktop":"modal modal-desktop showAsideOptions",e.next=3,this.modalController.create({component:c.k,componentProps:{task:this.task},cssClass:t,backdropDismiss:!1});case 3:return n=e.sent,e.next=6,n.present();case 6:n.onDidDismiss();case 7:case"end":return e.stop()}},e,this)}))}},{key:"goBack",value:function(){this.location.back()}},{key:"getAttachments",value:function(e){var t=this;this.attachmentsService.getAttachmentsBySerial(e).subscribe(function(e){t.attachments=e})}},{key:"attachDocument",value:function(){this.popoverController.dismiss(),this.getDoc()}},{key:"getDoc",value:function(){return(0,s.mG)(this,void 0,void 0,regeneratorRuntime.mark(function e(){var t,n=this;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.modalController.create({component:d.Z,cssClass:"modal-width-100-width-background modal",componentProps:{type:"AccoesPresidenciais & ArquivoDespachoElect",showSearchInput:!0,select:!0}});case 2:return t=e.sent,e.next=5,t.present();case 5:t.onDidDismiss().then(function(e){e&&(n.documents.push(e.data.selected),console.log(n.documents),n.documents.forEach(function(e){n.attachmentsService.setEventAttachmentById({Source:"1",SourceId:e.Id,SourceTitle:e.Assunto,SerialNumber:n.task.SerialNumber,ApplicationId:e.ApplicationType}).subscribe(function(e){n.getAttachments(n.task.SerialNumber)})}))});case 6:case"end":return e.stop()}},e,this)}))}}])&&e(o.prototype,r),p&&e(o,p),n}();return n.\u0275fac=function(e){return new(e||n)(p.Y36(l.Dh),p.Y36(l.IN),p.Y36(h.$),p.Y36(m.o),p.Y36(v.gz),p.Y36(f.e),p.Y36(l.X1),p.Y36(l.vB),p.Y36(v.F0),p.Y36(g.k),p.Y36(k.Ye))},n.\u0275cmp=p.Xpm({type:n,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(e,t){1&e&&(p.TgZ(0,"ion-content",0),p.TgZ(1,"div",1),p.NdJ("click",function(){return t.close()}),p.TgZ(2,"button",2),p._UZ(3,"ion-icon",3),p.qZA(),p.qZA(),p.YNc(4,C,3,2,"div",4),p.qZA()),2&e&&(p.xp6(4),p.Q6J("ngIf",t.task))},directives:[l.W2,l.gu,k.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}}"]}),n}()}}])}();