PageSourceSearch

https://www.basketball.scot/18465.1a2ebbfdac05572f.js

js basketball.scot collected 2026-10-08 22:48:40 UTC 26,669 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkapp=self.webpackChunkapp||[]).push([[18465],{18236:(Y,k,i)=>{i.d(k,{f:()=>t});var I=i(69915),M=i(68010),F=i(60152),R=i(13961),n=i(73664),S=i(91029),D=i(735),C=i(72200),$=i(85340),_=i(62467);function E(v,h){if(1&v&&(n.j41(0,"div",1),n.nrm(1,"app-navbar-tabs",2)(2,"app-clupik-button",3),n.k0s()),2&v){const u=n.XpG();n.R7$(),n.Y8G("navbar",u.navbar)("active",u.active)("hasLine",!1),n.R7$(),n.Y8G("label","global.common.see_product")("type","link")("config","main")("size","sm")("isExternalLink",!0)("link",u.productLink)}}let t=(()=>{class v{activatedRoute;globalTabs;authService;clubsService;route;appService;info;link;productId;active=0;subscription=new R.yU;navbar="navbarStoreAdminProduct";productLink;constructor(u,d,y,U,j,O){this.activatedRoute=u,this.globalTabs=d,this.authService=y,this.clubsService=U,this.route=j,this.appService=O,this.subscription.add(this.appService.subscribe("changeTab",x=>{const T=this.globalTabs.schemaNavTabs[this.navbar][x.index];T&&(this.link.lastUrl=T.link)})),this.subscription.add(this.appService.subscribe("updatePos",x=>{this.link=x.link,this.ngOnChanges()}))}ngOnChanges(){this.productId=this.info?.id,this.productLink=`/store/product/${this.productId}`;let u=this.globalTabs.getSchemaByType("navbarStoreAdminProduct",{authService:this.authService,clubsService:this.clubsService});u=u.map(d=>{d.skipChangeLocation=!0;const y=d.link.split("/")[d.link.split("/").length-1];return d.link=`./product/${this.productId}/${y}`,d.params={pos:this.link.id},d}),this.globalTabs.schemaNavTabs[this.navbar]=u,this.route.navigate([this.link.lastUrl],{relativeTo:this.activatedRoute,skipLocationChange:!1,replaceUrl:!1,queryParams:{pos:this.link.id}}).then(d=>{this.setActive()})}ngOnInit(){this.ngOnChanges()}setActive(){let u=this.route.url.split("/");switch(u[u.length-1].split("?")[0]){case"":case"information":this.active=0;break;case"sales":this.active=1}}ngOnDestroy(){this.subscription.unsubscribe()}static \u0275fac=function(d){return new(d||v)(n.rXU(S.nX),n.rXU(D.u),n.rXU(M.u),n.rXU(F.X),n.rXU(S.Ix),n.rXU(I.d))};static \u0275cmp=n.VBU({type:v,selectors:[["app-store-admin-product"]],inputs:{info:"info",link:"link"},standalone:!1,features:[n.OA$],decls:2,vars:1,consts:[["class","product-top",4,"ngIf"],[1,"product-top"],[3,"navbar","active","hasLine"],[3,"label","type","config","size","isExternalLink","link"]],template:function(d,y){1&d&&(n.DNE(0,E,3,9,"div",0),n.nrm(1,"router-outlet")),2&d&&n.Y8G("ngIf",null!=y.productId)},dependencies:[C.bT,S.n3,$.U,_.O],styles:[".product-top[_ngcontent-%COMP%]{margin-bottom:24px;display:flex;align-items:center;justify-content:space-between;position:relative;border-bottom:.5px solid var(--base-light-grey)}"]})}return v})()},18465:(Y,k,i)=>{i.r(k),i.d(k,{StoreAdminProductsDatabaseModule:()=>At});var I=i(28292),M=i(38132),F=i(80086),R=i(25615),n=i(10467),S=i(30720),D=i(67201),C=i(69915),$=i(19453),_=i(18236),E=i(89128),t=i(73664),v=i(91029),h=i(36229);function u(a,l){1&a&&t.nrm(0,"i",1)}let d=(()=>{class a{router;activatedRoute;apiClubsService;storeService;editDialog;appService;value;rowData;productLink;constructor(o,e,r,s,f,c){this.router=o,this.activatedRoute=e,this.apiClubsService=r,this.storeService=s,this.editDialog=f,this.appService=c}ngOnInit(){this.productLink=`/store/product/${this.rowData.id}`}delete(){this.editDialog.open(D.w,{panelClass:"modal-md",data:{type:"delete-product"}}).afterClosed().subscribe(e=>{!0===e&&this.storeService.broadcast("delete_product",{id:this.rowData.id})})}duplicate(){console.log("-------------------------------------------TODO")}edit(){this.appService.broadcast("addNewTab",{title:this.rowData.title,type:"store",data:this.rowData,url:`./product/${this.rowData.id}/information`,lastUrl:`./product/${this.rowData.id}/information`,iconType:"product",renderComponent:_.f,fixed:!1})}changeState(o){this.storeService.broadcast("update_product_state",{id:[this.rowData.id],state:o})}seeProduct(){this.router.navigate([`/store/product/${this.rowData.id}`])}static \u0275fac=function(e){return new(e||a)(t.rXU(v.Ix),t.rXU(v.nX),t.rXU(E.P),t.rXU($.n),t.rXU(h.h),t.rXU(C.d))};static \u0275cmp=t.VBU({type:a,selectors:[["ng-component"]],inputs:{value:"value",rowData:"rowData"},standalone:!1,decls:2,vars:1,consts:[[1,"visibility-icon"],[1,"fa-solid","fa-eye-slash"]],template:function(e,r){1&e&&(t.j41(0,"div",0),t.nVh(1,u,1,0,"i",1),t.k0s()),2&e&&(t.R7$(),t.vxM("INA"===r.rowData.state?1:-1))},encapsulation:2})}return a})();function y(a,l){1&a&&(t.j41(0,"span"),t.EFF(1,", "),t.k0s())}function U(a,l){if(1&a&&(t.j41(0,"span")(1,"span"),t.EFF(2),t.k0s(),t.nVh(3,y,2,0,"span"),t.k0s()),2&a){const o=l.$implicit,e=l.$index,r=t.XpG(2);t.R7$(2),t.JRh(o.name),t.R7$(),t.vxM(e<r.rowData.productCategories.length-1?3:-1)}}function j(a,l){if(1&a&&(t.j41(0,"div"),t.Z7z(1,U,4,2,"span",null,t.fX1),t.k0s()),2&a){const o=t.XpG();t.R7$(),t.Dyx(o.rowData.productCategories)}}function O(a,l){1&a&&(t.j41(0,"div"),t.EFF(1,"-"),t.k0s())}let x=(()=>{class a{value;rowData;categories=[];constructor(){}ngOnInit(){}static \u0275fac=function(e){return new(e||a)};static \u0275cmp=t.VBU({type:a,selectors:[["ng-component"]],inputs:{value:"value",rowData:"rowData"},standalone:!1,decls:2,vars:2,template:function(e,r){1&e&&(t.nVh(0,j,3,0,"div"),t.nVh(1,O,2,0,"div")),2&e&&(t.vxM(null!=r.rowData.productCategories&&r.rowData.productCategories.length>0?0:-1),t.R7$(),t.vxM(null==r.rowData.productCategories||r.rowData.productCategories.length<1?1:-1))},encapsulation:2})}return a})();var G=i(13961),T=i(54843),g=i(89417),m=i(2615),P=i(72200),K=i(93692),w=i(88834),J=i(23620),W=i(3543),B=i(82966),V=i(68018);const z=(a,l)=>({"ios-browser":a,"android-browser":l});function Q(a,l){if(1&a&&(t.j41(0,"mat-option",15),t.EFF(1),t.k0s()),2&a){const o=l.$implicit;t.Y8G("value",o.id),t.R7$(),t.JRh(o.name)}}function H(a,l){if(1&a){const o=t.RV6();t.j41(0,"form",10),t.bIt("ngSubmit",function(){m.eBV(o);const r=t.XpG();return m.Njj(r.submit(r.dataForm))}),t.j41(1,"div",11)(2,"mat-form-field",12)(3,"mat-select",13),t.nI1(4,"translate"),t.DNE(5,Q,2,2,"mat-option",14),t.k0s()()()()}if(2&a){const o=t.XpG();t.Y8G("formGroup",o.dataForm),t.R7$(3),t.Y8G("placeholder",t.bMT(4,3,"module.store.product_category")),t.R7$(2),t.Y8G("ngForOf",o.categories)}}function Z(a,l){1&a&&(t.j41(0,"div",16),t.nrm(1,"app-skeleton-block"),t.k0s())}let q=(()=>{class a{appService;apiStoreService;fb;dialogRef;dataForm;categories=[];loaded=!1;constructor(o,e,r,s){this.appService=o,this.apiStoreService=e,this.fb=r,this.dialogRef=s}ngOnInit(){var o=this;return(0,n.A)(function*(){o.apiStoreService.getCategoriesNoHierarchy().toPromise().then(e=>{o.loaded=!0,o.categories=e}),o.dataForm=o.fb.group({category:[null,g.k0.required]})})()}submit({value:o,valid:e}){e&&this.dialogRef.close(o.category)}static \u0275fac=function(e){return new(e||a)(t.rXU(C.d),t.rXU(S.d),t.rXU(g.ok),t.rXU(h.k))};static \u0275cmp=t.VBU({type:a,selectors:[["app-store-admin-product-assing-category-dialog"]],standalone:!1,decls:23,vars:27,consts:[[1,"modal-clupik"],["mat-dialog-title",""],[1,"title"],["type","button","mat-button","","mat-dialog-close","",1,"exit-button"],[1,"fix-content",3,"ngClass"],["class","full-width-form",3,"formGroup","ngSubmit",4,"ngIf"],["class","app-skeleton-block",4,"ngIf"],[1,"actions-right","modal
1-fixed-actions"],["type","button","mat-dialog-close","",1,"btn-close"],["type","button","mat-raised-button","",1,"btn-primary",3,"click"],[1,"full-width-form",3,"ngSubmit","formGroup"],[1,"form-row-outlined"],["appearance","outline"],["formControlName","category","multiple","",3,"placeholder"],[3,"value",4,"ngFor","ngForOf"],[3,"value"],[1,"app-skeleton-block"]],template:function(e,r){1&e&&(t.j41(0,"div",0)(1,"div",1)(2,"div",2),t.EFF(3),t.nI1(4,"translate"),t.k0s(),t.j41(5,"button",3),t.nI1(6,"translate"),t.EFF(7,"\xd7"),t.k0s()(),t.j41(8,"mat-dialog-content",4),t.DNE(9,H,6,5,"form",5)(10,Z,2,0,"div",6),t.k0s()(),t.j41(11,"div",7)(12,"button",8),t.nI1(13,"translate"),t.EFF(14),t.nI1(15,"translate"),t.k0s(),t.j41(16,"div",2),t.EFF(17),t.nI1(18,"translate"),t.k0s(),t.j41(19,"button",9),t.nI1(20,"translate"),t.bIt("click",function(){return r.submit(r.dataForm)}),t.EFF(21),t.nI1(22,"translate"),t.k0s()()),2&e&&(t.R7$(3),t.JRh(t.bMT(4,10,"module.store.assing_category_modal")),t.R7$(2),t.BMQ("aria-label",t.bMT(6,12,"global.common.close")),t.R7$(3),t.Y8G("ngClass",t.l_i(24,z,null==r.appService?null:r.appService.isIosBrowser,null==r.appService?null:r.appService.isAndroidBrowser)),t.R7$(),t.Y8G("ngIf",r.loaded),t.R7$(),t.Y8G("ngIf",!r.loaded),t.R7$(2),t.BMQ("aria-label",t.bMT(13,14,"global.common.close")),t.R7$(2),t.JRh(t.bMT(15,16,"global.common.close")),t.R7$(3),t.JRh(t.bMT(18,18,"module.store.assing_category_modal")),t.R7$(2),t.BMQ("aria-label",t.bMT(20,20,"global.common.confirm")),t.R7$(2),t.JRh(t.bMT(22,22,"global.common.confirm")))},dependencies:[P.YU,P.Sq,P.bT,K.M,w.$z,h.a,h.b,h.c,J.j,W.g,g.qT,g.BC,g.cb,g.j4,g.JD,B.K,V.D9],encapsulation:2})}return a})();var L=i(74173),tt=i(49412);const et=(a,l)=>({"ios-browser":a,"android-browser":l});function ot(a,l){if(1&a&&(t.j41(0,"form",10),t.nrm(1,"app-filtered-mat-select",11),t.nI1(2,"translate"),t.k0s()),2&a){const o=t.XpG();t.Y8G("formGroup",o.dataForm),t.R7$(),t.Y8G("fieldAppearance","outline")("formGroup",o.dataForm)("optionsData",o.providers)("placeholder",t.bMT(2,5,"module.store.product_provider"))}}function at(a,l){1&a&&(t.j41(0,"div",12),t.nrm(1,"app-skeleton-block"),t.k0s())}let rt=(()=>{class a{apiStoreService;appService;fb;dialogRef;dataForm;providers=[];loaded=!1;constructor(o,e,r,s){this.apiStoreService=o,this.appService=e,this.fb=r,this.dialogRef=s}ngOnInit(){var o=this;return(0,n.A)(function*(){o.apiStoreService.getProviders().toPromise().then(e=>{o.loaded=!0,o.providers=e.map(r=>({id:r.id,name:r.firstName}))}),o.dataForm=o.fb.group({provider:[null,g.k0.required]})})()}submit({value:o,valid:e}){e&&this.dialogRef.close({id:o.provider})}static \u0275fac=function(e){return new(e||a)(t.rXU(S.d),t.rXU(C.d),t.rXU(g.ok),t.rXU(h.k))};static \u0275cmp=t.VBU({type:a,selectors:[["app-store-admin-product-assign-provider-dialog"]],standalone:!1,decls:23,vars:27,consts:[[1,"modal-clupik"],["mat-dialog-title",""],[1,"title"],["type","button","mat-button","","mat-dialog-close","",1,"exit-button"],[1,"fix-content",3,"ngClass"],["class","full-width-form",3,"formGroup",4,"ngIf"],["class","app-skeleton-block",4,"ngIf"],[1,"actions-right","modal-fixed-actions"],["type","button","mat-dialog-close","",1,"btn-close"],["type","button","mat-raised-button","",1,"btn-primary",3,"click"],[1,"full-width-form",3,"formGroup"],["formCName","provider","required","",3,"fieldAppearance","formGroup","optionsData","placeholder"],[1,"app-skeleton-block"]],template:function(e,r){1&e&&(t.j41(0,"div",0)(1,"div",1)(2,"div",2),t.EFF(3),t.nI1(4,"translate"),t.k0s(),t.j41(5,"button",3),t.nI1(6,"translate"),t.EFF(7,"\xd7"),t.k0s()(),t.j41(8,"mat-dialog-content",4),t.DNE(9,ot,3,7,"form",5)(10,at,2,0,"div",6),t.k0s()(),t.j41(11,"div",7)(12,"button",8),t.nI1(13,"translate"),t.EFF(14),t.nI1(15,"translate"),t.k0s(),t.j41(16,"div",2),t.EFF(17),t.nI1(18,"translate"),t.k0s(),t.j41(19,"button",9),t.nI1(20,"translate"),t.bIt("click",function(){return r.submit(r.dataForm)}),t.EFF(21),t.nI1(22,"translate"),t.k0s()()),2&e&&(t.R7$(3),t.JRh(t.bMT(4,10,"module.store.assing_provider_modal")),t.R7$(2),t.BMQ("aria-label",t.bMT(6,12,"global.common.close")),t.R7$(3),t.Y8G("ngClass",t.l_i(24,et,null==r.appService?null:r.appService.isIosBrowser,null==r.appService?null:r.appService.isAndroidBrowser)),t.R7$(),t.Y8G("ngIf",r.loaded),t.R7$(),t.Y8G("ngIf",!r.loaded),t.R7$(2),t.BMQ("aria-label",t.bMT(13,14,"global.common.close")),t.R7$(2),t.JRh(t.bMT(15,16,"global.common.close")),t.R7$(3),t.JRh(t.bMT(18,18,"module.store.assing_provider_modal")),t.R7$(2),t.BMQ("aria-label",t.bMT(20,20,"global.common.confirm")),t.R7$(2),t.JRh(t.bMT(22,22,"global.common.confirm")))},dependencies:[P.YU,P.bT,w.$z,h.a,h.b,h.c,g.qT,g.cb,g.j4,B.K,tt.T,V.D9],encapsulation:2})}return a})(),it=(()=>{class a{globalVars;value;rowData;priceValue;constructor(o){this.globalVars=o}ngOnInit(){let o=this.globalVars.getFormattedStringMoney(this.value.split("-")[0].trim()),e=this.globalVars.getFormattedStringMoney(this.value.split("-")[1].trim());this.priceValue=o!==e?`${o} - ${e}`:o}static \u0275fac=function(e){return new(e||a)(t.rXU(R.Y))};static \u0275cmp=t.VBU({type:a,selectors:[["ng-component"]],inputs:{value:"value",rowData:"rowData"},standalone:!1,decls:2,vars:1,consts:[[1,"right"]],template:function(e,r){1&e&&(t.j41(0,"div",0),t.EFF(1),t.k0s()),2&e&&(t.R7$(),t.SpI(" ",r.priceValue," "))},encapsulation:2})}return a})();var st=i(6961),nt=i(7044),lt=i(54423),ct=i(96732),dt=i(94474),ut=i(95064),pt=i(49255);function mt(a,l){1&a&&t.nrm(0,"app-skeleton-table")}function ft(a,l){if(1&a&&(t.nrm(0,"app-alerts",4),t.nI1(1,"translate")),2&a){const o=t.XpG(2);t.Y8G("mensaje",t.bMT(1,1,o.alertMessage))}}function gt(a,l){if(1&a&&(t.nrm(0,"app-alerts",5),t.nI1(1,"translate")),2&a){const o=t.XpG(2);t.Y8G("mensaje",t.bMT(1,1,o.alertMessage))}}function bt(a,l){if(1&a){const o=t.RV6();t.j41(0,"app-clupik-table",6),t.bIt("onRowClicked",function(r){m.eBV(o);const s=t.XpG(2);return m.Njj(s.editProduct(r))})("onButtonClicked",function(r){m.eBV(o);const s=t.XpG(2);return m.Njj(s.selectAction(r))})("onSelectAllActionClicked",function(r){m.eBV(o);const s=t.XpG(2);return m.Njj(s.selectMultipleAction(r))}),t.k0s()}if(2&a){const o=t.XpG(2);t.Y8G("settings",o.tableConfig)}}function vt(a,l){if(1&a){const o=t.RV6();t.qex(0),t.j41(1,"div",7)(2,"button",8),t.bIt("click",function(){m.eBV(o);const r=t.XpG(2);return m.Njj(r.selectAction("order"))}),t.nrm(3,"i",9),t.j41(4,"span"),t.EFF(5),t.nI1(6,"translate"),t.k0s()()(),t.bVm()}
12&a&&(t.R7$(5),t.JRh(t.bMT(6,1,"global.button.return")))}function ht(a,l){if(1&a&&(t.qex(0),t.DNE(1,ft,2,3,"app-alerts",1)(2,gt,2,3,"app-alerts",2)(3,bt,1,1,"app-clupik-table",3)(4,vt,7,3,"ng-container",0),t.bVm()),2&a){const o=t.XpG();t.R7$(),t.Y8G("ngIf",o.alertSuccess),t.R7$(),t.Y8G("ngIf",o.showDangerAlert),t.R7$(),t.Y8G("ngIf",o.tableView),t.R7$(),t.Y8G("ngIf",!o.tableView)}}let St=(()=>{class a{apiStoreService;fuseTranslateService;appService;storeService;dialog;router;_modalService;apiSubscriptionService;globalVars;get totalProuducts(){return null===this.planStoreLimits||this.productsOrderTable.length<=this.planStoreLimits}get planStoreLimits(){let o=JSON.parse(localStorage.getItem("subscription")),e=JSON.parse(localStorage.getItem("subscriptionPrices"));if(!o)return null;{let r=e?.find(s=>s.code===o.currentPlan.plan);if(r)return r.store.products}}alertSuccess=!1;showDangerAlert=!1;productsLoaded=!1;subscription=new G.yU;products=[];categories=[];subscriptionPrices=[];table;tableConfig={serverFiltered:!0,serverModel:"Product",paginator:{size:30,paginatorType:"vertical"},title:"products",noDataMessage:"no_products_found",class:"full-height-clupik-table",rowClickEvent:!0,multipleSelect:{showMultipleSelect:!0,selectAllMessage:"product",sections:[{title:"quick_actions",actions:[{type:"custom",icon:"fa-light fa-eye",text:"global.common.active",broadcastKey:"show"},{type:"custom",icon:"fa-light fa-eye-slash",text:"global.common.desactive",broadcastKey:"hide"},{type:"custom",icon:"fa-light fa-network-wired",text:"module.store.assign_category",broadcastKey:"assign_category"},{type:"custom",icon:"fa-light fa-handshake",text:"module.store.assign_provider",broadcastKey:"assign_provider"},{type:"custom",icon:"fa-light fa-trash",text:"global.common.remove",broadcastKey:"remove"}]}]},buttonsDesktop:[{type:"academy"},{type:"filter"},{type:"custom-icon",tooltip:"global.common.orderit",icon:"fa-regular fa-sort-alt",iconEnd:!0,broadcastKey:"order"},{type:"custom-icon",tooltip:"global.table.export.default",icon:"fa-regular fa-file-export",broadcastKey:"export"},{type:"primary",icon:"fa fa-plus",text:"module.store.new_product",broadcastKey:"add_product"}],buttonsMobile:[{type:"academy"},{type:"primary",icon:"fa fa-plus",tooltip:"module.store.new_product",broadcastKey:"add_product"},{type:"list",options:[{type:"custom-icon",text:"global.common.orderit",icon:"fa-light fa-sort-alt",broadcastKey:"order"},{type:"primary",icon:"fa-light fa-file-export",text:"global.table.export.default",broadcastKey:"export"}]}],columns:{actions:{stickedFront:!0,hideSticky:!0,noExport:!0,title:"",type:"custom",renderComponent:nt.H,actionsData:{actions:[{icon:"fa-light fa-pencil",text:"global.common.edit",condition:(o,e)=>!0,disabled:(o,e)=>!1,event:(o,e)=>this.edit(o,e)},{id:"active",icon:"fa-light fa-eye",text:"global.common.change_state",disabled:(o,e)=>!1,condition:(o,e)=>!0,children:[{icon:"fa-light fa-eye",text:"global.common.active",condition:(o,e)=>!0,disabled:(o,e)=>!1,event:(o,e)=>this.changeState(o,e,!0)},{icon:"fa-light fa-eye-slash",text:"global.common.desactive",condition:(o,e)=>!0,disabled:(o,e)=>!1,event:(o,e)=>this.changeState(o,e,!1)}]},{icon:"fa-light fa-link",text:"global.common.see_product",condition:(o,e)=>!0,disabled:(o,e)=>!1,event:(o,e)=>this.router.navigate([`/store/product/${e.id}`])},{icon:"fa-light fa-trash",text:"global.common.remove",condition:(o,e)=>!0,disabled:(o,e)=>!1,event:(o,e)=>this.delete(o,e)}]}},old:{title:"",type:"custom",renderComponent:d,stickedFront:!0,hideSticky:!0,noExport:!0,class:"column-xxs"},image:{type:"image",imageType:"product",noExport:!0},title:{filterType:{type:"text",filterName:"Product_title",filterServerName:"title",filterServerColumn:"title"},title:"name",configTitle:"name",type:"text",sort:!0,filter:!0},productCategories:{filterType:{type:"selector",options:[],filterName:"ProductCategory_category",filterServerName:"category",filterServerColumn:"id"},title:"category",configTitle:"category",type:"custom",renderComponent:x,filter:!0,customExportFunction:function(){var o=(0,n.A)(function*(e){let r="";if(null!=e.productCategories){for(let s of e.productCategories)r+=`${s.name}\n`;r=r.trim()}return r});return function(r){return o.apply(this,arguments)}}()},stock:{filterType:{type:"number",filterName:"Product_stock",filterServerName:"stock",filterServerColumn:"id"},title:"stock",configTitle:"stock",type:"number",class:"column-xs"},providerName:{filterType:{type:"selector",options:[],filterName:"User_id",filterServerName:"providerId",filterServerColumn:"id"},title:"provider",configTitle:"provider",type:"text",filter:!0,class:"column-xs"},sales:{title:"sales",configTitle:"sales",type:"number",class:"column-xs"},price:{title:"price",configTitle:"price",type:"custom",class:"column-xs",renderComponent:it,customExportFunction:(()=>{var e,o=this;return e=(0,n.A)(function*(r){let s,f=o.globalVars.getFormattedStringMoney(r.price.split("-")[0].trim()),c=o.globalVars.getFormattedStringMoney(r.price.split("-")[1].trim());return s=f!==c?`${f} - ${c}`:f,s}),function(s){return e.apply(this,arguments)}})()}}};alertMessage;tableView=!0;productsOrderTable;constructor(o,e,r,s,f,c,p,b,X){this.apiStoreService=o,this.fuseTranslateService=e,this.appService=r,this.storeService=s,this.dialog=f,this.router=c,this._modalService=p,this.apiSubscriptionService=b,this.globalVars=X,this.subscription.add(this.storeService.subscribe("delete_product",A=>{this.apiStoreService.deleteProduct(A.id).subscribe(Dt=>{this.table.reload()})})),this.subscription.add(this.storeService.subscribe("update_product_state",A=>{this.updateState(A.state,A.id)})),this.subscription.add(this.storeService.subscribe("reload_products",()=>{this.table.reload()})),this.subscription.add(this.storeService.subscribe("add_products_finish",A=>{A.ok&&(this.alertSuccess=!0,this.alertMessage="module.store.product_created",this.table.reload())}))}ngOnInit(){var o=this;return(0,n.A)(function*(){o.showDangerAlert=!1,o.alertSuccess=!1,o.productsOrderTable=yield(0,T._)(o.apiStoreService.getProductsToOrder()),o.categories=yield(0,T._)(o.apiStoreService.getCategoriesNoHierarchy()),o.tableConfig.columns.productCategories.filterType.options=o.categories.map(r=>({nameValue:r.name,searchValue:r.id}));let e=yield(0,T._)(o.apiStoreService.getProviders());o.tableConfig.columns.providerName.filterType.options=e.map(r=>({nameValue:r.firstName,searchValue:r.id})),o.productsLoaded=!0})()}orderTable(){this.productsOrderTable.forEach((o,e)=>{this.apiStoreService.changeProductOrder(o.id,e).subscribe()})}selectMultipleAction(o){var e=this;return(0,n.A)(function*({rows:r,key:s}){switch(s){case"hide":e.updateState(!1,r.map(c=>c.id));break;case"show":e.updateState(!0,r.map(c=>c.id));break;case"remove":e.dialog.open(D.w,{panelClass:"modal-md",data:{type:"delete-multiple-products"}}).afterClosed().subscribe(c=>
1{!0===c&&(e.table.setLoadingBar(!0),e.alertSuccess=!1,e.apiStoreService.deleteProducts(r.map(p=>p.id)).subscribe(p=>{e.table.setLoadingBar(!1),e.table.reload(),e.alertMessage="module.store.product_deleted",e.showDangerAlert=!1,e.alertSuccess=!0},p=>{e.alertSuccess=!1,e.showDangerAlert=!0}))});break;case"assign_category":{let c=e.dialog.open(q,{panelClass:"modal-lg"});e.alertSuccess=!1,c.afterClosed().subscribe(p=>{"object"==typeof p&&e.apiStoreService.assignCategoryToProducts(p,r.map(b=>b.id)).subscribe(b=>{e.table.reload(),e.showDangerAlert=!1,e.alertMessage="module.store.product_updated",e.alertSuccess=!0},b=>{e.alertSuccess=!1,e.showDangerAlert=!0})})}break;case"assign_provider":{let c=e.dialog.open(rt,{panelClass:"modal-lg"});e.alertSuccess=!1,c.afterClosed().subscribe(p=>{"object"==typeof p&&e.apiStoreService.assignProviderToProducts(p.id,r.map(b=>b.id)).subscribe(b=>{e.table.reload(),e.showDangerAlert=!1,e.alertSuccess=!0,e.alertMessage="module.store.product_updated"},b=>{e.alertSuccess=!1,e.showDangerAlert=!0})})}}}).apply(this,arguments)}selectAction(o){var e=this;return(0,n.A)(function*(){e.appService.broadcast("closeDropdown");let r=yield e.fuseTranslateService.getTranslation("module.store.create_new_product");"add_product"===o?(yield e.apiSubscriptionService.checkFeature("products",!0))&&e.appService.broadcast("addNewTab",{title:r,type:"store",data:null,url:"./product/information",lastUrl:"./product/information",iconType:"product",renderComponent:_.f,fixed:!1}):"export"===o?e.export():"order"===o&&e.orderProducts()})()}orderProducts(){var o=this;return(0,n.A)(function*(){o.apiStoreService.getProductsToOrder().subscribe(function(){var e=(0,n.A)(function*(r){o.productsOrderTable=r;let s=yield o._modalService.openModal({component:ct.c,modalSize:"medium",data:{tableRows:o.productsOrderTable,canHaveChildren:!1},options:{}});s.data&&(o.productsLoaded=!1,o.apiStoreService.changeBulkProductOrder(s.data.map(f=>({id:f.id,order:f.order}))).subscribe({next:f=>{let c=[];for(let p of s.data){let b=o.productsOrderTable.find(X=>X.id===p.id);b.order=p.order,c.push(b)}o.productsOrderTable=c,o.productsLoaded=!0},error:f=>{o.productsLoaded=!0}}))});return function(r){return e.apply(this,arguments)}}())})()}export(){this.table.exportTable("products")}editProduct(o){this.appService.broadcast("addNewTab",{title:o.title,type:"store",data:o,url:`./product/${o.id}/information`,lastUrl:`./product/${o.id}/information`,iconType:"product",renderComponent:_.f,fixed:!1})}updateState(o,e,r=null){this.alertSuccess=!1,this.apiStoreService.updateProductVisibility(o,e).subscribe({next:s=>{this.showDangerAlert=!1,this.alertSuccess=!0,this.alertMessage="module.store.product_updated",r?this.table.tableDataSource.update(r,s[0]):this.table.reload()},error:s=>{this.alertSuccess=!1,this.showDangerAlert=!0}})}ngOnDestroy(){this.subscription.unsubscribe()}delete(o,e){this.dialog.open(D.w,{panelClass:"modal-md",data:{type:"delete-product"}}).afterClosed().subscribe(r=>{!0===r&&(this.storeService.broadcast("delete_product",{id:e.id}),this.table.tableDataSource.remove(e))})}changeState(o,e,r){this.updateState(r,[e.id],e)}edit(o,e){this.appService.broadcast("addNewTab",{title:e.title,type:"store",data:e,url:`./product/${e.id}/information`,lastUrl:`./product/${e.id}/information`,iconType:"product",renderComponent:_.f,fixed:!1})}static \u0275fac=function(e){return new(e||a)(t.rXU(S.d),t.rXU(st.T),t.rXU(C.d),t.rXU($.n),t.rXU(h.h),t.rXU(v.Ix),t.rXU(dt.M),t.rXU(lt.P),t.rXU(R.Y))};static \u0275cmp=t.VBU({type:a,selectors:[["app-store-admin-products-list"]],viewQuery:function(e,r){if(1&e&&t.GBs(L.YT,5),2&e){let s;t.mGM(s=t.lsd())&&(r.table=s.first)}},standalone:!1,decls:2,vars:2,consts:[[4,"ngIf"],["type","success","dismissable","true",3,"mensaje",4,"ngIf"],["type","danger","dismissable","true",3,"mensaje",4,"ngIf"],[3,"settings","onRowClicked","onButtonClicked","onSelectAllActionClicked",4,"ngIf"],["type","success","dismissable","true",3,"mensaje"],["type","danger","dismissable","true",3,"mensaje"],[3,"onRowClicked","onButtonClicked","onSelectAllActionClicked","settings"],[1,"actions-right"],[1,"btn-only-text",3,"click"],[1,"fa-light","fa-arrow-left"]],template:function(e,r){1&e&&t.DNE(0,mt,1,0,"app-skeleton-table",0)(1,ht,5,4,"ng-container",0),2&e&&(t.Y8G("ngIf",!r.productsLoaded),t.R7$(),t.Y8G("ngIf",r.productsLoaded))},dependencies:[P.bT,L.YT,ut.X,pt.Z,V.D9],styles:["@media (max-width: 991px){.actions-right[_ngcontent-%COMP%]{padding-right:16px}}"]})}return a})();var yt=i(42677);const Ct=[{path:"",component:(()=>{class a{globalVars;
1tableTab={index:0,id:0,type:null,params:null,url:"../list",fixed:!0,title:"global.title.products",info:null,renderComponent:St};constructor(o){this.globalVars=o}ngOnInit(){setTimeout(()=>{this.globalVars.navbarTop.title="global.title.products"})}static \u0275fac=function(e){return new(e||a)(t.rXU(R.Y))};static \u0275cmp=t.VBU({type:a,selectors:[["app-store-admin-products-database"]],standalone:!1,decls:2,vars:1,consts:[[1,"dashboard-table-content"],[3,"tableTab"]],template:function(e,r){1&e&&(t.j41(0,"div",0),t.nrm(1,"app-table-tabs",1),t.k0s()),2&e&&(t.R7$(),t.Y8G("tableTab",r.tableTab))},dependencies:[yt.w],encapsulation:2})}return a})(),children:[{path:"product",loadChildren:()=>i.e(54917).then(i.bind(i,54917)).then(a=>a.StoreAdminProductModule),canActivate:[F.x]},{path:"order/:purchaseId",loadChildren:()=>Promise.all([i.e(72076),i.e(32090)]).then(i.bind(i,82860)).then(a=>a.StoreAdminPurchaseModule),canActivate:[F.x]}]}];let N=(()=>{class a{static \u0275fac=function(e){return new(e||a)};static \u0275mod=t.$C({type:a});static \u0275inj=m.G2t({imports:[M.iI.forChild(Ct),M.iI]})}return a})();var _t=i(81315),Tt=i(66846);let Pt=(()=>{class a{static \u0275fac=function(e){return new(e||a)};static \u0275mod=t.$C({type:a});static \u0275inj=m.G2t({imports:[I.B,_t.M,Tt.w]})}return a})(),At=(()=>{class a{static \u0275fac=function(e){return new(e||a)};static \u0275mod=t.$C({type:a});static \u0275inj=m.G2t({imports:[I.B,Pt,N,N]})}return a})()}}]);

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.