mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 04:57:52 +00:00
1 line
9.7 KiB
JavaScript
1 line
9.7 KiB
JavaScript
|
|
!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<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}(self.webpackChunkgabinete_digital=self.webpackChunkgabinete_digital||[]).push([[6204],{6204:function(n,o,i){"use strict";i.r(o),i.d(o,{PendentesPageModule:function(){return T}});var a,r,c=i(38583),d=i(3679),s=i(35957),l=i(39895),g=i(64762),p=i(87732),f=i(44940),u=i(54271),h=i(17690),m=i(37716),P=i(28621),v=i(25970),x=i(37556),C=i(962),_=i(23890),b=i(95526),w=[{path:"",component:(a=function(){function n(e,o,i,a,r){t(this,n),this.processes=e,this.alertService=o,this.router=i,this.authService=a,this.activatedRoute=r,this.skeletonLoader=!0,this.pendentesstore=u.G,this.customTaskPipe=new h.g,this.loggeduser=a.ValidatedUser,this.profile="mdgpr"}var o,i,a;return o=n,(i=[{key:"ngOnInit",value:function(){var t=this;this.segment="despachos";var e=window.location,n=e.pathname+e.search;this.LoadList(),this.router.events.forEach(function(e){e instanceof l.m2&&e.url.startsWith(n)&&(window.location.pathname.split("/").length>=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.CreateDate<e.CreateDate?-1:t.CreateDate>e.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
|