marketplacepos 5.48.0 → 5.48.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (173) hide show
  1. package/Marketplace/3rdpartylicenses.txt +26 -26
  2. package/Marketplace/{chunk-222IOSGU.js → chunk-2F4DTZCZ.js} +1 -1
  3. package/Marketplace/{chunk-3LU2SFN4.js → chunk-2IASUYTM.js} +1 -1
  4. package/Marketplace/chunk-2USFVKEX.js +1 -0
  5. package/Marketplace/chunk-36U7D4LI.js +1 -0
  6. package/Marketplace/chunk-3JYZF65T.js +1 -0
  7. package/Marketplace/chunk-3K2EKA5O.js +1 -0
  8. package/Marketplace/{chunk-ZV7EHPNJ.js → chunk-3L7Y6LG6.js} +1 -1
  9. package/Marketplace/chunk-4JDI3AL5.js +1 -0
  10. package/Marketplace/{chunk-5YBWBAQS.js → chunk-4YCSITNV.js} +1 -1
  11. package/Marketplace/{chunk-55BTWXFX.js → chunk-5BSPSA4O.js} +1 -1
  12. package/Marketplace/chunk-5CHTDUME.js +1 -0
  13. package/Marketplace/chunk-5KYN6Y7M.js +1 -0
  14. package/Marketplace/{chunk-56BH43Y7.js → chunk-5X2E3W32.js} +1 -1
  15. package/Marketplace/{chunk-WW7F6LSG.js → chunk-5X2L45XK.js} +1 -1
  16. package/Marketplace/chunk-6EORXONU.js +4 -0
  17. package/Marketplace/{chunk-34UF36YY.js → chunk-6OIMOM7S.js} +1 -1
  18. package/Marketplace/{chunk-J2BPOHP6.js → chunk-6OJQRHIZ.js} +1 -1
  19. package/Marketplace/{chunk-ZAUKG4R6.js → chunk-6PW6S7MI.js} +1 -1
  20. package/Marketplace/chunk-6XDT56RT.js +2 -0
  21. package/Marketplace/{chunk-JOKDW6WD.js → chunk-7DT7FQ2T.js} +1 -1
  22. package/Marketplace/{chunk-KKB4B7FU.js → chunk-7GY4O2UX.js} +3 -3
  23. package/Marketplace/chunk-7SB4C4PT.js +1 -0
  24. package/Marketplace/chunk-A7PUMY67.js +1 -0
  25. package/Marketplace/chunk-ADKAX3OO.js +1 -0
  26. package/Marketplace/chunk-AEVLZ7NS.js +1 -0
  27. package/Marketplace/{chunk-NECWUPZQ.js → chunk-AFIF6VRM.js} +1 -1
  28. package/Marketplace/chunk-AGBJEXIM.js +1 -0
  29. package/Marketplace/chunk-ALPG22RQ.js +1 -0
  30. package/Marketplace/{chunk-DRTRU4DB.js → chunk-B6F5PDL5.js} +1 -1
  31. package/Marketplace/{chunk-HERBJRWM.js → chunk-BXYXVBXP.js} +1 -1
  32. package/Marketplace/{chunk-KWNXPX2M.js → chunk-C6JHPCLF.js} +1 -1
  33. package/Marketplace/{chunk-B4QCGMST.js → chunk-C7N6EI73.js} +1 -1
  34. package/Marketplace/{chunk-PQEXTCFW.js → chunk-CAZ7U2IL.js} +10 -10
  35. package/Marketplace/chunk-CBU473N2.js +1 -0
  36. package/Marketplace/{chunk-UNGNRJ2B.js → chunk-CLQGGKN6.js} +1 -1
  37. package/Marketplace/chunk-CT6UFONR.js +1 -0
  38. package/Marketplace/{chunk-IO2TWJDO.js → chunk-DAUML5UD.js} +1 -1
  39. package/Marketplace/chunk-DH5CXAEM.js +1 -0
  40. package/Marketplace/chunk-DHPNXR6E.js +1 -0
  41. package/Marketplace/chunk-DTAHV4GM.js +1 -0
  42. package/Marketplace/{chunk-MQXW3UAW.js → chunk-DXYMG6QK.js} +1 -1
  43. package/Marketplace/chunk-E3EBAWLJ.js +1 -0
  44. package/Marketplace/chunk-E66QUDQF.js +1 -0
  45. package/Marketplace/chunk-E6ZWL77N.js +1 -0
  46. package/Marketplace/chunk-EDEZ3JLR.js +4 -0
  47. package/Marketplace/{chunk-OROFEDQN.js → chunk-FCEXPGTK.js} +1 -1
  48. package/Marketplace/chunk-FCFCTT5A.js +1 -0
  49. package/Marketplace/chunk-FHER4TFY.js +1 -0
  50. package/Marketplace/{chunk-VZSHSSQZ.js → chunk-FKGKMEDE.js} +1 -1
  51. package/Marketplace/chunk-FRZCC6KZ.js +1 -0
  52. package/Marketplace/chunk-GG3MDS4C.js +1 -0
  53. package/Marketplace/{chunk-ONU4O7N2.js → chunk-GPHNPV7O.js} +1 -1
  54. package/Marketplace/{chunk-J7FL3VT4.js → chunk-GURSK3ZV.js} +1 -1
  55. package/Marketplace/{chunk-N3WBRUNI.js → chunk-GVI6GJHY.js} +1 -1
  56. package/Marketplace/chunk-GX6JPDQ5.js +1 -0
  57. package/Marketplace/chunk-H7GV5SNI.js +5 -0
  58. package/Marketplace/{chunk-S32PEKW5.js → chunk-HKHNRMPT.js} +1 -1
  59. package/Marketplace/{chunk-5O33CV4F.js → chunk-I723PUUO.js} +1 -1
  60. package/Marketplace/{chunk-PGR6BEOA.js → chunk-I7C6W3RB.js} +1 -1
  61. package/Marketplace/{chunk-R6SCDZGW.js → chunk-IDH7MCR3.js} +1 -1
  62. package/Marketplace/chunk-ILW6ZFFV.js +1 -0
  63. package/Marketplace/chunk-J6BQDYXO.js +1 -0
  64. package/Marketplace/{chunk-TCWEUEBR.js → chunk-J6CZKQ53.js} +1 -1
  65. package/Marketplace/chunk-JBEKD57G.js +1 -0
  66. package/Marketplace/{chunk-G6P2UZU4.js → chunk-JW7NES7L.js} +1 -1
  67. package/Marketplace/{chunk-O4HOLA7Y.js → chunk-KSVJCX2D.js} +1 -1
  68. package/Marketplace/chunk-KVDREHOE.js +1 -0
  69. package/Marketplace/chunk-KZSTYKIP.js +1 -0
  70. package/Marketplace/{chunk-76CPUGUB.js → chunk-L76NLJD7.js} +2 -2
  71. package/Marketplace/{chunk-XBDQR2BA.js → chunk-LABF6W37.js} +1 -1
  72. package/Marketplace/{chunk-MAMCOUZ6.js → chunk-M2BYW5SR.js} +1 -1
  73. package/Marketplace/{chunk-P6TDS7UT.js → chunk-M65Z55OS.js} +1 -1
  74. package/Marketplace/chunk-MKADKY44.js +2 -0
  75. package/Marketplace/{chunk-NYJPPKGX.js → chunk-NCKPMA6Q.js} +1 -1
  76. package/Marketplace/{chunk-TDCMI7YC.js → chunk-O2YF5VGD.js} +1 -1
  77. package/Marketplace/chunk-O4EO3YBL.js +1 -0
  78. package/Marketplace/{chunk-Y6WFE3L2.js → chunk-OBF4XVU7.js} +1 -1
  79. package/Marketplace/chunk-PDCVMSLL.js +1 -0
  80. package/Marketplace/chunk-PLLHTY6O.js +15 -0
  81. package/Marketplace/chunk-PMVDQ2OP.js +1 -0
  82. package/Marketplace/chunk-PZKN5FIT.js +1 -0
  83. package/Marketplace/chunk-Q4TAOZ73.js +1 -0
  84. package/Marketplace/chunk-QCV5XC3U.js +266 -0
  85. package/Marketplace/{chunk-GV3NEJJ6.js → chunk-QFSA7CU4.js} +1 -1
  86. package/Marketplace/{chunk-XUBQATMN.js → chunk-R2XT5M5F.js} +1 -1
  87. package/Marketplace/chunk-RCBY7EIY.js +1 -0
  88. package/Marketplace/{chunk-J5BZDPXE.js → chunk-RQQWNLDZ.js} +1 -1
  89. package/Marketplace/chunk-S5R6MCNP.js +5 -0
  90. package/Marketplace/{chunk-RJFFTIAO.js → chunk-S7CKRTJV.js} +1 -1
  91. package/Marketplace/{chunk-PZB3GQWT.js → chunk-SHUYFOQI.js} +1 -1
  92. package/Marketplace/{chunk-SILAIDPV.js → chunk-STYL7ETF.js} +1 -1
  93. package/Marketplace/{chunk-E7FHMF3J.js → chunk-SZVL42NR.js} +1 -1
  94. package/Marketplace/chunk-T7HRAMHR.js +1 -0
  95. package/Marketplace/chunk-TIIGDXIJ.js +2 -0
  96. package/Marketplace/{chunk-CEXUETT6.js → chunk-TJYYRHZZ.js} +1 -1
  97. package/Marketplace/{chunk-DYQ3BWPB.js → chunk-TXOZULMZ.js} +1 -1
  98. package/Marketplace/chunk-TYQY4WPY.js +1 -0
  99. package/Marketplace/chunk-UBTALPOC.js +2 -0
  100. package/Marketplace/{chunk-6XT3JSG5.js → chunk-UCEZJNIL.js} +1 -1
  101. package/Marketplace/chunk-VWX2IX64.js +1 -0
  102. package/Marketplace/{chunk-W7YZT7CH.js → chunk-VYQD3A3M.js} +1 -1
  103. package/Marketplace/{chunk-37NOSLQL.js → chunk-WHHW4IZT.js} +1 -1
  104. package/Marketplace/{chunk-74JHI4MS.js → chunk-WNUTNP6I.js} +1 -1
  105. package/Marketplace/{chunk-DQOO5YZC.js → chunk-WRK3ZHRX.js} +1 -1
  106. package/Marketplace/chunk-X6COQADC.js +1 -0
  107. package/Marketplace/{chunk-7Y2L4CNS.js → chunk-XDBH7EGC.js} +1 -1
  108. package/Marketplace/chunk-XK4RP5MQ.js +1 -0
  109. package/Marketplace/{chunk-3I2V337G.js → chunk-XLIPGDSC.js} +1 -1
  110. package/Marketplace/chunk-Y77WYZ6Y.js +5 -0
  111. package/Marketplace/{chunk-NLSVMXR7.js → chunk-ZKIO2ZQ6.js} +1 -1
  112. package/Marketplace/chunk-ZME22WYI.js +1 -0
  113. package/Marketplace/{chunk-A7YRNCQP.js → chunk-ZTHO6JJM.js} +1 -1
  114. package/Marketplace/chunk-ZUL6ZHSW.js +1 -0
  115. package/Marketplace/{chunk-UW3UCIOY.js → chunk-ZW2TMVZP.js} +1 -1
  116. package/Marketplace/index.html +2 -2
  117. package/Marketplace/main-YJKBQ3LW.js +1 -0
  118. package/Marketplace/{styles-3SQUCHWS.css → styles-ANCVZJP7.css} +1 -1
  119. package/package.json +1 -1
  120. package/Marketplace/chunk-2FSRCK7Y.js +0 -1
  121. package/Marketplace/chunk-2LCP6ZFH.js +0 -1
  122. package/Marketplace/chunk-3YDWTOSL.js +0 -1
  123. package/Marketplace/chunk-44URQXRM.js +0 -1
  124. package/Marketplace/chunk-465DKI6M.js +0 -1
  125. package/Marketplace/chunk-46IROEMV.js +0 -2
  126. package/Marketplace/chunk-4R746B4G.js +0 -1
  127. package/Marketplace/chunk-573EEV7X.js +0 -1
  128. package/Marketplace/chunk-5S7ONNKP.js +0 -1
  129. package/Marketplace/chunk-6ZEQRKBC.js +0 -1
  130. package/Marketplace/chunk-7HVOZWYY.js +0 -1
  131. package/Marketplace/chunk-7U32FNM2.js +0 -2
  132. package/Marketplace/chunk-7VRLCSNB.js +0 -1
  133. package/Marketplace/chunk-AL5RTE5M.js +0 -1
  134. package/Marketplace/chunk-AXC6LM6T.js +0 -1
  135. package/Marketplace/chunk-BHGEKKCM.js +0 -1
  136. package/Marketplace/chunk-BLHKSSK6.js +0 -1
  137. package/Marketplace/chunk-BXOHTPGP.js +0 -1
  138. package/Marketplace/chunk-CNTLG54D.js +0 -1
  139. package/Marketplace/chunk-DLXWO2XC.js +0 -1
  140. package/Marketplace/chunk-DPQMNLFO.js +0 -1
  141. package/Marketplace/chunk-E5JZCOHZ.js +0 -1
  142. package/Marketplace/chunk-EMLE4JDW.js +0 -1
  143. package/Marketplace/chunk-FFTZPZOW.js +0 -5
  144. package/Marketplace/chunk-FHZNWINZ.js +0 -1
  145. package/Marketplace/chunk-GLMM3CVD.js +0 -1
  146. package/Marketplace/chunk-GQCDEPDY.js +0 -1
  147. package/Marketplace/chunk-GZLXMT7F.js +0 -1
  148. package/Marketplace/chunk-HG4R6CUP.js +0 -1
  149. package/Marketplace/chunk-HU7LMMZJ.js +0 -1
  150. package/Marketplace/chunk-I3IA6MAD.js +0 -1
  151. package/Marketplace/chunk-IZZQQW5G.js +0 -5
  152. package/Marketplace/chunk-JLVWTKDH.js +0 -1
  153. package/Marketplace/chunk-JUO4RKIH.js +0 -1
  154. package/Marketplace/chunk-L2GMXVN6.js +0 -1
  155. package/Marketplace/chunk-M7U5T2ZP.js +0 -1
  156. package/Marketplace/chunk-MEER4VNV.js +0 -1
  157. package/Marketplace/chunk-N26QQL77.js +0 -1
  158. package/Marketplace/chunk-NOIKC7TF.js +0 -1
  159. package/Marketplace/chunk-ODQVHQPB.js +0 -15
  160. package/Marketplace/chunk-PE7QBBA6.js +0 -1
  161. package/Marketplace/chunk-PNUEO4J2.js +0 -1
  162. package/Marketplace/chunk-PS43OK3J.js +0 -1
  163. package/Marketplace/chunk-SNSROU6N.js +0 -1
  164. package/Marketplace/chunk-SUTHLGCO.js +0 -266
  165. package/Marketplace/chunk-TUJHFVOP.js +0 -1
  166. package/Marketplace/chunk-UI5ITL7Z.js +0 -4
  167. package/Marketplace/chunk-XFIUNEOU.js +0 -1
  168. package/Marketplace/chunk-XW2CGM4G.js +0 -5
  169. package/Marketplace/chunk-YJTPDV4D.js +0 -1
  170. package/Marketplace/chunk-YKEAAH3N.js +0 -2
  171. package/Marketplace/chunk-YTUPRTC2.js +0 -1
  172. package/Marketplace/chunk-ZS465QKM.js +0 -2
  173. package/Marketplace/main-NBCLYU5Y.js +0 -1
@@ -1 +0,0 @@
1
- import{a as y}from"./chunk-J2BPOHP6.js";import{c as q}from"./chunk-BLHKSSK6.js";import{m as w}from"./chunk-LNJUGHOX.js";import{$b as h,$c as L,Gb as b,Jb as V,Kc as k,Mc as d,Nc as S,Oc as s,bc as x,cc as I,ec as P,fc as T,kc as a,lb as g,lc as o,mc as v,nb as r,qc as j,ra as f,rc as _,td as C,wc as E,xa as F,xc as u,ya as U}from"./chunk-ZYJ6LAJ3.js";var G=(()=>{let e=class e{transform(l){return q.getChannelLogoByTypeId(l)}};e.\u0275fac=function(n){return new(n||e)},e.\u0275pipe=V({name:"channelImage",type:e,pure:!0});let t=e;return t})();function z(t,e){if(t&1&&v(0,"img",8),t&2){let i=u().$implicit;_("src",i==null?null:i.ThumbnailURL,g)}}function B(t,e){t&1&&v(0,"img",9)}function O(t,e){if(t&1&&h(0,z,1,1,"img",8)(1,B,1,0,"img",9),t&2){let i=e.$implicit;x(i!=null&&i.ThumbnailURL?0:1)}}function $(t,e){if(t&1){let i=j();a(0,"img",17),E("click",function(n){F(i);let m=u().$implicit;return u().onZoomImage(n,m==null?null:m.ImageURL),U(n.stopPropagation())}),o()}if(t&2){let i=u().$implicit;_("src",i==null?null:i.ThumbnailURL,g)}}function N(t,e){t&1&&v(0,"img",13)}function Z(t,e){if(t&1&&(a(0,"div",15),d(1),o()),t&2){let i=u().$implicit;r(),s("x",i.Quantity)}}function Q(t,e){if(t&1&&(a(0,"li")(1,"div",10)(2,"div",11),h(3,$,1,1,"img",12)(4,N,1,0,"img",13),a(5,"div",14)(6,"div",15),d(7),o(),a(8,"div",16),d(9),o()()(),h(10,Z,2,1,"div",15),o()()),t&2){let i=e.$implicit;r(3),x(i!=null&&i.ThumbnailURL?3:4),r(4),S(i.Name),r(2),S(i.Code),r(),x(i.Quantity>1?10:-1)}}var tt=(()=>{let e=class e{constructor(){this.variants=C(),this.biggerPictureService=f(y)}onZoomImage(l,n){this.biggerPictureService.openBiggerPicture(l,n)}};e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=b({type:e,selectors:[["variants-dropdown"]],inputs:{variants:[1,"variants"]},decls:15,vars:2,consts:[[1,"dropdown","pe-6"],["type","button","data-bs-toggle","dropdown","aria-expanded","false",1,"btn","dropdown-toggle","border-0","d-flex","align-items-center","justify-content-between","gap-4","w-100",2,"padding","0px"],[1,"text-start"],[1,"fs-6"],[1,"d-flex","align-items-center","gap-2"],[1,"fa-regular","fa-angle-down"],[1,"dropdown-menu","p-3"],[1,"ms-6","mt-3","text-black"],[1,"thumb-square","border","border-opacity-10",3,"src"],["src","https://cdn.dealpos.app/template/products_thumb.png",1,"border","border-opacity-10","thumb-square"],[1,"dropdown-item","d-flex","align-items-center","gap-5","justify-content-between",2,"padding-left","8px","padding-right","8px"],[1,"d-flex","align-items-center","justify-content-start","gap-5"],[1,"thumb-square-lg","border","border-opacity-10",2,"cursor","zoom-in",3,"src"],["src","https://cdn.dealpos.app/template/products_thumb.png",1,"thumb-square-lg","border","border-opacity-10"],[1,"lh-base"],[1,"text-black"],[1,"text-muted"],[1,"thumb-square-lg","border","border-opacity-10",2,"cursor","zoom-in",3,"click","src"]],template:function(n,m){if(n&1&&(a(0,"div",0)(1,"button",1)(2,"div",2)(3,"div",3),d(4),o(),a(5,"div",4),P(6,O,2,1,null,null,I),o()(),a(8,"div"),v(9,"i",5),o()(),a(10,"ul",6)(11,"h5",7),d(12),o(),P(13,Q,11,4,"li",null,I),o()()),n&2){let c,p;r(4),s("",(c=m.variants())==null?null:c.length," items"),r(2),T(m.variants()),r(6),s("",(p=m.variants())==null?null:p.length," Items"),r(),T(m.variants())}},dependencies:[w],styles:[".dropdown-toggle[_ngcontent-%COMP%]:after{display:none!important}.dropdown[_ngcontent-%COMP%] .dropdown-menu.show[_ngcontent-%COMP%]{top:unset!important}.thumb-square[_ngcontent-%COMP%]{width:26px;height:26px;object-fit:contain;object-position:center}.thumb-square-lg[_ngcontent-%COMP%]{width:50px;height:50px;object-fit:contain;object-position:center}"]});let t=e;return t})();var W=t=>({cursor:t}),at=(()=>{let e=class e{constructor(){this.variant=C(),this.biggerPictureService=f(y)}onZoomImage(l){let n=this.variant()?.ImageURL;n&&this.biggerPictureService.openBiggerPicture(l,n)}};e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=b({type:e,selectors:[["variant-with-image"]],inputs:{variant:[1,"variant"]},decls:8,vars:7,consts:[[1,"d-flex","align-items-center","gap-5"],[1,"thumb-square-lg","border","border-opacity-10",2,"cursor","zoom-in",3,"click","src"],[1,"lh-base"],[1,"text-black"],[1,"text-muted"]],template:function(n,m){if(n&1&&(a(0,"div",0)(1,"div")(2,"img",1),E("click",function(p){return m.onZoomImage(p)}),o()(),a(3,"div",2)(4,"div",3),d(5),o(),a(6,"div",4),d(7),o()()()),n&2){let c,p,M,D;r(2),k(L(5,W,(c=m.variant())!=null&&c.ImageURL?"zoom-in":"")),_("src",((p=m.variant())==null?null:p.ThumbnailURL)||"https://cdn.dealpos.app/template/products_thumb.png",g),r(3),s(" ",(M=m.variant())==null?null:M.Name," "),r(2),s(" ",(D=m.variant())==null?null:D.Code," ")}},dependencies:[w],styles:[".thumb-square-lg[_ngcontent-%COMP%]{width:50px;height:50px;object-fit:contain;object-position:center}"]});let t=e;return t})();export{G as a,tt as b,at as c};
@@ -1 +0,0 @@
1
- var i=(function(o){return o[o.Tokopedia=1]="Tokopedia",o[o.WooCommerce=2]="WooCommerce",o[o.None=3]="None",o[o.KalCare=4]="KalCare",o[o.Shopee=5]="Shopee",o[o.Tiktok=6]="Tiktok",o[o.Lazada=7]="Lazada",o[o.Shopify=8]="Shopify",o[o.Plugo=9]="Plugo",o[o.ShopifyV2=10]="ShopifyV2",o})(i||{});var s=(function(o){return o.SHOOPE="https://resc.cloudinary.com/pos/image/upload/v1598262220/icons/marketplace_icons/shopee.png",o.WOOCOMMERCE="https://resc.cloudinary.com/pos/image/upload/w_50/v1632447439/icons/WooCommerce/woocommerce-icon.webp",o.TOKOPEDIA="https://resc.cloudinary.com/pos/image/upload/v1598262221/icons/marketplace_icons/tokopedia.png",o.TIKTOK="https://resc.cloudinary.com/pos/image/upload/w_30/v1645761611/icons/Marketplace%20logo/tiktok.png",o.LAZADA="https://resc.cloudinary.com/pos/image/upload/v1680681836/icons/marketplace_icons/Lazadanew.png",o.KALCARE="https://resc.cloudinary.com/pos/image/upload/v1654230268/icons/marketplace_icons/kalcare.png",o.SHOPIFY="https://resc.cloudinary.com/pos/image/upload/v1707987435/icons/marketplace_icons/shopify.png",o.PLUGO="https://resc.cloudinary.com/pos/image/upload/v1739236419/icons/marketplace_icons/plugo.ico",o.PLUGONEW="https://resc.cloudinary.com/pos/image/upload/v1739263497/icons/marketplace_icons/plugonew.ico",o})(s||{});var O=(()=>{let d=class d{static IsNotEmpty(t){return t!=""&&t!=d.GuidEMpty&&t!=null&&t!=null}static IsEmpty(t){return t==""||t==null||t==null||t==d.GuidEMpty}static getChannelLogoByTypeId(t){let e;switch(t){case i.Tokopedia:e=s.TOKOPEDIA;break;case i.Shopee:e=s.SHOOPE;break;case i.WooCommerce:e=s.WOOCOMMERCE;break;case i.Lazada:e=s.LAZADA;break;case i.Tiktok:e=s.TIKTOK;break;case i.KalCare:e=s.KALCARE;break;case i.Shopify:e=s.SHOPIFY;break;case i.Plugo:e=s.PLUGO;break;case i.ShopifyV2:e=s.SHOPIFY;break}return e}static getChannelLogoByName(t=""){t=t.toLowerCase();let e;switch(t){case"tokopedia":e=s.TOKOPEDIA;break;case"shoppe":e=s.SHOOPE;break;case"woocommerce":e=s.WOOCOMMERCE;break;case"tiktok":e=s.TIKTOK;break;case"lazada":e=s.LAZADA;break;case"kalCare":e=s.KALCARE;break;case"plugo":e=s.PLUGO;break;case"shopifyv2":e=s.SHOPIFY;break}return e}static getChannelName(t){let e;switch(t){case i.Shopee:e="Shopee";break;case i.Tokopedia:e="Tokopedia";break;case i.Lazada:e="Lazada";break;case i.Tiktok:e="Tiktok";break;case i.WooCommerce:e="WooCommerce";break;case i.KalCare:e="KalCare";break;case i.Plugo:e="Plugo";break;case i.ShopifyV2:e="Shopify";break}return e}static assignChannelLogo(t){return t=t.map(e=>(e.logo=this.getChannelLogoByTypeId(e.TypeID),e)),t}static getCssChannelColor(t){let e;switch(t){case i.Shopee:e="#ee4d2d";break;case i.Tokopedia:e="var(--G500,#03AC0E)";break;case i.Lazada:e="#FF00B2";break;case i.Tiktok:e="black";break;case i.WooCommerce:e="#674399";break;case i.KalCare:e="rgb(128, 188, 0)";break;case i.Plugo:e="#F2A954";break}return e}static getDaysDiff(t,e){var a=e.getTime()-t.getTime(),r=a/(1e3*60*60*24);return r}static addDays(t,e){let a=new Date(Number(t));return a.setDate(t.getDate()-e),a}static isValidDate(t){return t instanceof Date&&!isNaN(t)}static getImageInfo(t){return new Promise((e,a)=>{let r=new Image;r.src=t,r.decode().then(()=>{e({img:t,height:r.height,width:r.width})}).catch(()=>{a(new Error(`Image load error for ${t}`))})})}static formatTitleFromDate(t,e){let a=null,r=new Date(t),c=new Date(e);return r.getDate()!=c.getDate()&&(a="dd"),r.getMonth()!=c.getMonth()&&(a="dd MMM"),r.getFullYear()!=c.getFullYear()&&(a="dd MMM yyyy"),a}static openDownloadFile(t,e){var a=window.URL.createObjectURL(t),r=document.createElement("a");r.href=a,r.download=e,r.click()}static compare(t,e,a){return(t<e?-1:1)*(a?1:-1)}static isDateExpired(t){let e=new Date,a=!1;return t.getTime()<e.getTime()&&(a=!0),a}static getLabelPathTree(t){let e=[],a=t;for(;a;)e.unshift(a.label),a=a.parent;return e.join(" / ")}static searchByIdWithParentDFS(t,e){let a=[...t],r;for(typeof e=="number"?r=JSON.stringify(e):r=e;a.length>0;){let c=a.pop();if(c.id===r)return c;if(c.children&&c.children.length>0)for(let n of c.children)n.parent=c,a.push(n)}return null}static getTimeDifference(t){let e=new Date(t),a=new Date,r=Math.abs(e.getTime()-a.getTime()),c=1e3,n=6e4,l=60*n,m=24*l,p=Math.floor(r/m),u=Math.floor(r%m/l),g=Math.floor(r%l/n),f=Math.floor(r%n/c);return{days:p,hours:u,minutes:g,seconds:f}}static convertToReadableDate(t){let{days:e,hours:a,minutes:r,seconds:c}=d.getTimeDifference(t),n="";return e>0&&a>0&&r>0&&(n=`${e} days, ${a} hours and ${r} minutes ago`),e>0&&a>0&&r==0&&(n=`${e} days and ${a} hours ago`),e>0&&a==0&&(n=`${e} days ago`),e==0&&a>0&&r>0&&(n=`${a} hours and ${r} minutes ago`),e==0&&a>0&&r==0&&(n=`${a} hours ago`),e==0&&a==0&&r>0&&(n=`${r} minutes ago`),e==0&&a==0&&r==0&&c>0&&(n=`${c} seconds ago`),n}static isValidGUID(t){return/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/.test(t)}static convertTimestampToDate(t){if(!Number.isFinite(t))return new Date(t);let e=t<1e12?t*1e3:t;return new Date(e)}static parseJwt(t){var e=t.split(".")[1],a=e.replace(/-/g,"+").replace(/_/g,"/"),r=decodeURIComponent(atob(a).split("").map(function(c){return"%"+("00"+c.charCodeAt(0).toString(16)).slice(-2)}).join(""));return JSON.parse(r)}};d.GuidEMpty="00000000-0000-0000-0000-000000000000",d.MinDate="0001-01-01T00:00:00";let o=d;return o})();export{s as a,i as b,O as c};
@@ -1 +0,0 @@
1
- import{a as j}from"./chunk-TDCMI7YC.js";import{b as A,c as D,j as P,k as R}from"./chunk-UI5ITL7Z.js";import{h as U,m as V}from"./chunk-L3W6SG2T.js";import{$b as M,Gb as u,Mc as C,Nc as I,Qc as O,Rc as T,Sc as b,bc as y,cc as w,ec as S,fc as v,gc as h,hc as o,ic as s,jc as x,lb as f,nb as r,qc as p,vc as g,xa as d,xc as k,ya as c,zb as m}from"./chunk-ZYJ6LAJ3.js";function E(l,i){if(l&1){let a=p();o(0,"span")(1,"mat-checkbox",4),g("change",function(e){d(a);let t=k();return c(t.onSelectAll(e==null?null:e.checked))}),o(2,"h5",5),C(3,"Select All"),s()()()}}function F(l,i){if(l&1){let a=p();o(0,"li")(1,"mat-checkbox",6),b("ngModelChange",function(e){let t=d(a).$implicit;return T(t.selected,e)||(t.selected=e),c(e)}),o(2,"div",7),x(3,"img",8),o(4,"h5",9),C(5),s()()()()}if(l&2){let a=i.$implicit;r(),O("ngModel",a.selected),r(2),h("src",a.Img,f),r(2),I(a.Name)}}var H=(()=>{let i=class i{constructor(n,e){this.data=n,this.dialogRef=e,this.selectedItems=this.data.selectedItems,this.channels=this.data.channels}ngOnInit(){this.initModalConfig()}initModalConfig(){let n=this.data.title?this.data.title:"Updating Inventory";this.modalConfig=new P,this.modalConfig.title=n}onSelectAll(n){this.channels=this.channels.map(e=>(e.selected=n,e))}onOk(){this.dialogRef.close(this.channels)}onClose(){this.dialogRef.close()}get getSelectedChannel(){return this.channels.filter(n=>n.selected)}};i.\u0275fac=function(e){return new(e||i)(m(D),m(A))},i.\u0275cmp=u({type:i,selectors:[["app-modal-update-channels"]],standalone:!1,decls:7,vars:3,consts:[[3,"onOk","onClose","onCancel","dynamicValidated","config"],["content",""],[2,"overflow-y","auto","max-height","28rem"],[1,"no-bullet",2,"margin-bottom","0px !important","overflow","hidden"],["color","primary",1,"me-6",3,"change"],[1,"fw-light"],["color","primary",3,"ngModelChange","ngModel"],[1,"d-flex","align-items-center"],[1,"channelLogo-md",3,"src"],[1,"fw-light","ms-2","my-auto"]],template:function(e,t){e&1&&(o(0,"modal-material",0),g("onOk",function(){return t.onOk()})("onClose",function(){return t.onClose()})("onCancel",function(){return t.onClose()}),o(1,"div",1)(2,"div",2),M(3,E,4,0,"span"),o(4,"ul",3),S(5,F,6,3,"li",null,w),s()()()()),e&2&&(h("dynamicValidated",(t.getSelectedChannel==null?null:t.getSelectedChannel.length)>0)("config",t.modalConfig),r(3),y((t.channels==null?null:t.channels.length)>1?3:-1),r(2),v(t.channels))},dependencies:[U,V,j,R],styles:[".no-bullet[_ngcontent-%COMP%]{list-style-type:none}mat-form-field[_ngcontent-%COMP%]{width:100%;height:100%}.mat-dialog-title[_ngcontent-%COMP%]{margin-bottom:0%;margin-left:24px}.vertical-radio[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin:15px 0}"]});let l=i;return l})();export{H as a};
@@ -1 +0,0 @@
1
- import{a as M,b as X}from"./chunk-HU7LMMZJ.js";import"./chunk-BKR7YPEW.js";import"./chunk-YJTPDV4D.js";import"./chunk-OXWPYJNB.js";import"./chunk-XBIHN6D3.js";import"./chunk-BLHKSSK6.js";import{m as U,n as W}from"./chunk-UI5ITL7Z.js";import"./chunk-L3W6SG2T.js";import"./chunk-YTHY4IFS.js";import{v as Q}from"./chunk-SILAIDPV.js";import"./chunk-3I2V337G.js";import{D as q,G as K,I as z,f as j,i as A,j as H,k as $,l as G,m as J}from"./chunk-LNJUGHOX.js";import{$b as S,Gb as F,Ha as b,Lc as R,Mb as C,Mc as n,Nc as c,Oc as v,Z as w,Zc as V,aa as k,bc as y,bd as O,cc as L,ec as B,fc as N,gc as s,hc as t,hd as m,ic as e,id as f,jc as T,jd as D,nb as a,nc as h,oc as I,qc as E,ra as x,vc as P,xa as _,xc as p,ya as g}from"./chunk-ZYJ6LAJ3.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";var Y=(o,d,l)=>({"text-warning":o,"text-success":d,"text-danger":l});function Z(o,d){o&1&&n(0," In Progress ")}function ee(o,d){o&1&&n(0," Completed ")}function te(o,d){o&1&&n(0," Failed ")}function ie(o,d){if(o&1&&(t(0,"tr")(1,"th",28)(2,"span"),n(3),e()(),t(4,"td"),n(5),e()()),o&2){let l=d.$implicit;a(3),v(" ",l.Key," "),a(2),c(l.Value)}}function ne(o,d){if(o&1&&(t(0,"table",26)(1,"tbody"),B(2,ie,6,2,"tr",null,L),e()()),o&2){let l=p().ngIf;a(2),N(l.ParsedStatus)}}function oe(o,d){if(o&1){let l=E();t(0,"div",14)(1,"div",15)(2,"div",16)(3,"h5"),n(4,"PerfLog"),e(),t(5,"div")(6,"button",17),P("click",function(){_(l);let r=p().ngIf,u=p();return g(u.copyPerfLogToClipboard(r))}),T(7,"i",18),e()()(),t(8,"div",29)(9,"div",30)(10,"div",31)(11,"pre"),n(12),m(13,"json"),e()()()()()()}if(o&2){let l=p().ngIf,i=p();a(6),s("matTooltip",i.copyToClipboardPerflog()),a(6),c(f(13,2,l.ParsedPerfLog))}}function ae(o,d){if(o&1&&(h(0),t(1,"div",32)(2,"div",15)(3,"div",7)(4,"h5"),n(5,"StackTrace"),e()(),t(6,"div",8)(7,"div",30)(8,"div",31)(9,"pre"),n(10),e()()()()()(),I()),o&2){let l=p().ngIf;a(10),c(l==null?null:l.Exception)}}function re(o,d){if(o&1){let l=E();h(0),t(1,"mainpanel",1)(2,"actions")(3,"a",2),n(4,"Back"),e()(),t(5,"content")(6,"div",3)(7,"div",4)(8,"div",5)(9,"div",6)(10,"div",7)(11,"h5"),n(12,"General"),e()(),t(13,"div",8)(14,"div",9)(15,"div",10)(16,"div",11)(17,"label"),n(18,"Created Date"),e(),t(19,"div")(20,"span"),n(21),m(22,"date"),e()()()(),t(23,"div",10)(24,"div",11)(25,"label"),n(26,"Duration"),e(),t(27,"div",12)(28,"span"),n(29),m(30,"number"),e()()()(),t(31,"div",10)(32,"div",11)(33,"label"),n(34,"Creator"),e(),t(35,"div")(36,"span"),n(37),e()()()(),t(38,"div",10)(39,"div",11)(40,"label"),n(41,"Status"),e(),t(42,"div"),S(43,Z,1,0)(44,ee,1,0)(45,te,1,0),e()()()(),t(46,"div",13)(47,"div",14)(48,"div",11)(49,"label"),n(50,"Job ID"),e(),t(51,"div"),n(52),e()()(),t(53,"div",14)(54,"div",11)(55,"label"),n(56,"Label"),e(),t(57,"div")(58,"span"),n(59),e()()()()()()()()(),t(60,"div",4)(61,"div",14)(62,"div",15)(63,"div",16)(64,"h5"),n(65,"Message"),e(),t(66,"div")(67,"button",17),P("click",function(){let r=_(l).ngIf,u=p();return g(u.copyMessageToClipboard(r))}),T(68,"i",18),e()()(),t(69,"div",19)(70,"div",20)(71,"table",21)(72,"thead",22)(73,"tr")(74,"th",23),n(75," Count "),e(),t(76,"th",24),n(77," Found "),e(),t(78,"th",25),n(79," NotFound "),e()()(),t(80,"tbody")(81,"tr")(82,"td"),n(83),m(84,"number"),e(),t(85,"td"),n(86),m(87,"number"),e(),t(88,"td"),n(89),m(90,"number"),e()()()(),S(91,ne,4,0,"table",26),e()()()(),C(92,oe,14,4,"div",27)(93,ae,11,1,"ng-container",0),e()()()(),I()}if(o&2){let l,i=d.ngIf,r=p();a(),s("headerTitle","Notification "+i.ChannelName)("hideSearchBox",!0)("hideSearchDropdown",!0),a(20),c(D(22,18,i.Created,"dd MMM yyyy HH:mm:ss")),a(8),v("",D(30,21,i.DurationInSecond,"1.1-1")," s"),a(8),c(i.LoginID),a(5),R(O(30,Y,i.StateID==r.scanState.InProgress,i.StateID==r.scanState.Completed,i.StateID==r.scanState.Failed)),a(),y((l=i.StateID)===r.scanState.InProgress?43:l===r.scanState.Completed?44:l===r.scanState.Failed?45:-1),a(9),v(" ",i.ID," "),a(7),c(i.ProcessLabel),a(8),s("matTooltip",r.copyToClipboardMessage()),a(16),c(f(84,24,i.OriginGetCount)),a(3),c(f(87,26,i.SkuFoundCount)),a(3),c(f(90,28,i.SkuNotFoundCount)),a(2),y(i.ParsedStatus?91:-1),a(),s("ngIf",i==null?null:i.PerfLog),a(),s("ngIf",i==null?null:i.Exception)}}var Se=(()=>{let d=class d{constructor(){this.notificationService=x(M),this.activatedRoute=x(q),this.scanState=X,this.copyToClipboardPerflog=b("Copy log to clipboard"),this.copyToClipboardMessage=b("Copy message to clipboard")}ngOnInit(){this.notification$=this.activatedRoute.queryParams.pipe(k(i=>{let r=i.ID;return this.notificationService.getNotificationDetail(r).pipe(w(1))}))}copyMessageToClipboard(i){let r=this.notificationService.createMessageCopyText(i);navigator.clipboard.writeText(r||"").then(()=>{this.copyToClipboardMessage.set("Message copied!"),setTimeout(()=>{this.copyToClipboardMessage.set("Copy message to clipboard")},5e3)})}copyPerfLogToClipboard(i){navigator.clipboard.writeText(i.PerfLog||"").then(()=>{this.copyToClipboardPerflog.set("PerfLog copied!"),setTimeout(()=>{this.copyToClipboardPerflog.set("Copy log to clipboard")},5e3)})}};d.\u0275fac=function(r){return new(r||d)},d.\u0275cmp=F({type:d,selectors:[["app-detail"]],features:[V([M])],decls:2,vars:3,consts:[[4,"ngIf"],[3,"headerTitle","hideSearchBox","hideSearchDropdown"],["role","button","routerLink","/menu/products/status/notificationV2",1,"btn","btn-secondary","btn-fill","btn-lg","me-3"],[1,"container-fluid","mt-8"],[1,"row"],[1,"col-12"],[1,"card","mb-8"],[1,"card-header"],[1,"card-body"],[1,"row","mt-6"],[1,"col-3"],[1,"info-label-group"],[1,"text-center"],[1,"row","mt-4"],[1,"col-sm-6"],[1,"card"],[1,"card-header","d-flex","align-items-center","justify-content-between"],[1,"btn","btn-icon-only",3,"click","matTooltip"],[1,"fa-solid","fa-copy","fs-3"],[1,"card-body","mb-5","mt-2"],[1,"col-sm-12","my-4"],[1,"table","table-bordered","table-sm"],[1,"thead-light"],["matTooltip","Total Product in Seller Center","matTooltipPosition","above"],["matTooltip","Total Product Found in Sold in Channel","matTooltipPosition","above"],["matTooltip","Total Product Found in Not in POS","matTooltipPosition","above"],[1,"table","table-bordered","mt-8","table-sm"],["class","col-sm-6",4,"ngIf"],[2,"width","138px","background-color","#f6f6f6"],[1,"card-body","border","mx-8","my-6","rounded-1"],[1,"col-sm-12","mt-2"],[1,"form-group"],[1,"col-sm-12"]],template:function(r,u){r&1&&(C(0,re,94,34,"ng-container",0),m(1,"async")),r&2&&s("ngIf",f(1,1,u.notification$))},dependencies:[J,j,W,U,z,K,Q,A,$,G,H],encapsulation:2});let o=d;return o})();export{Se as DetailComponent};
@@ -1 +0,0 @@
1
- import{a as Ce}from"./chunk-5S7ONNKP.js";import"./chunk-IM5M2CAI.js";import{a as ue}from"./chunk-573EEV7X.js";import{a as me}from"./chunk-BXOHTPGP.js";import{a as D}from"./chunk-ISMIPSYN.js";import{c as ge,d as V,e as U}from"./chunk-IZZQQW5G.js";import"./chunk-MQXW3UAW.js";import"./chunk-3WRXJBHF.js";import"./chunk-UH5C5HXK.js";import"./chunk-TDCMI7YC.js";import"./chunk-63I3I3MX.js";import{a as de}from"./chunk-3LU2SFN4.js";import"./chunk-GV3NEJJ6.js";import"./chunk-OPXITNRF.js";import"./chunk-HPINZVE4.js";import"./chunk-D2J64VUP.js";import"./chunk-6Q6L5NUD.js";import"./chunk-ONU4O7N2.js";import"./chunk-3RK6DDJD.js";import"./chunk-5YBWBAQS.js";import"./chunk-37NOSLQL.js";import{a as ie}from"./chunk-ZSUWHVKX.js";import"./chunk-N5AE5WMQ.js";import"./chunk-J2BPOHP6.js";import"./chunk-34UF36YY.js";import"./chunk-AFDI4TD4.js";import"./chunk-4RG5YR7N.js";import"./chunk-5MV3UFJQ.js";import"./chunk-E6AMKEQR.js";import"./chunk-IGKMJFKP.js";import"./chunk-ITGVXYDV.js";import"./chunk-HK5FXZE4.js";import"./chunk-KJE5GRQ4.js";import"./chunk-4ILDFTIG.js";import"./chunk-A6QXXKPR.js";import{i as w}from"./chunk-5O33CV4F.js";import"./chunk-QXRG5XYP.js";import"./chunk-RXLMJGUY.js";import"./chunk-L7WZ6U4T.js";import"./chunk-LOWGZOML.js";import"./chunk-5PMKN6PM.js";import{a as O}from"./chunk-YJTPDV4D.js";import{b as ae,e as oe}from"./chunk-OXWPYJNB.js";import"./chunk-XBIHN6D3.js";import{c as S}from"./chunk-BLHKSSK6.js";import{d as se,l as ce,m as pe,n as he}from"./chunk-UI5ITL7Z.js";import{A as ne,c as Y,h as Z,m as ee,o as te}from"./chunk-L3W6SG2T.js";import"./chunk-YTHY4IFS.js";import{b as re,c as le}from"./chunk-ZETUYNFJ.js";import"./chunk-SILAIDPV.js";import"./chunk-3I2V337G.js";import{f as K,i as q,m as X}from"./chunk-LNJUGHOX.js";import{$c as Q,G as A,Gb as W,Ha as M,Mb as f,Mc as I,Qc as x,Rc as T,Sc as R,Zc as J,ea as H,gc as m,hc as s,hd as v,ic as h,id as b,jc as z,ma as G,nb as p,nc as F,oc as L,pc as $,qc as E,ra as C,vc as _,xa as y,xc as u,ya as P,zb as g}from"./chunk-ZYJ6LAJ3.js";import"./chunk-WFMAM73Y.js";import{a as B,b as j}from"./chunk-66YHNWRR.js";var k=(()=>{let l=class l{constructor(){this.authService=C(w),this.channelOptions=this.authService.getChannels()}filterSelectedChannels(t,i){let e=Object.assign([],this.channelOptions),a=[],n;return t.forEach(o=>{n=e.find(c=>c.ID==o?.parent?.id),n&&(n=j(B({},n),{Name:`${o?.parent?.label} - ${o?.label}`,LocationID:o?.id}),a.push(n))}),i.forEach(o=>{n=e.find(c=>c.ID==o.id),n&&a.push(n)}),a}generateFilterLocation(t,i){let e=[],a=[],n=[];return t.length>0?(e=t.map(o=>o.id),a=t.filter(o=>S.IsNotEmpty(o?.parent?.id)).map(o=>o?.parent?.id).filter((o,c,N)=>N.indexOf(o)===c)):(e=[],a=[]),n=i.map(o=>o.id),n=n.concat(a).filter((o,c,N)=>N.indexOf(o)===c),{locationIds:e,channelIds:n}}};l.\u0275fac=function(i){return new(i||l)},l.\u0275prov=G({token:l,factory:l.\u0275fac});let r=l;return r})();var _e=r=>[r];function Se(r,l){if(r&1){let d=E();s(0,"button",16),_("click",function(){y(d);let i=u(2).ngIf,e=u();return P(e.onUpdateItems(i))}),z(1,"i",17),I(2," Update "),h()}}function Ie(r,l){if(r&1&&(F(0),f(1,Se,3,0,"button",15),L()),r&2){let d=u().ngIf,t=u();p(),m("ngIf",t.productService.hasSelectionVariant(d))}}function ve(r,l){if(r&1&&(s(0,"actions")(1,"div",13),f(2,Ie,2,1,"ng-container",14),h()()),r&2){let d=u();p(2),m("ngxPermissionsOnly",Q(1,_e,d.inventoryUpdateRole))}}function be(r,l){r&1&&$(0)}function ye(r,l){if(r&1){let d=E();F(0),s(1,"app-table",18),_("onToggle",function(i){y(d);let e=u();return P(e.onShowDifferenceStock(i))})("onSubmit",function(i){y(d);let e=u();return P(e.updateStockByVariant(i))}),h(),L()}if(r&2){let d=l.ngIf,t=u();p(),m("data",d)("channel",t.channels())("showProductToggle",!0)("hiddenIPOSInventory",t.searchFilter.HiddenIPOSInventory)}}var ot=(()=>{let l=class l{constructor(t,i,e,a,n,o){this.http=t,this.toastr=i,this.dialog=e,this.productService=a,this.authService=n,this.mainPanelService=o,this.paginationService=C(V),this.multiChannelService=C(k),this.updateResHandling=C(U),this.searchFilter={PageNumber:1,RowCount:100},this.loaderEndpoint="InventoryLoader/GetMultipleInventoryComparison",this.dataEndpoint="Inventory/GetMultipleChannelComparison",this.allDataCountEndpoint="Inventory/GetMultipleChannelComparisonRowCount",this.selectedLocations=M([]),this.selectedChannels=M([]),this.channels=M([]),this.inventoryUpdateRole=ie.InventoryUpdate,this.channelOptions=this.authService.getChannels()}ngOnInit(){this.initPageLoader()}initPageLoader(){this.paginationService.fetchDataEndpoint=this.dataEndpoint,this.paginationService.fethRowCountEndpoint=this.allDataCountEndpoint,this.loader$=this.http.post(`/API/${this.loaderEndpoint}`,{}).pipe(H(t=>{t.Filter={PageNumber:t.Filter.PageNumber,filterModel:D.ALL,RowCount:t.Filter.PageSize,HiddenIPOSInventory:t.Filter.HiddenIPOSInventory},this.searchFilter=t.Filter,this.mainPanelService.openModalFilter()}))}onChannelChange(t=[]){let i=t.filter(a=>S.isValidGUID(a.id)==!1),e=t.filter(a=>S.isValidGUID(a.id));this.selectedLocations.set(i),this.selectedChannels.set(e)}onSearch(t){let i=this.multiChannelService.filterSelectedChannels(this.selectedLocations(),this.selectedChannels());this.channels.set(i);let e=this.multiChannelService.generateFilterLocation(this.selectedLocations(),this.selectedChannels());this.searchFilter.ListChannelID=e.channelIds,this.searchFilter.ListLocationID=e.locationIds,this.searchFilter.text=t,this.paginationService.reloadPagination(this.searchFilter)}updateStock(t,i){if(t.length>0){let e=[];t.forEach(o=>{o.Channel?.forEach(c=>{e.push({ChannelItemID:c?.ChannelItemID,ChannelVariationID:c?.ChannelVariationID,Inventory:o.Inventory,LocationID:c?.LocationID})})});let n={ListChannelID:i.filter(o=>o.selected).map(o=>o.ID),List:e};this.http.post(O.UpdateInventoryChannel,n).subscribe(o=>{this.paginationService.reloadPagination(this.searchFilter),this.toastr.success("Successfully updated "+n.List.length+" variants in "+n.ListChannelID.length+" channels","Success")})}}updateStockByVariant(t){let i=t.InventoryMultiwarehouse[0]?.LocationID,e={ID:t.ChannelID,ChannelItemID:t.ChannelItemID,ChannelVariantID:t.ChannelVariationID,NewQuantity:t.Inventory,VariantID:t.ID,SKU:t?.Sku,LocationID:i};this.http.post(O.UpdateUpdateQuantityByItem,e).subscribe(a=>{this.paginationService.reloadPagination(this.searchFilter),this.handlingUpdateStock(a)})}handlingUpdateStock(t){if(t){let i=t?.Response?.Fail_list,e=t?.Response?.Success_list;this.updateResHandling.responseHandling(e,i,"Stock")}else this.toastr.error(t?.Exception,"Error")}onShowDifferenceStock(t){t?this.searchFilter.filterModel=D.DIFFERENCE:this.searchFilter.filterModel=D.ALL,this.paginationService.reloadPagination(this.searchFilter)}onUpdateItems(t){let i=this.productService.selectedVariantProduct(t),e=this.channelOptions.filter(a=>this.channels()?.find(n=>n.ID===a.ID));this.dialog.open(me,{data:{selectedItems:i,channels:JSON.parse(JSON.stringify(e))},width:"400px"}).afterClosed().pipe(A(a=>S.IsNotEmpty(a))).subscribe(a=>{this.updateStock(i,a)})}};l.\u0275fac=function(i){return new(i||l)(g(oe),g(ae),g(se),g(de),g(w),g(ce))},l.\u0275cmp=W({type:l,selectors:[["app-multi-channel-comparison"]],features:[J([V,k,U])],decls:26,vars:21,consts:[["headerTitle","Inventory Comparison","textButton","Search",3,"onSubmit","hideSearchBox"],[4,"ngIf"],["for","selectChannel",1,"fw-bold","mb-3"],["id","selectChannel",3,"onChannelChange","multiple"],[1,"mt-5"],["for","PageNumber",1,"fw-bold"],["type","number","id","PageNumber","placeholder","PageNumber","name","PageNumber","data-toggle","tooltip","matTooltip","Page Number",1,"form-control","mt-2",3,"ngModelChange","ngModel"],["for","RowCount",1,"fw-bold"],["type","number","id","RowCount","placeholder","Page Size","name","RowCount","data-toggle","tooltip","matTooltip","Page Size",1,"form-control","mt-2",3,"ngModelChange","ngModel"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[3,"onNextPage","onLastPage","onGetRowCount","totalData","hideCount","rowCount","pageNumber","disableNextButton","goToLastPage"],[1,"d-flex"],[4,"ngxPermissionsOnly"],["type","button","class","btn btn-success shadow-sm rounded me-3",3,"click",4,"ngIf"],["type","button",1,"btn","btn-success","shadow-sm","rounded","me-3",3,"click"],[1,"fas","fa-chevron-circle-up"],["table","inventory",3,"onToggle","onSubmit","data","channel","showProductToggle","hiddenIPOSInventory"]],template:function(i,e){i&1&&(s(0,"mainpanel",0),_("onSubmit",function(n){return e.onSearch(n)}),f(1,ve,3,3,"actions",1),v(2,"async"),s(3,"filters"),f(4,be,1,0,"ng-container",1),v(5,"async"),s(6,"div")(7,"label",2),I(8,"Channel"),h(),s(9,"multiwarehouse-tree-select",3),_("onChannelChange",function(n){return e.onChannelChange(n)}),h()(),s(10,"div",4)(11,"label",5),I(12,"PageNumber"),h(),s(13,"input",6),R("ngModelChange",function(n){return T(e.searchFilter.PageNumber,n)||(e.searchFilter.PageNumber=n),n}),h()(),s(14,"div",4)(15,"label",7),I(16,"Page Size"),h(),s(17,"input",8),R("ngModelChange",function(n){return T(e.searchFilter.RowCount,n)||(e.searchFilter.RowCount=n),n}),h()()(),s(18,"content")(19,"div",9)(20,"div",10)(21,"div",11),f(22,ye,2,4,"ng-container",1),v(23,"async"),s(24,"infinite-paginator",12),v(25,"async"),_("onNextPage",function(){return e.paginationService.onNextPage(e.searchFilter)})("onLastPage",function(){return e.paginationService.onLastPage(e.searchFilter)})("onGetRowCount",function(){return e.paginationService.getRowCount(e.searchFilter)}),h()()()()()()),i&2&&(m("hideSearchBox",!1),p(),m("ngIf",b(2,13,e.paginationService.data$)),p(3),m("ngIf",b(5,15,e.loader$)),p(5),m("multiple",!0),p(4),x("ngModel",e.searchFilter.PageNumber),p(4),x("ngModel",e.searchFilter.RowCount),p(5),m("ngIf",b(23,17,e.paginationService.data$)),p(2),m("totalData",e.paginationService.totalData())("hideCount",e.paginationService.hideCount())("rowCount",b(25,19,e.paginationService.totalRowCount$))("pageNumber",e.paginationService.pageNumber())("disableNextButton",e.paginationService.disableNextButton())("goToLastPage",e.paginationService.isLastPage()))},dependencies:[X,K,he,pe,ue,ne,Y,te,Z,ee,ge,Ce,le,re,q],styles:[".no-bullet[_ngcontent-%COMP%]{list-style-type:none}"]});let r=l;return r})();export{ot as MultiChannelComparison};
@@ -1 +0,0 @@
1
- import{a as lt}from"./chunk-7KG3DC5J.js";import{b as ot}from"./chunk-34UF36YY.js";import{e as nt}from"./chunk-6KWG6O5L.js";import{a as ct}from"./chunk-AL5RTE5M.js";import"./chunk-3JRUKSV3.js";import"./chunk-SJ5MC42H.js";import"./chunk-4RLWHMI6.js";import"./chunk-NWB7EVME.js";import{a as pt}from"./chunk-XFIUNEOU.js";import"./chunk-AFDI4TD4.js";import"./chunk-4RG5YR7N.js";import"./chunk-5MV3UFJQ.js";import"./chunk-E6AMKEQR.js";import"./chunk-IGKMJFKP.js";import"./chunk-ITGVXYDV.js";import"./chunk-HK5FXZE4.js";import"./chunk-KJE5GRQ4.js";import"./chunk-4ILDFTIG.js";import"./chunk-A6QXXKPR.js";import"./chunk-5O33CV4F.js";import"./chunk-QXRG5XYP.js";import"./chunk-RXLMJGUY.js";import"./chunk-M4ZE35XK.js";import"./chunk-L7WZ6U4T.js";import"./chunk-LOWGZOML.js";import"./chunk-5PMKN6PM.js";import"./chunk-YJTPDV4D.js";import{e as it}from"./chunk-OXWPYJNB.js";import"./chunk-XBIHN6D3.js";import{c as et}from"./chunk-BLHKSSK6.js";import{m as at,n as rt}from"./chunk-UI5ITL7Z.js";import{A as tt,h as Y,m as Z}from"./chunk-L3W6SG2T.js";import"./chunk-YTHY4IFS.js";import"./chunk-ZETUYNFJ.js";import"./chunk-SILAIDPV.js";import"./chunk-3I2V337G.js";import{G as Q,I as X,c as j,e as W,f as q,i as J,j as U,l as G,m as K}from"./chunk-LNJUGHOX.js";import{$c as H,Gb as L,Hc as R,Mb as f,Mc as p,Nc as v,Oc as E,Qc as $,Rc as V,Sc as B,Wc as k,Z as x,_c as O,ad as z,ca as M,f as T,gc as c,hc as o,hd as m,ic as a,id as _,jc as I,jd as w,kb as D,kd as A,lb as P,nb as r,nc as u,oc as g,qc as F,v as h,vc as b,xa as C,xc as s,ya as S,zb as N}from"./chunk-ZYJ6LAJ3.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";var mt=(i,l)=>({"bg-gradient-danger":i,"bg-gradient-warning":l}),dt=()=>["/menu/products/status/notification/detail"],ft=i=>({ID:i});function ut(i,l){if(i&1&&(u(0),p(1),m(2,"number"),o(3,"span"),p(4,"s"),a(),g()),i&2){let n=s().$implicit;r(),E(" ",w(2,1,n.DurationInSecond,"1.1-1")," ")}}function gt(i,l){i&1&&p(0," - ")}function _t(i,l){if(i&1&&(u(0),o(1,"tr",14)(2,"td")(3,"a",15),I(4,"img",16),o(5,"span"),p(6),a()()(),o(7,"td")(8,"b"),p(9),a(),I(10,"div",17),a(),o(11,"td"),f(12,ut,5,4,"ng-container",18)(13,gt,1,0,"ng-template",null,0,A),a(),o(15,"td"),p(16),a(),o(17,"td"),p(18),m(19,"date"),a()(),g()),i&2){let n=l.$implicit,e=R(14);r(),c("ngClass",z(15,mt,n.Status==1,n.Status==0)),r(2),c("routerLink",O(18,dt))("queryParams",H(19,ft,n.ID)),r(),c("src",k(n.Img),P),r(2),v(n.Name),r(3),v(n.Label),r(),c("innerHTML",n.Message,D),r(2),c("ngIf",n.DurationInSecond)("ngIfElse",e),r(4),v(n.StatusLabel),r(2),E(" ",w(19,12,n.Created,"dd MMM yyyy HH:mm")," ")}}function ht(i,l){if(i&1){let n=F();u(0),o(1,"div",6)(2,"div",19)(3,"app-custom-paginator",20),m(4,"async"),m(5,"async"),b("total",function(){C(n);let t=s(2);return S(t.getRowCount())})("next",function(){C(n);let t=s(2);return S(t.getNotifications())})("previous",function(){C(n);let t=s(2);return S(t.getNotifications())}),a()()(),g()}if(i&2){let n=s().ngIf,e=s();r(3),c("filter",e.filter)("totaldata",n==null?null:n.length)("paginationTotal",_(4,4,e.rowCount$))("hasClicked",_(5,6,e.rowCount$))}}function Ct(i,l){if(i&1&&(u(0),f(1,ht,6,8,"ng-container",13),g()),i&2){let n=l.ngIf;r(),c("ngIf",n.length>0)}}var Vt=(()=>{let l=class l{constructor(e,t){this.http=e,this.notificationService=t,this.filter=new lt,this.destroy$=new T}ngOnInit(){this.notificationService.clearNotification(),this.initPageLoader(),this.subscribeNotification()}subscribeNotification(){this.notificationService.getNotification().pipe(M(this.destroy$)).subscribe(e=>{e.length>0&&(this.getNotifications(),this.notificationService.clearNotification())})}initPageLoader(){this.http.post("/api/notification/Load",{}).subscribe(e=>{this.filter=e.Filter,this.filter.PageSize=this.filter.RowCount,this.getNotifications()})}onFilter(){this.rowCount$=null,this.getNotifications()}getNotifications(){let e={ChannelID:this.filter.ChannelID,RowCount:this.filter.PageSize,PageNumber:this.filter.PageNumber};this.notifications$=this.http.post("/api/notification/Get",e).pipe(h(t=>t.Data),h(t=>(t=this.setChannelLogoToNotifications(t),t=this.setTimeToSecond(t),t)),x(1))}setTimeToSecond(e){return e=e.map(t=>(t.DurationInSecond=parseInt(t.Duration)/1e3,t)),e}setChannelLogoToNotifications(e){return e=e.map(t=>(t.Img=et.getChannelLogoByTypeId(t.TypeID),t)),e}getRowCount(){let e={ChannelID:this.filter.ChannelID};this.rowCount$=this.http.post("/api/notification/RowCount",e).pipe(h(t=>t.Count),x(1))}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}};l.\u0275fac=function(t){return new(t||l)(N(it),N(ot))},l.\u0275cmp=L({type:l,selectors:[["app-notification"]],decls:32,vars:7,consts:[["timeNotAvailable",""],["headerTitle","Product Scan Job","hideSearchBox","true",3,"onSubmit"],["routerLink","/menu/products/status/notificationV2",1,"btn","btn-outline-secondary","btn-lg"],[1,"mb-2"],[3,"ngModelChange","ngModel"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"table","table-hover"],[1,"sticky-top-thead"],[1,"table-light"],[4,"ngFor","ngForOf"],[4,"ngIf"],[3,"ngClass"],[3,"routerLink","queryParams"],["alt","",1,"channelLogo-md","me-4",3,"src"],[3,"innerHTML"],[4,"ngIf","ngIfElse"],[1,"col-12"],[3,"total","next","previous","filter","totaldata","paginationTotal","hasClicked"]],template:function(t,d){t&1&&(o(0,"mainpanel",1),b("onSubmit",function(){return d.onFilter()}),o(1,"actions")(2,"a",2),p(3," Scan Job V2 "),a()(),o(4,"filters")(5,"div")(6,"h6",3),p(7,"Channel"),a(),o(8,"app-channel-options-v2",4),B("ngModelChange",function(y){return V(d.filter.ChannelID,y)||(d.filter.ChannelID=y),y}),a()()(),o(9,"content")(10,"div",5)(11,"div",6)(12,"div",7)(13,"div",8)(14,"table",9)(15,"thead",10)(16,"tr",11)(17,"th"),p(18,"Channel"),a(),o(19,"th"),p(20,"Process"),a(),o(21,"th"),p(22,"Duration"),a(),o(23,"th"),p(24,"Status"),a(),o(25,"th"),p(26,"Created"),a()()(),o(27,"tbody"),f(28,_t,20,21,"ng-container",12),m(29,"async"),a()()()()(),f(30,Ct,2,1,"ng-container",13),m(31,"async"),a()()()),t&2&&(r(8),$("ngModel",d.filter.ChannelID),r(20),c("ngForOf",_(29,3,d.notifications$)),r(2),c("ngIf",_(31,5,d.notifications$)))},dependencies:[K,j,W,q,tt,Y,Z,rt,at,pt,nt,X,Q,ct,J,G,U],encapsulation:2});let i=l;return i})();export{Vt as NotificationComponent};
@@ -1 +0,0 @@
1
- import{a as me}from"./chunk-ZSUWHVKX.js";import{e as _e}from"./chunk-6KWG6O5L.js";import{a as ge,i as be}from"./chunk-5O33CV4F.js";import"./chunk-QXRG5XYP.js";import"./chunk-RXLMJGUY.js";import"./chunk-YJTPDV4D.js";import{b as fe,e as S}from"./chunk-OXWPYJNB.js";import"./chunk-XBIHN6D3.js";import{a as w,c as ue}from"./chunk-BLHKSSK6.js";import{A as pe,c as te,h as ne,i as ie,k as oe,m as re,n as ae,t as se,u as de,v as ce,w as le}from"./chunk-L3W6SG2T.js";import"./chunk-YTHY4IFS.js";import{a as he,c as xe}from"./chunk-ZETUYNFJ.js";import{D as y,F as v,I as j,c as J,e as D,f as X,i as Z,m as ee}from"./chunk-LNJUGHOX.js";import{Bc as U,Cc as W,Dc as q,Gb as _,Hb as N,Hc as P,Lc as H,Mb as f,Mc as a,Nc as C,Oc as B,Pc as Y,Qc as I,Rc as L,Sc as T,Z as F,ad as G,gc as m,hc as i,hd as Q,ic as r,id as K,jc as l,kd as $,lb as M,ma as R,na as A,nb as c,nc as k,oc as E,qc as z,vc as u,xa as x,xc as g,ya as b,zb as p}from"./chunk-ZYJ6LAJ3.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";var Ce=(()=>{let t=class t{constructor(){}getBrowserName(){let n=window.navigator.userAgent.toLowerCase();switch(!0){case(n.indexOf("edge")>-1||n.indexOf("edg")>-1):return"edge";case n.indexOf("opr")>-1:return"opera";case n.indexOf("chrome")>-1:return"chrome";case n.indexOf("trident")>-1:return"ie";case n.indexOf("firefox")>-1:return"firefox";case n.indexOf("safari")>-1:return"safari";default:return"other"}}};t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=R({token:t,factory:t.\u0275fac,providedIn:"root"});let o=t;return o})();function Le(o,t){if(o&1&&(i(0,"swiper-slide")(1,"div")(2,"a",2),l(3,"img",3),r()(),i(4,"a",4),a(5),r(),i(6,"p",5),a(7),r()()),o&2){let d=t.$implicit;c(2),m("href",d.href,M),c(),m("src",d.imgSrc,M),c(),m("href",d.href,M),c(),C(d.title),c(2),C(d.description)}}var ve=(()=>{let t=class t{constructor(){this.newsList=[]}};t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=_({type:t,selectors:[["POS-news-swiper"]],inputs:{newsList:"newsList"},standalone:!1,decls:2,vars:1,consts:[["pagination","true","pagination-clickable","true","autoplay-delay","5000","autoplay-disable-on-interaction","false",2,"margin-top","30px"],[4,"ngFor","ngForOf"],["target","_blank",3,"href"],[1,"border-0","rounded-1","mb-8",2,"width","252px","height","152px",3,"src"],["target","_blank",1,"fw-bold","h5","text-success","header-title","fs-4",3,"href"],[2,"margin-bottom","3rem"]],template:function(e,s){e&1&&(i(0,"swiper-container",0),f(1,Le,8,5,"swiper-slide",1),r()),e&2&&(c(),m("ngForOf",s.newsList))},dependencies:[D],styles:["swiper-container[_ngcontent-%COMP%]{--swiper-pagination-bullet-inactive-color: #89b03e;--swiper-pagination-color: #89b03e}"]});let o=t;return o})();var Ae=["subdomainEl"],Ne=(o,t)=>({"rounded-end":o,"border-end-0":t});function ze(o,t){if(o&1&&(k(0),i(1,"div",36),l(2,"img",37),r(),E()),o&2){let d=t.$implicit;c(2),m("src",d.img,M)("title",d.title)("alt",d.title)}}function De(o,t){if(o&1){let d=z();k(0),i(1,"div",17)(2,"h3",18),a(3," DealPOS Omnichannel "),r(),i(4,"small",19),a(5," Multichannel Inventory Management Software "),r()(),i(6,"form",20)(7,"div",21)(8,"div",22)(9,"div",23)(10,"span"),l(11,"i",24),r()(),i(12,"input",25,1),T("ngModelChange",function(e){x(d);let s=g();return L(s.subdomain,e)||(s.subdomain=e),b(e)}),r(),i(14,"div")(15,"select",26),T("ngModelChange",function(e){x(d);let s=g();return L(s.domain,e)||(s.domain=e),b(e)}),i(16,"option",27),a(17,".dealpos.co.id"),r(),i(18,"option",28),a(19,".dealpos.net"),r(),i(20,"option",29),a(21,".dealpos.com"),r(),i(22,"option",30),a(23,".dealpos.app"),r()()()(),i(24,"div",31)(25,"button",32),u("click",function(){x(d);let e=g();return b(e.onNextState())}),a(26," Next "),r()(),i(27,"div",33)(28,"div",34),f(29,ze,3,3,"ng-container",35),r()()()(),E()}if(o&2){let d=g();c(12),I("ngModel",d.subdomain),c(3),I("ngModel",d.domain),c(14),m("ngForOf",d.channels)}}function je(o,t){o&1&&(i(0,"p"),a(1," Username is required "),r())}function Ve(o,t){if(o&1&&(k(0),i(1,"div",57),l(2,"div",58),i(3,"div",59),f(4,je,2,0,"p",47),r()(),E()),o&2){g();let d=P(14);c(4),m("ngIf",d.errors.required)}}function Fe(o,t){if(o&1){let d=z();i(0,"i",62),u("click",function(){x(d);let e=g(3);return b(e.hideShowPassword())}),r()}if(o&2){let d=g(3);H("fa "+d.passwordIcon)}}function Re(o,t){if(o&1&&(i(0,"span",60),f(1,Fe,1,2,"i",61),r()),o&2){let d=g(2);c(),m("ngIf",d.password)}}function Ue(o,t){o&1&&(i(0,"p"),a(1," Password is required "),r())}function We(o,t){if(o&1&&(k(0),i(1,"div",57),l(2,"div",58),i(3,"div",59),f(4,Ue,2,0,"p",47),r()(),E()),o&2){g();let d=P(21);c(4),m("ngIf",d.errors.required)}}function qe(o,t){if(o&1){let d=z();i(0,"div",38)(1,"h3",39),a(2,"Sign in"),r(),i(3,"h3",40),a(4," to "),i(5,"h6",41),a(6),r(),i(7,"i",42),u("click",function(){x(d);let e=g();return b(e.onEditDomain())}),r()()(),i(8,"form",43)(9,"div",44)(10,"div",23)(11,"span"),l(12,"i",45),r()(),i(13,"input",46,2),T("ngModelChange",function(e){x(d);let s=g();return L(s.username,e)||(s.username=e),b(e)}),r()(),f(15,Ve,5,1,"ng-container",47),i(16,"div",22)(17,"div",23)(18,"span"),l(19,"i",48),r()(),i(20,"input",49,3),T("ngModelChange",function(e){x(d);let s=g();return L(s.password,e)||(s.password=e),b(e)}),r(),f(22,Re,2,1,"span",50),r(),f(23,We,5,1,"ng-container",47),i(24,"div",51)(25,"button",52),u("click",function(){x(d);let e=g();return b(e.onLogin())}),a(26," Log in "),r()(),i(27,"div",53),l(28,"hr"),i(29,"span",54),a(30,"or"),r(),l(31,"hr"),r(),i(32,"div")(33,"button",55),u("click",function(e){x(d);let s=g();return b(s.onLoginByGoogle(e))}),l(34,"i",56),a(35," Sign In with Google "),r()()()}if(o&2){let d=P(14),n=P(21),e=g();c(6),Y(" (",e.subdomain,"",e.domain,") "),c(7),I("ngModel",e.username),c(2),m("ngIf",d.invalid&&(d.dirty||d.touched)),c(5),m("type",e.passwordType)("ngClass",G(9,Ne,e.browser=="edge",e.browser!="edge")),I("ngModel",e.password),c(2),m("ngIf",e.browser!="edge"),c(),m("ngIf",n.invalid&&(n.dirty||n.touched))}}var we=(()=>{let t=class t{constructor(n,e,s,h,ke){this._router=n,this.toastr=e,this.checkBrowser=s,this.authService=h,this.ngxPermission=ke,this.domain=".dealpos.co.id",this.loginState="FORM_DOMAIN",this.passwordType="password",this.passwordIcon="fa-eye",this.channels=[{title:"Shopee",img:w.SHOOPE},{title:"Tokopedia",img:w.TOKOPEDIA},{title:"Tiktok",img:w.TIKTOK},{title:"Woocommerce",img:w.WOOCOMMERCE},{title:"Lazada",img:w.LAZADA},{title:"Shopify",img:w.SHOPIFY},{title:"Plugo",img:w.PLUGONEW}],this.version=ge.version,this.news$=h.getNews().pipe(F(1))}ngOnInit(){this.initLogin(),this.browser=this.checkBrowser.getBrowserName(),document.body.classList.add("login-body"),this.initChangeLogUrl()}initChangeLogUrl(){let n=`https://changelog.dealpos.com/?categories=cat_nILYcoEQzgGWX&view=complete&v=${this.version}`;this.changelogUrl=n}ngAfterViewInit(){this.setAutoFocusDomain()}initLogin(){let n=JSON.parse(localStorage.getItem("Authorization"));if(n){this.username=n?.username,this.subdomain=n?.Host?.split(".")[0];let e=n?.Host?.split("dealpos");this.domain=`.dealpos${e[1]}`,this.authService.isActiveToken()&&this._router.navigate(["menu"])}}onNextState(){if(ue.IsEmpty(this.subdomain)){this.toastr.warning("Account Domain is required","Warning");return}this.parseSubdomain(),this.loginState="FORM_AUTH"}parseSubdomain(){let n=this.subdomain.indexOf(".dealpos");n!=-1&&(this.subdomain=this.subdomain.substring(0,n))}onEditDomain(){this.loginState="FORM_DOMAIN"}onLogin(){let n={Host:`${this.subdomain}${this.domain}`,Username:this.username,Password:this.password};this.authService.login(n).subscribe(e=>{this.onSuccessLogin(e)})}onLoginByGoogle(n){let e=`${this.subdomain}${this.domain}`;this.authService.loginWithGoogle(n,e).subscribe(s=>{this.onSuccessLogin(s)})}onSuccessLogin(n){this.ngxPermission.hasPermission([me.DashboardView]).then(e=>{e?this._router.navigate(["menu/dashboard"]):n?.TotalChannel<1?this._router.navigate(["menu/channel"]):this._router.navigate(["menu/products"])})}setAutoFocusDomain(){this.subdomainEl.nativeElement.focus()}hideShowPassword(){this.passwordType=this.passwordType==="text"?"password":"text",this.passwordIcon=this.passwordIcon==="fa-eye"?"fa-eye-slash":"fa-eye"}ngOnDestroy(){document.body.classList.remove("login-body")}};t.\u0275fac=function(e){return new(e||t)(p(v),p(fe),p(Ce),p(be),p(he))},t.\u0275cmp=_({type:t,selectors:[["app-login"]],viewQuery:function(e,s){if(e&1&&U(Ae,5),e&2){let h;W(h=q())&&(s.subdomainEl=h.first)}},standalone:!1,decls:19,vars:7,consts:[["USERNAME_PASSWORD",""],["subdomainEl",""],["usernameCtrl","ngModel"],["passwordCtrl","ngModel"],[1,"container-fluid"],[1,"row","mx-auto","bg-white","login-pane"],[1,"col-md-5","order-md-first","order-last","border-end","features-pane","pt-12","pb-9"],[1,"fw-normal","fs-2","header-title","text-center"],[3,"newsList"],[1,"col-md-7","order-md-last","order-first","py-12","sign-in-pane"],[4,"ngIf","ngIfElse"],[1,"d-flex","copyright",2,"margin-left","20px"],[1,"align-self-center","me-5"],["target","_blank","href","http://www.dealpos.com"],[1,"version",2,"margin-right","18px"],["target","_blank",1,"text-dark","fst-italic",3,"href"],[1,"fa-solid","fa-circle-exclamation","ms-2",2,"font-size","16px"],[1,"text-md-start","text-center"],[1,"fs-2","header-title","me-2","fw-normal"],[1,"text-secondary-emphasis","fst-italic",2,"font-size","11px"],[2,"margin-top","38px"],[1,"form-block","mt-5"],[1,"input-group","input-group-lg","mt-8"],[1,"input-group-text","rounded-start","border-end-0",2,"width","52px"],[1,"fa-solid","fa-cloud"],["placeholder","Store Address","aria-label","Store Address","aria-describedby","basic-addon1","autofocus","","name","Store Address",1,"form-control","form-control-lg","rounded-end-0","border-start-0","ps-1",2,"height","58px",3,"ngModelChange","ngModel"],["name","domainOption",1,"form-select","form-control","form-control-lg","border-start-0","border-start","rounded-end","rounded-start-0","domain-option",2,"height","58px",3,"ngModelChange","ngModel"],["selected","","value",".dealpos.co.id"],["value",".dealpos.net"],["value",".dealpos.com"],["value",".dealpos.app"],[1,"w-100",2,"margin-top","1.8rem"],["name","next","data-cy","next","type","submit",1,"btn","btn-xl","btn-success","btn-block","font125rem","robotoslab","w-100",3,"click"],[1,"d-flex","align-items-center","justify-content-center",2,"margin-top","2.1rem"],[1,"d-flex","align-items-center","justify-content-between","w-100"],[4,"ngFor","ngForOf"],[1,""],[1,"border-0",2,"width","34px","height","34px",3,"src","title","alt"],[1,"d-flex","align-items-center","justify-content-start","mb-2"],[1,"robotoslab","fw-normal"],[1,"ms-2","fw-normal"],[1,"me-2","robotoslab","d-inline-block","text-success"],["title","Edit Store Address",1,"fa-solid","fa-edit","link-success","fs-5","pointer",3,"click"],[2,"margin-top","29px"],[1,"input-group","input-group-lg"],[1,"fas","fa-user","fa-lg"],["id","txtUsername","type","text","data-cy","username","required","","placeholder","Username","aria-label","Username","aria-describedby","basic-addon1","autofocus","","name","username",1,"form-control","form-control-lg","rounded-end","border-start-0","ps-1",2,"height","58px",3,"ngModelChange","ngModel"],[4,"ngIf"],[1,"fas","fa-key","fa-lg"],["id","txtPassword","data-cy","password","placeholder","Password","aria-label","Password","aria-describedby","basic-addon1","autofocus","","name","password","required","",1,"form-control","form-control-lg","rounded-end","border-start-0","ps-1",2,"height","58px",3,"ngModelChange","type","ngClass","ngModel"],["class","input-group-text border-start-0 rounded-end",4,"ngIf"],[1,"w-100","mt-8"],["data-cy","login","type","submit",1,"btn","btn-lg","btn-success","btn-block","font125rem","robotoslab","w-100",3,"click"],[1,"divider","d-flex","align-items-center","justify-content-center"],[1,"mx-4","text-muted"],[1,"btn","btn-social-login","text-success","w-100","fw-bold",3,"click"],[1,"fa-brands","fa-google"],[1,"d-flex","justify-content-start","w-50","mb-4",2,"height","16px"],[2,"width","52px"],[1,"text-danger","ps-1"],[1,"input-group-text","border-start-0","rounded-end"],[3,"class","click",4,"ngIf"],[3,"click"]],template:function(e,s){if(e&1&&(i(0,"div",4)(1,"div",5)(2,"div",6)(3,"h3",7),a(4,"New Features"),r(),l(5,"POS-news-swiper",8),Q(6,"async"),r(),i(7,"div",9),f(8,De,30,3,"ng-container",10)(9,qe,36,12,"ng-template",null,0,$),r()(),i(11,"div",11)(12,"span",12),a(13,"powered by :"),r(),l(14,"a",13),r(),i(15,"div",14)(16,"a",15),a(17),l(18,"i",16),r()()()),e&2){let h=P(10);c(5),m("newsList",K(6,5,s.news$)),c(3),m("ngIf",s.loginState=="FORM_DOMAIN")("ngIfElse",h),c(8),m("href",s.changelogUrl,M),c(),B("version ",s.version)}},dependencies:[J,D,X,ae,de,ce,te,se,ne,ie,le,re,oe,ve,Z],styles:[".login-pane[_ngcontent-%COMP%]{max-width:57rem;height:max-content;margin-top:115px}@media (max-width: 768px){.login-pane[_ngcontent-%COMP%]{margin-top:0}}@media only screen and (max-width: 1300px) and (min-width: 1024px){.login-pane[_ngcontent-%COMP%]{margin-top:30px}}.header-title[_ngcontent-%COMP%]{font-family:Roboto Slab}.carousel-inner[_ngcontent-%COMP%]{height:310px}.carousel-inner[_ngcontent-%COMP%] div.carousel-item[_ngcontent-%COMP%]{top:28px}@media (max-width: 820px){.carousel-indicators[_ngcontent-%COMP%]{bottom:-8px}}.carousel-indicators[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{background-color:#ddd;width:1.25rem;height:.375rem;transition:.3s}.carousel-indicators[_ngcontent-%COMP%] button.active[_ngcontent-%COMP%]{background-color:var(--bs-success)}.sign-in-pane[_ngcontent-%COMP%]{padding:0 3rem 0 3.5rem}@media (max-width: 768px){.sign-in-pane[_ngcontent-%COMP%]{padding:24px 12px}.sign-in-pane[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding-left:8px!important}}@media (min-width: 1200px){.sign-in-pane[_ngcontent-%COMP%]{border-bottom:1px solid #89b03e;border-right:1px solid #89b03e;border-top:1px solid #89b03e;border-radius:0 10px 10px 0}}.subscription.danger[_ngcontent-%COMP%]{background-color:#f2dede;border-color:#eb415d;color:#a94442}.subscription.warning[_ngcontent-%COMP%]{background-color:#fcf8e3;border-color:#faebcc;color:#8a6d3b}@media (max-width: 768px){.features-pane[_ngcontent-%COMP%]{border-right:0px!important}}@media (min-width: 1200px){.features-pane[_ngcontent-%COMP%]{border-left:1px solid #89b03e;border-bottom:1px solid #89b03e;border-top:1px solid #89b03e;border-radius:10px 0 0 10px}}.copyright[_ngcontent-%COMP%]{position:absolute;bottom:1.25rem;left:1.25rem}.copyright[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{width:8.125rem;height:2.5rem;background-image:url(//res.cloudinary.com/pos/image/upload/POS/Images/Login/dealpos.png);background-position:left top;background-repeat:no-repeat;background-size:contain}.version[_ngcontent-%COMP%]{bottom:1.25rem;right:1.25rem;position:absolute}@media (max-width: 768px){.copyright[_ngcontent-%COMP%], .version[_ngcontent-%COMP%]{position:static;margin-top:10px}.copyright[_ngcontent-%COMP%]{justify-content:center}}div.divider[_ngcontent-%COMP%] > hr[_ngcontent-%COMP%]{margin-top:1.2rem;margin-bottom:1.2rem;border-top:1px solid rgba(0,0,0,.855);width:20%}button.btn-social-login[_ngcontent-%COMP%], .btn-login[_ngcontent-%COMP%]{border:1px solid var(--bs-success)}.fa-google[_ngcontent-%COMP%]{background:conic-gradient(from -45deg,#ea4335 110deg,#4285f4 90deg 180deg,#34a853 180deg 270deg,#fbbc05 270deg) 73% 55%/150% 150% no-repeat;-webkit-background-clip:text;background-clip:text;color:transparent;-webkit-text-fill-color:transparent}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:#fe3a00!important}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:visited i[_ngcontent-%COMP%]{color:#f4f4f4!important}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:visited{margin-left:-10px}.domain-option[_ngcontent-%COMP%]{padding:.75rem;color:#343434;font-size:.875rem;width:8.5rem}"]});let o=t;return o})();var Oe=(()=>{let t=class t{constructor(n,e,s){this.route=n,this.http=e,this.service=s}ngOnInit(){this.route.queryParams.subscribe(n=>{this.shopID=n.shop_id,this.code=n.code})}addShopee(){let n={ShopID:Number(this.shopID),Code:this.code};this.http.post("/api/ChannelAdd/ShopeeV2",n).subscribe(s=>{this.service.navigate(["/menu/channel"])})}};t.\u0275fac=function(e){return new(e||t)(p(y),p(S),p(v))},t.\u0275cmp=_({type:t,selectors:[["shopee-authorized"]],standalone:!1,decls:20,vars:1,consts:[[1,"container","h-100"],[1,"row","d-flex","justify-content-center","align-items-center","h-100"],[1,"col-md-4"],[1,"card"],[1,"card-header","text-center"],[1,"far","fa-check-circle","text-success",2,"font-size","115px"],[1,"h3","fw-bold"],[1,"card-body","text-center","py-6"],[1,"text-shopee","fw-bold"],["type","button",1,"btn","btn-success","mt-t",3,"click"],[1,"fas","fa-undo"]],template:function(e,s){e&1&&(i(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4),l(5,"i",5),i(6,"div",6),a(7,"Success !"),r()(),i(8,"div",7)(9,"div"),a(10,"You have successfully authorized "),r(),i(11,"div"),a(12,"DEALPOS to manage your Shopee"),r(),i(13,"div"),a(14," Your shopID is "),i(15,"span",8),a(16),r()(),i(17,"button",9),u("click",function(){return s.addShopee()}),l(18,"i",10),a(19," Add to my Channel"),r()()()()()()),e&2&&(c(16),C(s.shopID))},styles:[".login-pane[_ngcontent-%COMP%]{max-width:57rem;height:max-content;margin-top:115px}@media (max-width: 768px){.login-pane[_ngcontent-%COMP%]{margin-top:0}}@media only screen and (max-width: 1300px) and (min-width: 1024px){.login-pane[_ngcontent-%COMP%]{margin-top:30px}}.header-title[_ngcontent-%COMP%]{font-family:Roboto Slab}.carousel-inner[_ngcontent-%COMP%]{height:310px}.carousel-inner[_ngcontent-%COMP%] div.carousel-item[_ngcontent-%COMP%]{top:28px}@media (max-width: 820px){.carousel-indicators[_ngcontent-%COMP%]{bottom:-8px}}.carousel-indicators[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{background-color:#ddd;width:1.25rem;height:.375rem;transition:.3s}.carousel-indicators[_ngcontent-%COMP%] button.active[_ngcontent-%COMP%]{background-color:var(--bs-success)}.sign-in-pane[_ngcontent-%COMP%]{padding:0 3rem 0 3.5rem}@media (max-width: 768px){.sign-in-pane[_ngcontent-%COMP%]{padding:24px 12px}.sign-in-pane[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding-left:8px!important}}@media (min-width: 1200px){.sign-in-pane[_ngcontent-%COMP%]{border-bottom:1px solid #89b03e;border-right:1px solid #89b03e;border-top:1px solid #89b03e;border-radius:0 10px 10px 0}}.subscription.danger[_ngcontent-%COMP%]{background-color:#f2dede;border-color:#eb415d;color:#a94442}.subscription.warning[_ngcontent-%COMP%]{background-color:#fcf8e3;border-color:#faebcc;color:#8a6d3b}@media (max-width: 768px){.features-pane[_ngcontent-%COMP%]{border-right:0px!important}}@media (min-width: 1200px){.features-pane[_ngcontent-%COMP%]{border-left:1px solid #89b03e;border-bottom:1px solid #89b03e;border-top:1px solid #89b03e;border-radius:10px 0 0 10px}}.copyright[_ngcontent-%COMP%]{position:absolute;bottom:1.25rem;left:1.25rem}.copyright[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{width:8.125rem;height:2.5rem;background-image:url(//res.cloudinary.com/pos/image/upload/POS/Images/Login/dealpos.png);background-position:left top;background-repeat:no-repeat;background-size:contain}.version[_ngcontent-%COMP%]{bottom:1.25rem;right:1.25rem;position:absolute}@media (max-width: 768px){.copyright[_ngcontent-%COMP%], .version[_ngcontent-%COMP%]{position:static;margin-top:10px}.copyright[_ngcontent-%COMP%]{justify-content:center}}div.divider[_ngcontent-%COMP%] > hr[_ngcontent-%COMP%]{margin-top:1.2rem;margin-bottom:1.2rem;border-top:1px solid rgba(0,0,0,.855);width:20%}button.btn-social-login[_ngcontent-%COMP%], .btn-login[_ngcontent-%COMP%]{border:1px solid var(--bs-success)}.fa-google[_ngcontent-%COMP%]{background:conic-gradient(from -45deg,#ea4335 110deg,#4285f4 90deg 180deg,#34a853 180deg 270deg,#fbbc05 270deg) 73% 55%/150% 150% no-repeat;-webkit-background-clip:text;background-clip:text;color:transparent;-webkit-text-fill-color:transparent}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:#fe3a00!important}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:visited i[_ngcontent-%COMP%]{color:#f4f4f4!important}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:visited{margin-left:-10px}.domain-option[_ngcontent-%COMP%]{padding:.75rem;color:#343434;font-size:.875rem;width:8.5rem}.form-signin[_ngcontent-%COMP%]{max-width:600px}.card[_ngcontent-%COMP%]{font:100 14px/25px Roboto,Helvetica Neue,sans-serif;border-radius:13px;box-sizing:border-box}.text-shopee[_ngcontent-%COMP%]{color:#f53d2d}"]});let o=t;return o})();var Pe=(()=>{let t=class t{constructor(n,e,s){this.route=n,this.http=e,this.service=s}ngOnInit(){this.route.queryParams.subscribe(n=>{this.code=n.code,this.state=n.state})}addChannelTiktok(){let n={Code:this.code};this.http.post("/api/ChannelAdd/AddTiktok",n).subscribe(e=>{this.service.navigate(["/menu/channel"])})}};t.\u0275fac=function(e){return new(e||t)(p(y),p(S),p(v))},t.\u0275cmp=_({type:t,selectors:[["app-tiktok"]],standalone:!1,decls:24,vars:2,consts:[[1,"container","h-100"],[1,"row","d-flex","justify-content-center","align-items-center","h-100"],[1,"col-md-4"],[1,"card"],[1,"card-header","text-center"],[1,"far","fa-check-circle","text-success",2,"font-size","115px"],[1,"h3","fw-bold"],[1,"card-body","text-center","py-6"],[1,"text-shopee","fw-bold"],["type","button",1,"btn","btn-success","mt-6",3,"click"],[1,"fas","fa-undo"]],template:function(e,s){e&1&&(i(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4),l(5,"i",5),i(6,"div",6),a(7,"Success !"),r()(),i(8,"div",7)(9,"div"),a(10,"You have successfully authorized "),r(),i(11,"div"),a(12,"DEALPOS to manage your Tiktok"),r(),i(13,"div"),a(14," Your Code is "),i(15,"span",8),a(16),r()(),i(17,"div"),a(18," Your State is "),i(19,"span",8),a(20),r()(),i(21,"button",9),u("click",function(){return s.addChannelTiktok()}),l(22,"i",10),a(23," Add to my Channel"),r()()()()()()),e&2&&(c(16),C(s.code),c(4),C(s.state))},styles:[".login-pane[_ngcontent-%COMP%]{max-width:57rem;height:max-content;margin-top:115px}@media (max-width: 768px){.login-pane[_ngcontent-%COMP%]{margin-top:0}}@media only screen and (max-width: 1300px) and (min-width: 1024px){.login-pane[_ngcontent-%COMP%]{margin-top:30px}}.header-title[_ngcontent-%COMP%]{font-family:Roboto Slab}.carousel-inner[_ngcontent-%COMP%]{height:310px}.carousel-inner[_ngcontent-%COMP%] div.carousel-item[_ngcontent-%COMP%]{top:28px}@media (max-width: 820px){.carousel-indicators[_ngcontent-%COMP%]{bottom:-8px}}.carousel-indicators[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{background-color:#ddd;width:1.25rem;height:.375rem;transition:.3s}.carousel-indicators[_ngcontent-%COMP%] button.active[_ngcontent-%COMP%]{background-color:var(--bs-success)}.sign-in-pane[_ngcontent-%COMP%]{padding:0 3rem 0 3.5rem}@media (max-width: 768px){.sign-in-pane[_ngcontent-%COMP%]{padding:24px 12px}.sign-in-pane[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding-left:8px!important}}@media (min-width: 1200px){.sign-in-pane[_ngcontent-%COMP%]{border-bottom:1px solid #89b03e;border-right:1px solid #89b03e;border-top:1px solid #89b03e;border-radius:0 10px 10px 0}}.subscription.danger[_ngcontent-%COMP%]{background-color:#f2dede;border-color:#eb415d;color:#a94442}.subscription.warning[_ngcontent-%COMP%]{background-color:#fcf8e3;border-color:#faebcc;color:#8a6d3b}@media (max-width: 768px){.features-pane[_ngcontent-%COMP%]{border-right:0px!important}}@media (min-width: 1200px){.features-pane[_ngcontent-%COMP%]{border-left:1px solid #89b03e;border-bottom:1px solid #89b03e;border-top:1px solid #89b03e;border-radius:10px 0 0 10px}}.copyright[_ngcontent-%COMP%]{position:absolute;bottom:1.25rem;left:1.25rem}.copyright[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{width:8.125rem;height:2.5rem;background-image:url(//res.cloudinary.com/pos/image/upload/POS/Images/Login/dealpos.png);background-position:left top;background-repeat:no-repeat;background-size:contain}.version[_ngcontent-%COMP%]{bottom:1.25rem;right:1.25rem;position:absolute}@media (max-width: 768px){.copyright[_ngcontent-%COMP%], .version[_ngcontent-%COMP%]{position:static;margin-top:10px}.copyright[_ngcontent-%COMP%]{justify-content:center}}div.divider[_ngcontent-%COMP%] > hr[_ngcontent-%COMP%]{margin-top:1.2rem;margin-bottom:1.2rem;border-top:1px solid rgba(0,0,0,.855);width:20%}button.btn-social-login[_ngcontent-%COMP%], .btn-login[_ngcontent-%COMP%]{border:1px solid var(--bs-success)}.fa-google[_ngcontent-%COMP%]{background:conic-gradient(from -45deg,#ea4335 110deg,#4285f4 90deg 180deg,#34a853 180deg 270deg,#fbbc05 270deg) 73% 55%/150% 150% no-repeat;-webkit-background-clip:text;background-clip:text;color:transparent;-webkit-text-fill-color:transparent}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:#fe3a00!important}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:visited i[_ngcontent-%COMP%]{color:#f4f4f4!important}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:visited{margin-left:-10px}.domain-option[_ngcontent-%COMP%]{padding:.75rem;color:#343434;font-size:.875rem;width:8.5rem}.form-signin[_ngcontent-%COMP%]{max-width:600px}.card[_ngcontent-%COMP%]{font:100 14px/25px Roboto,Helvetica Neue,sans-serif;border-radius:13px;box-sizing:border-box}.text-shopee[_ngcontent-%COMP%]{color:#f53d2d}"]});let o=t;return o})();var ye=(()=>{let t=class t{constructor(n,e,s){this.route=n,this.http=e,this.service=s}ngOnInit(){this.route.queryParams.subscribe(n=>{this.code=n.code})}addChannelLazada(){let n={Code:this.code};this.http.post("/api/ChannelAdd/AddLazada",n).subscribe(e=>{this.service.navigate(["/menu/channel"])})}};t.\u0275fac=function(e){return new(e||t)(p(y),p(S),p(v))},t.\u0275cmp=_({type:t,selectors:[["app-lazada"]],standalone:!1,decls:20,vars:1,consts:[[1,"container","h-100"],[1,"row","d-flex","justify-content-center","align-items-center","h-100"],[1,"col-md-4"],[1,"card"],[1,"card-header","text-center"],[1,"far","fa-check-circle","text-success",2,"font-size","115px"],[1,"h3","fw-bold"],[1,"card-body","text-center","py-6"],[1,"text-shopee","fw-bold"],["type","button",1,"btn","btn-success","mt-6",3,"click"],[1,"fas","fa-undo"]],template:function(e,s){e&1&&(i(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4),l(5,"i",5),i(6,"div",6),a(7,"Success !"),r()(),i(8,"div",7)(9,"div"),a(10,"You have successfully authorized "),r(),i(11,"div"),a(12,"DEALPOS to manage your Lazada"),r(),i(13,"div"),a(14," Your Code is "),i(15,"span",8),a(16),r()(),i(17,"button",9),u("click",function(){return s.addChannelLazada()}),l(18,"i",10),a(19," Add to my Channel"),r()()()()()()),e&2&&(c(16),C(s.code))},encapsulation:2});let o=t;return o})();var He=[{path:"",component:we,data:{title:"Dealpos x Marketplace"}},{path:"shopee",component:Oe,data:{title:"Success"}},{path:"tiktok",component:Pe,data:{title:"Success"}},{path:"lazada",component:ye,data:{title:"Success"}}],Se=(()=>{let t=class t{};t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=N({type:t}),t.\u0275inj=A({imports:[j.forChild(He),j]});let o=t;return o})();var yt=(()=>{let t=class t{};t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=N({type:t}),t.\u0275inj=A({imports:[ee,pe,Se,_e,xe]});let o=t;return o})();export{yt as LoginModule};
@@ -1 +0,0 @@
1
- import{a as J}from"./chunk-J2BPOHP6.js";import{c as A}from"./chunk-BLHKSSK6.js";import{A as q}from"./chunk-L3W6SG2T.js";import{v as G,w as H}from"./chunk-SILAIDPV.js";import{c as z,e as B,f as j,l as Z,m as $,q as R}from"./chunk-LNJUGHOX.js";import{$b as v,$c as y,Gb as E,Hc as F,Mb as s,Mc as m,Nc as b,Oc as u,Pc as D,Tc as L,Uc as N,Vc as k,Zb as h,bc as C,gc as r,hc as l,hd as P,ic as c,id as w,jc as g,kd as U,lb as f,nb as n,nc as _,oc as x,qc as O,td as V,vc as T,xa as S,xc as p,ya as I,zb as M}from"./chunk-ZYJ6LAJ3.js";var Q=e=>({"border-bottom-0":e}),W=e=>({"border-bottom":e});function X(e,o){if(e&1){let t=O();_(0),l(1,"img",15),T("click",function(i){S(t);let d=p();return I(d.onZoomImage(i))}),c(),x()}if(e&2){let t=p();n(),r("ngSrc",t.image)("fill",!0)}}function Y(e,o){e&1&&g(0,"img",16),e&2&&r("fill",!0)}function ee(e,o){if(e&1&&(l(0,"div",17),g(1,"i",18),l(2,"span"),m(3),c()()),e&2){let t=p();n(3),b(t.code)}}function te(e,o){if(e&1&&(l(0,"div",11),m(1),P(2,"number"),c()),e&2){let t=p();n(),u("",w(2,1,t.totalChannel())," Listing")}}function ne(e,o){if(e&1&&(l(0,"div",25),m(1),P(2,"number"),c()),e&2){p();let t=k(7);n(),u(" (",w(2,1,t)," Listing) ")}}function ie(e,o){if(e&1&&(_(0),l(1,"div",29)(2,"div",30),m(3),c(),l(4,"div")(5,"a",31),g(6,"i",32),c()()(),x()),e&2){let t=o.$implicit,a=o.index,i=p().$implicit;n(),r("ngClass",y(4,W,a!==(i==null?null:i.Variants.length)-1)),n(2),D(" ",t.ProductName," - ",t.Name," "),n(2),r("href",t.URL,f)}}function oe(e,o){if(e&1&&(l(0,"div",19)(1,"h2",20)(2,"button",21)(3,"div",22),g(4,"img",23),l(5,"span",24),m(6),c(),L(7),v(8,ne,3,3,"div",25),c()()(),l(9,"div",26)(10,"div",27),s(11,ie,7,6,"ng-container",28),c()()()),e&2){let t=o.$implicit,a=o.index,i=p();r("ngClass",y(12,Q,i.channels.length-1==a)),n(),r("id","heading"+a+i.id),n(),h("data-bs-target","#collapse"+a+i.id)("aria-controls","#collapse"+a+i.id),n(2),r("src",i.getChannelLogo(t.TypeID),f),n(),r("matTooltip",(t==null||t.ChannelName==null?null:t.ChannelName.length)>30?t.ChannelName:""),n(),b(t.ChannelName),n();let d=N(t==null||t.Variants==null?null:t.Variants.length);n(),C(d>1&&(i.channels==null?null:i.channels.length)>1?8:-1),n(),r("id","collapse"+a+i.id),h("aria-labelledby","heading"+a+i.id),n(2),r("ngForOf",t.Variants)}}var he=(()=>{let o=class o{constructor(a){this.biggerPictureService=a,this.totalChannel=V(0)}getChannelLogo(a){return A.getChannelLogoByTypeId(a)}onZoomImage(a){this.biggerPictureService.openBiggerPicture(a,this.imageForZoom)}};o.\u0275fac=function(i){return new(i||o)(M(J))},o.\u0275cmp=E({type:o,selectors:[["app-duplicate-product-card"]],inputs:{image:"image",imageForZoom:"imageForZoom",title:"title",code:"code",channels:"channels",totalChannel:[1,"totalChannel"],id:"id"},decls:17,vars:6,consts:[["elsePic",""],[1,"card"],[1,"card-body","py-6"],[1,"row"],[1,"col-4"],[1,"productUpload_defaultSize","me-2","image-upload"],[1,"imgContainer"],[4,"ngIf","ngIfElse"],[1,"col-8","d-inline-block","justify-content-between","gx-0",2,"padding-left","0px"],[1,"itemTitle"],["class","description",4,"ngIf"],[1,"fs-5"],[1,"card-footer",2,"padding-left","0px","padding-right","0px"],["id","accordionParent",1,"accordion","accordion-flush"],["class","accordion-item border-start-0 border-end-0",3,"ngClass",4,"ngFor","ngForOf"],[1,"rounded","imgUpload","float-left","cursor-pointer",3,"click","ngSrc","fill"],["ngSrc","//res.cloudinary.com/pos/image/upload/w_110/POS/Images/Icon/products_thumb.png",1,"rounded","float-left","imgUpload",3,"fill"],[1,"description"],[1,"fa","fa-barcode","me-2"],[1,"accordion-item","border-start-0","border-end-0",3,"ngClass"],[1,"accordion-header",3,"id"],["type","button","data-bs-toggle","collapse","aria-expanded","true",1,"accordion-button","collapsed",2,"height","40px"],[1,"d-flex","align-items-center","justify-content-start","w-100"],["alt","",1,"channel-logo",3,"src"],[1,"fs-4","ps-4","text-ellipsis",2,"max-width","13vw",3,"matTooltip"],[1,"fs-4","ms-2"],["data-bs-parent","#accordionParent",1,"accordion-collapse","collapse",3,"id"],[1,"accordion-body",2,"padding-top","0px","padding-bottom","0px"],[4,"ngFor","ngForOf"],[1,"d-flex","justify-content-between","align-items-center","py-4",3,"ngClass"],[1,"text-ellipsis"],["target","_blank",1,"text-secondary",3,"href"],[1,"fa-solid","fa-arrow-up-right-from-square","external-link-custom"]],template:function(i,d){if(i&1&&(l(0,"div",1)(1,"div",2)(2,"div",3)(3,"div",4)(4,"div",5)(5,"div",6),s(6,X,2,2,"ng-container",7)(7,Y,1,1,"ng-template",null,0,U),c()()(),l(9,"div",8)(10,"h4",9),m(11),c(),s(12,ee,4,1,"div",10),v(13,te,3,3,"div",11),c()()(),l(14,"div",12)(15,"div",13),s(16,oe,12,14,"div",14),c()()()),i&2){let K=F(8);n(6),r("ngIf",d.image)("ngIfElse",K),n(5),u(" ",d.title," "),n(),r("ngIf",d.code),n(),C(d.totalChannel()?13:-1),n(3),r("ngForOf",d.channels)}},dependencies:[$,z,B,j,q,H,G,R,Z],styles:[`.productUpload_defaultSize[_ngcontent-%COMP%]{max-width:100px!important;max-height:100px!important;width:auto!important;height:auto!important}.image-upload[_ngcontent-%COMP%]{position:relative}.imgContainer[_ngcontent-%COMP%]{width:100%;height:100px}.imgUpload[_ngcontent-%COMP%]{width:100%;height:100%;object-fit:scale-down}.channel-logo[_ngcontent-%COMP%]{width:18px;height:18px}.accordion-button[_ngcontent-%COMP%]{background-color:#ededed69!important}.accordion-button[_ngcontent-%COMP%]:not(.collapsed){background-color:#ededed69!important;color:#333}.accordion-button[_ngcontent-%COMP%]:after{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23333333'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e")}.accordion-button[_ngcontent-%COMP%]:focus{box-shadow:none!important}.card[_ngcontent-%COMP%]{margin-bottom:0!important}`]});let e=o;return e})();export{he as a};
@@ -1,5 +0,0 @@
1
- import{a as ne,b as oe,c as re,d as ae,e as le,f as pe,g as se}from"./chunk-XUBQATMN.js";import{b as ie}from"./chunk-222IOSGU.js";import{a as X}from"./chunk-6XT3JSG5.js";import"./chunk-B4QCGMST.js";import"./chunk-6Q6L5NUD.js";import"./chunk-ONU4O7N2.js";import{a as Y,b as Z}from"./chunk-PS43OK3J.js";import"./chunk-N5AE5WMQ.js";import{i as Q}from"./chunk-5O33CV4F.js";import"./chunk-QXRG5XYP.js";import"./chunk-RXLMJGUY.js";import"./chunk-YJTPDV4D.js";import{e as J}from"./chunk-OXWPYJNB.js";import"./chunk-XBIHN6D3.js";import"./chunk-BLHKSSK6.js";import{m as ee,n as te}from"./chunk-UI5ITL7Z.js";import{A as q,c as G,h as z,m as K}from"./chunk-L3W6SG2T.js";import"./chunk-YTHY4IFS.js";import"./chunk-ZETUYNFJ.js";import"./chunk-SILAIDPV.js";import"./chunk-3I2V337G.js";import{E as W,G as j,I as $,e as w,f as V,g as A,m as H}from"./chunk-LNJUGHOX.js";import{$c as x,Gb as C,Hb as k,Hc as v,Mb as c,Mc as m,Nc as O,Oc as B,Qc as L,Rc as F,Sc as R,Zc as P,gc as s,hc as o,ic as r,jc as d,kb as N,ma as D,na as T,nb as p,nc as f,oc as _,qa as U,qc as S,sb as M,vc as y,xa as g,xc as u,ya as h,zb as I}from"./chunk-ZYJ6LAJ3.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";var ge=e=>[e];function he(e,t){if(e&1&&(f(0),o(1,"a",9),m(2),r(),_()),e&2){let a=t.$implicit;p(),s("routerLink",x(2,ge,a.url)),p(),B(" ",a.title)}}var ce=(()=>{let t=class t{constructor(){this.tabs=[{Title:"Download By Url",Url:"/menu/products/download/by-url",Description:"Download products information by product URL as a parameter"}],this.moreMenu=[{title:"Sold In Channel",url:"/menu/products/status/sold-in-channel"},{title:"In POS",url:"/menu/products/status/in-pos"},{title:"Not In Channel",url:"/menu/products/status/not-in-channel"},{title:"Duplicate SKU",url:"/menu/products/status/duplicate-sku"}]}};t.\u0275fac=function(i){return new(i||t)},t.\u0275cmp=C({type:t,selectors:[["app-download"]],standalone:!1,decls:12,vars:2,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-block"],[4,"ngFor","ngForOf"],[1,"dropdown-item",3,"routerLink"]],template:function(i,l){i&1&&(o(0,"nav",0)(1,"div",1)(2,"div"),d(3,"nav-tab",2),r()(),o(4,"div")(5,"div",3)(6,"a",4),d(7,"i",5),r(),o(8,"div",6)(9,"div",7),c(10,he,3,4,"ng-container",8),r()()()()(),d(11,"router-outlet")),i&2&&(p(3),s("Tabs",l.tabs),p(7),s("ngForOf",l.moreMenu))},dependencies:[w,Y,W,j],encapsulation:2});let e=t;return e})();var E=(()=>{let t=class t{constructor(n){this.httpService=n}download(n){return this.httpService.post("/api/Product/downloadurl",n)}};t.\u0275fac=function(i){return new(i||t)(U(J))},t.\u0275prov=D({token:t,factory:t.\u0275fac,providedIn:"root"});let e=t;return e})();var Ce=e=>({"background-color":e});function ye(e,t){if(e&1&&(o(0,"th"),m(1),r()),e&2){let a=t.$implicit;p(),O(a.column)}}function ve(e,t){if(e&1&&(f(0),o(1,"td"),d(2,"span",6),r(),_()),e&2){let a=t.$implicit,n=u().$implicit;p(2),s("innerHTML",n[a.prop],N)}}function xe(e,t){if(e&1&&(o(0,"tr",5),c(1,ve,3,1,"ng-container",3),r()),e&2){let a=t.$implicit,n=u();s("ngStyle",x(2,Ce,a.Status>200?"#F4D6D5":"#DEE9C9")),p(),s("ngForOf",n.configs)}}var de=(()=>{let t=class t{constructor(){this.eventClose=new M}ngOnInit(){}onClose(){this.eventClose.emit()}};t.\u0275fac=function(i){return new(i||t)},t.\u0275cmp=C({type:t,selectors:[["app-response-api-list"]],inputs:{configs:"configs",data:"data",status:"status"},outputs:{eventClose:"onClose"},standalone:!1,decls:7,vars:2,consts:[[1,"table-responsive"],[1,"table"],[1,"thead-light"],[4,"ngFor","ngForOf"],[3,"ngStyle",4,"ngFor","ngForOf"],[3,"ngStyle"],[3,"innerHTML"]],template:function(i,l){i&1&&(o(0,"div",0)(1,"table",1)(2,"thead",2)(3,"tr"),c(4,ye,2,1,"th",3),r()(),o(5,"tbody"),c(6,xe,2,4,"tr",4),r()()()),i&2&&(p(4),s("ngForOf",l.configs),p(2),s("ngForOf",l.data))},dependencies:[w,A],encapsulation:2});let e=t;return e})();function be(e,t){if(e&1){let a=S();f(0),o(1,"button",15),y("click",function(){g(a);let i=u(),l=v(11);return h(i.onNewStepperState(l))}),d(2,"i",16),m(3," New "),r(),_()}}function Ee(e,t){if(e&1){let a=S();f(0),o(1,"button",15),y("click",function(){g(a),u();let i=v(11);return h(i.previous())}),m(2," Back "),r(),_()}}function Ie(e,t){if(e&1){let a=S();f(0),o(1,"button",17),y("click",function(){g(a);let i=u(),l=v(11);return h(i.onStepperNext(l))}),m(2," Next "),r(),_()}}function De(e,t){if(e&1){let a=S();f(0),o(1,"button",18),y("click",function(){g(a);let i=u(),l=v(11);return h(i.onSubmit(l))}),m(2,"Download"),r(),_()}if(e&2){let a=u();p(),s("disabled",!a.urls)}}function Te(e,t){e&1&&(d(0,"i",19),o(1,"span"),m(2,"Instruction"),r())}function Ue(e,t){e&1&&(o(0,"div",20)(1,"div",21)(2,"div",22)(3,"h4",23),m(4,"Note"),r()(),o(5,"div",24)(6,"ol",25)(7,"li"),m(8," Use this form to Download Products from Tokopedia using product URL "),r(),o(9,"li"),m(10," Copy Product URL from "),o(11,"a",26),m(12,"https://seller.tokopedia.com/ "),r(),m(13," and paste in this form "),r(),o(14,"li"),m(15," Use New Line when you want to input several product URLs "),r()()()()())}function Ne(e,t){e&1&&(d(0,"i",27),o(1,"span"),m(2,"Download"),r())}function Me(e,t){if(e&1){let a=S();o(0,"div",20)(1,"textarea",28),R("ngModelChange",function(i){g(a);let l=u();return F(l.urls,i)||(l.urls=i),h(i)}),r()()}if(e&2){let a=u();p(),s("placeholder",a.urlPlaceholder),L("ngModel",a.urls)}}function ke(e,t){e&1&&(d(0,"i",29),o(1,"span"),m(2,"Finish"),r())}function Oe(e,t){if(e&1&&(o(0,"div",20),d(1,"app-response-api-list",30),r()),e&2){let a=u();p(),s("data",a.downloadResponses)("configs",a.configs)}}function Be(e,t){e&1&&(o(0,"h6"),m(1,"1"),r())}function Le(e,t){e&1&&(o(0,"h6"),m(1,"2"),r())}function Fe(e,t){e&1&&(o(0,"h6"),m(1,"3"),r())}var ue=(()=>{let t=class t{constructor(n,i){this.downloadService=n,this.authService=i,this.configs=[{column:"Url",prop:"URL"},{column:"POS",prop:"Name"},{column:"Exception",prop:"Message"}],this.downloadResponses=[],this.stepperState="DOWNLOAD",this.urlPlaceholder=`https://tokopedia.com/tokoriyanadi/kaos-polos-biru
2
- https://tokopedia.com/tokoriyanadi/Celana-Chinos-Coklat`,this.currentDomain=this.authService.getDomain()}onStepperChange(n){this.stepperState=n.selectedStep.state}onSubmit(n){let i=this.urls.split(/\r?\n/);this.downloadService.download(i).subscribe(l=>{this.downloadResponses=l,this.mappingLinkToProduct(),this.onStepperNext(n)})}mappingLinkToProduct(){this.downloadResponses=this.downloadResponses.map(n=>(n.Name=n?.Name?`<a href="${this.currentDomain}/menu/Products/Catalog/Products/Info?ID=${n.ID}" target="_blank">
3
- ${n?.Name}
4
- </a>`:"-",n))}onNewStepperState(n){this.downloadResponses=[],this.urls=null,this.stepperState="DOWNLOAD",n.reset(),this.onStepperNext(n)}onStepperNext(n){n.selected.completed=!0,n.next()}};t.\u0275fac=function(i){return new(i||t)(I(E),I(Q))},t.\u0275cmp=C({type:t,selectors:[["app-by-url"]],standalone:!1,features:[P([{provide:ne,useValue:{displayDefaultIndicatorType:!1}}])],decls:24,vars:11,consts:[["stepper",""],["headerTitle","Tokopedia - Product Download By Url",3,"hideSearchBox","hideSearchDropdown"],[4,"ngIf"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-12"],["linear","",1,"stepper-downloadByUrl",3,"selectionChange","selectedIndex"],["state","GUIDE",3,"editable","completed"],["matStepLabel",""],["matStepContent",""],["state","DOWNLOAD",3,"editable","completed"],["state","FINISH"],["matStepperIcon","GUIDE"],["matStepperIcon","DOWNLOAD"],["matStepperIcon","FINISH"],[1,"btn","btn-outline-secondary","btn-fill","btn-lg",3,"click"],["aria-hidden","true",1,"fa","fa-file-alt","me-2"],["type","button",1,"btn","btn-outline-secondary","btn-fill","btn-lg","ms-3",3,"click"],["role","button",1,"btn","btn-success","btn-fill","btn-lg","text-white","ms-3",3,"click","disabled"],[1,"fa-solid","fa-info","me-3"],[1,"mt-8"],[1,"card","border","w-50"],[1,"card-header","py-6"],[1,"text-primary"],[1,"card-body",2,"padding-left","0px"],[1,"mt-6"],["href","https://seller.tokopedia.com","target","_blank"],[1,"fa-solid","fa-download","me-3"],["name","url","cols","30","rows","25",1,"form-control",3,"ngModelChange","placeholder","ngModel"],[1,"fa-sharp","fa-solid","fa-flag","me-3"],["status","error",3,"data","configs"]],template:function(i,l){if(i&1){let fe=S();o(0,"mainpanel",1)(1,"actions"),c(2,be,4,0,"ng-container",2)(3,Ee,3,0,"ng-container",2)(4,Ie,3,0,"ng-container",2)(5,De,3,1,"ng-container",2),r(),o(6,"content")(7,"div",3)(8,"div",4)(9,"div",5)(10,"mat-stepper",6,0),y("selectionChange",function(_e){return g(fe),h(l.onStepperChange(_e))}),o(12,"mat-step",7),c(13,Te,3,0,"ng-template",8)(14,Ue,16,0,"ng-template",9),r(),o(15,"mat-step",10),c(16,Ne,3,0,"ng-template",8)(17,Me,2,2,"ng-template",9),r(),o(18,"mat-step",11),c(19,ke,3,0,"ng-template",8)(20,Oe,2,2,"ng-template",9),r(),c(21,Be,2,0,"ng-template",12)(22,Le,2,0,"ng-template",13)(23,Fe,2,0,"ng-template",14),r()()()()()()}i&2&&(s("hideSearchBox",!0)("hideSearchDropdown",!0),p(2),s("ngIf",l.stepperState=="FINISH"),p(),s("ngIf",l.stepperState=="DOWNLOAD"),p(),s("ngIf",l.stepperState=="GUIDE"),p(),s("ngIf",l.stepperState=="DOWNLOAD"),p(5),s("selectedIndex",1),p(2),s("editable",l.stepperState!="FINISH")("completed",!0),p(3),s("editable",l.stepperState!="FINISH")("completed",!1))},dependencies:[V,G,z,K,ee,le,oe,pe,re,ae,de],styles:[`@import"https://fonts.googleapis.com/icon?family=Material+Icons";.card-header{background-color:#00000008}mat-stepper.stepper-downloadByUrl>div.mat-horizontal-stepper-wrapper>div.mat-horizontal-stepper-header-container{position:relative;width:60%;left:18%}
5
- `],encapsulation:2});let e=t;return e})();var Re=[{path:"",component:ce,children:[{path:"by-url",component:ue,data:{title:"Download Product By Url"},canActivate:[X]},{pathMatch:"full",path:"",redirectTo:"by-url"}]}],dt=(()=>{let t=class t{};t.\u0275fac=function(i){return new(i||t)},t.\u0275mod=k({type:t}),t.\u0275inj=T({providers:[E],imports:[H,q,Z,te,se,ie,$.forChild(Re)]});let e=t;return e})();export{dt as DownloadModule};
@@ -1 +0,0 @@
1
- import{a as Le}from"./chunk-AXC6LM6T.js";import{c as Fe,d as De,e as Me}from"./chunk-7U32FNM2.js";import{a as be}from"./chunk-IO2TWJDO.js";import"./chunk-55BTWXFX.js";import"./chunk-FULVA6QB.js";import"./chunk-PZB3GQWT.js";import"./chunk-B4QCGMST.js";import{a as N}from"./chunk-ISMIPSYN.js";import{a as Ne,b as ke,c as Re,d as W,e as U}from"./chunk-IZZQQW5G.js";import{a as Te,b as Ee}from"./chunk-MQXW3UAW.js";import"./chunk-63I3I3MX.js";import{a as Ie}from"./chunk-3LU2SFN4.js";import"./chunk-GV3NEJJ6.js";import"./chunk-OPXITNRF.js";import"./chunk-HPINZVE4.js";import"./chunk-D2J64VUP.js";import"./chunk-6Q6L5NUD.js";import"./chunk-ONU4O7N2.js";import"./chunk-3RK6DDJD.js";import"./chunk-5YBWBAQS.js";import"./chunk-37NOSLQL.js";import{a as _e}from"./chunk-ZSUWHVKX.js";import"./chunk-N5AE5WMQ.js";import{a as ve}from"./chunk-J2BPOHP6.js";import"./chunk-34UF36YY.js";import{d as xe,e as fe}from"./chunk-6KWG6O5L.js";import{a as Ve}from"./chunk-AL5RTE5M.js";import"./chunk-3JRUKSV3.js";import"./chunk-SJ5MC42H.js";import"./chunk-4RLWHMI6.js";import"./chunk-NWB7EVME.js";import"./chunk-AFDI4TD4.js";import"./chunk-4RG5YR7N.js";import"./chunk-5MV3UFJQ.js";import"./chunk-E6AMKEQR.js";import"./chunk-IGKMJFKP.js";import"./chunk-ITGVXYDV.js";import"./chunk-HK5FXZE4.js";import"./chunk-KJE5GRQ4.js";import"./chunk-4ILDFTIG.js";import"./chunk-A6QXXKPR.js";import{i as ue}from"./chunk-5O33CV4F.js";import"./chunk-QXRG5XYP.js";import"./chunk-RXLMJGUY.js";import"./chunk-M4ZE35XK.js";import"./chunk-L7WZ6U4T.js";import"./chunk-LOWGZOML.js";import"./chunk-5PMKN6PM.js";import"./chunk-YJTPDV4D.js";import{b as de,e as he}from"./chunk-OXWPYJNB.js";import"./chunk-XBIHN6D3.js";import{c as me}from"./chunk-BLHKSSK6.js";import{d as Se,l as Pe,m as ye,n as we}from"./chunk-UI5ITL7Z.js";import{A as pe,b as ae,c as re,h as le,m as ce,o as se}from"./chunk-L3W6SG2T.js";import"./chunk-YTHY4IFS.js";import{b as ge,c as Ce}from"./chunk-ZETUYNFJ.js";import"./chunk-SILAIDPV.js";import"./chunk-3I2V337G.js";import{c as ee,f as te,i as ne,l as M,m as ie,p as oe}from"./chunk-LNJUGHOX.js";import{$b as w,$c as E,G as $,Gb as G,Ha as H,Hc as J,Mb as y,Mc as d,Nc as O,Oc as T,Qc as f,Rc as S,Sc as P,Wc as Z,Z as j,Zc as Q,bc as I,cc as R,ea as z,ec as L,fc as B,gc as m,hc as a,hd as b,ic as l,id as V,jc as F,jd as X,kd as Y,lb as D,nb as c,nc as K,oc as q,qc as x,ra as k,vc as C,xa as p,xc as r,ya as _,zb as u}from"./chunk-ZYJ6LAJ3.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";var A=i=>[i],Ae=i=>({"text-decoration-line-through":i}),$e=i=>({"bg-gradient-warning":i});function je(i,s){if(i&1){let n=x();a(0,"button",16),C("click",function(){p(n);let t=r().ngIf,o=r(2);return _(o.updateStock(t))}),F(1,"i",17),d(2," Update "),l()}}function ze(i,s){if(i&1){let n=x();a(0,"actions")(1,"div",12),y(2,je,3,0,"button",13),a(3,"button",14),C("click",function(){p(n);let t=r(2);return _(t.openExportDialog())}),F(4,"i",15),a(5,"span"),d(6,"Export"),l()()()()}if(i&2){let n=s.ngIf,e=r(2);c(2),m("ngIf",e.productService.hasSelectionVariant(n))}}function He(i,s){if(i&1){let n=x();a(0,"th")(1,"input",32),C("change",function(t){p(n);let o=r().ngIf,h=r(2);return _(h.onSelectAllSKU(t.target.checked,o))}),l()()}}function Ge(i,s){if(i&1){let n=x();a(0,"input",49),P("ngModelChange",function(t){p(n);let o=r(4).$implicit;return S(o.selected,t)||(o.selected=t),_(t)}),C("ngModelChange",function(){p(n);let t=r(4).$implicit,o=r(3);return _(o.onCheckboxStateProduct(t))}),l()}if(i&2){let n=r(4).$implicit;f("ngModel",n.selected)}}function Ke(i,s){if(i&1&&y(0,Ge,1,1,"ng-template",26),i&2){let n=r(6);m("ngxPermissionsOnly",E(1,A,n.rolePriceEdit))}}function qe(i,s){if(i&1){let n=x();K(0),a(1,"img",50),C("click",function(t){p(n);let o=r(3).$implicit,h=r(3);return _(h.onZoomImage(t,o==null?null:o.ImageUrl))}),l(),q()}if(i&2){let n=r(3).$implicit;c(),m("src",Z(n.ThumbnailUrl),D)}}function Je(i,s){i&1&&F(0,"img",51)}function Ze(i,s){if(i&1&&(a(0,"small",48),d(1),l()),i&2){let n=r(3).$implicit;c(),T("(",n.Category,")")}}function Qe(i,s){if(i&1&&(a(0,"td",44)(1,"div",35),w(2,Ke,1,3,null,26),a(3,"div"),y(4,qe,2,2,"ng-container",45)(5,Je,1,0,"ng-template",null,0,Y),l()()(),a(7,"td",46)(8,"span",47),d(9),l(),w(10,Ze,2,1,"small",48),l()),i&2){let n=J(6),e=r(2).$implicit;m("rowSpan",e.Variants.length),c(2),I((e.Variants==null?null:e.Variants.length)>1?2:-1),c(2),m("ngIf",e.ThumbnailUrl)("ngIfElse",n),c(3),m("rowSpan",e.Variants.length),c(2),O(e.Name),c(),I(e.Category?10:-1)}}function Xe(i,s){if(i&1){let n=x();a(0,"input",54),P("ngModelChange",function(t){p(n);let o=r(2).$implicit;return S(o.selected,t)||(o.selected=t),_(t)}),l()}if(i&2){let n=r(2).$implicit;f("ngModel",n.selected)}}function Ye(i,s){if(i&1&&(a(0,"td",52),w(1,Xe,1,1,"input",53),l()),i&2){let n=r().$implicit;c(),I(n.UnitPrice>=0?1:-1)}}function et(i,s){i&1&&(a(0,"div",36),d(1," Not Found "),l())}function tt(i,s){if(i&1&&(a(0,"div"),d(1),b(2,"number"),l()),i&2){let n=r().$implicit;c(),T(" ",V(2,1,n.UnitPrice)," ")}}function nt(i,s){if(i&1&&(a(0,"div",37)(1,"a",40),F(2,"i",55),l()()),i&2){let n=r().$implicit,e=r(4);c(),m("href",e.hostName+"/menu/Products/Catalog/Variants/Info?ID="+(n==null?null:n.ID),D)}}function it(i,s){if(i&1){let n=x();a(0,"div",56),C("click",function(){p(n);let t=r().$implicit,o=r().$implicit,h=r(2).ngIf,g=r();return _(g.openTableDialog(t,o,h))}),d(1),b(2,"number"),l()}if(i&2){let n=r().$implicit;c(),T(" ",V(2,1,n.Channel[0]==null?null:n.Channel[0].Price)," ")}}function ot(i,s){if(i&1){let n=x();a(0,"tr",33),w(1,Qe,11,7),a(2,"td",24),d(3),l(),a(4,"td",27)(5,"span",34),d(6),l()(),y(7,Ye,2,1,"ng-template",26),a(8,"td",27)(9,"div",35),w(10,et,2,0,"div",36),w(11,tt,3,3,"div"),w(12,nt,3,1,"div",37),l()(),a(13,"td",38)(14,"div",35),w(15,it,3,3,"div",39),a(16,"div",37)(17,"a",40),F(18,"i",41),l()(),a(19,"div",37)(20,"div",42),C("click",function(){let t=p(n).$implicit,o=r(4);return _(o.refreshPrice(t))}),F(21,"i",43),l()()()()()}if(i&2){let n=s.$implicit,e=s.$index,t=r(4);c(),I(e==0?1:-1),c(2),O(n.Model),c(2),m("matTooltip",n.Discontinued?t.discontinuedVariantMsg:"")("ngClass",E(12,Ae,n.Discontinued)),c(),T(" ",n.Code," "),c(),m("ngxPermissionsOnly",E(14,A,t.rolePriceEdit)),c(3),I((n.Channel[0]==null?null:n.Channel[0].Description)!=null?10:-1),c(),I((n.Channel[0]==null?null:n.Channel[0].Description)==null?11:-1),c(),I((n.Channel[0]==null?null:n.Channel[0].Description)==null?12:-1),c(),m("ngClass",E(16,$e,n.UnitPrice!=(n.Channel[0]==null?null:n.Channel[0].Price))),c(2),I(n.Channel.length>0?15:-1),c(2),m("href",n.Channel[0]==null?null:n.Channel[0].Url,D)}}function at(i,s){if(i&1&&L(0,ot,22,18,"tr",33,R),i&2){let n=s.$implicit;B(n.Variants)}}function rt(i,s){if(i&1){let n=x();a(0,"content")(1,"div",18)(2,"div",19)(3,"table",20)(4,"thead",21)(5,"tr")(6,"th",22),d(7," Product "),a(8,"div")(9,"mat-slide-toggle",23),P("ngModelChange",function(t){p(n);let o=r(2);return S(o.toggleDifferentInventory,t)||(o.toggleDifferentInventory=t),_(t)}),C("toggleChange",function(){p(n);let t=r(2);return _(t.onToggleDifferentInventory())}),a(10,"small",9),d(11,"FILTER DIFFERENT PRICE"),l()()()(),a(12,"th",24),d(13,"Variant"),l(),a(14,"th",25),d(15,"SKU"),l(),y(16,He,2,0,"ng-template",26),a(17,"th",27),d(18,"POS"),l(),a(19,"th",27)(20,"div",28),C("click",function(){p(n);let t=r(2);return _(t.openModalFilter())}),F(21,"img",29),a(22,"span",30),d(23),b(24,"stringLimit"),l()()()()(),a(25,"tbody"),L(26,at,2,0,null,null,R),l()(),a(28,"infinite-paginator",31),b(29,"async"),C("onNextPage",function(){p(n);let t=r(2);return _(t.infinitePagination.onNextPage(t.searchFilter))})("onLastPage",function(){p(n);let t=r(2);return _(t.infinitePagination.onLastPage(t.searchFilter))})("onGetRowCount",function(){p(n);let t=r(2);return _(t.infinitePagination.getRowCount(t.searchFilter))}),l()()()()}if(i&2){let n=s.ngIf,e=r(2);c(9),f("ngModel",e.toggleDifferentInventory),c(7),m("ngxPermissionsOnly",E(16,A,e.rolePriceEdit)),c(4),m("matTooltip",(e.selectedChannel==null||e.selectedChannel.Name==null?null:e.selectedChannel.Name.length)>=20?e.selectedChannel==null?null:e.selectedChannel.Name:""),c(),m("src",e.selectedChannel==null?null:e.selectedChannel.Img,D),c(2),T(" ",X(24,11,e.selectedChannel==null?null:e.selectedChannel.Name,20)," "),c(3),B(n),c(2),m("totalData",e.infinitePagination.totalData())("hideCount",e.infinitePagination.hideCount())("rowCount",V(29,14,e.infinitePagination.totalRowCount$))("pageNumber",e.infinitePagination.pageNumber())("disableNextButton",e.infinitePagination.disableNextButton())("goToLastPage",e.infinitePagination.isLastPage())}}function lt(i,s){if(i&1){let n=x();a(0,"mainpanel",2),P("textChange",function(t){p(n);let o=r();return S(o.searchFilter.text,t)||(o.searchFilter.text=t),_(t)}),C("onSubmit",function(){p(n);let t=r();return _(t.onSearch())}),a(1,"filters")(2,"div",3)(3,"label",4),d(4,"Channel"),l(),a(5,"app-channel-options-v2",5),P("ngModelChange",function(t){p(n);let o=r();return S(o.searchFilter.ChannelID,t)||(o.searchFilter.ChannelID=t),_(t)}),l()(),a(6,"div",3)(7,"label",4),d(8,"Number Filter Comparator"),l(),a(9,"ng-select",6),P("ngModelChange",function(t){p(n);let o=r();return S(o.searchFilter.NumberFilterComparator,t)||(o.searchFilter.NumberFilterComparator=t),_(t)}),l()(),a(10,"div",3)(11,"label",4),d(12,"Search Type"),l(),a(13,"div",7)(14,"radio-options",8),P("ngModelChange",function(t){p(n);let o=r();return S(o.searchFilter.SearchType,t)||(o.searchFilter.SearchType=t),_(t)}),l()()(),a(15,"div",3)(16,"label",9),d(17,"Page Number"),l(),a(18,"input",10),P("ngModelChange",function(t){p(n);let o=r();return S(o.searchFilter.PageNumber,t)||(o.searchFilter.PageNumber=t),_(t)}),l()(),a(19,"div")(20,"label",9),d(21,"Page Size"),l(),a(22,"input",10),P("ngModelChange",function(t){p(n);let o=r();return S(o.searchFilter.RowCount,t)||(o.searchFilter.RowCount=t),_(t)}),l()()(),y(23,ze,7,1,"actions",11),b(24,"async"),y(25,rt,30,18,"content",11),b(26,"async"),l()}if(i&2){let n=s.ngIf,e=r();m("headerTitle",e.pageTitle),f("text",e.searchFilter.text),m("searchBoxPlaceHolder",e.searchPlaceholder()),c(5),f("ngModel",e.searchFilter.ChannelID),c(4),m("items",n==null||n.Options==null?null:n.Options.SearchComparatorTypeOptions),f("ngModel",e.searchFilter.NumberFilterComparator),c(5),m("options",n==null||n.Options==null?null:n.Options.SearchSKUOnlyOrSKUNameOptions),f("ngModel",e.searchFilter.SearchType),c(4),f("ngModel",e.searchFilter.PageNumber),c(4),f("ngModel",e.searchFilter.RowCount),c(),m("ngIf",V(24,12,e.data$)),c(2),m("ngIf",V(26,14,e.data$))}}var Kt=(()=>{let s=class s{constructor(e,t,o,h,g,v,Be,Oe,We,Ue){this.http=e,this.toastr=t,this.dialog=o,this.productService=h,this.biggerPictureService=g,this.authService=v,this.mainPanelService=Be,this.exportService=Oe,this.decimalPipe=We,this.placeholderService=Ue,this.infinitePagination=k(W),this.updateResHandling=k(U),this.pageTitle="Price Single Channel Comparison",this.toggleDifferentInventory=!1,this.loaderEndpoint="PriceLoader/Load",this.dataEndpoint="Price/GetSingleChannelComparison",this.rowCountApi="Inventory/GetInventoryByChannelRowCount",this.rolePriceEdit=_e.PriceUpdate,this.discontinuedVariantMsg="This Variant is discontinued from POS, you must Non Active manually at the seller center so that it is not sold again on the channel.",this.searchPlaceholder=H("Search ..."),this.hostName=this.authService.getDomain(),this.data$=this.infinitePagination.data$.pipe(j(1)),this.channelOptions=v.getChannels()}ngOnInit(){this.initPageLoader()}initPageLoader(){this.infinitePagination.fetchDataEndpoint=this.dataEndpoint,this.infinitePagination.fethRowCountEndpoint=this.rowCountApi,this.loader$=this.http.post(`/API/${this.loaderEndpoint}`).pipe(z(e=>{this.searchFilter=e.Filter,this.searchFilter.filterModel=N.ALL,this.initSearchPlaceholder(),this.infinitePagination.reloadPagination(this.searchFilter),this.initSelectedChannel()}))}initSearchPlaceholder(){this.searchPlaceholder.set(this.placeholderService.generatePlaceholderBySearchType(this.searchFilter.SearchType,this.searchFilter.NumberFilterComparator))}onToggleDifferentInventory(){this.toggleDifferentInventory?this.searchFilter.filterModel=N.ALL:this.searchFilter.filterModel=N.DIFFERENCE,this.onSearch()}onCheckboxStateProduct(e){e.Variants=e.Variants.map(t=>(t.selected=e.selected,t))}openModalFilter(){this.mainPanelService.openModalFilter()}updateStock(e){let o=this.productService.selectedVariantProduct(e).map(g=>({ID:g.ID,ChannelID:g.Channel[0].ChannelID,Code:g.Code,Price:g.UnitPrice})),h={ListChannelID:[this.searchFilter.ChannelID],ListPrice:o};this.http.post("/api/Price/UpdateChannel",h).subscribe(g=>{this.onSearch(),this.handlingUpdateStock(g.Response)})}handlingUpdateStock(e){if(e.success_list?.length>0||e.failure_list?.length>0){let t=e.failure_list,o=e.success_list;this.updateResHandling.responseHandling(o,t,"Price")}else this.toastr.error(e[0]?.Exception,"Error")}refreshPrice(e){let t={ChannelItemID:e?.Channel[0].ChannelItemID,ChannelVariationID:e?.Channel[0]?.ChannelVariationID,ChannelID:e?.Channel[0]?.ChannelID,VariantID:e.ID};this.http.post("/api/Price/RefreshPriceChannel",t).subscribe(o=>{this.toastr.success("Successfully updated","Success"),this.onSearch()})}onSearch(){this.infinitePagination.reloadPagination(this.searchFilter),this.initSelectedChannel(),this.initSearchPlaceholder()}openTableDialog(e,t,o){let h=JSON.parse(JSON.stringify(e));this.dialog.open(Ne,{data:{Name:t.Name,Variant:h,ChannelID:h?.Channel[0]?.ChannelID,Table:"price",ChannelItemID:h?.Channel[0]?.ChannelItemID}}).afterClosed().pipe($(v=>me.IsNotEmpty(v))).subscribe(v=>{this.updateItemAfterDialog(v,e)})}updateItemAfterDialog(e,t){let o={ID:e.ChannelID,ChannelItemID:e.ChannelItemID,ChannelVariantID:e.ChannelVariationID,Price:parseFloat(e.Price),VariantID:e.ID,SKU:e.Sku};this.http.post("/api/Price/UpdatePriceByID",o).subscribe(h=>{let g=this.productService.findChannelById(o.ID,this.channelOptions),v=o.Price?this.decimalPipe.transform(o.Price):o.Price;this.toastr.success(`Successfully updated ${e.ItemName} (${e.VarName}) price in ${g.Name} to ${v}`,"Success"),t.Channel[0]&&(t.Channel[0].Price=o.Price),this.infinitePagination.reloadPagination(this.searchFilter)})}initSelectedChannel(){this.selectedChannel=this.channelOptions.find(e=>e.ID==this.searchFilter.ChannelID)}onSelectAllSKU(e,t){t=t.map(o=>(o.Variants=o.Variants.map(h=>(h.selected=e,h)),o))}onZoomImage(e,t){this.biggerPictureService.openBiggerPicture(e,t)}openExportDialog(){this.dialog.open(Me,{data:{title:"Export Price Single Channel Comparison",pageNumber:this.searchFilter.PageNumber,rowCount:this.searchFilter.RowCount,filterExport:this.searchFilter,getRowCountApi:this.rowCountApi,exportApi:"price/GetExportSingleChannelComparison"}}).afterClosed().subscribe()}};s.\u0275fac=function(t){return new(t||s)(u(he),u(de),u(Se),u(Ie),u(ve),u(ue),u(Pe),u(De),u(M),u(Fe))},s.\u0275cmp=G({type:s,selectors:[["app-price-single-channel"]],features:[Q([W,Le,oe("https://resc.cloudinary.com/"),M,U])],decls:2,vars:3,consts:[["elsePic",""],["class","single-price",3,"headerTitle","text","searchBoxPlaceHolder","textChange","onSubmit",4,"ngIf"],[1,"single-price",3,"textChange","onSubmit","headerTitle","text","searchBoxPlaceHolder"],[1,"mb-5"],[1,"fw-bold","mb-2"],[3,"ngModelChange","ngModel"],["bindLabel","Value","bindValue","Key","placeholder","Number Filter Comparator","name","numberFilterComparator","appendTo","body",3,"ngModelChange","items","ngModel"],[1,"border","border-1","rounded-1","p-4"],[3,"ngModelChange","options","ngModel"],[1,"fw-bold"],["type","number",1,"form-control","mt-2",3,"ngModelChange","ngModel"],[4,"ngIf"],[1,"d-flex"],["class","btn btn-success",3,"click",4,"ngIf"],[1,"btn","btn-outline-secondary","shadow","rounded","ms-2",3,"click"],[1,"fa-solid","fa-print","me-3"],[1,"btn","btn-success",3,"click"],[1,"fas","fa-chevron-circle-up"],[1,"container-fluid","mt-5"],[1,"table-responsive"],[1,"table"],[1,"thead-light","sticky-top-thead"],["colspan","2",1,"text-center","ps-12",2,"width","36%"],["name","differentInventory",3,"ngModelChange","toggleChange","ngModel"],[1,"text-start"],[1,"text-end",2,"width","20%"],[3,"ngxPermissionsOnly"],[1,"text-end"],["role","button","matTooltipPosition","above",1,"d-inline-block",3,"click","matTooltip"],[2,"width","16px",3,"src"],[1,"ms-1"],[3,"onNextPage","onLastPage","onGetRowCount","totalData","hideCount","rowCount","pageNumber","disableNextButton","goToLastPage"],["type","checkbox",1,"me-3",3,"change"],[1,"w-100"],["matTooltipPosition","above",3,"matTooltip","ngClass"],[1,"d-flex","align-items-center","justify-content-end"],["matTooltip","This product is no longer available in POS","matTooltipPosition","above",1,"text-danger"],[1,"ms-3"],[1,"text-end",3,"ngClass"],[2,"cursor","pointer"],["target","_blank",3,"href"],[1,"fas","external-link-custom","fa-solid","fa-arrow-up-right-from-square"],["matTooltip","Refresh Unit Price according to seller center",1,"pl-5","cursor-pointer",2,"color","var(--bs-link-color)",3,"click"],[1,"fas","external-link-custom","fa-sync","fa-lg"],[1,"text-start",2,"width","0%",3,"rowSpan"],[4,"ngIf","ngIfElse"],[1,"text-start",3,"rowSpan"],[1,"item-name","mb-0"],[1,"d-block"],["type","checkbox",1,"me-3",3,"ngModelChange","ngModel"],["loading","lazy",1,"border","rounded","w-img","cursor-pointer",2,"margin-left","8px",3,"click","src"],["src","//res.cloudinary.com/pos/image/upload/w_40/POS/Images/Icon/products_thumb.png","loading","lazy",1,"border","rounded","w-img",2,"margin-left","8px"],[1,"align-middle"],["type","checkbox",3,"ngModel"],["type","checkbox",3,"ngModelChange","ngModel"],[1,"fa-solid","fa-arrow-up-right-from-square","external-link-custom"],[2,"cursor","pointer",3,"click"]],template:function(t,o){t&1&&(y(0,lt,27,16,"mainpanel",1),b(1,"async")),t&2&&m("ngIf",V(1,1,o.loader$))},dependencies:[ie,ee,te,we,ye,pe,re,se,ae,le,ce,Re,Ce,ge,Ee,Te,Ve,be,fe,xe,ne,M,ke],styles:[".w-img[_ngcontent-%COMP%]{width:40px;height:40px}input[type=checkbox][_ngcontent-%COMP%]{width:15px;height:15px}i.fas.custom-size[_ngcontent-%COMP%]{font-size:13px}.item-name[_ngcontent-%COMP%]{font-size:larger}"],changeDetection:0});let i=s;return i})();export{Kt as PriceSingleChannelComponent};
@@ -1 +0,0 @@
1
- import{a as k}from"./chunk-ZSUWHVKX.js";import{a as q}from"./chunk-J2BPOHP6.js";import{c as L}from"./chunk-BLHKSSK6.js";import{A as j}from"./chunk-L3W6SG2T.js";import{b as $,c as A}from"./chunk-ZETUYNFJ.js";import{v as H,w as W}from"./chunk-SILAIDPV.js";import{c as M,e as z,f as N,m as Z}from"./chunk-LNJUGHOX.js";import{$b as v,$c as w,Gb as V,Hc as y,Mb as s,Mc as C,Nc as D,Oc as B,Wc as R,ad as U,bc as P,cd as F,gc as _,hc as c,ic as l,jc as p,kd as T,lb as E,nb as i,nc as m,oc as u,qc as f,sb as S,vc as h,xa as g,xc as a,ya as x,zb as O}from"./chunk-ZYJ6LAJ3.js";var J=(t,e,n,r)=>[t,e,n,r],b=t=>[t],K=(t,e)=>[t,e],G=t=>({"me-3":t}),Q=t=>({"border-bottom pb-2":t});function X(t,e){if(t&1){let n=f();m(0),c(1,"img",19),h("click",function(o){g(n);let d=a();return x(d.openBiggerPicture(o))}),l(),u()}if(t&2){let n=a();i(),_("src",n.image,E)}}function Y(t,e){t&1&&p(0,"img",20)}function tt(t,e){if(t&1&&(m(0),c(1,"span",24)(2,"a",25),p(3,"i",26),l()(),u()),t&2){let n=a(2);i(2),_("href",n.redirectUrl,E)}}function nt(t,e){if(t&1&&(c(0,"div",21),p(1,"i",22),c(2,"span"),C(3),l(),s(4,tt,4,1,"ng-container",23),l()),t&2){let n=a();i(3),D(n.code),i(),_("ngIf",n.code!=="SKU not assigned"&&n.showRedirectIcon)}}function et(t,e){if(t&1){let n=f();c(0,"div",27),h("click",function(){g(n);let o=a();return x(o.onEventDesc())}),p(1,"i",28),c(2,"span"),C(3),l()()}if(t&2){let n=a();i(3),D(n.description)}}function it(t,e){if(t&1){let n=f();c(0,"div",30)(1,"input",31),h("change",function(o){g(n);let d=a(2);return x(d.onCheck(o.target.checked))}),l()()}}function ot(t,e){if(t&1&&(m(0),s(1,it,2,0,"div",29),u()),t&2){let n=a();i(),_("ngIf",n.showCheckBox)}}function at(t,e){if(t&1){let n=f();c(0,"button",34),h("click",function(){g(n);let o=a(3);return x(o.onDownload())}),p(1,"i",35),C(2,"Download "),l()}}function rt(t,e){if(t&1&&(m(0),s(1,at,3,0,"button",33),u()),t&2){let n=a(2);i(),_("ngIf",n.downloadButton)}}function ct(t,e){}function lt(t,e){if(t&1){let n=f();c(0,"li")(1,"a",42),h("click",function(){g(n);let o=a(6);return x(o.onScan())}),p(2,"i",43),C(3,"Scan "),l()()}}function _t(t,e){if(t&1&&(m(0),v(1,lt,4,0,"li"),u()),t&2){let n=a(5);i(),P(n.scanButton?1:-1)}}function dt(t,e){if(t&1){let n=f();c(0,"li")(1,"a",44),h("click",function(){g(n);let o=a(6);return x(o.onDetach())}),p(2,"i",45),C(3,"Detach "),l()()}}function st(t,e){if(t&1&&(m(0),v(1,dt,4,0,"li"),u()),t&2){let n=a(5);i(),P(n.detachButton?1:-1)}}function pt(t,e){if(t&1&&(m(0),c(1,"div",39),p(2,"button",40),c(3,"ul",41),s(4,_t,2,1,"ng-container",17)(5,st,2,1,"ng-container",17),l()(),u()),t&2){let n=a(4);i(4),_("ngxPermissionsOnly",w(2,b,n.productScanRole)),i(),_("ngxPermissionsOnly",w(4,b,n.productDetachRole))}}function mt(t,e){if(t&1){let n=f();c(0,"button",37),h("click",function(){g(n);let o=a(3);return x(o.onUpload())}),p(1,"i",38),C(2,"Upload "),l(),s(3,pt,6,6,"ng-container",17)}if(t&2){let n=a(3);i(3),_("ngxPermissionsOnly",U(1,K,n.productScanRole,n.productDetachRole))}}function ut(t,e){if(t&1){let n=f();c(0,"button",34),h("click",function(){g(n);let o=a(5);return x(o.onScan())}),p(1,"i",47),C(2," Scan "),l()}}function Ct(t,e){if(t&1&&(m(0),v(1,ut,3,0,"button",46),u()),t&2){let n=a(4);i(),P(n.scanButton?1:-1)}}function gt(t,e){if(t&1){let n=f();c(0,"button",49),h("click",function(){g(n);let o=a(5);return x(o.onDetach())}),p(1,"i",45),C(2,"Detach "),l()}}function xt(t,e){if(t&1&&(m(0),v(1,gt,3,0,"button",48),u()),t&2){let n=a(4);i(),P(n.detachButton?1:-1)}}function ft(t,e){if(t&1&&s(0,Ct,2,1,"ng-container",17)(1,xt,2,1,"ng-container",17),t&2){let n=a(3);_("ngxPermissionsOnly",w(2,b,n.productScanRole)),i(),_("ngxPermissionsOnly",w(4,b,n.productDetachRole))}}function ht(t,e){if(t&1&&(c(0,"div",32),s(1,ct,0,0,"ng-template",36)(2,mt,4,4,"ng-template",null,1,T)(4,ft,2,6,"ng-template",null,2,T),l()),t&2){let n=y(3),r=y(5),o=a(2);i(),_("ngxPermissionsOnly",w(3,b,o.productUploadRole))("ngxPermissionsOnlyThen",n)("ngxPermissionsOnlyElse",r)}}function wt(t,e){if(t&1){let n=f();c(0,"button",34),h("click",function(){g(n);let o=a(4);return x(o.onScan())}),p(1,"i",47),C(2," Scan "),l()}}function vt(t,e){if(t&1&&(m(0),v(1,wt,3,0,"button",46),u()),t&2){let n=a(3);i(),P(n.scanButton?1:-1)}}function Pt(t,e){if(t&1){let n=f();c(0,"button",51),h("click",function(){g(n);let o=a(4);return x(o.onDetach())}),p(1,"i",45),C(2,"Detach "),l()}}function bt(t,e){if(t&1&&(m(0),v(1,Pt,3,0,"button",50),u()),t&2){let n=a(3);i(),P(n.detachButton?1:-1)}}function Et(t,e){if(t&1&&s(0,vt,2,1,"ng-container",17)(1,bt,2,1,"ng-container",17),t&2){let n=a(2);_("ngxPermissionsOnly",w(2,b,n.productScanRole)),i(),_("ngxPermissionsOnly",w(4,b,n.productDetachRole))}}function St(t,e){if(t&1&&(m(0),c(1,"a",53),p(2,"img",54),l(),u()),t&2){let n=e.$implicit,r=e.index,o=a(4);i(),_("href",R(n.Url),E),i(),_("ngClass",w(5,G,r!=o.channels.length-1))("src",o.getChannelLogo(n),E)("matTooltip",n.Title?n.Title:n.Name)}}function yt(t,e){if(t&1&&(m(0),s(1,St,3,7,"ng-container",52),u()),t&2){let n=a(3);i(),_("ngForOf",n.channels)}}function Tt(t,e){if(t&1&&(c(0,"li")(1,"div",58)(2,"div",59)(3,"a",53),p(4,"img",60),c(5,"span",61),C(6),l()()()()()),t&2){let n=e.$implicit,r=e.index,o=a(4);i(2),_("ngClass",w(4,Q,r!=o.channels.length-1)),i(),_("href",n.Url,E),i(),_("src",o.getChannelLogo(n),E),i(2),D(n.Title)}}function kt(t,e){if(t&1&&(c(0,"div",55)(1,"button",56),C(2),l(),c(3,"ul",57),s(4,Tt,7,6,"li",52),l()()),t&2){let n=a(3);i(2),B(" ",n.channels.length," CHANNELS "),i(2),_("ngForOf",n.channels)}}function Dt(t,e){if(t&1&&(c(0,"div"),s(1,yt,2,1,"ng-container",10)(2,kt,5,2,"ng-template",null,3,T),l()),t&2){let n=y(3),r=a(2);i(),_("ngIf",r.channels.length<4)("ngIfElse",n)}}function It(t,e){if(t&1&&(c(0,"div",18)(1,"div"),s(2,rt,2,1,"ng-container",17),v(3,ht,6,5,"div",32)(4,Et,2,6),l(),v(5,Dt,4,2,"div"),l()),t&2){let n=a();i(2),_("ngxPermissionsOnly",w(3,b,n.productDownloadRole)),i(),P(n.uploadButton?3:4),i(2),P(n.channels&&(n.channels==null?null:n.channels.length)>0?5:-1)}}var qt=(()=>{let e=class e{constructor(r){this.biggerPictureService=r,this.uploadButton=!1,this.scanButton=!1,this.showCheckBox=!1,this.downloadButton=!1,this.showFooter=!0,this.detachButton=!1,this.hasZoom=!0,this.showRedirectIcon=!0,this.productUploadRole=k.ProductUpload,this.productScanRole=k.ProductScan,this.productDownloadRole=k.ProductDownload,this.productDetachRole=k.ProductDetach,this.onUploadEvent=new S,this.onScanEvent=new S,this.checkBoxChange=new S,this.onDescEvent=new S,this.onDownloadEvent=new S,this.onDetachEvent=new S}ngAfterContentInit(){this.initRedirectUrl()}initRedirectUrl(){let r=localStorage.getItem("Authorization"),o=JSON.parse(r)?.Host;this.redirectUrl=`https://${o}/menu/Products/Catalog/Products/Info?ID=${this.productId}`}onUpload(){this.onUploadEvent.emit()}onScan(){this.onScanEvent.emit()}onCheck(r){this.checkBoxChange.emit(r)}onEventDesc(){this.onDescEvent.emit()}onDownload(){this.onDownloadEvent.emit()}onDetach(){this.onDetachEvent.emit()}getChannelLogo(r){return L.getChannelLogoByTypeId(r.TypeID)}openBiggerPicture(r){this.biggerPictureService.openBiggerPicture(r,this.imageForZoom)}};e.\u0275fac=function(o){return new(o||e)(O(q))},e.\u0275cmp=V({type:e,selectors:[["app-product-card"]],inputs:{productId:"productId",uploadButton:"uploadButton",scanButton:"scanButton",showCheckBox:"showCheckBox",downloadButton:"downloadButton",showFooter:"showFooter",detachButton:"detachButton",image:"image",title:"title",code:"code",description:"description",channels:"channels",check:"check",imageForZoom:"imageForZoom",hasZoom:"hasZoom",showRedirectIcon:"showRedirectIcon"},outputs:{onUploadEvent:"onUpload",onScanEvent:"onScan",checkBoxChange:"onCheckBoxChange",onDescEvent:"onDescEvent",onDownloadEvent:"onDownload",onDetachEvent:"onDetach"},decls:18,vars:13,consts:[["elsePic",""],["thenBlock",""],["elseBlock",""],["DROPDOWN",""],[1,"card",2,"margin-bottom","0px"],[1,"card-body","py-6"],[1,"row"],[1,"col-4"],[1,"productUpload_defaultSize","me-2","image-upload"],[1,"imgContainer"],[4,"ngIf","ngIfElse"],[1,"col-7","d-inline-block","justify-content-between","gx-0",2,"padding-left","0px"],[1,"itemTitle","cursor-pointer",3,"click","matTooltip"],["class","description cursor-pointer",4,"ngIf"],["class","description cursor-pointer",3,"click",4,"ngIf"],[1,"col-1","gx-0","d-flex","justify-content-center"],[1,"text-end"],[4,"ngxPermissionsOnly"],[1,"card-footer","d-flex","justify-content-between","py-5","bg-footer","align-items-center",2,"border-top","0.1px solid rgb(220 220 220)"],[1,"rounded","imgUpload","float-left",3,"click","src"],["src","https://resc.cloudinary.com/pos/image/upload/w_110/POS/Images/Icon/products_thumb.png",1,"rounded","float-left","imgUpload"],[1,"description","cursor-pointer"],[1,"fa","fa-barcode","me-2"],[4,"ngIf"],[1,"ms-2"],["target","_blank",2,"color","#0976b4",3,"href"],[1,"fa-solid","fa-arrow-up-right-from-square","external-link-custom"],[1,"description","cursor-pointer",3,"click"],[1,"fa","fa-tag","me-2"],["class","text-end gx-0",4,"ngIf"],[1,"text-end","gx-0"],["type","checkbox",3,"change"],["role","group","aria-label","Scan button with other button",1,"btn-group","btn-sm"],["class","fs-6 btn btn-light btn-sm me-3",3,"click",4,"ngIf"],[1,"fs-6","btn","btn-light","btn-sm","me-3",3,"click"],["aria-hidden","true",1,"fa","fa-download","me-1"],[3,"ngxPermissionsOnly","ngxPermissionsOnlyThen","ngxPermissionsOnlyElse"],["type","button",1,"fs-6","btn","btn-light","btn-sm",3,"click"],["aria-hidden","true",1,"fa","fa-upload","me-1"],["role","group",1,"btn-group"],["type","button","data-bs-toggle","dropdown","aria-expanded","false",1,"fs-6","btn","btn-light","btn-sm","dropdown-toggle","ps-3"],[1,"dropdown-menu",2,"min-width","100px !important"],[1,"dropdown-item","cursor-pointer",3,"click"],[1,"fa","fa-spinner","me-2"],["matTooltip","Detaching a product with it's associated channel will stop inventory synchronization",1,"dropdown-item","cursor-pointer",3,"click"],[1,"fa-sharp","fa-link-slash","me-2"],[1,"fs-6","btn","btn-light","btn-sm","me-3"],[1,"fa","fa-spinner","me-1"],["matTooltip","Detaching a product with it's associated channel will stop inventory synchronization",1,"fs-6","btn","btn-light","btn-sm"],["matTooltip","Detaching a product with it's associated channel will stop inventory synchronization",1,"fs-6","btn","btn-light","btn-sm",3,"click"],[1,"fs-6","btn","btn-light","btn-sm"],[1,"fs-6","btn","btn-light","btn-sm",3,"click"],[4,"ngFor","ngForOf"],["target","_blank",3,"href"],["alt","",1,"img-logo",3,"ngClass","src","matTooltip"],[1,"dropdown"],["type","button","id","dropdownMenuButton1","data-bs-toggle","dropdown","aria-expanded","false",1,"btn","fs-6","btn-sm","btn-light","dropdown-toggle"],[1,"dropdown-menu"],[1,"dropdown-item","py-2",2,"cursor","pointer"],[3,"ngClass"],[1,"img-logo",3,"src"],[1,"ms-4"]],template:function(o,d){if(o&1){let I=f();c(0,"div",4)(1,"div",5)(2,"div",6)(3,"div",7)(4,"div",8)(5,"div",9),s(6,X,2,1,"ng-container",10)(7,Y,1,0,"ng-template",null,0,T),l()()(),c(9,"div",11)(10,"h4",12),h("click",function(){return g(I),x(d.onEventDesc())}),C(11),l(),s(12,nt,5,2,"div",13)(13,et,4,1,"div",14),l(),c(14,"div",15)(15,"div",16),s(16,ot,2,1,"ng-container",17),l()()()(),v(17,It,6,5,"div",18),l()}if(o&2){let I=y(8);i(6),_("ngIf",d.image)("ngIfElse",I),i(4),_("matTooltip",(d.title==null?null:d.title.length)>25?d.title:""),i(),B(" ",d.title," "),i(),_("ngIf",d.code),i(),_("ngIf",d.description),i(3),_("ngxPermissionsOnly",F(8,J,d.productDownloadRole,d.productScanRole,d.productUploadRole,d.productDetachRole)),i(),P(d.showFooter?17:-1)}},dependencies:[Z,M,z,N,j,W,H,A,$],styles:[".img-logo[_ngcontent-%COMP%]{height:24px;width:24px}.itemTitle[_ngcontent-%COMP%]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden;max-width:100%}.bg-footer[_ngcontent-%COMP%]{background-color:#ededed69}.description[_ngcontent-%COMP%]{font-weight:300;margin-left:2px}.productUpload_defaultSize[_ngcontent-%COMP%]{max-width:100px!important;max-height:100px!important;width:auto!important;height:auto!important}.image-upload[_ngcontent-%COMP%]{position:relative}.imgContainer[_ngcontent-%COMP%]{width:100%;height:100px}.imgUpload[_ngcontent-%COMP%]{width:100%;height:100%;object-fit:scale-down;cursor:pointer}.dropdown[_ngcontent-%COMP%] .dropdown-menu.show[_ngcontent-%COMP%]{top:unset!important}"]});let t=e;return t})();export{qt as a};
@@ -1 +0,0 @@
1
- import{b as k}from"./chunk-34UF36YY.js";import"./chunk-A6QXXKPR.js";import"./chunk-5O33CV4F.js";import"./chunk-QXRG5XYP.js";import"./chunk-RXLMJGUY.js";import"./chunk-YJTPDV4D.js";import"./chunk-OXWPYJNB.js";import"./chunk-XBIHN6D3.js";import"./chunk-BLHKSSK6.js";import{m as B,n as N}from"./chunk-UI5ITL7Z.js";import"./chunk-L3W6SG2T.js";import"./chunk-YTHY4IFS.js";import"./chunk-ZETUYNFJ.js";import"./chunk-SILAIDPV.js";import"./chunk-3I2V337G.js";import{D as T,G as R,I as w,f as b,i as y,j as C,l as M,m as P}from"./chunk-LNJUGHOX.js";import{Gb as E,Mb as f,Mc as i,Nc as l,Oc as _,aa as h,gc as p,hc as t,hd as v,ic as e,id as D,jd as g,nb as o,nc as u,oc as S,v as I,xc as x,zb as s}from"./chunk-ZYJ6LAJ3.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";function L(a,r){if(a&1&&(t(0,"div",10)(1,"div",13)(2,"div",7)(3,"h5"),i(4,"Perflog"),e()(),t(5,"div",8)(6,"div",14)(7,"div",15)(8,"pre"),i(9),e()()()()()()),a&2){let n=x().ngIf;o(9),l(n.Perflog)}}function A(a,r){if(a&1&&(u(0),t(1,"div",17)(2,"div",13)(3,"div",7)(4,"h5"),i(5,"StackTrace"),e()(),t(6,"div",8)(7,"div",14)(8,"div",15)(9,"pre"),i(10),e()()()()()(),S()),a&2){let n=x().ngIf;o(10),l(n==null?null:n.StackTrace)}}function H(a,r){if(a&1&&(u(0),t(1,"mainpanel",1)(2,"actions")(3,"a",2),i(4,"Back"),e()(),t(5,"content")(6,"div",3)(7,"div",4)(8,"div",5)(9,"div",6)(10,"div",7)(11,"h5"),i(12,"General"),e()(),t(13,"div",8)(14,"div",9)(15,"div",10)(16,"div",11)(17,"label"),i(18,"Created Date"),e(),t(19,"div")(20,"span"),i(21),v(22,"date"),e()()()(),t(23,"div",10)(24,"div",11)(25,"label"),i(26,"Status"),e(),t(27,"div")(28,"span"),i(29),e()()()()(),t(30,"div",12)(31,"div",10)(32,"div",11)(33,"label"),i(34,"Duration"),e(),t(35,"div")(36,"span"),i(37),v(38,"number"),e()()()(),t(39,"div",10)(40,"div",11)(41,"label"),i(42,"Label"),e(),t(43,"div")(44,"span"),i(45),e()()()()()()()()(),t(46,"div",4)(47,"div",10)(48,"div",13)(49,"div",7)(50,"h5"),i(51,"Message"),e()(),t(52,"div",8)(53,"div",14)(54,"div",15)(55,"pre"),i(56),e()()()()()(),f(57,L,10,1,"div",16)(58,A,11,1,"ng-container",0),e()()()(),S()),a&2){let n=r.ngIf;o(),p("headerTitle","Notification "+n.Name)("hideSearchBox",!0)("hideSearchDropdown",!0),o(20),l(g(22,10,n.Created,"dd MMM yyyy HH:mm:ss")),o(8),l(n.StatusLabel),o(8),_("",g(38,13,n.DurationInSecond,"1.1-1")," s"),o(8),l(n.Label),o(11),l(n.Message),o(),p("ngIf",n==null?null:n.Perflog),o(),p("ngIf",n==null?null:n.StackTrace)}}var Q=(()=>{let r=class r{constructor(c,d){this.activatedRoute=c,this.notificationService=d}ngOnInit(){this.notification$=this.activatedRoute.queryParams.pipe(h(c=>{let d=c.ID;return this.notificationService.getNotificationDetail(d).pipe(I(m=>(m.DurationInSecond=parseInt(m.Duration)/1e3,m)))}))}};r.\u0275fac=function(d){return new(d||r)(s(T),s(k))},r.\u0275cmp=E({type:r,selectors:[["app-detail"]],decls:2,vars:3,consts:[[4,"ngIf"],[3,"headerTitle","hideSearchBox","hideSearchDropdown"],["role","button","routerLink","/menu/products/status/notification",1,"btn","btn-secondary","btn-fill","btn-lg","me-3"],[1,"container-fluid","mt-8"],[1,"row"],[1,"col-12"],[1,"card","mb-8"],[1,"card-header"],[1,"card-body"],[1,"row","mt-6"],[1,"col-sm-6"],[1,"info-label-group"],[1,"row","mt-4"],[1,"card"],[1,"col-sm-12","mt-2"],[1,"form-group"],["class","col-sm-6",4,"ngIf"],[1,"col-sm-12"]],template:function(d,m){d&1&&(f(0,H,59,16,"ng-container",0),v(1,"async")),d&2&&p("ngIf",D(1,1,m.notification$))},dependencies:[P,b,N,B,w,R,y,M,C],encapsulation:2});let a=r;return a})();export{Q as DetailComponent};
@@ -1 +0,0 @@
1
- import{f as y}from"./chunk-5O33CV4F.js";import{c as a}from"./chunk-BLHKSSK6.js";import{G as k,I as _,m as C}from"./chunk-LNJUGHOX.js";import{$b as I,Gb as v,Mc as u,Oc as p,ad as D,bc as g,gc as s,hc as m,ic as c,lb as b,ma as h,nb as l,od as f,ra as i,td as x,xc as d}from"./chunk-ZYJ6LAJ3.js";var N=(()=>{let e=class e{constructor(){this.localDataService=i(y),this.baseUrl=this.localDataService.getHostName()}getBaseUrl(n){let r="";return a.IsNotEmpty(n.ID)?r=`https://${this.baseUrl}/menu/Orders/Orders/Customer_Invoice/Info?ID=${n.ID}`:r="/menu/Order/detail",r}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=h({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})();var L=(t,e)=>({Number:t,Outlet:e});function M(t,e){if(t&1&&(m(0,"a",0),u(1),c()),t&2){let o,n=d();s("href",n.baseUrl(),b),l(),p(" ",(o=n.order())==null?null:o.Number," ")}}function S(t,e){if(t&1&&(m(0,"a",1),u(1),c()),t&2){let o,n,r=d();s("routerLink",r.baseUrl())("queryParams",D(3,L,(o=r.order())==null?null:o.Number,(o=r.order())==null?null:o.Outlet)),l(),p(" ",(n=r.order())==null?null:n.Number," ")}}var A=(()=>{let e=class e{constructor(){this.order=x(),this.generateLinkService=i(N),this.baseUrl=f(()=>this.generateLinkService.getBaseUrl(this.order())),this.hasOrderID=f(()=>a.IsNotEmpty(this.order()?.ID))}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=v({type:e,selectors:[["order-link"]],inputs:{order:[1,"order"]},decls:2,vars:1,consts:[["target","_blank",3,"href"],["target","_blank",3,"routerLink","queryParams"]],template:function(r,O){r&1&&I(0,M,2,2,"a",0)(1,S,2,6,"a",1),r&2&&g(O.hasOrderID()?0:1)},dependencies:[C,_,k],encapsulation:2});let t=e;return t})();export{A as a};
@@ -1 +0,0 @@
1
- import{a as i}from"./chunk-6XT3JSG5.js";import{a as b}from"./chunk-IM5M2CAI.js";import{a as C,b as y}from"./chunk-PS43OK3J.js";import"./chunk-5O33CV4F.js";import"./chunk-QXRG5XYP.js";import"./chunk-RXLMJGUY.js";import"./chunk-YJTPDV4D.js";import"./chunk-OXWPYJNB.js";import"./chunk-XBIHN6D3.js";import"./chunk-BLHKSSK6.js";import"./chunk-YTHY4IFS.js";import"./chunk-ZETUYNFJ.js";import"./chunk-SILAIDPV.js";import"./chunk-3I2V337G.js";import{E as v,I as r,m as o}from"./chunk-LNJUGHOX.js";import{Gb as s,Hb as c,Zc as h,gc as u,hc as d,ic as f,jc as a,na as p,nb as l}from"./chunk-ZYJ6LAJ3.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";var T=(()=>{let e=class e{constructor(){this.inventoryTabs=[{Title:"Single Channel Comparison",Url:"/menu/inventory/bychannel"},{Title:"Multi Channel Comparison",Url:"/menu/inventory/pos"},{Title:"Different Inventory",Url:"/menu/inventory/channel_summary"}]}};e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=s({type:e,selectors:[["app-inventory"]],features:[h([b])],decls:5,vars:1,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid"],[3,"Tabs"]],template:function(n,M){n&1&&(d(0,"nav",0)(1,"div",1)(2,"div"),a(3,"nav-tab",2),f()()(),a(4,"router-outlet")),n&2&&(l(3),u("Tabs",M.inventoryTabs))},dependencies:[o,y,C,r,v],encapsulation:2});let t=e;return t})();var S=[{path:"",component:T,children:[{path:"",redirectTo:"bychannel",pathMatch:"full"},{path:"pos",loadComponent(){return import("./chunk-DLXWO2XC.js").then(t=>t.MultiChannelComparison)},canActivate:[i],data:{title:"Inventory Comparison"}},{path:"bychannel",loadComponent(){return import("./chunk-46IROEMV.js").then(t=>t.SingleChannelComparisonComponent)},canActivate:[i],data:{title:"Inventory Comparison"}},{path:"channel_summary",loadComponent(){return import("./chunk-PQEXTCFW.js").then(t=>t.ChannelSummaryComponent)},canActivate:[i],data:{title:"Different Inventory"}}]}],O=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=c({type:e}),e.\u0275inj=p({imports:[o,r.forChild(S)]});let t=e;return t})();export{O as InventoryRoutingModule};
@@ -1 +0,0 @@
1
- import{a as s}from"./chunk-BKR7YPEW.js";import{a as l}from"./chunk-YJTPDV4D.js";import{e as d}from"./chunk-OXWPYJNB.js";import{c}from"./chunk-BLHKSSK6.js";import{ma as p,ra as i,v as u}from"./chunk-ZYJ6LAJ3.js";var I=(()=>{let a=class a{constructor(){this.httpService=i(d)}getNotificationDetail(t){return this.httpService.post(l.GetJobScanDetail,{ID:t}).pipe(u(r=>{let e=r.Data;return e.DurationInSecond=e.Duration?e.Duration/1e3:0,e.ParsedStatus=e.StatusProduct?JSON.parse(e.StatusProduct):[],e.ParsedPerfLog=e.PerfLog?JSON.parse(e.PerfLog):[],e.ProcessLabel=this.generateLabel(e),e.ProcessDescription=this.generateDescription(e),e}))}getNotificationList(t){return this.httpService.post(l.GetJobScanList,t).pipe(u(r=>{let e=r.Data;return e=e.map(n=>(n.Img=c.getChannelLogoByTypeId(n.TypeID),n.DurationInSecond=n.Duration?n.Duration/1e3:0,n.ProcessLabel=this.generateLabel(n),n.ProcessDescription=this.generateDescription(n),n)),{Data:e,Count:r.Count}}))}generateLabel(t){let r=null;switch(t.ScanTypeID){case s.Active:r="Active";break;case s.Sellable:r="Sellable";break;case s.All:r="All";break}return`Asynchronous Scan - ${r}`}generateDescription(t){return`${t.OriginGetCount} found in ${t.ChannelName} ( ${t.SkuFoundCount} Sold In Channel + ${t.SkuNotFoundCount} Not In POS)`}createMessageCopyText(t){let r=[];return t.ParsedStatus&&t.ParsedStatus.forEach(e=>{r.push({[e.Key]:e.Value})}),r=[...r,{OriginalGetCount:t.OriginGetCount},{SkuFoundCount:t.SkuFoundCount},{SkuNotFoundCount:t.SkuNotFoundCount}],JSON.stringify(r)}};a.\u0275fac=function(r){return new(r||a)},a.\u0275prov=p({token:a,factory:a.\u0275fac});let o=a;return o})();var g=(function(o){return o[o.InProgress=0]="InProgress",o[o.Completed=1]="Completed",o[o.Failed=2]="Failed",o})(g||{});export{I as a,g as b};
@@ -1 +0,0 @@
1
- import{b as t,c as v}from"./chunk-BLHKSSK6.js";import{m as y}from"./chunk-LNJUGHOX.js";import{$b as r,Gb as d,Kc as u,Mc as N,Nc as w,ad as k,bc as p,kc as s,lb as l,lc as c,mc as g,nb as h,rc as C,td as m,xc as f}from"./chunk-ZYJ6LAJ3.js";var T=(n,e)=>({width:n,height:e});function x(n,e){if(n&1&&(s(0,"span",2),N(1),c()),n&2){let b=f();h(),w(b.channelName)}}var _=(()=>{let e=class e{set typeId(a){this.channelLogo=v.getChannelLogoByTypeId(a),this.initChannelName(a)}constructor(){this.showChannelName=m(!0),this.width=m(20),this.height=m(20)}initChannelName(a){switch(a){case t.Tokopedia:this.channelName="Tokopedia";break;case t.Tiktok:this.channelName="Tiktok";break;case t.WooCommerce:this.channelName="WooCommerce";break;case t.Shopee:this.channelName="Shopee";break;case t.Lazada:this.channelName="Lazada";break;case t.KalCare:this.channelName="Kalcare";break;case t.ShopifyV2:this.channelName="Shopify";break}}};e.\u0275fac=function(i){return new(i||e)},e.\u0275cmp=d({type:e,selectors:[["app-channel-logo"]],inputs:{showChannelName:[1,"showChannelName"],width:[1,"width"],height:[1,"height"],typeId:"typeId"},decls:3,vars:7,consts:[[1,"d-flex","align-items-center"],[1,"me-2",3,"src"],[1,"fw-normal"]],template:function(i,o){i&1&&(s(0,"div",0),g(1,"img",1),r(2,x,2,1,"span",2),c()),i&2&&(h(),u(k(4,T,o.width()+"px",o.height()+"px")),C("src",o.channelLogo,l),h(),p(o.showChannelName()?2:-1))},dependencies:[y],encapsulation:2});let n=e;return n})();export{_ as a};
@@ -1,5 +0,0 @@
1
- import{a as Mt}from"./chunk-63I3I3MX.js";import{b as wt}from"./chunk-GV3NEJJ6.js";import{a as Tt}from"./chunk-5YBWBAQS.js";import{a as dt}from"./chunk-ZSUWHVKX.js";import{b as ut,e as pt}from"./chunk-OXWPYJNB.js";import{b as gt}from"./chunk-BLHKSSK6.js";import{b as bt,c as xt,h as vt,j as Nt,k as Pt}from"./chunk-UI5ITL7Z.js";import{A as ct,c as st,h as lt,m as mt}from"./chunk-L3W6SG2T.js";import{a as ht,c as ft}from"./chunk-ZETUYNFJ.js";import{v as Ct,w as _t}from"./chunk-SILAIDPV.js";import{f as B,h as rt,l as O,m as R}from"./chunk-LNJUGHOX.js";import{$b as N,G as J,Gb as L,Ha as _,Hc as $,Jb as et,K as Y,Mb as b,Mc as d,Nc as M,Oc as G,Qc as nt,Rc as ot,Sc as at,X as q,Z as K,bc as P,ca as Q,ea as A,f as W,fa as X,g as z,gc as h,hc as l,hd as D,ic as m,id as y,jc as U,kd as H,ma as E,nb as s,nc as T,oc as w,od as I,pc as it,qa as Z,qc as f,ra as tt,sb as S,td as C,v,vc as x,xa as u,xc as c,ya as p,zb as V}from"./chunk-ZYJ6LAJ3.js";function Et(n,i){n&1&&it(0)}function St(n,i){if(n&1&&(T(0),b(1,Et,1,0,"ng-container",5),w()),n&2){c(2);let a=$(4);s(),h("ngTemplateOutlet",a)}}function Vt(n,i){if(n&1&&(l(0,"div",6)(1,"label"),d(2,"Editing Data"),m(),l(3,"div")(4,"span"),d(5),D(6,"number"),m()()()),n&2){let a=c(2);s(5),M(y(6,1,a.value))}}function Lt(n,i){if(n&1&&(T(0),b(1,St,2,1,"ng-container",4)(2,Vt,7,3,"ng-template",null,1,H),w()),n&2){let a=$(3),t=c();s(),h("ngIf",t.hasPriceEdit)("ngIfElse",a)}}function $t(n,i){if(n&1){let a=f();l(0,"div",7)(1,"input",8),at("ngModelChange",function(e){u(a);let o=c();return ot(o.value,e)||(o.value=e),p(e)}),m(),l(2,"label",9),d(3),m()()}if(n&2){let a=c();s(),nt("ngModel",a.value),h("max",a.maxEditInventory),s(2),M(a.item.Table)}}var ie=(()=>{let i=class i{constructor(t,e,o){this.dialogRef=t,this.item=e,this.permissionService=o,this.maxEditInventory=1e5,this.permissionService.hasPermission(dt.PriceUpdate).then(r=>this.hasPriceEdit=r)}ngOnInit(){this.selectedChannel=this.item.Variant.Channel.find(t=>t.ChannelID==this.item.ChannelID),this.selectedChannel.ID=this.item.Variant.ID,this.selectedChannel.Sku=this.item.Variant.Code,this.item.Table=="inventory"?(this.value=this.selectedChannel.Inventory,this.maxEditInventory=this.selectedChannel?.TypeID==gt.Tokopedia?1e5:null):this.item.Table=="price"&&(this.value=this.selectedChannel.Price,this.maxEditInventory=null),this.selectedChannel.ItemName=this.item.Name,this.selectedChannel.VarName=this.item.Variant.Model,this.initModalConfig()}initModalConfig(){let t=this.item.Table=="inventory"?"Update Inventory":"Update Price";this.modalConfig=new Nt,this.modalConfig.title=`${t} ${this.item?.Name} in ${this.selectedChannel?.Title}`}onSubmit(){this.item.Table=="inventory"?this.selectedChannel.Inventory=this.value:this.item.Table=="price"&&(this.selectedChannel.Price=this.value),this.dialogRef.close(this.selectedChannel)}onClose(){this.dialogRef.close()}};i.\u0275fac=function(e){return new(e||i)(V(bt),V(xt),V(ht))},i.\u0275cmp=L({type:i,selectors:[["app-table-dialog"]],decls:5,vars:4,consts:[["INVENTORY",""],["DISABLED",""],[3,"onClose","onCancel","onOk","dynamicValidated","config"],["content",""],[4,"ngIf","ngIfElse"],[4,"ngTemplateOutlet"],["matTooltipPosition","above","matTooltip","Cannot edit Unit Price because you dont have access ProductEditor role",1,"info-label-group","mt-3",2,"background","#e9ecef","opacity","1"],[1,"form-label-group","mt-3"],["type","text","name","edit","autoNum","",1,"form-control",3,"ngModelChange","ngModel","max"],["for","edit",1,"text-capitalize"]],template:function(e,o){if(e&1){let r=f();l(0,"modal-material",2),x("onClose",function(){return u(r),p(o.onClose())})("onCancel",function(){return u(r),p(o.onClose())})("onOk",function(){return u(r),p(o.onSubmit())}),l(1,"div",3),b(2,Lt,4,2,"ng-container",4)(3,$t,4,3,"ng-template",null,0,H),m()()}if(e&2){let r=$(4);h("dynamicValidated",o.value)("config",o.modalConfig),s(2),h("ngIf",o.item.Table=="price")("ngIfElse",r)}},dependencies:[R,B,rt,vt,Tt,wt,Mt,Pt,ct,st,lt,mt,ft,_t,Ct,O],styles:["mat-form-field[_ngcontent-%COMP%]{width:100%;height:100%}.mat-dialog-title[_ngcontent-%COMP%]{margin-left:1rem;margin-right:1rem}.mat-dialog-content[_ngcontent-%COMP%]{padding-left:.5rem;padding-right:.5rem;margin-left:.5rem;margin-right:.5rem}.font-lg[_ngcontent-%COMP%]{font-size:large}.font-lgr[_ngcontent-%COMP%]{font-size:larger}"]});let n=i;return n})();var oe=(()=>{let i=class i{transform(t,e,o=0){if(!t)return t;let r=e?parseInt(e,10):10;return t.length>r?t.substring(o,r)+"...":t}};i.\u0275fac=function(e){return new(e||i)},i.\u0275pipe=et({name:"stringLimit",type:i,pure:!0});let n=i;return n})();function Bt(n,i){if(n&1){let a=f();l(0,"span",6),x("click",function(){u(a);let e=c();return p(e.onGetRowCount())}),l(1,"i",7),d(2,"?"),m()()}}function Ot(n,i){if(n&1&&(T(0),l(1,"span"),d(2),D(3,"number"),m(),w()),n&2){let a=c();s(2),M(y(3,1,a.rowCount()))}}function Rt(n,i){if(n&1){let a=f();l(0,"a",10),x("click",function(){u(a);let e=c(2);return p(e.onNextPage())}),U(1,"i",11),d(2," Next"),m()}}function kt(n,i){if(n&1){let a=f();l(0,"a",12),x("click",function(){u(a);let e=c(2);return p(e.onLastPage())}),U(1,"i",13),d(2," Last"),m()}}function Ft(n,i){if(n&1&&(l(0,"div",5),N(1,Rt,3,0,"a",8),N(2,kt,3,0,"a",9),m()),n&2){let a=c();s(),P(a.disableNextButton()&&!a.goToLastPage()?1:-1),s(),P(a.disableNextButton()&&!a.goToLastPage()?2:-1)}}var ce=(()=>{let i=class i{constructor(){this.totalData=C(0),this.rowCount=C(),this.pageNumber=C(),this.disableNextButton=C(),this.goToLastPage=C(),this.hideCount=C(),this.nextPage=new S,this.lastPage=new S,this.getRowCount=new S}onNextPage(){this.nextPage.emit()}onLastPage(){this.lastPage.emit()}onGetRowCount(){this.getRowCount.emit()}};i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=L({type:i,selectors:[["infinite-paginator"]],inputs:{totalData:[1,"totalData"],rowCount:[1,"rowCount"],pageNumber:[1,"pageNumber"],disableNextButton:[1,"disableNextButton"],goToLastPage:[1,"goToLastPage"],hideCount:[1,"hideCount"]},outputs:{nextPage:"onNextPage",lastPage:"onLastPage",getRowCount:"onGetRowCount"},decls:9,vars:7,consts:[[1,"d-flex","justify-content-between","mt-5"],[1,"me-auto","d-sm-block","collapse","mt-3"],[1,"font-weight-bold","font-italic","hidden-xxs"],[2,"cursor","pointer"],[4,"ngIf"],[1,"btn-group"],[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"],["role","button","title","Load all products",1,"btn","btn-outline-secondary","btn-sm","text-primary","border-start-0"],["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","border-start-0",3,"click"],[1,"fas","fa-share"]],template:function(e,o){e&1&&(l(0,"div",0)(1,"div",1)(2,"div",2),d(3),D(4,"number"),N(5,Bt,3,0,"span",3),b(6,Ot,4,3,"ng-container",4),d(7),m()(),N(8,Ft,3,2,"div",5),m()),e&2&&(s(3),G(" Showing 1 - ",y(4,5,o.totalData())," of "),s(2),P(o.hideCount()?5:-1),s(),h("ngIf",!o.hideCount()&&o.rowCount()),s(),G(" records ~ ",o.pageNumber()," Page "),s(),P(o.totalData()>0?8:-1))},dependencies:[R,B,O],encapsulation:2});let n=i;return n})();var fe=(()=>{let i=class i{constructor(t){this.http=t,this.pagination$=new z(null),this._pageNumber=_(1),this.pageNumber=I(()=>this._pageNumber()),this._hideCount=_(!0),this.hideCount=I(()=>this._hideCount()),this._disableNextButton=_(!0),this.disableNextButton=I(()=>this._disableNextButton()),this._goToLastPage=_(!1),this.isLastPage=I(()=>this._goToLastPage()),this.totalData=_(0),this.destroy$=new W,this.data$=this.paginationFunction()}onNextPage(t){t.PageNumber+=1,this.pagination$.next(t)}setPageNumberFooter(t){this._pageNumber.set(t.PageNumber)}setPaginationButtonState(t,e){e==0?this._disableNextButton.set(!0):this._disableNextButton.set(!(e<t.RowCount*t.PageNumber))}reloadPagination(t){t.PageNumber=1,this.pagination$.next(t),this._hideCount.set(!0),this._goToLastPage.set(!1)}onLastPage(t={}){let e=JSON.parse(JSON.stringify(t));this.totalRowCount$=this.http.post(`/api/${this.fethRowCountEndpoint}`,e).pipe(v(o=>o.Total),A(o=>{this._hideCount.set(!1),e.RowCount=o,e.PageNumber=1,this.pagination$.next(e),this._goToLastPage.set(!0)}))}paginationFunction(){return this.pagination$.pipe(Q(this.destroy$),J(t=>t!=null),Y(t=>this.http.post(`/API/${this.fetchDataEndpoint}`,JSON.stringify(t)).pipe(v(e=>e.Data?e.Data:[]))),X(this.pagination$),q((t,e)=>{let[o,r]=t,[g]=e;return r.PageNumber==1?[g,r]:[o.concat(g),r]}),A(([t,e])=>{this.setPageNumberFooter(e);let o=this.calculateProductLength(t);this.totalData.set(o),this.setPaginationButtonState(e,o)}),v(([t])=>t),K())}getRowCount(t){this._hideCount.set(!1),this.totalRowCount$=this.http.post(`/API/${this.fethRowCountEndpoint}`,t).pipe(v(e=>e.Total))}calculateProductLength(t=[]){return t.reduce((o,r)=>o+(r.Variants?.length?r.Variants?.length:0),0)}};i.\u0275fac=function(e){return new(e||i)(Z(pt))},i.\u0275prov=E({token:i,factory:i.\u0275fac});let n=i;return n})();var ve=(()=>{let i=class i{constructor(){this.toastr=tt(ut)}responseHandling(t=[],e=[],o,r=[]){let g=t.length>0,F=e.length>0;if(!F&&g&&this.toastr.success(`${this.generateSuccessMessage(t.length,r)}`,"Success",{enableHtml:!0}),F&&g){let j=`<li>${this.generateSuccessMessage(t.length)}</li>`,Dt=this.generateErrorMessage(o,e),yt=`<ol>${j} ${Dt}</ol>`;this.toastr.warning(yt,"Warning",{enableHtml:!0})}if(F&&!g){let j=`<ol>${this.generateErrorMessage(o,e)}</ol>`;this.toastr.error(j,"Error",{enableHtml:!0})}}generateSuccessMessage(t,e=[]){let o=e.length>1?e.length:1;return`
2
- <div>
3
- <span class="fw-bold">Successfully</span> updated ${t} variants in ${o} channels
4
- </div>
5
- `}generateErrorMessage(t,e=[]){let o="";return e.forEach((r,g)=>{o+=`<li><span class="fw-bold">Error</span> Updating ${t} for [${r.Name} - ${r.Code}] - <b>${r.Message}</b></li>`}),o}};i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=E({token:i,factory:i.\u0275fac});let n=i;return n})();export{ie as a,oe as b,ce as c,fe as d,ve as e};
@@ -1 +0,0 @@
1
- import{a as G}from"./chunk-2FSRCK7Y.js";import{a as V}from"./chunk-RJFFTIAO.js";import"./chunk-NECWUPZQ.js";import"./chunk-UW3UCIOY.js";import{a as z,b as j}from"./chunk-VZSHSSQZ.js";import"./chunk-NLSVMXR7.js";import"./chunk-FULVA6QB.js";import"./chunk-A7YRNCQP.js";import"./chunk-OROFEDQN.js";import"./chunk-PZB3GQWT.js";import"./chunk-B4QCGMST.js";import"./chunk-GV3NEJJ6.js";import"./chunk-OPXITNRF.js";import"./chunk-HPINZVE4.js";import"./chunk-D2J64VUP.js";import"./chunk-6Q6L5NUD.js";import"./chunk-ONU4O7N2.js";import"./chunk-3RK6DDJD.js";import"./chunk-5YBWBAQS.js";import"./chunk-37NOSLQL.js";import"./chunk-N5AE5WMQ.js";import"./chunk-A6QXXKPR.js";import"./chunk-OXWPYJNB.js";import"./chunk-XBIHN6D3.js";import{m as H,n as q}from"./chunk-UI5ITL7Z.js";import{A as O,c as k,h as N,m as J}from"./chunk-L3W6SG2T.js";import"./chunk-YTHY4IFS.js";import"./chunk-SILAIDPV.js";import"./chunk-3I2V337G.js";import{G as W,I as R,e as F,i as D,j as T,l as A,m as B}from"./chunk-LNJUGHOX.js";import{$c as E,Gb as M,Lc as P,Mb as L,Mc as r,Oc as S,Qc as y,Rc as c,Sc as f,Z as b,_c as w,gc as g,hc as t,hd as d,ic as i,id as v,jd as _,nb as o,v as h,vc as C,zb as I}from"./chunk-ZYJ6LAJ3.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";var K=()=>["/menu/log/inventory/detail"],Q=l=>({ID:l});function U(l,m){if(l&1&&(t(0,"tr")(1,"td")(2,"a",18),r(3),d(4,"date"),i()(),t(5,"td"),r(6),d(7,"number"),i(),t(8,"td")(9,"span",19),r(10),i()()()),l&2){let a=m.$implicit;o(2),g("routerLink",w(13,K))("queryParams",E(14,Q,a._id)),o(),S(" ",_(4,7,a==null?null:a._source["@timestamp"],"dd MMM yyyy HH:mm:ss")," "),o(3),S("",_(7,10,a.DurationInSecond,"1.1-1")," s"),o(3),P((a==null?null:a.respCode)===200||(a==null?null:a.respCode)===202?"bg-success":"bg-warning"),o(),S(" ",a==null?null:a.respCode," ")}}var pe=(()=>{let m=class m{constructor(p){this.inventoryAsyncServiceLog=p,this.filters={PageNumber:1,RowCount:100,From:null,To:null,StatusCode:"",JobID:""}}ngOnInit(){this.initInventoryLog()}initInventoryLog(){let p=this.inventoryAsyncServiceLog.getInventoryAsyncLog(this.filters).pipe(b(1));this.inventoryLog$=p.pipe(h(s=>s?.hits)),this.totalPagination$=p.pipe(h(s=>s?.total.value))}onPaginationChange(p){this.filters.PageNumber=p.pageIndex+1,this.initInventoryLog()}onSubmitFilter(){this.initInventoryLog()}};m.\u0275fac=function(s){return new(s||m)(I(G))},m.\u0275cmp=M({type:m,selectors:[["app-inventory-async-log"]],decls:42,vars:17,consts:[["headerTitle","Order Inventory Sync Job",3,"onSubmit","hideSearchBox"],["role","button","routerLink","/menu/log/inventory/sync-inventory",1,"btn","btn-success"],["container",""],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"mt-5"],["type","text","name","StatusCode",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["type","text","name","JobID",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col"],[1,"table-responsive"],[1,"table","table-hover"],[1,"table-light"],[4,"ngFor","ngForOf"],[3,"page","length","pageSize","pageIndex"],[3,"routerLink","queryParams"],[1,"text-white","p-2","rounded","response-desc"]],template:function(s,e){s&1&&(t(0,"mainpanel",0),C("onSubmit",function(){return e.onSubmitFilter()}),t(1,"actions")(2,"a",1),r(3," Channel Inventory Sync "),i()(),t(4,"filters")(5,"div",2)(6,"div")(7,"label",3),r(8,"From/To"),i(),t(9,"div",4)(10,"datepicker",5),f("dateChange",function(n){return c(e.filters.From,n)||(e.filters.From=n),n}),i()(),t(11,"div")(12,"datepicker",6),f("dateChange",function(n){return c(e.filters.To,n)||(e.filters.To=n),n}),i()()(),t(13,"div",7)(14,"label"),r(15,"Response Code"),i(),t(16,"input",8),f("ngModelChange",function(n){return c(e.filters.StatusCode,n)||(e.filters.StatusCode=n),n}),i()(),t(17,"div",7)(18,"label"),r(19,"JobID"),i(),t(20,"input",9),f("ngModelChange",function(n){return c(e.filters.JobID,n)||(e.filters.JobID=n),n}),i()()()(),t(21,"content")(22,"div",10)(23,"div",11)(24,"div",12)(25,"div",13)(26,"table",14)(27,"thead")(28,"tr",15)(29,"th"),r(30,"Created"),i(),t(31,"th"),r(32,"Duration"),i(),t(33,"th"),r(34,"Response code"),i()()(),t(35,"tbody"),L(36,U,11,16,"tr",16),d(37,"async"),i()(),t(38,"mat-paginator",17),d(39,"async"),d(40,"async"),d(41,"async"),C("page",function(n){return e.onPaginationChange(n)}),i()()()()()()()),s&2&&(g("hideSearchBox",!0),o(10),y("date",e.filters.From),o(2),y("date",e.filters.To),o(4),y("ngModel",e.filters.StatusCode),o(4),y("ngModel",e.filters.JobID),o(16),g("ngForOf",v(37,9,e.inventoryLog$)),o(2),g("length",v(39,11,e.totalPagination$))("pageSize",e.filters.RowCount>v(40,13,e.totalPagination$)?v(41,15,e.totalPagination$):e.filters.RowCount)("pageIndex",(e.filters==null?null:e.filters.PageNumber)==0?0:(e.filters==null?null:e.filters.PageNumber)-1))},dependencies:[O,k,N,J,B,F,q,H,j,z,V,R,W,D,A,T],encapsulation:2});let l=m;return l})();export{pe as InventoryAsyncLogComponent};
@@ -1 +0,0 @@
1
- import{a as ae,b as re}from"./chunk-3WRXJBHF.js";import{a as ie,b as oe}from"./chunk-NWB7EVME.js";import{ra as te}from"./chunk-5PMKN6PM.js";import{e as Y}from"./chunk-OXWPYJNB.js";import{b as C,c as s}from"./chunk-BLHKSSK6.js";import{A as X,a as $,h as K,m as Q}from"./chunk-L3W6SG2T.js";import{v as Z,w as ee}from"./chunk-SILAIDPV.js";import{h as q,i as H,m as J}from"./chunk-LNJUGHOX.js";import{$b as O,Gb as A,Ha as T,Hc as x,Mb as u,Mc as v,Na as F,Oc as P,Qc as z,Rc as W,Sc as G,Z as b,Zc as j,aa as d,bc as D,ea as c,g,gc as y,hc as f,hd as B,ic as S,id as R,kd as U,la as N,ma as I,nb as L,pc as w,q as p,qc as E,ra as _,sb as M,vc as V,xa as h,xc as l,ya as m}from"./chunk-ZYJ6LAJ3.js";var ne=(()=>{let a=class a{constructor(){this.httpService=_(Y),this.shopeeCategories=new g({data:[],isFirstLoad:!1}),this.tiktokCategories=new g({data:[],isFirstLoad:!1}),this.lazadaCategories=new g({data:[],isFirstLoad:!1}),this.tokopediaCategories=new g({data:[],isFirstLoad:!1}),this.wooCommerceCategories=new g({data:[],isFirstLoad:!1})}getCategories(e,t){switch(e){case C.Shopee:return this.shopeeCategories.asObservable().pipe(d(i=>i.isFirstLoad?p(i.data):this.getShopeeCategories(t)));case C.Tiktok:return this.tiktokCategories.asObservable().pipe(d(i=>i.isFirstLoad?p(i.data):this.getTiktokCategories(t)));case C.Lazada:return this.lazadaCategories.asObservable().pipe(d(i=>i.isFirstLoad?p(i.data):this.getLazadaCategories(t)));case C.Tokopedia:return this.tokopediaCategories.asObservable().pipe(d(i=>i.isFirstLoad?p(i.data):this.getTokopediaCategories(t)));case C.WooCommerce:return this.wooCommerceCategories.asObservable().pipe(d(i=>i.isFirstLoad?p(i.data):this.getWooCommerceCategories(t)));default:return p([])}}getShopeeCategories(e){return this.httpService.get("api/product/shopee/GetCategories",[{key:"ID",value:e}]).pipe(c(i=>{let r={data:i,isFirstLoad:!0};this.shopeeCategories.next(r)}))}getTiktokCategories(e){return this.httpService.get("api/product/tiktok/GetCategories",[{key:"ID",value:e}]).pipe(c(i=>{let r={data:i,isFirstLoad:!0};this.tiktokCategories.next(r)}))}getLazadaCategories(e){return this.httpService.get("api/product/lazada/GetCategories",[{key:"ID",value:e}]).pipe(c(i=>{let r={data:i,isFirstLoad:!0};this.lazadaCategories.next(r)}))}getTokopediaCategories(e){return this.httpService.get("api/product/tokopedia/GetCategories",[{key:"ID",value:e}]).pipe(c(i=>{let r={data:i,isFirstLoad:!0};this.tokopediaCategories.next(r)}))}getWooCommerceCategories(e){return this.httpService.get("api/product/woo/GetCategories",[{key:"ID",value:e}]).pipe(c(i=>{let r={data:i,isFirstLoad:!0};this.wooCommerceCategories.next(r)}))}searchByIdWithParentDFS(e,t){let i=[...e];for(;i.length>0;){let r=i.pop();if(r.id===JSON.stringify(t))return r;if(r.children&&r.children.length>0)for(let k of r.children)k.parent=r,i.push(k)}return null}searchSelectAbleNode(e){let t=null;if(e.selectable)return e;let i=e.children?e.children:[];if(i.length==0)return e;for(let r of i){if(r.children.length==0&&r.selectable)return r;if(t=this.searchSelectAbleNode(r),t)return t}return t}generateCategoryLabel(e){let t="";return e?t=s.getLabelPathTree(e):t="Select a Category",t}};a.\u0275fac=function(t){return new(t||a)},a.\u0275prov=I({token:a,factory:a.\u0275fac,providedIn:"root"});let o=a;return o})();function le(o,a){o&1&&w(0)}function ce(o,a){if(o&1&&(f(0,"p-floatLabel",1),u(1,le,1,0,"ng-container",2),f(2,"label",3),v(3,"Category"),S()()),o&2){l();let n=x(3);L(),y("ngTemplateOutlet",n)}}function pe(o,a){o&1&&w(0)}function ge(o,a){if(o&1&&u(0,pe,1,0,"ng-container",2),o&2){l();let n=x(3);y("ngTemplateOutlet",n)}}function de(o,a){if(o&1&&(f(0,"div",6),v(1),S()),o&2){let n=l(2);y("matTooltip",n.selectedCategoryLabel()),L(),P(" ",n.selectedCategoryLabel()," ")}}function Ce(o,a){if(o&1){let n=E();f(0,"p-treeSelect",4),B(1,"async"),G("ngModelChange",function(t){h(n);let i=l();return W(i.selectedNode,t)||(i.selectedNode=t),m(t)}),V("click",function(){h(n);let t=l();return m(t.onClickSelect())})("onNodeSelect",function(t){h(n);let i=l();return m(i.onNodeSelect(t))})("onClear",function(){h(n);let t=l();return m(t.onNodeUnselect())}),u(2,de,2,2,"ng-template",5),S()}if(o&2){let n=l();z("ngModel",n.selectedNode),y("filter",!0)("options",R(1,5,n.categories$))("showClear",n.showClear)("disabled",n.disabled)}}var We=(()=>{let a=class a{constructor(){this.categoryService=_(ne),this.showClear=!1,this.showLabel=!1,this.disabled=!1,this.selectedCategory=new M,this.selectedCategoryLabel=T("Select a Category"),this.selectedNode=T(null),this.onChange=e=>{},this.onTouched=()=>{}}ngOnChanges(e){let t=e?.categoryId?.previousValue,i=e?.categoryId?.currentValue;s.IsEmpty(t)&&s.IsNotEmpty(i)&&this.initCategories(),s.IsEmpty(i)&&s.IsNotEmpty(t)&&this.generateCategoryLabel(null)}initCategories(){this.categories$=this.categoryService.getCategories(this.channelType,this.channelId).pipe(c(e=>this.setDefaultCategory(e)),b(1))}setDefaultCategory(e){try{let t=this.categoryService.searchByIdWithParentDFS(e,this.categoryId);t&&(this.generateCategoryLabel(t),this.selectedNode.set(t))}catch(t){console.error(t)}}onClickSelect(){this.disabled==!1&&(this.categories$=this.categoryService.getCategories(this.channelType,this.channelId).pipe(b(1)))}onNodeSelect(e){let t=this.categoryService.searchSelectAbleNode(e.node);this.selectedCategoryLabel.set(s.getLabelPathTree(t));let i=parseInt(t.id);this.onChange(i),this.selectedCategory.emit(i)}onNodeUnselect(){this.selectedCategoryLabel.set("Select a Category"),this.selectedCategory.emit(null)}generateCategoryLabel(e){e?this.selectedCategoryLabel.set(s.getLabelPathTree(e)):this.selectedCategoryLabel.set("Select a Category")}writeValue(e){s.IsNotEmpty(e)&&(this.categoryId=e,this.initCategories())}registerOnChange(e){this.onChange=e}registerOnTouched(e){this.onTouched=e}setDisabledState(e){this.disabled=e}};a.\u0275fac=function(t){return new(t||a)},a.\u0275cmp=A({type:a,selectors:[["app-channel-category-select"]],inputs:{channelId:"channelId",channelType:"channelType",categoryId:"categoryId",showClear:"showClear",showLabel:"showLabel",disabled:"disabled"},outputs:{selectedCategory:"selectedCategory"},features:[j([{provide:$,useExisting:N(()=>a),multi:!0}]),F],decls:4,vars:1,consts:[["categorySelectTemplate",""],["variant","on",1,"w-100"],[4,"ngTemplateOutlet"],["for","selectCategory",1,"tree-category-label"],["appendTo","body","containerStyleClass","w-100","placeholder","Select a Category","id","selectCategory","inputId","selectCategory",3,"ngModelChange","click","onNodeSelect","onClear","ngModel","filter","options","showClear","disabled"],["pTemplate","value"],["matTooltipPosition","above",3,"matTooltip"]],template:function(t,i){t&1&&(O(0,ce,4,1,"p-floatLabel",1)(1,ge,1,1,"ng-container"),u(2,Ce,3,7,"ng-template",null,0,U)),t&2&&D(i.showLabel?0:1)},dependencies:[J,q,re,ae,te,ee,Z,X,K,Q,oe,ie,H],styles:[".p-overlay.p-component{z-index:10000000000000000000000!important} .p-treeselect-panel .p-treeselect-items-wrapper .p-tree{padding-left:4px!important} .p-inputwrapper-filled~label.tree-category-label{left:.5rem!important}"]});let o=a;return o})();export{ne as a,We as b};
@@ -1 +0,0 @@
1
- import{h as C}from"./chunk-5O33CV4F.js";import{a as r}from"./chunk-YJTPDV4D.js";import{b as S,e as m}from"./chunk-OXWPYJNB.js";import{b as a,c as l}from"./chunk-BLHKSSK6.js";import{aa as u,ea as p,ma as c,qa as o,v as h}from"./chunk-ZYJ6LAJ3.js";var z=(()=>{let i=class i{constructor(e,t,n){this.httpService=e,this.toastr=t,this.tokenService=n}saveChannel(e){return this.httpService.post("/api/Channel/SubmitChannel",e).pipe(u(t=>this.tokenService.refreshToken().pipe(h(n=>t))))}getLastSync(e){return this.httpService.get(`${r.ChannelGetLastSyncByID}/?ID=${e}`)}getChannel(e){return this.httpService.post(r.GetChannel,e)}getChannelLoader(){return this.httpService.get(r.GetChannelLoader)}testShopID(e){return this.httpService.post(r.TestShopID,e).pipe(p(t=>{this.showTostrSuccessTestShopID(t)}))}updateChannelIndex(e){return this.httpService.post(r.UpdateChannelIndex,e)}deleteChannel(e){return this.httpService.post(r.DeleteChannel,e)}mapChannelImage(e){return e.map(t=>(t.img=l.getChannelLogoByTypeId(t.TypeID),t))}showTostrSuccessTestShopID(e){let t="";for(var n in e)t+=n+" : "+e[n]+"<br/>";this.toastr.success(t,"Success",{enableHtml:!0,closeButton:!0,positionClass:"toast-bottom-right"})}getRegisterByOutletName(e){return this.httpService.post(r.GetRegisterByOutletName,{Outlet:e})}getChannelRowCount(e){return this.httpService.post(r.GetChannelRowCount,e).pipe(h(t=>t.Count))}getChannelWarehouse(e){return this.httpService.get(`${r.GetChannelWarehouse}/?ChannelID=${e}`)}unSynchronizedWarehouse(e){return this.httpService.delete(`${r.UnSynchronizedWarehouse}?ID=${e}`)}authorizedChannel(e){let t=this.getApiAuthorize(e);return this.httpService.post(`/api/${t}`,null).pipe(p(n=>{window.open(n.Url,"_blank")}))}getApiAuthorize(e){let t;switch(e){case a.Shopee:t="ChannelAuthorization/ShopeeV2_URL";break;case a.Tiktok:t="ChannelAuthorization/Tiktok_URL";break;case a.Lazada:t="ChannelAuthorization/Lazada_URL";break}return t}};i.\u0275fac=function(t){return new(t||i)(o(m),o(S),o(C))},i.\u0275prov=c({token:i,factory:i.\u0275fac,providedIn:"root"});let s=i;return s})();export{z as a};
@@ -1 +0,0 @@
1
- import{a as i}from"./chunk-ZSUWHVKX.js";import{a as c,b as f}from"./chunk-PS43OK3J.js";import"./chunk-ZETUYNFJ.js";import"./chunk-SILAIDPV.js";import"./chunk-3I2V337G.js";import{E as p,I as u,m as s}from"./chunk-LNJUGHOX.js";import{Gb as l,gc as a,hc as m,ic as d,jc as t,nb as n}from"./chunk-ZYJ6LAJ3.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";var D=(()=>{let e=class e{constructor(){this.tabs=[{Title:"All",Url:"/menu/order/all"},{Title:"To Ship",Url:"/menu/order/to-ship"},{Title:"Awaiting Collection",Url:"/menu/order/awaiting-collection"},{Title:"Shipped",Url:"/menu/order/shipped"},{Title:"Completed",Url:"/menu/order/completed"},{Title:"Cancelled",Url:"/menu/order/cancelled"},{Title:"Download",Url:"/menu/order/download",Permissions:[i.DownloadOrder]},{Title:"Log",Url:"/menu/order/log",Permissions:[i.DownloadOrder]}]}};e.\u0275fac=function(o){return new(o||e)},e.\u0275cmp=l({type:e,selectors:[["app-orders-v2"]],decls:5,vars:2,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid"],[3,"Tabs","usePermissions"]],template:function(o,T){o&1&&(m(0,"nav",0)(1,"div",1)(2,"div"),t(3,"nav-tab",2),d()()(),t(4,"router-outlet")),o&2&&(n(3),a("Tabs",T.tabs)("usePermissions",!0))},dependencies:[s,u,p,f,c],encapsulation:2});let r=e;return r})();export{D as OrdersV2Component};
@@ -1 +0,0 @@
1
- import{a as me}from"./chunk-AXC6LM6T.js";import{a as re,b as oe,c as ae,e as pe}from"./chunk-7U32FNM2.js";import{a as le}from"./chunk-IO2TWJDO.js";import"./chunk-55BTWXFX.js";import"./chunk-FULVA6QB.js";import"./chunk-PZB3GQWT.js";import"./chunk-B4QCGMST.js";import{a as de}from"./chunk-573EEV7X.js";import{a as ce}from"./chunk-BXOHTPGP.js";import{c as he,d as V,e as D}from"./chunk-IZZQQW5G.js";import"./chunk-MQXW3UAW.js";import"./chunk-TDCMI7YC.js";import"./chunk-63I3I3MX.js";import{a as ne}from"./chunk-3LU2SFN4.js";import"./chunk-GV3NEJJ6.js";import"./chunk-OPXITNRF.js";import"./chunk-HPINZVE4.js";import"./chunk-D2J64VUP.js";import"./chunk-6Q6L5NUD.js";import"./chunk-ONU4O7N2.js";import"./chunk-3RK6DDJD.js";import"./chunk-5YBWBAQS.js";import"./chunk-37NOSLQL.js";import"./chunk-ZSUWHVKX.js";import"./chunk-N5AE5WMQ.js";import"./chunk-J2BPOHP6.js";import"./chunk-34UF36YY.js";import{d as Y,e as Z}from"./chunk-6KWG6O5L.js";import{a as se}from"./chunk-AL5RTE5M.js";import"./chunk-3JRUKSV3.js";import"./chunk-SJ5MC42H.js";import"./chunk-4RLWHMI6.js";import"./chunk-NWB7EVME.js";import"./chunk-AFDI4TD4.js";import"./chunk-4RG5YR7N.js";import"./chunk-5MV3UFJQ.js";import"./chunk-E6AMKEQR.js";import"./chunk-IGKMJFKP.js";import"./chunk-ITGVXYDV.js";import"./chunk-HK5FXZE4.js";import"./chunk-KJE5GRQ4.js";import"./chunk-4ILDFTIG.js";import"./chunk-A6QXXKPR.js";import{i as X}from"./chunk-5O33CV4F.js";import"./chunk-QXRG5XYP.js";import"./chunk-RXLMJGUY.js";import"./chunk-M4ZE35XK.js";import"./chunk-L7WZ6U4T.js";import"./chunk-LOWGZOML.js";import"./chunk-5PMKN6PM.js";import{a as T}from"./chunk-YJTPDV4D.js";import{b as z,e as Q}from"./chunk-OXWPYJNB.js";import"./chunk-XBIHN6D3.js";import{c as q}from"./chunk-BLHKSSK6.js";import{d as $,l as ee,m as te,n as ie}from"./chunk-UI5ITL7Z.js";import{A as J,c as x,h as G,m as H,o as K}from"./chunk-L3W6SG2T.js";import"./chunk-YTHY4IFS.js";import"./chunk-ZETUYNFJ.js";import"./chunk-SILAIDPV.js";import"./chunk-3I2V337G.js";import{f as W,i as U,l as j,m as k}from"./chunk-LNJUGHOX.js";import{G as E,Gb as L,Ha as y,Mb as v,Mc as u,Qc as P,Rc as f,Sc as _,Tc as B,Z as R,Zc as A,ea as O,gc as m,hc as o,hd as S,ic as a,id as b,jc as M,nb as c,qc as N,ra as w,vc as C,xa as s,xc as I,ya as p,zb as g}from"./chunk-ZYJ6LAJ3.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";function ue(h,d){if(h&1){let F=N();o(0,"button",19),C("click",function(){s(F);let r=I().ngIf,e=I();return p(e.onUpdateItems(r))}),M(1,"i",20),u(2," Update "),a()}}function ge(h,d){if(h&1&&(o(0,"div"),v(1,ue,3,0,"button",18),a()),h&2){let F=d.ngIf,t=I();c(),m("ngIf",t.productService.hasSelectionVariant(F))}}var Qe=(()=>{let d=class d{constructor(t,r,e,n,l,i){this.http=t,this.toastr=r,this.dialog=e,this.productService=n,this.authService=l,this.placeholderService=i,this.infinitePagination=w(V),this.updateResHandling=w(D),this.mainPanelService=w(ee),this.channelOptions=y([]),this.searchFilter=y({PageNumber:1,RowCount:50,filterModel:1,text:"",ListChannelID:[],SearchType:re.NameOnly,NumberFilterComparator:oe.Contains}),this.loaderAPI="PriceLoader/LoadMultiple",this.getDataAPI="Price/GetMultipleChannelComparison",this.rowCountAPI="Inventory/GetMultipleChannelComparisonRowCount",this.data$=this.infinitePagination.data$.pipe(R()),this.searchPlaceholder=y("Search ...")}ngOnInit(){this.initPageLoader()}initPageLoader(){this.infinitePagination.fetchDataEndpoint=this.getDataAPI,this.infinitePagination.fethRowCountEndpoint=this.rowCountAPI,this.loader$=this.http.post(`/api/${this.loaderAPI}`).pipe(O(t=>{t.Filter={PageNumber:t.Filter.PageNumber,RowCount:t.Filter.RowCount,filterModel:1,SearchType:t.Filter.SearchType,NumberFilterComparator:t.Filter.NumberFilterComparator},this.initSearchPlaceholder(),this.searchFilter.set(t.Filter),this.mainPanelService.openModalFilter()}))}initSearchPlaceholder(){this.searchPlaceholder.set(this.placeholderService.generatePlaceholderBySearchType(this.searchFilter().SearchType,this.searchFilter().NumberFilterComparator))}onShowDifferencePrice(t){let r=1;t&&(r=3),this.searchFilter.update(e=>(e.filterModel=r,e)),this.infinitePagination.reloadPagination(this.searchFilter())}onSearch(t){this.searchFilter.update(r=>(r.text=t,r)),this.infinitePagination.reloadPagination(this.searchFilter()),this.filterSelectedChannels(),this.initSearchPlaceholder()}onUpdateItems(t){let r=JSON.parse(JSON.stringify(this.channelOptions())),e=this.productService.selectedVariantProduct(t);this.dialog.open(ce,{data:{title:"Updating Price",selectedItems:e,channels:r},width:"400px"}).afterClosed().pipe(E(n=>q.IsNotEmpty(n))).subscribe(n=>{this.channelOptions.set(n),this.updatePrice(t)})}filterSelectedChannels(){let r=this.authService.getChannels().filter(e=>this.searchFilter().ListChannelID?.indexOf(e.ID)!==-1);this.channelOptions.set(r)}updatePrice(t){let r=this.productService.selectedVariantProduct(t);if(r.length>0){let e=r.map(i=>({ID:i.ID,Code:i.Code,Price:i.UnitPrice})),l={ListChannelID:this.getSelectedChannels().map(i=>i.ID),ListPrice:e};this.http.post(T.UpdateChannelPrice,l).subscribe(i=>{this.infinitePagination.reloadPagination(this.searchFilter()),this.handlingUpdatePrice(i),this.resetSelectedChannels()})}}updatePriceByVariant(t){let r={ID:t.ChannelID,ChannelItemID:t.ChannelItemID,ChannelVariantID:t.ChannelVariationID,Price:t.Price-0,VariantID:t.ID};this.http.post(T.UpdatePriceById,r).subscribe(e=>{this.infinitePagination.reloadPagination(this.searchFilter()),this.handlingUpdatePrice(e)})}handlingUpdatePrice(t){let r=t?.Response?.success_list,e=t?.Response?.failure_list,n=this.getSelectedChannels();r?.length>0||e?.length>0?this.updateResHandling.responseHandling(r,e,"Price",n):this.toastr.error(t[0]?.Exception,"Error")}openExportDialog(){this.dialog.open(pe,{data:{title:"Export Multi Channel Comparison",pageNumber:this.searchFilter().PageNumber,rowCount:this.searchFilter().RowCount,filterExport:this.searchFilter(),getRowCountApi:this.rowCountAPI,exportApi:"price/GetExportMultipleChannelComparison"}}).afterClosed().subscribe()}resetSelectedChannels(){this.channelOptions.update(t=>(t.forEach(r=>{r.selected=!1}),t))}getSelectedChannels(){return this.channelOptions().filter(t=>t.selected)}};d.\u0275fac=function(r){return new(r||d)(g(Q),g(z),g($),g(ne),g(X),g(ae))},d.\u0275cmp=L({type:d,selectors:[["app-price-pos-channel"]],features:[A([V,j,me,D])],decls:41,vars:27,consts:[["headerTitle","Price Comparison","textButton","Search",3,"onSubmit"],[1,"d-flex"],[4,"ngIf"],[1,"btn","btn-outline-secondary","shadow","rounded","ms-2",3,"click"],[1,"fa-solid","fa-print","me-3"],[1,"mb-5"],[1,"fw-bold","mb-2"],[3,"ngModelChange","multiple","ngModel"],["bindLabel","Value","bindValue","Key","placeholder","Number Filter Comparator","name","numberFilterComparator","appendTo","body",3,"ngModelChange","items","ngModel"],[1,"border","border-1","rounded-1","p-4"],[3,"ngModelChange","options","ngModel"],[1,"fw-bold"],["type","number",1,"form-control","mt-2",3,"ngModelChange","ngModel"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],["productToggleTitle","FILTER DIFFERENT PRICE","table","price",3,"onToggle","onSubmit","showProductToggle","data","channel","hiddenIPOSInventory"],[3,"onNextPage","onLastPage","onGetRowCount","totalData","hideCount","rowCount","pageNumber","disableNextButton","goToLastPage"],["type","button","class","btn btn-success shadow rounded","data-toggle","modal",3,"click",4,"ngIf"],["type","button","data-toggle","modal",1,"btn","btn-success","shadow","rounded",3,"click"],[1,"fas","fa-chevron-circle-up"]],template:function(r,e){if(r&1){let n=N();B(0),S(1,"async"),o(2,"mainpanel",0),C("onSubmit",function(i){return s(n),p(e.onSearch(i))}),o(3,"actions")(4,"div",1),v(5,ge,2,1,"div",2),S(6,"async"),o(7,"button",3),C("click",function(){return s(n),p(e.openExportDialog())}),M(8,"i",4),o(9,"span"),u(10,"Export"),a()()()(),o(11,"filters")(12,"div",5)(13,"label",6),u(14,"Channel"),a(),o(15,"app-channel-options-v2",7),_("ngModelChange",function(i){return s(n),f(e.searchFilter().ListChannelID,i)||(e.searchFilter().ListChannelID=i),p(i)}),a()(),o(16,"div",5)(17,"label",6),u(18,"Number Filter Comparator"),a(),o(19,"ng-select",8),_("ngModelChange",function(i){return s(n),f(e.searchFilter().NumberFilterComparator,i)||(e.searchFilter().NumberFilterComparator=i),p(i)}),a()(),o(20,"div",5)(21,"label",6),u(22,"Search Type"),a(),o(23,"div",9)(24,"radio-options",10),_("ngModelChange",function(i){return s(n),f(e.searchFilter().SearchType,i)||(e.searchFilter().SearchType=i),p(i)}),a()()(),o(25,"div",5)(26,"label",11),u(27,"Page Number"),a(),o(28,"input",12),_("ngModelChange",function(i){return s(n),f(e.searchFilter().PageNumber,i)||(e.searchFilter().PageNumber=i),p(i)}),a()(),o(29,"div")(30,"label",11),u(31,"Page Size"),a(),o(32,"input",12),_("ngModelChange",function(i){return s(n),f(e.searchFilter().RowCount,i)||(e.searchFilter().RowCount=i),p(i)}),a()()(),o(33,"content")(34,"div",13)(35,"div",14)(36,"div",15)(37,"app-table",16),S(38,"async"),C("onToggle",function(i){return s(n),p(e.onShowDifferencePrice(i))})("onSubmit",function(i){return s(n),p(e.updatePriceByVariant(i))}),a(),o(39,"infinite-paginator",17),S(40,"async"),C("onNextPage",function(){return s(n),p(e.infinitePagination.onNextPage(e.searchFilter()))})("onLastPage",function(){return s(n),p(e.infinitePagination.onLastPage(e.searchFilter()))})("onGetRowCount",function(){return s(n),p(e.infinitePagination.getRowCount(e.searchFilter()))}),a()()()()()()}if(r&2){let n=b(1,19,e.loader$);c(5),m("ngIf",b(6,21,e.data$)),c(10),m("multiple",!0),P("ngModel",e.searchFilter().ListChannelID),c(4),m("items",n==null||n.Options==null?null:n.Options.SearchComparatorTypeOptions),P("ngModel",e.searchFilter().NumberFilterComparator),c(5),m("options",n==null||n.Options==null?null:n.Options.SearchSKUOnlyOrSKUNameOptions),P("ngModel",e.searchFilter().SearchType),c(4),P("ngModel",e.searchFilter().PageNumber),c(4),P("ngModel",e.searchFilter().RowCount),c(5),m("showProductToggle",!0)("data",b(38,23,e.data$))("channel",e.channelOptions())("hiddenIPOSInventory",!1),c(2),m("totalData",e.infinitePagination.totalData())("hideCount",e.infinitePagination.hideCount())("rowCount",b(40,25,e.infinitePagination.totalRowCount$))("pageNumber",e.infinitePagination.pageNumber())("disableNextButton",e.infinitePagination.disableNextButton())("goToLastPage",e.infinitePagination.isLastPage())}},dependencies:[k,W,J,x,K,G,H,he,ie,te,de,se,le,Z,Y,U],styles:[".no-bullet[_ngcontent-%COMP%]{list-style-type:none}"]});let h=d;return h})();export{Qe as PricePosChannelComponent};
@@ -1 +0,0 @@
1
- import{c as fe}from"./chunk-55BTWXFX.js";import"./chunk-FULVA6QB.js";import"./chunk-B4QCGMST.js";import{b as ue}from"./chunk-MQXW3UAW.js";import"./chunk-HPINZVE4.js";import"./chunk-ONU4O7N2.js";import{a as ee}from"./chunk-ZSUWHVKX.js";import"./chunk-N5AE5WMQ.js";import{a as se,b as le,d as ce,e as me}from"./chunk-6KWG6O5L.js";import{i as ae}from"./chunk-5O33CV4F.js";import"./chunk-QXRG5XYP.js";import"./chunk-RXLMJGUY.js";import"./chunk-YJTPDV4D.js";import{b as ie,e as ne}from"./chunk-OXWPYJNB.js";import"./chunk-XBIHN6D3.js";import{b as h,c as te}from"./chunk-BLHKSSK6.js";import{m as ge,n as he}from"./chunk-UI5ITL7Z.js";import{A as Z,h as X,m as Y}from"./chunk-L3W6SG2T.js";import"./chunk-YTHY4IFS.js";import{b as oe,c as re}from"./chunk-ZETUYNFJ.js";import{v as pe,w as de}from"./chunk-SILAIDPV.js";import"./chunk-3I2V337G.js";import{I as v,e as G,f as q,i as Q,m as y}from"./chunk-LNJUGHOX.js";import{$c as J,Gb as j,Hb as S,Hc as P,Mb as g,Mc as c,Nc as f,Oc as $,Qc as w,Rc as D,Sc as U,Tc as A,Uc as H,Vc as z,Z as b,aa as k,ea as K,gc as m,hc as a,hd as C,ic as s,id as x,jc as W,kd as R,lb as V,na as u,nb as l,nc as T,oc as N,q as F,qc as O,v as L,vc as I,xa as M,xc as p,ya as E,zb as _}from"./chunk-ZYJ6LAJ3.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";var xe=t=>[t];function ye(t,i){if(t&1&&(a(0,"span",15),W(1,"img",16),s(),a(2,"span"),c(3),s()),t&2){let r=i.item;l(),m("src",r.Img,V)("alt",r.Name),l(2),$(" ",r.Name," ")}}function ve(t,i){if(t&1){let r=O();T(0),A(1),C(2,"async"),a(3,"a",17),I("click",function(){M(r);let e=z(1),o=p();return E(o.submitLogistics(e))}),c(4,"Submit"),s(),N()}if(t&2){let r=p();l(),H(x(2,0,r.logisticServices$))}}function Le(t,i){}function be(t,i){if(t&1){let r=O();a(0,"ng-select",20),U("ngModelChange",function(e){M(r);let o=p(2).$implicit;return D(o.ProductSKU,e)||(o.ProductSKU=e),E(e)}),s()}if(t&2){let r=p().ngIf,n=p().$implicit;w("ngModel",n.ProductSKU),m("items",r)}}function Me(t,i){if(t&1&&(a(0,"span"),c(1),s()),t&2){let r=p(2).$implicit;l(),f(r.ProductSKU||"-")}}function Ee(t,i){if(t&1&&(T(0),g(1,Le,0,0,"ng-template",19)(2,be,1,2,"ng-template",null,0,R)(4,Me,2,1,"ng-template",null,1,R),N()),t&2){let r=P(3),n=P(5),e=p(2);l(),m("ngxPermissionsOnly",J(3,xe,e.logisticEditRole))("ngxPermissionsOnlyThen",r)("ngxPermissionsOnlyElse",n)}}function Te(t,i){if(t&1&&(a(0,"tr")(1,"td"),c(2),s(),a(3,"td"),c(4),s(),a(5,"td"),c(6),s(),a(7,"td"),g(8,Ee,6,5,"ng-container",18),C(9,"async"),s()()),t&2){let r=i.$implicit,n=p();l(2),f(r.Name),l(2),f(r.Service),l(2),f(r.TypeString),l(2),m("ngIf",x(9,4,n.logisticOptions$))}}var Se=(()=>{let i=class i{constructor(n,e,o){this.http=n,this.toastr=e,this.authService=o,this.filter={ChannelID:""},this.logisticEditRole=ee.LogisticUpdate,this.channelOptions=this.authService.getChannels(),this.initUnsupportedChannel(),this.initLoader()}initUnsupportedChannel(){let n=[h.WooCommerce,h.Lazada,h.Shopify,h.Plugo,h.Tokopedia];this.channelOptions=this.channelOptions.map(e=>(n.forEach(o=>{e.TypeID===o&&(e.disabled=!0)}),e))}initLoader(){this.http.post("/api/Logistic/Load",{}).subscribe(n=>{this.filter=n.Filter,this.channelName=this.channelOptions[0].Name,this.initLogisticServiceOptions(),this.getLogisticService()})}initLogisticServiceOptions(){this.logisticOptions$=this.http.get("/api/Logistic/OptionLogisticsService").pipe(b(1))}submitLogistics(n){this.clonedLogisticServices$.pipe(L(e=>n.map(o=>(e.findIndex(d=>d.Name===o.Name&&d.ProductSKU==o.ProductSKU)==-1&&(o.IsChange=!0),o))),k(e=>this.http.post("/api/Logistic/Submit",e))).subscribe(()=>{this.toastr.success("Logistic service updated successfully.","Success"),this.getLogisticService()})}getLogisticService(){this.iniTitle(),this.logisticServices$=this.http.post("/api/Logistic/Get",this.filter).pipe(L(n=>n.map(e=>(e.ProductSKU=te.IsEmpty(e.ProductSKU)?null:e.ProductSKU,e))),K(n=>{let e=JSON.parse(JSON.stringify(n));this.clonedLogisticServices$=F(e)}),b(1))}iniTitle(){let n=this.channelOptions.find(e=>e.ID==this.filter.ChannelID);this.channelName=n?n.Name:null}};i.\u0275fac=function(e){return new(e||i)(_(ne),_(ie),_(ae))},i.\u0275cmp=j({type:i,selectors:[["app-logistic"]],standalone:!1,decls:28,vars:9,consts:[["thenBlock",""],["elseBlock",""],["hideSearchBox","true","searchBoxPlaceHolder","Enter Number...",3,"onSubmit","headerTitle","hideSearchDropdown"],[1,"mb-2","fw-bold"],["appendTo","body","bindLabel","Name","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"ngModelChange","clearable","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],[4,"ngxPermissionsOnly"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"table","table-hover"],[1,"sticky-top-thead"],[1,"table-light"],[4,"ngFor","ngForOf"],[1,"me-2"],[2,"width","18px",3,"src","alt"],["role","button","data-toggle","tooltip","data-placement","top","matTooltip","enter Logistic for recorded",1,"btn","btn-success","btn-fill","btn-lg","text-white",3,"click"],[4,"ngIf"],[3,"ngxPermissionsOnly","ngxPermissionsOnlyThen","ngxPermissionsOnlyElse"],["placeholder","Logistic Service Code","bindLabel","Name","bindValue","Code",1,"w-75",3,"ngModelChange","ngModel","items"]],template:function(e,o){e&1&&(a(0,"mainpanel",2),I("onSubmit",function(){return o.getLogisticService()}),a(1,"filters")(2,"div")(3,"label",3),c(4,"Select a Channel"),s(),a(5,"ng-select",4),U("ngModelChange",function(d){return D(o.filter.ChannelID,d)||(o.filter.ChannelID=d),d}),g(6,ye,4,3,"ng-template",5),s()()(),a(7,"actions"),g(8,ve,5,3,"ng-container",6),s(),a(9,"content")(10,"div",7)(11,"div",8)(12,"div",9)(13,"div",10)(14,"table",11)(15,"thead",12)(16,"tr",13)(17,"th"),c(18,"Logistic"),s(),a(19,"th"),c(20,"Service"),s(),a(21,"th"),c(22,"Type"),s(),a(23,"th"),c(24,"Logistic Service"),s()()(),a(25,"tbody"),g(26,Te,10,6,"tr",14),C(27,"async"),s()()()()()()()()),e&2&&(m("headerTitle","Logistic Courier - "+o.channelName)("hideSearchDropdown",!1),l(5),m("clearable",!1)("items",o.channelOptions),w("ngModel",o.filter.ChannelID),l(3),m("ngxPermissionsOnly",o.logisticEditRole),l(18),m("ngForOf",x(27,7,o.logisticServices$)))},dependencies:[G,q,X,Y,ge,ce,se,le,pe,oe,Q],encapsulation:2});let t=i;return t})();var Ne=[{path:"",component:Se}],Ce=(()=>{let i=class i{};i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=S({type:i}),i.\u0275inj=u({imports:[y,v.forChild(Ne)]});let t=i;return t})();var rt=(()=>{let i=class i{};i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=S({type:i}),i.\u0275inj=u({imports:[y,v,Ce,Z,he,me,ue,fe,de,re]});let t=i;return t})();export{rt as LogisticModule};