!function(){function t(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function e(t,e){for(var n=0;n=4&&window.location.pathname.startsWith("/home/gabinete-digital")?t.refreshing():t.LoadList())})}},{key:"segmentChanged",value:function(t){this.refreshing()}},{key:"goBack",value:function(){this.router.navigate(["/home/gabinete-digital"])}},{key:"notImplemented",value:function(){this.alertService.presentAlert("Funcionalidade em desenvolvimento")}},{key:"LoadList",value:function(){return(0,g.mG)(this,void 0,void 0,regeneratorRuntime.mark(function t(){var e,n,o=this;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return this.skeletonLoader=!0,t.next=3,this.processes.GetPendingTasks(!1).toPromise();case 3:e=t.sent,n=[],e.forEach(function(t){var e=o.customTaskPipe.transform(t);n.push(e)}),n=(0,f.removeDuplicate)(n),n=this.sortArrayISODate(n),this.pendentesstore.reset(n),this.skeletonLoader=!1;case 6:case"end":return t.stop()}},t,this)}))}},{key:"sortArrayISODate",value:function(t){return t.sort(function(t,e){return t.CreateDatee.CreateDate?1:0})}},{key:"refreshing",value:function(){return(0,g.mG)(this,void 0,void 0,regeneratorRuntime.mark(function t(){var e=this;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:setTimeout(function(){e.LoadList()},1500);case 1:case"end":return t.stop()}},t)}))}},{key:"doRefresh",value:function(t){this.LoadList(),setTimeout(function(){t.target.complete()},2e3)}},{key:"viewTaskDetails",value:function(t){var e=t.SerialNumber,n=t.WorkflowName,o=t.activityInstanceName;return(0,g.mG)(this,void 0,void 0,regeneratorRuntime.mark(function t(){return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:"Despacho"==n?this.router.navigate(["/home/gabinete-digital/despachos",e,"gabinete-digital"]):"Pedido de Parecer"==n||"Pedido de Deferimento"==n||"Pedido de Parecer do Presidente"==n?this.router.navigate(["/home/gabinete-digital/pedidos",e,"gabinete-digital"]):"Expediente"==n?this.router.navigate(["/home/gabinete-digital/expediente",e,"gabinete-digital"]):"Expediente"==n&&"PR"==this.loggeduser.Profile?this.router.navigate(["/home/gabinete-digital/expedientes-pr",e,"gabinete-digital"]):"Tarefa de Parecer"==o?this.router.navigate(["/home/gabinete-digital/pedidos",e,"gabinete-digital"]):"Tarefa de Despacho"==o?this.router.navigate(["/home/gabinete-digital/despachos",e,"gabinete-digital"]):console.log("cant find page for this task",n,o);case 1:case"end":return t.stop()}},t,this)}))}},{key:"toDateString",value:function(t){return new Date(t).toDateString()}}])&&e(o.prototype,i),a&&e(o,a),n}(),a.\u0275fac=function(t){return new(t||a)(m.Y36(P.$),m.Y36(v.c),m.Y36(l.F0),m.Y36(x.e),m.Y36(l.gz))},a.\u0275cmp=m.Xpm({type:a,selectors:[["app-pendentes"]],viewQuery:function(t,e){var n;1&t&&m.Gf(p.eV,5),2&t&&m.iGM(n=m.CRH())&&(e.myCal=n.first)},inputs:{profile:"profile"},decls:15,vars:2,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"],[2,"background-color","white"],["name","refresher","slot","fixed",3,"ionRefresh"],["pullingIcon","chevron-down-circle-outline","pullingText","deslize para actualizar","refreshingSpinner","circles","refreshingText","A actualizar..."],[1,"height-100",3,"taskList","skeletonLoader","viewTaskDetail"]],template:function(t,e){1&t&&(m.TgZ(0,"ion-header",0),m._UZ(1,"app-header"),m.qZA(),m.TgZ(2,"ion-header",1),m.TgZ(3,"app-btn-modal-dismiss",2),m.NdJ("click",function(){return e.goBack()}),m.qZA(),m.TgZ(4,"div",3),m.TgZ(5,"div",4),m.TgZ(6,"ion-label"),m._uU(7,"Pendentes"),m.qZA(),m.qZA(),m.TgZ(8,"div",5),m.TgZ(9,"button",6),m.NdJ("click",function(t){return e.doRefresh(t)}),m._UZ(10,"ion-icon",7),m.qZA(),m.qZA(),m.qZA(),m.qZA(),m.TgZ(11,"ion-content",8),m.TgZ(12,"ion-refresher",9),m.NdJ("ionRefresh",function(t){return e.doRefresh(t)}),m._UZ(13,"ion-refresher-content",10),m.qZA(),m.TgZ(14,"app-task-list",11),m.NdJ("viewTaskDetail",function(t){return e.viewTaskDetails(t)}),m.qZA(),m.qZA()),2&t&&(m.xp6(14),m.Q6J("taskList",e.pendentesstore.list)("skeletonLoader",e.skeletonLoader))},directives:[s.Gu,C.E,_.E,s.Q$,s.gu,s.W2,s.nJ,s.Wo,b.V],styles:["[_nghost-%COMP%]{margin:0}.header-2[_ngcontent-%COMP%]{border-top-right-radius:24px;border-top-left-radius:24px;padding:30px 20px 0!important;background-color:#fff}.main-content[_ngcontent-%COMP%]{background-color:#fff;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}"]}),a)}],O=function(){var e=function e(){t(this,e)};return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=m.oAB({type:e}),e.\u0275inj=m.cJS({imports:[[l.Bz.forChild(w)],l.Bz]}),e}(),M=i(6527),k=i(4502),y=i(84747),T=((r=function e(){t(this,e)}).\u0275fac=function(t){return new(t||r)},r.\u0275mod=m.oAB({type:r}),r.\u0275inj=m.cJS({imports:[[c.ez,d.u5,s.Pc,O,M.a,k.F,y.TaskListPageModule]]}),r)}}])}();