marketplacepos 3.2.0 → 3.4.0

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 (112) hide show
  1. package/Marketplace/3rdpartylicenses.txt +202 -187
  2. package/Marketplace/chunk-2KQ4WEPD.js +1 -0
  3. package/Marketplace/chunk-2OB3TW2H.js +4 -0
  4. package/Marketplace/chunk-3ICHEZSE.js +1 -0
  5. package/Marketplace/chunk-3TM7EKQZ.js +1 -0
  6. package/Marketplace/chunk-45IJGKR3.js +1 -0
  7. package/Marketplace/chunk-4O5EV6W4.js +1 -0
  8. package/Marketplace/chunk-5DS4AFTV.js +1 -0
  9. package/Marketplace/chunk-5DVM7TJ7.js +5 -0
  10. package/Marketplace/chunk-5JZJC54P.js +2 -0
  11. package/Marketplace/chunk-67YIEWYV.js +1 -0
  12. package/Marketplace/chunk-7DXQ5BDE.js +1 -0
  13. package/Marketplace/chunk-7RCRNZNI.js +1 -0
  14. package/Marketplace/chunk-7Y73MGEU.js +1 -0
  15. package/Marketplace/chunk-AIZ2SLGZ.js +5 -0
  16. package/Marketplace/chunk-B4RPQGTA.js +1 -0
  17. package/Marketplace/chunk-BELWZRNY.js +1 -0
  18. package/Marketplace/chunk-BYDOIRDD.js +1 -0
  19. package/Marketplace/chunk-CS64SQAA.js +1 -0
  20. package/Marketplace/chunk-CWG6UUW5.js +1 -0
  21. package/Marketplace/chunk-DBEZLCZM.js +1 -0
  22. package/Marketplace/chunk-ECB4VT3U.js +1 -0
  23. package/Marketplace/chunk-FWCMOK42.js +8 -0
  24. package/Marketplace/chunk-G5D7W2T3.js +2 -0
  25. package/Marketplace/chunk-GD6CRVOV.js +1 -0
  26. package/Marketplace/chunk-GFW452UY.js +1 -0
  27. package/Marketplace/chunk-GIFWICGN.js +2 -0
  28. package/Marketplace/chunk-GMALFTAY.js +1 -0
  29. package/Marketplace/chunk-H7KLY4IB.js +1 -0
  30. package/Marketplace/chunk-HWOBJ4Z3.js +1 -0
  31. package/Marketplace/chunk-I4V2RPID.js +1 -0
  32. package/Marketplace/chunk-IJIIMLQ7.js +1 -0
  33. package/Marketplace/chunk-ISBEY2N5.js +1 -0
  34. package/Marketplace/chunk-KEKROO5B.js +1 -0
  35. package/Marketplace/chunk-KX7WACSK.js +1 -0
  36. package/Marketplace/chunk-LJ6J4EIT.js +1 -0
  37. package/Marketplace/chunk-LKSBRXCX.js +1 -0
  38. package/Marketplace/chunk-MA4ZKUP6.js +4 -0
  39. package/Marketplace/chunk-MORUNYG3.js +6 -0
  40. package/Marketplace/chunk-MRWTB7OG.js +8 -0
  41. package/Marketplace/chunk-N76YHCQ6.js +1 -0
  42. package/Marketplace/chunk-NZBQKND7.js +1 -0
  43. package/Marketplace/chunk-O3V3GTIM.js +1 -0
  44. package/Marketplace/chunk-PJQTGT4K.js +1 -0
  45. package/Marketplace/chunk-PQGHN52M.js +1 -0
  46. package/Marketplace/chunk-Q7FH7Z7R.js +1 -0
  47. package/Marketplace/chunk-QK2PM3OO.js +2 -0
  48. package/Marketplace/chunk-QKVTZKIC.js +3 -0
  49. package/Marketplace/chunk-RFTG6MKX.js +1 -0
  50. package/Marketplace/chunk-S65ISV4X.js +5 -0
  51. package/Marketplace/chunk-SKA4KCAB.js +1 -0
  52. package/Marketplace/chunk-SWQXA73A.js +1 -0
  53. package/Marketplace/chunk-T6XRWLCZ.js +1 -0
  54. package/Marketplace/chunk-TBY7FO23.js +3 -0
  55. package/Marketplace/chunk-TJRQ2WWD.js +1 -0
  56. package/Marketplace/chunk-TMUAQXEK.js +1 -0
  57. package/Marketplace/chunk-TNVZKPJP.js +1 -0
  58. package/Marketplace/chunk-TQ6UUVH3.js +1 -0
  59. package/Marketplace/chunk-TT7NBZMD.js +1 -0
  60. package/Marketplace/chunk-UNZLFKB2.js +1 -0
  61. package/Marketplace/chunk-VIJ5HUKS.js +1 -0
  62. package/Marketplace/chunk-VRSV5O5R.js +1 -0
  63. package/Marketplace/chunk-VTFOZMLI.js +1 -0
  64. package/Marketplace/chunk-WBI4ZM2X.js +1 -0
  65. package/Marketplace/chunk-WYMCYQCR.js +1 -0
  66. package/Marketplace/chunk-XWIBRKIY.js +5 -0
  67. package/Marketplace/chunk-YQEEQRFM.js +2 -0
  68. package/Marketplace/chunk-YQXKX6O7.js +7 -0
  69. package/Marketplace/chunk-YWVMHX45.js +1 -0
  70. package/Marketplace/chunk-Z2ABDS6L.js +1 -0
  71. package/Marketplace/index.html +2 -2
  72. package/Marketplace/main-B2AQI7UJ.js +1 -0
  73. package/Marketplace/polyfills-KQQO3SZT.js +2 -0
  74. package/Marketplace/scripts-M46NWPTC.js +5 -0
  75. package/Marketplace/styles-WZSIIWL7.css +1 -0
  76. package/package.json +1 -1
  77. package/Marketplace/103.bc1f4c51ca99f04f.js +0 -1
  78. package/Marketplace/168.50d66b17241a3765.js +0 -1
  79. package/Marketplace/231.0c7ab993977632a2.js +0 -1
  80. package/Marketplace/257.d1592e885695ba4b.js +0 -1
  81. package/Marketplace/278.e89610409641d910.js +0 -1
  82. package/Marketplace/296.93310f70e5f9d3a9.js +0 -1
  83. package/Marketplace/311.afcc0c4a03ea0076.js +0 -1
  84. package/Marketplace/389.02d8fd64069d0119.js +0 -1
  85. package/Marketplace/394.11ae606578598904.js +0 -1
  86. package/Marketplace/445.cbf341bc0afe3ffc.js +0 -1
  87. package/Marketplace/452.58ce3ef12b9b5a47.js +0 -1
  88. package/Marketplace/476.d08ef7b92327904d.js +0 -1
  89. package/Marketplace/478.a63c640a3e971a16.js +0 -1
  90. package/Marketplace/500.c2e6963e4771761e.js +0 -1
  91. package/Marketplace/527.984c24771dbd0f8e.js +0 -1
  92. package/Marketplace/556.5d624cfb73f161b2.js +0 -1
  93. package/Marketplace/56.0432dfcbb3e04e39.js +0 -1
  94. package/Marketplace/599.8de0c2b4c7af0f9d.js +0 -1
  95. package/Marketplace/609.0e0a820d30efd4d4.js +0 -1
  96. package/Marketplace/617.4db1b737553fe58b.js +0 -1
  97. package/Marketplace/62.4f9a8ca2692bdd97.js +0 -1
  98. package/Marketplace/687.1fb4b2602d2b185a.js +0 -1
  99. package/Marketplace/699.d68a917277dbe11a.js +0 -1
  100. package/Marketplace/700.755c54d915bd281e.js +0 -1
  101. package/Marketplace/726.40535ee28a35e978.js +0 -1
  102. package/Marketplace/806.4037f673990a5242.js +0 -1
  103. package/Marketplace/810.629a800ca97725b7.js +0 -1
  104. package/Marketplace/877.bbdea3b04cc75780.js +0 -1
  105. package/Marketplace/900.b7de175b628a8dbe.js +0 -1
  106. package/Marketplace/967.2b39f548c7f4eb30.js +0 -1
  107. package/Marketplace/common.2cffc11d42ed963f.js +0 -1
  108. package/Marketplace/main.892c697dc9030f18.js +0 -1
  109. package/Marketplace/polyfills.503b3f4bf922d237.js +0 -1
  110. package/Marketplace/runtime.a3441aa39d1419eb.js +0 -1
  111. package/Marketplace/scripts.0d34bffadb54993a.js +0 -1
  112. package/Marketplace/styles.095460a0131dd2fc.css +0 -19
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkpos_marketplace=self.webpackChunkpos_marketplace||[]).push([[726],{3726:(Pn,L,c)=>{c.r(L),c.d(L,{StatusModule:()=>xn});var p=c(6814),t=c(5879),Q=c(6027),P=c(9790);const V=function(){return["/menu/products/download/by-url"]};let G=(()=>{var i;class r{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"}]}}return(i=r).\u0275fac=function(n){return new(n||i)},i.\u0275cmp=t.Xpm({type:i,selectors:[["app-status"]],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){1&n&&(t.TgZ(0,"nav",0)(1,"div",1)(2,"div"),t._UZ(3,"nav-tab",2),t.qZA()(),t.TgZ(4,"div")(5,"div",3)(6,"a",4),t._UZ(7,"i",5),t.qZA(),t.TgZ(8,"div",6)(9,"div",7)(10,"a",8),t._uU(11,"Download Product By Url"),t.qZA()()()()()(),t._UZ(12,"router-outlet")),2&n&&(t.xp6(3),t.Q6J("Tabs",e.productTabs),t.xp6(7),t.Q6J("routerLink",t.DdM(2,V)))},dependencies:[Q.e,P.lC,P.rH]}),r})();var F=c(5623),m=c(2383),_=c(7700),s=c(5802),h=c(754),b=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}(b||{}),U=c(2965),M=c(2596),D=c(7380);function K(i,r){if(1&i&&(t.ynx(0),t.TgZ(1,"tr")(2,"td",11),t._uU(3),t.qZA(),t.TgZ(4,"td",11),t._uU(5),t.qZA(),t.TgZ(6,"td",12)(7,"p",13),t._uU(8,"Product Not in Channel!"),t.qZA()()(),t.BQk()),2&i){const o=t.oxw().$implicit;t.xp6(3),t.hij(" ",null==o?null:o.Model,""),t.xp6(2),t.hij(" ",null==o?null:o.Code,"")}}function $(i,r){if(1&i&&(t.TgZ(0,"td",11),t._uU(1),t.qZA()),2&i){const o=t.oxw(3).$implicit;t.uIk("rowspan",o.Channel.length),t.xp6(1),t.hij(" ",null==o?null:o.Model,"")}}function H(i,r){if(1&i&&(t.TgZ(0,"td",11),t._uU(1),t.qZA()),2&i){const o=t.oxw(3).$implicit;t.uIk("rowspan",o.Channel.length),t.xp6(1),t.hij(" ",null==o?null:o.Code,"")}}const R=function(i){return{"is-disabled":i}};function j(i,r){if(1&i&&(t.TgZ(0,"tr"),t.YNc(1,$,2,2,"td",14),t.YNc(2,H,2,2,"td",14),t.TgZ(3,"td",11)(4,"div",15)(5,"a",16),t._UZ(6,"img",17),t.qZA(),t.TgZ(7,"div",18),t._uU(8),t.qZA()()(),t.TgZ(9,"td",11),t._uU(10),t.ALo(11,"number"),t.qZA(),t.TgZ(12,"td",19),t._uU(13),t.ALo(14,"number"),t.qZA(),t.TgZ(15,"td",19)(16,"a",20),t._UZ(17,"i",21),t.TgZ(18,"span",22),t._uU(19,"Edit"),t.qZA()()()()),2&i){const o=r.$implicit,n=r.index,e=t.oxw(3);t.xp6(1),t.Q6J("ngIf",0==n),t.xp6(1),t.Q6J("ngIf",0==n),t.xp6(3),t.Q6J("href",o.Url,t.LSH)("title",o.Title),t.xp6(1),t.Q6J("src",e.getChannelLogo(o.TypeID),t.LSH),t.xp6(1),t.Q6J("matTooltip",(null==o||null==o.Name?null:o.Name.length)>55?null==o?null:o.Name:""),t.xp6(1),t.hij(" ",o.Name," "),t.xp6(2),t.Oqu(t.lcZ(11,12,o.Price)),t.xp6(3),t.Oqu(t.lcZ(14,14,o.Inventory)),t.xp6(3),t.Q6J("href",e.getHyperlinkSellerCenter(o),t.LSH)("ngClass",t.VKq(16,R,o.TypeID==e.channelType.KalCare))("matTooltip",o.TypeID!=e.channelType.KalCare?"Edit this product in Seller Center, inventory changes must be done via DEALPOS":"")}}function z(i,r){if(1&i&&t.YNc(0,j,20,18,"tr",8),2&i){const o=t.oxw().$implicit;t.Q6J("ngForOf",null==o?null:o.Channel)}}function W(i,r){if(1&i&&(t.ynx(0),t.YNc(1,K,9,2,"ng-container",9),t.YNc(2,z,1,1,"ng-template",null,10,t.W1O),t.BQk()),2&i){const o=r.$implicit,n=t.MAs(3);t.xp6(1),t.Q6J("ngIf",!o.Channel||o.Channel.length<1)("ngIfElse",n)}}let q=(()=>{var i;class r{constructor(n,e){this.data=n,this.dialogRef=e,this.channelType=h.x,this.variants=n.variants,this.title=n.title}ngOnInit(){this.initModalConfig()}initModalConfig(){this.modalConfig=new U.O,this.modalConfig.title=this.data.title,this.modalConfig.bodyScrollable=!0,this.modalConfig.hideCancel=!0,this.modalConfig.hideOk=!0}getChannelLogo(n){return s.g.getChannelLogoByTypeId(n)}getHyperlinkSellerCenter(n){let e="javascript:void(0)";switch(n.TypeID){case h.x.ShopeeV2:e=`${b.Shoope}/portal/product/${n.ChannelItemID}`;break;case h.x.Tiktok:e=`${b.Tiktok}/product/edit/${n.ChannelItemID}`;break;case h.x.Tokopedia:e=`${b.Tokopedia}/edit-product/${n.ChannelItemID}`;break;case h.x.WooCommerce:e=`${b.WooCommerce}/wp-admin/post.php?post=${n.ChannelItemID}&action=edit`;break;case h.x.Lazada:e=`${b.Lazada}/apps/product/publish?productId=${n.ChannelItemID}`}return e}}return(i=r).\u0275fac=function(n){return new(n||i)(t.Y36(_.WI),t.Y36(_.so))},i.\u0275cmp=t.Xpm({type:i,selectors:[["app-modal-variant"]],decls:22,vars:2,consts:[[3,"config","onCancel"],["content",""],[1,"table"],[1,"sticky-top-thead","variant-modal"],[1,"text-start","sticky-top"],["matTooltip","Variant from POS",1,"fas","fa-info-circle","ms-1"],["matTooltip","Product and Variant from each Channel",1,"fas","fa-info-circle","ms-1"],[1,"text-start","sticky-top",2,"width","0%"],[4,"ngFor","ngForOf"],[4,"ngIf","ngIfElse"],["printChannelModal",""],[1,"text-start"],["colspan","3",1,"text-center"],[1,"my-auto"],["class","text-start",4,"ngIf"],[1,"d-flex"],["target","_blank",1,"me-1",3,"href","title"],[2,"width","20px","height","20px",3,"src"],[1,"text-ellipsis","ps-2",2,"max-width","18vw",3,"matTooltip"],[1,"text-center"],["target","_blank",1,"btn","btn-small","btn-light","px-4","py-2",3,"href","ngClass","matTooltip"],[1,"fa-solid","fa-pencil","me-2",2,"font-size","10px"],[1,"fs-6"]],template:function(n,e){1&n&&(t.TgZ(0,"modal-material",0),t.NdJ("onCancel",function(){return e.dialogRef.close()}),t.TgZ(1,"div",1)(2,"table",2)(3,"thead",3)(4,"tr")(5,"th",4),t._uU(6," VARIANT "),t.TgZ(7,"sup"),t._UZ(8,"i",5),t.qZA()(),t.TgZ(9,"th",4),t._uU(10,"SKU"),t.qZA(),t.TgZ(11,"th",4),t._uU(12," PRODUCT "),t.TgZ(13,"sup"),t._UZ(14,"i",6),t.qZA()(),t.TgZ(15,"th",4),t._uU(16,"PRICE"),t.qZA(),t.TgZ(17,"th",7),t._uU(18,"INVENTORY"),t.qZA(),t._UZ(19,"th",4),t.qZA()(),t.TgZ(20,"tbody"),t.YNc(21,W,4,2,"ng-container",8),t.qZA()()()()),2&n&&(t.Q6J("config",e.modalConfig),t.xp6(21),t.Q6J("ngForOf",e.variants))},dependencies:[p.mk,p.sg,p.O5,M.gM,D.M,p.JJ],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}"]}),r})();var g=c(2181),f=c(4664),E=c(8645),A=c(9773),X=c(2096),tt=c(1449),S=c(9659);let nt=(()=>{var i;class r{constructor(n,e){this.LocalData=n,this.httpService=e}getCategoriesByTypeId(n,e){return this.LocalData.getCategoriesByChannelType(n).pipe((0,f.w)(a=>null!=a?(0,X.of)(a):this._getCategoriesByTypeID(n,e)))}_getCategoriesByTypeID(n,e){return this.httpService.post("/api/Channel/getCategoriesByTypeID",{TypeID:n,ID:e}).pipe((0,f.w)(l=>this.LocalData.saveCategoriesByChannelType(l,n)))}}return(i=r).\u0275fac=function(n){return new(n||i)(t.LFG(tt.T),t.LFG(S.O))},i.\u0275prov=t.Yz7({token:i,factory:i.\u0275fac,providedIn:"root"}),r})();var I=c(9229),u=c(6223),et=c(6107);function ot(i,r){if(1&i){const o=t.EpF();t.ynx(0),t.TgZ(1,"ng-select-infinite",16),t.NdJ("selectedChange",function(e){t.CHM(o);const a=t.oxw().index,l=t.oxw();return t.KtG(l.onSelectCategory(e,a))}),t.qZA(),t.BQk()}if(2&i){const o=t.oxw().$implicit;t.xp6(1),t.Q6J("items",o.Categories)("clearable",!1)}}function it(i,r){if(1&i&&(t.TgZ(0,"div",17),t._UZ(1,"input",18),t.qZA()),2&i){const o=t.oxw().$implicit,n=t.oxw();t.xp6(1),t.Q6J("placeholder",n.getChannelCategory(o.TypeID))}}function at(i,r){if(1&i){const o=t.EpF();t.ynx(0),t.TgZ(1,"tr")(2,"td",9)(3,"input",10),t.NdJ("ngModelChange",function(e){const l=t.CHM(o).$implicit;return t.KtG(l.Selected=e)})("ngModelChange",function(){t.CHM(o);const e=t.oxw();return t.KtG(e.onSelectChannel())}),t.qZA()(),t.TgZ(4,"td")(5,"div",11),t._UZ(6,"img",12),t.TgZ(7,"span",13),t._uU(8),t.qZA()()(),t.TgZ(9,"td"),t.YNc(10,ot,2,2,"ng-container",14),t.YNc(11,it,2,1,"ng-template",null,15,t.W1O),t.qZA()(),t.BQk()}if(2&i){const o=r.$implicit,n=t.MAs(12);t.xp6(3),t.Q6J("ngModel",o.Selected),t.xp6(3),t.Q6J("src",o.Img,t.LSH),t.xp6(2),t.Oqu(o.Name),t.xp6(2),t.Q6J("ngIf",o.Categories.length>0)("ngIfElse",n)}}let w=(()=>{var i;class r{constructor(n,e,a,l){this.data=n,this.channelService=e,this.dialogRef=a,this.toastrService=l,this.channelOptions=[],this.uploadResponse=[],this.channelType=h.x,this.enableBtnOk=!1,this.destroy$=new E.x,this.uploadResponse=[],this.channels=this.data.channels}ngOnInit(){this.initModalConfig(),this.initChannelOptions(),this.initCategories()}initModalConfig(){this.modalConfig=new U.O,this.modalConfig.title=this.data.title,this.modalConfig.bodyScrollable=!0}initCategories(){this.filterChannelTypeId().forEach(e=>{this.channelService.getCategoriesByTypeId(e.channelType,e.channelId).pipe((0,A.R)(this.destroy$)).subscribe(a=>{this.setCategoriesChannelOption(e.channelType,a)})})}setCategoriesChannelOption(n,e){this.channelOptions=this.channelOptions.map(a=>(a.TypeID==n&&(a.Categories=e),a))}initChannelOptions(){this.channelOptions=this.channels.map(n=>({Name:n.Name,Img:n.Img,ID:n.ID,Selected:!1,CategoryID:this.initDefaultChannelCategoryId(n.TypeID),TypeID:n.TypeID,Categories:[]}))}initDefaultChannelCategoryId(n){let e=0;return n===h.x.Lazada&&(e=6509),e}filterChannelTypeId(){return this.data.channels.map(e=>({channelType:e.TypeID,channelId:e.ID})).filter((e,a,l)=>l.findIndex(d=>e.channelType==d.channelType)==a).filter(e=>e.channelType==h.x.Tokopedia)}onSelectCategory(n,e){this.channelOptions[e].CategoryID=n,this.channelOptions[e].Selected=!0,this.onSelectChannel()}onSelectAllChannel(n){this.channelOptions=this.channelOptions.map(e=>(e.Selected=n,e)),this.enableBtnOk=n}onSelectChannel(){this.enableBtnOk=this.hasSelectedChannel()}hasSelectedChannel(){return-1!==this.channelOptions.findIndex(n=>n.Selected)}onClose(){this.dialogRef.close("CANCEL")}onSave(){if(!this.validateSelectedCategory())return void this.toastrService.warning("Category is required","Warning!");const n=this.channelOptions.filter(e=>e.Selected).map(e=>({CategoryID:e.CategoryID,ChannelID:e.ID}));this.dialogRef.close(n)}validateSelectedCategory(){return-1==this.channelOptions.filter(e=>e.Selected).filter(e=>e.TypeID==h.x.Tokopedia).findIndex(e=>0==e.CategoryID)}getChannelCategory(n){let e;switch(n){case h.x.ShopeeV2:e="Aksesoris Fashion";break;case h.x.Tiktok:e="Aksesoris Fashion - Aksesoris Pakaian";break;case h.x.WooCommerce:e="New Product";break;case h.x.Lazada:e="Fashion Accessories / Women Accessories / Others";break;default:e="Unavailable Category"}return e}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}}return(i=r).\u0275fac=function(n){return new(n||i)(t.Y36(_.WI),t.Y36(nt),t.Y36(_.so),t.Y36(I._W))},i.\u0275cmp=t.Xpm({type:i,selectors:[["app-modal-uploadMultiple-product"]],decls:15,vars:3,consts:[[3,"dynamicValidated","config","onOk","onClose","onCancel"],["content",""],[1,"table"],[1,"text-center",2,"width","6%"],["type","checkbox",3,"change"],[2,"width","30%"],[1,"fs-6"],[2,"width","60%"],[4,"ngFor","ngForOf"],[1,"text-center"],["type","checkbox",3,"ngModel","ngModelChange"],[1,"d-flex","align-items-center"],["alt","",1,"channel-logo-size",3,"src"],[1,"ms-3","fs-6"],[4,"ngIf","ngIfElse"],["EMPTY",""],["bindValue","Key","bindLabel","Value","width","100%","parent","body","position","top","placeholder","Select Category",3,"items","clearable","selectedChange"],["matTooltip","Product Category is Harcoded, Please Change Product Category in Seller Center","matTooltipPosition","above","matTooltipClass","custom-width-tooltip"],["type","text","disabled","",1,"form-control","rounded",2,"height","40px",3,"placeholder"]],template:function(n,e){1&n&&(t.TgZ(0,"modal-material",0),t.NdJ("onOk",function(){return e.onSave()})("onClose",function(){return e.onClose()})("onCancel",function(){return e.onClose()}),t.TgZ(1,"div",1)(2,"table",2)(3,"thead")(4,"tr")(5,"th",3)(6,"input",4),t.NdJ("change",function(l){return e.onSelectAllChannel(l.target.checked)}),t.qZA()(),t.TgZ(7,"th",5)(8,"span",6),t._uU(9,"CHANNEL"),t.qZA()(),t.TgZ(10,"th",7)(11,"span",6),t._uU(12,"CATEGORY"),t.qZA()()()(),t.TgZ(13,"tbody"),t.YNc(14,at,13,5,"ng-container",8),t.qZA()()()()),2&n&&(t.Q6J("dynamicValidated",e.enableBtnOk)("config",e.modalConfig),t.xp6(14),t.Q6J("ngForOf",e.channelOptions))},dependencies:[p.sg,p.O5,u.Wl,u.JJ,u.On,M.gM,D.M,et.R],styles:["input[type=checkbox]{width:15px;height:15px}img.channel-logo-size{width:24px;height:24px}table>thead>tr{border-top:none!important;border-left:none!important;border-right:none!important}\n"],encapsulation:2}),r})();var T=c(5993),x=c(4387),C=c(4807),Z=c(8558),k=c(1781),v=c(5439),O=c(8034);function lt(i,r){if(1&i){const o=t.EpF();t.TgZ(0,"button",15),t.NdJ("click",function(){t.CHM(o);const e=t.oxw();return t.KtG(e.onOpenScanDialog())}),t._UZ(1,"i",16),t._uU(2," Scan Channel "),t.qZA()}}function rt(i,r){if(1&i){const o=t.EpF();t.TgZ(0,"button",17),t.NdJ("click",function(){t.CHM(o);const e=t.oxw();return t.KtG(e.onScanMultipleProduct())}),t._UZ(1,"i",16),t._uU(2),t.qZA()}if(2&i){const o=t.oxw();let n;t.xp6(2),t.hij(" Scan (",null==(n=o.productService.selectedProduct(o.products))?null:n.length,") ")}}function ct(i,r){if(1&i){const o=t.EpF();t.TgZ(0,"button",18),t.NdJ("click",function(){t.CHM(o);const e=t.oxw();return t.KtG(e.onUploadMultipleProduct())}),t._UZ(1,"i",19),t._uU(2),t.qZA()}if(2&i){const o=t.oxw();let n;t.xp6(2),t.hij(" Upload (",null==(n=o.productService.selectedProduct(o.products))?null:n.length,") ")}}function st(i,r){if(1&i){const o=t.EpF();t.TgZ(0,"div",20)(1,"app-product-card",21),t.NdJ("onUpload",function(){const a=t.CHM(o).$implicit,l=t.oxw();return t.KtG(l.onUploadToMultipleChannel(a))})("onScan",function(){const a=t.CHM(o).$implicit,l=t.oxw();return t.KtG(l.onScanSingleProduct(a))})("onDescEvent",function(){const a=t.CHM(o).index,l=t.oxw();return t.KtG(l.onOpenDialogVariant(a))})("onCheckBoxChange",function(e){const l=t.CHM(o).$implicit;return t.KtG(l.selected=e)}),t.qZA()()}if(2&i){const o=r.$implicit,n=t.oxw();t.xp6(1),t.Q6J("productId",o.ID)("title",null==o?null:o.Name)("image",null==o?null:o.ThumbnailUrl)("description",(null==o?null:o.Variants.length)>1?(null==o?null:o.Variants.length)+" Variants":null)("channels",n.productService.getChannelProduct(o))("code",n.getVariantCode(null==o?null:o.Variants))("showCheckBox",(null==o?null:o.Channel.length)<n.channelOptions.length)("scanButton",!0)("uploadButton",null==o?null:o.hasUpload)("imageForZoom",null==o?null:o.ImageUrl)}}function dt(i,r){1&i&&(t.ynx(0),t.TgZ(1,"div",22),t._UZ(2,"app-empty-state"),t.qZA(),t.BQk())}function pt(i,r){if(1&i){const o=t.EpF();t.ynx(0),t.TgZ(1,"div",23)(2,"div",24)(3,"app-custom-paginator",25),t.NdJ("next",function(){t.CHM(o);const e=t.oxw();return t.KtG(e.onNextPage())})("previous",function(){t.CHM(o);const e=t.oxw();return t.KtG(e.onPrevPage())}),t.qZA()()(),t.BQk()}if(2&i){const o=t.oxw();t.xp6(3),t.Q6J("filter",o.searchFilter)("totaldata",null==o.products?null:o.products.length)("paginationTotal",o.rowCount)("hasClicked",!0)}}let ht=(()=>{var i;class r{constructor(n,e,a,l){this.http=n,this.toastr=e,this.dialog=a,this.productService=l,this.searchFilter=new F.k,this.products=[],this.rowCount=0,this.getLoaderPage()}getLoaderPage(){this.productService.LoadInPOS().subscribe(n=>{this.channelOptions=n.Options.Channel,this.Categories=n.Options.Categories,this.searchFilter.PageNumber=n.Filter.PageNumber,this.searchFilter.RowCount=n.Filter.RowCount,this.searchFilter.ChannelID=null,this.searchFilter.Category=n.Filter.Category,this.searchFilter.PageSize=100,this.getProducts()})}getProducts(){this.http.post("/api/product/GetInPOS",{PageNumber:this.searchFilter.PageNumber,RowCount:this.searchFilter.RowCount,text:this.searchFilter.text,Category:this.searchFilter.Category,From:this.startDate,To:this.endDate}).subscribe(e=>{this.products=e.Data,this.rowCount=null==e.Total?this.searchFilter.RowCount:e.Total.toString(),this.products=this.productService.checkProductHasUploadBtn(this.products,this.channelOptions)})}onOpenScanDialog(){let n=JSON.parse(JSON.stringify(this.searchFilter));n.ChannelID=s.g.GuidEMpty,this.dialog.open(m.j,{data:{filter:n,channelOptions:this.channelOptions},width:"600px"}).afterClosed().pipe((0,g.h)(a=>s.g.IsNotEmpty(a))).subscribe(a=>{this.searchFilter.ChannelID=a.ChannelID,this.searchFilter.ScanFull=a.ScanFull,this.searchFilter.UpdatedProduct=a.UpdatedProduct,this.searchFilter.Async=a.Async,this.scanAllProduct()})}scanAllProduct(){null!=this.searchFilter.ChannelID?this.productService.scanAll(this.searchFilter.ChannelID,this.searchFilter.ScanFull,this.searchFilter.UpdatedProduct,this.searchFilter.Async).subscribe(n=>{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 e=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);this.productService.successToastrScanAllProduct(n,e,!this.searchFilter.UpdatedProduct)}}):this.toastr.error("Please Select Channel","Error")}onOpenDialogVariant(n){this.dialog.open(q,{data:{title:this.products[n].Name,variants:this.products[n].Variants},width:"800px"})}onUploadMultipleProduct(){let n=this.productService.selectedProduct(this.products),e=this.productService.filterUnselectedChannel(n,this.channelOptions);this.dialog.open(w,{width:"700px",data:{title:"Upload Multiple Product",channels:e}}).afterClosed().pipe((0,g.h)(a=>"CANCEL"!==a),(0,f.w)(a=>this.productService.uploadMultipleProduct(n,a))).subscribe({next:a=>{this.getProducts()}})}onUploadToMultipleChannel(n){let e=this.productService.getChannelProduct(n);n.Channel=e;let a=this.productService.filterUnselectedChannel([n],this.channelOptions);this.dialog.open(w,{width:"700px",data:{title:`Upload - ${n.Name}`,channels:a}}).afterClosed().pipe((0,g.h)(l=>"CANCEL"!==l),(0,f.w)(l=>this.productService.uploadSingleProduct([n],l))).subscribe({next:l=>{this.getProducts()}})}searchProduct(n){this.searchFilter.text=n,this.getProducts()}onNextPage(){this.searchFilter.PageNumber=this.searchFilter.PageNumber+1,this.getProducts()}onPrevPage(){this.searchFilter.PageNumber=this.searchFilter.PageNumber-1,this.getProducts()}onScanMultipleProduct(){let n=JSON.parse(JSON.stringify(this.searchFilter));n.ChannelID=s.g.GuidEMpty;let e=this.productService.filterChannelByTypeId(this.channelOptions,[h.x.Tokopedia,h.x.Tiktok]);this.dialog.open(m.j,{data:{filter:n,channelOptions:e,isSingleChannel:!0},width:"600px"}).afterClosed().pipe((0,g.h)(l=>s.g.IsNotEmpty(l))).subscribe(l=>{this.searchFilter.ChannelID=l.ChannelID,this.searchFilter.ScanFull=l.ScanFull,this.searchFilter.UpdatedProduct=l.UpdatedProduct;let d=this.productService.selectedProduct(this.products),N=this.productService.getVariantCodesProducts(d);this.scanSingleProduct(N)})}onScanSingleProduct(n){let e=JSON.parse(JSON.stringify(this.searchFilter));e.ChannelID=s.g.GuidEMpty,this.dialog.open(m.j,{data:{filter:e,channelOptions:this.channelOptions,isSingleChannel:!0},width:"600px"}).afterClosed().pipe((0,g.h)(a=>s.g.IsNotEmpty(a))).subscribe(a=>{this.searchFilter.ChannelID=a.ChannelID;const l=this.productService.getVariantCodesProduct(n);this.scanSingleProduct(l)})}scanSingleProduct(n){this.productService.scanSingle(this.searchFilter.ChannelID,n).subscribe({next:e=>{if(e)this.toastr.success("Successfully Scan ","Success");else{let a=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);this.toastr.error(`This product is not existed in ${a?.Name} `,"Error")}this.searchFilter.ChannelID=s.g.GuidEMpty,e&&this.getProducts()},error:e=>{this.searchFilter.ChannelID=s.g.GuidEMpty}})}getVariantCode(n){let e;return n.length>1&&(e=(n[0].model?n[0].model:"")+n[0].Code),1==n.length&&(e=n[0].Code),e}}return(i=r).\u0275fac=function(n){return new(n||i)(t.Y36(S.O),t.Y36(I._W),t.Y36(_.uw),t.Y36(T.M))},i.\u0275cmp=t.Xpm({type:i,selectors:[["app-in-pos"]],decls:26,vars:13,consts:[["description","All products which is already available in POS",3,"headerTitle","onSubmit"],["type","button","data-cy","scanSoldinChannel","class","btn btn-outline-secondary shadow rounded",3,"click",4,"ngIf"],["type","button","data-cy","scanInPos","class","btn btn-outline-secondary shadow rounded me-2",3,"click",4,"ngIf"],["class","btn btn-light shadow rounded ms-2",3,"click",4,"ngIf"],[1,"d-flex"],["container",""],["bindLabel","Name","name","Name","bindValue","Name","placeholder","Select Category",1,"center-text",3,"clearable","items","ngModel","ngModelChange"],["id","dates",1,"form-control","rounded","dateRange",3,"rangePicker"],["matStartDate","","placeholder","Start date",3,"ngModel","ngModelChange","click"],["matEndDate","","placeholder","End date",3,"ngModel","ngModelChange","click"],["picker",""],[1,"container-fluid"],[1,"row","mt-8"],["class","col-12 col-md-6 col-xl-4 px-3 my-3",4,"ngFor","ngForOf"],[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,"productId","title","image","description","channels","code","showCheckBox","scanButton","uploadButton","imageForZoom","onUpload","onScan","onDescEvent","onCheckBoxChange"],[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,"filter","totaldata","paginationTotal","hasClicked","next","previous"]],template:function(n,e){if(1&n){const a=t.EpF();t.TgZ(0,"mainpanel",0),t.NdJ("onSubmit",function(d){return e.searchProduct(d)}),t.TgZ(1,"actions"),t.YNc(2,lt,3,0,"button",1),t.YNc(3,rt,3,1,"button",2),t.YNc(4,ct,3,1,"button",3),t.qZA(),t.TgZ(5,"filters")(6,"div",4)(7,"div",5)(8,"div")(9,"h6"),t._uU(10,"Category "),t.qZA(),t.TgZ(11,"ng-select",6),t.NdJ("ngModelChange",function(d){return e.searchFilter.Category=d}),t.qZA()(),t.TgZ(12,"div")(13,"h6"),t._uU(14,"Release"),t.qZA(),t.TgZ(15,"mat-date-range-input",7)(16,"input",8),t.NdJ("ngModelChange",function(d){return e.startDate=d})("click",function(){t.CHM(a);const d=t.MAs(19);return t.KtG(d.open())}),t.qZA(),t.TgZ(17,"input",9),t.NdJ("ngModelChange",function(d){return e.endDate=d})("click",function(){t.CHM(a);const d=t.MAs(19);return t.KtG(d.open())}),t.qZA()(),t._UZ(18,"mat-date-range-picker",null,10),t.qZA()()()(),t.TgZ(20,"content")(21,"div",11)(22,"div",12),t.YNc(23,st,2,10,"div",13),t.YNc(24,dt,3,0,"ng-container",14),t.qZA(),t.YNc(25,pt,4,4,"ng-container",14),t.qZA()()()}if(2&n){const a=t.MAs(19);t.Q6J("headerTitle","In POS ("+e.rowCount+")"),t.xp6(2),t.Q6J("ngIf",!e.productService.hasSelection(e.products)),t.xp6(1),t.Q6J("ngIf",e.productService.hasSelection(e.products)),t.xp6(1),t.Q6J("ngIf",e.productService.hasSelection(e.products)),t.xp6(7),t.Q6J("clearable",!0)("items",e.Categories)("ngModel",e.searchFilter.Category),t.xp6(4),t.Q6J("rangePicker",a),t.xp6(1),t.Q6J("ngModel",e.startDate),t.xp6(1),t.Q6J("ngModel",e.endDate),t.xp6(6),t.Q6J("ngForOf",e.products),t.xp6(1),t.Q6J("ngIf",0==e.products.length),t.xp6(1),t.Q6J("ngIf",e.products.length>0)}},dependencies:[p.sg,p.O5,u.Fj,u.JJ,u.On,x.p,C.w9,Z.y,k.Y,v.s,O.wx,O.zY,O.By,O._g],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}"]}),r})();function ut(i,r){if(1&i){const o=t.EpF();t.TgZ(0,"button",13),t.NdJ("click",function(){t.CHM(o);const e=t.oxw();return t.KtG(e.onOpenScanDialog())}),t._UZ(1,"i",14),t._uU(2," Scan Channel "),t.qZA()}}function gt(i,r){if(1&i){const o=t.EpF();t.TgZ(0,"button",15),t.NdJ("click",function(){t.CHM(o);const e=t.oxw();return t.KtG(e.onScanMultipleProduct())}),t._UZ(1,"i",14),t._uU(2),t.qZA()}if(2&i){const o=t.oxw();t.xp6(2),t.hij(" Scan (",o.productService.selectedProduct(o.products).length,") ")}}function _t(i,r){if(1&i){const o=t.EpF();t.TgZ(0,"button",16),t.NdJ("click",function(){t.CHM(o);const e=t.oxw();return t.KtG(e.onUploadMultipleProduct())}),t._UZ(1,"i",17),t._uU(2),t.qZA()}if(2&i){const o=t.oxw();t.xp6(2),t.hij(" Upload (",o.productService.selectedProduct(o.products).length,") ")}}function mt(i,r){if(1&i&&(t.TgZ(0,"span",18),t._UZ(1,"img",19),t.qZA(),t._uU(2)),2&i){const o=r.item,n=t.oxw();t.xp6(1),t.Q6J("src",n.getChannelLogo(o.TypeID),t.LSH),t.xp6(1),t.hij(" ",o.Name," ")}}function Ct(i,r){if(1&i){const o=t.EpF();t.TgZ(0,"div")(1,"h6"),t._uU(2,"Item ID"),t.qZA(),t.TgZ(3,"input",20),t.NdJ("ngModelChange",function(e){t.CHM(o);const a=t.oxw();return t.KtG(a.searchFilter.Item_id=e)}),t.qZA()()}if(2&i){const o=t.oxw();t.xp6(3),t.Q6J("ngModel",o.searchFilter.Item_id)}}function ft(i,r){if(1&i){const o=t.EpF();t.TgZ(0,"div",21)(1,"app-product-card",22),t.NdJ("onUpload",function(){const a=t.CHM(o).$implicit,l=t.oxw();return t.KtG(l.onUploadToMultipleChannel(a))})("onDescEvent",function(){const a=t.CHM(o).index,l=t.oxw();return t.KtG(l.onOpenVariantDetail(a))})("onScan",function(){const a=t.CHM(o).$implicit,l=t.oxw();return t.KtG(l.onScanSingleProduct(a))})("onCheckBoxChange",function(e){const l=t.CHM(o).$implicit;return t.KtG(l.selected=e)}),t.qZA()()}if(2&i){const o=r.$implicit,n=t.oxw();t.xp6(1),t.Q6J("productId",null==o?null:o.ID)("title",null==o?null:o.Name)("image",null==o?null:o.ThumbnailUrl)("description",(null==o||null==o.Variants?null:o.Variants.length)>1?(null==o||null==o.Variants?null:o.Variants.length)+" Variants":null)("channels",n.productService.getChannelProduct(o))("code",n.getVariantCode(null==o?null:o.Variants))("showCheckBox",null==o?null:o.hasScan)("scanButton",!0)("uploadButton",null==o?null:o.hasUpload)("imageForZoom",null==o?null:o.ImageUrl)}}function xt(i,r){1&i&&(t.ynx(0),t.TgZ(1,"div",23),t._UZ(2,"app-empty-state"),t.qZA(),t.BQk())}function Pt(i,r){if(1&i){const o=t.EpF();t.TgZ(0,"div",24)(1,"div",25)(2,"app-custom-paginator",26),t.NdJ("total",function(){t.CHM(o);const e=t.oxw();return t.KtG(e.getRowCount())})("next",function(){t.CHM(o);const e=t.oxw();return t.KtG(e.onNextPage())})("previous",function(){t.CHM(o);const e=t.oxw();return t.KtG(e.onPreviousPage())}),t.qZA()()()}if(2&i){const o=t.oxw();t.xp6(2),t.Q6J("filter",o.searchFilter)("totaldata",null==o.products?null:o.products.length)("paginationTotal",o.rowCount)("hasClicked",o.hasClickRowCount)}}let bt=(()=>{var i;class r{constructor(n,e,a,l,d){this.http=n,this.dialog=e,this.toastr=a,this.productService=l,this.activateRouter=d,this.searchFilter=new F.k,this.products=[],this.rowCount=0,this.hasClickRowCount=!1,this.guidEmpty=s.g.GuidEMpty}ngOnInit(){this.activateRouter.queryParams.subscribe(n=>{this.initPageLoader(n.ID?n.ID:s.g.GuidEMpty)})}initPageLoader(n){this.productService.loader(n).subscribe(e=>{this.channelOptions=e.Options.Channel,this.searchFilter=e.Filter,e.Filter.ChannelID!=s.g.GuidEMpty&&(this.searchFilter.ListChannelID=[],this.searchFilter.ListChannelID.push(e.Filter.ChannelID)),this.searchFilter.PageSize=e.Filter.RowCount,this.searchFilter.Item_id="",this.getProducts()})}getProducts(){this.productService.findAllSoldInChannel({ListChannelID:this.searchFilter.ListChannelID,PageNumber:this.searchFilter.PageNumber,RowCount:this.searchFilter.RowCount,text:this.searchFilter.text,Item_id:this.searchFilter.Item_id}).subscribe(e=>{this.products=e.Data,this.products=this.productService.checkProductHasUploadBtn(this.products,this.channelOptions),this.products=this.productService.checkProductHasScanButton(this.products,this.channelOptions)})}searchProduct(n){this.searchFilter.text=n,this.hasClickRowCount=!1,this.getProducts()}onOpenVariantDetail(n){this.dialog.open(q,{data:{variants:this.products[n].Variants,title:this.products[n].Name},width:"800px"})}onOpenScanDialog(){let n=JSON.parse(JSON.stringify(this.searchFilter));n.ChannelID=s.g.GuidEMpty,this.dialog.open(m.j,{data:{filter:n,channelOptions:this.channelOptions},width:"600px"}).afterClosed().pipe((0,g.h)(a=>s.g.IsNotEmpty(a))).subscribe(a=>{this.searchFilter.ChannelID=a.ChannelID,this.searchFilter.ScanFull=a.ScanFull,this.searchFilter.UpdatedProduct=a.UpdatedProduct,this.searchFilter.Async=a.Async,this.scanAllProduct()})}scanAllProduct(){let n=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);this.productService.scanAll(this.searchFilter.ChannelID,this.searchFilter.ScanFull,this.searchFilter.UpdatedProduct,this.searchFilter.Async).pipe((0,g.h)(e=>e)).subscribe(e=>{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(e,n,!this.searchFilter.UpdatedProduct),this.initPageLoader(s.g.GuidEMpty))})}onScanSingleProduct(n){n.Channel=this.productService.getChannelProduct(n);let e=JSON.parse(JSON.stringify(this.searchFilter));this.dialog.open(m.j,{data:{filter:e,channelOptions:this.channelOptions,isSingleChannel:!0},width:"600px"}).afterClosed().pipe((0,g.h)(a=>s.g.IsNotEmpty(a))).subscribe(a=>{this.searchFilter.ChannelID=a.ChannelID;const l=this.productService.getVariantCodesProduct(n);this.scanProducts(l)})}onUploadToMultipleChannel(n){let e=this.productService.getChannelProduct(n);n.Channel=e;let a=this.productService.filterUnselectedChannel([n],this.channelOptions);this.dialog.open(w,{width:"700px",data:{title:`Upload - ${n.Name}`,channels:a}}).afterClosed().pipe((0,g.h)(l=>"CANCEL"!==l),(0,f.w)(l=>this.productService.uploadSingleProduct([n],l))).subscribe({next:l=>{this.getProducts()}})}onScanMultipleProduct(){let n=this.productService.filterChannelByTypeId(this.channelOptions,[h.x.Tokopedia,h.x.Tiktok]);this.searchFilter.ChannelID=s.g.GuidEMpty;let e=JSON.parse(JSON.stringify(this.searchFilter));this.dialog.open(m.j,{data:{filter:e,channelOptions:n,isSingleChannel:!0},width:"600px"}).afterClosed().pipe((0,g.h)(l=>s.g.IsNotEmpty(l))).subscribe(l=>{this.searchFilter.ChannelID=l.ChannelID,this.searchFilter.ScanFull=l.ScanFull,this.searchFilter.UpdatedProduct=l.UpdatedProduct;let d=this.productService.selectedProduct(this.products),N=this.productService.getVariantCodesProducts(d);this.scanProducts(N)})}scanProducts(n){this.productService.scanSingle(this.searchFilter.ChannelID,n).subscribe({next:e=>{let a=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);e?this.toastr.success(`Product Successfully scan with ${a?.Name}`,"Success"):this.toastr.error(`This product is not existed in ${a?.Name} `,"Error"),this.searchFilter.ChannelID=s.g.GuidEMpty,e&&this.getProducts()},error:e=>{this.searchFilter.ChannelID=s.g.GuidEMpty}})}getVariantCode(n){let e;return n.length>1&&(e=(n[0].model?n[0].model:"")+n[0].Code),1==n.length&&(e=n[0].Code),e}onClearFilterChannel(){this.searchFilter.ChannelID=s.g.GuidEMpty,this.searchFilter.Item_id=""}onUploadMultipleProduct(){let n=this.productService.selectedProduct(this.products),e=this.productService.filterUnselectedChannel(n,this.channelOptions);this.dialog.open(w,{width:"700px",data:{title:"Upload Multiple Product",channels:e}}).afterClosed().pipe((0,g.h)(a=>"CANCEL"!==a),(0,f.w)(a=>this.productService.uploadMultipleProduct(n,a))).subscribe({next:a=>{this.getProducts()}})}getRowCount(){this.http.post("/api/product/GetSoldInChannelRowCount",{ListChannelID:this.searchFilter.ListChannelID,text:this.searchFilter.text}).subscribe(e=>{this.hasClickRowCount=!0,this.rowCount=e.Total})}onNextPage(){this.searchFilter.PageNumber=this.searchFilter.PageNumber+1,this.getProducts()}onPreviousPage(){this.searchFilter.PageNumber=this.searchFilter.PageNumber-1,this.getProducts()}getChannelLogo(n){return s.g.getChannelLogoByTypeId(n)}}return(i=r).\u0275fac=function(n){return new(n||i)(t.Y36(S.O),t.Y36(_.uw),t.Y36(I._W),t.Y36(T.M),t.Y36(P.gz))},i.\u0275cmp=t.Xpm({type:i,selectors:[["app-sold-in-channel"]],decls:20,vars:12,consts:[["description","SKU has been mapped between dealpos and marketplace",3,"headerTitle","onSubmit"],["type","button","data-cy","scanSoldinChannel","class","btn btn-outline-secondary shadow rounded",3,"click",4,"ngIf"],["type","button","data-cy","scanInPos","class","btn btn-outline-secondary shadow rounded me-2",3,"click",4,"ngIf"],["class","btn btn-light shadow rounded ms-2",3,"click",4,"ngIf"],[1,"d-flex"],["container",""],["bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"clearable","multiple","items","ngModel","ngModelChange","clear"],["ng-option-tmp",""],[4,"ngIf"],[1,"container-fluid"],[1,"row","mt-8"],["class","col-12 col-md-6 col-xl-4 px-3 my-3",4,"ngFor","ngForOf"],["class","row",4,"ngIf"],["type","button","data-cy","scanSoldinChannel",1,"btn","btn-outline-secondary","shadow","rounded",3,"click"],[1,"fas","fa-lg","fa-crosshairs"],["type","button","data-cy","scanInPos",1,"btn","btn-outline-secondary","shadow","rounded","me-2",3,"click"],[1,"btn","btn-light","shadow","rounded","ms-2",3,"click"],["aria-hidden","true",1,"fa","fa-upload"],[1,"me-2"],["alt","",2,"width","18px",3,"src"],["type","text","name","Item_id","id","Item_id",1,"form-control",3,"ngModel","ngModelChange"],[1,"col-12","col-md-6","col-xl-4","px-3","my-3"],[3,"productId","title","image","description","channels","code","showCheckBox","scanButton","uploadButton","imageForZoom","onUpload","onDescEvent","onScan","onCheckBoxChange"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"row"],[1,"col-12"],[3,"filter","totaldata","paginationTotal","hasClicked","total","next","previous"]],template:function(n,e){1&n&&(t.TgZ(0,"mainpanel",0),t.NdJ("onSubmit",function(l){return e.searchProduct(l)}),t.TgZ(1,"actions"),t.YNc(2,ut,3,0,"button",1),t.YNc(3,gt,3,1,"button",2),t.YNc(4,_t,3,1,"button",3),t.qZA(),t.TgZ(5,"filters")(6,"div",4)(7,"div",5)(8,"div")(9,"h6"),t._uU(10,"Channel"),t.qZA(),t.TgZ(11,"ng-select",6),t.NdJ("ngModelChange",function(l){return e.searchFilter.ListChannelID=l})("clear",function(){return e.onClearFilterChannel()}),t.YNc(12,mt,3,2,"ng-template",7),t.qZA()(),t.YNc(13,Ct,4,1,"div",8),t.qZA()()(),t.TgZ(14,"content")(15,"div",9)(16,"div",10),t.YNc(17,ft,2,10,"div",11),t.YNc(18,xt,3,0,"ng-container",8),t.qZA(),t.YNc(19,Pt,3,4,"div",12),t.qZA()()()),2&n&&(t.Q6J("headerTitle","Sold in Channel"),t.xp6(2),t.Q6J("ngIf",!e.productService.hasSelection(e.products)),t.xp6(1),t.Q6J("ngIf",e.productService.hasSelection(e.products)),t.xp6(1),t.Q6J("ngIf",e.productService.hasSelection(e.products)),t.xp6(7),t.Q6J("clearable",!0)("multiple",!0)("items",e.channelOptions)("ngModel",e.searchFilter.ListChannelID),t.xp6(2),t.Q6J("ngIf",null!=e.searchFilter.ListChannelID),t.xp6(4),t.Q6J("ngForOf",e.products),t.xp6(1),t.Q6J("ngIf",0==e.products.length),t.xp6(1),t.Q6J("ngIf",null==e.products?null:e.products.length))},dependencies:[p.sg,p.O5,u.Fj,u.JJ,u.On,x.p,C.w9,C.ir,Z.y,k.Y,v.s],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}"]}),r})();var y=c(4575),St=c(9397),It=c(7398),Tt=c(8695),vt=c(278);function yt(i,r){if(1&i){const o=t.EpF();t.TgZ(0,"button",10),t.NdJ("click",function(){t.CHM(o);const e=t.oxw(2);return t.KtG(e.uploadMultipleProduct())}),t._UZ(1,"i",11),t._uU(2),t.qZA()}if(2&i){const o=t.oxw(2);t.xp6(2),t.hij(" upload (",null==o.selectedProducts?null:o.selectedProducts.length,") ")}}function Mt(i,r){if(1&i){const o=t.EpF();t.ynx(0),t.TgZ(1,"td",27)(2,"input",28),t.NdJ("ngModelChange",function(e){t.CHM(o);const a=t.oxw(2).$implicit;return t.KtG(a.selected=e)})("ngModelChange",function(){t.CHM(o);const e=t.oxw(3).ngIf,a=t.oxw(3);return t.KtG(a.onSelectProduct(e))}),t.qZA()(),t.BQk()}if(2&i){const o=t.oxw(2).$implicit;t.xp6(1),t.Q6J("rowSpan",null==o?null:o.Variants.length),t.xp6(1),t.Q6J("ngModel",o.selected)}}function wt(i,r){if(1&i){const o=t.EpF();t.ynx(0),t.TgZ(1,"img",34),t.NdJ("click",function(e){t.CHM(o);const a=t.oxw(3).$implicit,l=t.oxw(4);return t.KtG(l.onZoomImage(e,null==a?null:a.ImageUrl))}),t.qZA(),t.BQk()}if(2&i){const o=t.oxw(3).$implicit;t.xp6(1),t.Q6J("src",null==o?null:o.ImageUrl,t.LSH)}}function Zt(i,r){1&i&&t._UZ(0,"img",35)}function Ot(i,r){if(1&i&&(t.ynx(0),t.TgZ(1,"td",27)(2,"div",29),t.YNc(3,wt,2,1,"ng-container",7),t.YNc(4,Zt,1,0,"ng-template",null,30,t.W1O),t.qZA()(),t.TgZ(6,"td",31)(7,"h4",32)(8,"span",33),t._uU(9),t.qZA()()(),t.BQk()),2&i){const o=t.MAs(5),n=t.oxw(2).$implicit;t.xp6(1),t.Q6J("rowSpan",null==n?null:n.Variants.length),t.xp6(2),t.Q6J("ngIf",null==n?null:n.ImageUrl)("ngIfElse",o),t.xp6(3),t.Q6J("rowSpan",null==n?null:n.Variants.length),t.xp6(2),t.Q6J("matTooltip",(null==n||null==n.Name?null:n.Name.length)>50?null==n?null:n.Name:""),t.xp6(1),t.hij(" ",null==n?null:n.Name," ")}}function Nt(i,r){if(1&i&&(t.TgZ(0,"div")(1,"a",23),t._UZ(2,"img",36),t.qZA()()),2&i){const o=r.$implicit;t.xp6(1),t.Q6J("href",o.URL,t.LSH),t.xp6(1),t.Q6J("src",o.Img,t.LSH)("matTooltip",o.Name)}}function Ft(i,r){if(1&i&&(t.TgZ(0,"div"),t._UZ(1,"img",36),t.qZA()),2&i){const o=r.$implicit;t.xp6(1),t.Q6J("src",o.Img,t.LSH)("matTooltip",o.Name)}}function At(i,r){if(1&i&&(t.TgZ(0,"tr"),t.YNc(1,Mt,3,2,"ng-container",20),t.YNc(2,Ot,10,6,"ng-container",20),t.TgZ(3,"td"),t._uU(4),t.qZA(),t.TgZ(5,"td")(6,"span"),t._uU(7),t.qZA(),t.TgZ(8,"span",22)(9,"a",23),t._UZ(10,"i",24),t.qZA()()(),t.TgZ(11,"td",25)(12,"div",26),t.YNc(13,Nt,3,3,"div",21),t.qZA()(),t.TgZ(14,"td",25)(15,"div",26),t.YNc(16,Ft,2,2,"div",21),t.qZA()()()),2&i){const o=r.$implicit,n=r.index,e=t.oxw(5);t.xp6(1),t.Q6J("ngIf",0==n),t.xp6(1),t.Q6J("ngIf",0==n),t.xp6(2),t.hij(" ",o.Name," "),t.xp6(3),t.hij(" ",o.Code," "),t.xp6(2),t.Q6J("href","https://"+e.hostName+"/menu/Products/Catalog/Variants/Info?ID="+(null==o?null:o.ID),t.LSH),t.xp6(4),t.Q6J("ngForOf",null==o?null:o.Available),t.xp6(3),t.Q6J("ngForOf",null==o?null:o.NotAvailable)}}function kt(i,r){if(1&i&&(t.ynx(0),t.YNc(1,At,17,7,"tr",21),t.BQk()),2&i){const o=r.$implicit;t.xp6(1),t.Q6J("ngForOf",o.Variants)}}function Ut(i,r){if(1&i&&(t.TgZ(0,"tbody"),t.YNc(1,kt,2,1,"ng-container",21),t.qZA()),2&i){const o=r.ngIf;t.xp6(1),t.Q6J("ngForOf",o)}}function Dt(i,r){if(1&i&&(t.ynx(0),t.TgZ(1,"div",12)(2,"table",13)(3,"thead",14)(4,"tr"),t._UZ(5,"th",15),t.TgZ(6,"th",16),t._uU(7,"Product"),t.qZA(),t.TgZ(8,"th",17),t._uU(9,"Variant"),t.qZA(),t.TgZ(10,"th",17),t._uU(11,"SKU"),t.qZA(),t.TgZ(12,"th",18),t._uU(13,"Available In"),t.qZA(),t.TgZ(14,"th",19),t._uU(15,"Not Available In"),t.qZA()()(),t.YNc(16,Ut,2,1,"tbody",20),t.ALo(17,"async"),t.qZA()(),t.BQk()),2&i){const o=t.oxw(2);t.xp6(16),t.Q6J("ngIf",t.lcZ(17,1,o.data$))}}function Jt(i,r){1&i&&(t.TgZ(0,"div",37),t._UZ(1,"app-empty-state"),t.qZA())}function Lt(i,r){if(1&i){const o=t.EpF();t.TgZ(0,"span",45),t.NdJ("click",function(){t.CHM(o);const e=t.oxw(3);return t.KtG(e.getRowCount())}),t.TgZ(1,"i",46),t._uU(2,"?"),t.qZA()()}}function Qt(i,r){if(1&i&&(t.TgZ(0,"span"),t._uU(1),t.ALo(2,"number"),t.qZA()),2&i){const o=r.ngIf;t.xp6(1),t.Oqu(t.lcZ(2,1,null==o?null:o.Count))}}function qt(i,r){if(1&i){const o=t.EpF();t.TgZ(0,"a",47),t.NdJ("click",function(){t.CHM(o);const e=t.oxw(3);return t.KtG(e.onNextPage())}),t._UZ(1,"i",48),t._uU(2," Next"),t.qZA()}}function Et(i,r){if(1&i){const o=t.EpF();t.TgZ(0,"a",49),t.NdJ("click",function(){t.CHM(o);const e=t.oxw(3);return t.KtG(e.onLastPage())}),t._UZ(1,"i",50),t._uU(2," Last"),t.qZA()}}function Yt(i,r){if(1&i&&(t.TgZ(0,"div",38)(1,"div",39)(2,"div",40),t._uU(3),t.ALo(4,"number"),t.YNc(5,Lt,3,0,"span",41),t.YNc(6,Qt,3,3,"span",20),t.ALo(7,"async"),t._uU(8),t.qZA()(),t.TgZ(9,"div",42),t.YNc(10,qt,3,0,"a",43),t.YNc(11,Et,3,0,"a",44),t.qZA()()),2&i){const o=r.ngIf,n=t.oxw(2);t.xp6(3),t.hij(" Showing 1 - ",t.lcZ(4,6,null==o?null:o.length)," of "),t.xp6(2),t.Q6J("ngIf",n.paginationService.hideCount),t.xp6(1),t.Q6J("ngIf",!n.paginationService.hideCount&&t.lcZ(7,8,n.rowCount$)),t.xp6(2),t.hij(" records ~ ",n.paginationService.footerPageNumber," Page "),t.xp6(2),t.Q6J("ngIf",n.paginationService.disableNextButton&&!n.paginationService.goToLastPage),t.xp6(1),t.Q6J("ngIf",n.paginationService.disableNextButton&&!n.paginationService.goToLastPage)}}function Bt(i,r){if(1&i){const o=t.EpF();t.TgZ(0,"mainpanel",1),t.NdJ("onSubmit",function(e){t.CHM(o);const a=t.oxw();return t.KtG(a.searchProduct(e))}),t.TgZ(1,"actions"),t.YNc(2,yt,3,1,"button",2),t.TgZ(3,"button",3),t.NdJ("click",function(){const a=t.CHM(o).ngIf,l=t.oxw();return t.KtG(l.openScanDialog(a))}),t._UZ(4,"i",4),t._uU(5," Scan Channel "),t.qZA()(),t.TgZ(6,"content")(7,"div",5)(8,"div",6),t.YNc(9,Dt,18,3,"ng-container",7),t.ALo(10,"async"),t.YNc(11,Jt,2,0,"ng-template",null,8,t.W1O),t.qZA(),t.YNc(13,Yt,12,10,"div",9),t.ALo(14,"async"),t.qZA()()()}if(2&i){const o=t.MAs(12),n=t.oxw();let e;t.Q6J("hideSearchDropdown",!0),t.xp6(2),t.Q6J("ngIf",n.hasSelectionProduct),t.xp6(7),t.Q6J("ngIf",(null==(e=t.lcZ(10,5,n.data$))?null:e.length)>0)("ngIfElse",o),t.xp6(4),t.Q6J("ngIf",t.lcZ(14,7,n.data$))}}let Vt=(()=>{var i;class r{constructor(n,e,a,l,d,N){this.http=n,this.dialog=e,this.toastr=a,this.productService=l,this.paginationService=d,this.biggerPictureService=N,this.loaderAPI="product/Load",this.rowCountAPI="product/GetNotInChannelRowCount",this.notChannelAPI="product/GetNotInChannelV2",this.hasSelectionProduct=!1,this.selectedProducts=[]}ngOnInit(){this.initPageLoader(),this.iniData(),this.initHostName()}initHostName(){const n=localStorage.getItem("Authorization");this.hostName=JSON.parse(n)?.Host}initPageLoader(){this.paginationService.fetchDataEndpoint=this.notChannelAPI,this.loader$=this.http.post(`api/${this.loaderAPI}`,{}).pipe((0,St.b)(n=>{this.filterSearch=n.Filter,this.paginationService.reloadPagination(n.Filter)}))}iniData(){this.data$=this.paginationService.data$.pipe((0,It.U)(n=>n.map(e=>(e.Variants=e.Variants.map(a=>(a.Available=this.productService.sortChannel(a.Available),a.NotAvailable=this.productService.sortChannel(a.NotAvailable),a.Available=this.assignLogoChannel(a.Available),a.NotAvailable=this.assignLogoChannel(a.NotAvailable),a)),e))))}assignLogoChannel(n){return n.map(e=>(e.Img=s.g.getChannelLogoByTypeId(e.TypeID),e))}searchProduct(n){this.filterSearch.text=n,this.paginationService.reloadPagination(this.filterSearch)}scanAllProduct(n){let e=this.productService.findChannelById(this.filterSearch.ChannelID,n.Options.Channel);this.productService.scanAll(this.filterSearch.ChannelID,this.filterSearch.ScanFull,this.filterSearch.UpdatedProduct,this.filterSearch.Async).subscribe(a=>{this.filterSearch.Async?this.toastr.success("You will be notified when the scan is completed.","Scan Asynchronous"):(this.productService.successToastrScanAllProduct(a,e,!this.filterSearch.UpdatedProduct),this.initPageLoader())})}openScanDialog(n){let e=JSON.parse(JSON.stringify(this.filterSearch));e.ChannelID=s.g.GuidEMpty,this.dialog.open(m.j,{data:{filter:e,channelOptions:n.Options.Channel},width:"600px"}).afterClosed().pipe((0,g.h)(l=>s.g.IsNotEmpty(l))).subscribe(l=>{this.filterSearch.ChannelID=l.ChannelID,this.filterSearch.ScanFull=l.ScanFull,this.filterSearch.UpdatedProduct=l.UpdatedProduct,this.filterSearch.Async=l.Async,this.scanAllProduct(n)})}getChannelLogoById(n){return s.g.getChannelLogoByTypeId(n)}getRowCount(){this.paginationService.hideCount=!1,this.rowCount$=this.http.post(`/api/${this.rowCountAPI}`,this.filterSearch)}onNextPage(){this.paginationService.onNextPage(this.filterSearch)}onLastPage(){this.http.post(`/api/${this.rowCountAPI}`,{}).subscribe({next:n=>{this.filterSearch.PageNumber=1,this.paginationService.getAllData(this.filterSearch,n.Count)}})}onZoomImage(n,e){this.biggerPictureService.openBiggerPicture(n,e)}onSelectProduct(n){this.hasSelectionProduct=this.productService.hasSelection(n),this.selectedProducts=this.productService.selectedProduct(n)}uploadMultipleProduct(){let n=this.getUniqueChannels();n=n.map(e=>(e.ID=e.ChannelID,e)),this.dialog.open(w,{width:"700px",data:{title:"Upload Multiple Product",channels:n}}).afterClosed().pipe((0,g.h)(e=>"CANCEL"!==e),(0,f.w)(e=>{const a=this.getSelectedProductIds();return this.productService.uploadNotInChannel(a,e)})).subscribe({next:()=>{this.paginationService.reloadPagination(this.filterSearch),this.selectedProducts=[],this.hasSelectionProduct=!1},error:e=>{this.selectedProducts=[],this.hasSelectionProduct=!1}})}getSelectedProductIds(){return this.selectedProducts.map(e=>({ID:e.ProductID}))}getUniqueChannels(){let n=[];return this.selectedProducts.forEach(e=>{n=[...n,...e.Variants[0].NotAvailable]}),n=n.filter((e,a,l)=>l.findIndex(d=>d.ChannelID==e.ChannelID)==a),n}ngOnDestroy(){this.paginationService.destroy()}}return(i=r).\u0275fac=function(n){return new(n||i)(t.Y36(S.O),t.Y36(_.uw),t.Y36(I._W),t.Y36(T.M),t.Y36(Tt.b),t.Y36(vt.k))},i.\u0275cmp=t.Xpm({type:i,selectors:[["app-not-in-channel"]],decls:2,vars:3,consts:[["headerTitle","Not in Channel","description","SKU has not been sold on one of channels",3,"hideSearchDropdown","onSubmit",4,"ngIf"],["headerTitle","Not in Channel","description","SKU has not been sold on one of channels",3,"hideSearchDropdown","onSubmit"],["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,"container-fluid","mt-3"],[1,"row"],[4,"ngIf","ngIfElse"],["EMPTY",""],["class","d-flex justify-content-between mt-5",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,"ngIf"],[4,"ngFor","ngForOf"],[1,"ms-1"],["target","_blank",3,"href"],[1,"fas","fa-lg","fa-external-link-alt","external-link-custom"],[2,"padding-left","0px"],[1,"d-flex","flex-wrap","mb-1"],[1,"text-center",3,"rowSpan"],["type","checkbox",3,"ngModel","ngModelChange"],[2,"padding-right","0px"],["elsePic",""],[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,"src","click"],["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){1&n&&(t.YNc(0,Bt,15,9,"mainpanel",0),t.ALo(1,"async")),2&n&&t.Q6J("ngIf",t.lcZ(1,1,e.loader$))},dependencies:[p.sg,p.O5,u.Wl,u.JJ,u.On,x.p,M.gM,v.s,p.Ov,p.JJ],styles:[".badge-pill[_ngcontent-%COMP%]{padding-bottom:16px!important}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]:checked + label[_ngcontent-%COMP%]{background:#dfeffc;border:1px solid #dfeffc}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{visibility:hidden;position:absolute;left:0;top:0}.rad-btn[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{border:1px solid #ddd;border-radius:3px;margin-right:10px;cursor:pointer;padding:10px;margin-bottom:10px;color:#000;width:80px;text-align:center}.modal-dialog[_ngcontent-%COMP%]{max-width:30%!important}.product[_ngcontent-%COMP%]{height:100%!important}.row[_ngcontent-%COMP%]{margin-left:0;margin-right:0}ul[_ngcontent-%COMP%]{list-style-type:none}.link[_ngcontent-%COMP%]{color:#0202ab;cursor:pointer}.px-1[_ngcontent-%COMP%]{padding-left:5px!important}.sku[_ngcontent-%COMP%]{color:#696969;font-style:italic}.badge-pill[_ngcontent-%COMP%]{height:16px}.itemTitle[_ngcontent-%COMP%]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.no-title[_ngcontent-%COMP%]{margin-top:.33em;margin-bottom:.33rem}.mb-upload[_ngcontent-%COMP%]{padding-bottom:.625rem}.my-1rem[_ngcontent-%COMP%]{margin-bottom:1rem!important;margin-top:1rem!important}.pr-rem[_ngcontent-%COMP%]{padding-right:.6rem}.text-larger[_ngcontent-%COMP%]{font-size:larger}.bg-lightpink[_ngcontent-%COMP%]{background-color:#f9dede}.bottom-buttons[_ngcontent-%COMP%]{margin-left:97px}@media (min-width: 1200px){.max-w-xl[_ngcontent-%COMP%]{max-width:205px}}.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%}"]}),r})();function Gt(i,r){if(1&i&&(t.TgZ(0,"tr")(1,"td"),t._uU(2),t.qZA(),t.TgZ(3,"td"),t._uU(4),t.qZA()()),2&i){const o=r.$implicit;t.xp6(2),t.Oqu(null==o?null:o.Name),t.xp6(2),t.Oqu(null==o?null:o.ChannelVariationSKU)}}let Kt=(()=>{var i;class r{constructor(n,e){this.data=n,this.dialogRef=e}ngOnInit(){this.initModalConfig()}initModalConfig(){this.modalConfig=new U.O,this.modalConfig.title=this.data?.title,this.modalConfig.hideOk=!0,this.modalConfig.hideCancel=!0}}return(i=r).\u0275fac=function(n){return new(n||i)(t.Y36(_.WI),t.Y36(_.so))},i.\u0275cmp=t.Xpm({type:i,selectors:[["app-modal-variants"]],decls:11,vars:2,consts:[[3,"config","onCancel"],["content",""],[1,"table"],[1,"thead-light"],[4,"ngFor","ngForOf"]],template:function(n,e){1&n&&(t.TgZ(0,"modal-material",0),t.NdJ("onCancel",function(){return e.dialogRef.close()}),t.TgZ(1,"div",1)(2,"table",2)(3,"thead",3)(4,"tr")(5,"th"),t._uU(6,"Variant"),t.qZA(),t.TgZ(7,"th"),t._uU(8,"SKU"),t.qZA()()(),t.TgZ(9,"tbody"),t.YNc(10,Gt,5,2,"tr",4),t.qZA()()()()),2&n&&(t.Q6J("config",e.modalConfig),t.xp6(10),t.Q6J("ngForOf",e.data.variants))},dependencies:[p.sg,D.M],styles:[".mat-dialog-title[_ngcontent-%COMP%]{margin-bottom:0%;margin-left:24px}"]}),r})();var J=c(7466);function $t(i,r){if(1&i){const o=t.EpF();t.TgZ(0,"button",14),t.NdJ("click",function(){t.CHM(o);const e=t.oxw();return t.KtG(e.openScanDialog())}),t._UZ(1,"i",15),t._uU(2," Scan Channel "),t.qZA()}}function Ht(i,r){if(1&i){const o=t.EpF();t.ynx(0),t.TgZ(1,"button",16),t.NdJ("click",function(){t.CHM(o);const e=t.oxw();return t.KtG(e.onDownloadAllProduct("SELECTED"))}),t._UZ(2,"i",17),t._uU(3),t.qZA(),t.BQk()}if(2&i){const o=t.oxw();let n;t.xp6(3),t.hij(" Download (",null==(n=o.productService.selectedProduct(o.products))?null:n.length,") ")}}function Rt(i,r){if(1&i&&(t.TgZ(0,"span",18),t._UZ(1,"img",19),t.qZA(),t._uU(2)),2&i){const o=r.item,n=t.oxw();t.xp6(1),t.Q6J("src",n.getChannelLogo(o.TypeID),t.LSH),t.xp6(1),t.hij(" ",o.Name," ")}}const jt=function(i){return[i]},zt=function(){return[]};function Wt(i,r){if(1&i){const o=t.EpF();t.TgZ(0,"div",20)(1,"app-product-card",21),t.NdJ("onCheckBoxChange",function(e){const l=t.CHM(o).index,d=t.oxw();return t.KtG(d.onSelectProduct(e,l))})("onDescEvent",function(){const a=t.CHM(o).index,l=t.oxw();return t.KtG(l.onShowVariantDetail(a))})("onDownload",function(){const a=t.CHM(o).$implicit,l=t.oxw();return t.KtG(l.onDownloadProduct(a))})("onScan",function(){const a=t.CHM(o).$implicit,l=t.oxw();return t.KtG(l.onScanChannel(a))}),t.qZA()()}if(2&i){const o=r.$implicit;t.xp6(1),t.Q6J("showRedirectIcon",!1)("title",null==o?null:o.Name)("image",null==o?null:o.Image)("imageForZoom",null==o?null:o.Image)("code",null==o?null:o.SKU)("description",(null==o||null==o.Variant?null:o.Variant.length)>0?(null==o||null==o.Variant?null:o.Variant.length)+" Variants":null)("downloadButton",!0)("channels",null!=o&&o.Channel?t.VKq(10,jt,null==o?null:o.Channel):t.DdM(12,zt))("showCheckBox",!0)("scanButton",!0)}}function Xt(i,r){1&i&&(t.ynx(0),t.TgZ(1,"div",22),t._UZ(2,"app-empty-state"),t.qZA(),t.BQk())}function tn(i,r){if(1&i){const o=t.EpF();t.TgZ(0,"div",23)(1,"div",24)(2,"app-custom-paginator",25),t.NdJ("total",function(){t.CHM(o);const e=t.oxw();return t.KtG(e.getRowCount())})("next",function(){t.CHM(o);const e=t.oxw();return t.KtG(e.onNextPage())})("previous",function(){t.CHM(o);const e=t.oxw();return t.KtG(e.onPreviousPage())}),t.qZA()()()}if(2&i){const o=t.oxw();t.xp6(2),t.Q6J("filter",o.searchFilter)("totaldata",null==o.products?null:o.products.length)("paginationTotal",o.rowCount)("hasClicked",o.hasClickRowCount)}}let nn=(()=>{var i;class r{constructor(n,e,a,l,d){this.http=n,this.dialog=e,this.productService=a,this.toastrService=l,this.activateRouter=d,this.searchFilter=new F.k,this.products=[],this.hasClickRowCount=!1}ngOnInit(){this.activateRouter.queryParams.subscribe(n=>{this.initPageLoader(n.ID?n.ID:s.g.GuidEMpty)})}initPageLoader(n){this.productService.loader(n).subscribe(e=>{this.channelOptions=e.Options.Channel,this.searchFilter=e.Filter,this.searchFilter.PageSize=e.Filter.RowCount,this.getProducts()})}getProducts(){this.http.post("/api/product/GetProductChannelNotPOS",this.searchFilter).subscribe(n=>{this.products=n.Data,this.mapChannelToProduct(),this.setSkuProduct()})}mapChannelToProduct(){this.products=this.products.map(n=>(n.Channel=JSON.parse(JSON.stringify(this.channelOptions.find(e=>e.ID==n.ChannelID))),n)).map(n=>(n.Channel.Url=n.Url,n))}setSkuProduct(){this.products=this.products.map(n=>(n.SKU=0==n?.Variant?.length?s.g.IsNotEmpty(n?.ChannelItemSKU)?n?.ChannelItemSKU:"SKU not assigned":n?.Variant[0]?.ChannelVariationSKU?n?.Variant[0]?.ChannelVariationSKU:"SKU not assigned",n))}onSearch(n){this.searchFilter.text=n,this.hasClickRowCount=!1,this.getProducts()}onClearChannelFilter(){this.searchFilter.ChannelID=s.g.GuidEMpty}onScanAll(){let n=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);this.productService.scanAll(this.searchFilter.ChannelID,this.searchFilter.ScanFull,this.searchFilter.UpdatedProduct,this.searchFilter.Async).subscribe(e=>{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(s.g.GuidEMpty),this.productService.successToastrScanAllProduct(e,n,!this.searchFilter.UpdatedProduct)),this.searchFilter.ChannelID=s.g.GuidEMpty})}openScanDialog(){let n=JSON.parse(JSON.stringify(this.searchFilter));n.ChannelID=s.g.GuidEMpty,this.dialog.open(m.j,{data:{filter:n,channelOptions:this.channelOptions},width:"600px"}).afterClosed().pipe((0,g.h)(a=>s.g.IsNotEmpty(a))).subscribe(a=>{this.searchFilter.ChannelID=a.ChannelID,this.searchFilter.UpdatedProduct=a.UpdatedProduct,this.searchFilter.ScanFull=a.ScanFull,this.searchFilter.Async=a.Async,this.onScanAll()})}onDownloadAllProduct(n){let e;e="ALL"==n?this.products:this.productService.selectedProduct(this.products),e.length>0&&this.productService.downloadMultipleProduct(e).subscribe({next:()=>{this.getProducts()}})}onSelectProduct(n,e){this.products[e].selected=n}onDownloadProduct(n){confirm(`Are you sure you want to Retrieve product ${n?.Name} from ${n?.Channel.Name} to POS?`)&&this.productService.downloadProduct(n).subscribe({next:()=>{this.getProducts()}})}onScanChannel(n){let e=JSON.parse(JSON.stringify(n));delete e.Channel,this.productService.scanCompareToPos([e]).subscribe(a=>{a.Status?(this.initPageLoader(s.g.GuidEMpty),this.toastrService.success(`product ${n.Name} have been successfully scanned and synchronized with POS`,"Success")):this.toastrService.error(`Product ${n.Name} is not existed in POS`,"Error")})}onShowVariantDetail(n){let e=this.products[n].Variant;e.length>0&&this.dialog.open(Kt,{data:{title:this.products[n].Name,variants:e},width:"30%"})}getRowCount(){let n={ChannelID:this.searchFilter.ChannelID,text:this.searchFilter.text,HaveSku:parseInt(this.searchFilter.HaveSku)};this.http.post("/api/product/GetProductChannelNotPOSRowCount",n).subscribe(e=>{this.hasClickRowCount=!0,this.rowCount=e.Count})}onNextPage(){this.searchFilter.PageNumber=this.searchFilter.PageNumber+1,this.getProducts()}onPreviousPage(){this.searchFilter.PageNumber=this.searchFilter.PageNumber-1,this.getProducts()}getChannelLogo(n){return s.g.getChannelLogoByTypeId(n)}}return(i=r).\u0275fac=function(n){return new(n||i)(t.Y36(S.O),t.Y36(_.uw),t.Y36(T.M),t.Y36(I._W),t.Y36(P.gz))},i.\u0275cmp=t.Xpm({type:i,selectors:[["app-not-in-pos"]],decls:32,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,"d-flex"],["container",""],["bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"clearable","items","ngModel","ngModelChange","clear"],["ng-option-tmp",""],["name","haveSKU",1,"form-control","h-100","pt-3","rounded",3,"ngModel","ngModelChange"],[1,"me-5",3,"value"],["type","text","name","Item_id","id","Item_id","placeholder","item id",1,"form-control",3,"ngModel","ngModelChange"],[1,"container-fluid","mt-3"],[1,"row","mt-8"],["class","col-12 col-md-6 col-xl-4 px-3 my-3",4,"ngFor","ngForOf"],["class","row",4,"ngIf"],["type","button","data-cy","scanNotInPos",1,"btn","btn-outline-secondary","shadow","rounded",3,"click"],[1,"fas","fa-lg","fa-crosshairs"],["type","button",1,"btn","btn-success","shadow-sm","rounded","ms-3",3,"click"],[1,"fa","fa-download"],[1,"me-2"],["alt","",2,"width","18px",3,"src"],[1,"col-12","col-md-6","col-xl-4","px-3","my-3"],[3,"showRedirectIcon","title","image","imageForZoom","code","description","downloadButton","channels","showCheckBox","scanButton","onCheckBoxChange","onDescEvent","onDownload","onScan"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"row"],[1,"col-12"],[3,"filter","totaldata","paginationTotal","hasClicked","total","next","previous"]],template:function(n,e){1&n&&(t.TgZ(0,"mainpanel",0),t.NdJ("onSubmit",function(l){return e.onSearch(l)}),t.TgZ(1,"actions"),t.YNc(2,$t,3,0,"button",1),t.YNc(3,Ht,4,1,"ng-container",2),t.qZA(),t.TgZ(4,"filters")(5,"div",3)(6,"div",4)(7,"div")(8,"h6"),t._uU(9,"Channel"),t.qZA(),t.TgZ(10,"ng-select",5),t.NdJ("ngModelChange",function(l){return e.searchFilter.ChannelID=l})("clear",function(){return e.onClearChannelFilter()}),t.YNc(11,Rt,3,2,"ng-template",6),t.qZA()(),t.TgZ(12,"div")(13,"h6"),t._uU(14,"SKU Assigned"),t.qZA(),t.TgZ(15,"mat-radio-group",7),t.NdJ("ngModelChange",function(l){return e.searchFilter.HaveSku=l}),t.TgZ(16,"mat-radio-button",8),t._uU(17," All "),t.qZA(),t.TgZ(18,"mat-radio-button",8),t._uU(19," Yes "),t.qZA(),t.TgZ(20,"mat-radio-button",8),t._uU(21," No "),t.qZA()()(),t.TgZ(22,"div")(23,"h6"),t._uU(24,"Item ID"),t.qZA(),t.TgZ(25,"input",9),t.NdJ("ngModelChange",function(l){return e.searchFilter.Item_id=l}),t.qZA()()()()(),t.TgZ(26,"content")(27,"div",10)(28,"div",11),t.YNc(29,Wt,2,13,"div",12),t.YNc(30,Xt,3,0,"ng-container",2),t.qZA(),t.YNc(31,tn,3,4,"div",13),t.qZA()()()),2&n&&(t.xp6(2),t.Q6J("ngIf",!e.productService.hasSelection(e.products)),t.xp6(1),t.Q6J("ngIf",e.productService.hasSelection(e.products)),t.xp6(7),t.Q6J("clearable",!0)("items",e.channelOptions)("ngModel",e.searchFilter.ChannelID),t.xp6(5),t.Q6J("ngModel",e.searchFilter.HaveSku),t.xp6(1),t.Q6J("value",0),t.xp6(2),t.Q6J("value",1),t.xp6(2),t.Q6J("value",2),t.xp6(5),t.Q6J("ngModel",e.searchFilter.Item_id),t.xp6(4),t.Q6J("ngForOf",e.products),t.xp6(1),t.Q6J("ngIf",0==e.products.length),t.xp6(1),t.Q6J("ngIf",(null==e.products?null:e.products.length)>0))},dependencies:[p.sg,p.O5,u.Fj,u.JJ,u.On,x.p,C.w9,C.ir,J.VQ,J.U0,Z.y,k.Y,v.s],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}"]}),r})();var Y=c(208);function en(i,r){if(1&i&&(t.TgZ(0,"span",8),t._UZ(1,"img",9),t.qZA(),t._uU(2)),2&i){const o=r.item,n=t.oxw();t.xp6(1),t.Q6J("src",n.getChannelLogo(o.TypeID),t.LSH),t.xp6(1),t.hij(" ",o.Name," ")}}function on(i,r){if(1&i&&(t.TgZ(0,"div",10),t._UZ(1,"app-duplicate-product-card",11),t.qZA()),2&i){const o=r.$implicit,n=r.index;t.xp6(1),t.Q6J("imageForZoom",o.ImageUrl)("title",o.Name)("code",o.Code)("id",n)("image",o.ThumbnailURL)("channels",o.Channels)}}function an(i,r){1&i&&(t.ynx(0),t.TgZ(1,"div",12),t._UZ(2,"app-empty-state"),t.qZA(),t.BQk())}function ln(i,r){if(1&i){const o=t.EpF();t.ynx(0),t.TgZ(1,"div",13)(2,"div",14)(3,"app-custom-paginator",15),t.NdJ("next",function(){t.CHM(o);const e=t.oxw();return t.KtG(e.onNextPage())})("previous",function(){t.CHM(o);const e=t.oxw();return t.KtG(e.onPrevPage())})("total",function(){t.CHM(o);const e=t.oxw();return t.KtG(e.getRowCount())}),t.qZA()()(),t.BQk()}if(2&i){const o=t.oxw();t.xp6(3),t.Q6J("filter",o.searchFilter)("totaldata",null==o.products?null:o.products.length)("paginationTotal",o.rowCount)("hasClicked",o.hasClickedRowCount)}}let rn=(()=>{var i;class r{constructor(n,e){this.httpService=n,this.productService=e,this.searchFilter=new F.k,this.products=[],this.hasClickedRowCount=!1,this.getPageLoader()}getPageLoader(){this.productService.loader().subscribe(n=>{this.searchFilter=n.Filter,this.searchFilter.PageSize=n.Filter.RowCount,this.channelOptions=n.Options.Channel,this.getProducts()})}getProducts(){this.httpService.post("/api/product/GetDuplicateInChannel",{ListChannelID:this.searchFilter.ListChannelID,RowCount:this.searchFilter.RowCount,PageNumber:this.searchFilter.PageNumber,text:this.searchFilter.text}).subscribe(e=>{this.products=e.Data})}onSearch(n){this.searchFilter.text=n,this.hasClickedRowCount=!1,this.getProducts()}onClearFilter(){this.searchFilter.ChannelID=s.g.GuidEMpty}getChannelLogo(n){return s.g.getChannelLogoByTypeId(n)}onNextPage(){this.searchFilter.PageNumber=this.searchFilter.PageNumber+1,this.getProducts()}onPrevPage(){this.searchFilter.PageNumber=this.searchFilter.PageNumber-1,this.getProducts()}getRowCount(){this.httpService.post("/api/product/GetDuplicateInChannelRowCount",{text:this.searchFilter.text,ChannelID:this.searchFilter.ChannelID}).subscribe(e=>{this.hasClickedRowCount=!0,this.rowCount=e.Total})}}return(i=r).\u0275fac=function(n){return new(n||i)(t.Y36(S.O),t.Y36(T.M))},i.\u0275cmp=t.Xpm({type:i,selectors:[["app-duplicate-sku"]],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",""],["bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"multiple","clearable","items","ngModel","ngModelChange","clear"],["ng-option-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,"filter","totaldata","paginationTotal","hasClicked","next","previous","total"]],template:function(n,e){1&n&&(t.TgZ(0,"mainpanel",0),t.NdJ("onSubmit",function(l){return e.onSearch(l)}),t.TgZ(1,"filters")(2,"div",1)(3,"div")(4,"h6"),t._uU(5,"Channel"),t.qZA(),t.TgZ(6,"ng-select",2),t.NdJ("ngModelChange",function(l){return e.searchFilter.ListChannelID=l})("clear",function(){return e.onClearFilter()}),t.YNc(7,en,3,2,"ng-template",3),t.qZA()()()(),t.TgZ(8,"content")(9,"div",4)(10,"div",5),t.YNc(11,on,2,6,"div",6),t.YNc(12,an,3,0,"ng-container",7),t.qZA(),t.YNc(13,ln,4,4,"ng-container",7),t.qZA()()()),2&n&&(t.xp6(6),t.Q6J("multiple",!0)("clearable",!0)("items",e.channelOptions)("ngModel",e.searchFilter.ListChannelID),t.xp6(5),t.Q6J("ngForOf",e.products),t.xp6(1),t.Q6J("ngIf",0==(null==e.products?null:e.products.length)),t.xp6(1),t.Q6J("ngIf",(null==e.products?null:e.products.length)>0))},dependencies:[p.sg,p.O5,u.JJ,u.On,x.p,C.w9,C.ir,Y._,Z.y,v.s]}),r})();var cn=c(1476);function sn(i,r){if(1&i&&(t.ynx(0),t._uU(1),t.BQk()),2&i){const o=t.oxw().$implicit;t.xp6(1),t.hij(" ",o.Count," ")}}function dn(i,r){if(1&i){const o=t.EpF();t.TgZ(0,"span",26),t.NdJ("click",function(){t.CHM(o);const e=t.oxw().$implicit,a=t.oxw(2);return t.KtG(a.getLiveProductCount(e.ID,e))}),t._UZ(1,"i",27),t.qZA()}}const pn=function(){return["/menu/products/status/sold-in-channel"]},B=function(i){return{ID:i}},hn=function(){return["/menu/products/status/not-in-pos"]};function un(i,r){if(1&i){const o=t.EpF();t.TgZ(0,"tr")(1,"td"),t._UZ(2,"img",16),t.TgZ(3,"span",17),t._uU(4),t.qZA()(),t.TgZ(5,"td",18),t.YNc(6,sn,2,1,"ng-container",4),t.YNc(7,dn,2,0,"ng-template",null,19,t.W1O),t.qZA(),t.TgZ(9,"td",18)(10,"a",20),t._uU(11),t.ALo(12,"number"),t.qZA()(),t.TgZ(13,"td",18)(14,"a",20),t._uU(15),t.ALo(16,"number"),t.qZA()(),t.TgZ(17,"td"),t._uU(18),t.ALo(19,"date"),t.qZA(),t.TgZ(20,"td")(21,"div",21)(22,"button",22),t.NdJ("click",function(){const a=t.CHM(o).$implicit,l=t.oxw(2);return t.KtG(l.onScanChannel(a))}),t._UZ(23,"i",23),t._uU(24," Scan "),t.qZA(),t.TgZ(25,"button",24),t.NdJ("click",function(){const a=t.CHM(o).$implicit,l=t.oxw(2);return t.KtG(l.onClearCache(a.ID))}),t._UZ(26,"i",25),t._uU(27," Clear "),t.qZA()()()()}if(2&i){const o=r.$implicit,n=t.MAs(8),e=t.oxw(2);t.xp6(2),t.Q6J("src",e.getChannelLogo(o.TypeID),t.LSH),t.xp6(2),t.Oqu(o.Name),t.xp6(2),t.Q6J("ngIf",void 0!==o.Count)("ngIfElse",n),t.xp6(4),t.Q6J("routerLink",t.DdM(18,pn))("queryParams",t.VKq(19,B,o.ID)),t.xp6(1),t.hij(" ",t.lcZ(12,11,o.SoldInChannel)," "),t.xp6(3),t.Q6J("routerLink",t.DdM(21,hn))("queryParams",t.VKq(22,B,o.ID)),t.xp6(1),t.hij(" ",t.lcZ(16,13,o.NotInPOS)," "),t.xp6(3),t.hij("",o.LastSync?t.xi3(19,15,o.LastSync,"dd MMM yyyy HH:mm"):"-"," ")}}function gn(i,r){if(1&i&&(t.ynx(0),t.TgZ(1,"div",6)(2,"table",7)(3,"thead",8)(4,"tr",9)(5,"th"),t._uU(6,"Channel"),t.qZA(),t.TgZ(7,"th",10),t._uU(8,"Live Product"),t.qZA(),t.TgZ(9,"th",11),t._uU(10,"Sold In Channel"),t.qZA(),t.TgZ(11,"th",12),t._uU(12,"Product Not in POS"),t.qZA(),t.TgZ(13,"th",13),t._uU(14,"Last Sync"),t.qZA(),t._UZ(15,"th",14),t.qZA()(),t.TgZ(16,"tbody"),t.YNc(17,un,28,24,"tr",15),t.ALo(18,"async"),t.qZA()()(),t.BQk()),2&i){const o=t.oxw();let n;t.xp6(17),t.Q6J("ngForOf",null==(n=t.lcZ(18,1,o.channels$))?null:n.Data)}}function _n(i,r){1&i&&(t.TgZ(0,"div",28),t._UZ(1,"app-empty-state"),t.qZA())}let mn=(()=>{var i;class r{constructor(n,e,a){this.productService=n,this.toastr=e,this.dialog=a,this.destroy$=new E.x}ngOnInit(){this.setObsProductStatistic(),this.initPageLoader()}initPageLoader(){this.productService.loader().pipe((0,A.R)(this.destroy$)).subscribe(n=>{this.channelOptions=n?.Options?.Channel})}setObsProductStatistic(){this.channels$=this.productService.getProductStatistic()}getLiveProductCount(n,e){this.productService.getTotalProductLive(n).pipe((0,A.R)(this.destroy$)).subscribe(a=>{e.Count=a.Count})}onScanChannel(n){this.dialog.open(m.j,{width:"700px",data:{channelOptions:this.channelOptions,filter:{ChannelID:n.ID},disabledChannelOption:!0}}).afterClosed().pipe((0,g.h)(e=>s.g.IsNotEmpty(e))).subscribe(e=>{this.scanAllProduct(n.ID,e)})}scanAllProduct(n,e){let a=this.productService.findChannelById(n,this.channelOptions);this.productService.scanAll(e.ChannelID,e.ScanFull,e.UpdatedProduct,e.Async).pipe((0,g.h)(l=>l)).subscribe(l=>{e.Async?this.toastr.warning("You will be notified when the scan is completed.","Scan In Progress",{toastClass:"ngx-toastr toast-waiting"}):(this.productService.successToastrScanAllProduct(l,a,!e.UpdatedProduct),this.initPageLoader(),this.setObsProductStatistic())})}onClearCache(n){confirm("Are you sure you want to Clear Cache? This Process will remove your product integration to marketplace")&&this.productService.clearCacheChannel(n).pipe((0,A.R)(this.destroy$)).subscribe(a=>{this.toastr.success("Successfully cleared cache","Success"),this.initPageLoader(),this.setObsProductStatistic()})}getChannelLogo(n){return s.g.getChannelLogoByTypeId(n)}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}}return(i=r).\u0275fac=function(n){return new(n||i)(t.Y36(T.M),t.Y36(I._W),t.Y36(_.uw))},i.\u0275cmp=t.Xpm({type:i,selectors:[["app-channel-statistic"]],decls:9,vars:6,consts:[["headerTitle","Products Statistic",3,"hideSearchBox","hideSearchDropdown"],[1,"container-fluid"],[1,"row","mt-4"],[1,"col-md-12"],[4,"ngIf","ngIfElse"],["EMPTY",""],[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"],["QUESTION",""],[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(1&n&&(t.TgZ(0,"mainpanel",0)(1,"content")(2,"div",1)(3,"div",2)(4,"div",3),t.YNc(5,gn,19,3,"ng-container",4),t.ALo(6,"async"),t.YNc(7,_n,2,0,"ng-template",null,5,t.W1O),t.qZA()()()()()),2&n){const a=t.MAs(8);let l;t.Q6J("hideSearchBox",!0)("hideSearchDropdown",!0),t.xp6(5),t.Q6J("ngIf",(null==(l=t.lcZ(6,4,e.channels$))||null==l.Data?null:l.Data.length)>0)("ngIfElse",a)}},dependencies:[p.sg,p.O5,x.p,M.gM,P.rH,v.s,p.Ov,p.JJ,p.uU]}),r})();var Cn=c(3680);const fn=[{component:G,path:"",children:[{path:"",redirectTo:"sold-in-channel",pathMatch:"full"},{path:"in-pos",component:ht,canActivate:[y.a],data:{title:"Products in POS"}},{path:"sold-in-channel",component:bt,canActivate:[y.a],data:{title:"Products Sold in Channel"}},{path:"not-in-channel",component:Vt,canActivate:[y.a],data:{title:"Products not in Channel"}},{path:"not-in-pos",component:nn,canActivate:[y.a],data:{title:"Products not in POS"}},{path:"duplicate-sku",component:rn,canActivate:[y.a],data:{title:"Duplicate Sku in Channel"}},{path:"channel-statistic",component:mn,canActivate:[y.a],data:{title:"Channel Statistic"}}]}];let xn=(()=>{var i;class r{}return(i=r).\u0275fac=function(n){return new(n||i)},i.\u0275mod=t.oAB({type:i}),i.\u0275inj=t.cJS({imports:[p.ez,u.u5,x.R,M.AV,C.A0,cn.TU,J.Fk,Q.Z,Y._,Z.y,k.Y,P.Bz.forChild(fn),O.FA,Cn.XK]}),r})()}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkpos_marketplace=self.webpackChunkpos_marketplace||[]).push([[806],{6806:(g,u,t)=>{t.r(u),t.d(u,{InventoryAsyncDetailComponent:()=>y});var r=t(6814),a=t(9790),d=t(7398),v=t(7081),c=t(4387),n=t(5879),_=t(2099);function p(l,s){if(1&l&&(n.TgZ(0,"div",3)(1,"div",4)(2,"div",5)(3,"div",6)(4,"div",7)(5,"h5"),n._uU(6,"General"),n.qZA()(),n.TgZ(7,"div",8)(8,"div",9)(9,"div",10)(10,"div",11)(11,"label"),n._uU(12,"Created"),n.qZA(),n.TgZ(13,"div")(14,"span"),n._uU(15),n.ALo(16,"date"),n.qZA()()()(),n.TgZ(17,"div",10)(18,"div",11)(19,"label"),n._uU(20,"Duration"),n.qZA(),n.TgZ(21,"div")(22,"span"),n._uU(23),n.ALo(24,"number"),n.qZA()()()(),n.TgZ(25,"div",10)(26,"div",11)(27,"label"),n._uU(28,"Response Code"),n.qZA(),n.TgZ(29,"div")(30,"span"),n._uU(31),n.qZA()()()()()()()()(),n.TgZ(32,"div",4)(33,"div",10)(34,"div",6)(35,"div",7)(36,"h5"),n._uU(37,"Request"),n.qZA()(),n.TgZ(38,"div",8)(39,"div",12)(40,"div",13)(41,"pre"),n._uU(42),n.ALo(43,"json"),n.qZA()()()()()(),n.TgZ(44,"div",10)(45,"div",6)(46,"div",7)(47,"h5"),n._uU(48,"Response"),n.qZA()(),n.TgZ(49,"div",8)(50,"div",14)(51,"div",13)(52,"pre"),n._uU(53),n.ALo(54,"json"),n.qZA()()()()()()()()),2&l){const e=s.ngIf;n.xp6(15),n.Oqu(n.xi3(16,5,null==e?null:e._source["@timestamp"],"dd MMM yyyy HH:mm:ss")),n.xp6(8),n.hij("",n.xi3(24,8,null==e?null:e.DurationInSecond,"1.1-1")," s"),n.xp6(8),n.Oqu(null==e||null==e._source||null==e._source.log?null:e._source.log.respCode),n.xp6(11),n.Oqu(n.lcZ(43,11,null==e||null==e._source||null==e._source.log?null:e._source.log.req)),n.xp6(11),n.Oqu(n.lcZ(54,13,null==e||null==e._source||null==e._source.log?null:e._source.log.res))}}let y=(()=>{var l;class s{constructor(o,i){this.inventoryAsyncServiceLog=o,this.activatedRoute=i}ngOnInit(){let o=this.activatedRoute.snapshot.queryParams;this.initInventoryLog(o?.ID)}initInventoryLog(o){this.inventoryLog$=this.inventoryAsyncServiceLog.getInventoryAsyncLogDetail(o).pipe((0,d.U)(i=>(i.hits[0].DurationInSecond=parseInt(i.hits[0]._source?.Duration)/1e3,i?.hits[0])),(0,v.d)(1))}}return(l=s).\u0275fac=function(o){return new(o||l)(n.Y36(_.F),n.Y36(a.gz))},l.\u0275cmp=n.Xpm({type:l,selectors:[["app-inventory-async-detail"]],standalone:!0,features:[n.jDz],decls:7,vars:6,consts:[[3,"headerTitle","hideSearchBox","hideSearchDropdown"],["role","button","routerLink","/menu/log/inventory-async",1,"btn","btn-secondary","btn-fill","btn-lg","me-3"],["class","container-fluid mt-3",4,"ngIf"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-12"],[1,"card"],[1,"card-header"],[1,"card-body"],[1,"row","mt-7"],[1,"col-sm-6"],[1,"info-label-group"],[1,"col-sm-12"],[1,"form-group"],[1,"col-sm-12","mt-2"]],template:function(o,i){1&o&&(n.TgZ(0,"mainpanel",0)(1,"actions")(2,"a",1),n._uU(3,"Back"),n.qZA()(),n.TgZ(4,"content"),n.YNc(5,p,55,15,"div",2),n.ALo(6,"async"),n.qZA()()),2&o&&(n.Q6J("headerTitle","Sync Inventory Async")("hideSearchBox",!0)("hideSearchDropdown",!0),n.xp6(5),n.Q6J("ngIf",n.lcZ(6,4,i.inventoryLog$)))},dependencies:[r.ez,r.O5,r.Ov,r.Ts,r.JJ,r.uU,c.R,c.p,a.Bz,a.rH]}),s})()}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkpos_marketplace=self.webpackChunkpos_marketplace||[]).push([[810],{4810:(Re,A,d)=>{d.r(A),d.d(A,{LogsModule:()=>De});var s=d(6814),e=d(5879),g=d(9790),b=d(6027);let U=(()=>{var t;class r{constructor(){this.ObjectlogTabs=[{Title:"Sync Order",Url:"/menu/log/order"},{Title:"Sync Inventory",Url:"/menu/log/inventory"},{Title:"Async Inventory ",Url:"/menu/log/inventory-async"},{Title:"Channel Webhook",Url:"/menu/log/rawlog"},{Title:"Channel Webhook Exception ",Url:"/menu/log/exception"},{Title:"Download Order ",Url:"/menu/log/order-log"}]}ngOnInit(){}}return(t=r).\u0275fac=function(a){return new(a||t)},t.\u0275cmp=e.Xpm({type:t,selectors:[["app-logs"]],decls:5,vars:1,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid"],[3,"Tabs"]],template:function(a,o){1&a&&(e.TgZ(0,"nav",0)(1,"div",1)(2,"div"),e._UZ(3,"nav-tab",2),e.qZA()()(),e._UZ(4,"router-outlet")),2&a&&(e.xp6(3),e.Q6J("Tabs",o.ObjectlogTabs))},dependencies:[g.lC,b.e]}),r})();var u=d(4575),_=d(5802),m=d(9659);let Z=(()=>{var t;class r{constructor(){}get Data(){return this._Data}set Data(a){this._Data=a}Fill(a){return this._Data.find(o=>o._id==a)}}return(t=r).\u0275fac=function(a){return new(a||t)},t.\u0275prov=e.Yz7({token:t,factory:t.\u0275fac,providedIn:"root"}),r})();var p=d(6223),c=d(4387),T=d(1476),h=d(4807),f=d(4126),v=d(5439),x=d(2596);function L(t,r){if(1&t&&(e.TgZ(0,"span",18),e._UZ(1,"img",19),e.qZA(),e._uU(2)),2&t){const n=r.item;e.xp6(1),e.Q6J("src",n.logo,e.LSH),e.xp6(1),e.hij(" ",n.Name," ")}}function w(t,r){1&t&&(e.TgZ(0,"th",23)(1,"span",28),e._uU(2," Response Body Warning "),e.qZA()())}const S=function(t){return{"bg-warning":t}};function I(t,r){if(1&t&&(e.TgZ(0,"td",23)(1,"span",31),e._uU(2),e.qZA()()),2&t){const n=e.oxw().$implicit;e.xp6(1),e.Q6J("ngClass",e.VKq(2,S,null!=n.responseBodyWarning)),e.xp6(1),e.Oqu(n.responseBodyWarning)}}const N=function(){return["/menu/log/order/detail"]},D=function(t){return{ID:t}};function M(t,r){if(1&t&&(e.TgZ(0,"tr")(1,"td")(2,"a",29),e._uU(3),e.ALo(4,"date"),e.qZA()(),e.TgZ(5,"td"),e._uU(6),e.qZA(),e.TgZ(7,"td"),e._uU(8),e.qZA(),e.TgZ(9,"td"),e._uU(10),e.qZA(),e.TgZ(11,"td",23)(12,"span",30),e._uU(13),e.qZA()(),e.YNc(14,I,3,4,"td",25),e.qZA()),2&t){const n=r.$implicit,a=e.oxw(2);e.xp6(2),e.Q6J("routerLink",e.DdM(13,N))("queryParams",e.VKq(14,D,n.ID)),e.xp6(1),e.hij(" ",e.xi3(4,10,n.Created,"dd MMM yyyy HH:mm:ss")," "),e.xp6(3),e.Oqu(n.MarketTypeString),e.xp6(2),e.Oqu(n.POSActionTypeString),e.xp6(2),e.Oqu(n.Number),e.xp6(2),e.Tol(200===n.ResponseCode||202===n.ResponseCode?"bg-success":"bg-warning"),e.xp6(1),e.hij(" ",n.ResponseCode," "),e.xp6(1),e.Q6J("ngIf",a.responseBodyWarningVisible)}}function R(t,r){if(1&t){const n=e.EpF();e.ynx(0),e.TgZ(1,"div",20)(2,"table",21)(3,"thead")(4,"tr",22)(5,"th"),e._uU(6,"Date"),e.qZA(),e.TgZ(7,"th"),e._uU(8,"Channel"),e.qZA(),e.TgZ(9,"th"),e._uU(10,"Actions"),e.qZA(),e.TgZ(11,"th"),e._uU(12,"Number"),e.qZA(),e.TgZ(13,"th",23)(14,"span",24),e._uU(15," Response Code "),e.qZA()(),e.YNc(16,w,3,0,"th",25),e.qZA()(),e.TgZ(17,"tbody"),e.YNc(18,M,15,16,"tr",26),e.qZA()(),e.TgZ(19,"mat-paginator",27),e.NdJ("page",function(o){e.CHM(n);const i=e.oxw();return e.KtG(i.changePage(o))}),e.qZA()(),e.BQk()}if(2&t){const n=e.oxw();e.xp6(16),e.Q6J("ngIf",n.responseBodyWarningVisible),e.xp6(2),e.Q6J("ngForOf",n.Result),e.xp6(1),e.Q6J("length",n.paginationTotal)("pageSize",n.paginationPageSize)("pageIndex",0==(null==n.filter?null:n.filter.PageNumber)?0:(null==n.filter?null:n.filter.PageNumber)-1)}}function J(t,r){1&t&&(e.TgZ(0,"div",32),e._UZ(1,"app-empty-state"),e.qZA())}let P=(()=>{var t;class r{constructor(a,o,i){this.http=a,this._RawLogService=o,this.route=i,this.Result=Array(),this.filter={RowCount:20,Number:"",PageNumber:1,ActionType:"",ChannelID:"",StatusCode:"",From:"",To:"",responseBodyWarning:""},this.responseBodyWarningVisible=!1}ngOnInit(){this.route.queryParams.subscribe(a=>{this.responseCode=a.responseCode,null!=this.responseCode?this.Load(a):this.Load()})}Load(a={}){this.http.post("/api/OrdersLoader/Get",a).subscribe(o=>{this.filter=o.Filter,this.Channel=_.g.assignChannelLogo(o.Options.Channel),this.ActionTypeList=o.Options.ActionTypeList,this.Get()})}Get(a){this.filter.Number=a,this.http.post("/api/Orders/Get",this.filter).subscribe(o=>{this._RawLogService.Data=o.hits,this.Result=Array();for(let i of o.hits)null!=i._source.log.responseBodyWarning&&(this.responseBodyWarningVisible=!0),this.Result.push({ID:i._id,Created:i._source["@timestamp_received"],shopId:i._source.shopId,MarketTypeString:i._source.log.type,POSActionTypeString:i._source.message,Number:i._source.log.number,ResponseCode:i._source.log.responseCode,responseBodyWarning:i._source.log.responseBodyWarning});this.paginationTotal=o.total.value,this.paginationPageSize=this.filter.RowCount>this.paginationTotal?this.paginationTotal:this.filter.RowCount})}changePage(a){this.filter.PageNumber=a.pageIndex+1,this.Get()}}return(t=r).\u0275fac=function(a){return new(a||t)(e.Y36(m.O),e.Y36(Z),e.Y36(g.gz))},t.\u0275cmp=e.Xpm({type:t,selectors:[["app-order"]],decls:42,vars:15,consts:[["headerTitle","Order Log","searchBoxPlaceHolder","Invoice Number..",3,"text","textChange","onSubmit"],["container",""],["bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"clearable","items","ngModel","ngModelChange"],["ng-option-tmp",""],["bindLabel","Value","name","ActionType","bindValue","Key","placeholder","Action Type",1,"center-text",3,"clearable","items","ngModel","ngModelChange"],["name","From",3,"date","dateChange"],["name","To",3,"date","dateChange"],["type","text","name","StatusCode",1,"w-100",3,"ngModel","ngModelChange"],["type","text","name","responseBodyWarning","list","listresponseBodyWarning",1,"w-100",3,"ngModel","ngModelChange"],["id","listresponseBodyWarning"],["value","number-override"],["type","number","name","PageNumber",1,"w-100",3,"ngModel","ngModelChange"],["type","number","name","RowCount",1,"w-100",3,"ngModel","ngModelChange"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[4,"ngIf","ngIfElse"],["EMPTY_STATE",""],[1,"me-2"],["alt","",2,"width","18px",3,"src"],[1,"table-responsive"],[1,"table","table-hover"],[1,"table-light"],[1,"text-center"],["matTooltip","Http Status Code from developer.dealpos.com."],["class","text-center",4,"ngIf"],[4,"ngFor","ngForOf"],[3,"length","pageSize","pageIndex","page"],["matTooltip","ex: when payload.Number != response.Number value will be number-override"],[3,"routerLink","queryParams"],[1,"text-white","p-2","rounded","response-desc"],[1,"text-white","p-2","rounded","response-desc",3,"ngClass"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"]],template:function(a,o){if(1&a&&(e.TgZ(0,"mainpanel",0),e.NdJ("textChange",function(l){return o.Number=l})("onSubmit",function(l){return o.Get(l)}),e.TgZ(1,"filters")(2,"div",1)(3,"div")(4,"h6"),e._uU(5,"Channel"),e.qZA(),e.TgZ(6,"ng-select",2),e.NdJ("ngModelChange",function(l){return o.filter.ChannelID=l}),e.YNc(7,L,3,2,"ng-template",3),e.qZA()(),e.TgZ(8,"div")(9,"h6"),e._uU(10,"Action"),e.qZA(),e.TgZ(11,"ng-select",4),e.NdJ("ngModelChange",function(l){return o.filter.ActionType=l}),e.qZA()(),e.TgZ(12,"div")(13,"h6"),e._uU(14,"From/To"),e.qZA(),e.TgZ(15,"datepicker",5),e.NdJ("dateChange",function(l){return o.filter.From=l}),e.qZA(),e.TgZ(16,"datepicker",6),e.NdJ("dateChange",function(l){return o.filter.To=l}),e.qZA()(),e.TgZ(17,"div")(18,"h6"),e._uU(19,"Response Code"),e.qZA(),e.TgZ(20,"input",7),e.NdJ("ngModelChange",function(l){return o.filter.StatusCode=l}),e.qZA()(),e.TgZ(21,"div")(22,"h6"),e._uU(23,"Response Body Warning"),e.qZA(),e.TgZ(24,"input",8),e.NdJ("ngModelChange",function(l){return o.filter.responseBodyWarning=l}),e.qZA(),e.TgZ(25,"datalist",9),e._UZ(26,"option",10),e.qZA()(),e.TgZ(27,"div")(28,"h6"),e._uU(29,"Page Number"),e.qZA(),e.TgZ(30,"input",11),e.NdJ("ngModelChange",function(l){return o.filter.PageNumber=l}),e.qZA()(),e.TgZ(31,"div")(32,"h6"),e._uU(33,"Page Size"),e.qZA(),e.TgZ(34,"input",12),e.NdJ("ngModelChange",function(l){return o.filter.RowCount=l}),e.qZA()()()(),e.TgZ(35,"content")(36,"div",13)(37,"div",14)(38,"div",15),e.YNc(39,R,20,5,"ng-container",16),e.YNc(40,J,2,0,"ng-template",null,17,e.W1O),e.qZA()()()()()),2&a){const i=e.MAs(41);e.Q6J("text",o.Number),e.xp6(6),e.Q6J("clearable",!0)("items",o.Channel)("ngModel",o.filter.ChannelID),e.xp6(5),e.Q6J("clearable",!0)("items",o.ActionTypeList)("ngModel",o.filter.ActionType),e.xp6(4),e.Q6J("date",o.filter.From),e.xp6(1),e.Q6J("date",o.filter.To),e.xp6(4),e.Q6J("ngModel",o.filter.StatusCode),e.xp6(4),e.Q6J("ngModel",o.filter.responseBodyWarning),e.xp6(6),e.Q6J("ngModel",o.filter.PageNumber),e.xp6(4),e.Q6J("ngModel",o.filter.RowCount),e.xp6(5),e.Q6J("ngIf",(null==o.Result?null:o.Result.length)>0)("ngIfElse",i)}},dependencies:[s.mk,s.sg,s.O5,p.YN,p.Kr,p.Fj,p.wV,p.JJ,p.On,g.rH,c.p,T.NW,h.w9,h.ir,f.Q,v.s,x.gM,s.uU]}),r})();function Q(t,r){if(1&t&&(e.TgZ(0,"span",13),e._UZ(1,"img",14),e.qZA(),e._uU(2)),2&t){const n=r.item;e.xp6(1),e.Q6J("src",n.logo,e.LSH),e.xp6(1),e.hij(" ",n.Name," ")}}const F=function(){return["/menu/log/inventory/detail"]},k=function(t){return{ID:t}};function E(t,r){if(1&t&&(e.TgZ(0,"tr")(1,"td")(2,"a",20),e._uU(3),e.ALo(4,"date"),e.qZA()(),e.TgZ(5,"td"),e._uU(6),e.qZA(),e.TgZ(7,"td"),e._uU(8),e.qZA(),e.TgZ(9,"td"),e._uU(10),e.qZA(),e.TgZ(11,"td"),e._uU(12),e.qZA()()),2&t){const n=r.$implicit;e.xp6(2),e.Q6J("routerLink",e.DdM(10,F))("queryParams",e.VKq(11,k,n.ID)),e.xp6(1),e.hij(" ",e.xi3(4,7,n.Created,"dd MMM yyyy HH:mm")," "),e.xp6(3),e.Oqu(n.channelName),e.xp6(2),e.Oqu(n.Sku),e.xp6(2),e.Oqu(n.Stock),e.xp6(2),e.Oqu(n.ResponseCode)}}function Y(t,r){if(1&t){const n=e.EpF();e.ynx(0),e.TgZ(1,"div",15)(2,"table",16)(3,"thead")(4,"tr",17)(5,"th"),e._uU(6,"Created"),e.qZA(),e.TgZ(7,"th"),e._uU(8,"Channel"),e.qZA(),e.TgZ(9,"th"),e._uU(10,"SKU"),e.qZA(),e.TgZ(11,"th"),e._uU(12,"Stock"),e.qZA(),e.TgZ(13,"th"),e._uU(14,"Response code"),e.qZA()()(),e.TgZ(15,"tbody"),e.YNc(16,E,13,13,"tr",18),e.qZA()(),e.TgZ(17,"mat-paginator",19),e.NdJ("page",function(o){e.CHM(n);const i=e.oxw();return e.KtG(i.changePage(o))}),e.qZA()(),e.BQk()}if(2&t){const n=e.oxw();e.xp6(16),e.Q6J("ngForOf",n.Result),e.xp6(1),e.Q6J("length",n.paginationTotal)("pageSize",n.paginationPageSize)("pageIndex",0==(null==n.filter?null:n.filter.PageNumber)?0:(null==n.filter?null:n.filter.PageNumber)-1)}}function B(t,r){1&t&&(e.TgZ(0,"div",21),e._UZ(1,"app-empty-state"),e.qZA())}let H=(()=>{var t;class r{constructor(a,o){this.http=a,this._RawLogService=o,this.Result=Array(),this.filter={PageNumber:0,RowCount:20,Sku:null,ChannelID:"",StatusCode:"",From:"",To:""},this.Load()}ngOnInit(){}Load(){this.http.post("/api/OrdersLoader/Get",{}).subscribe(a=>{this.filter=a.Filter,this.Channel=_.g.assignChannelLogo(a.Options.Channel),this.ActionTypeList=a.Options.ActionTypeList,this.Get()})}Get(a){null!=a&&(this.filter.Sku=a),this.http.post("api/Inventory/GetLog",this.filter).subscribe(o=>{this._RawLogService.Data=o.hits,this.Result=Array();for(let i of o.hits)this.Result.push({ID:i._source.log.id,Created:i._source["@timestamp_received"],channelName:i._source.log.channelName,Sku:i._source.log.sku,Stock:i._source.log.stock,ResponseCode:i._source.log.responseCode});this.paginationTotal=o.total.value,this.paginationPageSize=this.filter.RowCount>this.paginationTotal?this.paginationTotal:this.filter.RowCount,this.paginationTotal=o.total.value,this.paginationPageSize=this.filter.RowCount>this.paginationTotal?this.paginationTotal:this.filter.RowCount})}changePage(a){this.filter.PageNumber=a.pageIndex+1,this.Get()}}return(t=r).\u0275fac=function(a){return new(a||t)(e.Y36(m.O),e.Y36(Z))},t.\u0275cmp=e.Xpm({type:t,selectors:[["app-inventory-log"]],decls:28,vars:10,consts:[["headerTitle","Inventory Log","searchBoxPlaceHolder","Enter SKU...",3,"text","textChange","onSubmit"],["container",""],["bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"clearable","items","ngModel","ngModelChange"],["ng-option-tmp",""],["name","From",3,"date","dateChange"],["name","To",3,"date","dateChange"],["type","number","name","PageNumber",1,"w-100",3,"ngModel","ngModelChange"],["type","number","name","RowCount",1,"w-100",3,"ngModel","ngModelChange"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[4,"ngIf","ngIfElse"],["EMPTY_STATE",""],[1,"me-2"],["alt","",2,"width","18px",3,"src"],[1,"table-responsive"],[1,"table","table-hover"],[1,"table-light"],[4,"ngFor","ngForOf"],[3,"length","pageSize","pageIndex","page"],[3,"routerLink","queryParams"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"]],template:function(a,o){if(1&a&&(e.TgZ(0,"mainpanel",0),e.NdJ("textChange",function(l){return o.filter.Sku=l})("onSubmit",function(l){return o.Get(l)}),e.TgZ(1,"filters")(2,"div",1)(3,"div")(4,"h6"),e._uU(5,"Channel"),e.qZA(),e.TgZ(6,"ng-select",2),e.NdJ("ngModelChange",function(l){return o.filter.ChannelID=l}),e.YNc(7,Q,3,2,"ng-template",3),e.qZA()(),e.TgZ(8,"div")(9,"h6"),e._uU(10,"From/To"),e.qZA(),e.TgZ(11,"datepicker",4),e.NdJ("dateChange",function(l){return o.filter.From=l}),e.qZA(),e.TgZ(12,"datepicker",5),e.NdJ("dateChange",function(l){return o.filter.To=l}),e.qZA()(),e.TgZ(13,"div")(14,"h6"),e._uU(15,"Page Number"),e.qZA(),e.TgZ(16,"input",6),e.NdJ("ngModelChange",function(l){return o.filter.PageNumber=l}),e.qZA()(),e.TgZ(17,"div")(18,"h6"),e._uU(19,"Page Size"),e.qZA(),e.TgZ(20,"input",7),e.NdJ("ngModelChange",function(l){return o.filter.RowCount=l}),e.qZA()()()(),e.TgZ(21,"content")(22,"div",8)(23,"div",9)(24,"div",10),e.YNc(25,Y,18,4,"ng-container",11),e.YNc(26,B,2,0,"ng-template",null,12,e.W1O),e.qZA()()()()()),2&a){const i=e.MAs(27);e.Q6J("text",o.filter.Sku),e.xp6(6),e.Q6J("clearable",!0)("items",o.Channel)("ngModel",o.filter.ChannelID),e.xp6(5),e.Q6J("date",o.filter.From),e.xp6(1),e.Q6J("date",o.filter.To),e.xp6(4),e.Q6J("ngModel",o.filter.PageNumber),e.xp6(4),e.Q6J("ngModel",o.filter.RowCount),e.xp6(5),e.Q6J("ngIf",(null==o.Result?null:o.Result.length)>0)("ngIfElse",i)}},dependencies:[s.sg,s.O5,p.Fj,p.wV,p.JJ,p.On,g.rH,c.p,T.NW,h.w9,h.ir,f.Q,v.s,s.uU]}),r})();function z(t,r){if(1&t&&(e.TgZ(0,"span",13),e._UZ(1,"img",14),e.qZA(),e._uU(2)),2&t){const n=r.item;e.xp6(1),e.Q6J("src",n.logo,e.LSH),e.xp6(1),e.hij(" ",n.Name," ")}}const G=function(){return["/menu/log/order/detail"]},j=function(t){return{ID:t}};function W(t,r){if(1&t&&(e.TgZ(0,"tr")(1,"td")(2,"a",21),e._uU(3),e.ALo(4,"date"),e.qZA()(),e.TgZ(5,"td"),e._uU(6),e.qZA(),e.TgZ(7,"td"),e._uU(8),e.qZA(),e.TgZ(9,"td"),e._uU(10),e.qZA()()),2&t){const n=r.$implicit;e.xp6(2),e.Q6J("routerLink",e.DdM(9,G))("queryParams",e.VKq(10,j,n.id)),e.xp6(1),e.hij(" ",e.xi3(4,6,n.Created,"dd MMM yyyy HH:mm:ss")," "),e.xp6(3),e.Oqu(n.type),e.xp6(2),e.Oqu(n.number),e.xp6(2),e.Oqu(n.message)}}function V(t,r){if(1&t){const n=e.EpF();e.ynx(0),e.TgZ(1,"div",15)(2,"table",16)(3,"thead",17)(4,"tr")(5,"th",18),e._uU(6,"Date"),e.qZA(),e.TgZ(7,"th"),e._uU(8,"Type"),e.qZA(),e.TgZ(9,"th"),e._uU(10,"Number"),e.qZA(),e.TgZ(11,"th"),e._uU(12,"Message"),e.qZA()()(),e.TgZ(13,"tbody"),e.YNc(14,W,11,12,"tr",19),e.qZA()(),e.TgZ(15,"mat-paginator",20),e.NdJ("page",function(o){e.CHM(n);const i=e.oxw();return e.KtG(i.changePage(o))}),e.qZA()(),e.BQk()}if(2&t){const n=e.oxw();e.xp6(14),e.Q6J("ngForOf",n.Result),e.xp6(1),e.Q6J("length",n.paginationTotal)("pageSize",n.paginationPageSize)("pageIndex",0==(null==n.filter?null:n.filter.PageNumber)?0:(null==n.filter?null:n.filter.PageNumber)-1)}}function K(t,r){1&t&&(e.TgZ(0,"div",22),e._UZ(1,"app-empty-state"),e.qZA())}let X=(()=>{var t;class r{constructor(a,o){this.http=a,this._RawLogService=o,this.Result=Array(),this.filter={RowCount:20,Number:"",PageNumber:1,ActionType:"",ChannelID:"",StatusCode:"",From:"",To:""},this.list=[],this.Types=[{Key:0,Value:"Shopee"},{Key:1,Value:"Tokopedia"}]}ngOnInit(){this.Load()}Load(a={}){this.http.post("/api/OrdersLoader/Get",a).subscribe(o=>{this.filter=o.Filter,this.Channel=_.g.assignChannelLogo(o.Options.Channel),this.ActionTypeList=o.Options.ActionTypeList,this.Get()})}Get(a){this.filter.Number=a,this.http.post("api/Orders/GetRawLog",this.filter).subscribe(o=>{this._RawLogService.Data=o.hits,this.Result=Array();for(let i of o.hits)this.Result.push({id:i._id,message:i._source.message,responseCode:i._source.log.responseCode,processTypeString:i._source.log.processType,type:i._source.log.type,number:i._source.log.number,Created:i._source["@timestamp_received"]});this.paginationTotal=o.total.value,this.paginationPageSize=this.filter.RowCount>this.paginationTotal?this.paginationTotal:this.filter.RowCount})}changePage(a){this.filter.PageNumber=a.pageIndex+1,this.Get()}}return(t=r).\u0275fac=function(a){return new(a||t)(e.Y36(m.O),e.Y36(Z))},t.\u0275cmp=e.Xpm({type:t,selectors:[["app-raw-log"]],decls:28,vars:10,consts:[["headerTitle","Channel Webhook Log","searchBoxPlaceHolder","Invoice Number..",3,"text","textChange","onSubmit"],["container",""],["bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"clearable","items","ngModel","ngModelChange"],["ng-option-tmp",""],["name","From",3,"date","dateChange"],["name","To",3,"date","dateChange"],["type","number","name","PageNumber",1,"w-100",3,"ngModel","ngModelChange"],["type","number","name","RowCount",1,"w-100",3,"ngModel","ngModelChange"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[4,"ngIf","ngIfElse"],["EMPTY_STATE",""],[1,"me-2"],["alt","",2,"width","18px",3,"src"],[1,"table-responsive"],[1,"table"],[1,"thead-light"],[2,"width","200px"],[4,"ngFor","ngForOf"],[3,"length","pageSize","pageIndex","page"],[3,"routerLink","queryParams"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"]],template:function(a,o){if(1&a&&(e.TgZ(0,"mainpanel",0),e.NdJ("textChange",function(l){return o.filter.Number=l})("onSubmit",function(l){return o.Get(l)}),e.TgZ(1,"filters")(2,"div",1)(3,"div")(4,"h6"),e._uU(5,"Channel"),e.qZA(),e.TgZ(6,"ng-select",2),e.NdJ("ngModelChange",function(l){return o.filter.ChannelID=l}),e.YNc(7,z,3,2,"ng-template",3),e.qZA()(),e.TgZ(8,"div")(9,"h6"),e._uU(10,"From/To"),e.qZA(),e.TgZ(11,"datepicker",4),e.NdJ("dateChange",function(l){return o.filter.From=l}),e.qZA(),e.TgZ(12,"datepicker",5),e.NdJ("dateChange",function(l){return o.filter.To=l}),e.qZA()(),e.TgZ(13,"div")(14,"h6"),e._uU(15,"Page Number"),e.qZA(),e.TgZ(16,"input",6),e.NdJ("ngModelChange",function(l){return o.filter.PageNumber=l}),e.qZA()(),e.TgZ(17,"div")(18,"h6"),e._uU(19,"Page Size"),e.qZA(),e.TgZ(20,"input",7),e.NdJ("ngModelChange",function(l){return o.filter.RowCount=l}),e.qZA()()()(),e.TgZ(21,"content")(22,"div",8)(23,"div",9)(24,"div",10),e.YNc(25,V,16,4,"ng-container",11),e.YNc(26,K,2,0,"ng-template",null,12,e.W1O),e.qZA()()()()()),2&a){const i=e.MAs(27);e.Q6J("text",o.filter.Number),e.xp6(6),e.Q6J("clearable",!0)("items",o.Channel)("ngModel",o.filter.ChannelID),e.xp6(5),e.Q6J("date",o.filter.From),e.xp6(1),e.Q6J("date",o.filter.To),e.xp6(4),e.Q6J("ngModel",o.filter.PageNumber),e.xp6(4),e.Q6J("ngModel",o.filter.RowCount),e.xp6(5),e.Q6J("ngIf",(null==o.Result?null:o.Result.length)>0)("ngIfElse",i)}},dependencies:[s.sg,s.O5,p.Fj,p.wV,p.JJ,p.On,g.rH,c.p,T.NW,h.w9,h.ir,f.Q,v.s,s.uU]}),r})();class ${constructor(r,n){this._document=n;const a=this._textarea=this._document.createElement("textarea"),o=a.style;o.position="fixed",o.top=o.opacity="0",o.left="-999em",a.setAttribute("aria-hidden","true"),a.value=r,a.readOnly=!0,(this._document.fullscreenElement||this._document.body).appendChild(a)}copy(){const r=this._textarea;let n=!1;try{if(r){const a=this._document.activeElement;r.select(),r.setSelectionRange(0,r.value.length),n=this._document.execCommand("copy"),a&&a.focus()}}catch{}return n}destroy(){const r=this._textarea;r&&(r.remove(),this._textarea=void 0)}}let ee=(()=>{var t;class r{constructor(a){this._document=a}copy(a){const o=this.beginCopy(a),i=o.copy();return o.destroy(),i}beginCopy(a){return new $(a,this._document)}}return(t=r).\u0275fac=function(a){return new(a||t)(e.LFG(s.K0))},t.\u0275prov=e.Yz7({token:t,factory:t.\u0275fac,providedIn:"root"}),r})();const te=new e.OlP("CDK_COPY_TO_CLIPBOARD_CONFIG");let ne=(()=>{var t;class r{constructor(a,o,i){this._clipboard=a,this._ngZone=o,this.text="",this.attempts=1,this.copied=new e.vpe,this._pending=new Set,i&&null!=i.attempts&&(this.attempts=i.attempts)}copy(a=this.attempts){if(a>1){let o=a;const i=this._clipboard.beginCopy(this.text);this._pending.add(i);const l=()=>{const C=i.copy();C||! --o||this._destroyed?(this._currentTimeout=null,this._pending.delete(i),i.destroy(),this.copied.emit(C)):this._currentTimeout=this._ngZone.runOutsideAngular(()=>setTimeout(l,1))};l()}else this.copied.emit(this._clipboard.copy(this.text))}ngOnDestroy(){this._currentTimeout&&clearTimeout(this._currentTimeout),this._pending.forEach(a=>a.destroy()),this._pending.clear(),this._destroyed=!0}}return(t=r).\u0275fac=function(a){return new(a||t)(e.Y36(ee),e.Y36(e.R0b),e.Y36(te,8))},t.\u0275dir=e.lG2({type:t,selectors:[["","cdkCopyToClipboard",""]],hostBindings:function(a,o){1&a&&e.NdJ("click",function(){return o.copy()})},inputs:{text:["cdkCopyToClipboard","text"],attempts:["cdkCopyToClipboardAttempts","attempts"]},outputs:{copied:"cdkCopyToClipboardCopied"}}),r})(),oe=(()=>{var t;class r{}return(t=r).\u0275fac=function(a){return new(a||t)},t.\u0275mod=e.oAB({type:t}),t.\u0275inj=e.cJS({}),r})();function ae(t,r){1&t&&e._UZ(0,"img",21)}function ie(t,r){1&t&&e._UZ(0,"img",22)}function re(t,r){if(1&t&&(e.TgZ(0,"div",4)(1,"div",5)(2,"div",6)(3,"h5"),e._uU(4,"General"),e.qZA()(),e.TgZ(5,"div",7)(6,"div",2)(7,"div",8)(8,"div",9)(9,"label"),e._uU(10,"Date"),e.qZA(),e.TgZ(11,"div")(12,"span"),e._uU(13),e.ALo(14,"date"),e.qZA()()()(),e.TgZ(15,"div",10)(16,"div",9)(17,"label"),e._uU(18,"Market Place Type"),e.qZA(),e.YNc(19,ae,1,0,"img",11),e.YNc(20,ie,1,0,"img",12),e.TgZ(21,"a",13)(22,"span",14),e._uU(23),e.qZA(),e._UZ(24,"br"),e.TgZ(25,"small",15),e._uU(26),e.qZA()()()(),e.TgZ(27,"div",10)(28,"div",9)(29,"label"),e._uU(30,"Number"),e.qZA(),e.TgZ(31,"div")(32,"span"),e._uU(33),e.qZA()()()(),e.TgZ(34,"div",8)(35,"div",9)(36,"label"),e._uU(37,"Process Type"),e.qZA(),e.TgZ(38,"div")(39,"span"),e._uU(40),e.qZA()()()(),e.TgZ(41,"div",4)(42,"div",9)(43,"label"),e._uU(44,"Authorization Header"),e.qZA(),e.TgZ(45,"div")(46,"span"),e._uU(47),e.qZA()()()(),e.TgZ(48,"div",16)(49,"div",5)(50,"div",17)(51,"div",18)(52,"h3"),e._uU(53,"Request"),e.qZA()(),e.TgZ(54,"div",19)(55,"button",20),e._uU(56,"Copy to clipboard"),e.qZA()()(),e.TgZ(57,"div",7),e._uU(58),e.qZA()()()()()()()),2&t){const n=e.oxw();e.xp6(13),e.Oqu(e.xi3(14,11,n.data.Created,"dd MMM yyyy HH:mm:ss")),e.xp6(6),e.Q6J("ngIf",1==n.data.TypeID),e.xp6(1),e.Q6J("ngIf",0==n.data.TypeID),e.xp6(1),e.s9C("href",n.data.ShopLink,e.LSH),e.xp6(2),e.Oqu(n.data.ShopName),e.xp6(3),e.Oqu(n.data.ShopLink),e.xp6(7),e.Oqu(n.data._source.log.number),e.xp6(7),e.Oqu(n.data._source.log.processType),e.xp6(7),e.Oqu(n.data._source.log.authorizationHeader),e.xp6(8),e.Q6J("cdkCopyToClipboard",n.data._source.log.request),e.xp6(3),e.hij(" ",n.data._source.log.request," ")}}let le=(()=>{var t;class r{constructor(a,o,i){this.route=a,this.http=o,this._RawLogService=i,this.route.queryParams.subscribe(l=>{let C=JSON.parse(localStorage.getItem("channel"));if(this.ID=l.ID,this.data=this._RawLogService.Fill(this.ID),this.data.Created=this.data._source["@timestamp_received"],C.length>0){const y=C.find(Me=>Me.ShopID==this.data._source.shopId);y?(this.data.TypeID=y.TypeID,this.data.ShopName=y.Name,this.data.ShopLink=y.URL):(this.data.TypeID=null,this.data.ShopName=null,this.data.ShopLink=null)}})}ngOnInit(){}}return(t=r).\u0275fac=function(a){return new(a||t)(e.Y36(g.gz),e.Y36(m.O),e.Y36(Z))},t.\u0275cmp=e.Xpm({type:t,selectors:[["app-raw-detail"]],decls:5,vars:4,consts:[[3,"headerTitle","hideSearchBox","hideSearchDropdown"],[1,"container-fluid","mt-2"],[1,"row"],["class","col-sm-12",4,"ngIf"],[1,"col-sm-12"],[1,"card"],[1,"card-header"],[1,"card-body"],[1,"col-sm-2"],[1,"info-label-group"],[1,"col-sm-4"],["class","me-2","src","https://res.cloudinary.com/pos/image/upload/v1598262221/icons/marketplace_icons/tokopedia.png",4,"ngIf"],["class","me-2","src","https://res.cloudinary.com/pos/image/upload/v1598262220/icons/marketplace_icons/shopee.png",4,"ngIf"],["target","_blank",3,"href"],[1,"fw-bold"],[1,"text-dark"],[1,"col-sm-12","mt-2"],[1,"card-header","d-lg-flex"],[1,"me-auto"],[1,"d-sm-block","mt-2"],[3,"cdkCopyToClipboard"],["src","https://res.cloudinary.com/pos/image/upload/v1598262221/icons/marketplace_icons/tokopedia.png",1,"me-2"],["src","https://res.cloudinary.com/pos/image/upload/v1598262220/icons/marketplace_icons/shopee.png",1,"me-2"]],template:function(a,o){1&a&&(e.TgZ(0,"mainpanel",0)(1,"content")(2,"div",1)(3,"div",2),e.YNc(4,re,59,14,"div",3),e.qZA()()()()),2&a&&(e.Q6J("headerTitle","Request Raw Log Detail")("hideSearchBox",!0)("hideSearchDropdown",!0),e.xp6(4),e.Q6J("ngIf",o.data))},dependencies:[s.O5,c.p,ne,s.uU]}),r})();function se(t,r){if(1&t&&(e.TgZ(0,"div",10)(1,"div",7)(2,"div",8)(3,"h5"),e._uU(4,"General"),e.qZA()(),e.TgZ(5,"div",9)(6,"div",3)(7,"div",6)(8,"div",12)(9,"label"),e._uU(10,"Date"),e.qZA(),e.TgZ(11,"div")(12,"span"),e._uU(13),e.ALo(14,"date"),e.qZA()()()(),e.TgZ(15,"div",6)(16,"div",12)(17,"label"),e._uU(18,"SKU"),e.qZA(),e.TgZ(19,"div")(20,"span"),e._uU(21),e.qZA()()()(),e.TgZ(22,"div",6)(23,"div",12)(24,"label"),e._uU(25,"Channel"),e.qZA(),e.TgZ(26,"div")(27,"span"),e._uU(28),e.qZA()()()(),e.TgZ(29,"div",6)(30,"div",12)(31,"label"),e._uU(32,"Response Code"),e.qZA(),e.TgZ(33,"div")(34,"span"),e._uU(35),e.qZA()()()()()()()()),2&t){const n=e.oxw();e.xp6(13),e.Oqu(e.xi3(14,4,n.data.Created,"dd MMM yyyy")),e.xp6(8),e.Oqu(n.data.Sku),e.xp6(7),e.Oqu(n.data.ChannelName),e.xp6(7),e.Oqu(n.data.ResponseCode)}}let de=(()=>{var t;class r{constructor(a,o,i){this.route=a,this.http=o,this._RawLogService=i,this.data={Created:"",Sku:"",ChannelName:"",ResponseCode:""},this.route.queryParams.subscribe(l=>{this.ID=l.ID,this.Load()})}ngOnInit(){}Load(){this.http.post("/api/Inventory/GetInventoryLogDeatil",{ID:this.ID}).subscribe(o=>{this.data.Created=o.hits[0]._source["@timestamp_received"],this.data.Sku=o.hits[0]._source.log.sku,this.data.ChannelName=o.hits[0]._source.log.channelName,this.data.ResponseCode=o.hits[0]._source.log.responseCode,this.request=JSON.parse(o.hits[0]._source.log.request),this.response=o.hits[0]._source.log.response})}}return(t=r).\u0275fac=function(a){return new(a||t)(e.Y36(g.gz),e.Y36(m.O),e.Y36(Z))},t.\u0275cmp=e.Xpm({type:t,selectors:[["app-inventory-detail"]],decls:30,vars:9,consts:[[3,"headerTitle","pageData","hideSearchBox","hideSearchDropdown"],["role","button","routerLink","/menu/log/inventory",1,"btn","btn-secondary","btn-fill","btn-lg","me-3"],[1,"container-fluid","mt-3"],[1,"row"],["class","col-sm-12",4,"ngIf"],[1,"row","mt-2"],[1,"col-sm-6"],[1,"card"],[1,"card-header"],[1,"card-body"],[1,"col-sm-12"],[1,"form-group"],[1,"info-label-group"]],template:function(a,o){1&a&&(e.TgZ(0,"mainpanel",0)(1,"actions")(2,"a",1),e._uU(3,"Back"),e.qZA()(),e.TgZ(4,"content")(5,"div",2)(6,"div",3),e.YNc(7,se,36,7,"div",4),e.qZA(),e.TgZ(8,"div",5)(9,"div",6)(10,"div",7)(11,"div",8)(12,"h5"),e._uU(13,"Request"),e.qZA()(),e.TgZ(14,"div",9)(15,"div",10)(16,"div",11)(17,"pre"),e._uU(18),e.ALo(19,"json"),e.qZA()()()()()(),e.TgZ(20,"div",6)(21,"div",7)(22,"div",8)(23,"h5"),e._uU(24,"Response"),e.qZA()(),e.TgZ(25,"div",9)(26,"div",10)(27,"div",11)(28,"pre"),e._uU(29),e.qZA()()()()()()()()()()),2&a&&(e.Q6J("headerTitle","Inventory Detail")("pageData","Inventory Detail ")("hideSearchBox",!0)("hideSearchDropdown",!0),e.xp6(7),e.Q6J("ngIf",o.data),e.xp6(11),e.Oqu(e.lcZ(19,7,o.request)),e.xp6(11),e.Oqu(o.response))},dependencies:[s.O5,g.rH,c.p,s.Ts,s.uU]}),r})();function pe(t,r){if(1&t&&(e.TgZ(0,"div",9)(1,"div",10)(2,"label"),e._uU(3,"Process Code"),e.qZA(),e.TgZ(4,"div")(5,"span"),e._uU(6),e.qZA()()()()),2&t){const n=e.oxw();e.xp6(6),e.Oqu(n.ProcessedCode)}}function ge(t,r){if(1&t){const n=e.EpF();e.TgZ(0,"a",16),e.NdJ("click",function(){e.CHM(n);const o=e.oxw();return e.KtG(o.Retry())}),e._uU(1,"Retry"),e.qZA()}}let ue=(()=>{var t;class r{constructor(a,o){this.route=a,this.http=o,this.ProcessDuration=0,this.request="",this.response="",this.route.queryParams.subscribe(i=>{this.ID=i.ID,this.Load()})}ngOnInit(){}Retry(){this.http.post("/api/Orders/Retry",{Number:this.Number,ShopID:this.shopId}).subscribe(o=>{alert(JSON.stringify(o))})}Load(){this.http.post("/api/Orders/GetDetail",{ID:this.ID}).subscribe(o=>{for(let i of o.hits)this.Number=i._source.log.number,this.MarketTypeString=i._source.log.type,this.ResponseCode=i._source.log.responseCode,this.POSActionTypeString=i._source.message,this.ProcessDuration=0,this.Created=i._source["@timestamp_received"],this.request=JSON.parse(i._source.log.request),this.response=JSON.parse(i._source.log.response),this.shopId=i._source.shopId,this.ProcessedCode=i._source.log.processedCode})}}return(t=r).\u0275fac=function(a){return new(a||t)(e.Y36(g.gz),e.Y36(m.O))},t.\u0275cmp=e.Xpm({type:t,selectors:[["app-orderdetail"]],decls:83,vars:21,consts:[[3,"headerTitle","pageData","hideSearchBox","hideSearchDropdown"],["role","button","routerLink","/menu/log/order",1,"btn","btn-secondary","btn-fill","btn-lg","me-3"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-sm-12"],[1,"card"],[1,"card-header"],[1,"card-body"],[1,"row","mt-7"],[1,"col-sm-6"],[1,"info-label-group"],["class","col-sm-6",4,"ngIf"],[1,"row","mt-2"],[1,"form-group"],[1,"float-right"],["role","button","class","btn btn-success btn-fill btn-lg me-3",3,"click",4,"ngIf"],["role","button",1,"btn","btn-success","btn-fill","btn-lg","me-3",3,"click"]],template:function(a,o){1&a&&(e.TgZ(0,"mainpanel",0)(1,"actions")(2,"a",1),e._uU(3,"Back"),e.qZA()(),e.TgZ(4,"content")(5,"div",2)(6,"div",3)(7,"div",4)(8,"div",5)(9,"div",6)(10,"h5"),e._uU(11,"General"),e.qZA()(),e.TgZ(12,"div",7)(13,"div",8)(14,"div",9)(15,"div",10)(16,"label"),e._uU(17,"Date"),e.qZA(),e.TgZ(18,"div")(19,"span"),e._uU(20),e.ALo(21,"date"),e.qZA()()()(),e.TgZ(22,"div",9)(23,"div",10)(24,"label"),e._uU(25,"Number"),e.qZA(),e.TgZ(26,"div")(27,"span"),e._uU(28),e.qZA()()()(),e.TgZ(29,"div",9)(30,"div",10)(31,"label"),e._uU(32,"Type"),e.qZA(),e.TgZ(33,"div")(34,"span"),e._uU(35),e.qZA()()()(),e.TgZ(36,"div",9)(37,"div",10)(38,"label"),e._uU(39,"Response Code"),e.qZA(),e.TgZ(40,"div")(41,"span"),e._uU(42),e.qZA()()()(),e.TgZ(43,"div",9)(44,"div",10)(45,"label"),e._uU(46,"ShopID"),e.qZA(),e.TgZ(47,"div")(48,"span"),e._uU(49),e.qZA()()()(),e.YNc(50,pe,7,1,"div",11),e.TgZ(51,"div",9)(52,"div",10)(53,"label"),e._uU(54,"Action"),e.qZA(),e.TgZ(55,"div")(56,"span"),e._uU(57),e.qZA()()()()()()()()(),e.TgZ(58,"div",12)(59,"div",9)(60,"div",5)(61,"div",6)(62,"h5"),e._uU(63,"Request"),e.qZA()(),e.TgZ(64,"div",7)(65,"div",4)(66,"div",13)(67,"pre"),e._uU(68),e.ALo(69,"json"),e.qZA()()(),e.TgZ(70,"actions",14),e.YNc(71,ge,2,0,"a",15),e.qZA()()()(),e.TgZ(72,"div",9)(73,"div",5)(74,"div",6)(75,"h5"),e._uU(76,"Response"),e.qZA()(),e.TgZ(77,"div",7)(78,"div",4)(79,"div",13)(80,"pre"),e._uU(81),e.ALo(82,"json"),e.qZA()()()()()()()()()()),2&a&&(e.Q6J("headerTitle","Order #"+o.Number)("pageData","Orders Detail ")("hideSearchBox",!0)("hideSearchDropdown",!0),e.xp6(20),e.Oqu(e.xi3(21,14,o.Created,"dd MMM yyyy HH:mm:ss")),e.xp6(8),e.Oqu(o.Number),e.xp6(7),e.Oqu(o.MarketTypeString),e.xp6(7),e.Oqu(o.ResponseCode),e.xp6(7),e.Oqu(o.shopId),e.xp6(1),e.Q6J("ngIf",null!=o.ProcessedCode),e.xp6(7),e.Oqu(o.POSActionTypeString),e.xp6(11),e.Oqu(e.lcZ(69,17,o.request)),e.xp6(3),e.Q6J("ngIf","200"!=o.ResponseCode&&"201"!=o.ResponseCode),e.xp6(10),e.Oqu(e.lcZ(82,19,o.response)))},dependencies:[s.O5,g.rH,c.p,s.Ts,s.uU]}),r})();const ce=function(){return["/menu/log/exception/detail"]},me=function(t){return{ID:t}};function he(t,r){if(1&t&&(e.TgZ(0,"tr")(1,"td",12),e._UZ(2,"img",13),e.qZA(),e.TgZ(3,"td"),e._uU(4),e.ALo(5,"date"),e.qZA(),e.TgZ(6,"td")(7,"a",14),e._uU(8),e.qZA()(),e.TgZ(9,"td")(10,"div",15),e._uU(11),e.qZA(),e.TgZ(12,"div"),e._uU(13),e.qZA()()()),2&t){const n=r.$implicit;e.xp6(2),e.Q6J("src",n.logo,e.LSH),e.xp6(2),e.Oqu(e.xi3(5,7,n.date,"dd-MM-yyyy hh:mm:ss")),e.xp6(3),e.Q6J("routerLink",e.DdM(10,ce))("queryParams",e.VKq(11,me,n.id)),e.xp6(1),e.hij(" ",n.number," "),e.xp6(3),e.Oqu(n.message),e.xp6(2),e.Oqu(n.stackTrace)}}function _e(t,r){if(1&t){const n=e.EpF();e.ynx(0),e.TgZ(1,"mat-paginator",16),e.NdJ("page",function(o){e.CHM(n);const i=e.oxw(2);return e.KtG(i.onPaginationChange(o))}),e.qZA(),e.BQk()}if(2&t){const n=e.oxw(2);e.xp6(1),e.Q6J("length",n.pageTotal)("pageSize",n.pageSize)("pageIndex",0==(null==n.filter?null:n.filter.PageNumber)?0:(null==n.filter?null:n.filter.PageNumber)-1)}}function Te(t,r){if(1&t&&(e.ynx(0),e.TgZ(1,"div",6)(2,"table",7)(3,"thead")(4,"tr",8)(5,"th"),e._uU(6,"Channel"),e.qZA(),e.TgZ(7,"th",9),e._uU(8,"Date"),e.qZA(),e.TgZ(9,"th"),e._uU(10,"Number"),e.qZA(),e.TgZ(11,"th"),e._uU(12,"Exception"),e.qZA()()(),e.TgZ(13,"tbody"),e.YNc(14,he,14,13,"tr",10),e.qZA()(),e.YNc(15,_e,2,3,"ng-container",11),e.qZA(),e.BQk()),2&t){const n=e.oxw();e.xp6(14),e.Q6J("ngForOf",n.exceptions),e.xp6(1),e.Q6J("ngIf",(null==n.exceptions?null:n.exceptions.length)>0)}}function Ze(t,r){1&t&&(e.TgZ(0,"div",17),e._UZ(1,"app-empty-state"),e.qZA())}let fe=(()=>{var t;class r{constructor(a){this.http=a,this.exceptions=[],this.filter={RowCount:50,PageNumber:1},this.getData()}getData(){this.http.post("/api/Orders/GetExceptionList",this.filter).subscribe(a=>{this.exceptions=a.hits.map(o=>({id:o._id,logo:_.g.getChannelLogoByName(o._source.error?.Type),number:o._source.error.number,date:o._source["@timestamp_received"],stackTrace:o._source.error.stackTrace,message:o._source.message,requestJSON:o._source?.error?.requestJSON})),this.pageTotal=a.total.value,this.pageSize=this.filter.RowCount>this.pageTotal?this.pageTotal:this.filter.RowCount})}onPaginationChange(a){this.filter.PageNumber=a.pageIndex+1,this.getData()}}return(t=r).\u0275fac=function(a){return new(a||t)(e.Y36(m.O))},t.\u0275cmp=e.Xpm({type:t,selectors:[["app-exception-log"]],decls:8,vars:2,consts:[["headerTitle","Exception Log","searchBoxPlaceHolder","Enter Number...","hideSearchBox","true","hideSearchDropdown","true"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[4,"ngIf","ngIfElse"],["EMPTY_STATE",""],[1,"table-responsive"],[1,"table","table-hover"],[1,"table-light"],[2,"width","140px"],[4,"ngFor","ngForOf"],[4,"ngIf"],[1,"text-center"],[2,"width","25px",3,"src"],[3,"routerLink","queryParams"],[1,"fw-bold"],[3,"length","pageSize","pageIndex","page"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"]],template:function(a,o){if(1&a&&(e.TgZ(0,"mainpanel",0)(1,"content")(2,"div",1)(3,"div",2)(4,"div",3),e.YNc(5,Te,16,2,"ng-container",4),e.YNc(6,Ze,2,0,"ng-template",null,5,e.W1O),e.qZA()()()()()),2&a){const i=e.MAs(7);e.xp6(5),e.Q6J("ngIf",o.exceptions.length>0)("ngIfElse",i)}},dependencies:[s.sg,s.O5,g.rH,c.p,T.NW,v.s,s.uU]}),r})();function ve(t,r){if(1&t&&(e.TgZ(0,"span",13),e._UZ(1,"img",14),e.qZA(),e._uU(2)),2&t){const n=r.item;e.xp6(1),e.Q6J("src",n.logo,e.LSH),e.xp6(1),e.hij(" ",n.Name," ")}}const Ce=function(t){return{ID:t}};function ye(t,r){if(1&t&&(e.TgZ(0,"tr")(1,"td"),e._uU(2),e.qZA(),e.TgZ(3,"td"),e._UZ(4,"img",24),e.qZA(),e.TgZ(5,"td"),e._uU(6),e.qZA(),e.TgZ(7,"td",25)(8,"a",26),e._uU(9),e.ALo(10,"number"),e.qZA()(),e.TgZ(11,"td"),e._uU(12),e.qZA(),e.TgZ(13,"td"),e._uU(14),e.ALo(15,"date"),e.qZA()()),2&t){const n=r.$implicit;e.xp6(2),e.Oqu(n._source.ChannelName),e.xp6(2),e.Q6J("src",n.logo,e.LSH),e.xp6(2),e.Oqu(n._source.DateRange),e.xp6(2),e.Q6J("queryParams",e.VKq(12,Ce,n._source.ID)),e.xp6(1),e.hij(" ",e.lcZ(10,7,n._source.CountOrder)," "),e.xp6(3),e.Oqu(n._source.UserLogin),e.xp6(2),e.hij("",e.xi3(15,9,n._source["@timestamp_received"],"dd MMM yyyy hh:mm")," ")}}function Ae(t,r){if(1&t){const n=e.EpF();e.ynx(0),e.TgZ(1,"div",15)(2,"table",16)(3,"thead")(4,"tr",17)(5,"th",18),e._uU(6,"Channel"),e.qZA(),e.TgZ(7,"th",19),e._uU(8,"Type"),e.qZA(),e.TgZ(9,"th",20),e._uU(10,"Download Date Range"),e.qZA(),e.TgZ(11,"th",21),e._uU(12,"Count"),e.qZA(),e.TgZ(13,"th"),e._uU(14,"User Login"),e.qZA(),e.TgZ(15,"th"),e._uU(16,"Created"),e.qZA()()(),e.TgZ(17,"tbody"),e.YNc(18,ye,16,14,"tr",22),e.qZA()(),e.TgZ(19,"mat-paginator",23),e.NdJ("page",function(o){e.CHM(n);const i=e.oxw();return e.KtG(i.onPaginationChange(o))}),e.qZA()(),e.BQk()}if(2&t){const n=e.oxw();e.xp6(18),e.Q6J("ngForOf",n.downloadOrders),e.xp6(1),e.Q6J("length",n.paginationTotal)("pageSize",n.paginationPageSize)("pageIndex",0==(null==n.filter?null:n.filter.PageNumber)?0:(null==n.filter?null:n.filter.PageNumber)-1)}}function be(t,r){1&t&&(e.TgZ(0,"div",27),e._UZ(1,"app-empty-state"),e.qZA())}let xe=(()=>{var t;class r{constructor(a){this.http=a,this.filter={PageNumber:0,RowCount:20,ChannelID:"",From:"",To:""},this.onGetLoader()}onGetLoader(){this.http.post("/api/OrdersLoader/OrderLogsLoader",{}).subscribe(a=>{this.filter=a.Filter,this.channels=_.g.assignChannelLogo(a.Options.Channel),this.getDownloadOrders()})}getDownloadOrders(){this.http.post("api/Orders/OrderLogsPaged",this.filter).subscribe(a=>{this.downloadOrders=a.hits,this.setChannelLogo(),this.paginationTotal=a.total.value,this.paginationPageSize=this.filter.RowCount>this.paginationTotal?this.paginationTotal:this.filter.RowCount})}setChannelLogo(){this.downloadOrders=this.downloadOrders.map(a=>(a.logo=_.g.getChannelLogoByTypeId(a._source.TypeID),a))}onPaginationChange(a){this.filter.PageNumber=a.pageIndex+1,this.getDownloadOrders()}}return(t=r).\u0275fac=function(a){return new(a||t)(e.Y36(m.O))},t.\u0275cmp=e.Xpm({type:t,selectors:[["app-manual-order-log"]],decls:28,vars:10,consts:[["headerTitle","Download Order Log",3,"hideSearchBox","onSubmit"],["container",""],["bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"clearable","items","ngModel","ngModelChange"],["ng-option-tmp",""],["name","From",3,"date","dateChange"],["name","To",3,"date","dateChange"],["type","number","name","PageNumber",1,"w-100",3,"ngModel","ngModelChange"],["type","number","name","RowCount",1,"w-100",3,"ngModel","ngModelChange"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[4,"ngIf","ngIfElse"],["EMPTY_STATE",""],[1,"me-2"],["alt","",2,"width","18px",3,"src"],[1,"table-responsive"],[1,"table","table-hover"],[1,"table-light"],[2,"width","250px"],[2,"width","150px"],[2,"width","200px"],[1,"text-end",2,"width","200px"],[4,"ngFor","ngForOf"],[3,"length","pageSize","pageIndex","page"],[2,"width","25px",3,"src"],[1,"text-end"],["routerLink","/menu/log/order-log/order-log-detail",3,"queryParams"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"]],template:function(a,o){if(1&a&&(e.TgZ(0,"mainpanel",0),e.NdJ("onSubmit",function(){return o.getDownloadOrders()}),e.TgZ(1,"filters")(2,"div",1)(3,"div")(4,"h6"),e._uU(5,"Channel"),e.qZA(),e.TgZ(6,"ng-select",2),e.NdJ("ngModelChange",function(l){return o.filter.ChannelID=l}),e.YNc(7,ve,3,2,"ng-template",3),e.qZA()(),e.TgZ(8,"div")(9,"h6"),e._uU(10,"From/To"),e.qZA(),e.TgZ(11,"datepicker",4),e.NdJ("dateChange",function(l){return o.filter.From=l}),e.qZA(),e.TgZ(12,"datepicker",5),e.NdJ("dateChange",function(l){return o.filter.To=l}),e.qZA()(),e.TgZ(13,"div")(14,"h6"),e._uU(15,"Page Number"),e.qZA(),e.TgZ(16,"input",6),e.NdJ("ngModelChange",function(l){return o.filter.PageNumber=l}),e.qZA()(),e.TgZ(17,"div")(18,"h6"),e._uU(19,"Page Size"),e.qZA(),e.TgZ(20,"input",7),e.NdJ("ngModelChange",function(l){return o.filter.RowCount=l}),e.qZA()()()(),e.TgZ(21,"content")(22,"div",8)(23,"div",9)(24,"div",10),e.YNc(25,Ae,20,4,"ng-container",11),e.YNc(26,be,2,0,"ng-template",null,12,e.W1O),e.qZA()()()()()),2&a){const i=e.MAs(27);e.Q6J("hideSearchBox",!0),e.xp6(6),e.Q6J("clearable",!0)("items",o.channels)("ngModel",o.filter.ChannelID),e.xp6(5),e.Q6J("date",o.filter.From),e.xp6(1),e.Q6J("date",o.filter.To),e.xp6(4),e.Q6J("ngModel",o.filter.PageNumber),e.xp6(4),e.Q6J("ngModel",o.filter.RowCount),e.xp6(5),e.Q6J("ngIf",(null==o.downloadOrders?null:o.downloadOrders.length)>0)("ngIfElse",i)}},dependencies:[s.sg,s.O5,p.Fj,p.wV,p.JJ,p.On,g.rH,c.p,T.NW,h.w9,h.ir,f.Q,v.s,s.JJ,s.uU]}),r})();var q=d(9397),qe=d(7081),O=d(7398);let Oe=(()=>{var t;class r{constructor(a){this.httpService=a}getExceptionDetail(a){return this.httpService.post("/api/Orders/GetDetailException",{ID:a}).pipe((0,O.U)(i=>i?.hits[0]?._source))}}return(t=r).\u0275fac=function(a){return new(a||t)(e.LFG(m.O))},t.\u0275prov=e.Yz7({token:t,factory:t.\u0275fac,providedIn:"root"}),r})();function Ue(t,r){if(1&t&&(e.TgZ(0,"div",2)(1,"div",3)(2,"div",4)(3,"div",5)(4,"div",6)(5,"h5"),e._uU(6,"General"),e.qZA()(),e.TgZ(7,"div",7)(8,"div",8)(9,"div",9)(10,"div",10)(11,"label"),e._uU(12,"Date"),e.qZA(),e.TgZ(13,"div")(14,"span"),e._uU(15),e.ALo(16,"date"),e.qZA()()()(),e.TgZ(17,"div",9)(18,"div",10)(19,"label"),e._uU(20,"Number"),e.qZA(),e.TgZ(21,"div")(22,"span"),e._uU(23),e.qZA()()()(),e.TgZ(24,"div",9)(25,"div",10)(26,"label"),e._uU(27,"Type"),e.qZA(),e.TgZ(28,"div")(29,"span"),e._uU(30),e.qZA()()()(),e.TgZ(31,"div",9)(32,"div",10)(33,"label"),e._uU(34,"ShopID"),e.qZA(),e.TgZ(35,"div")(36,"span"),e._uU(37),e.qZA()()()()()()()()(),e.TgZ(38,"div",11)(39,"div",9)(40,"div",5)(41,"div",6)(42,"h5"),e._uU(43,"Request"),e.qZA()(),e.TgZ(44,"div",7)(45,"div",12)(46,"div",13)(47,"pre"),e._uU(48),e.ALo(49,"json"),e.qZA()()()()()(),e.TgZ(50,"div",9)(51,"div",5)(52,"div",6)(53,"h5"),e._uU(54,"Exception"),e.qZA()(),e.TgZ(55,"div",7)(56,"div",14)(57,"div",13)(58,"div",15),e._uU(59),e.qZA(),e.TgZ(60,"pre"),e._uU(61),e.qZA()()()()()()()()),2&t){const n=r.ngIf;e.xp6(15),e.Oqu(e.xi3(16,7,n["@timestamp"],"dd MMM yyyy HH:mm:ss")),e.xp6(8),e.Oqu(null==n||null==n.error?null:n.error.number),e.xp6(7),e.Oqu(null==n||null==n.error?null:n.error.Type),e.xp6(7),e.Oqu(null==n?null:n.shopId),e.xp6(11),e.Oqu(e.lcZ(49,10,null==n||null==n.error?null:n.error.requestJSON)),e.xp6(11),e.Oqu(null==n?null:n.message),e.xp6(2),e.Oqu(null==n||null==n.error?null:n.error.stackTrace)}}function we(t,r){if(1&t&&(e.TgZ(0,"tr")(1,"td"),e._uU(2),e.qZA(),e.TgZ(3,"td"),e._uU(4),e.qZA(),e.TgZ(5,"td"),e._uU(6),e.ALo(7,"date"),e.qZA(),e.TgZ(8,"td"),e._uU(9),e.ALo(10,"date"),e.qZA(),e.TgZ(11,"td"),e._uU(12),e.qZA()()),2&t){const n=r.$implicit;e.xp6(2),e.hij(" ",n.Number," "),e.xp6(2),e.hij(" ",n.Status," "),e.xp6(2),e.hij(" ",e.xi3(7,5,n.Start,"HH:mm:ss:SSS")," "),e.xp6(3),e.hij(" ",e.xi3(10,8,n.End,"HH:mm:ss:SSS")," "),e.xp6(3),e.hij(" ",n.Exception," ")}}const Ie=[{path:"",component:U,children:[{path:"",redirectTo:"order",pathMatch:"full"},{path:"order",component:P,canActivate:[u.a],data:{title:"Order Log"}},{path:"inventory",component:H,canActivate:[u.a],data:{title:"Inventory Log"}},{path:"rawlog",component:X,canActivate:[u.a],data:{title:"Raw Log"}},{path:"rawlog/detail",component:le,canActivate:[u.a],data:{title:"Raw Log Detail"}},{path:"inventory/detail",component:de,canActivate:[u.a],data:{title:"Inventory Details"}},{path:"order/detail",component:ue,canActivate:[u.a],data:{title:"Order Details"}},{path:"exception",component:fe,canActivate:[u.a],data:{title:"Exception Log"}},{path:"exception/detail",component:(()=>{var t;class r{constructor(a,o){this.activatedRoute=a,this.exceptionService=o,this.invoiceNumber=""}ngOnInit(){let a=this.activatedRoute.snapshot.queryParams;this.getExceptionDetail(a?.ID)}getExceptionDetail(a){this.exceptionDetail$=this.exceptionService.getExceptionDetail(a).pipe((0,q.b)(o=>{this.invoiceNumber=o?.error?.number}),(0,qe.d)(1))}}return(t=r).\u0275fac=function(a){return new(a||t)(e.Y36(g.gz),e.Y36(Oe))},t.\u0275cmp=e.Xpm({type:t,selectors:[["app-exception-detail"]],decls:4,vars:6,consts:[[3,"headerTitle","hideSearchBox","hideSearchDropdown"],["class","container-fluid mt-3",4,"ngIf"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-12"],[1,"card"],[1,"card-header"],[1,"card-body"],[1,"row","mt-7"],[1,"col-sm-6"],[1,"info-label-group"],[1,"row","mt-2"],[1,"col-sm-12"],[1,"form-group"],[1,"col-sm-12","mt-2"],[1,"fw-bold"]],template:function(a,o){1&a&&(e.TgZ(0,"mainpanel",0)(1,"content"),e.YNc(2,Ue,62,12,"div",1),e.ALo(3,"async"),e.qZA()()),2&a&&(e.Q6J("headerTitle","Order #"+o.invoiceNumber)("hideSearchBox",!0)("hideSearchDropdown",!0),e.xp6(2),e.Q6J("ngIf",e.lcZ(3,4,o.exceptionDetail$)))},dependencies:[s.O5,c.p,s.Ov,s.Ts,s.uU]}),r})(),canActivate:[u.a],data:{title:"Exception Log Detail"}},{path:"order-log",component:xe,canActivate:[u.a],data:{title:"order Log"}},{path:"order-log/order-log-detail",component:(()=>{var t;class r{constructor(a,o){this.route=a,this.httpService=o}ngOnInit(){this.initOrderDetails()}initOrderDetails(){this.orderDetails$=this.httpService.post("/api/Orders/DownloadOrderLogsDetail",{ID:this.route.snapshot.queryParams.ID}).pipe((0,q.b)(o=>{const i=o?.hits[0]?._source;this.headerTitle=`${i?.ChannelName} (${i?.DateRange})`}),(0,O.U)(o=>o?.hits[0]._source?.Detail))}}return(t=r).\u0275fac=function(a){return new(a||t)(e.Y36(g.gz),e.Y36(m.O))},t.\u0275cmp=e.Xpm({type:t,selectors:[["app-download-order-detail"]],decls:22,vars:7,consts:[[3,"headerTitle","description","hideSearchBox","hideSearchDropdown"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"table","table-hover"],[1,"table-light"],[2,"width","200px"],[2,"width","150px"],[2,"width","100px"],[4,"ngFor","ngForOf"]],template:function(a,o){1&a&&(e.TgZ(0,"mainpanel",0)(1,"content")(2,"div",1)(3,"div",2)(4,"div",3)(5,"div",4)(6,"table",5)(7,"thead")(8,"tr",6)(9,"th",7),e._uU(10,"Number"),e.qZA(),e.TgZ(11,"th",8),e._uU(12,"Status"),e.qZA(),e.TgZ(13,"th",9),e._uU(14,"Start Time"),e.qZA(),e.TgZ(15,"th",9),e._uU(16,"End Time"),e.qZA(),e.TgZ(17,"th"),e._uU(18,"Exception"),e.qZA()()(),e.TgZ(19,"tbody"),e.YNc(20,we,13,11,"tr",10),e.ALo(21,"async"),e.qZA()()()()()()()()),2&a&&(e.Q6J("headerTitle",o.headerTitle)("description",o.headerTitle)("hideSearchBox",!0)("hideSearchDropdown",!0),e.xp6(20),e.Q6J("ngForOf",e.lcZ(21,5,o.orderDetails$)))},dependencies:[s.sg,c.p,s.Ov,s.uU]}),r})(),canActivate:[u.a],data:{title:"Order Log Detail"}},{path:"inventory-async",loadComponent:()=>Promise.all([d.e(592),d.e(700)]).then(d.bind(d,1700)).then(t=>t.InventoryAsyncLogComponent),canActivate:[u.a],data:{title:"Sync Inventory Async"}},{path:"inventory-async/detail",loadComponent:()=>Promise.all([d.e(592),d.e(806)]).then(d.bind(d,6806)).then(t=>t.InventoryAsyncDetailComponent),canActivate:[u.a],data:{title:"Sync Inventory Async Detail"}}]}];let Ne=(()=>{var t;class r{}return(t=r).\u0275fac=function(a){return new(a||t)},t.\u0275mod=e.oAB({type:t}),t.\u0275inj=e.cJS({imports:[s.ez,g.Bz.forChild(Ie)]}),r})(),De=(()=>{var t;class r{}return(t=r).\u0275fac=function(a){return new(a||t)},t.\u0275mod=e.oAB({type:t}),t.\u0275inj=e.cJS({imports:[s.ez,p.u5,p.UX,Ne,g.Bz,c.R,oe,T.TU,h.A0,b.Z,f.Q,x.AV]}),r})()}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkpos_marketplace=self.webpackChunkpos_marketplace||[]).push([[877],{5877:(G,y,s)=>{s.r(y),s.d(y,{OrderModule:()=>$});var p=s(6814),e=s(5879),_=s(6027),C=s(9790);let v=(()=>{var r;class a{constructor(){this.reportTabs=[{Title:"1 - New Order",Url:"/menu/report/order/sync-order"},{Title:"2 - Ready to Ship",Url:"/menu/report/order/invoice"},{Title:"3 - Shipped",Url:"/menu/report/order/delivery"},{Title:"4 - Completed",Url:"/menu/report/order/payment"},{Title:"All",Url:"/menu/report/order/all"}]}}return(r=a).\u0275fac=function(t){return new(t||r)},r.\u0275cmp=e.Xpm({type:r,selectors:[["app-order"]],decls:5,vars:1,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid"],[3,"Tabs"]],template:function(t,n){1&t&&(e.TgZ(0,"nav",0)(1,"div",1)(2,"div"),e._UZ(3,"nav-tab",2),e.qZA()()(),e._UZ(4,"router-outlet")),2&t&&(e.xp6(3),e.Q6J("Tabs",n.reportTabs))},dependencies:[_.e,C.lC],styles:[".dropdown[_ngcontent-%COMP%] .dropdown-menu.report.show[_ngcontent-%COMP%]{top:100%!important;transform:none!important;z-index:10000;cursor:pointer;right:-50%}"]}),a})();var d=s(5802);class f{}var Z=s(9659);let u=(()=>{var r;class a{constructor(t){this.http=t}GetLoader(){return this.http.post("/api/Report/GetLoader",{})}GetSyncOrder(t){return new Promise((n,o)=>{this.http.post("/api/Report/Salesorder",JSON.stringify(t)).subscribe(l=>{n(l)})})}GetSyncInvoice(t){return new Promise((n,o)=>{this.http.post("/api/Report/Invoice",JSON.stringify(t)).subscribe(l=>{n(l)})})}GetSyncDelivery(t){return new Promise((n,o)=>{this.http.post("/api/Report/Delivery",JSON.stringify(t)).subscribe(l=>{n(l)})})}GetSyncPayment(t){return new Promise((n,o)=>{this.http.post("/api/Report/Payment",JSON.stringify(t)).subscribe(l=>{n(l)})})}getAllReport(t){return this.http.post("/api/Report/all",JSON.stringify(t))}}return(r=a).\u0275fac=function(t){return new(t||r)(e.LFG(Z.O))},r.\u0275prov=e.Yz7({token:r,factory:r.\u0275fac,providedIn:"root"}),a})();var h=s(4387),m=s(4126),c=function(r){return r[r.OK=200]="OK",r[r.BAD_REQUEST=400]="BAD_REQUEST",r[r.CONFLICT=409]="CONFLICT",r[r.NOT_FOUND=404]="NOT_FOUND",r[r.INTERNAL_SERVER_ERROR=500]="INTERNAL_SERVER_ERROR",r}(c||{});function F(r,a){if(1&r&&(e.TgZ(0,"th",9)(1,"div",10)(2,"h4"),e._uU(3),e.qZA(),e.TgZ(4,"small",11),e._uU(5),e.qZA()()()),2&r){const i=a.$implicit,t=e.oxw();e.xp6(3),e.Oqu(i),e.xp6(1),e.Tol(t.getTextBgColor(i)),e.xp6(1),e.Oqu(t.getHeaderStatusDesc(i))}}const S=function(){return["/menu/log/order"]},O=function(r,a,i,t,n){return{responseCode:r,From:a,to:i,actionType:t,ChannelID:n}};function P(r,a){if(1&r&&(e.TgZ(0,"td",14)(1,"a",15),e._uU(2),e.qZA()()),2&r){const i=a.$implicit,t=e.oxw().$implicit,n=e.oxw();e.xp6(1),e.Q6J("routerLink",e.DdM(3,S))("queryParams",e.qbA(4,O,i.Key,n.fromQueryParam,n.toQueryParam,n.type,t.ChannelID)),e.xp6(1),e.hij(" ",i.Value," ")}}function A(r,a){if(1&r&&(e.TgZ(0,"tr")(1,"td")(2,"a",12),e._UZ(3,"img",13),e.qZA()(),e.TgZ(4,"td")(5,"div")(6,"a",12),e._uU(7),e.qZA()(),e.TgZ(8,"div"),e._uU(9),e.qZA()(),e.YNc(10,P,3,10,"td",8),e.qZA()),2&r){const i=a.$implicit,t=e.oxw();e.xp6(2),e.s9C("href",i.Url,e.LSH),e.xp6(1),e.Q6J("src",t.getChannelLogo(i.Type),e.LSH),e.xp6(3),e.s9C("href",i.Url,e.LSH),e.xp6(1),e.Oqu(i.Name),e.xp6(2),e.Oqu(i.Url),e.xp6(1),e.Q6J("ngForOf",i.list)}}function D(r,a){if(1&r&&(e.TgZ(0,"td",14)(1,"div",16),e._uU(2),e.ALo(3,"number"),e.qZA()()),2&r){const i=a.$implicit;e.xp6(2),e.Oqu(e.lcZ(3,1,i.total))}}let g=(()=>{var r;class a{constructor(){this.type=null,this.headerStatus=c,this.listCalculationStatusCode=[]}set from(t){t&&(this.fromQueryParam=new Date(t).toJSON().toString())}set to(t){t&&(this.toQueryParam=new Date(t).toJSON().toString())}ngOnChanges(t){t.result&&this.calculateStatusCode()}getHeaderStatusDesc(t){let n=null;switch(t){case c.BAD_REQUEST:n="BAD REQUEST";break;case c.CONFLICT:n="CONFLICT";break;case c.INTERNAL_SERVER_ERROR:n="INTERNAL SERVER ERROR";break;case c.NOT_FOUND:n="NOT FOUND";break;default:n="OK"}return n}getTextBgColor(t){let n=null;switch(t){case c.OK:n="bg-success";break;case c.INTERNAL_SERVER_ERROR:n="bg-danger";break;default:n="bg-warning"}return n}getChannelLogo(t){return d.g.getChannelLogoByTypeId(t)}calculateStatusCode(){if(this.listCalculationStatusCode=[],this.result){let t,n;this.concatStatusCode().forEach(o=>{t=this.listCalculationStatusCode.findIndex(l=>l.status==o.Key),n=-1!==t,n?this.listCalculationStatusCode[t].total+=o.Value:this.listCalculationStatusCode=[...this.listCalculationStatusCode,{status:o.Key,total:o.Value}]})}}concatStatusCode(){return this.result.map(t=>t.list).reduce((t,n)=>[...t,...n])}}return(r=a).\u0275fac=function(t){return new(t||r)},r.\u0275cmp=e.Xpm({type:r,selectors:[["app-table-report"]],inputs:{header:"header",result:"result",from:"from",to:"to",type:"type"},features:[e.TTD],decls:15,vars:3,consts:[[1,"table"],[1,"thead-light","sticky-top-thead"],[2,"width","0%"],[2,"width","5%"],["class","text-start","style","width: 10%;",4,"ngFor","ngForOf"],[4,"ngFor","ngForOf"],["colspan","2"],[1,"text-center","h3","fw-bold"],["class","text-start",4,"ngFor","ngForOf"],[1,"text-start",2,"width","10%"],[1,"d-block"],[1,"text-white","p-1","rounded","response-desc"],["target","_blank",3,"href"],[2,"width","24px","height","24px",3,"src"],[1,"text-start"],[1,"h3","text-primary","fw-bold","ms-1",3,"routerLink","queryParams"],[1,"d-inline-block","h3","text-primary","fw-bold","ms-1"]],template:function(t,n){1&t&&(e.TgZ(0,"table",0)(1,"thead",1)(2,"tr"),e._UZ(3,"th",2),e.TgZ(4,"th",3),e._uU(5,"Channel"),e.qZA(),e.YNc(6,F,6,4,"th",4),e.qZA()(),e.TgZ(7,"tbody"),e.YNc(8,A,11,6,"tr",5),e.qZA(),e.TgZ(9,"tfoot")(10,"tr")(11,"td",6)(12,"div",7),e._uU(13,"Total"),e.qZA()(),e.YNc(14,D,4,3,"td",8),e.qZA()()()),2&t&&(e.xp6(6),e.Q6J("ngForOf",n.header),e.xp6(2),e.Q6J("ngForOf",n.result),e.xp6(6),e.Q6J("ngForOf",n.listCalculationStatusCode))},dependencies:[p.sg,C.rH,p.JJ],styles:[".response-desc[_ngcontent-%COMP%]{font-size:12px}"]}),a})();function b(r,a){if(1&r&&(e.TgZ(0,"div",7)(1,"div",8),e._UZ(2,"app-table-report",9),e.qZA()()),2&r){const i=e.oxw();e.xp6(2),e.Q6J("result",i.result)("header",i.header)("from",i.filter.From)("to",i.filter.To)("type",0)}}let x=(()=>{var r;class a{constructor(t,n){this.http=t,this.datePipe=n,this.filter=new f,this.pageTitle="New Order";let o=new Date;this.maxDate=o,this.minDate=d.g.addDays(o,6),this.filter.From=o,this.filter.To=o,this.updatePageTitle()}ngOnInit(){this.initPageLoader()}updatePageTitle(){const t=d.g.formatTitleFromDate(this.filter.From,this.filter.To),n=this.datePipe.transform(this.filter.From,t),o=this.datePipe.transform(this.filter.To,"dd MMM yyyy");this.pageTitle=`New Order (${null==t?"":n+"-"} ${o})`}initPageLoader(){this.http.GetLoader().subscribe(t=>{this.filter=t,this.getChannelLogs()})}getChannelLogs(){this.updatePageTitle(),this.http.GetSyncOrder(this.filter).then(t=>{this.header=t.Header,this.result=t.Body})}onFilter(){this.getChannelLogs()}}return(r=a).\u0275fac=function(t){return new(t||r)(e.Y36(u),e.Y36(p.uU))},r.\u0275cmp=e.Xpm({type:r,selectors:[["app-sales-order"]],decls:11,vars:5,consts:[[3,"headerTitle","hideSearchBox","onSubmit"],["container","",2,"width","250px"],[1,"filterDate"],["name","From",3,"date","dateChange"],["name","To",3,"date","dateChange"],[1,"container-fluid"],["class","row mt-4",4,"ngIf"],[1,"row","mt-4"],[1,"col-md-12"],[3,"result","header","from","to","type"]],template:function(t,n){1&t&&(e.TgZ(0,"mainpanel",0),e.NdJ("onSubmit",function(){return n.getChannelLogs()}),e.TgZ(1,"filters")(2,"div",1)(3,"div",2)(4,"h6"),e._uU(5,"From/To"),e.qZA(),e.TgZ(6,"datepicker",3),e.NdJ("dateChange",function(l){return n.filter.From=l}),e.qZA(),e.TgZ(7,"datepicker",4),e.NdJ("dateChange",function(l){return n.filter.To=l}),e.qZA()()()(),e.TgZ(8,"content")(9,"div",5),e.YNc(10,b,3,5,"div",6),e.qZA()()()),2&t&&(e.Q6J("headerTitle",n.pageTitle)("hideSearchBox",!0),e.xp6(6),e.Q6J("date",n.filter.From),e.xp6(1),e.Q6J("date",n.filter.To),e.xp6(3),e.Q6J("ngIf",n.result))},dependencies:[p.O5,h.p,m.Q,g]}),a})();var T=s(4575);function R(r,a){if(1&r&&(e.TgZ(0,"div",7)(1,"div",8),e._UZ(2,"app-table-report",9),e.qZA()()),2&r){const i=e.oxw();e.xp6(2),e.Q6J("result",i.result)("header",i.header)("from",i.filter.From)("to",i.filter.To)("type",1)}}let J=(()=>{var r;class a{constructor(t,n){this.http=t,this.datePipe=n,this.filter=new f,this.PageTitle="Ready to Ship";let o=new Date;this.maxDate=o,this.minDate=d.g.addDays(o,6),this.filter.From=o,this.filter.To=o,this.updatePageTitle()}ngOnInit(){this.initPageLoader()}updatePageTitle(){const t=d.g.formatTitleFromDate(this.filter.From,this.filter.To),n=this.datePipe.transform(this.filter.From,t),o=this.datePipe.transform(this.filter.To,"dd MMM yyyy");this.PageTitle=`Ready to Ship (${null==t?"":n+"-"} ${o})`}initPageLoader(){this.http.GetLoader().subscribe(t=>{this.filter=t,this.getChannelLogs()})}getChannelLogs(){this.updatePageTitle(),this.http.GetSyncInvoice(this.filter).then(t=>{this.header=t.Header,this.result=t.Body})}onFilter(){this.getChannelLogs()}}return(r=a).\u0275fac=function(t){return new(t||r)(e.Y36(u),e.Y36(p.uU))},r.\u0275cmp=e.Xpm({type:r,selectors:[["app-invoice"]],decls:11,vars:5,consts:[[3,"headerTitle","hideSearchBox","onSubmit"],["container","",2,"width","250px"],[1,"filterDate"],["name","From",3,"date","dateChange"],["name","To",3,"date","dateChange"],[1,"container-fluid"],["class","row mt-4",4,"ngIf"],[1,"row","mt-4"],[1,"col-md-12"],[3,"result","header","from","to","type"]],template:function(t,n){1&t&&(e.TgZ(0,"mainpanel",0),e.NdJ("onSubmit",function(){return n.onFilter()}),e.TgZ(1,"filters")(2,"div",1)(3,"div",2)(4,"h6"),e._uU(5,"From/To"),e.qZA(),e.TgZ(6,"datepicker",3),e.NdJ("dateChange",function(l){return n.filter.From=l}),e.qZA(),e.TgZ(7,"datepicker",4),e.NdJ("dateChange",function(l){return n.filter.To=l}),e.qZA()()()(),e.TgZ(8,"content")(9,"div",5),e.YNc(10,R,3,5,"div",6),e.qZA()()()),2&t&&(e.Q6J("headerTitle",n.PageTitle)("hideSearchBox",!0),e.xp6(6),e.Q6J("date",n.filter.From),e.xp6(1),e.Q6J("date",n.filter.To),e.xp6(3),e.Q6J("ngIf",n.result))},dependencies:[p.O5,h.p,m.Q,g]}),a})();function N(r,a){if(1&r&&(e.TgZ(0,"div",7)(1,"div",8),e._UZ(2,"app-table-report",9),e.qZA()()),2&r){const i=e.oxw();e.xp6(2),e.Q6J("result",i.result)("header",i.header)("from",i.filter.From)("to",i.filter.To)("type",3)}}let w=(()=>{var r;class a{constructor(t,n){this.http=t,this.datePipe=n,this.filter=new f;let o=new Date;this.maxDate=o,this.minDate=d.g.addDays(o,6),this.filter.From=o,this.filter.To=o,this.updatePageTitle()}ngOnInit(){this.initPageLoader()}updatePageTitle(){const t=d.g.formatTitleFromDate(this.filter.From,this.filter.To),n=this.datePipe.transform(this.filter.From,t),o=this.datePipe.transform(this.filter.To,"dd MMM yyyy");this.PageTitle=`Shipped (${null==t?"":n+"-"} ${o})`}initPageLoader(){this.http.GetLoader().subscribe(t=>{this.filter=t,this.getChannelLogs()})}getChannelLogs(){this.updatePageTitle(),this.http.GetSyncDelivery(this.filter).then(t=>{this.header=t.Header,this.result=t.Body})}onFilter(){this.getChannelLogs()}}return(r=a).\u0275fac=function(t){return new(t||r)(e.Y36(u),e.Y36(p.uU))},r.\u0275cmp=e.Xpm({type:r,selectors:[["app-delivery"]],decls:11,vars:5,consts:[[3,"headerTitle","hideSearchBox","onSubmit"],["container","",2,"width","250px"],[1,"filterDate"],["name","From",3,"date","dateChange"],["name","To",3,"date","dateChange"],[1,"container-fluid"],["class","row mt-4",4,"ngIf"],[1,"row","mt-4"],[1,"col-md-12"],[3,"result","header","from","to","type"]],template:function(t,n){1&t&&(e.TgZ(0,"mainpanel",0),e.NdJ("onSubmit",function(){return n.onFilter()}),e.TgZ(1,"filters")(2,"div",1)(3,"div",2)(4,"h6"),e._uU(5,"From/To"),e.qZA(),e.TgZ(6,"datepicker",3),e.NdJ("dateChange",function(l){return n.filter.From=l}),e.qZA(),e.TgZ(7,"datepicker",4),e.NdJ("dateChange",function(l){return n.filter.To=l}),e.qZA()()()(),e.TgZ(8,"content")(9,"div",5),e.YNc(10,N,3,5,"div",6),e.qZA()()()),2&t&&(e.Q6J("headerTitle",n.PageTitle)("hideSearchBox",!0),e.xp6(6),e.Q6J("date",n.filter.From),e.xp6(1),e.Q6J("date",n.filter.To),e.xp6(3),e.Q6J("ngIf",n.result))},dependencies:[p.O5,h.p,m.Q,g]}),a})();function L(r,a){if(1&r&&(e.TgZ(0,"div",7)(1,"div",8),e._UZ(2,"app-table-report",9),e.qZA()()),2&r){const i=e.oxw();e.xp6(2),e.Q6J("result",i.result)("header",i.header)("from",i.filter.From)("to",i.filter.To)("type",4)}}let Q=(()=>{var r;class a{constructor(t,n){this.http=t,this.datePipe=n,this.filter=new f,this.PageTitle="Completed";let o=new Date;this.minDate=d.g.addDays(o,6),this.filter.From=o,this.filter.To=o,this.updatePageTitle()}ngOnInit(){this.initPageLoader()}updatePageTitle(){const t=d.g.formatTitleFromDate(this.filter.From,this.filter.To),n=this.datePipe.transform(this.filter.From,t),o=this.datePipe.transform(this.filter.To,"dd MMM yyyy");this.PageTitle=`Completed (${null==t?"":n+"-"} ${o})`}initPageLoader(){this.http.GetLoader().subscribe(t=>{this.filter=t,this.getChannelLogs()})}getChannelLogs(){this.updatePageTitle(),this.http.GetSyncPayment(this.filter).then(t=>{this.header=t.Header,this.result=t.Body})}onFilter(){this.getChannelLogs()}}return(r=a).\u0275fac=function(t){return new(t||r)(e.Y36(u),e.Y36(p.uU))},r.\u0275cmp=e.Xpm({type:r,selectors:[["app-payment"]],decls:11,vars:5,consts:[[3,"headerTitle","hideSearchBox","onSubmit"],["container","",2,"width","250px"],[1,"filterDate"],["name","From",3,"date","dateChange"],["name","To",3,"date","dateChange"],[1,"container-fluid"],["class","row mt-4",4,"ngIf"],[1,"row","mt-4"],[1,"col-md-12"],[3,"result","header","from","to","type"]],template:function(t,n){1&t&&(e.TgZ(0,"mainpanel",0),e.NdJ("onSubmit",function(){return n.onFilter()}),e.TgZ(1,"filters")(2,"div",1)(3,"div",2)(4,"h6"),e._uU(5,"From/To"),e.qZA(),e.TgZ(6,"datepicker",3),e.NdJ("dateChange",function(l){return n.filter.From=l}),e.qZA(),e.TgZ(7,"datepicker",4),e.NdJ("dateChange",function(l){return n.filter.To=l}),e.qZA()()()(),e.TgZ(8,"content")(9,"div",5),e.YNc(10,L,3,5,"div",6),e.qZA()()()),2&t&&(e.Q6J("headerTitle",n.PageTitle)("hideSearchBox",!0),e.xp6(6),e.Q6J("date",n.filter.From),e.xp6(1),e.Q6J("date",n.filter.To),e.xp6(3),e.Q6J("ngIf",n.result))},dependencies:[p.O5,h.p,m.Q,g]}),a})();var I=s(6223),U=s(7801),q=s(9397),k=s(7081);function E(r,a){1&r&&e.GkF(0)}function B(r,a){if(1&r&&(e.TgZ(0,"div",8)(1,"div",9),e._UZ(2,"app-table-report",10),e.qZA()()),2&r){const i=a.ngIf,t=e.oxw();e.xp6(2),e.Q6J("result",i.Body)("header",i.Header)("from",null==t.filter?null:t.filter.From)("to",null==t.filter?null:t.filter.To)}}const Y=[{path:"",component:v,children:[{path:"",redirectTo:"sync-order",pathMatch:"full"},{path:"sync-order",component:x,canActivate:[T.a],data:{title:"Sync Order"}},{path:"invoice",component:J,canActivate:[T.a],data:{title:"Sync Invoice"}},{path:"delivery",component:w,canActivate:[T.a],data:{title:"Sync Delivery"}},{path:"payment",component:Q,canActivate:[T.a],data:{title:"Sync Payment"}},{path:"all",component:(()=>{var r;class a{constructor(t,n){this.reportOrderService=t,this.datePipe=n,this.filter=new f}ngOnInit(){this.initFilter(),this.initLoader()}initFilter(){let t=new Date;this.minDate=d.g.addDays(t,6),this.filter.From=t,this.filter.To=t,this.updatePageTitle()}updatePageTitle(){const t=d.g.formatTitleFromDate(this.filter.From,this.filter.To),n=this.datePipe.transform(this.filter.From,t),o=this.datePipe.transform(this.filter.To,"dd MMM yyyy");this.pageTitle=`All (${null==t?"":n+"-"} ${o})`}initLoader(){this.pageLoader$=this.reportOrderService.GetLoader().pipe((0,q.b)(t=>{this.filter=t,this.updatePageTitle(),this.initData()}))}initData(){this.reportData$=this.reportOrderService.getAllReport(this.filter).pipe((0,k.d)())}onFilter(){this.updatePageTitle(),this.initData()}}return(r=a).\u0275fac=function(t){return new(t||r)(e.Y36(u),e.Y36(p.uU))},r.\u0275cmp=e.Xpm({type:r,selectors:[["app-all"]],decls:15,vars:10,consts:[[3,"headerTitle","hideSearchBox","onSubmit"],["container","",2,"width","250px"],[1,"filterDate"],["name","From",3,"date","dateChange"],["name","To",3,"date","dateChange"],[1,"container-fluid"],[4,"ngIf"],["class","row mt-4",4,"ngIf"],[1,"row","mt-4"],[1,"col-md-12"],[3,"result","header","from","to"]],template:function(t,n){1&t&&(e.TgZ(0,"mainpanel",0),e.NdJ("onSubmit",function(){return n.onFilter()}),e.TgZ(1,"filters")(2,"div",1)(3,"div",2)(4,"div")(5,"h6"),e._uU(6,"From/To"),e.qZA(),e.TgZ(7,"datepicker",3),e.NdJ("dateChange",function(l){return n.filter.From=l}),e.qZA(),e.TgZ(8,"datepicker",4),e.NdJ("dateChange",function(l){return n.filter.To=l}),e.qZA()()()()(),e.TgZ(9,"content")(10,"div",5),e.YNc(11,E,1,0,"ng-container",6),e.ALo(12,"async"),e.YNc(13,B,3,4,"div",7),e.ALo(14,"async"),e.qZA()()()),2&t&&(e.Q6J("headerTitle",n.pageTitle)("hideSearchBox",!0),e.xp6(7),e.Q6J("date",n.filter.From),e.xp6(1),e.Q6J("date",n.filter.To),e.xp6(3),e.Q6J("ngIf",e.lcZ(12,6,n.pageLoader$)),e.xp6(2),e.Q6J("ngIf",e.lcZ(14,8,n.reportData$)))},dependencies:[p.O5,h.p,m.Q,g,p.Ov]}),a})(),canActivate:[T.a],data:{title:"All Report"}}]}];let $=(()=>{var r;class a{}return(r=a).\u0275fac=function(t){return new(t||r)},r.\u0275mod=e.oAB({type:r}),r.\u0275inj=e.cJS({imports:[p.ez,_.Z,I.u5,h.R,U.P,m.Q,C.Bz.forChild(Y)]}),a})()}}]);