mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 04:57:52 +00:00
1 line
8.3 KiB
JavaScript
1 line
8.3 KiB
JavaScript
(self.webpackChunkgabinete_digital=self.webpackChunkgabinete_digital||[]).push([[5640],{45640:function(t,e,i){"use strict";i.r(e),i.d(e,{DeplomaOptionsPageModule:function(){return m}});var o=i(38583),n=i(3679),s=i(35957),a=i(39895),r=i(90027),c=i(37716);const d=[{path:"",component:r.Q}];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})(),m=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=c.oAB({type:t}),t.\u0275inj=c.cJS({imports:[[o.ez,n.u5,s.Pc,l]]}),t})()},90027:function(t,e,i){"use strict";i.d(e,{Q:function(){return f}});var o=i(64762),n=i(320),s=i(83189),a=i(37716),r=i(35957),c=i(39895),d=i(28621),l=i(84465);let m=(()=>{class t{constructor(t){this.processes=t,this.activityInstanceName={"Revisar Diploma":["Solicitar assinatura do Presidente","Solicitar altera\xe7\xe3o","Marcar Reuni\xe3o"],"Diploma Assinado":["Concluir"],"Assinar Diploma":["Assinado"]}}askSignature({note:t,documents:e,serialNumber:i}){return(0,o.mG)(this,void 0,void 0,function*(){return this.processes.CompleteTask({serialNumber:i,action:"Aprovar",ActionTypeId:99999840,dataFields:{ReviewUserComment:t},AttachmentList:e})})}askToChange({note:t,documents:e,serialNumber:i}){return(0,o.mG)(this,void 0,void 0,function*(){return this.processes.CompleteTask({serialNumber:i,action:"Retificar",ActionTypeId:99999841,dataFields:{ReviewUserComment:t},AttachmentList:e})})}finish({note:t,documents:e,serialNumber:i}){return(0,o.mG)(this,void 0,void 0,function*(){return this.processes.CompleteTask({serialNumber:i,action:"Concluir",ActionTypeId:95,dataFields:{ReviewUserComment:t},AttachmentList:e})})}sign({note:t,documents:e,serialNumber:i}){return(0,o.mG)(this,void 0,void 0,function*(){return this.processes.CompleteTask({serialNumber:i,action:"Assinado",ActionTypeId:99999842,dataFields:{ReviewUserComment:t},AttachmentList:e})})}}return t.\u0275fac=function(e){return new(e||t)(a.LFG(d.$))},t.\u0275prov=a.Yz7({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();var p=i(38583);function u(t,e){if(1&t){const t=a.EpF();a.TgZ(0,"div",5),a.TgZ(1,"button",6),a.NdJ("click",function(){return a.CHM(t),a.oxw(2).openAddNoteModal("Solicitar assinatura")}),a._uU(2,"Solicitar assinatura do Presidente"),a.qZA(),a.TgZ(3,"button",6),a.NdJ("click",function(){return a.CHM(t),a.oxw(2).openAddNoteModal("Solicitar altera\xe7\xe3o")}),a._uU(4,"Solicitar altera\xe7\xe3o"),a.qZA(),a.TgZ(5,"button",6),a.NdJ("click",function(){a.CHM(t);const e=a.oxw(2);return e.openBookMeetingModal(e.task)}),a._uU(6,"Marcar Reuni\xe3o"),a.qZA(),a._UZ(7,"div",7),a.qZA()}}function h(t,e){if(1&t){const t=a.EpF();a.TgZ(0,"div",5),a.TgZ(1,"button",6),a.NdJ("click",function(){return a.CHM(t),a.oxw(2).openAddNoteModal("Concluir diploma")}),a._uU(2,"Concluir"),a.qZA(),a.qZA()}}function g(t,e){if(1&t){const t=a.EpF();a.TgZ(0,"div",5),a.TgZ(1,"button",6),a.NdJ("click",function(){return a.CHM(t),a.oxw(2).openAddNoteModal("Assinar Diploma")}),a._uU(2,"Assinado"),a.qZA(),a.qZA()}}function v(t,e){if(1&t&&(a.TgZ(0,"div",3),a.YNc(1,u,8,0,"div",4),a.YNc(2,h,3,0,"div",4),a.YNc(3,g,3,0,"div",4),a.qZA()),2&t){const t=a.oxw();a.xp6(1),a.Q6J("ngIf","Revisar Diploma"==t.task.activityInstanceName),a.xp6(1),a.Q6J("ngIf","Diploma Assinado"==t.task.activityInstanceName),a.xp6(1),a.Q6J("ngIf","Assinar Diploma"==t.task.activityInstanceName)}}let f=(()=>{class t{constructor(t,e,i,o,n,s,a,r){this.popoverController=t,this.modalController=e,this.activatedRoute=i,this.processes=o,this.navParams=n,this.toastService=s,this.router=a,this.deplomaService=r,this.serialNumber=this.navParams.get("serialNumber"),this.task=this.navParams.get("task"),this.fulltask=this.navParams.get("fulltask")}ngOnInit(){console.log(this.serialNumber)}openAddNoteModal(t){return(0,o.mG)(this,void 0,void 0,function*(){let e;this.popoverController.dismiss(),window,e="modal modal-desktop";const i=yield this.modalController.create({component:n.C,componentProps:{},cssClass:"modal modal-desktop",backdropDismiss:!0});yield i.present(),i.onDidDismiss().then(e=>(0,o.mG)(this,void 0,void 0,function*(){if(e.data){let i={ProcessInstanceID:"",Attachments:e.data.documents.map(t=>({ApplicationId:t.ApplicationType,SourceId:t.Id}))};"Solicitar assinatura"==t?(yield this.askSignature(e.data.note,i),this.goBack()):"Solicitar altera\xe7\xe3o"==t?(yield this.askToChange(e.data.note,i),this.goBack()):"Assinar Diploma"==t?(yield this.sign(e.data.note,i),this.goBack()):"Concluir diploma"==t&&(yield this.finish(e.data.note,i),this.goBack())}}))})}askToChange(t,e){return(0,o.mG)(this,void 0,void 0,function*(){let i={serialNumber:this.serialNumber,action:"Retificar",ActionTypeId:99999841,dataFields:{ReviewUserComment:t},AttachmentList:e};const o=this.toastService.loading();try{yield this.processes.CompleteTask(i).toPromise(),this.close(),this.toastService.successMessage()}catch(n){this.toastService.badRequest()}finally{o.remove()}})}openBookMeetingModal(t){return(0,o.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:s.k,componentProps:{task:this.task},cssClass:t,backdropDismiss:!1});yield e.present(),e.onDidDismiss()})}askSignature(t,e){return(0,o.mG)(this,void 0,void 0,function*(){let i={serialNumber:this.serialNumber,action:"Aprovar",ActionTypeId:99999840,dataFields:{ReviewUserComment:t},AttachmentList:e};const o=this.toastService.loading();try{yield this.processes.CompleteTask(i).toPromise(),this.close(),this.toastService.successMessage()}catch(n){this.toastService.badRequest()}finally{o.remove()}})}sign(t,e){return(0,o.mG)(this,void 0,void 0,function*(){let i={serialNumber:this.serialNumber,action:"Assinado",ActionTypeId:99999842,dataFields:{ReviewUserComment:t},AttachmentList:e};const o=this.toastService.loading();try{yield this.processes.CompleteTask(i).toPromise(),this.close(),this.toastService.successMessage()}catch(n){this.toastService.badRequest()}finally{o.remove()}})}finish(t,e){return(0,o.mG)(this,void 0,void 0,function*(){let i={serialNumber:this.serialNumber,action:"Concluir",ActionTypeId:95,dataFields:{ReviewUserComment:t},AttachmentList:e};const o=this.toastService.loading();try{yield this.processes.CompleteTask(i).toPromise(),this.toastService.successMessage("Processo conclu\xeddo")}catch(n){this.toastService.badRequest()}finally{o.remove()}})}goBack(){this.router.navigate(["/home/gabinete-digital/diplomas-assinar"])}close(){this.popoverController.dismiss()}}return t.\u0275fac=function(e){return new(e||t)(a.Y36(r.Dh),a.Y36(r.IN),a.Y36(c.gz),a.Y36(d.$),a.Y36(r.X1),a.Y36(l.k),a.Y36(c.F0),a.Y36(m))},t.\u0275cmp=a.Xpm({type:t,selectors:[["app-deploma-options"]],decls:3,vars:1,consts:[[1,"container"],[1,"buttons"],["class","aside-right flex-column height-100 width-100",4,"ngIf"],[1,"aside-right","flex-column","height-100","width-100"],["class","buttons width-100",4,"ngIf"],[1,"buttons","width-100"],["shape","round",1,"btn-cancel",3,"click"],[1,"solid"]],template:function(t,e){1&t&&(a.TgZ(0,"ion-content",0),a.TgZ(1,"div",1),a.YNc(2,v,4,3,"div",2),a.qZA(),a.qZA()),2&t&&(a.xp6(2),a.Q6J("ngIf",e.task))},directives:[r.W2,p.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})()}}]); |