mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 04:57:52 +00:00
1 line
32 KiB
JavaScript
1 line
32 KiB
JavaScript
(self.webpackChunkgabinete_digital=self.webpackChunkgabinete_digital||[]).push([[3923],{13923:function(t,e,n){"use strict";n.r(e),n.d(e,{DespachoPrPageModule:function(){return Q}});var o=n(38583),i=n(3679),s=n(35957),a=n(39895),c=n(64762),r=n(86807),d=n(45896),l=n(83189),p=n(90562),u=n(56343),g=n(320),m=n(24926),h=n(37716),f=n(28621),x=n(53760),b=n(20985),Z=n(80106),v=n(84465),k=n(962);function C(t,e){if(1&t&&(h.TgZ(0,"div"),h.TgZ(1,"p"),h._uU(2),h.qZA(),h.qZA()),2&t){const t=e.$implicit;h.xp6(2),h.Oqu(t.Name)}}function w(t,e){if(1&t&&(h.TgZ(0,"ion-label"),h.YNc(1,C,3,1,"div",25),h.qZA()),2&t){const t=h.oxw(3);h.xp6(1),h.Q6J("ngForOf",t.intervenientes)}}function M(t,e){if(1&t&&(h.TgZ(0,"div"),h.TgZ(1,"h5"),h._uU(2,"Intervenientes"),h.qZA(),h.TgZ(3,"ion-item",24),h.YNc(4,w,2,1,"ion-label",22),h.qZA(),h.qZA()),2&t){const t=h.oxw(2);h.xp6(4),h.Q6J("ngIf",t.intervenientes)}}function A(t,e){1&t&&(h.TgZ(0,"h5"),h._uU(1,"Com conhecimento"),h.qZA())}function _(t,e){if(1&t&&(h.TgZ(0,"div"),h.TgZ(1,"p"),h._uU(2),h.qZA(),h.qZA()),2&t){const t=e.$implicit;h.xp6(2),h.Oqu(t.Name)}}function P(t,e){if(1&t&&(h.TgZ(0,"ion-item",24),h.TgZ(1,"ion-label"),h.YNc(2,_,3,1,"div",25),h.qZA(),h.qZA()),2&t){const t=h.oxw(3);h.xp6(2),h.Q6J("ngForOf",t.cc)}}function T(t,e){if(1&t&&(h.TgZ(0,"div"),h._uU(1),h.ALo(2,"json"),h.YNc(3,A,2,0,"h5",22),h.YNc(4,P,3,1,"ion-item",26),h.qZA()),2&t){const t=h.oxw(2);h.xp6(1),h.hij(" .. ",h.lcZ(2,3,t.cc)," .. "),h.xp6(2),h.Q6J("ngIf",t.cc.length>0),h.xp6(1),h.Q6J("ngIf",t.cc.length>0)}}function q(t,e){if(1&t&&(h.TgZ(0,"div"),h.TgZ(1,"h5"),h._uU(2,"Detalhes"),h.qZA(),h.TgZ(3,"ion-item",24),h._UZ(4,"p",27),h.qZA(),h.qZA()),2&t){const t=h.oxw(2);h.xp6(4),h.Q6J("innerHTML",t.fulltask.workflowInstanceDataFields.TaskMessage,h.oJD)}}function O(t,e){if(1&t&&(h.TgZ(0,"p",34),h._uU(1),h.TgZ(2,"span",35),h._UZ(3,"ion-icon",36),h.qZA(),h.qZA()),2&t){const t=h.oxw().$implicit;h.xp6(1),h.Oqu(t.Assunto)}}function y(t,e){if(1&t&&(h.TgZ(0,"p",34),h._uU(1),h.TgZ(2,"span",35),h._UZ(3,"ion-icon",36),h.qZA(),h.qZA()),2&t){const t=h.oxw().$implicit;h.xp6(1),h.Oqu(t.DocNumber)}}function D(t,e){if(1&t){const t=h.EpF();h.TgZ(0,"ion-item",29),h.TgZ(1,"ion-label",30),h.NdJ("click",function(){const e=h.CHM(t).$implicit;return h.oxw(3).viewDocument(e.DocId)}),h.YNc(2,O,4,1,"p",31),h.YNc(3,y,4,1,"p",31),h.TgZ(4,"p"),h.TgZ(5,"span",32),h._uU(6),h.qZA(),h.TgZ(7,"span",33),h._uU(8),h.ALo(9,"date"),h.qZA(),h.qZA(),h.qZA(),h.qZA()}if(2&t){const t=e.$implicit;h.xp6(2),h.Q6J("ngIf",t.Assunto),h.xp6(1),h.Q6J("ngIf",!t.Assunto),h.xp6(3),h.Oqu(t.Sender),h.xp6(2),h.Oqu(h.xi3(9,4,t.DocDate,"dd/MM/yy"))}}function N(t,e){if(1&t&&(h.TgZ(0,"ion-list"),h.TgZ(1,"h5"),h._uU(2,"Documentos Anexados"),h.qZA(),h.YNc(3,D,10,7,"ion-item",28),h.qZA()),2&t){const t=h.oxw(2);h.xp6(3),h.Q6J("ngForOf",t.fulltask.Documents)}}function I(t,e){if(1&t){const t=h.EpF();h.TgZ(0,"div",5),h.TgZ(1,"div",6),h.TgZ(2,"div",7),h.TgZ(3,"div",8),h.NdJ("click",function(){return h.CHM(t),h.oxw().goBack()}),h._UZ(4,"ion-icon",9),h.qZA(),h.TgZ(5,"div",10),h.TgZ(6,"div",11),h._uU(7),h.qZA(),h.qZA(),h.TgZ(8,"div",12),h.NdJ("click",function(){return h.CHM(t),h.oxw().openOptions()}),h._UZ(9,"ion-icon",13),h.qZA(),h.qZA(),h.qZA(),h.TgZ(10,"div",14),h.TgZ(11,"div",15),h.TgZ(12,"ion-label"),h.TgZ(13,"p"),h.TgZ(14,"span",16),h._uU(15),h.qZA(),h.TgZ(16,"span",17),h._uU(17),h.qZA(),h.qZA(),h.TgZ(18,"p"),h.TgZ(19,"span",18),h._uU(20),h.qZA(),h.qZA(),h.qZA(),h.qZA(),h.qZA(),h._UZ(21,"div",19),h.TgZ(22,"div",20),h.TgZ(23,"div",21),h.YNc(24,M,5,1,"div",22),h.YNc(25,T,5,5,"div",22),h.YNc(26,q,5,1,"div",22),h.qZA(),h.TgZ(27,"div",23),h.YNc(28,N,4,1,"ion-list",22),h.qZA(),h.qZA(),h.qZA()}if(2&t){const t=h.oxw();h.xp6(7),h.Oqu(t.task.Folio),h.xp6(8),h.Oqu(t.customDate),h.xp6(2),h.Oqu(t.task.activityInstanceName),h.xp6(3),h.Oqu(t.task.DeadlineType),h.xp6(4),h.Q6J("ngIf",t.intervenientes.length>0),h.xp6(1),h.Q6J("ngIf",""!=t.cc&&" "!=t.cc),h.xp6(1),h.Q6J("ngIf",t.fulltask.workflowInstanceDataFields.TaskMessage),h.xp6(2),h.Q6J("ngIf",t.attachments)}}function U(t,e){if(1&t){const t=h.EpF();h.TgZ(0,"button",44),h.NdJ("click",function(){return h.CHM(t),h.oxw(3).sendExpedienteToPending()}),h._uU(1,"Enviar para Pendentes"),h.qZA()}}function S(t,e){if(1&t){const t=h.EpF();h.TgZ(0,"div",39),h.TgZ(1,"div",40),h.TgZ(2,"div"),h._uU(3,"Responder ao PR"),h.qZA(),h.qZA(),h.TgZ(4,"button",41),h.NdJ("click",function(){return h.CHM(t),h.oxw(2).openAddNoteModal("Executado")}),h._uU(5,"Executado"),h.qZA(),h.TgZ(6,"div",40),h._uU(7,"Reencaminhar para \xc1rea jur\xeddica"),h.qZA(),h.TgZ(8,"button",42),h.NdJ("click",function(){return h.CHM(t),h.oxw(2).openAddNoteModal("Gerar Diploma")}),h._uU(9,"Gerar Diploma "),h.qZA(),h.TgZ(10,"div",40),h._uU(11,"Outras op\xe7\xf5es"),h.qZA(),h.TgZ(12,"button",43),h.NdJ("click",function(){h.CHM(t);const e=h.oxw(2);return e.openExpedientActionsModal("0",e.fulltask)}),h._uU(13,"Efetuar Despacho"),h.qZA(),h.TgZ(14,"button",44),h.NdJ("click",function(){h.CHM(t);const e=h.oxw(2);return e.openExpedientActionsModal("1",e.fulltask)}),h._uU(15,"Solicitar Parecer"),h.qZA(),h.TgZ(16,"button",44),h.NdJ("click",function(){h.CHM(t);const e=h.oxw(2);return e.openDelegarModal(e.task)}),h._uU(17,"Delegar"),h.qZA(),h.TgZ(18,"button",44),h.NdJ("click",function(){h.CHM(t);const e=h.oxw(2);return e.openBookMeetingModal(e.task)}),h._uU(19,"Marcar Reuni\xe3o"),h.qZA(),h.YNc(20,U,2,0,"button",45),h.qZA()}if(2&t){const t=h.oxw(2);h.xp6(20),h.Q6J("ngIf","Pending"!=t.task.Status)}}function J(t,e){if(1&t){const t=h.EpF();h.TgZ(0,"button",44),h.NdJ("click",function(){return h.CHM(t),h.oxw(3).sendExpedienteToPending()}),h._uU(1,"Enviar para Pendentes"),h.qZA()}}function R(t,e){if(1&t){const t=h.EpF();h.TgZ(0,"div",39),h.TgZ(1,"button",44),h.NdJ("click",function(){return h.CHM(t),h.oxw(2).openAddNoteModal("Concluido")}),h._uU(2,"Marcar como Conclu\xeddo"),h.qZA(),h.TgZ(3,"button",44),h.NdJ("click",function(){return h.CHM(t),h.oxw(2).openAddNoteModal("Reexecu\xe7\xe3o")}),h._uU(4,"Enviar para Reexecu\xe7\xe3o"),h.qZA(),h.TgZ(5,"button",44),h.NdJ("click",function(){h.CHM(t);const e=h.oxw(2);return e.openBookMeetingModal(e.task)}),h._uU(6,"Marcar Reuni\xe3o"),h.qZA(),h.YNc(7,J,2,0,"button",45),h.qZA()}if(2&t){const t=h.oxw(2);h.xp6(7),h.Q6J("ngIf","Pending"!=t.task.Status)}}function F(t,e){if(1&t&&(h.TgZ(0,"div",37),h.YNc(1,S,21,1,"div",38),h.YNc(2,R,8,1,"div",38),h.qZA()),2&t){const t=h.oxw();h.xp6(1),h.Q6J("ngIf","Tarefa de Despacho"==t.task.activityInstanceName),h.xp6(1),h.Q6J("ngIf","Concluir Despacho"==t.task.activityInstanceName)}}function E(t,e){1&t&&(h.TgZ(0,"div",46),h.TgZ(1,"ion-list"),h.TgZ(2,"ion-list-header"),h.TgZ(3,"ion-label"),h._UZ(4,"ion-skeleton-text",47),h.qZA(),h.qZA(),h.TgZ(5,"ion-item"),h.TgZ(6,"ion-label"),h.TgZ(7,"h3"),h._UZ(8,"ion-skeleton-text",47),h.qZA(),h.TgZ(9,"p"),h._UZ(10,"ion-skeleton-text",48),h.qZA(),h.qZA(),h.qZA(),h.TgZ(11,"ion-item"),h.TgZ(12,"ion-label"),h.TgZ(13,"h3"),h._UZ(14,"ion-skeleton-text",47),h.qZA(),h.TgZ(15,"p"),h._UZ(16,"ion-skeleton-text",48),h.qZA(),h.qZA(),h.qZA(),h.TgZ(17,"ion-item"),h.TgZ(18,"ion-label"),h.TgZ(19,"h3"),h._UZ(20,"ion-skeleton-text",47),h.qZA(),h.TgZ(21,"p"),h._UZ(22,"ion-skeleton-text",48),h.qZA(),h.qZA(),h.qZA(),h.TgZ(23,"ion-button",49),h._UZ(24,"ion-skeleton-text",47),h.qZA(),h.qZA(),h.qZA())}const Y=[{path:"",component:(()=>{class t{constructor(t,e,n,o,i,s,a,c,r,d,l,p){this.activateRoute=t,this.processes=e,this.iab=n,this.attachmentsService=o,this.events=i,this.menu=s,this.router=a,this.modalController=c,this.popoverController=r,this.activatedRoute=d,this.toastService=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.activatedRoute.paramMap.subscribe(t=>{t.params.SerialNumber&&(this.serialnumber=t.params.SerialNumber),t.params.caller&&(this.caller=t.params.caller)})}ngOnInit(){this.profile="mdgpr",console.log(this.serialnumber),this.activateRoute.paramMap.subscribe(t=>{t.has("SerialNumber")&&this.LoadTaskDetail(this.serialnumber)}),this.LoadTaskDetail(this.serialnumber)}close(){this.goBack()}goBack(){this.location.back()}LoadTaskDetail(t){return(0,c.mG)(this,void 0,void 0,function*(){this.processes.GetTask(t).subscribe(t=>{this.task={SerialNumber:t.serialNumber,Folio:t.workflowInstanceDataFields.Subject,Senders:t.originator.email,CreateDate:(0,r.momentG)(new Date(t.taskStartDate),"yyyy-MM-dd HH:mm:ss"),DocumentURL:t.workflowInstanceDataFields.ViewerRequest,Remetente:t.workflowInstanceDataFields.Sender,Note:t.workflowInstanceDataFields.TaskMessage||t.workflowInstanceDataFields.Note,FolderId:t.workflowInstanceDataFields.FolderID,FsId:"361",DocId:t.workflowInstanceDataFields.DispatchDocId,WorkflowName:t.workflowDisplayName,DeadlineType:t.workflowInstanceDataFields.DeadlineType,activityInstanceName:t.activityInstanceName},this.fulltask=t,console.log(this.task),console.log("GetTask",t);let e=new Date(this.task.CreateDate);this.customDate=this.days[e.getDay()]+", "+e.getDate()+" de "+this.months[e.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)||[],this.cc||(this.cc=[])})},t=>{try{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,"361").subscribe(t=>{console.log(t);const e=t.replace("webTRIX.Viewer","webTRIX.Viewer.Branch1");this.iab.create(e,"_blank").show()})}openMenu(){this.menu.open(),this.modalController.dismiss()}executado(t,e){return(0,c.mG)(this,void 0,void 0,function*(){let n={serialNumber:this.serialnumber,action:"Conhecimento",ActionTypeId:104,dataFields:{ReviewUserComment:t},AttachmentList:e};const o=this.toastService.loading();try{yield this.processes.CompleteTask(n).toPromise(),this.close(),this.toastService.successMessage()}catch(i){this.toastService.badRequest()}finally{o.remove()}})}arquivar(t,e){return(0,c.mG)(this,void 0,void 0,function*(){let n={serialNumber:this.serialnumber,action:"Arquivo",ActionTypeId:95,dataFields:{ReviewUserComment:t},AttachmentList:e};const o=this.toastService.loading();try{yield this.processes.CompleteTask(n).toPromise(),this.toastService.successMessage("Processo arquivado"),this.close()}catch(i){this.toastService.badRequest("Processo n\xe3o arquivado")}finally{o.remove()}})}generateDiploma(t,e){return(0,c.mG)(this,void 0,void 0,function*(){let n={serialNumber:this.serialnumber,action:"Reencaminhar",ActionTypeId:99999839,dataFields:{ReviewUserComment:t},AttachmentList:e};const o=this.toastService.loading();try{yield this.processes.CompleteTask(n).toPromise(),this.toastService.successMessage("Processo criado"),this.close()}catch(i){this.toastService.badRequest("Processo n\xe3o criado")}finally{o.remove()}})}concluir(t,e){return(0,c.mG)(this,void 0,void 0,function*(){let n={serialNumber:this.serialnumber,action:"Executado",ActionTypeId:104,dataFields:{ReviewUserComment:t},AttachmentList:e};const o=this.toastService.loading();try{yield this.processes.CompleteTask(n).toPromise(),this.toastService.successMessage(""),this.close()}catch(i){this.toastService.badRequest()}finally{o.remove()}})}reexecutar(t,e){return(0,c.mG)(this,void 0,void 0,function*(){let n={serialNumber:this.serialnumber,action:"Reexecutar",ActionTypeId:100000010,dataFields:{ReviewUserComment:t},AttachmentList:e};const o=this.toastService.loading();try{yield this.processes.CompleteTask(n).toPromise(),this.toastService.successMessage(),this.close()}catch(i){this.toastService.badRequest()}finally{o.remove()}})}toDateString(t){return new Date(t).toDateString()}sendExpedienteToPending(){this.processes.SetTaskToPending(this.serialnumber).subscribe(t=>{this.goBack(),this.toastService.successMessage("Processo enviado para pendentes")},()=>{this.toastService.badRequest("Processo n\xe3o encontrado")})}openAddNoteModal(t){return(0,c.mG)(this,void 0,void 0,function*(){let e;e=window.innerWidth<=800?"modal modal-desktop":"add-note-modal-no-height";const n=yield this.modalController.create({component:g.C,componentProps:{showAttachmentBtn:!0},cssClass:e,backdropDismiss:!0});yield n.present(),n.onDidDismiss().then(e=>(0,c.mG)(this,void 0,void 0,function*(){if(console.log(e),e.data){let n={ProcessInstanceID:"",Attachments:e.data.documents.map(t=>({ApplicationId:t.ApplicationType,SourceId:t.Id}))};"Executado"==t?yield this.executado(e.data.note,n):"Arquivar"==t?yield this.arquivar(e.data.note,n):"Gerar Diploma"==t?yield this.generateDiploma(e.data.note,n):"Concluido"==t?yield this.concluir(e.data.note,n):"Reexecu\xe7\xe3o"==t&&(yield this.reexecutar(e.data.note,n)),this.goBack()}}))})}openExpedientActionsModal(t,e){return(0,c.mG)(this,void 0,void 0,function*(){let n;n=window.innerWidth<=800?"modal modal-desktop":"modal modal-desktop showAsideOptions";const o=yield this.modalController.create({component:p.A,componentProps:{taskAction:t,task:e,profile:this.profile,fulltak:this.fulltask},cssClass:n});yield o.present(),o.onDidDismiss().then(t=>{console.log(t.data),"openDiscart"==t.data&&(console.log("open discart"),this.distartExpedientModal()),this.goBack()})})}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:l.k,componentProps:{task:this.task},cssClass:t,backdropDismiss:!1});yield e.present(),e.onDidDismiss()})}openDelegarModal(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:u.i,componentProps:{task:this.task},cssClass:t,backdropDismiss:!1});yield e.present(),e.onDidDismiss()})}distartExpedientModal(){return(0,c.mG)(this,void 0,void 0,function*(){console.log(this.fulltask);const t=yield this.modalController.create({component:d.Q,componentProps:{serialNumber:this.fulltask.serialNumber,folderId:this.fulltask.workflowInstanceDataFields.FolderID,action:"complete"},cssClass:"discart-expedient-modal",backdropDismiss:!1});yield t.present(),t.onDidDismiss().then(t=>{"close"==t.data&&this.close()})})}openOptions(t){return(0,c.mG)(this,void 0,void 0,function*(){const e=yield this.popoverController.create({component:m.f,cssClass:"exp-options",componentProps:{task:this.task,fulltask:this.fulltask,taskAction:t,showEnviarPendentes:!1},translucent:!0});yield e.present(),e.onDidDismiss().then(t=>{"close"==t.data&&this.goBack(),console.log("alert ..."+JSON.stringify(t))})})}}return t.\u0275fac=function(e){return new(e||t)(h.Y36(a.gz),h.Y36(f.$),h.Y36(x.i),h.Y36(b.o),h.Y36(Z.n),h.Y36(s._q),h.Y36(a.F0),h.Y36(s.IN),h.Y36(s.Dh),h.Y36(a.gz),h.Y36(v.k),h.Y36(o.Ye))},t.\u0275cmp=h.Xpm({type:t,selectors:[["app-despacho-pr"]],decls:7,vars:3,consts:[[1,"ion-no-border","px-20"],[1,"main-content","d-flex","height-100","px-20"],["class","content d-flex flex-column",4,"ngIf"],["class","aside-right flex-column height-100 px-20",4,"ngIf"],["class","px-20",4,"ngIf"],[1,"content","d-flex","flex-column"],[1,"main-header"],[1,"title-content","width-100","d-flex","justify-space-between","align-center"],["defaultHref","#",1,"font-30","cursor-pointer","align-center","d-flex",3,"click"],["slot","end","src","assets/images/icons-arrow-arrow-left.svg"],[1,"middle","d-flex","align-center","flex-grow-1"],[1,"title"],[1,"div-icon",3,"click"],["src","assets/images/icons-menu.svg",1,"font-25","cursor-pointer"],[1,"upper-content"],[1,"content-details"],[1,"date"],[1,"label"],[1,"color-red"],[1,"line"],[1,"overflow-y-auto"],[1,"middle-content"],[4,"ngIf"],[1,"bottom-content","width-100"],[1,"ion-no-margin","ion-no-padding"],[4,"ngFor","ngForOf"],["class","ion-no-margin ion-no-padding",4,"ngIf"],[3,"innerHTML"],["class","ion-no-margin ion-no-padding cursor-pointer",4,"ngFor","ngForOf"],[1,"ion-no-margin","ion-no-padding","cursor-pointer"],[3,"click"],["class","attach-title-item",4,"ngIf"],[1,"span-left"],[1,"span-right"],[1,"attach-title-item"],[1,"span-right","color-red","btn-size"],["hidden","","name","close"],[1,"aside-right","flex-column","height-100","px-20"],["class","buttons",4,"ngIf"],[1,"buttons"],[1,"option-desc"],["shape","round",1,"btn-cancel","mb-0",2,"margin-bottom","0px !important",3,"click"],["shape","round",1,"btn-cancel",2,"margin-bottom","0px !important",3,"click"],["shape","round",1,"btn-ok",3,"click"],["shape","round",1,"btn-cancel",3,"click"],["class","btn-cancel","shape","round",3,"click",4,"ngIf"],[1,"px-20"],["animated","",2,"width","50%"],["animated","",2,"width","80%"],["color","medium","shape","round","expand","block"]],template:function(t,e){1&t&&(h.TgZ(0,"ion-header",0),h._UZ(1,"app-header"),h.qZA(),h.TgZ(2,"ion-content"),h.TgZ(3,"div",1),h.YNc(4,I,29,8,"div",2),h.YNc(5,F,3,2,"div",3),h.YNc(6,E,25,0,"div",4),h.qZA(),h.qZA()),2&t&&(h.xp6(4),h.Q6J("ngIf",e.task),h.xp6(1),h.Q6J("ngIf",e.task),h.xp6(1),h.Q6J("ngIf",!e.task))},directives:[s.Gu,k.E,s.W2,o.O5,s.gu,s.Q$,s.Ie,o.sg,s.q_,s.yh,s.CK,s.YG],pipes:[o.Ts,o.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 0 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%] .div-icon[_ngcontent-%COMP%]{width:40px;float:right;font-size:35px;overflow:auto;padding:1px}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){.div-icon[_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%}}.option-desc[_ngcontent-%COMP%]{display:flex;color:#828282;width:100%;justify-content:space-between;align-items:center;font-size:11pt}.option-desc[_ngcontent-%COMP%] .option-desc-line[_ngcontent-%COMP%]{height:1px;flex-grow:1;background-color:#e0e0e0;padding-left:4px}"]}),t})()}];let G=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=h.oAB({type:t}),t.\u0275inj=h.cJS({imports:[[a.Bz.forChild(Y)],a.Bz]}),t})();var z=n(6527);let Q=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=h.oAB({type:t}),t.\u0275inj=h.cJS({imports:[[o.ez,i.u5,s.Pc,G,z.a]]}),t})()},24926:function(t,e,n){"use strict";n.d(e,{f:function(){return k}});var o=n(64762),i=n(90562),s=n(56343),a=n(320),c=n(83189),r=n(45896),d=n(37716),l=n(39895),p=n(28621),u=n(35957),g=n(84465),m=n(38583),h=n(96529);function f(t,e){if(1&t){const t=d.EpF();d.TgZ(0,"button",14),d.NdJ("click",function(){return d.CHM(t),d.oxw(2).sendExpedienteToPending()}),d._uU(1,"Enviar para pendentes"),d.qZA()}}function x(t,e){if(1&t){const t=d.EpF();d.TgZ(0,"div",8),d.TgZ(1,"div",9),d.TgZ(2,"button",10),d._uU(3," Responder ao PR "),d.qZA(),d.TgZ(4,"button",11),d.NdJ("click",function(){return d.CHM(t),d.oxw().openAddNoteModal("Executado")}),d._uU(5,"Executado"),d.qZA(),d.TgZ(6,"button",10),d._uU(7," Reencaminhar para \xc1rea jur\xeddica "),d.qZA(),d.TgZ(8,"button",11),d.NdJ("click",function(){return d.CHM(t),d.oxw().openAddNoteModal("Gerar Diploma")}),d._uU(9,"Gerar Diploma"),d.qZA(),d.TgZ(10,"button",10),d._uU(11," Outras op\xe7\xf5es "),d.qZA(),d.TgZ(12,"button",12),d.NdJ("click",function(){d.CHM(t);const e=d.oxw();return e.openExpedientActionsModal("0",e.fulltask)}),d._uU(13,"Efetuar Despacho"),d.qZA(),d.qZA(),d.TgZ(14,"div",9),d.TgZ(15,"button",11),d.NdJ("click",function(){d.CHM(t);const e=d.oxw();return e.openExpedientActionsModal("1",e.fulltask)}),d._uU(16,"Solicitar Parecer"),d.qZA(),d.TgZ(17,"button",11),d.NdJ("click",function(){d.CHM(t);const e=d.oxw();return e.openExpedientActionsModal("2",e.fulltask)}),d._uU(18,"Pedido de Deferimento"),d.qZA(),d.TgZ(19,"button",11),d.NdJ("click",function(){d.CHM(t);const e=d.oxw();return e.openDelegarModal(e.task)}),d._uU(20,"Delegar"),d.qZA(),d.YNc(21,f,2,0,"button",13),d.qZA(),d.qZA()}if(2&t){const t=d.oxw();d.xp6(21),d.Q6J("ngIf","Pending"!=t.task.Status)}}function b(t,e){if(1&t){const t=d.EpF();d.TgZ(0,"button",11),d.NdJ("click",function(){return d.CHM(t),d.oxw(2).sendExpedienteToPending()}),d._uU(1,"Enviar para Pendentes"),d.qZA()}}function Z(t,e){if(1&t){const t=d.EpF();d.TgZ(0,"div",8),d.TgZ(1,"div",9),d.TgZ(2,"button",12),d.NdJ("click",function(){d.CHM(t);const e=d.oxw();return e.openExpedientActionsModal("0",e.fulltask)}),d._uU(3,"Efetuar Despacho"),d.qZA(),d._UZ(4,"div",6),d.TgZ(5,"button",11),d.NdJ("click",function(){d.CHM(t);const e=d.oxw();return e.openExpedientActionsModal("1",e.fulltask)}),d._uU(6,"Solicitar Parecer"),d.qZA(),d.YNc(7,b,2,0,"button",15),d._UZ(8,"div",16),d.TgZ(9,"button",17),d._uU(10,"Delegar"),d.qZA(),d.qZA(),d.qZA()}if(2&t){const t=d.oxw();d.xp6(7),d.Q6J("ngIf","Pending"!=t.task.Status)}}const v=function(){return["PR"]};let k=(()=>{class t{constructor(t,e,n,o,i,s,a,c,r){this.activateRoute=t,this.processes=e,this.router=n,this.modalController=o,this.popoverController=i,this.activatedRoute=s,this.toastService=a,this.location=c,this.p=r}ngOnInit(){this.profile="mdgpr",this.activatedRoute.queryParams.subscribe(t=>{t.serialNumber&&(this.serialnumber=t.serialNumber,console.log(t.serialNumber))})}close(){this.goBack()}openExpedientActionsModal(t,e){return(0,o.mG)(this,void 0,void 0,function*(){let n;this.popoverController.dismiss(),n=window.innerWidth<=800?"modal modal-desktop":"modal modal-desktop showAsideOptions";const o=yield this.modalController.create({component:i.A,componentProps:{taskAction:t,task:e,profile:this.profile,fulltask:this.fulltask},cssClass:n});yield o.present(),o.onDidDismiss().then(t=>{console.log(t.data),"openDiscart"==t.data&&(console.log("open discart"),this.distartExpedientModal()),this.popoverController.dismiss("close")})})}sendExpedienteToPending(){this.processes.SetTaskToPending(this.serialnumber).subscribe(t=>{console.log(t),this.close()},()=>{this.toastService.badRequest("Processo n\xe3o encontrado")})}distartExpedientModal(){return(0,o.mG)(this,void 0,void 0,function*(){this.popoverController.dismiss(),console.log(this.fulltask);const t=yield this.modalController.create({component:r.Q,componentProps:{serialNumber:this.fulltask.serialNumber,folderId:this.fulltask.workflowInstanceDataFields.FolderID,action:"complete"},cssClass:"discart-expedient-modal",backdropDismiss:!1});yield t.present(),t.onDidDismiss().then(t=>{"close"==t.data&&this.close(),this.popoverController.dismiss("close")})})}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:c.k,componentProps:{task:this.task},cssClass:t,backdropDismiss:!1});yield e.present(),e.onDidDismiss()})}openDelegarModal(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.i,componentProps:{task:this.task},cssClass:t,backdropDismiss:!1});yield e.present(),e.onDidDismiss()})}generateDiploma(t,e){return(0,o.mG)(this,void 0,void 0,function*(){let n={serialNumber:this.serialnumber,action:"Reencaminhar",ActionTypeId:99999839,dataFields:{ReviewUserComment:t},AttachmentList:e};const o=this.toastService.loading();try{yield this.processes.CompleteTask(n).toPromise(),this.toastService.successMessage(),this.close()}catch(i){this.toastService.badRequest()}finally{o.remove()}})}openAddNoteModal(t){return(0,o.mG)(this,void 0,void 0,function*(){let e;this.popoverController.dismiss(),window,e="modal modal-desktop";const n=yield this.modalController.create({component:a.C,componentProps:{},cssClass:"modal modal-desktop",backdropDismiss:!0});yield n.present(),n.onDidDismiss().then(e=>(0,o.mG)(this,void 0,void 0,function*(){if(console.log(e),e.data){let n={ProcessInstanceID:"",Attachments:e.data.documents.map(t=>({ApplicationId:t.ApplicationType,SourceId:t.Id}))};"Executado"==t?yield this.executado(e.data.note,n):"Arquivar"==t?yield this.arquivar(e.data.note,n):"Gerar Diploma"==t?yield this.generateDiploma(e.data.note,n):"Concluido"==t||"Reexecu\xe7\xe3o"==t&&(yield this.reexecutar(e.data.note,n)),this.goBack()}}))})}arquivar(t,e){return(0,o.mG)(this,void 0,void 0,function*(){let n={serialNumber:this.serialnumber,action:"Arquivo",ActionTypeId:95,dataFields:{ReviewUserComment:t},AttachmentList:e};const o=this.toastService.loading();try{yield this.processes.CompleteTask(n).toPromise(),this.toastService.successMessage("Processo arquivado"),this.close()}catch(i){this.toastService.badRequest("Processo n\xe3o arquivado")}finally{o.remove()}})}executado(t,e){return(0,o.mG)(this,void 0,void 0,function*(){let n={serialNumber:this.serialnumber,action:"Conhecimento",ActionTypeId:104,dataFields:{ReviewUserComment:t},AttachmentList:e};const o=this.toastService.loading();try{yield this.processes.CompleteTask(n).toPromise(),this.close(),this.toastService.successMessage()}catch(i){this.toastService.badRequest()}finally{o.remove()}})}reexecutar(t,e){return(0,o.mG)(this,void 0,void 0,function*(){let n={serialNumber:this.serialnumber,action:"Reexecutar",ActionTypeId:100000010,dataFields:{ReviewUserComment:t},AttachmentList:e};const o=this.toastService.loading();try{yield this.processes.CompleteTask(n).toPromise(),this.toastService.successMessage(),this.close()}catch(i){this.toastService.badRequest()}finally{o.remove()}})}goBack(){this.location.back()}}return t.\u0275fac=function(e){return new(e||t)(d.Y36(l.gz),d.Y36(p.$),d.Y36(l.F0),d.Y36(u.IN),d.Y36(u.Dh),d.Y36(l.gz),d.Y36(g.k),d.Y36(m.Ye),d.Y36(h.$))},t.\u0275cmp=d.Xpm({type:t,selectors:[["app-despachos-pr-options"]],decls:10,vars:4,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"],[1,"width-100"],["class","d-flex width-100",4,"ngIf"],[1,"solid"],["full","","shape","round",1,"btn-cancel",3,"click"],[1,"d-flex","width-100"],[1,"flex-grow-1"],["shape","round",1,"btn-cancel","desk"],["shape","round",1,"btn-cancel",3,"click"],["shape","round",1,"btn-ok",3,"click"],["full","","class","btn-ok","shape","round",3,"click",4,"ngIf"],["full","","shape","round",1,"btn-ok",3,"click"],["class","btn-cancel","shape","round",3,"click",4,"ngIf"],["hidden","",1,"solid"],["hidden","","shape","round",1,"btn-cancel"]],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.TgZ(4,"div",4),d.YNc(5,x,22,1,"div",5),d.YNc(6,Z,11,1,"div",5),d._UZ(7,"div",6),d.TgZ(8,"button",7),d.NdJ("click",function(){return e.close()}),d._uU(9,"Cancelar"),d.qZA(),d.qZA(),d.qZA()),2&t&&(d.xp6(5),d.Q6J("ngIf",e.task&&!e.p.userRole(d.DdM(2,v))),d.xp6(1),d.Q6J("ngIf",e.task&&e.p.userRole(d.DdM(3,v))))},directives:[u.W2,u.gu,m.O5],styles:[".container[_ngcontent-%COMP%]{--padding-top:20px!important;--padding-bottom:20px!important;--padding-start:20px!important;--padding-end:20px!important;width:100%}.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}.btn-cancel[_ngcontent-%COMP%], .btn-delete[_ngcontent-%COMP%], .btn-ok[_ngcontent-%COMP%]{width:100%!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}}.desk[_ngcontent-%COMP%]{text-align:left;background-color:#fff}"]}),t})()}}]); |