(self.webpackChunkngx_admin=self.webpackChunkngx_admin||[]).push([[6236],{46236:function(e,t,c){"use strict";c.r(t),c.d(t,{TicketDeudorModule:function(){return _}});var i=c(10627),r=c(70419),n=c(54655),s=c(53001),a=c(80710),o=c(37716),u=c(66007);const d=[{path:"",component:(()=>{class e{constructor(e,t,c){this.ticketServices=e,this.router=t,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 r.nC}ngOnInit(){this.cargar_tickets()}cargar_tickets(){this.ticketServices.listar({usuarioId:this.authService.user.id_usuario}).subscribe(e=>{e.map(e=>{e.tck_fecha_creacion&&(e.tck_fecha_creacion=a.Z.dateFormat(e.tck_fecha_creacion+"")),e.tck_fecha_cierre&&(e.tck_fecha_cierre=a.Z.dateFormat(e.tck_fecha_cierre+""))}),this.source=e})}onTicketSelected(e){const t=e.data.tck_id;console.log({id:t}),this.router.navigateByUrl(`Deudor/ticket/detail/${t}`)}onGoToCreateTicket(){this.router.navigateByUrl("Deudor/ticket/create")}}return e.\u0275fac=function(t){return new(t||e)(o.Y36(s.w),o.Y36(n.F0),o.Y36(u.e))},e.\u0275cmp=o.Xpm({type:e,selectors:[["ngx-ticket"]],features:[o._Bn([s.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&&(o.TgZ(0,"nb-card"),o.TgZ(1,"nb-card-header"),o.TgZ(2,"div",0),o.TgZ(3,"span"),o._uU(4,"Listado de Tickets"),o.qZA(),o.TgZ(5,"button",1),o.NdJ("click",function(){return t.onGoToCreateTicket()}),o._uU(6," Crear ticket "),o.qZA(),o.qZA(),o.qZA(),o.TgZ(7,"nb-card-body"),o.TgZ(8,"ng2-smart-table",2),o.NdJ("edit",function(e){return t.onTicketSelected(e)}),o.qZA(),o.qZA(),o.qZA()),2&e&&(o.xp6(8),o.Q6J("settings",t.settings)("source",t.source))},directives:[i.Asz,i.ndF,i.DPz,i.yKW,r.T5],styles:[""]}),e})()}];let l=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=o.oAB({type:e}),e.\u0275inj=o.cJS({imports:[[n.Bz.forChild(d)],n.Bz]}),e})();var k=c(62823),h=c(38583),p=c(3679),g=c(78434);let _=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=o.oAB({type:e}),e.\u0275inj=o.cJS({imports:[[k.O,i.nKr,i.zyh,i.T2N,i.MAY,i.AE1,i.MfT,i.YNG,i.OA,h.ez,p.u5,i.IIj,i.KdK,l,i.zyh,i.caZ,i.KdK,i.nKr,k.O,r.ne,p.UX,g.o]]}),e})()}}]);