PageSourceSearch

https://www.fepetanca.com/24621.37ad781ce5fd078d.js

js fepetanca.com collected 2026-10-02 13:59:21 UTC 31,956 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkapp=self.webpackChunkapp||[]).push([[24621],{20714:(Q,A,a)=>{a.d(A,{D:()=>z});var U=a(10467),p=a(73664),I=a(97336),G=a(69915),T=a(60152),y=a(7044),S=a(67201),x=a(74173),O=a(25615),$=a(18530),R=a(13961),B=a(72928),P=a(92630),K=a(96732),E=a(2615),s=a(36229),V=a(91029),M=a(94474),D=a(72200),W=a(49255),N=a(95064),Y=a(68018);function k(v,F){1&v&&p.nrm(0,"app-skeleton-table")}function u(v,F){1&v&&(p.nrm(0,"app-alerts",4),p.nI1(1,"translate")),2&v&&p.Y8G("mensaje",p.bMT(1,1,"module.publications.save_category_changes"))}function j(v,F){if(1&v){const e=p.RV6();p.qex(0),p.j41(1,"div",1)(2,"div"),p.DNE(3,u,2,3,"app-alerts",2),p.j41(4,"app-clupik-table",3),p.bIt("onButtonClicked",function(n){E.eBV(e);const d=p.XpG();return E.Njj(d.selectAction(n))})("onRowClicked",function(n){E.eBV(e);const d=p.XpG();return E.Njj(d.goToCategory(n))})("onSelectAllActionClicked",function(n){E.eBV(e);const d=p.XpG();return E.Njj(d.selectMultipleAction(n))}),p.k0s()()(),p.bVm()}if(2&v){const e=p.XpG();p.R7$(3),p.Y8G("ngIf",e.saveMessage),p.R7$(),p.Y8G("settings",e.tableConfig)("source",e.categoriesTableData)}}class w{id;name;show;slug;updatingStatus;description;numUsers;children}(0,p.zw6)("user_categories");let z=(()=>{class v{globalVars;state;dialog;apiUserCategory;clubsService;router;appService;_modalService;_refresh$=new $.B;get refresh$(){return this._refresh$}data=[];clubId;clubRoute;categoriesListData;categoriesTableData;title="global.title.user_categories";categoriesLoaded=!1;saveMessage=!1;draggableMainMenu=["main-menu"];draggableSubmenu=["main-menu","submenu"];visibilities=[{name:"Visibles",value:"true"},{name:"No visibles",value:"false"},{name:"Todos",value:"all"}];currentVisible;multipleActionsSubscription=new R.yU;subscription=new R.yU;tableView=!0;table;tableConfig={showSticky:!1,paginator:{size:30,paginatorType:"vertical",verticalButton:!1},showTotalResults:!0,rowClickEvent:!0,serverFiltered:!1,title:"user_tags",class:"full-height-clupik-table",noDataMessage:"no_user_tags_found",buttonsDesktop:[{type:"academy"},{type:"primary",icon:"fa fa-plus",text:"module.user.add_tag",broadcastKey:"add_tag"},{type:"list",condition:()=>!0,options:[{type:"primary",icon:"fa-regular fa-sort-alt",text:"global.common.orderit",broadcastKey:"order"},{type:"primary",icon:"fa-light fa-file-import",text:"module.user.import_users",broadcastKey:"import"}]}],buttonsMobile:[{type:"academy"},{type:"primary",broadcastKey:"add_tag",icon:"fa fa-plus",tooltip:"module.user.add_tag"}],multipleSelect:{showMultipleSelect:!0,selectAllMessage:"users",sections:[{title:"quick_actions",actions:[{type:"custom",text:"global.common.hide",broadcastKey:"hide"},{type:"custom",text:"global.common.show",broadcastKey:"show"},{type:"custom",text:"global.common.remove",broadcastKey:"remove"}]}]},columns:{actions:{stickedFront:!0,hideSticky:!0,noExport:!0,title:"",type:"custom",renderComponent:y.H,actionsData:{actions:[{icon:"fa-light fa-arrow-up-arrow-down",text:"Ordenar subcategor\xedas",condition:e=>e.hasOwnProperty("children"),disabled:e=>e.children?.length<2,event:(e,o)=>this.orderSubCats(o)},{icon:"fa-light fa-eye-slash",text:"global.common.hide",condition:e=>e.show,disabled:e=>!1,event:(e,o)=>this.statusMenu(o,"hide")},{icon:"fa-light fa-eye",text:"global.common.show",condition:e=>!e.show,disabled:e=>!1,event:(e,o)=>this.statusMenu(o,"show")},{icon:"fa-light fa-link",text:"module.publications.show_category",condition:e=>!0,disabled:e=>!1,event:(e,o)=>this.viewCategory(o)},{icon:"fa-light fa-edit",text:"global.common.edit",condition:e=>!0,disabled:e=>!1,event:(e,o)=>this.editCategory(o)},{icon:"fa-light fa-trash",text:"global.common.remove",condition:e=>!0,disabled:e=>e.children?.length>0,event:(e,o)=>
1this.deleteCategory(o)}]}},show:{title:"",sort:!1,filter:!1,type:"visibility",class:"column-xxs"},name:{filterType:{type:"text"},title:"name",configTitle:"name",type:"text",filter:!0,sort:!0},description:{filterType:{type:"text"},title:"description",configTitle:"description",type:"text",filter:!0,sort:!0},numUsers:{filterType:{type:"number"},title:"users",configTitle:"user_number",type:"number",filter:!0,sort:!0}}};constructor(e,o,n,d,c,m,f,C){this.globalVars=e,this.state=o,this.dialog=n,this.apiUserCategory=d,this.clubsService=c,this.router=m,this.appService=f,this._modalService=C,this.subscription.add(this.appService.subscribe("removeTag",b=>{let _=this.table.tableData.find(i=>i.id===b.id);this.table.removeFilter(_)})),this.subscription.add(this.appService.subscribe("reloadCats",b=>{this.loadCategory()}))}ngOnInit(){var e=this;return(0,U.A)(function*(){e.categoriesLoaded=!1,e.clubRoute="/club/"+e.clubId,e.loadCategory(),setTimeout(()=>{e.globalVars.navbarTop.title="global.common.user-tags"}),e.subscription.add(e.refresh$.subscribe(()=>{console.log("refresh")}))})()}ngOnDestroy(){this.subscription.unsubscribe(),this.multipleActionsSubscription.unsubscribe()}goTable(){this.tableView=!0,this.categoriesLoaded=!1,this.loadCategory()}createRowData(e){let o=new w;return o.id=e.id,o.name=e.name,o.slug=e.lastSlug,o.show=e.active,o.description=e.description,o.numUsers=e.userRole?.length,null==e.categoryParent&&(o.children=[]),e.user_category?.length>0&&(o.children=e.user_category.map(this.createRowData)),o}newCategory(){this.dialog.open(B.F,{data:{edit:!1}}).afterClosed().subscribe(e=>{e&&e.status&&this.loadCategory()})}loadCategory(){this.apiUserCategory.getUserCategories(!1,!0,!0).subscribe(e=>{this.categoriesListData=e.map(n=>{if(null==n.user_category_id)return this.createRowData(n)});let o=[];for(let n=0;n<this.categoriesListData.length;n++){let d={...this.categoriesListData[n]};if(o.push(d),this.categoriesListData[n].children.length>0)for(let c=0;c<this.categoriesListData[n].children.length;c++){let m={...this.categoriesListData[n].children[c]};m.name=`\u2014 ${m.name}`,o.push(m)}}this.categoriesTableData=o,this.categoriesLoaded=!0})}itemOut(){setTimeout(e=>{var o=[];for(let c=0;c<this.categoriesListData.length;c++){let m=this.categoriesListData[c];o.push({id:m.id});for(let f=0;f<m.children.length;f++)o.push({id:m.children[f].id,categoryParent:m.id})}this.apiUserCategory.orderUserCategories({categories:o}).subscribe(()=>{});let d=[];for(let c=0;c<this.categoriesListData.length;c++){let m={...this.categoriesListData[c]};if(d.push(m),this.categoriesListData[c].children.length>0)for(let f=0;f<this.categoriesListData[c].children.length;f++){let C={...this.categoriesListData[c].children[f]};C.name=`\u2014 ${C.name}`,d.push(C)}}this.categoriesTableData=d})}goToCategory(e){e&&this.appService.broadcast("addNewTab",{title:e.name,type:"category",data:e,url:`./${e.id}`,iconType:"category",lastUrl:`./${e.id}`,renderComponent:P.I,fixed:!1})}selectAction(e){this.appService.broadcast("closeDropdown"),"order"===e&&this.orderPrincipales(),"add_tag"===e&&this.newCategory(),"import"===e&&this.router.navigate(["/"+this.clubsService.getLanguageInUseCode()+"/admin/users/import"])}orderSubCats(e){var o=this;return(0,U.A)(function*(){console.error(e);let n=yield o._modalService.openModal({component:K.c,modalSize:"sm",data:{canHaveChildren:!1,tableRows:[...e.children]},options:{}});if(n.data){let d=[...o.categoriesTableData.filter(c=>c.hasOwnProperty("children")).map(c=>({id:c.id})),...n.data.map(c=>({id:c.id,categoryParent:e.id}))];o.apiUserCategory.orderUserCategories({categories:d}).subscribe(()=>{o.categoriesLoaded=!1,o.categoriesListData=[],o.loadCategory()})}})()}orderPrincipales(){var e=this;return(0,U.A)(function*(){let o=yield e._modalService.openModal({component:K.c,modalSize:"sm",data:{canHaveChildren:!1,tableRows:[...e.categoriesTableData.filter(n=>n.hasOwnProperty("children"))]},options:{}});o.data&&e.apiUserCategory.orderUserCategories({categories:o.data.map(n=>({id:n.id}))}).subscribe(()=>{e.categoriesLoaded=!1,e.categoriesListData=[],e.loadCategory()})})()}selectMultipleAction({rows:e,key:o}){let n;switch(o){case"hide":n=this.dialog.open(S.w,{panelClass:"modal-md",data:{type:"hide-tags",wait:!0}}),n.afterClosed().subscribe(()=>{null!=this.multipleActionsSubscription&&this.multipleActionsSubscription.unsubscribe()}),this.multipleActionsSubscription=this.appService.subscribe("hide-tags",d=>this.changeVisibility(e,!1));break;case"show":n=this.dialog.open(S.w,{panelClass:"modal-md",data:{type:"show-tags",wait:!0}}),n.afterClosed().subscribe(()=>{null!=this.multipleActionsSubscription&&this.multipleActionsSubscription.unsubscribe()}),this.multipleActionsSubscription=this.appService.subscribe("show-tags",d=>this.changeVisibility(e,!0));break;case"remove":n=this.dialog.open(S.w,{panelClass:"modal-md",data:{type:"remove-tags",wait:!0}}),n.afterClosed().subscribe(()=>{null!=this.multipleActionsSubscription&&this.multipleActionsSubscription.unsubscribe()}),this.multipleActionsSubscription=this.appService.subscribe("remove-tags",d=>this.removeTags(e))}}changeVisibility(e,o){e.length>0?this.apiUserCategory.editUserCategory({active:o},e.map(d=>d.id)).subscribe(()=>{for(let c of e){let m=this.table.tableData.find(C=>C.id===c.id),f={...m};f.show=o,this.table.tableDataSource.update(m,f)}for(let c=0;c<this.categoriesListData.length;c++)if(e.some(m=>m.id===this.categoriesListData[c].id)&&(this.categoriesListData[c].show=o),this.categoriesListData[c].children.length>0)for(let m=0;m<this.categoriesListData[c].children.length;m++)e.some(f=>f.id===this.categoriesListData[c].children[m].id)&&(this.categoriesListData[c].children[m].show=o);let d=[];for(let c=0;c<this.categoriesListData.length;c++){let m={...this.categoriesListData[c]};if(d.push(m),this.categoriesListData[c].children.length>0)for(let f=0;f<this.categoriesListData[c].children.length;f++){let C={...this.categoriesListData[c].children[f]};C.name=`\u2014 ${C.name}`,d.push(C)}}this.categoriesTableData=d,this.appService.broadcast("close-modal",null),null!=this.multipleActionsSubscription&&this.multipleActionsSubscription.unsubscribe()}):(this.appService.broadcast("close-modal",null),null!=this.multipleActionsSubscription&&this.multipleActionsSubscription.unsubscribe())}removeTags(e){(e=e.filter(o=>null===e.children||0===o.children.length||o.children.every(n=>e.some(d=>d.id===n.id)))).length>0?this.apiUserCategory.deleteUserCategory(e.map(o=>o.id)).subscribe(()=>{this.table.tableDataSource.removeSome(e),this.appService.broadcast("close-modal",null),null!=this.multipleActionsSubscription&&this.multipleActionsSubscription.unsubscribe();for(let n of e){let d=!1;for(let c=0;c<this.categoriesListData.length;c++){if(d=n.id===this.categoriesListData[c].id,d){this.categoriesListData.splice(c,1);break}if(null!=this.categoriesListData[c].children&&this.categoriesListData[c].children.length>0){for(let m=0;c<this.categoriesListData[c].children.length;m++)if(d=n.id===this.categoriesListData[c].children[m].id,d){this.categoriesListData[c].children.splice(m,1);break}if(d)break}}}let o=[];for(let n=0;n<this.categoriesListData.length;n++){let d={...this.categoriesListData[n]};if(o.push(d),this.categoriesListData[n].children.length>0)for(let c=0;c<this.categoriesListData[n].children.length;c++){let m={...this.categoriesListData[n].children[c]};m.name=`\u2014 ${m.name}`,o.push(m)}}this.categoriesTableData=o}):(this.appService.broadcast("close-modal",null),null!=this.multipleActionsSubscription&&this.multipleActionsSubscription.unsubscribe())}statusMenu(e,o){let n="show"===o,d={active:n};e.show=n,this.apiUserCategory.editUserCategory(d,e.id).subscribe(c=>{this.updateTable(e,c)})}viewCategory(e){e&&this.appService.broadcast("addNewTab",{title:e.name,type:"category",data:e,url:`./${e.id}`,iconType:"category",lastUrl:`./${e.id}`,renderComponent:P.I,fixed:!1})}editCategory(e){this.dialog.open(B.F,{data:{edit:!0,categoryId:e.id,name:e.name,description:e.description}}).afterClosed().subscribe(n=>{if(n.status){this.categoriesLoaded=!1;let d={...e,...n.edited},c=this.categoriesListData.findIndex(m=>m.id===e.id);this.categoriesListData.splice(c,1,d),this.updateTable(e,d),this.table.reload(),this.categoriesLoaded=!0}})}deleteCategory(e){this.dialog.open(S.w,{panelClass:"modal-md",data:{type:"delete-categories",user:e.name}}).afterClosed().subscribe(n=>{!0===n&&this.apiUserCategory.deleteUserCategory(e.id).subscribe(()=>{this.table.reload()})})}updateTable(e,o){this.table.tableDataSource.update(e,o)}static \u0275fac=function(o){return new(o||v)(p.rXU(O.Y),p.rXU(p.pJN),p.rXU(s.h),p.rXU(I.F),p.rXU(T.X),p.rXU(V.Ix),p.rXU(G.d),p.rXU(M.M))};static \u0275cmp=p.VBU({type:v,selectors:[["app-user-categories"]],viewQuery:function(o,n){if(1&o&&p.GBs(x.YT,5),2&o){let d;p.mGM(d=p.lsd())&&(n.table=d.first)}},standalone:!1,decls:2,vars:2,consts:[[4,"ngIf"],[1,"content-grid"],["dismissable","true","type","success",3,"mensaje",4,"ngIf"],[3,"onButtonClicked","onRowClicked","onSelectAllActionClicked","settings","source"],["dismissable","true","type","success",3,"mensaje"]],template:function(o,n){1&o&&p.DNE(0,k,1,0,"app-skeleton-table",0)(1,j,5,3,"ng-container",0),2&o&&(p.Y8G("ngIf",!n.categoriesLoaded),p.R7$(),p.Y8G("ngIf",n.categoriesLoaded))},dependencies:[D.bT,W.Z,x.YT,N.X,Y.D9],encapsulation:2})}return v})()},24621:(Q,A,a)=>{a.r(A),a.d(A,{UserCategoryDatabaseModule:()=>E});var U=a(50630),p=a(97144),I=a(38132),G=a(80086),T=a(20714),y=a(73664),S=a(29605),x=a(42677);const O=()=>["userList"];let $=(()=>
1{class s{tableTab={index:0,id:0,type:null,params:null,url:"../categories",fixed:!0,title:"global.title.user_categories",info:null,renderComponent:T.D};constructor(){}ngOnInit(){}static \u0275fac=function(D){return new(D||s)};static \u0275cmp=y.VBU({type:s,selectors:[["app-user-category-database"]],standalone:!1,decls:2,vars:3,consts:[[3,"features"],[3,"tableTab"]],template:function(D,W){1&D&&(y.j41(0,"app-clupik-feature-lock",0),y.nrm(1,"app-table-tabs",1),y.k0s()),2&D&&(y.Y8G("features",y.lJ4(2,O)),y.R7$(),y.Y8G("tableTab",W.tableTab))},dependencies:[S.n,x.w],encapsulation:2})}return s})();var R=a(2615);const B=[{path:"",component:$,children:[{path:"",loadChildren:()=>Promise.all([a.e(72076),a.e(70313)]).then(a.bind(a,70313)).then(s=>s.UserCategoriesModule)},{path:"user/:username",loadChildren:()=>Promise.all([a.e(72076),a.e(37531)]).then(a.bind(a,37531)).then(s=>s.UserListInfoModule),canActivate:[G.x]}]}];let P=(()=>{class s{static \u0275fac=function(D){return new(D||s)};static \u0275mod=y.$C({type:s});static \u0275inj=R.G2t({imports:[I.iI.forChild(B),I.iI]})}return s})();var K=a(66456);let E=(()=>{class s{static \u0275fac=function(D){return new(D||s)};static \u0275mod=y.$C({type:s});static \u0275inj=R.G2t({imports:[K.c,p.d,U.j,P,P]})}return s})()},56736:(Q,A,a)=>{a.d(A,{h:()=>b});var U=a(10467),p=a(69915),I=a(1460),G=a(25615),T=a(89417),y=a(26742),S=a(13961),x=a(54843),O=a(7673),$=a(92688),R=a(70152),B=a(23294),P=a(25558),K=a(99437),E=a(96354),s=a(73664),V=a(2615),M=a(72200),D=a(82966),W=a(19735),N=a(89902),Y=a(80954),k=a(69415),u=a(15449),j=a(85340);const w=()=>({required:!1,placeholder:"module.publications.search_user"}),J=()=>["module.registrations.search_user"],z=()=>["global.table.not_found_messages.no_result_found"];function v(_,i){1&_&&(s.j41(0,"div",3),s.nrm(1,"app-skeleton-block"),s.k0s())}function F(_,i){if(1&_){const t=s.RV6();s.qex(0),s.j41(1,"app-list-item",4)(2,"app-clupik-button",5),s.bIt("click",function(){V.eBV(t);const l=s.XpG(2);return V.Njj(l.removeUser())}),s.k0s()(),s.bVm()}if(2&_){const t=s.XpG(2);s.R7$(),s.Y8G("isCustom",!0)("unique",!0)("mainTitle",null==t.selectedUser?null:t.selectedUser.name)("subtitle",null==t.selectedUser?null:t.selectedUser.description)("hasHover",!0)("hasBorder",!0)("isCollapsed",!0)("image",null==t.selectedUser?null:t.selectedUser.avatar)("imageType","user")}}function e(_,i){1&_&&(s.qex(0),s.nrm(1,"app-empty-space",9),s.bVm()),2&_&&(s.R7$(),s.Y8G("size","xs")("textArray",s.lJ4(3,J))("noButton",!0))}function o(_,i){1&_&&(s.j41(0,"div",11),s.nrm(1,"app-empty-space",9),s.k0s()),2&_&&(s.R7$(),s.Y8G("size","sm")("textArray",s.lJ4(3,z))("noButton",!0))}function n(_,i){if(1&_){const t=s.RV6();s.j41(0,"app-list-item",13),s.bIt("listAction",function(){const l=V.eBV(t).$implicit,g=s.XpG(6);return V.Njj(g.setUser(l))}),s.k0s()}if(2&_){const t=i.$implicit;s.Y8G("active",t.active)("mainTitle",t.name)("subtitle",t.description)("hasHover",!0)("hasBorder",!0)("isCollapsed",!0)("image",t.avatar)("imageType","user")}}function d(_,i){if(1&_&&(s.j41(0,"div",11),s.DNE(1,n,1,8,"app-list-item",12),s.k0s()),2&_){const t=s.XpG(2).ngIf;s.R7$(),s.Y8G("ngForOf",t.data)}}function c(_,i){if(1&_&&(s.qex(0),s.DNE(1,o,2,4,"div",10)(2,d,2,1,"div",10),s.bVm()),2&_){const t=s.XpG().ngIf;s.R7$(),s.Y8G("ngIf",!t.data.length&&!t.loading),s.R7$(),s.Y8G("ngIf",t.data.length&&!t.loading)}}function m(_,i){if(1&_&&(s.qex(0),s.DNE(1,e,2,4,"ng-container",2)(2,c,3,2,"ng-container",2),s.bVm()),2&_){const t=s.XpG(3);s.R7$(),s.Y8G("ngIf",!t.hasSearched),s.R7$(),s.Y8G("ngIf",t.hasSearched)}}function f(_,i){if(1&_&&(s.qex(0),s.j41(1,"form",6)(2,"app-form-row",7),s.nrm(3,"app-input",8),s.k0s()(),s.DNE(4,m,3,2,"ng-container",2),s.nI1(5,"async"),s.bVm()),2&_){const t=s.XpG(2);s.R7$(),s.Y8G("formGroup",t.searchForm),s.R7$(),s.Y8G("items",1),s.R7$(),s.Y8G("input",s.lJ4(6,w)),s.R7$(),s.Y8G("ngIf",s.bMT(5,4,t.userSearch$))}}function C(_,i){if(1&_&&(s.qex(0),s.DNE(1,F,3,9,"ng-container",2)(2,f,6,7,"ng-container",2),s.bVm()),2&_){const t=s.XpG();s.R7$(),s.Y8G("ngIf",t.selectedUser),s.R7$(),s.Y8G("ngIf",!t.selectedUser)}}let b=(()=>{class _{apiUsersService;globalVars;appService;_imagesService;users;userSearch$;searchForm;subscription=new S.yU;selectedUser;hasSearched=!1;constructor(t,r,l,g){this.apiUsersService=t,this.globalVars=r,this.appService=l,this._imagesService=g,this.subscription.add(this.appService.subscribe("sendUserId",this.selectUser.bind(this)))}insideModal=!1;loaded=!1;usersTableData=[];usersLoaded=!1;ngAfterViewInit(){this.getData()}getData(){var t=this;return(0,U.A)(function*(){let r=yield(0,x._)(t.apiUsersService.getUsersAndListRoles());for(let l of r)!t.users.some(g=>g.id==l.id)&&"INC"!==l.statusCode&&t.usersTableData.push(t.namesConfig.mapeo(l));t.buildForm()})()}namesConfig={source:t=>(0,O.of)(this.usersTableData.filter(r=>r.username.includes(t.toLowerCase()))),mapeo:t=>(t.name=t.firstName+" "+t.lastName,t.description=this.getDescription(t),t.avatar=this._imagesService.getUserClubLogoThumbnailUrl(t.id),t.active=t.id===this.selectedUser?.id,t)};getDescription(t){let r=[];return t.birthdate&&r.push(this.globalVars.getMoment()(t.birthDate).format("DD/MM/YYYY")),t.email&&"n
1[email protected]"!==t.email&&r.push(t.email),r.join(" - ")}buildForm(){this.searchForm=new T.gE({search:new T.MJ("")}),this.userSearch$=(0,$.x)((0,O.of)({loading:!0,data:[]}),this.searchForm.get("search").valueChanges.pipe((0,R.B)(500),(0,B.F)(),(0,P.n)(t=>this.namesConfig.source(t)?.pipe((0,K.W)(r=>(this.searchForm.get("search").setValue(""),(0,O.of)({loading:!0,data:[]}))),(0,E.T)(r=>{if(this.hasSearched=!0,r)return{loading:!1,data:r.map(g=>this.namesConfig.mapeo(g))}}))))),this.loaded=!0}ngOnInit(){var t=this;return(0,U.A)(function*(){t.loaded=!1})()}selectUser(t){this.globalVars.closeModal(t)}ngOnDestroy(){this.subscription.unsubscribe()}sendUser(){this.globalVars.closeModal({status:!0,userId:this.selectedUser.id,user:this.selectedUser})}setUser(t){this.selectedUser=t,this.searchForm.get("search").setValue("")}removeUser(){this.hasSearched=!1,this.selectedUser=null}static \u0275fac=function(r){return new(r||_)(s.rXU(I.K),s.rXU(G.Y),s.rXU(p.d),s.rXU(y.M))};static \u0275cmp=s.VBU({type:_,selectors:[["app-user-select-dialog"]],inputs:{users:"users"},standalone:!1,decls:3,vars:6,consts:[[3,"mainAction","hasButtons","hasSecondaryButton","mainButtonValue","modalTitle"],["class","loading-block",4,"ngIf"],[4,"ngIf"],[1,"loading-block"],[3,"isCustom","unique","mainTitle","subtitle","hasHover","hasBorder","isCollapsed","image","imageType"],["type","icon","config","onlyicon","size","sm","icon","fa-light fa-xmark",3,"click"],[3,"formGroup"],[3,"items"],["type","search","formControlName","search","inputSize","default",3,"input"],["svgImage","file-searching",3,"size","textArray","noButton"],["class","result",4,"ngIf"],[1,"result"],[3,"active","mainTitle","subtitle","hasHover","hasBorder","isCollapsed","image","imageType","listAction",4,"ngFor","ngForOf"],[3,"listAction","active","mainTitle","subtitle","hasHover","hasBorder","isCollapsed","image","imageType"]],template:function(r,l){1&r&&(s.j41(0,"app-clupik-modal",0),s.bIt("mainAction",function(){return l.sendUser()}),s.DNE(1,v,2,0,"div",1)(2,C,3,2,"ng-container",2),s.k0s()),2&r&&(s.Y8G("hasButtons",l.loaded)("hasSecondaryButton",!1)("mainButtonValue","module.user.list")("modalTitle","global.common.user_selector"),s.R7$(),s.Y8G("ngIf",!l.loaded),s.R7$(),s.Y8G("ngIf",l.loaded))},dependencies:[M.Sq,M.bT,T.qT,T.BC,T.cb,T.j4,T.JD,D.K,W.$,N.S,Y.Y,k.p,u.P,j.U,M.Jj],encapsulation:2})}return _})()},92630:(Q,A,a)=>{a.d(A,{I:()=>C});var U=a(10467),p=a(56736),I=a(13961),G=a(70843),T=a(25615),y=a(77008),S=a(69915),x=a(67201),O=a(6961),$=a(51589),R=a(88998),B=a(48101),P=a(11683),K=a(27544),E=a(61448),s=a(97336),V=a(1460),M=a(54423),D=a(7044),W=a(79837),N=a(14850),Y=a(68010),k=a(60152),u=a(73664),j=a(2615),w=a(13443),J=a(36229),z=a(94474),v=a(72200),F=a(49255),e=a(74173),o=a(95064),n=a(68018);function d(b,_){1&b&&u.nrm(0,"app-skeleton-table")}function c(b,_){if(1&b&&(u.nrm(0,"app-alerts",4),u.nI1(1,"translate")),2&b){const i=u.XpG(2);u.Y8G("mensaje",u.bMT(1,1,i.succesMessage))}}function m(b,_){if(1&b&&(u.nrm(0,"app-alerts",5),u.nI1(1,"translate")),2&b){const i=u.XpG(2);u.Y8G("mensaje",u.bMT(1,1,i.errorMessage))}}function f(b,_){if(1&b){const i=u.RV6();u.qex(0),u.DNE(1,c,2,3,"app-alerts",1)(2,m,2,3,"app-alerts",2),u.j41(3,"app-clupik-table",3),u.bIt("onButtonClicked",function(r){j.eBV(i);const l=u.XpG();return j.Njj(l.selectAction(r))})("onRowClicked",function(r){j.eBV(i);const l=u.XpG();return j.Njj(l.goToUser({},r))}),u.k0s(),u.bVm()}if(2&b){const i=u.XpG();u.R7$(),u.Y8G("ngIf",i.onSuccess),u.R7$(),u.Y8G("ngIf",i.onError),u.R7$(),u.Y8G("settings",i.clupikUserConfig)("source",i.usersTableData)}}let C=(()=>{class b{apiUserCategory;userService;appService;authService;userCategoryService;dialog;apiSeasonsService;translationService;apiUserService;apiTeamsService;teamService;apiSubscription;modalService;clubsService;globalVars;table;info;link;clupikUserConfig={showSticky:!0,paginator:{size:30,paginatorType:"vertical",verticalButton:!1},title:"users_category",class:"full-height-clupik-table",noDataMessage:"no_user_found",rowClickEvent:!0,serverFiltered:!1,serverModel:"User",buttonsDesktop:[{type:"academy"},{type:"configuration"},{type:"custom-icon",icon:"fa-regular fa-envelope",tooltip:"module.user.notification",broadcastKey:"notify",condition:()=>
1this.authService.isClubAdministrator()&&"INF"!=this.clubsService.getClubData().type},{type:"custom-icon",icon:"fa-regular fa-file-export",tooltip:"module.user.export_users",broadcastKey:"export"},{type:"primary",icon:"fa-light fa-plus",text:"module.registrations.add_user",broadcastKey:"add_user"}],buttonsMobile:[{type:"academy"},{type:"configuration"},{type:"primary",icon:"fa fa-plus",tooltip:"global.common.add",broadcastKey:"add_user"},{type:"custom-icon",icon:"fa-regular fa-file-export",text:"module.user.export_users",broadcastKey:"export"},{type:"custom-icon",icon:"fa-regular fa-envelope",tooltip:"module.user.notification",broadcastKey:"notify",condition:()=>this.authService.isClubAdministrator()&&"INF"!=this.clubsService.getClubData().type}],columns:{actions:{stickedFront:!0,hideSticky:!0,noExport:!0,title:"",type:"custom",renderComponent:D.H,actionsData:{actions:[{icon:"fa-light fa-user",text:"module.user.show_profile",condition:(i,t)=>!0,disabled:(i,t)=>!1,event:(i,t)=>this.goToUser(i,t)},{icon:"fa-light fa-trash",text:"module.user.delete_tag",condition:(i,t)=>!0,disabled:(i,t)=>!1,event:(i,t)=>this.deleteUser(i,t)}]}},firstName:{filterType:{type:"text"},title:"name",configTitle:"name",type:"text",stickedFront:!0,filter:!0,sort:!0},surnames:{filterType:{type:"text"},title:"surnames",configTitle:"surnames",type:"text",stickedFront:!0,filter:!0,sort:!0},username:{filterType:{type:"text"},title:"user",configTitle:"user",type:"text",filter:!0,sort:!0},birthdate:{filterType:{type:"date"},title:"birthdate_abv",configTitle:"birthdate_abv",type:"date",dateFormat:"L",filter:!0,sort:!0},email:{filterType:{type:"text"},title:"email",configTitle:"email",filter:!0,sort:!0,type:"text"},roles:{filterType:{type:"selector",options:[]},title:"roles",configTitle:"roles",type:"custom",filter:!0,renderComponent:R.N,customFilterFunction:(i,t)=>{let r=0;for(let l of t)r+=i.roles.filter(g=>g.role_code===l).length;return r},customExportFunction:(()=>{var t,i=this;return t=(0,U.A)(function*(r){let l="";for(let g of r.roles)g.role_code&&"TFN"!==g.role_code&&"SDM"!==g.role_code&&(l+=`${yield i.translationService.getTranslation(`global.roles.${g.role_code}`)}/`);return l.length>0&&(l=l.slice(0,-1)),l}),function(l){return t.apply(this,arguments)}})()},teams:{filterType:{type:"selector",options:[]},title:"teams",configTitle:"teams",filter:!0,type:"custom",renderComponent:B.d,customFilterFunction:(i,t)=>{let r=0;for(let l of t)r+=i.teams.filter(g=>g.id===l).length;return r},customExportFunction:function(){var i=(0,U.A)(function*(t){let r="";if(null!=t.teams&&Array.isArray(t.teams)){for(let l of t.teams)r+=`${l.title}/`;r=r.slice(0,-1)}return r});return function(r){return i.apply(this,arguments)}}()},seasons:{filterType:{type:"selector",options:[]},title:"season",configTitle:"season",filter:!0,type:"custom",renderComponent:P.f,customFilterFunction:(i,t)=>{let r=0;for(let l of t)r+=i.seasons.filter(g=>g===l).length;return r}},category:{title:"categories",configTitle:"categories",type:"text"}}};onSuccess=!1;onError=!1;succesMessage="module.user_category.add_user";errorMessage="module.user_category.error_general";usersTableData=[];loaded=!1;usersLoaded=!1;category;subscription=new I.yU;roles;seasons;usersAux;constructor(i,t,r,l,g,h,L,X,H,Z,ee,te,se,ae,ie){this.apiUserCategory=i,this.userService=t,this.appService=r,this.authService=l,this.userCategoryService=g,this.dialog=h,this.apiSeasonsService=L,this.translationService=X,this.apiUserService=H,this.apiTeamsService=Z,this.teamService=ee,this.apiSubscription=te,this.modalService=se,this.clubsService=ae,this.globalVars=ie,this.subscription.add(this.userService.subscribe("delete",q=>{this.deleteMemberOnList(q)})),this.subscription.add(this.appService.subscribe("updatePos",q=>{this.link=q.link,this.ngOnChanges()}))}ngOnChanges(i=null){i&&!i.info.firstChange&&(this.info=i.info.currentValue,this.link=i.link.currentValue),this.userCategoryService.setActualPos(this.link.index),this.loadUsers()}ngOnInit(){this.apiSeasonsService.getSeasons().subscribe(i=>{this.seasons=i;let t=[];i&&i.forEach(r=>{t.push({nameValue:r.title,searchValue:r.title})}),this.clupikUserConfig.columns.seasons.filterType.options=t,this.apiUserService.getRoles().subscribe(r=>{let l=[];
1if(r){let g=JSON.parse(localStorage.getItem("roleTranslate"));(r=r.filter(h=>"SDM"!==h.code&&"TFN"!==h.code&&"FAN"!==h.code&&"SFN"!==h.code)).forEach(h=>{l.push({nameValue:g[h.code],searchValue:h.code})})}this.clupikUserConfig.columns.roles.filterType.options=l,this.apiTeamsService.getClubTeams().subscribe(g=>{let h=[];g&&g.forEach(L=>{h.push({nameValue:`${this.teamService.getCustomTeamName(L.team)}  (${L.team.season?.title})`,searchValue:L.team.id})}),this.clupikUserConfig.columns.teams.filterType.options=h,this.loadUsers()})})})}notifyUsers(){var i=this;this.apiSubscription.checkFeature("targetNotifications").then(function(){var t=(0,U.A)(function*(r){r&&(yield i.modalService.openModal({component:N.x,modalSize:"medium",data:{data:{table:i.table,everyOne:!1}},options:{backdropDismiss:!1,id:"notifimodal"}}))});return function(r){return t.apply(this,arguments)}}())}loadUsers(i=null){this.usersLoaded=!1,this.usersTableData=[],this.apiUserCategory.searchUserCategoryOptimal({id:this.info.id,children:!0},!0).subscribe(t=>{this.category=t[0],this.category.userRole=this.category.userRole.filter(r=>r.user_id!==i);for(let r=0;r<this.category.userRole.length;r++)this.createRowData(this.category.userRole[r].user,this.category);for(let r=0;r<this.category.user_category.length;r++){let l=this.category.user_category[r];l.userRole=l.userRole.filter(g=>g.user_id!==i);for(let g=0;g<l.userRole.length;g++)this.createRowData(l.userRole[g].user,l)}this.usersLoaded=!0})}ngAfterViewInit(){this.globalVars.navbarTop.title=this.category.name}createRowData(i,t){let r={id:i.id,username:i.username,surnames:`${i.lastName}  ${null!=i.secondSurname?i.secondSurname:""}`,category:t.name,email:i.email,firstName:i.firstName,birthdate:i.birthdate,roles:i.userRole.map(h=>({role_code:h.role.code,id:h.id,userId:h.userId})),teams:[],seasons:[]},l=[],g=i.userRole;for(const h of g)if(!(null==h.teamRole||h.teamRole.length<1))for(let L of h.teamRole){let X=L.team,H=this.seasons.find(Z=>Z.id===X?.seasonId)?.title;H&&(l.includes(H)||l.push(H),X.title=X.editableName,r.teams.push(X))}r.seasons=l,this.usersTableData.push(r),this.usersTableData.sort((h,L)=>h.firstName.localeCompare(L.firstName))}addUser(){var i=this;return(0,U.A)(function*(){let t=yield i.modalService.openModal({component:p.h,modalSize:"medium",data:{users:i.usersTableData},options:{}});t.data&&i.apiUserCategory.linkUserToCategory(t.data.userId,i.category.id).subscribe(()=>{i.loadUsers(),i.appService.broadcast("reloadCats",{}),i.appService.broadcast("showAlert",{state:"success",mainTitle:"module.user_category.add_user",autoHide:!0})})})()}deleteMemberOnList(i){this.dialog.open(x.w,{panelClass:"modal-md",data:{type:"delete-user-from-category",user:`${i.rowData.firstName} ${i.rowData.surnames}`,category:this.category.name}}).afterClosed().subscribe(r=>{r&&this.apiUserCategory.removeUserFromCategory(i.rowData.id,this.category.id).subscribe({next:()=>{this.loadUsers(i.rowData.id),this.appService.broadcast("showAlert",{state:"success",mainTitle:"module.user_category.remove_user",autoHide:!0})},error:()=>{this.appService.broadcast("showAlert",{state:"danger",mainTitle:"module.user_category.error_general",autoHide:!1})}})})}ngOnDestroy(){this.subscription.unsubscribe()}export(){this.table.exportTable("users")}selectAction(i){switch(this.appService.broadcast("closeDropdown"),i){case"notify":this.notifyUsers();break;case"add_user":this.addUser();break;case"export":this.export()}}deleteUser(i,t){this.deleteMemberOnList({value:i,rowData:t})}goToUser(i,t){this.apiUserService.getUserById(t.id,!1,!0).subscribe({next:r=>{let l=r[0],g=`${l.firstName}${null!=l.lastName?` ${l.lastName}`:""}${null!=l.secondSurname?` ${l.secondSurname}`:""}`;l.title=g,this.appService.broadcast("addNewTab",{title:g,type:"user",data:l,url:`./user/${l.username}/general`,lastUrl:`./user/${l.username}/general`,renderComponent:W.r5,fixed:!1})}})}static \u0275fac=function(t){return new(t||b)(u.rXU(s.F),u.rXU(w.D),u.rXU(S.d),u.rXU(Y.u),u.rXU(y.M),u.rXU(J.h),u.rXU(K.o),u.rXU(O.T),u.rXU(V.K),u.rXU(E.k),u.rXU($.n),u.rXU(M.P),u.rXU(z.M),u.rXU(k.X),u.rXU(T.Y))};static \u0275cmp=u.VBU({type:b,selectors:[["app-user-category-view"]],viewQuery:function(t,r){if(1&t&&u.GBs(G.YT,5),2&t){let l;u.mGM(l=u.lsd())&&(r.table=l.first)}},inputs:{info:"info",link:"link"},standalone:!1,features:[u.OA$],decls:2,vars:2,consts:[[4,"ngIf"],["type","success","dismissable","true",3,"mensaje",4,"ngIf"],["type","error","dismissable","true",3,"mensaje",4,"ngIf"],[3,"onButtonClicked","onRowClicked","settings","source"],["type","success","dismissable","true",3,"mensaje"],["type","error","dismissable","true",3,"mensaje"]],template:function(t,r){1&t&&u.DNE(0,d,1,0,"app-skeleton-table",0)(1,f,4,4,"ng-container",0),2&t&&(u.Y8G("ngIf",!r.usersLoaded||r.usersTableData.length!==r.category.userRole.length),u.R7$(),u.Y8G("ngIf",r.usersLoaded&&r.usersTableData.length===r.category.userRole.length))},dependencies:[v.bT,F.Z,e.YT,o.X,n.D9],encapsulation:2})}return b})()}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.