!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<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}(self.webpackChunkngx_admin=self.webpackChunkngx_admin||[]).push([[6236],{46236:function(n,i,c){"use strict";c.r(i),c.d(i,{TicketDeudorModule:function(){return v}});var r,a,o=c(10627),s=c(70419),u=c(54655),d=c(53001),l=c(80710),f=c(37716),k=c(66007),h=[{path:"",component:(r=function(){function n(t,i,c){e(this,n),this.ticketServices=t,this.router=i,this.authService=c,this.settings={mode:"external",actions:{columnTitle:"Tickets",add:!1,edit:!0,delete:!1,select:!0},edit:{editButtonContent:'<i class="nb-compose"></i>',confirmSave:!0},columns:{tck_id:{title:"N\xfamero de ticket",type:"string"},tck_departamento:{title:"Departamento",type:"string"},tck_asunto:{title:"Asunto",type:"string"},tck_fecha_creacion:{title:"Fecha de creaci\xf3n",type:"string"},tck_fecha_cierre:{title:"Fecha de cierre",type:"string"},tck_status:{title:"Estatus",type:"string"}}},this.source=new s.nC}var i,c,r;return i=n,(c=[{key:"ngOnInit",value:function(){this.cargar_tickets()}},{key:"cargar_tickets",value:function(){var e=this;this.ticketServices.listar({usuarioId:this.authService.user.id_usuario}).subscribe(function(t){t.map(function(e){e.tck_fecha_creacion&&(e.tck_fecha_creacion=l.Z.dateFormat(e.tck_fecha_creacion+"")),e.tck_fecha_cierre&&(e.tck_fecha_cierre=l.Z.dateFormat(e.tck_fecha_cierre+""))}),e.source=t})}},{key:"onTicketSelected",value:function(e){var t=e.data.tck_id;console.log({id:t}),this.router.navigateByUrl("Deudor/ticket/detail/".concat(t))}},{key:"onGoToCreateTicket",value:function(){this.router.navigateByUrl("Deudor/ticket/create")}}])&&t(i.prototype,c),r&&t(i,r),n}(),r.\u0275fac=function(e){return new(e||r)(f.Y36(d.w),f.Y36(u.F0),f.Y36(k.e))},r.\u0275cmp=f.Xpm({type:r,selectors:[["ngx-ticket"]],features:[f._Bn([d.w])],decls:9,vars:2,consts:[[2,"display","flex","justify-content","space-between","align-items","center"],["nbButton","","hero","",1,"mat-ripple","appearance-filled","size-medium","shape-rectangle","status-primary","ng-star-inserted","nb-transition",3,"click"],[1,"order-table",3,"settings","source","edit"]],template:function(e,t){1&e&&(f.TgZ(0,"nb-card"),f.TgZ(1,"nb-card-header"),f.TgZ(2,"div",0),f.TgZ(3,"span"),f._uU(4,"Listado de Tickets"),f.qZA(),f.TgZ(5,"button",1),f.NdJ("click",function(){return t.onGoToCreateTicket()}),f._uU(6," Crear ticket "),f.qZA(),f.qZA(),f.qZA(),f.TgZ(7,"nb-card-body"),f.TgZ(8,"ng2-smart-table",2),f.NdJ("edit",function(e){return t.onTicketSelected(e)}),f.qZA(),f.qZA(),f.qZA()),2&e&&(f.xp6(8),f.Q6J("settings",t.settings)("source",t.source))},directives:[o.Asz,o.ndF,o.DPz,o.yKW,s.T5],styles:[""]}),r)}],p=function(){var t=function t(){e(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=f.oAB({type:t}),t.\u0275inj=f.cJS({imports:[[u.Bz.forChild(h)],u.Bz]}),t}(),g=c(62823),m=c(38583),_=c(3679),y=c(78434),v=((a=function t(){e(this,t)}).\u0275fac=function(e){return new(e||a)},a.\u0275mod=f.oAB({type:a}),a.\u0275inj=f.cJS({imports:[[g.O,o.nKr,o.zyh,o.T2N,o.MAY,o.AE1,o.MfT,o.YNG,o.OA,m.ez,_.u5,o.IIj,o.KdK,p,o.zyh,o.caZ,o.KdK,o.nKr,g.O,s.ne,_.UX,y.o]]}),a)}}])}();