marketplacepos 2.3.0 → 2.3.1

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.
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkpos_marketplace=self.webpackChunkpos_marketplace||[]).push([[472],{1472:(X,f,s)=>{s.r(f),s.d(f,{InventoryModule:()=>E});var c=s(6895),t=s(4650),u=s(8252),g=s(7398);let D=(()=>{class o{constructor(){this.inventoryTabs=[{Title:"Single Channel Comparison",Url:"/menu/inventory/bychannel"},{Title:"Multi Channel Comparison",Url:"/menu/inventory/pos"}]}ngOnInit(){}}return o.\u0275fac=function(e){return new(e||o)},o.\u0275cmp=t.Xpm({type:o,selectors:[["app-inventory"]],decls:5,vars:1,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid"],[3,"Tabs"]],template:function(e,a){1&e&&(t.TgZ(0,"nav",0)(1,"div",1)(2,"div"),t._UZ(3,"nav-tab",2),t.qZA()()(),t._UZ(4,"router-outlet")),2&e&&(t.xp6(3),t.Q6J("Tabs",a.inventoryTabs))},dependencies:[u.lC,g.e]}),o})();var _=s(5131),Z=s(2486),C=s(1318),I=s(7185),v=s(5412),d=s(7481),y=s(7100);let w=(()=>{class o{constructor(e,a,n){this.http=e,this.toastr=a,this.dialog=n,this.filter={ChannelID:""},this.loading=!1,this.LoaderChannel(),this.Options=[{Key:1,Value:"All"},{Key:3,Value:"Difference"}],this.filterModel=1,this.pageData={Title:"Inventory",Nav:[{Title:"Inventory Cache",Url:"/menu/inventory/pos",Active:!0},{Title:"Inventory Realtime",Url:"/menu/inventory/realtime",Active:!1}]}}ngOnInit(){}LoaderChannel(){this.http.post("/api/InventoryLoader/GetMultipleInventoryComparison",{}).subscribe(e=>{this.Channel=e.Options.Channel,this.filter=e.Filter,this.Filter()})}Filter(e){this.http.post("/api/Inventory/GetMultipleChannelComparison",{text:e,filterModel:this.filterModel,PageNumber:this.filter.PageNumber,RowCount:this.filter.PageSize}).subscribe(n=>{this.data=n.Data,this.tempdata=n.Data})}UpdateStock(){let e=this.getSelected();if(e.length>0){let n=[];e.forEach(r=>n.push({ID:r.ID,Code:r.Code,Inventory:r.Inventory}));var a=[];for(let r of this.Channel)r.selected&&a.push(r.ID);let i={ListChannelID:a,List:n};this.http.post("/api/Inventory/UpdateChannel",i).subscribe(r=>{this.info=r.Data,this.Filter(),this.toastr.success("Successfully updated "+i.List.length+" variants in "+i.ListChannelID.length+" channels","Success")})}}openScanDialog(){this.dialog.open(_.j,{data:{filter:this.filter,Channel:this.Channel},width:"30%"}).afterClosed().subscribe(a=>{null!=a&&(this.filter=a.filter,this.filter.sync?this.RefreshChannel():this.filter.sync||this.RefreshChannel())})}RefreshChannel(){let e={ID:this.filter.ChannelID,ScanFull:this.filter.ScanFull};this.http.post("/api/product/ScanOptimized",e).subscribe(a=>{this.info=a.Data,this.Filter(),this.toastr.success("Successfully scanned from "+this.getChannelName(e.ID),"Success")})}UpdateStockByVariant(e){let a={ID:e.ChannelID,ChannelItemID:e.ChannelItemID,ChannelVariantID:e.ChannelVariationID,NewQuantity:parseFloat(e.Inventory),VariantID:e.ID,SKU:e.Sku};this.http.post("/api/Inventory/UpdateQuantityByItem",a).subscribe(n=>{this.toastr.success("Successfully updated "+e.ItemName+"("+e.VarName+") inventory in "+this.getChannelName(a.ID)+" to "+a.NewQuantity,"Success");for(let i of this.data)if(i.ChannelItemID===e.ChannelItemID)for(let r of i.Variants)r.ChannelVariationID==e.ChannelVariantID&&(r.Stock=parseFloat(e.Inventory))})}getSelected(){let e=[];if(this.data){for(let a of this.data)for(let n of a.Variants)n.selected&&e.push(n);return e}return[]}hasSelection(){return!!this.data&&this.getSelected().length>0}getChannelName(e){return this.Channel.find(n=>n.ID==e).Name}onShowDifferenceStock(e){this.filterModel=e?3:1,this.Filter()}onUpdateItems(){const e=this.getSelected();this.dialog.open(Z.j,{data:{selectedItems:e,channels:this.Channel},width:"40%"}).afterClosed().subscribe(a=>{a&&(this.Channel=a,this.UpdateStock())})}}return o.\u0275fac=function(e){return new(e||o)(t.Y36(C.O),t.Y36(I._W),t.Y36(v.uw))},o.\u0275cmp=t.Xpm({type:o,selectors:[["app-inventory-pos"]],decls:15,vars:10,consts:[[3,"Title","pageData","hideSearchBox","hideSearchDropdown","textButton","onSubmit"],[1,"d-flex"],["type","button","data-cy","scanInPos",1,"btn","btn-outline-secondary","shadow","rounded","me-3",3,"click"],[1,"fas","fa-lg","fa-crosshairs"],["type","button",1,"btn","btn-success","shadow-sm","rounded","me-3",3,"hidden","click"],[1,"fas","fa-chevron-circle-up"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],["table","inventory",3,"data","channel","showProductToggle","filter","onToggle","onSubmit"]],template:function(e,a){1&e&&(t.TgZ(0,"mainpanel",0),t.NdJ("onSubmit",function(i){return a.Filter(i)}),t.TgZ(1,"actions")(2,"div",1)(3,"div")(4,"button",2),t.NdJ("click",function(){return a.openScanDialog()}),t._UZ(5,"i",3),t._uU(6," Scan Channel "),t.qZA(),t.TgZ(7,"button",4),t.NdJ("click",function(){return a.onUpdateItems()}),t._UZ(8,"i",5),t._uU(9," Update "),t.qZA()()()(),t.TgZ(10,"content")(11,"div",6)(12,"div",7)(13,"div",8)(14,"app-table",9),t.NdJ("onToggle",function(i){return a.onShowDifferenceStock(i)})("onSubmit",function(i){return a.UpdateStockByVariant(i)}),t.qZA()()()()()()),2&e&&(t.Q6J("Title","Inventory Comparison")("pageData",a.pageData)("hideSearchBox",!1)("hideSearchDropdown",!0)("textButton","Search"),t.xp6(7),t.Q6J("hidden",!a.hasSelection()),t.xp6(7),t.Q6J("data",a.data)("channel",a.Channel)("showProductToggle",!0)("filter",a.filter))},dependencies:[d.p,y.a],styles:[".no-bullet[_ngcontent-%COMP%]{list-style-type:none}"]}),o})();var M=s(1576),p=s(4006),m=s(8796),b=s(455);function N(o,l){1&o&&(t.TgZ(0,"div",35)(1,"span"),t._uU(2," showing only different stock, please press next to populate more data "),t.qZA()())}function R(o,l){if(1&o&&(t.TgZ(0,"ng-option",36),t._UZ(1,"img",37),t._uU(2),t.qZA()),2&o){const e=l.$implicit;t.Q6J("value",e.ID),t.xp6(1),t.s9C("src",e.Img,t.LSH),t.xp6(1),t.Oqu(e.Name)}}function A(o,l){if(1&o){const e=t.EpF();t.TgZ(0,"input",49),t.NdJ("ngModelChange",function(n){t.CHM(e);const i=t.oxw(3).$implicit;return t.KtG(i.selected=n)})("ngModelChange",function(){t.CHM(e);const n=t.oxw(3).$implicit,i=t.oxw(2);return t.KtG(i.onCheckboxStateProduct(n.ID))}),t.qZA()}if(2&o){const e=t.oxw(3).$implicit;t.Q6J("ngModel",e.selected)}}function P(o,l){if(1&o&&t._UZ(0,"img",50),2&o){const e=t.oxw(3).$implicit;t.s9C("src",null==e?null:e.ThumbnailUrl,t.LSH)}}function U(o,l){1&o&&t._UZ(0,"img",51)}function k(o,l){if(1&o&&(t.ynx(0),t.TgZ(1,"td",43)(2,"div",44),t.YNc(3,A,1,1,"input",45),t.YNc(4,P,1,1,"img",46),t.YNc(5,U,1,0,"ng-template",null,47,t.W1O),t.qZA()(),t.TgZ(7,"td",43)(8,"span",48),t._uU(9),t.qZA(),t._UZ(10,"br"),t.TgZ(11,"small"),t._uU(12),t.qZA()(),t.BQk()),2&o){const e=t.MAs(6),a=t.oxw().$implicit,n=t.oxw().$implicit;t.xp6(1),t.Q6J("rowSpan",null==n?null:n.Variants.length),t.xp6(2),t.Q6J("ngIf",(null==a?null:a.Inventory)>=0||n.Variants.length>1),t.xp6(1),t.Q6J("ngIf",null==n?null:n.ThumbnailUrl)("ngIfElse",e),t.xp6(3),t.Q6J("rowSpan",null==n?null:n.Variants.length),t.xp6(2),t.Oqu(null==n?null:n.Name),t.xp6(3),t.hij("(",null==n?null:n.Category,")")}}function J(o,l){if(1&o){const e=t.EpF();t.TgZ(0,"input",23),t.NdJ("ngModelChange",function(n){t.CHM(e);const i=t.oxw().$implicit;return t.KtG(i.selected=n)}),t.qZA()}if(2&o){const e=t.oxw().$implicit;t.Q6J("ngModel",e.selected)}}function F(o,l){if(1&o&&(t.TgZ(0,"span")(1,"span",52),t._uU(2),t.ALo(3,"number"),t.qZA(),t._uU(4," => "),t.TgZ(5,"span",53),t._uU(6),t.ALo(7,"number"),t.qZA()()),2&o){const e=t.oxw().$implicit;t.xp6(2),t.hij(" ",t.lcZ(3,2,e.I.Available),""),t.xp6(4),t.Oqu(t.lcZ(7,4,null==e?null:e.Inventory))}}function Q(o,l){if(1&o&&(t.TgZ(0,"span"),t._uU(1),t.ALo(2,"number"),t.qZA()),2&o){const e=t.oxw().$implicit;t.xp6(1),t.hij(" ",t.lcZ(2,1,null==e?null:e.Inventory)," ")}}const L=function(o){return{"bg-err":o}};function V(o,l){if(1&o){const e=t.EpF();t.TgZ(0,"td",54)(1,"div",55)(2,"div",56),t.NdJ("click",function(){t.CHM(e);const n=t.oxw().$implicit,i=t.oxw().$implicit,r=t.oxw(2);return t.KtG(r.openTableDialog(i.Name,n,null==n?null:n.Channel[0].ChannelID,i.ChannelItemID))}),t._uU(3),t.ALo(4,"number"),t.qZA(),t.TgZ(5,"div",57)(6,"a",58),t._UZ(7,"i",59),t.qZA()()()()}if(2&o){const e=t.oxw().$implicit;t.Q6J("ngClass",t.VKq(5,L,(null==e?null:e.Inventory)!=(null==e?null:e.Channel[0].Inventory))),t.xp6(3),t.hij(" ",t.lcZ(4,3,null==e?null:e.Channel[0].Inventory)," "),t.xp6(3),t.Q6J("href",null==e?null:e.Channel[0].Url,t.LSH)}}function q(o,l){if(1&o&&(t.TgZ(0,"tr"),t.YNc(1,k,13,7,"ng-container",31),t.TgZ(2,"td",38),t._uU(3),t.qZA(),t.TgZ(4,"td",39),t._uU(5),t.qZA(),t.TgZ(6,"td",40),t.YNc(7,J,1,1,"input",41),t.qZA(),t.TgZ(8,"td",39),t.YNc(9,F,8,6,"span",31),t.YNc(10,Q,3,3,"span",31),t.qZA(),t.YNc(11,V,8,7,"td",42),t.qZA()),2&o){const e=l.$implicit,a=l.index;t.xp6(1),t.Q6J("ngIf",0==a),t.xp6(2),t.Oqu(null==e?null:e.Model),t.xp6(2),t.hij(" ",null==e?null:e.Code," "),t.xp6(2),t.Q6J("ngIf",(null==e?null:e.Inventory)>=0),t.xp6(2),t.Q6J("ngIf",(null==e?null:e.Inventory)!=e.I.Available),t.xp6(1),t.Q6J("ngIf",(null==e?null:e.Inventory)==e.I.Available),t.xp6(1),t.Q6J("ngIf",null==e?null:e.Channel)}}function O(o,l){if(1&o&&(t.TgZ(0,"tbody"),t.YNc(1,q,12,7,"tr",26),t.qZA()),2&o){const e=l.$implicit;t.xp6(1),t.Q6J("ngForOf",e.Variants)}}function K(o,l){if(1&o){const e=t.EpF();t.TgZ(0,"span",60),t.NdJ("click",function(){t.CHM(e);const n=t.oxw(2);return t.KtG(n.StoreRowsCountAPIResult())}),t.TgZ(1,"i",61),t._uU(2,"?"),t.qZA()()}}function B(o,l){if(1&o&&(t.TgZ(0,"span"),t._uU(1),t.ALo(2,"number"),t.qZA()),2&o){const e=t.oxw(2);t.xp6(1),t.Oqu(t.lcZ(2,1,e.listTotal))}}function Y(o,l){if(1&o){const e=t.EpF();t.TgZ(0,"a",62),t.NdJ("click",function(){t.CHM(e);const n=t.oxw(2);return t.KtG(n.NextPage(!0))}),t._UZ(1,"i",63),t._uU(2," Next"),t.qZA()}}function G(o,l){if(1&o){const e=t.EpF();t.TgZ(0,"a",64),t.NdJ("click",function(){t.CHM(e);const n=t.oxw(2);return t.KtG(n.StoreRowsCountAPIResult(!0))}),t._UZ(1,"i",65),t._uU(2," Last"),t.qZA()}}function H(o,l){if(1&o){const e=t.EpF();t.TgZ(0,"mainpanel",1),t.NdJ("onSubmit",function(n){t.CHM(e);const i=t.oxw();return t.KtG(i.Filter(n,"search"))}),t.TgZ(1,"actions")(2,"div",2)(3,"div")(4,"button",3),t.NdJ("click",function(){t.CHM(e);const n=t.oxw();return t.KtG(n.openScanDialog())}),t._UZ(5,"i",4),t._uU(6," Scan Channel "),t.qZA(),t.TgZ(7,"button",5),t.NdJ("click",function(){t.CHM(e);const n=t.oxw();return t.KtG(n.UpdateStock())}),t._UZ(8,"i",6),t._uU(9," Update"),t.qZA()()()(),t.TgZ(10,"filters")(11,"div",2)(12,"div",7)(13,"div")(14,"label",8),t._uU(15,"PageNumber"),t.qZA(),t.TgZ(16,"input",9),t.NdJ("ngModelChange",function(n){t.CHM(e);const i=t.oxw();return t.KtG(i.filter.PageNumber=n)}),t.qZA()(),t.TgZ(17,"div")(18,"label",10),t._uU(19,"Page Size"),t.qZA(),t.TgZ(20,"input",11),t.NdJ("ngModelChange",function(n){t.CHM(e);const i=t.oxw();return t.KtG(i.filter.PageSize=n)}),t.qZA()()()()(),t.TgZ(21,"content")(22,"div",12)(23,"div",13)(24,"div",14),t.YNc(25,N,3,0,"div",15),t.TgZ(26,"table",16)(27,"thead",17)(28,"tr")(29,"th",18),t._uU(30,"Product "),t._UZ(31,"br"),t.TgZ(32,"mat-slide-toggle",19),t.NdJ("toggleChange",function(){t.CHM(e);const n=t.oxw();return n.showDifferenceStock=!n.showDifferenceStock,t.KtG(n.onShowDifferenceStock())}),t.TgZ(33,"small",20),t._uU(34,"Filter Different Inventory"),t.qZA()()(),t.TgZ(35,"th",21),t._uU(36,"Variant"),t.qZA(),t.TgZ(37,"th",22),t._uU(38,"SKU"),t.qZA(),t.TgZ(39,"th")(40,"input",23),t.NdJ("ngModelChange",function(n){t.CHM(e);const i=t.oxw();return t.KtG(i.checkboxState=n)})("ngModelChange",function(){t.CHM(e);const n=t.oxw();return t.KtG(n.onCheckboxStateChange())}),t.qZA()(),t.TgZ(41,"th",22),t._uU(42,"POS"),t.qZA(),t.TgZ(43,"th")(44,"ng-select",24),t.NdJ("change",function(){t.CHM(e);const n=t.oxw();return n.filter.PageSize=100,t.KtG(n.Filter(null,"search"))})("ngModelChange",function(n){t.CHM(e);const i=t.oxw();return t.KtG(i.filter.ChannelID=n)}),t.YNc(45,R,3,3,"ng-option",25),t.qZA()(),t._UZ(46,"th"),t.qZA()(),t.YNc(47,O,2,1,"tbody",26),t.qZA(),t.TgZ(48,"div",27)(49,"div",28)(50,"div",29),t._uU(51),t.ALo(52,"number"),t.YNc(53,K,3,0,"span",30),t.YNc(54,B,3,3,"span",31),t._uU(55),t.qZA()(),t.TgZ(56,"div",32),t.YNc(57,Y,3,0,"a",33),t.YNc(58,G,3,0,"a",34),t.qZA()()()()()()()}if(2&o){const e=t.oxw();t.Q6J("Title","Inventory Comparison")("pageData",e.pageData)("hideSearchBox",!1)("textButton","Search"),t.xp6(7),t.Q6J("hidden",!e.hasSelection()),t.xp6(9),t.Q6J("ngModel",e.filter.PageNumber),t.xp6(4),t.Q6J("ngModel",e.filter.PageSize),t.xp6(5),t.Q6J("ngIf",3==e.filterModel&&!e.NonFull),t.xp6(15),t.Q6J("ngModel",e.checkboxState),t.xp6(4),t.Q6J("clearable",!1)("ngModel",e.filter.ChannelID),t.xp6(1),t.Q6J("ngForOf",e.Channel),t.xp6(2),t.Q6J("ngForOf",e.infiniteList),t.xp6(4),t.hij(" Showing 1 - ",t.lcZ(52,19,e.filter.PageSize*(e.filter.PageNumber-1)+e.data.length)," of "),t.xp6(2),t.Q6J("ngIf",e.hideCount),t.xp6(1),t.Q6J("ngIf",!e.hideCount),t.xp6(1),t.hij(" records ~ ",e.filter.PageNumber," Page "),t.xp6(2),t.Q6J("ngIf",e.nextPageDisabled&&!e.goToLast),t.xp6(1),t.Q6J("ngIf",e.nextPageDisabled&&!e.goToLast)}}let j=(()=>{class o{constructor(e,a,n){this.http=e,this.toastr=a,this.dialog=n,this.oldRowCount=-1,this.hideCount=!0,this.nextPageDisabled=!1,this.goToLast=!1,this.extendData=!1,this.filter={ChannelID:""},this.loading=!1,this.checkboxState=!1,this.showDifferenceStock=!1,this.NonFull=!1,this.LoaderChannel(),this.Options=[{Key:1,Value:"All"},{Key:3,Value:"Difference"}],this.filterModel=1,this.pageData={Title:"Inventory Realtime",Nav:[{Title:"Inventory Cache",Url:"/menu/inventory",Active:!1},{Title:"Inventory Realtime",Url:"/menu/inventory/realtime",Active:!0}]}}ngOnInit(){}LoaderChannel(){this.http.post("/api/InventoryLoader/Load",{}).subscribe(e=>{this.Channel=e.Options.Channel,this.filter=e.Filter,this.Filter(),this.filter.IsMarketplaceAppActive||this.toastr.warning("Automatic inventory sync disabled.\n Please enable Dealpos X Marketplace Apps integration in POS Configuration","Warning")})}Filter(e,a){"search"===a&&(this.oldRowCount=this.filter.PageSize,this.goToLast=!1,this.extendData=!1,this.filter.PageNumber=1);const n={text:e,filterModel:this.filterModel,ID:this.filter.ChannelID,PageNumber:this.filter.PageNumber,RowCount:this.filter.PageSize};this.hideCount=!0,this.http.post("/api/Inventory/GetSingleChannelComparison",n).subscribe(i=>{this.data=i.Data,this.temp=i.Data,this.postFilter(i)})}UpdateStock(){let e=this.getSelected();if(e.length>0){let n=[];e.forEach(r=>n.push({ID:r.ID,Code:r.Code,Inventory:r.Inventory}));var a=[];a.push(this.filter.ChannelID);let i={ListChannelID:a,List:n};this.http.post("/api/Inventory/UpdateChannel",i).subscribe(r=>{this.info=r.Data,this.Filter(),this.toastr.success("Successfully updated "+i.List.length+" variants in "+i.ListChannelID.length+" channels","Success")})}}openScanDialog(){this.dialog.open(_.j,{data:{filter:this.filter,Channel:this.Channel},width:"30%"}).afterClosed().subscribe(a=>{null!=a&&(this.filter=a.filter,this.filter.sync?this.RefreshChannel():this.filter.sync||this.RefreshChannel())})}RefreshChannel(){let e={ID:this.filter.ChannelID,ScanFull:this.filter.ScanFull};this.http.post("/api/product/ScanOptimized",e).subscribe(a=>{this.info=a.Data,this.Filter(),this.toastr.success("Successfully scanned from "+this.getChannelName(e.ID),"Success")})}UpdateStockByVariant(e,a,n,i,r){this.http.post("/api/Inventory/UpdateQuantityByID",{ID:this.filter.ChannelID,ChannelItemID:e,ChannelVariantID:a,NewQuantity:n,VariantID:i,SKU:r}).subscribe(W=>{this.toastr.success(W.Data,"Success",{closeButton:!0,positionClass:"toast-bottom-right"});for(let T of this.data)if(T.ChannelItemID===e)for(let S of T.Variants)S.ChannelVariationID==a&&(S.Stock=n)})}onCheckboxStateProduct(e){let a=this.data.filter(n=>n.ID==e);if(a.length>0)for(let n of a)for(let i of n.Variants)i.Inventory>=0&&(i.selected=n.selected)}onCheckboxStateChange(){for(let e of this.data)for(let a of e.Variants)a.selected=this.checkboxState}getSelected(){let e=Array();return this.data&&this.data.forEach(a=>a.Variants.filter(n=>n.selected).forEach(n=>e.push(n))),e}hasSelection(){return!!this.data&&this.getSelected().length>0}getChannelName(e){return this.Channel.find(n=>n.ID==e).Name}openTableDialog(e,a,n,i){this.dialog.open(M.k,{data:{Name:e,Variant:a,ChannelID:n,Table:"inventory",ChannelItemID:i}}).afterClosed().subscribe(h=>{null!=h&&this.updateItemAfterDialog(h)})}updateItemAfterDialog(e){let a={ID:e.ChannelID,ChannelItemID:e.ChannelItemID,ChannelVariantID:e.ChannelVariationID,NewQuantity:parseFloat(e.Inventory),VariantID:e.ID,SKU:e.Sku};this.http.post("/api/Inventory/UpdateQuantityByItem",a).subscribe(n=>{this.toastr.success("Successfully updated "+e.ItemName+"("+e.VarName+") inventory in "+this.getChannelName(a.ID)+" to "+a.NewQuantity,"Success");for(let i of this.data)if(i.ChannelItemID===e.ChannelItemID)for(let r of i.Variants)r.ChannelVariationID==e.ChannelVariantID&&(r.Stock=e.Inventory)})}onShowDifferenceStock(){this.filterModel=this.showDifferenceStock?3:1,this.Filter()}StoreRowsCountAPIResult(e){this.http.post("api/Inventory/GetInventoryByChannelRowCount",{ID:this.filter.ChannelID,PageNumber:this.filter.PageNumber,RowCount:this.filter.RowCount}).subscribe(n=>{this.listTotal=n.Total,this.hideCount=!1,e&&(this.filter.PageSize=this.listTotal,this.goToLast=!0,this.filter.PageNumber=1,this.Filter())})}NextPage(e){this.filter.PageNumber=this.filter.PageNumber||1,this.filter.PageNumber+=1,this.extendData=e,this.Filter()}postFilter(e){this.extendData?(this.infiniteList=this.infiniteList.concat(e.Data),this.extendData=!1):this.infiniteList=e.Data,3==this.filterModel?0==e.Data.length?this.NonFull=!0:this.nextPageDisabled=!0:null!=e.Data.length&&(this.nextPageDisabled=!(e.Data.length<this.filter.PageSize))}}return o.\u0275fac=function(e){return new(e||o)(t.Y36(C.O),t.Y36(I._W),t.Y36(v.uw))},o.\u0275cmp=t.Xpm({type:o,selectors:[["app-inventory-realtime"]],decls:1,vars:1,consts:[[3,"Title","pageData","hideSearchBox","textButton","onSubmit",4,"ngIf"],[3,"Title","pageData","hideSearchBox","textButton","onSubmit"],[1,"d-flex"],["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,"hidden","click"],[1,"fas","fa-chevron-circle-up"],["container",""],["for","PageNumber"],["type","number","id","PageNumber","placeholder","PageNumber","name","PageNumber","data-toggle","tooltip","matTooltip","Page Number",1,"form-control",3,"ngModel","ngModelChange"],["for","RowCount"],["type","number","id","RowCount","placeholder","Page Size","name","RowCount","data-toggle","tooltip","matTooltip","Page Size",1,"form-control",3,"ngModel","ngModelChange"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],["class","alert alert-warning d-flex justify-content-between text-dark","role","alert",4,"ngIf"],[1,"table","border-bottom"],[1,"thead-light","sticky-top-thead"],["scope","col","colspan","2",1,"text-center","w-25"],[3,"toggleChange"],[1,"fw-bold"],["scope","col",1,"text-start"],["scope","col",1,"text-end","w-10"],["type","checkbox",3,"ngModel","ngModelChange"],[3,"clearable","ngModel","change","ngModelChange"],[3,"value",4,"ngFor","ngForOf"],[4,"ngFor","ngForOf"],[1,"d-flex","justify-content-between","mt-5"],[1,"me-auto","d-sm-block","collapse","mt-3"],[1,"fw-bold","font-italic","hidden-xxs"],["style","cursor:pointer",3,"click",4,"ngIf"],[4,"ngIf"],[1,"btn-group"],["role","button","class","btn btn-outline-secondary btn-sm text-primary","title","Load more for 20 products",3,"click",4,"ngIf"],["role","button","class","btn btn-outline-secondary btn-sm text-primary","title","Load all products",3,"click",4,"ngIf"],["role","alert",1,"alert","alert-warning","d-flex","justify-content-between","text-dark"],[3,"value"],[2,"width","18px","margin-right","10px",3,"src"],[1,"text-start"],[1,"text-end"],[1,"align-middle"],["type","checkbox",3,"ngModel","ngModelChange",4,"ngIf"],["class","text-center",3,"ngClass",4,"ngIf"],[1,"text-center",3,"rowSpan"],[1,"d-flex","align-items-center","justify-content-end"],["type","checkbox","class","me-3",3,"ngModel","ngModelChange",4,"ngIf"],["class","border rounded w-img",3,"src",4,"ngIf","ngIfElse"],["elsePic",""],[1,"item-name","mb-0"],["type","checkbox",1,"me-3",3,"ngModel","ngModelChange"],[1,"border","rounded","w-img",3,"src"],["src","//res.cloudinary.com/pos/image/upload/w_40/POS/Images/Icon/products_thumb.png",1,"border","rounded","w-img"],["title","Allocated"],["title","Inventory below minimum inventory"],[1,"text-center",3,"ngClass"],[1,"row","justify-content-end","me-0"],[1,"col-8","px-0","text-center",3,"click"],[1,"col-2","ps-0","text-start","align-self-center"],["target","_blank",3,"href"],[1,"fas","fa-lg","fa-external-link-alt"],[2,"cursor","pointer",3,"click"],["title","Retreive rows count",1,"border","p-3"],["role","button","title","Load more for 20 products",1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"click"],[1,"fas","fa-arrow-right"],["role","button","title","Load all products",1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"click"],[1,"fas","fa-share"]],template:function(e,a){1&e&&t.YNc(0,H,59,21,"mainpanel",0),2&e&&t.Q6J("ngIf",a.data)},dependencies:[c.mk,c.sg,c.O5,p.Fj,p.wV,p.Wl,p.JJ,p.On,m.w9,m.jq,b.Rr,d.p,c.JJ],styles:[".w-10[_ngcontent-%COMP%]{width:10%}.w-20[_ngcontent-%COMP%]{width:20%}.w-img[_ngcontent-%COMP%]{width:40px;height:40px}.item-name[_ngcontent-%COMP%]{margin-bottom:-14px!important;font-size:larger}.cell-hover[_ngcontent-%COMP%]:hover{background-color:#c9c9c9!important}"]}),o})();var x=s(8063);const z=[{path:"",component:D,children:[{path:"",redirectTo:"bychannel",pathMatch:"full"},{path:"pos",component:w,canActivate:[x.a],data:{title:"Inventory Comparison"}},{path:"bychannel",component:j,canActivate:[x.a],data:{title:"Inventory Comparison"}}]}];let $=(()=>{class o{}return o.\u0275fac=function(e){return new(e||o)},o.\u0275mod=t.oAB({type:o}),o.\u0275inj=t.cJS({imports:[c.ez,u.Bz.forChild(z)]}),o})(),E=(()=>{class o{}return o.\u0275fac=function(e){return new(e||o)},o.\u0275mod=t.oAB({type:o}),o.\u0275inj=t.cJS({imports:[c.ez,$,u.Bz,g.Z,p.u5,m.A0,b.rP,d.R,y.U]}),o})()}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkpos_marketplace=self.webpackChunkpos_marketplace||[]).push([[518],{6518:(Ne,T,c)=>{c.r(T),c.d(T,{PriceModule:()=>Je});var d=c(6895),I=c(7398),_=c(7481),f=c(8252),h=c(4006),C=c(8796),e=c(4650);let N=(()=>{class i{constructor(){this.priceTabs=[{Title:"Price Single Channel",Url:"/menu/price/SingleChannel"},{Title:"POS vs Channel Price",Url:"/menu/price/pos"},{Title:"Custom Channel Price",Url:"/menu/price/OutletPrice"}]}ngOnInit(){}}return i.\u0275fac=function(t){return new(t||i)},i.\u0275cmp=e.Xpm({type:i,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(t,n){1&t&&(e.TgZ(0,"nav",0)(1,"div",1)(2,"div"),e._UZ(3,"nav-tab",2),e.qZA()()(),e._UZ(4,"router-outlet")),2&t&&(e.xp6(3),e.Q6J("Tabs",n.priceTabs))},dependencies:[I.e,f.lC]}),i})();var S=c(5131),v=c(2486),u=c(9300),m=c(1318),x=c(7185),P=c(5412),b=c(1948);function F(i,l){if(1&i&&(e.TgZ(0,"mat-radio-button",3),e._uU(1),e.qZA()),2&i){const t=l.$implicit,n=l.index,o=e.oxw();e.Q6J("value",t.Key)("name",o.name)("title",o.tooltipsText[n]?o.tooltipsText[n]:""),e.xp6(1),e.hij(" ",t.Value,"")}}const O=function(i){return{"border-0":i}};let y=(()=>{class i{constructor(){this.modelChange=new e.vpe,this.border=!1,this.tooltipsText=[]}change(t){this.modelChange.emit(t)}}return i.\u0275fac=function(t){return new(t||i)},i.\u0275cmp=e.Xpm({type:i,selectors:[["radio-options"]],inputs:{model:"model",options:"options",border:"border",name:"name",tooltipsText:"tooltipsText"},outputs:{modelChange:"modelChange"},decls:3,vars:5,consts:[[1,"form-control","h-100",3,"ngClass"],[3,"ngModel","ngModelChange"],["class","me-5","data-toggle","tooltip","data-placement","right",3,"value","name","title",4,"ngFor","ngForOf"],["data-toggle","tooltip","data-placement","right",1,"me-5",3,"value","name","title"]],template:function(t,n){1&t&&(e.TgZ(0,"div",0)(1,"mat-radio-group",1),e.NdJ("ngModelChange",function(a){return n.change(a)}),e.YNc(2,F,2,4,"mat-radio-button",2),e.qZA()()),2&t&&(e.Q6J("ngClass",e.VKq(3,O,0==n.border)),e.xp6(1),e.Q6J("ngModel",n.model),e.xp6(1),e.Q6J("ngForOf",n.options))},dependencies:[d.mk,d.sg,b.VQ,b.U0,h.JJ,h.On],styles:[".mat-radio-label{margin-top:auto;margin-bottom:auto}"]}),i})(),Q=(()=>{class i{}return i.\u0275fac=function(t){return new(t||i)},i.\u0275mod=e.oAB({type:i}),i.\u0275inj=e.cJS({imports:[d.ez,b.Fk,h.u5]}),i})();var U=c(7100);let R=(()=>{class i{constructor(t,n,o){this.http=t,this.toastr=n,this.dialog=o,this.loading=!1,this.LoaderChannel(),this.Options=[{Key:1,Value:"All"},{Key:3,Value:"Difference"}],this.filterModel=1,this.pageData={Title:"Price",Nav:[{Title:"Price Cache",Url:"/menu/price",Active:!0},{Title:"Price Realtime",Url:"/menu/price/realtime",Active:!1}]}}ngOnInit(){}LoaderChannel(){this.http.post("/api/PriceLoader/LoadMultiple",{}).subscribe(t=>{this.Channel=t.Options.Channel,this.filter=t.Filter,this.Filter()})}openScanDialog(){this.dialog.open(S.j,{data:{filter:this.filter,Channel:this.Channel},width:"30%"}).afterClosed().subscribe(n=>{null!=n&&(this.filter=n.filter,this.RefreshChannel())})}RefreshChannel(){this.http.post("/api/product/ScanOptimized",{ID:this.filter.ID,ScanFull:this.filter.ScanFull}).subscribe(n=>{this.info=n.Data,this.Filter(),this.toastr.success("Successfully scanned from "+this.getChannelName(this.filter.ID),"Success")})}Filter(t){this.http.post("/api/Price/GetMultipleChannelComparison",{text:t,filterModel:this.filterModel,PageNumber:this.filter.PageNumber,RowCount:this.filter.RowCount}).subscribe(o=>{this.data=o.Data})}UpdatePrice(){let t=this.getSelected();if(t.length>0){let o=[];t.forEach(r=>o.push({ID:r.ID,Code:r.Code,Price:r.UnitPrice}));var n=[];for(let r of this.Channel)r.selected&&n.push(r.ID);let a={ListChannelID:n,ListPrice:o};this.http.post("/api/Price/UpdateChannel",a).subscribe(r=>{this.info=r.Data,this.Filter(),this.toastr.success("Successfully updated "+a.ListPrice.length+" items in "+a.ListChannelID.length+" channels","Success")})}}getSelected(){let t=Array();if(this.data){for(let n of this.data)for(let o of n.Variants)o.selected&&t.push(o);return t}return[]}hasSelection(){return!!this.data&&this.getSelected().length>0}UpdatePriceByVariant(t){let n={ID:t.ChannelID,ChannelItemID:t.ChannelItemID,ChannelVariantID:t.ChannelVariationID,Price:t.Price-0,VariantID:t.ID};this.http.post("/api/Price/UpdatePriceByID",n).subscribe(o=>{this.info=o.Data,this.toastr.success("Successfully updated "+t.ItemName+"("+t.VarName+") price in "+this.getChannelName(n.ID)+" to "+n.Price,"Success"),this.Filter()})}getChannelName(t){return this.Channel.find(o=>o.ID==t).Name}onUpdateItems(){const t=this.getSelected();this.dialog.open(v.j,{data:{selectedItems:t,channels:this.Channel},width:"40%"}).afterClosed().pipe((0,u.h)(n=>void 0!==n)).subscribe(n=>{this.Channel=n,this.UpdatePrice()})}}return i.\u0275fac=function(t){return new(t||i)(e.Y36(m.O),e.Y36(x._W),e.Y36(P.uw))},i.\u0275cmp=e.Xpm({type:i,selectors:[["app-price-pos"]],decls:21,vars:12,consts:[[3,"Title","pageData","hideSearchBox","hideSearchDropdown","textButton","onSubmit"],["container",""],["name","filterModel",3,"model","options","border","modelChange"],[1,"d-flex"],["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,"hidden","click"],[1,"fas","fa-chevron-circle-up"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],["table","price",3,"data","channel","filter","onSubmit"]],template:function(t,n){1&t&&(e.TgZ(0,"mainpanel",0),e.NdJ("onSubmit",function(a){return n.Filter(a)}),e.TgZ(1,"filters")(2,"div",1)(3,"div")(4,"h6"),e._uU(5,"Filter by"),e.qZA(),e.TgZ(6,"radio-options",2),e.NdJ("modelChange",function(a){return n.filterModel=a}),e.qZA()()()(),e.TgZ(7,"actions")(8,"div",3)(9,"div")(10,"button",4),e.NdJ("click",function(){return n.openScanDialog()}),e._UZ(11,"i",5),e._uU(12," Scan Channel "),e.qZA(),e.TgZ(13,"button",6),e.NdJ("click",function(){return n.onUpdateItems()}),e._UZ(14,"i",7),e._uU(15," Update "),e.qZA()()()(),e.TgZ(16,"content")(17,"div",8)(18,"div",9)(19,"div",10)(20,"app-table",11),e.NdJ("onSubmit",function(a){return n.UpdatePriceByVariant(a)}),e.qZA()()()()()()),2&t&&(e.Q6J("Title","Price Comparison")("pageData",n.pageData)("hideSearchBox",!1)("hideSearchDropdown",!1)("textButton","Search"),e.xp6(6),e.Q6J("model",n.filterModel)("options",n.Options)("border",!1),e.xp6(7),e.Q6J("hidden",!n.hasSelection()),e.xp6(7),e.Q6J("data",n.data)("channel",n.Channel)("filter",n.filter))},dependencies:[_.p,y,U.a],styles:[".no-bullet[_ngcontent-%COMP%]{list-style-type:none}"]}),i})();var A=c(6709);function q(i,l){if(1&i&&(e.TgZ(0,"th",33),e._uU(1),e.qZA()),2&i){const t=l.$implicit;e.xp6(1),e.Oqu(t.Name)}}function L(i,l){1&i&&(e.ynx(0),e.TgZ(1,"th",34),e._uU(2," Expected (POS) "),e.qZA(),e.TgZ(3,"th",34),e._uU(4," Channel "),e.qZA(),e.BQk())}function k(i,l){if(1&i&&e._UZ(0,"img",43),2&i){const t=e.oxw(3).$implicit;e.s9C("src",null==t?null:t.ImageUrl,e.LSH)}}function V(i,l){1&i&&e._UZ(0,"img",44)}const $=function(i){return{"border-bottom":i}};function E(i,l){if(1&i&&(e.ynx(0),e.TgZ(1,"td",38),e.YNc(2,k,1,1,"img",39),e.YNc(3,V,1,0,"ng-template",null,40,e.W1O),e.qZA(),e.TgZ(5,"td",41)(6,"h5",42),e._uU(7),e.qZA(),e._UZ(8,"br"),e.TgZ(9,"small"),e._uU(10),e.qZA()(),e.BQk()),2&i){const t=e.MAs(4),n=e.oxw().index,o=e.oxw().$implicit,a=e.oxw();e.xp6(1),e.Q6J("rowSpan",null==o?null:o.Variants.length)("ngClass",e.VKq(7,$,n+1==a.data.length)),e.xp6(1),e.Q6J("ngIf",null==o?null:o.ImageUrl)("ngIfElse",t),e.xp6(3),e.Q6J("rowSpan",null==o?null:o.Variants.length),e.xp6(2),e.Oqu(null==o?null:o.Name),e.xp6(3),e.hij("(",null==o?null:o.Category,")")}}const Y=function(i){return{"bg-err":i}};function K(i,l){if(1&i&&(e.ynx(0),e.TgZ(1,"td",47),e._uU(2),e.ALo(3,"number"),e.qZA(),e.TgZ(4,"td",48)(5,"div",49)(6,"div",50),e._uU(7),e.ALo(8,"number"),e._UZ(9,"br"),e.qZA(),e.TgZ(10,"div",51)(11,"a",52),e._UZ(12,"i",53),e.qZA()()()(),e.BQk()),2&i){const t=l.$implicit;e.xp6(2),e.hij(" ",e.lcZ(3,4,t.PriceExpected)," "),e.xp6(2),e.Q6J("ngClass",e.VKq(8,Y,t.Price!=t.PriceExpected)),e.xp6(3),e.hij(" ",e.lcZ(8,6,t.Price)," "),e.xp6(4),e.Q6J("href",t.Url,e.LSH)}}function j(i,l){1&i&&(e.TgZ(0,"td",54),e._uU(1,"X"),e.qZA(),e.TgZ(2,"td",54),e._uU(3,"X"),e.qZA())}function B(i,l){if(1&i&&(e.ynx(0),e.YNc(1,K,13,10,"ng-container",45),e.YNc(2,j,4,0,"ng-template",null,46,e.W1O),e.BQk()),2&i){const t=l.$implicit,n=e.MAs(3),o=e.oxw().$implicit,a=e.oxw(2);e.xp6(1),e.Q6J("ngIf",a.getItemFromChannel(o,t.ID))("ngIfElse",n)}}function H(i,l){if(1&i){const t=e.EpF();e.TgZ(0,"tr"),e.YNc(1,E,11,9,"ng-container",35),e.TgZ(2,"td",36),e._uU(3),e.qZA(),e.TgZ(4,"td",36),e._uU(5),e.qZA(),e.TgZ(6,"td",37)(7,"input",18),e.NdJ("ngModelChange",function(o){const r=e.CHM(t).$implicit;return e.KtG(r.selected=o)}),e.qZA()(),e.YNc(8,B,4,2,"ng-container",19),e.qZA()}if(2&i){const t=l.$implicit,n=l.index,o=e.oxw(2);e.xp6(1),e.Q6J("ngIf",0==n),e.xp6(2),e.Oqu(null==t?null:t.Model),e.xp6(2),e.Oqu(null==t?null:t.Code),e.xp6(1),e.Q6J("hidden",o.filter.HiddenIPOSInventory),e.xp6(1),e.Q6J("ngModel",t.selected),e.xp6(1),e.Q6J("ngForOf",o.Channel)}}function G(i,l){if(1&i&&(e.TgZ(0,"tbody"),e.YNc(1,H,9,6,"tr",19),e.qZA()),2&i){const t=l.$implicit;e.xp6(1),e.Q6J("ngForOf",t.Variants)}}function X(i,l){if(1&i){const t=e.EpF();e.TgZ(0,"li")(1,"mat-checkbox",55),e.NdJ("ngModelChange",function(o){const r=e.CHM(t).$implicit;return e.KtG(r.selected=o)}),e.TgZ(2,"div",3)(3,"h6",56),e._uU(4),e.qZA()()()()}if(2&i){const t=l.$implicit;e.xp6(1),e.Q6J("ngModel",t.selected),e.xp6(3),e.Oqu(t.Name)}}let W=(()=>{class i{constructor(t,n,o){this.http=t,this.toastr=n,this.dialog=o,this.filter={ChannelID:""},this.loading=!1,this.checkboxState=!1,this.LoaderChannel(),this.Options=[{Key:1,Value:"All"},{Key:3,Value:"Difference"}],this.filterModel=1,this.pageData={Title:"Price Realtime",Nav:[{Title:"Price Cache",Url:"/menu/price",Active:!1}]}}ngOnInit(){}LoaderChannel(){this.http.post("/api/PriceLoader/LoadMultiple",{}).subscribe(t=>{this.Channel=t.Options.Channel,this.filter=t.Filter,this.filter.HiddenIPOSInventory=!1,this.Filter()})}onCheckboxStateChange(){for(let t of this.data)for(let n of t.Variants)n.selected=this.checkboxState}getSelected(){let t=Array();if(this.data){for(let n of this.data)for(let o of n.Variants)o.selected&&t.push(o);return t}return[]}hasSelection(){return!!this.data&&this.getSelected().length>0}Filter(t){this.http.post("/api/Price/GetOutletPrice",{text:t,filterModel:this.filterModel,PageNumber:this.filter.PageNumber,RowCount:this.filter.RowCount}).subscribe(o=>{this.data=o.Data})}UpdatePrice(){let t=this.getSelected();if(t.length>0){let o=[];t.forEach(r=>o.push(r.ID));var n=[];for(let r of this.Channel)r.selected&&n.push(r.ID);let a={ListChannelID:n,ListID:o};this.http.post("/api/Price/UpdateChannelOutletPrice",a).subscribe(r=>{this.info=r.Data,this.Filter(),this.toastr.success("Successfully updated "+a.ListID.length+" items in "+a.ListChannelID.length+" channels","Success")})}}getItemFromChannel(t,n){return t.Channel.find(o=>o.ChannelID==n)}Actual(t){return t.Price}Expected(t){return t.PriceExpected}UpdatePriceByVariant(t,n,o,a){this.http.post("/api/Price/UpdatePriceByID",{ID:this.filter.ChannelID,ChannelItemID:t,ChannelVariantID:n,Price:o,VariantID:a}).subscribe(p=>{this.toastr.success(p.Data,"Success",{closeButton:!0,positionClass:"toast-bottom-right"});for(let s of this.data)if(s.ChannelItemID===t)for(let g of s.Variants)g.ChannelVariationID==n&&(g.Price=parseFloat(o))})}onUpdateItems(){const t=this.getSelected();this.dialog.open(v.j,{data:{selectedItems:t,channels:this.Channel},width:"40%"}).afterClosed().pipe((0,u.h)(n=>void 0!==n)).subscribe(n=>{this.Channel=n,this.UpdatePrice()})}}return i.\u0275fac=function(t){return new(t||i)(e.Y36(m.O),e.Y36(x._W),e.Y36(P.uw))},i.\u0275cmp=e.Xpm({type:i,selectors:[["app-price-realtime"]],decls:58,vars:16,consts:[[3,"Title","pageData","hideSearchBox","hideSearchDropdown","textButton","onSubmit"],["container",""],["name","filterModel",3,"model","options","border","modelChange"],[1,"d-flex"],["type","button","data-toggle","modal",1,"btn","btn-success","shadow","rounded",3,"hidden","click"],[1,"fas","fa-chevron-circle-up"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"table"],[1,"thead-light","sticky-top-thead"],["colspan","5"],["scope","col","colspan","2","class","text-center border-bottom-0 border w-10 text-uppercase",4,"ngFor","ngForOf"],["scope","col","colspan","2",1,"text-center","w-20"],["scope","col",1,"text-start"],["scope","col",1,"text-start","w-10"],[3,"hidden"],["type","checkbox",3,"ngModel","ngModelChange"],[4,"ngFor","ngForOf"],["id","ModalScan","tabindex","-1","role","dialog","aria-labelledby","ModalScan","aria-hidden","true",1,"modal","pe-0","ps-5","ms-5"],[1,"modal-dialog","modal-dialog-centered","w-75"],[1,"modal-content","w-50"],[1,"modal-header"],["id","exampleModalLabel",1,"modal-title"],["type","button","data-dismiss","modal","aria-label","Close",1,"close"],["aria-hidden","true"],[1,"modal-body"],[1,"fw-light"],[1,"no-bullet"],[1,"modal-footer"],["type","button","data-dismiss","modal",1,"btn","btn-secondary"],["type","button",1,"btn","btn-success",3,"click"],["scope","col","colspan","2",1,"text-center","border-bottom-0","border","w-10","text-uppercase"],[1,"text-end","border-top-0","border","w-10"],[4,"ngIf"],[1,"text-start","border-bottom"],[1,"align-middle",3,"hidden"],[1,"text-center",3,"rowSpan","ngClass"],["class","border rounded w-img",3,"src",4,"ngIf","ngIfElse"],["elsePic",""],[1,"text-center","border-bottom",3,"rowSpan"],[1,"mb-0","item-name"],[1,"border","rounded","w-img",3,"src"],["src","//res.cloudinary.com/pos/image/upload/w_40/POS/Images/Icon/products_thumb.png",1,"border","rounded","w-img"],[4,"ngIf","ngIfElse"],["elseCol",""],[1,"text-end","border","pointer","cell-hover"],[1,"text-end","border","pointer","cell-hover",3,"ngClass"],[1,"row","justify-content-end","me-0"],[1,"col-8","px-0","text-center"],[1,"col-2","ps-0","text-start","align-self-center"],["target","_blank",3,"href"],[1,"fas","fa-lg","fa-external-link-alt"],[1,"table-white","border","text-end",2,"color","red"],[3,"ngModel","ngModelChange"],[1,"fw-light","me-2","my-auto"]],template:function(t,n){1&t&&(e.TgZ(0,"mainpanel",0),e.NdJ("onSubmit",function(a){return n.Filter(a)}),e.TgZ(1,"filters")(2,"div",1)(3,"div")(4,"h6"),e._uU(5,"Filter by"),e.qZA(),e.TgZ(6,"radio-options",2),e.NdJ("modelChange",function(a){return n.filterModel=a}),e.qZA()()()(),e.TgZ(7,"actions")(8,"div",3)(9,"button",4),e.NdJ("click",function(){return n.onUpdateItems()}),e._UZ(10,"i",5),e._uU(11," Update "),e.qZA()()(),e.TgZ(12,"content")(13,"div",6)(14,"div",7)(15,"div",8)(16,"div",9)(17,"table",10)(18,"thead",11)(19,"tr"),e._UZ(20,"th",12),e.YNc(21,q,2,1,"th",13),e.qZA(),e.TgZ(22,"tr")(23,"th",14),e._uU(24,"Product"),e.qZA(),e.TgZ(25,"th",15),e._uU(26,"Variant"),e.qZA(),e.TgZ(27,"th",16),e._uU(28,"SKU"),e.qZA(),e.TgZ(29,"th",17)(30,"input",18),e.NdJ("ngModelChange",function(a){return n.checkboxState=a})("ngModelChange",function(){return n.onCheckboxStateChange()}),e.qZA()(),e.YNc(31,L,5,0,"ng-container",19),e.qZA()(),e.YNc(32,G,2,1,"tbody",19),e.qZA()()()()(),e.TgZ(33,"div",20)(34,"div",21)(35,"div",22)(36,"div",23)(37,"h5",24),e._uU(38,"Update Price from POS to Channel"),e.qZA(),e.TgZ(39,"button",25)(40,"span",26),e._uU(41,"\xd7"),e.qZA()()(),e.TgZ(42,"div",27)(43,"div")(44,"h6",28),e._uU(45),e._UZ(46,"br")(47,"br"),e._uU(48," Choose channels to update : "),e._UZ(49,"br")(50,"br"),e.qZA(),e.TgZ(51,"ul",29),e.YNc(52,X,5,2,"li",19),e.qZA()()(),e.TgZ(53,"div",30)(54,"button",31),e._uU(55,"Close"),e.qZA(),e.TgZ(56,"button",32),e.NdJ("click",function(){return n.UpdatePrice()}),e._uU(57,"Update"),e.qZA()()()()()()()),2&t&&(e.Q6J("Title","Price Comparison")("pageData",n.pageData)("hideSearchBox",!1)("hideSearchDropdown",!1)("textButton","Search"),e.xp6(6),e.Q6J("model",n.filterModel)("options",n.Options)("border",!1),e.xp6(3),e.Q6J("hidden",!n.hasSelection()),e.xp6(12),e.Q6J("ngForOf",n.Channel),e.xp6(8),e.Q6J("hidden",n.filter.HiddenIPOSInventory),e.xp6(1),e.Q6J("ngModel",n.checkboxState),e.xp6(1),e.Q6J("ngForOf",n.Channel),e.xp6(1),e.Q6J("ngForOf",n.data),e.xp6(13),e.hij("Updating ",n.getSelected().length," items "),e.xp6(7),e.Q6J("ngForOf",n.Channel))},dependencies:[d.mk,d.sg,d.O5,h.Wl,h.JJ,h.On,_.p,y,A.oG,d.JJ],styles:[".w-10[_ngcontent-%COMP%]{width:10%}.w-20[_ngcontent-%COMP%]{width:20%}.w-img[_ngcontent-%COMP%]{width:40px;height:40px}.item-name[_ngcontent-%COMP%]{font-weight:400;font-size:larger}.cell-hover[_ngcontent-%COMP%]:hover{background-color:#c9c9c9!important}"]}),i})();var D=c(8505),z=c(1576),ee=c(1135),te=c(4351),M=c(4004),ne=c(4482),w=c(5403),ie=c(8421),oe=c(4671),ae=c(5032),le=c(3269),ce=c(5026),se=c(4707),pe=c(3099);let he=(()=>{class i{constructor(t){this.http=t,this.pagination$=new ee.X(null),this.data$=this.pagination$.pipe((0,u.h)(n=>null!=n),(0,te.b)(n=>this.http.post(`/API/${this.fetchDataEndpoint}`,JSON.stringify(n)).pipe((0,M.U)(o=>o.Data))),function re(...i){const l=(0,le.jO)(i);return(0,ne.e)((t,n)=>{const o=i.length,a=new Array(o);let r=i.map(()=>!1),p=!1;for(let s=0;s<o;s++)(0,ie.Xf)(i[s]).subscribe((0,w.x)(n,g=>{a[s]=g,!p&&!r[s]&&(r[s]=!0,(p=r.every(oe.y))&&(r=null))},ae.Z));t.subscribe((0,w.x)(n,s=>{if(p){const g=[s,...a];n.next(l?l(...g):g)}}))})}(this.pagination$),(0,ce.R)((n,o)=>{const[a,r]=n,[p]=o;return 1==r.PageNumber?[p,r]:[a.concat(p),r]}),(0,D.b)(([n,o])=>{this.setPageNumberFooter(o),this.setPaginationButtonState(o,n.length)}),(0,M.U)(([n])=>n),function de(i,l,t){let n,o=!1;return i&&"object"==typeof i?({bufferSize:n=1/0,windowTime:l=1/0,refCount:o=!1,scheduler:t}=i):n=i??1/0,(0,pe.B)({connector:()=>new se.t(n,l,t),resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:o})}())}onNextPage(t){t.PageNumber+=1,this.pagination$.next(t)}setPageNumberFooter(t){this.footerPageNumber=t.PageNumber}setPaginationButtonState(t,n){this.disableNextButton=0==n||!(n<t.RowCount*t.PageNumber)}resetToFirstPage(t){t.PageNumber=1,this.pagination$.next(t),this.hideCount=!0,this.goToLastPage=!1}getAllData(t,n){t.RowCount=n,this.pagination$.next(t),this.goToLastPage=!0}}return i.\u0275fac=function(t){return new(t||i)(e.LFG(m.O))},i.\u0275prov=e.Yz7({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();var J=c(455);function ge(i,l){if(1&i){const t=e.EpF();e.TgZ(0,"actions")(1,"div",5)(2,"div")(3,"button",6),e.NdJ("click",function(){e.CHM(t);const o=e.oxw().ngIf,a=e.oxw();return e.KtG(a.openScanDialog(o.Filter,o))}),e._UZ(4,"i",7),e._uU(5," Channel "),e.qZA(),e.TgZ(6,"button",8),e.NdJ("click",function(){const a=e.CHM(t).ngIf,r=e.oxw().ngIf,p=e.oxw();return e.KtG(p.updateStock(a,r.Filter))}),e._UZ(7,"i",9),e._uU(8," Update "),e.qZA()()(),e._UZ(9,"div")(10,"div"),e.qZA()}}function _e(i,l){if(1&i&&(e.TgZ(0,"ng-option",30),e._UZ(1,"img",31),e._uU(2),e.qZA()),2&i){const t=l.$implicit;e.Q6J("value",t.ID),e.xp6(1),e.s9C("src",t.Img,e.LSH),e.xp6(1),e.Oqu(t.Name)}}function ue(i,l){if(1&i){const t=e.EpF();e.TgZ(0,"input",41),e.NdJ("ngModelChange",function(o){e.CHM(t);const a=e.oxw(3).$implicit;return e.KtG(a.selected=o)})("ngModelChange",function(){e.CHM(t);const o=e.oxw(3).$implicit,a=e.oxw().ngIf,r=e.oxw(2);return e.KtG(r.onCheckboxStateProduct(a,o.ID))}),e.qZA()}if(2&i){const t=e.oxw(3).$implicit;e.Q6J("ngModel",t.selected)}}function me(i,l){if(1&i&&e._UZ(0,"img",42),2&i){const t=e.oxw(3).$implicit;e.s9C("src",t.ThumbnailUrl,e.LSH)}}function fe(i,l){1&i&&e._UZ(0,"img",43)}function Ce(i,l){if(1&i&&(e.ynx(0),e.TgZ(1,"td",35)(2,"div",36),e.YNc(3,ue,1,1,"input",37),e.YNc(4,me,1,1,"img",38),e.YNc(5,fe,1,0,"ng-template",null,39,e.W1O),e.qZA()(),e.TgZ(7,"td",35)(8,"span",40),e._uU(9),e.qZA(),e._UZ(10,"br"),e.TgZ(11,"small"),e._uU(12),e.qZA()(),e.BQk()),2&i){const t=e.MAs(6),n=e.oxw().$implicit,o=e.oxw().$implicit;e.xp6(1),e.Q6J("rowSpan",o.Variants.length),e.xp6(2),e.Q6J("ngIf",n.Inventory>=0||o.Variants.length>1),e.xp6(1),e.Q6J("ngIf",o.ThumbnailUrl)("ngIfElse",t),e.xp6(3),e.Q6J("rowSpan",o.Variants.length),e.xp6(2),e.Oqu(o.Name),e.xp6(3),e.hij("(",o.Category,")")}}function xe(i,l){if(1&i){const t=e.EpF();e.TgZ(0,"input",44),e.NdJ("ngModelChange",function(o){e.CHM(t);const a=e.oxw().$implicit;return e.KtG(a.selected=o)}),e.qZA()}if(2&i){const t=e.oxw().$implicit;e.Q6J("ngModel",t.selected)}}const Pe=function(i){return{"bg-err":i}};function be(i,l){if(1&i){const t=e.EpF();e.TgZ(0,"td",45)(1,"div",46)(2,"div",47),e.NdJ("click",function(){e.CHM(t);const o=e.oxw().$implicit,a=e.oxw().$implicit,r=e.oxw().ngIf,p=e.oxw().ngIf,s=e.oxw();return e.KtG(s.openTableDialog(a.Name,o,null==o?null:o.Channel[0].ChannelID,o.Channel[0].ChannelItemID,r,p))}),e._uU(3),e.ALo(4,"number"),e.qZA(),e.TgZ(5,"div",48)(6,"a",49),e._UZ(7,"i",50),e.qZA()()()()}if(2&i){const t=e.oxw().$implicit;e.Q6J("ngClass",e.VKq(5,Pe,t.UnitPrice!=t.Channel[0].Price)),e.xp6(3),e.hij(" ",e.lcZ(4,3,t.Channel[0].Price)," "),e.xp6(3),e.Q6J("href",t.Channel[0].Url,e.LSH)}}function Ze(i,l){if(1&i&&(e.TgZ(0,"tr"),e.YNc(1,Ce,13,7,"ng-container",4),e.TgZ(2,"td",17),e._uU(3),e.qZA(),e.TgZ(4,"td",18),e._uU(5),e.qZA(),e.TgZ(6,"td",32),e.YNc(7,xe,1,1,"input",33),e.qZA(),e.TgZ(8,"td",18),e._uU(9),e.ALo(10,"number"),e.qZA(),e.YNc(11,be,8,7,"td",34),e.qZA()),2&i){const t=l.$implicit,n=l.index;e.xp6(1),e.Q6J("ngIf",0==n),e.xp6(2),e.Oqu(t.Model),e.xp6(2),e.hij(" ",t.Code," "),e.xp6(2),e.Q6J("ngIf",t.Inventory>=0),e.xp6(2),e.hij(" ",e.lcZ(10,6,t.UnitPrice)," "),e.xp6(2),e.Q6J("ngIf",t.Channel.length>0)}}function Te(i,l){if(1&i&&(e.ynx(0),e.YNc(1,Ze,12,8,"tr",22),e.BQk()),2&i){const t=l.$implicit;e.xp6(1),e.Q6J("ngForOf",t.Variants)}}function Ie(i,l){if(1&i){const t=e.EpF();e.TgZ(0,"span",51),e.NdJ("click",function(){e.CHM(t);const o=e.oxw(2).ngIf,a=e.oxw();return e.KtG(a.getAllDataCount(o.Filter))}),e.TgZ(1,"i",52),e._uU(2,"?"),e.qZA()()}}function Se(i,l){if(1&i&&(e.TgZ(0,"span"),e._uU(1),e.ALo(2,"number"),e.qZA()),2&i){const t=l.ngIf;e.xp6(1),e.Oqu(e.lcZ(2,1,t.Total))}}function ve(i,l){if(1&i){const t=e.EpF();e.TgZ(0,"a",53),e.NdJ("click",function(){e.CHM(t);const o=e.oxw(2).ngIf,a=e.oxw();return e.KtG(a.nextPage(o.Filter))}),e._UZ(1,"i",54),e._uU(2," Next"),e.qZA()}}function ye(i,l){if(1&i){const t=e.EpF();e.TgZ(0,"a",55),e.NdJ("click",function(){e.CHM(t);const o=e.oxw(2).ngIf,a=e.oxw();return e.KtG(a.getAllData(o.Filter))}),e._UZ(1,"i",56),e._uU(2," Last"),e.qZA()}}function Ue(i,l){if(1&i){const t=e.EpF();e.TgZ(0,"content")(1,"div",10)(2,"div",11)(3,"table",12)(4,"thead",13)(5,"tr")(6,"th",14),e._uU(7," Product "),e.TgZ(8,"div")(9,"mat-slide-toggle",15),e.NdJ("ngModelChange",function(o){e.CHM(t);const a=e.oxw(2);return e.KtG(a.toggleDifferentInventory=o)})("toggleChange",function(){e.CHM(t);const o=e.oxw().ngIf,a=e.oxw();return e.KtG(a.onToggleDifferentInventory(o))}),e.TgZ(10,"small",16),e._uU(11,"Filter Different Inventory"),e.qZA()()()(),e.TgZ(12,"th",17),e._uU(13,"Variant"),e.qZA(),e.TgZ(14,"th",18),e._uU(15,"SKU"),e.qZA(),e.TgZ(16,"th")(17,"input",19),e.NdJ("change",function(o){const r=e.CHM(t).ngIf,p=e.oxw(2);return e.KtG(p.onSelectAllSKU(o.target.checked,r))}),e.qZA()(),e.TgZ(18,"th",18),e._uU(19,"POS"),e.qZA(),e.TgZ(20,"th")(21,"ng-select",20),e.NdJ("ngModelChange",function(o){e.CHM(t);const a=e.oxw().ngIf;return e.KtG(a.Filter.ID=o)})("change",function(){e.CHM(t);const o=e.oxw().ngIf,a=e.oxw();return e.KtG(a.search(o.Filter))}),e.YNc(22,_e,3,3,"ng-option",21),e.qZA()(),e._UZ(23,"th"),e.qZA()(),e.TgZ(24,"tbody"),e.YNc(25,Te,2,1,"ng-container",22),e.qZA()(),e.TgZ(26,"div",23)(27,"div",24)(28,"div",25),e._uU(29),e.ALo(30,"number"),e.YNc(31,Ie,3,0,"span",26),e.YNc(32,Se,3,3,"span",4),e.ALo(33,"async"),e._uU(34),e.qZA()(),e.TgZ(35,"div",27),e.YNc(36,ve,3,0,"a",28),e.YNc(37,ye,3,0,"a",29),e.qZA()()()()()}if(2&i){const t=l.ngIf,n=e.oxw().ngIf,o=e.oxw();e.xp6(9),e.Q6J("ngModel",o.toggleDifferentInventory),e.xp6(12),e.Q6J("clearable",!1)("ngModel",n.Filter.ID),e.xp6(1),e.Q6J("ngForOf",n.Options.Channel),e.xp6(3),e.Q6J("ngForOf",t),e.xp6(4),e.hij(" Showing 1 - ",e.lcZ(30,11,null==t?null:t.length)," of "),e.xp6(2),e.Q6J("ngIf",o.infP.hideCount),e.xp6(1),e.Q6J("ngIf",e.lcZ(33,13,!o.infP.hideCount&&o.allDataCount$)),e.xp6(2),e.hij(" records ~ ",o.infP.footerPageNumber," Page "),e.xp6(2),e.Q6J("ngIf",o.infP.disableNextButton&&!o.infP.goToLastPage),e.xp6(1),e.Q6J("ngIf",o.infP.disableNextButton&&!o.infP.goToLastPage)}}function Ae(i,l){if(1&i){const t=e.EpF();e.TgZ(0,"mainpanel",1),e.NdJ("textChange",function(o){const r=e.CHM(t).ngIf;return e.KtG(r.Filter.text=o)})("onSubmit",function(){const a=e.CHM(t).ngIf,r=e.oxw();return e.KtG(r.search(a.Filter))}),e.TgZ(1,"filters")(2,"div",2)(3,"div")(4,"label"),e._uU(5,"Page Size"),e.qZA(),e.TgZ(6,"input",3),e.NdJ("ngModelChange",function(o){const r=e.CHM(t).ngIf;return e.KtG(r.Filter.RowCount=o)}),e.qZA()()()(),e.YNc(7,ge,11,0,"actions",4),e.ALo(8,"async"),e.YNc(9,Ue,38,15,"content",4),e.ALo(10,"async"),e.qZA()}if(2&i){const t=l.ngIf,n=e.oxw();e.Q6J("Title",n.pageTitle)("text",t.Filter.text),e.xp6(6),e.Q6J("ngModel",t.Filter.RowCount),e.xp6(1),e.Q6J("ngIf",e.lcZ(8,5,n.infP.data$)),e.xp6(2),e.Q6J("ngIf",e.lcZ(10,7,n.infP.data$))}}let De=(()=>{class i{constructor(t,n,o,a){this.http=t,this.infPagination=n,this.toastr=o,this.dialog=a,this.pageTitle="Price Single Channel Comparison",this.toggleDifferentInventory=!1,this.loaderEndpoint="PriceLoader/Load",this.dataEndpoint="Price/GetSingleChannelComparison",this.allDataCountEndpoint="Inventory/GetInventoryByChannelRowCount"}get infP(){return this.infPagination}ngOnInit(){this.infP.fetchDataEndpoint=this.dataEndpoint,this.loader$=this.http.post(`/API/${this.loaderEndpoint}`).pipe((0,D.b)(t=>{this.infP.resetToFirstPage(t.Filter)}))}onToggleDifferentInventory(t){t.Filter.filterModel=this.toggleDifferentInventory?1:3,this.search(t.Filter)}onCheckboxStateProduct(t,n){let o=t.filter(a=>a.ID==n);o.length>0&&o[0].Variants.forEach(a=>a.selected=o[0].selected)}openScanDialog(t,n){this.dialog.open(S.j,{data:{filter:t,Channel:n.Options.Channel},width:"30%"}).afterClosed().pipe((0,u.h)(o=>o)).subscribe(o=>{this.refreshChannel(n)})}refreshChannel(t){let n={ID:t.Filter.ID,ScanFull:t.Filter.ScanFull};console.log(t,n),this.http.post("/api/product/ScanOptimized",n).subscribe(()=>{this.search(t.Filter),this.toastr.success("Successfully scanned from "+this.getChannelName(t.Options.Channel,n.ID),"Success")})}getChannelName(t,n){return t.find(a=>a.ID==n).Name}updateStock(t,n){let a=[];t.forEach(p=>p.Variants.filter(s=>s.selected)?.forEach(s=>{a.push({ID:s.ID,ChannelID:s.Channel[0].ChannelID,Code:s.Code,Price:s.UnitPrice})}));let r={ListChannelID:[n.ID],ListPrice:a};this.http.post("/api/Price/UpdateChannel",r).subscribe(()=>{this.search(n),this.toastr.success("Successfully updated "+r.ListPrice.length+" variants in "+r.ListChannelID.length+" channels","Success")})}getSelectedProduct(t){return t.filter(n=>n.selected)}search(t){this.infP.resetToFirstPage(t)}getAllDataCount(t){this.infP.hideCount=!1,this.allDataCount$=this.http.post(`/API/${this.allDataCountEndpoint}`,t)}nextPage(t){this.infP.onNextPage(t)}getAllData(t){this.http.post(`/API/${this.allDataCountEndpoint}`,t).subscribe({next:n=>{this.infP.getAllData(t,n.Total)}})}openTableDialog(t,n,o,a,r,p){this.dialog.open(z.k,{data:{Name:t,Variant:n,ChannelID:o,Table:"price",ChannelItemID:a}}).afterClosed().subscribe(g=>{null!=g&&this.updateItemAfterDialog(g,r,p)})}updateItemAfterDialog(t,n,o){let a={ID:t.ChannelID,ChannelItemID:t.ChannelItemID,ChannelVariantID:t.ChannelVariationID,Price:parseFloat(t.Price),VariantID:t.ID,SKU:t.Sku};this.http.post("/api/Price/UpdatePriceByID",a).subscribe(r=>{this.toastr.success("Successfully updated "+t.ItemName+"("+t.VarName+") inventory in "+this.getChannelName(o.Options.Channel,a.ID)+" to "+a.Price,"Success")})}onSelectAllSKU(t,n){n.forEach(o=>o.Variants.forEach(a=>a.selected=t))}}return i.\u0275fac=function(t){return new(t||i)(e.Y36(m.O),e.Y36(he),e.Y36(x._W),e.Y36(P.uw))},i.\u0275cmp=e.Xpm({type:i,selectors:[["app-price-single-channel"]],decls:2,vars:3,consts:[[3,"Title","text","textChange","onSubmit",4,"ngIf"],[3,"Title","text","textChange","onSubmit"],["container",""],["type","number",3,"ngModel","ngModelChange"],[4,"ngIf"],[1,"d-flex"],["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"],["name","differentInventory",3,"ngModel","ngModelChange","toggleChange"],[1,"font-weight-bold"],[1,"text-left"],[1,"text-right"],["type","checkbox",1,"me-3",3,"change"],["name","channelOption",3,"clearable","ngModel","ngModelChange","change"],[3,"value",4,"ngFor","ngForOf"],[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","title","Load all products",3,"click",4,"ngIf"],[3,"value"],[2,"width","18px","margin-right","10px",3,"src"],[1,"align-middle"],["type","checkbox",3,"ngModel","ngModelChange",4,"ngIf"],["class","text-center",3,"ngClass",4,"ngIf"],[1,"text-center",3,"rowSpan"],[1,"d-flex","align-items-center","justify-content-center"],["type","checkbox","class","me-3",3,"ngModel","ngModelChange",4,"ngIf"],["class","border rounded w-img",3,"src",4,"ngIf","ngIfElse"],["elsePic",""],[1,"item-name","mb-0"],["type","checkbox",1,"me-3",3,"ngModel","ngModelChange"],[1,"border","rounded","w-img",3,"src"],["src","//res.cloudinary.com/pos/image/upload/w_40/POS/Images/Icon/products_thumb.png",1,"border","rounded","w-img"],["type","checkbox",3,"ngModel","ngModelChange"],[1,"text-center",3,"ngClass"],[1,"row","justify-content-end","me-0"],[1,"col-8","px-0","text-center",2,"cursor","pointer",3,"click"],[1,"col-2","ps-0","text-left","align-self-center"],["target","_blank",3,"href"],[1,"fas","fa-lg","fa-external-link-alt"],[2,"cursor","pointer",3,"click"],["title","Retreive rows count",1,"border","p-3"],["role","button","title","Load more for 20 products",1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"click"],[1,"fas","fa-arrow-right"],["role","button","title","Load all products",1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"click"],[1,"fas","fa-share"]],template:function(t,n){1&t&&(e.YNc(0,Ae,11,9,"mainpanel",0),e.ALo(1,"async")),2&t&&e.Q6J("ngIf",e.lcZ(1,1,n.loader$))},dependencies:[d.mk,d.sg,d.O5,h.Fj,h.wV,h.Wl,h.JJ,h.On,_.p,C.w9,C.jq,J.Rr,d.Ov,d.JJ],styles:[".w-img[_ngcontent-%COMP%]{width:40px;height:40px}"]}),i})();var Z=c(8063);const Me=[{path:"",component:N,children:[{path:"",redirectTo:"SingleChannel",pathMatch:"full"},{path:"pos",component:R,canActivate:[Z.a],data:{title:"Global Price Comparison"}},{path:"OutletPrice",component:W,canActivate:[Z.a],data:{title:"Outlet Price Comparison"}},{path:"SingleChannel",component:De,canActivate:[Z.a],data:{title:"Price Single Channel Comparison"}}]}];let we=(()=>{class i{}return i.\u0275fac=function(t){return new(t||i)},i.\u0275mod=e.oAB({type:i}),i.\u0275inj=e.cJS({imports:[d.ez,f.Bz.forChild(Me)]}),i})(),Je=(()=>{class i{}return i.\u0275fac=function(t){return new(t||i)},i.\u0275mod=e.oAB({type:i}),i.\u0275inj=e.cJS({imports:[d.ez,h.u5,I.Z,_.R,f.Bz,C.A0,we,h.UX,J.rP,Q,A.p9,U.U]}),i})()}}]);
@@ -14,9 +14,9 @@
14
14
  <script>
15
15
  (function () { var w = window; var ic = w.Intercom; if (typeof ic === "function") { ic('reattach_activator'); ic('update', w.intercomSettings); } else { var d = document; var i = function () { i.c(arguments); }; i.q = []; i.c = function (args) { i.q.push(args); }; w.Intercom = i; var l = function () { var s = d.createElement('script'); s.type = 'text/javascript'; s.async = true; s.src = 'https://widget.intercom.io/widget/xv1oomgl'; var x = d.getElementsByTagName('script')[0]; x.parentNode.insertBefore(s, x); }; if (w.attachEvent) { w.attachEvent('onload', l); } else { w.addEventListener('load', l, false); } } })();
16
16
  </script>
17
- <style>@charset "UTF-8";:root{--bs-blue:#337ab7;--bs-indigo:#6610f2;--bs-purple:#6f42c1;--bs-pink:#d63384;--bs-red:#c9302c;--bs-orange:#f6a828;--bs-yellow:#ffc107;--bs-green:#89b03e;--bs-teal:#20c997;--bs-cyan:#0dcaf0;--bs-white:#ffffff;--bs-gray:#6c757d;--bs-gray-dark:#343a40;--bs-gray-100:#f8f9fa;--bs-gray-200:#e9ecef;--bs-gray-300:#dee2e6;--bs-gray-400:#ced4da;--bs-gray-500:#adb5bd;--bs-gray-600:#6c757d;--bs-gray-700:#495057;--bs-gray-800:#343a40;--bs-gray-900:#212529;--bs-primary:#337ab7;--bs-success:#89b03e;--bs-secondary:#cccccc;--bs-dark:#4d4d4d;--bs-light:#dddddd;--bs-light-gray:rgba(203, 203, 210, .15);--bs-light-blue:#dfeffc;--bs-danger:#c9302c;--bs-warning:#f6a828;--bs-primary-rgb:51, 122, 183;--bs-success-rgb:137, 176, 62;--bs-secondary-rgb:204, 204, 204;--bs-dark-rgb:77, 77, 77;--bs-light-rgb:221, 221, 221;--bs-light-gray-rgb:203, 203, 210;--bs-light-blue-rgb:223, 239, 252;--bs-danger-rgb:201, 48, 44;--bs-warning-rgb:246, 168, 40;--bs-white-rgb:255, 255, 255;--bs-black-rgb:0, 0, 0;--bs-body-color-rgb:51, 51, 51;--bs-body-bg-rgb:255, 255, 255;--bs-font-sans-serif:system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--bs-font-monospace:SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--bs-gradient:linear-gradient(180deg, rgba(255, 255, 255, .15), rgba(255, 255, 255, 0));--bs-body-font-family:Roboto, sans-serif;--bs-body-font-size:.75rem;--bs-body-font-weight:400;--bs-body-line-height:1.5;--bs-body-color:#333333;--bs-body-bg:#ffffff}*,*:before,*:after{box-sizing:border-box}@media (prefers-reduced-motion: no-preference){:root{scroll-behavior:smooth}}body{margin:0;font-family:var(--bs-body-font-family);font-size:var(--bs-body-font-size);font-weight:var(--bs-body-font-weight);line-height:var(--bs-body-line-height);color:var(--bs-body-color);text-align:var(--bs-body-text-align);background-color:var(--bs-body-bg);-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:rgba(0,0,0,0)}@media (max-width: 991px){body{position:relative}}html,body{height:100%}@media print{html,body{height:auto}body{color:#000!important}}@charset "UTF-8";:root{--bs-blue:#337ab7;--bs-indigo:#6610f2;--bs-purple:#6f42c1;--bs-pink:#d63384;--bs-red:#c9302c;--bs-orange:#f6a828;--bs-yellow:#ffc107;--bs-green:#89b03e;--bs-teal:#20c997;--bs-cyan:#0dcaf0;--bs-white:#ffffff;--bs-gray:#cccccc;--bs-gray-dark:#343a40;--bs-gray-100:#dddddd;--bs-gray-200:#e9ecef;--bs-gray-300:#dee2e6;--bs-gray-400:#ced4da;--bs-gray-500:#adb5bd;--bs-gray-600:#cccccc;--bs-gray-700:#495057;--bs-gray-800:#343a40;--bs-gray-900:#4d4d4d;--bs-primary:#337ab7;--bs-success:#89b03e;--bs-secondary:#cccccc;--bs-dark:#4d4d4d;--bs-light:#dddddd;--bs-light-gray:rgba(203, 203, 210, .15);--bs-light-blue:#dfeffc;--bs-danger:#c9302c;--bs-warning:#f6a828;--bs-primary-rgb:51, 122, 183;--bs-secondary-rgb:204, 204, 204;--bs-success-rgb:137, 176, 62;--bs-info-rgb:23, 162, 184;--bs-warning-rgb:255, 193, 7;--bs-danger-rgb:201, 48, 44;--bs-light-rgb:221, 221, 221;--bs-dark-rgb:77, 77, 77;--bs-white-rgb:255, 255, 255;--bs-black-rgb:0, 0, 0;--bs-body-color-rgb:51, 51, 51;--bs-body-bg-rgb:255, 255, 255;--bs-font-sans-serif:system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--bs-font-monospace:SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--bs-gradient:linear-gradient(180deg, rgba(255, 255, 255, .15), rgba(255, 255, 255, 0));--bs-body-font-family:Roboto, sans-serif;--bs-body-font-size:.75rem;--bs-body-font-weight:400;--bs-body-line-height:1.5;--bs-body-color:#333333;--bs-body-bg:#ffffff}*,*:before,*:after{box-sizing:border-box}@media (prefers-reduced-motion: no-preference){:root{scroll-behavior:smooth}}body{margin:0;font-family:var(--bs-body-font-family);font-size:var(--bs-body-font-size);font-weight:var(--bs-body-font-weight);line-height:var(--bs-body-line-height);color:var(--bs-body-color);text-align:var(--bs-body-text-align);background-color:var(--bs-body-bg);-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:rgba(0,0,0,0)}@media (max-width: 991px){body{position:relative}}html,body{height:100%}@media print{html,body{height:auto}body{color:#000!important}}</style><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/marketplacepos@2.3.0/Marketplace/styles.d8aa52b2e9cd02ae.css" media="print" onload="this.media='all'"><noscript><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/marketplacepos@2.3.0/Marketplace/styles.d8aa52b2e9cd02ae.css"></noscript></head>
17
+ <style>@charset "UTF-8";:root{--bs-blue:#337ab7;--bs-indigo:#6610f2;--bs-purple:#6f42c1;--bs-pink:#d63384;--bs-red:#c9302c;--bs-orange:#f6a828;--bs-yellow:#ffc107;--bs-green:#89b03e;--bs-teal:#20c997;--bs-cyan:#0dcaf0;--bs-white:#ffffff;--bs-gray:#6c757d;--bs-gray-dark:#343a40;--bs-gray-100:#f8f9fa;--bs-gray-200:#e9ecef;--bs-gray-300:#dee2e6;--bs-gray-400:#ced4da;--bs-gray-500:#adb5bd;--bs-gray-600:#6c757d;--bs-gray-700:#495057;--bs-gray-800:#343a40;--bs-gray-900:#212529;--bs-primary:#337ab7;--bs-success:#89b03e;--bs-secondary:#cccccc;--bs-dark:#4d4d4d;--bs-light:#dddddd;--bs-light-gray:rgba(203, 203, 210, .15);--bs-light-blue:#dfeffc;--bs-danger:#c9302c;--bs-warning:#f6a828;--bs-primary-rgb:51, 122, 183;--bs-success-rgb:137, 176, 62;--bs-secondary-rgb:204, 204, 204;--bs-dark-rgb:77, 77, 77;--bs-light-rgb:221, 221, 221;--bs-light-gray-rgb:203, 203, 210;--bs-light-blue-rgb:223, 239, 252;--bs-danger-rgb:201, 48, 44;--bs-warning-rgb:246, 168, 40;--bs-white-rgb:255, 255, 255;--bs-black-rgb:0, 0, 0;--bs-body-color-rgb:51, 51, 51;--bs-body-bg-rgb:255, 255, 255;--bs-font-sans-serif:system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--bs-font-monospace:SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--bs-gradient:linear-gradient(180deg, rgba(255, 255, 255, .15), rgba(255, 255, 255, 0));--bs-body-font-family:Roboto, sans-serif;--bs-body-font-size:.75rem;--bs-body-font-weight:400;--bs-body-line-height:1.5;--bs-body-color:#333333;--bs-body-bg:#ffffff}*,*:before,*:after{box-sizing:border-box}@media (prefers-reduced-motion: no-preference){:root{scroll-behavior:smooth}}body{margin:0;font-family:var(--bs-body-font-family);font-size:var(--bs-body-font-size);font-weight:var(--bs-body-font-weight);line-height:var(--bs-body-line-height);color:var(--bs-body-color);text-align:var(--bs-body-text-align);background-color:var(--bs-body-bg);-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:rgba(0,0,0,0)}@media (max-width: 991px){body{position:relative}}html,body{height:100%}@media print{html,body{height:auto}body{color:#000!important}}@charset "UTF-8";:root{--bs-blue:#337ab7;--bs-indigo:#6610f2;--bs-purple:#6f42c1;--bs-pink:#d63384;--bs-red:#c9302c;--bs-orange:#f6a828;--bs-yellow:#ffc107;--bs-green:#89b03e;--bs-teal:#20c997;--bs-cyan:#0dcaf0;--bs-white:#ffffff;--bs-gray:#cccccc;--bs-gray-dark:#343a40;--bs-gray-100:#dddddd;--bs-gray-200:#e9ecef;--bs-gray-300:#dee2e6;--bs-gray-400:#ced4da;--bs-gray-500:#adb5bd;--bs-gray-600:#cccccc;--bs-gray-700:#495057;--bs-gray-800:#343a40;--bs-gray-900:#4d4d4d;--bs-primary:#337ab7;--bs-success:#89b03e;--bs-secondary:#cccccc;--bs-dark:#4d4d4d;--bs-light:#dddddd;--bs-light-gray:rgba(203, 203, 210, .15);--bs-light-blue:#dfeffc;--bs-danger:#c9302c;--bs-warning:#f6a828;--bs-primary-rgb:51, 122, 183;--bs-secondary-rgb:204, 204, 204;--bs-success-rgb:137, 176, 62;--bs-info-rgb:23, 162, 184;--bs-warning-rgb:255, 193, 7;--bs-danger-rgb:201, 48, 44;--bs-light-rgb:221, 221, 221;--bs-dark-rgb:77, 77, 77;--bs-white-rgb:255, 255, 255;--bs-black-rgb:0, 0, 0;--bs-body-color-rgb:51, 51, 51;--bs-body-bg-rgb:255, 255, 255;--bs-font-sans-serif:system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--bs-font-monospace:SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--bs-gradient:linear-gradient(180deg, rgba(255, 255, 255, .15), rgba(255, 255, 255, 0));--bs-body-font-family:Roboto, sans-serif;--bs-body-font-size:.75rem;--bs-body-font-weight:400;--bs-body-line-height:1.5;--bs-body-color:#333333;--bs-body-bg:#ffffff}*,*:before,*:after{box-sizing:border-box}@media (prefers-reduced-motion: no-preference){:root{scroll-behavior:smooth}}body{margin:0;font-family:var(--bs-body-font-family);font-size:var(--bs-body-font-size);font-weight:var(--bs-body-font-weight);line-height:var(--bs-body-line-height);color:var(--bs-body-color);text-align:var(--bs-body-text-align);background-color:var(--bs-body-bg);-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:rgba(0,0,0,0)}@media (max-width: 991px){body{position:relative}}html,body{height:100%}@media print{html,body{height:auto}body{color:#000!important}}</style><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/marketplacepos@2.3.1/Marketplace/styles.d8aa52b2e9cd02ae.css" media="print" onload="this.media='all'"><noscript><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/marketplacepos@2.3.1/Marketplace/styles.d8aa52b2e9cd02ae.css"></noscript></head>
18
18
  <body>
19
19
  <app-root></app-root>
20
- <script src="https://cdn.jsdelivr.net/npm/marketplacepos@2.3.0/Marketplace/runtime.ba5c4b46d4312c5e.js" type="module"></script><script src="https://cdn.jsdelivr.net/npm/marketplacepos@2.3.0/Marketplace/polyfills.8d85b0533e3f867a.js" type="module"></script><script src="https://cdn.jsdelivr.net/npm/marketplacepos@2.3.0/Marketplace/scripts.512baec01df5d79f.js" defer></script><script src="https://cdn.jsdelivr.net/npm/marketplacepos@2.3.0/Marketplace/main.6481a1f35d927562.js" type="module"></script>
20
+ <script src="https://cdn.jsdelivr.net/npm/marketplacepos@2.3.1/Marketplace/runtime.307954efca5e3eeb.js" type="module"></script><script src="https://cdn.jsdelivr.net/npm/marketplacepos@2.3.1/Marketplace/polyfills.8d85b0533e3f867a.js" type="module"></script><script src="https://cdn.jsdelivr.net/npm/marketplacepos@2.3.1/Marketplace/scripts.512baec01df5d79f.js" defer></script><script src="https://cdn.jsdelivr.net/npm/marketplacepos@2.3.1/Marketplace/main.6481a1f35d927562.js" type="module"></script>
21
21
 
22
22
  </body></html>
@@ -0,0 +1 @@
1
+ (()=>{"use strict";var e,v={},_={};function r(e){var n=_[e];if(void 0!==n)return n.exports;var t=_[e]={id:e,loaded:!1,exports:{}};return v[e].call(t.exports,t,t.exports,r),t.loaded=!0,t.exports}r.m=v,e=[],r.O=(n,t,f,i)=>{if(!t){var a=1/0;for(o=0;o<e.length;o++){for(var[t,f,i]=e[o],s=!0,c=0;c<t.length;c++)(!1&i||a>=i)&&Object.keys(r.O).every(u=>r.O[u](t[c]))?t.splice(c--,1):(s=!1,i<a&&(a=i));if(s){e.splice(o--,1);var l=f();void 0!==l&&(n=l)}}return n}i=i||0;for(var o=e.length;o>0&&e[o-1][2]>i;o--)e[o]=e[o-1];e[o]=[t,f,i]},r.n=e=>{var n=e&&e.__esModule?()=>e.default:()=>e;return r.d(n,{a:n}),n},(()=>{var n,e=Object.getPrototypeOf?t=>Object.getPrototypeOf(t):t=>t.__proto__;r.t=function(t,f){if(1&f&&(t=this(t)),8&f||"object"==typeof t&&t&&(4&f&&t.__esModule||16&f&&"function"==typeof t.then))return t;var i=Object.create(null);r.r(i);var o={};n=n||[null,e({}),e([]),e(e)];for(var a=2&f&&t;"object"==typeof a&&!~n.indexOf(a);a=e(a))Object.getOwnPropertyNames(a).forEach(s=>o[s]=()=>t[s]);return o.default=()=>t,r.d(i,o),i}})(),r.d=(e,n)=>{for(var t in n)r.o(n,t)&&!r.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:n[t]})},r.f={},r.e=e=>Promise.all(Object.keys(r.f).reduce((n,t)=>(r.f[t](e,n),n),[])),r.u=e=>(592===e?"common":e)+"."+{6:"fc79ecc0c0a33462",22:"3829c474fb5bad35",46:"502e626256bc5b7c",126:"9c69aee32875d325",185:"1b988f70ad8b4f58",231:"231da11ec44f3fe8",285:"17f6cbef78acd327",472:"974dc0a1dade2b29",512:"eddb4675a9016de6",518:"3ea4f72f7ca0ce3c",585:"c93552ac67f4550c",592:"34d3e7dcd2b85c7a",616:"507588c0a5d7b9e1",717:"62ca448a74adc1c2",739:"82b92600f9519019",763:"42fa4c0d665819d3",767:"0ce42314dea8dfea",796:"3be8ad424aad7864"}[e]+".js",r.miniCssF=e=>{},r.o=(e,n)=>Object.prototype.hasOwnProperty.call(e,n),(()=>{var e={},n="pos-marketplace:";r.l=(t,f,i,o)=>{if(e[t])e[t].push(f);else{var a,s;if(void 0!==i)for(var c=document.getElementsByTagName("script"),l=0;l<c.length;l++){var d=c[l];if(d.getAttribute("src")==t||d.getAttribute("data-webpack")==n+i){a=d;break}}a||(s=!0,(a=document.createElement("script")).type="module",a.charset="utf-8",a.timeout=120,r.nc&&a.setAttribute("nonce",r.nc),a.setAttribute("data-webpack",n+i),a.src=r.tu(t)),e[t]=[f];var b=(g,u)=>{a.onerror=a.onload=null,clearTimeout(p);var m=e[t];if(delete e[t],a.parentNode&&a.parentNode.removeChild(a),m&&m.forEach(h=>h(u)),g)return g(u)},p=setTimeout(b.bind(null,void 0,{type:"timeout",target:a}),12e4);a.onerror=b.bind(null,a.onerror),a.onload=b.bind(null,a.onload),s&&document.head.appendChild(a)}}})(),r.r=e=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{var e;r.tt=()=>(void 0===e&&(e={createScriptURL:n=>n},typeof trustedTypes<"u"&&trustedTypes.createPolicy&&(e=trustedTypes.createPolicy("angular#bundler",e))),e)})(),r.tu=e=>r.tt().createScriptURL(e),r.p="https://cdn.jsdelivr.net/npm/marketplacepos@2.3.1/Marketplace/",(()=>{var e={666:0};r.f.j=(f,i)=>{var o=r.o(e,f)?e[f]:void 0;if(0!==o)if(o)i.push(o[2]);else if(666!=f){var a=new Promise((d,b)=>o=e[f]=[d,b]);i.push(o[2]=a);var s=r.p+r.u(f),c=new Error;r.l(s,d=>{if(r.o(e,f)&&(0!==(o=e[f])&&(e[f]=void 0),o)){var b=d&&("load"===d.type?"missing":d.type),p=d&&d.target&&d.target.src;c.message="Loading chunk "+f+" failed.\n("+b+": "+p+")",c.name="ChunkLoadError",c.type=b,c.request=p,o[1](c)}},"chunk-"+f,f)}else e[f]=0},r.O.j=f=>0===e[f];var n=(f,i)=>{var c,l,[o,a,s]=i,d=0;if(o.some(p=>0!==e[p])){for(c in a)r.o(a,c)&&(r.m[c]=a[c]);if(s)var b=s(r)}for(f&&f(i);d<o.length;d++)r.o(e,l=o[d])&&e[l]&&e[l][0](),e[l]=0;return r.O(b)},t=self.webpackChunkpos_marketplace=self.webpackChunkpos_marketplace||[];t.forEach(n.bind(null,0)),t.push=n.bind(null,t.push.bind(t))})()})();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "marketplacepos",
3
- "version": "2.3.0",
3
+ "version": "2.3.1",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"