marketplacepos 2.9.6 → 2.9.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkpos_marketplace=self.webpackChunkpos_marketplace||[]).push([[478],{9478:(Ke,Z,r)=>{r.r(Z),r.d(Z,{PriceModule:()=>$e});var _=r(6814),y=r(6027),m=r(4387),C=r(9790),h=r(6223),E=r(4807),e=r(5879);let q=(()=>{var o;class l{constructor(){this.priceTabs=[{Title:"Single Channel Comparison",Url:"/menu/price/SingleChannel"},{Title:"Multi Channel Comparison",Url:"/menu/price/pos"},{Title:"Custom Channel Price",Url:"/menu/price/OutletPrice"}]}}return(o=l).\u0275fac=function(n){return new(n||o)},o.\u0275cmp=e.Xpm({type:o,selectors:[["app-price"]],decls:5,vars:1,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid"],[3,"Tabs"]],template:function(n,i){1&n&&(e.TgZ(0,"nav",0)(1,"div",1)(2,"div"),e._UZ(3,"nav-tab",2),e.qZA()()(),e._UZ(4,"router-outlet")),2&n&&(e.xp6(3),e.Q6J("Tabs",i.priceTabs))},dependencies:[y.e,C.lC]}),l})();var w=r(2383),A=r(7797),F=r(9397),d=r(2181),g=r(5802),f=r(9659),x=r(9229),P=r(7700),N=r(8695),b=r(5993),D=r(6026);function V(o,l){if(1&o){const t=e.EpF();e.TgZ(0,"button",16),e.NdJ("click",function(){e.CHM(t);const i=e.oxw(3);return e.KtG(i.openScanDialog())}),e._UZ(1,"i",17),e._uU(2," Scan Channel "),e.qZA()}}function Y(o,l){if(1&o){const t=e.EpF();e.TgZ(0,"button",18),e.NdJ("click",function(){e.CHM(t);const i=e.oxw().ngIf,a=e.oxw(2);return e.KtG(a.onUpdateItems(i))}),e._UZ(1,"i",19),e._uU(2," Update "),e.qZA()}}function $(o,l){if(1&o&&(e.TgZ(0,"div"),e.YNc(1,V,3,0,"button",14),e.YNc(2,Y,3,0,"button",15),e.qZA()),2&o){const t=l.ngIf,n=e.oxw(2);e.xp6(1),e.Q6J("ngIf",!n.productService.hasSelectionVariant(t)),e.xp6(1),e.Q6J("ngIf",n.productService.hasSelectionVariant(t))}}function K(o,l){if(1&o){const t=e.EpF();e.TgZ(0,"div",20)(1,"app-table",21),e.NdJ("onToggle",function(i){e.CHM(t);const a=e.oxw(2);return e.KtG(a.onShowDifferencePrice(i))})("onSubmit",function(i){e.CHM(t);const a=e.oxw(2);return e.KtG(a.updatePriceByVariant(i))}),e.ALo(2,"async"),e.qZA()()}if(2&o){const t=e.oxw().ngIf,n=e.oxw();e.xp6(1),e.Q6J("showProductToggle",!0)("data",e.lcZ(2,4,n.paginationService.data$))("channel",t.Options.Channel)("filter",t.Filter)}}function G(o,l){if(1&o){const t=e.EpF();e.TgZ(0,"span",22),e.NdJ("click",function(){e.CHM(t);const i=e.oxw(2);return e.KtG(i.getRowCount())}),e.TgZ(1,"i",23),e._uU(2,"?"),e.qZA()()}}function R(o,l){if(1&o&&(e.TgZ(0,"span"),e._uU(1),e.ALo(2,"number"),e.qZA()),2&o){const t=l.ngIf;e.xp6(1),e.Oqu(e.lcZ(2,1,t))}}function H(o,l){if(1&o){const t=e.EpF();e.TgZ(0,"a",24),e.NdJ("click",function(){e.CHM(t);const i=e.oxw(2);return e.KtG(i.onNextPage())}),e._UZ(1,"i",25),e._uU(2," Next"),e.qZA()}}function B(o,l){if(1&o){const t=e.EpF();e.TgZ(0,"a",26),e.NdJ("click",function(){e.CHM(t);const i=e.oxw(2);return e.KtG(i.onLastPage())}),e._UZ(1,"i",27),e._uU(2," Last"),e.qZA()}}function j(o,l){if(1&o){const t=e.EpF();e.TgZ(0,"mainpanel",1),e.NdJ("onSubmit",function(i){e.CHM(t);const a=e.oxw();return e.KtG(a.onSearch(i))}),e.TgZ(1,"actions")(2,"div",2),e.YNc(3,$,3,2,"div",3),e.ALo(4,"async"),e.qZA()(),e.TgZ(5,"content")(6,"div",4)(7,"div",5),e.YNc(8,K,3,6,"div",6),e.ALo(9,"async"),e.qZA(),e.TgZ(10,"div",7)(11,"div",8)(12,"div",9),e._uU(13),e.ALo(14,"number"),e.ALo(15,"async"),e.YNc(16,G,3,0,"span",10),e.YNc(17,R,3,3,"span",3),e.ALo(18,"async"),e._uU(19),e.qZA()(),e.TgZ(20,"div",11),e.YNc(21,H,3,0,"a",12),e.YNc(22,B,3,0,"a",13),e.qZA()()()()()}if(2&o){const t=e.oxw();let n;e.Q6J("pageData",t.pageData)("hideSearchDropdown",!0)("textButton","Search"),e.xp6(3),e.Q6J("ngIf",e.lcZ(4,11,t.paginationService.data$)),e.xp6(5),e.Q6J("ngIf",e.lcZ(9,13,t.paginationService.data$)),e.xp6(5),e.hij(" Showing 1 - ",e.lcZ(14,15,null==(n=e.lcZ(15,17,t.paginationService.data$))?null:n.length)," of "),e.xp6(3),e.Q6J("ngIf",t.paginationService.hideCount),e.xp6(1),e.Q6J("ngIf",!t.paginationService.hideCount&&e.lcZ(18,19,t.allDataCount$)),e.xp6(2),e.hij(" records ~ ",t.paginationService.footerPageNumber," Page "),e.xp6(2),e.Q6J("ngIf",t.paginationService.disableNextButton&&!t.paginationService.goToLastPage),e.xp6(1),e.Q6J("ngIf",t.paginationService.disableNextButton&&!t.paginationService.goToLastPage)}}let z=(()=>{var o;class l{constructor(n,i,a,c,s){this.http=n,this.toastr=i,this.dialog=a,this.paginationService=c,this.productService=s,this.loaderAPI="PriceLoader/LoadMultiple",this.getDataAPI="Price/GetMultipleChannelComparison",this.rowCountAPI="Inventory/GetMultipleChannelComparisonRowCount",this.filterOptions=[{Key:1,Value:"All"},{Key:3,Value:"Difference"}],this.pageData={Title:"Price",Nav:[{Title:"Price Cache",Url:"/menu/price",Active:!0},{Title:"Price Realtime",Url:"/menu/price/realtime",Active:!1}]}}ngOnInit(){this.initPageLoader()}initPageLoader(){this.paginationService.fetchDataEndpoint=this.getDataAPI,this.loader$=this.http.post(`/api/${this.loaderAPI}`).pipe((0,F.b)(n=>{this.channelOptions=n.Options.Channel,n.Filter={PageNumber:n.Filter.PageNumber,RowCount:n.Filter.RowCount,filterModel:1},this.searchFilter=n.Filter,this.paginationService.reloadPagination(this.searchFilter)}))}onShowDifferencePrice(n){this.searchFilter.filterModel=1,n&&(this.searchFilter.filterModel=3),this.paginationService.reloadPagination(this.searchFilter)}onSearch(n){this.searchFilter.text=n,this.paginationService.reloadPagination(this.searchFilter)}openScanDialog(){this.searchFilter.ChannelID=g.g.GuidEMpty;let n=JSON.parse(JSON.stringify(this.searchFilter));this.dialog.open(w.j,{data:{filter:n,channelOptions:this.channelOptions},width:"600px"}).afterClosed().pipe((0,d.h)(a=>g.g.IsNotEmpty(a))).subscribe(a=>{this.searchFilter.ChannelID=a.ChannelID,this.searchFilter.ScanFull=a.ScanFull,this.searchFilter.UpdatedProduct=a.UpdatedProduct,this.searchFilter.Async=a.Async,this.scanAll()})}scanAll(){this.productService.scanAll(this.searchFilter.ChannelID,this.searchFilter.ScanFull,this.searchFilter.UpdatedProduct,this.searchFilter.Async).subscribe(n=>{if(this.searchFilter.Async)this.toastr.warning("You will be notified when the scan is completed.","Scan In Progress",{toastClass:"ngx-toastr toast-waiting"});else{let i=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);this.initPageLoader(),this.productService.successToastrScanAllProduct(n,i,!this.searchFilter.UpdatedProduct)}})}updatePrice(n){let i=this.productService.selectedVariantProduct(n);if(i.length>0){let c=i.map(p=>({ID:p.ID,Code:p.Code,Price:p.UnitPrice})),s={ListChannelID:this.channelOptions.filter(p=>p.selected).map(p=>p.ID),ListPrice:c};this.http.post("/api/Price/UpdateChannel",s).subscribe(p=>{this.paginationService.reloadPagination(this.searchFilter),this.toastr.success("Successfully updated "+s.ListPrice.length+" items in "+s.ListChannelID.length+" channels","Success")})}}updatePriceByVariant(n){let i={ID:n.ChannelID,ChannelItemID:n.ChannelItemID,ChannelVariantID:n.ChannelVariationID,Price:n.Price-0,VariantID:n.ID};this.http.post("/api/Price/UpdatePriceByID",i).subscribe(a=>{let c=this.productService.findChannelById(i.ID,this.channelOptions);this.toastr.success("Successfully updated "+n.ItemName+"("+n.VarName+") price in "+c.Name+" to "+i.Price,"Success"),this.paginationService.reloadPagination(this.searchFilter)})}onUpdateItems(n){const i=this.productService.selectedVariantProduct(n);this.dialog.open(A.j,{data:{selectedItems:i,channels:this.channelOptions},width:"600px"}).afterClosed().pipe((0,d.h)(a=>void 0!==a)).subscribe(a=>{this.channelOptions=a,this.updatePrice(n)})}getRowCount(){this.paginationService.hideCount=!1,this.allDataCount$=this.http.post(`/api/${this.rowCountAPI}`,{})}onNextPage(){this.paginationService.onNextPage(this.searchFilter)}onLastPage(){this.http.post(`/api/${this.rowCountAPI}`,{}).subscribe({next:n=>{this.searchFilter.PageNumber=1,this.paginationService.getAllData(this.searchFilter,n)}})}ngOnDestroy(){this.paginationService.destroy()}}return(o=l).\u0275fac=function(n){return new(n||o)(e.Y36(f.O),e.Y36(x._W),e.Y36(P.uw),e.Y36(N.b),e.Y36(b.M))},o.\u0275cmp=e.Xpm({type:o,selectors:[["app-price-pos-channel"]],decls:2,vars:3,consts:[["headerTitle","Price Comparison",3,"pageData","hideSearchDropdown","textButton","onSubmit",4,"ngIf"],["headerTitle","Price Comparison",3,"pageData","hideSearchDropdown","textButton","onSubmit"],[1,"d-flex"],[4,"ngIf"],[1,"container-fluid","mt-3"],[1,"row"],["class","col-md-12",4,"ngIf"],[1,"d-flex","justify-content-between","mt-5"],[1,"me-auto","d-sm-block","collapse","mt-3"],[1,"font-weight-bold","font-italic","hidden-xxs"],["style","cursor: pointer",3,"click",4,"ngIf"],[1,"btn-group"],["role","button","class","btn btn-outline-secondary btn-sm text-primary","title","Load more for 20 products",3,"click",4,"ngIf"],["role","button","class","btn btn-outline-secondary btn-sm text-primary","title","Load all products",3,"click",4,"ngIf"],["type","button","data-cy","scanInPos","class","btn btn-outline-secondary shadow rounded me-3",3,"click",4,"ngIf"],["type","button","class","btn btn-success shadow rounded","data-toggle","modal",3,"click",4,"ngIf"],["type","button","data-cy","scanInPos",1,"btn","btn-outline-secondary","shadow","rounded","me-3",3,"click"],[1,"fas","fa-lg","fa-crosshairs"],["type","button","data-toggle","modal",1,"btn","btn-success","shadow","rounded",3,"click"],[1,"fas","fa-chevron-circle-up"],[1,"col-md-12"],["productToggleTitle","FILTER DIFFERENT PRICE","table","price",3,"showProductToggle","data","channel","filter","onToggle","onSubmit"],[2,"cursor","pointer",3,"click"],["title","Retreive rows count",1,"border","p-3"],["role","button","title","Load more for 20 products",1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"click"],[1,"fas","fa-arrow-right"],["role","button","title","Load all products",1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"click"],[1,"fas","fa-share"]],template:function(n,i){1&n&&(e.YNc(0,j,23,21,"mainpanel",0),e.ALo(1,"async")),2&n&&e.Q6J("ngIf",e.lcZ(1,1,i.loader$))},dependencies:[_.O5,m.p,D.a,_.Ov,_.JJ],styles:[".no-bullet[_ngcontent-%COMP%]{list-style-type:none}"]}),l})();var u=r(4910),J=r(236),W=r(5623),M=r(7826),U=r(278),I=r(7466);function X(o,l){if(1&o&&(e.TgZ(0,"mat-radio-button",3),e._uU(1),e.qZA()),2&o){const t=l.$implicit,n=l.index,i=e.oxw();e.Q6J("value",t.Key)("name",i.name)("title",i.tooltipsText[n]?i.tooltipsText[n]:""),e.xp6(1),e.hij(" ",t.Value,"")}}const ee=function(o){return{"border-0 rounded":o}};let O=(()=>{var o;class l{constructor(){this.modelChange=new e.vpe,this.border=!1,this.tooltipsText=[]}change(n){this.modelChange.emit(n)}}return(o=l).\u0275fac=function(n){return new(n||o)},o.\u0275cmp=e.Xpm({type:o,selectors:[["radio-options"]],inputs:{model:"model",options:"options",border:"border",name:"name",tooltipsText:"tooltipsText"},outputs:{modelChange:"modelChange"},standalone:!0,features:[e.jDz],decls:3,vars:5,consts:[[1,"form-control","h-100",3,"ngClass"],[3,"ngModel","ngModelChange"],["class","me-5","data-toggle","tooltip","data-placement","right",3,"value","name","title",4,"ngFor","ngForOf"],["data-toggle","tooltip","data-placement","right",1,"me-5",3,"value","name","title"]],template:function(n,i){1&n&&(e.TgZ(0,"div",0)(1,"mat-radio-group",1),e.NdJ("ngModelChange",function(c){return i.change(c)}),e.YNc(2,X,2,4,"mat-radio-button",2),e.qZA()()),2&n&&(e.Q6J("ngClass",e.VKq(3,ee,0==i.border)),e.xp6(1),e.Q6J("ngModel",i.model),e.xp6(1),e.Q6J("ngForOf",i.options))},dependencies:[_.ez,_.mk,_.sg,I.Fk,I.VQ,I.U0,h.u5,h.JJ,h.On],styles:[".mat-radio-label{margin-top:auto;margin-bottom:auto}"]}),l})();var S=r(8253);function ne(o,l){if(1&o){const t=e.EpF();e.TgZ(0,"button",18),e.NdJ("click",function(){e.CHM(t);const i=e.oxw();return e.KtG(i.onUpdateItems())}),e._UZ(1,"i",19),e._uU(2," Update "),e.qZA()}}function te(o,l){if(1&o&&(e.TgZ(0,"th",20),e._uU(1),e.qZA()),2&o){const t=l.$implicit;e.xp6(1),e.Oqu(t.Name)}}function ie(o,l){if(1&o){const t=e.EpF();e.TgZ(0,"th")(1,"input",21),e.NdJ("ngModelChange",function(i){e.CHM(t);const a=e.oxw();return e.KtG(a.checkboxState=i)})("ngModelChange",function(){e.CHM(t);const i=e.oxw();return e.KtG(i.onSelectAllData())}),e.qZA()()}if(2&o){const t=e.oxw();e.xp6(1),e.Q6J("ngModel",t.checkboxState)}}function oe(o,l){1&o&&(e.ynx(0),e.TgZ(1,"th",22),e._uU(2," Expected (POS) "),e.qZA(),e.TgZ(3,"th",22),e._uU(4," Channel "),e.qZA(),e.BQk())}function ae(o,l){if(1&o){const t=e.EpF();e.TgZ(0,"img",33),e.NdJ("click",function(i){e.CHM(t);const a=e.oxw(3).$implicit,c=e.oxw();return e.KtG(c.onZoomImage(i,null==a?null:a.ImageUrl))}),e.qZA()}if(2&o){const t=e.oxw(3).$implicit;e.s9C("src",null==t?null:t.ImageUrl,e.LSH)}}function le(o,l){1&o&&e._UZ(0,"img",34)}const ce=function(o){return{"border-bottom":o}};function re(o,l){if(1&o&&(e.ynx(0),e.TgZ(1,"td",28),e.YNc(2,ae,1,1,"img",29),e.YNc(3,le,1,0,"ng-template",null,30,e.W1O),e.qZA(),e.TgZ(5,"td",31)(6,"h5",32),e._uU(7),e.qZA(),e._UZ(8,"br"),e.TgZ(9,"small"),e._uU(10),e.qZA()(),e.BQk()),2&o){const t=e.MAs(4),n=e.oxw().index,i=e.oxw().$implicit,a=e.oxw();e.xp6(1),e.Q6J("rowSpan",null==i?null:i.Variants.length)("ngClass",e.VKq(7,ce,n+1==a.products.length)),e.xp6(1),e.Q6J("ngIf",null==i?null:i.ImageUrl)("ngIfElse",t),e.xp6(3),e.Q6J("rowSpan",null==i?null:i.Variants.length),e.xp6(2),e.Oqu(null==i?null:i.Name),e.xp6(3),e.hij("(",null==i?null:i.Category,")")}}function se(o,l){if(1&o){const t=e.EpF();e.TgZ(0,"td",35)(1,"input",21),e.NdJ("ngModelChange",function(i){e.CHM(t);const a=e.oxw().$implicit;return e.KtG(a.selected=i)}),e.qZA()()}if(2&o){const t=e.oxw().$implicit;e.xp6(1),e.Q6J("ngModel",t.selected)}}const pe=function(o){return{"bg-gradient-warning":o}};function _e(o,l){if(1&o){const t=e.EpF();e.ynx(0),e.TgZ(1,"td",38),e._uU(2),e.ALo(3,"number"),e.qZA(),e.TgZ(4,"td",39),e.NdJ("click",function(){const a=e.CHM(t).$implicit,c=e.oxw(2).$implicit,s=e.oxw().$implicit,p=e.oxw();return e.KtG(p.openTableDialog(c,s,a))}),e.TgZ(5,"span",40),e._uU(6),e.ALo(7,"number"),e.qZA(),e.TgZ(8,"a",41),e.NdJ("click",function(i){return null==i?null:i.stopPropagation()}),e._UZ(9,"i",27),e.qZA()(),e.BQk()}if(2&o){const t=l.$implicit;e.xp6(2),e.hij(" ",e.lcZ(3,4,t.PriceExpected)," "),e.xp6(2),e.Q6J("ngClass",e.VKq(8,pe,t.Price!=t.PriceExpected)),e.xp6(2),e.hij(" ",e.lcZ(7,6,t.Price)," "),e.xp6(2),e.Q6J("href",t.Url,e.LSH)}}function he(o,l){1&o&&(e.TgZ(0,"td",42),e._uU(1,"X"),e.qZA(),e.TgZ(2,"td",42),e._uU(3,"X"),e.qZA())}function ge(o,l){if(1&o&&(e.ynx(0),e.YNc(1,_e,10,10,"ng-container",36),e.YNc(2,he,4,0,"ng-template",null,37,e.W1O),e.BQk()),2&o){const t=l.$implicit,n=e.MAs(3),i=e.oxw().$implicit,a=e.oxw(2);e.xp6(1),e.Q6J("ngIf",a.getItemFromChannel(i,t.ID))("ngIfElse",n)}}const k=function(o){return[o]};function de(o,l){if(1&o&&(e.TgZ(0,"tr"),e.YNc(1,re,11,9,"ng-container",23),e.TgZ(2,"td",24),e._uU(3),e.qZA(),e.TgZ(4,"td",24)(5,"span"),e._uU(6),e.qZA(),e.TgZ(7,"span",25)(8,"a",26),e._UZ(9,"i",27),e.qZA()()(),e.YNc(10,se,2,1,"ng-template",16),e.YNc(11,ge,4,2,"ng-container",17),e.qZA()),2&o){const t=l.$implicit,n=l.index,i=e.oxw(2);e.xp6(1),e.Q6J("ngIf",0==n),e.xp6(2),e.Oqu(null==t?null:t.Model),e.xp6(3),e.Oqu(null==t?null:t.Code),e.xp6(2),e.Q6J("href","https://"+i.hostName+"/menu/Products/Catalog/Variants/Info?ID="+(null==t?null:t.ID),e.LSH),e.xp6(2),e.Q6J("ngxPermissionsOnly",e.VKq(6,k,i.rolePriceEdit)),e.xp6(1),e.Q6J("ngForOf",i.channelOptions)}}function ue(o,l){if(1&o&&(e.TgZ(0,"tbody"),e.YNc(1,de,12,8,"tr",17),e.qZA()),2&o){const t=l.$implicit;e.xp6(1),e.Q6J("ngForOf",t.Variants)}}let me=(()=>{var o;class l{constructor(n,i,a,c,s){this.http=n,this.toastr=i,this.dialog=a,this.productService=c,this.biggerPictureService=s,this.searchFilter=new W.k,this.products=[],this.checkboxState=!1,this.rolePriceEdit=M.G.price,this.initPageLoader(),this.filterTypeOptions=[{Key:u.v.ALL,Value:"All"},{Key:u.v.DIFFERENCE,Value:"Difference"}],this.filterType=u.v.ALL,this.pageData={Title:"Price Realtime",Nav:[{Title:"Price Cache",Url:"/menu/price",Active:!1}]},this.hostName=c.getHostName()}initPageLoader(){this.http.post("/api/PriceLoader/LoadMultiple",{}).subscribe(n=>{this.channelOptions=n.Options.Channel,this.searchFilter=n.Filter,this.onFilter()})}onSelectAllData(){this.products=this.products.map(n=>(n.Variants&&(n.Variants=n.Variants.map(i=>(i.selected=this.checkboxState,i))),n))}onFilter(n){this.http.post("/api/Price/GetOutletPrice",{text:n,filterModel:this.filterType,PageNumber:this.searchFilter.PageNumber,RowCount:this.searchFilter.RowCount}).subscribe(a=>{this.products=a.Data})}updatePrice(){let n=this.productService.selectedVariantProduct(this.products);if(n.length>0){let i=n.map(s=>s.ID),c={ListChannelID:this.channelOptions.filter(s=>s.selected).map(s=>s.ID),ListID:i};this.http.post("/api/Price/UpdateChannelOutletPrice",c).subscribe({next:s=>{this.resetSelectedChannel(),this.onFilter(),this.toastr.success("Successfully updated "+c.ListID.length+" items in "+c.ListChannelID.length+" channels","Success")},error:s=>{this.resetSelectedChannel()}})}}resetSelectedChannel(){this.channelOptions=this.channelOptions.map(n=>(n.selected=!1,n))}getItemFromChannel(n,i){return n.Channel.find(a=>a.ChannelID==i)}onUpdateItems(){const n=this.productService.selectedVariantProduct(this.products);this.dialog.open(A.j,{data:{selectedItems:n,channels:this.channelOptions},width:"600px"}).afterClosed().pipe((0,d.h)(i=>g.g.IsNotEmpty(i))).subscribe(i=>{this.channelOptions=i,this.updatePrice()})}openTableDialog(n,i,a){let c=JSON.parse(JSON.stringify(n));this.dialog.open(J.k,{data:{Name:i.Name,Variant:c,ChannelID:a?.ChannelID,Table:"price",ChannelItemID:a?.ChannelItemID}}).afterClosed().pipe((0,d.h)(p=>g.g.IsNotEmpty(p))).subscribe(p=>{this.updateProductPrice(p,a)})}updateProductPrice(n,i){let a={ID:n.ChannelID,ChannelItemID:n.ChannelItemID,ChannelVariantID:n.ChannelVariationID,Price:parseFloat(n.Price),VariantID:n.ID,SKU:n.Sku};this.http.post("/api/Price/UpdatePriceByID",a).subscribe(c=>{i.Price=a.Price;const s=this.productService.findChannelById(a.ID,this.channelOptions);this.toastr.success(`Successfully updated ${n.ItemName} (${n.VarName}) inventory in ${s.Name} to ${a.Price}`,"Success")})}onZoomImage(n,i){this.biggerPictureService.openBiggerPicture(n,i)}}return(o=l).\u0275fac=function(n){return new(n||o)(e.Y36(f.O),e.Y36(x._W),e.Y36(P.uw),e.Y36(b.M),e.Y36(U.k))},o.\u0275cmp=e.Xpm({type:o,selectors:[["app-custom-channel-price"]],decls:30,vars:14,consts:[["headerTitle","Price Comparison",3,"pageData","hideSearchBox","hideSearchDropdown","textButton","onSubmit"],["container",""],["name","filterModel",3,"model","options","border","modelChange"],[1,"d-flex"],["type","button","class","btn btn-success shadow rounded","data-toggle","modal",3,"click",4,"ngIf"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"table"],[1,"thead-light","sticky-top-thead"],["colspan","5"],["scope","col","colspan","2","class","text-center border-bottom-0 border w-10 text-uppercase",4,"ngFor","ngForOf"],["scope","col","colspan","2",1,"text-center","w-20"],["scope","col",1,"text-start"],["scope","col",1,"text-start","w-10"],[3,"ngxPermissionsOnly"],[4,"ngFor","ngForOf"],["type","button","data-toggle","modal",1,"btn","btn-success","shadow","rounded",3,"click"],[1,"fas","fa-chevron-circle-up"],["scope","col","colspan","2",1,"text-center","border-bottom-0","border","w-10","text-uppercase"],["type","checkbox",3,"ngModel","ngModelChange"],[1,"text-end","border-top-0","border","w-10"],[4,"ngIf"],[1,"text-start","border-bottom"],[1,"ms-2"],["target","_blank",3,"href"],[1,"fas","fa-lg","fa-external-link-alt","external-link-custom"],[1,"text-center",3,"rowSpan","ngClass"],["class","border rounded w-img cursor-pointer",3,"src","click",4,"ngIf","ngIfElse"],["elsePic",""],[1,"text-center","border-bottom",3,"rowSpan"],[1,"mb-0","item-name"],[1,"border","rounded","w-img","cursor-pointer",3,"src","click"],["src","//res.cloudinary.com/pos/image/upload/w_40/POS/Images/Icon/products_thumb.png",1,"border","rounded","w-img"],[1,"align-middle"],[4,"ngIf","ngIfElse"],["elseCol",""],[1,"text-end","border"],[1,"text-center","border","pointer","cell-hover",3,"ngClass","click"],[1,"me-2"],["target","_blank",3,"href","click"],[1,"table-white","border","text-end",2,"color","red"]],template:function(n,i){1&n&&(e.TgZ(0,"mainpanel",0),e.NdJ("onSubmit",function(c){return i.onFilter(c)}),e.TgZ(1,"filters")(2,"div",1)(3,"div")(4,"h6"),e._uU(5,"Filter by"),e.qZA(),e.TgZ(6,"radio-options",2),e.NdJ("modelChange",function(c){return i.filterType=c}),e.qZA()()()(),e.TgZ(7,"actions")(8,"div",3),e.YNc(9,ne,3,0,"button",4),e.qZA()(),e.TgZ(10,"content")(11,"div",5)(12,"div",6)(13,"div",7)(14,"div",8)(15,"table",9)(16,"thead",10)(17,"tr"),e._UZ(18,"th",11),e.YNc(19,te,2,1,"th",12),e.qZA(),e.TgZ(20,"tr")(21,"th",13),e._uU(22,"Product"),e.qZA(),e.TgZ(23,"th",14),e._uU(24,"Variant"),e.qZA(),e.TgZ(25,"th",15),e._uU(26,"SKU"),e.qZA(),e.YNc(27,ie,2,1,"ng-template",16),e.YNc(28,oe,5,0,"ng-container",17),e.qZA()(),e.YNc(29,ue,2,1,"tbody",17),e.qZA()()()()()()()),2&n&&(e.Q6J("pageData",i.pageData)("hideSearchBox",!1)("hideSearchDropdown",!1)("textButton","Search"),e.xp6(6),e.Q6J("model",i.filterType)("options",i.filterTypeOptions)("border",!0),e.xp6(3),e.Q6J("ngIf",i.productService.hasSelectionVariant(i.products)),e.xp6(10),e.Q6J("ngForOf",i.channelOptions),e.xp6(8),e.Q6J("ngxPermissionsOnly",e.VKq(12,k,i.rolePriceEdit)),e.xp6(1),e.Q6J("ngForOf",i.channelOptions),e.xp6(1),e.Q6J("ngForOf",i.products))},dependencies:[_.mk,_.sg,_.O5,h.Wl,h.JJ,h.On,m.p,O,S.gE,_.JJ],styles:[".w-10[_ngcontent-%COMP%]{width:10%}.w-20[_ngcontent-%COMP%]{width:20%}.w-img[_ngcontent-%COMP%]{width:40px;height:40px}.item-name[_ngcontent-%COMP%]{font-weight:400;font-size:larger}.cell-hover[_ngcontent-%COMP%]:hover{background-color:#c9c9c9!important}"]}),l})();var Ce=r(2729),L=r(2599),Q=r(2596);function fe(o,l){if(1&o){const t=e.EpF();e.TgZ(0,"button",8),e.NdJ("click",function(){e.CHM(t);const i=e.oxw(2).ngIf,a=e.oxw();return e.KtG(a.openScanDialog(i))}),e._UZ(1,"i",9),e._uU(2," Scan Channel "),e.qZA()}}function xe(o,l){if(1&o){const t=e.EpF();e.TgZ(0,"button",10),e.NdJ("click",function(){e.CHM(t);const i=e.oxw().ngIf,a=e.oxw(2);return e.KtG(a.updateStock(i))}),e._UZ(1,"i",11),e._uU(2," Update "),e.qZA()}}function Pe(o,l){if(1&o&&(e.TgZ(0,"actions")(1,"div",5)(2,"div"),e.YNc(3,fe,3,0,"button",6),e.YNc(4,xe,3,0,"button",7),e.qZA()()()),2&o){const t=l.ngIf,n=e.oxw(2);e.xp6(3),e.Q6J("ngIf",!n.productService.hasSelectionVariant(t)),e.xp6(1),e.Q6J("ngIf",n.productService.hasSelectionVariant(t))}}function be(o,l){if(1&o){const t=e.EpF();e.TgZ(0,"th")(1,"input",32),e.NdJ("change",function(i){e.CHM(t);const a=e.oxw().ngIf,c=e.oxw(2);return e.KtG(c.onSelectAllSKU(i.target.checked,a))}),e.qZA()()}}function Ie(o,l){if(1&o){const t=e.EpF();e.TgZ(0,"input",50),e.NdJ("ngModelChange",function(i){e.CHM(t);const a=e.oxw(4).$implicit;return e.KtG(a.selected=i)})("ngModelChange",function(){e.CHM(t);const i=e.oxw(4).$implicit,a=e.oxw(3);return e.KtG(a.onCheckboxStateProduct(i))}),e.qZA()}if(2&o){const t=e.oxw(4).$implicit;e.Q6J("ngModel",t.selected)}}function Se(o,l){if(1&o&&e.YNc(0,Ie,1,1,"input",49),2&o){const t=e.oxw(2).$implicit,n=e.oxw().$implicit;e.Q6J("ngIf",t.Inventory>=0||n.Variants.length>1)}}function Te(o,l){if(1&o){const t=e.EpF();e.TgZ(0,"img",51),e.NdJ("click",function(i){e.CHM(t);const a=e.oxw(3).$implicit,c=e.oxw(3);return e.KtG(c.onZoomImage(i,null==a?null:a.ImageUrl))}),e.qZA()}if(2&o){const t=e.oxw(3).$implicit;e.s9C("src",t.ThumbnailUrl,e.LSH)}}function ve(o,l){1&o&&e._UZ(0,"img",52)}const T=function(o){return[o]};function Ze(o,l){if(1&o&&(e.ynx(0),e.TgZ(1,"td",43)(2,"div",44),e.YNc(3,Se,1,1,"ng-template",21),e.YNc(4,Te,1,1,"img",45),e.YNc(5,ve,1,0,"ng-template",null,46,e.W1O),e.qZA()(),e.TgZ(7,"td",47)(8,"span",48),e._uU(9),e.qZA(),e._UZ(10,"br"),e.TgZ(11,"small"),e._uU(12),e.qZA()(),e.BQk()),2&o){const t=e.MAs(6),n=e.oxw(2).$implicit,i=e.oxw(3);e.xp6(1),e.Q6J("rowSpan",n.Variants.length),e.xp6(2),e.Q6J("ngxPermissionsOnly",e.VKq(7,T,i.rolePriceEdit)),e.xp6(1),e.Q6J("ngIf",n.ThumbnailUrl)("ngIfElse",t),e.xp6(3),e.Q6J("rowSpan",n.Variants.length),e.xp6(2),e.Oqu(n.Name),e.xp6(3),e.hij("(",n.Category,")")}}function ye(o,l){if(1&o){const t=e.EpF();e.TgZ(0,"input",55),e.NdJ("ngModelChange",function(i){e.CHM(t);const a=e.oxw(2).$implicit;return e.KtG(a.selected=i)}),e.qZA()}if(2&o){const t=e.oxw(2).$implicit;e.Q6J("ngModel",t.selected)}}function we(o,l){if(1&o&&(e.TgZ(0,"td",53),e.YNc(1,ye,1,1,"input",54),e.qZA()),2&o){const t=e.oxw().$implicit;e.xp6(1),e.Q6J("ngIf",t.Inventory>=0)}}function Ae(o,l){if(1&o){const t=e.EpF();e.TgZ(0,"div",56),e.NdJ("click",function(){e.CHM(t);const i=e.oxw().$implicit,a=e.oxw().$implicit,c=e.oxw(2).ngIf,s=e.oxw();return e.KtG(s.openTableDialog(i,a,c))}),e._uU(1),e.ALo(2,"number"),e.qZA()}if(2&o){const t=e.oxw().$implicit;e.xp6(1),e.hij(" ",e.lcZ(2,1,null==t.Channel[0]?null:t.Channel[0].Price)," ")}}const Fe=function(o){return{"bg-gradient-warning":o}};function Ne(o,l){if(1&o){const t=e.EpF();e.TgZ(0,"tr"),e.YNc(1,Ze,13,9,"ng-container",4),e.TgZ(2,"td",19),e._uU(3),e.qZA(),e.TgZ(4,"td",22)(5,"span"),e._uU(6),e.qZA(),e.TgZ(7,"span",33)(8,"a",34),e._UZ(9,"i",35),e.qZA()()(),e.YNc(10,we,2,1,"ng-template",21),e.TgZ(11,"td",22),e._uU(12),e.ALo(13,"number"),e.qZA(),e.TgZ(14,"td",36),e.YNc(15,Ae,3,3,"div",37),e.qZA(),e.TgZ(16,"td")(17,"div",38)(18,"div",39)(19,"a",34),e._UZ(20,"i",40),e.qZA(),e._uU(21," \xa0\xa0 "),e.TgZ(22,"span",41),e.NdJ("click",function(){const a=e.CHM(t).$implicit,c=e.oxw(4);return e.KtG(c.refreshPrice(a))}),e._UZ(23,"i",42),e.qZA()()()()()}if(2&o){const t=l.$implicit,n=l.index,i=e.oxw(4);e.xp6(1),e.Q6J("ngIf",0==n),e.xp6(2),e.Oqu(t.Model),e.xp6(3),e.hij(" ",t.Code," "),e.xp6(2),e.Q6J("href","https://"+i.hostName+"/menu/Products/Catalog/Variants/Info?ID="+(null==t?null:t.ID),e.LSH),e.xp6(2),e.Q6J("ngxPermissionsOnly",e.VKq(11,T,i.rolePriceEdit)),e.xp6(2),e.hij(" ",e.lcZ(13,9,t.UnitPrice)," "),e.xp6(2),e.Q6J("ngClass",e.VKq(13,Fe,t.UnitPrice!=(null==t.Channel[0]?null:t.Channel[0].Price))),e.xp6(1),e.Q6J("ngIf",t.Channel.length>0),e.xp6(4),e.Q6J("href",null==t.Channel[0]?null:t.Channel[0].Url,e.LSH)}}function De(o,l){if(1&o&&(e.ynx(0),e.YNc(1,Ne,24,15,"tr",26),e.BQk()),2&o){const t=l.$implicit;e.xp6(1),e.Q6J("ngForOf",t.Variants)}}function Je(o,l){if(1&o){const t=e.EpF();e.TgZ(0,"span",56),e.NdJ("click",function(){e.CHM(t);const i=e.oxw(3);return e.KtG(i.getRowCount())}),e.TgZ(1,"i",57),e._uU(2,"?"),e.qZA()()}}function Me(o,l){if(1&o&&(e.TgZ(0,"span"),e._uU(1),e.ALo(2,"number"),e.qZA()),2&o){const t=l.ngIf;e.xp6(1),e.Oqu(e.lcZ(2,1,t.Total))}}function Ue(o,l){if(1&o){const t=e.EpF();e.TgZ(0,"a",61),e.NdJ("click",function(){e.CHM(t);const i=e.oxw(4);return e.KtG(i.onNextPage())}),e._UZ(1,"i",62),e._uU(2," Next"),e.qZA()}}function Oe(o,l){if(1&o){const t=e.EpF();e.TgZ(0,"a",63),e.NdJ("click",function(){e.CHM(t);const i=e.oxw(4);return e.KtG(i.onLastPage())}),e._UZ(1,"i",64),e._uU(2," Last"),e.qZA()}}function ke(o,l){if(1&o&&(e.TgZ(0,"div",58),e.YNc(1,Ue,3,0,"a",59),e.YNc(2,Oe,3,0,"a",60),e.qZA()),2&o){const t=e.oxw(3);e.xp6(1),e.Q6J("ngIf",t.paginationService.disableNextButton&&!t.paginationService.goToLastPage),e.xp6(1),e.Q6J("ngIf",t.paginationService.disableNextButton&&!t.paginationService.goToLastPage)}}function Le(o,l){if(1&o){const t=e.EpF();e.TgZ(0,"content")(1,"div",12)(2,"div",13)(3,"table",14)(4,"thead",15)(5,"tr")(6,"th",16),e._uU(7," Product "),e.TgZ(8,"div")(9,"mat-slide-toggle",17),e.NdJ("ngModelChange",function(i){e.CHM(t);const a=e.oxw(2);return e.KtG(a.toggleDifferentInventory=i)})("toggleChange",function(){e.CHM(t);const i=e.oxw(2);return e.KtG(i.onToggleDifferentInventory())}),e.TgZ(10,"small",18),e._uU(11,"FILTER DIFFERENT PRICE"),e.qZA()()()(),e.TgZ(12,"th",19),e._uU(13,"Variant"),e.qZA(),e.TgZ(14,"th",20),e._uU(15,"SKU"),e.qZA(),e.YNc(16,be,2,0,"ng-template",21),e.TgZ(17,"th",22),e._uU(18,"POS"),e.qZA(),e.TgZ(19,"th",22)(20,"div",23),e.NdJ("click",function(){e.CHM(t);const i=e.oxw(2);return e.KtG(i.onChangeChannel())}),e._UZ(21,"img",24),e._uU(22),e.qZA()(),e._UZ(23,"th",25),e.qZA()(),e.TgZ(24,"tbody"),e.YNc(25,De,2,1,"ng-container",26),e.qZA()(),e.TgZ(26,"div",27)(27,"div",28)(28,"div",29),e._uU(29),e.ALo(30,"number"),e.YNc(31,Je,3,0,"span",30),e.YNc(32,Me,3,3,"span",4),e.ALo(33,"async"),e._uU(34),e.qZA()(),e.YNc(35,ke,3,2,"div",31),e.qZA()()()()}if(2&o){const t=l.ngIf,n=e.oxw(2);e.xp6(9),e.Q6J("ngModel",n.toggleDifferentInventory),e.xp6(7),e.Q6J("ngxPermissionsOnly",e.VKq(15,T,n.rolePriceEdit)),e.xp6(4),e.Q6J("matTooltip","Change "+(null==n.selectedChannel?null:n.selectedChannel.Name)),e.xp6(1),e.Q6J("src",n.selectedChannel.logo,e.LSH),e.xp6(1),e.hij(" ",null!=n.selectedChannel&&n.selectedChannel.Name?null==n.selectedChannel?null:n.selectedChannel.Name:"Choose Channel ..."," "),e.xp6(3),e.Q6J("ngForOf",t),e.xp6(4),e.hij(" Showing 1 - ",e.lcZ(30,11,null==t?null:t.length)," of "),e.xp6(2),e.Q6J("ngIf",n.paginationService.hideCount),e.xp6(1),e.Q6J("ngIf",e.lcZ(33,13,!n.paginationService.hideCount&&n.allDataCount$)),e.xp6(2),e.hij(" records ~ ",n.paginationService.footerPageNumber," Page "),e.xp6(1),e.Q6J("ngIf",t.length>0)}}function Qe(o,l){if(1&o){const t=e.EpF();e.TgZ(0,"mainpanel",1),e.NdJ("textChange",function(i){e.CHM(t);const a=e.oxw();return e.KtG(a.searchFilter.text=i)})("onSubmit",function(){e.CHM(t);const i=e.oxw();return e.KtG(i.search())}),e.TgZ(1,"filters")(2,"div",2)(3,"div")(4,"label"),e._uU(5,"Page Number"),e.qZA(),e.TgZ(6,"input",3),e.NdJ("ngModelChange",function(i){e.CHM(t);const a=e.oxw();return e.KtG(a.searchFilter.PageNumber=i)}),e.qZA()(),e.TgZ(7,"div")(8,"label"),e._uU(9,"Page Size"),e.qZA(),e.TgZ(10,"input",3),e.NdJ("ngModelChange",function(i){e.CHM(t);const a=e.oxw();return e.KtG(a.searchFilter.RowCount=i)}),e.qZA()()()(),e.YNc(11,Pe,5,2,"actions",4),e.ALo(12,"async"),e.YNc(13,Le,36,17,"content",4),e.ALo(14,"async"),e.qZA()}if(2&o){const t=e.oxw();e.Q6J("headerTitle",t.pageTitle)("text",t.searchFilter.text),e.xp6(6),e.Q6J("ngModel",t.searchFilter.PageNumber),e.xp6(4),e.Q6J("ngModel",t.searchFilter.RowCount),e.xp6(1),e.Q6J("ngIf",e.lcZ(12,6,t.paginationService.data$)),e.xp6(2),e.Q6J("ngIf",e.lcZ(14,8,t.paginationService.data$))}}let Ee=(()=>{var o;class l{constructor(n,i,a,c,s,p){this.http=n,this.paginationService=i,this.toastr=a,this.dialog=c,this.productService=s,this.biggerPictureService=p,this.pageTitle="Price Single Channel Comparison",this.toggleDifferentInventory=!1,this.loaderEndpoint="PriceLoader/Load",this.dataEndpoint="Price/GetSingleChannelComparison",this.allDataCountEndpoint="Inventory/GetInventoryByChannelRowCount",this.rolePriceEdit=M.G.price,this.hostName=this.productService.getHostName()}ngOnInit(){this.initPageLoader()}initPageLoader(){this.paginationService.fetchDataEndpoint=this.dataEndpoint,this.loader$=this.http.post(`/API/${this.loaderEndpoint}`).pipe((0,F.b)(n=>{this.searchFilter=n.Filter,this.searchFilter.filterModel=u.v.ALL,this.paginationService.reloadPagination(this.searchFilter),this.channelOptions=n.Options.Channel,this.initSelectedChannel()}))}onToggleDifferentInventory(){this.searchFilter.filterModel=this.toggleDifferentInventory?u.v.ALL:u.v.DIFFERENCE,this.search()}onCheckboxStateProduct(n){n.Variants=n.Variants.map(i=>(i.selected=n.selected,i))}openScanDialog(n){let i=JSON.parse(JSON.stringify(this.searchFilter));i.ChannelID=g.g.GuidEMpty,this.dialog.open(w.j,{data:{filter:i,channelOptions:n.Options.Channel},width:"600px"}).afterClosed().pipe((0,d.h)(a=>g.g.IsNotEmpty(a))).subscribe(a=>{this.searchFilter.ChannelID=a.ChannelID,this.searchFilter.ScanFull=a.ScanFull,this.searchFilter.UpdatedProduct=a.UpdatedProduct,this.searchFilter.Async=a.Async,this.scanAll(n)})}scanAll(n){const i=this.productService.findChannelById(this.searchFilter.ChannelID,n.Options.Channel);this.productService.scanAll(this.searchFilter.ChannelID,this.searchFilter.ScanFull,this.searchFilter.UpdatedProduct,this.searchFilter.Async).subscribe(a=>{this.searchFilter.Async?this.toastr.warning("You will be notified when the scan is completed.","Scan In Progress",{toastClass:"ngx-toastr toast-waiting"}):(this.initPageLoader(),this.toastr.success(`Successfully scanned from ${i?.Name}`,"Success"))})}updateStock(n){let a=this.productService.selectedVariantProduct(n).map(s=>({ID:s.ID,ChannelID:s.Channel[0].ChannelID,Code:s.Code,Price:s.UnitPrice})),c={ListChannelID:[this.searchFilter.ChannelID],ListPrice:a};this.http.post("/api/Price/UpdateChannel",c).subscribe(()=>{this.search(),this.toastr.success(`Successfully updated ${c.ListPrice.length} variants in ${c.ListChannelID.length} channels`,"Success")})}refreshPrice(n){this.http.post("/api/Price/RefreshPriceChannel",{ChannelItemID:n?.Channel[0].ChannelItemID,ChannelVariationID:n?.Channel[0]?.ChannelVariationID,ChannelID:n?.Channel[0]?.ChannelID,VariantID:n.ID}).subscribe(a=>{this.toastr.success("Successfully updated","Success"),this.search()})}search(){this.paginationService.reloadPagination(this.searchFilter)}getRowCount(){this.paginationService.hideCount=!1,this.allDataCount$=this.http.post(`/API/${this.allDataCountEndpoint}`,this.searchFilter)}onNextPage(){this.paginationService.onNextPage(this.searchFilter)}onLastPage(){this.http.post(`/API/${this.allDataCountEndpoint}`,this.searchFilter).subscribe({next:n=>{this.paginationService.getAllData(this.searchFilter,n.Total)}})}openTableDialog(n,i,a){let c=JSON.parse(JSON.stringify(n));this.dialog.open(J.k,{data:{Name:i.Name,Variant:c,ChannelID:c?.Channel[0]?.ChannelID,Table:"price",ChannelItemID:c?.Channel[0]?.ChannelItemID}}).afterClosed().pipe((0,d.h)(p=>g.g.IsNotEmpty(p))).subscribe(p=>{this.updateItemAfterDialog(p,a,n)})}updateItemAfterDialog(n,i,a){let c={ID:n.ChannelID,ChannelItemID:n.ChannelItemID,ChannelVariantID:n.ChannelVariationID,Price:parseFloat(n.Price),VariantID:n.ID,SKU:n.Sku};this.http.post("/api/Price/UpdatePriceByID",c).subscribe(s=>{const p=this.productService.findChannelById(c.ID,i.Options.Channel);this.toastr.success(`Successfully updated ${n.ItemName} (${n.VarName}) inventory in ${p.Name} to ${c.Price}`,"Success"),a.Channel[0]&&(a.Channel[0].Price=c.Price)})}initSelectedChannel(){this.selectedChannel=this.channelOptions.find(n=>n.ID==this.searchFilter.ChannelID),this.selectedChannel&&(this.selectedChannel.logo=g.g.getChannelLogoByTypeId(this.selectedChannel.TypeID))}onChangeChannel(){this.dialog.open(Ce.b,{data:{channelOptions:this.channelOptions,selectedChannel:this.selectedChannel}}).afterClosed().pipe((0,d.h)(n=>g.g.IsNotEmpty(n))).subscribe(n=>{this.selectedChannel=n,this.searchFilter.ChannelID=n.ID,this.search()})}onSelectAllSKU(n,i){i=i.map(a=>(a.Variants=a.Variants.map(c=>(c.selected=n,c)),a))}onZoomImage(n,i){this.biggerPictureService.openBiggerPicture(n,i)}ngOnDestroy(){this.paginationService.destroy()}}return(o=l).\u0275fac=function(n){return new(n||o)(e.Y36(f.O),e.Y36(N.b),e.Y36(x._W),e.Y36(P.uw),e.Y36(b.M),e.Y36(U.k))},o.\u0275cmp=e.Xpm({type:o,selectors:[["app-price-single-channel"]],decls:2,vars:3,consts:[[3,"headerTitle","text","textChange","onSubmit",4,"ngIf"],[3,"headerTitle","text","textChange","onSubmit"],["container",""],["type","number",3,"ngModel","ngModelChange"],[4,"ngIf"],[1,"d-flex"],["type","button","data-cy","scanInPos","class","btn btn-outline-secondary shadow rounded me-3",3,"click",4,"ngIf"],["class","btn btn-success",3,"click",4,"ngIf"],["type","button","data-cy","scanInPos",1,"btn","btn-outline-secondary","shadow","rounded","me-3",3,"click"],[1,"fas","fa-lg","fa-crosshairs"],[1,"btn","btn-success",3,"click"],[1,"fas","fa-chevron-circle-up"],[1,"container-fluid","mt-5"],[1,"table-responsive"],[1,"table"],[1,"thead-light","sticky-top-thead"],["colspan","2",1,"text-center","ps-12",2,"width","36%"],["name","differentInventory",3,"ngModel","ngModelChange","toggleChange"],[1,"fw-bold"],[1,"text-start"],[1,"text-end",2,"width","20%"],[3,"ngxPermissionsOnly"],[1,"text-end"],["matTooltipPosition","above",1,"d-inline-block","text-truncate","mt-3","cursor-pointer",2,"max-width","114px",3,"matTooltip","click"],[2,"width","16px",3,"src"],[2,"width","4%"],[4,"ngFor","ngForOf"],[1,"d-flex","justify-content-between","mt-5"],[1,"me-auto","d-sm-block","collapse","mt-3"],[1,"font-weight-bold","font-italic","hidden-xxs"],["style","cursor:pointer",3,"click",4,"ngIf"],["class","btn-group",4,"ngIf"],["type","checkbox",1,"me-3",3,"change"],[1,"ms-2"],["target","_blank",3,"href"],[1,"fas","external-link-custom","fa-external-link-alt"],[1,"text-end",3,"ngClass"],["style","cursor: pointer;",3,"click",4,"ngIf"],[1,"row"],[1,"col-12","ps-0","d-flex","justify-content-between"],[1,"fas","external-link-custom","fa-lg","fa-external-link-alt"],["matTooltip","Refresh Unit Price according to seller center",1,"pl-5","cursor-pointer",2,"color","var(--bs-link-color)",3,"click"],[1,"fas","external-link-custom","fa-sync","fa-lg"],[1,"text-start",2,"width","0%",3,"rowSpan"],[1,"d-flex","align-items-center","justify-content-start"],["class","border rounded w-img cursor-pointer","style","margin-left: 20px",3,"src","click",4,"ngIf","ngIfElse"],["elsePic",""],[1,"text-start",3,"rowSpan"],[1,"item-name","mb-0"],["type","checkbox","class","me-3",3,"ngModel","ngModelChange",4,"ngIf"],["type","checkbox",1,"me-3",3,"ngModel","ngModelChange"],[1,"border","rounded","w-img","cursor-pointer",2,"margin-left","20px",3,"src","click"],["src","//res.cloudinary.com/pos/image/upload/w_40/POS/Images/Icon/products_thumb.png",1,"border","rounded","w-img",2,"margin-left","20px"],[1,"align-middle"],["type","checkbox",3,"ngModel","ngModelChange",4,"ngIf"],["type","checkbox",3,"ngModel","ngModelChange"],[2,"cursor","pointer",3,"click"],["title","Retreive rows count",1,"border","p-3"],[1,"btn-group"],["role","button","class","btn btn-outline-secondary btn-sm text-primary","title","Load more for 20 products",3,"click",4,"ngIf"],["role","button","class","btn btn-outline-secondary btn-sm text-primary","title","Load all products",3,"click",4,"ngIf"],["role","button","title","Load more for 20 products",1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"click"],[1,"fas","fa-arrow-right"],["role","button","title","Load all products",1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"click"],[1,"fas","fa-share"]],template:function(n,i){1&n&&(e.YNc(0,Qe,15,10,"mainpanel",0),e.ALo(1,"async")),2&n&&e.Q6J("ngIf",e.lcZ(1,1,i.loader$))},dependencies:[_.mk,_.sg,_.O5,h.Fj,h.wV,h.Wl,h.JJ,h.On,m.p,L.Rr,Q.gM,S.gE,_.Ov,_.JJ],styles:[".w-img[_ngcontent-%COMP%]{width:40px;height:40px}input[type=checkbox][_ngcontent-%COMP%]{width:15px;height:15px}i.fas.custom-size[_ngcontent-%COMP%]{font-size:13px}.item-name[_ngcontent-%COMP%]{font-size:larger}"]}),l})();var v=r(4575);const qe=[{path:"",component:q,children:[{path:"",redirectTo:"SingleChannel",pathMatch:"full"},{path:"pos",component:z,canActivate:[v.a],data:{title:"Global Price Comparison"}},{path:"OutletPrice",component:me,canActivate:[v.a],data:{title:"Outlet Price Comparison"}},{path:"SingleChannel",component:Ee,canActivate:[v.a],data:{title:"Price Single Channel Comparison"}}]}];let Ve=(()=>{var o;class l{}return(o=l).\u0275fac=function(n){return new(n||o)},o.\u0275mod=e.oAB({type:o}),o.\u0275inj=e.cJS({imports:[_.ez,C.Bz.forChild(qe)]}),l})();var Ye=r(5986);let $e=(()=>{var o;class l{}return(o=l).\u0275fac=function(n){return new(n||o)},o.\u0275mod=e.oAB({type:o}),o.\u0275inj=e.cJS({imports:[_.ez,h.u5,y.Z,m.R,C.Bz,E.A0,Ve,h.UX,L.rP,Ye.p9,Q.AV,O,D.a,S.VI.forChild()]}),l})()}}]);