marketplacepos 2.3.1 → 2.3.2
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/1.b49e619a73fb2a86.js +1 -0
- package/Marketplace/115.44f051b23469a3a3.js +1 -0
- package/Marketplace/3rdpartylicenses.txt +27 -0
- package/Marketplace/46.3815daacf4a89802.js +1 -0
- package/Marketplace/466.fd29b7965d5e28a4.js +1 -0
- package/Marketplace/472.8a5a65585a8eae0d.js +1 -0
- package/Marketplace/518.c5dbfdd31a6ddcfc.js +1 -0
- package/Marketplace/61.6bf2570c9c03e65d.js +1 -0
- package/Marketplace/763.698000c82516136b.js +1 -0
- package/Marketplace/index.html +2 -2
- package/Marketplace/{main.6481a1f35d927562.js → main.efbf88d695aa7333.js} +1 -1
- package/Marketplace/runtime.483da6b9bc6293f4.js +1 -0
- package/Marketplace/{styles.d8aa52b2e9cd02ae.css → styles.44d414097ff92971.css} +1 -1
- package/package.json +1 -1
- package/Marketplace/126.9c69aee32875d325.js +0 -1
- package/Marketplace/185.1b988f70ad8b4f58.js +0 -1
- package/Marketplace/231.231da11ec44f3fe8.js +0 -1
- package/Marketplace/46.502e626256bc5b7c.js +0 -1
- package/Marketplace/472.974dc0a1dade2b29.js +0 -1
- package/Marketplace/518.3ea4f72f7ca0ce3c.js +0 -1
- package/Marketplace/763.42fa4c0d665819d3.js +0 -1
- package/Marketplace/runtime.307954efca5e3eeb.js +0 -1
|
@@ -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(5241),Z=s(2486),C=s(1318),I=s(7185),v=s(5412),d=s(7481),y=s(488);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(7945),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:(Fe,T,c)=>{c.r(T),c.d(T,{PriceModule:()=>Ne});var d=c(6895),I=c(7398),_=c(7481),f=c(8252),g=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(5241),v=c(2486),u=c(9300),m=c(1318),x=c(7185),b=c(5412),P=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,P.VQ,P.U0,g.JJ,g.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,P.Fk,g.u5]}),i})();var U=c(488);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(b.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 D=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",null==o.filter?null: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 h of s.Variants)h.ChannelVariationID==n&&(h.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(b.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",null==n.filter?null: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,g.Wl,g.JJ,g.On,_.p,y,D.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 A=c(8505),z=c(7945),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 ge=(()=>{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,h=>{a[s]=h,!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 h=[s,...a];n.next(l?l(...h):h)}}))})}(this.pagination$),(0,ce.R)((n,o)=>{const[a,r]=n,[p]=o;return 1==r.PageNumber?[p,r]:[a.concat(p),r]}),(0,A.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 he(i,l){if(1&i){const t=e.EpF();e.TgZ(0,"button",9),e.NdJ("click",function(){e.CHM(t);const o=e.oxw().ngIf,a=e.oxw().ngIf,r=e.oxw();return e.KtG(r.updateStock(o,a.Filter))}),e._UZ(1,"i",10),e._uU(2," Update "),e.qZA()}}function _e(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.YNc(6,he,3,0,"button",8),e.qZA()(),e._UZ(7,"div")(8,"div"),e.qZA()}if(2&i){const t=l.ngIf,n=e.oxw(2);e.xp6(6),e.Q6J("ngIf",n.getSelectedData(t)>0)}}function ue(i,l){if(1&i&&(e.TgZ(0,"ng-option",31),e._UZ(1,"img",32),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 me(i,l){if(1&i){const t=e.EpF();e.TgZ(0,"input",42),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 fe(i,l){if(1&i&&e._UZ(0,"img",43),2&i){const t=e.oxw(3).$implicit;e.s9C("src",t.ThumbnailUrl,e.LSH)}}function Ce(i,l){1&i&&e._UZ(0,"img",44)}function xe(i,l){if(1&i&&(e.ynx(0),e.TgZ(1,"td",36)(2,"div",37),e.YNc(3,me,1,1,"input",38),e.YNc(4,fe,1,1,"img",39),e.YNc(5,Ce,1,0,"ng-template",null,40,e.W1O),e.qZA()(),e.TgZ(7,"td",36)(8,"span",41),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 be(i,l){if(1&i){const t=e.EpF();e.TgZ(0,"input",45),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 Ze(i,l){if(1&i){const t=e.EpF();e.TgZ(0,"td",46)(1,"div",47)(2,"div",48),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",49)(6,"a",50),e._UZ(7,"i",51),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 Te(i,l){if(1&i&&(e.TgZ(0,"tr"),e.YNc(1,xe,13,7,"ng-container",4),e.TgZ(2,"td",18),e._uU(3),e.qZA(),e.TgZ(4,"td",19),e._uU(5),e.qZA(),e.TgZ(6,"td",33),e.YNc(7,be,1,1,"input",34),e.qZA(),e.TgZ(8,"td",19),e._uU(9),e.ALo(10,"number"),e.qZA(),e.YNc(11,Ze,8,7,"td",35),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 Ie(i,l){if(1&i&&(e.ynx(0),e.YNc(1,Te,12,8,"tr",23),e.BQk()),2&i){const t=l.$implicit;e.xp6(1),e.Q6J("ngForOf",t.Variants)}}function Se(i,l){if(1&i){const t=e.EpF();e.TgZ(0,"span",52),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",53),e._uU(2,"?"),e.qZA()()}}function ve(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 ye(i,l){if(1&i){const t=e.EpF();e.TgZ(0,"a",54),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",55),e._uU(2," Next"),e.qZA()}}function Ue(i,l){if(1&i){const t=e.EpF();e.TgZ(0,"a",56),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",57),e._uU(2," Last"),e.qZA()}}function De(i,l){if(1&i){const t=e.EpF();e.TgZ(0,"content")(1,"div",11)(2,"div",12)(3,"table",13)(4,"thead",14)(5,"tr")(6,"th",15),e._uU(7," Product "),e.TgZ(8,"div")(9,"mat-slide-toggle",16),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",17),e._uU(11,"Filter Different Inventory"),e.qZA()()()(),e.TgZ(12,"th",18),e._uU(13,"Variant"),e.qZA(),e.TgZ(14,"th",19),e._uU(15,"SKU"),e.qZA(),e.TgZ(16,"th")(17,"input",20),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",19),e._uU(19,"POS"),e.qZA(),e.TgZ(20,"th")(21,"ng-select",21),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,ue,3,3,"ng-option",22),e.qZA()(),e._UZ(23,"th"),e.qZA()(),e.TgZ(24,"tbody"),e.YNc(25,Ie,2,1,"ng-container",23),e.qZA()(),e.TgZ(26,"div",24)(27,"div",25)(28,"div",26),e._uU(29),e.ALo(30,"number"),e.YNc(31,Se,3,0,"span",27),e.YNc(32,ve,3,3,"span",4),e.ALo(33,"async"),e._uU(34),e.qZA()(),e.TgZ(35,"div",28),e.YNc(36,ye,3,0,"a",29),e.YNc(37,Ue,3,0,"a",30),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,_e,9,1,"actions",4),e.ALo(8,"async"),e.YNc(9,De,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 Me=(()=>{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,A.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};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")})}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(h=>{null!=h&&this.updateItemAfterDialog(h,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))}getSelectedData(t){let n;return t.filter(a=>(n=a.Variants.filter(r=>r.selected),n.length>0)).length}}return i.\u0275fac=function(t){return new(t||i)(e.Y36(m.O),e.Y36(ge),e.Y36(x._W),e.Y36(b.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"],["class","btn btn-success",3,"click",4,"ngIf"],[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,g.Fj,g.wV,g.Wl,g.JJ,g.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 we=[{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:Me,canActivate:[Z.a],data:{title:"Price Single Channel Comparison"}}]}];let 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,f.Bz.forChild(we)]}),i})(),Ne=(()=>{class i{}return i.\u0275fac=function(t){return new(t||i)},i.\u0275mod=e.oAB({type:i}),i.\u0275inj=e.cJS({imports:[d.ez,g.u5,I.Z,_.R,f.Bz,C.A0,Je,g.UX,J.rP,Q,D.p9,U.U]}),i})()}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkpos_marketplace=self.webpackChunkpos_marketplace||[]).push([[61],{7398:(k,_,s)=>{s.d(_,{Z:()=>p,e:()=>u});var m=s(6895),e=s(8252),l=s(4650);function b(n,c){if(1&n&&(l.TgZ(0,"li",2)(1,"a",3),l._uU(2),l.qZA()()),2&n){const r=c.$implicit;l.xp6(1),l.s9C("routerLink",r.Url),l.xp6(1),l.hij(" ",r.Title," ")}}let u=(()=>{class n{}return n.\u0275fac=function(r){return new(r||n)},n.\u0275cmp=l.Xpm({type:n,selectors:[["nav-tab"]],inputs:{Tabs:"Tabs"},decls:2,vars:1,consts:[[1,"nav","navbar-nav","navbar-left","nav-tab-arrow"],["routerLinkActive","active","class","nav-item me-6",4,"ngFor","ngForOf"],["routerLinkActive","active",1,"nav-item","me-6"],[1,"nav-link","nav-link-arrow","mb-0",3,"routerLink"]],template:function(r,f){1&r&&(l.TgZ(0,"ul",0),l.YNc(1,b,3,2,"li",1),l.qZA()),2&r&&(l.xp6(1),l.Q6J("ngForOf",f.Tabs))},dependencies:[m.sg,e.yS,e.Od]}),n})(),p=(()=>{class n{}return n.\u0275fac=function(r){return new(r||n)},n.\u0275mod=l.oAB({type:n}),n.\u0275inj=l.cJS({imports:[m.ez,e.Bz]}),n})()},455:(k,_,s)=>{s.d(_,{Rr:()=>T,rP:()=>I});var m=s(9643),e=s(4650),l=s(3238),b=s(2687),u=s(1281),p=s(4006);const n=["input"],c=function(i){return{enterDuration:i}},r=["*"],f=new e.OlP("mat-slide-toggle-default-options",{providedIn:"root",factory:()=>({disableToggleValue:!1})});let C=0;const y={provide:p.JU,useExisting:(0,e.Gpc)(()=>T),multi:!0};class E{constructor(o,t){this.source=o,this.checked=t}}const D=(0,l.sb)((0,l.pj)((0,l.Kr)((0,l.Id)(class{constructor(i){this._elementRef=i}}))));let R=(()=>{class i extends D{constructor(t,a,d,g,h,v,O){super(t),this._focusMonitor=a,this._changeDetectorRef=d,this.defaults=h,this._onChange=S=>{},this._onTouched=()=>{},this._required=!1,this._checked=!1,this.name=null,this.labelPosition="after",this.ariaLabel=null,this.ariaLabelledby=null,this.change=new e.vpe,this.toggleChange=new e.vpe,this.tabIndex=parseInt(g)||0,this.color=this.defaultColor=h.color||"accent",this._noopAnimations="NoopAnimations"===v,this.id=this._uniqueId=`${O}${++C}`}get required(){return this._required}set required(t){this._required=(0,u.Ig)(t)}get checked(){return this._checked}set checked(t){this._checked=(0,u.Ig)(t),this._changeDetectorRef.markForCheck()}get inputId(){return`${this.id||this._uniqueId}-input`}ngAfterContentInit(){this._focusMonitor.monitor(this._elementRef,!0).subscribe(t=>{"keyboard"===t||"program"===t?this._focused=!0:t||Promise.resolve().then(()=>{this._focused=!1,this._onTouched(),this._changeDetectorRef.markForCheck()})})}ngOnDestroy(){this._focusMonitor.stopMonitoring(this._elementRef)}writeValue(t){this.checked=!!t}registerOnChange(t){this._onChange=t}registerOnTouched(t){this._onTouched=t}setDisabledState(t){this.disabled=t,this._changeDetectorRef.markForCheck()}toggle(){this.checked=!this.checked,this._onChange(this.checked)}_emitChangeEvent(){this._onChange(this.checked),this.change.emit(this._createChangeEvent(this.checked))}}return i.\u0275fac=function(t){e.$Z()},i.\u0275dir=e.lG2({type:i,inputs:{name:"name",id:"id",labelPosition:"labelPosition",ariaLabel:["aria-label","ariaLabel"],ariaLabelledby:["aria-labelledby","ariaLabelledby"],ariaDescribedby:["aria-describedby","ariaDescribedby"],required:"required",checked:"checked"},outputs:{change:"change",toggleChange:"toggleChange"},features:[e.qOj]}),i})(),T=(()=>{class i extends R{constructor(t,a,d,g,h,v){super(t,a,d,g,h,v,"mat-slide-toggle-")}_createChangeEvent(t){return new E(this,t)}_onChangeEvent(t){t.stopPropagation(),this.toggleChange.emit(),this.defaults.disableToggleValue?this._inputElement.nativeElement.checked=this.checked:(this.checked=this._inputElement.nativeElement.checked,this._emitChangeEvent())}_onInputClick(t){t.stopPropagation()}focus(t,a){a?this._focusMonitor.focusVia(this._inputElement,a,t):this._inputElement.nativeElement.focus(t)}_onLabelTextChange(){this._changeDetectorRef.detectChanges()}}return i.\u0275fac=function(t){return new(t||i)(e.Y36(e.SBq),e.Y36(b.tE),e.Y36(e.sBO),e.$8M("tabindex"),e.Y36(f),e.Y36(e.QbO,8))},i.\u0275cmp=e.Xpm({type:i,selectors:[["mat-slide-toggle"]],viewQuery:function(t,a){if(1&t&&e.Gf(n,5),2&t){let d;e.iGM(d=e.CRH())&&(a._inputElement=d.first)}},hostAttrs:[1,"mat-slide-toggle"],hostVars:13,hostBindings:function(t,a){2&t&&(e.Ikx("id",a.id),e.uIk("tabindex",null)("aria-label",null)("aria-labelledby",null)("name",null),e.ekj("mat-checked",a.checked)("mat-disabled",a.disabled)("mat-slide-toggle-label-before","before"==a.labelPosition)("_mat-animation-noopable",a._noopAnimations))},inputs:{disabled:"disabled",disableRipple:"disableRipple",color:"color",tabIndex:"tabIndex"},exportAs:["matSlideToggle"],features:[e._Bn([y]),e.qOj],ngContentSelectors:r,decls:14,vars:20,consts:[[1,"mat-slide-toggle-label"],["label",""],[1,"mat-slide-toggle-bar"],["type","checkbox","role","switch",1,"mat-slide-toggle-input","cdk-visually-hidden",3,"id","required","tabIndex","checked","disabled","change","click"],["input",""],[1,"mat-slide-toggle-thumb-container"],[1,"mat-slide-toggle-thumb"],["mat-ripple","",1,"mat-slide-toggle-ripple","mat-focus-indicator",3,"matRippleTrigger","matRippleDisabled","matRippleCentered","matRippleRadius","matRippleAnimation"],[1,"mat-ripple-element","mat-slide-toggle-persistent-ripple"],[1,"mat-slide-toggle-content",3,"cdkObserveContent"],["labelContent",""],[2,"display","none"]],template:function(t,a){if(1&t&&(e.F$t(),e.TgZ(0,"label",0,1)(2,"span",2)(3,"input",3,4),e.NdJ("change",function(g){return a._onChangeEvent(g)})("click",function(g){return a._onInputClick(g)}),e.qZA(),e.TgZ(5,"span",5),e._UZ(6,"span",6),e.TgZ(7,"span",7),e._UZ(8,"span",8),e.qZA()()(),e.TgZ(9,"span",9,10),e.NdJ("cdkObserveContent",function(){return a._onLabelTextChange()}),e.TgZ(11,"span",11),e._uU(12,"\xa0"),e.qZA(),e.Hsn(13),e.qZA()()),2&t){const d=e.MAs(1),g=e.MAs(10);e.uIk("for",a.inputId),e.xp6(2),e.ekj("mat-slide-toggle-bar-no-side-margin",!g.textContent||!g.textContent.trim()),e.xp6(1),e.Q6J("id",a.inputId)("required",a.required)("tabIndex",a.tabIndex)("checked",a.checked)("disabled",a.disabled),e.uIk("name",a.name)("aria-checked",a.checked)("aria-label",a.ariaLabel)("aria-labelledby",a.ariaLabelledby)("aria-describedby",a.ariaDescribedby),e.xp6(4),e.Q6J("matRippleTrigger",d)("matRippleDisabled",a.disableRipple||a.disabled)("matRippleCentered",!0)("matRippleRadius",20)("matRippleAnimation",e.VKq(18,c,a._noopAnimations?0:150))}},dependencies:[l.wG,m.wD],styles:[".mat-slide-toggle{display:inline-block;height:24px;max-width:100%;line-height:24px;white-space:nowrap;outline:none;-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-slide-toggle.mat-checked .mat-slide-toggle-thumb-container{transform:translate3d(16px, 0, 0)}[dir=rtl] .mat-slide-toggle.mat-checked .mat-slide-toggle-thumb-container{transform:translate3d(-16px, 0, 0)}.mat-slide-toggle.mat-disabled{opacity:.38}.mat-slide-toggle.mat-disabled .mat-slide-toggle-label,.mat-slide-toggle.mat-disabled .mat-slide-toggle-thumb-container{cursor:default}.mat-slide-toggle-label{-webkit-user-select:none;user-select:none;display:flex;flex:1;flex-direction:row;align-items:center;height:inherit;cursor:pointer}.mat-slide-toggle-content{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mat-slide-toggle-label-before .mat-slide-toggle-label{order:1}.mat-slide-toggle-label-before .mat-slide-toggle-bar{order:2}[dir=rtl] .mat-slide-toggle-label-before .mat-slide-toggle-bar,.mat-slide-toggle-bar{margin-right:8px;margin-left:0}[dir=rtl] .mat-slide-toggle-bar,.mat-slide-toggle-label-before .mat-slide-toggle-bar{margin-left:8px;margin-right:0}.mat-slide-toggle-bar-no-side-margin{margin-left:0;margin-right:0}.mat-slide-toggle-thumb-container{position:absolute;z-index:1;width:20px;height:20px;top:-3px;left:0;transform:translate3d(0, 0, 0);transition:all 80ms linear;transition-property:transform}._mat-animation-noopable .mat-slide-toggle-thumb-container{transition:none}[dir=rtl] .mat-slide-toggle-thumb-container{left:auto;right:0}.mat-slide-toggle-thumb{height:20px;width:20px;border-radius:50%;display:block}.mat-slide-toggle-bar{position:relative;width:36px;height:14px;flex-shrink:0;border-radius:8px}.mat-slide-toggle-input{bottom:0;left:10px}[dir=rtl] .mat-slide-toggle-input{left:auto;right:10px}.mat-slide-toggle-bar,.mat-slide-toggle-thumb{transition:all 80ms linear;transition-property:background-color;transition-delay:50ms}._mat-animation-noopable .mat-slide-toggle-bar,._mat-animation-noopable .mat-slide-toggle-thumb{transition:none}.mat-slide-toggle .mat-slide-toggle-ripple{position:absolute;top:calc(50% - 20px);left:calc(50% - 20px);height:40px;width:40px;z-index:1;pointer-events:none}.mat-slide-toggle .mat-slide-toggle-ripple .mat-ripple-element:not(.mat-slide-toggle-persistent-ripple){opacity:.12}.mat-slide-toggle-persistent-ripple{width:100%;height:100%;transform:none}.mat-slide-toggle-bar:hover .mat-slide-toggle-persistent-ripple{opacity:.04}.mat-slide-toggle:not(.mat-disabled).cdk-keyboard-focused .mat-slide-toggle-persistent-ripple{opacity:.12}.mat-slide-toggle-persistent-ripple,.mat-slide-toggle.mat-disabled .mat-slide-toggle-bar:hover .mat-slide-toggle-persistent-ripple{opacity:0}@media(hover: none){.mat-slide-toggle-bar:hover .mat-slide-toggle-persistent-ripple{display:none}}.cdk-high-contrast-active .mat-slide-toggle-thumb,.cdk-high-contrast-active .mat-slide-toggle-bar{border:1px solid}.cdk-high-contrast-active .mat-slide-toggle.cdk-keyboard-focused .mat-slide-toggle-bar{outline:2px dotted;outline-offset:5px}"],encapsulation:2,changeDetection:0}),i})(),M=(()=>{class i{}return i.\u0275fac=function(t){return new(t||i)},i.\u0275mod=e.oAB({type:i}),i.\u0275inj=e.cJS({}),i})(),I=(()=>{class i{}return i.\u0275fac=function(t){return new(t||i)},i.\u0275mod=e.oAB({type:i}),i.\u0275inj=e.cJS({imports:[M,l.si,l.BQ,m.Q8,M,l.BQ]}),i})()}}]);
|