!function(){function e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function t(e,t){for(var n=0;n=4&&window.location.pathname.startsWith("/home/gabinete-digital")?e.refreshing():e.LoadList())})}},{key:"goBack",value:function(){this.router.navigate(["/home/gabinete-digital"])}},{key:"goToPedido",value:function(e){this.router.navigate(["/home/gabinete-digital/pedidos",e,"gabinete-digital"])}},{key:"notImplemented",value:function(){this.alertService.presentAlert("Funcionalidade em desenvolvimento")}},{key:"openExpedientDetailPage",value:function(e){console.log(e),this.openExpedientDetail.emit(e)}},{key:"LoadList",value:function(){return(0,c.mG)(this,void 0,void 0,regeneratorRuntime.mark(function e(){var t,n,i,o=this;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(this.skeletonLoader=!0,"parecer"!=this.segment){e.next=13;break}return this.taskType="Pedido de Parecer",e.next=4,this.processes.GetTasksList("Pedido de Parecer",!1).toPromise();case 4:return t=e.sent,e.next=7,this.processes.GetTasksList("Pedido de Parecer do Presidente",!1).toPromise();case 7:n=e.sent,this.skeletonLoader=!1,i=t.concat(n).reverse().filter(function(e){return"Active"==e.workflowInstanceDataFields.Status}),this.parecerList=[],i.filter(function(e){return"Active"==e.workflowInstanceDataFields.Status}).forEach(function(e){var t=new Date(e.taskStartDate);t.setMonth(t.getMonth()+1);var n=t.getFullYear()+"-"+t.getMonth()+"-"+t.getDate()+" "+t.getHours()+":"+t.getMinutes()+":"+t.getSeconds();o.parecerList.push({SerialNumber:e.serialNumber,Folio:e.workflowInstanceDataFields.Subject,Senders:e.workflowInstanceDataFields.Sender,CreateDate:n,DocumentURL:e.workflowInstanceDataFields.ViewerRequest,Remetente:e.workflowInstanceDataFields.Remetente,DocumentsQty:e.totalDocuments,DocId:e.workflowInstanceDataFields.DocIdDiferimento,WorkflowName:e.workflowDisplayName,activityInstanceName:e.activityInstanceName})}),this.pedidosstorage.resetparecer(this.parecerList),e.next=14;break;case 13:"deferimento"==this.segment&&(this.taskType="Pedido de Deferimento",this.processes.GetTasksList("Pedido de Deferimento",!1).subscribe(function(e){o.skeletonLoader=!1,console.log(e),o.deferimentoList=[];var t=e.filter(function(e){return"Active"==e.workflowInstanceDataFields.Status});(t=t.reverse()).forEach(function(e){var t=new Date(e.taskStartDate);t.setMonth(t.getMonth()+1);var n=t.getFullYear()+"-"+t.getMonth()+"-"+t.getDate()+" "+t.getHours()+":"+t.getMinutes()+":"+t.getSeconds();"Active"==e.workflowInstanceDataFields.Status&&o.deferimentoList.push({SerialNumber:e.serialNumber,Folio:e.workflowInstanceDataFields.Subject,Senders:e.workflowInstanceDataFields.Sender,CreateDate:n,DocumentURL:e.workflowInstanceDataFields.ViewerRequest,Remetente:e.workflowInstanceDataFields.Remetente,DocumentsQty:e.totalDocuments,DocId:e.workflowInstanceDataFields.DocIdDiferimento,WorkflowName:e.workflowDisplayName,activityInstanceName:e.activityInstanceName})}),o.pedidosstorage.resetdeferimento(o.deferimentoList)}));case 14:case"end":return e.stop()}},e,this)}))}},{key:"segmentChanged",value:function(e){this.LoadList()}},{key:"refreshing",value:function(){var e=this;setTimeout(function(){e.LoadList()},1500)}},{key:"doRefresh",value:function(e){this.LoadList(),setTimeout(function(){e.target.complete()},2e3)}}])&&t(i.prototype,o),a&&t(i,a),n}(),y.\u0275fac=function(e){return new(e||y)(l.Y36(s.F0),l.Y36(f.$),l.Y36(d.IN),l.Y36(u.c),l.Y36(s.gz))},y.\u0275cmp=l.Xpm({type:y,selectors:[["app-pedidos"]],viewQuery:function(e,t){var n;1&e&&l.Gf(g.eV,5),2&e&&l.iGM(n=l.CRH())&&(t.myCal=n.first)},outputs:{openExpedientDetail:"openExpedientDetail"},decls:29,vars:9,consts:[[1,"ion-no-border"],[1,"ion-no-border","header-2"],[3,"click"],[1,"title"],[1,"thetitle"],[1,"theicon","btn-refresh"],[1,"btn-no-color",3,"click"],["slot","end","name","reload-circle",1,"title-icon"],[3,"ngModel","ngModelChange","ionChange"],["value","parecer"],["value","deferimento"],[1,"main-content","width-100","overflow-y-auto","height-100"],["name","refresher","slot","fixed",3,"ionRefresh"],["pullingIcon","chevron-down-circle-outline","pullingText","deslize para actualizar","refreshingSpinner","circles","refreshingText","A actualizar..."],[1,"width-100",3,"ngSwitch"],["type","indeterminate",4,"ngIf"],[4,"ngIf"],[3,"ngSwitch"],["class","centered-div d-flex height-100 align-center justify-content-center",4,"ngSwitchCase"],["type","indeterminate"],[4,"ngSwitchCase"],["class","expediente ion-no-padding ion-no-margin cursor-pointer",3,"click",4,"ngFor","ngForOf"],[1,"expediente","ion-no-padding","ion-no-margin","cursor-pointer",3,"click"],[1,"item","width-100"],[1,"exp-top-detail"],[1,"subject"],[1,"exp-icon"],["src","assets/images/icons-expediente-attachment.svg"],[1,"exp-bottom-detail"],[1,"exp-remetente"],[1,"exp-middle-detail"],[1,"exp-workflow"],[1,"label"],[1,"exp-date"],[1,"centered-div","d-flex","height-100","align-center","justify-content-center"],["class","empty-list d-flex height-100 align-center justify-content-center",4,"ngIf"],[1,"empty-list","d-flex","height-100","align-center","justify-content-center"],["slot","end"],["animated",""],["animated","",2,"width","50%"],["animated","",2,"width","80%"],["animated","",2,"width","60%"]],template:function(e,t){1&e&&(l.TgZ(0,"ion-header",0),l._UZ(1,"app-header"),l.qZA(),l.TgZ(2,"ion-header",1),l.TgZ(3,"app-btn-modal-dismiss",2),l.NdJ("click",function(){return t.goBack()}),l.qZA(),l.TgZ(4,"div",3),l.TgZ(5,"div",4),l.TgZ(6,"ion-label"),l._uU(7,"Pedidos"),l.qZA(),l.qZA(),l.TgZ(8,"div",5),l.TgZ(9,"button",6),l.NdJ("click",function(e){return t.doRefresh(e)}),l._UZ(10,"ion-icon",7),l.qZA(),l.qZA(),l.qZA(),l.TgZ(11,"ion-toolbar"),l.TgZ(12,"ion-segment",8),l.NdJ("ngModelChange",function(e){return t.segment=e})("ionChange",function(e){return t.segmentChanged(e)}),l.TgZ(13,"ion-segment-button",9),l._uU(14," Parecer "),l.qZA(),l.TgZ(15,"ion-segment-button",10),l._uU(16," Defereimento "),l.qZA(),l.qZA(),l.qZA(),l.qZA(),l.TgZ(17,"ion-content"),l.TgZ(18,"div",11),l.TgZ(19,"ion-refresher",12),l.NdJ("ionRefresh",function(e){return t.segmentChanged(e)}),l._UZ(20,"ion-refresher-content",13),l.qZA(),l.TgZ(21,"div",14),l.YNc(22,Z,1,0,"ion-progress-bar",15),l.YNc(23,_,2,1,"div",16),l.YNc(24,M,2,1,"div",16),l.qZA(),l.TgZ(25,"div",17),l.YNc(26,q,2,1,"div",18),l.YNc(27,T,2,1,"div",18),l.qZA(),l.YNc(28,A,22,0,"div",16),l.qZA(),l.qZA()),2&e&&(l.xp6(12),l.Q6J("ngModel",t.segment),l.xp6(9),l.Q6J("ngSwitch",t.segment),l.xp6(1),l.Q6J("ngIf",t.skeletonLoader),l.xp6(1),l.Q6J("ngIf",t.pedidosstorage.listparecer),l.xp6(1),l.Q6J("ngIf",t.pedidosstorage.listdeferimento),l.xp6(1),l.Q6J("ngSwitch",t.segment),l.xp6(1),l.Q6J("ngSwitchCase","parecer"),l.xp6(1),l.Q6J("ngSwitchCase","deferimento"),l.xp6(1),l.Q6J("ngIf",t.skeletonLoader&&0==t.pedidosstorage.listdeferimento.length&&t.skeletonLoader&&0==t.pedidosstorage.listparecer.length))},directives:[d.Gu,h.E,m.E,d.Q$,d.gu,d.sr,d.cJ,d.QI,r.JJ,r.On,d.GO,d.W2,d.nJ,d.Wo,a.RF,a.O5,a.n9,d.X7,d.q_,a.sg,d.Ie,d.Bs,d.CK],pipes:[a.uU],styles:["[_nghost-%COMP%]{margin:0}.header-2[_ngcontent-%COMP%]{border-top-right-radius:24px;border-top-left-radius:24px}.header-2[_ngcontent-%COMP%], .main-content[_ngcontent-%COMP%], ion-content[_ngcontent-%COMP%]{padding:30px 20px 0!important;background-color:#fff}.main-content[_ngcontent-%COMP%]{padding-top:0!important}.title[_ngcontent-%COMP%]{font-family:Roboto;font-size:25px;color:#000;overflow:auto}.title[_ngcontent-%COMP%] .thetitle[_ngcontent-%COMP%]{float:left}.title[_ngcontent-%COMP%] .theicon[_ngcontent-%COMP%], .title[_ngcontent-%COMP%] .thetitle[_ngcontent-%COMP%]{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}.title[_ngcontent-%COMP%] .theicon[_ngcontent-%COMP%]{float:right}.item-list-small[_ngcontent-%COMP%]{font-size:11px;overflow:hidden}.ion-item-class[_ngcontent-%COMP%]{padding:0}.label-text[_ngcontent-%COMP%]{width:100%;padding:0;margin:0}ion-item[_ngcontent-%COMP%]{--background:none}.item[_ngcontent-%COMP%]{background-color:var(--white);margin:0 auto;overflow:auto}.div-content-expediente[_ngcontent-%COMP%]{width:100%;float:left;border-left:3px solid #dae3f3;padding:5px 5px 15px;margin:10px 0;background:#dae3f3;border-radius:20px}.div-content-pendentes[_ngcontent-%COMP%]{width:100%;float:left;border-left:3px solid #d9d9d9;padding:5px}.div-content-expediente[_ngcontent-%COMP%] h3[_ngcontent-%COMP%], .div-content-pendentes[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:0;padding:0;font-size:14pt;width:100%}.div-icon[_ngcontent-%COMP%]{width:10%;font-size:20px;float:left;color:grey}.div-icon[_ngcontent-%COMP%] ion-icon[_ngcontent-%COMP%]{display:block;margin:0 auto}.div-content-expediente[_ngcontent-%COMP%] p[_ngcontent-%COMP%], .div-content-pendentes[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font-size:14pt;color:#5e5c5c;padding:0;margin:0}.span-left[_ngcontent-%COMP%]{float:left;font-size:12px;padding-left:18px}.span-right[_ngcontent-%COMP%]{text-align:right;float:right;font-size:12px;padding-right:18px}.expediente[_ngcontent-%COMP%]{border-radius:15px;box-shadow:0 0 10px 0 rgba(0,0,0,.07);border:1px solid #e9e9e9!important;background-color:var(--white);margin-bottom:10px!important;padding:15px}.exp-list-item[_ngcontent-%COMP%]{overflow:auto;margin:10px auto}.exp-top-detail[_ngcontent-%COMP%]{width:100%;float:left;font-family:Roboto;font-size:12pt;font-weight:700;color:#0d89d1;padding-left:3px}.exp-top-detail[_ngcontent-%COMP%] .subject[_ngcontent-%COMP%]{width:84%;float:left}.exp-top-detail[_ngcontent-%COMP%] .exp-icon[_ngcontent-%COMP%]{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;float:right;margin:0!important;padding:0!important}.exp-top-detail[_ngcontent-%COMP%] .exp-icon[_ngcontent-%COMP%] ion-icon[_ngcontent-%COMP%]{font-size:12pt;color:#42b9fe;float:left}.exp-top-detail[_ngcontent-%COMP%] .exp-icon[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{font-size:10pt}.exp-bottom-detail[_ngcontent-%COMP%], .exp-middle-detail[_ngcontent-%COMP%]{margin-bottom:5px}.exp-middle-detail[_ngcontent-%COMP%]{font-size:12pt;width:100%;overflow:auto}.exp-middle-detail[_ngcontent-%COMP%] .exp-workflow[_ngcontent-%COMP%]{float:left;margin:0!important}.exp-middle-detail[_ngcontent-%COMP%] .exp-workflow[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{border-radius:15px;background:#ffb703;float:right;padding:2.5px 13.5px;color:#fff}.exp-middle-detail[_ngcontent-%COMP%] .exp-date[_ngcontent-%COMP%]{width:auto;font-family:Roboto;font-size:10pt;font-weight:400;font-stretch:normal;font-style:normal;line-height:normal;letter-spacing:normal;color:#797979;float:right}.exp-bottom-detail[_ngcontent-%COMP%]{font-size:8pt;width:100%;overflow:auto;padding-left:3px}.exp-bottom-detail[_ngcontent-%COMP%] .exp-remetente[_ngcontent-%COMP%]{font-family:Roboto;font-weight:400;color:#000;float:left}.div-top-header[_ngcontent-%COMP%]{width:400px;margin:6px auto;background-color:#0782c9;overflow:auto}.div-search[_ngcontent-%COMP%]{font-size:45px;float:left;margin:0 0 0 10px}.div-logo[_ngcontent-%COMP%]{background:transparent;width:150px;margin:2.5px 0 2.5px 71px;float:left}.div-logo[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:100%}.div-profile[_ngcontent-%COMP%]{font-size:45px;float:right;margin-right:10px}.centered-div[_ngcontent-%COMP%]{width:100px;height:100px;position:absolute;top:50%;left:50%;margin:-35px 0 0 -35px}"]}),y)},{path:"pedido",loadChildren:function(){return Promise.all([o.e(562),o.e(675),o.e(6176),o.e(8592)]).then(o.bind(o,7392)).then(function(e){return e.PedidoPageModule})}}],L=function(){var t=function t(){e(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=l.oAB({type:t}),t.\u0275inj=l.cJS({imports:[[s.Bz.forChild(I)],s.Bz]}),t}(),N=o(6527),S=o(4502),U=((D=function t(){e(this,t)}).\u0275fac=function(e){return new(e||D)},D.\u0275mod=l.oAB({type:D}),D.\u0275inj=l.cJS({imports:[[a.ez,r.u5,d.Pc,L,N.a,S.F]]}),D)}}])}();