1"use strict";(self.webpackChunkapp=self.webpackChunkapp||[]).push([[2178],{42178:(ee,c,n)=>{n.r(c),n.d(c,{CompetitionTeamMergeOwModule:()=>K});var p=n(11890),h=n(49189),g=n(88274),e=n(73664),r=n(2615),b=n(10467),C=n(27468),f=n(60152),v=n(25615),T=n(38968),S=n(67201),F=n(82e3),j=n(27544),M=n(69915),R=n(36229),I=n(18594),$=n(72200),y=n(93692),O=n(88834),G=n(23620),k=n(3543),V=n(82966),x=n(49255),X=n(68018);const E=(i,a,t)=>({topbar:i,bread:a,topbread:t});function L(i,a){if(1&i&&(e.j41(0,"mat-option",12),e.EFF(1),e.k0s()),2&i){const t=a.$implicit;e.Y8G("value",t.id),e.R7$(),e.JRh(t.name)}}function B(i,a){if(1&i&&(e.j41(0,"mat-option",12),e.EFF(1),e.k0s()),2&i){const t=a.$implicit;e.Y8G("value",t.id),e.R7$(),e.JRh(t.title)}}function N(i,a){if(1&i){const t=e.RV6();e.j41(0,"div",3)(1,"h1",5),e.EFF(2),e.nI1(3,"translate"),e.k0s(),e.j41(4,"mat-form-field")(5,"mat-select",6),e.bIt("selectionChange",function(o){r.eBV(t);const l=e.XpG();return r.Njj(l.onIntegrationChange(o.value))}),e.j41(6,"mat-option",7),e.EFF(7,"OptimalWay"),e.k0s(),e.j41(8,"mat-option",8),e.EFF(9,"Scraper"),e.k0s(),e.j41(10,"mat-option",9),e.EFF(11,"Federatio"),e.k0s(),e.j41(12,"mat-option",10),e.EFF(13,"ACB"),e.k0s()()(),e.j41(14,"mat-form-field")(15,"mat-select",11),e.nI1(16,"translate"),e.bIt("selectionChange",function(o){r.eBV(t);const l=e.XpG();return r.Njj(l.onSectionChange(o.value))}),e.Z7z(17,L,2,2,"mat-option",12,e.fX1),e.k0s()(),e.j41(19,"mat-form-field")(20,"mat-select",11),e.nI1(21,"translate"),e.bIt("selectionChange",function(o){r.eBV(t);const l=e.XpG();return r.Njj(l.onSeasonChange(o.value))}),e.Z7z(22,B,2,2,"mat-option",12,e.fX1),e.k0s()()()}if(2&i){const t=e.XpG();e.R7$(2),e.JRh(e.bMT(3,6,t.title)),e.R7$(3),e.Y8G("value",t.currentIntegration),e.R7$(10),e.Y8G("placeholder",e.bMT(16,8,"global.common.section"))("value",t.currentSection),e.R7$(2),e.Dyx(t.sections),e.R7$(3),e.Y8G("placeholder",e.bMT(21,10,"global.common.season"))("value",t.currentSeason),e.R7$(2),e.Dyx(t.seasons)}}function Y(i,a){1&i&&e.nrm(0,"app-skeleton-block")}function U(i,a){1&i&&e.nrm(0,"app-alerts",13)}function w(i,a){1&i&&(e.j41(0,"span"),e.EFF(1),e.nI1(2,"translate"),e.k0s()),2&i&&(e.R7$(),e.JRh(e.bMT(2,1,"global.button.save")))}function D(i,a){1&i&&(e.j41(0,"div",15)(1,"span",19),e.EFF(2),e.nI1(3,"translate"),e.k0s()()),2&i&&(e.R7$(2),e.SpI("",e.bMT(3,1,"global.button.saving"),"..."))}function J(i,a){if(1&i&&(e.j41(0,"mat-option",22),e.EFF(1),e.k0s()),2&i){const t=a.$implicit,s=e.XpG(3);e.Y8G("disabled",s.alreadySelected(t.id))("value",t.id),e.R7$(),e.JRh(t.editableName)}}function _(i,a){if(1&i){const t=e.RV6();e.j41(0,"div",18)(1,"div",20),e.EFF(2),e.k0s(),e.j41(3,"div",20),e.EFF(4),e.k0s(),e.j41(5,"div",20),e.EFF(6),e.k0s(),e.j41(7,"mat-form-field")(8,"mat-select",21),e.nI1(9,"translate"),e.bIt("selectionChange",function(o){const l=r.eBV(t).$implicit,m=e.XpG(2);return r.Njj(m.onTeamSelected(o.value,l.id))}),e.j41(10,"mat-option",12),e.EFF(11,"No seleccionar"),e.k0s(),e.Z7z(12,J,2,3,"mat-option",22,e.fX1),e.k0s()()()}if(2&i){const t=a.$implicit,s=e.XpG(2);e.R7$(2),e.JRh(t.name||""),e.R7$(2),e.JRh(t.editableName||""),e.R7$(2),e.JRh(t.febName||""),e.R7$(2),e.Y8G("placeholder",e.bMT(9,5,"global.common.team")),e.R7$(2),e.Y8G("value",null),e.R7$(2),e.Dyx(s.dstTeams)}}function z(i,a){if(1&i){const t=e.RV6();e.j41(0,"div",4),e.nVh(1,U,1,0,"app-alerts",13),e.j41(2,"button",14),e.bIt("click",function(){r.eBV(t);const o=e.XpG();return r.Njj(o.submit())}),e.nVh(3,w,3,3,"span")(4,D,4,3,"div",15),e.k0s(),e.j41(5,"div",16)(6,"div",17)(7,"span"),e.EFF(8,"Nombre de equipo"),e.k0s(),e.j41(9,"span"),e.EFF(10,"Nombre editable"),e.k0s(),e.j41(11,"span"),e.EFF(12,"Nombre en federacion"),e.k0s(),e.j41(13,"span"),e.EFF(14,"Equipo a elegir"),e.k0s()(),e.Z7z(15,_,14,7,"div",18,e.fX1),e.k0s()()}if(2&i){const t=e.XpG();e.R7$(),e.vxM(t.isLoaded&&t.teamsLoaded&&0==t.srcTeams.length?1:-1),e.R7$(),e.Y8G("disabled",t.isSubmiting||0==t.result.length),e.R7$(),e.vxM(t.isSubmiting?4:3),e.R7$(12),e.Dyx(t.srcTeams)}}function Z(i,a){1&i&&e.nrm(0,"app-skeleton-block")}let A=(()=>{class i{globalVars;appService;dialog;apiSectionService;apiSeasonService;apiCompetitionService;breadCrumbs;clubService;title;isLoaded=!1;teamsLoaded=!1;isSubmiting=!1;teams;srcTeams;dstTeams;seasons;currentSeason;sections;currentSection;currentIntegration;result;subscription;constructor(t,s,o,l,m,H,Q,q){this.globalVars=t,this.appService=s,this.dialog=o,this.apiSectionService=l,this.apiSeasonService=m,this.apiCompetitionService=H,this.breadCrumbs=Q,this.clubService=q,this.breadCrumbs.pushBread("/"+this.clubService.getLanguageInUseCode()+"/admin/clupik","Clupik")}ngOnInit(){this.isLoaded=!1,this.teamsLoaded=!1,this.title="Fusion de equipos",this.globalVars.navbarTop.image=null,this.globalVars.navbarTop.bgClass="bg-primary",this.globalVars.navbarTop.backLink=!0,this.globalVars.navbarTop.customLink=null,this.globalVars.navbarTop.rightIcon=null,this.globalVars.navbarTop.rightLink=null,(0,C.p)([this.apiSectionService.getAllSections(),this.apiSeasonService.getSeasons(this.clubService.getClubData().clubConfig.seasonTypes.code)]).subscribe(t=>{this.sections=t[0],this.currentSection=this.sections[0].id,this.seasons=t[1],this.currentSeason=this.seasons[0].id,this.currentIntegration=this.currentIntegration||"owTeam",this.isLoaded=!0,null!=this.subscription&&this.subscription.unsubscribe(),this.subscription=this.apiCompetitionService.getMergeTeams(this.currentSeason,this.currentSection,this.currentIntegration).subscribe(s=>{this.teams=s,this.srcTeams=this.teams.srcTeams,this.dstTeams=this.teams.dstTeams,this.result=[],this.teamsLoaded=!0})}),setTimeout(()=>{this.globalVars.navbarTop.title=this.title})}onIntegrationChange(t){this.teamsLoaded=!1,this.currentIntegration=t,null!=this.subscription&&this.subscription.unsubscribe(),this.subscription=this.apiCompetitionService.getMergeTeams(this.currentSeason,this.currentSection,this.currentIntegration).subscribe(s=>{this.teams=s,this.srcTeams=this.teams.srcTeams,this.dstTeams=this.teams.dstTeams,this.result=[],this.teamsLoaded=!0})}onSectionChange(t){this.teamsLoaded=!1,this.currentSection=t,null!=this.subscription&&this.subscription.unsubscribe(),this.subscription=this.apiCompetitionService.getMergeTeams(this.currentSeason,this.currentSection,this.currentIntegration).subscribe(s=>{this.teams=s,this.srcTeams=this.teams.srcTeams,this.dstTeams=this.teams.dstTeams,this.result=[],this.teamsLoaded=!0})}onSeasonChange(t){this.teamsLoaded=!1,this.currentSeason=t,null!=this.subscription&&this.subscription.unsubscribe(),this.subscription=this.apiCompetitionService.getMergeTeams(this.currentSeason,this.currentSection,this.currentIntegration).subscribe(s=>{this.teams=s,this.srcTeams=this.teams.srcTeams,this.dstTeams=this.teams.dstTeams,this.result=[],this.teamsLoaded=!0})}onTeamSelected(t,s){let o=this.result.find(l=>l.srcId===s);null!=t?null!=o?o.dstId=t:this.result.push({dstId:t,srcId:s}):null!=o&&this.result.splice(this.result.indexOf(o),1)}alreadySelected(t){return this.result.some(s=>s.dstId===t)}submit(){var t=this;return(0,b.A)(function*(){!0===(yield t.dialog.open(S.w,{panelClass:"modal-md",data:{type:"merge-teams"}}).afterClosed().toPromise())&&t.apiCompetitionService.mergeTeams({mergeTeams:t.result,teams:t.teams},t.currentIntegration).subscribe(m=>{t.isSubmiting=!1,t.ngOnInit()},()=>{t.isSubmiting=!1}),t.isSubmiting=!0})()}ngOnDestroy(){null!=this.subscription&&this.subscription.unsubscribe()}static \u0275fac=function(s){return new(s||i)(e.rXU(v.Y),e.rXU(M.d),e.rXU(R.h),e.rXU(T.k),e.rXU(j.o),e.rXU(F.Y),e.rXU(I.E),e.rXU(f.X))};static \u0275cmp=e.VBU({type:i,selectors:[["competition-team-merge-ow"]],standalone:!1,decls:7,vars:7,consts:[[1,"admin-dashboard","white",3,"ngClass"],["type","info","mensaje","Aqui puedes fusionar equipos de OW que aun no tengan plantilla ni entrenamientos con equipos ya creados en el club que no pertenezcan a OW, si no quieres fusionar algun equipo simplemente no selecciones ningun equipo en el selector de esa fila"],[1,"dashboard"],[1,"section-header"],[1,"content"],[1,"title"],["placeholder","Integracion",3,"selectionChange","value"],["value","owTeam"],["value","teamScraper"],["value","federatioTeam"],["value","acbTeam"],[3,"selectionChange","placeholder","value"],[3,"value"],["type","info","mensaje","No hay que equipos que se puedan fusionar en esta seccion y temporada"],["mat-raised-button","",1,"middle-btn","btn-sm","btn-primary",3,"click","disabled"],[1,"spinner-xxs"],[1,"table-form"],[1,"table-form-row","heading"],[1,"table-form-row"],[1,"message"],[1,"nameClupik"],[3,"selectionChange","placeholder"],[3,"disabled","value"]],template:function(s,o){1&s&&(e.j41(0,"div",0),e.nrm(1,"app-alerts",1),e.j41(2,"div",2),e.nVh(3,N,24,12,"div",3)(4,Y,1,0,"app-skeleton-block"),e.nVh(5,z,17,3,"div",4)(6,Z,1,0,"app-skeleton-block"),e.k0s()()),2&s&&(e.Y8G("ngClass",e.sMw(3,E,o.clubService.isTopBar()&&!o.breadCrumbs.hasBreadcrumbs(),o.breadCrumbs.hasBreadcrumbs()&&o.clubService.onlyBread(),o.breadCrumbs.hasBreadcrumbs()&&o.clubService.isTopBar())),e.R7$(3),e.vxM(o.isLoaded?3:4),e.R7$(2),e.vxM(o.teamsLoaded?5:6))},dependencies:[$.YU,y.M,O.$z,G.j,k.g,V.K,x.Z,X.D9],styles:[".content[_ngcontent-%COMP%]{display:flex;flex-direction:column}"]})}return i})(),W=(()=>
1{class i{static \u0275fac=function(s){return new(s||i)};static \u0275mod=e.$C({type:i});static \u0275inj=r.G2t({imports:[h.G,p.g,g.P]})}return i})();var u=n(38132);const P=[{path:"",component:A}];let d=(()=>{class i{static \u0275fac=function(s){return new(s||i)};static \u0275mod=e.$C({type:i});static \u0275inj=r.G2t({imports:[u.iI.forChild(P),u.iI]})}return i})(),K=(()=>{class i{static \u0275fac=function(s){return new(s||i)};static \u0275mod=e.$C({type:i});static \u0275inj=r.G2t({imports:[W,d,d]})}return i})()}}]);
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.