marketplacepos 3.7.2 → 3.7.4
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.
- package/Marketplace/{chunk-QOBUHJEC.js → chunk-2SA7SVYH.js} +1 -1
- package/Marketplace/{chunk-H65R6LYY.js → chunk-2UI4YTN6.js} +1 -1
- package/Marketplace/chunk-2V7GCWY7.js +1 -0
- package/Marketplace/{chunk-EJ4H3OFV.js → chunk-2YI2WW5U.js} +1 -1
- package/Marketplace/{chunk-ULZ3J3BD.js → chunk-4AQ3EZML.js} +1 -1
- package/Marketplace/{chunk-GSZSRSYG.js → chunk-5XRAHMC6.js} +1 -1
- package/Marketplace/{chunk-MQUFUG4I.js → chunk-644NU43G.js} +1 -1
- package/Marketplace/{chunk-4SAZAICQ.js → chunk-7I7KV673.js} +1 -1
- package/Marketplace/{chunk-IANWTXDM.js → chunk-7QIOC7BK.js} +1 -1
- package/Marketplace/{chunk-MG7FPXZX.js → chunk-7XITKPS5.js} +1 -1
- package/Marketplace/{chunk-H65V337R.js → chunk-BGCBCSHC.js} +1 -1
- package/Marketplace/{chunk-AE6IHJSI.js → chunk-BTKXSJ5K.js} +1 -1
- package/Marketplace/{chunk-LQUPRVED.js → chunk-CHDEJCV7.js} +1 -1
- package/Marketplace/{chunk-KOEWWMXB.js → chunk-COKR3NPC.js} +1 -1
- package/Marketplace/{chunk-6GVQC3OR.js → chunk-COLVGV5B.js} +1 -1
- package/Marketplace/{chunk-NY3NDLUY.js → chunk-CS62TIAP.js} +1 -1
- package/Marketplace/{chunk-QWKP6LGP.js → chunk-CSUJ7V36.js} +1 -1
- package/Marketplace/{chunk-3KV2JLZD.js → chunk-CUYZKVZ3.js} +1 -1
- package/Marketplace/{chunk-CQJJCQOZ.js → chunk-DJCANNYC.js} +1 -1
- package/Marketplace/{chunk-JHT6TPR2.js → chunk-ELFNCSQS.js} +1 -1
- package/Marketplace/{chunk-ZA6GABVQ.js → chunk-ENOOLWKX.js} +1 -1
- package/Marketplace/{chunk-LU4CQUNV.js → chunk-FGEVVKEH.js} +1 -1
- package/Marketplace/{chunk-T4IQWUBV.js → chunk-FZ3LLUFV.js} +1 -1
- package/Marketplace/{chunk-VM5LF2AQ.js → chunk-GQU66EJO.js} +1 -1
- package/Marketplace/{chunk-7QK5UPRO.js → chunk-H4UMXVLS.js} +1 -1
- package/Marketplace/{chunk-2SYJDDTX.js → chunk-HAU6K6GW.js} +1 -1
- package/Marketplace/{chunk-ONRH4TTU.js → chunk-HX36ACUF.js} +1 -1
- package/Marketplace/{chunk-4Z75AP5X.js → chunk-IL2DK2XK.js} +1 -1
- package/Marketplace/{chunk-WIPT5BVZ.js → chunk-IMUZFXPJ.js} +2 -2
- package/Marketplace/{chunk-NE4U3Z2F.js → chunk-IPVDR333.js} +1 -1
- package/Marketplace/{chunk-LV7NKX2V.js → chunk-IZ3HV6DV.js} +1 -1
- package/Marketplace/{chunk-GSZGHECR.js → chunk-JB6W2UTC.js} +1 -1
- package/Marketplace/{chunk-F2WJC5YO.js → chunk-K5HNYUX4.js} +2 -2
- package/Marketplace/{chunk-HD4CTBL2.js → chunk-KQRK4CTQ.js} +1 -1
- package/Marketplace/{chunk-RNMZG2RU.js → chunk-KSDM566S.js} +1 -1
- package/Marketplace/{chunk-QHJPUEQJ.js → chunk-LSBFWGC6.js} +1 -1
- package/Marketplace/{chunk-MCTEEYBG.js → chunk-MPHWSDOT.js} +1 -1
- package/Marketplace/{chunk-PSAPUCAJ.js → chunk-N5YIZS6Z.js} +1 -1
- package/Marketplace/{chunk-JOI2R7DA.js → chunk-O7MAOFLA.js} +1 -1
- package/Marketplace/chunk-OGL675J6.js +1 -0
- package/Marketplace/{chunk-37MHCWTD.js → chunk-OKATPNAY.js} +1 -1
- package/Marketplace/{chunk-B2H2LMDP.js → chunk-Q4LQRXK4.js} +1 -1
- package/Marketplace/{chunk-W5LP6HWA.js → chunk-R4XC3TIR.js} +1 -1
- package/Marketplace/{chunk-JEIL7GTU.js → chunk-S5TAVCV2.js} +1 -1
- package/Marketplace/{chunk-P7MI7GDE.js → chunk-SCSHD4KU.js} +1 -1
- package/Marketplace/{chunk-JGSLR6Q7.js → chunk-SKMUHTVE.js} +1 -1
- package/Marketplace/{chunk-LPD77TVJ.js → chunk-SMV45LT2.js} +1 -1
- package/Marketplace/{chunk-UUY6BTJU.js → chunk-TNBAGDLT.js} +1 -1
- package/Marketplace/{chunk-VZO27DX6.js → chunk-TO2VHTUR.js} +3 -3
- package/Marketplace/{chunk-HIX2BUDB.js → chunk-U7MYN4C4.js} +1 -1
- package/Marketplace/{chunk-CBW7JGFJ.js → chunk-UGTOBS2B.js} +1 -1
- package/Marketplace/{chunk-RQWHADXY.js → chunk-VAE6Y2B3.js} +1 -1
- package/Marketplace/{chunk-T5BNV4KL.js → chunk-WGXKB6XB.js} +1 -1
- package/Marketplace/{chunk-N6VKSGEM.js → chunk-WOOLZ22H.js} +1 -1
- package/Marketplace/{chunk-ZSK75YJW.js → chunk-WP6G47JB.js} +1 -1
- package/Marketplace/{chunk-F7PVCSNW.js → chunk-X5NF5S2H.js} +1 -1
- package/Marketplace/{chunk-27IVVEQ5.js → chunk-X6UUIC3F.js} +1 -1
- package/Marketplace/{chunk-ZMMTX4YX.js → chunk-Y3GV3L67.js} +1 -1
- package/Marketplace/{chunk-I66FBNYV.js → chunk-YBPTSF4K.js} +1 -1
- package/Marketplace/{chunk-PL4TRYLK.js → chunk-ZAKCXPP7.js} +1 -1
- package/Marketplace/index.html +2 -2
- package/Marketplace/{main-AUAZAZGD.js → main-FSM7S3E4.js} +1 -1
- package/Marketplace/{styles-DC4DACOA.css → styles-VY4XPEM3.css} +1 -1
- package/package.json +1 -1
- package/Marketplace/chunk-5CBOZ77Z.js +0 -1
- package/Marketplace/chunk-FX4KZMXX.js +0 -1
- /package/Marketplace/{chunk-5DL35YCG.js → chunk-322JBPYB.js} +0 -0
- /package/Marketplace/{chunk-VS4FYYKI.js → chunk-EF3W3UUA.js} +0 -0
- /package/Marketplace/{chunk-QYP6WXYL.js → chunk-MKDJJ5L7.js} +0 -0
- /package/Marketplace/{chunk-FG5W5K4B.js → chunk-R7J6AS67.js} +0 -0
- /package/Marketplace/{polyfills-FXABYPWM.js → polyfills-5ZPLRT7K.js} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as je}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.2/Marketplace/chunk-VS4FYYKI.js";import{a as O,b as xe,c as Se,d as ve,e as Pe}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.2/Marketplace/chunk-VZO27DX6.js";import{a as fe}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.2/Marketplace/chunk-4Z75AP5X.js";import{b as Je}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.2/Marketplace/chunk-LU4CQUNV.js";import{a as He,b as Ye}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.2/Marketplace/chunk-KOEWWMXB.js";import{a as de}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.2/Marketplace/chunk-5DL35YCG.js";import{a as Z}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.2/Marketplace/chunk-HD4CTBL2.js";import{a as ge}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.2/Marketplace/chunk-3KV2JLZD.js";import{a as Y}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.2/Marketplace/chunk-QOBUHJEC.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.2/Marketplace/chunk-QHJPUEQJ.js";import{a as Ue,b as Be}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.2/Marketplace/chunk-MQUFUG4I.js";import{e as K}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.2/Marketplace/chunk-WIPT5BVZ.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.2/Marketplace/chunk-JGSLR6Q7.js";import{b as z,e as G}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.2/Marketplace/chunk-MG7FPXZX.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.2/Marketplace/chunk-VM5LF2AQ.js";import{b as _e,c as ke}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.2/Marketplace/chunk-ZSK75YJW.js";import{a as Ce}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.2/Marketplace/chunk-ONRH4TTU.js";import{a as ze,b as Ge,c as Ke}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.2/Marketplace/chunk-27IVVEQ5.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.2/Marketplace/chunk-JEIL7GTU.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.2/Marketplace/chunk-T4IQWUBV.js";import{a as Oe,c as $e,d as Le}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.2/Marketplace/chunk-NE4U3Z2F.js";import{a as he}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.2/Marketplace/chunk-PL4TRYLK.js";import{B as H,C as Re,q as ue,r as Ae,u as J}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.2/Marketplace/chunk-W5LP6HWA.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.2/Marketplace/chunk-7QK5UPRO.js";import{b as ce,c as se,h as N,k,m as pe,u as me,v as Ne}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.2/Marketplace/chunk-IANWTXDM.js";import{c as E}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.2/Marketplace/chunk-QYP6WXYL.js";import{$a as S,B as M,Cb as v,Db as P,Eb as re,Fa as l,Ga as b,Hc as Me,Ja as Ee,Lb as W,Lc as le,Oa as s,Q as te,Ua as d,X as $,Xb as L,Za as r,Zb as A,_a as c,_b as R,aa as ne,ab as w,bb as T,bc as U,db as x,ea as F,ec as B,fa as ie,fc as j,hb as u,ja as _,jb as p,ka as h,mb as ae,ob as Q,pb as m,q as X,qb as V,rb as I,sb as oe,ub as Fe,wb as y,za as D}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.2/Marketplace/chunk-CQJJCQOZ.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.2/Marketplace/chunk-FG5W5K4B.js";function st(i,o){if(i&1){let t=x();r(0,"button",19),u("click",function(){_(t);let n=p(3);return h(n.openScanDialog())}),S(1,"i",20),m(2," Scan Channel "),c()}}function pt(i,o){if(i&1){let t=x();r(0,"button",21),u("click",function(){_(t);let n=p().ngIf,a=p(2);return h(a.onUpdateItems(n))}),S(1,"i",22),m(2," Update "),c()}}function mt(i,o){if(i&1&&(r(0,"div"),d(1,st,3,0,"button",17)(2,pt,3,0,"button",18),c()),i&2){let t=o.ngIf,e=p(2);l(1),s("ngIf",!e.productService.hasSelectionVariant(t)),l(1),s("ngIf",e.productService.hasSelectionVariant(t))}}function dt(i,o){if(i&1){let t=x();r(0,"div",23)(1,"app-table",24),u("onToggle",function(n){_(t);let a=p(2);return h(a.onShowDifferencePrice(n))})("onSubmit",function(n){_(t);let a=p(2);return h(a.updatePriceByVariant(n))}),v(2,"async"),c()()}if(i&2){let t=p().ngIf,e=p();l(1),s("showProductToggle",!0)("data",P(2,4,e.paginationService.data$))("channel",e.channelOptions)("filter",t.Filter)}}function _t(i,o){if(i&1){let t=x();r(0,"span",25),u("click",function(){_(t);let n=p(2);return h(n.getRowCount())}),r(1,"i",26),m(2,"?"),c()()}}function ht(i,o){if(i&1&&(r(0,"span"),m(1),v(2,"number"),c()),i&2){let t=o.ngIf;l(1),V(P(2,1,t))}}function ut(i,o){if(i&1){let t=x();r(0,"a",27),u("click",function(){_(t);let n=p(2);return h(n.onNextPage())}),S(1,"i",28),m(2," Next"),c()}}function gt(i,o){if(i&1){let t=x();r(0,"a",29),u("click",function(){_(t);let n=p(2);return h(n.onLastPage())}),S(1,"i",30),m(2," Last"),c()}}function Ct(i,o){if(i&1){let t=x();r(0,"mainpanel",1),u("onSubmit",function(n){_(t);let a=p();return h(a.onSearch(n))}),r(1,"actions")(2,"div",2),d(3,mt,3,2,"div",3),v(4,"async"),c()(),r(5,"filters")(6,"div")(7,"label",4),m(8,"Page Number"),c(),r(9,"input",5),u("ngModelChange",function(n){_(t);let a=p();return h(a.searchFilter.PageNumber=n)}),c()(),r(10,"div",6)(11,"label",4),m(12,"Page Size"),c(),r(13,"input",5),u("ngModelChange",function(n){_(t);let a=p();return h(a.searchFilter.RowCount=n)}),c()()(),r(14,"content")(15,"div",7)(16,"div",8),d(17,dt,3,6,"div",9),v(18,"async"),c(),r(19,"div",10)(20,"div",11)(21,"div",12),m(22),v(23,"number"),v(24,"async"),d(25,_t,3,0,"span",13)(26,ht,3,3,"span",3),v(27,"async"),m(28),c()(),r(29,"div",14),d(30,ut,3,0,"a",15)(31,gt,3,0,"a",16),c()()()()()}if(i&2){let t=p(),e;s("pageData",t.pageData)("textButton","Search"),l(3),s("ngIf",P(4,12,t.paginationService.data$)),l(6),s("ngModel",t.searchFilter.PageNumber),l(4),s("ngModel",t.searchFilter.RowCount),l(4),s("ngIf",P(18,14,t.paginationService.data$)),l(5),I(" Showing 1 - ",P(23,16,(e=P(24,18,t.paginationService.data$))==null?null:e.length)," of "),l(3),s("ngIf",t.paginationService.hideCount),l(1),s("ngIf",!t.paginationService.hideCount&&P(27,20,t.allDataCount$)),l(2),I(" records ~ ",t.paginationService.footerPageNumber," Page "),l(2),s("ngIf",t.paginationService.disableNextButton&&!t.paginationService.goToLastPage),l(1),s("ngIf",t.paginationService.disableNextButton&&!t.paginationService.goToLastPage)}}var nt=(()=>{let o=class o{constructor(e,n,a,g,C,f){this.http=e,this.toastr=n,this.dialog=a,this.paginationService=g,this.productService=C,this.authService=f,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}]},this.channelOptions=this.authService.getChannels()}ngOnInit(){this.initPageLoader()}initPageLoader(){this.paginationService.fetchDataEndpoint=this.getDataAPI,this.loader$=this.http.post(`/api/${this.loaderAPI}`).pipe($(e=>{e.Filter={PageNumber:e.Filter.PageNumber,RowCount:e.Filter.RowCount,filterModel:1},this.searchFilter=e.Filter,this.paginationService.reloadPagination(this.searchFilter)}))}onShowDifferencePrice(e){this.searchFilter.filterModel=1,e&&(this.searchFilter.filterModel=3),this.paginationService.reloadPagination(this.searchFilter)}onSearch(e){this.searchFilter.text=e,this.paginationService.reloadPagination(this.searchFilter)}openScanDialog(){this.searchFilter.ChannelID=E.GuidEMpty;let e=JSON.parse(JSON.stringify(this.searchFilter));this.dialog.open(ge,{data:{filter:e,channelOptions:this.channelOptions},width:"600px"}).afterClosed().pipe(M(a=>E.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(e=>{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 n=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);this.initPageLoader(),this.productService.successToastrScanAllProduct(e,n,!this.searchFilter.UpdatedProduct)}})}updatePrice(e){let n=this.productService.selectedVariantProduct(e);if(n.length>0){let g=n.map(f=>({ID:f.ID,Code:f.Code,Price:f.UnitPrice}));var a=this.channelOptions.filter(f=>f.selected).map(f=>f.ID);let C={ListChannelID:a,ListPrice:g};this.http.post("/api/Price/UpdateChannel",C).subscribe(f=>{this.paginationService.reloadPagination(this.searchFilter),this.toastr.success("Successfully updated "+C.ListPrice.length+" items in "+C.ListChannelID.length+" channels","Success")})}}updatePriceByVariant(e){let n={ID:e.ChannelID,ChannelItemID:e.ChannelItemID,ChannelVariantID:e.ChannelVariationID,Price:e.Price-0,VariantID:e.ID};this.http.post("/api/Price/UpdatePriceByID",n).subscribe(a=>{let g=this.productService.findChannelById(n.ID,this.channelOptions);this.toastr.success("Successfully updated "+e.ItemName+"("+e.VarName+") price in "+g.Name+" to "+n.Price,"Success"),this.paginationService.reloadPagination(this.searchFilter)})}onUpdateItems(e){let n=this.productService.selectedVariantProduct(e);this.dialog.open(fe,{data:{selectedItems:n,channels:this.channelOptions},width:"600px"}).afterClosed().pipe(M(a=>a!==void 0)).subscribe(a=>{this.channelOptions=a,this.updatePrice(e)})}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:e=>{this.searchFilter.PageNumber=1,this.paginationService.getAllData(this.searchFilter,e)}})}ngOnDestroy(){this.paginationService.destroy()}};o.\u0275fac=function(n){return new(n||o)(b(G),b(z),b(J),b(Z),b(Y),b(K))},o.\u0275cmp=F({type:o,selectors:[["app-price-pos-channel"]],decls:2,vars:3,consts:[["headerTitle","Price Comparison",3,"pageData","textButton","onSubmit",4,"ngIf"],["headerTitle","Price Comparison",3,"pageData","textButton","onSubmit"],[1,"d-flex"],[4,"ngIf"],[1,"fw-bold"],["type","number",1,"form-control","mt-2",3,"ngModel","ngModelChange"],[1,"mt-5"],[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 border-start-0","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","border-start-0",3,"click"],[1,"fas","fa-share"]],template:function(n,a){n&1&&(d(0,Ct,32,22,"mainpanel",0),v(1,"async")),n&2&&s("ngIf",P(1,1,a.loader$))},dependencies:[R,se,pe,N,k,H,ve,U,B],styles:[".no-bullet[_ngcontent-%COMP%]{list-style-type:none}"]});let i=o;return i})();function ft(i,o){if(i&1&&(r(0,"mat-radio-button",3),m(1),c()),i&2){let t=o.$implicit,e=o.index,n=p();s("value",t.Key)("name",n.name)("title",n.tooltipsText[e]?n.tooltipsText[e]:""),l(1),I(" ",t.Value,"")}}var xt=i=>({"border-0 rounded":i}),be=(()=>{let o=class o{constructor(){this.modelChange=new Ee,this.border=!1,this.tooltipsText=[]}change(e){this.modelChange.emit(e)}};o.\u0275fac=function(n){return new(n||o)},o.\u0275cmp=F({type:o,selectors:[["radio-options"]],inputs:{model:"model",options:"options",border:"border",name:"name",tooltipsText:"tooltipsText"},outputs:{modelChange:"modelChange"},standalone:!0,features:[Fe],decls:3,vars:5,consts:[[1,"form-control","h-100","rounded-1",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,a){n&1&&(r(0,"div",0)(1,"mat-radio-group",1),u("ngModelChange",function(C){return a.change(C)}),d(2,ft,2,4,"mat-radio-button",2),c()()),n&2&&(s("ngClass",y(3,xt,a.border==!1)),l(1),s("ngModel",a.model),l(1),s("ngForOf",a.options))},dependencies:[j,L,A,Ke,ze,Ge,me,N,k],styles:[".mat-radio-label{margin-top:auto;margin-bottom:auto}"]});let i=o;return i})();function yt(i,o){if(i&1){let t=x();w(0),r(1,"div")(2,"label",23),m(3,"Filter by"),c(),r(4,"radio-options",24),u("modelChange",function(n){_(t);let a=p();return h(a.filterType=n)}),c()(),T()}if(i&2){let t=p();l(4),s("model",t.filterType)("options",t.filterTypeOptions)("border",!0)}}function wt(i,o){if(i&1){let t=x();r(0,"button",27),u("click",function(){_(t);let n=p().ngIf,a=p();return h(a.onUpdateItems(n))}),S(1,"i",28),m(2," Update "),c()}}function Tt(i,o){if(i&1&&(w(0),r(1,"div",25),d(2,wt,3,0,"button",26),c(),T()),i&2){let t=o.ngIf,e=p();l(2),s("ngIf",e.productService.hasSelectionVariant(t))}}function Dt(i,o){if(i&1&&(r(0,"th",29)(1,"div",30),S(2,"img",31),r(3,"div",32),m(4),v(5,"stringLimit"),c()()()),i&2){let t=o.$implicit;l(1),s("matTooltip",(t.Name==null?null:t.Name.length)>20?t.Name:""),l(1),s("src",t==null?null:t.logo,D),l(2),oe("",re(5,4,t.Name,20),"",(t.Name==null?null:t.Name.length)>20?"...":"","")}}function Vt(i,o){if(i&1){let t=x();r(0,"th")(1,"input",33),u("ngModelChange",function(n){_(t);let a=p();return h(a.checkboxState=n)})("ngModelChange",function(){_(t);let n=p();return h(n.onSelectAllData())}),c()()}if(i&2){let t=p();l(1),s("ngModel",t.checkboxState)}}function Et(i,o){i&1&&(w(0),r(1,"th",34)(2,"span"),m(3,"Expected"),c(),r(4,"span",35),m(5,"(POS)"),c()(),r(6,"th",34),m(7," Channel "),c(),T())}function Ft(i,o){if(i&1){let t=x();r(0,"img",46),u("click",function(n){_(t);let a=p(3).$implicit,g=p(2);return h(g.onZoomImage(n,a==null?null:a.ImageUrl))}),c()}if(i&2){let t=p(3).$implicit;ae("src",t==null?null:t.ImageUrl,D)}}function Mt(i,o){i&1&&S(0,"img",47)}var Nt=i=>({"border-bottom":i});function kt(i,o){if(i&1&&(w(0),r(1,"td",41),d(2,Ft,1,1,"img",42)(3,Mt,1,0,"ng-template",null,43,W),c(),r(5,"td",44)(6,"h5",45),m(7),c(),S(8,"br"),r(9,"small"),m(10),c()(),T()),i&2){let t=Q(4),e=p().index,n=p().$implicit,a=p().ngIf;l(1),s("rowSpan",n==null?null:n.Variants.length)("ngClass",y(7,Nt,e+1==a.length)),l(1),s("ngIf",n==null?null:n.ImageUrl)("ngIfElse",t),l(3),s("rowSpan",n==null?null:n.Variants.length),l(2),V(n==null?null:n.Name),l(3),I("(",n==null?null:n.Category,")")}}function Ot(i,o){if(i&1){let t=x();r(0,"td",48)(1,"input",33),u("ngModelChange",function(n){_(t);let a=p().$implicit;return h(a.selected=n)}),c()()}if(i&2){let t=p().$implicit;l(1),s("ngModel",t.selected)}}var $t=i=>({"bg-gradient-warning":i});function Lt(i,o){if(i&1){let t=x();w(0),r(1,"td",51),m(2),v(3,"number"),c(),r(4,"td",52),u("click",function(){let a=_(t).$implicit,g=p(2).$implicit,C=p().$implicit,f=p(2);return h(f.openTableDialog(g,C,a))}),r(5,"span",53),m(6),v(7,"number"),c(),r(8,"a",54),u("click",function(n){return n==null?null:n.stopPropagation()}),S(9,"i",40),c()(),T()}if(i&2){let t=o.$implicit;l(2),I(" ",P(3,4,t.PriceExpected)," "),l(2),s("ngClass",y(8,$t,t.Price!=t.PriceExpected)),l(2),I(" ",P(7,6,t.Price)," "),l(2),s("href",t.Url,D)}}function At(i,o){i&1&&(r(0,"td",55),m(1,"X"),c(),r(2,"td",55),m(3,"X"),c())}function Rt(i,o){if(i&1&&(w(0),d(1,Lt,10,10,"ng-container",49)(2,At,4,0,"ng-template",null,50,W),T()),i&2){let t=o.$implicit,e=Q(3),n=p().$implicit,a=p(3);l(1),s("ngIf",a.getItemFromChannel(n,t.ID))("ngIfElse",e)}}var Ut=i=>({"text-decoration-line-through":i}),it=i=>[i];function Bt(i,o){if(i&1&&(r(0,"tr"),d(1,kt,11,9,"ng-container",1),r(2,"td",36),m(3),c(),r(4,"td",37)(5,"span",38),m(6),c(),r(7,"span",32)(8,"a",39),S(9,"i",40),c()()(),d(10,Ot,2,1,"ng-template",14)(11,Rt,4,2,"ng-container",15),c()),i&2){let t=o.$implicit,e=o.index,n=p(3);l(1),s("ngIf",e==0),l(2),V(t==null?null:t.Model),l(1),s("matTooltip",t.isDiscontinued?n.discontinuedVariantMsg:""),l(1),s("ngClass",y(8,Ut,t.isDiscontinued)),l(1),V(t==null?null:t.Code),l(2),s("href",n.hostName+"/menu/Products/Catalog/Variants/Info?ID="+(t==null?null:t.ID),D),l(2),s("ngxPermissionsOnly",y(10,it,n.rolePriceEdit)),l(1),s("ngForOf",n.channelOptions)}}function jt(i,o){if(i&1&&(r(0,"tbody"),d(1,Bt,12,12,"tr",15),c()),i&2){let t=o.$implicit;l(1),s("ngForOf",t.Variants)}}function zt(i,o){if(i&1&&(w(0),d(1,jt,2,1,"tbody",15),T()),i&2){let t=o.ngIf;l(1),s("ngForOf",t)}}function Gt(i,o){if(i&1){let t=x();r(0,"span",56),u("click",function(){_(t);let n=p();return h(n.getRowCount())}),r(1,"i",57),m(2,"?"),c()()}}function Kt(i,o){if(i&1&&(r(0,"span"),m(1),v(2,"number"),c()),i&2){let t=o.ngIf;l(1),V(P(2,1,t))}}function Jt(i,o){if(i&1){let t=x();r(0,"a",58),u("click",function(){_(t);let n=p();return h(n.onNextPage())}),S(1,"i",59),m(2," Next"),c()}}function Ht(i,o){if(i&1){let t=x();r(0,"a",60),u("click",function(){_(t);let n=p();return h(n.onLastPage())}),S(1,"i",61),m(2," Last"),c()}}var at=(()=>{let o=class o{constructor(e,n,a,g,C,f,Ie){this.http=e,this.toastr=n,this.dialog=a,this.productService=g,this.authService=C,this.biggerPictureService=f,this.paginationService=Ie,this.searchFilter=new je,this.checkboxState=!1,this.rolePriceEdit=de.price,this.discontinuedVariantMsg="This Variant is discontinued from POS, you must Non Active manually at the seller center so that it is not sold again on the channel.",this.rowCountAPI="Inventory/GetMultipleChannelComparisonRowCount",this.filterTypeOptions=[{Key:O.ALL,Value:"All"},{Key:O.DIFFERENCE,Value:"Difference"}],this.filterType=O.ALL,this.pageData={Title:"Price Realtime",Nav:[{Title:"Price Cache",Url:"/menu/price",Active:!1}]},this.channelOptions=this.authService.getChannels(),this.hostName=this.authService.getDomain(),this.initPagination()}initPagination(){this.paginationService.fetchDataEndpoint="Price/GetOutletPrice",this.initProduct(),this.initPageLoader()}initProduct(){this.data$=this.paginationService.data$.pipe(X(e=>(e=e.map(n=>(n.Variants&&(n.Variants=n.Variants.map(a=>(a.isDiscontinued=a.Discontinued=="Yes",a))),n)),e)),te(1))}initPageLoader(){this.loader$=this.http.post("/api/PriceLoader/LoadMultiple",{}).pipe($(e=>{this.searchFilter=e.Filter,this.paginationService.reloadPagination(this.searchFilter)}))}onNextPage(){this.paginationService.onNextPage(this.searchFilter)}onLastPage(){this.paginationService.hideCount=!1,this.totalData$=this.http.post(`/api/${this.rowCountAPI}`,{}).pipe($(e=>{this.searchFilter.PageNumber=1,this.paginationService.getAllData(this.searchFilter,e)}))}getRowCount(){this.paginationService.hideCount=!1,this.totalData$=this.http.post(`/api/${this.rowCountAPI}`,{})}onSelectAllData(){this.data$=this.data$.pipe(X(e=>(e.map(n=>(n.Variants&&(n.Variants=n.Variants.map(a=>(a.selected=this.checkboxState,a))),n)),e)))}onFilter(e){let n={text:e,filterModel:this.filterType,PageNumber:this.searchFilter.PageNumber,RowCount:this.searchFilter.RowCount};this.paginationService.reloadPagination(n)}updatePrice(e){let n=this.productService.selectedVariantProduct(e);if(n.length>0){let a=n.map(f=>f.ID),C={ListChannelID:this.channelOptions.filter(f=>f.selected).map(f=>f.ID),ListID:a};this.http.post("/api/Price/UpdateChannelOutletPrice",C).subscribe({next:f=>{this.resetSelectedChannel(),this.onFilter(),this.toastr.success("Successfully updated "+C.ListID.length+" items in "+C.ListChannelID.length+" channels","Success")},error:f=>{this.resetSelectedChannel()}})}}resetSelectedChannel(){this.channelOptions=this.channelOptions.map(e=>(e.selected=!1,e))}getItemFromChannel(e,n){return e.Channel.find(a=>a.ChannelID==n)}onUpdateItems(e){let n=this.productService.selectedVariantProduct(e);this.dialog.open(fe,{data:{selectedItems:n,channels:this.channelOptions},width:"600px"}).afterClosed().pipe(M(a=>E.IsNotEmpty(a))).subscribe(a=>{this.channelOptions=a,this.updatePrice(e)})}openTableDialog(e,n,a){let g=JSON.parse(JSON.stringify(e));this.dialog.open(xe,{data:{Name:n.Name,Variant:g,ChannelID:a?.ChannelID,Table:"price",ChannelItemID:a?.ChannelItemID}}).afterClosed().pipe(M(f=>E.IsNotEmpty(f))).subscribe(f=>{this.updateProductPrice(f,a)})}updateProductPrice(e,n){let a={ID:e.ChannelID,ChannelItemID:e.ChannelItemID,ChannelVariantID:e.ChannelVariationID,Price:parseFloat(e.Price),VariantID:e.ID,SKU:e.Sku};this.http.post("/api/Price/UpdatePriceByID",a).subscribe(g=>{n.Price=a.Price;let C=this.productService.findChannelById(a.ID,this.channelOptions);this.toastr.success(`Successfully updated ${e.ItemName} (${e.VarName}) inventory in ${C.Name} to ${a.Price}`,"Success")})}onZoomImage(e,n){this.biggerPictureService.openBiggerPicture(e,n)}ngOnDestroy(){this.paginationService.destroy()}};o.\u0275fac=function(n){return new(n||o)(b(G),b(z),b(J),b(Y),b(K),b(Ce),b(Z))},o.\u0275cmp=F({type:o,selectors:[["app-custom-channel-price"]],decls:41,vars:30,consts:[["headerTitle","Price Comparison",3,"pageData","hideSearchBox","hideSearchDropdown","textButton","onSubmit"],[4,"ngIf"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"table"],[1,"thead-light","sticky-top-thead"],[1,"channel-column"],["colspan","5"],["scope","col","colspan","2","class","w-100","class","text-center border-bottom-0 border 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"],[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 border-start-0","title","Load all products",3,"click",4,"ngIf"],[1,"fw-bold","mb-2"],["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"],["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","text-uppercase"],["matTooltipPosition","above",1,"d-flex","align-items-center","justify-content-center",2,"width","180px",3,"matTooltip"],[2,"width","16px","height","16px",3,"src"],[1,"ms-2"],["type","checkbox",3,"ngModel","ngModelChange"],[1,"text-end","border-top-0","border","w-10"],[1,"ms-1"],[1,"text-start","border-bottom"],["matTooltipPosition","above",1,"text-start","border-bottom",3,"matTooltip"],[3,"ngClass"],["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"],[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","border-start-0",3,"click"],[1,"fas","fa-share"]],template:function(n,a){if(n&1&&(r(0,"mainpanel",0),u("onSubmit",function(C){return a.onFilter(C)}),r(1,"filters"),d(2,yt,5,3,"ng-container",1),v(3,"async"),c(),r(4,"actions"),d(5,Tt,3,1,"ng-container",1),v(6,"async"),c(),r(7,"content")(8,"div",2)(9,"div",3)(10,"div",4)(11,"div",5)(12,"table",6)(13,"thead",7)(14,"tr",8),S(15,"th",9),d(16,Dt,6,7,"th",10),c(),r(17,"tr")(18,"th",11),m(19,"Product"),c(),r(20,"th",12),m(21,"Variant"),c(),r(22,"th",13),m(23,"SKU"),c(),d(24,Vt,2,1,"ng-template",14)(25,Et,8,0,"ng-container",15),c()(),d(26,zt,2,1,"ng-container",1),v(27,"async"),c()()()(),r(28,"div",16)(29,"div",17)(30,"div",18),m(31),v(32,"number"),v(33,"async"),d(34,Gt,3,0,"span",19)(35,Kt,3,3,"span",1),v(36,"async"),m(37),c()(),r(38,"div",20),d(39,Jt,3,0,"a",21)(40,Ht,3,0,"a",22),c()()()()()),n&2){let g;s("pageData",a.pageData)("hideSearchBox",!1)("hideSearchDropdown",!1)("textButton","Search"),l(2),s("ngIf",P(3,16,a.loader$)),l(3),s("ngIf",P(6,18,a.data$)),l(11),s("ngForOf",a.channelOptions),l(8),s("ngxPermissionsOnly",y(28,it,a.rolePriceEdit)),l(1),s("ngForOf",a.channelOptions),l(1),s("ngIf",P(27,20,a.data$)),l(5),I(" Showing 1 - ",P(32,22,(g=P(33,24,a.paginationService.data$))==null?null:g.length)," of "),l(3),s("ngIf",a.paginationService.hideCount),l(1),s("ngIf",!a.paginationService.hideCount&&P(36,26,a.totalData$)),l(2),I(" records ~ ",a.paginationService.footerPageNumber," Page "),l(2),s("ngIf",a.paginationService.disableNextButton&&!a.paginationService.goToLastPage),l(1),s("ngIf",a.paginationService.disableNextButton&&!a.paginationService.goToLastPage)}},dependencies:[L,A,R,ce,N,k,H,ue,be,_e,U,B,Se],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}"]});let i=o;return i})();function Yt(i,o){if(i&1&&(r(0,"span",8),S(1,"img",9),c(),m(2)),i&2){let t=o.item;l(1),s("src",t==null?null:t.logo,D),l(1),I(" ",t.Name," ")}}function Zt(i,o){if(i&1){let t=x();r(0,"button",13),u("click",function(){_(t);let n=p(3);return h(n.openScanDialog())}),S(1,"i",14),m(2," Scan Channel "),c()}}function qt(i,o){if(i&1){let t=x();r(0,"button",15),u("click",function(){_(t);let n=p().ngIf,a=p(2);return h(a.updateStock(n))}),S(1,"i",16),m(2," Update "),c()}}function Xt(i,o){if(i&1&&(r(0,"actions")(1,"div",10)(2,"div"),d(3,Zt,3,0,"button",11)(4,qt,3,0,"button",12),c()()()),i&2){let t=o.ngIf,e=p(2);l(3),s("ngIf",!e.productService.hasSelectionVariant(t)),l(1),s("ngIf",e.productService.hasSelectionVariant(t))}}function Qt(i,o){if(i&1){let t=x();r(0,"th")(1,"input",37),u("change",function(n){_(t);let a=p().ngIf,g=p(2);return h(g.onSelectAllSKU(n.target.checked,a))}),c()()}}function Wt(i,o){if(i&1){let t=x();r(0,"input",57),u("ngModelChange",function(n){_(t);let a=p(4).$implicit;return h(a.selected=n)})("ngModelChange",function(){_(t);let n=p(4).$implicit,a=p(3);return h(a.onCheckboxStateProduct(n))}),c()}if(i&2){let t=p(4).$implicit;s("ngModel",t.selected)}}function en(i,o){if(i&1&&d(0,Wt,1,1,"input",56),i&2){let t=p(2).$implicit,e=p().$implicit;s("ngIf",t.Inventory>=0||e.Variants.length>1)}}function tn(i,o){if(i&1){let t=x();r(0,"img",58),u("click",function(n){_(t);let a=p(3).$implicit,g=p(3);return h(g.onZoomImage(n,a==null?null:a.ImageUrl))}),c()}if(i&2){let t=p(3).$implicit;ae("src",t.ThumbnailUrl,D)}}function nn(i,o){i&1&&S(0,"img",59)}function an(i,o){if(i&1&&(w(0),S(1,"br"),r(2,"small"),m(3),c(),T()),i&2){let t=p(3).$implicit;l(3),I("(",t.Category,")")}}var De=i=>[i];function on(i,o){if(i&1&&(w(0),r(1,"td",50)(2,"div",51),d(3,en,1,1,"ng-template",25)(4,tn,1,1,"img",52)(5,nn,1,0,"ng-template",null,53,W),c()(),r(7,"td",54)(8,"span",55),m(9),c(),d(10,an,4,1,"ng-container",7),c(),T()),i&2){let t=Q(6),e=p(2).$implicit,n=p(3);l(1),s("rowSpan",e.Variants.length),l(2),s("ngxPermissionsOnly",y(7,De,n.rolePriceEdit)),l(1),s("ngIf",e.ThumbnailUrl)("ngIfElse",t),l(3),s("rowSpan",e.Variants.length),l(2),V(e.Name),l(1),s("ngIf",(e==null?null:e.CategoryID)!==null&&(e==null?null:e.CategoryID)!=n.guidEmpty)}}function rn(i,o){if(i&1){let t=x();r(0,"input",62),u("ngModelChange",function(n){_(t);let a=p(2).$implicit;return h(a.selected=n)}),c()}if(i&2){let t=p(2).$implicit;s("ngModel",t.selected)}}function ln(i,o){if(i&1&&(r(0,"td",60),d(1,rn,1,1,"input",61),c()),i&2){let t=p().$implicit;l(1),s("ngIf",t.Inventory>=0)}}function cn(i,o){i&1&&(r(0,"div",63),m(1,"Not Found"),c())}function sn(i,o){if(i&1&&(r(0,"div"),m(1),v(2,"number"),c()),i&2){let t=p().$implicit;l(1),I(" ",P(2,1,t.UnitPrice),"")}}function pn(i,o){if(i&1&&(w(0),r(1,"div",64)(2,"a",45),S(3,"i",65),c()(),T()),i&2){let t=p().$implicit,e=p(4);l(2),s("href",e.hostName+"/menu/Products/Catalog/Variants/Info?ID="+(t==null?null:t.ID),D)}}function mn(i,o){if(i&1){let t=x();r(0,"div",66),u("click",function(){_(t);let n=p().$implicit,a=p().$implicit,g=p(2).ngIf,C=p();return h(C.openTableDialog(n,a,g))}),m(1),v(2,"number"),c()}if(i&2){let t=p().$implicit;l(1),I(" ",P(2,1,t.Channel[0]==null?null:t.Channel[0].Price)," ")}}var dn=i=>({"text-decoration-line-through":i}),_n=i=>({"bg-gradient-warning":i});function hn(i,o){if(i&1){let t=x();r(0,"tr"),d(1,on,11,9,"ng-container",7),r(2,"td",23),m(3),c(),r(4,"td",38)(5,"span",39),m(6),c()(),d(7,ln,2,1,"ng-template",25),r(8,"td",26)(9,"div",40),d(10,cn,2,0,"div",41)(11,sn,3,3,"div",7)(12,pn,4,1,"ng-container",7),c()(),r(13,"td",42)(14,"div",40),d(15,mn,3,3,"div",43),r(16,"div",44)(17,"a",45),S(18,"i",46),c()()()(),r(19,"td")(20,"div",47)(21,"div",48),u("click",function(){let a=_(t).$implicit,g=p(4);return h(g.refreshPrice(a))}),S(22,"i",49),c()()()()}if(i&2){let t=o.$implicit,e=o.index,n=p(4);l(1),s("ngIf",e==0),l(2),V(t.Model),l(1),s("matTooltip",t.isDiscontinued?n.discontinuedVariantMsg:""),l(1),s("ngClass",y(12,dn,t.isDiscontinued)),l(1),I(" ",t.Code," "),l(1),s("ngxPermissionsOnly",y(14,De,n.rolePriceEdit)),l(3),s("ngIf",(t.Channel[0]==null?null:t.Channel[0].Description)!=null),l(1),s("ngIf",(t.Channel[0]==null?null:t.Channel[0].Description)==null),l(1),s("ngIf",(t.Channel[0]==null?null:t.Channel[0].Description)==null),l(1),s("ngClass",y(16,_n,t.UnitPrice!=(t.Channel[0]==null?null:t.Channel[0].Price))),l(2),s("ngIf",t.Channel.length>0),l(2),s("href",t.Channel[0]==null?null:t.Channel[0].Url,D)}}function un(i,o){if(i&1&&(w(0),d(1,hn,23,18,"tr",31),T()),i&2){let t=o.$implicit;l(1),s("ngForOf",t.Variants)}}function gn(i,o){if(i&1){let t=x();r(0,"span",66),u("click",function(){_(t);let n=p(3);return h(n.getRowCount())}),r(1,"i",67),m(2,"?"),c()()}}function Cn(i,o){if(i&1&&(r(0,"span"),m(1),v(2,"number"),c()),i&2){let t=o.ngIf;l(1),V(P(2,1,t.Total))}}function fn(i,o){if(i&1){let t=x();r(0,"a",71),u("click",function(){_(t);let n=p(4);return h(n.onNextPage())}),S(1,"i",72),m(2," Next"),c()}}function xn(i,o){if(i&1){let t=x();r(0,"a",73),u("click",function(){_(t);let n=p(4);return h(n.onLastPage())}),S(1,"i",74),m(2," Last"),c()}}function Sn(i,o){if(i&1&&(r(0,"div",68),d(1,fn,3,0,"a",69)(2,xn,3,0,"a",70),c()),i&2){let t=p(3);l(1),s("ngIf",t.paginationService.disableNextButton&&!t.paginationService.goToLastPage),l(1),s("ngIf",t.paginationService.disableNextButton&&!t.paginationService.goToLastPage)}}function vn(i,o){if(i&1){let t=x();r(0,"content")(1,"div",17)(2,"div",18)(3,"table",19)(4,"thead",20)(5,"tr")(6,"th",21),m(7," Product "),r(8,"div")(9,"mat-slide-toggle",22),u("ngModelChange",function(n){_(t);let a=p(2);return h(a.toggleDifferentInventory=n)})("toggleChange",function(){_(t);let n=p(2);return h(n.onToggleDifferentInventory())}),r(10,"small",2),m(11,"FILTER DIFFERENT PRICE"),c()()()(),r(12,"th",23),m(13,"Variant"),c(),r(14,"th",24),m(15,"SKU"),c(),d(16,Qt,2,0,"ng-template",25),r(17,"th",26),m(18,"POS"),c(),r(19,"th",26)(20,"div",27),S(21,"img",28),r(22,"span",29),m(23),v(24,"stringLimit"),c()()(),S(25,"th",30),c()(),r(26,"tbody"),d(27,un,2,1,"ng-container",31),c()(),r(28,"div",32)(29,"div",33)(30,"div",34),m(31),v(32,"number"),d(33,gn,3,0,"span",35)(34,Cn,3,3,"span",7),v(35,"async"),m(36),c()(),d(37,Sn,3,2,"div",36),c()()()()}if(i&2){let t=o.ngIf,e=p(2);l(9),s("ngModel",e.toggleDifferentInventory),l(7),s("ngxPermissionsOnly",y(19,De,e.rolePriceEdit)),l(4),s("matTooltip",(e.selectedChannel==null||e.selectedChannel.Name==null?null:e.selectedChannel.Name.length)>=20?e.selectedChannel==null?null:e.selectedChannel.Name:""),l(1),s("src",e.selectedChannel==null?null:e.selectedChannel.logo,D),l(2),oe(" ",re(24,12,e.selectedChannel==null?null:e.selectedChannel.Name,20),"",(e.selectedChannel==null||e.selectedChannel.Name==null?null:e.selectedChannel.Name.length)>=20?"...":""," "),l(4),s("ngForOf",t),l(4),I(" Showing 1 - ",P(32,15,t==null?null:t.length)," of "),l(2),s("ngIf",e.paginationService.hideCount),l(1),s("ngIf",P(35,17,!e.paginationService.hideCount&&e.allDataCount$)),l(2),I(" records ~ ",e.paginationService.footerPageNumber," Page "),l(1),s("ngIf",t.length>0)}}function Pn(i,o){if(i&1){let t=x();r(0,"mainpanel",1),u("textChange",function(n){_(t);let a=p();return h(a.searchFilter.text=n)})("onSubmit",function(){_(t);let n=p();return h(n.onSearch())}),r(1,"filters")(2,"div")(3,"label",2),m(4,"Channel"),c(),r(5,"ng-select",3),u("ngModelChange",function(n){_(t);let a=p();return h(a.searchFilter.ChannelID=n)}),d(6,Yt,3,2,"ng-template",4),c()(),r(7,"div",5)(8,"label",2),m(9,"Page Number"),c(),r(10,"input",6),u("ngModelChange",function(n){_(t);let a=p();return h(a.searchFilter.PageNumber=n)}),c()(),r(11,"div",5)(12,"label",2),m(13,"Page Size"),c(),r(14,"input",6),u("ngModelChange",function(n){_(t);let a=p();return h(a.searchFilter.RowCount=n)}),c()()(),d(15,Xt,5,2,"actions",7),v(16,"async"),d(17,vn,38,21,"content",7),v(18,"async"),c()}if(i&2){let t=p();s("headerTitle",t.pageTitle)("text",t.searchFilter.text),l(5),s("clearable",!1)("items",t.channelOptions)("ngModel",t.searchFilter.ChannelID),l(5),s("ngModel",t.searchFilter.PageNumber),l(4),s("ngModel",t.searchFilter.RowCount),l(1),s("ngIf",P(16,9,t.data$)),l(2),s("ngIf",P(18,11,t.data$))}}var ot=(()=>{let o=class o{constructor(e,n,a,g,C,f,Ie,Ve){this.http=e,this.paginationService=n,this.toastr=a,this.dialog=g,this.productService=C,this.biggerPictureService=f,this.inventoryService=Ie,this.authService=Ve,this.pageTitle="Price Single Channel Comparison",this.toggleDifferentInventory=!1,this.loaderEndpoint="PriceLoader/Load",this.dataEndpoint="Price/GetSingleChannelComparison",this.allDataCountEndpoint="Inventory/GetInventoryByChannelRowCount",this.rolePriceEdit=de.price,this.discontinuedVariantMsg="This Variant is discontinued from POS, you must Non Active manually at the seller center so that it is not sold again on the channel.",this.guidEmpty=E.GuidEMpty,this.hostName=this.authService.getDomain(),this.data$=this.paginationService.data$.pipe(te(1),X(ct=>ct.map(ee=>(ee.Variants&&(ee.Variants=ee.Variants.map(ye=>(ye.isDiscontinued=ye.Discontinued=="Yes",ye))),ee)))),this.channelOptions=Ve.getChannels()}ngOnInit(){this.initPageLoader()}initPageLoader(){this.paginationService.fetchDataEndpoint=this.dataEndpoint,this.loader$=this.http.post(`/API/${this.loaderEndpoint}`).pipe($(e=>{this.searchFilter=e.Filter,this.searchFilter.filterModel=O.ALL,this.paginationService.reloadPagination(this.searchFilter),this.initSelectedChannel()}))}onToggleDifferentInventory(){this.toggleDifferentInventory?this.searchFilter.filterModel=O.ALL:this.searchFilter.filterModel=O.DIFFERENCE,this.onSearch()}onCheckboxStateProduct(e){e.Variants=e.Variants.map(n=>(n.selected=e.selected,n))}openScanDialog(){let e=JSON.parse(JSON.stringify(this.searchFilter));e.ChannelID=E.GuidEMpty,this.dialog.open(ge,{data:{filter:e,channelOptions:this.channelOptions},width:"600px"}).afterClosed().pipe(M(n=>E.IsNotEmpty(n))).subscribe(n=>{this.searchFilter.ChannelID=n.ChannelID,this.searchFilter.ScanFull=n.ScanFull,this.searchFilter.UpdatedProduct=n.UpdatedProduct,this.searchFilter.Async=n.Async,this.scanAll()})}scanAll(){let e=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);this.productService.scanAll(this.searchFilter.ChannelID,this.searchFilter.ScanFull,this.searchFilter.UpdatedProduct,this.searchFilter.Async).subscribe(n=>{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 ${e?.Name}`,"Success"))})}updateStock(e){let a=this.productService.selectedVariantProduct(e).map(C=>({ID:C.ID,ChannelID:C.Channel[0].ChannelID,Code:C.Code,Price:C.UnitPrice})),g={ListChannelID:[this.searchFilter.ChannelID],ListPrice:a};this.http.post("/api/Price/UpdateChannel",g).subscribe(C=>{this.onSearch(),this.handlingUpdateStock(C.Response)})}handlingUpdateStock(e){if(e.success_list.length>0||e.failure_list.length>0){let n=e.failure_list,a=e.success_list;this.inventoryService.showToastrUpdateInventory("Price",a,n)}else this.toastr.error(e[0]?.Exception,"Error")}refreshPrice(e){let n={ChannelItemID:e?.Channel[0].ChannelItemID,ChannelVariationID:e?.Channel[0]?.ChannelVariationID,ChannelID:e?.Channel[0]?.ChannelID,VariantID:e.ID};this.http.post("/api/Price/RefreshPriceChannel",n).subscribe(a=>{this.toastr.success("Successfully updated","Success"),this.onSearch()})}onSearch(){this.paginationService.reloadPagination(this.searchFilter),this.initSelectedChannel()}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:e=>{this.searchFilter.PageNumber=1,this.paginationService.getAllData(this.searchFilter,e.Total)}})}openTableDialog(e,n,a){let g=JSON.parse(JSON.stringify(e));this.dialog.open(xe,{data:{Name:n.Name,Variant:g,ChannelID:g?.Channel[0]?.ChannelID,Table:"price",ChannelItemID:g?.Channel[0]?.ChannelItemID}}).afterClosed().pipe(M(f=>E.IsNotEmpty(f))).subscribe(f=>{this.updateItemAfterDialog(f,e)})}updateItemAfterDialog(e,n){let a={ID:e.ChannelID,ChannelItemID:e.ChannelItemID,ChannelVariantID:e.ChannelVariationID,Price:parseFloat(e.Price),VariantID:e.ID,SKU:e.Sku};this.http.post("/api/Price/UpdatePriceByID",a).subscribe(g=>{let C=this.productService.findChannelById(a.ID,this.channelOptions);this.toastr.success(`Successfully updated ${e.ItemName} (${e.VarName}) inventory in ${C.Name} to ${a.Price}`,"Success"),n.Channel[0]&&(n.Channel[0].Price=a.Price)})}initSelectedChannel(){this.selectedChannel=this.channelOptions.find(e=>e.ID==this.searchFilter.ChannelID)}onSelectAllSKU(e,n){n=n.map(a=>(a.Variants=a.Variants.map(g=>(g.selected=e,g)),a))}onZoomImage(e,n){this.biggerPictureService.openBiggerPicture(e,n)}ngOnDestroy(){this.paginationService.destroy()}};o.\u0275fac=function(n){return new(n||o)(b(G),b(Z),b(z),b(J),b(Y),b(Ce),b(Pe),b(K))},o.\u0275cmp=F({type:o,selectors:[["app-price-single-channel"]],decls:2,vars:3,consts:[[3,"headerTitle","text","textChange","onSubmit",4,"ngIf"],[3,"headerTitle","text","textChange","onSubmit"],[1,"fw-bold"],["bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel","appendTo","body",1,"center-text","mt-3",3,"clearable","items","ngModel","ngModelChange"],["ng-option-tmp",""],[1,"mt-5"],["type","number",1,"form-control","mt-2",3,"ngModel","ngModelChange"],[4,"ngIf"],[1,"me-2"],[2,"width","18px",3,"src"],[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,"text-start"],[1,"text-end",2,"width","20%"],[3,"ngxPermissionsOnly"],[1,"text-end"],["matTooltipPosition","above",1,"d-inline-block",3,"matTooltip"],[2,"width","16px",3,"src"],[1,"ms-1"],[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"],["matTooltipPosition","above",1,"text-end",3,"matTooltip"],[3,"ngClass"],[1,"d-flex","align-items-center","justify-content-end"],["class","text-danger","matTooltip","This product is no longer available in POS","matTooltipPosition","above",4,"ngIf"],[1,"text-end",3,"ngClass"],["style","cursor: pointer;",3,"click",4,"ngIf"],[1,"ms-2","pb-1"],["target","_blank",3,"href"],[1,"fas","external-link-custom","fa-lg","fa-external-link-alt"],[1,"ps-0","d-flex","justify-content-center","align-items-center","pb-1"],["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"],["matTooltip","This product is no longer available in POS","matTooltipPosition","above",1,"text-danger"],[1,"ms-2"],[1,"fas","external-link-custom","fa-external-link-alt"],[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 border-start-0","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","border-start-0",3,"click"],[1,"fas","fa-share"]],template:function(n,a){n&1&&(d(0,Pn,19,13,"mainpanel",0),v(1,"async")),n&2&&s("ngIf",P(1,1,a.loader$))},dependencies:[L,A,R,se,pe,ce,N,k,H,$e,Oe,He,ue,_e,U,B,Se],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}"]});let i=o;return i})();var rt=(()=>{let o=class o{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"}]}};o.\u0275fac=function(n){return new(n||o)},o.\u0275cmp=F({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,a){n&1&&(r(0,"nav",0)(1,"div",1)(2,"div"),S(3,"nav-tab",2),c()()(),S(4,"router-outlet")),n&2&&(l(3),s("Tabs",a.priceTabs))},dependencies:[Ue,Me]});let i=o;return i})();var bn=[{path:"",component:rt,children:[{path:"",redirectTo:"SingleChannel",pathMatch:"full"},{path:"pos",component:nt,canActivate:[he],data:{title:"Global Price Comparison"}},{path:"OutletPrice",component:at,canActivate:[he],data:{title:"Outlet Price Comparison"}},{path:"SingleChannel",component:ot,canActivate:[he],data:{title:"Price Single Channel Comparison"}}]}],lt=(()=>{let o=class o{};o.\u0275fac=function(n){return new(n||o)},o.\u0275mod=ie({type:o}),o.\u0275inj=ne({imports:[j,le.forChild(bn)]});let i=o;return i})();var Li=(()=>{let o=class o{};o.\u0275fac=function(n){return new(n||o)},o.\u0275mod=ie({type:o}),o.\u0275inj=ne({providers:[Pe],imports:[j,me,Be,Re,le,Le,lt,Ne,Ye,Je,Ae,be,ve,ke.forChild()]});let i=o;return i})();export{Li as PriceModule};
|
|
1
|
+
import{a as je}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.4/Marketplace/chunk-EF3W3UUA.js";import{a as O,b as xe,c as Se,d as ve,e as Pe}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.4/Marketplace/chunk-TO2VHTUR.js";import{a as fe}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.4/Marketplace/chunk-IL2DK2XK.js";import{b as Je}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.4/Marketplace/chunk-FGEVVKEH.js";import{a as He,b as Ye}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.4/Marketplace/chunk-COKR3NPC.js";import{a as de}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.4/Marketplace/chunk-322JBPYB.js";import{a as Z}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.4/Marketplace/chunk-KQRK4CTQ.js";import{a as ge}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.4/Marketplace/chunk-CUYZKVZ3.js";import{a as Y}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.4/Marketplace/chunk-2SA7SVYH.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.4/Marketplace/chunk-LSBFWGC6.js";import{a as Ue,b as Be}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.4/Marketplace/chunk-644NU43G.js";import{e as K}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.4/Marketplace/chunk-IMUZFXPJ.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.4/Marketplace/chunk-SKMUHTVE.js";import{b as z,e as G}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.4/Marketplace/chunk-7XITKPS5.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.4/Marketplace/chunk-GQU66EJO.js";import{b as _e,c as ke}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.4/Marketplace/chunk-WP6G47JB.js";import{a as Ce}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.4/Marketplace/chunk-HX36ACUF.js";import{a as ze,b as Ge,c as Ke}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.4/Marketplace/chunk-X6UUIC3F.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.4/Marketplace/chunk-S5TAVCV2.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.4/Marketplace/chunk-FZ3LLUFV.js";import{a as Oe,c as $e,d as Le}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.4/Marketplace/chunk-IPVDR333.js";import{a as he}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.4/Marketplace/chunk-ZAKCXPP7.js";import{B as H,C as Re,q as ue,r as Ae,u as J}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.4/Marketplace/chunk-R4XC3TIR.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.4/Marketplace/chunk-H4UMXVLS.js";import{b as ce,c as se,h as N,k,m as pe,u as me,v as Ne}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.4/Marketplace/chunk-7QIOC7BK.js";import{c as V}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.4/Marketplace/chunk-MKDJJ5L7.js";import{$a as S,B as M,Cb as v,Db as P,Eb as re,Fa as l,Ga as b,Hc as Me,Ja as Ee,Lb as W,Lc as le,Oa as s,Q as te,Ua as d,X as $,Xb as L,Za as r,Zb as A,_a as c,_b as R,aa as ne,ab as w,bb as T,bc as U,db as x,ea as E,ec as B,fa as ie,fc as j,hb as u,ja as _,jb as p,ka as h,mb as ae,ob as Q,pb as m,q as X,qb as F,rb as I,sb as oe,ub as Fe,wb as y,za as D}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.4/Marketplace/chunk-DJCANNYC.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.4/Marketplace/chunk-R7J6AS67.js";function st(i,o){if(i&1){let t=x();r(0,"button",19),u("click",function(){_(t);let n=p(3);return h(n.openScanDialog())}),S(1,"i",20),m(2," Scan Channel "),c()}}function pt(i,o){if(i&1){let t=x();r(0,"button",21),u("click",function(){_(t);let n=p().ngIf,a=p(2);return h(a.onUpdateItems(n))}),S(1,"i",22),m(2," Update "),c()}}function mt(i,o){if(i&1&&(r(0,"div"),d(1,st,3,0,"button",17)(2,pt,3,0,"button",18),c()),i&2){let t=o.ngIf,e=p(2);l(1),s("ngIf",!e.productService.hasSelectionVariant(t)),l(1),s("ngIf",e.productService.hasSelectionVariant(t))}}function dt(i,o){if(i&1){let t=x();r(0,"div",23)(1,"app-table",24),u("onToggle",function(n){_(t);let a=p(2);return h(a.onShowDifferencePrice(n))})("onSubmit",function(n){_(t);let a=p(2);return h(a.updatePriceByVariant(n))}),v(2,"async"),c()()}if(i&2){let t=p().ngIf,e=p();l(1),s("showProductToggle",!0)("data",P(2,4,e.paginationService.data$))("channel",e.channelOptions)("filter",t.Filter)}}function _t(i,o){if(i&1){let t=x();r(0,"span",25),u("click",function(){_(t);let n=p(2);return h(n.getRowCount())}),r(1,"i",26),m(2,"?"),c()()}}function ht(i,o){if(i&1&&(r(0,"span"),m(1),v(2,"number"),c()),i&2){let t=o.ngIf;l(1),F(P(2,1,t))}}function ut(i,o){if(i&1){let t=x();r(0,"a",27),u("click",function(){_(t);let n=p(2);return h(n.onNextPage())}),S(1,"i",28),m(2," Next"),c()}}function gt(i,o){if(i&1){let t=x();r(0,"a",29),u("click",function(){_(t);let n=p(2);return h(n.onLastPage())}),S(1,"i",30),m(2," Last"),c()}}function Ct(i,o){if(i&1){let t=x();r(0,"mainpanel",1),u("onSubmit",function(n){_(t);let a=p();return h(a.onSearch(n))}),r(1,"actions")(2,"div",2),d(3,mt,3,2,"div",3),v(4,"async"),c()(),r(5,"filters")(6,"div")(7,"label",4),m(8,"Page Number"),c(),r(9,"input",5),u("ngModelChange",function(n){_(t);let a=p();return h(a.searchFilter.PageNumber=n)}),c()(),r(10,"div",6)(11,"label",4),m(12,"Page Size"),c(),r(13,"input",5),u("ngModelChange",function(n){_(t);let a=p();return h(a.searchFilter.RowCount=n)}),c()()(),r(14,"content")(15,"div",7)(16,"div",8),d(17,dt,3,6,"div",9),v(18,"async"),c(),r(19,"div",10)(20,"div",11)(21,"div",12),m(22),v(23,"number"),v(24,"async"),d(25,_t,3,0,"span",13)(26,ht,3,3,"span",3),v(27,"async"),m(28),c()(),r(29,"div",14),d(30,ut,3,0,"a",15)(31,gt,3,0,"a",16),c()()()()()}if(i&2){let t=p(),e;s("pageData",t.pageData)("textButton","Search"),l(3),s("ngIf",P(4,12,t.paginationService.data$)),l(6),s("ngModel",t.searchFilter.PageNumber),l(4),s("ngModel",t.searchFilter.RowCount),l(4),s("ngIf",P(18,14,t.paginationService.data$)),l(5),I(" Showing 1 - ",P(23,16,(e=P(24,18,t.paginationService.data$))==null?null:e.length)," of "),l(3),s("ngIf",t.paginationService.hideCount),l(1),s("ngIf",!t.paginationService.hideCount&&P(27,20,t.allDataCount$)),l(2),I(" records ~ ",t.paginationService.footerPageNumber," Page "),l(2),s("ngIf",t.paginationService.disableNextButton&&!t.paginationService.goToLastPage),l(1),s("ngIf",t.paginationService.disableNextButton&&!t.paginationService.goToLastPage)}}var nt=(()=>{let o=class o{constructor(e,n,a,g,C,f){this.http=e,this.toastr=n,this.dialog=a,this.paginationService=g,this.productService=C,this.authService=f,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}]},this.channelOptions=this.authService.getChannels()}ngOnInit(){this.initPageLoader()}initPageLoader(){this.paginationService.fetchDataEndpoint=this.getDataAPI,this.loader$=this.http.post(`/api/${this.loaderAPI}`).pipe($(e=>{e.Filter={PageNumber:e.Filter.PageNumber,RowCount:e.Filter.RowCount,filterModel:1},this.searchFilter=e.Filter,this.paginationService.reloadPagination(this.searchFilter)}))}onShowDifferencePrice(e){this.searchFilter.filterModel=1,e&&(this.searchFilter.filterModel=3),this.paginationService.reloadPagination(this.searchFilter)}onSearch(e){this.searchFilter.text=e,this.paginationService.reloadPagination(this.searchFilter)}openScanDialog(){this.searchFilter.ChannelID=V.GuidEMpty;let e=JSON.parse(JSON.stringify(this.searchFilter));this.dialog.open(ge,{data:{filter:e,channelOptions:this.channelOptions},width:"600px"}).afterClosed().pipe(M(a=>V.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(e=>{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 n=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);this.initPageLoader(),this.productService.successToastrScanAllProduct(e,n,!this.searchFilter.UpdatedProduct)}})}updatePrice(e){let n=this.productService.selectedVariantProduct(e);if(n.length>0){let g=n.map(f=>({ID:f.ID,Code:f.Code,Price:f.UnitPrice}));var a=this.channelOptions.filter(f=>f.selected).map(f=>f.ID);let C={ListChannelID:a,ListPrice:g};this.http.post("/api/Price/UpdateChannel",C).subscribe(f=>{this.paginationService.reloadPagination(this.searchFilter),this.toastr.success("Successfully updated "+C.ListPrice.length+" items in "+C.ListChannelID.length+" channels","Success")})}}updatePriceByVariant(e){let n={ID:e.ChannelID,ChannelItemID:e.ChannelItemID,ChannelVariantID:e.ChannelVariationID,Price:e.Price-0,VariantID:e.ID};this.http.post("/api/Price/UpdatePriceByID",n).subscribe(a=>{let g=this.productService.findChannelById(n.ID,this.channelOptions);this.toastr.success("Successfully updated "+e.ItemName+"("+e.VarName+") price in "+g.Name+" to "+n.Price,"Success"),this.paginationService.reloadPagination(this.searchFilter)})}onUpdateItems(e){let n=this.productService.selectedVariantProduct(e);this.dialog.open(fe,{data:{selectedItems:n,channels:this.channelOptions},width:"600px"}).afterClosed().pipe(M(a=>a!==void 0)).subscribe(a=>{this.channelOptions=a,this.updatePrice(e)})}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:e=>{this.searchFilter.PageNumber=1,this.paginationService.getAllData(this.searchFilter,e)}})}ngOnDestroy(){this.paginationService.destroy()}};o.\u0275fac=function(n){return new(n||o)(b(G),b(z),b(J),b(Z),b(Y),b(K))},o.\u0275cmp=E({type:o,selectors:[["app-price-pos-channel"]],decls:2,vars:3,consts:[["headerTitle","Price Comparison",3,"pageData","textButton","onSubmit",4,"ngIf"],["headerTitle","Price Comparison",3,"pageData","textButton","onSubmit"],[1,"d-flex"],[4,"ngIf"],[1,"fw-bold"],["type","number",1,"form-control","mt-2",3,"ngModel","ngModelChange"],[1,"mt-5"],[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 border-start-0","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","border-start-0",3,"click"],[1,"fas","fa-share"]],template:function(n,a){n&1&&(d(0,Ct,32,22,"mainpanel",0),v(1,"async")),n&2&&s("ngIf",P(1,1,a.loader$))},dependencies:[R,se,pe,N,k,H,ve,U,B],styles:[".no-bullet[_ngcontent-%COMP%]{list-style-type:none}"]});let i=o;return i})();function ft(i,o){if(i&1&&(r(0,"mat-radio-button",3),m(1),c()),i&2){let t=o.$implicit,e=o.index,n=p();s("value",t.Key)("name",n.name)("title",n.tooltipsText[e]?n.tooltipsText[e]:""),l(1),I(" ",t.Value,"")}}var xt=i=>({"border-0 rounded":i}),be=(()=>{let o=class o{constructor(){this.modelChange=new Ee,this.border=!1,this.tooltipsText=[]}change(e){this.modelChange.emit(e)}};o.\u0275fac=function(n){return new(n||o)},o.\u0275cmp=E({type:o,selectors:[["radio-options"]],inputs:{model:"model",options:"options",border:"border",name:"name",tooltipsText:"tooltipsText"},outputs:{modelChange:"modelChange"},standalone:!0,features:[Fe],decls:3,vars:5,consts:[[1,"form-control","h-100","rounded-1",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,a){n&1&&(r(0,"div",0)(1,"mat-radio-group",1),u("ngModelChange",function(C){return a.change(C)}),d(2,ft,2,4,"mat-radio-button",2),c()()),n&2&&(s("ngClass",y(3,xt,a.border==!1)),l(1),s("ngModel",a.model),l(1),s("ngForOf",a.options))},dependencies:[j,L,A,Ke,ze,Ge,me,N,k],styles:[".mat-radio-label{margin-top:auto;margin-bottom:auto}"]});let i=o;return i})();function yt(i,o){if(i&1){let t=x();w(0),r(1,"div")(2,"label",23),m(3,"Filter by"),c(),r(4,"radio-options",24),u("modelChange",function(n){_(t);let a=p();return h(a.filterType=n)}),c()(),T()}if(i&2){let t=p();l(4),s("model",t.filterType)("options",t.filterTypeOptions)("border",!0)}}function wt(i,o){if(i&1){let t=x();r(0,"button",27),u("click",function(){_(t);let n=p().ngIf,a=p();return h(a.onUpdateItems(n))}),S(1,"i",28),m(2," Update "),c()}}function Tt(i,o){if(i&1&&(w(0),r(1,"div",25),d(2,wt,3,0,"button",26),c(),T()),i&2){let t=o.ngIf,e=p();l(2),s("ngIf",e.productService.hasSelectionVariant(t))}}function Dt(i,o){if(i&1&&(r(0,"th",29)(1,"div",30),S(2,"img",31),r(3,"div",32),m(4),v(5,"stringLimit"),c()()()),i&2){let t=o.$implicit;l(1),s("matTooltip",(t.Name==null?null:t.Name.length)>20?t.Name:""),l(1),s("src",t==null?null:t.logo,D),l(2),oe("",re(5,4,t.Name,20),"",(t.Name==null?null:t.Name.length)>20?"...":"","")}}function Vt(i,o){if(i&1){let t=x();r(0,"th")(1,"input",33),u("ngModelChange",function(n){_(t);let a=p();return h(a.checkboxState=n)})("ngModelChange",function(){_(t);let n=p();return h(n.onSelectAllData())}),c()()}if(i&2){let t=p();l(1),s("ngModel",t.checkboxState)}}function Et(i,o){i&1&&(w(0),r(1,"th",34)(2,"span"),m(3,"Expected"),c(),r(4,"span",35),m(5,"(POS)"),c()(),r(6,"th",34),m(7," Channel "),c(),T())}function Ft(i,o){if(i&1){let t=x();r(0,"img",48),u("click",function(n){_(t);let a=p(3).$implicit,g=p(2);return h(g.onZoomImage(n,a==null?null:a.ImageUrl))}),c()}if(i&2){let t=p(3).$implicit;ae("src",t==null?null:t.ImageUrl,D)}}function Mt(i,o){i&1&&S(0,"img",49)}var Nt=i=>({"border-bottom":i});function kt(i,o){if(i&1&&(w(0),r(1,"td",42),d(2,Ft,1,1,"img",43)(3,Mt,1,0,"ng-template",null,44,W),c(),r(5,"td",45)(6,"h5",46),m(7),c(),r(8,"small",47),m(9),c()(),T()),i&2){let t=Q(4),e=p().index,n=p().$implicit,a=p().ngIf;l(1),s("rowSpan",n==null?null:n.Variants.length)("ngClass",y(7,Nt,e+1==a.length)),l(1),s("ngIf",n==null?null:n.ImageUrl)("ngIfElse",t),l(3),s("rowSpan",n==null?null:n.Variants.length),l(2),F(n==null?null:n.Name),l(2),I("(",n==null?null:n.Category,")")}}function Ot(i,o){if(i&1){let t=x();r(0,"td",50)(1,"input",33),u("ngModelChange",function(n){_(t);let a=p().$implicit;return h(a.selected=n)}),c()()}if(i&2){let t=p().$implicit;l(1),s("ngModel",t.selected)}}var $t=i=>({"bg-gradient-warning":i});function Lt(i,o){if(i&1){let t=x();w(0),r(1,"td",53),m(2),v(3,"number"),c(),r(4,"td",54),u("click",function(){let a=_(t).$implicit,g=p(2).$implicit,C=p().$implicit,f=p(2);return h(f.openTableDialog(g,C,a))}),r(5,"div",55)(6,"div",56),m(7),v(8,"number"),c(),r(9,"a",57),u("click",function(n){return n==null?null:n.stopPropagation()}),S(10,"i",41),c()()(),T()}if(i&2){let t=o.$implicit;l(2),I(" ",P(3,4,t.PriceExpected)," "),l(2),s("ngClass",y(8,$t,t.Price!=t.PriceExpected)),l(3),I(" ",P(8,6,t.Price)," "),l(2),s("href",t.Url,D)}}function At(i,o){i&1&&(r(0,"td",58),m(1,"X"),c(),r(2,"td",58),m(3,"X"),c())}function Rt(i,o){if(i&1&&(w(0),d(1,Lt,11,10,"ng-container",51)(2,At,4,0,"ng-template",null,52,W),T()),i&2){let t=o.$implicit,e=Q(3),n=p().$implicit,a=p(3);l(1),s("ngIf",a.getItemFromChannel(n,t.ID))("ngIfElse",e)}}var Ut=i=>({"text-decoration-line-through":i}),it=i=>[i];function Bt(i,o){if(i&1&&(r(0,"tr"),d(1,kt,10,9,"ng-container",1),r(2,"td",36),m(3),c(),r(4,"td",37)(5,"div",38)(6,"div",39),m(7),c(),r(8,"div",32)(9,"a",40),S(10,"i",41),c()()()(),d(11,Ot,2,1,"ng-template",14)(12,Rt,4,2,"ng-container",15),c()),i&2){let t=o.$implicit,e=o.index,n=p(3);l(1),s("ngIf",e==0),l(2),F(t==null?null:t.Model),l(1),s("matTooltip",t.isDiscontinued?n.discontinuedVariantMsg:""),l(2),s("ngClass",y(8,Ut,t.isDiscontinued)),l(1),I(" ",t==null?null:t.Code,""),l(2),s("href",n.hostName+"/menu/Products/Catalog/Variants/Info?ID="+(t==null?null:t.ID),D),l(2),s("ngxPermissionsOnly",y(10,it,n.rolePriceEdit)),l(1),s("ngForOf",n.channelOptions)}}function jt(i,o){if(i&1&&(r(0,"tbody"),d(1,Bt,13,12,"tr",15),c()),i&2){let t=o.$implicit;l(1),s("ngForOf",t.Variants)}}function zt(i,o){if(i&1&&(w(0),d(1,jt,2,1,"tbody",15),T()),i&2){let t=o.ngIf;l(1),s("ngForOf",t)}}function Gt(i,o){if(i&1){let t=x();r(0,"span",59),u("click",function(){_(t);let n=p();return h(n.getRowCount())}),r(1,"i",60),m(2,"?"),c()()}}function Kt(i,o){if(i&1&&(r(0,"span"),m(1),v(2,"number"),c()),i&2){let t=o.ngIf;l(1),F(P(2,1,t))}}function Jt(i,o){if(i&1){let t=x();r(0,"a",61),u("click",function(){_(t);let n=p();return h(n.onNextPage())}),S(1,"i",62),m(2," Next"),c()}}function Ht(i,o){if(i&1){let t=x();r(0,"a",63),u("click",function(){_(t);let n=p();return h(n.onLastPage())}),S(1,"i",64),m(2," Last"),c()}}var at=(()=>{let o=class o{constructor(e,n,a,g,C,f,Ie){this.http=e,this.toastr=n,this.dialog=a,this.productService=g,this.authService=C,this.biggerPictureService=f,this.paginationService=Ie,this.searchFilter=new je,this.checkboxState=!1,this.rolePriceEdit=de.price,this.discontinuedVariantMsg="This Variant is discontinued from POS, you must Non Active manually at the seller center so that it is not sold again on the channel.",this.rowCountAPI="Inventory/GetMultipleChannelComparisonRowCount",this.filterTypeOptions=[{Key:O.ALL,Value:"All"},{Key:O.DIFFERENCE,Value:"Difference"}],this.filterType=O.ALL,this.pageData={Title:"Price Realtime",Nav:[{Title:"Price Cache",Url:"/menu/price",Active:!1}]},this.channelOptions=this.authService.getChannels(),this.hostName=this.authService.getDomain(),this.initPagination()}initPagination(){this.paginationService.fetchDataEndpoint="Price/GetOutletPrice",this.initProduct(),this.initPageLoader()}initProduct(){this.data$=this.paginationService.data$.pipe(X(e=>(e=e.map(n=>(n.Variants&&(n.Variants=n.Variants.map(a=>(a.isDiscontinued=a.Discontinued=="Yes",a))),n)),e)),te(1))}initPageLoader(){this.loader$=this.http.post("/api/PriceLoader/LoadMultiple",{}).pipe($(e=>{this.searchFilter=e.Filter,this.paginationService.reloadPagination(this.searchFilter)}))}onNextPage(){this.paginationService.onNextPage(this.searchFilter)}onLastPage(){this.paginationService.hideCount=!1,this.totalData$=this.http.post(`/api/${this.rowCountAPI}`,{}).pipe($(e=>{this.searchFilter.PageNumber=1,this.paginationService.getAllData(this.searchFilter,e)}))}getRowCount(){this.paginationService.hideCount=!1,this.totalData$=this.http.post(`/api/${this.rowCountAPI}`,{})}onSelectAllData(){this.data$=this.data$.pipe(X(e=>(e.map(n=>(n.Variants&&(n.Variants=n.Variants.map(a=>(a.selected=this.checkboxState,a))),n)),e)))}onFilter(e){let n={text:e,filterModel:this.filterType,PageNumber:this.searchFilter.PageNumber,RowCount:this.searchFilter.RowCount};this.paginationService.reloadPagination(n)}updatePrice(e){let n=this.productService.selectedVariantProduct(e);if(n.length>0){let a=n.map(f=>f.ID),C={ListChannelID:this.channelOptions.filter(f=>f.selected).map(f=>f.ID),ListID:a};this.http.post("/api/Price/UpdateChannelOutletPrice",C).subscribe({next:f=>{this.resetSelectedChannel(),this.onFilter(),this.toastr.success("Successfully updated "+C.ListID.length+" items in "+C.ListChannelID.length+" channels","Success")},error:f=>{this.resetSelectedChannel()}})}}resetSelectedChannel(){this.channelOptions=this.channelOptions.map(e=>(e.selected=!1,e))}getItemFromChannel(e,n){return e.Channel.find(a=>a.ChannelID==n)}onUpdateItems(e){let n=this.productService.selectedVariantProduct(e);this.dialog.open(fe,{data:{selectedItems:n,channels:this.channelOptions},width:"600px"}).afterClosed().pipe(M(a=>V.IsNotEmpty(a))).subscribe(a=>{this.channelOptions=a,this.updatePrice(e)})}openTableDialog(e,n,a){let g=JSON.parse(JSON.stringify(e));this.dialog.open(xe,{data:{Name:n.Name,Variant:g,ChannelID:a?.ChannelID,Table:"price",ChannelItemID:a?.ChannelItemID}}).afterClosed().pipe(M(f=>V.IsNotEmpty(f))).subscribe(f=>{this.updateProductPrice(f,a)})}updateProductPrice(e,n){let a={ID:e.ChannelID,ChannelItemID:e.ChannelItemID,ChannelVariantID:e.ChannelVariationID,Price:parseFloat(e.Price),VariantID:e.ID,SKU:e.Sku};this.http.post("/api/Price/UpdatePriceByID",a).subscribe(g=>{n.Price=a.Price;let C=this.productService.findChannelById(a.ID,this.channelOptions);this.toastr.success(`Successfully updated ${e.ItemName} (${e.VarName}) inventory in ${C.Name} to ${a.Price}`,"Success")})}onZoomImage(e,n){this.biggerPictureService.openBiggerPicture(e,n)}ngOnDestroy(){this.paginationService.destroy()}};o.\u0275fac=function(n){return new(n||o)(b(G),b(z),b(J),b(Y),b(K),b(Ce),b(Z))},o.\u0275cmp=E({type:o,selectors:[["app-custom-channel-price"]],decls:42,vars:30,consts:[["headerTitle","Price Comparison",3,"pageData","hideSearchBox","hideSearchDropdown","textButton","onSubmit"],[4,"ngIf"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"table"],[1,"thead-light","sticky-top-thead"],[1,"channel-column"],["colspan","5"],["scope","col","colspan","2","class","w-100","class","text-center border-bottom-0 border text-uppercase",4,"ngFor","ngForOf"],["scope","col","colspan","2",1,"text-center","w-25"],["scope","col",1,"text-start","w-20"],["scope","col",1,"text-end","w-10"],[3,"ngxPermissionsOnly"],[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"],[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 border-start-0","title","Load all products",3,"click",4,"ngIf"],[1,"fw-bold","mb-2"],["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"],["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","text-uppercase"],["matTooltipPosition","above",1,"d-flex","align-items-center","justify-content-center",2,"width","180px",3,"matTooltip"],[2,"width","16px","height","16px",3,"src"],[1,"ms-2"],["type","checkbox",3,"ngModel","ngModelChange"],[1,"text-end","border-top-0","border","w-10"],[1,"ms-1"],[1,"text-start","border-bottom"],["matTooltipPosition","above",1,"text-end","border-bottom",3,"matTooltip"],[1,"d-flex","align-items-center","justify-content-end"],[3,"ngClass"],["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-start","border-bottom",2,"padding-left","0px",3,"rowSpan"],[1,"mb-0","item-name"],[1,"mt-1"],[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,"d-flex","align-items-center","justify-content-center"],[1,"me-2"],["target","_blank",3,"href","click"],[1,"table-white","border","text-end",2,"color","red"],[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","border-start-0",3,"click"],[1,"fas","fa-share"]],template:function(n,a){if(n&1&&(r(0,"mainpanel",0),u("onSubmit",function(C){return a.onFilter(C)}),r(1,"filters"),d(2,yt,5,3,"ng-container",1),v(3,"async"),c(),r(4,"actions"),d(5,Tt,3,1,"ng-container",1),v(6,"async"),c(),r(7,"content")(8,"div",2)(9,"div",3)(10,"div",4)(11,"div",5)(12,"table",6)(13,"thead",7)(14,"tr",8),S(15,"th",9),d(16,Dt,6,7,"th",10),c(),r(17,"tr")(18,"th",11)(19,"span"),m(20," Product "),c()(),r(21,"th",12),m(22,"Variant"),c(),r(23,"th",13),m(24,"SKU"),c(),d(25,Vt,2,1,"ng-template",14)(26,Et,8,0,"ng-container",15),c()(),d(27,zt,2,1,"ng-container",1),v(28,"async"),c()()()(),r(29,"div",16)(30,"div",17)(31,"div",18),m(32),v(33,"number"),v(34,"async"),d(35,Gt,3,0,"span",19)(36,Kt,3,3,"span",1),v(37,"async"),m(38),c()(),r(39,"div",20),d(40,Jt,3,0,"a",21)(41,Ht,3,0,"a",22),c()()()()()),n&2){let g;s("pageData",a.pageData)("hideSearchBox",!1)("hideSearchDropdown",!1)("textButton","Search"),l(2),s("ngIf",P(3,16,a.loader$)),l(3),s("ngIf",P(6,18,a.data$)),l(11),s("ngForOf",a.channelOptions),l(9),s("ngxPermissionsOnly",y(28,it,a.rolePriceEdit)),l(1),s("ngForOf",a.channelOptions),l(1),s("ngIf",P(28,20,a.data$)),l(5),I(" Showing 1 - ",P(33,22,(g=P(34,24,a.paginationService.data$))==null?null:g.length)," of "),l(3),s("ngIf",a.paginationService.hideCount),l(1),s("ngIf",!a.paginationService.hideCount&&P(37,26,a.totalData$)),l(2),I(" records ~ ",a.paginationService.footerPageNumber," Page "),l(2),s("ngIf",a.paginationService.disableNextButton&&!a.paginationService.goToLastPage),l(1),s("ngIf",a.paginationService.disableNextButton&&!a.paginationService.goToLastPage)}},dependencies:[L,A,R,ce,N,k,H,ue,be,_e,U,B,Se],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}"]});let i=o;return i})();function Yt(i,o){if(i&1&&(r(0,"span",8),S(1,"img",9),c(),m(2)),i&2){let t=o.item;l(1),s("src",t==null?null:t.logo,D),l(1),I(" ",t.Name," ")}}function Zt(i,o){if(i&1){let t=x();r(0,"button",13),u("click",function(){_(t);let n=p(3);return h(n.openScanDialog())}),S(1,"i",14),m(2," Scan Channel "),c()}}function qt(i,o){if(i&1){let t=x();r(0,"button",15),u("click",function(){_(t);let n=p().ngIf,a=p(2);return h(a.updateStock(n))}),S(1,"i",16),m(2," Update "),c()}}function Xt(i,o){if(i&1&&(r(0,"actions")(1,"div",10)(2,"div"),d(3,Zt,3,0,"button",11)(4,qt,3,0,"button",12),c()()()),i&2){let t=o.ngIf,e=p(2);l(3),s("ngIf",!e.productService.hasSelectionVariant(t)),l(1),s("ngIf",e.productService.hasSelectionVariant(t))}}function Qt(i,o){if(i&1){let t=x();r(0,"th")(1,"input",37),u("change",function(n){_(t);let a=p().ngIf,g=p(2);return h(g.onSelectAllSKU(n.target.checked,a))}),c()()}}function Wt(i,o){if(i&1){let t=x();r(0,"input",57),u("ngModelChange",function(n){_(t);let a=p(4).$implicit;return h(a.selected=n)})("ngModelChange",function(){_(t);let n=p(4).$implicit,a=p(3);return h(a.onCheckboxStateProduct(n))}),c()}if(i&2){let t=p(4).$implicit;s("ngModel",t.selected)}}function en(i,o){if(i&1&&d(0,Wt,1,1,"input",56),i&2){let t=p(2).$implicit,e=p().$implicit;s("ngIf",t.Inventory>=0||e.Variants.length>1)}}function tn(i,o){if(i&1){let t=x();r(0,"img",58),u("click",function(n){_(t);let a=p(3).$implicit,g=p(3);return h(g.onZoomImage(n,a==null?null:a.ImageUrl))}),c()}if(i&2){let t=p(3).$implicit;ae("src",t.ThumbnailUrl,D)}}function nn(i,o){i&1&&S(0,"img",59)}function an(i,o){if(i&1&&(w(0),S(1,"br"),r(2,"small"),m(3),c(),T()),i&2){let t=p(3).$implicit;l(3),I("(",t.Category,")")}}var De=i=>[i];function on(i,o){if(i&1&&(w(0),r(1,"td",50)(2,"div",51),d(3,en,1,1,"ng-template",25)(4,tn,1,1,"img",52)(5,nn,1,0,"ng-template",null,53,W),c()(),r(7,"td",54)(8,"span",55),m(9),c(),d(10,an,4,1,"ng-container",7),c(),T()),i&2){let t=Q(6),e=p(2).$implicit,n=p(3);l(1),s("rowSpan",e.Variants.length),l(2),s("ngxPermissionsOnly",y(7,De,n.rolePriceEdit)),l(1),s("ngIf",e.ThumbnailUrl)("ngIfElse",t),l(3),s("rowSpan",e.Variants.length),l(2),F(e.Name),l(1),s("ngIf",(e==null?null:e.CategoryID)!==null&&(e==null?null:e.CategoryID)!=n.guidEmpty)}}function rn(i,o){if(i&1){let t=x();r(0,"input",62),u("ngModelChange",function(n){_(t);let a=p(2).$implicit;return h(a.selected=n)}),c()}if(i&2){let t=p(2).$implicit;s("ngModel",t.selected)}}function ln(i,o){if(i&1&&(r(0,"td",60),d(1,rn,1,1,"input",61),c()),i&2){let t=p().$implicit;l(1),s("ngIf",t.Inventory>=0)}}function cn(i,o){i&1&&(r(0,"div",63),m(1,"Not Found"),c())}function sn(i,o){if(i&1&&(r(0,"div"),m(1),v(2,"number"),c()),i&2){let t=p().$implicit;l(1),I(" ",P(2,1,t.UnitPrice),"")}}function pn(i,o){if(i&1&&(w(0),r(1,"div",64)(2,"a",45),S(3,"i",65),c()(),T()),i&2){let t=p().$implicit,e=p(4);l(2),s("href",e.hostName+"/menu/Products/Catalog/Variants/Info?ID="+(t==null?null:t.ID),D)}}function mn(i,o){if(i&1){let t=x();r(0,"div",66),u("click",function(){_(t);let n=p().$implicit,a=p().$implicit,g=p(2).ngIf,C=p();return h(C.openTableDialog(n,a,g))}),m(1),v(2,"number"),c()}if(i&2){let t=p().$implicit;l(1),I(" ",P(2,1,t.Channel[0]==null?null:t.Channel[0].Price)," ")}}var dn=i=>({"text-decoration-line-through":i}),_n=i=>({"bg-gradient-warning":i});function hn(i,o){if(i&1){let t=x();r(0,"tr"),d(1,on,11,9,"ng-container",7),r(2,"td",23),m(3),c(),r(4,"td",38)(5,"span",39),m(6),c()(),d(7,ln,2,1,"ng-template",25),r(8,"td",26)(9,"div",40),d(10,cn,2,0,"div",41)(11,sn,3,3,"div",7)(12,pn,4,1,"ng-container",7),c()(),r(13,"td",42)(14,"div",40),d(15,mn,3,3,"div",43),r(16,"div",44)(17,"a",45),S(18,"i",46),c()()()(),r(19,"td")(20,"div",47)(21,"div",48),u("click",function(){let a=_(t).$implicit,g=p(4);return h(g.refreshPrice(a))}),S(22,"i",49),c()()()()}if(i&2){let t=o.$implicit,e=o.index,n=p(4);l(1),s("ngIf",e==0),l(2),F(t.Model),l(1),s("matTooltip",t.isDiscontinued?n.discontinuedVariantMsg:""),l(1),s("ngClass",y(12,dn,t.isDiscontinued)),l(1),I(" ",t.Code," "),l(1),s("ngxPermissionsOnly",y(14,De,n.rolePriceEdit)),l(3),s("ngIf",(t.Channel[0]==null?null:t.Channel[0].Description)!=null),l(1),s("ngIf",(t.Channel[0]==null?null:t.Channel[0].Description)==null),l(1),s("ngIf",(t.Channel[0]==null?null:t.Channel[0].Description)==null),l(1),s("ngClass",y(16,_n,t.UnitPrice!=(t.Channel[0]==null?null:t.Channel[0].Price))),l(2),s("ngIf",t.Channel.length>0),l(2),s("href",t.Channel[0]==null?null:t.Channel[0].Url,D)}}function un(i,o){if(i&1&&(w(0),d(1,hn,23,18,"tr",31),T()),i&2){let t=o.$implicit;l(1),s("ngForOf",t.Variants)}}function gn(i,o){if(i&1){let t=x();r(0,"span",66),u("click",function(){_(t);let n=p(3);return h(n.getRowCount())}),r(1,"i",67),m(2,"?"),c()()}}function Cn(i,o){if(i&1&&(r(0,"span"),m(1),v(2,"number"),c()),i&2){let t=o.ngIf;l(1),F(P(2,1,t.Total))}}function fn(i,o){if(i&1){let t=x();r(0,"a",71),u("click",function(){_(t);let n=p(4);return h(n.onNextPage())}),S(1,"i",72),m(2," Next"),c()}}function xn(i,o){if(i&1){let t=x();r(0,"a",73),u("click",function(){_(t);let n=p(4);return h(n.onLastPage())}),S(1,"i",74),m(2," Last"),c()}}function Sn(i,o){if(i&1&&(r(0,"div",68),d(1,fn,3,0,"a",69)(2,xn,3,0,"a",70),c()),i&2){let t=p(3);l(1),s("ngIf",t.paginationService.disableNextButton&&!t.paginationService.goToLastPage),l(1),s("ngIf",t.paginationService.disableNextButton&&!t.paginationService.goToLastPage)}}function vn(i,o){if(i&1){let t=x();r(0,"content")(1,"div",17)(2,"div",18)(3,"table",19)(4,"thead",20)(5,"tr")(6,"th",21),m(7," Product "),r(8,"div")(9,"mat-slide-toggle",22),u("ngModelChange",function(n){_(t);let a=p(2);return h(a.toggleDifferentInventory=n)})("toggleChange",function(){_(t);let n=p(2);return h(n.onToggleDifferentInventory())}),r(10,"small",2),m(11,"FILTER DIFFERENT PRICE"),c()()()(),r(12,"th",23),m(13,"Variant"),c(),r(14,"th",24),m(15,"SKU"),c(),d(16,Qt,2,0,"ng-template",25),r(17,"th",26),m(18,"POS"),c(),r(19,"th",26)(20,"div",27),S(21,"img",28),r(22,"span",29),m(23),v(24,"stringLimit"),c()()(),S(25,"th",30),c()(),r(26,"tbody"),d(27,un,2,1,"ng-container",31),c()(),r(28,"div",32)(29,"div",33)(30,"div",34),m(31),v(32,"number"),d(33,gn,3,0,"span",35)(34,Cn,3,3,"span",7),v(35,"async"),m(36),c()(),d(37,Sn,3,2,"div",36),c()()()()}if(i&2){let t=o.ngIf,e=p(2);l(9),s("ngModel",e.toggleDifferentInventory),l(7),s("ngxPermissionsOnly",y(19,De,e.rolePriceEdit)),l(4),s("matTooltip",(e.selectedChannel==null||e.selectedChannel.Name==null?null:e.selectedChannel.Name.length)>=20?e.selectedChannel==null?null:e.selectedChannel.Name:""),l(1),s("src",e.selectedChannel==null?null:e.selectedChannel.logo,D),l(2),oe(" ",re(24,12,e.selectedChannel==null?null:e.selectedChannel.Name,20),"",(e.selectedChannel==null||e.selectedChannel.Name==null?null:e.selectedChannel.Name.length)>=20?"...":""," "),l(4),s("ngForOf",t),l(4),I(" Showing 1 - ",P(32,15,t==null?null:t.length)," of "),l(2),s("ngIf",e.paginationService.hideCount),l(1),s("ngIf",P(35,17,!e.paginationService.hideCount&&e.allDataCount$)),l(2),I(" records ~ ",e.paginationService.footerPageNumber," Page "),l(1),s("ngIf",t.length>0)}}function Pn(i,o){if(i&1){let t=x();r(0,"mainpanel",1),u("textChange",function(n){_(t);let a=p();return h(a.searchFilter.text=n)})("onSubmit",function(){_(t);let n=p();return h(n.onSearch())}),r(1,"filters")(2,"div")(3,"label",2),m(4,"Channel"),c(),r(5,"ng-select",3),u("ngModelChange",function(n){_(t);let a=p();return h(a.searchFilter.ChannelID=n)}),d(6,Yt,3,2,"ng-template",4),c()(),r(7,"div",5)(8,"label",2),m(9,"Page Number"),c(),r(10,"input",6),u("ngModelChange",function(n){_(t);let a=p();return h(a.searchFilter.PageNumber=n)}),c()(),r(11,"div",5)(12,"label",2),m(13,"Page Size"),c(),r(14,"input",6),u("ngModelChange",function(n){_(t);let a=p();return h(a.searchFilter.RowCount=n)}),c()()(),d(15,Xt,5,2,"actions",7),v(16,"async"),d(17,vn,38,21,"content",7),v(18,"async"),c()}if(i&2){let t=p();s("headerTitle",t.pageTitle)("text",t.searchFilter.text),l(5),s("clearable",!1)("items",t.channelOptions)("ngModel",t.searchFilter.ChannelID),l(5),s("ngModel",t.searchFilter.PageNumber),l(4),s("ngModel",t.searchFilter.RowCount),l(1),s("ngIf",P(16,9,t.data$)),l(2),s("ngIf",P(18,11,t.data$))}}var ot=(()=>{let o=class o{constructor(e,n,a,g,C,f,Ie,Ve){this.http=e,this.paginationService=n,this.toastr=a,this.dialog=g,this.productService=C,this.biggerPictureService=f,this.inventoryService=Ie,this.authService=Ve,this.pageTitle="Price Single Channel Comparison",this.toggleDifferentInventory=!1,this.loaderEndpoint="PriceLoader/Load",this.dataEndpoint="Price/GetSingleChannelComparison",this.allDataCountEndpoint="Inventory/GetInventoryByChannelRowCount",this.rolePriceEdit=de.price,this.discontinuedVariantMsg="This Variant is discontinued from POS, you must Non Active manually at the seller center so that it is not sold again on the channel.",this.guidEmpty=V.GuidEMpty,this.hostName=this.authService.getDomain(),this.data$=this.paginationService.data$.pipe(te(1),X(ct=>ct.map(ee=>(ee.Variants&&(ee.Variants=ee.Variants.map(ye=>(ye.isDiscontinued=ye.Discontinued=="Yes",ye))),ee)))),this.channelOptions=Ve.getChannels()}ngOnInit(){this.initPageLoader()}initPageLoader(){this.paginationService.fetchDataEndpoint=this.dataEndpoint,this.loader$=this.http.post(`/API/${this.loaderEndpoint}`).pipe($(e=>{this.searchFilter=e.Filter,this.searchFilter.filterModel=O.ALL,this.paginationService.reloadPagination(this.searchFilter),this.initSelectedChannel()}))}onToggleDifferentInventory(){this.toggleDifferentInventory?this.searchFilter.filterModel=O.ALL:this.searchFilter.filterModel=O.DIFFERENCE,this.onSearch()}onCheckboxStateProduct(e){e.Variants=e.Variants.map(n=>(n.selected=e.selected,n))}openScanDialog(){let e=JSON.parse(JSON.stringify(this.searchFilter));e.ChannelID=V.GuidEMpty,this.dialog.open(ge,{data:{filter:e,channelOptions:this.channelOptions},width:"600px"}).afterClosed().pipe(M(n=>V.IsNotEmpty(n))).subscribe(n=>{this.searchFilter.ChannelID=n.ChannelID,this.searchFilter.ScanFull=n.ScanFull,this.searchFilter.UpdatedProduct=n.UpdatedProduct,this.searchFilter.Async=n.Async,this.scanAll()})}scanAll(){let e=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);this.productService.scanAll(this.searchFilter.ChannelID,this.searchFilter.ScanFull,this.searchFilter.UpdatedProduct,this.searchFilter.Async).subscribe(n=>{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 ${e?.Name}`,"Success"))})}updateStock(e){let a=this.productService.selectedVariantProduct(e).map(C=>({ID:C.ID,ChannelID:C.Channel[0].ChannelID,Code:C.Code,Price:C.UnitPrice})),g={ListChannelID:[this.searchFilter.ChannelID],ListPrice:a};this.http.post("/api/Price/UpdateChannel",g).subscribe(C=>{this.onSearch(),this.handlingUpdateStock(C.Response)})}handlingUpdateStock(e){if(e.success_list.length>0||e.failure_list.length>0){let n=e.failure_list,a=e.success_list;this.inventoryService.showToastrUpdateInventory("Price",a,n)}else this.toastr.error(e[0]?.Exception,"Error")}refreshPrice(e){let n={ChannelItemID:e?.Channel[0].ChannelItemID,ChannelVariationID:e?.Channel[0]?.ChannelVariationID,ChannelID:e?.Channel[0]?.ChannelID,VariantID:e.ID};this.http.post("/api/Price/RefreshPriceChannel",n).subscribe(a=>{this.toastr.success("Successfully updated","Success"),this.onSearch()})}onSearch(){this.paginationService.reloadPagination(this.searchFilter),this.initSelectedChannel()}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:e=>{this.searchFilter.PageNumber=1,this.paginationService.getAllData(this.searchFilter,e.Total)}})}openTableDialog(e,n,a){let g=JSON.parse(JSON.stringify(e));this.dialog.open(xe,{data:{Name:n.Name,Variant:g,ChannelID:g?.Channel[0]?.ChannelID,Table:"price",ChannelItemID:g?.Channel[0]?.ChannelItemID}}).afterClosed().pipe(M(f=>V.IsNotEmpty(f))).subscribe(f=>{this.updateItemAfterDialog(f,e)})}updateItemAfterDialog(e,n){let a={ID:e.ChannelID,ChannelItemID:e.ChannelItemID,ChannelVariantID:e.ChannelVariationID,Price:parseFloat(e.Price),VariantID:e.ID,SKU:e.Sku};this.http.post("/api/Price/UpdatePriceByID",a).subscribe(g=>{let C=this.productService.findChannelById(a.ID,this.channelOptions);this.toastr.success(`Successfully updated ${e.ItemName} (${e.VarName}) inventory in ${C.Name} to ${a.Price}`,"Success"),n.Channel[0]&&(n.Channel[0].Price=a.Price)})}initSelectedChannel(){this.selectedChannel=this.channelOptions.find(e=>e.ID==this.searchFilter.ChannelID)}onSelectAllSKU(e,n){n=n.map(a=>(a.Variants=a.Variants.map(g=>(g.selected=e,g)),a))}onZoomImage(e,n){this.biggerPictureService.openBiggerPicture(e,n)}ngOnDestroy(){this.paginationService.destroy()}};o.\u0275fac=function(n){return new(n||o)(b(G),b(Z),b(z),b(J),b(Y),b(Ce),b(Pe),b(K))},o.\u0275cmp=E({type:o,selectors:[["app-price-single-channel"]],decls:2,vars:3,consts:[[3,"headerTitle","text","textChange","onSubmit",4,"ngIf"],[3,"headerTitle","text","textChange","onSubmit"],[1,"fw-bold"],["bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel","appendTo","body",1,"center-text","mt-3",3,"clearable","items","ngModel","ngModelChange"],["ng-option-tmp",""],[1,"mt-5"],["type","number",1,"form-control","mt-2",3,"ngModel","ngModelChange"],[4,"ngIf"],[1,"me-2"],[2,"width","18px",3,"src"],[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,"text-start"],[1,"text-end",2,"width","20%"],[3,"ngxPermissionsOnly"],[1,"text-end"],["matTooltipPosition","above",1,"d-inline-block",3,"matTooltip"],[2,"width","16px",3,"src"],[1,"ms-1"],[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"],["matTooltipPosition","above",1,"text-end",3,"matTooltip"],[3,"ngClass"],[1,"d-flex","align-items-center","justify-content-end"],["class","text-danger","matTooltip","This product is no longer available in POS","matTooltipPosition","above",4,"ngIf"],[1,"text-end",3,"ngClass"],["style","cursor: pointer;",3,"click",4,"ngIf"],[1,"ms-2","pb-1"],["target","_blank",3,"href"],[1,"fas","external-link-custom","fa-lg","fa-external-link-alt"],[1,"ps-0","d-flex","justify-content-center","align-items-center","pb-1"],["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"],["matTooltip","This product is no longer available in POS","matTooltipPosition","above",1,"text-danger"],[1,"ms-2"],[1,"fas","external-link-custom","fa-external-link-alt"],[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 border-start-0","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","border-start-0",3,"click"],[1,"fas","fa-share"]],template:function(n,a){n&1&&(d(0,Pn,19,13,"mainpanel",0),v(1,"async")),n&2&&s("ngIf",P(1,1,a.loader$))},dependencies:[L,A,R,se,pe,ce,N,k,H,$e,Oe,He,ue,_e,U,B,Se],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}"]});let i=o;return i})();var rt=(()=>{let o=class o{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"}]}};o.\u0275fac=function(n){return new(n||o)},o.\u0275cmp=E({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,a){n&1&&(r(0,"nav",0)(1,"div",1)(2,"div"),S(3,"nav-tab",2),c()()(),S(4,"router-outlet")),n&2&&(l(3),s("Tabs",a.priceTabs))},dependencies:[Ue,Me]});let i=o;return i})();var bn=[{path:"",component:rt,children:[{path:"",redirectTo:"SingleChannel",pathMatch:"full"},{path:"pos",component:nt,canActivate:[he],data:{title:"Global Price Comparison"}},{path:"OutletPrice",component:at,canActivate:[he],data:{title:"Outlet Price Comparison"}},{path:"SingleChannel",component:ot,canActivate:[he],data:{title:"Price Single Channel Comparison"}}]}],lt=(()=>{let o=class o{};o.\u0275fac=function(n){return new(n||o)},o.\u0275mod=ie({type:o}),o.\u0275inj=ne({imports:[j,le.forChild(bn)]});let i=o;return i})();var Li=(()=>{let o=class o{};o.\u0275fac=function(n){return new(n||o)},o.\u0275mod=ie({type:o}),o.\u0275inj=ne({providers:[Pe],imports:[j,me,Be,Re,le,Le,lt,Ne,Ye,Je,Ae,be,ve,ke.forChild()]});let i=o;return i})();export{Li as PriceModule};
|