marketplacepos 5.48.6 → 5.50.1

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 (286) hide show
  1. package/Marketplace/3rdpartylicenses.txt +214 -214
  2. package/Marketplace/{chunk-SHUYFOQI.js → chunk-24KZDZKS.js} +1 -1
  3. package/Marketplace/{chunk-7JQEF4XX.js → chunk-27DIE2YS.js} +1 -1
  4. package/Marketplace/chunk-2AXBEVQ7.js +4 -0
  5. package/Marketplace/chunk-2K5AP6IZ.js +1 -0
  6. package/Marketplace/{chunk-4RG5YR7N.js → chunk-2NRHX6CZ.js} +2 -2
  7. package/Marketplace/{chunk-ZTHO6JJM.js → chunk-2ST3DMR6.js} +1 -1
  8. package/Marketplace/chunk-2UNT2DUM.js +1 -0
  9. package/Marketplace/chunk-34ZZ4GCS.js +1 -0
  10. package/Marketplace/{chunk-5X2E3W32.js → chunk-3HME327V.js} +1 -1
  11. package/Marketplace/chunk-3NAMEVOB.js +1 -0
  12. package/Marketplace/chunk-3PIHLKK3.js +1 -0
  13. package/Marketplace/{chunk-AFIF6VRM.js → chunk-3SCX7IMW.js} +1 -1
  14. package/Marketplace/chunk-44KIXUU2.js +1 -0
  15. package/Marketplace/chunk-4G46574H.js +1 -0
  16. package/Marketplace/chunk-4KGXKQPG.js +1 -0
  17. package/Marketplace/{chunk-QFSA7CU4.js → chunk-4S4BOPUV.js} +2 -2
  18. package/Marketplace/chunk-4YKPN3RV.js +1 -0
  19. package/Marketplace/chunk-52YCKO3Z.js +1 -0
  20. package/Marketplace/{chunk-5BSPSA4O.js → chunk-5C24BA5F.js} +1 -1
  21. package/Marketplace/{chunk-PMVDQ2OP.js → chunk-5QDH4ZNS.js} +1 -1
  22. package/Marketplace/{chunk-ZETUYNFJ.js → chunk-5UFP37GQ.js} +1 -1
  23. package/Marketplace/{chunk-PDCVMSLL.js → chunk-5WQ3LCWP.js} +1 -1
  24. package/Marketplace/chunk-5WT456T7.js +3 -0
  25. package/Marketplace/chunk-67LUKQJC.js +1 -0
  26. package/Marketplace/chunk-6C4UBIZK.js +10 -0
  27. package/Marketplace/{chunk-ZKIO2ZQ6.js → chunk-6F62N7RZ.js} +2 -2
  28. package/Marketplace/chunk-6GNIJWEX.js +1 -0
  29. package/Marketplace/chunk-6NS3D6KQ.js +5 -0
  30. package/Marketplace/{chunk-RQQWNLDZ.js → chunk-7HRL6MHY.js} +1 -1
  31. package/Marketplace/chunk-7QP3VZ6H.js +1 -0
  32. package/Marketplace/chunk-7R2D2JZ6.js +3 -0
  33. package/Marketplace/{chunk-5MV3UFJQ.js → chunk-7X4B2T6C.js} +2 -2
  34. package/Marketplace/chunk-A2RTZANN.js +1 -0
  35. package/Marketplace/chunk-A53NYS6S.js +1 -0
  36. package/Marketplace/chunk-AHMFSCTX.js +2 -0
  37. package/Marketplace/{chunk-LEUBNBGC.js → chunk-AJSJJV2I.js} +1 -1
  38. package/Marketplace/chunk-ALLZQ6Y3.js +1 -0
  39. package/Marketplace/chunk-AQVMOA6Z.js +1 -0
  40. package/Marketplace/chunk-B5ZK5TGW.js +1 -0
  41. package/Marketplace/chunk-BAW6PICI.js +2 -0
  42. package/Marketplace/{chunk-DTAHV4GM.js → chunk-BC6LHZWP.js} +1 -1
  43. package/Marketplace/{chunk-GPHNPV7O.js → chunk-BMOMTOEW.js} +2 -2
  44. package/Marketplace/chunk-BUMWMFHU.js +2 -0
  45. package/Marketplace/{chunk-OQM7K2EA.js → chunk-BXNDE6NQ.js} +1 -1
  46. package/Marketplace/chunk-BYL4N2KB.js +1 -0
  47. package/Marketplace/{chunk-6KWG6O5L.js → chunk-C2LAQOUW.js} +1 -1
  48. package/Marketplace/{chunk-L7WZ6U4T.js → chunk-DDFP4CNP.js} +1 -1
  49. package/Marketplace/{chunk-6OJQRHIZ.js → chunk-DLHIDOS3.js} +1 -1
  50. package/Marketplace/chunk-DPB2343S.js +1 -0
  51. package/Marketplace/chunk-E4RY2MK5.js +1 -0
  52. package/Marketplace/chunk-EGLM6YK5.js +1 -0
  53. package/Marketplace/{chunk-IM5M2CAI.js → chunk-EH3PIGLJ.js} +1 -1
  54. package/Marketplace/chunk-ENYJ4KAM.js +1 -0
  55. package/Marketplace/chunk-ESBL3IFN.js +1 -0
  56. package/Marketplace/{chunk-2J7P6ENI.js → chunk-F26O6FCO.js} +1 -1
  57. package/Marketplace/chunk-FEQXCPQI.js +2 -0
  58. package/Marketplace/chunk-FFJXYPVA.js +1 -0
  59. package/Marketplace/chunk-FLNIURLD.js +1 -0
  60. package/Marketplace/chunk-FMXX7QB5.js +5 -0
  61. package/Marketplace/chunk-FNOENLVR.js +2 -0
  62. package/Marketplace/{chunk-4ILDFTIG.js → chunk-FOKLBUX6.js} +1 -1
  63. package/Marketplace/chunk-FTIUJUXI.js +1 -0
  64. package/Marketplace/{chunk-WNUTNP6I.js → chunk-G3B6ETBU.js} +5 -5
  65. package/Marketplace/{chunk-VWX2IX64.js → chunk-G4T4VM5E.js} +1 -1
  66. package/Marketplace/chunk-GBF6A3MS.js +1 -0
  67. package/Marketplace/chunk-GDHNMHJZ.js +1 -0
  68. package/Marketplace/chunk-GG3X4R7G.js +1 -0
  69. package/Marketplace/chunk-GJC736LV.js +1 -0
  70. package/Marketplace/chunk-GVJLKDIO.js +1 -0
  71. package/Marketplace/chunk-H6YNHOUQ.js +1 -0
  72. package/Marketplace/chunk-HGVFXR6T.js +1 -0
  73. package/Marketplace/chunk-HJZ3XPSH.js +266 -0
  74. package/Marketplace/chunk-HNDBAXI5.js +1 -0
  75. package/Marketplace/{chunk-N5AE5WMQ.js → chunk-HO2TMGLM.js} +1 -1
  76. package/Marketplace/chunk-HORS2MKK.js +1 -0
  77. package/Marketplace/chunk-IDGK6BMG.js +1 -0
  78. package/Marketplace/chunk-IF7EJSQG.js +1 -0
  79. package/Marketplace/chunk-IIJEILDV.js +1 -0
  80. package/Marketplace/{chunk-3L7Y6LG6.js → chunk-IM7YH54S.js} +1 -1
  81. package/Marketplace/chunk-IV5IPY6H.js +1 -0
  82. package/Marketplace/{chunk-63I3I3MX.js → chunk-IVKFEOCB.js} +1 -1
  83. package/Marketplace/chunk-J6HA4ZHH.js +1 -0
  84. package/Marketplace/chunk-JM3NLPH4.js +9 -0
  85. package/Marketplace/chunk-JNRCB7N3.js +2 -0
  86. package/Marketplace/chunk-JV4F6ZYF.js +1 -0
  87. package/Marketplace/chunk-JWDQVXQP.js +1 -0
  88. package/Marketplace/{chunk-3664K4KH.js → chunk-JYP3Z3TV.js} +19 -19
  89. package/Marketplace/chunk-JYSOUJ42.js +1 -0
  90. package/Marketplace/chunk-K5WSFDNA.js +1 -0
  91. package/Marketplace/chunk-KNBXCPTA.js +1 -0
  92. package/Marketplace/chunk-KR6UNAIL.js +3 -0
  93. package/Marketplace/chunk-KSRL7Y2J.js +2 -0
  94. package/Marketplace/{chunk-ODLI42YV.js → chunk-KTTKHI2N.js} +1 -1
  95. package/Marketplace/chunk-KUKTPGJ2.js +1 -0
  96. package/Marketplace/chunk-LKJCOEGO.js +1 -0
  97. package/Marketplace/chunk-LQ3VUWFK.js +2 -0
  98. package/Marketplace/chunk-LQPY6AYJ.js +1 -0
  99. package/Marketplace/{chunk-FULVA6QB.js → chunk-LR2YCE6M.js} +1 -1
  100. package/Marketplace/{chunk-DXYMG6QK.js → chunk-LUJ3SHSP.js} +1 -1
  101. package/Marketplace/chunk-LYN2PNQK.js +1 -0
  102. package/Marketplace/{chunk-J6CZKQ53.js → chunk-M3DUXHYE.js} +4 -4
  103. package/Marketplace/chunk-M7TUSCXB.js +1 -0
  104. package/Marketplace/{chunk-6PW6S7MI.js → chunk-MAQQQB3T.js} +1 -1
  105. package/Marketplace/chunk-MIGPO7BO.js +1 -0
  106. package/Marketplace/chunk-MM7SAZOU.js +1 -0
  107. package/Marketplace/{chunk-CM3B2UZ7.js → chunk-MPFJ7FBJ.js} +1 -1
  108. package/Marketplace/{chunk-SJ5MC42H.js → chunk-MT3CWRVG.js} +2 -2
  109. package/Marketplace/chunk-MTVUPPAN.js +149 -0
  110. package/Marketplace/chunk-MV2PLTWF.js +1 -0
  111. package/Marketplace/{chunk-WHHW4IZT.js → chunk-N3E43QWK.js} +2 -2
  112. package/Marketplace/{chunk-AFDI4TD4.js → chunk-NIJCYMZM.js} +3 -3
  113. package/Marketplace/chunk-NQLMPUSB.js +1 -0
  114. package/Marketplace/chunk-NTU64XT4.js +1 -0
  115. package/Marketplace/{chunk-3JRUKSV3.js → chunk-NVPT5BF2.js} +2 -2
  116. package/Marketplace/chunk-O3QPBAV5.js +7 -0
  117. package/Marketplace/chunk-O4D64GHO.js +2 -0
  118. package/Marketplace/{chunk-UH5C5HXK.js → chunk-O4U34AC7.js} +1 -1
  119. package/Marketplace/chunk-OCXIDX74.js +1 -0
  120. package/Marketplace/chunk-OGF4VFSK.js +1 -0
  121. package/Marketplace/chunk-OHGMB7HJ.js +4 -0
  122. package/Marketplace/chunk-OIWQSDTS.js +1 -0
  123. package/Marketplace/chunk-OSGPJXJZ.js +1 -0
  124. package/Marketplace/chunk-OVZRFDFO.js +1 -0
  125. package/Marketplace/chunk-P3XVM6DH.js +1 -0
  126. package/Marketplace/chunk-PBAFAOKJ.js +1 -0
  127. package/Marketplace/{chunk-IGKMJFKP.js → chunk-PN3KM4M4.js} +2 -2
  128. package/Marketplace/{chunk-L76NLJD7.js → chunk-PWOKOWVV.js} +2 -2
  129. package/Marketplace/chunk-QJCYEP2A.js +1 -0
  130. package/Marketplace/{chunk-4RLWHMI6.js → chunk-QMHG3QTI.js} +1 -1
  131. package/Marketplace/chunk-QMIL5QUX.js +1 -0
  132. package/Marketplace/chunk-QOSWDELZ.js +1 -0
  133. package/Marketplace/chunk-QQF5ZMGS.js +2 -0
  134. package/Marketplace/{chunk-6XDT56RT.js → chunk-R3WIWDSP.js} +2 -2
  135. package/Marketplace/{chunk-LOWGZOML.js → chunk-RBZU7OVM.js} +1 -1
  136. package/Marketplace/chunk-RFWRWMRC.js +1 -0
  137. package/Marketplace/chunk-RHMSGY7X.js +1 -0
  138. package/Marketplace/chunk-RM6ZXD3O.js +1 -0
  139. package/Marketplace/chunk-RN5CI3LE.js +1 -0
  140. package/Marketplace/chunk-ROS2QMKF.js +1 -0
  141. package/Marketplace/{chunk-YTHY4IFS.js → chunk-RQUCYFCB.js} +1 -1
  142. package/Marketplace/chunk-RUYX7KTP.js +1 -0
  143. package/Marketplace/{chunk-L22SKCLL.js → chunk-RWPLFNHT.js} +1 -1
  144. package/Marketplace/{chunk-5PMKN6PM.js → chunk-RXC5D64C.js} +2 -2
  145. package/Marketplace/chunk-RZ5N5JLA.js +1 -0
  146. package/Marketplace/chunk-S5D64XYA.js +1 -0
  147. package/Marketplace/chunk-S5XYWXXP.js +1 -0
  148. package/Marketplace/chunk-SABMHH6B.js +1 -0
  149. package/Marketplace/{chunk-TXOZULMZ.js → chunk-SIPZP62B.js} +1 -1
  150. package/Marketplace/{chunk-6CM22SKR.js → chunk-SMZOSLIK.js} +1 -1
  151. package/Marketplace/chunk-SN5AD4QE.js +1 -0
  152. package/Marketplace/chunk-SPLGZRGH.js +5 -0
  153. package/Marketplace/chunk-TBVMCNS2.js +1 -0
  154. package/Marketplace/{chunk-3WRXJBHF.js → chunk-TDMNVEUU.js} +3 -3
  155. package/Marketplace/chunk-TDP3PQDA.js +1 -0
  156. package/Marketplace/{chunk-RUBV3KX2.js → chunk-TKZ74HJD.js} +1 -1
  157. package/Marketplace/chunk-TMBZ4K5S.js +1 -0
  158. package/Marketplace/chunk-TOK5EWN4.js +1 -0
  159. package/Marketplace/chunk-TYNQDFOT.js +5 -0
  160. package/Marketplace/{chunk-7GY4O2UX.js → chunk-TYQYNICX.js} +3 -3
  161. package/Marketplace/{chunk-VX75I7HA.js → chunk-TZTW72NT.js} +1 -1
  162. package/Marketplace/chunk-U5DJYZUI.js +1 -0
  163. package/Marketplace/{chunk-AZOCRKXK.js → chunk-UB62TZOI.js} +1 -1
  164. package/Marketplace/chunk-UE5E7JXK.js +1 -0
  165. package/Marketplace/chunk-UMLV2ZUF.js +1 -0
  166. package/Marketplace/{chunk-DUXKDRDP.js → chunk-UMMQ62IZ.js} +1 -1
  167. package/Marketplace/{chunk-JBEKD57G.js → chunk-UPRDDI4K.js} +1 -1
  168. package/Marketplace/{chunk-MDP2SGJI.js → chunk-V6QH3IVL.js} +1 -1
  169. package/Marketplace/chunk-VH7JZJ2B.js +1 -0
  170. package/Marketplace/chunk-VOONKP66.js +1 -0
  171. package/Marketplace/chunk-VP3XO25X.js +2 -0
  172. package/Marketplace/{chunk-KTLMPVSK.js → chunk-VV4G5VL5.js} +1 -1
  173. package/Marketplace/chunk-VVAEM355.js +1 -0
  174. package/Marketplace/chunk-VZ7Q4WN7.js +1 -0
  175. package/Marketplace/{chunk-NWB7EVME.js → chunk-W33M7S2S.js} +1 -1
  176. package/Marketplace/{chunk-L3W6SG2T.js → chunk-WAXAIL2I.js} +1 -1
  177. package/Marketplace/chunk-WIBWF333.js +1 -0
  178. package/Marketplace/{chunk-HK5FXZE4.js → chunk-WIRBYT7F.js} +1 -1
  179. package/Marketplace/{chunk-KJE5GRQ4.js → chunk-WVA5LYVE.js} +1 -1
  180. package/Marketplace/chunk-X52ZT4MU.js +1 -0
  181. package/Marketplace/chunk-XLQGQESJ.js +2 -0
  182. package/Marketplace/{chunk-6Q6L5NUD.js → chunk-XUDE7VBC.js} +1 -1
  183. package/Marketplace/{chunk-DHPNXR6E.js → chunk-Y3O22N4P.js} +1 -1
  184. package/Marketplace/{chunk-Q2QX5AAJ.js → chunk-YABJCAAL.js} +4 -4
  185. package/Marketplace/{chunk-WFVK32EW.js → chunk-YAWT3CLI.js} +1 -1
  186. package/Marketplace/chunk-YD6BNJ2B.js +1 -0
  187. package/Marketplace/{chunk-FHER4TFY.js → chunk-YKKHSYDW.js} +1 -1
  188. package/Marketplace/chunk-YMAKW4QT.js +1 -0
  189. package/Marketplace/chunk-YNL43MLU.js +1 -0
  190. package/Marketplace/chunk-YQZHIZHO.js +6 -0
  191. package/Marketplace/chunk-YUPBZXLS.js +1 -0
  192. package/Marketplace/chunk-YX65R6YJ.js +1 -0
  193. package/Marketplace/chunk-YYV4FSYQ.js +1 -0
  194. package/Marketplace/{chunk-EYT2YJGK.js → chunk-Z2XRGVGT.js} +1 -1
  195. package/Marketplace/chunk-Z6LN3X5Q.js +1 -0
  196. package/Marketplace/{chunk-HPINZVE4.js → chunk-ZC526ERX.js} +1 -1
  197. package/Marketplace/{chunk-M4ZE35XK.js → chunk-ZDBFIPDM.js} +1 -1
  198. package/Marketplace/{chunk-RNWHARPK.js → chunk-ZGIYCORM.js} +1 -1
  199. package/Marketplace/chunk-ZRTUQNSQ.js +1 -0
  200. package/Marketplace/{chunk-ITGVXYDV.js → chunk-ZWUYPYHD.js} +1 -1
  201. package/Marketplace/chunk-ZXP3XYSZ.js +1 -0
  202. package/Marketplace/index.html +2 -2
  203. package/Marketplace/main-RFMKGIMO.js +1 -0
  204. package/package.json +1 -1
  205. package/Marketplace/chunk-2B5DXBBJ.js +0 -1
  206. package/Marketplace/chunk-2F4DTZCZ.js +0 -2
  207. package/Marketplace/chunk-2MEVIFIA.js +0 -1
  208. package/Marketplace/chunk-2USFVKEX.js +0 -1
  209. package/Marketplace/chunk-36U7D4LI.js +0 -1
  210. package/Marketplace/chunk-4JDI3AL5.js +0 -1
  211. package/Marketplace/chunk-4LQREJ6J.js +0 -1
  212. package/Marketplace/chunk-4YCSITNV.js +0 -1
  213. package/Marketplace/chunk-5A3P2NB3.js +0 -1
  214. package/Marketplace/chunk-6EORXONU.js +0 -4
  215. package/Marketplace/chunk-6LRZDPE5.js +0 -1
  216. package/Marketplace/chunk-6UOPF4ZP.js +0 -1
  217. package/Marketplace/chunk-7Z5X4HRT.js +0 -1
  218. package/Marketplace/chunk-A7PUMY67.js +0 -1
  219. package/Marketplace/chunk-BQEBDVGB.js +0 -7
  220. package/Marketplace/chunk-BXYXVBXP.js +0 -1
  221. package/Marketplace/chunk-C4VD7LDS.js +0 -266
  222. package/Marketplace/chunk-C6JVY2ER.js +0 -1
  223. package/Marketplace/chunk-C7N6EI73.js +0 -1
  224. package/Marketplace/chunk-CBD25LAJ.js +0 -5
  225. package/Marketplace/chunk-CT6UFONR.js +0 -1
  226. package/Marketplace/chunk-D2J64VUP.js +0 -1
  227. package/Marketplace/chunk-DAUML5UD.js +0 -2
  228. package/Marketplace/chunk-DDV2A3Y2.js +0 -1
  229. package/Marketplace/chunk-E32KODU7.js +0 -1
  230. package/Marketplace/chunk-E3EBAWLJ.js +0 -1
  231. package/Marketplace/chunk-E66QUDQF.js +0 -1
  232. package/Marketplace/chunk-E6AMKEQR.js +0 -149
  233. package/Marketplace/chunk-E6ZWL77N.js +0 -1
  234. package/Marketplace/chunk-EDEZ3JLR.js +0 -4
  235. package/Marketplace/chunk-ESXDXSQ3.js +0 -1
  236. package/Marketplace/chunk-FCEXPGTK.js +0 -5
  237. package/Marketplace/chunk-FKGKMEDE.js +0 -2
  238. package/Marketplace/chunk-FKPDG4AM.js +0 -1
  239. package/Marketplace/chunk-GG3MDS4C.js +0 -1
  240. package/Marketplace/chunk-GURSK3ZV.js +0 -1
  241. package/Marketplace/chunk-HNFW4VQS.js +0 -1
  242. package/Marketplace/chunk-HSQHQZV7.js +0 -1
  243. package/Marketplace/chunk-I3R7CC6J.js +0 -1
  244. package/Marketplace/chunk-I7C6W3RB.js +0 -1
  245. package/Marketplace/chunk-ICE4DSEP.js +0 -1
  246. package/Marketplace/chunk-ILW6ZFFV.js +0 -1
  247. package/Marketplace/chunk-JW7NES7L.js +0 -1
  248. package/Marketplace/chunk-JWK3HR6P.js +0 -1
  249. package/Marketplace/chunk-K2BII75W.js +0 -15
  250. package/Marketplace/chunk-KSR5TQDN.js +0 -1
  251. package/Marketplace/chunk-KUBWQQZK.js +0 -1
  252. package/Marketplace/chunk-KUNITWR6.js +0 -1
  253. package/Marketplace/chunk-KVDREHOE.js +0 -1
  254. package/Marketplace/chunk-LNJUGHOX.js +0 -2
  255. package/Marketplace/chunk-LY32FUZ4.js +0 -2
  256. package/Marketplace/chunk-M2BYW5SR.js +0 -1
  257. package/Marketplace/chunk-MTPSSM64.js +0 -2
  258. package/Marketplace/chunk-N5VHHR26.js +0 -1
  259. package/Marketplace/chunk-NBCUYSP7.js +0 -1
  260. package/Marketplace/chunk-NCKPMA6Q.js +0 -1
  261. package/Marketplace/chunk-NH6QGSVC.js +0 -1
  262. package/Marketplace/chunk-O2YF5VGD.js +0 -2
  263. package/Marketplace/chunk-O4EO3YBL.js +0 -1
  264. package/Marketplace/chunk-OBF4XVU7.js +0 -1
  265. package/Marketplace/chunk-ONPG3DER.js +0 -2
  266. package/Marketplace/chunk-OPXITNRF.js +0 -1
  267. package/Marketplace/chunk-OXWPYJNB.js +0 -1
  268. package/Marketplace/chunk-Q4TAOZ73.js +0 -1
  269. package/Marketplace/chunk-Q56RJPES.js +0 -1
  270. package/Marketplace/chunk-R2XT5M5F.js +0 -3
  271. package/Marketplace/chunk-RI7L4QSY.js +0 -5
  272. package/Marketplace/chunk-RWVVRZJY.js +0 -1
  273. package/Marketplace/chunk-S5R6MCNP.js +0 -5
  274. package/Marketplace/chunk-S7CKRTJV.js +0 -2
  275. package/Marketplace/chunk-STYL7ETF.js +0 -3
  276. package/Marketplace/chunk-T5IUZ6UD.js +0 -1
  277. package/Marketplace/chunk-TAITBX62.js +0 -1
  278. package/Marketplace/chunk-TJYYRHZZ.js +0 -1
  279. package/Marketplace/chunk-TYQY4WPY.js +0 -1
  280. package/Marketplace/chunk-UQK5JNU2.js +0 -1
  281. package/Marketplace/chunk-XLIPGDSC.js +0 -2
  282. package/Marketplace/chunk-ZLBPUHTQ.js +0 -1
  283. package/Marketplace/chunk-ZME22WYI.js +0 -1
  284. package/Marketplace/chunk-ZW2TMVZP.js +0 -10
  285. package/Marketplace/chunk-ZYJ6LAJ3.js +0 -4
  286. package/Marketplace/main-K3MDOIIF.js +0 -1
@@ -0,0 +1 @@
1
+ import{a as ve}from"./chunk-LUJ3SHSP.js";import{b as Me}from"./chunk-BUMWMFHU.js";import"./chunk-ROS2QMKF.js";import{a as P,b as ie,c as _e,i as T,j as I}from"./chunk-5WT456T7.js";import"./chunk-YNL43MLU.js";import"./chunk-ZC526ERX.js";import"./chunk-BMOMTOEW.js";import"./chunk-HO2TMGLM.js";import"./chunk-O4D64GHO.js";import"./chunk-7R2D2JZ6.js";import{a as G}from"./chunk-AGBJEXIM.js";import{b as y,c as W}from"./chunk-UPRDDI4K.js";import{A as K,B as ne,c as D,e as V,h as R,i as x,j as X,l as O,m as $,n as ee,q as te,s as oe,w as Se,y as be}from"./chunk-WAXAIL2I.js";import"./chunk-RQUCYFCB.js";import{b as fe,e as ge}from"./chunk-MM7SAZOU.js";import{d as Ce,e as ye}from"./chunk-NQLMPUSB.js";import"./chunk-OSGPJXJZ.js";import{A as J,q as E}from"./chunk-JNRCB7N3.js";import"./chunk-XBIHN6D3.js";import{Ac as ue,G as z,Hb as M,Ic as Z,Nc as r,Oa as pe,Pc as Q,Rc as j,Sc as q,Tc as Y,aa as F,ac as c,ad as A,bd as ce,cc as h,hc as s,hd as he,ic as o,jc as l,kc as v,mb as de,ob as p,ra as C,rc as L,tb as me,ud as B,v as ae,wc as f,ya as b,yc as k,za as _,zc as se}from"./chunk-OHGMB7HJ.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";var De=t=>({invalid:t});function Re(t,n){t&1&&(o(0,"small"),r(1," URL is required "),l())}function Oe(t,n){if(t&1&&(o(0,"div",10),c(1,Re,2,0,"small"),l()),t&2){k();let g=Z(10);p(),h(g.errors.required?1:-1)}}function Pe(t,n){t&1&&(o(0,"small"),r(1," Email is required "),l())}function Ie(t,n){t&1&&(o(0,"small"),r(1," Email is not valid "),l())}function Ve(t,n){if(t&1&&(o(0,"div",10),c(1,Pe,2,0,"small"),c(2,Ie,2,0,"small"),l()),t&2){k();let g=Z(16);p(),h(g.errors.required?1:-1),p(),h(g.errors.pattern?2:-1)}}var Te=(()=>{let n=class n{constructor(){this.dialogRef=C(P)}ngOnInit(){this.formData={URL:"",Email:""},this.initModalConfig()}initModalConfig(){this.modalConfig=new T,this.modalConfig.title="Fill data for Customer Support"}onSubmit(i){i!="Enter"&&this.dialogRef.close(this.formData)}onClose(){this.dialogRef.close()}};n.\u0275fac=function(d){return new(d||n)},n.\u0275cmp=M({type:n,selectors:[["app-contact-support"]],decls:18,vars:9,consts:[["url","ngModel"],["email","ngModel"],[3,"onClose","onCancel","onOk","dynamicValidated","config"],["content",""],[1,"mx-4"],["for","customerURL"],[1,"input-group","mb-2"],[1,"input-group-prepend"],["id","tokopediaUrl",1,"border-start-0","rounded-start","input-group-text","pointer-default","bg-light",2,"height","58px",3,"ngClass"],["required","","type","text","id","customerURL","name","customerURL","title","customerURL",1,"form-control","border-start-0","customerUrl",3,"ngModelChange","ngModel"],[1,"text-danger"],["for","customerEmail"],["required","","type","text","id","customerEmail","name","customerEmail","title","customerEmail","pattern","\\b[\\w\\.-]+@[\\w\\.-]+\\.\\w{2,4}\\b",1,"form-control",3,"ngModelChange","ngModel"]],template:function(d,e){if(d&1){let a=L();o(0,"modal-material",2),f("onClose",function(){return b(a),_(e.onClose())})("onCancel",function(){return b(a),_(e.onClose())})("onOk",function(u){return b(a),_(e.onSubmit(u))}),o(1,"div",3)(2,"div",4)(3,"label",5),r(4,"Tokopedia URL"),l(),o(5,"div",6)(6,"div",7)(7,"span",8),r(8,"https://tokopedia.com/"),l()(),o(9,"input",9,0),Y("ngModelChange",function(u){return b(a),q(e.formData.URL,u)||(e.formData.URL=u),_(u)}),l()(),c(11,Oe,2,1,"div",10),o(12,"label",11),r(13,"Requester's Email"),l(),o(14,"div",6)(15,"input",12,1),Y("ngModelChange",function(u){return b(a),q(e.formData.Email,u)||(e.formData.Email=u),_(u)}),l()(),c(17,Ve,3,2,"div",10),l()()()}if(d&2){let a=Z(10),m=Z(16);s("dynamicValidated",!a.invalid&&!m.invalid)("config",e.modalConfig),p(7),s("ngClass",A(7,De,a.invalid&&(a.dirty||a.touched))),p(2),j("ngModel",e.formData.URL),p(2),h(a.invalid&&(a.dirty||a.touched)?11:-1),p(4),j("ngModel",e.formData.Email),p(2),h(m.invalid&&(m.dirty||m.touched)?17:-1)}},dependencies:[I,E,K,D,R,Se,be,$],styles:["mat-form-field[_ngcontent-%COMP%]{width:100%;height:100%}.mat-dialog-title[_ngcontent-%COMP%]{margin-bottom:0%;margin-left:24px}.input-group[_ngcontent-%COMP%] > input[_ngcontent-%COMP%]{height:3.625rem;padding:.75rem;color:#343434;font-size:.875rem;border-radius:.25rem!important;border-color:#c8d3df}.input-group[_ngcontent-%COMP%] > input.ng-invalid.ng-touched[_ngcontent-%COMP%]{border-color:#fb404b}.input-group[_ngcontent-%COMP%] > input.customerUrl[_ngcontent-%COMP%]{border-top-left-radius:0!important;border-bottom-left-radius:0!important}.invalid[_ngcontent-%COMP%]{border-color:#fb404b}.pointer-default[_ngcontent-%COMP%]{cursor:default}"]});let t=n;return t})();var ke=(()=>{let n=class n{constructor(){this.dialogRef=C(P),this.data=C(ie)}ngOnInit(){this.initModalConfig()}initModalConfig(){this.modalConfig=new T,this.modalConfig.title=this.data?.title,this.modalConfig.okText="SAVE"}onSubmit(){this.dialogRef.close(this.shopID)}onClose(){this.dialogRef.close()}};n.\u0275fac=function(d){return new(d||n)},n.\u0275cmp=M({type:n,selectors:[["app-modal-dialog-tokopedia"]],decls:7,vars:3,consts:[["name","ngModel"],[3,"onClose","onCancel","onOk","dynamicValidated","config"],["content",""],[1,"form-label-group"],["type","text","id","shopid","placeholder","Shop ID","name","ShopID","data-toggle","tooltip","title","Channel Name",1,"form-control",3,"ngModelChange","ngModel"],["for","shopid"]],template:function(d,e){if(d&1){let a=L();o(0,"modal-material",1),f("onClose",function(){return b(a),_(e.onClose())})("onCancel",function(){return b(a),_(e.onClose())})("onOk",function(){return b(a),_(e.onSubmit())}),o(1,"div",2)(2,"div",3)(3,"input",4,0),Y("ngModelChange",function(u){return b(a),q(e.shopID,u)||(e.shopID=u),_(u)}),l(),o(5,"label",5),r(6,"Shop ID"),l()()()()}d&2&&(s("dynamicValidated",e.shopID)("config",e.modalConfig),p(3),j("ngModel",e.shopID))},dependencies:[I,K,D,R,$],styles:["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 t=n;return t})();var Ue=t=>({"input-group":t}),Ne=(t,n)=>({"is-invalid":t,"input-shopify rounded-start":n}),Ae=t=>({"is-invalid":t});function ze(t,n){t&1&&(o(0,"label",3),r(1,"Shopify URL"),l())}function Fe(t,n){t&1&&(o(0,"label",3),r(1,"URL"),l())}function Le(t,n){t&1&&(o(0,"span",6),r(1,"myshopify.com"),l())}function We(t,n){if(t&1&&(o(0,"div"),r(1),l()),t&2){let g=k(2);p(),Q("",g.data==null?null:g.data.title," url is required")}}function Ke(t,n){if(t&1&&(o(0,"div",7),c(1,We,2,1,"div"),l()),t&2){let g,i=k();p(),h(!(i.formGroup==null||(g=i.formGroup.get("URL"))==null)&&g.getError("required")?1:-1)}}function Ze(t,n){t&1&&r(0," API Key ")}function je(t,n){t&1&&r(0," Consumer Key ")}function qe(t,n){t&1&&(r(0," ("),o(1,"a",11),r(2,"help center article"),l(),r(3,") "))}function Ye(t,n){t&1&&(o(0,"div",7),r(1,"API Key is required"),l())}function Be(t,n){t&1&&r(0," Admin API Access Token ")}function He(t,n){t&1&&r(0," Consumer Secret ")}function Qe(t,n){t&1&&(o(0,"div",7),r(1,"Consumer Secret is required"),l())}var re=(()=>{let n=class n{constructor(){this.dialogRef=C(P),this.data=C(ie),this.modalConfig=new T,this.urlCtrl=new O(null),this.channelType=y}ngOnInit(){this.initModalConfig(),this.initFormGroup()}initFormGroup(){let i=[V.required];this.formGroup=new X({URL:new O(null,i),ConsumerKey:new O(null,[V.required]),ConsumerSecret:new O(null,[V.required])})}initModalConfig(){this.modalConfig=new T,this.modalConfig.title=this.data.title,this.modalConfig.okText="SAVE"}onClose(){this.dialogRef.close()}onSubmit(){this.formGroup.markAllAsTouched();let i=this.formGroup?.get("URL")?.getError("pattern"),d=this.formGroup?.get("ConsumerKey")?.valid,e=this.formGroup?.get("ConsumerSecret")?.valid;if(this.formGroup?.valid||i&&d&&e){let m=this.formGroup.value;m=this.trimShopifyUrl(m),this.dialogRef.close(m)}}trimShopifyUrl(i){if(this.data?.channelType==this.channelType.Shopify){let d=i.URL?.trim()||"";d=d.replace(/^https?:\/\//,""),d.includes(".myshopify.com")||(d=`${d}.myshopify.com`),i.URL=d}return i}};n.\u0275fac=function(d){return new(d||n)},n.\u0275cmp=M({type:n,selectors:[["app-modal-register-channel"]],decls:23,vars:27,consts:[[3,"onClose","onCancel","onOk","config"],["content",""],[3,"formGroup"],["for","shopid",1,"form-label","fw-bold","mb-2"],[1,"mb-8","has-validation",3,"ngClass"],["type","text","id","shopid","name","URL","title","URL","formControlName","URL",1,"form-control","form-input","rounded",3,"placeholder","ngClass"],["id","basic-addon2",1,"input-group-text","rounded-end","form-input","text-secondary"],[1,"invalid-feedback"],[1,"mb-8","has-validation"],["type","text","id","ConsumerKey","name","ConsumerKey","title","ConsumerKey","formControlName","ConsumerKey",1,"form-control","rounded","form-input",3,"placeholder","ngClass"],["type","text","id","ConsumerSecret","name","ConsumerSecret","title","ConsumerSecret","formControlName","ConsumerSecret",1,"form-control","rounded","form-input",3,"placeholder","ngClass"],["target","_blank","href","https://support.dealpos.com/en/articles/9525716-shopify-authorization-at-dealpos-apps",1,"button","text-primary","fw-bold"]],template:function(d,e){if(d&1&&(o(0,"modal-material",0),f("onClose",function(){return e.onClose()})("onCancel",function(){return e.onClose()})("onOk",function(){return e.onSubmit()}),o(1,"div",1)(2,"form",2),c(3,ze,2,0,"label",3),o(4,"div",4),c(5,Fe,2,0,"label",3),v(6,"input",5),c(7,Le,2,0,"span",6),c(8,Ke,2,1,"div",7),l(),o(9,"div",8)(10,"label",3)(11,"span"),c(12,Ze,1,0)(13,je,1,0),l(),c(14,qe,4,0),l(),v(15,"input",9),c(16,Ye,2,0,"div",7),l(),o(17,"div",8)(18,"label",3),c(19,Be,1,0)(20,He,1,0),l(),v(21,"input",10),c(22,Qe,2,0,"div",7),l()()()()),d&2){let a,m,u,S,U,N;s("config",e.modalConfig),p(2),s("formGroup",e.formGroup),p(),h((e.data==null?null:e.data.channelType)==e.channelType.Shopify?3:-1),p(),s("ngClass",A(18,Ue,(e.data==null?null:e.data.channelType)==e.channelType.Shopify)),p(),h((e.data==null?null:e.data.channelType)!=e.channelType.Shopify?5:-1),p(),s("placeholder",(e.data==null?null:e.data.channelType)==e.channelType.Shopify?"[ex: brand.myshopify.com]":"https://mydomain.com/")("ngClass",ce(20,Ne,(e.formGroup==null||(a=e.formGroup.get("URL"))==null?null:a.invalid)&&((e.formGroup==null||(a=e.formGroup.get("URL"))==null?null:a.dirty)||(e.formGroup==null||(a=e.formGroup.get("URL"))==null?null:a.touched)),(e.data==null?null:e.data.channelType)==e.channelType.Shopify)),p(),h((e.data==null?null:e.data.channelType)==e.channelType.Shopify?7:-1),p(),h(!(e.formGroup==null||(m=e.formGroup.get("URL"))==null)&&m.invalid&&(!(e.formGroup==null||(m=e.formGroup.get("URL"))==null)&&m.dirty||!(e.formGroup==null||(m=e.formGroup.get("URL"))==null)&&m.touched)?8:-1),p(4),h((e.data==null?null:e.data.channelType)==e.channelType.Shopify?12:13),p(2),h((e.data==null?null:e.data.channelType)==e.channelType.Shopify?14:-1),p(),s("placeholder",(e.data==null?null:e.data.channelType)==e.channelType.Shopify?"[Create an app and copy the API Key]":"[Create an app and copy the Consumer Key]")("ngClass",A(23,Ae,(e.formGroup==null||(u=e.formGroup.get("ConsumerKey"))==null?null:u.invalid)&&((e.formGroup==null||(u=e.formGroup.get("ConsumerKey"))==null?null:u.dirty)||(e.formGroup==null||(u=e.formGroup.get("ConsumerKey"))==null?null:u.touched)))),p(),h(!(e.formGroup==null||(S=e.formGroup.get("ConsumerKey"))==null)&&S.getError("required")&&(!(e.formGroup==null||(S=e.formGroup.get("ConsumerKey"))==null)&&S.dirty||!(e.formGroup==null||(S=e.formGroup.get("ConsumerKey"))==null)&&S.touched)?16:-1),p(3),h((e.data==null?null:e.data.channelType)==e.channelType.Shopify?19:20),p(2),s("placeholder",(e.data==null?null:e.data.channelType)==e.channelType.Shopify?"[shpat***************************]":"cs_***************")("ngClass",A(25,Ae,(e.formGroup==null||(U=e.formGroup.get("ConsumerSecret"))==null?null:U.invalid)&&((e.formGroup==null||(U=e.formGroup.get("ConsumerSecret"))==null?null:U.dirty)||(e.formGroup==null||(U=e.formGroup.get("ConsumerSecret"))==null?null:U.touched)))),p(),h(!(e.formGroup==null||(N=e.formGroup.get("ConsumerSecret"))==null)&&N.getError("required")&&(!(e.formGroup==null||(N=e.formGroup.get("ConsumerSecret"))==null)&&N.dirty||!(e.formGroup==null||(N=e.formGroup.get("ConsumerSecret"))==null)&&N.touched)?22:-1)}},dependencies:[I,K,ee,D,R,x,ne,te,oe,E],styles:[".input-shopify[_ngcontent-%COMP%]{border-top-right-radius:0!important;border-bottom-right-radius:0!important}.form-input[_ngcontent-%COMP%]{min-height:3.625rem}"]});let t=n;return t})();var we=t=>({"is-invalid":t});function xe(t,n){t&1&&(o(0,"div",6),r(1,"Api Key is required"),l())}function Xe(t,n){t&1&&(o(0,"div",6),r(1,"Vendor ID is required"),l())}var Ee=(()=>{let n=class n{constructor(){this.dialogRef=C(P),this.config=new T,this.initModalConfig(),this.initFormGroup()}initModalConfig(){this.config=new T,this.config.title="Register Plugo",this.config.okText="SAVE"}initFormGroup(){this.formGroup=new X({ApiKey:new O(null,[V.required]),VendorID:new O(null,[V.required])})}onClose(){this.dialogRef.close()}onOk(){if(this.formGroup.markAllAsTouched(),this.formGroup.invalid)return;let i=this.formGroup.value;this.dialogRef.close(i)}};n.\u0275fac=function(d){return new(d||n)},n.\u0275cmp=M({type:n,selectors:[["app-modal-register-plugo"]],decls:13,vars:10,consts:[[3,"onClose","onCancel","onOk","config"],["content",""],[3,"formGroup"],[1,"form-label-group","has-validation"],["type","text","id","ApiKey","placeholder","Api Key","name","ApiKey","title","Api Key","formControlName","ApiKey",1,"form-control",3,"ngClass"],["for","ApiKey"],[1,"invalid-feedback"],["type","text","id","VendorID","placeholder","Vendor ID","name","VendorID","title","Vendor ID","formControlName","VendorID",1,"form-control",3,"ngClass"],["for","VendorID"]],template:function(d,e){if(d&1&&(o(0,"modal-material",0),f("onClose",function(){return e.onClose()})("onCancel",function(){return e.onClose()})("onOk",function(){return e.onOk()}),o(1,"div",1)(2,"form",2)(3,"div",3),v(4,"input",4),o(5,"label",5),r(6,"Api Key"),l(),c(7,xe,2,0,"div",6),l(),o(8,"div",3),v(9,"input",7),o(10,"label",8),r(11,"Vendor ID"),l(),c(12,Xe,2,0,"div",6),l()()()()),d&2){let a,m,u,S;s("config",e.config),p(2),s("formGroup",e.formGroup),p(2),s("ngClass",A(6,we,(e.formGroup==null||(a=e.formGroup.get("ApiKey"))==null?null:a.invalid)&&((e.formGroup==null||(a=e.formGroup.get("ApiKey"))==null?null:a.dirty)||(e.formGroup==null||(a=e.formGroup.get("ApiKey"))==null?null:a.touched)))),p(3),h(!(e.formGroup==null||(m=e.formGroup.get("ApiKey"))==null)&&m.getError("required")&&(!(e.formGroup==null||(m=e.formGroup.get("ApiKey"))==null)&&m.dirty||!(e.formGroup==null||(m=e.formGroup.get("ApiKey"))==null)&&m.touched)?7:-1),p(2),s("ngClass",A(8,we,(e.formGroup==null||(u=e.formGroup.get("VendorID"))==null?null:u.invalid)&&((e.formGroup==null||(u=e.formGroup.get("VendorID"))==null?null:u.dirty)||(e.formGroup==null||(u=e.formGroup.get("VendorID"))==null?null:u.touched)))),p(3),h(!(e.formGroup==null||(S=e.formGroup.get("VendorID"))==null)&&S.getError("required")&&(!(e.formGroup==null||(S=e.formGroup.get("VendorID"))==null)&&S.dirty||!(e.formGroup==null||(S=e.formGroup.get("VendorID"))==null)&&S.touched)?12:-1)}},dependencies:[J,E,I,ne,ee,D,R,x,te,oe],encapsulation:2});let t=n;return t})();var w=(function(t){return t.SHOPEE="https://resc.cloudinary.com/pos/image/upload/v1605249851/icons/Marketplace%20logo/shopee-logo.png",t.TOKOPEDIA="https://resc.cloudinary.com/pos/image/upload/v1605249861/icons/Marketplace%20logo/download_tkpd.png",t.KAL_CARE="data:image/png;base64,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",t.LAZADA="https://resc.cloudinary.com/pos/image/upload/v1641528116/icons/Marketplace%20logo/lazada.png",t.WOOCOMMERCE="https://resc.cloudinary.com/pos/image/upload/v1739236630/icons/marketplace_icons/woo.png",t.TIKTOK="https://resc.cloudinary.com/pos/image/upload/v1645761565/icons/Marketplace%20logo/tiktok-logo.png",t.SHOPIFY="https://resc.cloudinary.com/pos/image/upload/v1710725872/icons/marketplace_icons/Shopify_with_text.png",t.PLUGO="https://resc.cloudinary.com/pos/image/upload/v1739236577/icons/marketplace_icons/plugo_biglogo.png",t})(w||{});var $e=["*"],et=(t,n,g,i,d,e,a,m)=>({"btn-shopee":t,"btn-lazada":n,"btn-tiktok":g,"btn-woocommerce":i,"btn-tokopedia":d,"btn-shopify":e,"btn-kalcare":a,"btn-plugo":m});function tt(t,n){t&1&&(o(0,"div",1)(1,"span"),r(2,"BETA"),l()())}var Ge=(()=>{let n=class n{constructor(){this.disabled=B(!1),this.type=B(void 0),this.isBeta=B(!1),this.authorize=new me,this.channelType=y,this.buttonName=B("Authorize Account")}ngOnChanges(i){i.type&&(this.initChannelImage(),this.channelType.Shopee)}initChannelImage(){switch(this.type()){case y.Tokopedia:this.image=w.TOKOPEDIA;break;case y.WooCommerce:this.image=w.WOOCOMMERCE;break;case y.Shopee:this.image=w.SHOPEE;break;case y.Tiktok:this.image=w.TIKTOK;break;case y.Lazada:this.image=w.LAZADA;break;case y.Shopify:this.image=w.SHOPIFY;break;case y.Plugo:this.image=w.PLUGO;break}}onAuthorize(){this.authorize.emit()}};n.\u0275fac=function(d){return new(d||n)},n.\u0275cmp=M({type:n,selectors:[["app-channel-widget"]],inputs:{disabled:[1,"disabled"],type:[1,"type"],isBeta:[1,"isBeta"],buttonName:[1,"buttonName"]},outputs:{authorize:"onAuthorize"},features:[pe],ngContentSelectors:$e,decls:10,vars:13,consts:[[1,"card","h-100","ribbon-box"],[1,"ribbon","ribbon-top-right"],[1,"card-header","d-flex","align-items-center","justify-content-center",2,"height","120px","padding","0px"],[1,"w-50",3,"src"],[1,"card-body",2,"min-height","134px"],[1,"card-footer","p-4"],[1,"h4","fw-bold","btn","text-white","w-100","border-0",3,"click","ngClass"]],template:function(d,e){d&1&&(se(),o(0,"div",0),c(1,tt,3,0,"div",1),o(2,"div",2),v(3,"img",3),l(),o(4,"div",4)(5,"div"),ue(6),l()(),o(7,"div",5)(8,"a",6),f("click",function(){return e.onAuthorize()}),r(9),l()()()),d&2&&(p(),h(e.isBeta()?1:-1),p(2),s("src",e.image,de),p(5),s("ngClass",he(4,et,e.type()==e.channelType.Shopee,e.type()==e.channelType.Lazada,e.type()==e.channelType.Tiktok,e.type()==e.channelType.WooCommerce,e.type()==e.channelType.Tokopedia,e.type()==e.channelType.Shopify,e.type()==e.channelType.KalCare,e.type()==e.channelType.Plugo)),p(),Q(" ",e.buttonName()," "))},dependencies:[J,E],styles:['.bg-shopee[_ngcontent-%COMP%], .btn-shopee[_ngcontent-%COMP%]{background:linear-gradient(-180deg,#f53d2d,#f63)!important}.bg-tiktok[_ngcontent-%COMP%], .btn-tiktok[_ngcontent-%COMP%]{background:linear-gradient(-173deg,#ee1d52,#69c9d0)!important}.bg-woocommerce[_ngcontent-%COMP%], .btn-woocommerce[_ngcontent-%COMP%]{background:#8053b4!important}.pointer-help[_ngcontent-%COMP%]{cursor:help}.btn-bottom[_ngcontent-%COMP%]{position:absolute;bottom:.5rem;left:.5rem;width:96%}.ribbon-box[_ngcontent-%COMP%]{position:relative}.ribbon[_ngcontent-%COMP%]{width:150px;height:150px;overflow:hidden;position:absolute}.ribbon[_ngcontent-%COMP%]:before, .ribbon[_ngcontent-%COMP%]:after{position:absolute;z-index:1;content:"";display:block;border:5px solid #78c424}.ribbon[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{position:absolute;display:block;width:225px;padding:15px 0;background-color:#78c424;box-shadow:0 5px 10px #0000001a;color:#fff;font:700 18px/1 Lato,sans-serif;text-shadow:0 1px 1px rgba(0,0,0,.2);text-transform:uppercase;text-align:center}.ribbon-top-right[_ngcontent-%COMP%]{top:-10px;right:-10px}.ribbon-top-right[_ngcontent-%COMP%]:before, .ribbon-top-right[_ngcontent-%COMP%]:after{border-top-color:transparent;border-right-color:transparent}.ribbon-top-right[_ngcontent-%COMP%]:before{top:0;left:0}.ribbon-top-right[_ngcontent-%COMP%]:after{bottom:0;right:0}.ribbon-top-right[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{left:-25px;top:30px;transform:rotate(45deg)}.btn-shopify[_ngcontent-%COMP%]{background-color:#96bf48}.btn-tokopedia[_ngcontent-%COMP%]{background-color:#7f7f7f}.btn-lazada[_ngcontent-%COMP%]{background:linear-gradient(90deg,#ff7e5f,#fd04e3)!important}.btn-plugo[_ngcontent-%COMP%]{background-color:#f2a954}']});let t=n;return t})();function ot(t,n){if(t&1){let g=L();o(0,"div",3)(1,"div",6)(2,"app-channel-widget",9),f("onAuthorize",function(){b(g);let d=k();return _(d.openPlugoDialog())}),o(3,"p"),r(4,"Authorize DEALPOS to manage your Plugo Store."),l(),o(5,"p"),r(6," Configure Plugo x DealPOS integration by visiting this "),o(7,"a",14),r(8," article. "),l()()()()()}if(t&2){let g=k();p(2),s("type",g.channelType.Plugo)}}var ao=(()=>{let n=class n{constructor(){this.http=C(ge),this.router=C(Ce),this.dialog=C(_e),this.toastr=C(fe),this.disabled=!1,this.newFeatureVisible=!1,this.channelType=y}shopeeAuthorize(){this.http.post(G.ShopeeV2_URL).subscribe(i=>{window.open(i.Url,"_blank")})}tiktokAuthorize(){this.http.post(G.Tiktok_URL).subscribe(i=>{window.open(i.Url,"_blank")})}lazadaAuthorize(){this.http.post(G.Lazada_URL).subscribe(i=>{window.open(i.Url,"_blank")})}openTokopediaDialog(){this.dialog.open(ke,{data:{title:"Tokopedia"},width:"30%"}).afterClosed().pipe(z(i=>W.IsNotEmpty(i)),F(i=>this.http.post(G.AddTokopedia,{ShopID:i}))).subscribe(i=>{this.onSuccessAddChannel()})}openShopifyDialog(){this.dialog.open(re,{data:{title:"Shopify",channelType:y.Shopify},width:"30%"}).afterClosed().pipe(z(i=>W.IsNotEmpty(i)),F(i=>this.http.post(G.AddShopify,i))).subscribe(()=>{this.onSuccessAddChannel()})}openWooCommerceDialog(){this.dialog.open(re,{data:{title:"WooCommerce",channelType:y.WooCommerce},width:"30%"}).afterClosed().pipe(z(i=>W.IsNotEmpty(i)),F(i=>this.http.post(G.AddWoocommerce,i))).subscribe(()=>{this.onSuccessAddChannel()})}openPlugoDialog(){this.dialog.open(Ee,{width:"30%"}).afterClosed().pipe(z(i=>W.IsNotEmpty(i)),F(i=>this.http.post(G.AddPlugo,i))).subscribe(()=>{this.onSuccessAddChannel()})}contactSupport(){this.dialog.open(Te,{width:"30%"}).afterClosed().pipe(z(i=>W.IsNotEmpty(i)),F(i=>{let d={URL:i.URL,Email:i.Email};return this.http.post("/api/ChannelAuthorization/Tokopedia_Intercom",d).pipe(ae(()=>i))})).subscribe(i=>{this.toastr.success("Your request has been received, we will be in touch at "+i.Email,"Thank you!")})}onSuccessAddChannel(){this.router.navigate(["/menu/channel"]),this.toastr.success("Channel has been added successfully","Success")}onToggleNewVersion(i){this.newFeatureVisible=i}};n.\u0275fac=function(d){return new(d||n)},n.\u0275cmp=M({type:n,selectors:[["app-marketplace-add"]],decls:56,vars:10,consts:[["headerTitle","Add New Channel",3,"hideSearchBox","hideSearchDropdown"],["role","button","routerLink","/menu/channel",1,"btn","btn-secondary","btn-fill","btn-lg","me-3"],[1,"container"],[1,"row","mt-12"],[1,"col-md-4","ps-md-0"],[3,"onAuthorize","type"],[1,"col-md-4","pe-md-0"],["buttonName","Authorization is Closed",3,"type","disabled"],["type","button","href","https://seller-id.tokopedia.com/university/essay?knowledge_id=1189016095426305&default_language=id-ID&identity=1",1,"button","text-primary","fw-bold"],["buttonName","Register",3,"onAuthorize","type"],["target","_blank","href","https://support.dealpos.com/en/articles/5733019-woocommerce-authorization-at-dealpos-apps",1,"button","text-primary","fw-bold"],["target","_blank","href","https://support.dealpos.com/en/articles/9525716-shopify-authorization-at-dealpos-apps",1,"button","text-primary","fw-bold"],[1,"p-5","text-start"],[3,"change"],["href","https://support.dealpos.com/en/articles/10568056-plugo-authorization-in-dealpos-omnichannel-apps","target","_blank",1,"button","text-primary","fw-bold"]],template:function(d,e){d&1&&(o(0,"mainpanel",0)(1,"actions")(2,"a",1),r(3,"Cancel"),l()(),o(4,"content")(5,"div",2)(6,"div",3)(7,"div",4)(8,"app-channel-widget",5),f("onAuthorize",function(){return e.shopeeAuthorize()}),o(9,"p"),r(10," Authorize DEALPOS versi V2 to manage your shopee, you will be redirected to shopee website to complete this process. "),l(),o(11,"p"),r(12," You will need to sign in to Shopee using your Seller account and confirm the authorization. "),l()()(),o(13,"div",6)(14,"app-channel-widget",7)(15,"p"),r(16," Starting from middle of Quarter 1 2025, Seller can no longer create or authorize their shop to Third Party Service without having a merge to their Tiktok Seller Account. "),l(),v(17,"br"),o(18,"p"),r(19," Please visit "),o(20,"a",8),r(21,"This Article From Tiktok x Tokopedia"),l(),r(22," to complete the merge process. After that seller can authorize their shop to DEALPOS only via Tiktok x Tokopedia Options. "),l()()(),o(23,"div",4)(24,"app-channel-widget",5),f("onAuthorize",function(){return e.tiktokAuthorize()}),o(25,"p"),r(26," Authorize DEALPOS to manage your Tiktok Seller, you will be redirected to Tiktok website to complete this process. "),l(),o(27,"p"),r(28," You will need to sign in to Tiktok using your Seller account and confirm the authorization. "),l()()()(),o(29,"div",3)(30,"div",6)(31,"app-channel-widget",9),f("onAuthorize",function(){return e.openWooCommerceDialog()}),o(32,"p"),r(33,"Authorize DEALPOS to manage your Personal Website."),l(),o(34,"p"),r(35," Configure woocommerce integration by visiting "),o(36,"a",10),r(37,"this article."),l()()()(),o(38,"div",6)(39,"app-channel-widget",5),f("onAuthorize",function(){return e.lazadaAuthorize()}),o(40,"p"),r(41," Authorize DEALPOS versi V2 to manage your lazada, you will be redirected to lazada website to complete this process. "),l(),o(42,"p"),r(43," You will need to sign in to Lazada using your Seller account and confirm the authorization. "),l()()(),o(44,"div",4)(45,"app-channel-widget",9),f("onAuthorize",function(){return e.openShopifyDialog()}),o(46,"p"),r(47,"Authorize DEALPOS to manage your Personal Website."),l(),o(48,"p"),r(49," Configure Shopify integration by visiting "),o(50,"a",11),r(51,"this article."),l()()()()(),c(52,ot,9,1,"div",3),l(),o(53,"div",12)(54,"mat-slide-toggle",13),f("change",function(m){return e.onToggleNewVersion(m.checked)}),r(55,"Show Beta Channel Integration "),l()()()()),d&2&&(s("hideSearchBox",!0)("hideSearchDropdown",!0),p(8),s("type",e.channelType.Shopee),p(6),s("type",e.channelType.Tokopedia)("disabled",e.disabled),p(10),s("type",e.channelType.Tiktok),p(7),s("type",e.channelType.WooCommerce),p(8),s("type",e.channelType.Lazada),p(6),s("type",e.channelType.Shopify),p(7),h(e.newFeatureVisible?52:-1))},dependencies:[Me,ye,Ge,ve],styles:["p[_ngcontent-%COMP%]{font-size:14px;font-weight:400;line-height:24.48px}"]});let t=n;return t})();export{ao as MarketplaceAddComponent};
@@ -0,0 +1,5 @@
1
+ import{a as j,b as G,c as z,d as q,e as J,f as K}from"./chunk-KR6UNAIL.js";import{b as $}from"./chunk-BUMWMFHU.js";import"./chunk-ROS2QMKF.js";import"./chunk-5WT456T7.js";import"./chunk-YNL43MLU.js";import"./chunk-KSRL7Y2J.js";import"./chunk-XUDE7VBC.js";import"./chunk-X52ZT4MU.js";import"./chunk-BMOMTOEW.js";import"./chunk-HO2TMGLM.js";import"./chunk-O4D64GHO.js";import"./chunk-7R2D2JZ6.js";import{h as R}from"./chunk-O3QPBAV5.js";import"./chunk-YYV4FSYQ.js";import"./chunk-QXRG5XYP.js";import"./chunk-AGBJEXIM.js";import"./chunk-5UFP37GQ.js";import"./chunk-UPRDDI4K.js";import{A as W,c as F,h as A,m as H}from"./chunk-WAXAIL2I.js";import"./chunk-RQUCYFCB.js";import"./chunk-RXLMJGUY.js";import{e as P}from"./chunk-MM7SAZOU.js";import"./chunk-NQLMPUSB.js";import"./chunk-OSGPJXJZ.js";import{u as O}from"./chunk-JNRCB7N3.js";import"./chunk-XBIHN6D3.js";import{Hb as b,Ic as y,Nb as S,Nc as p,Oc as U,Rc as k,Sc as B,Tc as M,_c as L,ac as C,ad as V,cc as x,ec as w,fc as v,gc as E,hc as m,ic as i,jc as o,kc as d,lb as I,ma as T,ob as s,ra as g,rc as _,tb as N,ud as D,wc as h,ya as u,yc as c,za as f}from"./chunk-OHGMB7HJ.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";var X=(()=>{let t=class t{constructor(){this.httpService=g(P)}download(n){return this.httpService.post("/api/Product/downloadurl",n)}};t.\u0275fac=function(r){return new(r||t)},t.\u0275prov=T({token:t,factory:t.\u0275fac,providedIn:"root"});let e=t;return e})();var te=e=>({"background-color":e});function ne(e,t){if(e&1&&(i(0,"th"),p(1),o()),e&2){let a=t.$implicit;s(),U(a.column)}}function ie(e,t){if(e&1&&(i(0,"td"),d(1,"span",4),o()),e&2){let a=t.$implicit,n=c().$implicit;s(),m("innerHTML",n[a.prop],I)}}function oe(e,t){if(e&1&&(i(0,"tr",3),v(1,ie,2,1,"td",null,w),o()),e&2){let a=t.$implicit,n=c();m("ngStyle",V(1,te,a.Status>200?"#F4D6D5":"#DEE9C9")),s(),E(n.configs())}}var Y=(()=>{let t=class t{constructor(){this.configs=D([]),this.data=D([]),this.status=D(void 0),this.eventClose=new N}ngOnInit(){}onClose(){this.eventClose.emit()}};t.\u0275fac=function(r){return new(r||t)},t.\u0275cmp=b({type:t,selectors:[["app-response-api-list"]],inputs:{configs:[1,"configs"],data:[1,"data"],status:[1,"status"]},outputs:{eventClose:"onClose"},decls:9,vars:0,consts:[[1,"table-responsive"],[1,"table"],[1,"thead-light"],[3,"ngStyle"],[3,"innerHTML"]],template:function(r,l){r&1&&(i(0,"div",0)(1,"table",1)(2,"thead",2)(3,"tr"),v(4,ne,2,1,"th",null,w),o()(),i(6,"tbody"),v(7,oe,3,3,"tr",3,w),o()()()),r&2&&(s(4),E(l.configs()),s(3),E(l.data()))},dependencies:[O],encapsulation:2});let e=t;return e})();function re(e,t){if(e&1){let a=_();i(0,"button",17),h("click",function(){u(a);let r=c(),l=y(11);return f(r.onNewStepperState(l))}),d(1,"i",18),p(2," New "),o()}}function ae(e,t){if(e&1){let a=_();i(0,"button",17),h("click",function(){u(a),c();let r=y(11);return f(r.previous())}),p(1," Back "),o()}}function le(e,t){if(e&1){let a=_();i(0,"button",19),h("click",function(){u(a);let r=c(),l=y(11);return f(r.onStepperNext(l))}),p(1," Next "),o()}}function pe(e,t){if(e&1){let a=_();i(0,"button",20),h("click",function(){u(a);let r=c(),l=y(11);return f(r.onSubmit(l))}),p(1,"Download"),o()}if(e&2){let a=c();m("disabled",!a.urls)}}function se(e,t){e&1&&(d(0,"i",21),i(1,"span"),p(2,"Instruction"),o())}function ce(e,t){e&1&&(i(0,"div",22)(1,"div",23)(2,"div",24)(3,"h4",25),p(4,"Note"),o()(),i(5,"div",26)(6,"ol",27)(7,"li"),p(8," Use this form to Download Products from Tokopedia using product URL "),o(),i(9,"li"),p(10," Copy Product URL from "),i(11,"a",28),p(12,"https://seller.tokopedia.com/ "),o(),p(13," and paste in this form "),o(),i(14,"li"),p(15," Use New Line when you want to input several product URLs "),o()()()()())}function me(e,t){e&1&&(d(0,"i",29),i(1,"span"),p(2,"Download"),o())}function de(e,t){if(e&1){let a=_();i(0,"div",22)(1,"textarea",30),M("ngModelChange",function(r){u(a);let l=c();return B(l.urls,r)||(l.urls=r),f(r)}),o()()}if(e&2){let a=c();s(),m("placeholder",a.urlPlaceholder),k("ngModel",a.urls)}}function ue(e,t){e&1&&(d(0,"i",31),i(1,"span"),p(2,"Finish"),o())}function fe(e,t){if(e&1&&(i(0,"div",22),d(1,"app-response-api-list",32),o()),e&2){let a=c();s(),m("data",a.downloadResponses)("configs",a.configs)}}function _e(e,t){e&1&&(i(0,"h6"),p(1,"1"),o())}function he(e,t){e&1&&(i(0,"h6"),p(1,"2"),o())}function ge(e,t){e&1&&(i(0,"h6"),p(1,"3"),o())}var Ae=(()=>{let t=class t{constructor(){this.downloadService=g(X),this.authService=g(R),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 r=this.urls.split(/\r?\n/);this.downloadService.download(r).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(r){return new(r||t)},t.\u0275cmp=b({type:t,selectors:[["app-by-url"]],features:[L([{provide:j,useValue:{displayDefaultIndicatorType:!1}}])],decls:24,vars:11,consts:[["stepper",""],["headerTitle","Tokopedia - Product Download By Url",3,"hideSearchBox","hideSearchDropdown"],[1,"btn","btn-outline-secondary","btn-fill","btn-lg"],["type","button",1,"btn","btn-outline-secondary","btn-fill","btn-lg","ms-3"],["role","button",1,"btn","btn-success","btn-fill","btn-lg","text-white","ms-3",3,"disabled"],[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(r,l){if(r&1){let Z=_();i(0,"mainpanel",1)(1,"actions"),C(2,re,3,0,"button",2),C(3,ae,2,0,"button",2),C(4,le,2,0,"button",3),C(5,pe,2,1,"button",4),o(),i(6,"content")(7,"div",5)(8,"div",6)(9,"div",7)(10,"mat-stepper",8,0),h("selectionChange",function(ee){return u(Z),f(l.onStepperChange(ee))}),i(12,"mat-step",9),S(13,se,3,0,"ng-template",10)(14,ce,16,0,"ng-template",11),o(),i(15,"mat-step",12),S(16,me,3,0,"ng-template",10)(17,de,2,2,"ng-template",11),o(),i(18,"mat-step",13),S(19,ue,3,0,"ng-template",10)(20,fe,2,2,"ng-template",11),o(),S(21,_e,2,0,"ng-template",14)(22,he,2,0,"ng-template",15)(23,ge,2,0,"ng-template",16),o()()()()()()}r&2&&(m("hideSearchBox",!0)("hideSearchDropdown",!0),s(2),x(l.stepperState=="FINISH"?2:-1),s(),x(l.stepperState=="DOWNLOAD"?3:-1),s(),x(l.stepperState=="GUIDE"?4:-1),s(),x(l.stepperState=="DOWNLOAD"?5:-1),s(5),m("selectedIndex",1),s(2),m("editable",l.stepperState!="FINISH")("completed",!0),s(3),m("editable",l.stepperState!="FINISH")("completed",!1))},dependencies:[$,K,J,G,q,W,F,A,H,Y,z],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})();export{Ae as ByUrlComponent};
@@ -0,0 +1,2 @@
1
+ import{a as qe}from"./chunk-GG3X4R7G.js";import{a as J}from"./chunk-ISMIPSYN.js";import"./chunk-TDMNVEUU.js";import"./chunk-O4U34AC7.js";import"./chunk-EH3PIGLJ.js";import{a as E}from"./chunk-Y3O22N4P.js";import{a as je,b as ze,c as Ge,d as Y,e as ee}from"./chunk-6NS3D6KQ.js";import{a as Re,b as Ne,c as Le}from"./chunk-MAQQQB3T.js";import{a as Qe}from"./chunk-R3WIWDSP.js";import{a as $e,b as He}from"./chunk-LUJ3SHSP.js";import"./chunk-IVKFEOCB.js";import{c as Ue,d as We}from"./chunk-TZTW72NT.js";import"./chunk-VP3XO25X.js";import"./chunk-5C24BA5F.js";import"./chunk-LR2YCE6M.js";import{e as Oe}from"./chunk-C2LAQOUW.js";import"./chunk-MTVUPPAN.js";import"./chunk-2NRHX6CZ.js";import{a as Ae}from"./chunk-DLHIDOS3.js";import{a as Be}from"./chunk-AJSJJV2I.js";import"./chunk-NIJCYMZM.js";import"./chunk-UMLV2ZUF.js";import"./chunk-7X4B2T6C.js";import"./chunk-PN3KM4M4.js";import"./chunk-WIRBYT7F.js";import"./chunk-ZWUYPYHD.js";import"./chunk-WVA5LYVE.js";import"./chunk-FOKLBUX6.js";import"./chunk-BXNDE6NQ.js";import"./chunk-A6QXXKPR.js";import"./chunk-DDFP4CNP.js";import"./chunk-RBZU7OVM.js";import{a as Ee,b as ke}from"./chunk-BUMWMFHU.js";import"./chunk-ROS2QMKF.js";import{a as Te,b as Pe,c as De,i as Me,j as Ve}from"./chunk-5WT456T7.js";import{a as Fe}from"./chunk-YNL43MLU.js";import"./chunk-4S4BOPUV.js";import"./chunk-TBVMCNS2.js";import"./chunk-24KZDZKS.js";import"./chunk-3RK6DDJD.js";import"./chunk-A2RTZANN.js";import"./chunk-N3E43QWK.js";import"./chunk-ZC526ERX.js";import"./chunk-XUDE7VBC.js";import"./chunk-X52ZT4MU.js";import"./chunk-BMOMTOEW.js";import"./chunk-HO2TMGLM.js";import"./chunk-RXC5D64C.js";import{c as Ie}from"./chunk-O4D64GHO.js";import"./chunk-7R2D2JZ6.js";import{a as X}from"./chunk-ZSUWHVKX.js";import{h as xe}from"./chunk-O3QPBAV5.js";import"./chunk-YYV4FSYQ.js";import"./chunk-QXRG5XYP.js";import{a as Z}from"./chunk-AGBJEXIM.js";import{a as ue,b as he,c as ge}from"./chunk-5UFP37GQ.js";import{c as y}from"./chunk-UPRDDI4K.js";import{A as be,b as fe,c as Se,h as ye,m as ve,o as we}from"./chunk-WAXAIL2I.js";import"./chunk-RQUCYFCB.js";import"./chunk-RXLMJGUY.js";import{b as pe,e as me}from"./chunk-MM7SAZOU.js";import{e as _e,g as Ce}from"./chunk-NQLMPUSB.js";import"./chunk-OSGPJXJZ.js";import{A as Q,q as ce,w as $,x as H,z as de}from"./chunk-JNRCB7N3.js";import"./chunk-XBIHN6D3.js";import{$c as se,G as j,Hb as O,Ia as M,Mc as ie,Nb as B,Nc as m,Oc as L,Pc as I,Rc as F,Sc as T,Tc as P,Uc as oe,Vc as ae,Wc as le,Xc as re,Z as R,_c as W,ac as u,ad as D,cc as h,dc as G,ea as z,fc as q,gc as K,hc as g,ic as a,id as f,jc as r,jd as b,kc as v,kd as V,mb as N,ob as s,oc as A,pc as U,ra as S,rc as w,v as k,wc as x,ya as _,yc as l,za as C}from"./chunk-OHGMB7HJ.js";import"./chunk-WFMAM73Y.js";import{a as ne}from"./chunk-66YHNWRR.js";var Ye=()=>["/menu/order/download"];function Je(i,c){if(i&1&&(a(0,"li",4)(1,"div"),m(2," The last time you manually download your order is on "),a(3,"span",8),m(4),f(5,"date"),r()(),a(6,"div",9),m(7),r()()),i&2){l();let e=le(0);s(4),I(" ",V(5,2,e==null?null:e.OrderDownloadLatestOn,"dd MMM yyyy HH:mm")," "),s(3),I("(",e==null?null:e.calculatedDate,")")}}function et(i,c){i&1&&(a(0,"li",4),m(1," The last time you manually download your order is on (-) "),r())}var Ke=(()=>{let c=class c{constructor(){this.dialogRef=S(Te),this.data=S(Pe),this.modalConfig=new Me,this.inventoryService=S(E),this.lastDownloadInfo$=this.inventoryService.getLastInfoDownloadInventory(this.data.channelId).pipe(k(n=>{let t=n.OrderDownloadLatestOn!=y.MinDate,o=null,p=null;return t&&(o=new Date(n.OrderDownloadLatestOn),p=y.convertToReadableDate(o)),{OrderDownloadLatestOn:o,calculatedDate:p}}),R(1)),this.selectedProducts=M(this.data.selectedProducts||[]),this.modalConfig.title="Manual Inventory Sync",this.modalConfig.customWidth="500px",this.modalConfig.bodyScrollable=!0,this.modalConfig.hideOk=!0,this.modalConfig.hideCancel=!0}onUpdate(){this.dialogRef.close(!0)}onCancel(){this.dialogRef.close(!1)}};c.\u0275fac=function(t){return new(t||c)},c.\u0275cmp=O({type:c,selectors:[["app-dialog-update-product-info"]],features:[W([E])],decls:16,vars:8,consts:[[3,"onCancel","config"],["content",""],[1,"container"],[1,"mt-8"],[1,"lh-base"],["footer",""],[1,"btn","btn-light-blue","me-6","text-primary","btn-lg","fw-bold","mx-3","py-8",3,"click","routerLink"],[1,"btn","btn-light-blue","me-6","text-primary","btn-lg","fw-bold","mx-3","py-8",3,"click","keyup.F2"],[1,"fw-bold","me-1"],[1,"fw-bold"]],template:function(t,o){if(t&1){let p=w();oe(0),f(1,"async"),a(2,"modal-material",0),x("onCancel",function(){return _(p),C(o.onCancel())}),a(3,"div",1)(4,"div",2)(5,"h4"),m(6),r(),a(7,"div",3)(8,"ul"),u(9,Je,8,5,"li",4)(10,et,2,0,"li",4),r()()()(),a(11,"div",5)(12,"a",6),x("click",function(){return _(p),C(o.onCancel())}),m(13," Download "),r(),a(14,"button",7),x("click",function(){return _(p),C(o.onUpdate())})("keyup.F2",function(){return _(p),C(o.onUpdate())}),m(15," Update Anyway "),r()()()}if(t&2){let p=ae(b(1,4,o.lastDownloadInfo$));s(2),g("config",o.modalConfig),s(4),I("",o.selectedProducts().length," Product(s) will be updated."),s(3),h(p!=null&&p.OrderDownloadLatestOn?9:10),s(3),g("routerLink",se(7,Ye))}},dependencies:[Ve,Q,Ce,_e,$,H],encapsulation:2});let i=c;return i})();var te=i=>[i],tt=i=>({"text-decoration-line-through":i}),nt=i=>({"me-10":i}),it=i=>({"bg-gradient-warning":i}),ot=i=>({cursor:i});function at(i,c){if(i&1){let e=w();a(0,"button",37),x("click",function(){_(e);let t=l(),o=l(2);return C(o.onScanInventory(t))}),v(1,"i",38),m(2,"Refresh "),r()}}function lt(i,c){if(i&1){let e=w();a(0,"div",35)(1,"button",39),x("click",function(){_(e);let t=l(),o=l(2);return C(o.onOpenDialogUpdateStockInfo(t))}),v(2,"i",40),m(3," Update "),r(),v(4,"button",41),a(5,"ul",42)(6,"a",43),x("click",function(){_(e);let t=l(3);return C(t.openExportDialog())}),v(7,"i",44),a(8,"span"),m(9,"Export"),r()()()()}}function rt(i,c){if(i&1){let e=w();a(0,"button",45),x("click",function(){_(e);let t=l(3);return C(t.openExportDialog())}),v(1,"i",44),a(2,"span"),m(3,"Export"),r()()}}function st(i,c){if(i&1&&(a(0,"div"),u(1,at,3,0,"button",34),u(2,lt,10,0,"div",35)(3,rt,4,0,"button",36),r()),i&2){let e=c,n=l(2);s(),h(n.productService.hasSelectionVariant(e)?1:-1),s(),h(n.productService.hasSelectionVariant(e)?2:3)}}function ct(i,c){i&1&&(a(0,"div",18)(1,"span"),m(2," showing only different stock, please press next to populate more data "),r()())}function dt(i,c){if(i&1){let e=w();a(0,"th")(1,"input",46),P("ngModelChange",function(t){_(e);let o=l(3);return T(o.checkboxState,t)||(o.checkboxState=t),C(t)}),x("ngModelChange",function(){let t=_(e),o=l(3);return C(o.onCheckboxStateChange(t))}),r()()}if(i&2){let e=l(3);s(),F("ngModel",e.checkboxState)}}function pt(i,c){if(i&1&&(A(0),u(1,dt,2,1,"th"),f(2,"async"),U()),i&2){let e,n=l(2);s(),h((e=b(2,1,n.products$))?1:-1,e)}}function mt(i,c){i&1&&(a(0,"th",31),m(1," Reserved "),r())}function _t(i,c){if(i&1){let e=w();a(0,"input",63),P("ngModelChange",function(t){_(e);let o=l(4).$implicit;return T(o.selected,t)||(o.selected=t),C(t)}),x("ngModelChange",function(){_(e);let t=l(4).$implicit,o=l(2);return C(o.onCheckboxStateProduct(t))}),r()}if(i&2){let e=l(4).$implicit;F("ngModel",e.selected)}}function Ct(i,c){if(i&1&&(A(0),a(1,"div",61),u(2,_t,1,1,"input",62),r(),U()),i&2){let e=l(3).$implicit;s(),g("ngClass",D(2,nt,e.Variants.length<=1)),s(),h(e.Variants.length>1?2:-1)}}function ut(i,c){if(i&1){let e=w();a(0,"img",64),x("click",function(t){_(e);let o=l(3).$implicit,p=l(2);return C(p.onZoomImage(t,o==null?null:o.ImageUrl))}),r()}if(i&2){let e=l(3).$implicit;g("src",re(e==null?null:e.ThumbnailUrl),N)}}function ht(i,c){i&1&&v(0,"img",58)}function gt(i,c){if(i&1&&(v(0,"br"),a(1,"div",65),v(2,"i",66),a(3,"small"),m(4),r()()),i&2){let e=l(3).$implicit;s(4),I("(",e==null?null:e.Category,")")}}function xt(i,c){if(i&1&&(a(0,"td",56)(1,"div",12),B(2,Ct,3,4,"ng-container",25),a(3,"div"),u(4,ut,1,2,"img",57)(5,ht,1,0,"img",58),r()()(),a(6,"td",59)(7,"span",60),m(8),r(),u(9,gt,5,1),r()),i&2){let e=l(2).$implicit,n=l(2);g("rowSpan",e==null?null:e.Variants.length),s(2),g("ngxPermissionsOnly",D(6,te,n.inventoryUpdateRole)),s(2),h(e!=null&&e.ThumbnailUrl?4:5),s(2),g("rowSpan",e==null?null:e.Variants.length),s(2),L(e==null?null:e.Name),s(),h(e.CategoryID!==null&&e.CategoryID!=n.guidEmpty?9:-1)}}function ft(i,c){if(i&1){let e=w();a(0,"input",46),P("ngModelChange",function(t){_(e);let o=l(3).$implicit;return T(o.selected,t)||(o.selected=t),C(t)}),r()}if(i&2){let e=l(3).$implicit;F("ngModel",e.selected)}}function St(i,c){if(i&1&&u(0,ft,1,1,"input",68),i&2){let e=l(2).$implicit;h((e==null?null:e.Inventory)<=1e5?0:-1)}}function yt(i,c){if(i&1){let e=w();a(0,"input",46),P("ngModelChange",function(t){_(e);let o=l(2).$implicit;return T(o.selected,t)||(o.selected=t),C(t)}),r()}if(i&2){let e=l(2).$implicit;F("ngModel",e.selected)}}function vt(i,c){if(i&1&&(A(0),a(1,"td",67),u(2,St,1,1)(3,yt,1,1,"input",68),r(),U()),i&2){let e=l().$implicit;s(2),h((e==null?null:e.Channel[0].TypeID)==1?2:(e==null?null:e.Inventory)>=0?3:-1)}}function wt(i,c){i&1&&(a(0,"div",51),m(1," Not Found "),r())}function bt(i,c){if(i&1&&(a(0,"div")(1,"span",69),m(2),f(3,"number"),r(),m(4," => "),a(5,"span",70),m(6),f(7,"number"),r()()),i&2){let e=l().$implicit;s(2),I(" ",b(3,2,e==null||e.I==null?null:e.I.Available)),s(4),L(b(7,4,e==null?null:e.Inventory))}}function It(i,c){if(i&1&&(m(0),f(1,"number")),i&2){let e=l().$implicit;I(" ",b(1,1,e==null?null:e.Inventory)," ")}}function Ft(i,c){if(i&1&&(a(0,"div",52)(1,"a",71),v(2,"i",72),r()()),i&2){let e=l().$implicit,n=l(3);s(),g("href",n.hostName+"/menu/Products/Catalog/Variants/Info?ID="+(e==null?null:e.ID),N)}}function Tt(i,c){if(i&1){let e=w();a(0,"span",76),x("click",function(){_(e);let t=l(2).$implicit,o=l().$implicit,p=l(2);return C(p.openTableDialog(o,t))}),m(1),f(2,"number"),r()}if(i&2){let e=l(2).$implicit,n=l(3);ie(D(5,ot,n.hasInventoryEdit())),s(),I(" ",b(2,3,e==null||e.Channel[0]==null?null:e.Channel[0].Inventory)," ")}}function Pt(i,c){if(i&1){let e=w();a(0,"td",53)(1,"div",50)(2,"div"),u(3,Tt,3,7,"span",73),f(4,"async"),r(),a(5,"div",52)(6,"a",71),v(7,"i",72),r()(),a(8,"div",52)(9,"span",74),x("click",function(){_(e);let t=l().$implicit,o=l(3);return C(o.refreshInventory(t==null||t.Channel[0]==null?null:t.Channel[0].ChannelItemID,t==null||t.Channel[0]==null?null:t.Channel[0].ChannelVariationID,t==null||t.Channel[0]==null?null:t.Channel[0].ChannelID,t==null?null:t.ID))}),v(10,"i",75),r()()()()}if(i&2){let e,n=l().$implicit,t=l(3);g("ngClass",D(5,it,(n==null?null:n.Inventory)!=(n==null||n.Channel[0]==null?null:n.Channel[0].Inventory))),s(3),h((e=b(4,3,t.products$))?3:-1,e),s(3),g("href",n==null||n.Channel[0]==null?null:n.Channel[0].Url,N)}}function Dt(i,c){if(i&1&&(a(0,"span",77),m(1),f(2,"number"),r()),i&2){let e=l(2).$implicit;s(),I(" (",b(2,1,e==null||e.Channel[0]==null?null:e.Channel[0].InventoryReserved),") ")}}function Mt(i,c){i&1&&m(0," - ")}function Vt(i,c){if(i&1&&(a(0,"td",48),u(1,Dt,3,3,"span",77)(2,Mt,1,0),r()),i&2){let e=l().$implicit;s(),h(!(e==null||e.Channel[0]==null)&&e.Channel[0].InventoryReserved?1:2)}}function Et(i,c){i&1&&m(0," - ")}function kt(i,c){if(i&1&&(a(0,"span",55),f(1,"date"),m(2),f(3,"date"),r()),i&2){let e=l().$implicit;g("matTooltip",V(1,2,e==null||e.Channel[0]==null?null:e.Channel[0].LastInventorySync,"dd MMMM yyyy HH:mm:ss")),s(2),I(" ",V(3,5,e==null||e.Channel[0]==null?null:e.Channel[0].LastInventorySync,"dd MMM yy HH:mm")," ")}}function Rt(i,c){if(i&1&&(a(0,"tr"),u(1,xt,10,8),a(2,"td",47),m(3),r(),a(4,"td",48)(5,"span",49),m(6),r()(),B(7,vt,4,1,"ng-container",25),a(8,"td")(9,"div",50),u(10,wt,2,0,"div",51),u(11,bt,8,6,"div"),u(12,It,2,3),u(13,Ft,3,1,"div",52),r()(),u(14,Pt,11,7,"td",53),u(15,Vt,3,1,"td",48),a(16,"td",54),u(17,Et,1,0)(18,kt,4,8,"span",55),r()()),i&2){let e=c.$implicit,n=c.$index,t=l(3);s(),h(n==0?1:-1),s(2),L(e==null?null:e.Model),s(2),g("matTooltip",e.Discontinued?t.discontinuedVariantMsg:"")("ngClass",D(13,tt,e.Discontinued)),s(),L(e==null?null:e.Code),s(),g("ngxPermissionsOnly",D(15,te,t.inventoryUpdateRole)),s(3),h((e==null?null:e.I)==null?10:-1),s(),h((e==null?null:e.I)!=null&&(e==null?null:e.Inventory)!=(e==null||e.I==null?null:e.I.Available)?11:-1),s(),h((e==null?null:e.Inventory)==(e==null||e.I==null?null:e.I.Available)?12:-1),s(),h((e==null?null:e.I)!=null?13:-1),s(),h(e!=null&&e.Channel?14:-1),s(),h(t.isShowReservedColumn?15:-1),s(2),h((e==null||e.Channel[0]==null?null:e.Channel[0].LastInventorySync)==t.minDate?17:18)}}function Nt(i,c){if(i&1&&(a(0,"tbody"),q(1,Rt,19,17,"tr",null,G),r()),i&2){let e=c.$implicit;s(),K(e.Variants)}}function Lt(i,c){if(i&1){let e=w();a(0,"mainpanel",1),x("onSubmit",function(t){_(e);let o=l();return C(o.onSearch(t))}),a(1,"actions")(2,"div",2),u(3,st,4,2,"div"),f(4,"async"),r()(),a(5,"filters")(6,"div",3)(7,"label",4),m(8,"Channel"),r(),a(9,"multiwarehouse-tree-select",5),x("onChannelChange",function(t){_(e);let o=l();return C(o.onChannelChange(t))}),r()(),a(10,"div",3)(11,"filter-query-type",6),P("numberFilterComparatorChange",function(t){_(e);let o=l();return T(o.searchFilter.NumberFilterComparator,t)||(o.searchFilter.NumberFilterComparator=t),C(t)})("searchTypeChange",function(t){_(e);let o=l();return T(o.searchFilter.SearchType,t)||(o.searchFilter.SearchType=t),C(t)}),r()(),a(12,"div",3)(13,"label",7),m(14,"PageNumber"),r(),a(15,"input",8),P("ngModelChange",function(t){_(e);let o=l();return T(o.searchFilter.PageNumber,t)||(o.searchFilter.PageNumber=t),C(t)}),r()(),a(16,"div",3)(17,"label",9),m(18,"Page Size"),r(),a(19,"input",10),P("ngModelChange",function(t){_(e);let o=l();return T(o.searchFilter.RowCount,t)||(o.searchFilter.RowCount=t),C(t)}),r()(),a(20,"div")(21,"label",11),m(22,"Quantity From - To"),r(),a(23,"div",12)(24,"input",13),P("ngModelChange",function(t){_(e);let o=l();return T(o.searchFilter.QuantityFrom,t)||(o.searchFilter.QuantityFrom=t),C(t)}),r(),m(25," - "),a(26,"input",14),P("ngModelChange",function(t){_(e);let o=l();return T(o.searchFilter.QuantityTo,t)||(o.searchFilter.QuantityTo=t),C(t)}),r()()()(),a(27,"content")(28,"div",15)(29,"div",16)(30,"div",17),u(31,ct,3,0,"div",18),a(32,"table",19),x("matSortChange",function(t){_(e);let o=l();return C(o.onSortVariant(t))}),a(33,"thead",20)(34,"tr")(35,"th",21),m(36," Product "),v(37,"br"),a(38,"mat-slide-toggle",22),x("toggleChange",function(){_(e);let t=l();return t.showDifferenceStock=!t.showDifferenceStock,C(t.onShowDifferenceStock())}),a(39,"small",11),m(40,"FILTER DIFFERENT INVENTORY"),r()()(),a(41,"th",23),m(42,"Variant"),r(),a(43,"th",24),m(44,"SKU"),r(),B(45,pt,3,3,"ng-container",25),a(46,"th",26),m(47," POS "),r(),a(48,"th",27)(49,"div",28),x("click",function(){_(e);let t=l();return C(t.openModalFilter())}),v(50,"img",29),a(51,"span",30),m(52),f(53,"stringLimit"),r()()(),u(54,mt,2,0,"th",31),a(55,"th",32),m(56,"Last Sync"),r()()(),q(57,Nt,3,0,"tbody",null,G),f(59,"async"),r(),a(60,"infinite-paginator",33),f(61,"async"),x("onNextPage",function(){_(e);let t=l();return C(t.infinitePagination.onNextPage(t.searchFilter))})("onLastPage",function(){_(e);let t=l();return C(t.infinitePagination.onLastPage(t.searchFilter))})("onGetRowCount",function(){_(e);let t=l();return C(t.infinitePagination.getRowCount(t.searchFilter))}),r()()()()()()}if(i&2){let e,n,t,o,p=c,d=l();g("hideSearchBox",!1)("searchBoxPlaceHolder",d.searchPlaceholder()),s(3),h((e=b(4,24,d.products$))?3:-1,e),s(6),g("ngModel",(d.searchFilter==null?null:d.searchFilter.LocationID)||(d.searchFilter==null?null:d.searchFilter.ChannelID)),s(2),g("numberFilterComparatorOptions",p==null||p.Options==null?null:p.Options.SearchComparatorTypeOptions),F("numberFilterComparator",d.searchFilter.NumberFilterComparator),g("searchTypeOptions",p==null||p.Options==null?null:p.Options.SearchSKUOnlyOrSKUNameOptions),F("searchType",d.searchFilter.SearchType),s(4),F("ngModel",d.searchFilter.PageNumber),s(4),F("ngModel",d.searchFilter.RowCount),s(5),F("ngModel",d.searchFilter.QuantityFrom),s(2),F("ngModel",d.searchFilter.QuantityTo),s(5),h((d.searchFilter==null?null:d.searchFilter.filterModel)==3?31:-1),s(14),g("ngxPermissionsOnly",D(33,te,d.inventoryUpdateRole)),s(4),g("matTooltip",((n=d.channelIdentity())==null||n.label==null?null:n.label.length)>13?(n=d.channelIdentity())==null?null:n.label:""),s(),g("src",(t=d.channelIdentity())==null?null:t.img,N),s(2),I(" ",V(53,26,(o=d.channelIdentity())==null?null:o.label,13)," "),s(2),h(d.isShowReservedColumn?54:-1),s(3),K(b(59,29,d.products$)),s(3),g("totalData",d.infinitePagination.totalData())("hideCount",d.infinitePagination.hideCount())("rowCount",b(61,31,d.infinitePagination.totalRowCount$))("pageNumber",d.infinitePagination.pageNumber())("disableNextButton",d.infinitePagination.disableNextButton())("goToLastPage",d.infinitePagination.isLastPage())}}var Ln=(()=>{let c=class c{constructor(){this.http=S(me),this.toastr=S(pe),this.dialog=S(De),this.productService=S(Be),this.authService=S(xe),this.biggerPictureService=S(Ae),this.mainPanelService=S(Ee),this.placeholderService=S(Ue),this.infinitePagination=S(Y),this.ngxPermissionsService=S(ue),this.updateResHandling=S(ee),this.inventoryService=S(E),this.checkboxState=!1,this.showDifferenceStock=!1,this.loaderApi="InventoryLoader/Load",this.fetchApi="Inventory/GetSingleChannelComparison",this.rowCountApi="Inventory/GetInventoryByChannelRowCount",this.minDate=y.MinDate,this.isShowReservedColumn=!0,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.guidEmpty=y.GuidEMpty,this.selectedChannel=M(null),this.channelIdentity=M({img:null,label:null}),this.inventoryUpdateRole=X.InventoryUpdate,this.hasInventoryEdit=M(!0),this.searchPlaceholder=M("Search ...")}ngOnInit(){this.initRoles(),this.hostName=this.authService.getDomain(),this.initPageLoader(),this.sourceObs$=this.infinitePagination.data$.pipe(z(n=>{this.checkShowReservedColumn(n)}),k(n=>(n=this.calculateAvailableStock(n),n)),R(1)),this.products$=this.sourceObs$}initPageLoader(){this.infinitePagination.fetchDataEndpoint=this.fetchApi,this.infinitePagination.fethRowCountEndpoint=this.rowCountApi,this.loader$=this.http.post(`/api/${this.loaderApi}`,{}).pipe(R(1),z(n=>{this.searchFilter={RowCount:n.Filter?.PageSize,filterModel:1,PageNumber:1,ChannelID:n.Filter?.ChannelID,LocationID:n.Filter?.LocationID,NumberFilterComparator:n.Filter?.NumberFilterComparator,SearchType:n.Filter?.SearchType},this.initReloadData(),this.initSearchPlaceholder(),this.showToastrMarketplaceInactive(!n.Filter.IsMarketplaceAppActive)}))}initSearchPlaceholder(){this.searchPlaceholder.set(this.placeholderService.generatePlaceholderBySearchType(this.searchFilter.SearchType,this.searchFilter.NumberFilterComparator))}initRoles(){this.ngxPermissionsService.hasPermission(X.InventoryUpdate).then(n=>this.hasInventoryEdit.set(n))}calculateAvailableStock(n){return n.map(o=>(o.totalAvailable=o.Variants.reduce((p,d)=>(p+=d.I?.Available||0,p),0),o))}checkShowReservedColumn(n){let t=0,o;n.forEach(p=>{o=p.Variants.find(d=>y.IsNotEmpty(d?.Channel[0]?.InventoryReserved)),o&&(t+=1)}),this.isShowReservedColumn=t>0}onChannelChange(n){let t=Object.assign({},n);this.selectedChannel.set(t),y.IsEmpty(this.channelIdentity()?.label)&&this.setChannelFilter()}setChannelFilter(){if(this.selectedChannel()){let n=Object.assign({},this.selectedChannel());y.IsNotEmpty(n.parent)?(this.searchFilter.LocationID=n.id,this.searchFilter.ChannelID=n?.parent?.id,n.label=n?.parent?.label+" - "+n?.label,n.img=y.getChannelLogoByTypeId(n?.parent?.typeid)):(this.searchFilter.LocationID=null,n.img=y.getChannelLogoByTypeId(n?.typeid),this.searchFilter.ChannelID=n?.id,this.selectedChannel.set(n)),this.channelIdentity.update(()=>({img:n.img,label:n.label}))}}initReloadData(){this.infinitePagination.reloadPagination(this.searchFilter)}showToastrMarketplaceInactive(n){n&&this.toastr.warning(`Automatic inventory sync disabled.
2
+ Please enable Dealpos X Marketplace Apps integration in POS Configuration`,"Warning")}onSearch(n){this.searchFilter.text=n,this.setChannelFilter(),this.initReloadData(),this.initSearchPlaceholder()}openModalFilter(){this.mainPanelService.openModalFilter()}onOpenDialogUpdateStockInfo(n){let t=this.productService.selectedVariantProduct(n);this.dialog.open(Ke,{data:{channelId:t[0]?.Channel[0]?.ChannelID,selectedProducts:t}}).afterClosed().pipe(j(o=>o===!0)).subscribe(()=>{this.updateStock(t)})}updateStock(n){if(n.length>0){let t=this.searchFilter.LocationID,o=n.map(d=>ne({ChannelItemID:d?.Channel[0]?.ChannelItemID,ChannelVariationID:d?.Channel[0]?.ChannelVariationID,Inventory:d.Inventory},y.IsNotEmpty(t)&&{LocationID:t})),p={ListChannelID:[this.searchFilter.ChannelID],List:o};this.http.post(Z.UpdateInventoryChannel,p).subscribe(d=>{this.initReloadData(),this.checkboxState=!1,this.handlingUpdateStock(d)})}}handlingUpdateStock(n){if(n[0]?.Response){let t=n[0]?.Response?.Fail_list,o=n[0]?.Response?.Success_list;this.updateResHandling.responseHandling(o,t,"Stock")}else this.toastr.error(n[0]?.Exception,"Error")}refreshInventory(n,t,o,p){let d={ChannelItemID:n,ChannelVariationID:t,ChannelID:o,VariantID:p};this.http.post("/api/Inventory/RefreshInventoryChannel",d).subscribe(Ot=>{this.toastr.success("Successfully updated","Success"),this.initReloadData()})}onCheckboxStateProduct(n){n.Variants=n.Variants.map(t=>(t.Inventory>=0&&(t.selected=n.selected),t))}onCheckboxStateChange(n){n=n.map(t=>(t.Variants=t.Variants.map(o=>(o.selected=this.checkboxState,o)),t))}openTableDialog(n,t){this.hasInventoryEdit()&&this.dialog.open(je,{data:{Name:n.Name,Variant:t,ChannelID:t?.Channel[0]?.ChannelID,Table:"inventory",ChannelItemID:n.ChannelItemID}}).afterClosed().pipe(j(p=>y.IsNotEmpty(p))).subscribe(p=>{this.updateItemAfterDialog(p)})}updateItemAfterDialog(n){let t=n.InventoryMultiwarehouse[0]?.LocationID,o={ID:n.ChannelID,ChannelItemID:n.ChannelItemID,ChannelVariantID:n.ChannelVariationID,NewQuantity:n?.Inventory,VariantID:n.ID,SKU:n?.Sku,LocationID:t};this.http.post(Z.UpdateUpdateQuantityByItem,o).subscribe(p=>{this.searchFilter.PageNumber=1,this.initReloadData(),this.handlingUpdateStock([p])})}onScanInventory(n){let t=this.productService.selectedVariantProduct(n);this.inventoryService.refreshInventory(t).subscribe(()=>{this.initReloadData(),this.toastr.success("Inventory refreshed successfully","Success")})}openExportDialog(){this.dialog.open(Qe,{data:{title:"Export Inventory Single Channel Comparison",pageNumber:this.searchFilter.PageNumber,rowCount:this.searchFilter.RowCount,filterExport:this.searchFilter,getRowCountApi:this.rowCountApi,QuantityFrom:this.searchFilter.QuantityFrom,QuantityTo:this.searchFilter.QuantityTo,exportApi:"Inventory/GetExportSingleChannelComparison"}}).afterClosed().subscribe()}onShowDifferenceStock(){this.showDifferenceStock?this.searchFilter.filterModel=J.DIFFERENCE:this.searchFilter.filterModel=J.ALL,this.initReloadData()}onZoomImage(n,t){this.biggerPictureService.openBiggerPicture(n,t)}onSortVariant(n){if(n.direction==""){this.products$=this.sourceObs$;return}this.products$=this.products$.pipe(k(t=>t.map(o=>(o.Variants=o.Variants.sort((p,d)=>y.compare(p.I?.Available,d.I?.Available,n.direction==="asc")),o)).sort((o,p)=>y.compare(o.totalAvailable,p.totalAvailable,n.direction==="asc"))))}};c.\u0275fac=function(t){return new(t||c)},c.\u0275cmp=O({type:c,selectors:[["app-single-channel-comparison"]],features:[W([Y,E,ee])],decls:2,vars:3,consts:[["headerTitle","Inventory Comparison","textButton","Search",3,"hideSearchBox","searchBoxPlaceHolder"],["headerTitle","Inventory Comparison","textButton","Search",3,"onSubmit","hideSearchBox","searchBoxPlaceHolder"],[1,"d-flex"],[1,"mb-5"],["for","channelOptions",1,"fw-bold","mb-2"],["id","channelOptions",3,"onChannelChange","ngModel"],[3,"numberFilterComparatorChange","searchTypeChange","numberFilterComparatorOptions","numberFilterComparator","searchTypeOptions","searchType"],["for","PageNumber",1,"fw-bold"],["type","number","id","PageNumber","placeholder","PageNumber","name","PageNumber","data-toggle","tooltip","matTooltip","Page Number",1,"mat-mdc-tooltip-trigger","form-control","ng-pristine","ng-valid","ng-touched","mt-3",3,"ngModelChange","ngModel"],["for","RowCount",1,"fw-bold"],["type","number","id","RowCount","placeholder","Page Size","name","RowCount","data-toggle","tooltip","matTooltip","Page Size",1,"mat-mdc-tooltip-trigger","form-control","ng-pristine","ng-valid","ng-touched","mt-3",3,"ngModelChange","ngModel"],[1,"fw-bold"],[1,"d-flex","align-items-center","justify-content-start"],["type","number","name","QuantityFrom",1,"w-25","me-2","mt-3","form-control",3,"ngModelChange","ngModel"],["type","number","name","QuantityTo",1,"w-25","ms-2","form-control","mt-2",3,"ngModelChange","ngModel"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],["role","alert",1,"alert","alert-warning","d-flex","justify-content-between","text-dark"],["matSort","",1,"table","border-bottom",3,"matSortChange"],[1,"thead-light","sticky-top-thead"],["scope","col","colspan","2",1,"text-center","ps-12",2,"width","25%"],[3,"toggleChange"],["scope","col",1,"text-start"],["scope","col",1,"text-end",2,"width","10%"],[4,"ngxPermissionsOnly"],["scope","col","mat-sort-header","Available","arrowPosition","before",1,"text-end","w-10",2,"width","8%"],[1,"text-end",2,"width","150px"],["role","button","matTooltipPosition","above",1,"d-inline-block",3,"click","matTooltip"],[2,"width","16px",3,"src"],[1,"ms-1"],["matTooltip","Reserved Stock","matTooltipPosition","above",1,"text-end",2,"width","80px"],[1,"text-center",2,"width","145px"],[3,"onNextPage","onLastPage","onGetRowCount","totalData","hideCount","rowCount","pageNumber","disableNextButton","goToLastPage"],["matTooltip","Fetch the latest stock directly from the channel",1,"btn","btn-outline-dark","me-3"],[1,"btn-group"],[1,"btn","btn-outline-secondary","shadow","rounded"],["matTooltip","Fetch the latest stock directly from the channel",1,"btn","btn-outline-dark","me-3",3,"click"],[1,"fa-solid","fa-arrows-rotate","me-3"],[1,"btn","btn-success",3,"click"],[1,"fas","fa-chevron-circle-up"],["data-bs-toggle","dropdown","aria-expanded","false",1,"btn","btn-success","btn-sm","dropdown-toggle","border-start"],[1,"dropdown-menu","dropdown-menu-end","pointer"],["role","button",1,"dropdown-item","cursor-pointer","fs-5",3,"click"],[1,"fa-solid","fa-print","me-3"],[1,"btn","btn-outline-secondary","shadow","rounded",3,"click"],["type","checkbox",3,"ngModelChange","ngModel"],[1,"text-start"],[1,"text-end"],["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"],[1,"text-center"],["matTooltipShowDelay","500",3,"matTooltip"],[1,"text-start",2,"width","0%",3,"rowSpan"],[1,"border","rounded","w-img","cursor-pointer",2,"margin-left","20px",3,"src"],["src","//res.cloudinary.com/pos/image/upload/w_40/POS/Images/Icon/products_thumb.png",1,"border","rounded","w-img",2,"margin-left","20px"],[1,"text-start",3,"rowSpan"],[1,"item-name","mb-0"],[3,"ngClass"],["type","checkbox",1,"me-3",3,"ngModel"],["type","checkbox",1,"me-3",3,"ngModelChange","ngModel"],[1,"border","rounded","w-img","cursor-pointer",2,"margin-left","20px",3,"click","src"],[1,"d-flex","align-items-center"],["title","Category",1,"fa-solid","fa-tags","me-2",2,"opacity","60%"],[1,"align-middle"],["type","checkbox",3,"ngModel"],["title","Stock Available"],["title","Inventory below minimum inventory"],["target","_blank",3,"href"],[1,"fa-solid","fa-arrow-up-right-from-square","external-link-custom"],[3,"class"],["matTooltip","Refresh stock according to seller center",1,"pl-5","cursor-pointer",2,"color","var(--bs-link-color)",3,"click"],[1,"fas","fa-sync","fa-lg","external-link-custom","pt-1"],[3,"click"],[1,"text-danger"]],template:function(t,o){if(t&1&&(u(0,Lt,62,35,"mainpanel",0),f(1,"async")),t&2){let p;h((p=b(1,1,o.loader$))?0:-1,p)}},dependencies:[Q,ce,ke,Oe,be,Se,we,fe,ye,ve,Ge,ge,he,He,$e,Fe,Ie,Le,Re,Ne,qe,We,$,de,H,ze],styles:[".w-10[_ngcontent-%COMP%]{width:10%}.w-img[_ngcontent-%COMP%]{width:40px;height:40px}.item-name[_ngcontent-%COMP%]{margin-bottom:-14px!important;font-size:larger}input[type=checkbox][_ngcontent-%COMP%]{width:15px;height:15px}"]});let i=c;return i})();export{Ln as SingleChannelComparisonComponent};
@@ -1,4 +1,4 @@
1
- import{a as g,d as y}from"./chunk-LOWGZOML.js";import{ja as u}from"./chunk-5PMKN6PM.js";import{Fd as d,Gb as a,Kb as c,Lc as l,Oa as o,Zc as m,ma as r,ra as s,yc as p,zc as f}from"./chunk-ZYJ6LAJ3.js";var v=["*"],b=`
1
+ import{a as g,d as y}from"./chunk-RBZU7OVM.js";import{ua as u}from"./chunk-RXC5D64C.js";import{Ac as f,Fd as d,Hb as a,Lb as c,Mc as l,Pa as o,_c as m,ma as r,ra as s,zc as p}from"./chunk-OHGMB7HJ.js";var v=["*"],b=`
2
2
  .p-icon {
3
3
  display: inline-block;
4
4
  vertical-align: baseline;
@@ -0,0 +1 @@
1
+ import{a as G,b as U}from"./chunk-6F62N7RZ.js";import{a as R,b as $,d as ft,e as ut,f as ht,g as Ct,i as N,j as _t}from"./chunk-5WT456T7.js";import{a as L}from"./chunk-YNL43MLU.js";import{c as Mt}from"./chunk-2ST3DMR6.js";import{a as at}from"./chunk-A2RTZANN.js";import{f as ot}from"./chunk-N3E43QWK.js";import{c as gt}from"./chunk-O4D64GHO.js";import{a as ct}from"./chunk-AGBJEXIM.js";import{b as v,c as lt}from"./chunk-UPRDDI4K.js";import{A as st,h as mt,m as pt}from"./chunk-WAXAIL2I.js";import{b as rt,e as dt}from"./chunk-MM7SAZOU.js";import{A,q as F,z as it}from"./chunk-JNRCB7N3.js";import{Ac as E,Hb as S,Ia as w,Jc as X,Nc as c,Oc as T,Pc as b,Rc as Z,Sc as tt,Tc as et,_b as H,ac as h,ad as V,bd as W,cc as C,dc as z,dd as nt,ec as J,fc as I,gc as D,hc as m,ic as l,id as B,jc as r,jd as j,kc as g,lb as q,mb as k,ob as d,ra as _,rc as x,tb as P,wc as u,ya as M,yc as p,za as y,zc as Q}from"./chunk-OHGMB7HJ.js";var O=(function(e){return e.Tokopedia="https://seller.tokopedia.com",e.Shoope="https://seller.shopee.co.id",e.Tiktok="https://seller-id.tiktok.com",e.WooCommerce="https://woocommerce.dealpos.app",e.Lazada="https://sellercenter.lazada.co.id",e})(O||{});var K={Success:"Success",Info:"Info",Warning:"Warning",Error:"Error"};var Tt=[[["header"]],[["content"]],[["footer"]]],vt=["header","content","footer"],Ot=(e,o)=>({bodyScrollable:e,hideScrollbar:o}),kt=(e,o,t,a)=>({"bg-success":e,"bg-warning":o,"bg-info":t,"bg-danger":a}),St=e=>({"mx-auto":e}),wt=(e,o)=>({"show-footer":e,"p-0":o});function Pt(e,o){if(e&1){let t=x();l(0,"div",7),u("click",function(){M(t);let i=p();return y(i.onBack.emit())}),l(1,"a",8),g(2,"i",9),r()()}}function It(e,o){if(e&1){let t=x();l(0,"div")(1,"a",10),u("click",function(){M(t);let i=p();return y(i.onClose.emit())}),g(2,"i",11),r()()}}function Dt(e,o){if(e&1){let t=x();l(0,"a",14),u("click",function(){M(t);let i=p(2);return y(i.onCancel.emit())}),c(1),r()}if(e&2){let t=p(2);d(),b(" ",t.config!=null&&t.config.cancelText?t.config==null?null:t.config.cancelText:"Cancel")}}function Et(e,o){if(e&1){let t=x();l(0,"button",15),u("click",function(){M(t);let i=p(2);return y(i.onOk.emit())})("keyup.F2",function(){M(t);let i=p(2);return y(i.onOk.emit())}),r()}if(e&2){let t=p(2);m("disabled",!(t.config!=null&&t.config.validated)||!t.dynamicValidated)("innerHTML",t.config!=null&&t.config.okText?t.config==null?null:t.config.okText:"Ok (F2)",q)}}function Vt(e,o){if(e&1&&(l(0,"mat-dialog-actions",6),E(1,2),h(2,Dt,2,1,"a",12),h(3,Et,1,2,"button",13),r()),e&2){let t=p();d(2),C(t.config!=null&&t.config.hideCancel?-1:2),d(),C(t.config!=null&&t.config.hideOk?-1:3)}}var Y=class{constructor(){this.title="New Modal",this.okText="Ok (F2)",this.cancelText="Cancel",this.hideFooter=!1,this.hideCancel=!1,this.hideOk=!1,this.hideClose=!1,this.eMoney=!1,this.headerType=K.Success,this.validated=!0,this.customWidth="initial",this.bodyScrollable=!1,this.hideScrollbar=!1,this.disableKeyup=!1,this.noPadding=!1}},bt=(()=>{let o=class o{constructor(){this.dynamicValidated=!0,this.onOk=new P,this.onCancel=new P,this.onClose=new P,this.onBack=new P,this.headerType=K}ngOnInit(){this.config==null&&(this.config=new Y)}onKeyup(a){this.config?.disableKeyup||(a.code=="F2"&&this.onOk.emit("F2"),(a.code=="Enter"||a.code=="NumpadEnter")&&this.onOk.emit("Enter"))}};o.\u0275fac=function(i){return new(i||o)},o.\u0275cmp=S({type:o,selectors:[["modal-material"]],inputs:{config:"config",dynamicValidated:"dynamicValidated"},outputs:{onOk:"onOk",onCancel:"onCancel",onClose:"onClose",onBack:"onBack"},ngContentSelectors:vt,decls:11,vars:23,consts:[["id","modal_material",1,"modal-material","d-flex","align-items-start","flex-column","position-relative","maxHeight",3,"keyup","ngClass"],["mat-dialog-title","",1,"d-flex","w-100","justify-content-between","modal-header","position-relative",3,"ngClass"],[1,"back-button","position-absolute","pointer","d-print-none"],[1,"d-flex","flex-row","d-print-none","align-items-center",3,"ngClass"],[1,"fw-normal"],[1,"modal-body","w-100",3,"ngClass"],[1,"w-100","py-7","border-top","d-flex","justify-content-end","d-print-none"],[1,"back-button","position-absolute","pointer","d-print-none",3,"click"],[1,"btn","back-button"],[1,"fa-solid","fa-arrow-left"],[1,"btn-light-blue","btn-sm","pointer","close",3,"click"],[1,"fa-solid","fa-xmark","fa-lg","text-primary"],[1,"btn","btn-light-blue","text-primary","btn-lg","fw-bold","mx-3"],["data-cy","btn-ok",1,"btn","btn-light-blue","me-6","text-primary","btn-lg","fw-bold","mx-3",3,"disabled","innerHTML"],[1,"btn","btn-light-blue","text-primary","btn-lg","fw-bold","mx-3",3,"click"],["data-cy","btn-ok",1,"btn","btn-light-blue","me-6","text-primary","btn-lg","fw-bold","mx-3",3,"click","keyup.F2","disabled","innerHTML"]],template:function(i,n){i&1&&(Q(Tt),l(0,"div",0),u("keyup",function(f){return n.onKeyup(f)}),l(1,"div",1),h(2,Pt,3,0,"div",2),l(3,"div",3)(4,"h4",4),c(5),r(),E(6),r(),h(7,It,3,0,"div"),r(),l(8,"mat-dialog-content",5),E(9,1),r(),h(10,Vt,4,2,"mat-dialog-actions",6),r()),i&2&&(X("width",n.config==null?null:n.config.customWidth),m("ngClass",W(10,Ot,n.config==null?null:n.config.bodyScrollable,n.config==null?null:n.config.hideScrollbar)),d(),m("ngClass",nt(13,kt,n.headerType.Success==(n.config==null?null:n.config.headerType),n.headerType.Warning==(n.config==null?null:n.config.headerType),n.headerType.Info==(n.config==null?null:n.config.headerType),n.headerType.Error==(n.config==null?null:n.config.headerType))),d(),C(n.config!=null&&n.config.eMoney?2:-1),d(),m("ngClass",V(18,St,n.config==null?null:n.config.eMoney)),d(2),T(n.config==null?null:n.config.title),d(2),C(n.config!=null&&n.config.hideClose?-1:7),d(),m("ngClass",W(20,wt,!(n.config!=null&&n.config.hideFooter),n.config==null?null:n.config.noPadding)),d(2),C(n.config!=null&&n.config.hideFooter?-1:10))},dependencies:[A,F,Ct,ft,ht,ut],styles:[".mat-mdc-dialog-container{padding:0!important;border-radius:4px!important;overflow:visible!important} .mat-mdc-dialog-container [mat-dialog-title]{color:#fff;padding:15px;border:none}@media print{ .mat-mdc-dialog-container{box-shadow:unset;width:100vw}}@media print{ .cdk-overlay-pane{position:absolute!important;top:-30px;max-width:100vw!important}.modal-body[_ngcontent-%COMP%]{width:100vw!important}}body.modal-body[_ngcontent-%COMP%]{height:100%;overflow-y:hidden}mat-dialog-actions[_ngcontent-%COMP%]{bottom:15px}mat-dialog-actions[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{padding:15px!important;margin-right:12px}mat-dialog-actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{padding:15px!important}mat-dialog-actions[_ngcontent-%COMP%] .more[_ngcontent-%COMP%]{margin-right:auto;margin-top:-1rem;padding-top:.4rem!important;margin-left:1rem}.back-button[_ngcontent-%COMP%]{top:5px;left:0}.close[_ngcontent-%COMP%]{padding:.4rem .5rem}.no-padding[_ngcontent-%COMP%]{padding:0}.modal-material[_ngcontent-%COMP%]{width:40vw}@media (max-width: 992px){.modal-material[_ngcontent-%COMP%]{width:50vw!important}}@media (max-width: 576px){ .dialog-filter .modal-material{width:100%!important} .dialog-filter mat-dialog-actions{position:sticky;bottom:0;background:#fff} .dialog-filter .modal-material.d-flex.align-items-start.flex-column.position-relative.maxHeight.bodyScrollable.maxHeight.bodyScrollable .modal-body{max-height:100%!important;overflow-y:auto}}.maxHeight.bodyScrollable[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%]{max-height:450px;overflow-y:auto}.modal-header[_ngcontent-%COMP%], .modal-footer[_ngcontent-%COMP%], .modal-footer[_ngcontent-%COMP%] .btn[_ngcontent-%COMP%]{padding:15px}.modal-dialog[_ngcontent-%COMP%]{max-width:none}.modal-content[_ngcontent-%COMP%]{width:auto;margin:auto;max-width:850px}.maxHeight[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%]{max-height:450px;overflow:auto}.modal-body[_ngcontent-%COMP%]{padding:1rem}.modal-body[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{display:block}.modal-body[_ngcontent-%COMP%] .more[_ngcontent-%COMP%]{margin:0;position:absolute;bottom:-20px}.modal-body[_ngcontent-%COMP%] input[type=text][_ngcontent-%COMP%], .modal-body[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%], .modal-body[_ngcontent-%COMP%] input[type=password][_ngcontent-%COMP%]{border:1px solid #c8d3df;padding:5px 7px}.modal-body[_ngcontent-%COMP%] table[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]{width:330px;height:90px}"]});let e=o;return e})();var Ft=e=>({"is-disabled":e});function At(e,o){if(e&1&&(l(0,"tr")(1,"td",8),c(2),r(),l(3,"td",8),c(4),r(),l(5,"td",9)(6,"p",10),c(7,"Product Not in Channel!"),r()()()),e&2){let t=p().$implicit;d(2),b(" ",t==null?null:t.Model," "),d(2),b(" ",t==null?null:t.Code," ")}}function Lt(e,o){if(e&1&&(l(0,"td",8),c(1),r()),e&2){let t=p(3).$implicit;H("rowspan",t.Channel.length),d(),b(" ",t==null?null:t.Model," ")}}function Rt(e,o){if(e&1&&(l(0,"td",8),c(1),r()),e&2){let t=p(3).$implicit;H("rowspan",t.Channel.length),d(),b(" ",t==null?null:t.Code," ")}}function $t(e,o){if(e&1){let t=x();l(0,"tr"),h(1,Lt,2,2,"td",8),h(2,Rt,2,2,"td",8),l(3,"td",8)(4,"div",11)(5,"a",12),g(6,"img",13),r(),l(7,"div",14),c(8),r()()(),l(9,"td",8),c(10),B(11,"number"),r(),l(12,"td",15),c(13),B(14,"number"),r(),l(15,"td",16)(16,"div",17)(17,"button",18),u("click",function(){let i=M(t).$implicit,n=p(2).$implicit,s=p();return y(s.onDetach(i,n))}),g(18,"i",19),l(19,"span",20),c(20,"Detach"),r()(),l(21,"a",21),g(22,"i",22),l(23,"span",20),c(24,"Edit"),r()()()()()}if(e&2){let t=o.$implicit,a=o.$index,i=p(3);d(),C(a==0?1:-1),d(),C(a==0?2:-1),d(3),m("href",t.Url,k)("title",t.Title),d(),m("src",i.getChannelLogo(t.TypeID),k),d(),m("matTooltip",(t==null||t.Name==null?null:t.Name.length)>40?t==null?null:t.Name:""),d(),b(" ",t.Name," "),d(2),T(j(11,12,t.Price)),d(3),T(j(14,14,t.Inventory)),d(8),m("href",i.getHyperlinkSellerCenter(t),k)("ngClass",V(16,Ft,t.TypeID==i.channelType.KalCare))("matTooltip",t.TypeID!=i.channelType.KalCare?"Edit this product in Seller Center, inventory changes must be done via DEALPOS":"")}}function Nt(e,o){if(e&1&&I(0,$t,25,18,"tr",null,z),e&2){let t=p().$implicit;D(t==null?null:t.Channel)}}function Ht(e,o){if(e&1&&h(0,At,8,2,"tr")(1,Nt,2,0),e&2){let t=o.$implicit;C(!t.Channel||t.Channel.length<1?0:1)}}var fe=(()=>{let o=class o{constructor(){this.data=_($),this.dialogRef=_(R),this.httpService=_(dt),this.toastr=_(rt),this.variants=w([]),this.channelType=v;let a=this.data;this.variants.set(this.data.variants),this.title=a.title}ngOnInit(){this.initModalConfig()}initModalConfig(){this.modalConfig=new N,this.modalConfig.title=this.data.title,this.modalConfig.bodyScrollable=!0,this.modalConfig.hideFooter=!0,this.modalConfig.customWidth="850px"}onDetach(a,i){let n={ChannelID:a.ChannelID,ChannelItemID:a.ChannelItemID,ChannelVariationID:a.ChannelVariationID};this.httpService.post(ct.DetachVariant,[n]).subscribe(s=>{this.toastr.success(s.Message,"Success"),this.updateVariantAfterDetach(i,a.ChannelVariationID)})}updateVariantAfterDetach(a,i){this.variants.update(n=>{let s=n.findIndex(f=>f.ID===a.ID);return s!==-1&&(n[s].Channel=n[s].Channel.filter(f=>f.ChannelVariationID!==i)),[...n]})}getChannelLogo(a){return lt.getChannelLogoByTypeId(a)}getHyperlinkSellerCenter(a){let i="javascript:void(0)";switch(a.TypeID){case v.Shopee:i=`${O.Shoope}/portal/product/${a.ChannelItemID}`;break;case v.Tiktok:i=`${O.Tiktok}/product/edit/${a.ChannelItemID}`;break;case v.Tokopedia:i=`${O.Tokopedia}/edit-product/${a.ChannelItemID}`;break;case v.WooCommerce:i=`${O.WooCommerce}/wp-admin/post.php?post=${a.ChannelItemID}&action=edit`;break;case v.Lazada:i=`${O.Lazada}/apps/product/publish?productId=${a.ChannelItemID}`;break}return i}};o.\u0275fac=function(i){return new(i||o)},o.\u0275cmp=S({type:o,selectors:[["app-modal-variant"]],decls:27,vars:1,consts:[[3,"onClose","onCancel","config"],[1,"table"],[1,"sticky-top-thead","variant-modal"],[1,"text-start","sticky-top"],[1,"d-flex","align-items-center"],["matTooltip","Variant from POS",1,"fas","fa-info-circle","ms-1"],["matTooltip","Product and Variant from each Channel",1,"fas","fa-info-circle","ms-1"],[1,"text-start","sticky-top",2,"width","0%"],[1,"text-start"],["colspan","3",1,"text-center"],[1,"my-auto"],[1,"d-flex"],["target","_blank",1,"me-1",3,"href","title"],[2,"width","20px","height","20px",3,"src"],[1,"text-ellipsis","ps-2",2,"max-width","18vw",3,"matTooltip"],[1,"text-center"],[1,"text-end"],[1,"d-flex","align-items-center","justify-content-end"],[1,"btn","btn-small","btn-light","px-4","py-2","me-3",3,"click"],[1,"fa-sharp","fa-link-slash","me-2",2,"font-size","10px"],[1,"fs-6"],["target","_blank",1,"btn","btn-small","btn-light","px-4","py-2",3,"href","ngClass","matTooltip"],[1,"fa-solid","fa-edit","me-2",2,"font-size","10px"]],template:function(i,n){i&1&&(l(0,"modal-material",0),u("onClose",function(){return n.dialogRef.close()})("onCancel",function(){return n.dialogRef.close()}),l(1,"content")(2,"table",1)(3,"thead",2)(4,"tr")(5,"th",3)(6,"div",4)(7,"span"),c(8,"VARIANT"),r(),l(9,"sup"),g(10,"i",5),r()()(),l(11,"th",3),c(12,"SKU"),r(),l(13,"th",3)(14,"div",4)(15,"span"),c(16,"PRODUCT"),r(),l(17,"sup"),g(18,"i",6),r()()(),l(19,"th",3),c(20,"PRICE"),r(),l(21,"th",7),c(22,"INVENTORY"),r(),g(23,"th",3),r()(),l(24,"tbody"),I(25,Ht,2,1,null,null,z),r()()()()),i&2&&(m("config",n.modalConfig),d(25),D(n.variants()))},dependencies:[A,F,L,gt,bt,it],styles:[".mat-dialog-title[_ngcontent-%COMP%]{margin-bottom:0%;margin-left:24px}.sticky-top-thead[_ngcontent-%COMP%] th.sticky-top[_ngcontent-%COMP%]{top:0}.table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] tr.sticky-top[_ngcontent-%COMP%]{border:none!important;border-bottom:1px solid!important}table[_ngcontent-%COMP%] > thead[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%]{border-top:none!important;border-left:none!important;border-right:none!important}.table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{background-color:#fff!important}.sticky-top-thead.variant-modal[_ngcontent-%COMP%] th[_ngcontent-%COMP%]:last-child:after{border-right:0px!important}.sticky-top-thead.variant-modal[_ngcontent-%COMP%] th[_ngcontent-%COMP%]:first-child:before{border-left:0px!important}.sticky-top-thead.variant-modal[_ngcontent-%COMP%] th[_ngcontent-%COMP%]:before{border-top:0px}a.is-disabled[_ngcontent-%COMP%]{color:gray;cursor:default}a.is-disabled[_ngcontent-%COMP%]:hover{text-decoration:none}"]});let e=o;return e})();function Wt(e,o){if(e&1&&(l(0,"mat-option",5)(1,"div"),g(2,"img",6),l(3,"span"),c(4),r()()()),e&2){let t=o.$implicit;m("value",t.ChannelID),d(2),m("src",t.logo,k),d(2),T(t.Title)}}var Le=(()=>{let o=class o{constructor(){this.dialogRef=_(R),this.channels=_($),this.channelIds=w([]),this.channelOptions=w([])}ngOnInit(){this.initModalConfig();let a=this.channels.filter((i,n,s)=>s.findIndex(f=>f.ChannelID===i.ChannelID)===n);this.channelOptions.set(a)}initModalConfig(){this.modalConfig=new N,this.modalConfig.title="Detach Product",this.modalConfig.okText="Save"}onClose(){this.dialogRef.close()}onSave(){let a=this.channels.filter(i=>this.channelIds().includes(i.ChannelID)).map(i=>({ChannelID:i.ChannelID,ChannelItemID:i.ChannelItemID}));this.dialogRef.close(a)}};o.\u0275fac=function(i){return new(i||o)},o.\u0275cmp=S({type:o,selectors:[["app-modal-detach-product"]],decls:9,vars:4,consts:[[3,"onClose","onCancel","onOk","dynamicValidated","config"],["content",""],[1,"mb-2","fw-bold"],["appearance","outline",1,"w-100"],["name","channelid","placeholder","Channel",1,"mat-select-channel",3,"ngModelChange","ngModel","multiple"],[1,"channel-option",3,"value"],[2,"width","18px","margin-right","10px",3,"src"]],template:function(i,n){i&1&&(l(0,"modal-material",0),u("onClose",function(){return n.onClose()})("onCancel",function(){return n.onClose()})("onOk",function(){return n.onSave()}),l(1,"div",1)(2,"div")(3,"label",2),c(4,"Select a Channel"),r(),l(5,"mat-form-field",3)(6,"mat-select",4),et("ngModelChange",function(f){return tt(n.channelIds,f)||(n.channelIds=f),f}),I(7,Wt,5,3,"mat-option",5,J),r()()()()()),i&2&&(m("dynamicValidated",n.channelIds().length>0)("config",n.modalConfig),d(6),Z("ngModel",n.channelIds),m("multiple",!0),d(),D(n.channelOptions()))},dependencies:[_t,at,ot,U,G,Mt,st,mt,pt,L],encapsulation:2});let e=o;return e})();export{fe as a,Le as b};
@@ -1,4 +1,4 @@
1
- import{a as q}from"./chunk-TXOZULMZ.js";import{a as ze}from"./chunk-63I3I3MX.js";import{d as Fe,e as xe}from"./chunk-6KWG6O5L.js";import{a as je,b as qe}from"./chunk-SJ5MC42H.js";import{a as Ae,b as Ge}from"./chunk-NWB7EVME.js";import"./chunk-AFDI4TD4.js";import{b as Pe,c as We}from"./chunk-4RG5YR7N.js";import"./chunk-5MV3UFJQ.js";import"./chunk-E6AMKEQR.js";import"./chunk-IGKMJFKP.js";import"./chunk-ITGVXYDV.js";import"./chunk-KJE5GRQ4.js";import"./chunk-4ILDFTIG.js";import"./chunk-M4ZE35XK.js";import"./chunk-L7WZ6U4T.js";import{c as Le,d as Qe,e as x,f as L}from"./chunk-LOWGZOML.js";import{V as ke,ja as Be,pa as Oe,qa as Ve,ra as O,sa as V}from"./chunk-5PMKN6PM.js";import"./chunk-AGBJEXIM.js";import{b as Ee}from"./chunk-OXWPYJNB.js";import"./chunk-XBIHN6D3.js";import{c as F}from"./chunk-JBEKD57G.js";import{m as Re,n as Ie}from"./chunk-EDEZ3JLR.js";import{A as De,c as Se,h as Me,m as we}from"./chunk-L3W6SG2T.js";import"./chunk-YTHY4IFS.js";import{v as Ne,w as Ue}from"./chunk-STYL7ETF.js";import"./chunk-XLIPGDSC.js";import{D as be,F as ve,G as Ce,I as Te,c as fe,f as ge,h as _e,i as ye,m as B}from"./chunk-LNJUGHOX.js";import{$b as ae,$c as j,Ac as _,Cc as y,Dc as b,Gb as U,Ha as g,Hb as te,Kb as ne,Kc as pe,Lb as ie,Lc as v,Mb as u,Mc as c,Nc as M,Oa as Q,Oc as ce,Qc as w,Rc as D,Sc as E,Tc as me,Z as $,Zc as I,_c as k,aa as J,bc as oe,ea as K,ec as re,fc as le,gc as o,hc as s,hd as ue,ic as d,id as he,jc as se,lb as ee,ma as X,na as Y,nb as l,nc as A,oc as G,pa as Z,pc as S,qc as P,ra as f,v as H,vc as W,xa as C,xc as h,ya as T,yc as de,zc as R}from"./chunk-ZYJ6LAJ3.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";var He=`
1
+ import{a as q}from"./chunk-SIPZP62B.js";import{a as qe}from"./chunk-IVKFEOCB.js";import{d as Ve,e as Le}from"./chunk-C2LAQOUW.js";import{a as We,b as je}from"./chunk-MT3CWRVG.js";import{a as Qe,b as Ae}from"./chunk-W33M7S2S.js";import"./chunk-MTVUPPAN.js";import{b as Ge,c as Pe}from"./chunk-2NRHX6CZ.js";import"./chunk-NIJCYMZM.js";import"./chunk-UMLV2ZUF.js";import"./chunk-7X4B2T6C.js";import"./chunk-PN3KM4M4.js";import"./chunk-ZWUYPYHD.js";import"./chunk-WVA5LYVE.js";import"./chunk-FOKLBUX6.js";import"./chunk-ZDBFIPDM.js";import"./chunk-DDFP4CNP.js";import{c as Be,d as Oe,e as x,f as L}from"./chunk-RBZU7OVM.js";import{b as ke}from"./chunk-BUMWMFHU.js";import"./chunk-ROS2QMKF.js";import"./chunk-5WT456T7.js";import{a as Ie}from"./chunk-YNL43MLU.js";import{V as Me,ja as we,ka as De,la as O,ma as V,ua as Ee}from"./chunk-RXC5D64C.js";import{c as Re}from"./chunk-O4D64GHO.js";import"./chunk-7R2D2JZ6.js";import"./chunk-AGBJEXIM.js";import{c as F}from"./chunk-UPRDDI4K.js";import{A as Ue,c as Fe,h as xe,m as Ne}from"./chunk-WAXAIL2I.js";import"./chunk-RQUCYFCB.js";import{b as be}from"./chunk-MM7SAZOU.js";import{b as ve,d as Ce,e as Te,g as Se}from"./chunk-NQLMPUSB.js";import"./chunk-OSGPJXJZ.js";import{A as B,q as fe,t as ge,v as _e,w as ye}from"./chunk-JNRCB7N3.js";import"./chunk-XBIHN6D3.js";import{$c as k,Ac as R,Bc as _,Dc as y,Ec as b,Hb as U,Ia as g,Ib as te,Lb as ne,Lc as pe,Mb as ie,Mc as v,Nb as u,Nc as c,Oc as M,Pa as Q,Pc as ce,Rc as w,Sc as D,Tc as E,Uc as me,Z as $,_c as I,aa as J,ac as ae,ad as j,cc as oe,ea as K,fc as re,gc as le,hc as o,ic as s,id as ue,jc as d,jd as he,kc as se,ma as X,mb as ee,na as Y,ob as l,oc as A,pa as Z,pc as G,qc as S,ra as f,rc as P,v as H,wc as W,ya as C,yc as h,za as T,zc as de}from"./chunk-OHGMB7HJ.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";var ze=`
2
2
  .p-card {
3
3
  background: dt('card.background');
4
4
  color: dt('card.color');
@@ -29,11 +29,11 @@ import{a as q}from"./chunk-TXOZULMZ.js";import{a as ze}from"./chunk-63I3I3MX.js"
29
29
  .p-card-subtitle {
30
30
  color: dt('card.subtitle.color');
31
31
  }
32
- `;var et=["header"],tt=["title"],nt=["subtitle"],it=["content"],at=["footer"],ot=["*",[["p-header"]],[["p-footer"]]],rt=["*","p-header","p-footer"];function lt(e,r){e&1&&S(0)}function st(e,r){if(e&1&&(s(0,"div",1),R(1,1),u(2,lt,1,0,"ng-container",2),d()),e&2){let t=h();v(t.cx("header")),o("pBind",t.ptm("header")),l(2),o("ngTemplateOutlet",t.headerTemplate||t._headerTemplate)}}function dt(e,r){if(e&1&&(A(0),c(1),G()),e&2){let t=h(2);l(),M(t.header)}}function pt(e,r){e&1&&S(0)}function ct(e,r){if(e&1&&(s(0,"div",1),u(1,dt,2,1,"ng-container",3)(2,pt,1,0,"ng-container",2),d()),e&2){let t=h();v(t.cx("title")),o("pBind",t.ptm("title")),l(),o("ngIf",t.header&&!t._titleTemplate&&!t.titleTemplate),l(),o("ngTemplateOutlet",t.titleTemplate||t._titleTemplate)}}function mt(e,r){if(e&1&&(A(0),c(1),G()),e&2){let t=h(2);l(),M(t.subheader)}}function ut(e,r){e&1&&S(0)}function ht(e,r){if(e&1&&(s(0,"div",1),u(1,mt,2,1,"ng-container",3)(2,ut,1,0,"ng-container",2),d()),e&2){let t=h();v(t.cx("subtitle")),o("pBind",t.ptm("subtitle")),l(),o("ngIf",t.subheader&&!t._subtitleTemplate&&!t.subtitleTemplate),l(),o("ngTemplateOutlet",t.subtitleTemplate||t._subtitleTemplate)}}function ft(e,r){e&1&&S(0)}function gt(e,r){e&1&&S(0)}function _t(e,r){if(e&1&&(s(0,"div",1),R(1,2),u(2,gt,1,0,"ng-container",2),d()),e&2){let t=h();v(t.cx("footer")),o("pBind",t.ptm("footer")),l(2),o("ngTemplateOutlet",t.footerTemplate||t._footerTemplate)}}var yt=`
33
- ${He}
32
+ `;var Ze=["header"],et=["title"],tt=["subtitle"],nt=["content"],it=["footer"],at=["*",[["p-header"]],[["p-footer"]]],ot=["*","p-header","p-footer"];function rt(e,r){e&1&&S(0)}function lt(e,r){if(e&1&&(s(0,"div",1),R(1,1),u(2,rt,1,0,"ng-container",2),d()),e&2){let t=h();v(t.cx("header")),o("pBind",t.ptm("header")),l(2),o("ngTemplateOutlet",t.headerTemplate||t._headerTemplate)}}function st(e,r){if(e&1&&(A(0),c(1),G()),e&2){let t=h(2);l(),M(t.header)}}function dt(e,r){e&1&&S(0)}function pt(e,r){if(e&1&&(s(0,"div",1),u(1,st,2,1,"ng-container",3)(2,dt,1,0,"ng-container",2),d()),e&2){let t=h();v(t.cx("title")),o("pBind",t.ptm("title")),l(),o("ngIf",t.header&&!t._titleTemplate&&!t.titleTemplate),l(),o("ngTemplateOutlet",t.titleTemplate||t._titleTemplate)}}function ct(e,r){if(e&1&&(A(0),c(1),G()),e&2){let t=h(2);l(),M(t.subheader)}}function mt(e,r){e&1&&S(0)}function ut(e,r){if(e&1&&(s(0,"div",1),u(1,ct,2,1,"ng-container",3)(2,mt,1,0,"ng-container",2),d()),e&2){let t=h();v(t.cx("subtitle")),o("pBind",t.ptm("subtitle")),l(),o("ngIf",t.subheader&&!t._subtitleTemplate&&!t.subtitleTemplate),l(),o("ngTemplateOutlet",t.subtitleTemplate||t._subtitleTemplate)}}function ht(e,r){e&1&&S(0)}function ft(e,r){e&1&&S(0)}function gt(e,r){if(e&1&&(s(0,"div",1),R(1,2),u(2,ft,1,0,"ng-container",2),d()),e&2){let t=h();v(t.cx("footer")),o("pBind",t.ptm("footer")),l(2),o("ngTemplateOutlet",t.footerTemplate||t._footerTemplate)}}var _t=`
33
+ ${ze}
34
34
 
35
35
  .p-card {
36
36
  display: block;
37
37
  }
38
- `,bt={root:"p-card p-component",header:"p-card-header",body:"p-card-body",caption:"p-card-caption",title:"p-card-title",subtitle:"p-card-subtitle",content:"p-card-content",footer:"p-card-footer"},$e=(()=>{class e extends Be{name="card";style=yt;classes=bt;static \u0275fac=(()=>{let t;return function(n){return(t||(t=Q(e)))(n||e)}})();static \u0275prov=X({token:e,factory:e.\u0275fac})}return e})();var Je=new Z("CARD_INSTANCE"),vt=(()=>{class e extends Qe{$pcCard=f(Je,{optional:!0,skipSelf:!0})??void 0;bindDirectiveInstance=f(x,{self:!0});_componentStyle=f($e);onAfterViewChecked(){this.bindDirectiveInstance.setAttrs(this.ptms(["host","root"]))}header;subheader;set style(t){ke(this._style(),t)||(this._style.set(t),this.el?.nativeElement&&t&&Object.keys(t).forEach(p=>{this.el.nativeElement.style[p]=t[p]}))}get style(){return this._style()}styleClass;headerFacet;footerFacet;headerTemplate;titleTemplate;subtitleTemplate;contentTemplate;footerTemplate;_headerTemplate;_titleTemplate;_subtitleTemplate;_contentTemplate;_footerTemplate;_style=g(null);getBlockableElement(){return this.el.nativeElement.children[0]}templates;onAfterContentInit(){this.templates.forEach(t=>{switch(t.getType()){case"header":this._headerTemplate=t.template;break;case"title":this._titleTemplate=t.template;break;case"subtitle":this._subtitleTemplate=t.template;break;case"content":this._contentTemplate=t.template;break;case"footer":this._footerTemplate=t.template;break;default:this._contentTemplate=t.template;break}})}static \u0275fac=(()=>{let t;return function(n){return(t||(t=Q(e)))(n||e)}})();static \u0275cmp=U({type:e,selectors:[["p-card"]],contentQueries:function(p,n,i){if(p&1&&(_(i,Oe,5),_(i,Ve,5),_(i,et,4),_(i,tt,4),_(i,nt,4),_(i,it,4),_(i,at,4),_(i,O,4)),p&2){let a;y(a=b())&&(n.headerFacet=a.first),y(a=b())&&(n.footerFacet=a.first),y(a=b())&&(n.headerTemplate=a.first),y(a=b())&&(n.titleTemplate=a.first),y(a=b())&&(n.subtitleTemplate=a.first),y(a=b())&&(n.contentTemplate=a.first),y(a=b())&&(n.footerTemplate=a.first),y(a=b())&&(n.templates=a)}},hostVars:4,hostBindings:function(p,n){p&2&&(pe(n._style()),v(n.cn(n.cx("root"),n.styleClass)))},inputs:{header:"header",subheader:"subheader",style:"style",styleClass:"styleClass"},features:[I([$e,{provide:Je,useExisting:e},{provide:Le,useExisting:e}]),ie([x]),ne],ngContentSelectors:rt,decls:8,vars:11,consts:[[3,"pBind","class",4,"ngIf"],[3,"pBind"],[4,"ngTemplateOutlet"],[4,"ngIf"]],template:function(p,n){p&1&&(de(ot),u(0,st,3,4,"div",0),s(1,"div",1),u(2,ct,3,5,"div",0)(3,ht,3,5,"div",0),s(4,"div",1),R(5),u(6,ft,1,0,"ng-container",2),d(),u(7,_t,3,4,"div",0),d()),p&2&&(o("ngIf",n.headerFacet||n.headerTemplate||n._headerTemplate),l(),v(n.cx("body")),o("pBind",n.ptm("body")),l(),o("ngIf",n.header||n.titleTemplate||n._titleTemplate),l(),o("ngIf",n.subheader||n.subtitleTemplate||n._subtitleTemplate),l(),v(n.cx("content")),o("pBind",n.ptm("content")),l(2),o("ngTemplateOutlet",n.contentTemplate||n._contentTemplate),l(),o("ngIf",n.footerFacet||n.footerTemplate||n._footerTemplate))},dependencies:[B,ge,_e,V,L,x],encapsulation:2,changeDetection:0})}return e})(),Ke=(()=>{class e{static \u0275fac=function(p){return new(p||e)};static \u0275mod=te({type:e});static \u0275inj=Y({imports:[vt,V,L,V,L]})}return e})();var Xe=e=>({empty:e}),z=()=>[],Ct=(e,r)=>r.ID;function Tt(e,r){if(e&1&&(s(0,"div",34),se(1,"img",35),s(2,"div"),c(3),d()()),e&2){let t=r.$implicit;l(),o("src",t.logo,ee),l(2),M(t.Name)}}function St(e,r){if(e&1){let t=P();s(0,"p-chip",38),W("onRemove",function(){let n=C(t).$implicit,i=h(3);return T(i.onRemoveChannel(n.ID))}),d()}if(e&2){let t=r.$implicit;o("label",t.Name)("image",t.logo)("alt",t.Name)("removable",!0)}}function Mt(e,r){if(e&1&&re(0,St,1,4,"p-chip",37,Ct),e&2){let t=h().$implicit;le(t)}}function wt(e,r){if(e&1&&(s(0,"span"),c(1),d()),e&2){let t=h().$implicit;l(),ce("",t.length," channels selected")}}function Dt(e,r){if(e&1&&(s(0,"div",36),ae(1,Mt,2,0)(2,wt,2,1,"span"),d()),e&2){let t=r.$implicit;l(),oe((t==null?null:t.length)<=10?1:2)}}var Tn=(()=>{let r=class r{constructor(){this.toastr=f(Ee),this.userService=f(q),this.activatedRoute=f(be),this.route=f(ve),this.selectedUser=g(null),this.selectedGroup=g(null),this.selectedChannel=g([]),this.selectedUserName=g(null),this.orderDownloadDaysRange=g(0),this.isEditMode=g(!1),this.userFormLoader$=this.activatedRoute.queryParams.pipe(J(p=>{let n=p.ID||null;return this.userService.getUserFormLoader(n).pipe($(1),K(i=>{this.isEditMode.set(F.IsNotEmpty(n)),this.selectedGroup.set(F.IsNotEmpty(i.Form?.GroupID)?i.Form?.GroupID:null),this.selectedUser.set(F.IsNotEmpty(i.Form?.ID)?i.Form?.ID:null),this.orderDownloadDaysRange.set(i.Form?.DownloadOrderDaysRange||0),this.findSelectedUserName(i.Options?.Users,this.selectedUser()),this.selectedChannel.set(i.UserChannels||[])}),H(i=>(i.Options.Channels=F.assignChannelLogo(i.Options.Channels),console.log(i),i)))}))}findSelectedUserName(p,n){let i=p.find(a=>a.ID===n);this.selectedUserName.set(i?i.Name:null)}onSave(){if(!this.selectedUser()||!this.selectedGroup()){this.toastr.error("Please select both user and group","Error");return}this.userService.onInviteUser({ID:this.selectedUser(),GroupID:this.selectedGroup(),UserChannels:this.selectedChannel()||[],DownloadOrderDaysRange:this.orderDownloadDaysRange()}).subscribe({next:()=>{this.toastr.success("User updated successfully","Success"),this.route.navigate(["/menu/users/users"])}})}onRemoveChannel(p){let i=(this.selectedChannel()||[]).filter(a=>a!==p);this.selectedChannel.set(i)}};r.\u0275fac=function(n){return new(n||r)},r.\u0275cmp=U({type:r,selectors:[["app-user-form"]],features:[I([q])],decls:56,vars:23,consts:[[3,"headerTitle","hideSearchBox","hideSearchDropdown"],["routerLink","/menu/users/users",1,"btn","btn-secondary","me-3"],[1,"btn","btn-success",3,"click"],[1,"container-fluid","py-5","bg-light-gray"],[1,"row","mt-8"],[1,"col-12"],[1,"card"],[1,"card-header"],[1,"card-body","mt-8","pb-4"],[1,"row"],[1,"col-6"],[1,"form-label-group","w-100",3,"ngClass"],["bindLabel","Name","bindValue","ID","placeholder","Select User","id","userSelection",1,"height-sm",3,"ngModelChange","items","ngModel","disabled"],["for","userSelection"],["bindLabel","Name","bindValue","ID","placeholder","Select Group","id","groupSelection",1,"height-sm",3,"ngModelChange","items","ngModel"],["for","groupSelection"],["id","myTab","role","tablist",1,"nav","nav-tabs"],["role","presentation",1,"nav-item"],["id","channel-tab","data-bs-toggle","tab","data-bs-target","#channel-tab-pane","type","button","role","tab","aria-controls","channel-tab-pane","aria-selected","true",1,"nav-link","active"],["id","restriction-tab","data-bs-toggle","tab","data-bs-target","#restriction-tab-pane","type","button","role","tab","aria-controls","restriction-tab-pane","aria-selected","false",1,"nav-link"],[1,"card","rounded-0","border-top-0"],[1,"card-body","pb-4"],["id","myTabContent",1,"tab-content","mt-3"],["id","channel-tab-pane","role","tabpanel","aria-labelledby","channel-tab","tabindex","0",1,"tab-pane","fade","show","active","pb-9"],["variant","on",1,"w-100"],["optionLabel","Name","optionValue","ID","display","chip","id","channelSelection",1,"w-100","channel-multiselect",2,"--p-multiselect-padding-y","14px",3,"ngModelChange","options","ngModel","maxSelectedLabels"],["pTemplate","item"],["pTemplate","selectedItems"],["for","channelSelection"],[1,"mt-4"],["id","restriction-tab-pane","role","tabpanel","aria-labelledby","restriction-tab-pane","tabindex","1",1,"tab-pane","fade"],["matTooltip","How many days of past orders this user can download.","matTooltipPosition","above",1,"form-label-group","mb-3"],["type","text","id","daysRange","name","daysRange","data-toggle","tooltip","title","daysRange","autoNum","",1,"form-control",3,"ngModelChange","ngModel"],["for","daysRange"],[1,"d-flex","align-items-center","gap-2"],[2,"width","18px",3,"src"],[1,"d-flex","flex-wrap","gap-1"],[1,"me-3",2,"--p-chip-image-width","1.2rem","--p-chip-image-height","1.2rem","--p-chip-padding-x","1rem","--p-chip-padding-y","0.5rem","--p-chip-border-radius","0.5rem","--p-chip-font-size","1.2rem",3,"label","image","alt","removable"],[1,"me-3",2,"--p-chip-image-width","1.2rem","--p-chip-image-height","1.2rem","--p-chip-padding-x","1rem","--p-chip-padding-y","0.5rem","--p-chip-border-radius","0.5rem","--p-chip-font-size","1.2rem",3,"onRemove","label","image","alt","removable"]],template:function(n,i){if(n&1){let a=P();me(0),ue(1,"async"),s(2,"mainpanel",0)(3,"actions")(4,"a",1),c(5," Cancel "),d(),s(6,"button",2),W("click",function(){return C(a),T(i.onSave())}),c(7,"Save"),d()(),s(8,"content")(9,"div",3)(10,"div",4)(11,"div",5)(12,"div",6)(13,"div",7)(14,"h3"),c(15,"User Information"),d()(),s(16,"div",8)(17,"div",9)(18,"div",10)(19,"div",11)(20,"ng-select",12),E("ngModelChange",function(m){return C(a),D(i.selectedUser,m)||(i.selectedUser=m),T(m)}),d(),s(21,"label",13),c(22,"Select User"),d()()(),s(23,"div",10)(24,"div",11)(25,"ng-select",14),E("ngModelChange",function(m){return C(a),D(i.selectedGroup,m)||(i.selectedGroup=m),T(m)}),d(),s(26,"label",15),c(27,"Select Group"),d()()()()()()()(),s(28,"div",9)(29,"div",5)(30,"ul",16)(31,"li",17)(32,"button",18),c(33," Channels Filter "),d()(),s(34,"li",17)(35,"button",19),c(36," Restriction "),d()()(),s(37,"div",20)(38,"div",21)(39,"div",22)(40,"div",23)(41,"p-floatlabel",24)(42,"p-multiselect",25),E("ngModelChange",function(m){return C(a),D(i.selectedChannel,m)||(i.selectedChannel=m),T(m)}),u(43,Tt,4,2,"ng-template",26)(44,Dt,3,1,"ng-template",27),d(),s(45,"label",28),c(46,"Select Channels"),d()(),s(47,"div",29),c(48," When no channel filter is assigned all channel will be visible "),d()(),s(49,"div",30)(50,"div",9)(51,"div",10)(52,"div",31)(53,"input",32),E("ngModelChange",function(m){return C(a),D(i.orderDownloadDaysRange,m)||(i.orderDownloadDaysRange=m),T(m)}),d(),s(54,"label",33),c(55,"Download Order Days Range"),d()()()()()()()()()()()()()}if(n&2){let a=he(1,14,i.userFormLoader$);l(2),o("headerTitle",i.selectedUserName()?" Edit User Access - "+i.selectedUserName():"User Form")("hideSearchBox",!0)("hideSearchDropdown",!0),l(17),o("ngClass",j(16,Xe,!i.selectedUser())),l(),o("items",(a==null||a.Options==null?null:a.Options.Users)||k(18,z)),w("ngModel",i.selectedUser),o("disabled",i.isEditMode()),l(4),o("ngClass",j(19,Xe,!i.selectedGroup())),l(),o("items",(a==null||a.Options==null?null:a.Options.Groups)||k(21,z)),w("ngModel",i.selectedGroup),l(17),o("options",(a==null||a.Options==null?null:a.Options.Channels)||k(22,z)),w("ngModel",i.selectedChannel),o("maxSelectedLabels",10),l(11),w("ngModel",i.orderDownloadDaysRange)}},dependencies:[B,fe,Ie,Re,De,Se,Me,we,qe,je,O,xe,Fe,Ke,Ge,Ae,We,Pe,Te,Ce,ze,Ue,Ne,ye],styles:[`.nav-tabs .nav-link.active:hover,.nav-tabs .nav-link.active:focus,.nav-tabs .nav-item.show .nav-link:hover,.nav-tabs .nav-item.show .nav-link:focus{background-color:#fff!important;border-color:#dee2e6 #dee2e6 #fff}
39
- `],encapsulation:2});let e=r;return e})();export{Tn as UserFormComponent};
38
+ `,yt={root:"p-card p-component",header:"p-card-header",body:"p-card-body",caption:"p-card-caption",title:"p-card-title",subtitle:"p-card-subtitle",content:"p-card-content",footer:"p-card-footer"},He=(()=>{class e extends Ee{name="card";style=_t;classes=yt;static \u0275fac=(()=>{let t;return function(n){return(t||(t=Q(e)))(n||e)}})();static \u0275prov=X({token:e,factory:e.\u0275fac})}return e})();var $e=new Z("CARD_INSTANCE"),bt=(()=>{class e extends Oe{$pcCard=f($e,{optional:!0,skipSelf:!0})??void 0;bindDirectiveInstance=f(x,{self:!0});_componentStyle=f(He);onAfterViewChecked(){this.bindDirectiveInstance.setAttrs(this.ptms(["host","root"]))}header;subheader;set style(t){Me(this._style(),t)||(this._style.set(t),this.el?.nativeElement&&t&&Object.keys(t).forEach(p=>{this.el.nativeElement.style[p]=t[p]}))}get style(){return this._style()}styleClass;headerFacet;footerFacet;headerTemplate;titleTemplate;subtitleTemplate;contentTemplate;footerTemplate;_headerTemplate;_titleTemplate;_subtitleTemplate;_contentTemplate;_footerTemplate;_style=g(null);getBlockableElement(){return this.el.nativeElement.children[0]}templates;onAfterContentInit(){this.templates.forEach(t=>{switch(t.getType()){case"header":this._headerTemplate=t.template;break;case"title":this._titleTemplate=t.template;break;case"subtitle":this._subtitleTemplate=t.template;break;case"content":this._contentTemplate=t.template;break;case"footer":this._footerTemplate=t.template;break;default:this._contentTemplate=t.template;break}})}static \u0275fac=(()=>{let t;return function(n){return(t||(t=Q(e)))(n||e)}})();static \u0275cmp=U({type:e,selectors:[["p-card"]],contentQueries:function(p,n,i){if(p&1&&(_(i,we,5),_(i,De,5),_(i,Ze,4),_(i,et,4),_(i,tt,4),_(i,nt,4),_(i,it,4),_(i,O,4)),p&2){let a;y(a=b())&&(n.headerFacet=a.first),y(a=b())&&(n.footerFacet=a.first),y(a=b())&&(n.headerTemplate=a.first),y(a=b())&&(n.titleTemplate=a.first),y(a=b())&&(n.subtitleTemplate=a.first),y(a=b())&&(n.contentTemplate=a.first),y(a=b())&&(n.footerTemplate=a.first),y(a=b())&&(n.templates=a)}},hostVars:4,hostBindings:function(p,n){p&2&&(pe(n._style()),v(n.cn(n.cx("root"),n.styleClass)))},inputs:{header:"header",subheader:"subheader",style:"style",styleClass:"styleClass"},features:[I([He,{provide:$e,useExisting:e},{provide:Be,useExisting:e}]),ie([x]),ne],ngContentSelectors:ot,decls:8,vars:11,consts:[[3,"pBind","class",4,"ngIf"],[3,"pBind"],[4,"ngTemplateOutlet"],[4,"ngIf"]],template:function(p,n){p&1&&(de(at),u(0,lt,3,4,"div",0),s(1,"div",1),u(2,pt,3,5,"div",0)(3,ut,3,5,"div",0),s(4,"div",1),R(5),u(6,ht,1,0,"ng-container",2),d(),u(7,gt,3,4,"div",0),d()),p&2&&(o("ngIf",n.headerFacet||n.headerTemplate||n._headerTemplate),l(),v(n.cx("body")),o("pBind",n.ptm("body")),l(),o("ngIf",n.header||n.titleTemplate||n._titleTemplate),l(),o("ngIf",n.subheader||n.subtitleTemplate||n._subtitleTemplate),l(),v(n.cx("content")),o("pBind",n.ptm("content")),l(2),o("ngTemplateOutlet",n.contentTemplate||n._contentTemplate),l(),o("ngIf",n.footerFacet||n.footerTemplate||n._footerTemplate))},dependencies:[B,ge,_e,V,L,x],encapsulation:2,changeDetection:0})}return e})(),Je=(()=>{class e{static \u0275fac=function(p){return new(p||e)};static \u0275mod=te({type:e});static \u0275inj=Y({imports:[bt,V,L,V,L]})}return e})();var Ke=e=>({empty:e}),z=()=>[],vt=(e,r)=>r.ID;function Ct(e,r){if(e&1&&(s(0,"div",34),se(1,"img",35),s(2,"div"),c(3),d()()),e&2){let t=r.$implicit;l(),o("src",t.logo,ee),l(2),M(t.Name)}}function Tt(e,r){if(e&1){let t=P();s(0,"p-chip",38),W("onRemove",function(){let n=C(t).$implicit,i=h(3);return T(i.onRemoveChannel(n.ID))}),d()}if(e&2){let t=r.$implicit;o("label",t.Name)("image",t.logo)("alt",t.Name)("removable",!0)}}function St(e,r){if(e&1&&re(0,Tt,1,4,"p-chip",37,vt),e&2){let t=h().$implicit;le(t)}}function Mt(e,r){if(e&1&&(s(0,"span"),c(1),d()),e&2){let t=h().$implicit;l(),ce("",t.length," channels selected")}}function wt(e,r){if(e&1&&(s(0,"div",36),ae(1,St,2,0)(2,Mt,2,1,"span"),d()),e&2){let t=r.$implicit;l(),oe((t==null?null:t.length)<=10?1:2)}}var vn=(()=>{let r=class r{constructor(){this.toastr=f(be),this.userService=f(q),this.activatedRoute=f(ve),this.route=f(Ce),this.selectedUser=g(null),this.selectedGroup=g(null),this.selectedChannel=g([]),this.selectedUserName=g(null),this.orderDownloadDaysRange=g(0),this.isEditMode=g(!1),this.userFormLoader$=this.activatedRoute.queryParams.pipe(J(p=>{let n=p.ID||null;return this.userService.getUserFormLoader(n).pipe($(1),K(i=>{this.isEditMode.set(F.IsNotEmpty(n)),this.selectedGroup.set(F.IsNotEmpty(i.Form?.GroupID)?i.Form?.GroupID:null),this.selectedUser.set(F.IsNotEmpty(i.Form?.ID)?i.Form?.ID:null),this.orderDownloadDaysRange.set(i.Form?.DownloadOrderDaysRange||0),this.findSelectedUserName(i.Options?.Users,this.selectedUser()),this.selectedChannel.set(i.UserChannels||[])}),H(i=>(i.Options.Channels=F.assignChannelLogo(i.Options.Channels),console.log(i),i)))}))}findSelectedUserName(p,n){let i=p.find(a=>a.ID===n);this.selectedUserName.set(i?i.Name:null)}onSave(){if(!this.selectedUser()||!this.selectedGroup()){this.toastr.error("Please select both user and group","Error");return}this.userService.onInviteUser({ID:this.selectedUser(),GroupID:this.selectedGroup(),UserChannels:this.selectedChannel()||[],DownloadOrderDaysRange:this.orderDownloadDaysRange()}).subscribe({next:()=>{this.toastr.success("User updated successfully","Success"),this.route.navigate(["/menu/users/users"])}})}onRemoveChannel(p){let i=(this.selectedChannel()||[]).filter(a=>a!==p);this.selectedChannel.set(i)}};r.\u0275fac=function(n){return new(n||r)},r.\u0275cmp=U({type:r,selectors:[["app-user-form"]],features:[I([q])],decls:56,vars:23,consts:[[3,"headerTitle","hideSearchBox","hideSearchDropdown"],["routerLink","/menu/users/users",1,"btn","btn-secondary","me-3"],[1,"btn","btn-success",3,"click"],[1,"container-fluid","py-5","bg-light-gray"],[1,"row","mt-8"],[1,"col-12"],[1,"card"],[1,"card-header"],[1,"card-body","mt-8","pb-4"],[1,"row"],[1,"col-6"],[1,"form-label-group","w-100",3,"ngClass"],["bindLabel","Name","bindValue","ID","placeholder","Select User","id","userSelection",1,"height-sm",3,"ngModelChange","items","ngModel","disabled"],["for","userSelection"],["bindLabel","Name","bindValue","ID","placeholder","Select Group","id","groupSelection",1,"height-sm",3,"ngModelChange","items","ngModel"],["for","groupSelection"],["id","myTab","role","tablist",1,"nav","nav-tabs"],["role","presentation",1,"nav-item"],["id","channel-tab","data-bs-toggle","tab","data-bs-target","#channel-tab-pane","type","button","role","tab","aria-controls","channel-tab-pane","aria-selected","true",1,"nav-link","active"],["id","restriction-tab","data-bs-toggle","tab","data-bs-target","#restriction-tab-pane","type","button","role","tab","aria-controls","restriction-tab-pane","aria-selected","false",1,"nav-link"],[1,"card","rounded-0","border-top-0"],[1,"card-body","pb-4"],["id","myTabContent",1,"tab-content","mt-3"],["id","channel-tab-pane","role","tabpanel","aria-labelledby","channel-tab","tabindex","0",1,"tab-pane","fade","show","active","pb-9"],["variant","on",1,"w-100"],["optionLabel","Name","optionValue","ID","display","chip","id","channelSelection",1,"w-100","channel-multiselect",2,"--p-multiselect-padding-y","14px",3,"ngModelChange","options","ngModel","maxSelectedLabels"],["pTemplate","item"],["pTemplate","selectedItems"],["for","channelSelection"],[1,"mt-4"],["id","restriction-tab-pane","role","tabpanel","aria-labelledby","restriction-tab-pane","tabindex","1",1,"tab-pane","fade"],["matTooltip","How many days of past orders this user can download.","matTooltipPosition","above",1,"form-label-group","mb-3"],["type","text","id","daysRange","name","daysRange","data-toggle","tooltip","title","daysRange","autoNum","",1,"form-control",3,"ngModelChange","ngModel"],["for","daysRange"],[1,"d-flex","align-items-center","gap-2"],[2,"width","18px",3,"src"],[1,"d-flex","flex-wrap","gap-1"],[1,"me-3",2,"--p-chip-image-width","1.2rem","--p-chip-image-height","1.2rem","--p-chip-padding-x","1rem","--p-chip-padding-y","0.5rem","--p-chip-border-radius","0.5rem","--p-chip-font-size","1.2rem",3,"label","image","alt","removable"],[1,"me-3",2,"--p-chip-image-width","1.2rem","--p-chip-image-height","1.2rem","--p-chip-padding-x","1rem","--p-chip-padding-y","0.5rem","--p-chip-border-radius","0.5rem","--p-chip-font-size","1.2rem",3,"onRemove","label","image","alt","removable"]],template:function(n,i){if(n&1){let a=P();me(0),ue(1,"async"),s(2,"mainpanel",0)(3,"actions")(4,"a",1),c(5," Cancel "),d(),s(6,"button",2),W("click",function(){return C(a),T(i.onSave())}),c(7,"Save"),d()(),s(8,"content")(9,"div",3)(10,"div",4)(11,"div",5)(12,"div",6)(13,"div",7)(14,"h3"),c(15,"User Information"),d()(),s(16,"div",8)(17,"div",9)(18,"div",10)(19,"div",11)(20,"ng-select",12),E("ngModelChange",function(m){return C(a),D(i.selectedUser,m)||(i.selectedUser=m),T(m)}),d(),s(21,"label",13),c(22,"Select User"),d()()(),s(23,"div",10)(24,"div",11)(25,"ng-select",14),E("ngModelChange",function(m){return C(a),D(i.selectedGroup,m)||(i.selectedGroup=m),T(m)}),d(),s(26,"label",15),c(27,"Select Group"),d()()()()()()()(),s(28,"div",9)(29,"div",5)(30,"ul",16)(31,"li",17)(32,"button",18),c(33," Channels Filter "),d()(),s(34,"li",17)(35,"button",19),c(36," Restriction "),d()()(),s(37,"div",20)(38,"div",21)(39,"div",22)(40,"div",23)(41,"p-floatlabel",24)(42,"p-multiselect",25),E("ngModelChange",function(m){return C(a),D(i.selectedChannel,m)||(i.selectedChannel=m),T(m)}),u(43,Ct,4,2,"ng-template",26)(44,wt,3,1,"ng-template",27),d(),s(45,"label",28),c(46,"Select Channels"),d()(),s(47,"div",29),c(48," When no channel filter is assigned all channel will be visible "),d()(),s(49,"div",30)(50,"div",9)(51,"div",10)(52,"div",31)(53,"input",32),E("ngModelChange",function(m){return C(a),D(i.orderDownloadDaysRange,m)||(i.orderDownloadDaysRange=m),T(m)}),d(),s(54,"label",33),c(55,"Download Order Days Range"),d()()()()()()()()()()()()()}if(n&2){let a=he(1,14,i.userFormLoader$);l(2),o("headerTitle",i.selectedUserName()?" Edit User Access - "+i.selectedUserName():"User Form")("hideSearchBox",!0)("hideSearchDropdown",!0),l(17),o("ngClass",j(16,Ke,!i.selectedUser())),l(),o("items",(a==null||a.Options==null?null:a.Options.Users)||k(18,z)),w("ngModel",i.selectedUser),o("disabled",i.isEditMode()),l(4),o("ngClass",j(19,Ke,!i.selectedGroup())),l(),o("items",(a==null||a.Options==null?null:a.Options.Groups)||k(21,z)),w("ngModel",i.selectedGroup),l(17),o("options",(a==null||a.Options==null?null:a.Options.Channels)||k(22,z)),w("ngModel",i.selectedChannel),o("maxSelectedLabels",10),l(11),w("ngModel",i.orderDownloadDaysRange)}},dependencies:[B,fe,ke,Ue,Fe,xe,Ne,je,We,O,Le,Ve,Je,Ae,Qe,Pe,Ge,Se,Te,qe,Ie,Re,ye],styles:[`.nav-tabs .nav-link.active:hover,.nav-tabs .nav-link.active:focus,.nav-tabs .nav-item.show .nav-link:hover,.nav-tabs .nav-item.show .nav-link:focus{background-color:#fff!important;border-color:#dee2e6 #dee2e6 #fff}
39
+ `],encapsulation:2});let e=r;return e})();export{vn as UserFormComponent};
@@ -1 +1 @@
1
- import{a as i}from"./chunk-BKR7YPEW.js";import{a as l}from"./chunk-AGBJEXIM.js";import{e as h}from"./chunk-OXWPYJNB.js";import{c}from"./chunk-JBEKD57G.js";import{ma as p,ra as d,v as u}from"./chunk-ZYJ6LAJ3.js";var T=(()=>{let a=class a{constructor(){this.httpService=d(h)}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?e.PerfLog.startsWith("[")?JSON.parse(e.PerfLog):[]:[],e.ProcessLabel=this.generateLabel(e),e.ProcessDescription=this.generateDescription(e),e.EndTime=this.createEndTime(e),e.Channel=c.getChannelName(e.TypeID),e.MillisecondToDisplay=this.convertMilisecondsToReadableFormat(e.Duration||0),e.ParsedException=e.Exception?JSON.parse(e.Exception):null,e}))}convertMilisecondsToReadableFormat(t){let r=Math.floor(t/1e3),e=Math.floor(r/60),n=r%60,s="";return e!=0&&(s=s.concat(`${e} minutes `)),n!=0&&(s=s.concat(`${n} seconds`)),s}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 i.Active:r="Active";break;case i.Sellable:r="Sellable";break;case i.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)}createEndTime(t){let r=new Date(t.Created);return new Date(r.getTime()+(t.Duration||0))}};a.\u0275fac=function(r){return new(r||a)},a.\u0275prov=p({token:a,factory:a.\u0275fac});let o=a;return o})();var D=(function(o){return o[o.InProgress=0]="InProgress",o[o.Completed=1]="Completed",o[o.Failed=2]="Failed",o})(D||{});export{T as a,D as b};
1
+ import{a as i}from"./chunk-BKR7YPEW.js";import{a as l}from"./chunk-AGBJEXIM.js";import{c}from"./chunk-UPRDDI4K.js";import{e as h}from"./chunk-MM7SAZOU.js";import{ma as p,ra as d,v as u}from"./chunk-OHGMB7HJ.js";var T=(()=>{let a=class a{constructor(){this.httpService=d(h)}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?e.PerfLog.startsWith("[")?JSON.parse(e.PerfLog):[]:[],e.ProcessLabel=this.generateLabel(e),e.ProcessDescription=this.generateDescription(e),e.EndTime=this.createEndTime(e),e.Channel=c.getChannelName(e.TypeID),e.MillisecondToDisplay=this.convertMilisecondsToReadableFormat(e.Duration||0),e.ParsedException=e.Exception?JSON.parse(e.Exception):null,e}))}convertMilisecondsToReadableFormat(t){let r=Math.floor(t/1e3),e=Math.floor(r/60),n=r%60,s="";return e!=0&&(s=s.concat(`${e} minutes `)),n!=0&&(s=s.concat(`${n} seconds`)),s}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 i.Active:r="Active";break;case i.Sellable:r="Sellable";break;case i.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)}createEndTime(t){let r=new Date(t.Created);return new Date(r.getTime()+(t.Duration||0))}};a.\u0275fac=function(r){return new(r||a)},a.\u0275prov=p({token:a,factory:a.\u0275fac});let o=a;return o})();var D=(function(o){return o[o.InProgress=0]="InProgress",o[o.Completed=1]="Completed",o[o.Failed=2]="Failed",o})(D||{});export{T as a,D as b};
@@ -0,0 +1 @@
1
+ import{b as w}from"./chunk-BXNDE6NQ.js";import"./chunk-A6QXXKPR.js";import{b as k}from"./chunk-BUMWMFHU.js";import"./chunk-ROS2QMKF.js";import"./chunk-5WT456T7.js";import"./chunk-YNL43MLU.js";import"./chunk-O4D64GHO.js";import"./chunk-7R2D2JZ6.js";import"./chunk-O3QPBAV5.js";import"./chunk-YYV4FSYQ.js";import"./chunk-QXRG5XYP.js";import"./chunk-AGBJEXIM.js";import"./chunk-5UFP37GQ.js";import"./chunk-UPRDDI4K.js";import"./chunk-WAXAIL2I.js";import"./chunk-RQUCYFCB.js";import"./chunk-RXLMJGUY.js";import"./chunk-MM7SAZOU.js";import{b as T,e as P,g as R}from"./chunk-NQLMPUSB.js";import"./chunk-OSGPJXJZ.js";import{A as M,w as y,x as I,z as g}from"./chunk-JNRCB7N3.js";import"./chunk-XBIHN6D3.js";import{Hb as E,Nc as i,Oc as l,Pc as D,aa as C,ac as m,cc as p,hc as _,ic as t,id as v,jc as e,jd as b,kd as x,ob as d,ra as u,v as h,yc as f}from"./chunk-OHGMB7HJ.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";function B(a,o){if(a&1&&(t(0,"div",9)(1,"div",12)(2,"div",6)(3,"h5"),i(4,"Perflog"),e()(),t(5,"div",7)(6,"div",13)(7,"div",14)(8,"pre"),i(9),e()()()()()()),a&2){let n=f();d(9),l(n.Perflog)}}function L(a,o){if(a&1&&(t(0,"div",15)(1,"div",12)(2,"div",6)(3,"h5"),i(4,"StackTrace"),e()(),t(5,"div",7)(6,"div",13)(7,"div",14)(8,"pre"),i(9),e()()()()()()),a&2){let n=f();d(9),l(n==null?null:n.StackTrace)}}function N(a,o){if(a&1&&(t(0,"mainpanel",0)(1,"actions")(2,"a",1),i(3,"Back"),e()(),t(4,"content")(5,"div",2)(6,"div",3)(7,"div",4)(8,"div",5)(9,"div",6)(10,"h5"),i(11,"General"),e()(),t(12,"div",7)(13,"div",8)(14,"div",9)(15,"div",10)(16,"label"),i(17,"Created Date"),e(),t(18,"div")(19,"span"),i(20),v(21,"date"),e()()()(),t(22,"div",9)(23,"div",10)(24,"label"),i(25,"Status"),e(),t(26,"div")(27,"span"),i(28),e()()()()(),t(29,"div",11)(30,"div",9)(31,"div",10)(32,"label"),i(33,"Duration"),e(),t(34,"div")(35,"span"),i(36),v(37,"number"),e()()()(),t(38,"div",9)(39,"div",10)(40,"label"),i(41,"Label"),e(),t(42,"div")(43,"span"),i(44),e()()()()()()()()(),t(45,"div",3)(46,"div",9)(47,"div",12)(48,"div",6)(49,"h5"),i(50,"Message"),e()(),t(51,"div",7)(52,"div",13)(53,"div",14)(54,"pre"),i(55),e()()()()()(),m(56,B,10,1,"div",9),m(57,L,10,1,"div",15),e()()()()),a&2){let n=o;_("headerTitle","Notification "+n.Name)("hideSearchBox",!0)("hideSearchDropdown",!0),d(20),l(x(21,10,n.Created,"dd MMM yyyy HH:mm:ss")),d(8),l(n.StatusLabel),d(8),D("",x(37,13,n.DurationInSecond,"1.1-1")," s"),d(8),l(n.Label),d(11),l(n.Message),d(),p(n!=null&&n.Perflog?56:-1),d(),p(n!=null&&n.StackTrace?57:-1)}}var Q=(()=>{let o=class o{constructor(){this.activatedRoute=u(T),this.notificationService=u(w)}ngOnInit(){this.notification$=this.activatedRoute.queryParams.pipe(C(s=>{let r=s.ID;return this.notificationService.getNotificationDetail(r).pipe(h(c=>(c.DurationInSecond=parseInt(c.Duration)/1e3,c)))}))}};o.\u0275fac=function(r){return new(r||o)},o.\u0275cmp=E({type:o,selectors:[["app-detail"]],decls:2,vars:3,consts:[[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"],[1,"col-sm-12"]],template:function(r,c){if(r&1&&(m(0,N,58,16,"mainpanel",0),v(1,"async")),r&2){let S;p((S=b(1,1,c.notification$))?0:-1,S)}},dependencies:[M,k,R,P,y,g,I],encapsulation:2});let a=o;return a})();export{Q as DetailComponent};
@@ -0,0 +1 @@
1
+ import{a as Q}from"./chunk-YKKHSYDW.js";import{a as J}from"./chunk-RWPLFNHT.js";import"./chunk-MT3CWRVG.js";import"./chunk-W33M7S2S.js";import"./chunk-MTVUPPAN.js";import"./chunk-2NRHX6CZ.js";import{a as q}from"./chunk-5WQ3LCWP.js";import{a as z}from"./chunk-DLHIDOS3.js";import"./chunk-NVPT5BF2.js";import"./chunk-QMHG3QTI.js";import"./chunk-NIJCYMZM.js";import"./chunk-UMLV2ZUF.js";import"./chunk-7X4B2T6C.js";import"./chunk-PN3KM4M4.js";import"./chunk-WIRBYT7F.js";import"./chunk-ZWUYPYHD.js";import"./chunk-WVA5LYVE.js";import"./chunk-FOKLBUX6.js";import"./chunk-A6QXXKPR.js";import"./chunk-ZDBFIPDM.js";import"./chunk-DDFP4CNP.js";import"./chunk-RBZU7OVM.js";import{b as j}from"./chunk-BUMWMFHU.js";import"./chunk-ROS2QMKF.js";import"./chunk-5WT456T7.js";import"./chunk-YNL43MLU.js";import"./chunk-RXC5D64C.js";import"./chunk-O4D64GHO.js";import"./chunk-7R2D2JZ6.js";import"./chunk-O3QPBAV5.js";import"./chunk-YYV4FSYQ.js";import"./chunk-QXRG5XYP.js";import{a as b}from"./chunk-AGBJEXIM.js";import"./chunk-5UFP37GQ.js";import"./chunk-UPRDDI4K.js";import{A as Z,h as G,m as H}from"./chunk-WAXAIL2I.js";import"./chunk-RQUCYFCB.js";import"./chunk-RXLMJGUY.js";import{e as O}from"./chunk-MM7SAZOU.js";import{e as W,g as $}from"./chunk-NQLMPUSB.js";import"./chunk-OSGPJXJZ.js";import{A as F,w as N,z as R}from"./chunk-JNRCB7N3.js";import"./chunk-XBIHN6D3.js";import{Hb as U,Ia as D,Nc as a,Oc as g,Rc as T,Sc as P,Tc as B,Uc as A,Z as V,ac as I,cc as k,dc as E,fc as L,gc as K,hc as s,ic as e,id as v,jc as t,jd as y,kc as c,mb as M,ob as l,ra as x,rc as w,wc as h,ya as u,yc as S,za as d}from"./chunk-OHGMB7HJ.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";function X(r,p){if(r&1){let o=w();e(0,"img",21),h("click",function(m){u(o);let i=S().$implicit,n=S();return d(n.onZoomImage(m,i==null?null:i.ImageUrl))}),t()}if(r&2){let o=S().$implicit;s("src",o==null?null:o.ThumbnailUrl,M)}}function Y(r,p){r&1&&c(0,"img",17)}function ee(r,p){if(r&1&&(e(0,"tr")(1,"td")(2,"div",15),I(3,X,1,1,"img",16)(4,Y,1,0,"img",17),t()(),e(5,"td"),a(6),t(),e(7,"td"),a(8),t(),e(9,"td")(10,"div",18),c(11,"app-channel-logo",19),e(12,"span"),a(13),t()()(),e(14,"td",20),a(15),v(16,"number"),t()()),r&2){let o=p.$implicit;l(3),k(o.ImageUrl?3:4),l(3),g(o.Name),l(2),g(o.SKU),l(3),s("typeId",o.TypeID),l(2),g(o.ChannelName),l(2),g(y(16,6,o.Count))}}var Ce=(()=>{let p=class p{constructor(){this.httpService=x(O),this.biggerPictureService=x(z),this.filter=D({PageNumber:1,RowCount:20,ListChannelID:[]}),this.rowCountApi=b.GetMultilistingSKUCount,this.initMultipleListingSKU()}initMultipleListingSKU(){this.multipleListingSKU$=this.httpService.post(b.GetMultiListingSKU,this.filter()).pipe(V(1))}onZoomImage(_,m){this.biggerPictureService.openBiggerPicture(_,m)}};p.\u0275fac=function(m){return new(m||p)},p.\u0275cmp=U({type:p,selectors:[["app-duplicate-sku-v2"]],decls:33,vars:8,consts:[["headerTitle","Duplicate SKU","description","SKU(s) which is listed more than one time (one to many)",3,"onSubmit","hideSearchBox"],["routerLink","/menu/products/status/duplicate-sku",1,"d-flex","align-items-center","gap-2","btn","btn-outline-secondary","btn-lg"],[1,"fa-solid","fa-credit-card"],[1,"fw-bold","mb-2"],[3,"ngModelChange","multiple","ngModel"],[1,"container-fluid"],[1,"row","mt-6"],[1,"col-12"],[1,"table"],[1,"thead-light","sticky-top-thead"],[2,"width","40px"],[2,"width","200px"],[2,"width","250px"],[1,"text-end",2,"width","50px"],[3,"next","previous","filter","totaldata","rowCountApi"],[2,"padding-right","0px"],[1,"border","rounded","cursor-pointer",2,"max-width","40px",3,"src"],["src","//res.cloudinary.com/pos/image/upload/w_40/POS/Images/Icon/products_thumb.png",1,"border","rounded",2,"max-width","40px"],[1,"d-flex","align-items-center"],[3,"typeId"],[1,"text-end"],[1,"border","rounded","cursor-pointer",2,"max-width","40px",3,"click","src"]],template:function(m,i){if(m&1){let n=w();A(0),v(1,"async"),e(2,"mainpanel",0),h("onSubmit",function(){return u(n),d(i.initMultipleListingSKU())}),e(3,"actions")(4,"a",1),c(5,"i",2),e(6,"span"),a(7,"Card View"),t()()(),e(8,"filters")(9,"div")(10,"label",3),a(11,"Channel"),t(),e(12,"app-channel-options-v2",4),B("ngModelChange",function(C){return u(n),P(i.filter().ListChannelID,C)||(i.filter().ListChannelID=C),d(C)}),t()()(),e(13,"content")(14,"div",5)(15,"div",6)(16,"div",7)(17,"table",8)(18,"thead",9)(19,"tr"),c(20,"th",10),e(21,"th"),a(22,"Product"),t(),e(23,"th",11),a(24,"SKU"),t(),e(25,"th",12),a(26,"Channel"),t(),e(27,"th",13),a(28,"Count"),t()()(),e(29,"tbody"),L(30,ee,17,8,"tr",null,E),t()(),e(32,"app-custom-paginator",14),h("next",function(){return u(n),d(i.initMultipleListingSKU())})("previous",function(){return u(n),d(i.initMultipleListingSKU())}),t()()()()()()}if(m&2){let n=y(1,6,i.multipleListingSKU$);l(2),s("hideSearchBox",!0),l(10),s("multiple",!0),T("ngModel",i.filter().ListChannelID),l(18),K(n==null?null:n.Data),l(2),s("filter",i.filter())("totaldata",n==null||n.Data==null?null:n.Data.length)("rowCountApi",i.rowCountApi)}},dependencies:[F,j,q,$,W,Q,J,Z,G,H,N,R],encapsulation:2});let r=p;return r})();export{Ce as DuplicateSkuV2Component};
@@ -0,0 +1 @@
1
+ import{a as q,b as G}from"./chunk-TDMNVEUU.js";import{a as H}from"./chunk-EH3PIGLJ.js";import{a as V}from"./chunk-YNL43MLU.js";import{la as F}from"./chunk-RXC5D64C.js";import{c as j}from"./chunk-O4D64GHO.js";import{b as s,c as r}from"./chunk-UPRDDI4K.js";import{A as $,a as I,h as U,m as W}from"./chunk-WAXAIL2I.js";import{a as A}from"./chunk-RQUCYFCB.js";import{A as R,w as O}from"./chunk-JNRCB7N3.js";import{Ea as T,Hb as _,Ia as p,Nb as k,Nc as f,Pc as v,Rc as L,Sc as D,Tc as P,Z as b,_c as B,ac as w,cc as N,hc as u,ic as m,id as x,jc as c,jd as z,la as S,ob as d,ra as h,td as E,ud as y,v as C,wc as g,yc as M}from"./chunk-OHGMB7HJ.js";function Q(a,n){if(a&1&&(m(0,"div",4),f(1),c()),a&2){let J=M();d(),v(" ",J.selectedCategoryLabel()," ")}}function X(a,n){a&1&&(m(0,"label",3),f(1,"Channel"),c())}var ge=(()=>{let n=class n{constructor(){this.multiwarehousTreeService=h(H),this.destroyRef=h(T),this.selectedCategoryLabel=p("Select a Channel"),this.disabled=p(!1),this.selectedNode=p(null),this.multiple=y(!1),this.floatingLabel=y(!1),this.onChannelChange=E(),this.channels$=this.multiwarehousTreeService.getChannelTree$().pipe(C(e=>e.map(t=>{t.children=t.children.map(i=>(i.icon="fa-solid fa-warehouse",i));let o=this.getChannelType(t.typeid);return t.icon=`custom-icon-${o}`,t.expandedIcon=null,t.collapsedIcon=null,t.styleClass=`custom-icon-${o}`,t.logo=r.getChannelLogoByTypeId(t.typeid),t})),b(1)),this.htmlBody=document.querySelector("body"),this.onChange=e=>{},this.onTouched=()=>{}}getChannelType(e){switch(e){case s.Tokopedia:return"tokopedia";case s.Shopee:return"shopee";case s.Lazada:return"lazada";case s.Shopify:return"shopify";case s.WooCommerce:return"woocommerce";case s.Tiktok:return"tiktok";case s.Plugo:return"plugo";case s.ShopifyV2:return"shopify"}}initSelectedNode(e){this.channels$.pipe(A(this.destroyRef)).subscribe(t=>{if(this.multiple()){let o=[];for(let i of e){let l=r.searchByIdWithParentDFS(t,i),K=Object.assign({},l);o.push(K)}this.selectedNode.set(o),this.emitMultipleNodes()}else{let o=r.searchByIdWithParentDFS(t,e),i=Object.assign({},o);this.selectedNode.set(i),this.emitSingleNode(i)}})}onNodeSelect(e){let t=Object.assign({},e.node);this.multiple()?this.emitMultipleNodes():this.emitSingleNode(t)}emitMultipleNodes(){let e=Object.assign([],this.selectedNode()),t=e.map(o=>o.id);this.onChange(t),this.onChannelChange.emit(e),this.generateLabel()}emitSingleNode(e){this.onChange(e.id),this.onChannelChange.emit(e),this.generateLabel()}onNodeUnSelect(e){if(this.multiple()){let t=e.node;this.selectedNode.update(o=>o.filter(i=>i.id!==t.id)),this.emitMultipleNodes(),this.generateLabel()}}generateLabel(){let e="Select a Channel";if(this.multiple()){e="";for(let t of this.selectedNode())e+=r.getLabelPathTree(t)+", ";this.selectedCategoryLabel.set(e)}else{let t=this.selectedNode();t?(e=r.getLabelPathTree(t),this.selectedCategoryLabel.set(e)):this.selectedCategoryLabel.set(e)}}onClear(){this.onChange(null)}onClick(){let e=this.getBodyTop(),t=document.querySelector(".p-overlay.p-component"),o=e+t.getBoundingClientRect().top,i=t.getAttribute("style")||"";t.setAttribute("style",`${i} top: ${o+e}px;`)}getBodyTop(){return this.htmlBody.getBoundingClientRect().top*-1}writeValue(e){r.IsNotEmpty(e)&&this.initSelectedNode(e)}registerOnChange(e){this.onChange=e}registerOnTouched(e){this.onTouched=e}setDisabledState(e){this.disabled.set(e)}};n.\u0275fac=function(t){return new(t||n)},n.\u0275cmp=_({type:n,selectors:[["multiwarehouse-tree-select"]],inputs:{multiple:[1,"multiple"],floatingLabel:[1,"floatingLabel"]},outputs:{onChannelChange:"onChannelChange"},features:[B([{provide:I,useExisting:S(()=>n),multi:!0}])],decls:5,vars:9,consts:[["matTooltipPosition","above",1,"p-float-label",3,"matTooltip"],["appendTo","body","containerStyleClass","w-100","id","selectChannel",1,"multiwarehouse-select",3,"click","onNodeSelect","ngModelChange","onClear","onNodeUnselect","filter","filterInputAutoFocus","options","ngModel","selectionMode"],["pTemplate","value","type","default"],["for","selectChannel"],["matTooltipPosition","above"]],template:function(t,o){t&1&&(m(0,"span",0)(1,"p-treeSelect",1),x(2,"async"),g("click",function(){return o.onClick()})("onNodeSelect",function(l){return o.onNodeSelect(l)}),P("ngModelChange",function(l){return D(o.selectedNode,l)||(o.selectedNode=l),l}),g("onClear",function(){return o.onClear()})("onNodeUnselect",function(l){return o.onNodeUnSelect(l)}),k(3,Q,2,1,"ng-template",2),c(),w(4,X,2,0,"label",3),c()),t&2&&(u("matTooltip",o.selectedCategoryLabel()),d(),u("filter",!0)("filterInputAutoFocus",!0)("options",z(2,7,o.channels$)),L("ngModel",o.selectedNode),u("selectionMode",o.multiple()?"multiple":"single"),d(3),N(o.floatingLabel()?4:-1))},dependencies:[R,G,q,F,$,U,W,V,j,O],styles:["[_nghost-%COMP%] .p-treeselect{width:100%;display:inline-flex;border:1px solid #ced4da;font-size:.875rem!important} .p-element .p-icon-wrapper{width:14px} .p-float-label .multiwarehouse-select.p-treeselect{padding:7px!important;min-height:.6rem!important} .custom-icon-tokopedia.p-tree-node-icon, .custom-icon-shopee.p-tree-node-icon, .custom-icon-woocommerce.p-tree-node-icon, .custom-icon-lazada.p-tree-node-icon, .custom-icon-tiktok.p-tree-node-icon, .custom-icon-shopify.p-tree-node-icon, .custom-icon-plugo.p-tree-node-icon{background-size:contain;background-repeat:no-repeat;width:20px;height:20px;display:inline-block} .custom-icon-tokopedia.p-tree-node-icon{background-image:url(https://resc.cloudinary.com/pos/image/upload/v1598262221/icons/marketplace_icons/tokopedia.png)} .custom-icon-woocommerce.p-tree-node-icon{background-image:url(https://resc.cloudinary.com/pos/image/upload/w_50/v1632447439/icons/WooCommerce/woocommerce-icon.webp)} .custom-icon-shopee.p-tree-node-icon{background-image:url(https://resc.cloudinary.com/pos/image/upload/v1598262220/icons/marketplace_icons/shopee.png)} .custom-icon-tiktok.p-tree-node-icon{background-image:url(https://resc.cloudinary.com/pos/image/upload/w_30/v1645761611/icons/Marketplace%20logo/tiktok.png)} .custom-icon-lazada.p-tree-node-icon{background-image:url(https://resc.cloudinary.com/pos/image/upload/v1680681836/icons/marketplace_icons/Lazadanew.png)} .custom-icon-shopify.p-tree-node-icon{background-image:url(https://resc.cloudinary.com/pos/image/upload/v1707987435/icons/marketplace_icons/shopify.png)} .custom-icon-plugo.p-tree-node-icon{background-image:url(https://resc.cloudinary.com/pos/image/upload/v1739236419/icons/marketplace_icons/plugo.ico)} .custom-icon-shopee .fa-warehouse.p-tree-node-icon, .custom-icon-tiktok .fa-warehouse.p-tree-node-icon, .custom-icon-tokopedia .fa-warehouse.p-tree-node-icon, .custom-icon-lazada .fa-warehouse.p-tree-node-icon, .custom-icon-shopify .fa-warehouse.p-tree-node-icon, .custom-icon-woocommerce .fa-warehouse.p-tree-node-icon, .custom-icon-plugo .fa-warehouse.p-tree-node-icon{background-image:none!important;display:inline-block!important}"]});let a=n;return a})();export{ge as a};
@@ -0,0 +1 @@
1
+ import{a as n}from"./chunk-KUKTPGJ2.js";import{a as g,b as d}from"./chunk-J6HA4ZHH.js";import"./chunk-YNL43MLU.js";import"./chunk-O4D64GHO.js";import"./chunk-7R2D2JZ6.js";import"./chunk-O3QPBAV5.js";import"./chunk-YYV4FSYQ.js";import"./chunk-QXRG5XYP.js";import"./chunk-AGBJEXIM.js";import"./chunk-5UFP37GQ.js";import"./chunk-UPRDDI4K.js";import"./chunk-RQUCYFCB.js";import"./chunk-RXLMJGUY.js";import"./chunk-MM7SAZOU.js";import{c as m}from"./chunk-NQLMPUSB.js";import"./chunk-OSGPJXJZ.js";import"./chunk-JNRCB7N3.js";import"./chunk-XBIHN6D3.js";import{Hb as l,hc as p,ic as c,jc as i,kc as r,ob as a}from"./chunk-OHGMB7HJ.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";var u=(()=>{let e=class e{constructor(){this.channelTabs=[{Title:"Channel",Url:"/menu/channel/marketplace"},{Title:"POS",Url:"/menu/channel/pos"}]}};e.\u0275fac=function(o){return new(o||e)},e.\u0275cmp=l({type:e,selectors:[["app-channels"]],decls:5,vars:1,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid"],[3,"Tabs"]],template:function(o,s){o&1&&(c(0,"nav",0)(1,"div",1)(2,"div"),r(3,"nav-tab",2),i()()(),r(4,"router-outlet")),o&2&&(a(3),p("Tabs",s.channelTabs))},dependencies:[d,g,m],styles:[".form-label-group[_ngcontent-%COMP%]{position:relative;margin-bottom:1rem}.form-label-group[_ngcontent-%COMP%] > input[_ngcontent-%COMP%]{height:3.625rem;padding:.75rem;color:#343434;font-size:.875rem;border-radius:.25rem!important;border-color:#c8d3df}.form-label-group[_ngcontent-%COMP%] > input[_ngcontent-%COMP%]:focus{border:solid 1.5px #1A73E8!important}.form-label-group[_ngcontent-%COMP%] > label[_ngcontent-%COMP%]{width:auto;position:absolute;top:1.125rem;left:.75rem;display:block;margin-bottom:0;line-height:1.5;color:#ccc;pointer-events:none;cursor:text;border:1px solid transparent;border-radius:.25rem;transition:all .1s ease-in-out;font-size:.875rem}.form-label-group[_ngcontent-%COMP%] > textarea[_ngcontent-%COMP%]{padding:.75rem;color:#343434;resize:both;font-size:.875rem;border-radius:.25rem;border-color:#c8d3df}.form-label-group[_ngcontent-%COMP%] > textarea[_ngcontent-%COMP%] ~ label[_ngcontent-%COMP%]{top:.9375rem}.form-label-group[_ngcontent-%COMP%] > textarea[_ngcontent-%COMP%]:focus{border:solid 1.5px #1A73E8!important}.form-label-group[_ngcontent-%COMP%] > textarea[_ngcontent-%COMP%]:focus ~ label[_ngcontent-%COMP%]{top:1rem;left:.78125rem}.form-label-group[_ngcontent-%COMP%] > ng-select[_ngcontent-%COMP%] .ng-select-container{min-height:3.625rem;border-color:#c8d3df;box-shadow:none}.form-label-group[_ngcontent-%COMP%] > ng-select[_ngcontent-%COMP%] ~ label[_ngcontent-%COMP%]{display:inline-block;top:-.625rem;background-color:#fff;font-size:.75rem!important;color:#9da2a6;padding:0 .25rem;z-index:1002;left:.5rem}.form-label-group.multiple[_ngcontent-%COMP%] ng-select[_ngcontent-%COMP%] .ng-input{padding-left:.25rem!important}.form-label-group.multiple[_ngcontent-%COMP%] ng-select[_ngcontent-%COMP%] .ng-placeholder{top:18px!important}.form-label-group.radio[_ngcontent-%COMP%]{height:3.625rem;padding:.75rem;color:#343434;border-radius:.25rem!important;border:solid 1px #c8d3df}.form-label-group.radio[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{font-size:.75rem!important;top:-10px!important;padding:0 .25rem;left:.5rem}.form-label-group.empty[_ngcontent-%COMP%] ng-select[_ngcontent-%COMP%] ~ label[_ngcontent-%COMP%]{display:none}.form-label-group[_ngcontent-%COMP%] input[_ngcontent-%COMP%]::-webkit-input-placeholder, .form-label-group[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:-ms-input-placeholder, .form-label-group[_ngcontent-%COMP%] input[_ngcontent-%COMP%]::-ms-input-placeholder, .form-label-group[_ngcontent-%COMP%] input[_ngcontent-%COMP%]::-moz-placeholder, .form-label-group[_ngcontent-%COMP%] input[_ngcontent-%COMP%]::placeholder, .form-label-group[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]::-webkit-input-placeholder, .form-label-group[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]:-ms-input-placeholder, .form-label-group[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]::-ms-input-placeholder, .form-label-group[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]::-moz-placeholder, .form-label-group[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]::placeholder{color:transparent}.form-label-group[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:not(:placeholder-shown) ~ label[_ngcontent-%COMP%], .form-label-group[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]:not(:placeholder-shown) ~ label[_ngcontent-%COMP%]{background-color:#fff;font-size:.75rem!important;color:#9da2a6;top:-10px!important;padding:0 .25rem;left:.5rem}.form-label-group[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:not(:placeholder-shown):focus ~ label[_ngcontent-%COMP%], .form-label-group[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]:not(:placeholder-shown):focus ~ label[_ngcontent-%COMP%]{color:#3f8aec}.form-label-group[_ngcontent-%COMP%] ng-select[_ngcontent-%COMP%] .ng-placeholder{padding-left:.25rem;color:#ccc!important;font-size:.875rem}.form-label-group[_ngcontent-%COMP%] ng-select[_ngcontent-%COMP%] .ng-has-value .ng-value{padding-left:.25rem;font-size:.875rem}.form-label-group[_ngcontent-%COMP%] ng-select[_ngcontent-%COMP%] .ng-value-container{overflow:initial!important}.form-label-group[_ngcontent-%COMP%] ng-select[_ngcontent-%COMP%] .ng-input{top:auto!important;padding-left:.875rem!important;font-size:.875rem}"]});let t=e;return t})();var v=[{path:"",component:u,children:[{path:"",redirectTo:"marketplace",pathMatch:"full"},{path:"marketplace",loadComponent(){return import("./chunk-BAW6PICI.js").then(t=>t.MarketplaceComponent)},canActivate:[n],data:{title:"List"}},{path:"marketplace/form",loadComponent(){return import("./chunk-JM3NLPH4.js").then(t=>t.MarketplaceFormComponent)},canActivate:[n],data:{title:"Add new Channel"}},{path:"marketplace/view",loadComponent(){return import("./chunk-YQZHIZHO.js").then(t=>t.MarketplaceViewComponent)},canActivate:[n],data:{title:"Marketplace View"}},{path:"marketplace/add",loadComponent(){return import("./chunk-FLNIURLD.js").then(t=>t.MarketplaceAddComponent)},canActivate:[n],data:{title:"Marketplace Add"}},{path:"pos",loadComponent(){return import("./chunk-UE5E7JXK.js").then(t=>t.PosComponent)},canActivate:[n],data:{title:"POS"}},{path:"pos/edit",loadComponent(){return import("./chunk-IF7EJSQG.js").then(t=>t.EditComponent)},canActivate:[n],data:{title:"POS Edit"}}]}];export{v as routes};
@@ -0,0 +1 @@
1
+ import{a as _}from"./chunk-RUYX7KTP.js";import{b as R}from"./chunk-BUMWMFHU.js";import"./chunk-ROS2QMKF.js";import"./chunk-5WT456T7.js";import"./chunk-YNL43MLU.js";import"./chunk-O4D64GHO.js";import"./chunk-7R2D2JZ6.js";import{c as g}from"./chunk-UPRDDI4K.js";import"./chunk-WAXAIL2I.js";import"./chunk-RQUCYFCB.js";import{e as I}from"./chunk-MM7SAZOU.js";import{b,e as D}from"./chunk-NQLMPUSB.js";import"./chunk-OSGPJXJZ.js";import{x as C,y as E}from"./chunk-JNRCB7N3.js";import"./chunk-XBIHN6D3.js";import{Hb as v,Nc as i,Oc as d,ac as h,cc as u,hc as S,ic as e,id as c,jc as t,jd as f,kd as y,ob as a,ra as m,yc as x}from"./chunk-OHGMB7HJ.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";function k(r,o){if(r&1&&(e(0,"div",4)(1,"div",7)(2,"div",8)(3,"h5"),i(4,"General"),t()(),e(5,"div",9)(6,"div",3)(7,"div",6)(8,"div",11)(9,"label"),i(10,"Date"),t(),e(11,"div")(12,"span"),i(13),c(14,"date"),t()()()(),e(15,"div",6)(16,"div",11)(17,"label"),i(18,"SKU"),t(),e(19,"div")(20,"span"),i(21),t()()()(),e(22,"div",6)(23,"div",11)(24,"label"),i(25,"Channel"),t(),e(26,"div")(27,"span"),i(28),t()()()(),e(29,"div",6)(30,"div",11)(31,"label"),i(32,"Response Code"),t(),e(33,"div")(34,"span"),i(35),t()()()()()()()()),r&2){let l=x();a(13),d(y(14,4,l.data.Created,"dd MMM yyyy")),a(8),d(l.data.Sku),a(7),d(l.data.ChannelName),a(7),d(l.data.ResponseCode)}}var A=(()=>{let o=class o{constructor(){this.route=m(b),this.http=m(I),this._RawLogService=m(_),this.data={Created:"",Sku:"",ChannelName:"",ResponseCode:""},this.route.queryParams.subscribe(s=>{this.ID=s.ID,this.Load()})}ngOnInit(){}Load(){var s={ID:this.ID};this.http.post("/api/Inventory/GetInventoryLogDeatil",s).subscribe(n=>{this.data.Created=n.hits[0]._source["@timestamp_received"],this.data.Sku=n.hits[0]._source.log.sku,this.data.ChannelName=n.hits[0]._source.log.channelName,this.data.ResponseCode=n.hits[0]._source.log.responseCode,this.request=g.IsNotEmpty(n.hits[0]?._source.log?.request)?JSON.parse(n.hits[0]?._source?.log?.request):"",this.response=n.hits[0]._source.log.response})}};o.\u0275fac=function(n){return new(n||o)},o.\u0275cmp=v({type:o,selectors:[["app-inventory-detail"]],decls:30,vars:7,consts:[["headerTitle","Product Inventory Sync Detail",3,"hideSearchBox","hideSearchDropdown"],["role","button","routerLink","/menu/log/inventory/sync-inventory",1,"btn","btn-secondary","btn-fill","btn-lg","me-2"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-sm-12"],[1,"row","mt-2"],[1,"col-sm-6"],[1,"card"],[1,"card-header"],[1,"card-body"],[1,"form-group"],[1,"info-label-group"]],template:function(n,p){n&1&&(e(0,"mainpanel",0)(1,"actions")(2,"a",1),i(3,"Back"),t()(),e(4,"content")(5,"div",2)(6,"div",3),h(7,k,36,7,"div",4),t(),e(8,"div",5)(9,"div",6)(10,"div",7)(11,"div",8)(12,"h5"),i(13,"Request"),t()(),e(14,"div",9)(15,"div",4)(16,"div",10)(17,"pre"),i(18),c(19,"json"),t()()()()()(),e(20,"div",6)(21,"div",7)(22,"div",8)(23,"h5"),i(24,"Response"),t()(),e(25,"div",9)(26,"div",4)(27,"div",10)(28,"pre"),i(29),t()()()()()()()()()()),n&2&&(S("hideSearchBox",!0)("hideSearchDropdown",!0),a(7),u(p.data?7:-1),a(11),d(f(19,5,p.request)),a(11),d(p.response))},dependencies:[R,D,E,C],encapsulation:2});let r=o;return r})();export{A as InventoryDetailComponent};
@@ -0,0 +1 @@
1
+ import{e as U}from"./chunk-C2LAQOUW.js";import{a as Y}from"./chunk-RWPLFNHT.js";import"./chunk-MT3CWRVG.js";import"./chunk-W33M7S2S.js";import"./chunk-MTVUPPAN.js";import"./chunk-2NRHX6CZ.js";import"./chunk-NVPT5BF2.js";import"./chunk-QMHG3QTI.js";import"./chunk-NIJCYMZM.js";import"./chunk-UMLV2ZUF.js";import"./chunk-7X4B2T6C.js";import"./chunk-PN3KM4M4.js";import"./chunk-WIRBYT7F.js";import"./chunk-ZWUYPYHD.js";import"./chunk-WVA5LYVE.js";import"./chunk-FOKLBUX6.js";import"./chunk-A6QXXKPR.js";import"./chunk-ZDBFIPDM.js";import"./chunk-DDFP4CNP.js";import"./chunk-RBZU7OVM.js";import{b as G}from"./chunk-BUMWMFHU.js";import"./chunk-ROS2QMKF.js";import"./chunk-5WT456T7.js";import"./chunk-YNL43MLU.js";import"./chunk-RXC5D64C.js";import"./chunk-O4D64GHO.js";import"./chunk-7R2D2JZ6.js";import"./chunk-O3QPBAV5.js";import"./chunk-YYV4FSYQ.js";import"./chunk-QXRG5XYP.js";import{a as R}from"./chunk-AGBJEXIM.js";import"./chunk-5UFP37GQ.js";import"./chunk-UPRDDI4K.js";import{A as J,c as j,h as F,m as H}from"./chunk-WAXAIL2I.js";import"./chunk-RQUCYFCB.js";import"./chunk-RXLMJGUY.js";import{b as B,e as I}from"./chunk-MM7SAZOU.js";import"./chunk-NQLMPUSB.js";import"./chunk-OSGPJXJZ.js";import{A as k,w as P,y as W}from"./chunk-JNRCB7N3.js";import"./chunk-XBIHN6D3.js";import{Hb as M,Ia as g,Nc as i,Oc as T,Rc as b,Sc as v,Tc as _,Uc as V,Vc as D,Wc as S,Z as x,ac as N,cc as O,hc as f,ic as e,id as w,jc as t,jd as y,kc as L,ob as a,ra as h,rc as E,wc as C,ya as m,yc as A,za as c}from"./chunk-OHGMB7HJ.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";function z(o,l){if(o&1&&(e(0,"pre",21),i(1),w(2,"json"),t()),o&2){A();let q=S(25);a(),T(y(2,1,q))}}function K(o,l){o&1&&(e(0,"p",22),i(1," Your data will be shown here once it's available "),t())}var me=(()=>{let l=class l{constructor(){this.httpService=h(I),this.toastr=h(B),this.selectedChannel=g(null),this.orderNumber=g(null)}fetchLog(){if(!this.selectedChannel()||!this.orderNumber()){this.toastr.warning("Please select a channel and enter an order number","Warning");return}this.orderLog$=this.httpService.post(R.GetOrderApiLog,{ChannelID:this.selectedChannel(),OrderNumber:this.orderNumber()}).pipe(x(1))}copyToClipboard(p){if(!p)return;let s=typeof p=="string"?p:JSON.stringify(p,null,2);navigator.clipboard.writeText(s),this.toastr.success("Copied to clipboard!","Success")}};l.\u0275fac=function(s){return new(s||l)},l.\u0275cmp=M({type:l,selectors:[["app-order-api"]],decls:40,vars:9,consts:[["headerTitle","Origin Order Api",3,"hideSearchBox","hideSearchDropdown"],[1,"btn","btn-success","btn-fill","me-3",3,"click"],[1,"fa","fa-search"],[1,"container-fluid","mt-8","px-10"],[1,"row"],[1,"col-7"],[1,"d-flex","align-items-center"],[1,"w-75"],[1,"mb-0","text-muted","fst-italic"],[1,"w-100"],[3,"ngModelChange","ngModel"],[1,"d-flex","align-items-center","mt-3"],["type","text","placeholder","Order Number or Invoice Number",1,"form-control","rounded-1",2,"height","40px",3,"ngModelChange","ngModel"],[1,"row","mt-6"],[1,"col-12"],[1,"card"],[1,"card-header","d-flex","justify-content-between","align-items-center"],["type","button",1,"btn","btn-sm","btn-outline-primary",3,"click","disabled"],[1,"card-body"],[1,"col-sm-12"],[1,"form-group","position-relative"],["id","orderLogText"],[1,"text-center","my-12","text-muted"]],template:function(s,n){if(s&1){let d=E();e(0,"mainpanel",0)(1,"actions")(2,"button",1),C("click",function(){return m(d),c(n.fetchLog())}),L(3,"i",2),i(4," Search "),t()(),e(5,"content")(6,"div",3)(7,"div",4)(8,"div",5)(9,"div",6)(10,"div",7)(11,"h6"),i(12,"Channel"),t(),e(13,"p",8),i(14," View logs related to Order API activities. "),t()(),e(15,"div",9)(16,"app-channel-options-v2",10),_("ngModelChange",function(r){return m(d),v(n.selectedChannel,r)||(n.selectedChannel=r),c(r)}),t()()(),e(17,"div",11)(18,"div",7)(19,"h6"),i(20,"Order Number"),t(),e(21,"p",8),i(22," Order or Invoice number from Channel. "),t()(),e(23,"div",9)(24,"input",12),_("ngModelChange",function(r){return m(d),v(n.orderNumber,r)||(n.orderNumber=r),c(r)}),t()()()()(),V(25),w(26,"async"),e(27,"div",13)(28,"div",14)(29,"div",15)(30,"div",16)(31,"h5"),i(32,"Response"),t(),e(33,"button",17),C("click",function(){m(d);let r=S(25);return c(n.copyToClipboard(r))}),i(34," Copy "),t()(),e(35,"div",18)(36,"div",19)(37,"div",20),N(38,z,3,3,"pre",21)(39,K,2,0,"p",22),t()()()()()()()()()}if(s&2){f("hideSearchBox",!0)("hideSearchDropdown",!0),a(16),b("ngModel",n.selectedChannel),a(8),b("ngModel",n.orderNumber),a();let d=D(y(26,6,n.orderLog$));a(8),f("disabled",!d),a(5),O(d?38:39)}},dependencies:[k,G,U,J,j,F,H,Y,P,W],encapsulation:2});let o=l;return o})();export{me as OrderApiComponent};
@@ -0,0 +1 @@
1
+ import{a as it,b as ct}from"./chunk-FTIUJUXI.js";import"./chunk-6F62N7RZ.js";import{e as rt}from"./chunk-KTTKHI2N.js";import"./chunk-3HME327V.js";import{a as ut}from"./chunk-TOK5EWN4.js";import{a as T}from"./chunk-SABMHH6B.js";import"./chunk-YAWT3CLI.js";import"./chunk-5C24BA5F.js";import"./chunk-LR2YCE6M.js";import"./chunk-BKR7YPEW.js";import{d as nt}from"./chunk-C2LAQOUW.js";import{a as at}from"./chunk-7KG3DC5J.js";import{a as mt}from"./chunk-5WQ3LCWP.js";import"./chunk-DLHIDOS3.js";import{a as ht}from"./chunk-27DIE2YS.js";import{a as ot}from"./chunk-AJSJJV2I.js";import"./chunk-NVPT5BF2.js";import"./chunk-QMHG3QTI.js";import"./chunk-NIJCYMZM.js";import"./chunk-UMLV2ZUF.js";import"./chunk-7X4B2T6C.js";import"./chunk-PN3KM4M4.js";import"./chunk-WIRBYT7F.js";import"./chunk-ZWUYPYHD.js";import"./chunk-WVA5LYVE.js";import"./chunk-FOKLBUX6.js";import"./chunk-BXNDE6NQ.js";import"./chunk-A6QXXKPR.js";import"./chunk-ZDBFIPDM.js";import"./chunk-DDFP4CNP.js";import"./chunk-RBZU7OVM.js";import{b as et}from"./chunk-BUMWMFHU.js";import"./chunk-ROS2QMKF.js";import{c as X,h as tt}from"./chunk-5WT456T7.js";import"./chunk-YNL43MLU.js";import{f as lt,g as st,h as dt,i as pt}from"./chunk-6C4UBIZK.js";import"./chunk-SPLGZRGH.js";import"./chunk-TBVMCNS2.js";import"./chunk-RM6ZXD3O.js";import"./chunk-2ST3DMR6.js";import"./chunk-24KZDZKS.js";import"./chunk-3RK6DDJD.js";import"./chunk-A2RTZANN.js";import"./chunk-N3E43QWK.js";import"./chunk-ZC526ERX.js";import"./chunk-YD6BNJ2B.js";import"./chunk-XUDE7VBC.js";import"./chunk-X52ZT4MU.js";import"./chunk-BMOMTOEW.js";import"./chunk-HO2TMGLM.js";import"./chunk-RXC5D64C.js";import"./chunk-O4D64GHO.js";import"./chunk-7R2D2JZ6.js";import{a as D}from"./chunk-ZSUWHVKX.js";import{h as Z}from"./chunk-O3QPBAV5.js";import"./chunk-YYV4FSYQ.js";import"./chunk-QXRG5XYP.js";import"./chunk-AGBJEXIM.js";import{b as j,c as z}from"./chunk-5UFP37GQ.js";import{b as F,c as _}from"./chunk-UPRDDI4K.js";import{A as Q,c as Y,h as q,m as K}from"./chunk-WAXAIL2I.js";import"./chunk-RQUCYFCB.js";import"./chunk-RXLMJGUY.js";import{b as W,e as H}from"./chunk-MM7SAZOU.js";import{d as $}from"./chunk-NQLMPUSB.js";import"./chunk-OSGPJXJZ.js";import"./chunk-JNRCB7N3.js";import"./chunk-XBIHN6D3.js";import{G as y,Hb as U,Ic as O,Nb as A,Nc as w,Pc as V,Rc as E,Sc as N,Tc as R,aa as B,ac as P,ad as I,cc as f,ec as L,fc as G,gc as J,hc as g,ic as h,jc as u,kc as b,ob as r,oc as v,pc as M,ra as C,rc as S,wc as m,ya as l,yc as a,za as s}from"./chunk-OHGMB7HJ.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";var k=o=>[o];function _t(o,c){if(o&1){let t=S();h(0,"button",15),m("click",function(){l(t);let i=a(2);return s(i.onDetachMultipleProduct())}),b(1,"i",16),w(2),u()}if(o&2){let t,e=a(2);r(2),V("Detach (",(t=e.productService.selectedProduct(e.products))==null?null:t.length,") ")}}function gt(o,c){if(o&1&&(v(0),P(1,_t,3,1,"button",14),M()),o&2){let t=a();r(),f(t.productService.hasSelection(t.products)?1:-1)}}function Ct(o,c){if(o&1){let t=S();h(0,"button",18),m("click",function(){l(t);let i=a(3);return s(i.onOpenScanDialog())}),b(1,"i",19),w(2," Scan Channel "),u()}}function Pt(o,c){if(o&1&&P(0,Ct,3,0,"button",17),o&2){let t=a(2);f(t.productService.hasSelection(t.products)?-1:0)}}function ft(o,c){if(o&1&&(v(0),P(1,Pt,1,1),M()),o&2){let t=a();r(),f(t.productService.hasSelection(t.products)?-1:1)}}function St(o,c){if(o&1){let t=S();h(0,"button",21),m("click",function(){l(t);let i=a(2);return s(i.onScanMultipleProduct())}),b(1,"i",19),w(2),u()}if(o&2){let t,e=a(2);r(2),V(" Scan (",(t=e.productService.selectedProduct(e.products))==null?null:t.length,") ")}}function xt(o,c){if(o&1&&(v(0),P(1,St,3,1,"button",20),M()),o&2){let t=a();r(),f(t.productService.hasSelection(t.products)&&t.multipeScanChannels.length>0?1:-1)}}function bt(o,c){if(o&1){let t=S();h(0,"button",23),m("click",function(){l(t);let i=a(2);return s(i.onUploadMultipleProduct())}),b(1,"i",24),w(2),u()}if(o&2){let t,e=a(2);r(2),V(" Upload (",(t=e.productService.selectedProduct(e.products))==null?null:t.length,") ")}}function wt(o,c){if(o&1&&(v(0),P(1,bt,3,1,"button",22),M()),o&2){let t=a();r(),f(t.productService.hasSelection(t.products)?1:-1)}}function yt(o,c){if(o&1){let t=S();h(0,"div",11)(1,"app-product-card",25),m("onUpload",function(){let i=l(t).$implicit,n=a();return s(n.onUploadToMultipleChannel(i))})("onScan",function(){let i=l(t).$implicit,n=a();return s(n.onScanSingleProduct(i))})("onDescEvent",function(){let i=l(t).$index,n=a();return s(n.onOpenDialogVariant(i))})("onCheckBoxChange",function(i){let n=l(t).$implicit;return s(n.selected=i)})("onDetach",function(){let i=l(t).$implicit,n=a();return s(n.onDetachProduct([i]))}),u()()}if(o&2){let t=c.$implicit,e=a();r(),g("productId",t.ID)("title",t==null?null:t.Name)("image",t==null?null:t.ThumbnailUrl)("description",(t==null||t.Variants==null?null:t.Variants.length)>1?(t==null||t.Variants==null?null:t.Variants.length)+" Variants":null)("channels",e.productService.getChannelProduct(t))("code",e.getVariantCode(t==null?null:t.Variants))("showCheckBox",(t==null?null:t.Channel.length)<e.channelOptions.length)("scanButton",!0)("uploadButton",t==null?null:t.hasUpload)("imageForZoom",t==null?null:t.ImageUrl)("detachButton",(t==null||t.Channel==null?null:t.Channel.length)>0)}}function vt(o,c){o&1&&(h(0,"div",12),b(1,"app-empty-state"),u())}function Mt(o,c){if(o&1){let t=S();h(0,"div",13)(1,"div",26)(2,"app-custom-paginator",27),m("next",function(){l(t);let i=a();return s(i.getProducts())})("previous",function(){l(t);let i=a();return s(i.getProducts())}),u()()()}if(o&2){let t=a();r(2),g("filter",t.searchFilter)("totaldata",t.products==null?null:t.products.length)("paginationTotal",t.rowCount)("hasClicked",!0)("nextButtonAlwaysVisible",!0)}}var ie=(()=>{let c=class c{constructor(){this.http=C(H),this.toastr=C(W),this.dialog=C(X),this.productService=C(ot),this.authService=C(Z),this.uploadProductService=C(rt),this.route=C($),this.searchFilter=new at,this.products=[],this.rowCount=0,this.multipeScanChannels=[],this.scanProductRole=D.ProductScan,this.uploadProductRole=D.ProductUpload,this.detachProductRole=D.ProductDetach,this.getLoaderPage(),this.channelOptions=this.authService.getChannels(),this.initMultiScanChannels()}getLoaderPage(){this.productService.LoadInPOS().subscribe(e=>{this.Categories=e.Options.Categories,this.searchFilter.PageNumber=e.Filter.PageNumber,this.searchFilter.RowCount=e.Filter.RowCount,this.searchFilter.ChannelID=null,this.searchFilter.Category=e.Filter.Category,this.searchFilter.PageSize=100,this.getProducts()})}initMultiScanChannels(){this.multipeScanChannels=this.productService.filterChannelByTypeId(this.channelOptions,[F.Tokopedia,F.Tiktok])}getProducts(){let e={PageNumber:this.searchFilter.PageNumber,RowCount:this.searchFilter.RowCount,text:this.searchFilter.text,Category:this.searchFilter.Category,From:this.startDate,To:this.endDate};this.http.post("/api/product/GetInPOS",e).subscribe(i=>{this.products=i.Data,this.rowCount=i.Total==null?this.searchFilter.RowCount:i.Total.toString(),this.products=this.productService.checkProductHasUploadBtn(this.products,this.channelOptions)})}onOpenScanDialog(){let e=JSON.parse(JSON.stringify(this.searchFilter));e.ChannelID=_.GuidEMpty,this.dialog.open(T,{data:{filter:e,channelOptions:this.channelOptions},width:"600px"}).afterClosed().pipe(y(n=>_.IsNotEmpty(n))).subscribe(n=>{this.searchFilter.ChannelID=n.ChannelID,this.searchFilter.ScanFull=n.ScanFull,this.searchFilter.UpdatedProduct=n.UpdatedProduct,this.searchFilter.Async=n.Async,this.scanAllProduct()})}scanAllProduct(){if(this.searchFilter.ChannelID==null){this.toastr.error("Please Select Channel","Error");return}this.productService.scanAll(this.searchFilter.ChannelID,this.searchFilter.ScanFull,this.searchFilter.UpdatedProduct,this.searchFilter.Async).subscribe(e=>{if(this.searchFilter.Async)this.toastr.warning("You will be notified when the scan is completed.","Scan In Progress",{toastClass:"ngx-toastr toast-waiting"});else{this.getLoaderPage();let i=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);this.productService.successToastrScanAllProduct(e,i,!this.searchFilter.UpdatedProduct)}})}onOpenDialogVariant(e){let i=this.products[e]?.Variants||[];this.dialog.open(it,{data:{title:this.products[e].Name,variants:i}})}onUploadMultipleProduct(){let e=this.productService.selectedProduct(this.products);this.uploadProductService.setSelectedProduct(e),this.route.navigate(["/menu/products/upload"])}onUploadToMultipleChannel(e){this.uploadProductService.setSelectedProduct([e]),this.route.navigate(["/menu/products/upload"])}searchProduct(e){this.searchFilter.text=e,this.getProducts()}onScanMultipleProduct(){let e=JSON.parse(JSON.stringify(this.searchFilter));e.ChannelID=_.GuidEMpty;let i=this.productService.filterChannelByTypeId(this.channelOptions,[F.Tokopedia,F.Tiktok]);this.dialog.open(T,{data:{filter:e,channelOptions:i,isSingleChannel:!0},width:"600px"}).afterClosed().pipe(y(p=>_.IsNotEmpty(p))).subscribe(p=>{this.searchFilter.ChannelID=p.ChannelID,this.searchFilter.ScanFull=p.ScanFull,this.searchFilter.UpdatedProduct=p.UpdatedProduct;let x=this.productService.selectedProduct(this.products),d=this.productService.getVariantCodesProducts(x);this.scanSingleProduct(d)})}onScanSingleProduct(e){let i=JSON.parse(JSON.stringify(this.searchFilter));i.ChannelID=_.GuidEMpty,this.dialog.open(T,{data:{filter:i,channelOptions:this.channelOptions,isSingleChannel:!0},width:"600px"}).afterClosed().pipe(y(n=>_.IsNotEmpty(n))).subscribe(n=>{this.searchFilter.ChannelID=n.ChannelID;let p=this.productService.getVariantCodesProduct(e);this.scanSingleProduct(p)})}scanSingleProduct(e){this.productService.scanSingle(this.searchFilter.ChannelID,e).subscribe({next:i=>{if(i)this.toastr.success("Successfully Scan ","Success");else{let n=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);this.toastr.error(`This product is not existed in ${n?.Name} `,"Error")}this.searchFilter.ChannelID=_.GuidEMpty,i&&this.getProducts()},error:i=>{this.searchFilter.ChannelID=_.GuidEMpty}})}getVariantCode(e=[]){let i;return e?.length>1&&(i=(e[0].model?e[0].model:"")+e[0].Code),e?.length==1&&(i=e[0].Code),i}onDetachProduct(e){let i=[];e.forEach(n=>{n.Channel=_.assignChannelLogo(n.Channel),i.push(...n.Channel)}),this.dialog.open(ct,{width:"600px",data:[...i]}).afterClosed().pipe(y(n=>_.IsNotEmpty(n)),B(n=>this.productService.detachProduct(n))).subscribe(n=>{this.toastr.success(n.Message,tt.Success),this.getProducts()})}onDetachMultipleProduct(){let e=this.productService.selectedProduct(this.products);this.onDetachProduct(e)}};c.\u0275fac=function(i){return new(i||c)},c.\u0275cmp=U({type:c,selectors:[["app-in-pos"]],decls:24,vars:21,consts:[["picker",""],["description","All products which is already available in POS",3,"onSubmit","headerTitle"],[4,"ngxPermissionsOnly"],[1,"fw-bold","mb-2"],["appendTo","body","bindLabel","Name","name","Name","bindValue","Name","placeholder","Select Category",1,"center-text",3,"ngModelChange","clearable","items","ngModel"],[1,"mt-5"],["id","dates",1,"form-control","rounded","dateRange",3,"rangePicker"],["matStartDate","","placeholder","Start date",3,"ngModelChange","click","ngModel"],["matEndDate","","placeholder","End date",3,"ngModelChange","click","ngModel"],[1,"container-fluid"],[1,"row","mt-8"],[1,"col-12","col-md-6","col-xl-4","px-3","my-3"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"row","mt-2","justify-content-end"],["type","button",1,"btn","btn-outline-secondary","shadow","rounded","me-2"],["type","button",1,"btn","btn-outline-secondary","shadow","rounded","me-2",3,"click"],[1,"fa-sharp","fa-link-slash","me-2"],["type","button","data-cy","scanSoldinChannel",1,"btn","btn-outline-secondary","shadow","rounded"],["type","button","data-cy","scanSoldinChannel",1,"btn","btn-outline-secondary","shadow","rounded",3,"click"],[1,"fas","fa-lg","fa-crosshairs"],["type","button","data-cy","scanInPos",1,"btn","btn-outline-secondary","shadow","rounded","me-2"],["type","button","data-cy","scanInPos",1,"btn","btn-outline-secondary","shadow","rounded","me-2",3,"click"],[1,"btn","btn-light","shadow","rounded","ms-2"],[1,"btn","btn-light","shadow","rounded","ms-2",3,"click"],["aria-hidden","true",1,"fa","fa-upload"],[3,"onUpload","onScan","onDescEvent","onCheckBoxChange","onDetach","productId","title","image","description","channels","code","showCheckBox","scanButton","uploadButton","imageForZoom","detachButton"],[1,"col-md-12"],[3,"next","previous","filter","totaldata","paginationTotal","hasClicked","nextButtonAlwaysVisible"]],template:function(i,n){if(i&1){let p=S();h(0,"mainpanel",1),m("onSubmit",function(d){return l(p),s(n.searchProduct(d))}),h(1,"actions"),A(2,gt,2,1,"ng-container",2)(3,ft,2,1,"ng-container",2)(4,xt,2,1,"ng-container",2)(5,wt,2,1,"ng-container",2),u(),h(6,"filters")(7,"div")(8,"label",3),w(9,"Category"),u(),h(10,"ng-select",4),m("ngModelChange",function(d){return l(p),s(n.searchFilter.Category=d)}),u()(),h(11,"div",5)(12,"mat-date-range-input",6)(13,"input",7),R("ngModelChange",function(d){return l(p),N(n.startDate,d)||(n.startDate=d),s(d)}),m("click",function(){l(p);let d=O(16);return s(d.open())}),u(),h(14,"input",8),R("ngModelChange",function(d){return l(p),N(n.endDate,d)||(n.endDate=d),s(d)}),m("click",function(){l(p);let d=O(16);return s(d.open())}),u()(),b(15,"mat-date-range-picker",null,0),u()(),h(17,"content")(18,"div",9)(19,"div",10),G(20,yt,2,11,"div",11,L),P(22,vt,2,0,"div",12),u(),P(23,Mt,3,5,"div",13),u()()()}if(i&2){let p=O(16);g("headerTitle","In POS ("+n.rowCount+")"),r(2),g("ngxPermissionsOnly",I(13,k,n.detachProductRole)),r(),g("ngxPermissionsOnly",I(15,k,n.scanProductRole)),r(),g("ngxPermissionsOnly",I(17,k,n.scanProductRole)),r(),g("ngxPermissionsOnly",I(19,k,n.scanProductRole)),r(5),g("clearable",!0)("items",n.Categories)("ngModel",n.searchFilter.Category),r(2),g("rangePicker",p),r(),E("ngModel",n.startDate),r(),E("ngModel",n.endDate),r(6),J(n.products),r(2),f(n.products.length==0?22:-1),r(),f(n.products.length>0?23:-1)}},dependencies:[et,Q,Y,q,K,z,j,nt,lt,st,dt,pt,ut,ht,mt],styles:[".badge-pill[_ngcontent-%COMP%]{padding-bottom:16px!important}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]:checked + label[_ngcontent-%COMP%]{background:#dfeffc;border:1px solid #dfeffc}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{visibility:hidden;position:absolute;left:0;top:0}.rad-btn[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{border:1px solid #ddd;border-radius:3px;margin-right:10px;cursor:pointer;padding:10px;margin-bottom:10px;color:#000;width:80px;text-align:center}.modal-dialog[_ngcontent-%COMP%]{max-width:30%!important}.product[_ngcontent-%COMP%]{height:100%!important}.row[_ngcontent-%COMP%]{margin-left:0;margin-right:0}ul[_ngcontent-%COMP%]{list-style-type:none}.link[_ngcontent-%COMP%]{color:#0202ab;cursor:pointer}.px-1[_ngcontent-%COMP%]{padding-left:5px!important}.sku[_ngcontent-%COMP%]{color:#696969;font-style:italic}.badge-pill[_ngcontent-%COMP%]{height:16px}.itemTitle[_ngcontent-%COMP%]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.no-title[_ngcontent-%COMP%]{margin-top:.33em;margin-bottom:.33rem}.mb-upload[_ngcontent-%COMP%]{padding-bottom:.625rem}.my-1rem[_ngcontent-%COMP%]{margin-bottom:1rem!important;margin-top:1rem!important}.pr-rem[_ngcontent-%COMP%]{padding-right:.6rem}.text-larger[_ngcontent-%COMP%]{font-size:larger}.bg-lightpink[_ngcontent-%COMP%]{background-color:#f9dede}.bottom-buttons[_ngcontent-%COMP%]{margin-left:97px}@media (min-width: 1200px){.max-w-xl[_ngcontent-%COMP%]{max-width:205px}}.navbar-toggler[_ngcontent-%COMP%]:focus{box-shadow:none!important}.img-logo[_ngcontent-%COMP%]{height:24px;width:24px}.dateRange[_ngcontent-%COMP%]{padding-top:.8rem;padding-bottom:.8rem}"]});let o=c;return o})();export{ie as InPosComponent};