marketplacepos 2.4.3 → 2.4.5

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.
Files changed (33) hide show
  1. package/Marketplace/162.4ce4550bb805d5d4.js +1 -0
  2. package/Marketplace/171.9cd91ffa365b9491.js +1 -0
  3. package/Marketplace/174.e214431f31fd131d.js +1 -0
  4. package/Marketplace/25.ad4f583264f99556.js +1 -0
  5. package/Marketplace/334.fca544ca6d7e11d3.js +1 -0
  6. package/Marketplace/360.479b6dc19c3aedfd.js +1 -0
  7. package/Marketplace/387.ef404fc903278a1c.js +1 -0
  8. package/Marketplace/402.f385d64daee6049e.js +1 -0
  9. package/Marketplace/{458.556f206f7d19bc29.js → 458.a9aae1853888dd58.js} +1 -1
  10. package/Marketplace/466.2e9f76621dd59e88.js +1 -0
  11. package/Marketplace/516.71620076f01c2cd7.js +1 -0
  12. package/Marketplace/61.481724edf2d23475.js +1 -0
  13. package/Marketplace/874.d45d1026769d75d1.js +1 -0
  14. package/Marketplace/assets/version-adjustment-v5.scss +2 -2
  15. package/Marketplace/common.1acc3df88ef73d5d.js +1 -0
  16. package/Marketplace/index.html +3 -3
  17. package/Marketplace/main.2fa426747cc66a26.js +1 -0
  18. package/Marketplace/runtime.22e3909f138762cb.js +1 -0
  19. package/Marketplace/{styles.f8366e17917068bd.css → styles.ab4c60b3cc2298c3.css} +2 -2
  20. package/package.json +1 -1
  21. package/Marketplace/102.00a16fb36f5a57f2.js +0 -1
  22. package/Marketplace/162.9784f9e579112c86.js +0 -1
  23. package/Marketplace/285.7583f3169c88c210.js +0 -1
  24. package/Marketplace/387.10f091023152d154.js +0 -1
  25. package/Marketplace/402.60951eab064c9706.js +0 -1
  26. package/Marketplace/455.fc7663306b753727.js +0 -1
  27. package/Marketplace/667.b7320f874219caa9.js +0 -1
  28. package/Marketplace/785.a0973529f8e8819e.js +0 -1
  29. package/Marketplace/874.9879a8b9489c9845.js +0 -1
  30. package/Marketplace/882.5d3edc53a8e4c38e.js +0 -1
  31. package/Marketplace/common.f2cd628914f2fae7.js +0 -1
  32. package/Marketplace/main.f30bf3b0f501021c.js +0 -1
  33. package/Marketplace/runtime.9cbc4802b0456746.js +0 -1
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkpos_marketplace=self.webpackChunkpos_marketplace||[]).push([[402],{5402:(_e,T,u)=>{u.r(T),u.d(T,{OrdersModule:()=>me});var s=u(6895),d=u(8252),e=u(4650),b=u(7398);let C=(()=>{class a{constructor(){this.ObjectOrderTabs=[{Title:"1 - New Order",Url:"/menu/Order/new"},{Title:"2 - Ready to Ship",Url:"/menu/Order/ready_to_ship"},{Title:"3 - Shipped",Url:"/menu/Order/Shipped"},{Title:"4 - Completed",Url:"/menu/Order/Delivered"},{Title:"All",Url:"/menu/Order/All"},{Title:"99 - Cancelled",Url:"/menu/Order/Cancelled"},{Title:"Download",Url:"/menu/Order/Download"}]}ngOnInit(){}}return a.\u0275fac=function(t){return new(t||a)},a.\u0275cmp=e.Xpm({type:a,selectors:[["app-orders"]],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.ObjectOrderTabs))},dependencies:[b.e,d.lC]}),a})();var g=u(1318),f=u(7185),r=u(4006),p=u(7481),h=u(8796),m=u(2594);function O(a,o){if(1&a&&(e.TgZ(0,"tr")(1,"td"),e._uU(2),e.qZA(),e.TgZ(3,"td"),e._uU(4),e.qZA(),e.TgZ(5,"td"),e._uU(6),e.qZA(),e.TgZ(7,"td"),e._uU(8),e.ALo(9,"number"),e.qZA(),e.TgZ(10,"td"),e._uU(11),e.ALo(12,"date"),e.qZA()()),2&a){const t=o.$implicit;e.xp6(2),e.Oqu(t.Outlet),e.xp6(2),e.Oqu(t.Number),e.xp6(2),e.Oqu(t.Customer),e.xp6(2),e.Oqu(e.lcZ(9,5,t.Amount)),e.xp6(3),e.Oqu(e.xi3(12,7,t.Created,"dd MMM yyyy HH:mm"))}}let v=(()=>{class a{constructor(t,n){this.http=t,this.toastr=n,this.filter={PageNumber:null,PageSize:null},this.totaldata=0,this.paginationTotal=0,this.checkboxState=!1}ngOnInit(){this.Load()}Load(){this.http.post("/api/ordersLoader/GetOrder",{}).subscribe(t=>{this.filter.PageNumber=t.Filter.PageNumber,this.filter.PageSize=t.Filter.RowCount,this.outlets=t.Options.Outlet,this.Get()})}Get(t){this.http.post("api/orders/GetNewOrder",{Number:t,PageNumber:this.filter.PageNumber,PageSize:this.filter.PageSize,Outlet:null!=this.selectedOutlets?this.selectedOutlets:this.outlets}).subscribe(i=>{this.data=i.Data,this.totaldata=this.data.length})}UpdateDelivery(){let t=this.getSelected();if(t.length>0){let n=[];t.forEach(i=>n.push(i)),this.http.post("/api/Orders/UpdateStateDelivery",n).subscribe(i=>{this.toastr.success("Successfully updated","Success")})}}getRowCount(){this.http.post("api/orders/GetRowCount",{Outlet:null!=this.selectedOutlets?this.selectedOutlets:this.outlets}).subscribe(n=>{this.paginationTotal=n.Total})}onCheckboxStateProduct(t){let n=this.data.filter(i=>i.Number==t);if(n.length>0)for(let i of n)i.selected=i.selected}onCheckboxStateChange(){for(let t of this.data)t.selected=this.checkboxState}getSelected(){let t=[];if(this.data){for(let n of this.data)n.selected&&t.push(n);return t}return[]}hasSelection(){return!!this.data&&this.getSelected().length>0}NextPage(){this.filter.PageNumber=this.filter.PageNumber+1,this.Get()}PreviousPage(){this.filter.PageNumber=this.filter.PageNumber-1,this.Get()}}return a.\u0275fac=function(t){return new(t||a)(e.Y36(g.O),e.Y36(f._W))},a.\u0275cmp=e.Xpm({type:a,selectors:[["app-new-order"]],decls:36,vars:11,consts:[["searchBoxPlaceHolder","Search Orders...",3,"headerTitle","hideSearchBox","onSubmit"],["container","",1,""],["bindLabel","Name","bindValue","ID","placeholder","Choose...",1,"outlet-multiple",3,"multiple","ngModel","items","ngModelChange"],["type","number","name","PageNumber",1,"w-100",3,"ngModel","ngModelChange"],["type","number","name","PageSize",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,"sticky-top-thead"],[1,"table-light"],[4,"ngFor","ngForOf"],[3,"filter","totaldata","paginationTotal","total","next","previous"]],template:function(t,n){1&t&&(e.TgZ(0,"mainpanel",0),e.NdJ("onSubmit",function(l){return n.Get(l)}),e.TgZ(1,"filters")(2,"div",1)(3,"div")(4,"h6"),e._uU(5,"Outlet"),e.qZA(),e.TgZ(6,"ng-select",2),e.NdJ("ngModelChange",function(l){return n.selectedOutlets=l}),e.qZA()(),e.TgZ(7,"div")(8,"h6"),e._uU(9,"Page Number"),e.qZA(),e.TgZ(10,"input",3),e.NdJ("ngModelChange",function(l){return n.filter.PageNumber=l}),e.qZA()(),e.TgZ(11,"div")(12,"h6"),e._uU(13,"Page Size"),e.qZA(),e.TgZ(14,"input",4),e.NdJ("ngModelChange",function(l){return n.filter.PageSize=l}),e.qZA()()()(),e.TgZ(15,"content")(16,"div",5)(17,"div",6)(18,"div",7)(19,"div",8)(20,"table",9)(21,"thead",10)(22,"tr",11)(23,"th"),e._uU(24,"Outlet"),e.qZA(),e.TgZ(25,"th"),e._uU(26,"Order number"),e.qZA(),e.TgZ(27,"th"),e._uU(28,"Customer"),e.qZA(),e.TgZ(29,"th"),e._uU(30,"Amount"),e.qZA(),e.TgZ(31,"th"),e._uU(32,"Created On"),e.qZA()()(),e.TgZ(33,"tbody"),e.YNc(34,O,13,10,"tr",12),e.qZA()(),e.TgZ(35,"app-mat-paginator-no-count",13),e.NdJ("total",function(){return n.getRowCount()})("next",function(){return n.NextPage()})("previous",function(){return n.PreviousPage()}),e.qZA()()()()()()()),2&t&&(e.Q6J("headerTitle","1 - New Order")("hideSearchBox",!0),e.xp6(6),e.Q6J("multiple",!0)("ngModel",n.selectedOutlets)("items",n.outlets),e.xp6(4),e.Q6J("ngModel",n.filter.PageNumber),e.xp6(4),e.Q6J("ngModel",n.filter.PageSize),e.xp6(20),e.Q6J("ngForOf",n.data),e.xp6(1),e.Q6J("filter",n.filter)("totaldata",n.totaldata)("paginationTotal",n.paginationTotal))},dependencies:[s.sg,r.Fj,r.wV,r.JJ,r.On,p.p,h.w9,m.n,s.JJ,s.uU]}),a})();function A(a,o){if(1&a&&(e.TgZ(0,"tr")(1,"td"),e._uU(2),e.qZA(),e.TgZ(3,"td"),e._uU(4),e.ALo(5,"number"),e.qZA(),e.TgZ(6,"td"),e._uU(7),e.ALo(8,"number"),e.qZA()()),2&a){const t=o.$implicit;e.xp6(2),e.Oqu(t.Code),e.xp6(2),e.Oqu(e.lcZ(5,3,t.Quantity)),e.xp6(3),e.Oqu(e.lcZ(8,5,t.Price))}}const P=function(){return["/menu/Order"]};let y=(()=>{class a{constructor(t,n){this.http=t,this.url=n,this.number=this.url.snapshot.queryParams.Number,this.outlet=this.url.snapshot.queryParams.Outlet}ngOnInit(){this.Load()}Load(){this.http.post("/api/orders/GetInvoiceDetail",{Number:this.number,Outlet:this.outlet}).subscribe(n=>{this.model=n})}}return a.\u0275fac=function(t){return new(t||a)(e.Y36(g.O),e.Y36(d.gz))},a.\u0275cmp=e.Xpm({type:a,selectors:[["app-detail-order"]],decls:73,vars:20,consts:[[3,"headerTitle","hideSearchBox","hideSearchDropdown"],["role","button",1,"btn","btn-secondary","btn-fill","btn-lg","me-3",3,"routerLink"],[1,"container"],[1,"row"],[1,"col-4"],[1,"border","my-3","py-3","col-12"],[1,"row","m-2"],[1,"text-center"],[1,"col"],[1,"col-8"],[1,"text-center","my-3","py-3"],[1,"table-responsive"],[1,"table"],[1,"sticky-top-thead"],[1,"table-light"],[4,"ngFor","ngForOf"]],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,"h3",7),e._uU(11,"Outlet Info"),e.qZA()(),e.TgZ(12,"div",3)(13,"div",8),e._uU(14," Outlet : "),e.qZA(),e.TgZ(15,"div",8),e._uU(16),e.qZA()(),e.TgZ(17,"div",3)(18,"div",8),e._uU(19," Date : "),e.qZA(),e.TgZ(20,"div",8),e._uU(21),e.ALo(22,"date"),e.qZA()(),e.TgZ(23,"div",3)(24,"div",8),e._uU(25," Status : "),e.qZA(),e.TgZ(26,"div",8),e._uU(27),e.qZA()(),e.TgZ(28,"div",3)(29,"div",8),e._uU(30," Tax Type : "),e.qZA(),e.TgZ(31,"div",8),e._uU(32),e.qZA()(),e.TgZ(33,"div",3)(34,"div",8),e._uU(35," Due Date : "),e.qZA(),e.TgZ(36,"div",8),e._uU(37),e.ALo(38,"date"),e.qZA()()(),e.TgZ(39,"div",5)(40,"div",6)(41,"h3",7),e._uU(42,"Customer Info"),e.qZA()(),e.TgZ(43,"div",3)(44,"div",8),e._uU(45," Name : "),e.qZA(),e.TgZ(46,"div",8),e._uU(47),e.qZA()(),e.TgZ(48,"div",3)(49,"div",8),e._uU(50," Email : "),e.qZA(),e.TgZ(51,"div",8),e._uU(52),e.qZA()(),e.TgZ(53,"div",3)(54,"div",8),e._uU(55," Mobile : "),e.qZA(),e.TgZ(56,"div",8),e._uU(57),e.qZA()()()(),e.TgZ(58,"div",9)(59,"h3",10),e._uU(60,"Products Sold"),e.qZA(),e.TgZ(61,"div",11)(62,"table",12)(63,"thead",13)(64,"tr",14)(65,"th"),e._uU(66,"Code"),e.qZA(),e.TgZ(67,"th"),e._uU(68,"Quantity"),e.qZA(),e.TgZ(69,"th"),e._uU(70,"Price"),e.qZA()()(),e.TgZ(71,"tbody"),e.YNc(72,A,9,7,"tr",15),e.qZA()()()()()()()()),2&t&&(e.Q6J("headerTitle","Order #"+n.number)("hideSearchBox",!0)("hideSearchDropdown",!0),e.xp6(2),e.Q6J("routerLink",e.DdM(19,P)),e.xp6(14),e.hij(" ",n.model.Outlet," "),e.xp6(5),e.hij(" ",e.xi3(22,13,n.model.Date,"dd MMM yyyy")," "),e.xp6(6),e.hij(" ",n.model.Delivery," "),e.xp6(5),e.hij(" ",n.model.TaxType," "),e.xp6(5),e.hij(" ",e.xi3(38,16,n.model.DueDate,"dd MMM yyyy")," "),e.xp6(10),e.hij(" ",n.model.Customer.Name," "),e.xp6(5),e.hij(" ",n.model.Customer.Email," "),e.xp6(5),e.hij(" ",n.model.Customer.Mobile," "),e.xp6(15),e.Q6J("ngForOf",n.model.Variants))},dependencies:[s.sg,p.p,d.yS,s.JJ,s.uU]}),a})();const S=function(){return["/menu/Order/detail"]},q=function(a,o){return{Number:a,Outlet:o}};function N(a,o){if(1&a){const t=e.EpF();e.TgZ(0,"tr")(1,"td")(2,"input",17),e.NdJ("ngModelChange",function(i){const Z=e.CHM(t).$implicit;return e.KtG(Z.selected=i)})("ngModelChange",function(){const l=e.CHM(t).$implicit,Z=e.oxw();return e.KtG(Z.onCheckboxStateProduct(l.Number))}),e.qZA()(),e.TgZ(3,"td"),e._uU(4),e.qZA(),e.TgZ(5,"td")(6,"a",18),e._uU(7),e.qZA()(),e.TgZ(8,"td"),e._uU(9),e.qZA(),e.TgZ(10,"td"),e._uU(11),e.ALo(12,"number"),e.qZA(),e.TgZ(13,"td"),e._uU(14),e.ALo(15,"date"),e.qZA()()}if(2&a){const t=o.$implicit;e.xp6(2),e.Q6J("ngModel",t.selected),e.xp6(2),e.Oqu(t.Outlet),e.xp6(2),e.Q6J("routerLink",e.DdM(13,S))("queryParams",e.WLB(14,q,t.Number,t.Outlet)),e.xp6(1),e.Oqu(t.Number),e.xp6(2),e.Oqu(t.Customer),e.xp6(2),e.Oqu(e.lcZ(12,8,t.Amount)),e.xp6(3),e.Oqu(e.xi3(15,10,t.Created,"dd MMM yyyy HH:mm"))}}let w=(()=>{class a{constructor(t,n){this.http=t,this.toastr=n,this.filter={PageNumber:null,PageSize:null},this.totaldata=0,this.paginationTotal=0,this.checkboxState=!1}ngOnInit(){this.Load()}Load(){this.http.post("/api/ordersLoader/GetOrder",{}).subscribe(t=>{this.filter.PageNumber=t.Filter.PageNumber,this.filter.PageSize=t.Filter.RowCount,this.outlets=t.Options.Outlet,this.Get()})}Get(t){this.http.post("api/orders/GetReadyToShip",{Number:t,PageNumber:this.filter.PageNumber,PageSize:this.filter.PageSize,Outlet:null!=this.selectedOutlets?this.selectedOutlets:this.outlets}).subscribe(i=>{this.data=i.Data,this.totaldata=this.data.length})}UpdateDelivery(){let t=this.getSelected();if(t.length>0){let n=[];t.forEach(i=>n.push(i)),this.http.post("/api/Orders/UpdateStateDelivery",n).subscribe(i=>{this.toastr.success("Successfully updated","Success")})}}StoreRowsCountAPIResult(){this.http.post("api/orders/GetRowCount",{PaymentState:"Paid",DeliveryState:"Unsent",Outlet:null!=this.selectedOutlets?this.selectedOutlets:this.outlets}).subscribe(n=>{this.paginationTotal=n.Total})}onCheckboxStateProduct(t){let n=this.data.filter(i=>i.Number==t);if(n.length>0)for(let i of n)i.selected=i.selected}onCheckboxStateChange(){for(let t of this.data)t.selected=this.checkboxState}getSelected(){let t=[];if(this.data){for(let n of this.data)n.selected&&t.push(n);return t}return[]}hasSelection(){return!!this.data&&this.getSelected().length>0}NextPage(){this.filter.PageNumber=this.filter.PageNumber+1,this.Get()}PreviousPage(){this.filter.PageNumber=this.filter.PageNumber-1,this.Get()}}return a.\u0275fac=function(t){return new(t||a)(e.Y36(g.O),e.Y36(f._W))},a.\u0275cmp=e.Xpm({type:a,selectors:[["app-ready-to-ship"]],decls:41,vars:12,consts:[["searchBoxPlaceHolder","Search Ready To Ship...",3,"headerTitle","onSubmit"],["container","",1,""],["bindLabel","Name","bindValue","ID","placeholder","Choose...",1,"outlet-multiple",3,"multiple","ngModel","items","ngModelChange"],["type","number","name","PageNumber",1,"w-100",3,"ngModel","ngModelChange"],["type","number","name","PageSize",1,"w-100",3,"ngModel","ngModelChange"],["type","button",1,"btn","btn-success","shadow-sm","rounded","me-3",3,"hidden","click"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"table","table-hover"],[1,"sticky-top-thead"],[1,"table-light"],[2,"width","5px"],["type","checkbox",3,"ngModel","ngModelChange"],[4,"ngFor","ngForOf"],[3,"filter","totaldata","paginationTotal","total","next","previous"],["type","checkbox",1,"me-3",3,"ngModel","ngModelChange"],[3,"routerLink","queryParams"]],template:function(t,n){1&t&&(e.TgZ(0,"mainpanel",0),e.NdJ("onSubmit",function(l){return n.Get(l)}),e.TgZ(1,"filters")(2,"div",1)(3,"div")(4,"h6"),e._uU(5,"Outlet"),e.qZA(),e.TgZ(6,"ng-select",2),e.NdJ("ngModelChange",function(l){return n.selectedOutlets=l}),e.qZA()(),e.TgZ(7,"div")(8,"h6"),e._uU(9,"Page Number"),e.qZA(),e.TgZ(10,"input",3),e.NdJ("ngModelChange",function(l){return n.filter.PageNumber=l}),e.qZA()(),e.TgZ(11,"div")(12,"h6"),e._uU(13,"Page Size"),e.qZA(),e.TgZ(14,"input",4),e.NdJ("ngModelChange",function(l){return n.filter.PageSize=l}),e.qZA()()()(),e.TgZ(15,"actions")(16,"button",5),e.NdJ("click",function(){return n.UpdateDelivery()}),e._uU(17," Dispatch "),e.qZA()(),e.TgZ(18,"content")(19,"div",6)(20,"div",7)(21,"div",8)(22,"div",9)(23,"table",10)(24,"thead",11)(25,"tr",12)(26,"th",13)(27,"input",14),e.NdJ("ngModelChange",function(l){return n.checkboxState=l})("ngModelChange",function(){return n.onCheckboxStateChange()}),e.qZA()(),e.TgZ(28,"th"),e._uU(29,"Outlet"),e.qZA(),e.TgZ(30,"th"),e._uU(31,"Order number"),e.qZA(),e.TgZ(32,"th"),e._uU(33,"Customer"),e.qZA(),e.TgZ(34,"th"),e._uU(35,"Amount"),e.qZA(),e.TgZ(36,"th"),e._uU(37,"Created On"),e.qZA()()(),e.TgZ(38,"tbody"),e.YNc(39,N,16,17,"tr",15),e.qZA()(),e.TgZ(40,"app-mat-paginator-no-count",16),e.NdJ("total",function(){return n.StoreRowsCountAPIResult()})("next",function(){return n.NextPage()})("previous",function(){return n.PreviousPage()}),e.qZA()()()()()()()),2&t&&(e.Q6J("headerTitle","2 - Ready to Ship"),e.xp6(6),e.Q6J("multiple",!0)("ngModel",n.selectedOutlets)("items",n.outlets),e.xp6(4),e.Q6J("ngModel",n.filter.PageNumber),e.xp6(4),e.Q6J("ngModel",n.filter.PageSize),e.xp6(2),e.Q6J("hidden",!n.hasSelection()),e.xp6(11),e.Q6J("ngModel",n.checkboxState),e.xp6(12),e.Q6J("ngForOf",n.data),e.xp6(1),e.Q6J("filter",n.filter)("totaldata",n.totaldata)("paginationTotal",n.paginationTotal))},dependencies:[s.sg,r.Fj,r.wV,r.Wl,r.JJ,r.On,p.p,d.yS,h.w9,m.n,s.JJ,s.uU]}),a})();const M=function(){return["/menu/Order/detail"]},D=function(a,o){return{Number:a,Outlet:o}};function U(a,o){if(1&a&&(e.TgZ(0,"tr")(1,"td"),e._uU(2),e.qZA(),e.TgZ(3,"td")(4,"a",14),e._uU(5),e.qZA()(),e.TgZ(6,"td"),e._uU(7),e.qZA(),e.TgZ(8,"td"),e._uU(9),e.ALo(10,"number"),e.qZA(),e.TgZ(11,"td"),e._uU(12),e.ALo(13,"date"),e.qZA()()),2&a){const t=o.$implicit;e.xp6(2),e.Oqu(t.Outlet),e.xp6(2),e.Q6J("routerLink",e.DdM(12,M))("queryParams",e.WLB(13,D,t.Number,t.Outlet)),e.xp6(1),e.Oqu(t.Number),e.xp6(2),e.Oqu(t.Customer),e.xp6(2),e.Oqu(e.lcZ(10,7,t.Amount)),e.xp6(3),e.Oqu(e.xi3(13,9,t.Created,"dd MMM yyyy HH:mm"))}}let x=(()=>{class a{constructor(t){this.http=t,this.filter={PageNumber:null,PageSize:null},this.totaldata=0,this.paginationTotal=0}ngOnInit(){this.Load()}Load(){this.http.post("/api/ordersLoader/GetOrder",{}).subscribe(t=>{this.filter.PageNumber=t.Filter.PageNumber,this.filter.PageSize=t.Filter.RowCount,this.outlets=t.Options.Outlet,this.Get()})}Get(t){this.http.post("api/orders/GetShipped",{Number:t,PageNumber:this.filter.PageNumber,PageSize:this.filter.PageSize,Outlet:null!=this.selectedOutlets?this.selectedOutlets:this.outlets}).subscribe(i=>{this.data=i.Data,this.totaldata=this.data.length})}changePage(t){this.filter.PageNumber=t.pageIndex+1,this.Get()}StoreRowsCountAPIResult(){this.http.post("api/orders/GetRowCount",{PaymentState:"Unpaid",DeliveryState:"Sent",Outlet:null!=this.selectedOutlets?this.selectedOutlets:this.outlets}).subscribe(n=>{this.paginationTotal=n.Total})}NextPage(){this.filter.PageNumber=this.filter.PageNumber+1,this.Get()}PreviousPage(){this.filter.PageNumber=this.filter.PageNumber-1,this.Get()}}return a.\u0275fac=function(t){return new(t||a)(e.Y36(g.O))},a.\u0275cmp=e.Xpm({type:a,selectors:[["app-shipped"]],decls:36,vars:10,consts:[["searchBoxPlaceHolder","Search Orders...",3,"headerTitle","onSubmit"],["container",""],["bindLabel","Name","bindValue","ID","placeholder","Choose...",1,"outlet-multiple",3,"multiple","ngModel","items","ngModelChange"],["type","number","name","PageNumber",1,"w-100",3,"ngModel","ngModelChange"],["type","number","name","PageSize",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,"sticky-top-thead"],[1,"table-light"],[4,"ngFor","ngForOf"],[3,"filter","totaldata","paginationTotal","total","next","previous"],[3,"routerLink","queryParams"]],template:function(t,n){1&t&&(e.TgZ(0,"mainpanel",0),e.NdJ("onSubmit",function(l){return n.Get(l)}),e.TgZ(1,"filters")(2,"div",1)(3,"div")(4,"h6"),e._uU(5,"Outlet"),e.qZA(),e.TgZ(6,"ng-select",2),e.NdJ("ngModelChange",function(l){return n.selectedOutlets=l}),e.qZA()(),e.TgZ(7,"div")(8,"h6"),e._uU(9,"Page Number"),e.qZA(),e.TgZ(10,"input",3),e.NdJ("ngModelChange",function(l){return n.filter.PageNumber=l}),e.qZA()(),e.TgZ(11,"div")(12,"h6"),e._uU(13,"Page Size"),e.qZA(),e.TgZ(14,"input",4),e.NdJ("ngModelChange",function(l){return n.filter.PageSize=l}),e.qZA()()()(),e.TgZ(15,"content")(16,"div",5)(17,"div",6)(18,"div",7)(19,"div",8)(20,"table",9)(21,"thead",10)(22,"tr",11)(23,"th"),e._uU(24,"Outlet"),e.qZA(),e.TgZ(25,"th"),e._uU(26,"Order number"),e.qZA(),e.TgZ(27,"th"),e._uU(28,"Customer"),e.qZA(),e.TgZ(29,"th"),e._uU(30,"Amount"),e.qZA(),e.TgZ(31,"th"),e._uU(32,"Created On"),e.qZA()()(),e.TgZ(33,"tbody"),e.YNc(34,U,14,16,"tr",12),e.qZA()(),e.TgZ(35,"app-mat-paginator-no-count",13),e.NdJ("total",function(){return n.StoreRowsCountAPIResult()})("next",function(){return n.NextPage()})("previous",function(){return n.PreviousPage()}),e.qZA()()()()()()()),2&t&&(e.Q6J("headerTitle","3 - Shipped"),e.xp6(6),e.Q6J("multiple",!0)("ngModel",n.selectedOutlets)("items",n.outlets),e.xp6(4),e.Q6J("ngModel",n.filter.PageNumber),e.xp6(4),e.Q6J("ngModel",n.filter.PageSize),e.xp6(20),e.Q6J("ngForOf",n.data),e.xp6(1),e.Q6J("filter",n.filter)("totaldata",n.totaldata)("paginationTotal",n.paginationTotal))},dependencies:[s.sg,r.Fj,r.wV,r.JJ,r.On,p.p,d.yS,h.w9,m.n,s.JJ,s.uU]}),a})();const J=function(){return["/menu/Order/detail"]},Q=function(a,o){return{Number:a,Outlet:o}};function F(a,o){if(1&a&&(e.TgZ(0,"tr")(1,"td"),e._uU(2),e.qZA(),e.TgZ(3,"td")(4,"a",14),e._uU(5),e.qZA()(),e.TgZ(6,"td"),e._uU(7),e.qZA(),e.TgZ(8,"td"),e._uU(9),e.ALo(10,"number"),e.qZA(),e.TgZ(11,"td"),e._uU(12),e.ALo(13,"date"),e.qZA()()),2&a){const t=o.$implicit;e.xp6(2),e.Oqu(t.Outlet),e.xp6(2),e.Q6J("routerLink",e.DdM(12,J))("queryParams",e.WLB(13,Q,t.Number,t.Outlet)),e.xp6(1),e.Oqu(t.Number),e.xp6(2),e.Oqu(t.Customer),e.xp6(2),e.Oqu(e.lcZ(10,7,t.Amount)),e.xp6(3),e.Oqu(e.xi3(13,9,t.Created,"dd MMM yyyy HH:mm"))}}let I=(()=>{class a{constructor(t){this.http=t,this.filter={PageNumber:null,PageSize:null},this.totaldata=0,this.paginationTotal=0}ngOnInit(){this.Load()}Load(){this.http.post("/api/ordersLoader/GetOrder",{}).subscribe(t=>{this.filter.PageNumber=t.Filter.PageNumber,this.filter.PageSize=t.Filter.RowCount,this.outlets=t.Options.Outlet,this.Get()})}Get(t){this.http.post("api/orders/GetDelivered ",{Number:t,PageNumber:this.filter.PageNumber,PageSize:this.filter.PageSize,Outlet:null!=this.selectedOutlets?this.selectedOutlets:this.outlets}).subscribe(i=>{this.data=i.Data,this.totaldata=this.data.length})}changePage(t){this.filter.PageNumber=t.pageIndex+1,this.Get()}StoreRowsCountAPIResult(){this.http.post("api/orders/GetRowCount",{PaymentState:"Paid",DeliveryState:"Sent",Outlet:null!=this.selectedOutlets?this.selectedOutlets:this.outlets}).subscribe(n=>{this.paginationTotal=n.Total})}NextPage(){this.filter.PageNumber=this.filter.PageNumber+1,this.Get()}PreviousPage(){this.filter.PageNumber=this.filter.PageNumber-1,this.Get()}}return a.\u0275fac=function(t){return new(t||a)(e.Y36(g.O))},a.\u0275cmp=e.Xpm({type:a,selectors:[["app-delivered"]],decls:36,vars:11,consts:[["searchBoxPlaceHolder","Search Orders...",3,"headerTitle","hideSearchBox","onSubmit"],["container","",1,""],["bindLabel","Name","bindValue","ID","placeholder","Choose...",1,"outlet-multiple",3,"multiple","ngModel","items","ngModelChange"],["type","number","name","PageNumber",1,"w-100",3,"ngModel","ngModelChange"],["type","number","name","PageSize",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,"sticky-top-thead"],[1,"table-light"],[4,"ngFor","ngForOf"],[3,"filter","totaldata","paginationTotal","total","next","previous"],[3,"routerLink","queryParams"]],template:function(t,n){1&t&&(e.TgZ(0,"mainpanel",0),e.NdJ("onSubmit",function(l){return n.Get(l)}),e.TgZ(1,"filters")(2,"div",1)(3,"div")(4,"h6"),e._uU(5,"Outlet"),e.qZA(),e.TgZ(6,"ng-select",2),e.NdJ("ngModelChange",function(l){return n.selectedOutlets=l}),e.qZA()(),e.TgZ(7,"div")(8,"h6"),e._uU(9,"Page Number"),e.qZA(),e.TgZ(10,"input",3),e.NdJ("ngModelChange",function(l){return n.filter.PageNumber=l}),e.qZA()(),e.TgZ(11,"div")(12,"h6"),e._uU(13,"Page Size"),e.qZA(),e.TgZ(14,"input",4),e.NdJ("ngModelChange",function(l){return n.filter.PageSize=l}),e.qZA()()()(),e.TgZ(15,"content")(16,"div",5)(17,"div",6)(18,"div",7)(19,"div",8)(20,"table",9)(21,"thead",10)(22,"tr",11)(23,"th"),e._uU(24,"Outlet"),e.qZA(),e.TgZ(25,"th"),e._uU(26,"Order number"),e.qZA(),e.TgZ(27,"th"),e._uU(28,"Customer"),e.qZA(),e.TgZ(29,"th"),e._uU(30,"Amount"),e.qZA(),e.TgZ(31,"th"),e._uU(32,"Created On"),e.qZA()()(),e.TgZ(33,"tbody"),e.YNc(34,F,14,16,"tr",12),e.qZA()(),e.TgZ(35,"app-mat-paginator-no-count",13),e.NdJ("total",function(){return n.StoreRowsCountAPIResult()})("next",function(){return n.NextPage()})("previous",function(){return n.PreviousPage()}),e.qZA()()()()()()()),2&t&&(e.Q6J("headerTitle","4 - Completed")("hideSearchBox",!0),e.xp6(6),e.Q6J("multiple",!0)("ngModel",n.selectedOutlets)("items",n.outlets),e.xp6(4),e.Q6J("ngModel",n.filter.PageNumber),e.xp6(4),e.Q6J("ngModel",n.filter.PageSize),e.xp6(20),e.Q6J("ngForOf",n.data),e.xp6(1),e.Q6J("filter",n.filter)("totaldata",n.totaldata)("paginationTotal",n.paginationTotal))},dependencies:[s.sg,r.Fj,r.wV,r.JJ,r.On,p.p,d.yS,h.w9,m.n,s.JJ,s.uU]}),a})();const L=function(){return["/menu/Order/detail"]},k=function(a,o){return{Number:a,Outlet:o}};function G(a,o){if(1&a&&(e.TgZ(0,"tr")(1,"td"),e._uU(2),e.qZA(),e.TgZ(3,"td")(4,"a",14),e._uU(5),e.qZA()(),e.TgZ(6,"td"),e._uU(7),e.qZA(),e.TgZ(8,"td"),e._uU(9),e.ALo(10,"number"),e.qZA(),e.TgZ(11,"td"),e._uU(12),e.ALo(13,"date"),e.qZA(),e.TgZ(14,"td"),e._uU(15),e.qZA()()),2&a){const t=o.$implicit;e.xp6(2),e.Oqu(t.Outlet),e.xp6(2),e.Q6J("routerLink",e.DdM(13,L))("queryParams",e.WLB(14,k,t.Number,t.Outlet)),e.xp6(1),e.Oqu(t.Number),e.xp6(2),e.Oqu(t.Customer),e.xp6(2),e.Oqu(e.lcZ(10,8,t.Amount)),e.xp6(3),e.Oqu(e.xi3(13,10,t.Created,"dd MMM yyyy HH:mm")),e.xp6(3),e.Oqu(t.State)}}let R=(()=>{class a{constructor(t){this.http=t,this.filter={PageNumber:null,PageSize:null},this.totaldata=0,this.paginationTotal=0}ngOnInit(){this.Load()}Load(){this.http.post("/api/ordersLoader/GetOrder",{}).subscribe(t=>{this.filter.PageNumber=t.Filter.PageNumber,this.filter.PageSize=t.Filter.RowCount,this.outlets=t.Options.Outlet,this.Get()})}Get(t){this.http.post("api/orders/GetAll ",{Number:t,PageNumber:this.filter.PageNumber,PageSize:this.filter.PageSize,Outlet:null!=this.selectedOutlets?this.selectedOutlets:this.outlets}).subscribe(i=>{this.data=i.Data,this.totaldata=this.data.length})}changePage(t){this.filter=t,this.Get()}StoreRowsCountAPIResult(){this.http.post("api/orders/GetRowCount",{PaymentState:"",DeliveryState:"",Bin:!1,Outlet:null!=this.selectedOutlets?this.selectedOutlets:this.outlets}).subscribe(n=>{this.paginationTotal=n.Total})}NextPage(){this.filter.PageNumber=this.filter.PageNumber+1,this.Get()}PreviousPage(){this.filter.PageNumber=this.filter.PageNumber-1,this.Get()}}return a.\u0275fac=function(t){return new(t||a)(e.Y36(g.O))},a.\u0275cmp=e.Xpm({type:a,selectors:[["app-all-order"]],decls:38,vars:10,consts:[["searchBoxPlaceHolder","Search Orders...",3,"headerTitle","onSubmit"],["container","",1,""],["bindLabel","Name","bindValue","ID","placeholder","Choose...",1,"outlet-multiple",3,"multiple","ngModel","items","ngModelChange"],["type","number","name","PageNumber",1,"w-100",3,"ngModel","ngModelChange"],["type","number","name","PageSize",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,"sticky-top-thead"],[1,"table-light"],[4,"ngFor","ngForOf"],[3,"filter","totaldata","paginationTotal","total","next","previous"],[3,"routerLink","queryParams"]],template:function(t,n){1&t&&(e.TgZ(0,"mainpanel",0),e.NdJ("onSubmit",function(l){return n.Get(l)}),e.TgZ(1,"filters")(2,"div",1)(3,"div")(4,"h6"),e._uU(5,"Outlet"),e.qZA(),e.TgZ(6,"ng-select",2),e.NdJ("ngModelChange",function(l){return n.selectedOutlets=l}),e.qZA()(),e.TgZ(7,"div")(8,"h6"),e._uU(9,"Page Number"),e.qZA(),e.TgZ(10,"input",3),e.NdJ("ngModelChange",function(l){return n.filter.PageNumber=l}),e.qZA()(),e.TgZ(11,"div")(12,"h6"),e._uU(13,"Page Size"),e.qZA(),e.TgZ(14,"input",4),e.NdJ("ngModelChange",function(l){return n.filter.PageSize=l}),e.qZA()()()(),e.TgZ(15,"content")(16,"div",5)(17,"div",6)(18,"div",7)(19,"div",8)(20,"table",9)(21,"thead",10)(22,"tr",11)(23,"th"),e._uU(24,"Outlet"),e.qZA(),e.TgZ(25,"th"),e._uU(26,"Order number"),e.qZA(),e.TgZ(27,"th"),e._uU(28,"Customer"),e.qZA(),e.TgZ(29,"th"),e._uU(30,"Amount"),e.qZA(),e.TgZ(31,"th"),e._uU(32,"Created On"),e.qZA(),e.TgZ(33,"th"),e._uU(34,"Status"),e.qZA()()(),e.TgZ(35,"tbody"),e.YNc(36,G,16,17,"tr",12),e.qZA()(),e.TgZ(37,"app-mat-paginator-no-count",13),e.NdJ("total",function(){return n.StoreRowsCountAPIResult()})("next",function(){return n.NextPage()})("previous",function(){return n.PreviousPage()}),e.qZA()()()()()()()),2&t&&(e.Q6J("headerTitle","All"),e.xp6(6),e.Q6J("multiple",!0)("ngModel",n.selectedOutlets)("items",n.outlets),e.xp6(4),e.Q6J("ngModel",n.filter.PageNumber),e.xp6(4),e.Q6J("ngModel",n.filter.PageSize),e.xp6(22),e.Q6J("ngForOf",n.data),e.xp6(1),e.Q6J("filter",n.filter)("totaldata",n.totaldata)("paginationTotal",n.paginationTotal))},dependencies:[s.sg,r.Fj,r.wV,r.JJ,r.On,p.p,d.yS,h.w9,m.n,s.JJ,s.uU]}),a})();const z=function(){return["/menu/Order/detail"]},Y=function(a,o){return{Number:a,Outlet:o}};function B(a,o){if(1&a&&(e.TgZ(0,"tr")(1,"td"),e._uU(2),e.qZA(),e.TgZ(3,"td")(4,"a",14),e._uU(5),e.qZA()(),e.TgZ(6,"td"),e._uU(7),e.qZA(),e.TgZ(8,"td"),e._uU(9),e.ALo(10,"number"),e.qZA(),e.TgZ(11,"td"),e._uU(12),e.ALo(13,"date"),e.qZA()()),2&a){const t=o.$implicit;e.xp6(2),e.Oqu(t.Outlet),e.xp6(2),e.Q6J("routerLink",e.DdM(12,z))("queryParams",e.WLB(13,Y,t.Number,t.Outlet)),e.xp6(1),e.Oqu(t.Number),e.xp6(2),e.Oqu(t.Customer),e.xp6(2),e.Oqu(e.lcZ(10,7,t.Amount)),e.xp6(3),e.Oqu(e.xi3(13,9,t.Created,"dd MMM yyyy HH:mm"))}}let H=(()=>{class a{constructor(t){this.http=t,this.filter={PageNumber:null,PageSize:null},this.totaldata=0,this.paginationTotal=0}ngOnInit(){this.Load()}Load(){this.http.post("/api/ordersLoader/GetOrder",{}).subscribe(t=>{this.filter.PageNumber=t.Filter.PageNumber,this.filter.PageSize=t.Filter.RowCount,this.outlets=t.Options.Outlet,this.Get()})}Get(t){this.http.post("api/orders/GetCancelled ",{Number:t,PageNumber:this.filter.PageNumber,PageSize:this.filter.PageSize,Outlet:null!=this.selectedOutlets?this.selectedOutlets:this.outlets}).subscribe(i=>{this.data=i.Data,this.totaldata=this.data.length})}changePage(t){this.filter.PageNumber=t.pageIndex+1,this.Get()}StoreRowsCountAPIResult(){this.http.post("api/orders/GetRowCount",{PaymentState:"",DeliveryState:"",Bin:!0,Outlet:null!=this.selectedOutlets?this.selectedOutlets:this.outlets}).subscribe(n=>{this.paginationTotal=n.Total})}NextPage(){this.filter.PageNumber=this.filter.PageNumber+1,this.Get()}PreviousPage(){this.filter.PageNumber=this.filter.PageNumber-1,this.Get()}}return a.\u0275fac=function(t){return new(t||a)(e.Y36(g.O))},a.\u0275cmp=e.Xpm({type:a,selectors:[["app-cancelled"]],decls:36,vars:10,consts:[["searchBoxPlaceHolder","Search Orders...",3,"headerTitle","onSubmit"],["container","",1,""],["bindLabel","Name","bindValue","ID","placeholder","Choose...",1,"outlet-multiple",3,"multiple","ngModel","items","ngModelChange"],["type","number","name","PageNumber",1,"w-100",3,"ngModel","ngModelChange"],["type","number","name","PageSize",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,"sticky-top-thead"],[1,"table-light"],[4,"ngFor","ngForOf"],[3,"filter","totaldata","paginationTotal","total","next","previous"],[3,"routerLink","queryParams"]],template:function(t,n){1&t&&(e.TgZ(0,"mainpanel",0),e.NdJ("onSubmit",function(l){return n.Get(l)}),e.TgZ(1,"filters")(2,"div",1)(3,"div")(4,"h6"),e._uU(5,"Outlet"),e.qZA(),e.TgZ(6,"ng-select",2),e.NdJ("ngModelChange",function(l){return n.selectedOutlets=l}),e.qZA()(),e.TgZ(7,"div")(8,"h6"),e._uU(9,"Page Number"),e.qZA(),e.TgZ(10,"input",3),e.NdJ("ngModelChange",function(l){return n.filter.PageNumber=l}),e.qZA()(),e.TgZ(11,"div")(12,"h6"),e._uU(13,"Page Size"),e.qZA(),e.TgZ(14,"input",4),e.NdJ("ngModelChange",function(l){return n.filter.PageSize=l}),e.qZA()()()(),e.TgZ(15,"content")(16,"div",5)(17,"div",6)(18,"div",7)(19,"div",8)(20,"table",9)(21,"thead",10)(22,"tr",11)(23,"th"),e._uU(24,"Outlet"),e.qZA(),e.TgZ(25,"th"),e._uU(26,"Order number"),e.qZA(),e.TgZ(27,"th"),e._uU(28,"Customer"),e.qZA(),e.TgZ(29,"th"),e._uU(30,"Amount"),e.qZA(),e.TgZ(31,"th"),e._uU(32,"Created On"),e.qZA()()(),e.TgZ(33,"tbody"),e.YNc(34,B,14,16,"tr",12),e.qZA()(),e.TgZ(35,"app-mat-paginator-no-count",13),e.NdJ("total",function(){return n.StoreRowsCountAPIResult()})("next",function(){return n.NextPage()})("previous",function(){return n.PreviousPage()}),e.qZA()()()()()()()),2&t&&(e.Q6J("headerTitle","99 - Cancelled"),e.xp6(6),e.Q6J("multiple",!0)("ngModel",n.selectedOutlets)("items",n.outlets),e.xp6(4),e.Q6J("ngModel",n.filter.PageNumber),e.xp6(4),e.Q6J("ngModel",n.filter.PageSize),e.xp6(20),e.Q6J("ngForOf",n.data),e.xp6(1),e.Q6J("filter",n.filter)("totaldata",n.totaldata)("paginationTotal",n.paginationTotal))},dependencies:[s.sg,r.Fj,r.wV,r.JJ,r.On,p.p,d.yS,h.w9,m.n,s.JJ,s.uU]}),a})();var j=u(9694),_=u(9602);function $(a,o){if(1&a){const t=e.EpF();e.TgZ(0,"button",8),e.NdJ("click",function(){e.CHM(t);const i=e.oxw();return e.KtG(i.preview())}),e._UZ(1,"i",9),e._uU(2," Preview"),e.qZA()}}function E(a,o){if(1&a){const t=e.EpF();e.TgZ(0,"button",10),e.NdJ("click",function(){e.CHM(t);const i=e.oxw();return e.KtG(i.download())}),e._UZ(1,"i",11),e._uU(2," Download "),e.qZA()}}function K(a,o){if(1&a&&(e.TgZ(0,"ng-option",25),e._UZ(1,"img",26),e._uU(2),e.qZA()),2&a){const t=o.$implicit;e.Q6J("value",t.ID),e.xp6(1),e.s9C("src",t.Img,e.LSH),e.xp6(1),e.Oqu(t.Name)}}function V(a,o){if(1&a){const t=e.EpF();e.TgZ(0,"div",12)(1,"div",13)(2,"div",12)(3,"div",14)(4,"div")(5,"label",15)(6,"h5"),e._uU(7,"Select a Channel"),e.qZA()(),e.TgZ(8,"ng-select",16),e.NdJ("ngModelChange",function(i){e.CHM(t);const l=e.oxw();return e.KtG(l.ChannelID=i)}),e.YNc(9,K,3,3,"ng-option",17),e.qZA()()()(),e.TgZ(10,"div",18)(11,"div",19)(12,"label",20)(13,"h5"),e._uU(14,"Enter date range "),e.TgZ(15,"small"),e._uU(16,"(Maximum two weeks)"),e.qZA()()()(),e.TgZ(17,"div",19)(18,"mat-date-range-input",21)(19,"input",22),e.NdJ("ngModelChange",function(i){e.CHM(t);const l=e.oxw();return e.KtG(l.startDate=i)})("click",function(){e.CHM(t);const i=e.MAs(22);return e.KtG(i.open())}),e.qZA(),e.TgZ(20,"input",23),e.NdJ("ngModelChange",function(i){e.CHM(t);const l=e.oxw();return e.KtG(l.endDate=i)})("click",function(){e.CHM(t);const i=e.MAs(22);return e.KtG(i.open())}),e.qZA()(),e._UZ(21,"mat-date-range-picker",null,24),e.qZA()()()()}if(2&a){const t=e.MAs(22),n=e.oxw();e.xp6(8),e.Q6J("clearable",!1)("ngModel",n.ChannelID),e.xp6(1),e.Q6J("ngForOf",n.Channel),e.xp6(9),e.Q6J("rangePicker",t),e.xp6(1),e.Q6J("ngModel",n.startDate),e.xp6(1),e.Q6J("ngModel",n.endDate)}}const W=function(a){return{"over-due":a}};function X(a,o){if(1&a&&(e.TgZ(0,"tr",33)(1,"td"),e._uU(2),e.qZA(),e.TgZ(3,"td"),e._uU(4),e.qZA(),e.TgZ(5,"td"),e._uU(6),e.qZA(),e.TgZ(7,"td"),e._uU(8),e.qZA()()),2&a){const t=o.$implicit,n=o.index;e.Q6J("ngClass",e.VKq(5,W,t.Exception)),e.xp6(2),e.Oqu(n+1),e.xp6(2),e.Oqu(t.Number),e.xp6(2),e.Oqu(t.Status),e.xp6(2),e.Oqu(t.Exception)}}function ee(a,o){if(1&a&&(e.TgZ(0,"div",27)(1,"div",28)(2,"table",29)(3,"thead",30)(4,"tr"),e._UZ(5,"th",31),e.TgZ(6,"th"),e._uU(7,"Order Number"),e.qZA(),e.TgZ(8,"th"),e._uU(9,"Status"),e.qZA(),e.TgZ(10,"th"),e._uU(11,"Exception"),e.qZA()()(),e.TgZ(12,"tbody"),e.YNc(13,X,9,7,"tr",32),e.qZA()()()()),2&a){const t=e.oxw();e.xp6(13),e.Q6J("ngForOf",t.infodownload)}}function te(a,o){if(1&a&&(e.TgZ(0,"th",43),e._uU(1),e.qZA()),2&a){const t=e.oxw(2);e.xp6(1),e.Oqu(0==t.getTypeID()?"Last Status Update":"Created Date")}}function ne(a,o){if(1&a&&(e.TgZ(0,"td"),e._uU(1),e.ALo(2,"date"),e.qZA()),2&a){const t=e.oxw().$implicit;e.xp6(1),e.Oqu(e.xi3(2,1,t.Date,"dd MMM yyyy HH:mm:ss"))}}function ae(a,o){if(1&a&&(e.TgZ(0,"span"),e._uU(1),e.qZA()),2&a){const t=e.oxw().$implicit;e.xp6(1),e.hij(" ",t.ActionString," ")}}function ie(a,o){if(1&a&&(e.TgZ(0,"li"),e._uU(1),e.qZA()),2&a){const t=o.$implicit;e.xp6(1),e.Oqu(t)}}function oe(a,o){if(1&a&&(e.TgZ(0,"ul",47),e.YNc(1,ie,2,1,"li",42),e.qZA()),2&a){const t=e.oxw().$implicit;e.xp6(1),e.Q6J("ngForOf",t.ActionString)}}function le(a,o){if(1&a&&(e.TgZ(0,"span",48),e._UZ(1,"i",49),e.qZA()),2&a){const t=e.oxw().$implicit;e.hYB("title","Delivery : ",t.DeliveryState," \nPayment : ",t.PaymentState,"")}}const re=function(a,o){return{"over-due-today":a,"over-due":o}};function se(a,o){if(1&a&&(e.TgZ(0,"tr")(1,"td"),e._uU(2),e.qZA(),e.TgZ(3,"td"),e._uU(4),e.qZA(),e.YNc(5,ne,3,4,"td",44),e.TgZ(6,"td")(7,"span"),e._uU(8),e.qZA(),e._uU(9),e.qZA(),e.TgZ(10,"td",33)(11,"span"),e._uU(12),e.qZA(),e._uU(13),e.qZA(),e.TgZ(14,"td"),e.YNc(15,ae,2,1,"span",44),e.YNc(16,oe,2,1,"ul",45),e.qZA(),e.TgZ(17,"td"),e.YNc(18,le,2,2,"span",46),e.qZA()()),2&a){const t=o.$implicit,n=o.index,i=e.oxw(2);e.xp6(2),e.Oqu(n+1),e.xp6(2),e.Oqu(t.Number),e.xp6(1),e.Q6J("ngIf",i.getTypeID()!=i.channelType.ShopeeV2),e.xp6(3),e.hij("",t.ChannelStatus," - "),e.xp6(1),e.Oqu(t.ChannelStatusDescription),e.xp6(1),e.Q6J("ngClass",e.WLB(11,re,t.Update,t.Create)),e.xp6(2),e.hij("",t.POSStatus," - "),e.xp6(1),e.Oqu(t.POSStatusDescription),e.xp6(2),e.Q6J("ngIf",1==t.ActionString.length),e.xp6(1),e.Q6J("ngIf",t.ActionString.length>1),e.xp6(2),e.Q6J("ngIf",99!=t.ChannelStatus&&99!=t.POSStatus)}}function ue(a,o){if(1&a){const t=e.EpF();e.TgZ(0,"div",12)(1,"div",28)(2,"div",34)(3,"ul",35)(4,"li",36)(5,"button",37),e.NdJ("click",function(){e.CHM(t);const i=e.oxw();return e.KtG(i.filter("all"))}),e._uU(6),e.qZA()(),e.TgZ(7,"li",36)(8,"button",37),e.NdJ("click",function(){e.CHM(t);const i=e.oxw();return e.KtG(i.filter("sync"))}),e._uU(9),e.qZA()(),e.TgZ(10,"li",36)(11,"button",37),e.NdJ("click",function(){e.CHM(t);const i=e.oxw();return e.KtG(i.filter("wrong"))}),e._uU(12),e.qZA()(),e.TgZ(13,"li",36)(14,"button",37),e.NdJ("click",function(){e.CHM(t);const i=e.oxw();return e.KtG(i.filter("unsync"))}),e._uU(15),e.qZA()()()(),e.TgZ(16,"table",29)(17,"thead",38)(18,"tr"),e._UZ(19,"th",31),e.TgZ(20,"th",39),e._uU(21,"Number"),e.qZA(),e.YNc(22,te,2,1,"th",40),e.TgZ(23,"th",41),e._uU(24,"Channel Status"),e.qZA(),e.TgZ(25,"th",41),e._uU(26,"POS Status"),e.qZA(),e.TgZ(27,"th"),e._uU(28,"Action"),e.qZA(),e._UZ(29,"th",31),e.qZA()(),e.TgZ(30,"tbody"),e.YNc(31,se,19,14,"tr",42),e.qZA()()()()}if(2&a){const t=e.oxw();e.xp6(5),e.Q6J("ngClass","all"==t.pillStatus?"btn-secondary text-white":"btn-outline-dark"),e.xp6(1),e.hij("All (",t.data.length,")"),e.xp6(2),e.Q6J("ngClass","sync"==t.pillStatus?"btn-success":"btn-outline-success"),e.xp6(1),e.hij("Existing (",t.data.length-t.updateQty-t.createQty,")"),e.xp6(2),e.Q6J("ngClass","wrong"==t.pillStatus?"btn-warning text-white":"btn-outline-warning"),e.xp6(1),e.hij("Wrong Status (",t.updateQty,")"),e.xp6(2),e.Q6J("ngClass","unsync"==t.pillStatus?"btn-danger":"btn-outline-danger"),e.xp6(1),e.hij("Missing (",t.createQty,")"),e.xp6(7),e.Q6J("ngIf",t.getTypeID()!=t.channelType.ShopeeV2),e.xp6(9),e.Q6J("ngForOf",t.displayData)}}let de=(()=>{class a{constructor(t,n,i,l){this.http=t,this.toastr=n,this.datePipe=i,this.url=l,this.ispreview=!1,this.isresult=!1,this.PageTitle="Download to POS",this.pillStatus="all",this.filterfromDashboard=!1,this.downloadOrderData=[],this.channelType=j.x,this.filterfromDashboard=!1}ngOnInit(){this.maxDate=new Date,this.async=!0,this.loadChannel(),this.url.queryParams.subscribe(t=>{this.ChannelID=t.ChannelID,this.startDate=new Date(t.Date),this.endDate=new Date(t.Date),this.async=!1,this.filterfromDashboard=!0,this.LoadPreview()})}loadChannel(){this.http.post("/api/product/Load",{}).subscribe(t=>{this.Channel=t.Options.Channel})}getDayDiff(t,n){return(n.getTime()-t.getTime())/864e5}download(){this.callApi("Download")}LoadPreview(){this.async=!1,this.filterfromDashboard=!1,!isNaN(this.startDate)&&!isNaN(this.endDate)&&this.callApi("Preview")}preview(){this.async=!1,this.filterfromDashboard=!1,isNaN(this.startDate)||isNaN(this.endDate)?this.toastr.warning("please select a date and outlet","Information"):this.callApi("Preview")}getTypeID(){return this.Channel.find(n=>n.ID==this.ChannelID).TypeID??0}callApi(t){if(null==this.ChannelID&&this.filterfromDashboard)return void this.toastr.warning("Channel cannot be empty!","Failed");if(null==this.startDate||null==this.endDate)return void this.toastr.warning("Please enter both the start and end dates!","Failed");if(this.getDayDiff(this.startDate,this.endDate)>14)return void this.toastr.warning("Dates cannot be more than 14 days apart!","Failed");let n=null;n="Download"==t?{ID:this.ChannelID,From:this.startDate,To:this.endDate,Async:this.async,ListPreview:this.downloadOrderData}:{ID:this.ChannelID,From:this.startDate,To:this.endDate,Async:this.async},this.http.post("/api/Orders/"+t,n).subscribe(i=>{if(this.async)this.toastr.success("Download is successful","Success!"),this.new();else if(this.ispreview)this.infodownload=i.Body,this.data=null,this.isresult=!0,this.ispreview=!1,this.PageTitle="Result ("+this.datePipe.transform(this.startDate,"dd MMM yyyy")+" - "+this.datePipe.transform(this.endDate,"dd MMM yyyy)");else{if(0==i.length&&"Preview"==t)return void this.toastr.info("There is no orders from "+this.datePipe.transform(this.startDate,"dd MMM yyyy")+" to "+this.datePipe.transform(this.endDate,"dd MMM yyyy")+" !","No Orders!");this.updateQty=0,this.createQty=0,this.data=i,this.displayData=i,this.hasAction=this.data.some(l=>"Do Nothing"!=l.ActionString);for(let l of this.data)1===l.Action&&(l.Create=!0,l.Update=!1,this.createQty++),l.Action>1&&(l.Create=!1,l.Update=!0,this.updateQty++);this.ispreview=!0,this.isresult=!1,this.PageTitle="Preview ("+this.datePipe.transform(this.startDate,"dd MMM yyyy")+" - "+this.datePipe.transform(this.endDate,"dd MMM yyyy)")}"Preview"==t&&this.filterDownloadedOrder()})}filterDownloadedOrder(){let t=this.filterDataByStatus("unsync"),n=this.filterDataByStatus("wrong");this.downloadOrderData=[...t,...n]}new(){this.ispreview=!1,this.isresult=!1,this.data=null,this.infodownload=null,this.ChannelID=null,this.startDate=null,this.endDate=null,this.hasAction=!0,this.PageTitle="Download to POS"}filter(t){this.pillStatus=t,this.displayData=this.filterDataByStatus(t)}filterDataByStatus(t){let n=[];switch(t){case"all":n=this.data;break;case"sync":n=this.data.filter(i=>!i.Update&&!i.Create);break;case"wrong":n=this.data.filter(i=>i.Update);break;case"unsync":n=this.data.filter(i=>i.Create)}return n}}return a.\u0275fac=function(t){return new(t||a)(e.Y36(g.O),e.Y36(f._W),e.Y36(s.uU),e.Y36(d.gz))},a.\u0275cmp=e.Xpm({type:a,selectors:[["app-download"]],decls:12,vars:8,consts:[[3,"headerTitle","hideSearchBox","hideSearchDropdown"],["class","btn btn-success btn-fill btn-lg text-white",3,"click",4,"ngIf"],["class","btn btn-success btn-fill btn-lg text-white","type","button",3,"click",4,"ngIf"],[1,"btn","btn-outline-secondary","btn-fill","btn-lg","ms-2",3,"click"],["aria-hidden","true",1,"fa","fa-file-alt","me-2"],[1,"container-fluid","pt-5","mt-5"],["class","row",4,"ngIf"],["class","row mt-4",4,"ngIf"],[1,"btn","btn-success","btn-fill","btn-lg","text-white",3,"click"],[1,"fas","fa-search"],["type","button",1,"btn","btn-success","btn-fill","btn-lg","text-white",3,"click"],["aria-hidden","true",1,"fa","fa-download","me-2"],[1,"row"],[1,"col-6"],[1,"col"],["for","channelSelect"],[3,"clearable","ngModel","ngModelChange"],[3,"value",4,"ngFor","ngForOf"],[1,"row","mt-1rem"],[1,"col-12"],["for","dates"],["id","dates",1,"form-control","rounded","dateRange","w-75",3,"rangePicker"],["matStartDate","","placeholder","Start date",3,"ngModel","ngModelChange","click"],["matEndDate","","placeholder","End date",3,"ngModel","ngModelChange","click"],["picker",""],[3,"value"],[2,"width","18px","margin-right","10px",3,"src"],[1,"row","mt-4"],[1,"col-md-12"],[1,"table"],[1,"thead-light","sticky-top-thead"],["width","1%"],[3,"ngClass",4,"ngFor","ngForOf"],[3,"ngClass"],[1,"row","mx-1","mb-5"],[1,"nav","nav-pills"],[1,"nav-item","mx-3"],[1,"btn","btn-sm","rounded-pill",3,"ngClass","click"],[1,"thead-light"],["width","25%"],["width","15%",4,"ngIf"],["width","10%"],[4,"ngFor","ngForOf"],["width","15%"],[4,"ngIf"],["class","ps-5",4,"ngIf"],[3,"title",4,"ngIf"],[1,"ps-5"],[3,"title"],[1,"fas","fa-info-circle","ms-2"]],template:function(t,n){1&t&&(e.TgZ(0,"mainpanel",0)(1,"actions"),e.YNc(2,$,3,0,"button",1),e.YNc(3,E,3,0,"button",2),e.TgZ(4,"button",3),e.NdJ("click",function(){return n.new()}),e._UZ(5,"i",4),e._uU(6," New "),e.qZA()(),e.TgZ(7,"content")(8,"div",5),e.YNc(9,V,23,6,"div",6),e.YNc(10,ee,14,1,"div",7),e.YNc(11,ue,32,10,"div",6),e.qZA()()()),2&t&&(e.Q6J("headerTitle",n.PageTitle)("hideSearchBox",!0)("hideSearchDropdown",!0),e.xp6(2),e.Q6J("ngIf",!n.ispreview&&!n.isresult),e.xp6(1),e.Q6J("ngIf",n.ispreview&&n.hasAction&&0!==n.downloadOrderData.length),e.xp6(6),e.Q6J("ngIf",!n.ispreview&&!n.isresult),e.xp6(1),e.Q6J("ngIf",n.isresult),e.xp6(1),e.Q6J("ngIf",n.ispreview))},dependencies:[s.mk,s.sg,s.O5,r.Fj,r.JJ,r.On,p.p,h.w9,h.jq,_.wx,_.zY,_.By,_._g,s.uU],styles:[".vertical-radio[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin:15px 0}.mt-1rem[_ngcontent-%COMP%]{margin-top:1rem}.dateRange[_ngcontent-%COMP%]{padding-top:.8rem;padding-bottom:.8rem}"]}),a})();var c=u(8063);const pe=[{path:"",component:C,children:[{path:"",redirectTo:"new",pathMatch:"full"},{path:"new",component:v,canActivate:[c.a],data:{title:"New Order"}},{path:"detail",component:y,canActivate:[c.a],data:{title:"Orders detail"}},{path:"ready_to_ship",component:w,canActivate:[c.a],data:{title:"Ready To Ship"}},{path:"Shipped",component:x,canActivate:[c.a],data:{title:"Shipped"}},{path:"Delivered",component:I,canActivate:[c.a],data:{title:"Delivered"}},{path:"All",component:R,canActivate:[c.a],data:{title:"All Order"}},{path:"Cancelled",component:H,canActivate:[c.a],data:{title:"Cancelled"}},{path:"Download",component:de,canActivate:[c.a],data:{title:"Download"}}]}];let he=(()=>{class a{}return a.\u0275fac=function(t){return new(t||a)},a.\u0275mod=e.oAB({type:a}),a.\u0275inj=e.cJS({imports:[s.ez,d.Bz.forChild(pe)]}),a})();var ge=u(8739),ce=u(3238);let me=(()=>{class a{}return a.\u0275fac=function(t){return new(t||a)},a.\u0275mod=e.oAB({type:a}),a.\u0275inj=e.cJS({imports:[s.ez,r.u5,he,b.Z,p.R,ge.TU,d.Bz,h.A0,_.FA,ce.XK,m.K]}),a})()}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkpos_marketplace=self.webpackChunkpos_marketplace||[]).push([[455],{455:(A,_,r)=>{r.d(_,{Rr:()=>m,rP:()=>I});var h=r(9643),e=r(4650),s=r(3238),b=r(2687),p=r(1281),g=r(4006);const f=["input"],k=function(i){return{enterDuration:i}},M=["*"],T=new e.OlP("mat-slide-toggle-default-options",{providedIn:"root",factory:()=>({disableToggleValue:!1})});let v=0;const y={provide:g.JU,useExisting:(0,e.Gpc)(()=>m),multi:!0};class C{constructor(l,t){this.source=l,this.checked=t}}const E=(0,s.sb)((0,s.pj)((0,s.Kr)((0,s.Id)(class{constructor(i){this._elementRef=i}}))));let D=(()=>{class i extends E{constructor(t,a,o,n,d,c,S){super(t),this._focusMonitor=a,this._changeDetectorRef=o,this.defaults=d,this._onChange=O=>{},this._onTouched=()=>{},this._required=!1,this._checked=!1,this.name=null,this.labelPosition="after",this.ariaLabel=null,this.ariaLabelledby=null,this.change=new e.vpe,this.toggleChange=new e.vpe,this.tabIndex=parseInt(n)||0,this.color=this.defaultColor=d.color||"accent",this._noopAnimations="NoopAnimations"===c,this.id=this._uniqueId=`${S}${++v}`}get required(){return this._required}set required(t){this._required=(0,p.Ig)(t)}get checked(){return this._checked}set checked(t){this._checked=(0,p.Ig)(t),this._changeDetectorRef.markForCheck()}get inputId(){return`${this.id||this._uniqueId}-input`}ngAfterContentInit(){this._focusMonitor.monitor(this._elementRef,!0).subscribe(t=>{"keyboard"===t||"program"===t?this._focused=!0:t||Promise.resolve().then(()=>{this._focused=!1,this._onTouched(),this._changeDetectorRef.markForCheck()})})}ngOnDestroy(){this._focusMonitor.stopMonitoring(this._elementRef)}writeValue(t){this.checked=!!t}registerOnChange(t){this._onChange=t}registerOnTouched(t){this._onTouched=t}setDisabledState(t){this.disabled=t,this._changeDetectorRef.markForCheck()}toggle(){this.checked=!this.checked,this._onChange(this.checked)}_emitChangeEvent(){this._onChange(this.checked),this.change.emit(this._createChangeEvent(this.checked))}}return i.\u0275fac=function(t){e.$Z()},i.\u0275dir=e.lG2({type:i,inputs:{name:"name",id:"id",labelPosition:"labelPosition",ariaLabel:["aria-label","ariaLabel"],ariaLabelledby:["aria-labelledby","ariaLabelledby"],ariaDescribedby:["aria-describedby","ariaDescribedby"],required:"required",checked:"checked"},outputs:{change:"change",toggleChange:"toggleChange"},features:[e.qOj]}),i})(),m=(()=>{class i extends D{constructor(t,a,o,n,d,c){super(t,a,o,n,d,c,"mat-slide-toggle-")}_createChangeEvent(t){return new C(this,t)}_onChangeEvent(t){t.stopPropagation(),this.toggleChange.emit(),this.defaults.disableToggleValue?this._inputElement.nativeElement.checked=this.checked:(this.checked=this._inputElement.nativeElement.checked,this._emitChangeEvent())}_onInputClick(t){t.stopPropagation()}focus(t,a){a?this._focusMonitor.focusVia(this._inputElement,a,t):this._inputElement.nativeElement.focus(t)}_onLabelTextChange(){this._changeDetectorRef.detectChanges()}}return i.\u0275fac=function(t){return new(t||i)(e.Y36(e.SBq),e.Y36(b.tE),e.Y36(e.sBO),e.$8M("tabindex"),e.Y36(T),e.Y36(e.QbO,8))},i.\u0275cmp=e.Xpm({type:i,selectors:[["mat-slide-toggle"]],viewQuery:function(t,a){if(1&t&&e.Gf(f,5),2&t){let o;e.iGM(o=e.CRH())&&(a._inputElement=o.first)}},hostAttrs:[1,"mat-slide-toggle"],hostVars:13,hostBindings:function(t,a){2&t&&(e.Ikx("id",a.id),e.uIk("tabindex",null)("aria-label",null)("aria-labelledby",null)("name",null),e.ekj("mat-checked",a.checked)("mat-disabled",a.disabled)("mat-slide-toggle-label-before","before"==a.labelPosition)("_mat-animation-noopable",a._noopAnimations))},inputs:{disabled:"disabled",disableRipple:"disableRipple",color:"color",tabIndex:"tabIndex"},exportAs:["matSlideToggle"],features:[e._Bn([y]),e.qOj],ngContentSelectors:M,decls:14,vars:20,consts:[[1,"mat-slide-toggle-label"],["label",""],[1,"mat-slide-toggle-bar"],["type","checkbox","role","switch",1,"mat-slide-toggle-input","cdk-visually-hidden",3,"id","required","tabIndex","checked","disabled","change","click"],["input",""],[1,"mat-slide-toggle-thumb-container"],[1,"mat-slide-toggle-thumb"],["mat-ripple","",1,"mat-slide-toggle-ripple","mat-focus-indicator",3,"matRippleTrigger","matRippleDisabled","matRippleCentered","matRippleRadius","matRippleAnimation"],[1,"mat-ripple-element","mat-slide-toggle-persistent-ripple"],[1,"mat-slide-toggle-content",3,"cdkObserveContent"],["labelContent",""],[2,"display","none"]],template:function(t,a){if(1&t&&(e.F$t(),e.TgZ(0,"label",0,1)(2,"span",2)(3,"input",3,4),e.NdJ("change",function(n){return a._onChangeEvent(n)})("click",function(n){return a._onInputClick(n)}),e.qZA(),e.TgZ(5,"span",5),e._UZ(6,"span",6),e.TgZ(7,"span",7),e._UZ(8,"span",8),e.qZA()()(),e.TgZ(9,"span",9,10),e.NdJ("cdkObserveContent",function(){return a._onLabelTextChange()}),e.TgZ(11,"span",11),e._uU(12,"\xa0"),e.qZA(),e.Hsn(13),e.qZA()()),2&t){const o=e.MAs(1),n=e.MAs(10);e.uIk("for",a.inputId),e.xp6(2),e.ekj("mat-slide-toggle-bar-no-side-margin",!n.textContent||!n.textContent.trim()),e.xp6(1),e.Q6J("id",a.inputId)("required",a.required)("tabIndex",a.tabIndex)("checked",a.checked)("disabled",a.disabled),e.uIk("name",a.name)("aria-checked",a.checked)("aria-label",a.ariaLabel)("aria-labelledby",a.ariaLabelledby)("aria-describedby",a.ariaDescribedby),e.xp6(4),e.Q6J("matRippleTrigger",o)("matRippleDisabled",a.disableRipple||a.disabled)("matRippleCentered",!0)("matRippleRadius",20)("matRippleAnimation",e.VKq(18,k,a._noopAnimations?0:150))}},dependencies:[s.wG,h.wD],styles:[".mat-slide-toggle{display:inline-block;height:24px;max-width:100%;line-height:24px;white-space:nowrap;outline:none;-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-slide-toggle.mat-checked .mat-slide-toggle-thumb-container{transform:translate3d(16px, 0, 0)}[dir=rtl] .mat-slide-toggle.mat-checked .mat-slide-toggle-thumb-container{transform:translate3d(-16px, 0, 0)}.mat-slide-toggle.mat-disabled{opacity:.38}.mat-slide-toggle.mat-disabled .mat-slide-toggle-label,.mat-slide-toggle.mat-disabled .mat-slide-toggle-thumb-container{cursor:default}.mat-slide-toggle-label{-webkit-user-select:none;user-select:none;display:flex;flex:1;flex-direction:row;align-items:center;height:inherit;cursor:pointer}.mat-slide-toggle-content{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mat-slide-toggle-label-before .mat-slide-toggle-label{order:1}.mat-slide-toggle-label-before .mat-slide-toggle-bar{order:2}[dir=rtl] .mat-slide-toggle-label-before .mat-slide-toggle-bar,.mat-slide-toggle-bar{margin-right:8px;margin-left:0}[dir=rtl] .mat-slide-toggle-bar,.mat-slide-toggle-label-before .mat-slide-toggle-bar{margin-left:8px;margin-right:0}.mat-slide-toggle-bar-no-side-margin{margin-left:0;margin-right:0}.mat-slide-toggle-thumb-container{position:absolute;z-index:1;width:20px;height:20px;top:-3px;left:0;transform:translate3d(0, 0, 0);transition:all 80ms linear;transition-property:transform}._mat-animation-noopable .mat-slide-toggle-thumb-container{transition:none}[dir=rtl] .mat-slide-toggle-thumb-container{left:auto;right:0}.mat-slide-toggle-thumb{height:20px;width:20px;border-radius:50%;display:block}.mat-slide-toggle-bar{position:relative;width:36px;height:14px;flex-shrink:0;border-radius:8px}.mat-slide-toggle-input{bottom:0;left:10px}[dir=rtl] .mat-slide-toggle-input{left:auto;right:10px}.mat-slide-toggle-bar,.mat-slide-toggle-thumb{transition:all 80ms linear;transition-property:background-color;transition-delay:50ms}._mat-animation-noopable .mat-slide-toggle-bar,._mat-animation-noopable .mat-slide-toggle-thumb{transition:none}.mat-slide-toggle .mat-slide-toggle-ripple{position:absolute;top:calc(50% - 20px);left:calc(50% - 20px);height:40px;width:40px;z-index:1;pointer-events:none}.mat-slide-toggle .mat-slide-toggle-ripple .mat-ripple-element:not(.mat-slide-toggle-persistent-ripple){opacity:.12}.mat-slide-toggle-persistent-ripple{width:100%;height:100%;transform:none}.mat-slide-toggle-bar:hover .mat-slide-toggle-persistent-ripple{opacity:.04}.mat-slide-toggle:not(.mat-disabled).cdk-keyboard-focused .mat-slide-toggle-persistent-ripple{opacity:.12}.mat-slide-toggle-persistent-ripple,.mat-slide-toggle.mat-disabled .mat-slide-toggle-bar:hover .mat-slide-toggle-persistent-ripple{opacity:0}@media(hover: none){.mat-slide-toggle-bar:hover .mat-slide-toggle-persistent-ripple{display:none}}.cdk-high-contrast-active .mat-slide-toggle-thumb,.cdk-high-contrast-active .mat-slide-toggle-bar{border:1px solid}.cdk-high-contrast-active .mat-slide-toggle.cdk-keyboard-focused .mat-slide-toggle-bar{outline:2px dotted;outline-offset:5px}"],encapsulation:2,changeDetection:0}),i})(),u=(()=>{class i{}return i.\u0275fac=function(t){return new(t||i)},i.\u0275mod=e.oAB({type:i}),i.\u0275inj=e.cJS({}),i})(),I=(()=>{class i{}return i.\u0275fac=function(t){return new(t||i)},i.\u0275mod=e.oAB({type:i}),i.\u0275inj=e.cJS({imports:[u,s.si,s.BQ,h.Q8,u,s.BQ]}),i})()}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkpos_marketplace=self.webpackChunkpos_marketplace||[]).push([[667],{1667:(Je,Tt,u)=>{u.r(Tt),u.d(Tt,{ProductModule:()=>Ae});var c=u(6895),vt=u(7398),v=u(4006),pt=u(8252),t=u(4650);let At=(()=>{class e{constructor(){this.productTabs=[{Title:"Sold in Channel",Url:"/menu/products/sold-in-channel",Description:"SKU has been mapped between dealpos and marketplace"},{Title:"Not in POS",Url:"/menu/products/not-in-pos",Description:"SKU sold in Marketplace but not exist in DEALPOS"},{Title:"Not in Channel",Url:"/menu/products/not-in-channel",Description:"SKU has not been sold on one of channels"},{Title:"In POS",Url:"/menu/products/in-pos",Description:"Products have been registered in POS"},{Title:"Duplicate SKU",Url:"/menu/products/duplicate-sku",Description:"SKU has more than one different product name"}]}}return e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=t.Xpm({type:e,selectors:[["app-products"]],decls:5,vars:1,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid"],[3,"Tabs"]],template:function(n,o){1&n&&(t.TgZ(0,"nav",0)(1,"div",1)(2,"div"),t._UZ(3,"nav-tab",2),t.qZA()()(),t._UZ(4,"router-outlet")),2&n&&(t.xp6(3),t.Q6J("Tabs",o.productTabs))},dependencies:[vt.e,pt.lC],styles:[".badge-pill[_ngcontent-%COMP%]{padding-bottom:16px!important}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]:checked + label[_ngcontent-%COMP%]{background:#dfeffc;border:1px solid #dfeffc}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{visibility:hidden;position:absolute;left:0;top:0}.rad-btn[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{border:1px solid #ddd;border-radius:3px;margin-right:10px;cursor:pointer;padding:10px;margin-bottom:10px;color:#000;width:80px;text-align:center}.modal-dialog[_ngcontent-%COMP%]{max-width:30%!important}.product[_ngcontent-%COMP%]{height:100%!important}.row[_ngcontent-%COMP%]{margin-left:0;margin-right:0}ul[_ngcontent-%COMP%]{list-style-type:none}.link[_ngcontent-%COMP%]{color:#0202ab;cursor:pointer}.px-1[_ngcontent-%COMP%]{padding-left:5px!important}.sku[_ngcontent-%COMP%]{color:#696969;font-style:italic}.badge-pill[_ngcontent-%COMP%]{height:16px}.itemTitle[_ngcontent-%COMP%]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.no-title[_ngcontent-%COMP%]{margin-top:.33em;margin-bottom:.33rem}.mb-upload[_ngcontent-%COMP%]{padding-bottom:.625rem}.my-1rem[_ngcontent-%COMP%]{margin-bottom:1rem!important;margin-top:1rem!important}.pr-rem[_ngcontent-%COMP%]{padding-right:.6rem}.text-larger[_ngcontent-%COMP%]{font-size:larger}.bg-lightpink[_ngcontent-%COMP%]{background-color:#f9dede}.bottom-buttons[_ngcontent-%COMP%]{margin-left:97px}@media (min-width: 1200px){.max-w-xl[_ngcontent-%COMP%]{max-width:205px}}"]}),e})();class z{}var U=u(8231),m=u(5412),St=u(3900),Dt=u(9646),Jt=u(9568),J=u(1318);let yt=(()=>{class e{constructor(n,o){this.LocalData=n,this.httpService=o}getCategoriesByTypeId(n){return this.LocalData.getCategoriesByChannelType(n).pipe((0,St.w)(o=>null!=o?(0,Dt.of)(o):this._getCategoriesByTypeID(n)))}_getCategoriesByTypeID(n){return this.httpService.post("/api/Channel/getCategoriesByTypeID",{TypeID:n}).pipe((0,St.w)(i=>this.LocalData.saveCategoriesByChannelType(i,n)))}}return e.\u0275fac=function(n){return new(n||e)(t.LFG(Jt.T),t.LFG(J.O))},e.\u0275prov=t.Yz7({token:e,factory:e.\u0275fac,providedIn:"root"}),e})();var wt=u(8966);function Et(e,a){if(1&e){const n=t.EpF();t.ynx(0),t.TgZ(1,"h5",4),t._uU(2,"Category"),t.qZA(),t.TgZ(3,"app-select-search",10),t.NdJ("onSelect",function(i){t.CHM(n);const l=t.oxw();return t.KtG(l.onSelectCategory(i))}),t.qZA(),t.BQk()}if(2&e){const n=t.oxw();t.xp6(3),t.Q6J("appearance","outline")("batchSize",30)("data",n.options)("bindLabel","Value")("bindValue","Key")("placeholder","Select Category")}}let It=(()=>{class e{constructor(n,o,i,l){this.data=n,this.channelCategoriesService=o,this.http=i,this.dialogRef=l,this.item=n.item,this.selectItemMissingChannel=n.selectedItemMissingChannel,this.options=[],this.optionVisible=!1}onSelectItem(n){this.selectedChannelID=n;let o=this.selectItemMissingChannel.find(i=>i.ID==n);!o||1!==o.TypeID&&7!==o.TypeID?this.optionVisible=!1:this.channelCategoriesService.getCategoriesByTypeId(o.TypeID).subscribe({next:i=>{this.options=i,this.optionVisible=!0},error:i=>{console.error(i)}})}onSelectCategory(n){this.selectedCategoryID=n}onClose(){this.dialogRef.close()}onSave(){this.selectedChannelID&&(this.selectedCategoryID||!this.optionVisible)&&this.dialogRef.close({channelID:this.selectedChannelID,categoryID:this.selectedCategoryID})}}return e.\u0275fac=function(n){return new(n||e)(t.Y36(m.WI),t.Y36(yt),t.Y36(J.O),t.Y36(m.so))},e.\u0275cmp=t.Xpm({type:e,selectors:[["app-uploadProductDialog"]],decls:16,vars:7,consts:[["mat-dialog-title","",1,"pt-2","pb-3"],[1,"py-5","mt-4","mx-0","border-top","border-bottom"],[1,"row"],[1,"col-12"],[1,"mb-3","fw-normal"],[3,"appearance","data","bindLabel","bindValue","placeholder","onSelect"],[4,"ngIf"],[1,"justify-content-end","mx-4"],["mat-button","",1,"btn","btn-light","mx-3",3,"click"],["mat-button","","data-cy","scan",1,"btn","btn-success","mx-3",3,"click"],[3,"appearance","batchSize","data","bindLabel","bindValue","placeholder","onSelect"]],template:function(n,o){1&n&&(t.TgZ(0,"h1",0),t._uU(1),t.qZA(),t.TgZ(2,"mat-dialog-content",1)(3,"div",2)(4,"div",3)(5,"h5",4),t._uU(6,"Channel :"),t.qZA(),t.TgZ(7,"app-select-search",5),t.NdJ("onSelect",function(l){return o.onSelectItem(l)}),t.qZA()()(),t.TgZ(8,"div",2)(9,"div",3),t.YNc(10,Et,4,6,"ng-container",6),t.qZA()()(),t.TgZ(11,"mat-dialog-actions",7)(12,"button",8),t.NdJ("click",function(){return o.onClose()}),t._uU(13,"Cancel"),t.qZA(),t.TgZ(14,"button",9),t.NdJ("click",function(){return o.onSave()}),t._uU(15,"Upload"),t.qZA()()),2&n&&(t.xp6(1),t.hij("Upload ",null==o.item?null:o.item.Name,""),t.xp6(6),t.Q6J("appearance","outline")("data",o.selectItemMissingChannel)("bindLabel","Name")("bindValue","ID")("placeholder","Choose "),t.xp6(3),t.Q6J("ngIf",o.optionVisible))},dependencies:[c.O5,m.uh,m.xY,m.H8,wt.h],styles:["mat-form-field[_ngcontent-%COMP%]{width:100%;height:100%}.mat-dialog-title[_ngcontent-%COMP%]{margin-bottom:0%;margin-left:24px}"]}),e})();var s=u(3154),F=u(266);function qt(e,a){if(1&e&&(t.ynx(0),t.TgZ(1,"tr")(2,"td",11),t._uU(3),t.qZA(),t.TgZ(4,"td",11),t._uU(5),t.qZA(),t.TgZ(6,"td",12)(7,"p",13),t._uU(8,"Product Not in Channel!"),t.qZA()()(),t.BQk()),2&e){const n=t.oxw().$implicit;t.xp6(3),t.hij(" ",null==n?null:n.Model,""),t.xp6(2),t.hij(" ",null==n?null:n.Code,"")}}function Lt(e,a){if(1&e&&(t.TgZ(0,"td",11),t._uU(1),t.qZA()),2&e){const n=t.oxw(3).$implicit;t.uIk("rowspan",n.Channel.length),t.xp6(1),t.hij(" ",null==n?null:n.Model,"")}}function Qt(e,a){if(1&e&&(t.TgZ(0,"td",11),t._uU(1),t.qZA()),2&e){const n=t.oxw(3).$implicit;t.uIk("rowspan",n.Channel.length),t.xp6(1),t.hij(" ",null==n?null:n.Code,"")}}function Bt(e,a){if(1&e&&(t.TgZ(0,"tr"),t.YNc(1,Lt,2,2,"td",14),t.YNc(2,Qt,2,2,"td",14),t.TgZ(3,"td",11)(4,"div",15)(5,"a",16),t._UZ(6,"img",17),t.qZA(),t.TgZ(7,"div",18),t._uU(8),t.qZA()()(),t.TgZ(9,"td",11),t._uU(10),t.ALo(11,"number"),t.qZA(),t.TgZ(12,"td",19),t._uU(13),t.ALo(14,"number"),t.qZA()()),2&e){const n=a.$implicit,o=a.index,i=t.oxw(3);t.xp6(1),t.Q6J("ngIf",0==o),t.xp6(1),t.Q6J("ngIf",0==o),t.xp6(3),t.Q6J("href",n.Url,t.LSH)("title",n.Title),t.xp6(1),t.Q6J("src",i.getChannelLogo(n.TypeID),t.LSH),t.xp6(1),t.Q6J("matTooltip",(null==n||null==n.Name?null:n.Name.length)>55?null==n?null:n.Name:""),t.xp6(1),t.hij(" ",n.Name," "),t.xp6(2),t.Oqu(t.lcZ(11,9,n.Price)),t.xp6(3),t.Oqu(t.lcZ(14,11,n.Inventory))}}function Yt(e,a){if(1&e&&t.YNc(0,Bt,15,13,"tr",8),2&e){const n=t.oxw().$implicit;t.Q6J("ngForOf",null==n?null:n.Channel)}}function Vt(e,a){if(1&e&&(t.ynx(0),t.YNc(1,qt,9,2,"ng-container",9),t.YNc(2,Yt,1,1,"ng-template",null,10,t.W1O),t.BQk()),2&e){const n=a.$implicit,o=t.MAs(3);t.xp6(1),t.Q6J("ngIf",!n.Channel||n.Channel.length<1)("ngIfElse",o)}}let Mt=(()=>{class e{constructor(n){this.data=n,this.variants=n.variants,this.title=n.title}getChannelLogo(n){return s.g.getChannelLogoByTypeId(n)}}return e.\u0275fac=function(n){return new(n||e)(t.Y36(m.WI))},e.\u0275cmp=t.Xpm({type:e,selectors:[["app-modal-variant"]],decls:23,vars:2,consts:[["mat-dialog-title","",1,"pt-2","pb-3","text-center"],[1,"pb-5","px-3"],[1,"table"],[1,"sticky-top-thead","variant-modal"],[1,"text-start","sticky-top"],["matTooltip","Variant from POS",1,"fas","fa-info-circle","ms-1"],["matTooltip","Product and Variant from each Channel",1,"fas","fa-info-circle","ms-1"],[1,"text-start","sticky-top",2,"width","0%"],[4,"ngFor","ngForOf"],[4,"ngIf","ngIfElse"],["printChannelModal",""],[1,"text-start"],["colspan","3",1,"text-center"],[1,"my-auto"],["class","text-start",4,"ngIf"],[1,"d-flex"],["target","_blank",1,"me-1",3,"href","title"],[2,"width","20px","height","20px",3,"src"],[1,"text-ellipsis","ps-2",2,"max-width","18vw",3,"matTooltip"],[1,"text-center"]],template:function(n,o){1&n&&(t.TgZ(0,"h1",0),t._uU(1),t.qZA(),t._UZ(2,"hr"),t.TgZ(3,"mat-dialog-content",1)(4,"table",2)(5,"thead",3)(6,"tr")(7,"th",4),t._uU(8," VARIANT "),t.TgZ(9,"sup"),t._UZ(10,"i",5),t.qZA()(),t.TgZ(11,"th",4),t._uU(12,"SKU"),t.qZA(),t.TgZ(13,"th",4),t._uU(14," PRODUCT "),t.TgZ(15,"sup"),t._UZ(16,"i",6),t.qZA()(),t.TgZ(17,"th",4),t._uU(18,"PRICE"),t.qZA(),t.TgZ(19,"th",7),t._uU(20,"INVENTORY"),t.qZA()()(),t.TgZ(21,"tbody"),t.YNc(22,Vt,4,2,"ng-container",8),t.qZA()()()),2&n&&(t.xp6(1),t.Oqu(o.title),t.xp6(21),t.Q6J("ngForOf",o.variants))},dependencies:[c.sg,c.O5,m.uh,m.xY,F.gM,c.JJ],styles:[".mat-dialog-title[_ngcontent-%COMP%]{margin-bottom:0%;margin-left:24px}.sticky-top-thead[_ngcontent-%COMP%] th.sticky-top[_ngcontent-%COMP%]{top:0px}.table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] tr.sticky-top[_ngcontent-%COMP%]{border:none!important;border-bottom:1px solid!important}table[_ngcontent-%COMP%] > thead[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%]{border-top:none!important;border-left:none!important;border-right:none!important}.table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{background-color:#fff!important}.sticky-top-thead.variant-modal[_ngcontent-%COMP%] th[_ngcontent-%COMP%]:last-child:after{border-right:0px!important}.sticky-top-thead.variant-modal[_ngcontent-%COMP%] th[_ngcontent-%COMP%]:first-child:before{border-left:0px!important}.sticky-top-thead.variant-modal[_ngcontent-%COMP%] th[_ngcontent-%COMP%]:before{border-top:0px}"]}),e})();var M=u(9300),$t=u(7579),Ht=u(2722),A=u(9694),R=u(6082),W=u(7185);function Rt(e,a){if(1&e){const n=t.EpF();t.TgZ(0,"th",13)(1,"input",14),t.NdJ("change",function(i){t.CHM(n);const l=t.oxw();return t.KtG(l.onSelectAllChannel(i.target.checked))}),t.qZA()()}}function Gt(e,a){1&e&&(t.ynx(0),t.TgZ(1,"th",15),t._uU(2,"Status"),t.qZA(),t.BQk())}function Kt(e,a){if(1&e){const n=t.EpF();t.TgZ(0,"td",15)(1,"input",22),t.NdJ("ngModelChange",function(i){t.CHM(n);const l=t.oxw().$implicit;return t.KtG(l.Selected=i)}),t.qZA()()}if(2&e){const n=t.oxw().$implicit;t.xp6(1),t.Q6J("ngModel",n.Selected)}}function jt(e,a){if(1&e){const n=t.EpF();t.ynx(0),t.TgZ(1,"app-select-search",23),t.NdJ("onSelect",function(i){t.CHM(n);const l=t.oxw().index,r=t.oxw();return t.KtG(r.onSelectCategory(i,l))}),t.qZA(),t.BQk()}if(2&e){const n=t.oxw().$implicit,o=t.oxw();t.xp6(1),t.Q6J("data",n.Categories)("batchSize",30)("disabled",o.uploadResponse.length>0)}}function zt(e,a){1&e&&(t.TgZ(0,"div",24),t._UZ(1,"input",25),t.qZA())}function Wt(e,a){if(1&e&&(t.TgZ(0,"span",29)(1,"a",30),t._UZ(2,"i",31),t.qZA()()),2&e){const n=t.oxw().$implicit;t.xp6(1),t.Q6J("href",n.URL,t.LSH)}}function Xt(e,a){if(1&e&&(t.TgZ(0,"span",32),t._uU(1," X "),t.qZA()),2&e){const n=t.oxw().$implicit;t.Q6J("matTooltip",n.Response)}}function tn(e,a){if(1&e&&(t.ynx(0),t.YNc(1,Wt,3,1,"span",27),t.YNc(2,Xt,2,1,"span",28),t.BQk()),2&e){const n=a.$implicit,o=t.oxw(2).$implicit;t.xp6(1),t.Q6J("ngIf",n.ChannelID==o.ID&&n.Status),t.xp6(1),t.Q6J("ngIf",n.ChannelID==o.ID&&!n.Status)}}function nn(e,a){if(1&e&&(t.ynx(0),t.TgZ(1,"td",26),t.YNc(2,tn,3,2,"ng-container",7),t.qZA(),t.BQk()),2&e){const n=t.oxw(2);t.xp6(2),t.Q6J("ngForOf",n.uploadResponse)}}const Ot=function(e){return{"ps-8":e}};function en(e,a){if(1&e&&(t.ynx(0),t.TgZ(1,"tr"),t.YNc(2,Kt,2,1,"td",16),t.TgZ(3,"td",17)(4,"div",18),t._UZ(5,"img",19),t.TgZ(6,"span",20),t._uU(7),t.qZA()()(),t.TgZ(8,"td"),t.YNc(9,jt,2,3,"ng-container",10),t.YNc(10,zt,2,0,"ng-template",null,21,t.W1O),t.qZA(),t.YNc(12,nn,3,1,"ng-container",6),t.qZA(),t.BQk()),2&e){const n=a.$implicit,o=t.MAs(11),i=t.oxw();t.xp6(2),t.Q6J("ngIf",0==i.uploadResponse.length),t.xp6(1),t.Q6J("ngClass",t.VKq(7,Ot,i.uploadResponse.length>0)),t.xp6(2),t.Q6J("src",n.Img,t.LSH),t.xp6(2),t.Oqu(n.Name),t.xp6(2),t.Q6J("ngIf",n.Categories.length>0)("ngIfElse",o),t.xp6(3),t.Q6J("ngIf",i.uploadResponse.length>0)}}function on(e,a){1&e&&(t.TgZ(0,"span"),t._uU(1," Cancel "),t.qZA())}function an(e,a){1&e&&t._uU(0," Close ")}function ln(e,a){if(1&e){const n=t.EpF();t.TgZ(0,"button",33),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.onSave())}),t._uU(1," Upload "),t.qZA()}if(2&e){const n=t.oxw();t.Q6J("disabled",!n.hasSelectedChannel())}}let Zt=(()=>{class e{constructor(n,o,i,l,r){this.data=n,this.channelService=o,this.productService=i,this.dialogRef=l,this.toastrService=r,this.channelOptions=[],this.uploadResponse=[],this.destroy$=new $t.x,this.uploadResponse=[],this.title=this.data.title,this.channels=this.data.channels,this.products=this.data.products}ngOnInit(){this.initChannelOptions(),this.initCategories()}initCategories(){this.filterChannelTypeId().forEach(o=>{this.channelService.getCategoriesByTypeId(o).pipe((0,Ht.R)(this.destroy$)).subscribe(i=>{this.setCategoriesChannelOption(o,i)})})}setCategoriesChannelOption(n,o){this.channelOptions=this.channelOptions.map(i=>(i.TypeID==n&&(i.Categories=o),i))}initChannelOptions(){this.channelOptions=this.channels.map(n=>({Name:n.Name,Img:n.Img,ID:n.ID,Selected:!1,CategoryID:0,TypeID:n.TypeID,Categories:[]}))}filterChannelTypeId(){return this.data.channels.map(o=>o.TypeID).filter((o,i,l)=>l.indexOf(o)==i).filter(o=>o==A.x.Lazada||o==A.x.Tokopedia)}onSelectCategory(n,o){this.channelOptions[o].CategoryID=n}onSelectAllChannel(n){this.channelOptions=this.channelOptions.map(o=>(o.Selected=n,o))}hasSelectedChannel(){return-1!==this.channelOptions.findIndex(n=>n.Selected)}onClose(){this.dialogRef.close(this.uploadResponse.length>0)}onSave(){if(!this.validateSelectedCategory())return void this.toastrService.warning("Category is required","Warning!");const n=this.channelOptions.filter(o=>o.Selected).map(o=>({CategoryID:o.CategoryID,ChannelID:o.ID}));this.submitToServer(n)}validateSelectedCategory(){return-1==this.channelOptions.filter(o=>o.Selected).filter(o=>o.TypeID==A.x.Lazada||o.TypeID==A.x.Tokopedia).findIndex(o=>0==o.CategoryID)}submitToServer(n){this.productService.uploadToMultipleChannel(this.products,n).subscribe({next:o=>{this.uploadResponse=o,this.filterChannelOptions()},error:o=>{console.error(o)}})}filterChannelOptions(){this.channelOptions=this.channelOptions.filter(n=>-1!==this.uploadResponse.findIndex(o=>o.ChannelID==n.ID))}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}}return e.\u0275fac=function(n){return new(n||e)(t.Y36(m.WI),t.Y36(yt),t.Y36(R.M),t.Y36(m.so),t.Y36(W._W))},e.\u0275cmp=t.Xpm({type:e,selectors:[["app-modal-uploadMultiple-product"]],decls:21,vars:10,consts:[["mat-dialog-title","",1,"pt-1","pb-1","text-center"],[1,"px-1"],[1,"table"],["style","width: 6%","class","text-center",4,"ngIf"],[2,"width","30%",3,"ngClass"],[2,"width","60%"],[4,"ngIf"],[4,"ngFor","ngForOf"],[1,"d-flex","justify-content-end","pe-8"],["mat-button","",1,"btn","btn-light","mx-3",3,"click"],[4,"ngIf","ngIfElse"],["CLOSE",""],["mat-button","","data-cy","scan","class","btn btn-success mx-3",3,"disabled","click",4,"ngIf"],[1,"text-center",2,"width","6%"],["type","checkbox",3,"change"],[1,"text-center"],["class","text-center",4,"ngIf"],[3,"ngClass"],[1,"d-flex","align-items-center"],["alt","",1,"channel-logo",3,"src"],[1,"ms-3"],["EMPTY",""],["type","checkbox",3,"ngModel","ngModelChange"],["appearance","outline","bindLabel","Value","bindValue","Key","placeholder","Select Category",3,"data","batchSize","disabled","onSelect"],["matTooltip","Cannot choose category Product, Please change category after uploading in seller center","matTooltipPosition","above"],["type","text","disabled","","placeholder","Unavailable Category",1,"form-control","rounded",2,"height","40px"],[1,"text-center","fw-bold","fs-4"],["matTooltip","Upload Success",4,"ngIf"],["class","cursor-pointer text-danger",3,"matTooltip",4,"ngIf"],["matTooltip","Upload Success"],["target","_blank",3,"href"],[1,"fa","fa-check","text-success"],[1,"cursor-pointer","text-danger",3,"matTooltip"],["mat-button","","data-cy","scan",1,"btn","btn-success","mx-3",3,"disabled","click"]],template:function(n,o){if(1&n&&(t.TgZ(0,"h1",0),t._uU(1),t.qZA(),t._UZ(2,"hr"),t.TgZ(3,"mat-dialog-content",1)(4,"table",2)(5,"thead")(6,"tr"),t.YNc(7,Rt,2,0,"th",3),t.TgZ(8,"th",4),t._uU(9," CHANNEL "),t.qZA(),t.TgZ(10,"th",5),t._uU(11,"CATEGORY"),t.qZA(),t.YNc(12,Gt,3,0,"ng-container",6),t.qZA()(),t.TgZ(13,"tbody"),t.YNc(14,en,13,9,"ng-container",7),t.qZA()()(),t.TgZ(15,"mat-dialog-actions",8)(16,"button",9),t.NdJ("click",function(){return o.onClose()}),t.YNc(17,on,2,0,"span",10),t.YNc(18,an,1,0,"ng-template",null,11,t.W1O),t.qZA(),t.YNc(20,ln,2,1,"button",12),t.qZA()),2&n){const i=t.MAs(19);t.xp6(1),t.hij(" ",o.title,"\n"),t.xp6(6),t.Q6J("ngIf",0==o.uploadResponse.length),t.xp6(1),t.Q6J("ngClass",t.VKq(8,Ot,o.uploadResponse.length>0)),t.xp6(4),t.Q6J("ngIf",o.uploadResponse.length>0),t.xp6(2),t.Q6J("ngForOf",o.channelOptions),t.xp6(3),t.Q6J("ngIf",0==o.uploadResponse.length)("ngIfElse",i),t.xp6(3),t.Q6J("ngIf",0==o.uploadResponse.length)}},dependencies:[c.mk,c.sg,c.O5,v.Wl,v.JJ,v.On,m.uh,m.xY,m.H8,F.gM,wt.h],styles:["input[type=checkbox][_ngcontent-%COMP%]{width:15px;height:15px}img.channel-logo[_ngcontent-%COMP%]{width:24px;height:24px}table[_ngcontent-%COMP%] > thead[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%]{border-top:none!important;border-left:none!important;border-right:none!important}"]}),e})();var Y=u(7481);let f,Nt,p,h,T,O,V,Z,D,E,ut,X,w,kt,S,q,tt,nt,et,ot,N,ht;const it=[];let at,gt,G,mt,lt,rt,g,_,$,ct,x,L={};const C="appendChild",b="createElement",I="removeChild";function Ut(){const{top:e,left:a,width:n,height:o}=f.getBoundingClientRect();return`transform:translate3D(${a-(p.clientWidth-n)/2}px, ${e-(p.clientHeight-o)/2}px, 0) scale3D(${f.clientWidth/h.clientWidth}, ${f.clientHeight/h.clientHeight}, 0)`}function k(e){const a=_.length-1;if(!w){if(e>0&&g===a||e<0&&!g){if(!x.loop)return P(T,""),void setTimeout(P,9,T,`animation:${e>0?"bpl":"bpf"} .3s;transition:transform .35s`);g=e>0?-1:a+1}if(g=Math.max(0,Math.min(g+e,a)),[g-1,g,g+1].forEach(o=>{if(o=Math.max(0,Math.min(o,a)),L[o])return;const i=_[o].src,l=document[b]("IMG");l.addEventListener("load",Ft.bind(null,i)),l.src=i,L[o]=l}),L[g].complete)return _t(e);w=!0,P(S,"opacity:.4;"),p[C](S),L[g].onload=()=>{N&&_t(e)},L[g].onerror=()=>{_[g]={error:"Error loading image"},N&&_t(e)}}}function _t(e){w&&(p[I](S),w=!1);const a=_[g];if(a.error)alert(a.error);else{const n=p.querySelector("img:last-of-type");T=h=L[g],P(T,`animation:${e>0?"bpfl":"bpfr"} .35s;transition:transform .35s`),P(n,`animation:${e>0?"bpfol":"bpfor"} .35s both`),p[C](T),a.el&&(f=a.el)}$.innerHTML=`${g+1}/${_.length}`,st(_[g].caption),mt&&mt([T,_[g]])}function Ct(){let e,a;const n=.95*window.innerHeight,o=.95*window.innerWidth,i=n/o,[l,r]=x.dimensions||[1920,1080],d=r/l;d>i?(e=Math.min(r,n),a=e/d):(a=Math.min(l,o),e=a*d),Z.style.cssText+=`width:${a}px;height:${e}px;`}function ft(e){~[1,4].indexOf(h.readyState)?(Q(),setTimeout(()=>{h.play()},99)):h.error?Q(e):kt=setTimeout(ft,35,e)}function H(e){x.noLoader||(e&&P(S,`top:${f.offsetTop}px;left:${f.offsetLeft}px;height:${f.clientHeight}px;width:${f.clientWidth}px`),f.parentElement[e?C:I](S),w=e)}function st(e){e&&(tt.innerHTML=e),P(q,"opacity:"+(e?"1;pointer-events:auto":"0"))}function Ft(e){!~it.indexOf(e)&&it.push(e)}function Q(e){if(w&&H(),gt&&gt(),"string"==typeof e)return bt(),x.onError?x.onError():alert(`Error: The requested ${e} could not be loaded.`);at&&Ft(E),h.style.cssText+=Ut(),P(p,"opacity:1;pointer-events:auto"),G&&(G=setTimeout(G,410)),ot=!0,N=!!_,setTimeout(()=>{h.style.cssText+="transition:transform .35s;transform:none",nt&&setTimeout(st,250,nt)},60)}function xt(e){const a=e?e.target:p,n=[q,et,O,V,tt,rt,lt,S];a.blur(),!ht&&!~n.indexOf(a)&&(h.style.cssText+=Ut(),P(p,"pointer-events:auto"),setTimeout(bt,350),clearTimeout(G),ot=!1,ht=!0)}function bt(){if((h===Z?D:h).removeAttribute("src"),document.body[I](p),p[I](h),P(p,""),P(h,""),st(!1),N){const a=p.querySelectorAll("img");for(let n=0;n<a.length;n++)p[I](a[n]);w&&p[I](S),p[I]($),N=_=!1,L={},ct||p[I](lt),ct||p[I](rt),T.onload=Q,T.onerror=Q.bind(null,"image")}x.onClose&&x.onClose(),ht=w=!1}function P({style:e},a){e.cssText=a}function un(e,a){if(1&e){const n=t.EpF();t.ynx(0),t.TgZ(1,"img",18),t.NdJ("click",function(i){t.CHM(n);const l=t.oxw();return t.KtG(l.onZoomImage(i))}),t.qZA(),t.BQk()}if(2&e){const n=t.oxw();t.xp6(1),t.Q6J("src",n.image,t.LSH)}}function hn(e,a){1&e&&t._UZ(0,"img",19)}function gn(e,a){if(1&e){const n=t.EpF();t.TgZ(0,"div",20),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.onEventDesc())}),t._UZ(1,"i",21),t.TgZ(2,"span"),t._uU(3),t.qZA()()}if(2&e){const n=t.oxw();t.xp6(3),t.Oqu(n.code)}}function mn(e,a){if(1&e){const n=t.EpF();t.TgZ(0,"div",20),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.onEventDesc())}),t._UZ(1,"i",22),t.TgZ(2,"span"),t._uU(3),t.qZA()()}if(2&e){const n=t.oxw();t.xp6(3),t.Oqu(n.description)}}function _n(e,a){if(1&e){const n=t.EpF();t.TgZ(0,"div",23)(1,"input",24),t.NdJ("change",function(i){t.CHM(n);const l=t.oxw();return t.KtG(l.onCheck(i.target.checked))}),t.qZA()()}}function Cn(e,a){if(1&e){const n=t.EpF();t.TgZ(0,"button",25),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.onDownload())}),t._UZ(1,"i",26),t._uU(2," Download "),t.qZA()}}function fn(e,a){if(1&e){const n=t.EpF();t.TgZ(0,"button",25),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.onUpload())}),t._UZ(1,"i",27),t._uU(2," Upload "),t.qZA()}}function xn(e,a){if(1&e){const n=t.EpF();t.TgZ(0,"button",28),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.onScan())}),t._UZ(1,"i",29),t._uU(2," Scan "),t.qZA()}}const bn=function(e){return{"me-3":e}};function Pn(e,a){if(1&e&&(t.ynx(0),t.TgZ(1,"a",31),t._UZ(2,"img",32),t.qZA(),t.BQk()),2&e){const n=a.$implicit,o=a.index,i=t.oxw(2);t.xp6(1),t.s9C("href",n.Url,t.LSH),t.xp6(1),t.Q6J("ngClass",t.VKq(4,bn,o!=i.channels.length-1))("src",i.getChannelLogo(n),t.LSH)("matTooltip",n.Title?n.Title:n.Name)}}function Tn(e,a){if(1&e&&(t.ynx(0),t.YNc(1,Pn,3,6,"ng-container",30),t.BQk()),2&e){const n=t.oxw();t.xp6(1),t.Q6J("ngForOf",n.channels)}}const vn=function(e){return{"border-bottom pb-2":e}};function Sn(e,a){if(1&e&&(t.TgZ(0,"li")(1,"div",36)(2,"div",37)(3,"a",31),t._UZ(4,"img",38),t.TgZ(5,"span",39),t._uU(6),t.qZA()()()()()),2&e){const n=a.$implicit,o=a.index,i=t.oxw(2);t.xp6(2),t.Q6J("ngClass",t.VKq(4,vn,o!=i.channels.length-1)),t.xp6(1),t.Q6J("href",n.Url,t.LSH),t.xp6(1),t.Q6J("src",i.getChannelLogo(n),t.LSH),t.xp6(2),t.Oqu(n.Title)}}function yn(e,a){if(1&e&&(t.TgZ(0,"div",33)(1,"button",34),t._uU(2),t.qZA(),t.TgZ(3,"ul",35),t.YNc(4,Sn,7,6,"li",30),t.qZA()()),2&e){const n=t.oxw();t.xp6(2),t.hij(" ",n.channels.length," CHANNELS "),t.xp6(2),t.Q6J("ngForOf",n.channels)}}let Pt=(()=>{class e{constructor(){this.uploadButton=!1,this.scanButton=!1,this.showCheckBox=!1,this.downloadButton=!1,this.hasZoom=!0,this.onUploadEvent=new t.vpe,this.onScanEvent=new t.vpe,this.checkBoxChange=new t.vpe,this.onDescEvent=new t.vpe,this.onDownloadEvent=new t.vpe}onUpload(){this.onUploadEvent.emit()}onScan(){this.onScanEvent.emit()}onCheck(n){this.checkBoxChange.emit(n)}onEventDesc(){this.onDescEvent.emit()}onDownload(){this.onDownloadEvent.emit()}getChannelLogo(n){return s.g.getChannelLogoByTypeId(n.TypeID)}onZoomImage(n){this.hasZoom&&(e=>{Nt||function cn(e){let a,n;function o(d){const y=document[b]("button");return y.className=d,y.innerHTML='<svg viewBox="0 0 48 48"><path d="M28 24L47 5a3 3 0 1 0-4-4L24 20 5 1a3 3 0 1 0-4 4l19 19L1 43a3 3 0 1 0 4 4l19-19 19 19a3 3 0 0 0 4 0v-4L28 24z"/></svg>',y}function i(d,y){const j=document[b]("button");return j.className="bp-lr",j.innerHTML='<svg viewBox="0 0 129 129" height="70" fill="#fff"><path d="M88.6 121.3c.8.8 1.8 1.2 2.9 1.2s2.1-.4 2.9-1.2a4.1 4.1 0 0 0 0-5.8l-51-51 51-51a4.1 4.1 0 0 0-5.8-5.8l-54 53.9a4.1 4.1 0 0 0 0 5.8l54 53.9z"/></svg>',P(j,y),j.onclick=De=>{De.stopPropagation(),k(d)},j}const l=document[b]("STYLE");l.innerHTML=`#bp_caption,#bp_container{bottom:0;left:0;right:0;position:fixed;opacity:0}#bp_container>*,#bp_loader{position:absolute;right:0;z-index:10}#bp_container,#bp_caption,#bp_container svg{pointer-events:none}#bp_container{top:0;z-index:9999;background:${e&&e.overlayColor?e.overlayColor:"rgba(0,0,0,.7)"};opacity:0;transition:opacity .35s}#bp_loader{top:0;left:0;bottom:0;display:flex;align-items:center;cursor:wait;background:0;z-index:9}#bp_loader svg{width:50%;max-width:300px;max-height:50%;margin:auto;animation:bpturn 1s infinite linear}#bp_aud,#bp_container img,#bp_sv,#bp_vid{user-select:none;max-height:96%;max-width:96%;top:0;bottom:0;left:0;margin:auto;box-shadow:0 0 3em rgba(0,0,0,.4);z-index:-1}#bp_sv{background:#111}#bp_sv svg{width:66px}#bp_caption{font-size:.9em;padding:1.3em;background:rgba(15,15,15,.94);color:#fff;text-align:center;transition:opacity .3s}#bp_aud{width:650px;top:calc(50% - 20px);bottom:auto;box-shadow:none}#bp_count{left:0;right:auto;padding:14px;color:rgba(255,255,255,.7);font-size:22px;cursor:default}#bp_container button{position:absolute;border:0;outline:0;background:0;cursor:pointer;transition:all .1s}#bp_container>.bp-x{padding:0;height:41px;width:41px;border-radius:100%;top:8px;right:14px;opacity:.8;line-height:1}#bp_container>.bp-x:focus,#bp_container>.bp-x:hover{background:rgba(255,255,255,.2)}.bp-x svg,.bp-xc svg{height:21px;width:20px;fill:#fff;vertical-align:top;}.bp-xc svg{width:16px}#bp_container .bp-xc{left:2%;bottom:100%;padding:9px 20px 7px;background:#d04444;border-radius:2px 2px 0 0;opacity:.85}#bp_container .bp-xc:focus,#bp_container .bp-xc:hover{opacity:1}.bp-lr{top:50%;top:calc(50% - 130px);padding:99px 0;width:6%;background:0;border:0;opacity:.4;transition:opacity .1s}.bp-lr:focus,.bp-lr:hover{opacity:.8}@keyframes bpf{50%{transform:translatex(15px)}100%{transform:none}}@keyframes bpl{50%{transform:translatex(-15px)}100%{transform:none}}@keyframes bpfl{0%{opacity:0;transform:translatex(70px)}100%{opacity:1;transform:none}}@keyframes bpfr{0%{opacity:0;transform:translatex(-70px)}100%{opacity:1;transform:none}}@keyframes bpfol{0%{opacity:1;transform:none}100%{opacity:0;transform:translatex(-70px)}}@keyframes bpfor{0%{opacity:1;transform:none}100%{opacity:0;transform:translatex(70px)}}@keyframes bpturn{0%{transform:none}100%{transform:rotate(360deg)}}@media (max-width:600px){.bp-lr{font-size:15vw}}`,document.head[C](l),p=document[b]("DIV"),p.id="bp_container",p.onclick=xt,ut=o("bp-x"),p[C](ut),"ontouchend"in window&&window.visualViewport&&(ct=!0,p.ontouchstart=({touches:d,changedTouches:y})=>{n=d.length>1,a=y[0].pageX},p.ontouchend=({changedTouches:d})=>{if(N&&!n&&window.visualViewport.scale<=1){let y=d[0].pageX-a;y<-30&&k(1),y>30&&k(-1)}}),T=document[b]("IMG"),O=document[b]("VIDEO"),O.id="bp_vid",O.setAttribute("playsinline",!0),O.controls=!0,O.loop=!0,V=document[b]("audio"),V.id="bp_aud",V.controls=!0,V.loop=!0,$=document[b]("span"),$.id="bp_count",q=document[b]("DIV"),q.id="bp_caption",et=o("bp-xc"),et.onclick=st.bind(null,!1),q[C](et),tt=document[b]("SPAN"),q[C](tt),p[C](q),lt=i(1,"transform:scalex(-1)"),rt=i(-1,"left:0;right:auto"),S=document[b]("DIV"),S.id="bp_loader",S.innerHTML='<svg viewbox="0 0 32 32" fill="#fff" opacity=".8"><path d="M16 0a16 16 0 0 0 0 32 16 16 0 0 0 0-32m0 4a12 12 0 0 1 0 24 12 12 0 0 1 0-24" fill="#000" opacity=".5"/><path d="M16 0a16 16 0 0 1 16 16h-4A12 12 0 0 0 16 4z"/></svg>',Z=document[b]("DIV"),Z.id="bp_sv",D=document[b]("IFRAME"),D.setAttribute("allowfullscreen",!0),D.allow="autoplay; fullscreen",D.onload=()=>Z[I](S),P(D,"border:0;position:absolute;height:100%;width:100%;left:0;top:0"),Z[C](D),T.onload=Q,T.onerror=Q.bind(null,"image"),window.addEventListener("resize",()=>{N||w&&H(!0),h===Z&&Ct()}),document.addEventListener("keyup",({keyCode:d})=>{27===d&&ot&&xt(),N&&(39===d&&k(1),37===d&&k(-1),38===d&&k(10),40===d&&k(-10))}),document.addEventListener("keydown",d=>{N&&~[37,38,39,40].indexOf(d.keyCode)&&d.preventDefault()}),document.addEventListener("focus",d=>{ot&&!p.contains(d.target)&&(d.stopPropagation(),ut.focus())},!0),Nt=!0}(e),w&&(clearTimeout(kt),bt()),x=e,X=e.ytSrc||e.vimeoSrc,gt=e.animationStart,G=e.animationEnd,mt=e.onChangeImage,f=e.el,at=!1,nt=f.getAttribute("data-caption"),e.gallery?function dn(e,a){let n=x.galleryAttribute||"data-bp";if(Array.isArray(e))g=a||0,_=e,nt=e[g].caption;else{_=[].slice.call("string"==typeof e?document.querySelectorAll(`${e} [${n}]`):e);const o=_.indexOf(f);g=0===a||a?a:-1!==o?o:0,_=_.map(i=>({el:i,src:i.getAttribute(n),caption:i.getAttribute("data-caption")}))}at=!0,E=_[g].src,!~it.indexOf(E)&&H(!0),_.length>1?(p[C]($),$.innerHTML=`${g+1}/${_.length}`,ct||(p[C](lt),p[C](rt))):_=!1,h=T,h.src=E}(e.gallery,e.position):X||e.iframeSrc?(h=Z,function pn(){let e;const a="https://",n="autoplay=1";x.ytSrc?e=`${a}www.youtube${x.ytNoCookie?"-nocookie":""}.com/embed/${X}?html5=1&rel=0&playsinline=1&${n}`:x.vimeoSrc?e=`${a}player.vimeo.com/video/${X}?${n}`:x.iframeSrc&&(e=x.iframeSrc),P(S,""),Z[C](S),D.src=e,Ct(),setTimeout(Q,9)}()):e.imgSrc?(at=!0,E=e.imgSrc,!~it.indexOf(E)&&H(!0),h=T,h.src=E):e.audio?(H(!0),h=V,h.src=e.audio,ft("audio file")):e.vidSrc?(H(!0),e.dimensions&&P(O,`width:${e.dimensions[0]}px`),function sn(e){Array.isArray(e)?(h=O.cloneNode(),e.forEach(a=>{const n=document[b]("SOURCE");n.src=a,n.type=`video/${a.match(/.(\w+)$/)[1]}`,h[C](n)})):(h=O,h.src=e)}(e.vidSrc),ft("video")):(h=T,h.src="IMG"===f.tagName?f.src:window.getComputedStyle(f).backgroundImage.replace(/^url|[(|)|'|"]/g,"")),p[C](h),document.body[C](p)})({el:n.target,imgSrc:this.imageForZoom,noLoader:!1})}}return e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=t.Xpm({type:e,selectors:[["app-product-card"]],inputs:{uploadButton:"uploadButton",scanButton:"scanButton",showCheckBox:"showCheckBox",downloadButton:"downloadButton",image:"image",title:"title",code:"code",description:"description",channels:"channels",check:"check",imageForZoom:"imageForZoom",hasZoom:"hasZoom"},outputs:{onUploadEvent:"onUpload",onScanEvent:"onScan",checkBoxChange:"onCheckBoxChange",onDescEvent:"onDescEvent",onDownloadEvent:"onDownload"},decls:26,vars:11,consts:[[1,"card",2,"margin-bottom","0px"],[1,"card-body","py-6"],[1,"row"],[1,"col-4"],[1,"productUpload_defaultSize","me-2","image-upload"],[1,"imgContainer"],[4,"ngIf","ngIfElse"],["elsePic",""],[1,"col-7","d-inline-block","justify-content-between","gx-0",2,"padding-left","0px"],[1,"itemTitle","cursor-pointer",3,"click"],["class","description cursor-pointer",3,"click",4,"ngIf"],[1,"col-1","gx-0","d-flex","justify-content-center"],[1,"text-end"],["class","text-end gx-0",4,"ngIf"],[1,"card-footer","d-flex","justify-content-between","py-5","bg-footer","align-items-center",2,"border-top","0.1px solid rgb(220 220 220)"],["class","fs-6 btn btn-light btn-sm me-3",3,"click",4,"ngIf"],["class","fs-6 btn btn-light btn-sm",3,"click",4,"ngIf"],["DROPDOWN",""],["alt","",1,"rounded","imgUpload","float-left",3,"src","click"],["src","//res.cloudinary.com/pos/image/upload/w_110/POS/Images/Icon/products_thumb.png",1,"rounded","float-left","imgUpload"],[1,"description","cursor-pointer",3,"click"],[1,"fa","fa-barcode","me-2"],[1,"fa","fa-tag","me-2"],[1,"text-end","gx-0"],["type","checkbox",3,"change"],[1,"fs-6","btn","btn-light","btn-sm","me-3",3,"click"],["aria-hidden","true",1,"fa","fa-download"],["aria-hidden","true",1,"fa","fa-upload"],[1,"fs-6","btn","btn-light","btn-sm",3,"click"],[1,"fa","fa-spinner"],[4,"ngFor","ngForOf"],["target","_blank",3,"href"],["alt","",1,"img-logo",3,"ngClass","src","matTooltip"],[1,"dropdown"],["type","button","id","dropdownMenuButton1","data-bs-toggle","dropdown","aria-expanded","false",1,"btn","fs-6","btn-sm","btn-light","dropdown-toggle"],[1,"dropdown-menu"],[1,"dropdown-item","py-2",2,"cursor","pointer"],[3,"ngClass"],[1,"img-logo",3,"src"],[1,"ms-4"]],template:function(n,o){if(1&n&&(t.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4)(5,"div",5),t.YNc(6,un,2,1,"ng-container",6),t.YNc(7,hn,1,0,"ng-template",null,7,t.W1O),t.qZA()()(),t.TgZ(9,"div",8)(10,"h4",9),t.NdJ("click",function(){return o.onEventDesc()}),t._uU(11),t.qZA(),t.YNc(12,gn,4,1,"div",10),t.YNc(13,mn,4,1,"div",10),t.qZA(),t.TgZ(14,"div",11)(15,"div",12),t.YNc(16,_n,2,0,"div",13),t.qZA()()()(),t.TgZ(17,"div",14)(18,"div"),t.YNc(19,Cn,3,0,"button",15),t.YNc(20,fn,3,0,"button",15),t.YNc(21,xn,3,0,"button",16),t.qZA(),t.TgZ(22,"div"),t.YNc(23,Tn,2,1,"ng-container",6),t.YNc(24,yn,5,2,"ng-template",null,17,t.W1O),t.qZA()()()),2&n){const i=t.MAs(8),l=t.MAs(25);t.xp6(6),t.Q6J("ngIf",o.image)("ngIfElse",i),t.xp6(5),t.hij(" ",o.title," "),t.xp6(1),t.Q6J("ngIf",o.code),t.xp6(1),t.Q6J("ngIf",o.description),t.xp6(3),t.Q6J("ngIf",o.showCheckBox),t.xp6(3),t.Q6J("ngIf",o.downloadButton),t.xp6(1),t.Q6J("ngIf",o.uploadButton),t.xp6(1),t.Q6J("ngIf",o.scanButton),t.xp6(2),t.Q6J("ngIf",o.channels.length<4)("ngIfElse",l)}},dependencies:[c.mk,c.sg,c.O5,F.gM],styles:[".img-logo[_ngcontent-%COMP%]{height:24px;width:24px}.itemTitle[_ngcontent-%COMP%]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden;max-width:100%}.bg-footer[_ngcontent-%COMP%]{background-color:#ededed69}.description[_ngcontent-%COMP%]{font-weight:300;margin-left:2px}.productUpload_defaultSize[_ngcontent-%COMP%]{max-width:100px!important;max-height:100px!important;width:auto!important;height:auto!important}.image-upload[_ngcontent-%COMP%]{position:relative}.imgContainer[_ngcontent-%COMP%]{width:100%;height:100px}.imgUpload[_ngcontent-%COMP%]{width:100%;height:100%;object-fit:scale-down;cursor:pointer}.dropdown[_ngcontent-%COMP%] .dropdown-menu.show[_ngcontent-%COMP%]{top:unset!important}"]}),e})();function wn(e,a){if(1&e){const n=t.EpF();t.TgZ(0,"span",10),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.getTotal())}),t.TgZ(1,"i",11),t._uU(2,"?"),t.qZA()()}}function In(e,a){if(1&e&&(t.TgZ(0,"span"),t._uU(1),t.ALo(2,"number"),t.qZA()),2&e){const n=t.oxw();t.xp6(1),t.Oqu(t.lcZ(2,1,n.paginationTotal))}}let dt=(()=>{class e{constructor(){this.get=new t.vpe,this.change=new t.vpe,this.next=new t.vpe,this.previous=new t.vpe,this.total=new t.vpe,this.hasClicked=!1}changePage(n){this.filter.PageNumber=n.pageIndex+1,this.change.emit(this.filter)}getTotal(){this.total.emit()}PreviousPage(){this.previous.emit()}NextPage(){this.next.emit()}}return e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=t.Xpm({type:e,selectors:[["app-custom-paginator"]],inputs:{filter:"filter",paginationTotal:"paginationTotal",totaldata:"totaldata",hasClicked:"hasClicked"},outputs:{get:"get",change:"change",next:"next",previous:"previous",total:"total"},decls:16,vars:11,consts:[[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"],[4,"ngIf"],[1,"btn-group"],["role","button","title","Load all products",1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"hidden","click"],[1,"fas","fa-arrow-left"],["role","button","title","Load more for 20 products",1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"hidden","click"],[1,"fas","fa-arrow-right"],[2,"cursor","pointer",3,"click"],["title","Retreive rows count",1,"border","p-3"]],template:function(n,o){1&n&&(t.TgZ(0,"div",0)(1,"div",1)(2,"div",2),t._uU(3),t.ALo(4,"number"),t.ALo(5,"number"),t.YNc(6,wn,3,0,"span",3),t.YNc(7,In,3,3,"span",4),t._uU(8),t.qZA()(),t.TgZ(9,"div",5)(10,"a",6),t.NdJ("click",function(){return o.PreviousPage()}),t._UZ(11,"i",7),t._uU(12," Prev"),t.qZA(),t.TgZ(13,"a",8),t.NdJ("click",function(){return o.NextPage()}),t._UZ(14,"i",9),t._uU(15," Next"),t.qZA()()()),2&n&&(t.xp6(3),t.AsE(" Showing ",t.lcZ(4,7,o.filter.PageSize*(o.filter.PageNumber-1)+1)," - ",t.lcZ(5,9,o.filter.PageSize*(o.filter.PageNumber-1)+o.totaldata)," of "),t.xp6(3),t.Q6J("ngIf",!o.hasClicked),t.xp6(1),t.Q6J("ngIf",o.hasClicked),t.xp6(1),t.hij(" records ~ ",o.filter.PageNumber," Page "),t.xp6(2),t.Q6J("hidden",1==o.filter.PageNumber),t.xp6(3),t.Q6J("hidden",o.filter.PageSize*(o.filter.PageNumber-1)+o.totaldata==o.paginationTotal||o.totaldata<o.filter.PageSize))},dependencies:[c.O5,c.JJ]}),e})();function Mn(e,a){if(1&e){const n=t.EpF();t.TgZ(0,"button",10),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.onOpenScanDialog())}),t._UZ(1,"i",11),t._uU(2," Scan Channel "),t.qZA()}}function On(e,a){if(1&e){const n=t.EpF();t.TgZ(0,"button",12),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.onScanMultipleProduct())}),t._UZ(1,"i",11),t._uU(2),t.qZA()}if(2&e){const n=t.oxw();let o;t.xp6(2),t.hij(" Scan Selected Product (",null==(o=n.productService.selectedProduct(n.products))?null:o.length,") ")}}function Zn(e,a){if(1&e){const n=t.EpF();t.TgZ(0,"button",13),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.onUploadMultipleProductSingleChannel())}),t._UZ(1,"i",14),t._uU(2," Upload Bulk "),t.qZA()}}function Nn(e,a){if(1&e){const n=t.EpF();t.TgZ(0,"div",15)(1,"app-product-card",16),t.NdJ("onUpload",function(){const l=t.CHM(n).$implicit,r=t.oxw();return t.KtG(r.onUploadToMultipleChannel(l))})("onScan",function(){const l=t.CHM(n).$implicit,r=t.oxw();return t.KtG(r.onScanSingleProduct(l))})("onDescEvent",function(){const l=t.CHM(n).index,r=t.oxw();return t.KtG(r.onOpenDialogVariant(l))})("onCheckBoxChange",function(i){const r=t.CHM(n).$implicit;return t.KtG(r.selected=i)}),t.qZA()()}if(2&e){const n=a.$implicit,o=t.oxw();t.xp6(1),t.Q6J("title",null==n?null:n.Name)("image",null==n?null:n.ThumbnailUrl)("description",(null==n?null:n.Variants.length)>1?(null==n?null:n.Variants.length)+" Variants":null)("channels",o.productService.getChannelProduct(n))("code",o.getVariantCode(null==n?null:n.Variants))("showCheckBox",(null==n?null:n.Channel.length)<o.channelOptions.length)("scanButton",!0)("uploadButton",null==n?null:n.hasUpload)("imageForZoom",null==n?null:n.ImageUrl)}}let kn=(()=>{class e{constructor(n,o,i,l){this.http=n,this.toastr=o,this.dialog=i,this.productService=l,this.searchFilter=new z,this.rowCount=0,this.getLoaderPage()}getLoaderPage(){this.http.post("/api/product/Load",{}).subscribe(n=>{this.channelOptions=n.Options.Channel,this.searchFilter.PageNumber=n.Filter.PageNumber,this.searchFilter.RowCount=n.Filter.RowCount,this.searchFilter.ChannelID=null,this.searchFilter.PageSize=100,this.getProducts()})}getProducts(){this.http.post("/api/product/GetInPOS",this.searchFilter).subscribe(n=>{this.products=n.Data,this.rowCount=null==n.Total?this.searchFilter.RowCount:n.Total.toString(),this.products=this.productService.checkProductHasUploadBtn(this.products,this.channelOptions)})}onOpenScanDialog(){let n=JSON.parse(JSON.stringify(this.searchFilter));n.ChannelID=s.g.GuidEMpty,this.dialog.open(U.j,{data:{filter:n,Channel:this.channelOptions},width:"40%"}).afterClosed().pipe((0,M.h)(i=>s.g.IsNotEmpty(i))).subscribe(i=>{this.searchFilter.ChannelID=i.ChannelID,this.searchFilter.ScanFull=i.ScanFull,this.searchFilter.UpdatedProduct=i.UpdatedProduct,this.scanAllProduct()})}scanAllProduct(){null!=this.searchFilter.ChannelID?this.productService.scanAll(this.searchFilter.ChannelID,this.searchFilter.ScanFull,this.searchFilter.UpdatedProduct).subscribe(n=>{this.getLoaderPage();let o=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);this.productService.successToastrScanAllProduct(n,o,!this.searchFilter.UpdatedProduct)}):this.toastr.error("Please Select Channel","Error")}onOpenDialogVariant(n){this.dialog.open(Mt,{data:{title:this.products[n].Name,variants:this.products[n].Variants},width:"45%"})}onUploadMultipleProductSingleChannel(){this.dialog.open(It,{width:"350px",data:{item:null,selectedItemMissingChannel:this.channelOptions}}).afterClosed().subscribe(n=>{n&&this.uploadMultipleProduct(n.channelID,n.categoryID)})}uploadMultipleProduct(n,o){const i=this.productService.selectedProduct(this.products);this.productService.uploadMultipleProduct(i,n,o).subscribe(l=>{this.getProducts();const r=this.productService.findChannelById(n,this.channelOptions);this.toastr.success(i.length>1?"Successfully uploaded "+i.length+" Product to channel "+r?.Name:r?.Name+" Successfully Created","Success")})}onUploadToMultipleChannel(n){let o=this.productService.getChannelProduct(n);n.Channel=o;let i=this.productService.filterUnselectedChannel(n,this.channelOptions);this.dialog.open(Zt,{width:"700px",data:{title:`Upload ${n.Name}`,channels:i,products:[n]}}).afterClosed().subscribe(l=>{l&&this.getProducts()})}searchProduct(n){this.searchFilter.text=n,this.getProducts()}onNextPage(){this.searchFilter.PageNumber=this.searchFilter.PageNumber+1,this.getProducts()}onPrevPage(){this.searchFilter.PageNumber=this.searchFilter.PageNumber-1,this.getProducts()}onScanMultipleProduct(){let n=JSON.parse(JSON.stringify(this.searchFilter));n.ChannelID=s.g.GuidEMpty;let o=this.productService.filterChannelByTypeId(this.channelOptions,[A.x.Tokopedia,A.x.Tiktok]);this.dialog.open(U.j,{data:{filter:n,Channel:o,isSingleChannel:!0},width:"30%"}).afterClosed().pipe((0,M.h)(l=>s.g.IsNotEmpty(l))).subscribe(l=>{this.searchFilter.ChannelID=l.ChannelID,this.searchFilter.ScanFull=l.ScanFull,this.searchFilter.UpdatedProduct=l.UpdatedProduct;let r=this.productService.selectedProduct(this.products),d=this.productService.getVariantCodesProducts(r);this.scanSingleProduct(d)})}onScanSingleProduct(n){let o=JSON.parse(JSON.stringify(this.searchFilter));o.ChannelID=s.g.GuidEMpty,this.dialog.open(U.j,{data:{filter:o,Channel:this.channelOptions,isSingleChannel:!0},width:"40%"}).afterClosed().pipe((0,M.h)(i=>s.g.IsNotEmpty(i))).subscribe(i=>{this.searchFilter.ChannelID=i.ChannelID;const l=this.productService.getVariantCodesProduct(n);this.scanSingleProduct(l)})}scanSingleProduct(n){this.productService.scanSingle(this.searchFilter.ChannelID,n).subscribe({next:o=>{if(o)this.toastr.success("Successfully Scan ","Success");else{let i=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);this.toastr.error(`This product is not existed in ${i?.Name} `,"Error")}this.searchFilter.ChannelID=s.g.GuidEMpty,o&&this.getProducts()},error:o=>{this.searchFilter.ChannelID=s.g.GuidEMpty}})}getVariantCode(n){let o;return n.length>1&&(o=(n[0].model?n[0].model:"")+n[0].Code),1==n.length&&(o=n[0].Code),o}}return e.\u0275fac=function(n){return new(n||e)(t.Y36(J.O),t.Y36(W._W),t.Y36(m.uw),t.Y36(R.M))},e.\u0275cmp=t.Xpm({type:e,selectors:[["app-in-pos"]],decls:12,vars:9,consts:[["hideSearchDropdown","true","hideSearchDropdown","false","description","Products have been registered in POS",3,"headerTitle","onSubmit"],["type","button","data-cy","scanSoldinChannel","class","btn btn-outline-secondary shadow rounded",3,"click",4,"ngIf"],["type","button","data-cy","scanInPos","class","btn btn-outline-secondary shadow rounded me-2",3,"click",4,"ngIf"],["class","btn btn-light shadow rounded ms-2",3,"click",4,"ngIf"],[1,"container-fluid"],[1,"row","mt-8"],["class","col-12 col-md-6 col-xl-4 px-3 my-3",4,"ngFor","ngForOf"],[1,"row","mt-2","justify-content-end"],[1,"col-md-12"],[3,"filter","totaldata","paginationTotal","hasClicked","next","previous"],["type","button","data-cy","scanSoldinChannel",1,"btn","btn-outline-secondary","shadow","rounded",3,"click"],[1,"fas","fa-lg","fa-crosshairs"],["type","button","data-cy","scanInPos",1,"btn","btn-outline-secondary","shadow","rounded","me-2",3,"click"],[1,"btn","btn-light","shadow","rounded","ms-2",3,"click"],["aria-hidden","true",1,"fa","fa-upload"],[1,"col-12","col-md-6","col-xl-4","px-3","my-3"],[3,"title","image","description","channels","code","showCheckBox","scanButton","uploadButton","imageForZoom","onUpload","onScan","onDescEvent","onCheckBoxChange"]],template:function(n,o){1&n&&(t.TgZ(0,"mainpanel",0),t.NdJ("onSubmit",function(l){return o.searchProduct(l)}),t.TgZ(1,"actions"),t.YNc(2,Mn,3,0,"button",1),t.YNc(3,On,3,1,"button",2),t.YNc(4,Zn,3,0,"button",3),t.qZA(),t.TgZ(5,"content")(6,"div",4)(7,"div",5),t.YNc(8,Nn,2,9,"div",6),t.qZA(),t.TgZ(9,"div",7)(10,"div",8)(11,"app-custom-paginator",9),t.NdJ("next",function(){return o.onNextPage()})("previous",function(){return o.onPrevPage()}),t.qZA()()()()()()),2&n&&(t.Q6J("headerTitle","In POS ("+o.rowCount+")"),t.xp6(2),t.Q6J("ngIf",!o.productService.hasSelection(o.products)),t.xp6(1),t.Q6J("ngIf",o.productService.hasSelection(o.products)),t.xp6(1),t.Q6J("ngIf",o.productService.hasSelection(o.products)),t.xp6(4),t.Q6J("ngForOf",o.products),t.xp6(3),t.Q6J("filter",o.searchFilter)("totaldata",null==o.products?null:o.products.length)("paginationTotal",o.rowCount)("hasClicked",!0))},dependencies:[c.sg,c.O5,Y.p,Pt,dt],styles:[".badge-pill[_ngcontent-%COMP%]{padding-bottom:16px!important}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]:checked + label[_ngcontent-%COMP%]{background:#dfeffc;border:1px solid #dfeffc}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{visibility:hidden;position:absolute;left:0;top:0}.rad-btn[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{border:1px solid #ddd;border-radius:3px;margin-right:10px;cursor:pointer;padding:10px;margin-bottom:10px;color:#000;width:80px;text-align:center}.modal-dialog[_ngcontent-%COMP%]{max-width:30%!important}.product[_ngcontent-%COMP%]{height:100%!important}.row[_ngcontent-%COMP%]{margin-left:0;margin-right:0}ul[_ngcontent-%COMP%]{list-style-type:none}.link[_ngcontent-%COMP%]{color:#0202ab;cursor:pointer}.px-1[_ngcontent-%COMP%]{padding-left:5px!important}.sku[_ngcontent-%COMP%]{color:#696969;font-style:italic}.badge-pill[_ngcontent-%COMP%]{height:16px}.itemTitle[_ngcontent-%COMP%]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.no-title[_ngcontent-%COMP%]{margin-top:.33em;margin-bottom:.33rem}.mb-upload[_ngcontent-%COMP%]{padding-bottom:.625rem}.my-1rem[_ngcontent-%COMP%]{margin-bottom:1rem!important;margin-top:1rem!important}.pr-rem[_ngcontent-%COMP%]{padding-right:.6rem}.text-larger[_ngcontent-%COMP%]{font-size:larger}.bg-lightpink[_ngcontent-%COMP%]{background-color:#f9dede}.bottom-buttons[_ngcontent-%COMP%]{margin-left:97px}@media (min-width: 1200px){.max-w-xl[_ngcontent-%COMP%]{max-width:205px}}.img-logo[_ngcontent-%COMP%]{height:24px;width:24px}"]}),e})();var B=u(8796);function Un(e,a){if(1&e){const n=t.EpF();t.TgZ(0,"button",14),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.onOpenScanDialog())}),t._UZ(1,"i",15),t._uU(2," Scan Channel "),t.qZA()}}function Fn(e,a){if(1&e){const n=t.EpF();t.TgZ(0,"button",16),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.onScanSelectedProduct())}),t._UZ(1,"i",15),t._uU(2),t.qZA()}if(2&e){const n=t.oxw();t.xp6(2),t.hij(" Scan Selected Product (",n.productService.selectedProduct(n.products).length,") ")}}function An(e,a){if(1&e&&(t.TgZ(0,"span",17),t._UZ(1,"img",18),t.qZA(),t._uU(2)),2&e){const n=a.item,o=t.oxw();t.xp6(1),t.Q6J("src",o.getChannelLogo(n.TypeID),t.LSH),t.xp6(1),t.hij(" ",n.Name," ")}}function Dn(e,a){if(1&e){const n=t.EpF();t.TgZ(0,"div")(1,"h6"),t._uU(2,"Item ID"),t.qZA(),t.TgZ(3,"input",19),t.NdJ("ngModelChange",function(i){t.CHM(n);const l=t.oxw();return t.KtG(l.searchFilter.Item_id=i)}),t.qZA()()}if(2&e){const n=t.oxw();t.xp6(3),t.Q6J("ngModel",n.searchFilter.Item_id)}}function Jn(e,a){if(1&e){const n=t.EpF();t.TgZ(0,"div",20)(1,"app-product-card",21),t.NdJ("onUpload",function(){const l=t.CHM(n).$implicit,r=t.oxw();return t.KtG(r.onUploadToMultipleChannel(l))})("onDescEvent",function(){const l=t.CHM(n).index,r=t.oxw();return t.KtG(r.onOpenVariantDetail(l))})("onScan",function(){const l=t.CHM(n).$implicit,r=t.oxw();return t.KtG(r.onScanSingleProduct(l))})("onCheckBoxChange",function(i){const r=t.CHM(n).$implicit;return t.KtG(r.selected=i)}),t.qZA()()}if(2&e){const n=a.$implicit,o=t.oxw();t.xp6(1),t.Q6J("title",null==n?null:n.Name)("image",null==n?null:n.ThumbnailUrl)("description",(null==n||null==n.Variants?null:n.Variants.length)>1?(null==n||null==n.Variants?null:n.Variants.length)+" Variants":null)("channels",o.productService.getChannelProduct(n))("code",o.getVariantCode(null==n?null:n.Variants))("showCheckBox",null==n?null:n.hasScan)("scanButton",!0)("uploadButton",null==n?null:n.hasUpload)("imageForZoom",null==n?null:n.ImageUrl)}}function En(e,a){if(1&e){const n=t.EpF();t.TgZ(0,"div",22)(1,"div",23)(2,"app-custom-paginator",24),t.NdJ("total",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.getRowCount())})("next",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.onNextPage())})("previous",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.onPreviousPage())}),t.qZA()()()}if(2&e){const n=t.oxw();t.xp6(2),t.Q6J("filter",n.searchFilter)("totaldata",null==n.products?null:n.products.length)("paginationTotal",n.rowCount)("hasClicked",n.hasClickRowCount)}}let qn=(()=>{class e{constructor(n,o,i,l){this.http=n,this.dialog=o,this.toastr=i,this.productService=l,this.searchFilter=new z,this.rowCount=0,this.hasClickRowCount=!1,this.guidEmpty=s.g.GuidEMpty}ngOnInit(){this.initPageLoader()}initPageLoader(){this.http.post("/api/product/Load",{}).subscribe(n=>{this.channelOptions=n.Options.Channel,this.searchFilter=n.Filter,this.searchFilter.ChannelID=n.Filter.ChannelID,this.searchFilter.mode=1,this.searchFilter.PageSize=n.Filter.RowCount,this.searchFilter.Item_id="",this.getProducts()})}getProducts(){this.productService.findAllSoldInChannel(this.searchFilter).subscribe(n=>{this.products=n.Data,this.products=this.productService.checkProductHasUploadBtn(this.products,this.channelOptions)})}searchProduct(n){this.searchFilter.text=n,this.hasClickRowCount=!1,this.getProducts()}onOpenVariantDetail(n){this.dialog.open(Mt,{data:{variants:this.products[n].Variants,title:this.products[n].Name},width:"45%"})}onOpenScanDialog(){let n=JSON.parse(JSON.stringify(this.searchFilter));n.ChannelID=s.g.GuidEMpty,this.dialog.open(U.j,{data:{filter:n,Channel:this.channelOptions},width:"40%"}).afterClosed().pipe((0,M.h)(i=>s.g.IsNotEmpty(i))).subscribe(i=>{this.searchFilter.ChannelID=i.ChannelID,this.searchFilter.ScanFull=i.ScanFull,this.searchFilter.UpdatedProduct=i.UpdatedProduct,this.scanAllProduct()})}scanAllProduct(){let n=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);this.productService.scanAll(this.searchFilter.ChannelID,this.searchFilter.ScanFull,this.searchFilter.UpdatedProduct).pipe((0,M.h)(o=>o)).subscribe(o=>{this.productService.successToastrScanAllProduct(o,n,!this.searchFilter.UpdatedProduct),this.initPageLoader()})}onScanSingleProduct(n){n.Channel=this.productService.getChannelProduct(n);let o=JSON.parse(JSON.stringify(this.searchFilter));this.dialog.open(U.j,{data:{filter:o,Channel:this.channelOptions,isSingleChannel:!0},width:"40%"}).afterClosed().pipe((0,M.h)(i=>s.g.IsNotEmpty(i))).subscribe(i=>{this.searchFilter.ChannelID=i.ChannelID;const l=this.productService.getVariantCodesProduct(n);this.scanSingleProduct(l)})}onUploadToMultipleChannel(n){let o=this.productService.getChannelProduct(n);n.Channel=o;let i=this.productService.filterUnselectedChannel(n,this.channelOptions);this.dialog.open(Zt,{width:"700px",data:{title:`Upload ${n.Name}`,channels:i,products:[n]}}).afterClosed().subscribe(l=>{l&&this.getProducts()})}onScanSelectedProduct(){let n=this.productService.filterChannelByTypeId(this.channelOptions,[A.x.Tokopedia,A.x.Tiktok]);this.searchFilter.ChannelID=s.g.GuidEMpty;let o=JSON.parse(JSON.stringify(this.searchFilter));this.dialog.open(U.j,{data:{filter:o,Channel:n,isSingleChannel:!0,showScanUpdateType:!1,showScanType:!1},width:"40%"}).afterClosed().pipe((0,M.h)(l=>s.g.IsNotEmpty(l))).subscribe(l=>{this.searchFilter.ChannelID=l.ChannelID,this.searchFilter.ScanFull=l.ScanFull,this.searchFilter.UpdatedProduct=l.UpdatedProduct;let r=this.productService.selectedProduct(this.products),d=this.productService.getVariantCodesProducts(r);this.scanSingleProduct(d)})}scanSingleProduct(n){this.productService.scanSingle(this.searchFilter.ChannelID,n).subscribe({next:o=>{if(o)this.toastr.success("Successfully Scan ","Success");else{let i=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);this.toastr.error(`This product is not existed in ${i?.Name} `,"Error")}this.searchFilter.ChannelID=s.g.GuidEMpty,o&&this.getProducts()},error:o=>{this.searchFilter.ChannelID=s.g.GuidEMpty}})}getVariantCode(n){let o;return n.length>1&&(o=(n[0].model?n[0].model:"")+n[0].Code),1==n.length&&(o=n[0].Code),o}onClearFilterChannel(){this.searchFilter.ChannelID=s.g.GuidEMpty,this.searchFilter.Item_id=""}onUploadMultipleProductSingleChannel(){this.dialog.open(It,{width:"350px",data:{item:null,selectedItemMissingChannel:this.channelOptions}}).afterClosed().subscribe(n=>{n&&this.uploadMultipleProduct(n.channelID,n.categoryID)})}uploadMultipleProduct(n,o){const i=this.productService.selectedProduct(this.products);this.productService.uploadMultipleProduct(i,n,o).subscribe(l=>{this.getProducts();const r=this.productService.findChannelById(n,this.channelOptions);this.toastr.success(i.length>1?"Successfully uploaded "+i.length+" Product to channel "+r?.Name:r?.Name+" Successfully Created","Success")})}getRowCount(){this.http.post("/api/product/GetSoldInChannelRowCount",{ChannelID:this.searchFilter.ChannelID,text:this.searchFilter.text}).subscribe(o=>{this.hasClickRowCount=!0,this.rowCount=o.Total})}onNextPage(){this.searchFilter.PageNumber=this.searchFilter.PageNumber+1,this.getProducts()}onPreviousPage(){this.searchFilter.PageNumber=this.searchFilter.PageNumber-1,this.getProducts()}getChannelLogo(n){return s.g.getChannelLogoByTypeId(n)}}return e.\u0275fac=function(n){return new(n||e)(t.Y36(J.O),t.Y36(m.uw),t.Y36(W._W),t.Y36(R.M))},e.\u0275cmp=t.Xpm({type:e,selectors:[["app-sold-in-channel"]],decls:21,vars:9,consts:[["headerTitle","Sold in Channel","description","SKU has been mapped between dealpos and marketplace",3,"onSubmit"],["type","button","data-cy","scanSoldinChannel","class","btn btn-outline-secondary shadow rounded",3,"click",4,"ngIf"],["type","button","data-cy","scanInPos","class","btn btn-outline-secondary shadow rounded me-2",3,"click",4,"ngIf"],[1,"btn","btn-light","shadow","rounded","ms-2",3,"hidden","click"],["aria-hidden","true",1,"fa","fa-upload"],[1,"d-flex"],["container",""],["bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"clearable","items","ngModel","ngModelChange","clear"],["ng-option-tmp",""],[4,"ngIf"],[1,"container-fluid"],[1,"row","mt-8"],["class","col-12 col-md-6 col-xl-4 px-3 my-3",4,"ngFor","ngForOf"],["class","row",4,"ngIf"],["type","button","data-cy","scanSoldinChannel",1,"btn","btn-outline-secondary","shadow","rounded",3,"click"],[1,"fas","fa-lg","fa-crosshairs"],["type","button","data-cy","scanInPos",1,"btn","btn-outline-secondary","shadow","rounded","me-2",3,"click"],[1,"me-2"],["alt","",2,"width","18px",3,"src"],["type","text","name","Item_id","id","Item_id",1,"form-control",3,"ngModel","ngModelChange"],[1,"col-12","col-md-6","col-xl-4","px-3","my-3"],[3,"title","image","description","channels","code","showCheckBox","scanButton","uploadButton","imageForZoom","onUpload","onDescEvent","onScan","onCheckBoxChange"],[1,"row"],[1,"col-12"],[3,"filter","totaldata","paginationTotal","hasClicked","total","next","previous"]],template:function(n,o){1&n&&(t.TgZ(0,"mainpanel",0),t.NdJ("onSubmit",function(l){return o.searchProduct(l)}),t.TgZ(1,"actions"),t.YNc(2,Un,3,0,"button",1),t.YNc(3,Fn,3,1,"button",2),t.TgZ(4,"button",3),t.NdJ("click",function(){return o.onUploadMultipleProductSingleChannel()}),t._UZ(5,"i",4),t._uU(6," Upload Bulk "),t.qZA()(),t.TgZ(7,"filters")(8,"div",5)(9,"div",6)(10,"div")(11,"h6"),t._uU(12,"Channel"),t.qZA(),t.TgZ(13,"ng-select",7),t.NdJ("ngModelChange",function(l){return o.searchFilter.ChannelID=l})("clear",function(){return o.onClearFilterChannel()}),t.YNc(14,An,3,2,"ng-template",8),t.qZA()(),t.YNc(15,Dn,4,1,"div",9),t.qZA()()(),t.TgZ(16,"content")(17,"div",10)(18,"div",11),t.YNc(19,Jn,2,9,"div",12),t.qZA(),t.YNc(20,En,3,4,"div",13),t.qZA()()()),2&n&&(t.xp6(2),t.Q6J("ngIf",!o.productService.hasSelection(o.products)),t.xp6(1),t.Q6J("ngIf",o.productService.hasSelection(o.products)),t.xp6(1),t.Q6J("hidden",!o.productService.hasSelection(o.products)),t.xp6(9),t.Q6J("clearable",!0)("items",o.channelOptions)("ngModel",o.searchFilter.ChannelID==o.guidEmpty?null:o.searchFilter.ChannelID),t.xp6(2),t.Q6J("ngIf",o.searchFilter.ChannelID!=o.guidEmpty),t.xp6(4),t.Q6J("ngForOf",o.products),t.xp6(1),t.Q6J("ngIf",null==o.products?null:o.products.length))},dependencies:[c.sg,c.O5,v.Fj,v.JJ,v.On,Y.p,B.w9,B.ir,Pt,dt],styles:[".badge-pill[_ngcontent-%COMP%]{padding-bottom:16px!important}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]:checked + label[_ngcontent-%COMP%]{background:#dfeffc;border:1px solid #dfeffc}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{visibility:hidden;position:absolute;left:0;top:0}.rad-btn[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{border:1px solid #ddd;border-radius:3px;margin-right:10px;cursor:pointer;padding:10px;margin-bottom:10px;color:#000;width:80px;text-align:center}.modal-dialog[_ngcontent-%COMP%]{max-width:30%!important}.product[_ngcontent-%COMP%]{height:100%!important}.row[_ngcontent-%COMP%]{margin-left:0;margin-right:0}ul[_ngcontent-%COMP%]{list-style-type:none}.link[_ngcontent-%COMP%]{color:#0202ab;cursor:pointer}.px-1[_ngcontent-%COMP%]{padding-left:5px!important}.sku[_ngcontent-%COMP%]{color:#696969;font-style:italic}.badge-pill[_ngcontent-%COMP%]{height:16px}.itemTitle[_ngcontent-%COMP%]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.no-title[_ngcontent-%COMP%]{margin-top:.33em;margin-bottom:.33rem}.mb-upload[_ngcontent-%COMP%]{padding-bottom:.625rem}.my-1rem[_ngcontent-%COMP%]{margin-bottom:1rem!important;margin-top:1rem!important}.pr-rem[_ngcontent-%COMP%]{padding-right:.6rem}.text-larger[_ngcontent-%COMP%]{font-size:larger}.bg-lightpink[_ngcontent-%COMP%]{background-color:#f9dede}.bottom-buttons[_ngcontent-%COMP%]{margin-left:97px}@media (min-width: 1200px){.max-w-xl[_ngcontent-%COMP%]{max-width:205px}}"]}),e})();var Ln=u(8505),Qn=u(4004),Bn=u(7287);function Yn(e,a){if(1&e&&(t.ynx(0),t._UZ(1,"img",25),t.BQk()),2&e){const n=t.oxw(3).$implicit;t.xp6(1),t.Q6J("src",null==n?null:n.ImageUrl,t.LSH)}}function Vn(e,a){1&e&&t._UZ(0,"img",26)}function $n(e,a){if(1&e&&(t.ynx(0),t.TgZ(1,"td",18)(2,"div",19),t.YNc(3,Yn,2,1,"ng-container",20),t.YNc(4,Vn,1,0,"ng-template",null,21,t.W1O),t.qZA()(),t.TgZ(6,"td",22)(7,"h4",23)(8,"span",24),t._uU(9),t.qZA()()(),t.BQk()),2&e){const n=t.MAs(5),o=t.oxw(2).$implicit;t.xp6(1),t.Q6J("rowSpan",null==o?null:o.Variants.length),t.xp6(2),t.Q6J("ngIf",null==o?null:o.ImageUrl)("ngIfElse",n),t.xp6(3),t.Q6J("rowSpan",null==o?null:o.Variants.length),t.xp6(2),t.Q6J("matTooltip",(null==o||null==o.Name?null:o.Name.length)>50?null==o?null:o.Name:""),t.xp6(1),t.Oqu(null==o?null:o.Name)}}function Hn(e,a){if(1&e&&(t.TgZ(0,"div")(1,"a",27),t._UZ(2,"img",28),t.qZA()()),2&e){const n=a.$implicit;t.xp6(1),t.Q6J("href",n.URL,t.LSH),t.xp6(1),t.Q6J("src",n.Img,t.LSH)("matTooltip",n.Name)}}function Rn(e,a){if(1&e&&(t.TgZ(0,"div"),t._UZ(1,"img",28),t.qZA()),2&e){const n=a.$implicit;t.xp6(1),t.Q6J("src",n.Img,t.LSH)("matTooltip",n.Name)}}function Gn(e,a){if(1&e&&(t.TgZ(0,"tr"),t.YNc(1,$n,10,6,"ng-container",13),t.TgZ(2,"td"),t._uU(3),t.qZA(),t.TgZ(4,"td"),t._uU(5),t.qZA(),t.TgZ(6,"td",16)(7,"div",17),t.YNc(8,Hn,3,3,"div",15),t.qZA()(),t.TgZ(9,"td",16)(10,"div",17),t.YNc(11,Rn,2,2,"div",15),t.qZA()()()),2&e){const n=a.$implicit,o=a.index;t.xp6(1),t.Q6J("ngIf",0==o),t.xp6(2),t.hij(" ",n.Name," "),t.xp6(2),t.hij(" ",n.Code," "),t.xp6(3),t.Q6J("ngForOf",null==n?null:n.Available),t.xp6(3),t.Q6J("ngForOf",null==n?null:n.NotAvailable)}}function Kn(e,a){if(1&e&&(t.ynx(0),t.YNc(1,Gn,12,5,"tr",15),t.BQk()),2&e){const n=a.$implicit;t.xp6(1),t.Q6J("ngForOf",n.Variants)}}function jn(e,a){if(1&e&&(t.TgZ(0,"tbody"),t.YNc(1,Kn,2,1,"ng-container",15),t.qZA()),2&e){const n=a.ngIf;t.xp6(1),t.Q6J("ngForOf",n)}}function zn(e,a){if(1&e){const n=t.EpF();t.TgZ(0,"span",36),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(3);return t.KtG(i.getRowCount())}),t.TgZ(1,"i",37),t._uU(2,"?"),t.qZA()()}}function Wn(e,a){if(1&e&&(t.TgZ(0,"span"),t._uU(1),t.ALo(2,"number"),t.qZA()),2&e){const n=a.ngIf;t.xp6(1),t.Oqu(t.lcZ(2,1,null==n?null:n.Count))}}function Xn(e,a){if(1&e){const n=t.EpF();t.TgZ(0,"a",38),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(3);return t.KtG(i.onNextPage())}),t._UZ(1,"i",39),t._uU(2," Next"),t.qZA()}}function te(e,a){if(1&e){const n=t.EpF();t.TgZ(0,"a",40),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(3);return t.KtG(i.onLastPage())}),t._UZ(1,"i",41),t._uU(2," Last"),t.qZA()}}function ne(e,a){if(1&e&&(t.TgZ(0,"div",29)(1,"div",30)(2,"div",31),t._uU(3),t.ALo(4,"number"),t.YNc(5,zn,3,0,"span",32),t.YNc(6,Wn,3,3,"span",13),t.ALo(7,"async"),t._uU(8),t.qZA()(),t.TgZ(9,"div",33),t.YNc(10,Xn,3,0,"a",34),t.YNc(11,te,3,0,"a",35),t.qZA()()),2&e){const n=a.ngIf,o=t.oxw(2);t.xp6(3),t.hij(" Showing 1 - ",t.lcZ(4,6,null==n?null:n.length)," of "),t.xp6(2),t.Q6J("ngIf",o.paginationService.hideCount),t.xp6(1),t.Q6J("ngIf",!o.paginationService.hideCount&&t.lcZ(7,8,o.rowCount$)),t.xp6(2),t.hij(" records ~ ",o.paginationService.footerPageNumber," Page "),t.xp6(2),t.Q6J("ngIf",o.paginationService.disableNextButton&&!o.paginationService.goToLastPage),t.xp6(1),t.Q6J("ngIf",o.paginationService.disableNextButton&&!o.paginationService.goToLastPage)}}function ee(e,a){if(1&e){const n=t.EpF();t.TgZ(0,"mainpanel",1),t.NdJ("onSubmit",function(i){t.CHM(n);const l=t.oxw();return t.KtG(l.searchProduct(i))}),t.TgZ(1,"actions")(2,"button",2),t.NdJ("click",function(){const l=t.CHM(n).ngIf,r=t.oxw();return t.KtG(r.openScanDialog(l))}),t._UZ(3,"i",3),t._uU(4," Scan Channel "),t.qZA()(),t.TgZ(5,"content")(6,"div",4)(7,"div",5)(8,"div",6)(9,"table",7)(10,"thead",8)(11,"tr")(12,"th",9),t._uU(13,"Product"),t.qZA(),t.TgZ(14,"th",10),t._uU(15,"Variant"),t.qZA(),t.TgZ(16,"th",10),t._uU(17,"SKU"),t.qZA(),t.TgZ(18,"th",11),t._uU(19,"Available In"),t.qZA(),t.TgZ(20,"th",12),t._uU(21,"Not Available In"),t.qZA()()(),t.YNc(22,jn,2,1,"tbody",13),t.ALo(23,"async"),t.qZA()()(),t.YNc(24,ne,12,10,"div",14),t.ALo(25,"async"),t.qZA()()()}if(2&e){const n=t.oxw();t.Q6J("hideSearchDropdown",!0),t.xp6(22),t.Q6J("ngIf",t.lcZ(23,3,n.data$)),t.xp6(2),t.Q6J("ngIf",t.lcZ(25,5,n.data$))}}let oe=(()=>{class e{constructor(n,o,i,l,r){this.http=n,this.dialog=o,this.toastr=i,this.productService=l,this.paginationService=r,this.loaderAPI="product/Load",this.rowCountAPI="product/GetNotInChannelRowCount",this.notChannelAPI="product/GetNotInChannelV2"}ngOnInit(){this.initPageLoader(),this.iniData()}initPageLoader(){this.paginationService.fetchDataEndpoint=this.notChannelAPI,this.loader$=this.http.post(`api/${this.loaderAPI}`,{}).pipe((0,Ln.b)(n=>{this.filterSearch=n.Filter,this.paginationService.resetToFirstPage(n.Filter)}))}iniData(){this.data$=this.paginationService.data$.pipe((0,Qn.U)(n=>n.map(o=>(o.Variants=o.Variants.map(i=>(i.Available=this.productService.sortChannel(i.Available),i.NotAvailable=this.productService.sortChannel(i.NotAvailable),i.Available=this.assignLogoChannel(i.Available),i.NotAvailable=this.assignLogoChannel(i.NotAvailable),i)),o))))}assignLogoChannel(n){return n.map(o=>(o.Img=s.g.getChannelLogoByTypeId(o.TypeID),o))}searchProduct(n){this.filterSearch.text=n,this.paginationService.resetToFirstPage(this.filterSearch)}scanAllProduct(n){let o=this.productService.findChannelById(this.filterSearch.ChannelID,n.Options.Channel);this.productService.scanAll(this.filterSearch.ChannelID,this.filterSearch.ScanFull,this.filterSearch.UpdatedProduct).subscribe(i=>{this.productService.successToastrScanAllProduct(i,o,!this.filterSearch.UpdatedProduct),this.initPageLoader()})}openScanDialog(n){let o=JSON.parse(JSON.stringify(this.filterSearch));o.ChannelID=s.g.GuidEMpty,this.dialog.open(U.j,{data:{filter:o,Channel:n.Options.Channel},width:"40%"}).afterClosed().pipe((0,M.h)(l=>s.g.IsNotEmpty(l))).subscribe(l=>{this.filterSearch.ChannelID=l.ChannelID,this.filterSearch.ScanFull=l.ScanFull,this.filterSearch.UpdatedProduct=l.UpdatedProduct,this.scanAllProduct(n)})}getChannelLogoById(n){return s.g.getChannelLogoByTypeId(n)}uploadProductToSingleChannel(n,o,i,l){let r=this.productService.findChannelById(o,l.Options.Channel);this.productService.uploadMultipleProduct([n],o,i).subscribe(d=>{this.paginationService.resetToFirstPage(l.Filter),this.toastr.success("Successfully uploaded "+n.Name+" to "+r.Name,"Success")})}getRowCount(){this.paginationService.hideCount=!1,this.rowCount$=this.http.post(`/api/${this.rowCountAPI}`,this.filterSearch)}onNextPage(){this.paginationService.onNextPage(this.filterSearch)}onLastPage(){this.http.post(`/api/${this.rowCountAPI}`,{}).subscribe({next:n=>{this.filterSearch.PageNumber=1,this.paginationService.getAllData(this.filterSearch,n.Count)}})}ngOnDestroy(){this.paginationService.destroy()}}return e.\u0275fac=function(n){return new(n||e)(t.Y36(J.O),t.Y36(m.uw),t.Y36(W._W),t.Y36(R.M),t.Y36(Bn.b))},e.\u0275cmp=t.Xpm({type:e,selectors:[["app-not-in-channel"]],decls:2,vars:3,consts:[["headerTitle","Not in Channel","description","SKU has not been sold on one of channels",3,"hideSearchDropdown","onSubmit",4,"ngIf"],["headerTitle","Not in Channel","description","SKU has not been sold on one of channels",3,"hideSearchDropdown","onSubmit"],["data-cy","scanNotinChannel","type","button",1,"btn","btn-outline-secondary","shadow","rounded",3,"click"],[1,"fas","fa-lg","fa-crosshairs"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table","border-bottom"],[1,"thead-light","sticky-top-thead"],["colspan","2",1,"ms-5","text-center",2,"width","450px"],[2,"width","150px"],[2,"width","20%"],[2,"width","16%"],[4,"ngIf"],["class","d-flex justify-content-between mt-5",4,"ngIf"],[4,"ngFor","ngForOf"],[2,"padding-left","0px"],[1,"d-flex","flex-wrap","mb-1"],[1,"text-center",3,"rowSpan"],[2,"padding-right","0px"],[4,"ngIf","ngIfElse"],["elsePic",""],[1,"text-start",3,"rowSpan"],[1,"ms-5","d-inline","fw-normal","itemTitle"],[3,"matTooltip"],[1,"border","rounded",2,"max-width","40px",3,"src"],["src","//res.cloudinary.com/pos/image/upload/w_40/POS/Images/Icon/products_thumb.png",1,"border","rounded",2,"max-width","40px"],["target","_blank",3,"href"],["alt","",1,"channel-logo","cursor-pointer","ms-4","mt-3",3,"src","matTooltip"],[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"],[2,"cursor","pointer",3,"click"],["title","Retreive rows count",1,"border","p-3"],["role","button","title","Load more for 20 products",1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"click"],[1,"fas","fa-arrow-right"],["role","button","title","Load all products",1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"click"],[1,"fas","fa-share"]],template:function(n,o){1&n&&(t.YNc(0,ee,26,7,"mainpanel",0),t.ALo(1,"async")),2&n&&t.Q6J("ngIf",t.lcZ(1,1,o.loader$))},dependencies:[c.sg,c.O5,F.gM,Y.p,c.Ov,c.JJ],styles:[".badge-pill[_ngcontent-%COMP%]{padding-bottom:16px!important}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]:checked + label[_ngcontent-%COMP%]{background:#dfeffc;border:1px solid #dfeffc}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{visibility:hidden;position:absolute;left:0;top:0}.rad-btn[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{border:1px solid #ddd;border-radius:3px;margin-right:10px;cursor:pointer;padding:10px;margin-bottom:10px;color:#000;width:80px;text-align:center}.modal-dialog[_ngcontent-%COMP%]{max-width:30%!important}.product[_ngcontent-%COMP%]{height:100%!important}.row[_ngcontent-%COMP%]{margin-left:0;margin-right:0}ul[_ngcontent-%COMP%]{list-style-type:none}.link[_ngcontent-%COMP%]{color:#0202ab;cursor:pointer}.px-1[_ngcontent-%COMP%]{padding-left:5px!important}.sku[_ngcontent-%COMP%]{color:#696969;font-style:italic}.badge-pill[_ngcontent-%COMP%]{height:16px}.itemTitle[_ngcontent-%COMP%]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.no-title[_ngcontent-%COMP%]{margin-top:.33em;margin-bottom:.33rem}.mb-upload[_ngcontent-%COMP%]{padding-bottom:.625rem}.my-1rem[_ngcontent-%COMP%]{margin-bottom:1rem!important;margin-top:1rem!important}.pr-rem[_ngcontent-%COMP%]{padding-right:.6rem}.text-larger[_ngcontent-%COMP%]{font-size:larger}.bg-lightpink[_ngcontent-%COMP%]{background-color:#f9dede}.bottom-buttons[_ngcontent-%COMP%]{margin-left:97px}@media (min-width: 1200px){.max-w-xl[_ngcontent-%COMP%]{max-width:205px}}thead[_ngcontent-%COMP%]{position:sticky;top:0}.channel-logo[_ngcontent-%COMP%]{width:20px}.itemTitle[_ngcontent-%COMP%]{max-width:26vw;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.w-img[_ngcontent-%COMP%]{width:100%}"]}),e})();function ie(e,a){if(1&e&&(t.TgZ(0,"tr")(1,"td"),t._uU(2),t.qZA(),t.TgZ(3,"td"),t._uU(4),t.qZA()()),2&e){const n=a.$implicit;t.xp6(2),t.Oqu(null==n?null:n.Name),t.xp6(2),t.Oqu(null==n?null:n.ChannelVariationSKU)}}let ae=(()=>{class e{constructor(n){this.data=n}}return e.\u0275fac=function(n){return new(n||e)(t.Y36(m.WI))},e.\u0275cmp=t.Xpm({type:e,selectors:[["app-modal-variants"]],decls:13,vars:2,consts:[["mat-dialog-title","",1,"pt-2","pb-3","text-center","fw-normal"],[1,"pb-5","mx-0","pt-2","px-10","d-flex","justify-content-center"],[1,"table"],[1,"thead-light"],[4,"ngFor","ngForOf"]],template:function(n,o){1&n&&(t.TgZ(0,"h1",0),t._uU(1),t.qZA(),t._UZ(2,"hr"),t.TgZ(3,"mat-dialog-content",1)(4,"table",2)(5,"thead",3)(6,"tr")(7,"th"),t._uU(8,"Variant"),t.qZA(),t.TgZ(9,"th"),t._uU(10,"SKU"),t.qZA()()(),t.TgZ(11,"tbody"),t.YNc(12,ie,5,2,"tr",4),t.qZA()()()),2&n&&(t.xp6(1),t.Oqu(null==o.data?null:o.data.title),t.xp6(11),t.Q6J("ngForOf",o.data.variants))},dependencies:[c.sg],styles:[".mat-dialog-title[_ngcontent-%COMP%]{margin-bottom:0%;margin-left:24px}"]}),e})();function le(e,a){if(1&e){const n=t.EpF();t.TgZ(0,"button",11),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.openScanDialog())}),t._UZ(1,"i",12),t._uU(2," Scan Channel "),t.qZA()}}function re(e,a){if(1&e){const n=t.EpF();t.ynx(0),t.TgZ(1,"button",13),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.onDownloadAllProduct("SELECTED"))}),t._UZ(2,"i",14),t._uU(3),t.qZA(),t.BQk()}if(2&e){const n=t.oxw();let o;t.xp6(3),t.hij(" Download Product (",null==(o=n.productService.selectedProduct(n.products))?null:o.length,") ")}}function ce(e,a){if(1&e&&(t.TgZ(0,"span",15),t._UZ(1,"img",16),t.qZA(),t._uU(2)),2&e){const n=a.item,o=t.oxw();t.xp6(1),t.Q6J("src",o.getChannelLogo(n.TypeID),t.LSH),t.xp6(1),t.hij(" ",n.Name," ")}}const se=function(e){return[e]},de=function(){return[]};function pe(e,a){if(1&e){const n=t.EpF();t.TgZ(0,"div",17)(1,"app-product-card",18),t.NdJ("onCheckBoxChange",function(i){const r=t.CHM(n).index,d=t.oxw();return t.KtG(d.onSelectProduct(i,r))})("onDescEvent",function(){const l=t.CHM(n).index,r=t.oxw();return t.KtG(r.onShowVariantDetail(l))})("onDownload",function(){const l=t.CHM(n).$implicit,r=t.oxw();return t.KtG(r.onDownloadProduct(l))}),t.qZA()()}if(2&e){const n=a.$implicit;t.xp6(1),t.Q6J("title",null==n?null:n.Name)("image",null==n?null:n.Image)("code",0==(null==n||null==n.Variant?null:n.Variant.length)?null==n?null:n.ChannelItemSKU:null)("description",(null==n||null==n.Variant?null:n.Variant.length)>0?(null==n||null==n.Variant?null:n.Variant.length)+" Variants":null)("downloadButton",!0)("channels",null!=n&&n.Channel?t.VKq(7,se,null==n?null:n.Channel):t.DdM(9,de))("showCheckBox",!0)}}function ue(e,a){if(1&e){const n=t.EpF();t.TgZ(0,"div",19)(1,"div",20)(2,"app-custom-paginator",21),t.NdJ("total",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.getRowCount())})("next",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.onNextPage())})("previous",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.onPreviousPage())}),t.qZA()()()}if(2&e){const n=t.oxw();t.xp6(2),t.Q6J("filter",n.searchFilter)("totaldata",null==n.products?null:n.products.length)("paginationTotal",n.rowCount)("hasClicked",n.hasClickRowCount)}}let he=(()=>{class e{constructor(n,o,i){this.http=n,this.dialog=o,this.productService=i,this.searchFilter=new z,this.hasClickRowCount=!1}ngOnInit(){this.initPageLoader()}initPageLoader(){this.productService.loader().subscribe(n=>{this.channelOptions=n.Options.Channel,this.searchFilter=n.Filter,this.searchFilter.PageSize=n.Filter.RowCount,this.getProducts()})}getProducts(){this.http.post("/api/product/GetProductChannelNotPOS",this.searchFilter).subscribe(n=>{this.products=n.Data,this.mapChannelToProduct()})}mapChannelToProduct(){this.products=this.products.map(n=>(n.Channel=this.channelOptions.find(o=>o.ID==n.ChannelID),n.Channel&&(n.Channel.Url=n.Url),n))}onSearch(n){this.searchFilter.text=n,this.hasClickRowCount=!1,this.getProducts()}onClearChannelFilter(){this.searchFilter.ChannelID=s.g.GuidEMpty}onScanAll(){let n=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);this.productService.scanAll(this.searchFilter.ChannelID,this.searchFilter.ScanFull,this.searchFilter.UpdatedProduct).subscribe(o=>{this.searchFilter.ChannelID=s.g.GuidEMpty,this.productService.successToastrScanAllProduct(o,n,!this.searchFilter.UpdatedProduct),this.initPageLoader()})}openScanDialog(){let n=JSON.parse(JSON.stringify(this.searchFilter));n.ChannelID=s.g.GuidEMpty,this.dialog.open(U.j,{data:{filter:n,Channel:this.channelOptions},width:"40%"}).afterClosed().pipe((0,M.h)(i=>s.g.IsNotEmpty(i))).subscribe(i=>{this.searchFilter.ChannelID=i.ChannelID,this.searchFilter.UpdatedProduct=i.UpdatedProduct,this.searchFilter.ScanFull=i.ScanFull,this.onScanAll()})}onDownloadAllProduct(n){let o;o="ALL"==n?this.products:this.productService.selectedProduct(this.products),o.length>0&&this.productService.downloadMultipleProduct(o).subscribe({next:()=>{this.getProducts()}})}onSelectProduct(n,o){this.products[o].selected=n}onDownloadProduct(n){!confirm(`Are you sure you want to Retrieve product ${n?.Name} from ${n?.Channel.Name} to POS?`)||this.productService.downloadProduct(n).subscribe({next:()=>{this.getProducts()}})}onShowVariantDetail(n){let o=this.products[n].Variant;o.length>0&&this.dialog.open(ae,{data:{title:this.products[n].Name,variants:o},width:"30%"})}getRowCount(){this.http.post("/api/product/GetProductChannelNotPOSRowCount",{ChannelID:this.searchFilter.ChannelID,text:this.searchFilter.text}).subscribe(o=>{this.hasClickRowCount=!0,this.rowCount=o.Count})}onNextPage(){this.searchFilter.PageNumber=this.searchFilter.PageNumber+1,this.getProducts()}onPreviousPage(){this.searchFilter.PageNumber=this.searchFilter.PageNumber-1,this.getProducts()}getChannelLogo(n){return s.g.getChannelLogoByTypeId(n)}}return e.\u0275fac=function(n){return new(n||e)(t.Y36(J.O),t.Y36(m.uw),t.Y36(R.M))},e.\u0275cmp=t.Xpm({type:e,selectors:[["app-not-in-pos"]],decls:17,vars:7,consts:[["headerTitle","Not in POS","textButton","Search","description","SKU sold in Marketplace but not exist in DEALPOS",3,"onSubmit"],["type","button","data-cy","scanNotInPos","class","btn btn-outline-secondary shadow rounded",3,"click",4,"ngIf"],[4,"ngIf"],[1,"d-flex"],["container",""],["bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"clearable","items","ngModel","ngModelChange","clear"],["ng-option-tmp",""],[1,"container-fluid","mt-3"],[1,"row","mt-8"],["class","col-12 col-md-6 col-xl-4 px-3 my-3",4,"ngFor","ngForOf"],["class","row",4,"ngIf"],["type","button","data-cy","scanNotInPos",1,"btn","btn-outline-secondary","shadow","rounded",3,"click"],[1,"fas","fa-lg","fa-crosshairs"],["type","button",1,"btn","btn-success","shadow-sm","rounded","ms-3",3,"click"],[1,"fa","fa-download"],[1,"me-2"],["alt","",2,"width","18px",3,"src"],[1,"col-12","col-md-6","col-xl-4","px-3","my-3"],[3,"title","image","code","description","downloadButton","channels","showCheckBox","onCheckBoxChange","onDescEvent","onDownload"],[1,"row"],[1,"col-12"],[3,"filter","totaldata","paginationTotal","hasClicked","total","next","previous"]],template:function(n,o){1&n&&(t.TgZ(0,"mainpanel",0),t.NdJ("onSubmit",function(l){return o.onSearch(l)}),t.TgZ(1,"actions"),t.YNc(2,le,3,0,"button",1),t.YNc(3,re,4,1,"ng-container",2),t.qZA(),t.TgZ(4,"filters")(5,"div",3)(6,"div",4)(7,"div")(8,"h6"),t._uU(9,"Channel"),t.qZA(),t.TgZ(10,"ng-select",5),t.NdJ("ngModelChange",function(l){return o.searchFilter.ChannelID=l})("clear",function(){return o.onClearChannelFilter()}),t.YNc(11,ce,3,2,"ng-template",6),t.qZA()()()()(),t.TgZ(12,"content")(13,"div",7)(14,"div",8),t.YNc(15,pe,2,10,"div",9),t.qZA(),t.YNc(16,ue,3,4,"div",10),t.qZA()()()),2&n&&(t.xp6(2),t.Q6J("ngIf",!o.productService.hasSelection(o.products)),t.xp6(1),t.Q6J("ngIf",o.productService.hasSelection(o.products)),t.xp6(7),t.Q6J("clearable",!0)("items",o.channelOptions)("ngModel",o.searchFilter.ChannelID),t.xp6(5),t.Q6J("ngForOf",o.products),t.xp6(1),t.Q6J("ngIf",(null==o.products?null:o.products.length)>0))},dependencies:[c.sg,c.O5,v.JJ,v.On,Y.p,B.w9,B.ir,Pt,dt],styles:[".badge-pill[_ngcontent-%COMP%]{padding-bottom:16px!important}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]:checked + label[_ngcontent-%COMP%]{background:#dfeffc;border:1px solid #dfeffc}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{visibility:hidden;position:absolute;left:0;top:0}.rad-btn[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{border:1px solid #ddd;border-radius:3px;margin-right:10px;cursor:pointer;padding:10px;margin-bottom:10px;color:#000;width:80px;text-align:center}.modal-dialog[_ngcontent-%COMP%]{max-width:30%!important}.product[_ngcontent-%COMP%]{height:100%!important}.row[_ngcontent-%COMP%]{margin-left:0;margin-right:0}ul[_ngcontent-%COMP%]{list-style-type:none}.link[_ngcontent-%COMP%]{color:#0202ab;cursor:pointer}.px-1[_ngcontent-%COMP%]{padding-left:5px!important}.sku[_ngcontent-%COMP%]{color:#696969;font-style:italic}.badge-pill[_ngcontent-%COMP%]{height:16px}.itemTitle[_ngcontent-%COMP%]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.no-title[_ngcontent-%COMP%]{margin-top:.33em;margin-bottom:.33rem}.mb-upload[_ngcontent-%COMP%]{padding-bottom:.625rem}.my-1rem[_ngcontent-%COMP%]{margin-bottom:1rem!important;margin-top:1rem!important}.pr-rem[_ngcontent-%COMP%]{padding-right:.6rem}.text-larger[_ngcontent-%COMP%]{font-size:larger}.bg-lightpink[_ngcontent-%COMP%]{background-color:#f9dede}.bottom-buttons[_ngcontent-%COMP%]{margin-left:97px}@media (min-width: 1200px){.max-w-xl[_ngcontent-%COMP%]{max-width:205px}}.itemTitle[_ngcontent-%COMP%]{cursor:pointer}"]}),e})();function ge(e,a){if(1&e&&(t.ynx(0),t._UZ(1,"img",14),t.BQk()),2&e){const n=t.oxw();t.xp6(1),t.Q6J("src",n.image,t.LSH)}}function me(e,a){1&e&&t._UZ(0,"img",15)}function _e(e,a){if(1&e&&(t.TgZ(0,"div",16),t._UZ(1,"i",17),t.TgZ(2,"span"),t._uU(3),t.qZA()()),2&e){const n=t.oxw();t.xp6(3),t.Oqu(n.code)}}const Ce=function(e){return{"border-bottom":e}};function fe(e,a){if(1&e&&(t.ynx(0),t.TgZ(1,"div",28)(2,"div",29),t._uU(3),t.qZA(),t.TgZ(4,"div")(5,"a",30),t._UZ(6,"i",31),t.qZA()()(),t.BQk()),2&e){const n=a.$implicit,o=a.index,i=t.oxw().$implicit;t.xp6(1),t.Q6J("ngClass",t.VKq(3,Ce,o!==(null==i?null:i.Map.length)-1)),t.xp6(2),t.hij(" ",n.Name," "),t.xp6(2),t.Q6J("href",n.URL,t.LSH)}}const xe=function(e){return{"border-bottom-0":e}};function be(e,a){if(1&e&&(t.TgZ(0,"div",18)(1,"h2",19)(2,"button",20)(3,"div",21),t._UZ(4,"img",22),t.TgZ(5,"span",23),t._uU(6),t.qZA(),t.TgZ(7,"span",24)(8,"h4"),t._uU(9),t.qZA()()()()(),t.TgZ(10,"div",25)(11,"div",26),t.YNc(12,fe,7,5,"ng-container",27),t.qZA()()()),2&e){const n=a.$implicit,o=a.index,i=t.oxw();t.Q6J("ngClass",t.VKq(11,xe,i.channels.length-1==o)),t.xp6(1),t.Q6J("id","heading"+o+i.code),t.xp6(1),t.uIk("data-bs-target","#collapse"+o+i.code)("aria-controls","#collapse"+o+i.code),t.xp6(2),t.Q6J("src",i.getChannelLogo(n.TypeID),t.LSH),t.xp6(1),t.Q6J("matTooltip",(null==n||null==n.Name?null:n.Name.length)>30?n.Name:""),t.xp6(1),t.Oqu(n.Name),t.xp6(3),t.hij("- ",n.Map.length," Listing"),t.xp6(1),t.Q6J("id","collapse"+o+i.code),t.uIk("aria-labelledby","heading"+o+i.code),t.xp6(2),t.Q6J("ngForOf",n.Map)}}let Pe=(()=>{class e{getChannelLogo(n){return s.g.getChannelLogoByTypeId(n)}}return e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=t.Xpm({type:e,selectors:[["app-duplicate-product-card"]],inputs:{image:"image",title:"title",code:"code",channels:"channels"},decls:16,vars:5,consts:[[1,"card"],[1,"card-body","py-6"],[1,"row"],[1,"col-4"],[1,"productUpload_defaultSize","me-2","image-upload"],[1,"imgContainer"],[4,"ngIf","ngIfElse"],["elsePic",""],[1,"col-8","d-inline-block","justify-content-between","gx-0",2,"padding-left","0px"],[1,"itemTitle"],["class","description",4,"ngIf"],[1,"card-footer",2,"padding-left","0px","padding-right","0px"],["id","accordionParent",1,"accordion","accordion-flush"],["class","accordion-item border-start-0 border-end-0",3,"ngClass",4,"ngFor","ngForOf"],[1,"rounded","imgUpload","float-left",3,"src"],["src","//res.cloudinary.com/pos/image/upload/w_110/POS/Images/Icon/products_thumb.png",1,"rounded","float-left","imgUpload"],[1,"description"],[1,"fa","fa-barcode","me-2"],[1,"accordion-item","border-start-0","border-end-0",3,"ngClass"],[1,"accordion-header",3,"id"],["type","button","data-bs-toggle","collapse","aria-expanded","true",1,"accordion-button","collapsed",2,"height","40px"],[1,"d-flex","align-items-center","justify-content-start","w-100"],["alt","",1,"channel-logo",3,"src"],[1,"fs-4","ps-4","text-ellipsis",2,"max-width","13vw",3,"matTooltip"],[1,"ps-2"],["data-bs-parent","#accordionParent",1,"accordion-collapse","collapse",3,"id"],[1,"accordion-body",2,"padding-top","0px","padding-bottom","0px"],[4,"ngFor","ngForOf"],[1,"d-flex","justify-content-between","align-items-center","py-4",3,"ngClass"],[1,"text-ellipsis"],["target","_blank",1,"text-secondary",3,"href"],[1,"fa","fa-external-link-alt"]],template:function(n,o){if(1&n&&(t.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4)(5,"div",5),t.YNc(6,ge,2,1,"ng-container",6),t.YNc(7,me,1,0,"ng-template",null,7,t.W1O),t.qZA()()(),t.TgZ(9,"div",8)(10,"h4",9),t._uU(11),t.qZA(),t.YNc(12,_e,4,1,"div",10),t.qZA()()(),t.TgZ(13,"div",11)(14,"div",12),t.YNc(15,be,13,13,"div",13),t.qZA()()()),2&n){const i=t.MAs(8);t.xp6(6),t.Q6J("ngIf",o.image)("ngIfElse",i),t.xp6(5),t.hij(" ",o.title," "),t.xp6(1),t.Q6J("ngIf",o.code),t.xp6(3),t.Q6J("ngForOf",o.channels)}},dependencies:[c.mk,c.sg,c.O5,F.gM],styles:[".productUpload_defaultSize[_ngcontent-%COMP%]{max-width:100px!important;max-height:100px!important;width:auto!important;height:auto!important}.image-upload[_ngcontent-%COMP%]{position:relative}.imgContainer[_ngcontent-%COMP%]{width:100%;height:100px}.imgUpload[_ngcontent-%COMP%]{width:100%;height:100%;object-fit:scale-down}.channel-logo[_ngcontent-%COMP%]{width:18px;height:18px}.accordion-button[_ngcontent-%COMP%]{background-color:#ededed69!important}.accordion-button[_ngcontent-%COMP%]:not(.collapsed){background-color:#ededed69!important;color:#333}.accordion-button[_ngcontent-%COMP%]:after{background-image:url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23333333'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e\")}.accordion-button[_ngcontent-%COMP%]:focus{box-shadow:none!important}.card[_ngcontent-%COMP%]{margin-bottom:0!important}"]}),e})();function Te(e,a){if(1&e&&(t.TgZ(0,"span",9),t._UZ(1,"img",10),t.qZA(),t._uU(2)),2&e){const n=a.item,o=t.oxw();t.xp6(1),t.Q6J("src",o.getChannelLogo(n.TypeID),t.LSH),t.xp6(1),t.hij(" ",n.Name," ")}}function ve(e,a){if(1&e&&(t.TgZ(0,"div",12),t._UZ(1,"app-duplicate-product-card",13),t.qZA()),2&e){const n=a.$implicit;t.xp6(1),t.Q6J("title",n.Name)("code",n.Code)("image",n.ThumbnailURL)("channels",n.Channel)}}function Se(e,a){if(1&e&&(t.ynx(0),t.YNc(1,ve,2,4,"div",11),t.BQk()),2&e){const n=t.oxw();t.xp6(1),t.Q6J("ngForOf",n.products)}}function ye(e,a){1&e&&(t.TgZ(0,"div",14)(1,"div"),t._UZ(2,"i",15),t.qZA(),t.TgZ(3,"h4",16),t._uU(4,"No product found"),t.qZA(),t.TgZ(5,"h6",17),t._uU(6,"Once you have a duplicate product"),t.qZA(),t.TgZ(7,"h6",18),t._uU(8,"you`ll see them here"),t.qZA()())}function we(e,a){if(1&e){const n=t.EpF();t.ynx(0),t.TgZ(1,"div",19)(2,"div",20)(3,"app-custom-paginator",21),t.NdJ("next",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.onNextPage())})("previous",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.onPrevPage())})("total",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.getRowCount())}),t.qZA()()(),t.BQk()}if(2&e){const n=t.oxw();t.xp6(3),t.Q6J("filter",n.searchFilter)("totaldata",null==n.products?null:n.products.length)("paginationTotal",n.rowCount)("hasClicked",n.hasClickedRowCount)}}let Ie=(()=>{class e{constructor(n){this.httpService=n,this.searchFilter=new z,this.products=[],this.hasClickedRowCount=!1,this.getPageLoader()}getPageLoader(){this.httpService.post("/api/product/Load",{}).subscribe(n=>{this.searchFilter=n.Filter,this.searchFilter.PageSize=n.Filter.RowCount,this.channelOptions=n.Options.Channel,this.getProducts()})}getProducts(){this.httpService.post("/api/product/GetDuplicateInChannel",{ChannelID:this.searchFilter.ChannelID,RowCount:this.searchFilter.RowCount,PageNumber:this.searchFilter.PageNumber,text:this.searchFilter.text}).subscribe(o=>{this.products=o.Data})}onSearch(n){this.searchFilter.text=n,this.hasClickedRowCount=!1,this.getProducts()}onClearFilter(){this.searchFilter.ChannelID=s.g.GuidEMpty}getChannelLogo(n){return s.g.getChannelLogoByTypeId(n)}onNextPage(){this.searchFilter.PageNumber=this.searchFilter.PageNumber+1,this.getProducts()}onPrevPage(){this.searchFilter.PageNumber=this.searchFilter.PageNumber-1,this.getProducts()}getRowCount(){this.httpService.post("/api/product/GetDuplicateInChannelRowCount",{text:this.searchFilter.text,ChannelID:this.searchFilter.ChannelID}).subscribe(o=>{this.hasClickedRowCount=!0,this.rowCount=o.Total})}}return e.\u0275fac=function(n){return new(n||e)(t.Y36(J.O))},e.\u0275cmp=t.Xpm({type:e,selectors:[["app-duplicate-sku"]],decls:15,vars:6,consts:[["headerTitle","Duplicate Sku","textButton"," Search","description","SKU has more than one different product name",3,"onSubmit"],["container",""],["bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"clearable","items","ngModel","ngModelChange","clear"],["ng-option-tmp",""],[1,"container-fluid"],[1,"row","mt-8","mx-1"],[4,"ngIf","ngIfElse"],["EMPTY",""],[4,"ngIf"],[1,"me-2"],["alt","",2,"width","18px",3,"src"],["class","col-12 col-md-6 col-xl-4 px-3 my-3",4,"ngFor","ngForOf"],[1,"col-12","col-md-6","col-xl-4","px-3","my-3"],[3,"title","code","image","channels"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"far","fa-file","text-secondary",2,"font-size","95px"],[1,"text-secondary","mt-6"],[1,"text-secondary","fw-normal","m-2"],[1,"text-secondary","fw-normal"],[1,"row","mt-2","justify-content-end"],[1,"col-md-12"],[3,"filter","totaldata","paginationTotal","hasClicked","next","previous","total"]],template:function(n,o){if(1&n&&(t.TgZ(0,"mainpanel",0),t.NdJ("onSubmit",function(l){return o.onSearch(l)}),t.TgZ(1,"filters")(2,"div",1)(3,"div")(4,"h6"),t._uU(5,"Channel"),t.qZA(),t.TgZ(6,"ng-select",2),t.NdJ("ngModelChange",function(l){return o.searchFilter.ChannelID=l})("clear",function(){return o.onClearFilter()}),t.YNc(7,Te,3,2,"ng-template",3),t.qZA()()()(),t.TgZ(8,"content")(9,"div",4)(10,"div",5),t.YNc(11,Se,2,1,"ng-container",6),t.YNc(12,ye,9,0,"ng-template",null,7,t.W1O),t.qZA(),t.YNc(14,we,4,4,"ng-container",8),t.qZA()()()),2&n){const i=t.MAs(13);t.xp6(6),t.Q6J("clearable",!0)("items",o.channelOptions)("ngModel",o.searchFilter.ChannelID),t.xp6(5),t.Q6J("ngIf",(null==o.products?null:o.products.length)>0)("ngIfElse",i),t.xp6(3),t.Q6J("ngIf",(null==o.products?null:o.products.length)>0)}},dependencies:[c.sg,c.O5,v.JJ,v.On,Y.p,B.w9,B.ir,dt,Pe]}),e})();var K=u(8063);const Me=[{path:"",component:At,children:[{path:"",redirectTo:"sold-in-channel",pathMatch:"full"},{path:"in-pos",component:kn,canActivate:[K.a],data:{title:"Products in POS"}},{path:"sold-in-channel",component:qn,canActivate:[K.a],data:{title:"Products Sold in Channel"}},{path:"not-in-channel",component:oe,canActivate:[K.a],data:{title:"Products not in Channel"}},{path:"not-in-pos",component:he,canActivate:[K.a],data:{title:"Products not in POS"}},{path:"duplicate-sku",component:Ie,canActivate:[K.a],data:{title:"Duplicate Sku in Channel"}}]}];let Oe=(()=>{class e{}return e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=t.oAB({type:e}),e.\u0275inj=t.cJS({imports:[c.ez,pt.Bz.forChild(Me)]}),e})();var Ze=u(8739),Ne=u(2594);let ke=(()=>{class e{}return e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=t.oAB({type:e}),e.\u0275inj=t.cJS({imports:[c.ez,v.u5,F.AV]}),e})(),Ue=(()=>{class e{}return e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=t.oAB({type:e}),e.\u0275inj=t.cJS({imports:[c.ez]}),e})(),Fe=(()=>{class e{}return e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=t.oAB({type:e}),e.\u0275inj=t.cJS({imports:[c.ez,v.u5,F.AV]}),e})(),Ae=(()=>{class e{}return e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=t.oAB({type:e}),e.\u0275inj=t.cJS({imports:[c.ez,vt.Z,v.u5,pt.Bz,Oe,F.AV,Y.R,B.A0,Ze.TU,Ne.K,ke,Ue,Fe]}),e})()}}]);