marketplacepos 2.5.0 → 2.5.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/117.4367f8afe2698e0a.js +1 -0
- package/Marketplace/{162.380fb02c77fa6ec0.js → 162.1e1c36c1ada2acc3.js} +1 -1
- package/Marketplace/{174.d9e54ac6a8d68fed.js → 174.fb88c636b62288f3.js} +1 -1
- package/Marketplace/{180.bfed0f08b5cdbbde.js → 180.dbbf0c10ee5511ad.js} +1 -1
- package/Marketplace/{25.5e00713dbd080b64.js → 25.6dd4d4cee1f4f83c.js} +1 -1
- package/Marketplace/291.304a30789207d7b4.js +1 -0
- package/Marketplace/{360.4fa1f449dc516500.js → 360.9a9cbdee19ee7208.js} +1 -1
- package/Marketplace/397.9488b7c2d948b1be.js +1 -0
- package/Marketplace/3rdpartylicenses.txt +63 -0
- package/Marketplace/{463.7140b32660c473a4.js → 463.20f700792417e3ee.js} +1 -1
- package/Marketplace/{512.96a1a3c8c51a8727.js → 512.945d0618102b5e2d.js} +1 -1
- package/Marketplace/545.4cff8354a6569325.js +1 -0
- package/Marketplace/585.41532f91419a22f2.js +1 -0
- package/Marketplace/{616.fb179a9605c3e98c.js → 616.f27780a637620732.js} +1 -1
- package/Marketplace/663.dc31188909c42de4.js +1 -0
- package/Marketplace/{716.65e3e9a36c3e8be6.js → 716.8753639575454fc2.js} +1 -1
- package/Marketplace/{717.ea775a267d795788.js → 717.de25d206cb2de0f8.js} +1 -1
- package/Marketplace/{739.82b92600f9519019.js → 739.8a763e7ab64fe945.js} +1 -1
- package/Marketplace/{832.6082371d3ebb95a0.js → 832.886dc486c5a4ff32.js} +1 -1
- package/Marketplace/{874.472e0cd7c75127ca.js → 874.89ed6b644dee8914.js} +1 -1
- package/Marketplace/assets/bootstrap_light.scss +1142 -1142
- package/Marketplace/assets/floatingLabel.scss +187 -187
- package/Marketplace/assets/lbd/_alerts.scss +90 -90
- package/Marketplace/assets/lbd/_bootstrap-switch.scss +128 -128
- package/Marketplace/assets/lbd/_buttons.scss +132 -132
- package/Marketplace/assets/lbd/_cards.scss +256 -256
- package/Marketplace/assets/lbd/_chartist.scss +229 -229
- package/Marketplace/assets/lbd/_checkbox-radio-switch.scss +140 -140
- package/Marketplace/assets/lbd/_dropdown.scss +137 -137
- package/Marketplace/assets/lbd/_footers.scss +75 -75
- package/Marketplace/assets/lbd/_inputs.scss +141 -141
- package/Marketplace/assets/lbd/_misc.scss +120 -120
- package/Marketplace/assets/lbd/_mixins.scss +8 -8
- package/Marketplace/assets/lbd/_navbars.scss +235 -235
- package/Marketplace/assets/lbd/_partial-nucleo-icons.scss +574 -574
- package/Marketplace/assets/lbd/_responsive.scss +482 -482
- package/Marketplace/assets/lbd/_sidebar-and-main-panel.scss +333 -333
- package/Marketplace/assets/lbd/_tables.scss +88 -88
- package/Marketplace/assets/lbd/_typography.scss +91 -91
- package/Marketplace/assets/lbd/_variables.scss +272 -272
- package/Marketplace/assets/lbd/mixins/_buttons.scss +69 -69
- package/Marketplace/assets/lbd/mixins/_cards.scss +8 -8
- package/Marketplace/assets/lbd/mixins/_chartist.scss +87 -87
- package/Marketplace/assets/lbd/mixins/_icons.scss +12 -12
- package/Marketplace/assets/lbd/mixins/_inputs.scss +1 -1
- package/Marketplace/assets/lbd/mixins/_labels.scss +20 -20
- package/Marketplace/assets/lbd/mixins/_morphing-buttons.scss +33 -33
- package/Marketplace/assets/lbd/mixins/_navbars.scss +11 -11
- package/Marketplace/assets/lbd/mixins/_social-buttons.scss +42 -42
- package/Marketplace/assets/lbd/mixins/_tabs.scss +3 -3
- package/Marketplace/assets/lbd/mixins/_transparency.scss +19 -19
- package/Marketplace/assets/lbd/mixins/_vendor-prefixes.scss +211 -211
- package/Marketplace/assets/lbd/plugins/_animate.scss +227 -227
- package/Marketplace/assets/lbd/plugins/_datetime-picker.scss +463 -463
- package/Marketplace/assets/light-bootstrap-dashboard.scss +32 -32
- package/Marketplace/assets/pos_variable.scss +83 -83
- package/Marketplace/assets/sitemap.json +39 -39
- package/Marketplace/assets/stepper-custom.scss +32 -32
- package/Marketplace/assets/variables-custom.scss +190 -190
- package/Marketplace/assets/version-adjustment-v5.scss +286 -286
- package/Marketplace/index.html +2 -2
- package/Marketplace/main.82c99b5c79f1fd9c.js +1 -0
- package/Marketplace/runtime.6d4d6c7e2c139e6c.js +1 -0
- package/package.json +1 -1
- package/Marketplace/32.9c83cc1dfc19e37d.js +0 -1
- package/Marketplace/369.9e98af5ff042d408.js +0 -1
- package/Marketplace/397.017f0dd05d9d37c5.js +0 -1
- package/Marketplace/585.9e916b668a91cc94.js +0 -1
- package/Marketplace/6.fc79ecc0c0a33462.js +0 -1
- package/Marketplace/main.5d7fbf88ea2e3736.js +0 -1
- package/Marketplace/runtime.7fbde9d6c7315628.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkpos_marketplace=self.webpackChunkpos_marketplace||[]).push([[832],{1832:(ie,Z,d)=>{d.r(Z),d.d(Z,{LogsModule:()=>ne});var s=d(6895),e=d(4650),p=d(8252),v=d(7398);let y=(()=>{class o{constructor(){this.ObjectlogTabs=[{Title:"Sync Orders",Url:"/menu/log/order"},{Title:"Inventory Log ",Url:"/menu/log/inventory"},{Title:"Marketplace Webhook ",Url:"/menu/log/rawlog"},{Title:"Application Exception ",Url:"/menu/log/exception"}]}ngOnInit(){}}return o.\u0275fac=function(t){return new(t||o)},o.\u0275cmp=e.Xpm({type:o,selectors:[["app-logs"]],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.ObjectlogTabs))},dependencies:[p.lC,v.e]}),o})();var g=d(8063),c=d(1318);let h=(()=>{class o{constructor(){}get Data(){return this._Data}set Data(t){this._Data=t}Fill(t){return this._Data.find(n=>n._id==t)}}return o.\u0275fac=function(t){return new(t||o)},o.\u0275prov=e.Yz7({token:o,factory:o.\u0275fac,providedIn:"root"}),o})();var l=d(4006),u=d(7481),m=d(8739),T=d(8796),f=d(5585);const b=function(){return["/menu/log/order/detail"]},A=function(o){return{ID:o}},q=function(o,r){return{"bg-warning":o,"bg-success":r}};function O(o,r){if(1&o&&(e.TgZ(0,"tr")(1,"td")(2,"a",17),e._uU(3),e.ALo(4,"date"),e.qZA()(),e.TgZ(5,"td"),e._uU(6),e.qZA(),e.TgZ(7,"td"),e._uU(8),e.qZA(),e.TgZ(9,"td"),e._uU(10),e.qZA(),e.TgZ(11,"td")(12,"span",18),e._uU(13),e.qZA()()()),2&o){const t=r.$implicit;e.xp6(2),e.Q6J("routerLink",e.DdM(11,b))("queryParams",e.VKq(12,A,t.ID)),e.xp6(1),e.hij(" ",e.xi3(4,8,t.Created,"dd MMM yyyy HH:mm")," "),e.xp6(3),e.Oqu(t.MarketTypeString),e.xp6(2),e.Oqu(t.POSActionTypeString),e.xp6(2),e.Oqu(t.Number),e.xp6(2),e.Q6J("ngClass",e.WLB(14,q,200!==t.ResponseCode,200===t.ResponseCode)),e.xp6(1),e.Oqu(t.ResponseCode)}}let L=(()=>{class o{constructor(t,n,i){this.http=t,this._RawLogService=n,this.route=i,this.Result=Array(),this.filter={RowCount:20,Number:"",PageNumber:1,ActionType:"",ChannelID:"",StatusCode:"",From:"",To:""}}ngOnInit(){this.route.queryParams.subscribe(t=>{this.responseCode=t.responseCode,null!=this.responseCode?this.Load(t):this.Load()})}Load(t={}){this.http.post("/api/OrdersLoader/Get",t).subscribe(n=>{this.filter=n.Filter,this.Channel=n.Options.Channel,this.ActionTypeList=n.Options.ActionTypeList,this.Get()})}Get(t){this.filter.Number=t,this.http.post("/api/Orders/Get",this.filter).subscribe(n=>{this._RawLogService.Data=n.hits,this.Result=Array();for(let i of n.hits)this.Result.push({ID:i._id,Created:i._source["@timestamp_received"],shopId:i._source.shopId,MarketTypeString:i._source.log.type,POSActionTypeString:i._source.message,Number:i._source.log.number,ResponseCode:i._source.log.responseCode});this.paginationTotal=n.total.value,this.paginationPageSize=this.filter.RowCount>this.paginationTotal?this.paginationTotal:this.filter.RowCount})}changePage(t){this.filter.PageNumber=t.pageIndex+1,this.Get()}}return o.\u0275fac=function(t){return new(t||o)(e.Y36(c.O),e.Y36(h),e.Y36(p.gz))},o.\u0275cmp=e.Xpm({type:o,selectors:[["app-order"]],decls:49,vars:17,consts:[["searchBoxPlaceHolder","Invoice Number..",3,"headerTitle","text","textChange","onSubmit"],["container",""],["bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"clearable","items","ngModel","ngModelChange"],["bindLabel","Value","name","ActionType","bindValue","Key","placeholder","Action Type",1,"center-text",3,"clearable","items","ngModel","ngModelChange"],["name","From",3,"date","dateChange"],["name","To",3,"date","dateChange"],["type","text","name","StatusCode",1,"w-100",3,"ngModel","ngModelChange"],["type","number","name","PageNumber",1,"w-100",3,"ngModel","ngModelChange"],["type","number","name","RowCount",1,"w-100",3,"ngModel","ngModelChange"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"table","table-hover"],[1,"table-light"],[4,"ngFor","ngForOf"],[3,"length","pageSize","pageIndex","page"],[3,"routerLink","queryParams"],[1,"text-white","p-1","rounded","response-desc",3,"ngClass"]],template:function(t,n){1&t&&(e.TgZ(0,"mainpanel",0),e.NdJ("textChange",function(a){return n.Number=a})("onSubmit",function(a){return n.Get(a)}),e.TgZ(1,"filters")(2,"div",1)(3,"div")(4,"h6"),e._uU(5,"Channel"),e.qZA(),e.TgZ(6,"ng-select",2),e.NdJ("ngModelChange",function(a){return n.filter.ChannelID=a}),e.qZA()(),e.TgZ(7,"div")(8,"h6"),e._uU(9,"Action"),e.qZA(),e.TgZ(10,"ng-select",3),e.NdJ("ngModelChange",function(a){return n.filter.ActionType=a}),e.qZA()(),e.TgZ(11,"div")(12,"h6"),e._uU(13,"From/To"),e.qZA(),e.TgZ(14,"datepicker",4),e.NdJ("dateChange",function(a){return n.filter.From=a}),e.qZA(),e.TgZ(15,"datepicker",5),e.NdJ("dateChange",function(a){return n.filter.To=a}),e.qZA()(),e.TgZ(16,"div")(17,"h6"),e._uU(18,"Response Code"),e.qZA(),e.TgZ(19,"input",6),e.NdJ("ngModelChange",function(a){return n.filter.StatusCode=a}),e.qZA()(),e.TgZ(20,"div")(21,"h6"),e._uU(22,"Page Number"),e.qZA(),e.TgZ(23,"input",7),e.NdJ("ngModelChange",function(a){return n.filter.PageNumber=a}),e.qZA()(),e.TgZ(24,"div")(25,"h6"),e._uU(26,"Page Size"),e.qZA(),e.TgZ(27,"input",8),e.NdJ("ngModelChange",function(a){return n.filter.RowCount=a}),e.qZA()()()(),e.TgZ(28,"content")(29,"div",9)(30,"div",10)(31,"div",11)(32,"div",12)(33,"table",13)(34,"thead")(35,"tr",14)(36,"th"),e._uU(37,"Date"),e.qZA(),e.TgZ(38,"th"),e._uU(39,"Channel"),e.qZA(),e.TgZ(40,"th"),e._uU(41,"Actions"),e.qZA(),e.TgZ(42,"th"),e._uU(43,"Number"),e.qZA(),e.TgZ(44,"th"),e._uU(45,"Code"),e.qZA()()(),e.TgZ(46,"tbody"),e.YNc(47,O,14,17,"tr",15),e.qZA()(),e.TgZ(48,"mat-paginator",16),e.NdJ("page",function(a){return n.changePage(a)}),e.qZA()()()()()()()),2&t&&(e.Q6J("headerTitle","Order Log")("text",n.Number),e.xp6(6),e.Q6J("clearable",!0)("items",n.Channel)("ngModel",n.filter.ChannelID),e.xp6(4),e.Q6J("clearable",!0)("items",n.ActionTypeList)("ngModel",n.filter.ActionType),e.xp6(4),e.Q6J("date",n.filter.From),e.xp6(1),e.Q6J("date",n.filter.To),e.xp6(4),e.Q6J("ngModel",n.filter.StatusCode),e.xp6(4),e.Q6J("ngModel",n.filter.PageNumber),e.xp6(4),e.Q6J("ngModel",n.filter.RowCount),e.xp6(20),e.Q6J("ngForOf",n.Result),e.xp6(1),e.Q6J("length",n.paginationTotal)("pageSize",n.paginationPageSize)("pageIndex",0==(null==n.filter?null:n.filter.PageNumber)?0:(null==n.filter?null:n.filter.PageNumber)-1))},dependencies:[s.mk,s.sg,l.Fj,l.wV,l.JJ,l.On,p.yS,u.p,m.NW,T.w9,f.QB,s.uU]}),o})();const U=function(){return["/menu/log/inventory/detail"]},S=function(o){return{ID:o}};function I(o,r){if(1&o&&(e.TgZ(0,"tr")(1,"td")(2,"a",15),e._uU(3),e.ALo(4,"date"),e.qZA()(),e.TgZ(5,"td"),e._uU(6),e.qZA(),e.TgZ(7,"td"),e._uU(8),e.qZA(),e.TgZ(9,"td"),e._uU(10),e.qZA(),e.TgZ(11,"td"),e._uU(12),e.qZA()()),2&o){const t=r.$implicit;e.xp6(2),e.Q6J("routerLink",e.DdM(10,U))("queryParams",e.VKq(11,S,t.ID)),e.xp6(1),e.hij(" ",e.xi3(4,7,t.Created,"dd MMM yyyy HH:mm")," "),e.xp6(3),e.Oqu(t.channelName),e.xp6(2),e.Oqu(t.Sku),e.xp6(2),e.Oqu(t.Stock),e.xp6(2),e.Oqu(t.ResponseCode)}}let w=(()=>{class o{constructor(t,n){this.http=t,this._RawLogService=n,this.Result=Array(),this.filter={PageNumber:0,RowCount:20,Sku:null,ChannelID:"",StatusCode:"",From:"",To:""},this.Load()}ngOnInit(){}Load(){this.http.post("/api/OrdersLoader/Get",{}).subscribe(t=>{this.filter=t.Filter,this.Channel=t.Options.Channel,this.ActionTypeList=t.Options.ActionTypeList,this.Get()})}Get(t){null!=t&&(this.filter.Sku=t),this.http.post("api/Inventory/GetLog",this.filter).subscribe(n=>{this._RawLogService.Data=n.hits,this.Result=Array();for(let i of n.hits)this.Result.push({ID:i._source.log.id,Created:i._source["@timestamp_received"],channelName:i._source.log.channelName,Sku:i._source.log.sku,Stock:i._source.log.stock,ResponseCode:i._source.log.responseCode});this.paginationTotal=n.total.value,this.paginationPageSize=this.filter.RowCount>this.paginationTotal?this.paginationTotal:this.filter.RowCount,this.paginationTotal=n.total.value,this.paginationPageSize=this.filter.RowCount>this.paginationTotal?this.paginationTotal:this.filter.RowCount})}changePage(t){this.filter.PageNumber=t.pageIndex+1,this.Get()}}return o.\u0275fac=function(t){return new(t||o)(e.Y36(c.O),e.Y36(h))},o.\u0275cmp=e.Xpm({type:o,selectors:[["app-inventory-log"]],decls:41,vars:13,consts:[["searchBoxPlaceHolder","Enter SKU...",3,"headerTitle","text","textChange","onSubmit"],["container",""],["bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"clearable","items","ngModel","ngModelChange"],["name","From",3,"date","dateChange"],["name","To",3,"date","dateChange"],["type","number","name","PageNumber",1,"w-100",3,"ngModel","ngModelChange"],["type","number","name","RowCount",1,"w-100",3,"ngModel","ngModelChange"],[1,"container-fluid","mt=3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"table","table-hover"],[1,"table-light"],[4,"ngFor","ngForOf"],[3,"length","pageSize","pageIndex","page"],[3,"routerLink","queryParams"]],template:function(t,n){1&t&&(e.TgZ(0,"mainpanel",0),e.NdJ("textChange",function(a){return n.filter.Sku=a})("onSubmit",function(a){return n.Get(a)}),e.TgZ(1,"filters")(2,"div",1)(3,"div")(4,"h6"),e._uU(5,"Channel"),e.qZA(),e.TgZ(6,"ng-select",2),e.NdJ("ngModelChange",function(a){return n.filter.ChannelID=a}),e.qZA()(),e.TgZ(7,"div")(8,"h6"),e._uU(9,"From/To"),e.qZA(),e.TgZ(10,"datepicker",3),e.NdJ("dateChange",function(a){return n.filter.From=a}),e.qZA(),e.TgZ(11,"datepicker",4),e.NdJ("dateChange",function(a){return n.filter.To=a}),e.qZA()(),e.TgZ(12,"div")(13,"h6"),e._uU(14,"Page Number"),e.qZA(),e.TgZ(15,"input",5),e.NdJ("ngModelChange",function(a){return n.filter.PageNumber=a}),e.qZA()(),e.TgZ(16,"div")(17,"h6"),e._uU(18,"Page Size"),e.qZA(),e.TgZ(19,"input",6),e.NdJ("ngModelChange",function(a){return n.filter.RowCount=a}),e.qZA()()()(),e.TgZ(20,"content")(21,"div",7)(22,"div",8)(23,"div",9)(24,"div",10)(25,"table",11)(26,"thead")(27,"tr",12)(28,"th"),e._uU(29,"Created"),e.qZA(),e.TgZ(30,"th"),e._uU(31,"Channel"),e.qZA(),e.TgZ(32,"th"),e._uU(33,"SKU"),e.qZA(),e.TgZ(34,"th"),e._uU(35,"Stock"),e.qZA(),e.TgZ(36,"th"),e._uU(37,"Response code"),e.qZA()()(),e.TgZ(38,"tbody"),e.YNc(39,I,13,13,"tr",13),e.qZA()(),e.TgZ(40,"mat-paginator",14),e.NdJ("page",function(a){return n.changePage(a)}),e.qZA()()()()()()()),2&t&&(e.Q6J("headerTitle","Inventory Log")("text",n.filter.Sku),e.xp6(6),e.Q6J("clearable",!0)("items",n.Channel)("ngModel",n.filter.ChannelID),e.xp6(4),e.Q6J("date",n.filter.From),e.xp6(1),e.Q6J("date",n.filter.To),e.xp6(4),e.Q6J("ngModel",n.filter.PageNumber),e.xp6(4),e.Q6J("ngModel",n.filter.RowCount),e.xp6(20),e.Q6J("ngForOf",n.Result),e.xp6(1),e.Q6J("length",n.paginationTotal)("pageSize",n.paginationPageSize)("pageIndex",0==(null==n.filter?null:n.filter.PageNumber)?0:(null==n.filter?null:n.filter.PageNumber)-1))},dependencies:[s.sg,l.Fj,l.wV,l.JJ,l.On,p.yS,u.p,m.NW,T.w9,f.QB,s.uU]}),o})();const N=function(){return["/menu/log/order/detail"]},R=function(o){return{ID:o}};function D(o,r){if(1&o&&(e.TgZ(0,"tr")(1,"td")(2,"a",16),e._uU(3),e.ALo(4,"date"),e.qZA()(),e.TgZ(5,"td"),e._uU(6),e.qZA(),e.TgZ(7,"td"),e._uU(8),e.qZA(),e.TgZ(9,"td"),e._uU(10),e.qZA()()),2&o){const t=r.$implicit;e.xp6(2),e.Q6J("routerLink",e.DdM(9,N))("queryParams",e.VKq(10,R,t.id)),e.xp6(1),e.hij(" ",e.xi3(4,6,t.Created,"dd MMM yyyy HH:mm")," "),e.xp6(3),e.Oqu(t.type),e.xp6(2),e.Oqu(t.number),e.xp6(2),e.Oqu(t.message)}}function M(o,r){if(1&o){const t=e.EpF();e.TgZ(0,"div",8)(1,"div",9)(2,"div",10)(3,"table",11)(4,"thead",12)(5,"tr")(6,"th",13),e._uU(7,"Date"),e.qZA(),e.TgZ(8,"th"),e._uU(9,"Type"),e.qZA(),e.TgZ(10,"th"),e._uU(11,"Number"),e.qZA(),e.TgZ(12,"th"),e._uU(13,"Message"),e.qZA()()(),e.TgZ(14,"tbody"),e.YNc(15,D,11,12,"tr",14),e.qZA()(),e.TgZ(16,"mat-paginator",15),e.NdJ("page",function(i){e.CHM(t);const a=e.oxw();return e.KtG(a.changePage(i))}),e.qZA()()()()}if(2&o){const t=e.oxw();e.xp6(15),e.Q6J("ngForOf",t.Result),e.xp6(1),e.Q6J("length",t.paginationTotal)("pageSize",t.paginationPageSize)("pageIndex",0==(null==t.filter?null:t.filter.PageNumber)?0:(null==t.filter?null:t.filter.PageNumber)-1)}}let x=(()=>{class o{constructor(t,n){this.http=t,this._RawLogService=n,this.Result=Array(),this.filter={RowCount:20,Number:"",PageNumber:1,ActionType:"",ChannelID:"",StatusCode:"",From:"",To:""},this.list=[],this.Types=[{Key:0,Value:"Shopee"},{Key:1,Value:"Tokopedia"}]}ngOnInit(){this.Load()}Load(t={}){this.http.post("/api/OrdersLoader/Get",t).subscribe(n=>{this.filter=n.Filter,this.Channel=n.Options.Channel,this.ActionTypeList=n.Options.ActionTypeList,this.Get()})}Get(t){this.filter.Number=t,this.http.post("api/Orders/GetRawLog",this.filter).subscribe(n=>{this._RawLogService.Data=n.hits,this.Result=Array();for(let i of n.hits)this.Result.push({id:i._id,message:i._source.message,responseCode:i._source.log.responseCode,processTypeString:i._source.log.processType,type:i._source.log.type,number:i._source.log.number,Created:i._source["@timestamp_received"]});this.paginationTotal=n.total.value,this.paginationPageSize=this.filter.RowCount>this.paginationTotal?this.paginationTotal:this.filter.RowCount})}changePage(t){this.filter.PageNumber=t.pageIndex+1,this.Get()}}return o.\u0275fac=function(t){return new(t||o)(e.Y36(c.O),e.Y36(h))},o.\u0275cmp=e.Xpm({type:o,selectors:[["app-raw-log"]],decls:22,vars:10,consts:[["searchBoxPlaceHolder","Invoice Number..",3,"headerTitle","text","textChange","onSubmit"],["container",""],["bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"clearable","items","ngModel","ngModelChange"],["name","From",3,"date","dateChange"],["name","To",3,"date","dateChange"],["type","number","name","PageNumber",1,"w-100",3,"ngModel","ngModelChange"],["type","number","name","RowCount",1,"w-100",3,"ngModel","ngModelChange"],["class","container-fluid mt-3",4,"ngIf"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table"],[1,"thead-light"],[2,"width","200px"],[4,"ngFor","ngForOf"],[3,"length","pageSize","pageIndex","page"],[3,"routerLink","queryParams"]],template:function(t,n){1&t&&(e.TgZ(0,"mainpanel",0),e.NdJ("textChange",function(a){return n.filter.Number=a})("onSubmit",function(a){return n.Get(a)}),e.TgZ(1,"filters")(2,"div",1)(3,"div")(4,"h6"),e._uU(5,"Channel"),e.qZA(),e.TgZ(6,"ng-select",2),e.NdJ("ngModelChange",function(a){return n.filter.ChannelID=a}),e.qZA()(),e.TgZ(7,"div")(8,"h6"),e._uU(9,"From/To"),e.qZA(),e.TgZ(10,"datepicker",3),e.NdJ("dateChange",function(a){return n.filter.From=a}),e.qZA(),e.TgZ(11,"datepicker",4),e.NdJ("dateChange",function(a){return n.filter.To=a}),e.qZA()(),e.TgZ(12,"div")(13,"h6"),e._uU(14,"Page Number"),e.qZA(),e.TgZ(15,"input",5),e.NdJ("ngModelChange",function(a){return n.filter.PageNumber=a}),e.qZA()(),e.TgZ(16,"div")(17,"h6"),e._uU(18,"Page Size"),e.qZA(),e.TgZ(19,"input",6),e.NdJ("ngModelChange",function(a){return n.filter.RowCount=a}),e.qZA()()()(),e.TgZ(20,"content"),e.YNc(21,M,17,4,"div",7),e.qZA()()),2&t&&(e.Q6J("headerTitle","Marketplace Webhook")("text",n.filter.Number),e.xp6(6),e.Q6J("clearable",!0)("items",n.Channel)("ngModel",n.filter.ChannelID),e.xp6(4),e.Q6J("date",n.filter.From),e.xp6(1),e.Q6J("date",n.filter.To),e.xp6(4),e.Q6J("ngModel",n.filter.PageNumber),e.xp6(4),e.Q6J("ngModel",n.filter.RowCount),e.xp6(2),e.Q6J("ngIf",n.Result.length>0))},dependencies:[s.sg,s.O5,l.Fj,l.wV,l.JJ,l.On,p.yS,u.p,m.NW,T.w9,f.QB,s.uU]}),o})();class J{constructor(r,t){this._document=t;const n=this._textarea=this._document.createElement("textarea"),i=n.style;i.position="fixed",i.top=i.opacity="0",i.left="-999em",n.setAttribute("aria-hidden","true"),n.value=r,this._document.body.appendChild(n)}copy(){const r=this._textarea;let t=!1;try{if(r){const n=this._document.activeElement;r.select(),r.setSelectionRange(0,r.value.length),t=this._document.execCommand("copy"),n&&n.focus()}}catch{}return t}destroy(){const r=this._textarea;r&&(r.remove(),this._textarea=void 0)}}let k=(()=>{class o{constructor(t){this._document=t}copy(t){const n=this.beginCopy(t),i=n.copy();return n.destroy(),i}beginCopy(t){return new J(t,this._document)}}return o.\u0275fac=function(t){return new(t||o)(e.LFG(s.K0))},o.\u0275prov=e.Yz7({token:o,factory:o.\u0275fac,providedIn:"root"}),o})();const P=new e.OlP("CDK_COPY_TO_CLIPBOARD_CONFIG");let F=(()=>{class o{constructor(t,n,i){this._clipboard=t,this._ngZone=n,this.text="",this.attempts=1,this.copied=new e.vpe,this._pending=new Set,i&&null!=i.attempts&&(this.attempts=i.attempts)}copy(t=this.attempts){if(t>1){let n=t;const i=this._clipboard.beginCopy(this.text);this._pending.add(i);const a=()=>{const _=i.copy();_||!--n||this._destroyed?(this._currentTimeout=null,this._pending.delete(i),i.destroy(),this.copied.emit(_)):this._currentTimeout=this._ngZone.runOutsideAngular(()=>setTimeout(a,1))};a()}else this.copied.emit(this._clipboard.copy(this.text))}ngOnDestroy(){this._currentTimeout&&clearTimeout(this._currentTimeout),this._pending.forEach(t=>t.destroy()),this._pending.clear(),this._destroyed=!0}}return o.\u0275fac=function(t){return new(t||o)(e.Y36(k),e.Y36(e.R0b),e.Y36(P,8))},o.\u0275dir=e.lG2({type:o,selectors:[["","cdkCopyToClipboard",""]],hostBindings:function(t,n){1&t&&e.NdJ("click",function(){return n.copy()})},inputs:{text:["cdkCopyToClipboard","text"],attempts:["cdkCopyToClipboardAttempts","attempts"]},outputs:{copied:"cdkCopyToClipboardCopied"}}),o})(),Q=(()=>{class o{}return o.\u0275fac=function(t){return new(t||o)},o.\u0275mod=e.oAB({type:o}),o.\u0275inj=e.cJS({}),o})();function Y(o,r){1&o&&e._UZ(0,"img",21)}function z(o,r){1&o&&e._UZ(0,"img",22)}function G(o,r){if(1&o&&(e.TgZ(0,"div",4)(1,"div",5)(2,"div",6)(3,"h5"),e._uU(4,"General"),e.qZA()(),e.TgZ(5,"div",7)(6,"div",2)(7,"div",8)(8,"div",9)(9,"label"),e._uU(10,"Date"),e.qZA(),e.TgZ(11,"div")(12,"span"),e._uU(13),e.ALo(14,"date"),e.qZA()()()(),e.TgZ(15,"div",10)(16,"div",9)(17,"label"),e._uU(18,"Market Place Type"),e.qZA(),e.YNc(19,Y,1,0,"img",11),e.YNc(20,z,1,0,"img",12),e.TgZ(21,"a",13)(22,"span",14),e._uU(23),e.qZA(),e._UZ(24,"br"),e.TgZ(25,"small",15),e._uU(26),e.qZA()()()(),e.TgZ(27,"div",10)(28,"div",9)(29,"label"),e._uU(30,"Number"),e.qZA(),e.TgZ(31,"div")(32,"span"),e._uU(33),e.qZA()()()(),e.TgZ(34,"div",8)(35,"div",9)(36,"label"),e._uU(37,"Process Type"),e.qZA(),e.TgZ(38,"div")(39,"span"),e._uU(40),e.qZA()()()(),e.TgZ(41,"div",4)(42,"div",9)(43,"label"),e._uU(44,"Authorization Header"),e.qZA(),e.TgZ(45,"div")(46,"span"),e._uU(47),e.qZA()()()(),e.TgZ(48,"div",16)(49,"div",5)(50,"div",17)(51,"div",18)(52,"h3"),e._uU(53,"Request"),e.qZA()(),e.TgZ(54,"div",19)(55,"button",20),e._uU(56,"Copy to clipboard"),e.qZA()()(),e.TgZ(57,"div",7),e._uU(58),e.qZA()()()()()()()),2&o){const t=e.oxw();e.xp6(13),e.Oqu(e.xi3(14,11,t.data.Created,"dd MMM yyyy HH:mm:ss")),e.xp6(6),e.Q6J("ngIf",1==t.data.TypeID),e.xp6(1),e.Q6J("ngIf",0==t.data.TypeID),e.xp6(1),e.s9C("href",t.data.ShopLink,e.LSH),e.xp6(2),e.Oqu(t.data.ShopName),e.xp6(3),e.Oqu(t.data.ShopLink),e.xp6(7),e.Oqu(t.data._source.log.number),e.xp6(7),e.Oqu(t.data._source.log.processType),e.xp6(7),e.Oqu(t.data._source.log.authorizationHeader),e.xp6(8),e.Q6J("cdkCopyToClipboard",t.data._source.log.request),e.xp6(3),e.hij(" ",t.data._source.log.request," ")}}function H(o,r){if(1&o&&(e.TgZ(0,"div",10)(1,"div",7)(2,"div",8)(3,"h5"),e._uU(4,"General"),e.qZA()(),e.TgZ(5,"div",9)(6,"div",3)(7,"div",6)(8,"div",12)(9,"label"),e._uU(10,"Date"),e.qZA(),e.TgZ(11,"div")(12,"span"),e._uU(13),e.ALo(14,"date"),e.qZA()()()(),e.TgZ(15,"div",6)(16,"div",12)(17,"label"),e._uU(18,"SKU"),e.qZA(),e.TgZ(19,"div")(20,"span"),e._uU(21),e.qZA()()()(),e.TgZ(22,"div",6)(23,"div",12)(24,"label"),e._uU(25,"Channel"),e.qZA(),e.TgZ(26,"div")(27,"span"),e._uU(28),e.qZA()()()(),e.TgZ(29,"div",6)(30,"div",12)(31,"label"),e._uU(32,"Response Code"),e.qZA(),e.TgZ(33,"div")(34,"span"),e._uU(35),e.qZA()()()()()()()()),2&o){const t=e.oxw();e.xp6(13),e.Oqu(e.xi3(14,4,t.data.Created,"dd MMM yyyy")),e.xp6(8),e.Oqu(t.data.Sku),e.xp6(7),e.Oqu(t.data.ChannelName),e.xp6(7),e.Oqu(t.data.ResponseCode)}}function j(o,r){if(1&o){const t=e.EpF();e.TgZ(0,"a",15),e.NdJ("click",function(){e.CHM(t);const i=e.oxw();return e.KtG(i.Retry())}),e._uU(1,"Retry"),e.qZA()}}function V(o,r){1&o&&e._UZ(0,"img",12)}function X(o,r){1&o&&e._UZ(0,"img",13)}function W(o,r){if(1&o&&(e.TgZ(0,"tr")(1,"td"),e.YNc(2,V,1,0,"img",9),e.YNc(3,X,1,0,"img",10),e.qZA(),e.TgZ(4,"td"),e._uU(5),e.qZA(),e.TgZ(6,"td"),e._uU(7),e.qZA(),e.TgZ(8,"td")(9,"div",11),e._uU(10),e.qZA(),e.TgZ(11,"div"),e._uU(12),e.qZA()()()),2&o){const t=r.$implicit;e.xp6(2),e.Q6J("ngIf",1==t.TypeID),e.xp6(1),e.Q6J("ngIf",0==t.TypeID),e.xp6(2),e.Oqu(t.Date),e.xp6(2),e.Oqu(t.Number),e.xp6(3),e.Oqu(t.message),e.xp6(2),e.Oqu(t.stackTrace)}}const ee=[{path:"",component:y,children:[{path:"",redirectTo:"order",pathMatch:"full"},{path:"order",component:L,canActivate:[g.a],data:{title:"Orders Log"}},{path:"inventory",component:w,canActivate:[g.a],data:{title:"Inventory Log"}},{path:"rawlog",component:x,canActivate:[g.a],data:{title:"Raw Log"}},{path:"rawlog/detail",component:(()=>{class o{constructor(t,n,i){this.route=t,this.http=n,this._RawLogService=i,this.route.queryParams.subscribe(a=>{let _=JSON.parse(localStorage.getItem("channel"));if(this.ID=a.ID,this.data=this._RawLogService.Fill(this.ID),this.data.Created=this.data._source["@timestamp_received"],_.length>0){const C=_.find(oe=>oe.ShopID==this.data._source.shopId);C?(this.data.TypeID=C.TypeID,this.data.ShopName=C.Name,this.data.ShopLink=C.URL):(this.data.TypeID=null,this.data.ShopName=null,this.data.ShopLink=null)}})}ngOnInit(){}}return o.\u0275fac=function(t){return new(t||o)(e.Y36(p.gz),e.Y36(c.O),e.Y36(h))},o.\u0275cmp=e.Xpm({type:o,selectors:[["app-raw-detail"]],decls:5,vars:4,consts:[[3,"headerTitle","hideSearchBox","hideSearchDropdown"],[1,"container-fluid","mt-2"],[1,"row"],["class","col-sm-12",4,"ngIf"],[1,"col-sm-12"],[1,"card"],[1,"card-header"],[1,"card-body"],[1,"col-sm-2"],[1,"info-label-group"],[1,"col-sm-4"],["class","me-2","src","https://res.cloudinary.com/pos/image/upload/v1598262221/icons/marketplace_icons/tokopedia.png",4,"ngIf"],["class","me-2","src","https://res.cloudinary.com/pos/image/upload/v1598262220/icons/marketplace_icons/shopee.png",4,"ngIf"],["target","_blank",3,"href"],[1,"fw-bold"],[1,"text-dark"],[1,"col-sm-12","mt-2"],[1,"card-header","d-lg-flex"],[1,"me-auto"],[1,"d-sm-block","mt-2"],[3,"cdkCopyToClipboard"],["src","https://res.cloudinary.com/pos/image/upload/v1598262221/icons/marketplace_icons/tokopedia.png",1,"me-2"],["src","https://res.cloudinary.com/pos/image/upload/v1598262220/icons/marketplace_icons/shopee.png",1,"me-2"]],template:function(t,n){1&t&&(e.TgZ(0,"mainpanel",0)(1,"content")(2,"div",1)(3,"div",2),e.YNc(4,G,59,14,"div",3),e.qZA()()()()),2&t&&(e.Q6J("headerTitle","Request Raw Log Detail")("hideSearchBox",!0)("hideSearchDropdown",!0),e.xp6(4),e.Q6J("ngIf",n.data))},dependencies:[s.O5,u.p,F,s.uU]}),o})(),canActivate:[g.a],data:{title:"Raw Log Detail"}},{path:"inventory/detail",component:(()=>{class o{constructor(t,n,i){this.route=t,this.http=n,this._RawLogService=i,this.data={Created:"",Sku:"",ChannelName:"",ResponseCode:""},this.route.queryParams.subscribe(a=>{this.ID=a.ID,this.Load()})}ngOnInit(){}Load(){this.http.post("/api/Inventory/GetInventoryLogDeatil",{ID:this.ID}).subscribe(n=>{this.data.Created=n.hits[0]._source["@timestamp_received"],this.data.Sku=n.hits[0]._source.log.sku,this.data.ChannelName=n.hits[0]._source.log.channelName,this.data.ResponseCode=n.hits[0]._source.log.responseCode,this.request=JSON.parse(n.hits[0]._source.log.request),this.response=n.hits[0]._source.log.response})}}return o.\u0275fac=function(t){return new(t||o)(e.Y36(p.gz),e.Y36(c.O),e.Y36(h))},o.\u0275cmp=e.Xpm({type:o,selectors:[["app-inventory-detail"]],decls:30,vars:9,consts:[[3,"headerTitle","pageData","hideSearchBox","hideSearchDropdown"],["role","button","routerLink","/menu/log/inventory",1,"btn","btn-secondary","btn-fill","btn-lg","me-3"],[1,"container-fluid","mt-3"],[1,"row"],["class","col-sm-12",4,"ngIf"],[1,"row","mt-2"],[1,"col-sm-6"],[1,"card"],[1,"card-header"],[1,"card-body"],[1,"col-sm-12"],[1,"form-group"],[1,"info-label-group"]],template:function(t,n){1&t&&(e.TgZ(0,"mainpanel",0)(1,"actions")(2,"a",1),e._uU(3,"Back"),e.qZA()(),e.TgZ(4,"content")(5,"div",2)(6,"div",3),e.YNc(7,H,36,7,"div",4),e.qZA(),e.TgZ(8,"div",5)(9,"div",6)(10,"div",7)(11,"div",8)(12,"h5"),e._uU(13,"Request"),e.qZA()(),e.TgZ(14,"div",9)(15,"div",10)(16,"div",11)(17,"pre"),e._uU(18),e.ALo(19,"json"),e.qZA()()()()()(),e.TgZ(20,"div",6)(21,"div",7)(22,"div",8)(23,"h5"),e._uU(24,"Response"),e.qZA()(),e.TgZ(25,"div",9)(26,"div",10)(27,"div",11)(28,"pre"),e._uU(29),e.qZA()()()()()()()()()()),2&t&&(e.Q6J("headerTitle","Inventory Detail")("pageData","Inventory Detail ")("hideSearchBox",!0)("hideSearchDropdown",!0),e.xp6(7),e.Q6J("ngIf",n.data),e.xp6(11),e.Oqu(e.lcZ(19,7,n.request)),e.xp6(11),e.Oqu(n.response))},dependencies:[s.O5,p.yS,u.p,s.Ts,s.uU]}),o})(),canActivate:[g.a],data:{title:"Inventory Details"}},{path:"order/detail",component:(()=>{class o{constructor(t,n){this.route=t,this.http=n,this.ProcessDuration=0,this.request="",this.response="",this.route.queryParams.subscribe(i=>{this.ID=i.ID,this.Load()})}ngOnInit(){}Retry(){this.http.post("/api/Orders/Retry",{ID:this.ID}).subscribe(n=>{alert(JSON.stringify(n))})}Load(){this.http.post("/api/Orders/GetDetail",{ID:this.ID}).subscribe(n=>{for(let i of n.hits)this.Number=i._source.log.number,this.MarketTypeString=i._source.log.type,this.ResponseCode=i._source.log.responseCode,this.POSActionTypeString=i._source.message,this.ProcessDuration=0,this.Created=i._source["@timestamp_received"],this.request=JSON.parse(i._source.log.request),this.response=JSON.parse(i._source.log.response),this.shopId=i._source.shopId})}}return o.\u0275fac=function(t){return new(t||o)(e.Y36(p.gz),e.Y36(c.O))},o.\u0275cmp=e.Xpm({type:o,selectors:[["app-orderdetail"]],decls:82,vars:20,consts:[[3,"headerTitle","pageData","hideSearchBox","hideSearchDropdown"],["role","button","routerLink","/menu/log/order",1,"btn","btn-secondary","btn-fill","btn-lg","me-3"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-sm-12"],[1,"card"],[1,"card-header"],[1,"card-body"],[1,"row","mt-7"],[1,"col-sm-6"],[1,"info-label-group"],[1,"row","mt-2"],[1,"form-group"],[1,"float-right"],["role","button","class","btn btn-success btn-fill btn-lg me-3",3,"click",4,"ngIf"],["role","button",1,"btn","btn-success","btn-fill","btn-lg","me-3",3,"click"]],template:function(t,n){1&t&&(e.TgZ(0,"mainpanel",0)(1,"actions")(2,"a",1),e._uU(3,"Back"),e.qZA()(),e.TgZ(4,"content")(5,"div",2)(6,"div",3)(7,"div",4)(8,"div",5)(9,"div",6)(10,"h5"),e._uU(11,"General"),e.qZA()(),e.TgZ(12,"div",7)(13,"div",8)(14,"div",9)(15,"div",10)(16,"label"),e._uU(17,"Date"),e.qZA(),e.TgZ(18,"div")(19,"span"),e._uU(20),e.ALo(21,"date"),e.qZA()()()(),e.TgZ(22,"div",9)(23,"div",10)(24,"label"),e._uU(25,"Number"),e.qZA(),e.TgZ(26,"div")(27,"span"),e._uU(28),e.qZA()()()(),e.TgZ(29,"div",9)(30,"div",10)(31,"label"),e._uU(32,"Type"),e.qZA(),e.TgZ(33,"div")(34,"span"),e._uU(35),e.qZA()()()(),e.TgZ(36,"div",9)(37,"div",10)(38,"label"),e._uU(39,"Response Code"),e.qZA(),e.TgZ(40,"div")(41,"span"),e._uU(42),e.qZA()()()(),e.TgZ(43,"div",9)(44,"div",10)(45,"label"),e._uU(46,"ShopID"),e.qZA(),e.TgZ(47,"div")(48,"span"),e._uU(49),e.qZA()()()(),e.TgZ(50,"div",9)(51,"div",10)(52,"label"),e._uU(53,"Action"),e.qZA(),e.TgZ(54,"div")(55,"span"),e._uU(56),e.qZA()()()()()()()()(),e.TgZ(57,"div",11)(58,"div",9)(59,"div",5)(60,"div",6)(61,"h5"),e._uU(62,"Request"),e.qZA()(),e.TgZ(63,"div",7)(64,"div",4)(65,"div",12)(66,"pre"),e._uU(67),e.ALo(68,"json"),e.qZA()()(),e.TgZ(69,"actions",13),e.YNc(70,j,2,0,"a",14),e.qZA()()()(),e.TgZ(71,"div",9)(72,"div",5)(73,"div",6)(74,"h5"),e._uU(75,"Response"),e.qZA()(),e.TgZ(76,"div",7)(77,"div",4)(78,"div",12)(79,"pre"),e._uU(80),e.ALo(81,"json"),e.qZA()()()()()()()()()()),2&t&&(e.Q6J("headerTitle","Order #"+n.Number)("pageData","Orders Detail ")("hideSearchBox",!0)("hideSearchDropdown",!0),e.xp6(20),e.Oqu(e.xi3(21,13,n.Created,"dd MMM yyyy HH:mm:ss")),e.xp6(8),e.Oqu(n.Number),e.xp6(7),e.Oqu(n.MarketTypeString),e.xp6(7),e.Oqu(n.ResponseCode),e.xp6(7),e.Oqu(n.shopId),e.xp6(7),e.Oqu(n.POSActionTypeString),e.xp6(11),e.Oqu(e.lcZ(68,16,n.request)),e.xp6(3),e.Q6J("ngIf","200"!=n.ResponseCode&&"201"!=n.ResponseCode),e.xp6(10),e.Oqu(e.lcZ(81,18,n.response)))},dependencies:[s.O5,p.yS,u.p,s.Ts,s.uU]}),o})(),canActivate:[g.a],data:{title:"Order Details"}},{path:"exception",component:(()=>{class o{constructor(t){this.http=t,this.Result=Array(),this.filter={RowCount:50,PageNumber:1},this.Load()}ngOnInit(){}Load(){this.http.post("/api/Orders/GetExceptionList",this.filter).subscribe(t=>{this.Result=Array();for(let n of t.hits)this.Result.push({TypeID:"Shopee"==n._source.error.type?0:1,Number:n._source.error.number,Date:n._source["@timestamp_received"],stackTrace:n._source.error.stackTrace,message:n._source.message});this.paginationTotal=t.total.value,this.paginationPageSize=this.filter.RowCount>this.paginationTotal?this.paginationTotal:this.filter.RowCount})}changePage(t){this.filter.PageNumber=t.pageIndex+1,this.Load()}}return o.\u0275fac=function(t){return new(t||o)(e.Y36(c.O))},o.\u0275cmp=e.Xpm({type:o,selectors:[["app-exception-log"]],decls:21,vars:5,consts:[["searchBoxPlaceHolder","Enter Number...","hideSearchBox","true","hideSearchDropdown","true",3,"headerTitle"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"table","table-hover"],[1,"table-light"],[4,"ngFor","ngForOf"],[3,"length","pageSize","pageIndex","page"],["src","https://res.cloudinary.com/pos/image/upload/v1598262221/icons/marketplace_icons/tokopedia.png",4,"ngIf"],["src","https://res.cloudinary.com/pos/image/upload/v1598262220/icons/marketplace_icons/shopee.png",4,"ngIf"],[1,"fw-bold"],["src","https://res.cloudinary.com/pos/image/upload/v1598262221/icons/marketplace_icons/tokopedia.png"],["src","https://res.cloudinary.com/pos/image/upload/v1598262220/icons/marketplace_icons/shopee.png"]],template:function(t,n){1&t&&(e.TgZ(0,"mainpanel",0),e._UZ(1,"filters"),e.TgZ(2,"content")(3,"div",1)(4,"div",2)(5,"div",3)(6,"div",4)(7,"table",5)(8,"thead")(9,"tr",6)(10,"th"),e._uU(11,"Channel"),e.qZA(),e.TgZ(12,"th"),e._uU(13,"Date"),e.qZA(),e.TgZ(14,"th"),e._uU(15,"Number"),e.qZA(),e.TgZ(16,"th"),e._uU(17,"Exception"),e.qZA()()(),e.TgZ(18,"tbody"),e.YNc(19,W,13,6,"tr",7),e.qZA()(),e.TgZ(20,"mat-paginator",8),e.NdJ("page",function(a){return n.changePage(a)}),e.qZA()()()()()()()),2&t&&(e.Q6J("headerTitle","Exception Log"),e.xp6(19),e.Q6J("ngForOf",n.Result),e.xp6(1),e.Q6J("length",n.paginationTotal)("pageSize",n.paginationPageSize)("pageIndex",0==(null==n.filter?null:n.filter.PageNumber)?0:(null==n.filter?null:n.filter.PageNumber)-1))},dependencies:[s.sg,s.O5,u.p,m.NW]}),o})(),canActivate:[g.a],data:{title:"Exception Log"}}]}];let te=(()=>{class o{}return o.\u0275fac=function(t){return new(t||o)},o.\u0275mod=e.oAB({type:o}),o.\u0275inj=e.cJS({imports:[s.ez,p.Bz.forChild(ee)]}),o})(),ne=(()=>{class o{}return o.\u0275fac=function(t){return new(t||o)},o.\u0275mod=e.oAB({type:o}),o.\u0275inj=e.cJS({imports:[s.ez,l.u5,l.UX,te,p.Bz,u.R,Q,m.TU,T.A0,f.ZU,v.Z]}),o})()}}]);
|
|
1
|
+
"use strict";(self.webpackChunkpos_marketplace=self.webpackChunkpos_marketplace||[]).push([[832],{1832:(ie,Z,d)=>{d.r(Z),d.d(Z,{LogsModule:()=>ne});var s=d(6895),e=d(4650),p=d(6806),v=d(7398);let y=(()=>{class o{constructor(){this.ObjectlogTabs=[{Title:"Sync Orders",Url:"/menu/log/order"},{Title:"Inventory Log ",Url:"/menu/log/inventory"},{Title:"Marketplace Webhook ",Url:"/menu/log/rawlog"},{Title:"Application Exception ",Url:"/menu/log/exception"}]}ngOnInit(){}}return o.\u0275fac=function(t){return new(t||o)},o.\u0275cmp=e.Xpm({type:o,selectors:[["app-logs"]],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.ObjectlogTabs))},dependencies:[p.lC,v.e]}),o})();var g=d(8063),c=d(1318);let h=(()=>{class o{constructor(){}get Data(){return this._Data}set Data(t){this._Data=t}Fill(t){return this._Data.find(n=>n._id==t)}}return o.\u0275fac=function(t){return new(t||o)},o.\u0275prov=e.Yz7({token:o,factory:o.\u0275fac,providedIn:"root"}),o})();var l=d(4006),u=d(7481),m=d(8739),T=d(8796),f=d(5585);const b=function(){return["/menu/log/order/detail"]},A=function(o){return{ID:o}},q=function(o,r){return{"bg-warning":o,"bg-success":r}};function O(o,r){if(1&o&&(e.TgZ(0,"tr")(1,"td")(2,"a",17),e._uU(3),e.ALo(4,"date"),e.qZA()(),e.TgZ(5,"td"),e._uU(6),e.qZA(),e.TgZ(7,"td"),e._uU(8),e.qZA(),e.TgZ(9,"td"),e._uU(10),e.qZA(),e.TgZ(11,"td")(12,"span",18),e._uU(13),e.qZA()()()),2&o){const t=r.$implicit;e.xp6(2),e.Q6J("routerLink",e.DdM(11,b))("queryParams",e.VKq(12,A,t.ID)),e.xp6(1),e.hij(" ",e.xi3(4,8,t.Created,"dd MMM yyyy HH:mm")," "),e.xp6(3),e.Oqu(t.MarketTypeString),e.xp6(2),e.Oqu(t.POSActionTypeString),e.xp6(2),e.Oqu(t.Number),e.xp6(2),e.Q6J("ngClass",e.WLB(14,q,200!==t.ResponseCode,200===t.ResponseCode)),e.xp6(1),e.Oqu(t.ResponseCode)}}let L=(()=>{class o{constructor(t,n,i){this.http=t,this._RawLogService=n,this.route=i,this.Result=Array(),this.filter={RowCount:20,Number:"",PageNumber:1,ActionType:"",ChannelID:"",StatusCode:"",From:"",To:""}}ngOnInit(){this.route.queryParams.subscribe(t=>{this.responseCode=t.responseCode,null!=this.responseCode?this.Load(t):this.Load()})}Load(t={}){this.http.post("/api/OrdersLoader/Get",t).subscribe(n=>{this.filter=n.Filter,this.Channel=n.Options.Channel,this.ActionTypeList=n.Options.ActionTypeList,this.Get()})}Get(t){this.filter.Number=t,this.http.post("/api/Orders/Get",this.filter).subscribe(n=>{this._RawLogService.Data=n.hits,this.Result=Array();for(let i of n.hits)this.Result.push({ID:i._id,Created:i._source["@timestamp_received"],shopId:i._source.shopId,MarketTypeString:i._source.log.type,POSActionTypeString:i._source.message,Number:i._source.log.number,ResponseCode:i._source.log.responseCode});this.paginationTotal=n.total.value,this.paginationPageSize=this.filter.RowCount>this.paginationTotal?this.paginationTotal:this.filter.RowCount})}changePage(t){this.filter.PageNumber=t.pageIndex+1,this.Get()}}return o.\u0275fac=function(t){return new(t||o)(e.Y36(c.O),e.Y36(h),e.Y36(p.gz))},o.\u0275cmp=e.Xpm({type:o,selectors:[["app-order"]],decls:49,vars:17,consts:[["searchBoxPlaceHolder","Invoice Number..",3,"headerTitle","text","textChange","onSubmit"],["container",""],["bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"clearable","items","ngModel","ngModelChange"],["bindLabel","Value","name","ActionType","bindValue","Key","placeholder","Action Type",1,"center-text",3,"clearable","items","ngModel","ngModelChange"],["name","From",3,"date","dateChange"],["name","To",3,"date","dateChange"],["type","text","name","StatusCode",1,"w-100",3,"ngModel","ngModelChange"],["type","number","name","PageNumber",1,"w-100",3,"ngModel","ngModelChange"],["type","number","name","RowCount",1,"w-100",3,"ngModel","ngModelChange"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"table","table-hover"],[1,"table-light"],[4,"ngFor","ngForOf"],[3,"length","pageSize","pageIndex","page"],[3,"routerLink","queryParams"],[1,"text-white","p-1","rounded","response-desc",3,"ngClass"]],template:function(t,n){1&t&&(e.TgZ(0,"mainpanel",0),e.NdJ("textChange",function(a){return n.Number=a})("onSubmit",function(a){return n.Get(a)}),e.TgZ(1,"filters")(2,"div",1)(3,"div")(4,"h6"),e._uU(5,"Channel"),e.qZA(),e.TgZ(6,"ng-select",2),e.NdJ("ngModelChange",function(a){return n.filter.ChannelID=a}),e.qZA()(),e.TgZ(7,"div")(8,"h6"),e._uU(9,"Action"),e.qZA(),e.TgZ(10,"ng-select",3),e.NdJ("ngModelChange",function(a){return n.filter.ActionType=a}),e.qZA()(),e.TgZ(11,"div")(12,"h6"),e._uU(13,"From/To"),e.qZA(),e.TgZ(14,"datepicker",4),e.NdJ("dateChange",function(a){return n.filter.From=a}),e.qZA(),e.TgZ(15,"datepicker",5),e.NdJ("dateChange",function(a){return n.filter.To=a}),e.qZA()(),e.TgZ(16,"div")(17,"h6"),e._uU(18,"Response Code"),e.qZA(),e.TgZ(19,"input",6),e.NdJ("ngModelChange",function(a){return n.filter.StatusCode=a}),e.qZA()(),e.TgZ(20,"div")(21,"h6"),e._uU(22,"Page Number"),e.qZA(),e.TgZ(23,"input",7),e.NdJ("ngModelChange",function(a){return n.filter.PageNumber=a}),e.qZA()(),e.TgZ(24,"div")(25,"h6"),e._uU(26,"Page Size"),e.qZA(),e.TgZ(27,"input",8),e.NdJ("ngModelChange",function(a){return n.filter.RowCount=a}),e.qZA()()()(),e.TgZ(28,"content")(29,"div",9)(30,"div",10)(31,"div",11)(32,"div",12)(33,"table",13)(34,"thead")(35,"tr",14)(36,"th"),e._uU(37,"Date"),e.qZA(),e.TgZ(38,"th"),e._uU(39,"Channel"),e.qZA(),e.TgZ(40,"th"),e._uU(41,"Actions"),e.qZA(),e.TgZ(42,"th"),e._uU(43,"Number"),e.qZA(),e.TgZ(44,"th"),e._uU(45,"Code"),e.qZA()()(),e.TgZ(46,"tbody"),e.YNc(47,O,14,17,"tr",15),e.qZA()(),e.TgZ(48,"mat-paginator",16),e.NdJ("page",function(a){return n.changePage(a)}),e.qZA()()()()()()()),2&t&&(e.Q6J("headerTitle","Order Log")("text",n.Number),e.xp6(6),e.Q6J("clearable",!0)("items",n.Channel)("ngModel",n.filter.ChannelID),e.xp6(4),e.Q6J("clearable",!0)("items",n.ActionTypeList)("ngModel",n.filter.ActionType),e.xp6(4),e.Q6J("date",n.filter.From),e.xp6(1),e.Q6J("date",n.filter.To),e.xp6(4),e.Q6J("ngModel",n.filter.StatusCode),e.xp6(4),e.Q6J("ngModel",n.filter.PageNumber),e.xp6(4),e.Q6J("ngModel",n.filter.RowCount),e.xp6(20),e.Q6J("ngForOf",n.Result),e.xp6(1),e.Q6J("length",n.paginationTotal)("pageSize",n.paginationPageSize)("pageIndex",0==(null==n.filter?null:n.filter.PageNumber)?0:(null==n.filter?null:n.filter.PageNumber)-1))},dependencies:[s.mk,s.sg,l.Fj,l.wV,l.JJ,l.On,p.yS,u.p,m.NW,T.w9,f.QB,s.uU]}),o})();const U=function(){return["/menu/log/inventory/detail"]},S=function(o){return{ID:o}};function I(o,r){if(1&o&&(e.TgZ(0,"tr")(1,"td")(2,"a",15),e._uU(3),e.ALo(4,"date"),e.qZA()(),e.TgZ(5,"td"),e._uU(6),e.qZA(),e.TgZ(7,"td"),e._uU(8),e.qZA(),e.TgZ(9,"td"),e._uU(10),e.qZA(),e.TgZ(11,"td"),e._uU(12),e.qZA()()),2&o){const t=r.$implicit;e.xp6(2),e.Q6J("routerLink",e.DdM(10,U))("queryParams",e.VKq(11,S,t.ID)),e.xp6(1),e.hij(" ",e.xi3(4,7,t.Created,"dd MMM yyyy HH:mm")," "),e.xp6(3),e.Oqu(t.channelName),e.xp6(2),e.Oqu(t.Sku),e.xp6(2),e.Oqu(t.Stock),e.xp6(2),e.Oqu(t.ResponseCode)}}let w=(()=>{class o{constructor(t,n){this.http=t,this._RawLogService=n,this.Result=Array(),this.filter={PageNumber:0,RowCount:20,Sku:null,ChannelID:"",StatusCode:"",From:"",To:""},this.Load()}ngOnInit(){}Load(){this.http.post("/api/OrdersLoader/Get",{}).subscribe(t=>{this.filter=t.Filter,this.Channel=t.Options.Channel,this.ActionTypeList=t.Options.ActionTypeList,this.Get()})}Get(t){null!=t&&(this.filter.Sku=t),this.http.post("api/Inventory/GetLog",this.filter).subscribe(n=>{this._RawLogService.Data=n.hits,this.Result=Array();for(let i of n.hits)this.Result.push({ID:i._source.log.id,Created:i._source["@timestamp_received"],channelName:i._source.log.channelName,Sku:i._source.log.sku,Stock:i._source.log.stock,ResponseCode:i._source.log.responseCode});this.paginationTotal=n.total.value,this.paginationPageSize=this.filter.RowCount>this.paginationTotal?this.paginationTotal:this.filter.RowCount,this.paginationTotal=n.total.value,this.paginationPageSize=this.filter.RowCount>this.paginationTotal?this.paginationTotal:this.filter.RowCount})}changePage(t){this.filter.PageNumber=t.pageIndex+1,this.Get()}}return o.\u0275fac=function(t){return new(t||o)(e.Y36(c.O),e.Y36(h))},o.\u0275cmp=e.Xpm({type:o,selectors:[["app-inventory-log"]],decls:41,vars:13,consts:[["searchBoxPlaceHolder","Enter SKU...",3,"headerTitle","text","textChange","onSubmit"],["container",""],["bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"clearable","items","ngModel","ngModelChange"],["name","From",3,"date","dateChange"],["name","To",3,"date","dateChange"],["type","number","name","PageNumber",1,"w-100",3,"ngModel","ngModelChange"],["type","number","name","RowCount",1,"w-100",3,"ngModel","ngModelChange"],[1,"container-fluid","mt=3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"table","table-hover"],[1,"table-light"],[4,"ngFor","ngForOf"],[3,"length","pageSize","pageIndex","page"],[3,"routerLink","queryParams"]],template:function(t,n){1&t&&(e.TgZ(0,"mainpanel",0),e.NdJ("textChange",function(a){return n.filter.Sku=a})("onSubmit",function(a){return n.Get(a)}),e.TgZ(1,"filters")(2,"div",1)(3,"div")(4,"h6"),e._uU(5,"Channel"),e.qZA(),e.TgZ(6,"ng-select",2),e.NdJ("ngModelChange",function(a){return n.filter.ChannelID=a}),e.qZA()(),e.TgZ(7,"div")(8,"h6"),e._uU(9,"From/To"),e.qZA(),e.TgZ(10,"datepicker",3),e.NdJ("dateChange",function(a){return n.filter.From=a}),e.qZA(),e.TgZ(11,"datepicker",4),e.NdJ("dateChange",function(a){return n.filter.To=a}),e.qZA()(),e.TgZ(12,"div")(13,"h6"),e._uU(14,"Page Number"),e.qZA(),e.TgZ(15,"input",5),e.NdJ("ngModelChange",function(a){return n.filter.PageNumber=a}),e.qZA()(),e.TgZ(16,"div")(17,"h6"),e._uU(18,"Page Size"),e.qZA(),e.TgZ(19,"input",6),e.NdJ("ngModelChange",function(a){return n.filter.RowCount=a}),e.qZA()()()(),e.TgZ(20,"content")(21,"div",7)(22,"div",8)(23,"div",9)(24,"div",10)(25,"table",11)(26,"thead")(27,"tr",12)(28,"th"),e._uU(29,"Created"),e.qZA(),e.TgZ(30,"th"),e._uU(31,"Channel"),e.qZA(),e.TgZ(32,"th"),e._uU(33,"SKU"),e.qZA(),e.TgZ(34,"th"),e._uU(35,"Stock"),e.qZA(),e.TgZ(36,"th"),e._uU(37,"Response code"),e.qZA()()(),e.TgZ(38,"tbody"),e.YNc(39,I,13,13,"tr",13),e.qZA()(),e.TgZ(40,"mat-paginator",14),e.NdJ("page",function(a){return n.changePage(a)}),e.qZA()()()()()()()),2&t&&(e.Q6J("headerTitle","Inventory Log")("text",n.filter.Sku),e.xp6(6),e.Q6J("clearable",!0)("items",n.Channel)("ngModel",n.filter.ChannelID),e.xp6(4),e.Q6J("date",n.filter.From),e.xp6(1),e.Q6J("date",n.filter.To),e.xp6(4),e.Q6J("ngModel",n.filter.PageNumber),e.xp6(4),e.Q6J("ngModel",n.filter.RowCount),e.xp6(20),e.Q6J("ngForOf",n.Result),e.xp6(1),e.Q6J("length",n.paginationTotal)("pageSize",n.paginationPageSize)("pageIndex",0==(null==n.filter?null:n.filter.PageNumber)?0:(null==n.filter?null:n.filter.PageNumber)-1))},dependencies:[s.sg,l.Fj,l.wV,l.JJ,l.On,p.yS,u.p,m.NW,T.w9,f.QB,s.uU]}),o})();const N=function(){return["/menu/log/order/detail"]},R=function(o){return{ID:o}};function D(o,r){if(1&o&&(e.TgZ(0,"tr")(1,"td")(2,"a",16),e._uU(3),e.ALo(4,"date"),e.qZA()(),e.TgZ(5,"td"),e._uU(6),e.qZA(),e.TgZ(7,"td"),e._uU(8),e.qZA(),e.TgZ(9,"td"),e._uU(10),e.qZA()()),2&o){const t=r.$implicit;e.xp6(2),e.Q6J("routerLink",e.DdM(9,N))("queryParams",e.VKq(10,R,t.id)),e.xp6(1),e.hij(" ",e.xi3(4,6,t.Created,"dd MMM yyyy HH:mm")," "),e.xp6(3),e.Oqu(t.type),e.xp6(2),e.Oqu(t.number),e.xp6(2),e.Oqu(t.message)}}function M(o,r){if(1&o){const t=e.EpF();e.TgZ(0,"div",8)(1,"div",9)(2,"div",10)(3,"table",11)(4,"thead",12)(5,"tr")(6,"th",13),e._uU(7,"Date"),e.qZA(),e.TgZ(8,"th"),e._uU(9,"Type"),e.qZA(),e.TgZ(10,"th"),e._uU(11,"Number"),e.qZA(),e.TgZ(12,"th"),e._uU(13,"Message"),e.qZA()()(),e.TgZ(14,"tbody"),e.YNc(15,D,11,12,"tr",14),e.qZA()(),e.TgZ(16,"mat-paginator",15),e.NdJ("page",function(i){e.CHM(t);const a=e.oxw();return e.KtG(a.changePage(i))}),e.qZA()()()()}if(2&o){const t=e.oxw();e.xp6(15),e.Q6J("ngForOf",t.Result),e.xp6(1),e.Q6J("length",t.paginationTotal)("pageSize",t.paginationPageSize)("pageIndex",0==(null==t.filter?null:t.filter.PageNumber)?0:(null==t.filter?null:t.filter.PageNumber)-1)}}let x=(()=>{class o{constructor(t,n){this.http=t,this._RawLogService=n,this.Result=Array(),this.filter={RowCount:20,Number:"",PageNumber:1,ActionType:"",ChannelID:"",StatusCode:"",From:"",To:""},this.list=[],this.Types=[{Key:0,Value:"Shopee"},{Key:1,Value:"Tokopedia"}]}ngOnInit(){this.Load()}Load(t={}){this.http.post("/api/OrdersLoader/Get",t).subscribe(n=>{this.filter=n.Filter,this.Channel=n.Options.Channel,this.ActionTypeList=n.Options.ActionTypeList,this.Get()})}Get(t){this.filter.Number=t,this.http.post("api/Orders/GetRawLog",this.filter).subscribe(n=>{this._RawLogService.Data=n.hits,this.Result=Array();for(let i of n.hits)this.Result.push({id:i._id,message:i._source.message,responseCode:i._source.log.responseCode,processTypeString:i._source.log.processType,type:i._source.log.type,number:i._source.log.number,Created:i._source["@timestamp_received"]});this.paginationTotal=n.total.value,this.paginationPageSize=this.filter.RowCount>this.paginationTotal?this.paginationTotal:this.filter.RowCount})}changePage(t){this.filter.PageNumber=t.pageIndex+1,this.Get()}}return o.\u0275fac=function(t){return new(t||o)(e.Y36(c.O),e.Y36(h))},o.\u0275cmp=e.Xpm({type:o,selectors:[["app-raw-log"]],decls:22,vars:10,consts:[["searchBoxPlaceHolder","Invoice Number..",3,"headerTitle","text","textChange","onSubmit"],["container",""],["bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"clearable","items","ngModel","ngModelChange"],["name","From",3,"date","dateChange"],["name","To",3,"date","dateChange"],["type","number","name","PageNumber",1,"w-100",3,"ngModel","ngModelChange"],["type","number","name","RowCount",1,"w-100",3,"ngModel","ngModelChange"],["class","container-fluid mt-3",4,"ngIf"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table"],[1,"thead-light"],[2,"width","200px"],[4,"ngFor","ngForOf"],[3,"length","pageSize","pageIndex","page"],[3,"routerLink","queryParams"]],template:function(t,n){1&t&&(e.TgZ(0,"mainpanel",0),e.NdJ("textChange",function(a){return n.filter.Number=a})("onSubmit",function(a){return n.Get(a)}),e.TgZ(1,"filters")(2,"div",1)(3,"div")(4,"h6"),e._uU(5,"Channel"),e.qZA(),e.TgZ(6,"ng-select",2),e.NdJ("ngModelChange",function(a){return n.filter.ChannelID=a}),e.qZA()(),e.TgZ(7,"div")(8,"h6"),e._uU(9,"From/To"),e.qZA(),e.TgZ(10,"datepicker",3),e.NdJ("dateChange",function(a){return n.filter.From=a}),e.qZA(),e.TgZ(11,"datepicker",4),e.NdJ("dateChange",function(a){return n.filter.To=a}),e.qZA()(),e.TgZ(12,"div")(13,"h6"),e._uU(14,"Page Number"),e.qZA(),e.TgZ(15,"input",5),e.NdJ("ngModelChange",function(a){return n.filter.PageNumber=a}),e.qZA()(),e.TgZ(16,"div")(17,"h6"),e._uU(18,"Page Size"),e.qZA(),e.TgZ(19,"input",6),e.NdJ("ngModelChange",function(a){return n.filter.RowCount=a}),e.qZA()()()(),e.TgZ(20,"content"),e.YNc(21,M,17,4,"div",7),e.qZA()()),2&t&&(e.Q6J("headerTitle","Marketplace Webhook")("text",n.filter.Number),e.xp6(6),e.Q6J("clearable",!0)("items",n.Channel)("ngModel",n.filter.ChannelID),e.xp6(4),e.Q6J("date",n.filter.From),e.xp6(1),e.Q6J("date",n.filter.To),e.xp6(4),e.Q6J("ngModel",n.filter.PageNumber),e.xp6(4),e.Q6J("ngModel",n.filter.RowCount),e.xp6(2),e.Q6J("ngIf",n.Result.length>0))},dependencies:[s.sg,s.O5,l.Fj,l.wV,l.JJ,l.On,p.yS,u.p,m.NW,T.w9,f.QB,s.uU]}),o})();class J{constructor(r,t){this._document=t;const n=this._textarea=this._document.createElement("textarea"),i=n.style;i.position="fixed",i.top=i.opacity="0",i.left="-999em",n.setAttribute("aria-hidden","true"),n.value=r,this._document.body.appendChild(n)}copy(){const r=this._textarea;let t=!1;try{if(r){const n=this._document.activeElement;r.select(),r.setSelectionRange(0,r.value.length),t=this._document.execCommand("copy"),n&&n.focus()}}catch{}return t}destroy(){const r=this._textarea;r&&(r.remove(),this._textarea=void 0)}}let k=(()=>{class o{constructor(t){this._document=t}copy(t){const n=this.beginCopy(t),i=n.copy();return n.destroy(),i}beginCopy(t){return new J(t,this._document)}}return o.\u0275fac=function(t){return new(t||o)(e.LFG(s.K0))},o.\u0275prov=e.Yz7({token:o,factory:o.\u0275fac,providedIn:"root"}),o})();const P=new e.OlP("CDK_COPY_TO_CLIPBOARD_CONFIG");let F=(()=>{class o{constructor(t,n,i){this._clipboard=t,this._ngZone=n,this.text="",this.attempts=1,this.copied=new e.vpe,this._pending=new Set,i&&null!=i.attempts&&(this.attempts=i.attempts)}copy(t=this.attempts){if(t>1){let n=t;const i=this._clipboard.beginCopy(this.text);this._pending.add(i);const a=()=>{const _=i.copy();_||!--n||this._destroyed?(this._currentTimeout=null,this._pending.delete(i),i.destroy(),this.copied.emit(_)):this._currentTimeout=this._ngZone.runOutsideAngular(()=>setTimeout(a,1))};a()}else this.copied.emit(this._clipboard.copy(this.text))}ngOnDestroy(){this._currentTimeout&&clearTimeout(this._currentTimeout),this._pending.forEach(t=>t.destroy()),this._pending.clear(),this._destroyed=!0}}return o.\u0275fac=function(t){return new(t||o)(e.Y36(k),e.Y36(e.R0b),e.Y36(P,8))},o.\u0275dir=e.lG2({type:o,selectors:[["","cdkCopyToClipboard",""]],hostBindings:function(t,n){1&t&&e.NdJ("click",function(){return n.copy()})},inputs:{text:["cdkCopyToClipboard","text"],attempts:["cdkCopyToClipboardAttempts","attempts"]},outputs:{copied:"cdkCopyToClipboardCopied"}}),o})(),Q=(()=>{class o{}return o.\u0275fac=function(t){return new(t||o)},o.\u0275mod=e.oAB({type:o}),o.\u0275inj=e.cJS({}),o})();function Y(o,r){1&o&&e._UZ(0,"img",21)}function z(o,r){1&o&&e._UZ(0,"img",22)}function G(o,r){if(1&o&&(e.TgZ(0,"div",4)(1,"div",5)(2,"div",6)(3,"h5"),e._uU(4,"General"),e.qZA()(),e.TgZ(5,"div",7)(6,"div",2)(7,"div",8)(8,"div",9)(9,"label"),e._uU(10,"Date"),e.qZA(),e.TgZ(11,"div")(12,"span"),e._uU(13),e.ALo(14,"date"),e.qZA()()()(),e.TgZ(15,"div",10)(16,"div",9)(17,"label"),e._uU(18,"Market Place Type"),e.qZA(),e.YNc(19,Y,1,0,"img",11),e.YNc(20,z,1,0,"img",12),e.TgZ(21,"a",13)(22,"span",14),e._uU(23),e.qZA(),e._UZ(24,"br"),e.TgZ(25,"small",15),e._uU(26),e.qZA()()()(),e.TgZ(27,"div",10)(28,"div",9)(29,"label"),e._uU(30,"Number"),e.qZA(),e.TgZ(31,"div")(32,"span"),e._uU(33),e.qZA()()()(),e.TgZ(34,"div",8)(35,"div",9)(36,"label"),e._uU(37,"Process Type"),e.qZA(),e.TgZ(38,"div")(39,"span"),e._uU(40),e.qZA()()()(),e.TgZ(41,"div",4)(42,"div",9)(43,"label"),e._uU(44,"Authorization Header"),e.qZA(),e.TgZ(45,"div")(46,"span"),e._uU(47),e.qZA()()()(),e.TgZ(48,"div",16)(49,"div",5)(50,"div",17)(51,"div",18)(52,"h3"),e._uU(53,"Request"),e.qZA()(),e.TgZ(54,"div",19)(55,"button",20),e._uU(56,"Copy to clipboard"),e.qZA()()(),e.TgZ(57,"div",7),e._uU(58),e.qZA()()()()()()()),2&o){const t=e.oxw();e.xp6(13),e.Oqu(e.xi3(14,11,t.data.Created,"dd MMM yyyy HH:mm:ss")),e.xp6(6),e.Q6J("ngIf",1==t.data.TypeID),e.xp6(1),e.Q6J("ngIf",0==t.data.TypeID),e.xp6(1),e.s9C("href",t.data.ShopLink,e.LSH),e.xp6(2),e.Oqu(t.data.ShopName),e.xp6(3),e.Oqu(t.data.ShopLink),e.xp6(7),e.Oqu(t.data._source.log.number),e.xp6(7),e.Oqu(t.data._source.log.processType),e.xp6(7),e.Oqu(t.data._source.log.authorizationHeader),e.xp6(8),e.Q6J("cdkCopyToClipboard",t.data._source.log.request),e.xp6(3),e.hij(" ",t.data._source.log.request," ")}}function H(o,r){if(1&o&&(e.TgZ(0,"div",10)(1,"div",7)(2,"div",8)(3,"h5"),e._uU(4,"General"),e.qZA()(),e.TgZ(5,"div",9)(6,"div",3)(7,"div",6)(8,"div",12)(9,"label"),e._uU(10,"Date"),e.qZA(),e.TgZ(11,"div")(12,"span"),e._uU(13),e.ALo(14,"date"),e.qZA()()()(),e.TgZ(15,"div",6)(16,"div",12)(17,"label"),e._uU(18,"SKU"),e.qZA(),e.TgZ(19,"div")(20,"span"),e._uU(21),e.qZA()()()(),e.TgZ(22,"div",6)(23,"div",12)(24,"label"),e._uU(25,"Channel"),e.qZA(),e.TgZ(26,"div")(27,"span"),e._uU(28),e.qZA()()()(),e.TgZ(29,"div",6)(30,"div",12)(31,"label"),e._uU(32,"Response Code"),e.qZA(),e.TgZ(33,"div")(34,"span"),e._uU(35),e.qZA()()()()()()()()),2&o){const t=e.oxw();e.xp6(13),e.Oqu(e.xi3(14,4,t.data.Created,"dd MMM yyyy")),e.xp6(8),e.Oqu(t.data.Sku),e.xp6(7),e.Oqu(t.data.ChannelName),e.xp6(7),e.Oqu(t.data.ResponseCode)}}function j(o,r){if(1&o){const t=e.EpF();e.TgZ(0,"a",15),e.NdJ("click",function(){e.CHM(t);const i=e.oxw();return e.KtG(i.Retry())}),e._uU(1,"Retry"),e.qZA()}}function V(o,r){1&o&&e._UZ(0,"img",12)}function X(o,r){1&o&&e._UZ(0,"img",13)}function W(o,r){if(1&o&&(e.TgZ(0,"tr")(1,"td"),e.YNc(2,V,1,0,"img",9),e.YNc(3,X,1,0,"img",10),e.qZA(),e.TgZ(4,"td"),e._uU(5),e.qZA(),e.TgZ(6,"td"),e._uU(7),e.qZA(),e.TgZ(8,"td")(9,"div",11),e._uU(10),e.qZA(),e.TgZ(11,"div"),e._uU(12),e.qZA()()()),2&o){const t=r.$implicit;e.xp6(2),e.Q6J("ngIf",1==t.TypeID),e.xp6(1),e.Q6J("ngIf",0==t.TypeID),e.xp6(2),e.Oqu(t.Date),e.xp6(2),e.Oqu(t.Number),e.xp6(3),e.Oqu(t.message),e.xp6(2),e.Oqu(t.stackTrace)}}const ee=[{path:"",component:y,children:[{path:"",redirectTo:"order",pathMatch:"full"},{path:"order",component:L,canActivate:[g.a],data:{title:"Orders Log"}},{path:"inventory",component:w,canActivate:[g.a],data:{title:"Inventory Log"}},{path:"rawlog",component:x,canActivate:[g.a],data:{title:"Raw Log"}},{path:"rawlog/detail",component:(()=>{class o{constructor(t,n,i){this.route=t,this.http=n,this._RawLogService=i,this.route.queryParams.subscribe(a=>{let _=JSON.parse(localStorage.getItem("channel"));if(this.ID=a.ID,this.data=this._RawLogService.Fill(this.ID),this.data.Created=this.data._source["@timestamp_received"],_.length>0){const C=_.find(oe=>oe.ShopID==this.data._source.shopId);C?(this.data.TypeID=C.TypeID,this.data.ShopName=C.Name,this.data.ShopLink=C.URL):(this.data.TypeID=null,this.data.ShopName=null,this.data.ShopLink=null)}})}ngOnInit(){}}return o.\u0275fac=function(t){return new(t||o)(e.Y36(p.gz),e.Y36(c.O),e.Y36(h))},o.\u0275cmp=e.Xpm({type:o,selectors:[["app-raw-detail"]],decls:5,vars:4,consts:[[3,"headerTitle","hideSearchBox","hideSearchDropdown"],[1,"container-fluid","mt-2"],[1,"row"],["class","col-sm-12",4,"ngIf"],[1,"col-sm-12"],[1,"card"],[1,"card-header"],[1,"card-body"],[1,"col-sm-2"],[1,"info-label-group"],[1,"col-sm-4"],["class","me-2","src","https://res.cloudinary.com/pos/image/upload/v1598262221/icons/marketplace_icons/tokopedia.png",4,"ngIf"],["class","me-2","src","https://res.cloudinary.com/pos/image/upload/v1598262220/icons/marketplace_icons/shopee.png",4,"ngIf"],["target","_blank",3,"href"],[1,"fw-bold"],[1,"text-dark"],[1,"col-sm-12","mt-2"],[1,"card-header","d-lg-flex"],[1,"me-auto"],[1,"d-sm-block","mt-2"],[3,"cdkCopyToClipboard"],["src","https://res.cloudinary.com/pos/image/upload/v1598262221/icons/marketplace_icons/tokopedia.png",1,"me-2"],["src","https://res.cloudinary.com/pos/image/upload/v1598262220/icons/marketplace_icons/shopee.png",1,"me-2"]],template:function(t,n){1&t&&(e.TgZ(0,"mainpanel",0)(1,"content")(2,"div",1)(3,"div",2),e.YNc(4,G,59,14,"div",3),e.qZA()()()()),2&t&&(e.Q6J("headerTitle","Request Raw Log Detail")("hideSearchBox",!0)("hideSearchDropdown",!0),e.xp6(4),e.Q6J("ngIf",n.data))},dependencies:[s.O5,u.p,F,s.uU]}),o})(),canActivate:[g.a],data:{title:"Raw Log Detail"}},{path:"inventory/detail",component:(()=>{class o{constructor(t,n,i){this.route=t,this.http=n,this._RawLogService=i,this.data={Created:"",Sku:"",ChannelName:"",ResponseCode:""},this.route.queryParams.subscribe(a=>{this.ID=a.ID,this.Load()})}ngOnInit(){}Load(){this.http.post("/api/Inventory/GetInventoryLogDeatil",{ID:this.ID}).subscribe(n=>{this.data.Created=n.hits[0]._source["@timestamp_received"],this.data.Sku=n.hits[0]._source.log.sku,this.data.ChannelName=n.hits[0]._source.log.channelName,this.data.ResponseCode=n.hits[0]._source.log.responseCode,this.request=JSON.parse(n.hits[0]._source.log.request),this.response=n.hits[0]._source.log.response})}}return o.\u0275fac=function(t){return new(t||o)(e.Y36(p.gz),e.Y36(c.O),e.Y36(h))},o.\u0275cmp=e.Xpm({type:o,selectors:[["app-inventory-detail"]],decls:30,vars:9,consts:[[3,"headerTitle","pageData","hideSearchBox","hideSearchDropdown"],["role","button","routerLink","/menu/log/inventory",1,"btn","btn-secondary","btn-fill","btn-lg","me-3"],[1,"container-fluid","mt-3"],[1,"row"],["class","col-sm-12",4,"ngIf"],[1,"row","mt-2"],[1,"col-sm-6"],[1,"card"],[1,"card-header"],[1,"card-body"],[1,"col-sm-12"],[1,"form-group"],[1,"info-label-group"]],template:function(t,n){1&t&&(e.TgZ(0,"mainpanel",0)(1,"actions")(2,"a",1),e._uU(3,"Back"),e.qZA()(),e.TgZ(4,"content")(5,"div",2)(6,"div",3),e.YNc(7,H,36,7,"div",4),e.qZA(),e.TgZ(8,"div",5)(9,"div",6)(10,"div",7)(11,"div",8)(12,"h5"),e._uU(13,"Request"),e.qZA()(),e.TgZ(14,"div",9)(15,"div",10)(16,"div",11)(17,"pre"),e._uU(18),e.ALo(19,"json"),e.qZA()()()()()(),e.TgZ(20,"div",6)(21,"div",7)(22,"div",8)(23,"h5"),e._uU(24,"Response"),e.qZA()(),e.TgZ(25,"div",9)(26,"div",10)(27,"div",11)(28,"pre"),e._uU(29),e.qZA()()()()()()()()()()),2&t&&(e.Q6J("headerTitle","Inventory Detail")("pageData","Inventory Detail ")("hideSearchBox",!0)("hideSearchDropdown",!0),e.xp6(7),e.Q6J("ngIf",n.data),e.xp6(11),e.Oqu(e.lcZ(19,7,n.request)),e.xp6(11),e.Oqu(n.response))},dependencies:[s.O5,p.yS,u.p,s.Ts,s.uU]}),o})(),canActivate:[g.a],data:{title:"Inventory Details"}},{path:"order/detail",component:(()=>{class o{constructor(t,n){this.route=t,this.http=n,this.ProcessDuration=0,this.request="",this.response="",this.route.queryParams.subscribe(i=>{this.ID=i.ID,this.Load()})}ngOnInit(){}Retry(){this.http.post("/api/Orders/Retry",{ID:this.ID}).subscribe(n=>{alert(JSON.stringify(n))})}Load(){this.http.post("/api/Orders/GetDetail",{ID:this.ID}).subscribe(n=>{for(let i of n.hits)this.Number=i._source.log.number,this.MarketTypeString=i._source.log.type,this.ResponseCode=i._source.log.responseCode,this.POSActionTypeString=i._source.message,this.ProcessDuration=0,this.Created=i._source["@timestamp_received"],this.request=JSON.parse(i._source.log.request),this.response=JSON.parse(i._source.log.response),this.shopId=i._source.shopId})}}return o.\u0275fac=function(t){return new(t||o)(e.Y36(p.gz),e.Y36(c.O))},o.\u0275cmp=e.Xpm({type:o,selectors:[["app-orderdetail"]],decls:82,vars:20,consts:[[3,"headerTitle","pageData","hideSearchBox","hideSearchDropdown"],["role","button","routerLink","/menu/log/order",1,"btn","btn-secondary","btn-fill","btn-lg","me-3"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-sm-12"],[1,"card"],[1,"card-header"],[1,"card-body"],[1,"row","mt-7"],[1,"col-sm-6"],[1,"info-label-group"],[1,"row","mt-2"],[1,"form-group"],[1,"float-right"],["role","button","class","btn btn-success btn-fill btn-lg me-3",3,"click",4,"ngIf"],["role","button",1,"btn","btn-success","btn-fill","btn-lg","me-3",3,"click"]],template:function(t,n){1&t&&(e.TgZ(0,"mainpanel",0)(1,"actions")(2,"a",1),e._uU(3,"Back"),e.qZA()(),e.TgZ(4,"content")(5,"div",2)(6,"div",3)(7,"div",4)(8,"div",5)(9,"div",6)(10,"h5"),e._uU(11,"General"),e.qZA()(),e.TgZ(12,"div",7)(13,"div",8)(14,"div",9)(15,"div",10)(16,"label"),e._uU(17,"Date"),e.qZA(),e.TgZ(18,"div")(19,"span"),e._uU(20),e.ALo(21,"date"),e.qZA()()()(),e.TgZ(22,"div",9)(23,"div",10)(24,"label"),e._uU(25,"Number"),e.qZA(),e.TgZ(26,"div")(27,"span"),e._uU(28),e.qZA()()()(),e.TgZ(29,"div",9)(30,"div",10)(31,"label"),e._uU(32,"Type"),e.qZA(),e.TgZ(33,"div")(34,"span"),e._uU(35),e.qZA()()()(),e.TgZ(36,"div",9)(37,"div",10)(38,"label"),e._uU(39,"Response Code"),e.qZA(),e.TgZ(40,"div")(41,"span"),e._uU(42),e.qZA()()()(),e.TgZ(43,"div",9)(44,"div",10)(45,"label"),e._uU(46,"ShopID"),e.qZA(),e.TgZ(47,"div")(48,"span"),e._uU(49),e.qZA()()()(),e.TgZ(50,"div",9)(51,"div",10)(52,"label"),e._uU(53,"Action"),e.qZA(),e.TgZ(54,"div")(55,"span"),e._uU(56),e.qZA()()()()()()()()(),e.TgZ(57,"div",11)(58,"div",9)(59,"div",5)(60,"div",6)(61,"h5"),e._uU(62,"Request"),e.qZA()(),e.TgZ(63,"div",7)(64,"div",4)(65,"div",12)(66,"pre"),e._uU(67),e.ALo(68,"json"),e.qZA()()(),e.TgZ(69,"actions",13),e.YNc(70,j,2,0,"a",14),e.qZA()()()(),e.TgZ(71,"div",9)(72,"div",5)(73,"div",6)(74,"h5"),e._uU(75,"Response"),e.qZA()(),e.TgZ(76,"div",7)(77,"div",4)(78,"div",12)(79,"pre"),e._uU(80),e.ALo(81,"json"),e.qZA()()()()()()()()()()),2&t&&(e.Q6J("headerTitle","Order #"+n.Number)("pageData","Orders Detail ")("hideSearchBox",!0)("hideSearchDropdown",!0),e.xp6(20),e.Oqu(e.xi3(21,13,n.Created,"dd MMM yyyy HH:mm:ss")),e.xp6(8),e.Oqu(n.Number),e.xp6(7),e.Oqu(n.MarketTypeString),e.xp6(7),e.Oqu(n.ResponseCode),e.xp6(7),e.Oqu(n.shopId),e.xp6(7),e.Oqu(n.POSActionTypeString),e.xp6(11),e.Oqu(e.lcZ(68,16,n.request)),e.xp6(3),e.Q6J("ngIf","200"!=n.ResponseCode&&"201"!=n.ResponseCode),e.xp6(10),e.Oqu(e.lcZ(81,18,n.response)))},dependencies:[s.O5,p.yS,u.p,s.Ts,s.uU]}),o})(),canActivate:[g.a],data:{title:"Order Details"}},{path:"exception",component:(()=>{class o{constructor(t){this.http=t,this.Result=Array(),this.filter={RowCount:50,PageNumber:1},this.Load()}ngOnInit(){}Load(){this.http.post("/api/Orders/GetExceptionList",this.filter).subscribe(t=>{this.Result=Array();for(let n of t.hits)this.Result.push({TypeID:"Shopee"==n._source.error.type?0:1,Number:n._source.error.number,Date:n._source["@timestamp_received"],stackTrace:n._source.error.stackTrace,message:n._source.message});this.paginationTotal=t.total.value,this.paginationPageSize=this.filter.RowCount>this.paginationTotal?this.paginationTotal:this.filter.RowCount})}changePage(t){this.filter.PageNumber=t.pageIndex+1,this.Load()}}return o.\u0275fac=function(t){return new(t||o)(e.Y36(c.O))},o.\u0275cmp=e.Xpm({type:o,selectors:[["app-exception-log"]],decls:21,vars:5,consts:[["searchBoxPlaceHolder","Enter Number...","hideSearchBox","true","hideSearchDropdown","true",3,"headerTitle"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"table","table-hover"],[1,"table-light"],[4,"ngFor","ngForOf"],[3,"length","pageSize","pageIndex","page"],["src","https://res.cloudinary.com/pos/image/upload/v1598262221/icons/marketplace_icons/tokopedia.png",4,"ngIf"],["src","https://res.cloudinary.com/pos/image/upload/v1598262220/icons/marketplace_icons/shopee.png",4,"ngIf"],[1,"fw-bold"],["src","https://res.cloudinary.com/pos/image/upload/v1598262221/icons/marketplace_icons/tokopedia.png"],["src","https://res.cloudinary.com/pos/image/upload/v1598262220/icons/marketplace_icons/shopee.png"]],template:function(t,n){1&t&&(e.TgZ(0,"mainpanel",0),e._UZ(1,"filters"),e.TgZ(2,"content")(3,"div",1)(4,"div",2)(5,"div",3)(6,"div",4)(7,"table",5)(8,"thead")(9,"tr",6)(10,"th"),e._uU(11,"Channel"),e.qZA(),e.TgZ(12,"th"),e._uU(13,"Date"),e.qZA(),e.TgZ(14,"th"),e._uU(15,"Number"),e.qZA(),e.TgZ(16,"th"),e._uU(17,"Exception"),e.qZA()()(),e.TgZ(18,"tbody"),e.YNc(19,W,13,6,"tr",7),e.qZA()(),e.TgZ(20,"mat-paginator",8),e.NdJ("page",function(a){return n.changePage(a)}),e.qZA()()()()()()()),2&t&&(e.Q6J("headerTitle","Exception Log"),e.xp6(19),e.Q6J("ngForOf",n.Result),e.xp6(1),e.Q6J("length",n.paginationTotal)("pageSize",n.paginationPageSize)("pageIndex",0==(null==n.filter?null:n.filter.PageNumber)?0:(null==n.filter?null:n.filter.PageNumber)-1))},dependencies:[s.sg,s.O5,u.p,m.NW]}),o})(),canActivate:[g.a],data:{title:"Exception Log"}}]}];let te=(()=>{class o{}return o.\u0275fac=function(t){return new(t||o)},o.\u0275mod=e.oAB({type:o}),o.\u0275inj=e.cJS({imports:[s.ez,p.Bz.forChild(ee)]}),o})(),ne=(()=>{class o{}return o.\u0275fac=function(t){return new(t||o)},o.\u0275mod=e.oAB({type:o}),o.\u0275inj=e.cJS({imports:[s.ez,l.u5,l.UX,te,p.Bz,u.R,Q,m.TU,T.A0,f.ZU,v.Z]}),o})()}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkpos_marketplace=self.webpackChunkpos_marketplace||[]).push([[874],{1874:(ke,T,l)=>{l.r(T),l.d(T,{PriceModule:()=>Ue});var p=l(6895),v=l(7398),u=l(7481),m=l(8252),_=l(4006),C=l(8796),e=l(4650);let U=(()=>{class n{constructor(){this.priceTabs=[{Title:"Single Channel Comparison",Url:"/menu/price/SingleChannel"},{Title:"Multi Channel Comparison",Url:"/menu/price/pos"},{Title:"Custom Channel Price",Url:"/menu/price/OutletPrice"}]}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275cmp=e.Xpm({type:n,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,o){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",o.priceTabs))},dependencies:[v.e,m.lC]}),n})();var Z=l(8231),y=l(6304),w=l(8505),d=l(9300),h=l(3154),f=l(1318),x=l(7185),P=l(5412),A=l(7287),b=l(6082),F=l(488);function O(n,c){if(1&n){const t=e.EpF();e.TgZ(0,"button",16),e.NdJ("click",function(){e.CHM(t);const i=e.oxw(3);return e.KtG(i.openScanDialog())}),e._UZ(1,"i",17),e._uU(2," Scan Channel "),e.qZA()}}function k(n,c){if(1&n){const t=e.EpF();e.TgZ(0,"button",18),e.NdJ("click",function(){e.CHM(t);const i=e.oxw().ngIf,a=e.oxw(2);return e.KtG(a.onUpdateItems(i))}),e._UZ(1,"i",19),e._uU(2," Update "),e.qZA()}}function L(n,c){if(1&n&&(e.TgZ(0,"div"),e.YNc(1,O,3,0,"button",14),e.YNc(2,k,3,0,"button",15),e.qZA()),2&n){const t=c.ngIf,o=e.oxw(2);e.xp6(1),e.Q6J("ngIf",!o.productService.hasSelectionVariant(t)),e.xp6(1),e.Q6J("ngIf",o.productService.hasSelectionVariant(t))}}function Q(n,c){if(1&n){const t=e.EpF();e.TgZ(0,"div",20)(1,"app-table",21),e.NdJ("onToggle",function(i){e.CHM(t);const a=e.oxw(2);return e.KtG(a.onShowDifferencePrice(i))})("onSubmit",function(i){e.CHM(t);const a=e.oxw(2);return e.KtG(a.updatePriceByVariant(i))}),e.ALo(2,"async"),e.qZA()()}if(2&n){const t=e.oxw().ngIf,o=e.oxw();e.xp6(1),e.Q6J("showProductToggle",!0)("data",e.lcZ(2,4,o.paginationService.data$))("channel",t.Options.Channel)("filter",t.Filter)}}function q(n,c){if(1&n){const t=e.EpF();e.TgZ(0,"span",22),e.NdJ("click",function(){e.CHM(t);const i=e.oxw(2);return e.KtG(i.getRowCount())}),e.TgZ(1,"i",23),e._uU(2,"?"),e.qZA()()}}function V(n,c){if(1&n&&(e.TgZ(0,"span"),e._uU(1),e.ALo(2,"number"),e.qZA()),2&n){const t=c.ngIf;e.xp6(1),e.Oqu(e.lcZ(2,1,t))}}function $(n,c){if(1&n){const t=e.EpF();e.TgZ(0,"a",24),e.NdJ("click",function(){e.CHM(t);const i=e.oxw(2);return e.KtG(i.onNextPage())}),e._UZ(1,"i",25),e._uU(2," Next"),e.qZA()}}function Y(n,c){if(1&n){const t=e.EpF();e.TgZ(0,"a",26),e.NdJ("click",function(){e.CHM(t);const i=e.oxw(2);return e.KtG(i.onLastPage())}),e._UZ(1,"i",27),e._uU(2," Last"),e.qZA()}}function E(n,c){if(1&n){const t=e.EpF();e.TgZ(0,"mainpanel",1),e.NdJ("onSubmit",function(i){e.CHM(t);const a=e.oxw();return e.KtG(a.onSearch(i))}),e.TgZ(1,"actions")(2,"div",2),e.YNc(3,L,3,2,"div",3),e.ALo(4,"async"),e.qZA()(),e.TgZ(5,"content")(6,"div",4)(7,"div",5),e.YNc(8,Q,3,6,"div",6),e.ALo(9,"async"),e.qZA(),e.TgZ(10,"div",7)(11,"div",8)(12,"div",9),e._uU(13),e.ALo(14,"number"),e.ALo(15,"async"),e.YNc(16,q,3,0,"span",10),e.YNc(17,V,3,3,"span",3),e.ALo(18,"async"),e._uU(19),e.qZA()(),e.TgZ(20,"div",11),e.YNc(21,$,3,0,"a",12),e.YNc(22,Y,3,0,"a",13),e.qZA()()()()()}if(2&n){const t=e.oxw();let o;e.Q6J("pageData",t.pageData)("hideSearchDropdown",!0)("textButton","Search"),e.xp6(3),e.Q6J("ngIf",e.lcZ(4,11,t.paginationService.data$)),e.xp6(5),e.Q6J("ngIf",e.lcZ(9,13,t.paginationService.data$)),e.xp6(5),e.hij(" Showing 1 - ",e.lcZ(14,15,null==(o=e.lcZ(15,17,t.paginationService.data$))?null:o.length)," of "),e.xp6(3),e.Q6J("ngIf",t.paginationService.hideCount),e.xp6(1),e.Q6J("ngIf",!t.paginationService.hideCount&&e.lcZ(18,19,t.allDataCount$)),e.xp6(2),e.hij(" records ~ ",t.paginationService.footerPageNumber," Page "),e.xp6(2),e.Q6J("ngIf",t.paginationService.disableNextButton&&!t.paginationService.goToLastPage),e.xp6(1),e.Q6J("ngIf",t.paginationService.disableNextButton&&!t.paginationService.goToLastPage)}}let K=(()=>{class n{constructor(t,o,i,a,r){this.http=t,this.toastr=o,this.dialog=i,this.paginationService=a,this.productService=r,this.loaderAPI="PriceLoader/LoadMultiple",this.getDataAPI="Price/GetMultipleChannelComparison",this.rowCountAPI="Inventory/GetMultipleChannelComparisonRowCount",this.filterOptions=[{Key:1,Value:"All"},{Key:3,Value:"Difference"}],this.pageData={Title:"Price",Nav:[{Title:"Price Cache",Url:"/menu/price",Active:!0},{Title:"Price Realtime",Url:"/menu/price/realtime",Active:!1}]}}ngOnInit(){this.initPageLoader()}initPageLoader(){this.paginationService.fetchDataEndpoint=this.getDataAPI,this.loader$=this.http.post(`/api/${this.loaderAPI}`).pipe((0,w.b)(t=>{this.channelOptions=t.Options.Channel,t.Filter={PageNumber:t.Filter.PageNumber,RowCount:t.Filter.RowCount,filterModel:1},this.searchFilter=t.Filter,this.paginationService.resetToFirstPage(this.searchFilter)}))}onShowDifferencePrice(t){this.searchFilter.filterModel=1,t&&(this.searchFilter.filterModel=3),this.paginationService.resetToFirstPage(this.searchFilter)}onSearch(t){this.searchFilter.text=t,this.paginationService.resetToFirstPage(this.searchFilter)}openScanDialog(){this.searchFilter.ChannelID=h.g.GuidEMpty;let t=JSON.parse(JSON.stringify(this.searchFilter));this.dialog.open(Z.j,{data:{filter:t,channelOptions:this.channelOptions},width:"40%"}).afterClosed().pipe((0,d.h)(i=>h.g.IsNotEmpty(i))).subscribe(i=>{this.searchFilter.ChannelID=i.ChannelID,this.searchFilter.ScanFull=i.ScanFull,this.searchFilter.UpdatedProduct=i.UpdatedProduct,this.searchFilter.Async=i.Async,this.scanAll()})}scanAll(){this.productService.scanAll(this.searchFilter.ChannelID,this.searchFilter.ScanFull,this.searchFilter.UpdatedProduct,this.searchFilter.Async).subscribe(t=>{if(this.searchFilter.Async)this.toastr.warning("You will be notified when the scan is completed.","Scan In Progress",{toastClass:"ngx-toastr toast-waiting"});else{let o=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);this.initPageLoader(),this.productService.successToastrScanAllProduct(t,o,!this.searchFilter.UpdatedProduct)}})}updatePrice(t){let o=this.productService.selectedVariantProduct(t);if(o.length>0){let a=o.map(s=>({ID:s.ID,Code:s.Code,Price:s.UnitPrice})),r={ListChannelID:this.channelOptions.filter(s=>s.selected).map(s=>s.ID),ListPrice:a};this.http.post("/api/Price/UpdateChannel",r).subscribe(s=>{this.paginationService.resetToFirstPage(this.searchFilter),this.toastr.success("Successfully updated "+r.ListPrice.length+" items in "+r.ListChannelID.length+" channels","Success")})}}updatePriceByVariant(t){let o={ID:t.ChannelID,ChannelItemID:t.ChannelItemID,ChannelVariantID:t.ChannelVariationID,Price:t.Price-0,VariantID:t.ID};this.http.post("/api/Price/UpdatePriceByID",o).subscribe(i=>{let a=this.productService.findChannelById(o.ID,this.channelOptions);this.toastr.success("Successfully updated "+t.ItemName+"("+t.VarName+") price in "+a.Name+" to "+o.Price,"Success"),this.paginationService.resetToFirstPage(this.searchFilter)})}onUpdateItems(t){const o=this.productService.selectedVariantProduct(t);this.dialog.open(y.j,{data:{selectedItems:o,channels:this.channelOptions},width:"40%"}).afterClosed().pipe((0,d.h)(i=>void 0!==i)).subscribe(i=>{this.channelOptions=i,this.updatePrice(t)})}getRowCount(){this.paginationService.hideCount=!1,this.allDataCount$=this.http.post(`/api/${this.rowCountAPI}`,{})}onNextPage(){this.paginationService.onNextPage(this.searchFilter)}onLastPage(){this.http.post(`/api/${this.rowCountAPI}`,{}).subscribe({next:t=>{this.searchFilter.PageNumber=1,this.paginationService.getAllData(this.searchFilter,t)}})}ngOnDestroy(){this.paginationService.destroy()}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(f.O),e.Y36(x._W),e.Y36(P.uw),e.Y36(A.b),e.Y36(b.M))},n.\u0275cmp=e.Xpm({type:n,selectors:[["app-price-pos-channel"]],decls:2,vars:3,consts:[["headerTitle","Price Comparison",3,"pageData","hideSearchDropdown","textButton","onSubmit",4,"ngIf"],["headerTitle","Price Comparison",3,"pageData","hideSearchDropdown","textButton","onSubmit"],[1,"d-flex"],[4,"ngIf"],[1,"container-fluid","mt-3"],[1,"row"],["class","col-md-12",4,"ngIf"],[1,"d-flex","justify-content-between","mt-5"],[1,"me-auto","d-sm-block","collapse","mt-3"],[1,"font-weight-bold","font-italic","hidden-xxs"],["style","cursor: pointer",3,"click",4,"ngIf"],[1,"btn-group"],["role","button","class","btn btn-outline-secondary btn-sm text-primary","title","Load more for 20 products",3,"click",4,"ngIf"],["role","button","class","btn btn-outline-secondary btn-sm text-primary","title","Load all products",3,"click",4,"ngIf"],["type","button","data-cy","scanInPos","class","btn btn-outline-secondary shadow rounded me-3",3,"click",4,"ngIf"],["type","button","class","btn btn-success shadow rounded","data-toggle","modal",3,"click",4,"ngIf"],["type","button","data-cy","scanInPos",1,"btn","btn-outline-secondary","shadow","rounded","me-3",3,"click"],[1,"fas","fa-lg","fa-crosshairs"],["type","button","data-toggle","modal",1,"btn","btn-success","shadow","rounded",3,"click"],[1,"fas","fa-chevron-circle-up"],[1,"col-md-12"],["productToggleTitle","Filter Different Price","table","price",3,"showProductToggle","data","channel","filter","onToggle","onSubmit"],[2,"cursor","pointer",3,"click"],["title","Retreive rows count",1,"border","p-3"],["role","button","title","Load more for 20 products",1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"click"],[1,"fas","fa-arrow-right"],["role","button","title","Load all products",1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"click"],[1,"fas","fa-share"]],template:function(t,o){1&t&&(e.YNc(0,E,23,21,"mainpanel",0),e.ALo(1,"async")),2&t&&e.Q6J("ngIf",e.lcZ(1,1,o.loader$))},dependencies:[p.O5,u.p,F.a,p.Ov,p.JJ],styles:[".no-bullet[_ngcontent-%COMP%]{list-style-type:none}"]}),n})();var g=l(8705),D=l(7945),H=l(1290),N=l(1739),I=l(1948);function R(n,c){if(1&n&&(e.TgZ(0,"mat-radio-button",3),e._uU(1),e.qZA()),2&n){const t=c.$implicit,o=c.index,i=e.oxw();e.Q6J("value",t.Key)("name",i.name)("title",i.tooltipsText[o]?i.tooltipsText[o]:""),e.xp6(1),e.hij(" ",t.Value,"")}}const G=function(n){return{"border-0":n}};let B=(()=>{class n{constructor(){this.modelChange=new e.vpe,this.border=!1,this.tooltipsText=[]}change(t){this.modelChange.emit(t)}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275cmp=e.Xpm({type:n,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,o){1&t&&(e.TgZ(0,"div",0)(1,"mat-radio-group",1),e.NdJ("ngModelChange",function(a){return o.change(a)}),e.YNc(2,R,2,4,"mat-radio-button",2),e.qZA()()),2&t&&(e.Q6J("ngClass",e.VKq(3,G,0==o.border)),e.xp6(1),e.Q6J("ngModel",o.model),e.xp6(1),e.Q6J("ngForOf",o.options))},dependencies:[p.mk,p.sg,I.VQ,I.U0,_.JJ,_.On],styles:[".mat-radio-label{margin-top:auto;margin-bottom:auto}"]}),n})(),j=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=e.oAB({type:n}),n.\u0275inj=e.cJS({imports:[p.ez,I.Fk,_.u5]}),n})();function z(n,c){if(1&n){const t=e.EpF();e.TgZ(0,"button",19),e.NdJ("click",function(){e.CHM(t);const i=e.oxw();return e.KtG(i.onUpdateItems())}),e._UZ(1,"i",20),e._uU(2," Update "),e.qZA()}}function W(n,c){if(1&n&&(e.TgZ(0,"th",21),e._uU(1),e.qZA()),2&n){const t=c.$implicit;e.xp6(1),e.Oqu(t.Name)}}function X(n,c){1&n&&(e.ynx(0),e.TgZ(1,"th",22),e._uU(2," Expected (POS) "),e.qZA(),e.TgZ(3,"th",22),e._uU(4," Channel "),e.qZA(),e.BQk())}function ee(n,c){if(1&n){const t=e.EpF();e.TgZ(0,"img",34),e.NdJ("click",function(i){e.CHM(t);const a=e.oxw(3).$implicit,r=e.oxw();return e.KtG(r.onZoomImage(i,null==a?null:a.ImageUrl))}),e.qZA()}if(2&n){const t=e.oxw(3).$implicit;e.s9C("src",null==t?null:t.ImageUrl,e.LSH)}}function te(n,c){1&n&&e._UZ(0,"img",35)}const ne=function(n){return{"border-bottom":n}};function ie(n,c){if(1&n&&(e.ynx(0),e.TgZ(1,"td",29),e.YNc(2,ee,1,1,"img",30),e.YNc(3,te,1,0,"ng-template",null,31,e.W1O),e.qZA(),e.TgZ(5,"td",32)(6,"h5",33),e._uU(7),e.qZA(),e._UZ(8,"br"),e.TgZ(9,"small"),e._uU(10),e.qZA()(),e.BQk()),2&n){const t=e.MAs(4),o=e.oxw().index,i=e.oxw().$implicit,a=e.oxw();e.xp6(1),e.Q6J("rowSpan",null==i?null:i.Variants.length)("ngClass",e.VKq(7,ne,o+1==a.products.length)),e.xp6(1),e.Q6J("ngIf",null==i?null:i.ImageUrl)("ngIfElse",t),e.xp6(3),e.Q6J("rowSpan",null==i?null:i.Variants.length),e.xp6(2),e.Oqu(null==i?null:i.Name),e.xp6(3),e.hij("(",null==i?null:i.Category,")")}}const oe=function(n){return{"bg-gradient-warning":n}};function ae(n,c){if(1&n){const t=e.EpF();e.ynx(0),e.TgZ(1,"td",38),e._uU(2),e.ALo(3,"number"),e.qZA(),e.TgZ(4,"td",39)(5,"div",40)(6,"div",41),e.NdJ("click",function(){const a=e.CHM(t).$implicit,r=e.oxw(2).$implicit,s=e.oxw().$implicit,Oe=e.oxw();return e.KtG(Oe.openTableDialog(r,s,a))}),e._uU(7),e.ALo(8,"number"),e._UZ(9,"br"),e.qZA(),e.TgZ(10,"div",42)(11,"a",26),e._UZ(12,"i",27),e.qZA()()()(),e.BQk()}if(2&n){const t=c.$implicit;e.xp6(2),e.hij(" ",e.lcZ(3,4,t.PriceExpected)," "),e.xp6(2),e.Q6J("ngClass",e.VKq(8,oe,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 ce(n,c){1&n&&(e.TgZ(0,"td",43),e._uU(1,"X"),e.qZA(),e.TgZ(2,"td",43),e._uU(3,"X"),e.qZA())}function re(n,c){if(1&n&&(e.ynx(0),e.YNc(1,ae,13,10,"ng-container",36),e.YNc(2,ce,4,0,"ng-template",null,37,e.W1O),e.BQk()),2&n){const t=c.$implicit,o=e.MAs(3),i=e.oxw().$implicit,a=e.oxw(2);e.xp6(1),e.Q6J("ngIf",a.getItemFromChannel(i,t.ID))("ngIfElse",o)}}function le(n,c){if(1&n){const t=e.EpF();e.TgZ(0,"tr"),e.YNc(1,ie,11,9,"ng-container",23),e.TgZ(2,"td",24),e._uU(3),e.qZA(),e.TgZ(4,"td",24)(5,"span"),e._uU(6),e.qZA(),e.TgZ(7,"span",25)(8,"a",26),e._UZ(9,"i",27),e.qZA()()(),e.TgZ(10,"td",28)(11,"input",17),e.NdJ("ngModelChange",function(i){const r=e.CHM(t).$implicit;return e.KtG(r.selected=i)}),e.qZA()(),e.YNc(12,re,4,2,"ng-container",18),e.qZA()}if(2&n){const t=c.$implicit,o=c.index,i=e.oxw(2);e.xp6(1),e.Q6J("ngIf",0==o),e.xp6(2),e.Oqu(null==t?null:t.Model),e.xp6(3),e.Oqu(null==t?null:t.Code),e.xp6(2),e.Q6J("href","https://"+i.hostName+"/menu/Products/Catalog/Variants/Info?ID="+(null==t?null:t.ID),e.LSH),e.xp6(2),e.Q6J("hidden",null==i.searchFilter?null:i.searchFilter.HiddenIPOSInventory),e.xp6(1),e.Q6J("ngModel",t.selected),e.xp6(1),e.Q6J("ngForOf",i.channelOptions)}}function se(n,c){if(1&n&&(e.TgZ(0,"tbody"),e.YNc(1,le,13,7,"tr",18),e.qZA()),2&n){const t=c.$implicit;e.xp6(1),e.Q6J("ngForOf",t.Variants)}}let pe=(()=>{class n{constructor(t,o,i,a,r){this.http=t,this.toastr=o,this.dialog=i,this.productService=a,this.biggerPictureService=r,this.searchFilter=new H.k,this.products=[],this.checkboxState=!1,this.initPageLoader(),this.filterTypeOptions=[{Key:g.v.ALL,Value:"All"},{Key:g.v.DIFFERENCE,Value:"Difference"}],this.filterType=g.v.ALL,this.pageData={Title:"Price Realtime",Nav:[{Title:"Price Cache",Url:"/menu/price",Active:!1}]},this.hostName=a.getHostName()}initPageLoader(){this.http.post("/api/PriceLoader/LoadMultiple",{}).subscribe(t=>{this.channelOptions=t.Options.Channel,this.searchFilter=t.Filter,this.searchFilter.HiddenIPOSInventory=!1,this.onFilter()})}onSelectAllData(){this.products=this.products.map(t=>(t.Variants&&(t.Variants=t.Variants.map(o=>(o.selected=this.checkboxState,o))),t))}onFilter(t){this.http.post("/api/Price/GetOutletPrice",{text:t,filterModel:this.filterType,PageNumber:this.searchFilter.PageNumber,RowCount:this.searchFilter.RowCount}).subscribe(i=>{this.products=i.Data})}updatePrice(){let t=this.productService.selectedVariantProduct(this.products);if(t.length>0){let o=t.map(r=>r.ID),a={ListChannelID:this.channelOptions.filter(r=>r.selected).map(r=>r.ID),ListID:o};this.http.post("/api/Price/UpdateChannelOutletPrice",a).subscribe({next:r=>{this.resetSelectedChannel(),this.onFilter(),this.toastr.success("Successfully updated "+a.ListID.length+" items in "+a.ListChannelID.length+" channels","Success")},error:r=>{this.resetSelectedChannel()}})}}resetSelectedChannel(){this.channelOptions=this.channelOptions.map(t=>(t.selected=!1,t))}getItemFromChannel(t,o){return t.Channel.find(i=>i.ChannelID==o)}onUpdateItems(){const t=this.productService.selectedVariantProduct(this.products);this.dialog.open(y.j,{data:{selectedItems:t,channels:this.channelOptions},width:"40%"}).afterClosed().pipe((0,d.h)(o=>h.g.IsNotEmpty(o))).subscribe(o=>{this.channelOptions=o,this.updatePrice()})}openTableDialog(t,o,i){let a=JSON.parse(JSON.stringify(t));this.dialog.open(D.k,{data:{Name:o.Name,Variant:a,ChannelID:i?.ChannelID,Table:"price",ChannelItemID:i?.ChannelItemID}}).afterClosed().pipe((0,d.h)(s=>h.g.IsNotEmpty(s))).subscribe(s=>{this.updateProductPrice(s,i)})}updateProductPrice(t,o){let i={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",i).subscribe(a=>{o.Price=i.Price;const r=this.productService.findChannelById(i.ID,this.channelOptions);this.toastr.success(`Successfully updated ${t.ItemName} (${t.VarName}) inventory in ${r.Name} to ${i.Price}`,"Success")})}onZoomImage(t,o){this.biggerPictureService.openBiggerPicture(t,o)}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(f.O),e.Y36(x._W),e.Y36(P.uw),e.Y36(b.M),e.Y36(N.k))},n.\u0275cmp=e.Xpm({type:n,selectors:[["app-custom-channel-price"]],decls:31,vars:13,consts:[["headerTitle","Price Comparison",3,"pageData","hideSearchBox","hideSearchDropdown","textButton","onSubmit"],["container",""],["name","filterModel",3,"model","options","border","modelChange"],[1,"d-flex"],["type","button","class","btn btn-success shadow rounded","data-toggle","modal",3,"click",4,"ngIf"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"table"],[1,"thead-light","sticky-top-thead"],["colspan","5"],["scope","col","colspan","2","class","text-center border-bottom-0 border w-10 text-uppercase",4,"ngFor","ngForOf"],["scope","col","colspan","2",1,"text-center","w-20"],["scope","col",1,"text-start"],["scope","col",1,"text-start","w-10"],[3,"hidden"],["type","checkbox",3,"ngModel","ngModelChange"],[4,"ngFor","ngForOf"],["type","button","data-toggle","modal",1,"btn","btn-success","shadow","rounded",3,"click"],[1,"fas","fa-chevron-circle-up"],["scope","col","colspan","2",1,"text-center","border-bottom-0","border","w-10","text-uppercase"],[1,"text-end","border-top-0","border","w-10"],[4,"ngIf"],[1,"text-start","border-bottom"],[1,"ms-2"],["target","_blank",3,"href"],[1,"fas","fa-lg","fa-external-link-alt","external-link-custom"],[1,"align-middle",3,"hidden"],[1,"text-center",3,"rowSpan","ngClass"],["class","border rounded w-img cursor-pointer",3,"src","click",4,"ngIf","ngIfElse"],["elsePic",""],[1,"text-center","border-bottom",3,"rowSpan"],[1,"mb-0","item-name"],[1,"border","rounded","w-img","cursor-pointer",3,"src","click"],["src","//res.cloudinary.com/pos/image/upload/w_40/POS/Images/Icon/products_thumb.png",1,"border","rounded","w-img"],[4,"ngIf","ngIfElse"],["elseCol",""],[1,"text-end","border"],[1,"text-end","border","pointer","cell-hover",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"],[1,"table-white","border","text-end",2,"color","red"]],template:function(t,o){1&t&&(e.TgZ(0,"mainpanel",0),e.NdJ("onSubmit",function(a){return o.onFilter(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 o.filterType=a}),e.qZA()()()(),e.TgZ(7,"actions")(8,"div",3),e.YNc(9,z,3,0,"button",4),e.qZA()(),e.TgZ(10,"content")(11,"div",5)(12,"div",6)(13,"div",7)(14,"div",8)(15,"table",9)(16,"thead",10)(17,"tr"),e._UZ(18,"th",11),e.YNc(19,W,2,1,"th",12),e.qZA(),e.TgZ(20,"tr")(21,"th",13),e._uU(22,"Product"),e.qZA(),e.TgZ(23,"th",14),e._uU(24,"Variant"),e.qZA(),e.TgZ(25,"th",15),e._uU(26,"SKU"),e.qZA(),e.TgZ(27,"th",16)(28,"input",17),e.NdJ("ngModelChange",function(a){return o.checkboxState=a})("ngModelChange",function(){return o.onSelectAllData()}),e.qZA()(),e.YNc(29,X,5,0,"ng-container",18),e.qZA()(),e.YNc(30,se,2,1,"tbody",18),e.qZA()()()()()()()),2&t&&(e.Q6J("pageData",o.pageData)("hideSearchBox",!1)("hideSearchDropdown",!1)("textButton","Search"),e.xp6(6),e.Q6J("model",o.filterType)("options",o.filterTypeOptions)("border",!1),e.xp6(3),e.Q6J("ngIf",o.productService.hasSelectionVariant(o.products)),e.xp6(10),e.Q6J("ngForOf",o.channelOptions),e.xp6(8),e.Q6J("hidden",null==o.searchFilter?null:o.searchFilter.HiddenIPOSInventory),e.xp6(1),e.Q6J("ngModel",o.checkboxState),e.xp6(1),e.Q6J("ngForOf",o.channelOptions),e.xp6(1),e.Q6J("ngForOf",o.products))},dependencies:[p.mk,p.sg,p.O5,_.Wl,_.JJ,_.On,u.p,B,p.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}"]}),n})();var M=l(455),J=l(266);function _e(n,c){if(1&n){const t=e.EpF();e.TgZ(0,"button",8),e.NdJ("click",function(){e.CHM(t);const i=e.oxw(2).ngIf,a=e.oxw();return e.KtG(a.openScanDialog(i))}),e._UZ(1,"i",9),e._uU(2," Scan Channel "),e.qZA()}}function he(n,c){if(1&n){const t=e.EpF();e.TgZ(0,"button",10),e.NdJ("click",function(){e.CHM(t);const i=e.oxw().ngIf,a=e.oxw(2);return e.KtG(a.updateStock(i))}),e._UZ(1,"i",11),e._uU(2," Update "),e.qZA()}}function de(n,c){if(1&n&&(e.TgZ(0,"actions")(1,"div",5)(2,"div"),e.YNc(3,_e,3,0,"button",6),e.YNc(4,he,3,0,"button",7),e.qZA()()()),2&n){const t=c.ngIf,o=e.oxw(2);e.xp6(3),e.Q6J("ngIf",!o.productService.hasSelectionVariant(t)),e.xp6(1),e.Q6J("ngIf",o.productService.hasSelectionVariant(t))}}function ge(n,c){if(1&n&&(e.TgZ(0,"ng-option",32),e._UZ(1,"img",33),e._uU(2),e.qZA()),2&n){const t=c.$implicit;e.Q6J("value",t.ID),e.xp6(1),e.s9C("src",t.Img,e.LSH),e.xp6(1),e.hij("",t.Name," ")}}function ue(n,c){if(1&n){const t=e.EpF();e.TgZ(0,"input",53),e.NdJ("ngModelChange",function(i){e.CHM(t);const a=e.oxw(3).$implicit;return e.KtG(a.selected=i)})("ngModelChange",function(){e.CHM(t);const i=e.oxw(3).$implicit,a=e.oxw(3);return e.KtG(a.onCheckboxStateProduct(i))}),e.qZA()}if(2&n){const t=e.oxw(3).$implicit;e.Q6J("ngModel",t.selected)}}function me(n,c){if(1&n){const t=e.EpF();e.TgZ(0,"img",54),e.NdJ("click",function(i){e.CHM(t);const a=e.oxw(3).$implicit,r=e.oxw(3);return e.KtG(r.onZoomImage(i,null==a?null:a.ImageUrl))}),e.qZA()}if(2&n){const t=e.oxw(3).$implicit;e.s9C("src",t.ThumbnailUrl,e.LSH)}}function Ce(n,c){1&n&&e._UZ(0,"img",55)}function fe(n,c){if(1&n&&(e.ynx(0),e.TgZ(1,"td",46)(2,"div",47),e.YNc(3,ue,1,1,"input",48),e.YNc(4,me,1,1,"img",49),e.YNc(5,Ce,1,0,"ng-template",null,50,e.W1O),e.qZA()(),e.TgZ(7,"td",51)(8,"span",52),e._uU(9),e.qZA(),e._UZ(10,"br"),e.TgZ(11,"small"),e._uU(12),e.qZA()(),e.BQk()),2&n){const t=e.MAs(6),o=e.oxw().$implicit,i=e.oxw().$implicit;e.xp6(1),e.Q6J("rowSpan",i.Variants.length),e.xp6(2),e.Q6J("ngIf",o.Inventory>=0||i.Variants.length>1),e.xp6(1),e.Q6J("ngIf",i.ThumbnailUrl)("ngIfElse",t),e.xp6(3),e.Q6J("rowSpan",i.Variants.length),e.xp6(2),e.Oqu(i.Name),e.xp6(3),e.hij("(",i.Category,")")}}function xe(n,c){if(1&n){const t=e.EpF();e.TgZ(0,"input",56),e.NdJ("ngModelChange",function(i){e.CHM(t);const a=e.oxw().$implicit;return e.KtG(a.selected=i)}),e.qZA()}if(2&n){const t=e.oxw().$implicit;e.Q6J("ngModel",t.selected)}}function Pe(n,c){if(1&n){const t=e.EpF();e.TgZ(0,"div",57)(1,"div",58),e.NdJ("click",function(){e.CHM(t);const i=e.oxw().$implicit,a=e.oxw().$implicit,r=e.oxw(2).ngIf,s=e.oxw();return e.KtG(s.openTableDialog(i,a,r))}),e._uU(2),e.ALo(3,"number"),e.qZA()()}if(2&n){const t=e.oxw().$implicit;e.xp6(2),e.hij(" ",e.lcZ(3,1,null==t.Channel[0]?null:t.Channel[0].Price)," ")}}const be=function(n){return{"bg-gradient-warning":n}};function Ie(n,c){if(1&n){const t=e.EpF();e.TgZ(0,"tr"),e.YNc(1,fe,13,7,"ng-container",4),e.TgZ(2,"td",19),e._uU(3),e.qZA(),e.TgZ(4,"td",22)(5,"span"),e._uU(6),e.qZA(),e.TgZ(7,"span",34)(8,"a",35),e._UZ(9,"i",36),e.qZA()()(),e.TgZ(10,"td",37),e.YNc(11,xe,1,1,"input",38),e.qZA(),e.TgZ(12,"td",22),e._uU(13),e.ALo(14,"number"),e.qZA(),e.TgZ(15,"td",39),e.YNc(16,Pe,4,3,"div",40),e.qZA(),e.TgZ(17,"td")(18,"div",41)(19,"div",42)(20,"a",35),e._UZ(21,"i",43),e.qZA(),e._uU(22," \xa0\xa0 "),e.TgZ(23,"span",44),e.NdJ("click",function(){const a=e.CHM(t).$implicit,r=e.oxw(4);return e.KtG(r.refreshPrice(a))}),e._UZ(24,"i",45),e.qZA()()()()()}if(2&n){const t=c.$implicit,o=c.index,i=e.oxw(4);e.xp6(1),e.Q6J("ngIf",0==o),e.xp6(2),e.Oqu(t.Model),e.xp6(3),e.hij(" ",t.Code," "),e.xp6(2),e.Q6J("href","https://"+i.hostName+"/menu/Products/Catalog/Variants/Info?ID="+(null==t?null:t.ID),e.LSH),e.xp6(3),e.Q6J("ngIf",t.Inventory>=0),e.xp6(2),e.hij(" ",e.lcZ(14,9,t.UnitPrice)," "),e.xp6(2),e.Q6J("ngClass",e.VKq(11,be,t.UnitPrice!=(null==t.Channel[0]?null:t.Channel[0].Price))),e.xp6(1),e.Q6J("ngIf",t.Channel.length>0),e.xp6(4),e.Q6J("href",null==t.Channel[0]?null:t.Channel[0].Url,e.LSH)}}function Se(n,c){if(1&n&&(e.ynx(0),e.YNc(1,Ie,25,13,"tr",26),e.BQk()),2&n){const t=c.$implicit;e.xp6(1),e.Q6J("ngForOf",t.Variants)}}function Te(n,c){if(1&n){const t=e.EpF();e.TgZ(0,"span",59),e.NdJ("click",function(){e.CHM(t);const i=e.oxw(3);return e.KtG(i.getRowCount())}),e.TgZ(1,"i",60),e._uU(2,"?"),e.qZA()()}}function ve(n,c){if(1&n&&(e.TgZ(0,"span"),e._uU(1),e.ALo(2,"number"),e.qZA()),2&n){const t=c.ngIf;e.xp6(1),e.Oqu(e.lcZ(2,1,t.Total))}}function Ze(n,c){if(1&n){const t=e.EpF();e.TgZ(0,"a",64),e.NdJ("click",function(){e.CHM(t);const i=e.oxw(4);return e.KtG(i.onNextPage())}),e._UZ(1,"i",65),e._uU(2," Next"),e.qZA()}}function ye(n,c){if(1&n){const t=e.EpF();e.TgZ(0,"a",66),e.NdJ("click",function(){e.CHM(t);const i=e.oxw(4);return e.KtG(i.onLastPage())}),e._UZ(1,"i",67),e._uU(2," Last"),e.qZA()}}function we(n,c){if(1&n&&(e.TgZ(0,"div",61),e.YNc(1,Ze,3,0,"a",62),e.YNc(2,ye,3,0,"a",63),e.qZA()),2&n){const t=e.oxw(3);e.xp6(1),e.Q6J("ngIf",t.paginationService.disableNextButton&&!t.paginationService.goToLastPage),e.xp6(1),e.Q6J("ngIf",t.paginationService.disableNextButton&&!t.paginationService.goToLastPage)}}function Ae(n,c){if(1&n){const t=e.EpF();e.TgZ(0,"content")(1,"div",12)(2,"div",13)(3,"table",14)(4,"thead",15)(5,"tr")(6,"th",16),e._uU(7," Product "),e.TgZ(8,"div")(9,"mat-slide-toggle",17),e.NdJ("ngModelChange",function(i){e.CHM(t);const a=e.oxw(2);return e.KtG(a.toggleDifferentInventory=i)})("toggleChange",function(){e.CHM(t);const i=e.oxw(2);return e.KtG(i.onToggleDifferentInventory())}),e.TgZ(10,"small",18),e._uU(11,"Filter Different Price"),e.qZA()()()(),e.TgZ(12,"th",19),e._uU(13,"Variant"),e.qZA(),e.TgZ(14,"th",20),e._uU(15,"SKU"),e.qZA(),e.TgZ(16,"th")(17,"input",21),e.NdJ("change",function(i){const r=e.CHM(t).ngIf,s=e.oxw(2);return e.KtG(s.onSelectAllSKU(i.target.checked,r))}),e.qZA()(),e.TgZ(18,"th",22),e._uU(19,"POS"),e.qZA(),e.TgZ(20,"th")(21,"ng-select",23),e.NdJ("ngModelChange",function(i){e.CHM(t);const a=e.oxw(2);return e.KtG(a.searchFilter.ChannelID=i)})("change",function(){e.CHM(t);const i=e.oxw(2);return e.KtG(i.search())}),e.YNc(22,ge,3,3,"ng-option",24),e.qZA()(),e._UZ(23,"th",25),e.qZA()(),e.TgZ(24,"tbody"),e.YNc(25,Se,2,1,"ng-container",26),e.qZA()(),e.TgZ(26,"div",27)(27,"div",28)(28,"div",29),e._uU(29),e.ALo(30,"number"),e.YNc(31,Te,3,0,"span",30),e.YNc(32,ve,3,3,"span",4),e.ALo(33,"async"),e._uU(34),e.qZA()(),e.YNc(35,we,3,2,"div",31),e.qZA()()()()}if(2&n){const t=c.ngIf,o=e.oxw().ngIf,i=e.oxw();e.xp6(9),e.Q6J("ngModel",i.toggleDifferentInventory),e.xp6(12),e.Q6J("clearable",!1)("ngModel",i.searchFilter.ChannelID),e.xp6(1),e.Q6J("ngForOf",o.Options.Channel),e.xp6(3),e.Q6J("ngForOf",t),e.xp6(4),e.hij(" Showing 1 - ",e.lcZ(30,10,null==t?null:t.length)," of "),e.xp6(2),e.Q6J("ngIf",i.paginationService.hideCount),e.xp6(1),e.Q6J("ngIf",e.lcZ(33,12,!i.paginationService.hideCount&&i.allDataCount$)),e.xp6(2),e.hij(" records ~ ",i.paginationService.footerPageNumber," Page "),e.xp6(1),e.Q6J("ngIf",t.length>0)}}function Fe(n,c){if(1&n){const t=e.EpF();e.TgZ(0,"mainpanel",1),e.NdJ("textChange",function(i){e.CHM(t);const a=e.oxw();return e.KtG(a.searchFilter.text=i)})("onSubmit",function(){e.CHM(t);const i=e.oxw();return e.KtG(i.search())}),e.TgZ(1,"filters")(2,"div",2)(3,"div")(4,"label"),e._uU(5,"Page Size"),e.qZA(),e.TgZ(6,"input",3),e.NdJ("ngModelChange",function(i){e.CHM(t);const a=e.oxw();return e.KtG(a.searchFilter.RowCount=i)}),e.qZA()()()(),e.YNc(7,de,5,2,"actions",4),e.ALo(8,"async"),e.YNc(9,Ae,36,14,"content",4),e.ALo(10,"async"),e.qZA()}if(2&n){const t=e.oxw();e.Q6J("headerTitle",t.pageTitle)("text",t.searchFilter.text),e.xp6(6),e.Q6J("ngModel",t.searchFilter.RowCount),e.xp6(1),e.Q6J("ngIf",e.lcZ(8,5,t.paginationService.data$)),e.xp6(2),e.Q6J("ngIf",e.lcZ(10,7,t.paginationService.data$))}}let De=(()=>{class n{constructor(t,o,i,a,r,s){this.http=t,this.paginationService=o,this.toastr=i,this.dialog=a,this.productService=r,this.biggerPictureService=s,this.pageTitle="Price Single Channel Comparison",this.toggleDifferentInventory=!1,this.loaderEndpoint="PriceLoader/Load",this.dataEndpoint="Price/GetSingleChannelComparison",this.allDataCountEndpoint="Inventory/GetInventoryByChannelRowCount",this.hostName=this.productService.getHostName()}ngOnInit(){this.initPageLoader()}initPageLoader(){this.paginationService.fetchDataEndpoint=this.dataEndpoint,this.loader$=this.http.post(`/API/${this.loaderEndpoint}`).pipe((0,w.b)(t=>{this.searchFilter=t.Filter,this.searchFilter.filterModel=g.v.ALL,this.paginationService.resetToFirstPage(this.searchFilter)}))}onToggleDifferentInventory(){this.searchFilter.filterModel=this.toggleDifferentInventory?g.v.ALL:g.v.DIFFERENCE,this.search()}onCheckboxStateProduct(t){t.Variants=t.Variants.map(o=>(o.selected=t.selected,o))}openScanDialog(t){let o=JSON.parse(JSON.stringify(this.searchFilter));o.ChannelID=h.g.GuidEMpty,this.dialog.open(Z.j,{data:{filter:o,channelOptions:t.Options.Channel},width:"40%"}).afterClosed().pipe((0,d.h)(i=>h.g.IsNotEmpty(i))).subscribe(i=>{this.searchFilter.ChannelID=i.ChannelID,this.searchFilter.ScanFull=i.ScanFull,this.searchFilter.UpdatedProduct=i.UpdatedProduct,this.searchFilter.Async=i.Async,this.scanAll(t)})}scanAll(t){const o=this.productService.findChannelById(this.searchFilter.ChannelID,t.Options.Channel);this.productService.scanAll(this.searchFilter.ChannelID,this.searchFilter.ScanFull,this.searchFilter.UpdatedProduct,this.searchFilter.Async).subscribe(i=>{this.searchFilter.Async?this.toastr.warning("You will be notified when the scan is completed.","Scan In Progress",{toastClass:"ngx-toastr toast-waiting"}):(this.initPageLoader(),this.toastr.success(`Successfully scanned from ${o?.Name}`,"Success"))})}updateStock(t){let i=this.productService.selectedVariantProduct(t).map(r=>({ID:r.ID,ChannelID:r.Channel[0].ChannelID,Code:r.Code,Price:r.UnitPrice})),a={ListChannelID:[this.searchFilter.ChannelID],ListPrice:i};this.http.post("/api/Price/UpdateChannel",a).subscribe(()=>{this.search(),this.toastr.success(`Successfully updated ${a.ListPrice.length} variants in ${a.ListChannelID.length} channels`,"Success")})}refreshPrice(t){this.http.post("/api/Price/RefreshPriceChannel",{ChannelItemID:t?.Channel[0].ChannelItemID,ChannelVariationID:t?.Channel[0]?.ChannelVariationID,ChannelID:t?.Channel[0]?.ChannelID,VariantID:t.ID}).subscribe(i=>{this.toastr.success("Successfully updated","Success"),this.search()})}search(){this.paginationService.resetToFirstPage(this.searchFilter)}getRowCount(){this.paginationService.hideCount=!1,this.allDataCount$=this.http.post(`/API/${this.allDataCountEndpoint}`,this.searchFilter)}onNextPage(){this.paginationService.onNextPage(this.searchFilter)}onLastPage(){this.http.post(`/API/${this.allDataCountEndpoint}`,this.searchFilter).subscribe({next:t=>{this.paginationService.getAllData(this.searchFilter,t.Total)}})}openTableDialog(t,o,i){let a=JSON.parse(JSON.stringify(t));this.dialog.open(D.k,{data:{Name:o.Name,Variant:a,ChannelID:a?.Channel[0]?.ChannelID,Table:"price",ChannelItemID:a?.Channel[0]?.ChannelItemID}}).afterClosed().pipe((0,d.h)(s=>h.g.IsNotEmpty(s))).subscribe(s=>{this.updateItemAfterDialog(s,i,t)})}updateItemAfterDialog(t,o,i){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=>{const s=this.productService.findChannelById(a.ID,o.Options.Channel);this.toastr.success(`Successfully updated ${t.ItemName} (${t.VarName}) inventory in ${s.Name} to ${a.Price}`,"Success"),i.Channel[0]&&(i.Channel[0].Price=a.Price)})}onSelectAllSKU(t,o){o=o.map(i=>(i.Variants=i.Variants.map(a=>(a.selected=t,a)),i))}onZoomImage(t,o){this.biggerPictureService.openBiggerPicture(t,o)}ngOnDestroy(){this.paginationService.destroy()}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(f.O),e.Y36(A.b),e.Y36(x._W),e.Y36(P.uw),e.Y36(b.M),e.Y36(N.k))},n.\u0275cmp=e.Xpm({type:n,selectors:[["app-price-single-channel"]],decls:2,vars:3,consts:[[3,"headerTitle","text","textChange","onSubmit",4,"ngIf"],[3,"headerTitle","text","textChange","onSubmit"],["container",""],["type","number",3,"ngModel","ngModelChange"],[4,"ngIf"],[1,"d-flex"],["type","button","data-cy","scanInPos","class","btn btn-outline-secondary shadow rounded me-3",3,"click",4,"ngIf"],["class","btn btn-success",3,"click",4,"ngIf"],["type","button","data-cy","scanInPos",1,"btn","btn-outline-secondary","shadow","rounded","me-3",3,"click"],[1,"fas","fa-lg","fa-crosshairs"],[1,"btn","btn-success",3,"click"],[1,"fas","fa-chevron-circle-up"],[1,"container-fluid","mt-5"],[1,"table-responsive"],[1,"table"],[1,"thead-light","sticky-top-thead"],["colspan","2",1,"text-center","ps-12",2,"width","36%"],["name","differentInventory",3,"ngModel","ngModelChange","toggleChange"],[1,"fw-bold"],[1,"text-start"],[1,"text-end",2,"width","20%"],["type","checkbox",1,"me-3",3,"change"],[1,"text-end"],["name","channelOption",3,"clearable","ngModel","ngModelChange","change"],[3,"value",4,"ngFor","ngForOf"],[2,"width","4%"],[4,"ngFor","ngForOf"],[1,"d-flex","justify-content-between","mt-5"],[1,"me-auto","d-sm-block","collapse","mt-3"],[1,"font-weight-bold","font-italic","hidden-xxs"],["style","cursor:pointer",3,"click",4,"ngIf"],["class","btn-group",4,"ngIf"],[3,"value"],[2,"width","18px","margin-right","10px",3,"src"],[1,"ms-2"],["target","_blank",3,"href"],[1,"fas","external-link-custom","fa-external-link-alt"],[1,"align-middle"],["type","checkbox",3,"ngModel","ngModelChange",4,"ngIf"],[1,"text-end",3,"ngClass"],["class","row justify-content-end me-0",4,"ngIf"],[1,"row"],[1,"col-12","ps-0","d-flex","justify-content-between"],[1,"fas","external-link-custom","fa-lg","fa-external-link-alt"],["matTooltip","Refresh Unit Price according to seller center",1,"pl-5","cursor-pointer",2,"color","var(--bs-link-color)",3,"click"],[1,"fas","external-link-custom","fa-sync","fa-lg"],[1,"text-start",2,"width","0%",3,"rowSpan"],[1,"d-flex","align-items-center","justify-content-start"],["type","checkbox","class","me-3",3,"ngModel","ngModelChange",4,"ngIf"],["class","border rounded w-img cursor-pointer","style","margin-left: 20px",3,"src","click",4,"ngIf","ngIfElse"],["elsePic",""],[1,"text-start",3,"rowSpan"],[1,"item-name","mb-0"],["type","checkbox",1,"me-3",3,"ngModel","ngModelChange"],[1,"border","rounded","w-img","cursor-pointer",2,"margin-left","20px",3,"src","click"],["src","//res.cloudinary.com/pos/image/upload/w_40/POS/Images/Icon/products_thumb.png",1,"border","rounded","w-img",2,"margin-left","20px"],["type","checkbox",3,"ngModel","ngModelChange"],[1,"row","justify-content-end","me-0"],[1,"col-8","ps-0","pe-12","text-end",2,"cursor","pointer",3,"click"],[2,"cursor","pointer",3,"click"],["title","Retreive rows count",1,"border","p-3"],[1,"btn-group"],["role","button","class","btn btn-outline-secondary btn-sm text-primary","title","Load more for 20 products",3,"click",4,"ngIf"],["role","button","class","btn btn-outline-secondary btn-sm text-primary","title","Load all products",3,"click",4,"ngIf"],["role","button","title","Load more for 20 products",1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"click"],[1,"fas","fa-arrow-right"],["role","button","title","Load all products",1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"click"],[1,"fas","fa-share"]],template:function(t,o){1&t&&(e.YNc(0,Fe,11,9,"mainpanel",0),e.ALo(1,"async")),2&t&&e.Q6J("ngIf",e.lcZ(1,1,o.loader$))},dependencies:[p.mk,p.sg,p.O5,_.Fj,_.wV,_.Wl,_.JJ,_.On,u.p,C.w9,C.jq,M.Rr,J.gM,p.Ov,p.JJ],styles:[".w-img[_ngcontent-%COMP%]{width:40px;height:40px}input[type=checkbox][_ngcontent-%COMP%]{width:15px;height:15px}i.fas.custom-size[_ngcontent-%COMP%]{font-size:13px}.item-name[_ngcontent-%COMP%]{font-size:larger}"]}),n})();var S=l(8063);const Ne=[{path:"",component:U,children:[{path:"",redirectTo:"SingleChannel",pathMatch:"full"},{path:"pos",component:K,canActivate:[S.a],data:{title:"Global Price Comparison"}},{path:"OutletPrice",component:pe,canActivate:[S.a],data:{title:"Outlet Price Comparison"}},{path:"SingleChannel",component:De,canActivate:[S.a],data:{title:"Price Single Channel Comparison"}}]}];let Me=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=e.oAB({type:n}),n.\u0275inj=e.cJS({imports:[p.ez,m.Bz.forChild(Ne)]}),n})();var Je=l(6709);let Ue=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=e.oAB({type:n}),n.\u0275inj=e.cJS({imports:[p.ez,_.u5,v.Z,u.R,m.Bz,C.A0,Me,_.UX,M.rP,j,Je.p9,F.U,J.AV]}),n})()}}]);
|
|
1
|
+
"use strict";(self.webpackChunkpos_marketplace=self.webpackChunkpos_marketplace||[]).push([[874],{1874:(ke,T,l)=>{l.r(T),l.d(T,{PriceModule:()=>Ue});var p=l(6895),v=l(7398),u=l(7481),m=l(6806),_=l(4006),C=l(8796),e=l(4650);let U=(()=>{class n{constructor(){this.priceTabs=[{Title:"Single Channel Comparison",Url:"/menu/price/SingleChannel"},{Title:"Multi Channel Comparison",Url:"/menu/price/pos"},{Title:"Custom Channel Price",Url:"/menu/price/OutletPrice"}]}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275cmp=e.Xpm({type:n,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,o){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",o.priceTabs))},dependencies:[v.e,m.lC]}),n})();var Z=l(8231),y=l(6304),w=l(8505),d=l(9300),h=l(3154),f=l(1318),x=l(7185),P=l(5412),A=l(9425),b=l(6082),F=l(488);function O(n,c){if(1&n){const t=e.EpF();e.TgZ(0,"button",16),e.NdJ("click",function(){e.CHM(t);const i=e.oxw(3);return e.KtG(i.openScanDialog())}),e._UZ(1,"i",17),e._uU(2," Scan Channel "),e.qZA()}}function k(n,c){if(1&n){const t=e.EpF();e.TgZ(0,"button",18),e.NdJ("click",function(){e.CHM(t);const i=e.oxw().ngIf,a=e.oxw(2);return e.KtG(a.onUpdateItems(i))}),e._UZ(1,"i",19),e._uU(2," Update "),e.qZA()}}function L(n,c){if(1&n&&(e.TgZ(0,"div"),e.YNc(1,O,3,0,"button",14),e.YNc(2,k,3,0,"button",15),e.qZA()),2&n){const t=c.ngIf,o=e.oxw(2);e.xp6(1),e.Q6J("ngIf",!o.productService.hasSelectionVariant(t)),e.xp6(1),e.Q6J("ngIf",o.productService.hasSelectionVariant(t))}}function Q(n,c){if(1&n){const t=e.EpF();e.TgZ(0,"div",20)(1,"app-table",21),e.NdJ("onToggle",function(i){e.CHM(t);const a=e.oxw(2);return e.KtG(a.onShowDifferencePrice(i))})("onSubmit",function(i){e.CHM(t);const a=e.oxw(2);return e.KtG(a.updatePriceByVariant(i))}),e.ALo(2,"async"),e.qZA()()}if(2&n){const t=e.oxw().ngIf,o=e.oxw();e.xp6(1),e.Q6J("showProductToggle",!0)("data",e.lcZ(2,4,o.paginationService.data$))("channel",t.Options.Channel)("filter",t.Filter)}}function q(n,c){if(1&n){const t=e.EpF();e.TgZ(0,"span",22),e.NdJ("click",function(){e.CHM(t);const i=e.oxw(2);return e.KtG(i.getRowCount())}),e.TgZ(1,"i",23),e._uU(2,"?"),e.qZA()()}}function V(n,c){if(1&n&&(e.TgZ(0,"span"),e._uU(1),e.ALo(2,"number"),e.qZA()),2&n){const t=c.ngIf;e.xp6(1),e.Oqu(e.lcZ(2,1,t))}}function $(n,c){if(1&n){const t=e.EpF();e.TgZ(0,"a",24),e.NdJ("click",function(){e.CHM(t);const i=e.oxw(2);return e.KtG(i.onNextPage())}),e._UZ(1,"i",25),e._uU(2," Next"),e.qZA()}}function Y(n,c){if(1&n){const t=e.EpF();e.TgZ(0,"a",26),e.NdJ("click",function(){e.CHM(t);const i=e.oxw(2);return e.KtG(i.onLastPage())}),e._UZ(1,"i",27),e._uU(2," Last"),e.qZA()}}function E(n,c){if(1&n){const t=e.EpF();e.TgZ(0,"mainpanel",1),e.NdJ("onSubmit",function(i){e.CHM(t);const a=e.oxw();return e.KtG(a.onSearch(i))}),e.TgZ(1,"actions")(2,"div",2),e.YNc(3,L,3,2,"div",3),e.ALo(4,"async"),e.qZA()(),e.TgZ(5,"content")(6,"div",4)(7,"div",5),e.YNc(8,Q,3,6,"div",6),e.ALo(9,"async"),e.qZA(),e.TgZ(10,"div",7)(11,"div",8)(12,"div",9),e._uU(13),e.ALo(14,"number"),e.ALo(15,"async"),e.YNc(16,q,3,0,"span",10),e.YNc(17,V,3,3,"span",3),e.ALo(18,"async"),e._uU(19),e.qZA()(),e.TgZ(20,"div",11),e.YNc(21,$,3,0,"a",12),e.YNc(22,Y,3,0,"a",13),e.qZA()()()()()}if(2&n){const t=e.oxw();let o;e.Q6J("pageData",t.pageData)("hideSearchDropdown",!0)("textButton","Search"),e.xp6(3),e.Q6J("ngIf",e.lcZ(4,11,t.paginationService.data$)),e.xp6(5),e.Q6J("ngIf",e.lcZ(9,13,t.paginationService.data$)),e.xp6(5),e.hij(" Showing 1 - ",e.lcZ(14,15,null==(o=e.lcZ(15,17,t.paginationService.data$))?null:o.length)," of "),e.xp6(3),e.Q6J("ngIf",t.paginationService.hideCount),e.xp6(1),e.Q6J("ngIf",!t.paginationService.hideCount&&e.lcZ(18,19,t.allDataCount$)),e.xp6(2),e.hij(" records ~ ",t.paginationService.footerPageNumber," Page "),e.xp6(2),e.Q6J("ngIf",t.paginationService.disableNextButton&&!t.paginationService.goToLastPage),e.xp6(1),e.Q6J("ngIf",t.paginationService.disableNextButton&&!t.paginationService.goToLastPage)}}let K=(()=>{class n{constructor(t,o,i,a,r){this.http=t,this.toastr=o,this.dialog=i,this.paginationService=a,this.productService=r,this.loaderAPI="PriceLoader/LoadMultiple",this.getDataAPI="Price/GetMultipleChannelComparison",this.rowCountAPI="Inventory/GetMultipleChannelComparisonRowCount",this.filterOptions=[{Key:1,Value:"All"},{Key:3,Value:"Difference"}],this.pageData={Title:"Price",Nav:[{Title:"Price Cache",Url:"/menu/price",Active:!0},{Title:"Price Realtime",Url:"/menu/price/realtime",Active:!1}]}}ngOnInit(){this.initPageLoader()}initPageLoader(){this.paginationService.fetchDataEndpoint=this.getDataAPI,this.loader$=this.http.post(`/api/${this.loaderAPI}`).pipe((0,w.b)(t=>{this.channelOptions=t.Options.Channel,t.Filter={PageNumber:t.Filter.PageNumber,RowCount:t.Filter.RowCount,filterModel:1},this.searchFilter=t.Filter,this.paginationService.resetToFirstPage(this.searchFilter)}))}onShowDifferencePrice(t){this.searchFilter.filterModel=1,t&&(this.searchFilter.filterModel=3),this.paginationService.resetToFirstPage(this.searchFilter)}onSearch(t){this.searchFilter.text=t,this.paginationService.resetToFirstPage(this.searchFilter)}openScanDialog(){this.searchFilter.ChannelID=h.g.GuidEMpty;let t=JSON.parse(JSON.stringify(this.searchFilter));this.dialog.open(Z.j,{data:{filter:t,channelOptions:this.channelOptions},width:"40%"}).afterClosed().pipe((0,d.h)(i=>h.g.IsNotEmpty(i))).subscribe(i=>{this.searchFilter.ChannelID=i.ChannelID,this.searchFilter.ScanFull=i.ScanFull,this.searchFilter.UpdatedProduct=i.UpdatedProduct,this.searchFilter.Async=i.Async,this.scanAll()})}scanAll(){this.productService.scanAll(this.searchFilter.ChannelID,this.searchFilter.ScanFull,this.searchFilter.UpdatedProduct,this.searchFilter.Async).subscribe(t=>{if(this.searchFilter.Async)this.toastr.warning("You will be notified when the scan is completed.","Scan In Progress",{toastClass:"ngx-toastr toast-waiting"});else{let o=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);this.initPageLoader(),this.productService.successToastrScanAllProduct(t,o,!this.searchFilter.UpdatedProduct)}})}updatePrice(t){let o=this.productService.selectedVariantProduct(t);if(o.length>0){let a=o.map(s=>({ID:s.ID,Code:s.Code,Price:s.UnitPrice})),r={ListChannelID:this.channelOptions.filter(s=>s.selected).map(s=>s.ID),ListPrice:a};this.http.post("/api/Price/UpdateChannel",r).subscribe(s=>{this.paginationService.resetToFirstPage(this.searchFilter),this.toastr.success("Successfully updated "+r.ListPrice.length+" items in "+r.ListChannelID.length+" channels","Success")})}}updatePriceByVariant(t){let o={ID:t.ChannelID,ChannelItemID:t.ChannelItemID,ChannelVariantID:t.ChannelVariationID,Price:t.Price-0,VariantID:t.ID};this.http.post("/api/Price/UpdatePriceByID",o).subscribe(i=>{let a=this.productService.findChannelById(o.ID,this.channelOptions);this.toastr.success("Successfully updated "+t.ItemName+"("+t.VarName+") price in "+a.Name+" to "+o.Price,"Success"),this.paginationService.resetToFirstPage(this.searchFilter)})}onUpdateItems(t){const o=this.productService.selectedVariantProduct(t);this.dialog.open(y.j,{data:{selectedItems:o,channels:this.channelOptions},width:"40%"}).afterClosed().pipe((0,d.h)(i=>void 0!==i)).subscribe(i=>{this.channelOptions=i,this.updatePrice(t)})}getRowCount(){this.paginationService.hideCount=!1,this.allDataCount$=this.http.post(`/api/${this.rowCountAPI}`,{})}onNextPage(){this.paginationService.onNextPage(this.searchFilter)}onLastPage(){this.http.post(`/api/${this.rowCountAPI}`,{}).subscribe({next:t=>{this.searchFilter.PageNumber=1,this.paginationService.getAllData(this.searchFilter,t)}})}ngOnDestroy(){this.paginationService.destroy()}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(f.O),e.Y36(x._W),e.Y36(P.uw),e.Y36(A.b),e.Y36(b.M))},n.\u0275cmp=e.Xpm({type:n,selectors:[["app-price-pos-channel"]],decls:2,vars:3,consts:[["headerTitle","Price Comparison",3,"pageData","hideSearchDropdown","textButton","onSubmit",4,"ngIf"],["headerTitle","Price Comparison",3,"pageData","hideSearchDropdown","textButton","onSubmit"],[1,"d-flex"],[4,"ngIf"],[1,"container-fluid","mt-3"],[1,"row"],["class","col-md-12",4,"ngIf"],[1,"d-flex","justify-content-between","mt-5"],[1,"me-auto","d-sm-block","collapse","mt-3"],[1,"font-weight-bold","font-italic","hidden-xxs"],["style","cursor: pointer",3,"click",4,"ngIf"],[1,"btn-group"],["role","button","class","btn btn-outline-secondary btn-sm text-primary","title","Load more for 20 products",3,"click",4,"ngIf"],["role","button","class","btn btn-outline-secondary btn-sm text-primary","title","Load all products",3,"click",4,"ngIf"],["type","button","data-cy","scanInPos","class","btn btn-outline-secondary shadow rounded me-3",3,"click",4,"ngIf"],["type","button","class","btn btn-success shadow rounded","data-toggle","modal",3,"click",4,"ngIf"],["type","button","data-cy","scanInPos",1,"btn","btn-outline-secondary","shadow","rounded","me-3",3,"click"],[1,"fas","fa-lg","fa-crosshairs"],["type","button","data-toggle","modal",1,"btn","btn-success","shadow","rounded",3,"click"],[1,"fas","fa-chevron-circle-up"],[1,"col-md-12"],["productToggleTitle","Filter Different Price","table","price",3,"showProductToggle","data","channel","filter","onToggle","onSubmit"],[2,"cursor","pointer",3,"click"],["title","Retreive rows count",1,"border","p-3"],["role","button","title","Load more for 20 products",1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"click"],[1,"fas","fa-arrow-right"],["role","button","title","Load all products",1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"click"],[1,"fas","fa-share"]],template:function(t,o){1&t&&(e.YNc(0,E,23,21,"mainpanel",0),e.ALo(1,"async")),2&t&&e.Q6J("ngIf",e.lcZ(1,1,o.loader$))},dependencies:[p.O5,u.p,F.a,p.Ov,p.JJ],styles:[".no-bullet[_ngcontent-%COMP%]{list-style-type:none}"]}),n})();var g=l(8705),D=l(7945),H=l(1290),N=l(1739),I=l(1948);function R(n,c){if(1&n&&(e.TgZ(0,"mat-radio-button",3),e._uU(1),e.qZA()),2&n){const t=c.$implicit,o=c.index,i=e.oxw();e.Q6J("value",t.Key)("name",i.name)("title",i.tooltipsText[o]?i.tooltipsText[o]:""),e.xp6(1),e.hij(" ",t.Value,"")}}const G=function(n){return{"border-0":n}};let B=(()=>{class n{constructor(){this.modelChange=new e.vpe,this.border=!1,this.tooltipsText=[]}change(t){this.modelChange.emit(t)}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275cmp=e.Xpm({type:n,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,o){1&t&&(e.TgZ(0,"div",0)(1,"mat-radio-group",1),e.NdJ("ngModelChange",function(a){return o.change(a)}),e.YNc(2,R,2,4,"mat-radio-button",2),e.qZA()()),2&t&&(e.Q6J("ngClass",e.VKq(3,G,0==o.border)),e.xp6(1),e.Q6J("ngModel",o.model),e.xp6(1),e.Q6J("ngForOf",o.options))},dependencies:[p.mk,p.sg,I.VQ,I.U0,_.JJ,_.On],styles:[".mat-radio-label{margin-top:auto;margin-bottom:auto}"]}),n})(),j=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=e.oAB({type:n}),n.\u0275inj=e.cJS({imports:[p.ez,I.Fk,_.u5]}),n})();function z(n,c){if(1&n){const t=e.EpF();e.TgZ(0,"button",19),e.NdJ("click",function(){e.CHM(t);const i=e.oxw();return e.KtG(i.onUpdateItems())}),e._UZ(1,"i",20),e._uU(2," Update "),e.qZA()}}function W(n,c){if(1&n&&(e.TgZ(0,"th",21),e._uU(1),e.qZA()),2&n){const t=c.$implicit;e.xp6(1),e.Oqu(t.Name)}}function X(n,c){1&n&&(e.ynx(0),e.TgZ(1,"th",22),e._uU(2," Expected (POS) "),e.qZA(),e.TgZ(3,"th",22),e._uU(4," Channel "),e.qZA(),e.BQk())}function ee(n,c){if(1&n){const t=e.EpF();e.TgZ(0,"img",34),e.NdJ("click",function(i){e.CHM(t);const a=e.oxw(3).$implicit,r=e.oxw();return e.KtG(r.onZoomImage(i,null==a?null:a.ImageUrl))}),e.qZA()}if(2&n){const t=e.oxw(3).$implicit;e.s9C("src",null==t?null:t.ImageUrl,e.LSH)}}function te(n,c){1&n&&e._UZ(0,"img",35)}const ne=function(n){return{"border-bottom":n}};function ie(n,c){if(1&n&&(e.ynx(0),e.TgZ(1,"td",29),e.YNc(2,ee,1,1,"img",30),e.YNc(3,te,1,0,"ng-template",null,31,e.W1O),e.qZA(),e.TgZ(5,"td",32)(6,"h5",33),e._uU(7),e.qZA(),e._UZ(8,"br"),e.TgZ(9,"small"),e._uU(10),e.qZA()(),e.BQk()),2&n){const t=e.MAs(4),o=e.oxw().index,i=e.oxw().$implicit,a=e.oxw();e.xp6(1),e.Q6J("rowSpan",null==i?null:i.Variants.length)("ngClass",e.VKq(7,ne,o+1==a.products.length)),e.xp6(1),e.Q6J("ngIf",null==i?null:i.ImageUrl)("ngIfElse",t),e.xp6(3),e.Q6J("rowSpan",null==i?null:i.Variants.length),e.xp6(2),e.Oqu(null==i?null:i.Name),e.xp6(3),e.hij("(",null==i?null:i.Category,")")}}const oe=function(n){return{"bg-gradient-warning":n}};function ae(n,c){if(1&n){const t=e.EpF();e.ynx(0),e.TgZ(1,"td",38),e._uU(2),e.ALo(3,"number"),e.qZA(),e.TgZ(4,"td",39)(5,"div",40)(6,"div",41),e.NdJ("click",function(){const a=e.CHM(t).$implicit,r=e.oxw(2).$implicit,s=e.oxw().$implicit,Oe=e.oxw();return e.KtG(Oe.openTableDialog(r,s,a))}),e._uU(7),e.ALo(8,"number"),e._UZ(9,"br"),e.qZA(),e.TgZ(10,"div",42)(11,"a",26),e._UZ(12,"i",27),e.qZA()()()(),e.BQk()}if(2&n){const t=c.$implicit;e.xp6(2),e.hij(" ",e.lcZ(3,4,t.PriceExpected)," "),e.xp6(2),e.Q6J("ngClass",e.VKq(8,oe,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 ce(n,c){1&n&&(e.TgZ(0,"td",43),e._uU(1,"X"),e.qZA(),e.TgZ(2,"td",43),e._uU(3,"X"),e.qZA())}function re(n,c){if(1&n&&(e.ynx(0),e.YNc(1,ae,13,10,"ng-container",36),e.YNc(2,ce,4,0,"ng-template",null,37,e.W1O),e.BQk()),2&n){const t=c.$implicit,o=e.MAs(3),i=e.oxw().$implicit,a=e.oxw(2);e.xp6(1),e.Q6J("ngIf",a.getItemFromChannel(i,t.ID))("ngIfElse",o)}}function le(n,c){if(1&n){const t=e.EpF();e.TgZ(0,"tr"),e.YNc(1,ie,11,9,"ng-container",23),e.TgZ(2,"td",24),e._uU(3),e.qZA(),e.TgZ(4,"td",24)(5,"span"),e._uU(6),e.qZA(),e.TgZ(7,"span",25)(8,"a",26),e._UZ(9,"i",27),e.qZA()()(),e.TgZ(10,"td",28)(11,"input",17),e.NdJ("ngModelChange",function(i){const r=e.CHM(t).$implicit;return e.KtG(r.selected=i)}),e.qZA()(),e.YNc(12,re,4,2,"ng-container",18),e.qZA()}if(2&n){const t=c.$implicit,o=c.index,i=e.oxw(2);e.xp6(1),e.Q6J("ngIf",0==o),e.xp6(2),e.Oqu(null==t?null:t.Model),e.xp6(3),e.Oqu(null==t?null:t.Code),e.xp6(2),e.Q6J("href","https://"+i.hostName+"/menu/Products/Catalog/Variants/Info?ID="+(null==t?null:t.ID),e.LSH),e.xp6(2),e.Q6J("hidden",null==i.searchFilter?null:i.searchFilter.HiddenIPOSInventory),e.xp6(1),e.Q6J("ngModel",t.selected),e.xp6(1),e.Q6J("ngForOf",i.channelOptions)}}function se(n,c){if(1&n&&(e.TgZ(0,"tbody"),e.YNc(1,le,13,7,"tr",18),e.qZA()),2&n){const t=c.$implicit;e.xp6(1),e.Q6J("ngForOf",t.Variants)}}let pe=(()=>{class n{constructor(t,o,i,a,r){this.http=t,this.toastr=o,this.dialog=i,this.productService=a,this.biggerPictureService=r,this.searchFilter=new H.k,this.products=[],this.checkboxState=!1,this.initPageLoader(),this.filterTypeOptions=[{Key:g.v.ALL,Value:"All"},{Key:g.v.DIFFERENCE,Value:"Difference"}],this.filterType=g.v.ALL,this.pageData={Title:"Price Realtime",Nav:[{Title:"Price Cache",Url:"/menu/price",Active:!1}]},this.hostName=a.getHostName()}initPageLoader(){this.http.post("/api/PriceLoader/LoadMultiple",{}).subscribe(t=>{this.channelOptions=t.Options.Channel,this.searchFilter=t.Filter,this.searchFilter.HiddenIPOSInventory=!1,this.onFilter()})}onSelectAllData(){this.products=this.products.map(t=>(t.Variants&&(t.Variants=t.Variants.map(o=>(o.selected=this.checkboxState,o))),t))}onFilter(t){this.http.post("/api/Price/GetOutletPrice",{text:t,filterModel:this.filterType,PageNumber:this.searchFilter.PageNumber,RowCount:this.searchFilter.RowCount}).subscribe(i=>{this.products=i.Data})}updatePrice(){let t=this.productService.selectedVariantProduct(this.products);if(t.length>0){let o=t.map(r=>r.ID),a={ListChannelID:this.channelOptions.filter(r=>r.selected).map(r=>r.ID),ListID:o};this.http.post("/api/Price/UpdateChannelOutletPrice",a).subscribe({next:r=>{this.resetSelectedChannel(),this.onFilter(),this.toastr.success("Successfully updated "+a.ListID.length+" items in "+a.ListChannelID.length+" channels","Success")},error:r=>{this.resetSelectedChannel()}})}}resetSelectedChannel(){this.channelOptions=this.channelOptions.map(t=>(t.selected=!1,t))}getItemFromChannel(t,o){return t.Channel.find(i=>i.ChannelID==o)}onUpdateItems(){const t=this.productService.selectedVariantProduct(this.products);this.dialog.open(y.j,{data:{selectedItems:t,channels:this.channelOptions},width:"40%"}).afterClosed().pipe((0,d.h)(o=>h.g.IsNotEmpty(o))).subscribe(o=>{this.channelOptions=o,this.updatePrice()})}openTableDialog(t,o,i){let a=JSON.parse(JSON.stringify(t));this.dialog.open(D.k,{data:{Name:o.Name,Variant:a,ChannelID:i?.ChannelID,Table:"price",ChannelItemID:i?.ChannelItemID}}).afterClosed().pipe((0,d.h)(s=>h.g.IsNotEmpty(s))).subscribe(s=>{this.updateProductPrice(s,i)})}updateProductPrice(t,o){let i={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",i).subscribe(a=>{o.Price=i.Price;const r=this.productService.findChannelById(i.ID,this.channelOptions);this.toastr.success(`Successfully updated ${t.ItemName} (${t.VarName}) inventory in ${r.Name} to ${i.Price}`,"Success")})}onZoomImage(t,o){this.biggerPictureService.openBiggerPicture(t,o)}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(f.O),e.Y36(x._W),e.Y36(P.uw),e.Y36(b.M),e.Y36(N.k))},n.\u0275cmp=e.Xpm({type:n,selectors:[["app-custom-channel-price"]],decls:31,vars:13,consts:[["headerTitle","Price Comparison",3,"pageData","hideSearchBox","hideSearchDropdown","textButton","onSubmit"],["container",""],["name","filterModel",3,"model","options","border","modelChange"],[1,"d-flex"],["type","button","class","btn btn-success shadow rounded","data-toggle","modal",3,"click",4,"ngIf"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"table"],[1,"thead-light","sticky-top-thead"],["colspan","5"],["scope","col","colspan","2","class","text-center border-bottom-0 border w-10 text-uppercase",4,"ngFor","ngForOf"],["scope","col","colspan","2",1,"text-center","w-20"],["scope","col",1,"text-start"],["scope","col",1,"text-start","w-10"],[3,"hidden"],["type","checkbox",3,"ngModel","ngModelChange"],[4,"ngFor","ngForOf"],["type","button","data-toggle","modal",1,"btn","btn-success","shadow","rounded",3,"click"],[1,"fas","fa-chevron-circle-up"],["scope","col","colspan","2",1,"text-center","border-bottom-0","border","w-10","text-uppercase"],[1,"text-end","border-top-0","border","w-10"],[4,"ngIf"],[1,"text-start","border-bottom"],[1,"ms-2"],["target","_blank",3,"href"],[1,"fas","fa-lg","fa-external-link-alt","external-link-custom"],[1,"align-middle",3,"hidden"],[1,"text-center",3,"rowSpan","ngClass"],["class","border rounded w-img cursor-pointer",3,"src","click",4,"ngIf","ngIfElse"],["elsePic",""],[1,"text-center","border-bottom",3,"rowSpan"],[1,"mb-0","item-name"],[1,"border","rounded","w-img","cursor-pointer",3,"src","click"],["src","//res.cloudinary.com/pos/image/upload/w_40/POS/Images/Icon/products_thumb.png",1,"border","rounded","w-img"],[4,"ngIf","ngIfElse"],["elseCol",""],[1,"text-end","border"],[1,"text-end","border","pointer","cell-hover",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"],[1,"table-white","border","text-end",2,"color","red"]],template:function(t,o){1&t&&(e.TgZ(0,"mainpanel",0),e.NdJ("onSubmit",function(a){return o.onFilter(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 o.filterType=a}),e.qZA()()()(),e.TgZ(7,"actions")(8,"div",3),e.YNc(9,z,3,0,"button",4),e.qZA()(),e.TgZ(10,"content")(11,"div",5)(12,"div",6)(13,"div",7)(14,"div",8)(15,"table",9)(16,"thead",10)(17,"tr"),e._UZ(18,"th",11),e.YNc(19,W,2,1,"th",12),e.qZA(),e.TgZ(20,"tr")(21,"th",13),e._uU(22,"Product"),e.qZA(),e.TgZ(23,"th",14),e._uU(24,"Variant"),e.qZA(),e.TgZ(25,"th",15),e._uU(26,"SKU"),e.qZA(),e.TgZ(27,"th",16)(28,"input",17),e.NdJ("ngModelChange",function(a){return o.checkboxState=a})("ngModelChange",function(){return o.onSelectAllData()}),e.qZA()(),e.YNc(29,X,5,0,"ng-container",18),e.qZA()(),e.YNc(30,se,2,1,"tbody",18),e.qZA()()()()()()()),2&t&&(e.Q6J("pageData",o.pageData)("hideSearchBox",!1)("hideSearchDropdown",!1)("textButton","Search"),e.xp6(6),e.Q6J("model",o.filterType)("options",o.filterTypeOptions)("border",!1),e.xp6(3),e.Q6J("ngIf",o.productService.hasSelectionVariant(o.products)),e.xp6(10),e.Q6J("ngForOf",o.channelOptions),e.xp6(8),e.Q6J("hidden",null==o.searchFilter?null:o.searchFilter.HiddenIPOSInventory),e.xp6(1),e.Q6J("ngModel",o.checkboxState),e.xp6(1),e.Q6J("ngForOf",o.channelOptions),e.xp6(1),e.Q6J("ngForOf",o.products))},dependencies:[p.mk,p.sg,p.O5,_.Wl,_.JJ,_.On,u.p,B,p.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}"]}),n})();var M=l(455),J=l(266);function _e(n,c){if(1&n){const t=e.EpF();e.TgZ(0,"button",8),e.NdJ("click",function(){e.CHM(t);const i=e.oxw(2).ngIf,a=e.oxw();return e.KtG(a.openScanDialog(i))}),e._UZ(1,"i",9),e._uU(2," Scan Channel "),e.qZA()}}function he(n,c){if(1&n){const t=e.EpF();e.TgZ(0,"button",10),e.NdJ("click",function(){e.CHM(t);const i=e.oxw().ngIf,a=e.oxw(2);return e.KtG(a.updateStock(i))}),e._UZ(1,"i",11),e._uU(2," Update "),e.qZA()}}function de(n,c){if(1&n&&(e.TgZ(0,"actions")(1,"div",5)(2,"div"),e.YNc(3,_e,3,0,"button",6),e.YNc(4,he,3,0,"button",7),e.qZA()()()),2&n){const t=c.ngIf,o=e.oxw(2);e.xp6(3),e.Q6J("ngIf",!o.productService.hasSelectionVariant(t)),e.xp6(1),e.Q6J("ngIf",o.productService.hasSelectionVariant(t))}}function ge(n,c){if(1&n&&(e.TgZ(0,"ng-option",32),e._UZ(1,"img",33),e._uU(2),e.qZA()),2&n){const t=c.$implicit;e.Q6J("value",t.ID),e.xp6(1),e.s9C("src",t.Img,e.LSH),e.xp6(1),e.hij("",t.Name," ")}}function ue(n,c){if(1&n){const t=e.EpF();e.TgZ(0,"input",53),e.NdJ("ngModelChange",function(i){e.CHM(t);const a=e.oxw(3).$implicit;return e.KtG(a.selected=i)})("ngModelChange",function(){e.CHM(t);const i=e.oxw(3).$implicit,a=e.oxw(3);return e.KtG(a.onCheckboxStateProduct(i))}),e.qZA()}if(2&n){const t=e.oxw(3).$implicit;e.Q6J("ngModel",t.selected)}}function me(n,c){if(1&n){const t=e.EpF();e.TgZ(0,"img",54),e.NdJ("click",function(i){e.CHM(t);const a=e.oxw(3).$implicit,r=e.oxw(3);return e.KtG(r.onZoomImage(i,null==a?null:a.ImageUrl))}),e.qZA()}if(2&n){const t=e.oxw(3).$implicit;e.s9C("src",t.ThumbnailUrl,e.LSH)}}function Ce(n,c){1&n&&e._UZ(0,"img",55)}function fe(n,c){if(1&n&&(e.ynx(0),e.TgZ(1,"td",46)(2,"div",47),e.YNc(3,ue,1,1,"input",48),e.YNc(4,me,1,1,"img",49),e.YNc(5,Ce,1,0,"ng-template",null,50,e.W1O),e.qZA()(),e.TgZ(7,"td",51)(8,"span",52),e._uU(9),e.qZA(),e._UZ(10,"br"),e.TgZ(11,"small"),e._uU(12),e.qZA()(),e.BQk()),2&n){const t=e.MAs(6),o=e.oxw().$implicit,i=e.oxw().$implicit;e.xp6(1),e.Q6J("rowSpan",i.Variants.length),e.xp6(2),e.Q6J("ngIf",o.Inventory>=0||i.Variants.length>1),e.xp6(1),e.Q6J("ngIf",i.ThumbnailUrl)("ngIfElse",t),e.xp6(3),e.Q6J("rowSpan",i.Variants.length),e.xp6(2),e.Oqu(i.Name),e.xp6(3),e.hij("(",i.Category,")")}}function xe(n,c){if(1&n){const t=e.EpF();e.TgZ(0,"input",56),e.NdJ("ngModelChange",function(i){e.CHM(t);const a=e.oxw().$implicit;return e.KtG(a.selected=i)}),e.qZA()}if(2&n){const t=e.oxw().$implicit;e.Q6J("ngModel",t.selected)}}function Pe(n,c){if(1&n){const t=e.EpF();e.TgZ(0,"div",57)(1,"div",58),e.NdJ("click",function(){e.CHM(t);const i=e.oxw().$implicit,a=e.oxw().$implicit,r=e.oxw(2).ngIf,s=e.oxw();return e.KtG(s.openTableDialog(i,a,r))}),e._uU(2),e.ALo(3,"number"),e.qZA()()}if(2&n){const t=e.oxw().$implicit;e.xp6(2),e.hij(" ",e.lcZ(3,1,null==t.Channel[0]?null:t.Channel[0].Price)," ")}}const be=function(n){return{"bg-gradient-warning":n}};function Ie(n,c){if(1&n){const t=e.EpF();e.TgZ(0,"tr"),e.YNc(1,fe,13,7,"ng-container",4),e.TgZ(2,"td",19),e._uU(3),e.qZA(),e.TgZ(4,"td",22)(5,"span"),e._uU(6),e.qZA(),e.TgZ(7,"span",34)(8,"a",35),e._UZ(9,"i",36),e.qZA()()(),e.TgZ(10,"td",37),e.YNc(11,xe,1,1,"input",38),e.qZA(),e.TgZ(12,"td",22),e._uU(13),e.ALo(14,"number"),e.qZA(),e.TgZ(15,"td",39),e.YNc(16,Pe,4,3,"div",40),e.qZA(),e.TgZ(17,"td")(18,"div",41)(19,"div",42)(20,"a",35),e._UZ(21,"i",43),e.qZA(),e._uU(22," \xa0\xa0 "),e.TgZ(23,"span",44),e.NdJ("click",function(){const a=e.CHM(t).$implicit,r=e.oxw(4);return e.KtG(r.refreshPrice(a))}),e._UZ(24,"i",45),e.qZA()()()()()}if(2&n){const t=c.$implicit,o=c.index,i=e.oxw(4);e.xp6(1),e.Q6J("ngIf",0==o),e.xp6(2),e.Oqu(t.Model),e.xp6(3),e.hij(" ",t.Code," "),e.xp6(2),e.Q6J("href","https://"+i.hostName+"/menu/Products/Catalog/Variants/Info?ID="+(null==t?null:t.ID),e.LSH),e.xp6(3),e.Q6J("ngIf",t.Inventory>=0),e.xp6(2),e.hij(" ",e.lcZ(14,9,t.UnitPrice)," "),e.xp6(2),e.Q6J("ngClass",e.VKq(11,be,t.UnitPrice!=(null==t.Channel[0]?null:t.Channel[0].Price))),e.xp6(1),e.Q6J("ngIf",t.Channel.length>0),e.xp6(4),e.Q6J("href",null==t.Channel[0]?null:t.Channel[0].Url,e.LSH)}}function Se(n,c){if(1&n&&(e.ynx(0),e.YNc(1,Ie,25,13,"tr",26),e.BQk()),2&n){const t=c.$implicit;e.xp6(1),e.Q6J("ngForOf",t.Variants)}}function Te(n,c){if(1&n){const t=e.EpF();e.TgZ(0,"span",59),e.NdJ("click",function(){e.CHM(t);const i=e.oxw(3);return e.KtG(i.getRowCount())}),e.TgZ(1,"i",60),e._uU(2,"?"),e.qZA()()}}function ve(n,c){if(1&n&&(e.TgZ(0,"span"),e._uU(1),e.ALo(2,"number"),e.qZA()),2&n){const t=c.ngIf;e.xp6(1),e.Oqu(e.lcZ(2,1,t.Total))}}function Ze(n,c){if(1&n){const t=e.EpF();e.TgZ(0,"a",64),e.NdJ("click",function(){e.CHM(t);const i=e.oxw(4);return e.KtG(i.onNextPage())}),e._UZ(1,"i",65),e._uU(2," Next"),e.qZA()}}function ye(n,c){if(1&n){const t=e.EpF();e.TgZ(0,"a",66),e.NdJ("click",function(){e.CHM(t);const i=e.oxw(4);return e.KtG(i.onLastPage())}),e._UZ(1,"i",67),e._uU(2," Last"),e.qZA()}}function we(n,c){if(1&n&&(e.TgZ(0,"div",61),e.YNc(1,Ze,3,0,"a",62),e.YNc(2,ye,3,0,"a",63),e.qZA()),2&n){const t=e.oxw(3);e.xp6(1),e.Q6J("ngIf",t.paginationService.disableNextButton&&!t.paginationService.goToLastPage),e.xp6(1),e.Q6J("ngIf",t.paginationService.disableNextButton&&!t.paginationService.goToLastPage)}}function Ae(n,c){if(1&n){const t=e.EpF();e.TgZ(0,"content")(1,"div",12)(2,"div",13)(3,"table",14)(4,"thead",15)(5,"tr")(6,"th",16),e._uU(7," Product "),e.TgZ(8,"div")(9,"mat-slide-toggle",17),e.NdJ("ngModelChange",function(i){e.CHM(t);const a=e.oxw(2);return e.KtG(a.toggleDifferentInventory=i)})("toggleChange",function(){e.CHM(t);const i=e.oxw(2);return e.KtG(i.onToggleDifferentInventory())}),e.TgZ(10,"small",18),e._uU(11,"Filter Different Price"),e.qZA()()()(),e.TgZ(12,"th",19),e._uU(13,"Variant"),e.qZA(),e.TgZ(14,"th",20),e._uU(15,"SKU"),e.qZA(),e.TgZ(16,"th")(17,"input",21),e.NdJ("change",function(i){const r=e.CHM(t).ngIf,s=e.oxw(2);return e.KtG(s.onSelectAllSKU(i.target.checked,r))}),e.qZA()(),e.TgZ(18,"th",22),e._uU(19,"POS"),e.qZA(),e.TgZ(20,"th")(21,"ng-select",23),e.NdJ("ngModelChange",function(i){e.CHM(t);const a=e.oxw(2);return e.KtG(a.searchFilter.ChannelID=i)})("change",function(){e.CHM(t);const i=e.oxw(2);return e.KtG(i.search())}),e.YNc(22,ge,3,3,"ng-option",24),e.qZA()(),e._UZ(23,"th",25),e.qZA()(),e.TgZ(24,"tbody"),e.YNc(25,Se,2,1,"ng-container",26),e.qZA()(),e.TgZ(26,"div",27)(27,"div",28)(28,"div",29),e._uU(29),e.ALo(30,"number"),e.YNc(31,Te,3,0,"span",30),e.YNc(32,ve,3,3,"span",4),e.ALo(33,"async"),e._uU(34),e.qZA()(),e.YNc(35,we,3,2,"div",31),e.qZA()()()()}if(2&n){const t=c.ngIf,o=e.oxw().ngIf,i=e.oxw();e.xp6(9),e.Q6J("ngModel",i.toggleDifferentInventory),e.xp6(12),e.Q6J("clearable",!1)("ngModel",i.searchFilter.ChannelID),e.xp6(1),e.Q6J("ngForOf",o.Options.Channel),e.xp6(3),e.Q6J("ngForOf",t),e.xp6(4),e.hij(" Showing 1 - ",e.lcZ(30,10,null==t?null:t.length)," of "),e.xp6(2),e.Q6J("ngIf",i.paginationService.hideCount),e.xp6(1),e.Q6J("ngIf",e.lcZ(33,12,!i.paginationService.hideCount&&i.allDataCount$)),e.xp6(2),e.hij(" records ~ ",i.paginationService.footerPageNumber," Page "),e.xp6(1),e.Q6J("ngIf",t.length>0)}}function Fe(n,c){if(1&n){const t=e.EpF();e.TgZ(0,"mainpanel",1),e.NdJ("textChange",function(i){e.CHM(t);const a=e.oxw();return e.KtG(a.searchFilter.text=i)})("onSubmit",function(){e.CHM(t);const i=e.oxw();return e.KtG(i.search())}),e.TgZ(1,"filters")(2,"div",2)(3,"div")(4,"label"),e._uU(5,"Page Size"),e.qZA(),e.TgZ(6,"input",3),e.NdJ("ngModelChange",function(i){e.CHM(t);const a=e.oxw();return e.KtG(a.searchFilter.RowCount=i)}),e.qZA()()()(),e.YNc(7,de,5,2,"actions",4),e.ALo(8,"async"),e.YNc(9,Ae,36,14,"content",4),e.ALo(10,"async"),e.qZA()}if(2&n){const t=e.oxw();e.Q6J("headerTitle",t.pageTitle)("text",t.searchFilter.text),e.xp6(6),e.Q6J("ngModel",t.searchFilter.RowCount),e.xp6(1),e.Q6J("ngIf",e.lcZ(8,5,t.paginationService.data$)),e.xp6(2),e.Q6J("ngIf",e.lcZ(10,7,t.paginationService.data$))}}let De=(()=>{class n{constructor(t,o,i,a,r,s){this.http=t,this.paginationService=o,this.toastr=i,this.dialog=a,this.productService=r,this.biggerPictureService=s,this.pageTitle="Price Single Channel Comparison",this.toggleDifferentInventory=!1,this.loaderEndpoint="PriceLoader/Load",this.dataEndpoint="Price/GetSingleChannelComparison",this.allDataCountEndpoint="Inventory/GetInventoryByChannelRowCount",this.hostName=this.productService.getHostName()}ngOnInit(){this.initPageLoader()}initPageLoader(){this.paginationService.fetchDataEndpoint=this.dataEndpoint,this.loader$=this.http.post(`/API/${this.loaderEndpoint}`).pipe((0,w.b)(t=>{this.searchFilter=t.Filter,this.searchFilter.filterModel=g.v.ALL,this.paginationService.resetToFirstPage(this.searchFilter)}))}onToggleDifferentInventory(){this.searchFilter.filterModel=this.toggleDifferentInventory?g.v.ALL:g.v.DIFFERENCE,this.search()}onCheckboxStateProduct(t){t.Variants=t.Variants.map(o=>(o.selected=t.selected,o))}openScanDialog(t){let o=JSON.parse(JSON.stringify(this.searchFilter));o.ChannelID=h.g.GuidEMpty,this.dialog.open(Z.j,{data:{filter:o,channelOptions:t.Options.Channel},width:"40%"}).afterClosed().pipe((0,d.h)(i=>h.g.IsNotEmpty(i))).subscribe(i=>{this.searchFilter.ChannelID=i.ChannelID,this.searchFilter.ScanFull=i.ScanFull,this.searchFilter.UpdatedProduct=i.UpdatedProduct,this.searchFilter.Async=i.Async,this.scanAll(t)})}scanAll(t){const o=this.productService.findChannelById(this.searchFilter.ChannelID,t.Options.Channel);this.productService.scanAll(this.searchFilter.ChannelID,this.searchFilter.ScanFull,this.searchFilter.UpdatedProduct,this.searchFilter.Async).subscribe(i=>{this.searchFilter.Async?this.toastr.warning("You will be notified when the scan is completed.","Scan In Progress",{toastClass:"ngx-toastr toast-waiting"}):(this.initPageLoader(),this.toastr.success(`Successfully scanned from ${o?.Name}`,"Success"))})}updateStock(t){let i=this.productService.selectedVariantProduct(t).map(r=>({ID:r.ID,ChannelID:r.Channel[0].ChannelID,Code:r.Code,Price:r.UnitPrice})),a={ListChannelID:[this.searchFilter.ChannelID],ListPrice:i};this.http.post("/api/Price/UpdateChannel",a).subscribe(()=>{this.search(),this.toastr.success(`Successfully updated ${a.ListPrice.length} variants in ${a.ListChannelID.length} channels`,"Success")})}refreshPrice(t){this.http.post("/api/Price/RefreshPriceChannel",{ChannelItemID:t?.Channel[0].ChannelItemID,ChannelVariationID:t?.Channel[0]?.ChannelVariationID,ChannelID:t?.Channel[0]?.ChannelID,VariantID:t.ID}).subscribe(i=>{this.toastr.success("Successfully updated","Success"),this.search()})}search(){this.paginationService.resetToFirstPage(this.searchFilter)}getRowCount(){this.paginationService.hideCount=!1,this.allDataCount$=this.http.post(`/API/${this.allDataCountEndpoint}`,this.searchFilter)}onNextPage(){this.paginationService.onNextPage(this.searchFilter)}onLastPage(){this.http.post(`/API/${this.allDataCountEndpoint}`,this.searchFilter).subscribe({next:t=>{this.paginationService.getAllData(this.searchFilter,t.Total)}})}openTableDialog(t,o,i){let a=JSON.parse(JSON.stringify(t));this.dialog.open(D.k,{data:{Name:o.Name,Variant:a,ChannelID:a?.Channel[0]?.ChannelID,Table:"price",ChannelItemID:a?.Channel[0]?.ChannelItemID}}).afterClosed().pipe((0,d.h)(s=>h.g.IsNotEmpty(s))).subscribe(s=>{this.updateItemAfterDialog(s,i,t)})}updateItemAfterDialog(t,o,i){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=>{const s=this.productService.findChannelById(a.ID,o.Options.Channel);this.toastr.success(`Successfully updated ${t.ItemName} (${t.VarName}) inventory in ${s.Name} to ${a.Price}`,"Success"),i.Channel[0]&&(i.Channel[0].Price=a.Price)})}onSelectAllSKU(t,o){o=o.map(i=>(i.Variants=i.Variants.map(a=>(a.selected=t,a)),i))}onZoomImage(t,o){this.biggerPictureService.openBiggerPicture(t,o)}ngOnDestroy(){this.paginationService.destroy()}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(f.O),e.Y36(A.b),e.Y36(x._W),e.Y36(P.uw),e.Y36(b.M),e.Y36(N.k))},n.\u0275cmp=e.Xpm({type:n,selectors:[["app-price-single-channel"]],decls:2,vars:3,consts:[[3,"headerTitle","text","textChange","onSubmit",4,"ngIf"],[3,"headerTitle","text","textChange","onSubmit"],["container",""],["type","number",3,"ngModel","ngModelChange"],[4,"ngIf"],[1,"d-flex"],["type","button","data-cy","scanInPos","class","btn btn-outline-secondary shadow rounded me-3",3,"click",4,"ngIf"],["class","btn btn-success",3,"click",4,"ngIf"],["type","button","data-cy","scanInPos",1,"btn","btn-outline-secondary","shadow","rounded","me-3",3,"click"],[1,"fas","fa-lg","fa-crosshairs"],[1,"btn","btn-success",3,"click"],[1,"fas","fa-chevron-circle-up"],[1,"container-fluid","mt-5"],[1,"table-responsive"],[1,"table"],[1,"thead-light","sticky-top-thead"],["colspan","2",1,"text-center","ps-12",2,"width","36%"],["name","differentInventory",3,"ngModel","ngModelChange","toggleChange"],[1,"fw-bold"],[1,"text-start"],[1,"text-end",2,"width","20%"],["type","checkbox",1,"me-3",3,"change"],[1,"text-end"],["name","channelOption",3,"clearable","ngModel","ngModelChange","change"],[3,"value",4,"ngFor","ngForOf"],[2,"width","4%"],[4,"ngFor","ngForOf"],[1,"d-flex","justify-content-between","mt-5"],[1,"me-auto","d-sm-block","collapse","mt-3"],[1,"font-weight-bold","font-italic","hidden-xxs"],["style","cursor:pointer",3,"click",4,"ngIf"],["class","btn-group",4,"ngIf"],[3,"value"],[2,"width","18px","margin-right","10px",3,"src"],[1,"ms-2"],["target","_blank",3,"href"],[1,"fas","external-link-custom","fa-external-link-alt"],[1,"align-middle"],["type","checkbox",3,"ngModel","ngModelChange",4,"ngIf"],[1,"text-end",3,"ngClass"],["class","row justify-content-end me-0",4,"ngIf"],[1,"row"],[1,"col-12","ps-0","d-flex","justify-content-between"],[1,"fas","external-link-custom","fa-lg","fa-external-link-alt"],["matTooltip","Refresh Unit Price according to seller center",1,"pl-5","cursor-pointer",2,"color","var(--bs-link-color)",3,"click"],[1,"fas","external-link-custom","fa-sync","fa-lg"],[1,"text-start",2,"width","0%",3,"rowSpan"],[1,"d-flex","align-items-center","justify-content-start"],["type","checkbox","class","me-3",3,"ngModel","ngModelChange",4,"ngIf"],["class","border rounded w-img cursor-pointer","style","margin-left: 20px",3,"src","click",4,"ngIf","ngIfElse"],["elsePic",""],[1,"text-start",3,"rowSpan"],[1,"item-name","mb-0"],["type","checkbox",1,"me-3",3,"ngModel","ngModelChange"],[1,"border","rounded","w-img","cursor-pointer",2,"margin-left","20px",3,"src","click"],["src","//res.cloudinary.com/pos/image/upload/w_40/POS/Images/Icon/products_thumb.png",1,"border","rounded","w-img",2,"margin-left","20px"],["type","checkbox",3,"ngModel","ngModelChange"],[1,"row","justify-content-end","me-0"],[1,"col-8","ps-0","pe-12","text-end",2,"cursor","pointer",3,"click"],[2,"cursor","pointer",3,"click"],["title","Retreive rows count",1,"border","p-3"],[1,"btn-group"],["role","button","class","btn btn-outline-secondary btn-sm text-primary","title","Load more for 20 products",3,"click",4,"ngIf"],["role","button","class","btn btn-outline-secondary btn-sm text-primary","title","Load all products",3,"click",4,"ngIf"],["role","button","title","Load more for 20 products",1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"click"],[1,"fas","fa-arrow-right"],["role","button","title","Load all products",1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"click"],[1,"fas","fa-share"]],template:function(t,o){1&t&&(e.YNc(0,Fe,11,9,"mainpanel",0),e.ALo(1,"async")),2&t&&e.Q6J("ngIf",e.lcZ(1,1,o.loader$))},dependencies:[p.mk,p.sg,p.O5,_.Fj,_.wV,_.Wl,_.JJ,_.On,u.p,C.w9,C.jq,M.Rr,J.gM,p.Ov,p.JJ],styles:[".w-img[_ngcontent-%COMP%]{width:40px;height:40px}input[type=checkbox][_ngcontent-%COMP%]{width:15px;height:15px}i.fas.custom-size[_ngcontent-%COMP%]{font-size:13px}.item-name[_ngcontent-%COMP%]{font-size:larger}"]}),n})();var S=l(8063);const Ne=[{path:"",component:U,children:[{path:"",redirectTo:"SingleChannel",pathMatch:"full"},{path:"pos",component:K,canActivate:[S.a],data:{title:"Global Price Comparison"}},{path:"OutletPrice",component:pe,canActivate:[S.a],data:{title:"Outlet Price Comparison"}},{path:"SingleChannel",component:De,canActivate:[S.a],data:{title:"Price Single Channel Comparison"}}]}];let Me=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=e.oAB({type:n}),n.\u0275inj=e.cJS({imports:[p.ez,m.Bz.forChild(Ne)]}),n})();var Je=l(6709);let Ue=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=e.oAB({type:n}),n.\u0275inj=e.cJS({imports:[p.ez,_.u5,v.Z,u.R,m.Bz,C.A0,Me,_.UX,M.rP,j,Je.p9,F.U,J.AV]}),n})()}}]);
|