marketplacepos 5.41.6 → 5.41.7

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 (41) hide show
  1. package/Marketplace/{chunk-ZTQGQXIT.js → chunk-34YBIP7V.js} +1 -1
  2. package/Marketplace/{chunk-ZOVPSET6.js → chunk-6KVU4HYV.js} +1 -1
  3. package/Marketplace/{chunk-HW3FX455.js → chunk-6LYB3OX6.js} +1 -1
  4. package/Marketplace/{chunk-IINERY5O.js → chunk-7Y3AHSRY.js} +1 -1
  5. package/Marketplace/{chunk-JB6W72VA.js → chunk-7Y5FIUQG.js} +1 -1
  6. package/Marketplace/{chunk-F2X5N2W5.js → chunk-7ZSRD63R.js} +2 -2
  7. package/Marketplace/{chunk-SUC77PQU.js → chunk-A27CQ454.js} +1 -1
  8. package/Marketplace/{chunk-LNXJNBJQ.js → chunk-BSEXMJEZ.js} +1 -1
  9. package/Marketplace/{chunk-34CTATL6.js → chunk-BVX3DFE7.js} +1 -1
  10. package/Marketplace/{chunk-5KHDEW35.js → chunk-C6G3B77L.js} +1 -1
  11. package/Marketplace/{chunk-25HVJVYO.js → chunk-CRSCUQVD.js} +1 -1
  12. package/Marketplace/{chunk-ZSHPWPPL.js → chunk-E5PXWUP7.js} +1 -1
  13. package/Marketplace/{chunk-UQVGVHST.js → chunk-ELWDT5IN.js} +1 -1
  14. package/Marketplace/{chunk-AB3DHTC7.js → chunk-EYS22E2U.js} +1 -1
  15. package/Marketplace/{chunk-ACV6YALZ.js → chunk-F7PA3AZJ.js} +1 -1
  16. package/Marketplace/{chunk-DFRA5ORA.js → chunk-GB5MAE4Q.js} +1 -1
  17. package/Marketplace/{chunk-CTUXL543.js → chunk-HGHAWAUM.js} +1 -1
  18. package/Marketplace/{chunk-HUEPKUQW.js → chunk-I5J2PPVL.js} +1 -1
  19. package/Marketplace/{chunk-PWJ2Z5EH.js → chunk-J4YKXJ6J.js} +2 -2
  20. package/Marketplace/{chunk-PV6JAW7E.js → chunk-JMBQIF5Z.js} +1 -1
  21. package/Marketplace/{chunk-BB5SMGW7.js → chunk-JS2ESRK4.js} +1 -1
  22. package/Marketplace/{chunk-IHYEQWAY.js → chunk-KLNIF67L.js} +1 -1
  23. package/Marketplace/{chunk-FJVZ33X4.js → chunk-M5RTXLAJ.js} +1 -1
  24. package/Marketplace/{chunk-I4QWUPXR.js → chunk-MOZTIGPI.js} +1 -1
  25. package/Marketplace/{chunk-743EWFUY.js → chunk-NP3CNZCB.js} +1 -1
  26. package/Marketplace/{chunk-YJ6KE7ER.js → chunk-OYBLKQ6P.js} +1 -1
  27. package/Marketplace/{chunk-OIZORVCZ.js → chunk-OYXRKKZM.js} +1 -1
  28. package/Marketplace/{chunk-T6Q5SGJG.js → chunk-P3Y52SIA.js} +1 -1
  29. package/Marketplace/{chunk-OQNYXG6U.js → chunk-P45WU7I6.js} +1 -1
  30. package/Marketplace/{chunk-IIBM2V3E.js → chunk-P7ELVWKF.js} +1 -1
  31. package/Marketplace/{chunk-NTGWFIOH.js → chunk-S2FJFMRF.js} +1 -1
  32. package/Marketplace/{chunk-3OD47PUU.js → chunk-U24PS7YK.js} +1 -1
  33. package/Marketplace/{chunk-OHN3VXQV.js → chunk-UGHSWRCC.js} +1 -1
  34. package/Marketplace/{chunk-LQZTRBOB.js → chunk-WQOMUPJV.js} +1 -1
  35. package/Marketplace/chunk-WRPKXHM7.js +1 -0
  36. package/Marketplace/{chunk-73OLUI2Z.js → chunk-WZ7CRPM6.js} +1 -1
  37. package/Marketplace/{chunk-Z2PI4IS6.js → chunk-XN4O5YGO.js} +1 -1
  38. package/Marketplace/index.html +2 -2
  39. package/Marketplace/{main-36VYJM2O.js → main-XPLCKXAY.js} +1 -1
  40. package/package.json +1 -1
  41. package/Marketplace/chunk-OOKURHR4.js +0 -1
@@ -0,0 +1 @@
1
+ import{a as He}from"./chunk-PQ6Z7K5L.js";import{a as Te}from"./chunk-34YBIP7V.js";import"./chunk-MS4AQ6UA.js";import{a as K}from"./chunk-ZD5LURJS.js";import{a as De,b as Oe}from"./chunk-VSEWXNVC.js";import{a as ze}from"./chunk-PPDHTO44.js";import{a as at}from"./chunk-7KG3DC5J.js";import{b as Ge}from"./chunk-ICSMRW7O.js";import"./chunk-YXFTLQ5M.js";import{a as we,b as Me}from"./chunk-OE2JYQHN.js";import{e as xt}from"./chunk-E5PXWUP7.js";import{a as Ne}from"./chunk-VETHPEVU.js";import{i as Re,j as Be,k as je,l as $e,m as We}from"./chunk-75BDXSG3.js";import"./chunk-6NNAICJE.js";import"./chunk-LPXBSHUI.js";import"./chunk-D54NUPYF.js";import{a as H}from"./chunk-EGTYAIU5.js";import"./chunk-7TWBIV3T.js";import"./chunk-J7AGLBPL.js";import"./chunk-6ALHX2I4.js";import"./chunk-4G3QN54S.js";import"./chunk-3RK6DDJD.js";import{a as Gt}from"./chunk-J3P46Z53.js";import{a as q}from"./chunk-4ASUM4N5.js";import{b as Ke}from"./chunk-7FUVW73P.js";import{a as Ae,b as Ue}from"./chunk-M3SJUKTG.js";import{a as $t,b as Wt,c as Ee}from"./chunk-GHQH62TZ.js";import"./chunk-CH2MLZU7.js";import{a as st}from"./chunk-C6G3B77L.js";import{a as rt}from"./chunk-62PFQNHJ.js";import{c as Fe,f as Ve}from"./chunk-Q72ZXPDP.js";import"./chunk-MNFHFW3E.js";import"./chunk-ZZVNB72Q.js";import{a as Le}from"./chunk-VGXQU74M.js";import"./chunk-SDUUFQUI.js";import"./chunk-G6EG5QJS.js";import{a as jt}from"./chunk-RIHLYYZU.js";import{f as ke}from"./chunk-Q2OEJFVT.js";import{a as gt,b as Lt,d as nt,e as xe}from"./chunk-6IAGGRZN.js";import"./chunk-T6QOFDEE.js";import"./chunk-KXZCGKQW.js";import"./chunk-QCZIDOKW.js";import{j as Se,l as G}from"./chunk-KLNIF67L.js";import{b as $,e as W}from"./chunk-BUFEIJAI.js";import"./chunk-K5XRGNWG.js";import"./chunk-V5WYSCVT.js";import"./chunk-KHWTOD6H.js";import{b as Ct,c as ft,d as Z,e as ve,f as ye,g as be,h as Pe,i as Rt,j as St,k as Bt,m as z,n as Ie}from"./chunk-ITTRZMEX.js";import{r as it,s as ot}from"./chunk-TMFFA26Y.js";import"./chunk-WAW37FIG.js";import{b as fe,c as ht,h as U,m as L,y as _t}from"./chunk-DPLEMBB4.js";import{b as I,c as f}from"./chunk-PXB4YEY3.js";import{E as At,F as ge,G as et,H as Ut,J as Ce,d as Nt,f as A,g as V,j as mt,k as _e,m as ut,n as Y}from"./chunk-GPEVUTDI.js";import{$c as he,Dc as B,Eb as M,Ec as p,Fb as de,Fc as N,G as F,Gc as v,Ic as T,Jc as D,Ka as It,Kb as C,Kc as O,Pc as ct,Qa as wt,Qc as Q,Rc as Xt,Tc as ue,Vb as Yt,Wb as l,Xb as pe,Z as re,Zc as k,_c as E,aa as Ft,ad as j,bc as lt,ca as Jt,cc as Zt,ea as le,ec as qt,f as ae,fc as Qt,gc as o,hc as a,ic as _,jc as b,ka as ce,kc as P,mc as x,nb as se,ob as w,pa as tt,qb as r,rc as g,sc as s,tc as me,uc as Vt,v as Et,wb as S,ya as m,za as u}from"./chunk-T5ONJF63.js";import"./chunk-K2H6WANG.js";var ln=()=>["/menu/products/download/by-url"],Je=(()=>{class i{constructor(){this.productTabs=[{Title:"Sold in Channel",Url:"/menu/products/status/sold-in-channel",Description:"SKU has been mapped between dealpos and marketplace"},{Title:"Not in POS",Url:"/menu/products/status/not-in-pos",Description:"SKU sold in Marketplace but not exist in DEALPOS"},{Title:"Not in Channel",Url:"/menu/products/status/not-in-channel",Description:"SKU has not been sold on one of channels"},{Title:"In POS",Url:"/menu/products/status/in-pos",Description:"All products which is already available in POS"},{Title:"Multiple Listing",Url:"/menu/products/status/duplicate-sku",Description:"SKU(s) which is listed more than one time (one to many)"},{Title:"Channel Statistic",Url:"/menu/products/status/channel-statistic",Description:"Product statistic from each channel obtained from the last product scan"}]}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275cmp=M({type:i,selectors:[["app-status"]],standalone:!1,decls:13,vars:3,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid","d-flex","align-items-center","justify-content-between"],[3,"Tabs"],[1,"dropdown","me-6"],["role","button","data-bs-toggle","dropdown","aria-expanded","false",1,"text-dark"],[1,"fa-solid","fa-bars","fa-lg"],[1,"dropdown-menu","dropdown-menu-end","row"],[1,"d-flex"],[1,"dropdown-item",3,"routerLink"]],template:function(n,e){n&1&&(o(0,"nav",0)(1,"div",1)(2,"div"),_(3,"nav-tab",2),a()(),o(4,"div")(5,"div",3)(6,"a",4),_(7,"i",5),a(),o(8,"div",6)(9,"div",7)(10,"a",8),p(11,"Download Product By Url"),a()()()()()(),_(12,"router-outlet")),n&2&&(r(3),l("Tabs",e.productTabs),r(7),l("routerLink",ct(2,ln)))},dependencies:[we,ge,Ut],encapsulation:2})}}return i})();function cn(i,d){if(i&1&&(o(0,"div",10),_(1,"img",11),o(2,"span"),p(3),a()()),i&2){let t=d.$implicit;l("matTooltip",t.disabled?"Single Product Scan disabled for this type of Channel":null),r(),l("src",t.Img,w),r(2),N(t.Name)}}function sn(i,d){if(i&1&&(o(0,"div",10),_(1,"img",11),o(2,"span"),p(3),a()()),i&2){let t=d.$implicit;l("matTooltip",t.disabled?"Single Product Scan disabled for this type of Channel":null),r(),l("src",t.Img,w),r(2),N(t.Name)}}function dn(i,d){if(i&1&&(o(0,"div",10),_(1,"img",11),o(2,"span"),p(3),a()()),i&2){let t=d.$implicit;l("matTooltip",t.disabled?"Single Product Scan disabled for this type of Channel":null),r(),l("src",t.Img,w),r(2),N(t.Name)}}function pn(i,d){i&1&&(o(0,"mat-radio-button",18),p(1," All "),a()),i&2&&l("value",2)}function mn(i,d){if(i&1){let t=x();o(0,"div",12)(1,"label",13),p(2,"Scan Type"),a(),o(3,"mat-radio-group",14),O("ngModelChange",function(e){m(t);let c=s();return D(c.filter.ScanFull,e)||(c.filter.ScanFull=e),u(e)}),C(4,pn,2,1,"mat-radio-button",15),o(5,"mat-radio-button",16),p(6," Sellable (Include Inactive Products) "),a(),o(7,"mat-radio-button",17),p(8," Active "),a()()()}if(i&2){let t=s();r(3),T("ngModel",t.filter.ScanFull),r(),l("ngIf",t.selectedChannel.TypeID==6),r(),l("value",1),r(2),l("value",0)}}function un(i,d){i&1&&(o(0,"span"),p(1,"Never"),a())}function hn(i,d){if(i&1&&(o(0,"span"),p(1),k(2,"async"),a()),i&2){let t=s(2);r(),N(E(2,1,t.lastSync$))}}function _n(i,d){if(i&1){let t=x();o(0,"div",8)(1,"label",5)(2,"span",19),p(3,"Last Scan:"),a(),C(4,un,2,0,"span"),k(5,"async"),C(6,hn,3,3,"span"),a(),o(7,"mat-radio-group",20),O("ngModelChange",function(e){m(t);let c=s();return D(c.filter.UpdatedProduct,e)||(c.filter.UpdatedProduct=e),u(e)}),o(8,"mat-radio-button",21),p(9," Scan All Products "),a(),o(10,"mat-radio-button",22),p(11),a()()()}if(i&2){let t=s();r(4),lt(E(5,6,t.lastSync$)==null?4:6),r(3),T("ngModel",t.filter.UpdatedProduct),r(),l("value",!1),r(2),l("value",!0)("matTooltip",t.selectedChannel.TypeID==t.channelType.Tokopedia?"Use Tokopedia URL for mapping SKU between POS and Tokopedia":"Scan only products that have been updated since the last channel scan"),r(),v(" ",t.selectedChannel.TypeID==t.channelType.Tokopedia?"Product Download By URL":"Scan Updated Products"," ")}}function gn(i,d){if(i&1){let t=x();o(0,"div",8)(1,"label",5),p(2," Scan Option "),a(),o(3,"mat-radio-group",23),O("ngModelChange",function(e){m(t);let c=s();return D(c.filter.Async,e)||(c.filter.Async=e),u(e)}),o(4,"mat-radio-button",24),p(5," Asynchronous (Get Notified when Complete) "),a(),o(6,"mat-radio-button",25),p(7," Synchronous (Wait until Complete) "),a()()()}if(i&2){let t=s();r(3),T("ngModel",t.filter.Async),r(),l("value",!0),r(2),l("value",!1)}}var R=(()=>{class i{constructor(t,n,e){this.dialogRef=t,this.data=n,this.router=e,this.channelService=tt(Te),this.channelType=I,this.disabledChannelOption=!1,this.filter={ChannelID:f.GuidEMpty,ScanFull:0,UpdatedProduct:!1,Async:!1},this.isSingleChannel=f.IsNotEmpty(n.isSingleChannel)?this.data.isSingleChannel:!1,this.disabledChannelOption=f.IsEmpty(n.disabledChannelOption)?!1:this.data.disabledChannelOption}ngOnInit(){this.initChannelOptions(),this.initFilter(),this.onSelectChannel(this.data?.filter?.ChannelID),this.initModalConfig()}initModalConfig(){this.modalConfig=new St,this.modalConfig.title=this.isSingleChannel?"Scan Single Product":"Scan Channel Marketplace",this.modalConfig.bodyScrollable=!0}initFilter(){this.filter.ChannelID=this.data?.filter?.ChannelID}initChannelOptions(){this.channelOptions=JSON.parse(JSON.stringify(this.data.channelOptions)),this.isSingleChannel&&(this.channelOptions=this.channelOptions.map(t=>(t.disabled=!0,(t.TypeID==I.Tiktok||t.TypeID==I.Tokopedia||t.TypeID==I.Lazada||t.TypeID==I.WooCommerce)&&(t.disabled=!1),t)).sort(t=>t.disabled?1:-1))}onSelectChannel(t){let n=this.filterChannelById(t);this.selectedChannel=n,this.filter.Async=!0,this.iniHasScanUpdate(),this.getLastSync(t)}getLastSync(t){this.lastSync$=this.channelService.getLastSync(t).pipe(Et(n=>(this.selectedChannel.LastSync=n.LastSync,this.setDefaultConfigUpdate(),f.IsNotEmpty(n.LastSync)?f.convertToReadableDate(n.LastSync):null)),re(1))}setDefaultConfigUpdate(){this.filter.UpdatedProduct=!1,this.selectedChannel&&f.IsNotEmpty(this.selectedChannel.LastSync)&&(this.selectedChannel.TypeID==I.Shopee||this.selectedChannel.TypeID==I.Tiktok||this.selectedChannel.TypeID==I.Lazada)&&(this.filter.UpdatedProduct=!0)}iniHasScanUpdate(){this.selectedChannel?.TypeID!=I.WooCommerce&&this.selectedChannel?.TypeID!=I.KalCare&&this.selectedChannel?.TypeID!=I.None&&!this.isSingleChannel?this.hasScanUpdate=!0:this.hasScanUpdate=!1}filterChannelById(t){let n;return this.channelOptions&&(n=this.channelOptions.find(e=>e.ID==t)),n}submit(){this.selectedChannel.TypeID==I.Tokopedia&&this.filter.UpdatedProduct?this.router.navigate(["/menu/products/download/by-url"]).then(()=>{this.dialogRef.close()}):this.dialogRef.close(this.filter)}isNotEmpty(t){return f.IsNotEmpty(t)}onClose(){this.dialogRef.close()}static{this.\u0275fac=function(n){return new(n||i)(S(Ct),S(ft),S(et))}}static{this.\u0275cmp=M({type:i,selectors:[["app-scan-dialog"]],decls:15,vars:8,consts:[["selectedItem",""],["item",""],[3,"onOk","onClose","onCancel","dynamicValidated","config"],["content",""],[1,"mx-4"],[1,"mb-2","fw-bold"],["optionLabel","Name","optionValue","ID","placeholder","Select a Channel","appendTo","body","filterBy","Name",1,"w-100",2,"--p-select-padding-y","0.75rem",3,"ngModelChange","options","ngModel","filter"],["class","mt-4",4,"ngIf"],[1,"mt-8"],["class","mt-8",4,"ngIf"],["matTooltipPosition","above","matTooltipClass","custom-width-tooltip",3,"matTooltip"],[2,"width","18px","margin-right","10px",3,"src"],[1,"mt-4"],[1,"mb-2","fw-bold","mt-3"],["name","scanType",1,"form-control","h-100","rounded-1",3,"ngModelChange","ngModel"],["class","me-5","matTooltipClass","custom-width-tooltip","matTooltipPosition","above","matTooltip","Full Scan Product (All Product Status including Deleted)",3,"value",4,"ngIf"],["matTooltipClass","custom-width-tooltip","matTooltipPosition","above","matTooltip","Sellable Product (Active, Pending, Seller Deactivate, Failed & Freeze)",1,"me-5",3,"value"],["matTooltipClass","custom-width-tooltip","matTooltipPosition","above","matTooltip","Only Active Product",1,"me-5",3,"value"],["matTooltipClass","custom-width-tooltip","matTooltipPosition","above","matTooltip","Full Scan Product (All Product Status including Deleted)",1,"me-5",3,"value"],[1,"me-2"],["name","ScanFull",1,"form-control","h-100","rounded-1",2,"line-height","2",3,"ngModelChange","ngModel"],["matTooltipClass","custom-width-tooltip","matTooltipPosition","above","matTooltip","Scan product from beginning ( use this if you haven't scanned at all)",1,"me-5",3,"value"],["matTooltipClass","custom-width-tooltip","matTooltipPosition","above",1,"me-5",3,"value","matTooltip"],["name","Async",1,"form-control","h-100","rounded-1",2,"line-height","2",3,"ngModelChange","ngModel"],["matTooltipClass","custom-width-tooltip","matTooltip","Scan is running in the background, status will be visible in the notification menu","matTooltipPosition","above",1,"me-5",3,"value"],[1,"me-5",3,"value"]],template:function(n,e){if(n&1){let c=x();o(0,"modal-material",2),g("onOk",function(){return m(c),u(e.submit())})("onClose",function(){return m(c),u(e.onClose())})("onCancel",function(){return m(c),u(e.onClose())}),o(1,"div",3)(2,"div",4)(3,"label",5),p(4,"Select a Channel"),a(),o(5,"p-select",6),O("ngModelChange",function(y){return m(c),D(e.filter.ChannelID,y)||(e.filter.ChannelID=y),u(y)}),g("ngModelChange",function(y){return m(c),u(e.onSelectChannel(y))}),C(6,cn,4,3,"ng-template",null,0,j)(8,sn,4,3,"ng-template",null,1,j)(10,dn,4,3,"ng-template",null,1,j),a(),C(12,mn,9,4,"div",7)(13,_n,12,8,"div",8)(14,gn,8,3,"div",9),a()()()}n&2&&(l("dynamicValidated",e.isNotEmpty(e.filter.ChannelID))("config",e.modalConfig),r(5),l("options",e.channelOptions),T("ngModel",e.filter.ChannelID),l("filter",!0),r(7),l("ngIf",!e.isSingleChannel&&e.isNotEmpty(e.filter.ChannelID)),r(),lt(e.hasScanUpdate&&e.selectedChannel?13:-1),r(),l("ngIf",!e.isSingleChannel&&e.isNotEmpty(e.filter.ChannelID)))},dependencies:[Y,V,mt,Oe,De,_t,U,L,Bt,jt,Wt,ot,it,Ve,$t],encapsulation:2})}}return i})();var pt=function(i){return i.Tokopedia="https://seller.tokopedia.com",i.Shoope="https://seller.shopee.co.id",i.Tiktok="https://seller-id.tiktok.com",i.WooCommerce="https://woocommerce.dealpos.app",i.Lazada="https://sellercenter.lazada.co.id",i}(pt||{});var ee={Success:"Success",Info:"Info",Warning:"Warning",Error:"Error"};var Cn=[[["header"]],[["content"]],[["footer"]]],fn=["header","content","footer"],Sn=(i,d)=>({bodyScrollable:i,hideScrollbar:d}),xn=(i,d,t,n)=>({"bg-success":i,"bg-warning":d,"bg-info":t,"bg-danger":n}),vn=i=>({"mx-auto":i}),yn=(i,d)=>({"show-footer":i,"p-0":d});function bn(i,d){if(i&1){let t=x();o(0,"div",8),g("click",function(){m(t);let e=s();return u(e.onBack.emit())}),o(1,"a",9),_(2,"i",10),a()()}}function Pn(i,d){if(i&1){let t=x();o(0,"div")(1,"a",11),g("click",function(){m(t);let e=s();return u(e.onClose.emit())}),_(2,"i",12),a()()}}function In(i,d){if(i&1){let t=x();o(0,"a",16),g("click",function(){m(t);let e=s(2);return u(e.onCancel.emit())}),p(1),a()}if(i&2){let t=s(2);r(),v(" ",t.config!=null&&t.config.cancelText?t.config==null?null:t.config.cancelText:"Cancel","")}}function wn(i,d){if(i&1){let t=x();o(0,"button",17),g("click",function(){m(t);let e=s(2);return u(e.onOk.emit())})("keyup.F2",function(){m(t);let e=s(2);return u(e.onOk.emit())}),a()}if(i&2){let t=s(2);l("disabled",!(t.config!=null&&t.config.validated)||!t.dynamicValidated)("innerHTML",t.config!=null&&t.config.okText?t.config==null?null:t.config.okText:"Ok (F2)",se)}}function Mn(i,d){if(i&1&&(o(0,"mat-dialog-actions",13),Vt(1,2),C(2,In,2,1,"a",14)(3,wn,1,2,"button",15),a()),i&2){let t=s();r(2),l("ngIf",!(t.config!=null&&t.config.hideCancel)),r(),l("ngIf",!(t.config!=null&&t.config.hideOk))}}var ne=class{constructor(){this.title="New Modal",this.okText="Ok (F2)",this.cancelText="Cancel",this.hideFooter=!1,this.hideCancel=!1,this.hideOk=!1,this.hideClose=!1,this.eMoney=!1,this.headerType=ee.Success,this.validated=!0,this.customWidth="initial",this.bodyScrollable=!1,this.hideScrollbar=!1,this.disableKeyup=!1,this.noPadding=!1}},Ye=(()=>{class i{constructor(){this.dynamicValidated=!0,this.onOk=new It,this.onCancel=new It,this.onClose=new It,this.onBack=new It,this.headerType=ee}ngOnInit(){this.config==null&&(this.config=new ne)}onKeyup(t){this.config?.disableKeyup||(t.code=="F2"&&this.onOk.emit("F2"),(t.code=="Enter"||t.code=="NumpadEnter")&&this.onOk.emit("Enter"))}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275cmp=M({type:i,selectors:[["modal-material"]],inputs:{config:"config",dynamicValidated:"dynamicValidated"},outputs:{onOk:"onOk",onCancel:"onCancel",onClose:"onClose",onBack:"onBack"},ngContentSelectors:fn,decls:11,vars:23,consts:[["id","modal_material",1,"modal-material","d-flex","align-items-start","flex-column","position-relative","maxHeight",3,"keyup","ngClass"],["mat-dialog-title","",1,"d-flex","w-100","justify-content-between","modal-header","position-relative",3,"ngClass"],["class","back-button position-absolute pointer d-print-none",3,"click",4,"ngIf"],[1,"d-flex","flex-row","d-print-none","align-items-center",3,"ngClass"],[1,"fw-normal"],[4,"ngIf"],[1,"modal-body","w-100",3,"ngClass"],["class","w-100 py-7 border-top d-flex justify-content-end d-print-none",4,"ngIf"],[1,"back-button","position-absolute","pointer","d-print-none",3,"click"],[1,"btn","back-button"],[1,"fa-solid","fa-arrow-left"],[1,"btn-light-blue","btn-sm","pointer","close",3,"click"],[1,"fa-solid","fa-xmark","fa-lg","text-primary"],[1,"w-100","py-7","border-top","d-flex","justify-content-end","d-print-none"],["class","btn btn-light-blue text-primary btn-lg fw-bold mx-3",3,"click",4,"ngIf"],["class","btn btn-light-blue me-6 text-primary btn-lg fw-bold mx-3","data-cy","btn-ok",3,"disabled","innerHTML","click","keyup.F2",4,"ngIf"],[1,"btn","btn-light-blue","text-primary","btn-lg","fw-bold","mx-3",3,"click"],["data-cy","btn-ok",1,"btn","btn-light-blue","me-6","text-primary","btn-lg","fw-bold","mx-3",3,"click","keyup.F2","disabled","innerHTML"]],template:function(n,e){n&1&&(me(Cn),o(0,"div",0),g("keyup",function(h){return e.onKeyup(h)}),o(1,"div",1),C(2,bn,3,0,"div",2),o(3,"div",3)(4,"h4",4),p(5),a(),Vt(6),a(),C(7,Pn,3,0,"div",5),a(),o(8,"mat-dialog-content",6),Vt(9,1),a(),C(10,Mn,4,2,"mat-dialog-actions",7),a()),n&2&&(pe("width",e.config==null?null:e.config.customWidth),l("ngClass",Xt(10,Sn,e.config==null?null:e.config.bodyScrollable,e.config==null?null:e.config.hideScrollbar)),r(),l("ngClass",ue(13,xn,e.headerType.Success==(e.config==null?null:e.config.headerType),e.headerType.Warning==(e.config==null?null:e.config.headerType),e.headerType.Info==(e.config==null?null:e.config.headerType),e.headerType.Error==(e.config==null?null:e.config.headerType))),r(),l("ngIf",e.config==null?null:e.config.eMoney),r(),l("ngClass",Q(18,vn,e.config==null?null:e.config.eMoney)),r(2),N(e.config==null?null:e.config.title),r(2),l("ngIf",!(e.config!=null&&e.config.hideClose)),r(),l("ngClass",Xt(20,yn,!(e.config!=null&&e.config.hideFooter),e.config==null?null:e.config.noPadding)),r(2),l("ngIf",!(e.config!=null&&e.config.hideFooter)))},dependencies:[Y,Nt,V,Pe,ve,be,ye],styles:[".mat-mdc-dialog-container{padding:0!important;border-radius:4px!important;overflow:visible!important} .mat-mdc-dialog-container [mat-dialog-title]{color:#fff;padding:15px;border:none}@media print{ .mat-mdc-dialog-container{box-shadow:unset;width:100vw}}@media print{ .cdk-overlay-pane{position:absolute!important;top:-30px;max-width:100vw!important}.modal-body[_ngcontent-%COMP%]{width:100vw!important}}body.modal-body[_ngcontent-%COMP%]{height:100%;overflow-y:hidden}mat-dialog-actions[_ngcontent-%COMP%]{bottom:15px}mat-dialog-actions[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{padding:15px!important;margin-right:12px}mat-dialog-actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{padding:15px!important}mat-dialog-actions[_ngcontent-%COMP%] .more[_ngcontent-%COMP%]{margin-right:auto;margin-top:-1rem;padding-top:.4rem!important;margin-left:1rem}.back-button[_ngcontent-%COMP%]{top:5px;left:0}.close[_ngcontent-%COMP%]{padding:.4rem .5rem}.no-padding[_ngcontent-%COMP%]{padding:0}.modal-material[_ngcontent-%COMP%]{width:40vw}@media (max-width: 992px){.modal-material[_ngcontent-%COMP%]{width:50vw!important}}@media (max-width: 576px){ .dialog-filter .modal-material{width:100%!important} .dialog-filter mat-dialog-actions{position:sticky;bottom:0;background:#fff} .dialog-filter .modal-material.d-flex.align-items-start.flex-column.position-relative.maxHeight.bodyScrollable.maxHeight.bodyScrollable .modal-body{max-height:100%!important;overflow-y:auto}}.maxHeight.bodyScrollable[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%]{max-height:450px;overflow-y:auto}.modal-header[_ngcontent-%COMP%], .modal-footer[_ngcontent-%COMP%], .modal-footer[_ngcontent-%COMP%] .btn[_ngcontent-%COMP%]{padding:15px}.modal-dialog[_ngcontent-%COMP%]{max-width:none}.modal-content[_ngcontent-%COMP%]{width:auto;margin:auto;max-width:850px}.maxHeight[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%]{max-height:450px;overflow:auto}.modal-body[_ngcontent-%COMP%]{padding:1rem}.modal-body[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{display:block}.modal-body[_ngcontent-%COMP%] .more[_ngcontent-%COMP%]{margin:0;position:absolute;bottom:-20px}.modal-body[_ngcontent-%COMP%] input[type=text][_ngcontent-%COMP%], .modal-body[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%], .modal-body[_ngcontent-%COMP%] input[type=password][_ngcontent-%COMP%]{border:1px solid #c8d3df;padding:5px 7px}.modal-body[_ngcontent-%COMP%] table[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]{width:330px;height:90px}"]})}}return i})();var Tn=i=>({"is-disabled":i});function Dn(i,d){if(i&1&&(b(0),o(1,"tr")(2,"td",10),p(3),a(),o(4,"td",10),p(5),a(),o(6,"td",11)(7,"p",12),p(8,"Product Not in Channel!"),a()()(),P()),i&2){let t=s().$implicit;r(3),v(" ",t==null?null:t.Model," "),r(2),v(" ",t==null?null:t.Code," ")}}function On(i,d){if(i&1&&(o(0,"td",10),p(1),a()),i&2){let t=s(3).$implicit;Yt("rowspan",t.Channel.length),r(),v(" ",t==null?null:t.Model," ")}}function kn(i,d){if(i&1&&(o(0,"td",10),p(1),a()),i&2){let t=s(3).$implicit;Yt("rowspan",t.Channel.length),r(),v(" ",t==null?null:t.Code," ")}}function En(i,d){if(i&1){let t=x();o(0,"tr"),C(1,On,2,2,"td",13)(2,kn,2,2,"td",13),o(3,"td",10)(4,"div",14)(5,"a",15),_(6,"img",16),a(),o(7,"div",17),p(8),a()()(),o(9,"td",10),p(10),k(11,"number"),a(),o(12,"td",18),p(13),k(14,"number"),a(),o(15,"td",19)(16,"div",20)(17,"button",21),g("click",function(){let e=m(t).$implicit,c=s(2).$implicit,h=s();return u(h.onDetach(e,c))}),_(18,"i",22),o(19,"span",23),p(20,"Detach"),a()(),o(21,"a",24),_(22,"i",25),o(23,"span",23),p(24,"Edit"),a()()()()()}if(i&2){let t=d.$implicit,n=d.$index,e=s(3);r(),l("ngIf",n==0),r(),l("ngIf",n==0),r(3),l("href",t.Url,w)("title",t.Title),r(),l("src",e.getChannelLogo(t.TypeID),w),r(),l("matTooltip",(t==null||t.Name==null?null:t.Name.length)>40?t==null?null:t.Name:""),r(),v(" ",t.Name," "),r(2),N(E(11,12,t.Price)),r(3),N(E(14,14,t.Inventory)),r(8),l("href",e.getHyperlinkSellerCenter(t),w)("ngClass",Q(16,Tn,t.TypeID==e.channelType.KalCare))("matTooltip",t.TypeID!=e.channelType.KalCare?"Edit this product in Seller Center, inventory changes must be done via DEALPOS":"")}}function Fn(i,d){if(i&1&&qt(0,En,25,18,"tr",null,Zt),i&2){let t=s().$implicit;Qt(t==null?null:t.Channel)}}function Vn(i,d){if(i&1&&C(0,Dn,9,2,"ng-container",9)(1,Fn,2,0,"ng-template",null,0,j),i&2){let t=d.$implicit,n=B(2);l("ngIf",!t.Channel||t.Channel.length<1)("ngIfElse",n)}}var zt=(()=>{class i{constructor(t,n){this.data=t,this.dialogRef=n,this.httpService=tt(W),this.toastr=tt($),this.variants=wt([]),this.channelType=I,this.variants.set(this.data.variants),this.title=t.title}ngOnInit(){this.initModalConfig()}initModalConfig(){this.modalConfig=new St,this.modalConfig.title=this.data.title,this.modalConfig.bodyScrollable=!0,this.modalConfig.hideFooter=!0,this.modalConfig.customWidth="850px"}onDetach(t,n){let e={ChannelID:t.ChannelID,ChannelItemID:t.ChannelItemID,ChannelVariationID:t.ChannelVariationID};this.httpService.post(Se.DetachVariant,[e]).subscribe(c=>{this.toastr.success(c.Message,"Success"),this.updateVariantAfterDetach(n,t.ChannelVariationID)})}updateVariantAfterDetach(t,n){this.variants.update(e=>{let c=e.findIndex(h=>h.ID===t.ID);return c!==-1&&(e[c].Channel=e[c].Channel.filter(h=>h.ChannelVariationID!==n)),[...e]})}getChannelLogo(t){return f.getChannelLogoByTypeId(t)}getHyperlinkSellerCenter(t){let n="javascript:void(0)";switch(t.TypeID){case I.Shopee:n=`${pt.Shoope}/portal/product/${t.ChannelItemID}`;break;case I.Tiktok:n=`${pt.Tiktok}/product/edit/${t.ChannelItemID}`;break;case I.Tokopedia:n=`${pt.Tokopedia}/edit-product/${t.ChannelItemID}`;break;case I.WooCommerce:n=`${pt.WooCommerce}/wp-admin/post.php?post=${t.ChannelItemID}&action=edit`;break;case I.Lazada:n=`${pt.Lazada}/apps/product/publish?productId=${t.ChannelItemID}`;break}return n}static{this.\u0275fac=function(n){return new(n||i)(S(ft),S(Ct))}}static{this.\u0275cmp=M({type:i,selectors:[["app-modal-variant"]],decls:27,vars:1,consts:[["printChannelModal",""],[3,"onClose","onCancel","config"],[1,"table"],[1,"sticky-top-thead","variant-modal"],[1,"text-start","sticky-top"],[1,"d-flex","align-items-center"],["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,"ngIf","ngIfElse"],[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"],[1,"text-end"],[1,"d-flex","align-items-center","justify-content-end"],[1,"btn","btn-small","btn-light","px-4","py-2","me-3",3,"click"],[1,"fa-sharp","fa-link-slash","me-2",2,"font-size","10px"],[1,"fs-6"],["target","_blank",1,"btn","btn-small","btn-light","px-4","py-2",3,"href","ngClass","matTooltip"],[1,"fa-solid","fa-edit","me-2",2,"font-size","10px"]],template:function(n,e){n&1&&(o(0,"modal-material",1),g("onClose",function(){return e.dialogRef.close()})("onCancel",function(){return e.dialogRef.close()}),o(1,"content")(2,"table",2)(3,"thead",3)(4,"tr")(5,"th",4)(6,"div",5)(7,"span"),p(8,"VARIANT"),a(),o(9,"sup"),_(10,"i",6),a()()(),o(11,"th",4),p(12,"SKU"),a(),o(13,"th",4)(14,"div",5)(15,"span"),p(16,"PRODUCT"),a(),o(17,"sup"),_(18,"i",7),a()()(),o(19,"th",4),p(20,"PRICE"),a(),o(21,"th",8),p(22,"INVENTORY"),a(),_(23,"th",4),a()(),o(24,"tbody"),qt(25,Vn,3,2,null,null,Zt),a()()()()),n&2&&(l("config",e.modalConfig),r(25),Qt(e.variants()))},dependencies:[Y,Nt,V,ut,ot,it,Ye],styles:[".mat-dialog-title[_ngcontent-%COMP%]{margin-bottom:0%;margin-left:24px}.sticky-top-thead[_ngcontent-%COMP%] th.sticky-top[_ngcontent-%COMP%]{top:0}.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}a.is-disabled[_ngcontent-%COMP%]{color:gray;cursor:default}a.is-disabled[_ngcontent-%COMP%]:hover{text-decoration:none}"]})}}return i})();function Nn(i,d){if(i&1&&(o(0,"mat-option",6)(1,"div"),_(2,"img",7),o(3,"span"),p(4),a()()()),i&2){let t=d.$implicit;l("value",t.ChannelID),r(2),l("src",t.logo,w),r(2),N(t.Title)}}var bt=(()=>{class i{constructor(){this.dialogRef=tt(Ct),this.channels=tt(ft),this.channelIds=wt([]),this.channelOptions=wt([])}ngOnInit(){this.initModalConfig();let t=this.channels.filter((n,e,c)=>c.findIndex(h=>h.ChannelID===n.ChannelID)===e);this.channelOptions.set(t)}initModalConfig(){this.modalConfig=new St,this.modalConfig.title="Detach Product",this.modalConfig.okText="Save"}onClose(){this.dialogRef.close()}onSave(){let t=this.channels.filter(n=>this.channelIds().includes(n.ChannelID)).map(n=>({ChannelID:n.ChannelID,ChannelItemID:n.ChannelItemID}));this.dialogRef.close(t)}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275cmp=M({type:i,selectors:[["app-modal-detach-product"]],decls:8,vars:5,consts:[[3,"onClose","onCancel","onOk","dynamicValidated","config"],["content",""],[1,"mb-2","fw-bold"],["appearance","outline",1,"w-100"],["name","channelid","placeholder","Channel",1,"mat-select-channel",3,"ngModelChange","ngModel","multiple"],["class","channel-option",3,"value",4,"ngFor","ngForOf"],[1,"channel-option",3,"value"],[2,"width","18px","margin-right","10px",3,"src"]],template:function(n,e){n&1&&(o(0,"modal-material",0),g("onClose",function(){return e.onClose()})("onCancel",function(){return e.onClose()})("onOk",function(){return e.onSave()}),o(1,"div",1)(2,"div")(3,"label",2),p(4,"Select a Channel"),a(),o(5,"mat-form-field",3)(6,"mat-select",4),O("ngModelChange",function(h){return D(e.channelIds,h)||(e.channelIds=h),h}),C(7,Nn,5,3,"mat-option",5),a()()()()()),n&2&&(l("dynamicValidated",e.channelIds().length>0)("config",e.modalConfig),r(6),T("ngModel",e.channelIds),l("multiple",!0),r(),l("ngForOf",e.channelOptions()))},dependencies:[Y,A,Bt,jt,ke,Ue,Ae,Fe,_t,U,L,ot],encapsulation:2})}}return i})();function An(i,d){if(i&1){let t=x();o(0,"button",13),g("click",function(){m(t);let e=s();return u(e.onDetachMultipleProduct())}),_(1,"i",14),p(2),a()}if(i&2){let t,n=s();r(2),v("Detach (",(t=n.productService.selectedProduct(n.products))==null?null:t.length,") ")}}function Un(i,d){if(i&1){let t=x();o(0,"button",16),g("click",function(){m(t);let e=s(2);return u(e.onOpenScanDialog())}),_(1,"i",17),p(2," Scan Channel "),a()}}function Ln(i,d){if(i&1&&(b(0),C(1,Un,3,0,"button",15),P()),i&2){let t=s();r(),l("ngIf",!t.productService.hasSelection(t.products))}}function Rn(i,d){if(i&1){let t=x();b(0),o(1,"button",18),g("click",function(){m(t);let e=s();return u(e.onScanMultipleProduct())}),_(2,"i",17),p(3),a(),P()}if(i&2){let t,n=s();r(3),v(" Scan (",(t=n.productService.selectedProduct(n.products))==null?null:t.length,") ")}}function Bn(i,d){if(i&1){let t=x();b(0),o(1,"button",19),g("click",function(){m(t);let e=s();return u(e.onUploadMultipleProduct())}),_(2,"i",20),p(3),a(),P()}if(i&2){let t,n=s();r(3),v(" Upload (",(t=n.productService.selectedProduct(n.products))==null?null:t.length,") ")}}function jn(i,d){if(i&1){let t=x();o(0,"div",21)(1,"app-product-card",22),g("onUpload",function(){let e=m(t).$implicit,c=s();return u(c.onUploadToMultipleChannel(e))})("onScan",function(){let e=m(t).$implicit,c=s();return u(c.onScanSingleProduct(e))})("onDescEvent",function(){let e=m(t).index,c=s();return u(c.onOpenDialogVariant(e))})("onCheckBoxChange",function(e){let c=m(t).$implicit;return u(c.selected=e)})("onDetach",function(){let e=m(t).$implicit,c=s();return u(c.onDetachProduct([e]))}),a()()}if(i&2){let t=d.$implicit,n=s();r(),l("productId",t.ID)("title",t==null?null:t.Name)("image",t==null?null:t.ThumbnailUrl)("description",(t==null||t.Variants==null?null:t.Variants.length)>1?(t==null||t.Variants==null?null:t.Variants.length)+" Variants":null)("channels",n.productService.getChannelProduct(t))("code",n.getVariantCode(t==null?null:t.Variants))("showCheckBox",(t==null?null:t.Channel.length)<n.channelOptions.length)("scanButton",!0)("uploadButton",t==null?null:t.hasUpload)("imageForZoom",t==null?null:t.ImageUrl)("detachButton",(t==null||t.Channel==null?null:t.Channel.length)>0)}}function $n(i,d){i&1&&(b(0),o(1,"div",23),_(2,"app-empty-state"),a(),P())}function Wn(i,d){if(i&1){let t=x();b(0),o(1,"div",24)(2,"div",25)(3,"app-custom-paginator",26),g("next",function(){m(t);let e=s();return u(e.getProducts())})("previous",function(){m(t);let e=s();return u(e.getProducts())}),a()()(),P()}if(i&2){let t=s();r(3),l("filter",t.searchFilter)("totaldata",t.products==null?null:t.products.length)("paginationTotal",t.rowCount)("hasClicked",!0)("nextButtonAlwaysVisible",!0)}}var Qe=(()=>{class i{constructor(t,n,e,c,h,y,Pt){this.http=t,this.toastr=n,this.dialog=e,this.productService=c,this.authService=h,this.uploadProductService=y,this.route=Pt,this.searchFilter=new at,this.products=[],this.rowCount=0,this.multipeScanChannels=[],this.getLoaderPage(),this.channelOptions=this.authService.getChannels(),this.initMultiScanChannels()}getLoaderPage(){this.productService.LoadInPOS().subscribe(t=>{this.Categories=t.Options.Categories,this.searchFilter.PageNumber=t.Filter.PageNumber,this.searchFilter.RowCount=t.Filter.RowCount,this.searchFilter.ChannelID=null,this.searchFilter.Category=t.Filter.Category,this.searchFilter.PageSize=100,this.getProducts()})}initMultiScanChannels(){this.multipeScanChannels=this.productService.filterChannelByTypeId(this.channelOptions,[I.Tokopedia,I.Tiktok])}getProducts(){let t={PageNumber:this.searchFilter.PageNumber,RowCount:this.searchFilter.RowCount,text:this.searchFilter.text,Category:this.searchFilter.Category,From:this.startDate,To:this.endDate};this.http.post("/api/product/GetInPOS",t).subscribe(n=>{this.products=n.Data,this.rowCount=n.Total==null?this.searchFilter.RowCount:n.Total.toString(),this.products=this.productService.checkProductHasUploadBtn(this.products,this.channelOptions)})}onOpenScanDialog(){let t=JSON.parse(JSON.stringify(this.searchFilter));t.ChannelID=f.GuidEMpty,this.dialog.open(R,{data:{filter:t,channelOptions:this.channelOptions},width:"600px"}).afterClosed().pipe(F(e=>f.IsNotEmpty(e))).subscribe(e=>{this.searchFilter.ChannelID=e.ChannelID,this.searchFilter.ScanFull=e.ScanFull,this.searchFilter.UpdatedProduct=e.UpdatedProduct,this.searchFilter.Async=e.Async,this.scanAllProduct()})}scanAllProduct(){if(this.searchFilter.ChannelID==null){this.toastr.error("Please Select Channel","Error");return}this.productService.scanAll(this.searchFilter.ChannelID,this.searchFilter.ScanFull,this.searchFilter.UpdatedProduct,this.searchFilter.Async).subscribe(t=>{if(this.searchFilter.Async)this.toastr.warning("You will be notified when the scan is completed.","Scan In Progress",{toastClass:"ngx-toastr toast-waiting"});else{this.getLoaderPage();let n=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);this.productService.successToastrScanAllProduct(t,n,!this.searchFilter.UpdatedProduct)}})}onOpenDialogVariant(t){let n=this.products[t]?.Variants||[];this.dialog.open(zt,{data:{title:this.products[t].Name,variants:n}})}onUploadMultipleProduct(){let t=this.productService.selectedProduct(this.products);this.uploadProductService.setSelectedProduct(t),this.route.navigate(["/menu/products/upload"])}onUploadToMultipleChannel(t){this.uploadProductService.setSelectedProduct([t]),this.route.navigate(["/menu/products/upload"])}searchProduct(t){this.searchFilter.text=t,this.getProducts()}onScanMultipleProduct(){let t=JSON.parse(JSON.stringify(this.searchFilter));t.ChannelID=f.GuidEMpty;let n=this.productService.filterChannelByTypeId(this.channelOptions,[I.Tokopedia,I.Tiktok]);this.dialog.open(R,{data:{filter:t,channelOptions:n,isSingleChannel:!0},width:"600px"}).afterClosed().pipe(F(c=>f.IsNotEmpty(c))).subscribe(c=>{this.searchFilter.ChannelID=c.ChannelID,this.searchFilter.ScanFull=c.ScanFull,this.searchFilter.UpdatedProduct=c.UpdatedProduct;let h=this.productService.selectedProduct(this.products),y=this.productService.getVariantCodesProducts(h);this.scanSingleProduct(y)})}onScanSingleProduct(t){let n=JSON.parse(JSON.stringify(this.searchFilter));n.ChannelID=f.GuidEMpty,this.dialog.open(R,{data:{filter:n,channelOptions:this.channelOptions,isSingleChannel:!0},width:"600px"}).afterClosed().pipe(F(e=>f.IsNotEmpty(e))).subscribe(e=>{this.searchFilter.ChannelID=e.ChannelID;let c=this.productService.getVariantCodesProduct(t);this.scanSingleProduct(c)})}scanSingleProduct(t){this.productService.scanSingle(this.searchFilter.ChannelID,t).subscribe({next:n=>{if(n)this.toastr.success("Successfully Scan ","Success");else{let e=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);this.toastr.error(`This product is not existed in ${e?.Name} `,"Error")}this.searchFilter.ChannelID=f.GuidEMpty,n&&this.getProducts()},error:n=>{this.searchFilter.ChannelID=f.GuidEMpty}})}getVariantCode(t=[]){let n;return t?.length>1&&(n=(t[0].model?t[0].model:"")+t[0].Code),t?.length==1&&(n=t[0].Code),n}onDetachProduct(t){let n=[];t.forEach(e=>{e.Channel=f.assignChannelLogo(e.Channel),n.push(...e.Channel)}),this.dialog.open(bt,{width:"600px",data:[...n]}).afterClosed().pipe(F(e=>f.IsNotEmpty(e)),Ft(e=>this.productService.detachProduct(e))).subscribe(e=>{this.toastr.success(e.Message,Rt.Success),this.getProducts()})}onDetachMultipleProduct(){let t=this.productService.selectedProduct(this.products);this.onDetachProduct(t)}static{this.\u0275fac=function(n){return new(n||i)(S(W),S($),S(Z),S(H),S(G),S(xt),S(et))}}static{this.\u0275cmp=M({type:i,selectors:[["app-in-pos"]],standalone:!1,decls:23,vars:14,consts:[["picker",""],["description","All products which is already available in POS",3,"onSubmit","headerTitle"],["type","button",1,"btn","btn-outline-secondary","shadow","rounded","me-2"],[4,"ngIf"],[1,"fw-bold","mb-2"],["appendTo","body","bindLabel","Name","name","Name","bindValue","Name","placeholder","Select Category",1,"center-text",3,"ngModelChange","clearable","items","ngModel"],[1,"mt-5"],["id","dates",1,"form-control","rounded","dateRange",3,"rangePicker"],["matStartDate","","placeholder","Start date",3,"ngModelChange","click","ngModel"],["matEndDate","","placeholder","End date",3,"ngModelChange","click","ngModel"],[1,"container-fluid"],[1,"row","mt-8"],["class","col-12 col-md-6 col-xl-4 px-3 my-3",4,"ngFor","ngForOf"],["type","button",1,"btn","btn-outline-secondary","shadow","rounded","me-2",3,"click"],[1,"fa-sharp","fa-link-slash","me-2"],["type","button","data-cy","scanSoldinChannel","class","btn btn-outline-secondary shadow rounded",3,"click",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,"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,"onUpload","onScan","onDescEvent","onCheckBoxChange","onDetach","productId","title","image","description","channels","code","showCheckBox","scanButton","uploadButton","imageForZoom","detachButton"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"row","mt-2","justify-content-end"],[1,"col-md-12"],[3,"next","previous","filter","totaldata","paginationTotal","hasClicked","nextButtonAlwaysVisible"]],template:function(n,e){if(n&1){let c=x();o(0,"mainpanel",1),g("onSubmit",function(y){return m(c),u(e.searchProduct(y))}),o(1,"actions"),C(2,An,3,1,"button",2)(3,Ln,2,1,"ng-container",3)(4,Rn,4,1,"ng-container",3)(5,Bn,4,1,"ng-container",3),a(),o(6,"filters")(7,"div")(8,"label",4),p(9,"Category"),a(),o(10,"ng-select",5),g("ngModelChange",function(y){return m(c),u(e.searchFilter.Category=y)}),a()(),o(11,"div",6)(12,"mat-date-range-input",7)(13,"input",8),O("ngModelChange",function(y){return m(c),D(e.startDate,y)||(e.startDate=y),u(y)}),g("click",function(){m(c);let y=B(16);return u(y.open())}),a(),o(14,"input",9),O("ngModelChange",function(y){return m(c),D(e.endDate,y)||(e.endDate=y),u(y)}),g("click",function(){m(c);let y=B(16);return u(y.open())}),a()(),_(15,"mat-date-range-picker",null,0),a()(),o(17,"content")(18,"div",10)(19,"div",11),C(20,jn,2,11,"div",12)(21,$n,3,0,"ng-container",3),a(),C(22,Wn,4,5,"ng-container",3),a()()()}if(n&2){let c=B(16);l("headerTitle","In POS ("+e.rowCount+")"),r(2),lt(e.productService.hasSelection(e.products)?2:-1),r(),l("ngIf",!e.productService.hasSelection(e.products)),r(),l("ngIf",e.productService.hasSelection(e.products)&&e.multipeScanChannels.length>0),r(),l("ngIf",e.productService.hasSelection(e.products)),r(5),l("clearable",!0)("items",e.Categories)("ngModel",e.searchFilter.Category),r(2),l("rangePicker",c),r(),T("ngModel",e.startDate),r(),T("ngModel",e.endDate),r(6),l("ngForOf",e.products),r(),l("ngIf",e.products.length==0),r(),l("ngIf",e.products.length>0)}},dependencies:[A,V,ht,U,L,z,nt,q,rt,K,Re,Be,je,$e],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}}.navbar-toggler[_ngcontent-%COMP%]:focus{box-shadow:none!important}.img-logo[_ngcontent-%COMP%]{height:24px;width:24px}.dateRange[_ngcontent-%COMP%]{padding-top:.8rem;padding-bottom:.8rem}"]})}}return i})();function Gn(i,d){if(i&1){let t=x();o(0,"button",11),g("click",function(){m(t);let e=s();return u(e.onDetachMultipleProduct())}),_(1,"i",12),p(2),a()}if(i&2){let t,n=s();r(2),v("Detach (",(t=n.productService.selectedProduct(n.products))==null?null:t.length,") ")}}function zn(i,d){if(i&1){let t=x();b(0),o(1,"button",13),g("click",function(){m(t);let e=s();return u(e.onOpenScanDialog())}),_(2,"i",14),p(3," Scan Channel "),a(),P()}}function Hn(i,d){if(i&1){let t=x();b(0),o(1,"button",15),g("click",function(){m(t);let e=s();return u(e.onScanMultipleProduct())}),_(2,"i",14),p(3),a(),P()}if(i&2){let t=s();r(3),v(" Scan (",t.productService.selectedProduct(t.products).length,") ")}}function Kn(i,d){if(i&1){let t=x();b(0),o(1,"button",16),g("click",function(){m(t);let e=s();return u(e.onUploadMultipleProduct())}),_(2,"i",17),p(3),a(),P()}if(i&2){let t=s();r(3),v(" Upload (",t.productService.selectedProduct(t.products).length,") ")}}function Jn(i,d){if(i&1&&(o(0,"span",18),_(1,"img",19),a(),p(2)),i&2){let t=d.item;r(),l("src",t.Img,w)("alt",t.Name),r(),v(" ",t.Name," ")}}function Yn(i,d){if(i&1){let t=x();o(0,"div",20)(1,"label",21),p(2,"Item ID"),a(),o(3,"input",22),O("ngModelChange",function(e){m(t);let c=s();return D(c.searchFilter.Item_id,e)||(c.searchFilter.Item_id=e),u(e)}),a()()}if(i&2){let t=s();r(3),T("ngModel",t.searchFilter.Item_id)}}function Zn(i,d){if(i&1){let t=x();o(0,"div",23)(1,"app-product-card",24),g("onUpload",function(){let e=m(t).$implicit,c=s();return u(c.onUploadToMultipleChannel(e))})("onDescEvent",function(){let e=m(t).index,c=s();return u(c.onOpenVariantDetail(e))})("onScan",function(){let e=m(t).$implicit,c=s();return u(c.onScanSingleProduct(e))})("onCheckBoxChange",function(e){let c=m(t).$implicit;return u(c.selected=e)})("onDetach",function(){let e=m(t).$implicit,c=s();return u(c.onDetachProduct([e]))}),a()()}if(i&2){let t=d.$implicit,n=s();r(),l("productId",t==null?null:t.ID)("title",t==null?null:t.Name)("image",t==null?null:t.ThumbnailUrl)("description",(t==null||t.Variants==null?null:t.Variants.length)>1?(t==null||t.Variants==null?null:t.Variants.length)+" Variants":null)("channels",n.productService.getChannelProduct(t))("code",n.getVariantCode(t==null?null:t.Variants))("showCheckBox",t==null?null:t.hasScan)("scanButton",!0)("uploadButton",t==null?null:t.hasUpload)("imageForZoom",t==null?null:t.ImageUrl)("detachButton",(t==null||t.Channel==null?null:t.Channel.length)>0)}}function qn(i,d){i&1&&(b(0),o(1,"div",25),_(2,"app-empty-state"),a(),P())}function Qn(i,d){if(i&1){let t=x();o(0,"div",26)(1,"div",27)(2,"app-custom-paginator",28),g("total",function(){m(t);let e=s();return u(e.getRowCount())})("next",function(){m(t);let e=s();return u(e.getProducts())})("previous",function(){m(t);let e=s();return u(e.getProducts())}),a()()()}if(i&2){let t=s();r(2),l("filter",t.searchFilter)("totaldata",t.products==null?null:t.products.length)("paginationTotal",t.rowCount)("hasClicked",t.hasClickRowCount)}}var Xe=(()=>{class i{constructor(t,n,e,c,h,y,Pt,kt){this.http=t,this.dialog=n,this.toastr=e,this.productService=c,this.activateRouter=h,this.authService=y,this.route=Pt,this.uploadProductService=kt,this.searchFilter=new at,this.products=[],this.rowCount=0,this.hasClickRowCount=!1,this.guidEmpty=f.GuidEMpty,this.multipeScanChannels=[],this.channelOptions=this.authService.getChannels(),this.initMultiScanChannels()}ngOnInit(){this.activateRouter.queryParams.subscribe(t=>{t.ID?this.initPageLoader(t.ID):this.initPageLoader(f.GuidEMpty)})}initPageLoader(t){this.productService.loader(t).subscribe(n=>{this.searchFilter=n.Filter,n.Filter.ChannelID!=f.GuidEMpty&&(this.searchFilter.ListChannelID=[],this.searchFilter.ListChannelID.push(n.Filter.ChannelID)),this.searchFilter.PageSize=n.Filter.RowCount,this.searchFilter.Item_id="",this.getProducts()})}initMultiScanChannels(){this.multipeScanChannels=this.productService.filterChannelByTypeId(this.channelOptions,[I.Tokopedia,I.Tiktok])}getProducts(){let t={ListChannelID:this.searchFilter.ListChannelID,PageNumber:this.searchFilter.PageNumber,RowCount:this.searchFilter.RowCount,text:this.searchFilter.text,Item_id:this.searchFilter.Item_id};this.productService.findAllSoldInChannel(t).subscribe(n=>{this.products=n.Data,this.products=this.productService.checkProductHasUploadBtn(this.products,this.channelOptions),this.products=this.productService.checkProductHasScanButton(this.products,this.channelOptions)})}searchProduct(t){this.searchFilter.text=t,this.hasClickRowCount=!1,this.getProducts()}onOpenVariantDetail(t){let n=this.products[t].Variants;this.dialog.open(zt,{data:{variants:n,title:this.products[t].Name}})}onOpenScanDialog(){let t=JSON.parse(JSON.stringify(this.searchFilter));t.ChannelID=f.GuidEMpty,this.dialog.open(R,{data:{filter:t,channelOptions:this.channelOptions},width:"600px"}).afterClosed().pipe(F(e=>f.IsNotEmpty(e))).subscribe(e=>{this.searchFilter.ChannelID=e.ChannelID,this.searchFilter.ScanFull=e.ScanFull,this.searchFilter.UpdatedProduct=e.UpdatedProduct,this.searchFilter.Async=e.Async,this.scanAllProduct()})}scanAllProduct(){let t=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);this.productService.scanAll(this.searchFilter.ChannelID,this.searchFilter.ScanFull,this.searchFilter.UpdatedProduct,this.searchFilter.Async).pipe(F(n=>n)).subscribe(n=>{this.searchFilter.Async?this.toastr.warning("You will be notified when the scan is completed.","Scan In Progress",{toastClass:"ngx-toastr toast-waiting"}):(this.productService.successToastrScanAllProduct(n,t,!this.searchFilter.UpdatedProduct),this.initPageLoader(f.GuidEMpty))})}onScanSingleProduct(t){t.Channel=this.productService.getChannelProduct(t);let n=JSON.parse(JSON.stringify(this.searchFilter));this.dialog.open(R,{data:{filter:n,channelOptions:this.channelOptions,isSingleChannel:!0},width:"600px"}).afterClosed().pipe(F(e=>f.IsNotEmpty(e))).subscribe(e=>{this.searchFilter.ChannelID=e.ChannelID;let c=this.productService.getVariantCodesProduct(t);this.scanProducts(c)})}onUploadToMultipleChannel(t){this.uploadProductService.setSelectedProduct([t]),this.route.navigate(["/menu/products/upload"])}onScanMultipleProduct(){this.searchFilter.ChannelID=f.GuidEMpty;let t=JSON.parse(JSON.stringify(this.searchFilter));this.dialog.open(R,{data:{filter:t,channelOptions:this.multipeScanChannels,isSingleChannel:!0},width:"600px"}).afterClosed().pipe(F(e=>f.IsNotEmpty(e))).subscribe(e=>{this.searchFilter.ChannelID=e.ChannelID,this.searchFilter.ScanFull=e.ScanFull,this.searchFilter.UpdatedProduct=e.UpdatedProduct;let c=this.productService.selectedProduct(this.products),h=this.productService.getVariantCodesProducts(c);this.scanProducts(h)})}scanProducts(t){this.productService.scanSingle(this.searchFilter.ChannelID,t).subscribe({next:n=>{let e=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);n?this.toastr.success(`Product Successfully scan with ${e?.Name}`,"Success"):this.toastr.error(`This product is not existed in ${e?.Name} `,"Error"),this.searchFilter.ChannelID=f.GuidEMpty,n&&this.getProducts()},error:n=>{this.searchFilter.ChannelID=f.GuidEMpty}})}getVariantCode(t){let n;return t.length>1&&(n=(t[0].model?t[0].model:"")+t[0].Code),t.length==1&&(n=t[0].Code),n}onClearFilterChannel(){this.searchFilter.ChannelID=f.GuidEMpty,this.searchFilter.Item_id=""}onUploadMultipleProduct(){let t=this.productService.selectedProduct(this.products);this.uploadProductService.setSelectedProduct(t),this.route.navigate(["/menu/products/upload"])}getRowCount(){let t={ListChannelID:this.searchFilter.ListChannelID,text:this.searchFilter.text};this.http.post("/api/product/GetSoldInChannelRowCount",t).subscribe(n=>{this.hasClickRowCount=!0,this.rowCount=n.Total})}onDetachProduct(t){let n=[];t.forEach(e=>{e.Channel=f.assignChannelLogo(e.Channel),n.push(...e.Channel)}),this.dialog.open(bt,{width:"600px",data:[...n]}).afterClosed().pipe(F(e=>f.IsNotEmpty(e)),Ft(e=>this.productService.detachProduct(e))).subscribe(e=>{this.toastr.success(e.Message,Rt.Success),this.getProducts()})}onDetachMultipleProduct(){let t=this.productService.selectedProduct(this.products);this.onDetachProduct(t)}static{this.\u0275fac=function(n){return new(n||i)(S(W),S(Z),S($),S(H),S(At),S(G),S(et),S(xt))}}static{this.\u0275cmp=M({type:i,selectors:[["app-sold-in-channel"]],standalone:!1,decls:19,vars:13,consts:[["description","SKU has been mapped between dealpos and marketplace",3,"onSubmit","headerTitle"],["type","button",1,"btn","btn-outline-secondary","shadow","rounded","me-2"],[4,"ngIf"],[1,"fw-bold","mb-2"],["appendTo","body","bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"ngModelChange","clear","clearable","multiple","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],["class","mt-5",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",1,"btn","btn-outline-secondary","shadow","rounded","me-2",3,"click"],[1,"fa-sharp","fa-link-slash","me-2"],["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,"me-2"],[2,"width","18px",3,"src","alt"],[1,"mt-5"],[1,"fw-bold"],["type","text","name","Item_id","id","Item_id",1,"form-control","mt-2",3,"ngModelChange","ngModel"],[1,"col-12","col-md-6","col-xl-4","px-3","my-3"],[3,"onUpload","onDescEvent","onScan","onCheckBoxChange","onDetach","productId","title","image","description","channels","code","showCheckBox","scanButton","uploadButton","imageForZoom","detachButton"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"row"],[1,"col-12"],[3,"total","next","previous","filter","totaldata","paginationTotal","hasClicked"]],template:function(n,e){n&1&&(o(0,"mainpanel",0),g("onSubmit",function(h){return e.searchProduct(h)}),o(1,"actions"),C(2,Gn,3,1,"button",1)(3,zn,4,0,"ng-container",2)(4,Hn,4,1,"ng-container",2)(5,Kn,4,1,"ng-container",2),a(),o(6,"filters")(7,"div")(8,"label",3),p(9,"Channel"),a(),o(10,"ng-select",4),g("ngModelChange",function(h){return e.searchFilter.ListChannelID=h})("clear",function(){return e.onClearFilterChannel()}),C(11,Jn,3,3,"ng-template",5),a()(),C(12,Yn,4,1,"div",6),a(),o(13,"content")(14,"div",7)(15,"div",8),C(16,Zn,2,11,"div",9)(17,qn,3,0,"ng-container",2),a(),C(18,Qn,3,4,"div",10),a()()()),n&2&&(l("headerTitle","Sold in Channel"),r(2),lt(e.productService.hasSelection(e.products)?2:-1),r(),l("ngIf",!e.productService.hasSelection(e.products)),r(),l("ngIf",e.multipeScanChannels.length>0&&e.productService.hasSelection(e.products)),r(),l("ngIf",e.productService.hasSelection(e.products)),r(5),l("clearable",!0)("multiple",!0)("items",e.channelOptions)("ngModel",e.searchFilter.ListChannelID),r(2),l("ngIf",e.searchFilter.ListChannelID!=null),r(4),l("ngForOf",e.products),r(),l("ngIf",e.products.length==0),r(),l("ngIf",e.products==null?null:e.products.length))},dependencies:[A,V,ht,U,L,z,nt,gt,Lt,q,rt,K],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}}.navbar-toggler[_ngcontent-%COMP%]:focus{box-shadow:none!important}"]})}}return i})();function Xn(i,d){if(i&1){let t=x();o(0,"button",13),g("click",function(){m(t);let e=s(2);return u(e.uploadMultipleProduct())}),_(1,"i",14),p(2),a()}if(i&2){let t=s(2);r(2),v(" upload (",t.selectedProducts==null?null:t.selectedProducts.length,") ")}}function ti(i,d){if(i&1){let t=x();b(0),o(1,"td",29)(2,"input",30),O("ngModelChange",function(e){m(t);let c=s(2).$implicit;return D(c.selected,e)||(c.selected=e),u(e)}),g("ngModelChange",function(){m(t);let e=s(3).ngIf,c=s(3);return u(c.onSelectProduct(e))}),a()(),P()}if(i&2){let t=s(2).$implicit;r(),l("rowSpan",t==null?null:t.Variants.length),r(),T("ngModel",t.selected)}}function ei(i,d){if(i&1){let t=x();b(0),o(1,"img",35),g("click",function(e){m(t);let c=s(3).$implicit,h=s(4);return u(h.onZoomImage(e,c==null?null:c.ImageUrl))}),a(),P()}if(i&2){let t=s(3).$implicit;r(),l("src",t==null?null:t.ImageUrl,w)}}function ni(i,d){i&1&&_(0,"img",36)}function ii(i,d){if(i&1&&(b(0),o(1,"td",29)(2,"div",31),C(3,ei,2,1,"ng-container",11)(4,ni,1,0,"ng-template",null,1,j),a()(),o(6,"td",32)(7,"h4",33)(8,"span",34),p(9),a()()(),P()),i&2){let t=B(5),n=s(2).$implicit;r(),l("rowSpan",n==null?null:n.Variants.length),r(2),l("ngIf",n==null?null:n.ImageUrl)("ngIfElse",t),r(3),l("rowSpan",n==null?null:n.Variants.length),r(2),l("matTooltip",(n==null||n.Name==null?null:n.Name.length)>50?n==null?null:n.Name:""),r(),v(" ",n==null?null:n.Name," ")}}function oi(i,d){if(i&1&&(o(0,"div")(1,"a",25),_(2,"img",37),a()()),i&2){let t=d.$implicit;r(),l("href",t.URL,w),r(),l("src",t.Img,w)("matTooltip",t.Name)}}function ai(i,d){if(i&1&&(o(0,"div"),_(1,"img",37),a()),i&2){let t=d.$implicit;r(),l("src",t.Img,w)("matTooltip",t.Name)}}function ri(i,d){if(i&1&&(o(0,"tr"),C(1,ti,3,2,"ng-container",12)(2,ii,10,6,"ng-container",12),o(3,"td"),p(4),a(),o(5,"td")(6,"span"),p(7),a(),o(8,"span",24)(9,"a",25),_(10,"i",26),a()()(),o(11,"td",27)(12,"div",28),C(13,oi,3,3,"div",23),a()(),o(14,"td",27)(15,"div",28),C(16,ai,2,2,"div",23),a()()()),i&2){let t=d.$implicit,n=d.index,e=s(5);r(),l("ngIf",n==0),r(),l("ngIf",n==0),r(2),v(" ",t.Name," "),r(3),v(" ",t.Code," "),r(2),l("href",e.hostName+"/menu/Products/Catalog/Variants/Info?ID="+(t==null?null:t.ID),w),r(4),l("ngForOf",t==null?null:t.Available),r(3),l("ngForOf",t==null?null:t.NotAvailable)}}function li(i,d){if(i&1&&(b(0),C(1,ri,17,7,"tr",23),P()),i&2){let t=d.$implicit;r(),l("ngForOf",t.Variants)}}function ci(i,d){if(i&1&&(o(0,"tbody"),C(1,li,2,1,"ng-container",23),a()),i&2){let t=d.ngIf;r(),l("ngForOf",t)}}function si(i,d){if(i&1&&(b(0),o(1,"div",15)(2,"table",16)(3,"thead",17)(4,"tr"),_(5,"th",18),o(6,"th",19),p(7,"Product"),a(),o(8,"th",20),p(9,"Variant"),a(),o(10,"th",20),p(11,"SKU"),a(),o(12,"th",21),p(13,"Available In"),a(),o(14,"th",22),p(15,"Not Available In"),a()()(),C(16,ci,2,1,"tbody",12),k(17,"async"),a()(),P()),i&2){let t=s(2);r(16),l("ngIf",E(17,1,t.data$))}}function di(i,d){i&1&&(o(0,"div",38),_(1,"app-empty-state"),a())}function pi(i,d){if(i&1){let t=x();o(0,"span",46),g("click",function(){m(t);let e=s(4);return u(e.getRowCount())}),o(1,"i",47),p(2,"?"),a()()}}function mi(i,d){if(i&1&&(o(0,"span"),p(1),k(2,"number"),a()),i&2){let t=d.ngIf;r(),N(E(2,1,t==null?null:t.Count))}}function ui(i,d){if(i&1){let t=x();o(0,"a",48),g("click",function(){m(t);let e=s(4);return u(e.onNextPage())}),_(1,"i",49),p(2," Next"),a()}}function hi(i,d){if(i&1){let t=x();o(0,"a",50),g("click",function(){m(t);let e=s(4);return u(e.onLastPage())}),_(1,"i",51),p(2," Last"),a()}}function _i(i,d){if(i&1&&(b(0),o(1,"div",39)(2,"div",40)(3,"div",41),p(4),k(5,"number"),C(6,pi,3,0,"span",42)(7,mi,3,3,"span",12),k(8,"async"),p(9),a()(),o(10,"div",43),C(11,ui,3,0,"a",44)(12,hi,3,0,"a",45),a()(),P()),i&2){let t=s().ngIf,n=s(2);r(4),v(" Showing 1 - ",E(5,6,t==null?null:t.length)," of "),r(2),l("ngIf",n.paginationService.hideCount),r(),l("ngIf",!n.paginationService.hideCount&&E(8,8,n.rowCount$)),r(2),v(" records ~ ",n.paginationService.footerPageNumber," Page "),r(2),l("ngIf",n.paginationService.disableNextButton&&!n.paginationService.goToLastPage),r(),l("ngIf",n.paginationService.disableNextButton&&!n.paginationService.goToLastPage)}}function gi(i,d){if(i&1&&(b(0),C(1,_i,13,10,"ng-container",12),P()),i&2){let t=d.ngIf;r(),l("ngIf",(t==null?null:t.length)>0)}}function Ci(i,d){if(i&1){let t=x();o(0,"mainpanel",3),g("onSubmit",function(e){m(t);let c=s();return u(c.searchProduct(e))}),o(1,"actions"),C(2,Xn,3,1,"button",4),o(3,"button",5),g("click",function(){m(t);let e=s();return u(e.openScanDialog())}),_(4,"i",6),p(5," Scan Channel "),a(),o(6,"button",7),g("click",function(){m(t);let e=s();return u(e.openExportDialog())}),_(7,"i",8),o(8,"span"),p(9,"Export"),a()()(),o(10,"content")(11,"div",9)(12,"div",10),C(13,si,18,3,"ng-container",11),k(14,"async"),C(15,di,2,0,"ng-template",null,0,j),a(),C(17,gi,2,1,"ng-container",12),k(18,"async"),a()()()}if(i&2){let t,n=B(16),e=s();l("hideSearchDropdown",!0),r(2),l("ngIf",e.hasSelectionProduct),r(11),l("ngIf",((t=E(14,5,e.data$))==null?null:t.length)>0)("ngIfElse",n),r(4),l("ngIf",E(18,7,e.data$))}}var tn=(()=>{class i{constructor(t,n,e,c,h,y,Pt,kt,rn){this.http=t,this.dialog=n,this.toastr=e,this.route=c,this.productService=h,this.paginationService=y,this.biggerPictureService=Pt,this.authService=kt,this.uploadProductService=rn,this.loaderAPI="product/Load",this.rowCountAPI="product/GetNotInChannelRowCount",this.notChannelAPI="product/GetNotInChannelV2",this.hasSelectionProduct=!1,this.selectedProducts=[],this.channelOptions=kt.getChannels(),this.hostName=this.authService.getDomain()}ngOnInit(){this.initPageLoader(),this.iniData()}initPageLoader(){this.paginationService.fetchDataEndpoint=this.notChannelAPI,this.loader$=this.http.post(`api/${this.loaderAPI}`,{}).pipe(le(t=>{this.filterSearch=t.Filter,this.paginationService.reloadPagination(t.Filter)}))}iniData(){this.data$=this.paginationService.data$.pipe(Et(t=>(t=t.map(n=>(n.Variants=n.Variants.map(e=>(e.Available=this.productService.sortChannel(e.Available),e.NotAvailable=this.productService.sortChannel(e.NotAvailable),e.Available=this.assignLogoChannel(e.Available),e.NotAvailable=this.assignLogoChannel(e.NotAvailable),e)),n.Channel=n?.Variants[0]?.Available,n)),t)))}assignLogoChannel(t){return t=t.map(n=>(n.Img=f.getChannelLogoByTypeId(n.TypeID),n)),t}searchProduct(t){this.filterSearch.text=t,this.paginationService.reloadPagination(this.filterSearch)}scanAllProduct(){let t=this.productService.findChannelById(this.filterSearch.ChannelID,this.channelOptions);this.productService.scanAll(this.filterSearch.ChannelID,this.filterSearch.ScanFull,this.filterSearch.UpdatedProduct,this.filterSearch.Async).subscribe(n=>{this.filterSearch.Async?this.toastr.success("You will be notified when the scan is completed.","Scan Asynchronous"):(this.productService.successToastrScanAllProduct(n,t,!this.filterSearch.UpdatedProduct),this.initPageLoader())})}openScanDialog(){let t=JSON.parse(JSON.stringify(this.filterSearch));t.ChannelID=f.GuidEMpty,this.dialog.open(R,{data:{filter:t,channelOptions:this.channelOptions},width:"600px"}).afterClosed().pipe(F(e=>f.IsNotEmpty(e))).subscribe(e=>{this.filterSearch.ChannelID=e.ChannelID,this.filterSearch.ScanFull=e.ScanFull,this.filterSearch.UpdatedProduct=e.UpdatedProduct,this.filterSearch.Async=e.Async,this.scanAllProduct()})}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:t=>{this.filterSearch.PageNumber=1,this.paginationService.getAllData(this.filterSearch,t.Count)}})}onZoomImage(t,n){this.biggerPictureService.openBiggerPicture(t,n)}onSelectProduct(t){this.hasSelectionProduct=this.productService.hasSelection(t),this.selectedProducts=this.productService.selectedProduct(t)}uploadMultipleProduct(){this.uploadProductService.setSelectedProduct(this.selectedProducts),this.route.navigate(["/menu/products/upload"])}ngOnDestroy(){this.paginationService.destroy()}openExportDialog(){this.dialog.open(Ge,{data:{title:"Export Not In Channel",pageNumber:this.filterSearch.PageNumber,rowCount:this.filterSearch.RowCount,filterExport:this.filterSearch,getRowCountApi:"product/GetNotInChannelRowCount",exportApi:"product/GetNotInChannelExport"}}).afterClosed().subscribe()}static{this.\u0275fac=function(n){return new(n||i)(S(W),S(Z),S($),S(et),S(H),S(ze),S(Le),S(G),S(xt))}}static{this.\u0275cmp=M({type:i,selectors:[["app-not-in-channel"]],standalone:!1,decls:2,vars:3,consts:[["EMPTY",""],["elsePic",""],["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,"onSubmit","hideSearchDropdown"],["class","btn btn-light shadow rounded ms-2",3,"click",4,"ngIf"],["data-cy","scanNotinChannel","type","button",1,"btn","btn-outline-secondary","shadow","rounded","ms-2",3,"click"],[1,"fas","fa-lg","fa-crosshairs"],[1,"btn","btn-outline-secondary","shadow","rounded","ms-2",3,"click"],[1,"fa-solid","fa-print","me-3"],[1,"container-fluid","mt-3"],[1,"row"],[4,"ngIf","ngIfElse"],[4,"ngIf"],[1,"btn","btn-light","shadow","rounded","ms-2",3,"click"],["aria-hidden","true",1,"fa","fa-upload"],[1,"col-md-12"],[1,"table","border-bottom"],[1,"thead-light","sticky-top-thead"],[2,"width","10px"],["colspan","2",1,"ms-5","text-center",2,"width","450px"],[2,"width","150px"],[2,"width","20%"],[2,"width","16%"],[4,"ngFor","ngForOf"],[1,"ms-1"],["target","_blank",3,"href"],[1,"fas","fa-solid","fa-arrow-up-right-from-square","external-link-custom"],[2,"padding-left","0px"],[1,"d-flex","flex-wrap","mb-1"],[1,"text-center",3,"rowSpan"],["type","checkbox",3,"ngModelChange","ngModel"],[2,"padding-right","0px"],[1,"text-start",3,"rowSpan"],[1,"ms-5","fw-normal","text-ellipsis",2,"max-width","26vw !important"],[3,"matTooltip"],[1,"border","rounded","cursor-pointer",2,"max-width","40px",3,"click","src"],["src","//res.cloudinary.com/pos/image/upload/w_40/POS/Images/Icon/products_thumb.png",1,"border","rounded",2,"max-width","40px"],["alt","",1,"channel-logo","cursor-pointer","ms-4","mt-3",3,"src","matTooltip"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[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,e){n&1&&(C(0,Ci,19,9,"mainpanel",2),k(1,"async")),n&2&&l("ngIf",E(1,1,e.loader$))},dependencies:[A,V,fe,U,L,z,it,K,mt,ut],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}}.navbar-toggler[_ngcontent-%COMP%]:focus{box-shadow:none!important}thead[_ngcontent-%COMP%]{position:sticky;top:0}.channel-logo[_ngcontent-%COMP%]{width:20px}.w-img[_ngcontent-%COMP%]{width:100%}"]})}}return i})();var fi=i=>[i],Si=()=>[];function xi(i,d){if(i&1){let t=x();o(0,"button",15),g("click",function(){m(t);let e=s();return u(e.openScanDialog())}),_(1,"i",16),p(2," Scan Channel "),a()}}function vi(i,d){if(i&1){let t=x();b(0),o(1,"button",17),g("click",function(){m(t);let e=s();return u(e.onDownloadAllProduct("SELECTED"))}),_(2,"i",18),p(3),a(),P()}if(i&2){let t,n=s();r(3),v(" Download (",(t=n.productService.selectedProduct(n.products))==null?null:t.length,") ")}}function yi(i,d){if(i&1&&(o(0,"span",19),_(1,"img",20),a(),p(2)),i&2){let t=d.item;r(),l("src",t.Img,w)("alt",t.Name),r(),v(" ",t.Name," ")}}function bi(i,d){if(i&1){let t=x();o(0,"div",21)(1,"app-product-card",22),g("onCheckBoxChange",function(e){let c=m(t).index,h=s();return u(h.onSelectProduct(e,c))})("onDescEvent",function(){let e=m(t).index,c=s();return u(c.onShowVariantDetail(e))})("onDownload",function(){let e=m(t).$implicit,c=s();return u(c.onDownloadProduct(e))})("onScan",function(){let e=m(t).$implicit,c=s();return u(c.onScanChannel(e))}),a()()}if(i&2){let t=d.$implicit;r(),l("showRedirectIcon",!1)("title",t==null?null:t.Name)("image",t==null?null:t.Image)("imageForZoom",t==null?null:t.Image)("code",t==null?null:t.SKU)("description",(t==null||t.Variant==null?null:t.Variant.length)>0?(t==null||t.Variant==null?null:t.Variant.length)+" Variants":null)("downloadButton",!0)("channels",t!=null&&t.Channel?Q(10,fi,t==null?null:t.Channel):ct(12,Si))("showCheckBox",!0)("scanButton",!0)}}function Pi(i,d){i&1&&(b(0),o(1,"div",23),_(2,"app-empty-state"),a(),P())}function Ii(i,d){if(i&1){let t=x();o(0,"div",24)(1,"div",25)(2,"app-custom-paginator",26),g("total",function(){m(t);let e=s();return u(e.getRowCount())})("next",function(){m(t);let e=s();return u(e.getProducts())})("previous",function(){m(t);let e=s();return u(e.getProducts())}),a()()()}if(i&2){let t=s();r(2),l("filter",t.searchFilter)("totaldata",t.products==null?null:t.products.length)("paginationTotal",t.rowCount)("hasClicked",t.hasClickRowCount)}}var en=(()=>{class i{constructor(t,n,e,c,h,y){this.http=t,this.dialog=n,this.productService=e,this.toastrService=c,this.activateRouter=h,this.authService=y,this.searchFilter=new at,this.products=[],this.hasClickRowCount=!1,this.channelOptions=this.authService.getChannels()}ngOnInit(){this.activateRouter.queryParams.subscribe(t=>{t.ID?this.initPageLoader(t.ID):this.initPageLoader(f.GuidEMpty)})}initPageLoader(t){this.productService.loader(t).subscribe(n=>{this.searchFilter=n.Filter,this.searchFilter.PageSize=n.Filter.RowCount,this.getProducts()})}getProducts(){this.http.post("/api/product/GetProductChannelNotPOS",this.searchFilter).subscribe(t=>{this.products=t.Data,this.mapChannelToProduct(),this.setSkuProduct()})}mapChannelToProduct(){let t;this.products=this.products.map(n=>(t=this.channelOptions.find(e=>e.ID==n.ChannelID),t?n.Channel=JSON.parse(JSON.stringify(t)):n.Channel=null,n)).map(n=>(n.Channel&&(n.Channel.Url=n.Url),n))}setSkuProduct(){this.products=this.products.map(t=>(t?.Variant?.length==0?f.IsNotEmpty(t?.ChannelItemSKU)?t.SKU=t?.ChannelItemSKU:t.SKU="SKU not assigned":t.SKU=t?.Variant[0]?.ChannelVariationSKU?t?.Variant[0]?.ChannelVariationSKU:"SKU not assigned",t))}onSearch(t){this.searchFilter.text=t,this.hasClickRowCount=!1,this.getProducts()}onClearChannelFilter(){this.searchFilter.ChannelID=f.GuidEMpty}onScanAll(){let t=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);this.productService.scanAll(this.searchFilter.ChannelID,this.searchFilter.ScanFull,this.searchFilter.UpdatedProduct,this.searchFilter.Async).subscribe(n=>{this.searchFilter.Async?this.toastrService.warning("You will be notified when the scan is completed.","Scan In Progress",{toastClass:"ngx-toastr toast-waiting"}):(this.initPageLoader(f.GuidEMpty),this.productService.successToastrScanAllProduct(n,t,!this.searchFilter.UpdatedProduct)),this.searchFilter.ChannelID=f.GuidEMpty})}openScanDialog(){let t=JSON.parse(JSON.stringify(this.searchFilter));t.ChannelID=f.GuidEMpty,this.dialog.open(R,{data:{filter:t,channelOptions:this.channelOptions},width:"600px"}).afterClosed().pipe(F(e=>f.IsNotEmpty(e))).subscribe(e=>{this.searchFilter.ChannelID=e.ChannelID,this.searchFilter.UpdatedProduct=e.UpdatedProduct,this.searchFilter.ScanFull=e.ScanFull,this.searchFilter.Async=e.Async,this.onScanAll()})}onDownloadAllProduct(t){let n;t=="ALL"?n=this.products:n=this.productService.selectedProduct(this.products),n.length>0&&this.productService.downloadMultipleProduct(n).subscribe({next:()=>{this.getProducts()}})}onSelectProduct(t,n){this.products[n].selected=t}onDownloadProduct(t){confirm(`Are you sure you want to Retrieve product ${t?.Name} from ${t?.Channel.Name} to POS?`)&&this.productService.downloadProduct(t).subscribe({next:()=>{this.getProducts()}})}onScanChannel(t){let n=JSON.parse(JSON.stringify(t));delete n.Channel,this.productService.scanCompareToPos([n]).subscribe(e=>{e.Status?(this.initPageLoader(f.GuidEMpty),this.toastrService.success(`product ${t.Name} have been successfully scanned and synchronized with POS`,"Success")):this.toastrService.error(`Product ${t.Name} is not existed in POS`,"Error")})}onShowVariantDetail(t){let n=this.products[t].Variant;n.length>0&&this.dialog.open(He,{data:{title:this.products[t].Name,variants:n},width:"30%"})}getRowCount(){let t={ChannelID:this.searchFilter.ChannelID,text:this.searchFilter.text,HaveSku:parseInt(this.searchFilter.HaveSku)};this.http.post("/api/product/GetProductChannelNotPOSRowCount",t).subscribe(n=>{this.hasClickRowCount=!0,this.rowCount=n.Count})}static{this.\u0275fac=function(n){return new(n||i)(S(W),S(Z),S(H),S($),S(At),S(G))}}static{this.\u0275cmp=M({type:i,selectors:[["app-not-in-pos"]],standalone:!1,decls:30,vars:13,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,"fw-bold","mb-2"],["bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel","appendTo","body",1,"center-text",3,"ngModelChange","clearable","items","ngModel"],["ng-option-tmp",""],[1,"mt-5"],[1,"fw-bold"],["name","haveSKU",1,"form-control","h-100","pt-3","rounded","mt-2",3,"ngModelChange","ngModel"],[1,"me-5",3,"value"],["type","text","name","Item_id","id","Item_id","placeholder","item id",1,"form-control","mt-2",3,"ngModelChange","ngModel"],[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"],[2,"width","18px",3,"src","alt"],[1,"col-12","col-md-6","col-xl-4","px-3","my-3"],[3,"onCheckBoxChange","onDescEvent","onDownload","onScan","showRedirectIcon","title","image","imageForZoom","code","description","downloadButton","channels","showCheckBox","scanButton"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"row"],[1,"col-12"],[3,"total","next","previous","filter","totaldata","paginationTotal","hasClicked"]],template:function(n,e){n&1&&(o(0,"mainpanel",0),g("onSubmit",function(h){return e.onSearch(h)}),o(1,"actions"),C(2,xi,3,0,"button",1)(3,vi,4,1,"ng-container",2),a(),o(4,"filters")(5,"div")(6,"label",3),p(7,"Channel"),a(),o(8,"ng-select",4),O("ngModelChange",function(h){return D(e.searchFilter.ChannelID,h)||(e.searchFilter.ChannelID=h),h}),C(9,yi,3,3,"ng-template",5),a()(),o(10,"div",6)(11,"label",7),p(12,"SKU Assigned"),a(),o(13,"mat-radio-group",8),O("ngModelChange",function(h){return D(e.searchFilter.HaveSku,h)||(e.searchFilter.HaveSku=h),h}),o(14,"mat-radio-button",9),p(15," All "),a(),o(16,"mat-radio-button",9),p(17," Yes "),a(),o(18,"mat-radio-button",9),p(19," No "),a()()(),o(20,"div",6)(21,"label",7),p(22,"Item ID"),a(),o(23,"input",10),O("ngModelChange",function(h){return D(e.searchFilter.Item_id,h)||(e.searchFilter.Item_id=h),h}),a()()(),o(24,"content")(25,"div",11)(26,"div",12),C(27,bi,2,13,"div",13)(28,Pi,3,0,"ng-container",2),a(),C(29,Ii,3,4,"div",14),a()()()),n&2&&(r(2),l("ngIf",!e.productService.hasSelection(e.products)),r(),l("ngIf",e.productService.hasSelection(e.products)),r(5),l("clearable",!0)("items",e.channelOptions),T("ngModel",e.searchFilter.ChannelID),r(5),T("ngModel",e.searchFilter.HaveSku),r(),l("value",0),r(2),l("value",1),r(2),l("value",2),r(5),T("ngModel",e.searchFilter.Item_id),r(4),l("ngForOf",e.products),r(),l("ngIf",e.products.length==0),r(),l("ngIf",(e.products==null?null:e.products.length)>0))},dependencies:[A,V,ht,U,L,z,nt,gt,$t,Wt,q,rt,K],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}}.navbar-toggler[_ngcontent-%COMP%]:focus{box-shadow:none!important}.itemTitle[_ngcontent-%COMP%]{cursor:pointer}"]})}}return i})();function wi(i,d){if(i&1&&(o(0,"span",9),_(1,"img",10),a(),p(2)),i&2){let t=d.item,n=s();r(),l("src",n.getChannelLogo(t.TypeID),w),r(),v(" ",t.Name," ")}}function Mi(i,d){if(i&1&&(o(0,"div",11),_(1,"app-duplicate-product-card",12),a()),i&2){let t=d.$implicit,n=d.index;r(),l("imageForZoom",t.ImageUrl)("title",t.Name)("code",t.Code)("id",n)("image",t.ThumbnailURL)("channels",t.Channels)}}function Ti(i,d){i&1&&(b(0),o(1,"div",13),_(2,"app-empty-state"),a(),P())}function Di(i,d){if(i&1){let t=x();b(0),o(1,"div",14)(2,"div",15)(3,"app-custom-paginator",16),g("next",function(){m(t);let e=s();return u(e.getProducts())})("previous",function(){m(t);let e=s();return u(e.getProducts())})("total",function(){m(t);let e=s();return u(e.getRowCount())}),a()()(),P()}if(i&2){let t=s();r(3),l("filter",t.searchFilter)("totaldata",t.products==null?null:t.products.length)("paginationTotal",t.rowCount)("hasClicked",t.hasClickedRowCount)}}var nn=(()=>{class i{constructor(t,n,e){this.httpService=t,this.productService=n,this.authService=e,this.searchFilter=new at,this.products=[],this.hasClickedRowCount=!1,this.getPageLoader(),this.channelOptions=e.getChannels()}getPageLoader(){this.productService.loader().subscribe(t=>{this.searchFilter=t.Filter,this.searchFilter.PageSize=t.Filter.RowCount,this.getProducts()})}getProducts(){let t={ListChannelID:this.searchFilter.ListChannelID,RowCount:this.searchFilter.RowCount,PageNumber:this.searchFilter.PageNumber,text:this.searchFilter.text};this.httpService.post("/api/product/GetDuplicateInChannel",t).subscribe(n=>{this.products=n.Data})}onSearch(t){this.searchFilter.text=t,this.hasClickedRowCount=!1,this.getProducts()}onClearFilter(){this.searchFilter.ChannelID=f.GuidEMpty}getChannelLogo(t){return f.getChannelLogoByTypeId(t)}getRowCount(){let t={text:this.searchFilter.text,ChannelID:this.searchFilter.ChannelID};this.httpService.post("/api/product/GetDuplicateInChannelRowCount",t).subscribe(n=>{this.hasClickedRowCount=!0,this.rowCount=n.Total})}static{this.\u0275fac=function(n){return new(n||i)(S(W),S(H),S(G))}}static{this.\u0275cmp=M({type:i,selectors:[["app-duplicate-sku"]],standalone:!1,decls:14,vars:7,consts:[["headerTitle","Multiple Listing","textButton"," Search","description","SKU(s) which is listed more than one time (one to many)",3,"onSubmit"],["container",""],[1,"mb-2"],["appendTo","body","bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"ngModelChange","clear","multiple","clearable","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],[1,"container-fluid"],[1,"row","mt-8","mx-1"],["class","col-12 col-md-6 col-xl-4 px-3 my-3",4,"ngFor","ngForOf"],[4,"ngIf"],[1,"me-2"],["alt","",2,"width","18px",3,"src"],[1,"col-12","col-md-6","col-xl-4","px-3","my-3"],[3,"imageForZoom","title","code","id","image","channels"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"row","mt-2","justify-content-end"],[1,"col-md-12"],[3,"next","previous","total","filter","totaldata","paginationTotal","hasClicked"]],template:function(n,e){n&1&&(o(0,"mainpanel",0),g("onSubmit",function(h){return e.onSearch(h)}),o(1,"filters")(2,"div",1)(3,"div")(4,"h6",2),p(5,"Channel"),a(),o(6,"ng-select",3),O("ngModelChange",function(h){return D(e.searchFilter.ListChannelID,h)||(e.searchFilter.ListChannelID=h),h}),g("clear",function(){return e.onClearFilter()}),C(7,wi,3,2,"ng-template",4),a()()()(),o(8,"content")(9,"div",5)(10,"div",6),C(11,Mi,2,6,"div",7)(12,Ti,3,0,"ng-container",8),a(),C(13,Di,4,4,"ng-container",8),a()()()),n&2&&(r(6),l("multiple",!0)("clearable",!0)("items",e.channelOptions),T("ngModel",e.searchFilter.ListChannelID),r(5),l("ngForOf",e.products),r(),l("ngIf",(e.products==null?null:e.products.length)==0),r(),l("ngIf",(e.products==null?null:e.products.length)>0))},dependencies:[A,V,U,L,z,nt,gt,Lt,Gt,q,K],encapsulation:2})}}return i})();var Oi=()=>["/menu/products/status/sold-in-channel"],on=i=>({ID:i}),ki=()=>["/menu/products/status/not-in-pos"];function Ei(i,d){if(i&1&&(b(0),p(1),P()),i&2){let t=s().$implicit;r(),v(" ",t.Count," ")}}function Fi(i,d){if(i&1){let t=x();o(0,"span",26),g("click",function(){m(t);let e=s().$implicit,c=s(2);return u(c.getLiveProductCount(e.ID,e))}),_(1,"i",27),a()}}function Vi(i,d){if(i&1){let t=x();o(0,"tr")(1,"td"),_(2,"img",17),o(3,"span",18),p(4),a()(),o(5,"td",19),C(6,Ei,2,1,"ng-container",6)(7,Fi,2,0,"ng-template",null,1,j),a(),o(9,"td",19)(10,"a",20),p(11),k(12,"number"),a()(),o(13,"td",19)(14,"a",20),p(15),k(16,"number"),a()(),o(17,"td"),p(18),k(19,"date"),a(),o(20,"td")(21,"div",21)(22,"button",22),g("click",function(){let e=m(t).$implicit,c=s(2);return u(c.onScanChannel(e))}),_(23,"i",23),p(24," Scan "),a(),o(25,"button",24),g("click",function(){let e=m(t).$implicit,c=s(2);return u(c.onClearCache(e.ID))}),_(26,"i",25),p(27," Clear "),a()()()()}if(i&2){let t=d.$implicit,n=B(8),e=s(2);r(2),l("src",e.getChannelLogo(t.TypeID),w),r(2),N(t.Name),r(2),l("ngIf",t.Count!==void 0)("ngIfElse",n),r(4),l("routerLink",ct(18,Oi))("queryParams",Q(19,on,t.ID)),r(),v(" ",E(12,11,t.SoldInChannel)," "),r(3),l("routerLink",ct(21,ki))("queryParams",Q(22,on,t.ID)),r(),v(" ",E(16,13,t.NotInPOS)," "),r(3),v("",t.LastSync?he(19,15,t.LastSync,"dd MMM yyyy HH:mm"):"Never"," ")}}function Ni(i,d){if(i&1&&(b(0),o(1,"div",7)(2,"table",8)(3,"thead",9)(4,"tr",10)(5,"th"),p(6,"Channel"),a(),o(7,"th",11),p(8,"Live Product"),a(),o(9,"th",12),p(10,"Sold In Channel"),a(),o(11,"th",13),p(12,"Product Not in POS"),a(),o(13,"th",14),p(14,"Last Sync"),a(),_(15,"th",15),a()(),o(16,"tbody"),C(17,Vi,28,24,"tr",16),k(18,"async"),a()()(),P()),i&2){let t,n=s();r(17),l("ngForOf",(t=E(18,1,n.channels$))==null?null:t.Data)}}function Ai(i,d){i&1&&(o(0,"div",28),_(1,"app-empty-state"),a())}var an=(()=>{class i{constructor(t,n,e,c){this.productService=t,this.toastr=n,this.dialog=e,this.authService=c,this.destroy$=new ae,this.channelOptions=c.getChannels()}ngOnInit(){this.setObsProductStatistic()}setObsProductStatistic(){this.channels$=this.productService.getProductStatistic()}getLiveProductCount(t,n){this.productService.getTotalProductLive(t).pipe(Jt(this.destroy$)).subscribe(e=>{n.Count=e.Count})}onScanChannel(t){this.dialog.open(R,{width:"700px",data:{channelOptions:this.channelOptions,filter:{ChannelID:t.ID},disabledChannelOption:!0}}).afterClosed().pipe(F(n=>f.IsNotEmpty(n))).subscribe(n=>{this.scanAllProduct(t.ID,n)})}scanAllProduct(t,n){let e=this.productService.findChannelById(t,this.channelOptions);this.productService.scanAll(n.ChannelID,n.ScanFull,n.UpdatedProduct,n.Async).pipe(F(c=>c)).subscribe(c=>{n.Async?this.toastr.warning("You will be notified when the scan is completed.","Scan In Progress",{toastClass:"ngx-toastr toast-waiting"}):(this.productService.successToastrScanAllProduct(c,e,!n.UpdatedProduct),this.setObsProductStatistic())})}onClearCache(t){confirm("Are you sure you want to Clear Cache? This Process will remove your product integration to marketplace")&&this.productService.clearCacheChannel(t).pipe(Jt(this.destroy$)).subscribe(e=>{this.toastr.success("Successfully cleared cache","Success"),this.setObsProductStatistic()})}getChannelLogo(t){return f.getChannelLogoByTypeId(t)}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}static{this.\u0275fac=function(n){return new(n||i)(S(H),S($),S(Z),S(G))}}static{this.\u0275cmp=M({type:i,selectors:[["app-channel-statistic"]],standalone:!1,decls:9,vars:6,consts:[["EMPTY",""],["QUESTION",""],["headerTitle","Products Statistic",3,"hideSearchBox","hideSearchDropdown"],[1,"container-fluid"],[1,"row","mt-4"],[1,"col-md-12"],[4,"ngIf","ngIfElse"],[1,"table-responsive"],[1,"table","table-hover"],[1,"sticky-top-thead"],[1,"table-light"],[1,"text-center",2,"width","13rem"],[1,"text-center",2,"width","9rem"],[1,"text-center",2,"width","14rem"],[2,"width","10rem"],[2,"width","12rem"],[4,"ngFor","ngForOf"],[2,"width","24px","height","24px",3,"src"],[1,"ms-3"],[1,"text-center"],[3,"routerLink","queryParams"],[1,"d-flex","align-items-center","justify-content-center"],[1,"btn","btn-sm","btn-secondary","fs-6",3,"click"],[1,"fa","fa-spinner"],[1,"btn","btn-sm","btn-secondary","fs-6","ms-3",3,"click"],[1,"fa","fa-trash"],["matTooltip","Click to see total live product",1,"cursor-pointer","fs-5","text-primary",3,"click"],[1,"fa-solid","fa-circle-question","cursor"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"]],template:function(n,e){if(n&1&&(o(0,"mainpanel",2)(1,"content")(2,"div",3)(3,"div",4)(4,"div",5),C(5,Ni,19,3,"ng-container",6),k(6,"async"),C(7,Ai,2,0,"ng-template",null,0,j),a()()()()()),n&2){let c,h=B(8);l("hideSearchBox",!0)("hideSearchDropdown",!0),r(5),l("ngIf",((c=E(6,4,e.channels$))==null||c.Data==null?null:c.Data.length)>0)("ngIfElse",h)}},dependencies:[A,V,z,it,Ut,K,mt,ut,_e],encapsulation:2})}}return i})();var Ui=[{component:Je,path:"",children:[{path:"",redirectTo:"sold-in-channel",pathMatch:"full"},{path:"in-pos",component:Qe,canActivate:[st],data:{title:"Products in POS"}},{path:"sold-in-channel",component:Xe,canActivate:[st],data:{title:"Products Sold in Channel"}},{path:"not-in-channel",component:tn,canActivate:[st],data:{title:"Products not in Channel"}},{path:"not-in-pos",component:en,canActivate:[st],data:{title:"Products not in POS"}},{path:"duplicate-sku",component:nn,canActivate:[st],data:{title:"Duplicate Sku in Channel"}},{path:"channel-statistic",component:an,canActivate:[st],data:{title:"Channel Statistic"}}]}],ir=(()=>{class i{static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275mod=de({type:i})}static{this.\u0275inj=ce({imports:[Y,_t,Ie,ot,xe,Ke,Ee,Me,Gt,q,rt,Ce.forChild(Ui),We,Ne,bt]})}}return i})();export{ir as StatusModule};
@@ -1 +1 @@
1
- import{a as ce}from"./chunk-XM6GN4VF.js";import"./chunk-7477X7LJ.js";import{a as le}from"./chunk-OQNYXG6U.js";import{a as re}from"./chunk-OAS72QB2.js";import{a as D}from"./chunk-XHAXYWZ7.js";import{c as se,d as E}from"./chunk-743EWFUY.js";import"./chunk-YXFTLQ5M.js";import"./chunk-MATSRG2L.js";import"./chunk-V2OJQHE3.js";import"./chunk-6XFYITUD.js";import"./chunk-OLSC6KHB.js";import"./chunk-LPXBSHUI.js";import"./chunk-D54NUPYF.js";import{a as oe}from"./chunk-EGTYAIU5.js";import"./chunk-7TWBIV3T.js";import"./chunk-J7AGLBPL.js";import"./chunk-6ALHX2I4.js";import"./chunk-4G3QN54S.js";import"./chunk-3RK6DDJD.js";import"./chunk-VGXQU74M.js";import"./chunk-SDUUFQUI.js";import"./chunk-G6EG5QJS.js";import"./chunk-RIHLYYZU.js";import"./chunk-Q2OEJFVT.js";import"./chunk-KXZCGKQW.js";import"./chunk-QCZIDOKW.js";import{l as M}from"./chunk-IHYEQWAY.js";import{b as Z,e as ee}from"./chunk-BUFEIJAI.js";import"./chunk-K5XRGNWG.js";import"./chunk-V5WYSCVT.js";import"./chunk-KHWTOD6H.js";import{d as te,l as ne,m as ie,n as ae}from"./chunk-ITTRZMEX.js";import"./chunk-TMFFA26Y.js";import"./chunk-WAW37FIG.js";import{c as J,h as K,m as q,o as X,y as Y}from"./chunk-DPLEMBB4.js";import{c as g}from"./chunk-PXB4YEY3.js";import{g as z,j as $,n as Q}from"./chunk-GPEVUTDI.js";import{Eb as j,Ec as I,G as x,Ic as F,Jc as L,Kb as _,Kc as T,Oc as H,Qa as w,Wb as h,Zc as v,_c as y,ea as B,gc as s,hc as c,ic as A,ja as k,jc as U,kc as G,lc as W,mc as N,pa as S,qb as p,rc as u,sc as m,wb as d,ya as b,za as P}from"./chunk-T5ONJF63.js";import{a as O,b as R}from"./chunk-K2H6WANG.js";var V=(()=>{class r{constructor(){this.authService=S(M),this.channelOptions=this.authService.getChannels()}filterSelectedChannels(t,i){let e=Object.assign([],this.channelOptions),n=[],a;return t.forEach(o=>{a=e.find(l=>l.ID==o?.parent?.id),a&&(a=R(O({},a),{Name:`${o?.parent?.label} - ${o?.label}`,LocationID:o?.id}),n.push(a))}),i.forEach(o=>{a=e.find(l=>l.ID==o.id),a&&n.push(a)}),n}generateFilterLocation(t,i){let e=[],n=[],a=[];return t.length>0?(e=t.map(o=>o.id),n=t.filter(o=>g.IsNotEmpty(o?.parent?.id)).map(o=>o?.parent?.id).filter((o,l,f)=>f.indexOf(o)===l)):(e=[],n=[]),a=i.map(o=>o.id),a=a.concat(n).filter((o,l,f)=>f.indexOf(o)===l),{locationIds:e,channelIds:a}}static{this.\u0275fac=function(i){return new(i||r)}}static{this.\u0275prov=k({token:r,factory:r.\u0275fac})}}return r})();function he(r,C){if(r&1){let t=N();s(0,"button",15),u("click",function(){b(t);let e=m().ngIf,n=m();return P(n.onUpdateItems(e))}),A(1,"i",16),I(2," Update "),c()}}function de(r,C){if(r&1&&(s(0,"actions")(1,"div",13),_(2,he,3,0,"button",14),c()()),r&2){let t=C.ngIf,i=m();p(2),h("ngIf",i.productService.hasSelectionVariant(t))}}function me(r,C){r&1&&W(0)}function ue(r,C){if(r&1){let t=N();U(0),s(1,"app-table",17),u("onToggle",function(e){b(t);let n=m();return P(n.onShowDifferenceStock(e))})("onSubmit",function(e){b(t);let n=m();return P(n.updateStockByVariant(e))}),c(),G()}if(r&2){let t=C.ngIf,i=m();p(),h("data",t)("channel",i.channels())("showProductToggle",!0)("hiddenIPOSInventory",i.searchFilter.HiddenIPOSInventory)}}var ze=(()=>{class r{constructor(t,i,e,n,a,o){this.http=t,this.toastr=i,this.dialog=e,this.productService=n,this.authService=a,this.mainPanelService=o,this.paginationService=S(E),this.multiChannelService=S(V),this.searchFilter={PageNumber:1,RowCount:100},this.loaderEndpoint="InventoryLoader/GetMultipleInventoryComparison",this.dataEndpoint="Inventory/GetMultipleChannelComparison",this.allDataCountEndpoint="Inventory/GetMultipleChannelComparisonRowCount",this.selectedLocations=w([]),this.selectedChannels=w([]),this.channels=w([]),this.pageData={Title:"Inventory",Nav:[{Title:"Inventory Cache",Url:"/menu/inventory/pos",Active:!0},{Title:"Inventory Realtime",Url:"/menu/inventory/realtime",Active:!1}]},this.channelOptions=this.authService.getChannels()}ngOnInit(){this.initPageLoader()}initPageLoader(){this.paginationService.fetchDataEndpoint=this.dataEndpoint,this.paginationService.fethRowCountEndpoint=this.allDataCountEndpoint,this.loader$=this.http.post(`/API/${this.loaderEndpoint}`,{}).pipe(B(t=>{t.Filter={PageNumber:t.Filter.PageNumber,filterModel:D.ALL,RowCount:t.Filter.PageSize,HiddenIPOSInventory:t.Filter.HiddenIPOSInventory},this.searchFilter=t.Filter,this.mainPanelService.openModalFilter()}))}onChannelChange(t=[]){let i=t.filter(n=>g.isValidGUID(n.id)==!1),e=t.filter(n=>g.isValidGUID(n.id));this.selectedLocations.set(i),this.selectedChannels.set(e)}onSearch(t){let i=this.multiChannelService.filterSelectedChannels(this.selectedLocations(),this.selectedChannels());this.channels.set(i);let e=this.multiChannelService.generateFilterLocation(this.selectedLocations(),this.selectedChannels());this.searchFilter.ListChannelID=e.channelIds,this.searchFilter.ListLocationID=e.locationIds,this.searchFilter.text=t,this.paginationService.reloadPagination(this.searchFilter)}updateStock(t,i){let e=this.productService.selectedVariantProduct(t);if(e.length>0){let n=[];e.forEach(l=>{l.Channel?.forEach(f=>{n.push({ID:l.ID,Code:l.Code,Inventory:l.Inventory,LocationID:f.LocationID})})});let o={ListChannelID:i.filter(l=>l.selected).map(l=>l.ID),List:n};this.http.post("/api/Inventory/UpdateChannel",o).subscribe(l=>{this.paginationService.reloadPagination(this.searchFilter),this.toastr.success("Successfully updated "+o.List.length+" variants in "+o.ListChannelID.length+" channels","Success")})}}updateStockByVariant(t){let i={ID:t.ChannelID,ChannelItemID:t.ChannelItemID,ChannelVariantID:t.ChannelVariationID,NewQuantity:parseFloat(t.Inventory),VariantID:t.ID,SKU:t.Sku,LocationID:t.LocationID};this.http.post("/api/Inventory/UpdateQuantityByItem",i).subscribe(e=>{this.paginationService.reloadPagination(this.searchFilter);let n=this.productService.findChannelById(i.ID,this.channelOptions);this.toastr.success("Successfully updated "+t.ItemName+"("+t.VarName+") inventory in "+n.Name+" to "+i.NewQuantity,"Success")})}onShowDifferenceStock(t){t?this.searchFilter.filterModel=D.DIFFERENCE:this.searchFilter.filterModel=D.ALL,this.paginationService.reloadPagination(this.searchFilter)}onUpdateItems(t){let i=this.productService.selectedVariantProduct(t),e=this.channelOptions.filter(n=>this.channels()?.find(a=>a.ID===n.ID));this.dialog.open(re,{data:{selectedItems:i,channels:JSON.parse(JSON.stringify(e))},width:"400px"}).afterClosed().pipe(x(n=>g.IsNotEmpty(n))).subscribe(n=>{this.updateStock(t,n)})}static{this.\u0275fac=function(i){return new(i||r)(d(ee),d(Z),d(te),d(oe),d(M),d(ne))}}static{this.\u0275cmp=j({type:r,selectors:[["app-multi-channel-comparison"]],features:[H([E,V])],decls:26,vars:22,consts:[["headerTitle","Inventory Comparison","textButton","Search",3,"onSubmit","pageData","hideSearchBox"],[4,"ngIf"],["for","selectChannel",1,"fw-bold","mb-3"],["id","selectChannel",3,"onChannelChange","multiple"],[1,"mt-5"],["for","PageNumber",1,"fw-bold"],["type","number","id","PageNumber","placeholder","PageNumber","name","PageNumber","data-toggle","tooltip","matTooltip","Page Number",1,"form-control","mt-2",3,"ngModelChange","ngModel"],["for","RowCount",1,"fw-bold"],["type","number","id","RowCount","placeholder","Page Size","name","RowCount","data-toggle","tooltip","matTooltip","Page Size",1,"form-control","mt-2",3,"ngModelChange","ngModel"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[3,"onNextPage","onLastPage","onGetRowCount","totalData","hideCount","rowCount","pageNumber","disableNextButton","goToLastPage"],[1,"d-flex"],["type","button","class","btn btn-success shadow-sm rounded me-3",3,"click",4,"ngIf"],["type","button",1,"btn","btn-success","shadow-sm","rounded","me-3",3,"click"],[1,"fas","fa-chevron-circle-up"],["table","inventory",3,"onToggle","onSubmit","data","channel","showProductToggle","hiddenIPOSInventory"]],template:function(i,e){i&1&&(s(0,"mainpanel",0),u("onSubmit",function(a){return e.onSearch(a)}),_(1,de,3,1,"actions",1),v(2,"async"),s(3,"filters"),_(4,me,1,0,"ng-container",1),v(5,"async"),s(6,"div")(7,"label",2),I(8,"Channel"),c(),s(9,"multiwarehouse-tree-select",3),u("onChannelChange",function(a){return e.onChannelChange(a)}),c()(),s(10,"div",4)(11,"label",5),I(12,"PageNumber"),c(),s(13,"input",6),T("ngModelChange",function(a){return L(e.searchFilter.PageNumber,a)||(e.searchFilter.PageNumber=a),a}),c()(),s(14,"div",4)(15,"label",7),I(16,"Page Size"),c(),s(17,"input",8),T("ngModelChange",function(a){return L(e.searchFilter.RowCount,a)||(e.searchFilter.RowCount=a),a}),c()()(),s(18,"content")(19,"div",9)(20,"div",10)(21,"div",11),_(22,ue,2,4,"ng-container",1),v(23,"async"),s(24,"infinite-paginator",12),v(25,"async"),u("onNextPage",function(){return e.paginationService.onNextPage(e.searchFilter)})("onLastPage",function(){return e.paginationService.onLastPage(e.searchFilter)})("onGetRowCount",function(){return e.paginationService.getRowCount(e.searchFilter)}),c()()()()()()),i&2&&(h("pageData",e.pageData)("hideSearchBox",!1),p(),h("ngIf",y(2,14,e.paginationService.data$)),p(3),h("ngIf",y(5,16,e.loader$)),p(5),h("multiple",!0),p(4),F("ngModel",e.searchFilter.PageNumber),p(4),F("ngModel",e.searchFilter.RowCount),p(5),h("ngIf",y(23,18,e.paginationService.data$)),p(2),h("totalData",e.paginationService.totalData())("hideCount",e.paginationService.hideCount())("rowCount",y(25,20,e.paginationService.totalRowCount$))("pageNumber",e.paginationService.pageNumber())("disableNextButton",e.paginationService.disableNextButton())("goToLastPage",e.paginationService.isLastPage()))},dependencies:[Q,z,$,ae,ie,le,Y,J,X,K,q,se,ce],styles:[".no-bullet[_ngcontent-%COMP%]{list-style-type:none}"]})}}return r})();export{ze as MultiChannelComparison};
1
+ import{a as ce}from"./chunk-XM6GN4VF.js";import"./chunk-7477X7LJ.js";import{a as le}from"./chunk-P45WU7I6.js";import{a as re}from"./chunk-OAS72QB2.js";import{a as D}from"./chunk-XHAXYWZ7.js";import{c as se,d as E}from"./chunk-NP3CNZCB.js";import"./chunk-YXFTLQ5M.js";import"./chunk-MATSRG2L.js";import"./chunk-V2OJQHE3.js";import"./chunk-6XFYITUD.js";import"./chunk-OLSC6KHB.js";import"./chunk-LPXBSHUI.js";import"./chunk-D54NUPYF.js";import{a as oe}from"./chunk-EGTYAIU5.js";import"./chunk-7TWBIV3T.js";import"./chunk-J7AGLBPL.js";import"./chunk-6ALHX2I4.js";import"./chunk-4G3QN54S.js";import"./chunk-3RK6DDJD.js";import"./chunk-VGXQU74M.js";import"./chunk-SDUUFQUI.js";import"./chunk-G6EG5QJS.js";import"./chunk-RIHLYYZU.js";import"./chunk-Q2OEJFVT.js";import"./chunk-KXZCGKQW.js";import"./chunk-QCZIDOKW.js";import{l as M}from"./chunk-KLNIF67L.js";import{b as Z,e as ee}from"./chunk-BUFEIJAI.js";import"./chunk-K5XRGNWG.js";import"./chunk-V5WYSCVT.js";import"./chunk-KHWTOD6H.js";import{d as te,l as ne,m as ie,n as ae}from"./chunk-ITTRZMEX.js";import"./chunk-TMFFA26Y.js";import"./chunk-WAW37FIG.js";import{c as J,h as K,m as q,o as X,y as Y}from"./chunk-DPLEMBB4.js";import{c as g}from"./chunk-PXB4YEY3.js";import{g as z,j as $,n as Q}from"./chunk-GPEVUTDI.js";import{Eb as j,Ec as I,G as x,Ic as F,Jc as L,Kb as _,Kc as T,Oc as H,Qa as w,Wb as h,Zc as v,_c as y,ea as B,gc as s,hc as c,ic as A,ja as k,jc as U,kc as G,lc as W,mc as N,pa as S,qb as p,rc as u,sc as m,wb as d,ya as b,za as P}from"./chunk-T5ONJF63.js";import{a as O,b as R}from"./chunk-K2H6WANG.js";var V=(()=>{class r{constructor(){this.authService=S(M),this.channelOptions=this.authService.getChannels()}filterSelectedChannels(t,i){let e=Object.assign([],this.channelOptions),n=[],a;return t.forEach(o=>{a=e.find(l=>l.ID==o?.parent?.id),a&&(a=R(O({},a),{Name:`${o?.parent?.label} - ${o?.label}`,LocationID:o?.id}),n.push(a))}),i.forEach(o=>{a=e.find(l=>l.ID==o.id),a&&n.push(a)}),n}generateFilterLocation(t,i){let e=[],n=[],a=[];return t.length>0?(e=t.map(o=>o.id),n=t.filter(o=>g.IsNotEmpty(o?.parent?.id)).map(o=>o?.parent?.id).filter((o,l,f)=>f.indexOf(o)===l)):(e=[],n=[]),a=i.map(o=>o.id),a=a.concat(n).filter((o,l,f)=>f.indexOf(o)===l),{locationIds:e,channelIds:a}}static{this.\u0275fac=function(i){return new(i||r)}}static{this.\u0275prov=k({token:r,factory:r.\u0275fac})}}return r})();function he(r,C){if(r&1){let t=N();s(0,"button",15),u("click",function(){b(t);let e=m().ngIf,n=m();return P(n.onUpdateItems(e))}),A(1,"i",16),I(2," Update "),c()}}function de(r,C){if(r&1&&(s(0,"actions")(1,"div",13),_(2,he,3,0,"button",14),c()()),r&2){let t=C.ngIf,i=m();p(2),h("ngIf",i.productService.hasSelectionVariant(t))}}function me(r,C){r&1&&W(0)}function ue(r,C){if(r&1){let t=N();U(0),s(1,"app-table",17),u("onToggle",function(e){b(t);let n=m();return P(n.onShowDifferenceStock(e))})("onSubmit",function(e){b(t);let n=m();return P(n.updateStockByVariant(e))}),c(),G()}if(r&2){let t=C.ngIf,i=m();p(),h("data",t)("channel",i.channels())("showProductToggle",!0)("hiddenIPOSInventory",i.searchFilter.HiddenIPOSInventory)}}var ze=(()=>{class r{constructor(t,i,e,n,a,o){this.http=t,this.toastr=i,this.dialog=e,this.productService=n,this.authService=a,this.mainPanelService=o,this.paginationService=S(E),this.multiChannelService=S(V),this.searchFilter={PageNumber:1,RowCount:100},this.loaderEndpoint="InventoryLoader/GetMultipleInventoryComparison",this.dataEndpoint="Inventory/GetMultipleChannelComparison",this.allDataCountEndpoint="Inventory/GetMultipleChannelComparisonRowCount",this.selectedLocations=w([]),this.selectedChannels=w([]),this.channels=w([]),this.pageData={Title:"Inventory",Nav:[{Title:"Inventory Cache",Url:"/menu/inventory/pos",Active:!0},{Title:"Inventory Realtime",Url:"/menu/inventory/realtime",Active:!1}]},this.channelOptions=this.authService.getChannels()}ngOnInit(){this.initPageLoader()}initPageLoader(){this.paginationService.fetchDataEndpoint=this.dataEndpoint,this.paginationService.fethRowCountEndpoint=this.allDataCountEndpoint,this.loader$=this.http.post(`/API/${this.loaderEndpoint}`,{}).pipe(B(t=>{t.Filter={PageNumber:t.Filter.PageNumber,filterModel:D.ALL,RowCount:t.Filter.PageSize,HiddenIPOSInventory:t.Filter.HiddenIPOSInventory},this.searchFilter=t.Filter,this.mainPanelService.openModalFilter()}))}onChannelChange(t=[]){let i=t.filter(n=>g.isValidGUID(n.id)==!1),e=t.filter(n=>g.isValidGUID(n.id));this.selectedLocations.set(i),this.selectedChannels.set(e)}onSearch(t){let i=this.multiChannelService.filterSelectedChannels(this.selectedLocations(),this.selectedChannels());this.channels.set(i);let e=this.multiChannelService.generateFilterLocation(this.selectedLocations(),this.selectedChannels());this.searchFilter.ListChannelID=e.channelIds,this.searchFilter.ListLocationID=e.locationIds,this.searchFilter.text=t,this.paginationService.reloadPagination(this.searchFilter)}updateStock(t,i){let e=this.productService.selectedVariantProduct(t);if(e.length>0){let n=[];e.forEach(l=>{l.Channel?.forEach(f=>{n.push({ID:l.ID,Code:l.Code,Inventory:l.Inventory,LocationID:f.LocationID})})});let o={ListChannelID:i.filter(l=>l.selected).map(l=>l.ID),List:n};this.http.post("/api/Inventory/UpdateChannel",o).subscribe(l=>{this.paginationService.reloadPagination(this.searchFilter),this.toastr.success("Successfully updated "+o.List.length+" variants in "+o.ListChannelID.length+" channels","Success")})}}updateStockByVariant(t){let i={ID:t.ChannelID,ChannelItemID:t.ChannelItemID,ChannelVariantID:t.ChannelVariationID,NewQuantity:parseFloat(t.Inventory),VariantID:t.ID,SKU:t.Sku,LocationID:t.LocationID};this.http.post("/api/Inventory/UpdateQuantityByItem",i).subscribe(e=>{this.paginationService.reloadPagination(this.searchFilter);let n=this.productService.findChannelById(i.ID,this.channelOptions);this.toastr.success("Successfully updated "+t.ItemName+"("+t.VarName+") inventory in "+n.Name+" to "+i.NewQuantity,"Success")})}onShowDifferenceStock(t){t?this.searchFilter.filterModel=D.DIFFERENCE:this.searchFilter.filterModel=D.ALL,this.paginationService.reloadPagination(this.searchFilter)}onUpdateItems(t){let i=this.productService.selectedVariantProduct(t),e=this.channelOptions.filter(n=>this.channels()?.find(a=>a.ID===n.ID));this.dialog.open(re,{data:{selectedItems:i,channels:JSON.parse(JSON.stringify(e))},width:"400px"}).afterClosed().pipe(x(n=>g.IsNotEmpty(n))).subscribe(n=>{this.updateStock(t,n)})}static{this.\u0275fac=function(i){return new(i||r)(d(ee),d(Z),d(te),d(oe),d(M),d(ne))}}static{this.\u0275cmp=j({type:r,selectors:[["app-multi-channel-comparison"]],features:[H([E,V])],decls:26,vars:22,consts:[["headerTitle","Inventory Comparison","textButton","Search",3,"onSubmit","pageData","hideSearchBox"],[4,"ngIf"],["for","selectChannel",1,"fw-bold","mb-3"],["id","selectChannel",3,"onChannelChange","multiple"],[1,"mt-5"],["for","PageNumber",1,"fw-bold"],["type","number","id","PageNumber","placeholder","PageNumber","name","PageNumber","data-toggle","tooltip","matTooltip","Page Number",1,"form-control","mt-2",3,"ngModelChange","ngModel"],["for","RowCount",1,"fw-bold"],["type","number","id","RowCount","placeholder","Page Size","name","RowCount","data-toggle","tooltip","matTooltip","Page Size",1,"form-control","mt-2",3,"ngModelChange","ngModel"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[3,"onNextPage","onLastPage","onGetRowCount","totalData","hideCount","rowCount","pageNumber","disableNextButton","goToLastPage"],[1,"d-flex"],["type","button","class","btn btn-success shadow-sm rounded me-3",3,"click",4,"ngIf"],["type","button",1,"btn","btn-success","shadow-sm","rounded","me-3",3,"click"],[1,"fas","fa-chevron-circle-up"],["table","inventory",3,"onToggle","onSubmit","data","channel","showProductToggle","hiddenIPOSInventory"]],template:function(i,e){i&1&&(s(0,"mainpanel",0),u("onSubmit",function(a){return e.onSearch(a)}),_(1,de,3,1,"actions",1),v(2,"async"),s(3,"filters"),_(4,me,1,0,"ng-container",1),v(5,"async"),s(6,"div")(7,"label",2),I(8,"Channel"),c(),s(9,"multiwarehouse-tree-select",3),u("onChannelChange",function(a){return e.onChannelChange(a)}),c()(),s(10,"div",4)(11,"label",5),I(12,"PageNumber"),c(),s(13,"input",6),T("ngModelChange",function(a){return L(e.searchFilter.PageNumber,a)||(e.searchFilter.PageNumber=a),a}),c()(),s(14,"div",4)(15,"label",7),I(16,"Page Size"),c(),s(17,"input",8),T("ngModelChange",function(a){return L(e.searchFilter.RowCount,a)||(e.searchFilter.RowCount=a),a}),c()()(),s(18,"content")(19,"div",9)(20,"div",10)(21,"div",11),_(22,ue,2,4,"ng-container",1),v(23,"async"),s(24,"infinite-paginator",12),v(25,"async"),u("onNextPage",function(){return e.paginationService.onNextPage(e.searchFilter)})("onLastPage",function(){return e.paginationService.onLastPage(e.searchFilter)})("onGetRowCount",function(){return e.paginationService.getRowCount(e.searchFilter)}),c()()()()()()),i&2&&(h("pageData",e.pageData)("hideSearchBox",!1),p(),h("ngIf",y(2,14,e.paginationService.data$)),p(3),h("ngIf",y(5,16,e.loader$)),p(5),h("multiple",!0),p(4),F("ngModel",e.searchFilter.PageNumber),p(4),F("ngModel",e.searchFilter.RowCount),p(5),h("ngIf",y(23,18,e.paginationService.data$)),p(2),h("totalData",e.paginationService.totalData())("hideCount",e.paginationService.hideCount())("rowCount",y(25,20,e.paginationService.totalRowCount$))("pageNumber",e.paginationService.pageNumber())("disableNextButton",e.paginationService.disableNextButton())("goToLastPage",e.paginationService.isLastPage()))},dependencies:[Q,z,$,ae,ie,le,Y,J,X,K,q,se,ce],styles:[".no-bullet[_ngcontent-%COMP%]{list-style-type:none}"]})}}return r})();export{ze as MultiChannelComparison};
@@ -1 +1 @@
1
- import{a as A,b as F,d as U,e as W}from"./chunk-6IAGGRZN.js";import{l as k}from"./chunk-IHYEQWAY.js";import{a as D,h as V,m as I,y as L}from"./chunk-DPLEMBB4.js";import{n as E}from"./chunk-GPEVUTDI.js";import{Eb as M,Ec as p,Gc as f,Ic as O,Jc as T,Kb as u,Kc as N,Na as d,Oc as w,Wb as s,bc as y,gc as a,hc as o,ic as h,mc as x,ob as g,pa as S,qb as r,rc as C,sc as _,ya as v,za as b}from"./chunk-T5ONJF63.js";function z(t,m){if(t&1&&(a(0,"span",3),h(1,"img",4),o(),a(2,"span"),p(3),o()),t&2){let e=m.item;r(),s("src",e==null?null:e.Img,g),r(2),f(" ",e.Name," ")}}function P(t,m){if(t&1){let e=x();a(0,"span",6),C("click",function(){v(e);let n=_(),c=n.item,l=n.clear;return b(l(c))}),p(1,"x"),o()}}function j(t,m){if(t&1&&(a(0,"span",3),h(1,"img",4),o(),a(2,"span"),p(3),o(),u(4,P,2,0,"span",5)),t&2){let e=m.item,i=_();r(),s("src",e==null?null:e.Img,g),r(2),f(" ",e.Name," "),r(),y(i.clearable()?4:-1)}}var Y=(()=>{class t{constructor(){this.authService=S(k),this.multiple=d(!1),this.clearable=d(!0),this.options=this.authService.getChannels(),this.onChange=e=>{}}onChannelChange(e){this.onChange(e)}writeValue(e){this.selectedChannels=e}registerOnChange(e){this.onChange=e}registerOnTouched(e){}setDisabledState(e){}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=M({type:t,selectors:[["channel-select-options"]],inputs:{multiple:[1,"multiple"],clearable:[1,"clearable"]},features:[w([{provide:D,multi:!0,useExisting:t}])],decls:3,vars:4,consts:[["bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel","appendTo","body",1,"center-text",3,"ngModelChange","clearable","items","ngModel","multiple"],["ng-option-tmp",""],["ng-label-tmp",""],[1,"me-2"],[2,"width","18px",3,"src"],["aria-hidden","true",1,"ng-value-icon","right"],["aria-hidden","true",1,"ng-value-icon","right",3,"click"]],template:function(i,n){i&1&&(a(0,"ng-select",0),N("ngModelChange",function(l){return T(n.selectedChannels,l)||(n.selectedChannels=l),l}),C("ngModelChange",function(l){return n.onChannelChange(l)}),u(1,z,4,2,"ng-template",1)(2,j,5,3,"ng-template",2),o()),i&2&&(s("clearable",n.clearable())("items",n.options),O("ngModel",n.selectedChannels),s("multiple",n.multiple()))},dependencies:[E,W,U,A,F,L,V,I],encapsulation:2})}}return t})();export{Y as a};
1
+ import{a as A,b as F,d as U,e as W}from"./chunk-6IAGGRZN.js";import{l as k}from"./chunk-KLNIF67L.js";import{a as D,h as V,m as I,y as L}from"./chunk-DPLEMBB4.js";import{n as E}from"./chunk-GPEVUTDI.js";import{Eb as M,Ec as p,Gc as f,Ic as O,Jc as T,Kb as u,Kc as N,Na as d,Oc as w,Wb as s,bc as y,gc as a,hc as o,ic as h,mc as x,ob as g,pa as S,qb as r,rc as C,sc as _,ya as v,za as b}from"./chunk-T5ONJF63.js";function z(t,m){if(t&1&&(a(0,"span",3),h(1,"img",4),o(),a(2,"span"),p(3),o()),t&2){let e=m.item;r(),s("src",e==null?null:e.Img,g),r(2),f(" ",e.Name," ")}}function P(t,m){if(t&1){let e=x();a(0,"span",6),C("click",function(){v(e);let n=_(),c=n.item,l=n.clear;return b(l(c))}),p(1,"x"),o()}}function j(t,m){if(t&1&&(a(0,"span",3),h(1,"img",4),o(),a(2,"span"),p(3),o(),u(4,P,2,0,"span",5)),t&2){let e=m.item,i=_();r(),s("src",e==null?null:e.Img,g),r(2),f(" ",e.Name," "),r(),y(i.clearable()?4:-1)}}var Y=(()=>{class t{constructor(){this.authService=S(k),this.multiple=d(!1),this.clearable=d(!0),this.options=this.authService.getChannels(),this.onChange=e=>{}}onChannelChange(e){this.onChange(e)}writeValue(e){this.selectedChannels=e}registerOnChange(e){this.onChange=e}registerOnTouched(e){}setDisabledState(e){}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=M({type:t,selectors:[["channel-select-options"]],inputs:{multiple:[1,"multiple"],clearable:[1,"clearable"]},features:[w([{provide:D,multi:!0,useExisting:t}])],decls:3,vars:4,consts:[["bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel","appendTo","body",1,"center-text",3,"ngModelChange","clearable","items","ngModel","multiple"],["ng-option-tmp",""],["ng-label-tmp",""],[1,"me-2"],[2,"width","18px",3,"src"],["aria-hidden","true",1,"ng-value-icon","right"],["aria-hidden","true",1,"ng-value-icon","right",3,"click"]],template:function(i,n){i&1&&(a(0,"ng-select",0),N("ngModelChange",function(l){return T(n.selectedChannels,l)||(n.selectedChannels=l),l}),C("ngModelChange",function(l){return n.onChannelChange(l)}),u(1,z,4,2,"ng-template",1)(2,j,5,3,"ng-template",2),o()),i&2&&(s("clearable",n.clearable())("items",n.options),O("ngModel",n.selectedChannels),s("multiple",n.multiple()))},dependencies:[E,W,U,A,F,L,V,I],encapsulation:2})}}return t})();export{Y as a};