(self.webpackChunkngx_admin=self.webpackChunkngx_admin||[]).push([[181],{181:function(e,t,i){"use strict";i.r(t),i.d(t,{UsuariosEsperaModule:function(){return g}});var a=i(10627),r=i(70419),o=i(54655),s=i(8255),n=i(35617),l=i(37716);let c=(()=>{class e{constructor(e,t){this.clienteservices=e,this.windowService=t,this.usuario_espera={wait_l_id:"",wait_l_nombre_cli:"",wait_l_direccion:"",wait_l_ciudad:"",wait_l_pais:"",wait_l_rif:"",wait_l_responsable_admin:"",wait_l_telefono_usuario:"",wait_l_telefono_cliente:"asd",wait_l_representante:"",wait_l_correo_usuario:""},this.valueWidth=!1,this.settings={mode:"external",actions:{columnTitle:"Acciones",add:!1,edit:!1,select:!1},delete:{deleteButtonContent:'<i class="nb-trash"></i>',confirmDelete:!0},columns:{wait_l_nombre_cli:{title:"Cliente",type:"string"},wait_l_responsable_admin:{title:"Responsable administrativo",type:"string"},wait_l_correo_usuario:{title:"Correo resp. adminsitrativo",type:"string"},wait_l_representante:{title:"Representante Comercial",type:"string"},button:{title:"Detalles",type:"custom",filter:!1,renderComponent:u,onComponentInitFunction(e){e.save.subscribe(e=>{console.log(e),localStorage.clear(),localStorage.setItem("id",e.wait_l_id),localStorage.setItem("direccion",e.wait_l_direccion),localStorage.setItem("ciudad",e.wait_l_ciudad),localStorage.setItem("pais",e.wait_l_pais),localStorage.setItem("nombre",e.wait_l_nombre_cli),localStorage.setItem("rif",e.wait_l_rif),localStorage.setItem("resp_admin",e.wait_l_responsable_admin),localStorage.setItem("telf_resp_admin",e.wait_l_telefono_usuario),localStorage.setItem("telf_cli",e.wait_l_telefono_cliente),localStorage.setItem("mail_resp_admin",e.wait_l_correo_usuario),localStorage.setItem("rep_comercial",e.wait_l_representante)})}}}},this.source=new r.nC}ngOnInit(){this.obtener_operator()}obtener_operator(){this.clienteservices.obtener().subscribe(e=>{this.variable=e,this.source.load(this.variable)})}obtener_operator_1(e){this.clienteservices.obtener_esp(e).subscribe(e=>{this.variable=e,this.source.load(this.variable)})}onDeleteConfirm(e){window.confirm("Esta seguro que lo desea eliminar?")?(this.clienteservices.eliminar(e.data.wait_l_id).subscribe(e=>{console.log("borrar espera"),console.log(e),this.obtener_operator_1(localStorage.getItem("id"))}),alert("El usuario ha sido eliminado")):e.confirm.reject()}openWindow(e){this.windowService.open(e,{title:"Datos del usuario",context:{text:"some text to pass into template"}})}}return e.\u0275fac=function(t){return new(t||e)(l.Y36(s.z),l.Y36(a.eJ1))},e.\u0275cmp=l.Xpm({type:e,selectors:[["ngx-user"]],features:[l._Bn([s.z,n.$])],decls:5,vars:2,consts:[[1,"order-table",3,"settings","source","delete"]],template:function(e,t){1&e&&(l.TgZ(0,"nb-card"),l.TgZ(1,"nb-card-header"),l._uU(2,"Usuarios en espera por aprobaci\xf3n"),l.qZA(),l.TgZ(3,"nb-card-body"),l.TgZ(4,"ng2-smart-table",0),l.NdJ("delete",function(e){return t.onDeleteConfirm(e)}),l.qZA(),l.qZA(),l.qZA()),2&e&&(l.xp6(4),l.Q6J("settings",t.settings)("source",t.source))},directives:[a.Asz,a.ndF,a.yKW,r.T5],encapsulation:2}),e})(),u=(()=>{class e extends c{constructor(e,t,i){super(t,i),this.router=e,this.save=new l.vpe}ngOnInit(){this.renderValue=this.value.toString().toUpperCase()}onClick(){console.log(this.save.emit(this.rowData)),this.router.navigate(["sistema/usuarios_espera/view_u_espera"])}}return e.\u0275fac=function(t){return new(t||e)(l.Y36(o.F0),l.Y36(s.z),l.Y36(a.eJ1))},e.\u0275cmp=l.Xpm({type:e,selectors:[["button-view"]],inputs:{value:"value",rowData:"rowData"},outputs:{save:"save"},features:[l.qOj],decls:1,vars:0,consts:[[1,"fas","fa-camera","fa-3x",3,"click"]],template:function(e,t){1&e&&(l.TgZ(0,"i",0),l.NdJ("click",function(){return t.onClick()}),l.qZA())},encapsulation:2}),e})();const _=[{path:"",component:c}];let d=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=l.oAB({type:e}),e.\u0275inj=l.cJS({imports:[[o.Bz.forChild(_)],o.Bz]}),e})();var p=i(62823),m=i(38583),w=i(3679);let g=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=l.oAB({type:e}),e.\u0275inj=l.cJS({imports:[[p.O,a.nKr,a.zyh,a.T2N,a.MAY,a.AE1,a.MfT,a.YNG,a.OA,m.ez,w.u5,a.IIj,a.KdK,a.zyh,a.caZ,a.KdK,a.nKr,p.O,d,r.ne]]}),e})()}}]);