marketplacepos 5.45.0 → 5.46.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 (187) hide show
  1. package/Marketplace/chunk-26ZM2UD3.js +1 -0
  2. package/Marketplace/{chunk-FPYZBABH.js → chunk-2O4IEGGR.js} +1 -1
  3. package/Marketplace/chunk-2SGPD432.js +1 -0
  4. package/Marketplace/{chunk-B7JSVIVV.js → chunk-2XWZQCUR.js} +1 -1
  5. package/Marketplace/{chunk-XP6R2ZYJ.js → chunk-2Z7CPNRS.js} +1 -1
  6. package/Marketplace/{chunk-Z3ZYINRX.js → chunk-3BALA33G.js} +1 -1
  7. package/Marketplace/{chunk-6RLISMEX.js → chunk-3GDM5JNY.js} +1 -1
  8. package/Marketplace/chunk-3VUO4APC.js +1 -0
  9. package/Marketplace/{chunk-LBXSZJDS.js → chunk-4G7SG2H6.js} +1 -1
  10. package/Marketplace/{chunk-6WCXK7FR.js → chunk-4LZODV4E.js} +2 -2
  11. package/Marketplace/chunk-4NEKWRL7.js +1 -0
  12. package/Marketplace/chunk-4TDVVQ64.js +1 -0
  13. package/Marketplace/chunk-4YRBARG2.js +1 -0
  14. package/Marketplace/{chunk-LDD4NVMB.js → chunk-5CKVZBHM.js} +1 -1
  15. package/Marketplace/{chunk-PFXOFSJG.js → chunk-67HPC5Y3.js} +1 -1
  16. package/Marketplace/{chunk-MMUSTFHH.js → chunk-6CIQBRO4.js} +1 -1
  17. package/Marketplace/{chunk-FFCWYWBW.js → chunk-6H2KAYSB.js} +6 -99
  18. package/Marketplace/{chunk-WLRPCY65.js → chunk-6OMSPZZC.js} +1 -1
  19. package/Marketplace/{chunk-6VDV7CA2.js → chunk-6U4YIJLC.js} +2 -2
  20. package/Marketplace/chunk-6VYFG4AQ.js +1 -0
  21. package/Marketplace/chunk-77MWKV5I.js +158 -0
  22. package/Marketplace/chunk-7DJXZQ7M.js +1 -0
  23. package/Marketplace/{chunk-DFGZ4L65.js → chunk-7G6GQTSH.js} +1 -1
  24. package/Marketplace/{chunk-BBQGPXDH.js → chunk-A6PXM4YX.js} +1 -1
  25. package/Marketplace/{chunk-HFCAD7GH.js → chunk-ABYG6YZT.js} +1 -1
  26. package/Marketplace/{chunk-3TYYN7ZX.js → chunk-AGZCB65X.js} +1 -1
  27. package/Marketplace/{chunk-QHE3PKRD.js → chunk-BAXQ2L7B.js} +1 -1
  28. package/Marketplace/{chunk-2HNZ6XV3.js → chunk-BKRCW7SH.js} +1 -1
  29. package/Marketplace/{chunk-IQ4AFE6X.js → chunk-BMYBLBSP.js} +3 -3
  30. package/Marketplace/chunk-CGEIIRYF.js +1 -0
  31. package/Marketplace/chunk-CGOB6Y3X.js +1 -0
  32. package/Marketplace/{chunk-3LN6RMRN.js → chunk-CJ4F7QUO.js} +1 -1
  33. package/Marketplace/chunk-CRKCNTXF.js +1 -0
  34. package/Marketplace/{chunk-JJKMVDXR.js → chunk-CVM573KF.js} +1 -1
  35. package/Marketplace/{chunk-6V4LFY52.js → chunk-DAXM2MPK.js} +1 -1
  36. package/Marketplace/chunk-DB7C3AL2.js +257 -0
  37. package/Marketplace/chunk-DSYYZDXI.js +1 -0
  38. package/Marketplace/chunk-DZEO4HK4.js +1 -0
  39. package/Marketplace/chunk-EFI2CLNP.js +1 -0
  40. package/Marketplace/{chunk-2I7ZZ3F2.js → chunk-EHBCYQSG.js} +1 -1
  41. package/Marketplace/{chunk-QP4C4R4W.js → chunk-EHUVS2VB.js} +1 -1
  42. package/Marketplace/{chunk-2TN45S53.js → chunk-EI65NYTN.js} +1 -1
  43. package/Marketplace/chunk-EPBVNII2.js +51 -0
  44. package/Marketplace/{chunk-G7T42LFR.js → chunk-EYONZQ2W.js} +1 -1
  45. package/Marketplace/chunk-F2533PAC.js +1 -0
  46. package/Marketplace/chunk-FB2AEPXA.js +15 -0
  47. package/Marketplace/{chunk-VVX6LRMW.js → chunk-FGFIV3VO.js} +1 -1
  48. package/Marketplace/chunk-FGRPTNDB.js +234 -0
  49. package/Marketplace/chunk-FHWKSD5A.js +3 -0
  50. package/Marketplace/chunk-FIAI5SPR.js +1 -0
  51. package/Marketplace/chunk-FTWATKXK.js +1 -0
  52. package/Marketplace/chunk-GHVAGYK3.js +2 -0
  53. package/Marketplace/chunk-GKRWJPI3.js +2 -0
  54. package/Marketplace/chunk-GPGD3XQH.js +1 -0
  55. package/Marketplace/{chunk-ZKXPDUO4.js → chunk-GQXYHXWJ.js} +1 -1
  56. package/Marketplace/{chunk-YIXZLIPA.js → chunk-GRYGUILI.js} +2 -2
  57. package/Marketplace/{chunk-BJUPMCEP.js → chunk-GZKOMS4T.js} +1 -1
  58. package/Marketplace/{chunk-LF6HWNC2.js → chunk-HERZ7KEM.js} +1 -1
  59. package/Marketplace/{chunk-FESS3PG3.js → chunk-HHO2NGCF.js} +1 -1
  60. package/Marketplace/{chunk-3UN6FPMN.js → chunk-HIC5QC3Y.js} +1 -1
  61. package/Marketplace/{chunk-4VITMSIA.js → chunk-HITTNWB6.js} +1 -1
  62. package/Marketplace/{chunk-FO7G4GMY.js → chunk-HJXYT6MI.js} +3 -3
  63. package/Marketplace/{chunk-5LQRO4AI.js → chunk-IHSGQFDX.js} +2 -2
  64. package/Marketplace/{chunk-XXWBR6S5.js → chunk-IITU3NV6.js} +1 -1
  65. package/Marketplace/chunk-ISUN5G42.js +5 -0
  66. package/Marketplace/chunk-IWKRZSYG.js +1 -0
  67. package/Marketplace/{chunk-LDPDLCRL.js → chunk-JBT7GBCM.js} +1 -1
  68. package/Marketplace/{chunk-BFPMFJI7.js → chunk-JGEU4EJT.js} +1 -1
  69. package/Marketplace/chunk-JYCBJ7CC.js +1 -0
  70. package/Marketplace/chunk-KCFCXS2F.js +1 -0
  71. package/Marketplace/{chunk-L7EQZACZ.js → chunk-KFOHH7PE.js} +1 -1
  72. package/Marketplace/chunk-KRQHTRFM.js +7 -0
  73. package/Marketplace/{chunk-B67DSLBY.js → chunk-KS7ACI26.js} +6 -6
  74. package/Marketplace/{chunk-OK3LLCAK.js → chunk-KSHWHTCH.js} +1 -1
  75. package/Marketplace/{chunk-LK2PMDRL.js → chunk-L7TKCTLD.js} +1 -1
  76. package/Marketplace/{chunk-RNTPX24O.js → chunk-LBMUKJV5.js} +1 -1
  77. package/Marketplace/{chunk-UXPULNCR.js → chunk-LDL3A7NM.js} +1 -1
  78. package/Marketplace/chunk-LFGPYQCI.js +1 -0
  79. package/Marketplace/chunk-LOU3DIPY.js +1 -0
  80. package/Marketplace/{chunk-DZYBXWL2.js → chunk-LYPHZP72.js} +1 -1
  81. package/Marketplace/chunk-M7LXGXUM.js +1 -0
  82. package/Marketplace/{chunk-NNRBGHXB.js → chunk-MFQQEEHJ.js} +3 -3
  83. package/Marketplace/chunk-MJNFY4NT.js +1 -0
  84. package/Marketplace/chunk-MX5SR3SR.js +94 -0
  85. package/Marketplace/chunk-NLPXBGIX.js +1 -0
  86. package/Marketplace/{chunk-CHWXOJDB.js → chunk-NNOI3AG4.js} +1 -1
  87. package/Marketplace/chunk-NWWYOZ4V.js +5 -0
  88. package/Marketplace/chunk-OAG6OVUY.js +1 -0
  89. package/Marketplace/{chunk-TC4JRJQL.js → chunk-OE7TF7SI.js} +1 -1
  90. package/Marketplace/{chunk-QK4BGDSS.js → chunk-OHVOVAKD.js} +1 -1
  91. package/Marketplace/chunk-OJZ7NGRW.js +1 -0
  92. package/Marketplace/{chunk-DDVDUCPY.js → chunk-ORLTYLPA.js} +1 -1
  93. package/Marketplace/chunk-OVPVQS4J.js +33 -0
  94. package/Marketplace/{chunk-UIFPDTMW.js → chunk-OXWPLJEW.js} +1 -1
  95. package/Marketplace/{chunk-BQIB3N6V.js → chunk-PFY5UG5D.js} +1 -1
  96. package/Marketplace/{chunk-74ELVGDK.js → chunk-PHUHUFYL.js} +1 -1
  97. package/Marketplace/{chunk-ELSSXU6Y.js → chunk-PIBVGTHJ.js} +1 -1
  98. package/Marketplace/{chunk-OFZOAEW5.js → chunk-PQQSREEC.js} +1 -1
  99. package/Marketplace/{chunk-QBL6V7QF.js → chunk-Q4N2QUV6.js} +1 -1
  100. package/Marketplace/{chunk-QE3IIBDW.js → chunk-QOP7KZK7.js} +1 -1
  101. package/Marketplace/{chunk-M7V7A7Z6.js → chunk-QW4EOJRM.js} +1 -1
  102. package/Marketplace/{chunk-WPELZYFP.js → chunk-QWISVEBT.js} +1 -1
  103. package/Marketplace/{chunk-4KHHGHFJ.js → chunk-RAQRGWCZ.js} +2 -2
  104. package/Marketplace/chunk-RC5PUUVM.js +193 -0
  105. package/Marketplace/{chunk-WWISWZF5.js → chunk-RGAKHXPF.js} +1 -1
  106. package/Marketplace/{chunk-ZBKUZ4CN.js → chunk-RGAWEFPQ.js} +1 -1
  107. package/Marketplace/{chunk-V5KHEF77.js → chunk-RJ5D24ZW.js} +1 -1
  108. package/Marketplace/chunk-RM2OSYMV.js +1 -0
  109. package/Marketplace/{chunk-KXEADFBM.js → chunk-RNNH3EZC.js} +1 -1
  110. package/Marketplace/{chunk-YNJPF4PB.js → chunk-S3FZRSRP.js} +1 -1
  111. package/Marketplace/{chunk-HPFBJL3A.js → chunk-SLEJQAL7.js} +1 -1
  112. package/Marketplace/chunk-SZGOLKC6.js +1 -0
  113. package/Marketplace/{chunk-UYLSZYOD.js → chunk-T2OSIFLN.js} +1 -1
  114. package/Marketplace/chunk-T43QRQH5.js +1 -0
  115. package/Marketplace/chunk-TE5EYKIN.js +5 -0
  116. package/Marketplace/chunk-TGQ5CJ3A.js +1 -0
  117. package/Marketplace/chunk-UGG2CIUU.js +1 -0
  118. package/Marketplace/{chunk-WFT47MCY.js → chunk-UZWED4UK.js} +1 -1
  119. package/Marketplace/{chunk-BYSLV4DQ.js → chunk-V6UNCLNJ.js} +2 -2
  120. package/Marketplace/{chunk-LRUVI2Z3.js → chunk-VFATXJRG.js} +1 -1
  121. package/Marketplace/chunk-VIDSOLHF.js +1 -0
  122. package/Marketplace/{chunk-FVORY74O.js → chunk-W3DTXPRM.js} +1 -1
  123. package/Marketplace/{chunk-6KBMGQMI.js → chunk-WAZXTB4X.js} +1 -1
  124. package/Marketplace/{chunk-W5L6FMO3.js → chunk-WN5DZGA4.js} +1 -1
  125. package/Marketplace/{chunk-A64VIOKR.js → chunk-WRJFUNM3.js} +1 -1
  126. package/Marketplace/{chunk-TYG67JH3.js → chunk-XPCRS7AL.js} +1 -1
  127. package/Marketplace/{chunk-TH6VZX34.js → chunk-XXT6F2ZS.js} +1 -1
  128. package/Marketplace/{chunk-KUUDZPGN.js → chunk-YB4KXB2C.js} +1 -1
  129. package/Marketplace/chunk-YFDFIBAG.js +1 -0
  130. package/Marketplace/{chunk-N2SPK2VI.js → chunk-YQLOB7IQ.js} +1 -1
  131. package/Marketplace/{chunk-PPHTN2H6.js → chunk-YTCIQBSO.js} +1 -1
  132. package/Marketplace/chunk-ZUYGRGXM.js +1 -0
  133. package/Marketplace/{chunk-H46SHHXR.js → chunk-ZVKOEYH7.js} +1 -1
  134. package/Marketplace/chunk-ZXTHWBJ4.js +1 -0
  135. package/Marketplace/index.html +2 -2
  136. package/Marketplace/main-RRL4BIVO.js +1 -0
  137. package/package.json +1 -1
  138. package/Marketplace/chunk-2LK24YA5.js +0 -1
  139. package/Marketplace/chunk-37L3YDKT.js +0 -1
  140. package/Marketplace/chunk-3E7JHNVC.js +0 -5
  141. package/Marketplace/chunk-3FPEQHTI.js +0 -7
  142. package/Marketplace/chunk-42MFOGHP.js +0 -5
  143. package/Marketplace/chunk-4Q5ZSKVO.js +0 -1
  144. package/Marketplace/chunk-4ZQCJGTZ.js +0 -1
  145. package/Marketplace/chunk-6NUQGKRV.js +0 -1
  146. package/Marketplace/chunk-6VHVQEVM.js +0 -3
  147. package/Marketplace/chunk-6ZOHSFR5.js +0 -1
  148. package/Marketplace/chunk-7AE3725T.js +0 -193
  149. package/Marketplace/chunk-BERZDE6Y.js +0 -1
  150. package/Marketplace/chunk-BZBQHO76.js +0 -1
  151. package/Marketplace/chunk-CNJDARBM.js +0 -1
  152. package/Marketplace/chunk-D5YID4W4.js +0 -5
  153. package/Marketplace/chunk-DSQSL5VX.js +0 -15
  154. package/Marketplace/chunk-EVQLTXB7.js +0 -1
  155. package/Marketplace/chunk-FAMP5PPX.js +0 -1
  156. package/Marketplace/chunk-FJ455ZYZ.js +0 -1
  157. package/Marketplace/chunk-FOFXARTB.js +0 -1
  158. package/Marketplace/chunk-GLVYOZA4.js +0 -1
  159. package/Marketplace/chunk-ID2YZPRH.js +0 -1
  160. package/Marketplace/chunk-IML3KYQE.js +0 -1
  161. package/Marketplace/chunk-J53BPEDH.js +0 -1
  162. package/Marketplace/chunk-JBNND5FL.js +0 -1
  163. package/Marketplace/chunk-JFS634DA.js +0 -1
  164. package/Marketplace/chunk-K5XRGNWG.js +0 -1
  165. package/Marketplace/chunk-L7KCZLIM.js +0 -1
  166. package/Marketplace/chunk-LCRPUAWG.js +0 -1
  167. package/Marketplace/chunk-LHX4ZOLA.js +0 -2
  168. package/Marketplace/chunk-LQ2NLQKV.js +0 -1
  169. package/Marketplace/chunk-MBBQZFI4.js +0 -1
  170. package/Marketplace/chunk-MWTFYMKY.js +0 -1
  171. package/Marketplace/chunk-ORDCBJ4G.js +0 -2
  172. package/Marketplace/chunk-PQGPOOCK.js +0 -1
  173. package/Marketplace/chunk-QUKRHI5J.js +0 -1
  174. package/Marketplace/chunk-R7INAZCD.js +0 -1
  175. package/Marketplace/chunk-RDRNWLJI.js +0 -1
  176. package/Marketplace/chunk-RHF7TPRF.js +0 -1
  177. package/Marketplace/chunk-RLBTXXCD.js +0 -1
  178. package/Marketplace/chunk-RQEQPIMI.js +0 -1
  179. package/Marketplace/chunk-RTT3JVJM.js +0 -1
  180. package/Marketplace/chunk-SHRLQGK3.js +0 -1
  181. package/Marketplace/chunk-TZEINVZY.js +0 -1
  182. package/Marketplace/chunk-UHTMVOX6.js +0 -1
  183. package/Marketplace/chunk-UML74HNB.js +0 -1
  184. package/Marketplace/chunk-WJAE4LW2.js +0 -51
  185. package/Marketplace/chunk-XNVULGQ3.js +0 -266
  186. package/Marketplace/chunk-YWSUS64O.js +0 -1
  187. package/Marketplace/main-ZZ76NVAH.js +0 -1
@@ -1 +0,0 @@
1
- import{a as pn}from"./chunk-VVX6LRMW.js";import{a as Xe}from"./chunk-A44LN77B.js";import{a as ze}from"./chunk-BERZDE6Y.js";import{a as He,b as Ke}from"./chunk-OFZOAEW5.js";import{b as dn}from"./chunk-YIXZLIPA.js";import{a as Q}from"./chunk-OLANEXLB.js";import{a as tn}from"./chunk-YERZ6W22.js";import{e as wt}from"./chunk-2TN45S53.js";import"./chunk-6KBMGQMI.js";import{d as Qe,k as an,l as rn,m as ln,n as cn,o as sn}from"./chunk-B67DSLBY.js";import{a as Qt}from"./chunk-ID2YZPRH.js";import{a as Y}from"./chunk-MBBQZFI4.js";import"./chunk-PE5AFID4.js";import{a as Zt,b as qt,c as Ye}from"./chunk-OK3LLCAK.js";import{b as mn}from"./chunk-HFCAD7GH.js";import{a as en,b as nn}from"./chunk-4KHHGHFJ.js";import"./chunk-HVCIQI7B.js";import{a as J}from"./chunk-DDVDUCPY.js";import{a as pt}from"./chunk-QHE3PKRD.js";import{c as Ze,f as qe}from"./chunk-6RLISMEX.js";import"./chunk-TH6VZX34.js";import"./chunk-QS22J2SC.js";import"./chunk-QP4C4R4W.js";import"./chunk-PPHTN2H6.js";import"./chunk-LDD4NVMB.js";import"./chunk-2HNZ6XV3.js";import"./chunk-WWISWZF5.js";import"./chunk-UYLSZYOD.js";import"./chunk-M7V7A7Z6.js";import"./chunk-QBL6V7QF.js";import"./chunk-DFGZ4L65.js";import"./chunk-RHHHL4OR.js";import{a as q}from"./chunk-3FPEQHTI.js";import"./chunk-5LQRO4AI.js";import"./chunk-MO53T3IK.js";import"./chunk-W3JTS22H.js";import"./chunk-SDUUFQUI.js";import"./chunk-6L7TD5DW.js";import"./chunk-WLRPCY65.js";import"./chunk-3RK6DDJD.js";import{a as Yt}from"./chunk-3UN6FPMN.js";import{f as Je}from"./chunk-LDPDLCRL.js";import{a as U}from"./chunk-UMP6ZMEJ.js";import"./chunk-N2SPK2VI.js";import"./chunk-OZ7LWNOK.js";import"./chunk-UHTMVOX6.js";import"./chunk-7AE3725T.js";import{a as $e,b as We}from"./chunk-A64VIOKR.js";import"./chunk-JVNHFIYT.js";import{a as on}from"./chunk-3YP6ORBR.js";import{a as dt}from"./chunk-7KG3DC5J.js";import"./chunk-FJ455ZYZ.js";import{a as ot}from"./chunk-UXPULNCR.js";import{h as K}from"./chunk-6VHVQEVM.js";import"./chunk-Z3ITXK3D.js";import"./chunk-ACIMXBIC.js";import"./chunk-J53BPEDH.js";import"./chunk-TGMCGROM.js";import{a as Re}from"./chunk-RDRNWLJI.js";import{b as H,e as W}from"./chunk-W5L6FMO3.js";import"./chunk-K5XRGNWG.js";import{a as bt,b as Ht,d as lt,e as Ae}from"./chunk-PYXL7UF7.js";import{b as I,c as f}from"./chunk-PW42BQIY.js";import{b as vt,c as Pt,d as it,e as Ue,f as Le,g as Be,h as je,i as Kt,j as It,k as Jt,m as Z,n as Ge}from"./chunk-FO7G4GMY.js";import{A as yt,b as Fe,c as xt,h as j,m as $}from"./chunk-5PS6ZS3N.js";import"./chunk-V3USB3ZU.js";import{a as Ne,b as nt,c as Ve}from"./chunk-ERXVXBTU.js";import{r as ct,s as st}from"./chunk-NNRBGHXB.js";import"./chunk-BJUPMCEP.js";import{E as Gt,F as ke,G as rt,H as zt,J as Ee,d as Wt,f as B,g as V,j as ft,k as Oe,m as St,n as et}from"./chunk-FXQKRJWU.js";import{$c as F,Fc as G,G as D,Gb as T,Gc as p,Hb as Pe,Hc as A,Ic as v,K as Ce,Ka as kt,Kb as Ie,Kc as O,Lc as k,Mb as _,Mc as E,Ra as ht,Rc as Et,Sc as w,Tc as se,Vc as Te,X as fe,Xb as ae,Yb as l,Z as Bt,Zb as we,aa as Dt,ad as N,bd as De,ca as Ot,cd as z,dc as R,ea as jt,ec as re,f as Lt,fa as Se,g as oe,gc as le,hc as ce,ic as o,ja as xe,jc as r,ka as ye,kc as g,lc as y,mc as b,oa as be,ob as ve,oc as x,pa as tt,pb as M,rb as a,tc as C,uc as s,v as ut,vc as Me,wc as $t,xb as S,ya as m,za as u}from"./chunk-OJMQBH6T.js";import"./chunk-EU2KAMEK.js";import"./chunk-66YHNWRR.js";var un=(()=>{class i{constructor(){this.productTabs=[{Title:"Sold in Channel",Url:"/menu/products/status/sold-in-channel",Description:"SKU has been mapped between dealpos and marketplace"},{Title:"Not in POS",Url:"/menu/products/status/not-in-pos",Description:"SKU sold in Marketplace but not exist in DEALPOS"},{Title:"Not in Channel",Url:"/menu/products/status/not-in-channel",Description:"SKU has not been sold on one of channels"},{Title:"In POS",Url:"/menu/products/status/in-pos",Description:"All products which is already available in POS"},{Title:"Multiple Listing",Url:"/menu/products/status/duplicate-sku",Description:"SKU(s) which is listed more than one time (one to many)"},{Title:"Channel Statistic",Url:"/menu/products/status/channel-statistic",Description:"Product statistic from each channel obtained from the last product scan"},{Title:"Scan Job",Url:"/menu/products/status/notification",Description:"Scan results for each channel, including product counts and synchronization status"}]}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275cmp=T({type:i,selectors:[["app-status"]],standalone:!1,decls:5,vars:1,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid","d-flex","align-items-center","justify-content-between"],[3,"Tabs"]],template:function(n,e){n&1&&(o(0,"nav",0)(1,"div",1)(2,"div"),g(3,"nav-tab",2),r()()(),g(4,"router-outlet")),n&2&&(a(3),l("Tabs",e.productTabs))},dependencies:[$e,ke],encapsulation:2})}}return i})();function wn(i,d){if(i&1&&(o(0,"div",10),g(1,"img",11),o(2,"span"),p(3),r()()),i&2){let t=d.$implicit;l("matTooltip",t.disabled?"Single Product Scan disabled for this type of Channel":null),a(),l("src",t.Img,M),a(2),A(t.Name)}}function Mn(i,d){if(i&1&&(o(0,"div",10),g(1,"img",11),o(2,"span"),p(3),r()()),i&2){let t=d.$implicit;l("matTooltip",t.disabled?"Single Product Scan disabled for this type of Channel":null),a(),l("src",t.Img,M),a(2),A(t.Name)}}function Tn(i,d){if(i&1&&(o(0,"div",10),g(1,"img",11),o(2,"span"),p(3),r()()),i&2){let t=d.$implicit;l("matTooltip",t.disabled?"Single Product Scan disabled for this type of Channel":null),a(),l("src",t.Img,M),a(2),A(t.Name)}}function Dn(i,d){if(i&1&&(o(0,"mat-radio-button",16),p(1," Sellable "),r()),i&2){let t=s(2);l("value",t.scanTypeEnum.Sellable)}}function On(i,d){if(i&1){let t=x();o(0,"div",12)(1,"label",13),p(2,"Scan Type"),r(),o(3,"mat-radio-group",14),E("ngModelChange",function(e){m(t);let c=s();return k(c.filter.ScanFull,e)||(c.filter.ScanFull=e),u(e)}),o(4,"mat-radio-button",15),p(5," All "),r(),_(6,Dn,2,1,"mat-radio-button",16),o(7,"mat-radio-button",17),p(8," Active "),r()()()}if(i&2){let t=s();a(3),O("ngModel",t.filter.ScanFull),a(),l("value",t.scanTypeEnum.All),a(2),R(t.selectedChannel.TypeID==t.channelType.Tiktok?6:-1),a(),l("value",t.scanTypeEnum.Active)}}function kn(i,d){i&1&&(o(0,"span"),p(1,"Never"),r())}function En(i,d){if(i&1&&(o(0,"span"),p(1),F(2,"async"),r()),i&2){let t=s(2);a(),A(N(2,1,t.lastSync$))}}function Fn(i,d){if(i&1){let t=x();o(0,"div",8)(1,"label",5)(2,"span",18),p(3,"Last Scan:"),r(),_(4,kn,2,0,"span"),F(5,"async"),_(6,En,3,3,"span"),r(),o(7,"mat-radio-group",19),E("ngModelChange",function(e){m(t);let c=s();return k(c.filter.UpdatedProduct,e)||(c.filter.UpdatedProduct=e),u(e)}),o(8,"mat-radio-button",20),p(9," Scan All Products "),r(),o(10,"mat-radio-button",21),p(11),r()()()}if(i&2){let t=s();a(4),R(N(5,6,t.lastSync$)==null?4:6),a(3),O("ngModel",t.filter.UpdatedProduct),a(),l("value",!1),a(2),l("value",!0)("matTooltip",t.selectedChannel.TypeID==t.channelType.Tokopedia?"Use Tokopedia URL for mapping SKU between POS and Tokopedia":"Scan only products that have been updated since the last channel scan"),a(),v(" ",t.selectedChannel.TypeID==t.channelType.Tokopedia?"Product Download By URL":"Scan Updated Products"," ")}}function Nn(i,d){if(i&1){let t=x();o(0,"div",8)(1,"label",5),p(2," Scan Option "),r(),o(3,"mat-radio-group",22),E("ngModelChange",function(e){m(t);let c=s();return k(c.filter.Async,e)||(c.filter.Async=e),u(e)}),o(4,"mat-radio-button",23),p(5," Asynchronous (Get Notified when Complete) "),r(),o(6,"mat-radio-button",24),p(7," Synchronous (Wait until Complete) "),r()()()}if(i&2){let t=s();a(3),O("ngModel",t.filter.Async),a(),l("value",!0),a(2),l("value",!1)}}var L=(()=>{class i extends Xe{constructor(t,n,e){super(),this.dialogRef=t,this.data=n,this.router=e,this.channelService=tt(ze),this.channelType=I,this.disabledChannelOption=!1,this.filter={ChannelID:f.GuidEMpty,ScanFull:0,UpdatedProduct:!1,Async:!1},this.scanTypeEnum=tn,this.isSingleChannel=f.IsNotEmpty(n.isSingleChannel)?this.data.isSingleChannel:!1,this.disabledChannelOption=f.IsEmpty(n.disabledChannelOption)?!1:this.data.disabledChannelOption}ngOnInit(){this.initChannelOptions(),this.initFilter(),this.onSelectChannel(this.data?.filter?.ChannelID),this.initModalConfig()}ngAfterViewInit(){this.initTopPosition()}ngOnDestroy(){this.stopOverlayObserver()}initModalConfig(){this.modalConfig=new It,this.modalConfig.title=this.isSingleChannel?"Scan Single Product":"Scan Channel Marketplace",this.modalConfig.bodyScrollable=!0}initFilter(){this.filter.ChannelID=this.data?.filter?.ChannelID}initChannelOptions(){this.channelOptions=JSON.parse(JSON.stringify(this.data.channelOptions)),this.isSingleChannel&&(this.channelOptions=this.channelOptions.map(t=>(t.disabled=!0,(t.TypeID==I.Tiktok||t.TypeID==I.Tokopedia||t.TypeID==I.Lazada||t.TypeID==I.WooCommerce)&&(t.disabled=!1),t)).sort(t=>t.disabled?1:-1))}onSelectChannel(t){let n=this.filterChannelById(t);this.selectedChannel=n,this.filter.Async=!0,this.iniHasScanUpdate(),this.getLastSync(t)}onClickSelect(){setTimeout(()=>{this.adjustOverlayPosition()},0)}getLastSync(t){this.lastSync$=this.channelService.getLastSync(t).pipe(ut(n=>(this.selectedChannel.LastSync=n.LastSync,this.setDefaultConfigUpdate(),f.IsNotEmpty(n.LastSync)?f.convertToReadableDate(n.LastSync):null)),Bt(1))}setDefaultConfigUpdate(){this.filter.UpdatedProduct=!1,this.selectedChannel&&f.IsNotEmpty(this.selectedChannel.LastSync)&&(this.selectedChannel.TypeID==I.Shopee||this.selectedChannel.TypeID==I.Tiktok||this.selectedChannel.TypeID==I.Lazada)&&(this.filter.UpdatedProduct=!0)}iniHasScanUpdate(){this.selectedChannel?.TypeID!=I.WooCommerce&&this.selectedChannel?.TypeID!=I.KalCare&&this.selectedChannel?.TypeID!=I.None&&!this.isSingleChannel?this.hasScanUpdate=!0:this.hasScanUpdate=!1}filterChannelById(t){let n;return this.channelOptions&&(n=this.channelOptions.find(e=>e.ID==t)),n}submit(){this.selectedChannel.TypeID==I.Tokopedia&&this.filter.UpdatedProduct?this.router.navigate(["/menu/products/download/by-url"]).then(()=>{this.dialogRef.close()}):this.dialogRef.close(this.filter)}isNotEmpty(t){return f.IsNotEmpty(t)}onClose(){this.dialogRef.close()}static{this.\u0275fac=function(n){return new(n||i)(S(vt),S(Pt),S(rt))}}static{this.\u0275cmp=T({type:i,selectors:[["app-scan-dialog"]],features:[Ie],decls:15,vars:8,consts:[["selectedItem",""],["item",""],[3,"onOk","onClose","onCancel","dynamicValidated","config"],["content",""],[1,"mx-4"],[1,"mb-2","fw-bold"],["optionLabel","Name","optionValue","ID","placeholder","Select a Channel","appendTo","body","filterBy","Name",1,"w-100",2,"--p-select-padding-y","0.75rem",3,"click","ngModelChange","options","ngModel","filter"],["class","mt-4",4,"ngIf"],[1,"mt-8"],["class","mt-8",4,"ngIf"],["matTooltipPosition","above","matTooltipClass","custom-width-tooltip",3,"matTooltip"],[2,"width","18px","margin-right","10px",3,"src"],[1,"mt-4"],[1,"mb-2","fw-bold","mt-3"],["name","scanType",1,"form-control","h-100","rounded-1",3,"ngModelChange","ngModel"],["matTooltipClass","custom-width-tooltip","matTooltipPosition","above","matTooltip","Scans all products across every status in seller center",1,"me-5",3,"value"],["matTooltipClass","custom-width-tooltip","matTooltipPosition","above","matTooltip","Scans products available for sale, including Active, Pending, Seller Deactivated, and Unknown status in seller center",1,"me-5",3,"value"],["matTooltipClass","custom-width-tooltip","matTooltipPosition","above","matTooltip","Scan Product with Active status in seller center",1,"me-5",3,"value"],[1,"me-2"],["name","ScanFull",1,"form-control","h-100","rounded-1",2,"line-height","2",3,"ngModelChange","ngModel"],["matTooltipClass","custom-width-tooltip","matTooltipPosition","above","matTooltip","Scan product from beginning ( use this if you haven't scanned at all)",1,"me-5",3,"value"],["matTooltipClass","custom-width-tooltip","matTooltipPosition","above",1,"me-5",3,"value","matTooltip"],["name","Async",1,"form-control","h-100","rounded-1",2,"line-height","2",3,"ngModelChange","ngModel"],["matTooltipClass","custom-width-tooltip","matTooltip","Scan is running in the background, status will be visible in the notification menu","matTooltipPosition","above",1,"me-5",3,"value"],[1,"me-5",3,"value"]],template:function(n,e){if(n&1){let c=x();o(0,"modal-material",2),C("onOk",function(){return m(c),u(e.submit())})("onClose",function(){return m(c),u(e.onClose())})("onCancel",function(){return m(c),u(e.onClose())}),o(1,"div",3)(2,"div",4)(3,"label",5),p(4,"Select a Channel"),r(),o(5,"p-select",6),C("click",function(){return m(c),u(e.onClickSelect())}),E("ngModelChange",function(P){return m(c),k(e.filter.ChannelID,P)||(e.filter.ChannelID=P),u(P)}),C("ngModelChange",function(P){return m(c),u(e.onSelectChannel(P))}),_(6,wn,4,3,"ng-template",null,0,z)(8,Mn,4,3,"ng-template",null,1,z)(10,Tn,4,3,"ng-template",null,1,z),r(),_(12,On,9,4,"div",7)(13,Fn,12,8,"div",8)(14,Nn,8,3,"div",9),r()()()}n&2&&(l("dynamicValidated",e.isNotEmpty(e.filter.ChannelID))("config",e.modalConfig),a(5),l("options",e.channelOptions),O("ngModel",e.filter.ChannelID),l("filter",!0),a(7),l("ngIf",!e.isSingleChannel&&e.isNotEmpty(e.filter.ChannelID)),a(),R(e.hasScanUpdate&&e.selectedChannel?13:-1),a(),l("ngIf",!e.isSingleChannel&&e.isNotEmpty(e.filter.ChannelID)))},dependencies:[et,V,ft,Ke,He,yt,j,$,Jt,Yt,qt,st,ct,qe,Zt],encapsulation:2})}}return i})();var Ct=function(i){return i.Tokopedia="https://seller.tokopedia.com",i.Shoope="https://seller.shopee.co.id",i.Tiktok="https://seller-id.tiktok.com",i.WooCommerce="https://woocommerce.dealpos.app",i.Lazada="https://sellercenter.lazada.co.id",i}(Ct||{});var pe={Success:"Success",Info:"Info",Warning:"Warning",Error:"Error"};var Vn=[[["header"]],[["content"]],[["footer"]]],Rn=["header","content","footer"],An=(i,d)=>({bodyScrollable:i,hideScrollbar:d}),Un=(i,d,t,n)=>({"bg-success":i,"bg-warning":d,"bg-info":t,"bg-danger":n}),Ln=i=>({"mx-auto":i}),Bn=(i,d)=>({"show-footer":i,"p-0":d});function jn(i,d){if(i&1){let t=x();o(0,"div",8),C("click",function(){m(t);let e=s();return u(e.onBack.emit())}),o(1,"a",9),g(2,"i",10),r()()}}function $n(i,d){if(i&1){let t=x();o(0,"div")(1,"a",11),C("click",function(){m(t);let e=s();return u(e.onClose.emit())}),g(2,"i",12),r()()}}function Wn(i,d){if(i&1){let t=x();o(0,"a",16),C("click",function(){m(t);let e=s(2);return u(e.onCancel.emit())}),p(1),r()}if(i&2){let t=s(2);a(),v(" ",t.config!=null&&t.config.cancelText?t.config==null?null:t.config.cancelText:"Cancel","")}}function Gn(i,d){if(i&1){let t=x();o(0,"button",17),C("click",function(){m(t);let e=s(2);return u(e.onOk.emit())})("keyup.F2",function(){m(t);let e=s(2);return u(e.onOk.emit())}),r()}if(i&2){let t=s(2);l("disabled",!(t.config!=null&&t.config.validated)||!t.dynamicValidated)("innerHTML",t.config!=null&&t.config.okText?t.config==null?null:t.config.okText:"Ok (F2)",ve)}}function zn(i,d){if(i&1&&(o(0,"mat-dialog-actions",13),$t(1,2),_(2,Wn,2,1,"a",14)(3,Gn,1,2,"button",15),r()),i&2){let t=s();a(2),l("ngIf",!(t.config!=null&&t.config.hideCancel)),a(),l("ngIf",!(t.config!=null&&t.config.hideOk))}}var me=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=pe.Success,this.validated=!0,this.customWidth="initial",this.bodyScrollable=!1,this.hideScrollbar=!1,this.disableKeyup=!1,this.noPadding=!1}},hn=(()=>{class i{constructor(){this.dynamicValidated=!0,this.onOk=new kt,this.onCancel=new kt,this.onClose=new kt,this.onBack=new kt,this.headerType=pe}ngOnInit(){this.config==null&&(this.config=new me)}onKeyup(t){this.config?.disableKeyup||(t.code=="F2"&&this.onOk.emit("F2"),(t.code=="Enter"||t.code=="NumpadEnter")&&this.onOk.emit("Enter"))}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275cmp=T({type:i,selectors:[["modal-material"]],inputs:{config:"config",dynamicValidated:"dynamicValidated"},outputs:{onOk:"onOk",onCancel:"onCancel",onClose:"onClose",onBack:"onBack"},ngContentSelectors:Rn,decls:11,vars:23,consts:[["id","modal_material",1,"modal-material","d-flex","align-items-start","flex-column","position-relative","maxHeight",3,"keyup","ngClass"],["mat-dialog-title","",1,"d-flex","w-100","justify-content-between","modal-header","position-relative",3,"ngClass"],["class","back-button position-absolute pointer d-print-none",3,"click",4,"ngIf"],[1,"d-flex","flex-row","d-print-none","align-items-center",3,"ngClass"],[1,"fw-normal"],[4,"ngIf"],[1,"modal-body","w-100",3,"ngClass"],["class","w-100 py-7 border-top d-flex justify-content-end d-print-none",4,"ngIf"],[1,"back-button","position-absolute","pointer","d-print-none",3,"click"],[1,"btn","back-button"],[1,"fa-solid","fa-arrow-left"],[1,"btn-light-blue","btn-sm","pointer","close",3,"click"],[1,"fa-solid","fa-xmark","fa-lg","text-primary"],[1,"w-100","py-7","border-top","d-flex","justify-content-end","d-print-none"],["class","btn btn-light-blue text-primary btn-lg fw-bold mx-3",3,"click",4,"ngIf"],["class","btn btn-light-blue me-6 text-primary btn-lg fw-bold mx-3","data-cy","btn-ok",3,"disabled","innerHTML","click","keyup.F2",4,"ngIf"],[1,"btn","btn-light-blue","text-primary","btn-lg","fw-bold","mx-3",3,"click"],["data-cy","btn-ok",1,"btn","btn-light-blue","me-6","text-primary","btn-lg","fw-bold","mx-3",3,"click","keyup.F2","disabled","innerHTML"]],template:function(n,e){n&1&&(Me(Vn),o(0,"div",0),C("keyup",function(h){return e.onKeyup(h)}),o(1,"div",1),_(2,jn,3,0,"div",2),o(3,"div",3)(4,"h4",4),p(5),r(),$t(6),r(),_(7,$n,3,0,"div",5),r(),o(8,"mat-dialog-content",6),$t(9,1),r(),_(10,zn,4,2,"mat-dialog-actions",7),r()),n&2&&(we("width",e.config==null?null:e.config.customWidth),l("ngClass",se(10,An,e.config==null?null:e.config.bodyScrollable,e.config==null?null:e.config.hideScrollbar)),a(),l("ngClass",Te(13,Un,e.headerType.Success==(e.config==null?null:e.config.headerType),e.headerType.Warning==(e.config==null?null:e.config.headerType),e.headerType.Info==(e.config==null?null:e.config.headerType),e.headerType.Error==(e.config==null?null:e.config.headerType))),a(),l("ngIf",e.config==null?null:e.config.eMoney),a(),l("ngClass",w(18,Ln,e.config==null?null:e.config.eMoney)),a(2),A(e.config==null?null:e.config.title),a(2),l("ngIf",!(e.config!=null&&e.config.hideClose)),a(),l("ngClass",se(20,Bn,!(e.config!=null&&e.config.hideFooter),e.config==null?null:e.config.noPadding)),a(2),l("ngIf",!(e.config!=null&&e.config.hideFooter)))},dependencies:[et,Wt,V,je,Ue,Be,Le],styles:[".mat-mdc-dialog-container{padding:0!important;border-radius:4px!important;overflow:visible!important} .mat-mdc-dialog-container [mat-dialog-title]{color:#fff;padding:15px;border:none}@media print{ .mat-mdc-dialog-container{box-shadow:unset;width:100vw}}@media print{ .cdk-overlay-pane{position:absolute!important;top:-30px;max-width:100vw!important}.modal-body[_ngcontent-%COMP%]{width:100vw!important}}body.modal-body[_ngcontent-%COMP%]{height:100%;overflow-y:hidden}mat-dialog-actions[_ngcontent-%COMP%]{bottom:15px}mat-dialog-actions[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{padding:15px!important;margin-right:12px}mat-dialog-actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{padding:15px!important}mat-dialog-actions[_ngcontent-%COMP%] .more[_ngcontent-%COMP%]{margin-right:auto;margin-top:-1rem;padding-top:.4rem!important;margin-left:1rem}.back-button[_ngcontent-%COMP%]{top:5px;left:0}.close[_ngcontent-%COMP%]{padding:.4rem .5rem}.no-padding[_ngcontent-%COMP%]{padding:0}.modal-material[_ngcontent-%COMP%]{width:40vw}@media (max-width: 992px){.modal-material[_ngcontent-%COMP%]{width:50vw!important}}@media (max-width: 576px){ .dialog-filter .modal-material{width:100%!important} .dialog-filter mat-dialog-actions{position:sticky;bottom:0;background:#fff} .dialog-filter .modal-material.d-flex.align-items-start.flex-column.position-relative.maxHeight.bodyScrollable.maxHeight.bodyScrollable .modal-body{max-height:100%!important;overflow-y:auto}}.maxHeight.bodyScrollable[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%]{max-height:450px;overflow-y:auto}.modal-header[_ngcontent-%COMP%], .modal-footer[_ngcontent-%COMP%], .modal-footer[_ngcontent-%COMP%] .btn[_ngcontent-%COMP%]{padding:15px}.modal-dialog[_ngcontent-%COMP%]{max-width:none}.modal-content[_ngcontent-%COMP%]{width:auto;margin:auto;max-width:850px}.maxHeight[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%]{max-height:450px;overflow:auto}.modal-body[_ngcontent-%COMP%]{padding:1rem}.modal-body[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{display:block}.modal-body[_ngcontent-%COMP%] .more[_ngcontent-%COMP%]{margin:0;position:absolute;bottom:-20px}.modal-body[_ngcontent-%COMP%] input[type=text][_ngcontent-%COMP%], .modal-body[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%], .modal-body[_ngcontent-%COMP%] input[type=password][_ngcontent-%COMP%]{border:1px solid #c8d3df;padding:5px 7px}.modal-body[_ngcontent-%COMP%] table[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]{width:330px;height:90px}"]})}}return i})();var Hn=i=>({"is-disabled":i});function Kn(i,d){if(i&1&&(y(0),o(1,"tr")(2,"td",10),p(3),r(),o(4,"td",10),p(5),r(),o(6,"td",11)(7,"p",12),p(8,"Product Not in Channel!"),r()()(),b()),i&2){let t=s().$implicit;a(3),v(" ",t==null?null:t.Model," "),a(2),v(" ",t==null?null:t.Code," ")}}function Jn(i,d){if(i&1&&(o(0,"td",10),p(1),r()),i&2){let t=s(3).$implicit;ae("rowspan",t.Channel.length),a(),v(" ",t==null?null:t.Model," ")}}function Yn(i,d){if(i&1&&(o(0,"td",10),p(1),r()),i&2){let t=s(3).$implicit;ae("rowspan",t.Channel.length),a(),v(" ",t==null?null:t.Code," ")}}function Zn(i,d){if(i&1){let t=x();o(0,"tr"),_(1,Jn,2,2,"td",13)(2,Yn,2,2,"td",13),o(3,"td",10)(4,"div",14)(5,"a",15),g(6,"img",16),r(),o(7,"div",17),p(8),r()()(),o(9,"td",10),p(10),F(11,"number"),r(),o(12,"td",18),p(13),F(14,"number"),r(),o(15,"td",19)(16,"div",20)(17,"button",21),C("click",function(){let e=m(t).$implicit,c=s(2).$implicit,h=s();return u(h.onDetach(e,c))}),g(18,"i",22),o(19,"span",23),p(20,"Detach"),r()(),o(21,"a",24),g(22,"i",25),o(23,"span",23),p(24,"Edit"),r()()()()()}if(i&2){let t=d.$implicit,n=d.$index,e=s(3);a(),l("ngIf",n==0),a(),l("ngIf",n==0),a(3),l("href",t.Url,M)("title",t.Title),a(),l("src",e.getChannelLogo(t.TypeID),M),a(),l("matTooltip",(t==null||t.Name==null?null:t.Name.length)>40?t==null?null:t.Name:""),a(),v(" ",t.Name," "),a(2),A(N(11,12,t.Price)),a(3),A(N(14,14,t.Inventory)),a(8),l("href",e.getHyperlinkSellerCenter(t),M)("ngClass",w(16,Hn,t.TypeID==e.channelType.KalCare))("matTooltip",t.TypeID!=e.channelType.KalCare?"Edit this product in Seller Center, inventory changes must be done via DEALPOS":"")}}function qn(i,d){if(i&1&&le(0,Zn,25,18,"tr",null,re),i&2){let t=s().$implicit;ce(t==null?null:t.Channel)}}function Qn(i,d){if(i&1&&_(0,Kn,9,2,"ng-container",9)(1,qn,2,0,"ng-template",null,0,z),i&2){let t=d.$implicit,n=G(2);l("ngIf",!t.Channel||t.Channel.length<1)("ngIfElse",n)}}var Xt=(()=>{class i{constructor(t,n){this.data=t,this.dialogRef=n,this.httpService=tt(W),this.toastr=tt(H),this.variants=ht([]),this.channelType=I,this.variants.set(this.data.variants),this.title=t.title}ngOnInit(){this.initModalConfig()}initModalConfig(){this.modalConfig=new It,this.modalConfig.title=this.data.title,this.modalConfig.bodyScrollable=!0,this.modalConfig.hideFooter=!0,this.modalConfig.customWidth="850px"}onDetach(t,n){let e={ChannelID:t.ChannelID,ChannelItemID:t.ChannelItemID,ChannelVariationID:t.ChannelVariationID};this.httpService.post(Re.DetachVariant,[e]).subscribe(c=>{this.toastr.success(c.Message,"Success"),this.updateVariantAfterDetach(n,t.ChannelVariationID)})}updateVariantAfterDetach(t,n){this.variants.update(e=>{let c=e.findIndex(h=>h.ID===t.ID);return c!==-1&&(e[c].Channel=e[c].Channel.filter(h=>h.ChannelVariationID!==n)),[...e]})}getChannelLogo(t){return f.getChannelLogoByTypeId(t)}getHyperlinkSellerCenter(t){let n="javascript:void(0)";switch(t.TypeID){case I.Shopee:n=`${Ct.Shoope}/portal/product/${t.ChannelItemID}`;break;case I.Tiktok:n=`${Ct.Tiktok}/product/edit/${t.ChannelItemID}`;break;case I.Tokopedia:n=`${Ct.Tokopedia}/edit-product/${t.ChannelItemID}`;break;case I.WooCommerce:n=`${Ct.WooCommerce}/wp-admin/post.php?post=${t.ChannelItemID}&action=edit`;break;case I.Lazada:n=`${Ct.Lazada}/apps/product/publish?productId=${t.ChannelItemID}`;break}return n}static{this.\u0275fac=function(n){return new(n||i)(S(Pt),S(vt))}}static{this.\u0275cmp=T({type:i,selectors:[["app-modal-variant"]],decls:27,vars:1,consts:[["printChannelModal",""],[3,"onClose","onCancel","config"],[1,"table"],[1,"sticky-top-thead","variant-modal"],[1,"text-start","sticky-top"],[1,"d-flex","align-items-center"],["matTooltip","Variant from POS",1,"fas","fa-info-circle","ms-1"],["matTooltip","Product and Variant from each Channel",1,"fas","fa-info-circle","ms-1"],[1,"text-start","sticky-top",2,"width","0%"],[4,"ngIf","ngIfElse"],[1,"text-start"],["colspan","3",1,"text-center"],[1,"my-auto"],["class","text-start",4,"ngIf"],[1,"d-flex"],["target","_blank",1,"me-1",3,"href","title"],[2,"width","20px","height","20px",3,"src"],[1,"text-ellipsis","ps-2",2,"max-width","18vw",3,"matTooltip"],[1,"text-center"],[1,"text-end"],[1,"d-flex","align-items-center","justify-content-end"],[1,"btn","btn-small","btn-light","px-4","py-2","me-3",3,"click"],[1,"fa-sharp","fa-link-slash","me-2",2,"font-size","10px"],[1,"fs-6"],["target","_blank",1,"btn","btn-small","btn-light","px-4","py-2",3,"href","ngClass","matTooltip"],[1,"fa-solid","fa-edit","me-2",2,"font-size","10px"]],template:function(n,e){n&1&&(o(0,"modal-material",1),C("onClose",function(){return e.dialogRef.close()})("onCancel",function(){return e.dialogRef.close()}),o(1,"content")(2,"table",2)(3,"thead",3)(4,"tr")(5,"th",4)(6,"div",5)(7,"span"),p(8,"VARIANT"),r(),o(9,"sup"),g(10,"i",6),r()()(),o(11,"th",4),p(12,"SKU"),r(),o(13,"th",4)(14,"div",5)(15,"span"),p(16,"PRODUCT"),r(),o(17,"sup"),g(18,"i",7),r()()(),o(19,"th",4),p(20,"PRICE"),r(),o(21,"th",8),p(22,"INVENTORY"),r(),g(23,"th",4),r()(),o(24,"tbody"),le(25,Qn,3,2,null,null,re),r()()()()),n&2&&(l("config",e.modalConfig),a(25),ce(e.variants()))},dependencies:[et,Wt,V,St,st,ct,hn],styles:[".mat-dialog-title[_ngcontent-%COMP%]{margin-bottom:0%;margin-left:24px}.sticky-top-thead[_ngcontent-%COMP%] th.sticky-top[_ngcontent-%COMP%]{top:0}.table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] tr.sticky-top[_ngcontent-%COMP%]{border:none!important;border-bottom:1px solid!important}table[_ngcontent-%COMP%] > thead[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%]{border-top:none!important;border-left:none!important;border-right:none!important}.table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{background-color:#fff!important}.sticky-top-thead.variant-modal[_ngcontent-%COMP%] th[_ngcontent-%COMP%]:last-child:after{border-right:0px!important}.sticky-top-thead.variant-modal[_ngcontent-%COMP%] th[_ngcontent-%COMP%]:first-child:before{border-left:0px!important}.sticky-top-thead.variant-modal[_ngcontent-%COMP%] th[_ngcontent-%COMP%]:before{border-top:0px}a.is-disabled[_ngcontent-%COMP%]{color:gray;cursor:default}a.is-disabled[_ngcontent-%COMP%]:hover{text-decoration:none}"]})}}return i})();function Xn(i,d){if(i&1&&(o(0,"mat-option",6)(1,"div"),g(2,"img",7),o(3,"span"),p(4),r()()()),i&2){let t=d.$implicit;l("value",t.ChannelID),a(2),l("src",t.logo,M),a(2),A(t.Title)}}var Tt=(()=>{class i{constructor(){this.dialogRef=tt(vt),this.channels=tt(Pt),this.channelIds=ht([]),this.channelOptions=ht([])}ngOnInit(){this.initModalConfig();let t=this.channels.filter((n,e,c)=>c.findIndex(h=>h.ChannelID===n.ChannelID)===e);this.channelOptions.set(t)}initModalConfig(){this.modalConfig=new It,this.modalConfig.title="Detach Product",this.modalConfig.okText="Save"}onClose(){this.dialogRef.close()}onSave(){let t=this.channels.filter(n=>this.channelIds().includes(n.ChannelID)).map(n=>({ChannelID:n.ChannelID,ChannelItemID:n.ChannelItemID}));this.dialogRef.close(t)}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275cmp=T({type:i,selectors:[["app-modal-detach-product"]],decls:8,vars:5,consts:[[3,"onClose","onCancel","onOk","dynamicValidated","config"],["content",""],[1,"mb-2","fw-bold"],["appearance","outline",1,"w-100"],["name","channelid","placeholder","Channel",1,"mat-select-channel",3,"ngModelChange","ngModel","multiple"],["class","channel-option",3,"value",4,"ngFor","ngForOf"],[1,"channel-option",3,"value"],[2,"width","18px","margin-right","10px",3,"src"]],template:function(n,e){n&1&&(o(0,"modal-material",0),C("onClose",function(){return e.onClose()})("onCancel",function(){return e.onClose()})("onOk",function(){return e.onSave()}),o(1,"div",1)(2,"div")(3,"label",2),p(4,"Select a Channel"),r(),o(5,"mat-form-field",3)(6,"mat-select",4),E("ngModelChange",function(h){return k(e.channelIds,h)||(e.channelIds=h),h}),_(7,Xn,5,3,"mat-option",5),r()()()()()),n&2&&(l("dynamicValidated",e.channelIds().length>0)("config",e.modalConfig),a(6),O("ngModel",e.channelIds),l("multiple",!0),a(),l("ngForOf",e.channelOptions()))},dependencies:[et,B,Jt,Yt,Je,nn,en,Ze,yt,j,$,st],encapsulation:2})}}return i})();var te=i=>[i];function ti(i,d){if(i&1){let t=x();o(0,"button",14),C("click",function(){m(t);let e=s(2);return u(e.onDetachMultipleProduct())}),g(1,"i",15),p(2),r()}if(i&2){let t,n=s(2);a(2),v("Detach (",(t=n.productService.selectedProduct(n.products))==null?null:t.length,") ")}}function ei(i,d){if(i&1&&(y(0),_(1,ti,3,1,"button",13),b()),i&2){let t=s();a(),R(t.productService.hasSelection(t.products)?1:-1)}}function ni(i,d){if(i&1){let t=x();o(0,"button",18),C("click",function(){m(t);let e=s(3);return u(e.onOpenScanDialog())}),g(1,"i",19),p(2," Scan Channel "),r()}}function ii(i,d){if(i&1&&_(0,ni,3,0,"button",17),i&2){let t=s(2);l("ngIf",!t.productService.hasSelection(t.products))}}function oi(i,d){if(i&1&&(y(0),_(1,ii,1,1,"button",16),b()),i&2){let t=s();a(),R(t.productService.hasSelection(t.products)?-1:1)}}function ai(i,d){if(i&1){let t=x();o(0,"button",21),C("click",function(){m(t);let e=s(2);return u(e.onScanMultipleProduct())}),g(1,"i",19),p(2),r()}if(i&2){let t,n=s(2);a(2),v(" Scan (",(t=n.productService.selectedProduct(n.products))==null?null:t.length,") ")}}function ri(i,d){if(i&1&&(y(0),_(1,ai,3,1,"button",20),b()),i&2){let t=s();a(),R(t.productService.hasSelection(t.products)&&t.multipeScanChannels.length>0?1:-1)}}function li(i,d){if(i&1){let t=x();o(0,"button",23),C("click",function(){m(t);let e=s(2);return u(e.onUploadMultipleProduct())}),g(1,"i",24),p(2),r()}if(i&2){let t,n=s(2);a(2),v(" Upload (",(t=n.productService.selectedProduct(n.products))==null?null:t.length,") ")}}function ci(i,d){if(i&1&&(y(0),_(1,li,3,1,"button",22),b()),i&2){let t=s();a(),R(t.productService.hasSelection(t.products)?1:-1)}}function si(i,d){if(i&1){let t=x();o(0,"div",25)(1,"app-product-card",26),C("onUpload",function(){let e=m(t).$implicit,c=s();return u(c.onUploadToMultipleChannel(e))})("onScan",function(){let e=m(t).$implicit,c=s();return u(c.onScanSingleProduct(e))})("onDescEvent",function(){let e=m(t).index,c=s();return u(c.onOpenDialogVariant(e))})("onCheckBoxChange",function(e){let c=m(t).$implicit;return u(c.selected=e)})("onDetach",function(){let e=m(t).$implicit,c=s();return u(c.onDetachProduct([e]))}),r()()}if(i&2){let t=d.$implicit,n=s();a(),l("productId",t.ID)("title",t==null?null:t.Name)("image",t==null?null:t.ThumbnailUrl)("description",(t==null||t.Variants==null?null:t.Variants.length)>1?(t==null||t.Variants==null?null:t.Variants.length)+" Variants":null)("channels",n.productService.getChannelProduct(t))("code",n.getVariantCode(t==null?null:t.Variants))("showCheckBox",(t==null?null:t.Channel.length)<n.channelOptions.length)("scanButton",!0)("uploadButton",t==null?null:t.hasUpload)("imageForZoom",t==null?null:t.ImageUrl)("detachButton",(t==null||t.Channel==null?null:t.Channel.length)>0)}}function di(i,d){i&1&&(y(0),o(1,"div",27),g(2,"app-empty-state"),r(),b())}function pi(i,d){if(i&1){let t=x();y(0),o(1,"div",28)(2,"div",29)(3,"app-custom-paginator",30),C("next",function(){m(t);let e=s();return u(e.getProducts())})("previous",function(){m(t);let e=s();return u(e.getProducts())}),r()()(),b()}if(i&2){let t=s();a(3),l("filter",t.searchFilter)("totaldata",t.products==null?null:t.products.length)("paginationTotal",t.rowCount)("hasClicked",!0)("nextButtonAlwaysVisible",!0)}}var Cn=(()=>{class i{constructor(t,n,e,c,h,P,mt){this.http=t,this.toastr=n,this.dialog=e,this.productService=c,this.authService=h,this.uploadProductService=P,this.route=mt,this.searchFilter=new dt,this.products=[],this.rowCount=0,this.multipeScanChannels=[],this.scanProductRole=U.ProductScan,this.uploadProductRole=U.ProductUpload,this.detachProductRole=U.ProductDetach,this.getLoaderPage(),this.channelOptions=this.authService.getChannels(),this.initMultiScanChannels()}getLoaderPage(){this.productService.LoadInPOS().subscribe(t=>{this.Categories=t.Options.Categories,this.searchFilter.PageNumber=t.Filter.PageNumber,this.searchFilter.RowCount=t.Filter.RowCount,this.searchFilter.ChannelID=null,this.searchFilter.Category=t.Filter.Category,this.searchFilter.PageSize=100,this.getProducts()})}initMultiScanChannels(){this.multipeScanChannels=this.productService.filterChannelByTypeId(this.channelOptions,[I.Tokopedia,I.Tiktok])}getProducts(){let t={PageNumber:this.searchFilter.PageNumber,RowCount:this.searchFilter.RowCount,text:this.searchFilter.text,Category:this.searchFilter.Category,From:this.startDate,To:this.endDate};this.http.post("/api/product/GetInPOS",t).subscribe(n=>{this.products=n.Data,this.rowCount=n.Total==null?this.searchFilter.RowCount:n.Total.toString(),this.products=this.productService.checkProductHasUploadBtn(this.products,this.channelOptions)})}onOpenScanDialog(){let t=JSON.parse(JSON.stringify(this.searchFilter));t.ChannelID=f.GuidEMpty,this.dialog.open(L,{data:{filter:t,channelOptions:this.channelOptions},width:"600px"}).afterClosed().pipe(D(e=>f.IsNotEmpty(e))).subscribe(e=>{this.searchFilter.ChannelID=e.ChannelID,this.searchFilter.ScanFull=e.ScanFull,this.searchFilter.UpdatedProduct=e.UpdatedProduct,this.searchFilter.Async=e.Async,this.scanAllProduct()})}scanAllProduct(){if(this.searchFilter.ChannelID==null){this.toastr.error("Please Select Channel","Error");return}this.productService.scanAll(this.searchFilter.ChannelID,this.searchFilter.ScanFull,this.searchFilter.UpdatedProduct,this.searchFilter.Async).subscribe(t=>{if(this.searchFilter.Async)this.toastr.warning("You will be notified when the scan is completed.","Scan In Progress",{toastClass:"ngx-toastr toast-waiting"});else{this.getLoaderPage();let n=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);this.productService.successToastrScanAllProduct(t,n,!this.searchFilter.UpdatedProduct)}})}onOpenDialogVariant(t){let n=this.products[t]?.Variants||[];this.dialog.open(Xt,{data:{title:this.products[t].Name,variants:n}})}onUploadMultipleProduct(){let t=this.productService.selectedProduct(this.products);this.uploadProductService.setSelectedProduct(t),this.route.navigate(["/menu/products/upload"])}onUploadToMultipleChannel(t){this.uploadProductService.setSelectedProduct([t]),this.route.navigate(["/menu/products/upload"])}searchProduct(t){this.searchFilter.text=t,this.getProducts()}onScanMultipleProduct(){let t=JSON.parse(JSON.stringify(this.searchFilter));t.ChannelID=f.GuidEMpty;let n=this.productService.filterChannelByTypeId(this.channelOptions,[I.Tokopedia,I.Tiktok]);this.dialog.open(L,{data:{filter:t,channelOptions:n,isSingleChannel:!0},width:"600px"}).afterClosed().pipe(D(c=>f.IsNotEmpty(c))).subscribe(c=>{this.searchFilter.ChannelID=c.ChannelID,this.searchFilter.ScanFull=c.ScanFull,this.searchFilter.UpdatedProduct=c.UpdatedProduct;let h=this.productService.selectedProduct(this.products),P=this.productService.getVariantCodesProducts(h);this.scanSingleProduct(P)})}onScanSingleProduct(t){let n=JSON.parse(JSON.stringify(this.searchFilter));n.ChannelID=f.GuidEMpty,this.dialog.open(L,{data:{filter:n,channelOptions:this.channelOptions,isSingleChannel:!0},width:"600px"}).afterClosed().pipe(D(e=>f.IsNotEmpty(e))).subscribe(e=>{this.searchFilter.ChannelID=e.ChannelID;let c=this.productService.getVariantCodesProduct(t);this.scanSingleProduct(c)})}scanSingleProduct(t){this.productService.scanSingle(this.searchFilter.ChannelID,t).subscribe({next:n=>{if(n)this.toastr.success("Successfully Scan ","Success");else{let e=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);this.toastr.error(`This product is not existed in ${e?.Name} `,"Error")}this.searchFilter.ChannelID=f.GuidEMpty,n&&this.getProducts()},error:n=>{this.searchFilter.ChannelID=f.GuidEMpty}})}getVariantCode(t=[]){let n;return t?.length>1&&(n=(t[0].model?t[0].model:"")+t[0].Code),t?.length==1&&(n=t[0].Code),n}onDetachProduct(t){let n=[];t.forEach(e=>{e.Channel=f.assignChannelLogo(e.Channel),n.push(...e.Channel)}),this.dialog.open(Tt,{width:"600px",data:[...n]}).afterClosed().pipe(D(e=>f.IsNotEmpty(e)),Dt(e=>this.productService.detachProduct(e))).subscribe(e=>{this.toastr.success(e.Message,Kt.Success),this.getProducts()})}onDetachMultipleProduct(){let t=this.productService.selectedProduct(this.products);this.onDetachProduct(t)}static{this.\u0275fac=function(n){return new(n||i)(S(W),S(H),S(it),S(q),S(K),S(wt),S(rt))}}static{this.\u0275cmp=T({type:i,selectors:[["app-in-pos"]],standalone:!1,decls:23,vars:22,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"],["class","col-12 col-md-6 col-xl-4 px-3 my-3",4,"ngFor","ngForOf"],[4,"ngIf"],["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","class","btn btn-outline-secondary shadow rounded",3,"click",4,"ngIf"],["type","button","data-cy","scanSoldinChannel",1,"btn","btn-outline-secondary","shadow","rounded",3,"click"],[1,"fas","fa-lg","fa-crosshairs"],["type","button","data-cy","scanInPos",1,"btn","btn-outline-secondary","shadow","rounded","me-2"],["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"],[1,"col-12","col-md-6","col-xl-4","px-3","my-3"],[3,"onUpload","onScan","onDescEvent","onCheckBoxChange","onDetach","productId","title","image","description","channels","code","showCheckBox","scanButton","uploadButton","imageForZoom","detachButton"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"row","mt-2","justify-content-end"],[1,"col-md-12"],[3,"next","previous","filter","totaldata","paginationTotal","hasClicked","nextButtonAlwaysVisible"]],template:function(n,e){if(n&1){let c=x();o(0,"mainpanel",1),C("onSubmit",function(P){return m(c),u(e.searchProduct(P))}),o(1,"actions"),_(2,ei,2,1,"ng-container",2)(3,oi,2,1,"ng-container",2)(4,ri,2,1,"ng-container",2)(5,ci,2,1,"ng-container",2),r(),o(6,"filters")(7,"div")(8,"label",3),p(9,"Category"),r(),o(10,"ng-select",4),C("ngModelChange",function(P){return m(c),u(e.searchFilter.Category=P)}),r()(),o(11,"div",5)(12,"mat-date-range-input",6)(13,"input",7),E("ngModelChange",function(P){return m(c),k(e.startDate,P)||(e.startDate=P),u(P)}),C("click",function(){m(c);let P=G(16);return u(P.open())}),r(),o(14,"input",8),E("ngModelChange",function(P){return m(c),k(e.endDate,P)||(e.endDate=P),u(P)}),C("click",function(){m(c);let P=G(16);return u(P.open())}),r()(),g(15,"mat-date-range-picker",null,0),r()(),o(17,"content")(18,"div",9)(19,"div",10),_(20,si,2,11,"div",11)(21,di,3,0,"ng-container",12),r(),_(22,pi,4,5,"ng-container",12),r()()()}if(n&2){let c=G(16);l("headerTitle","In POS ("+e.rowCount+")"),a(2),l("ngxPermissionsOnly",w(14,te,e.detachProductRole)),a(),l("ngxPermissionsOnly",w(16,te,e.scanProductRole)),a(),l("ngxPermissionsOnly",w(18,te,e.scanProductRole)),a(),l("ngxPermissionsOnly",w(20,te,e.scanProductRole)),a(5),l("clearable",!0)("items",e.Categories)("ngModel",e.searchFilter.Category),a(2),l("rangePicker",c),a(),O("ngModel",e.startDate),a(),O("ngModel",e.endDate),a(6),l("ngForOf",e.products),a(),l("ngIf",e.products.length==0),a(),l("ngIf",e.products.length>0)}},dependencies:[B,V,xt,j,$,Z,lt,ot,pt,Q,an,rn,ln,cn,nt],styles:[".badge-pill[_ngcontent-%COMP%]{padding-bottom:16px!important}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]:checked + label[_ngcontent-%COMP%]{background:#dfeffc;border:1px solid #dfeffc}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{visibility:hidden;position:absolute;left:0;top:0}.rad-btn[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{border:1px solid #ddd;border-radius:3px;margin-right:10px;cursor:pointer;padding:10px;margin-bottom:10px;color:#000;width:80px;text-align:center}.modal-dialog[_ngcontent-%COMP%]{max-width:30%!important}.product[_ngcontent-%COMP%]{height:100%!important}.row[_ngcontent-%COMP%]{margin-left:0;margin-right:0}ul[_ngcontent-%COMP%]{list-style-type:none}.link[_ngcontent-%COMP%]{color:#0202ab;cursor:pointer}.px-1[_ngcontent-%COMP%]{padding-left:5px!important}.sku[_ngcontent-%COMP%]{color:#696969;font-style:italic}.badge-pill[_ngcontent-%COMP%]{height:16px}.itemTitle[_ngcontent-%COMP%]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.no-title[_ngcontent-%COMP%]{margin-top:.33em;margin-bottom:.33rem}.mb-upload[_ngcontent-%COMP%]{padding-bottom:.625rem}.my-1rem[_ngcontent-%COMP%]{margin-bottom:1rem!important;margin-top:1rem!important}.pr-rem[_ngcontent-%COMP%]{padding-right:.6rem}.text-larger[_ngcontent-%COMP%]{font-size:larger}.bg-lightpink[_ngcontent-%COMP%]{background-color:#f9dede}.bottom-buttons[_ngcontent-%COMP%]{margin-left:97px}@media (min-width: 1200px){.max-w-xl[_ngcontent-%COMP%]{max-width:205px}}.navbar-toggler[_ngcontent-%COMP%]:focus{box-shadow:none!important}.img-logo[_ngcontent-%COMP%]{height:24px;width:24px}.dateRange[_ngcontent-%COMP%]{padding-top:.8rem;padding-bottom:.8rem}"]})}}return i})();var _e=i=>[i];function mi(i,d){if(i&1){let t=x();o(0,"button",12),C("click",function(){m(t);let e=s(2);return u(e.onDetachMultipleProduct())}),g(1,"i",13),p(2),r()}if(i&2){let t,n=s(2);a(2),v("Detach (",(t=n.productService.selectedProduct(n.products))==null?null:t.length,") ")}}function ui(i,d){if(i&1&&(y(0),_(1,mi,3,1,"button",11),b()),i&2){let t=s();a(),R(t.productService.hasSelection(t.products)?1:-1)}}function hi(i,d){if(i&1){let t=x();o(0,"div",14)(1,"button",16),C("click",function(){m(t);let e=s(2);return u(e.onScanAllProducts())}),g(2,"i",17),p(3," Scan Channel "),r(),g(4,"button",18),o(5,"ul",19)(6,"li")(7,"a",20),C("click",function(){m(t);let e=s(2);return u(e.onScanAllV2Products())}),g(8,"i",17),p(9," Scan Channel V2 "),r()()()()}}function _i(i,d){if(i&1){let t=x();o(0,"button",21),C("click",function(){m(t);let e=s(2);return u(e.onScanMultipleProduct())}),g(1,"i",17),p(2),r()}if(i&2){let t=s(2);a(2),v(" Scan (",t.productService.selectedProduct(t.products).length,") ")}}function gi(i,d){if(i&1&&(y(0),_(1,hi,10,0,"div",14)(2,_i,3,1,"button",15),b()),i&2){let t=s();a(),R(t.productService.hasSelection(t.products)?t.multipeScanChannels.length>0&&t.productService.hasSelection(t.products)?2:-1:1)}}function Ci(i,d){if(i&1){let t=x();o(0,"button",23),C("click",function(){m(t);let e=s(2);return u(e.onUploadMultipleProduct())}),g(1,"i",24),p(2),r()}if(i&2){let t=s(2);a(2),v(" Upload (",t.productService.selectedProduct(t.products).length,") ")}}function fi(i,d){if(i&1&&(y(0),_(1,Ci,3,1,"button",22),b()),i&2){let t=s();a(),R(t.productService.hasSelection(t.products)?1:-1)}}function Si(i,d){if(i&1&&(o(0,"span",25),g(1,"img",26),r(),p(2)),i&2){let t=d.item;a(),l("src",t.Img,M)("alt",t.Name),a(),v(" ",t.Name," ")}}function xi(i,d){if(i&1){let t=x();o(0,"div",27)(1,"label",28),p(2,"Item ID"),r(),o(3,"input",29),E("ngModelChange",function(e){m(t);let c=s();return k(c.searchFilter.Item_id,e)||(c.searchFilter.Item_id=e),u(e)}),r()()}if(i&2){let t=s();a(3),O("ngModel",t.searchFilter.Item_id)}}function yi(i,d){if(i&1){let t=x();o(0,"div",30)(1,"app-product-card",31),C("onUpload",function(){let e=m(t).$implicit,c=s();return u(c.onUploadToMultipleChannel(e))})("onDescEvent",function(){let e=m(t).index,c=s();return u(c.onOpenVariantDetail(e))})("onScan",function(){let e=m(t).$implicit,c=s();return u(c.onScanSingleProduct(e))})("onCheckBoxChange",function(e){let c=m(t).$implicit;return u(c.selected=e)})("onDetach",function(){let e=m(t).$implicit,c=s();return u(c.onDetachProduct([e]))}),r()()}if(i&2){let t=d.$implicit,n=s();a(),l("productId",t==null?null:t.ID)("title",t==null?null:t.Name)("image",t==null?null:t.ThumbnailUrl)("description",(t==null||t.Variants==null?null:t.Variants.length)>1?(t==null||t.Variants==null?null:t.Variants.length)+" Variants":null)("channels",n.productService.getChannelProduct(t))("code",n.getVariantCode(t==null?null:t.Variants))("showCheckBox",t==null?null:t.hasScan)("scanButton",!0)("uploadButton",t==null?null:t.hasUpload)("imageForZoom",t==null?null:t.ImageUrl)("detachButton",(t==null||t.Channel==null?null:t.Channel.length)>0)}}function bi(i,d){i&1&&(y(0),o(1,"div",32),g(2,"app-empty-state"),r(),b())}function vi(i,d){if(i&1){let t=x();o(0,"div",33)(1,"div",34)(2,"app-custom-paginator",35),C("total",function(){m(t);let e=s();return u(e.getRowCount())})("next",function(){m(t);let e=s();return u(e.getProducts())})("previous",function(){m(t);let e=s();return u(e.getProducts())}),r()()()}if(i&2){let t=s();a(2),l("filter",t.searchFilter)("totaldata",t.products==null?null:t.products.length)("paginationTotal",t.rowCount)("hasClicked",t.hasClickRowCount)}}var fn=(()=>{class i{constructor(t,n,e,c,h,P,mt,Ut){this.http=t,this.dialog=n,this.toastr=e,this.productService=c,this.activateRouter=h,this.authService=P,this.route=mt,this.uploadProductService=Ut,this.searchFilter=new dt,this.products=[],this.rowCount=0,this.hasClickRowCount=!1,this.guidEmpty=f.GuidEMpty,this.multipeScanChannels=[],this.scanProductRole=U.ProductScan,this.uploadProductRole=U.ProductUpload,this.detachProductRole=U.ProductDetach,this.channelOptions=this.authService.getChannels(),this.initMultiScanChannels()}ngOnInit(){this.activateRouter.queryParams.subscribe(t=>{t.ID?this.initPageLoader(t.ID):this.initPageLoader(f.GuidEMpty)})}initPageLoader(t){this.productService.loader(t).subscribe(n=>{this.searchFilter=n.Filter,n.Filter.ChannelID!=f.GuidEMpty&&(this.searchFilter.ListChannelID=[],this.searchFilter.ListChannelID.push(n.Filter.ChannelID)),this.searchFilter.PageSize=n.Filter.RowCount,this.searchFilter.Item_id="",this.getProducts()})}initMultiScanChannels(){this.multipeScanChannels=this.productService.filterChannelByTypeId(this.channelOptions,[I.Tokopedia,I.Tiktok])}getProducts(){let t={ListChannelID:this.searchFilter.ListChannelID,PageNumber:this.searchFilter.PageNumber,RowCount:this.searchFilter.RowCount,text:this.searchFilter.text,Item_id:this.searchFilter.Item_id};this.productService.findAllSoldInChannel(t).subscribe(n=>{this.products=n.Data,this.products=this.productService.checkProductHasUploadBtn(this.products,this.channelOptions),this.products=this.productService.checkProductHasScanButton(this.products,this.channelOptions)})}searchProduct(t){this.searchFilter.text=t,this.hasClickRowCount=!1,this.getProducts()}onOpenVariantDetail(t){let n=this.products[t].Variants;this.dialog.open(Xt,{data:{variants:n,title:this.products[t].Name}})}onScanAllProducts(){let t=JSON.parse(JSON.stringify(this.searchFilter));t.ChannelID=f.GuidEMpty,this.dialog.open(L,{data:{filter:t,channelOptions:this.channelOptions},width:"600px"}).afterClosed().pipe(D(e=>f.IsNotEmpty(e))).subscribe(e=>{this.searchFilter.ChannelID=e.ChannelID,this.searchFilter.ScanFull=e.ScanFull,this.searchFilter.UpdatedProduct=e.UpdatedProduct,this.searchFilter.Async=e.Async,this.scanAllProduct()})}onScanAllV2Products(){let t=JSON.parse(JSON.stringify(this.searchFilter));t.ChannelID=f.GuidEMpty,this.dialog.open(L,{data:{filter:t,channelOptions:this.channelOptions},width:"600px"}).afterClosed().pipe(D(n=>f.IsNotEmpty(n)),Dt(n=>this.productService.scanProductV2(n.ChannelID,n.ScanFull,n.UpdatedProduct,n.Async))).subscribe(()=>{this.initPageLoader(f.GuidEMpty)})}scanAllProduct(){let t=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);this.productService.scanAll(this.searchFilter.ChannelID,this.searchFilter.ScanFull,this.searchFilter.UpdatedProduct,this.searchFilter.Async).pipe(D(n=>n)).subscribe(n=>{this.searchFilter.Async?this.toastr.warning("You will be notified when the scan is completed.","Scan In Progress",{toastClass:"ngx-toastr toast-waiting"}):(this.productService.successToastrScanAllProduct(n,t,!this.searchFilter.UpdatedProduct),this.initPageLoader(f.GuidEMpty))})}onScanSingleProduct(t){t.Channel=this.productService.getChannelProduct(t);let n=JSON.parse(JSON.stringify(this.searchFilter));this.dialog.open(L,{data:{filter:n,channelOptions:this.channelOptions,isSingleChannel:!0},width:"600px"}).afterClosed().pipe(D(e=>f.IsNotEmpty(e))).subscribe(e=>{this.searchFilter.ChannelID=e.ChannelID;let c=this.productService.getVariantCodesProduct(t);this.scanProducts(c)})}onUploadToMultipleChannel(t){this.uploadProductService.setSelectedProduct([t]),this.route.navigate(["/menu/products/upload"])}onScanMultipleProduct(){this.searchFilter.ChannelID=f.GuidEMpty;let t=JSON.parse(JSON.stringify(this.searchFilter));this.dialog.open(L,{data:{filter:t,channelOptions:this.multipeScanChannels,isSingleChannel:!0},width:"600px"}).afterClosed().pipe(D(e=>f.IsNotEmpty(e))).subscribe(e=>{this.searchFilter.ChannelID=e.ChannelID,this.searchFilter.ScanFull=e.ScanFull,this.searchFilter.UpdatedProduct=e.UpdatedProduct;let c=this.productService.selectedProduct(this.products),h=this.productService.getVariantCodesProducts(c);this.scanProducts(h)})}scanProducts(t){this.productService.scanSingle(this.searchFilter.ChannelID,t).subscribe({next:n=>{let e=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);n?this.toastr.success(`Product Successfully scan with ${e?.Name}`,"Success"):this.toastr.error(`This product is not existed in ${e?.Name} `,"Error"),this.searchFilter.ChannelID=f.GuidEMpty,n&&this.getProducts()},error:n=>{this.searchFilter.ChannelID=f.GuidEMpty}})}getVariantCode(t){let n;return t.length>1&&(n=(t[0].model?t[0].model:"")+t[0].Code),t.length==1&&(n=t[0].Code),n}onClearFilterChannel(){this.searchFilter.ChannelID=f.GuidEMpty,this.searchFilter.Item_id=""}onUploadMultipleProduct(){let t=this.productService.selectedProduct(this.products);this.uploadProductService.setSelectedProduct(t),this.route.navigate(["/menu/products/upload"])}getRowCount(){let t={ListChannelID:this.searchFilter.ListChannelID,text:this.searchFilter.text};this.http.post("/api/product/GetSoldInChannelRowCount",t).subscribe(n=>{this.hasClickRowCount=!0,this.rowCount=n.Total})}onDetachProduct(t){let n=[];t.forEach(e=>{e.Channel=f.assignChannelLogo(e.Channel),n.push(...e.Channel)}),this.dialog.open(Tt,{width:"600px",data:[...n]}).afterClosed().pipe(D(e=>f.IsNotEmpty(e)),Dt(e=>this.productService.detachProduct(e))).subscribe(e=>{this.toastr.success(e.Message,Kt.Success),this.getProducts()})}onDetachMultipleProduct(){let t=this.productService.selectedProduct(this.products);this.onDetachProduct(t)}static{this.\u0275fac=function(n){return new(n||i)(S(W),S(it),S(H),S(q),S(Gt),S(K),S(rt),S(wt))}}static{this.\u0275cmp=T({type:i,selectors:[["app-sold-in-channel"]],standalone:!1,decls:18,vars:18,consts:[["description","SKU has been mapped between dealpos and marketplace",3,"onSubmit","headerTitle"],[4,"ngxPermissionsOnly"],[1,"fw-bold","mb-2"],["appendTo","body","bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"ngModelChange","clear","clearable","multiple","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],["class","mt-5",4,"ngIf"],[1,"container-fluid"],[1,"row","mt-8"],["class","col-12 col-md-6 col-xl-4 px-3 my-3",4,"ngFor","ngForOf"],[4,"ngIf"],["class","row",4,"ngIf"],["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"],[1,"btn-group","me-3","shadow"],["type","button","data-cy","scanInPos",1,"btn","btn-outline-secondary","shadow","rounded","me-2"],[1,"btn","btn-outline-secondary","border-end-0",3,"click"],[1,"fas","fa-lg","fa-crosshairs"],["data-bs-toggle","dropdown","aria-expanded","false",1,"btn","btn-outline-secondary","btn-sm","dropdown-toggle"],[1,"dropdown-menu",2,"cursor","pointer"],[1,"dropdown-item",3,"click"],["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"],[1,"me-2"],[2,"width","18px",3,"src","alt"],[1,"mt-5"],[1,"fw-bold"],["type","text","name","Item_id","id","Item_id",1,"form-control","mt-2",3,"ngModelChange","ngModel"],[1,"col-12","col-md-6","col-xl-4","px-3","my-3"],[3,"onUpload","onDescEvent","onScan","onCheckBoxChange","onDetach","productId","title","image","description","channels","code","showCheckBox","scanButton","uploadButton","imageForZoom","detachButton"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"row"],[1,"col-12"],[3,"total","next","previous","filter","totaldata","paginationTotal","hasClicked"]],template:function(n,e){n&1&&(o(0,"mainpanel",0),C("onSubmit",function(h){return e.searchProduct(h)}),o(1,"actions"),_(2,ui,2,1,"ng-container",1)(3,gi,3,1,"ng-container",1)(4,fi,2,1,"ng-container",1),r(),o(5,"filters")(6,"div")(7,"label",2),p(8,"Channel"),r(),o(9,"ng-select",3),C("ngModelChange",function(h){return e.searchFilter.ListChannelID=h})("clear",function(){return e.onClearFilterChannel()}),_(10,Si,3,3,"ng-template",4),r()(),_(11,xi,4,1,"div",5),r(),o(12,"content")(13,"div",6)(14,"div",7),_(15,yi,2,11,"div",8)(16,bi,3,0,"ng-container",9),r(),_(17,vi,3,4,"div",10),r()()()),n&2&&(l("headerTitle","Sold in Channel"),a(2),l("ngxPermissionsOnly",w(12,_e,e.detachProductRole)),a(),l("ngxPermissionsOnly",w(14,_e,e.scanProductRole)),a(),l("ngxPermissionsOnly",w(16,_e,e.uploadProductRole)),a(5),l("clearable",!0)("multiple",!0)("items",e.channelOptions)("ngModel",e.searchFilter.ListChannelID),a(2),l("ngIf",e.searchFilter.ListChannelID!=null),a(4),l("ngForOf",e.products),a(),l("ngIf",e.products.length==0),a(),l("ngIf",e.products==null?null:e.products.length))},dependencies:[B,V,xt,j,$,Z,lt,bt,Ht,ot,pt,Q,nt],styles:[".badge-pill[_ngcontent-%COMP%]{padding-bottom:16px!important}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]:checked + label[_ngcontent-%COMP%]{background:#dfeffc;border:1px solid #dfeffc}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{visibility:hidden;position:absolute;left:0;top:0}.rad-btn[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{border:1px solid #ddd;border-radius:3px;margin-right:10px;cursor:pointer;padding:10px;margin-bottom:10px;color:#000;width:80px;text-align:center}.modal-dialog[_ngcontent-%COMP%]{max-width:30%!important}.product[_ngcontent-%COMP%]{height:100%!important}.row[_ngcontent-%COMP%]{margin-left:0;margin-right:0}ul[_ngcontent-%COMP%]{list-style-type:none}.link[_ngcontent-%COMP%]{color:#0202ab;cursor:pointer}.px-1[_ngcontent-%COMP%]{padding-left:5px!important}.sku[_ngcontent-%COMP%]{color:#696969;font-style:italic}.badge-pill[_ngcontent-%COMP%]{height:16px}.itemTitle[_ngcontent-%COMP%]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.no-title[_ngcontent-%COMP%]{margin-top:.33em;margin-bottom:.33rem}.mb-upload[_ngcontent-%COMP%]{padding-bottom:.625rem}.my-1rem[_ngcontent-%COMP%]{margin-bottom:1rem!important;margin-top:1rem!important}.pr-rem[_ngcontent-%COMP%]{padding-right:.6rem}.text-larger[_ngcontent-%COMP%]{font-size:larger}.bg-lightpink[_ngcontent-%COMP%]{background-color:#f9dede}.bottom-buttons[_ngcontent-%COMP%]{margin-left:97px}@media (min-width: 1200px){.max-w-xl[_ngcontent-%COMP%]{max-width:205px}}.navbar-toggler[_ngcontent-%COMP%]:focus{box-shadow:none!important}"]})}}return i})();var Sn=(()=>{class i{get footerPageNumber(){return this._footerPageNumber}set footerPageNumber(t){this._footerPageNumber=t}get hideCount(){return this._hideCount}set hideCount(t){this._hideCount=t}get disableNextButton(){return this._disableNextButton}set disableNextButton(t){this._disableNextButton=t}get goToLastPage(){return this._goToLastPage}set goToLastPage(t){this._goToLastPage=t}constructor(t){this.http=t,this.pagination$=new oe(null),this.destroy$=new Lt,this.data$=this.paginationFunction()}onNextPage(t){t.PageNumber+=1,this.pagination$.next(t)}setPageNumberFooter(t){this.footerPageNumber=t.PageNumber}setPaginationButtonState(t,n){n==0?this.disableNextButton=!0:this.disableNextButton=!(n<t.RowCount*t.PageNumber)}reloadPagination(t){f.IsEmpty(t.PageNumber)&&(t.PageNumber=1),this.pagination$.next(t),this.hideCount=!0,this.goToLastPage=!1}getAllData(t,n){t.RowCount=n,this.pagination$.next(t),this.goToLastPage=!0}destroy(){this.destroy$.next(!0),this.destroy$.complete(),this.pagination$=null,this.pagination$=new oe(null),this.data$=this.paginationFunction()}paginationFunction(){return this.pagination$.pipe(Ot(this.destroy$),D(t=>t!=null),Ce(t=>this.http.post(`/API/${this.fetchDataEndpoint}`,JSON.stringify(t)).pipe(ut(n=>n.Data))),Se(this.pagination$),fe((t,n)=>{let[e,c]=t,[h]=n;return c.PageNumber==1?[h,c]:[e.concat(h),c]}),jt(([t,n])=>{this.setPageNumberFooter(n),this.setPaginationButtonState(n,t.length)}),ut(([t])=>t),Bt())}static{this.\u0275fac=function(n){return new(n||i)(be(W))}}static{this.\u0275prov=xe({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();var ie=i=>[i];function Ii(i,d){if(i&1){let t=x();o(0,"button",12),C("click",function(){m(t);let e=s(3);return u(e.uploadMultipleProduct())}),g(1,"i",13),p(2),r()}if(i&2){let t=s(3);a(2),v(" upload (",t.selectedProducts==null?null:t.selectedProducts.length,") ")}}function wi(i,d){if(i&1&&(y(0),_(1,Ii,3,1,"button",11),b()),i&2){let t=s(2);a(),l("ngIf",t.hasSelectionProduct)}}function Mi(i,d){if(i&1){let t=x();y(0),o(1,"button",14),C("click",function(){m(t);let e=s(2);return u(e.openScanDialog())}),g(2,"i",15),p(3," Scan Channel "),r(),b()}}function Ti(i,d){i&1&&(y(0),g(1,"th",23),b())}function Di(i,d){if(i&1){let t=x();y(0),o(1,"td",30)(2,"input",31),E("ngModelChange",function(e){m(t);let c=s(3).$implicit;return k(c.selected,e)||(c.selected=e),u(e)}),C("ngModelChange",function(){m(t);let e=s(4).ngIf,c=s(3);return u(c.onSelectProduct(e))}),r()(),b()}if(i&2){let t=s(3).$implicit;a(),l("rowSpan",t==null?null:t.Variants.length),a(),O("ngModel",t.selected)}}function Oi(i,d){if(i&1&&(y(0),_(1,Di,3,2,"ng-container",10),b()),i&2){let t=s().index;a(),l("ngIf",t==0)}}function ki(i,d){if(i&1){let t=x();y(0),o(1,"img",36),C("click",function(e){m(t);let c=s(3).$implicit,h=s(4);return u(h.onZoomImage(e,c==null?null:c.ImageUrl))}),r(),b()}if(i&2){let t=s(3).$implicit;a(),l("src",t==null?null:t.ImageUrl,M)}}function Ei(i,d){i&1&&g(0,"img",37)}function Fi(i,d){if(i&1&&(y(0),o(1,"td",30)(2,"div",32),_(3,ki,2,1,"ng-container",9)(4,Ei,1,0,"ng-template",null,1,z),r()(),o(6,"td",33)(7,"h4",34)(8,"span",35),p(9),r()()(),b()),i&2){let t=G(5),n=s(2).$implicit;a(),l("rowSpan",n==null?null:n.Variants.length),a(2),l("ngIf",n==null?null:n.ImageUrl)("ngIfElse",t),a(3),l("rowSpan",n==null?null:n.Variants.length),a(2),l("matTooltip",(n==null||n.Name==null?null:n.Name.length)>50?n==null?null:n.Name:""),a(),v(" ",n==null?null:n.Name," ")}}function Ni(i,d){if(i&1&&(o(0,"div")(1,"a",26),g(2,"img",38),r()()),i&2){let t=d.$implicit;a(),l("href",t.URL,M),a(),l("src",t.Img,M)("matTooltip",t.Name)}}function Vi(i,d){if(i&1&&(o(0,"div"),g(1,"img",38),r()),i&2){let t=d.$implicit;a(),l("src",t.Img,M)("matTooltip",t.Name)}}function Ri(i,d){if(i&1&&(o(0,"tr"),_(1,Oi,2,1,"ng-container",4)(2,Fi,10,6,"ng-container",10),o(3,"td"),p(4),r(),o(5,"td")(6,"span"),p(7),r(),o(8,"span",25)(9,"a",26),g(10,"i",27),r()()(),o(11,"td",28)(12,"div",29),_(13,Ni,3,3,"div",24),r()(),o(14,"td",28)(15,"div",29),_(16,Vi,2,2,"div",24),r()()()),i&2){let t=d.$implicit,n=d.index,e=s(5);a(),l("ngxPermissionsOnly",w(7,ie,e.uploadProductRole)),a(),l("ngIf",n==0),a(2),v(" ",t.Name," "),a(3),v(" ",t.Code," "),a(2),l("href",e.hostName+"/menu/Products/Catalog/Variants/Info?ID="+(t==null?null:t.ID),M),a(4),l("ngForOf",t==null?null:t.Available),a(3),l("ngForOf",t==null?null:t.NotAvailable)}}function Ai(i,d){if(i&1&&(y(0),_(1,Ri,17,9,"tr",24),b()),i&2){let t=d.$implicit;a(),l("ngForOf",t.Variants)}}function Ui(i,d){if(i&1&&(o(0,"tbody"),_(1,Ai,2,1,"ng-container",24),r()),i&2){let t=d.ngIf;a(),l("ngForOf",t)}}function Li(i,d){if(i&1&&(y(0),o(1,"div",16)(2,"table",17)(3,"thead",18)(4,"tr"),_(5,Ti,2,0,"ng-container",4),o(6,"th",19),p(7," Product "),r(),o(8,"th",20),p(9,"Variant"),r(),o(10,"th",20),p(11,"SKU"),r(),o(12,"th",21),p(13,"Available In"),r(),o(14,"th",22),p(15,"Not Available In"),r()()(),_(16,Ui,2,1,"tbody",10),F(17,"async"),r()(),b()),i&2){let t=s(2);a(5),l("ngxPermissionsOnly",w(4,ie,t.uploadProductRole)),a(11),l("ngIf",N(17,2,t.data$))}}function Bi(i,d){i&1&&(o(0,"div",39),g(1,"app-empty-state"),r())}function ji(i,d){if(i&1){let t=x();o(0,"span",47),C("click",function(){m(t);let e=s(4);return u(e.getRowCount())}),o(1,"i",48),p(2,"?"),r()()}}function $i(i,d){if(i&1&&(o(0,"span"),p(1),F(2,"number"),r()),i&2){let t=d.ngIf;a(),A(N(2,1,t==null?null:t.Count))}}function Wi(i,d){if(i&1){let t=x();o(0,"a",49),C("click",function(){m(t);let e=s(4);return u(e.onNextPage())}),g(1,"i",50),p(2," Next"),r()}}function Gi(i,d){if(i&1){let t=x();o(0,"a",51),C("click",function(){m(t);let e=s(4);return u(e.onLastPage())}),g(1,"i",52),p(2," Last"),r()}}function zi(i,d){if(i&1&&(y(0),o(1,"div",40)(2,"div",41)(3,"div",42),p(4),F(5,"number"),_(6,ji,3,0,"span",43)(7,$i,3,3,"span",10),F(8,"async"),p(9),r()(),o(10,"div",44),_(11,Wi,3,0,"a",45)(12,Gi,3,0,"a",46),r()(),b()),i&2){let t=s().ngIf,n=s(2);a(4),v(" Showing 1 - ",N(5,6,t==null?null:t.length)," of "),a(2),l("ngIf",n.paginationService.hideCount),a(),l("ngIf",!n.paginationService.hideCount&&N(8,8,n.rowCount$)),a(2),v(" records ~ ",n.paginationService.footerPageNumber," Page "),a(2),l("ngIf",n.paginationService.disableNextButton&&!n.paginationService.goToLastPage),a(),l("ngIf",n.paginationService.disableNextButton&&!n.paginationService.goToLastPage)}}function Hi(i,d){if(i&1&&(y(0),_(1,zi,13,10,"ng-container",10),b()),i&2){let t=d.ngIf;a(),l("ngIf",(t==null?null:t.length)>0)}}function Ki(i,d){if(i&1){let t=x();o(0,"mainpanel",3),C("onSubmit",function(e){m(t);let c=s();return u(c.searchProduct(e))}),o(1,"actions"),_(2,wi,2,1,"ng-container",4)(3,Mi,4,0,"ng-container",4),o(4,"button",5),C("click",function(){m(t);let e=s();return u(e.openExportDialog())}),g(5,"i",6),o(6,"span"),p(7,"Export"),r()()(),o(8,"content")(9,"div",7)(10,"div",8),_(11,Li,18,6,"ng-container",9),F(12,"async"),_(13,Bi,2,0,"ng-template",null,0,z),r(),_(15,Hi,2,1,"ng-container",10),F(16,"async"),r()()()}if(i&2){let t,n=G(14),e=s();l("hideSearchDropdown",!0),a(2),l("ngxPermissionsOnly",w(10,ie,e.uploadProductRole)),a(),l("ngxPermissionsOnly",w(12,ie,e.scanProductRole)),a(8),l("ngIf",((t=N(12,6,e.data$))==null?null:t.length)>0)("ngIfElse",n),a(4),l("ngIf",N(16,8,e.data$))}}var xn=(()=>{class i{constructor(t,n,e,c,h,P,mt,Ut,In){this.http=t,this.dialog=n,this.toastr=e,this.route=c,this.productService=h,this.paginationService=P,this.biggerPictureService=mt,this.authService=Ut,this.uploadProductService=In,this.loaderAPI="product/Load",this.rowCountAPI="product/GetNotInChannelRowCount",this.notChannelAPI="product/GetNotInChannelV2",this.hasSelectionProduct=!1,this.selectedProducts=[],this.scanProductRole=U.ProductScan,this.uploadProductRole=U.ProductUpload,this.channelOptions=Ut.getChannels(),this.hostName=this.authService.getDomain()}ngOnInit(){this.initPageLoader(),this.iniData()}initPageLoader(){this.paginationService.fetchDataEndpoint=this.notChannelAPI,this.loader$=this.http.post(`api/${this.loaderAPI}`,{}).pipe(jt(t=>{this.filterSearch=t.Filter,this.paginationService.reloadPagination(t.Filter)}))}iniData(){this.data$=this.paginationService.data$.pipe(ut(t=>(t=t.map(n=>(n.Variants=n.Variants.map(e=>(e.Available=this.productService.sortChannel(e.Available),e.NotAvailable=this.productService.sortChannel(e.NotAvailable),e.Available=this.assignLogoChannel(e.Available),e.NotAvailable=this.assignLogoChannel(e.NotAvailable),e)),n.Channel=n?.Variants[0]?.Available,n)),t)))}assignLogoChannel(t){return t=t.map(n=>(n.Img=f.getChannelLogoByTypeId(n.TypeID),n)),t}searchProduct(t){this.filterSearch.text=t,this.paginationService.reloadPagination(this.filterSearch)}scanAllProduct(){let t=this.productService.findChannelById(this.filterSearch.ChannelID,this.channelOptions);this.productService.scanAll(this.filterSearch.ChannelID,this.filterSearch.ScanFull,this.filterSearch.UpdatedProduct,this.filterSearch.Async).subscribe(n=>{this.filterSearch.Async?this.toastr.success("You will be notified when the scan is completed.","Scan Asynchronous"):(this.productService.successToastrScanAllProduct(n,t,!this.filterSearch.UpdatedProduct),this.initPageLoader())})}openScanDialog(){let t=JSON.parse(JSON.stringify(this.filterSearch));t.ChannelID=f.GuidEMpty,this.dialog.open(L,{data:{filter:t,channelOptions:this.channelOptions},width:"600px"}).afterClosed().pipe(D(e=>f.IsNotEmpty(e))).subscribe(e=>{this.filterSearch.ChannelID=e.ChannelID,this.filterSearch.ScanFull=e.ScanFull,this.filterSearch.UpdatedProduct=e.UpdatedProduct,this.filterSearch.Async=e.Async,this.scanAllProduct()})}getRowCount(){this.paginationService.hideCount=!1,this.rowCount$=this.http.post(`/api/${this.rowCountAPI}`,this.filterSearch)}onNextPage(){this.paginationService.onNextPage(this.filterSearch)}onLastPage(){this.http.post(`/api/${this.rowCountAPI}`,{}).subscribe({next:t=>{this.filterSearch.PageNumber=1,this.paginationService.getAllData(this.filterSearch,t.Count)}})}onZoomImage(t,n){this.biggerPictureService.openBiggerPicture(t,n)}onSelectProduct(t){this.hasSelectionProduct=this.productService.hasSelection(t),this.selectedProducts=this.productService.selectedProduct(t)}uploadMultipleProduct(){this.uploadProductService.setSelectedProduct(this.selectedProducts),this.route.navigate(["/menu/products/upload"])}ngOnDestroy(){this.paginationService.destroy()}openExportDialog(){this.dialog.open(dn,{data:{title:"Export Not In Channel",pageNumber:this.filterSearch.PageNumber,rowCount:this.filterSearch.RowCount,filterExport:this.filterSearch,getRowCountApi:"product/GetNotInChannelRowCount",exportApi:"product/GetNotInChannelExport"}}).afterClosed().subscribe()}static{this.\u0275fac=function(n){return new(n||i)(S(W),S(it),S(H),S(rt),S(q),S(Sn),S(on),S(K),S(wt))}}static{this.\u0275cmp=T({type:i,selectors:[["app-not-in-channel"]],standalone:!1,decls:2,vars:3,consts:[["EMPTY",""],["elsePic",""],["headerTitle","Not in Channel","description","SKU has not been sold on one of channels",3,"hideSearchDropdown","onSubmit",4,"ngIf"],["headerTitle","Not in Channel","description","SKU has not been sold on one of channels",3,"onSubmit","hideSearchDropdown"],[4,"ngxPermissionsOnly"],[1,"btn","btn-outline-secondary","shadow","rounded","ms-2",3,"click"],[1,"fa-solid","fa-print","me-3"],[1,"container-fluid","mt-3"],[1,"row"],[4,"ngIf","ngIfElse"],[4,"ngIf"],["class","btn btn-light shadow rounded ms-2",3,"click",4,"ngIf"],[1,"btn","btn-light","shadow","rounded","ms-2",3,"click"],["aria-hidden","true",1,"fa","fa-upload"],["data-cy","scanNotinChannel","type","button",1,"btn","btn-outline-secondary","shadow","rounded","ms-2",3,"click"],[1,"fas","fa-lg","fa-crosshairs"],[1,"col-md-12"],[1,"table","border-bottom"],[1,"thead-light","sticky-top-thead"],["colspan","2",1,"ms-5","text-center",2,"width","450px"],[2,"width","150px"],[2,"width","20%"],[2,"width","16%"],[2,"width","10px"],[4,"ngFor","ngForOf"],[1,"ms-1"],["target","_blank",3,"href"],[1,"fas","fa-solid","fa-arrow-up-right-from-square","external-link-custom"],[2,"padding-left","0px"],[1,"d-flex","flex-wrap","mb-1"],[1,"text-center",3,"rowSpan"],["type","checkbox",3,"ngModelChange","ngModel"],[2,"padding-right","0px"],[1,"text-start",3,"rowSpan"],[1,"ms-5","fw-normal","text-ellipsis",2,"max-width","26vw !important"],[3,"matTooltip"],[1,"border","rounded","cursor-pointer",2,"max-width","40px",3,"click","src"],["src","//res.cloudinary.com/pos/image/upload/w_40/POS/Images/Icon/products_thumb.png",1,"border","rounded",2,"max-width","40px"],["alt","",1,"channel-logo","cursor-pointer","ms-4","mt-3",3,"src","matTooltip"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"d-flex","justify-content-between","mt-5"],[1,"me-auto","d-sm-block","collapse","mt-3"],[1,"font-weight-bold","font-italic","hidden-xxs"],["style","cursor: pointer",3,"click",4,"ngIf"],[1,"btn-group"],["role","button","class","btn btn-outline-secondary btn-sm text-primary","title","Load more for 20 products",3,"click",4,"ngIf"],["role","button","class","btn btn-outline-secondary btn-sm text-primary","title","Load all products",3,"click",4,"ngIf"],[2,"cursor","pointer",3,"click"],["title","Retreive rows count",1,"border","p-3"],["role","button","title","Load more for 20 products",1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"click"],[1,"fas","fa-arrow-right"],["role","button","title","Load all products",1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"click"],[1,"fas","fa-share"]],template:function(n,e){n&1&&(_(0,Ki,17,14,"mainpanel",2),F(1,"async")),n&2&&l("ngIf",N(1,1,e.loader$))},dependencies:[B,V,Fe,j,$,Z,ct,Q,nt,ft,St],styles:[".badge-pill[_ngcontent-%COMP%]{padding-bottom:16px!important}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]:checked + label[_ngcontent-%COMP%]{background:#dfeffc;border:1px solid #dfeffc}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{visibility:hidden;position:absolute;left:0;top:0}.rad-btn[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{border:1px solid #ddd;border-radius:3px;margin-right:10px;cursor:pointer;padding:10px;margin-bottom:10px;color:#000;width:80px;text-align:center}.modal-dialog[_ngcontent-%COMP%]{max-width:30%!important}.product[_ngcontent-%COMP%]{height:100%!important}.row[_ngcontent-%COMP%]{margin-left:0;margin-right:0}ul[_ngcontent-%COMP%]{list-style-type:none}.link[_ngcontent-%COMP%]{color:#0202ab;cursor:pointer}.px-1[_ngcontent-%COMP%]{padding-left:5px!important}.sku[_ngcontent-%COMP%]{color:#696969;font-style:italic}.badge-pill[_ngcontent-%COMP%]{height:16px}.itemTitle[_ngcontent-%COMP%]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.no-title[_ngcontent-%COMP%]{margin-top:.33em;margin-bottom:.33rem}.mb-upload[_ngcontent-%COMP%]{padding-bottom:.625rem}.my-1rem[_ngcontent-%COMP%]{margin-bottom:1rem!important;margin-top:1rem!important}.pr-rem[_ngcontent-%COMP%]{padding-right:.6rem}.text-larger[_ngcontent-%COMP%]{font-size:larger}.bg-lightpink[_ngcontent-%COMP%]{background-color:#f9dede}.bottom-buttons[_ngcontent-%COMP%]{margin-left:97px}@media (min-width: 1200px){.max-w-xl[_ngcontent-%COMP%]{max-width:205px}}.navbar-toggler[_ngcontent-%COMP%]:focus{box-shadow:none!important}thead[_ngcontent-%COMP%]{position:sticky;top:0}.channel-logo[_ngcontent-%COMP%]{width:20px}.w-img[_ngcontent-%COMP%]{width:100%}"]})}}return i})();var ge=i=>[i],Ji=()=>[];function Yi(i,d){if(i&1){let t=x();o(0,"button",16),C("click",function(){m(t);let e=s(2);return u(e.openScanDialog())}),g(1,"i",17),p(2," Scan Channel "),r()}}function Zi(i,d){if(i&1&&(y(0),_(1,Yi,3,0,"button",15),b()),i&2){let t=s();a(),R(t.productService.hasSelection(t.products)?-1:1)}}function qi(i,d){if(i&1){let t=x();o(0,"button",19),C("click",function(){m(t);let e=s(2);return u(e.onDownloadAllProduct("SELECTED"))}),g(1,"i",20),p(2),r()}if(i&2){let t,n=s(2);a(2),v(" Download (",(t=n.productService.selectedProduct(n.products))==null?null:t.length,") ")}}function Qi(i,d){if(i&1&&(y(0),_(1,qi,3,1,"button",18),b()),i&2){let t=s();a(),R(t.productService.hasSelection(t.products)?1:-1)}}function Xi(i,d){if(i&1&&(o(0,"span",21),g(1,"img",22),r(),p(2)),i&2){let t=d.item;a(),l("src",t.Img,M)("alt",t.Name),a(),v(" ",t.Name," ")}}function to(i,d){if(i&1){let t=x();o(0,"div",23)(1,"app-product-card",24),C("onCheckBoxChange",function(e){let c=m(t).index,h=s();return u(h.onSelectProduct(e,c))})("onDescEvent",function(){let e=m(t).index,c=s();return u(c.onShowVariantDetail(e))})("onDownload",function(){let e=m(t).$implicit,c=s();return u(c.onDownloadProduct(e))})("onScan",function(){let e=m(t).$implicit,c=s();return u(c.onScanChannel(e))}),r()()}if(i&2){let t=d.$implicit,n=s();a(),l("showRedirectIcon",!1)("title",t==null?null:t.Name)("image",t==null?null:t.Image)("imageForZoom",t==null?null:t.Image)("code",t==null?null:t.SKU)("description",(t==null||t.Variant==null?null:t.Variant.length)>0?(t==null||t.Variant==null?null:t.Variant.length)+" Variants":null)("downloadButton",!0)("channels",t!=null&&t.Channel?w(10,ge,t==null?null:t.Channel):Et(12,Ji))("showCheckBox",n.hasDownloadRole())("scanButton",!0)}}function eo(i,d){i&1&&(y(0),o(1,"div",25),g(2,"app-empty-state"),r(),b())}function no(i,d){if(i&1){let t=x();o(0,"div",26)(1,"div",27)(2,"app-custom-paginator",28),C("total",function(){m(t);let e=s();return u(e.getRowCount())})("next",function(){m(t);let e=s();return u(e.getProducts())})("previous",function(){m(t);let e=s();return u(e.getProducts())}),r()()()}if(i&2){let t=s();a(2),l("filter",t.searchFilter)("totaldata",t.products==null?null:t.products.length)("paginationTotal",t.rowCount)("hasClicked",t.hasClickRowCount)}}var yn=(()=>{class i{constructor(t,n,e,c,h,P){this.http=t,this.dialog=n,this.productService=e,this.toastrService=c,this.activateRouter=h,this.authService=P,this.permissionService=tt(Ne),this.searchFilter=new dt,this.products=[],this.hasClickRowCount=!1,this.scanProductRole=U.ProductScan,this.downloadProductRole=U.ProductDownload,this.hasDownloadRole=ht(!0),this.channelOptions=this.authService.getChannels(),this.permissionService.hasPermission(this.downloadProductRole).then(mt=>{this.hasDownloadRole.set(mt)})}ngOnInit(){this.activateRouter.queryParams.subscribe(t=>{t.ID?this.initPageLoader(t.ID):this.initPageLoader(f.GuidEMpty)})}initPageLoader(t){this.productService.loader(t).subscribe(n=>{this.searchFilter=n.Filter,this.searchFilter.PageSize=n.Filter.RowCount,this.getProducts()})}getProducts(){this.http.post("/api/product/GetProductChannelNotPOS",this.searchFilter).subscribe(t=>{this.products=t.Data,this.mapChannelToProduct(),this.setSkuProduct()})}mapChannelToProduct(){let t;this.products=this.products.map(n=>(t=this.channelOptions.find(e=>e.ID==n.ChannelID),t?n.Channel=JSON.parse(JSON.stringify(t)):n.Channel=null,n)).map(n=>(n.Channel&&(n.Channel.Url=n.Url),n))}setSkuProduct(){this.products=this.products.map(t=>(t?.Variant?.length==0?f.IsNotEmpty(t?.ChannelItemSKU)?t.SKU=t?.ChannelItemSKU:t.SKU="SKU not assigned":t.SKU=t?.Variant[0]?.ChannelVariationSKU?t?.Variant[0]?.ChannelVariationSKU:"SKU not assigned",t))}onSearch(t){this.searchFilter.text=t,this.hasClickRowCount=!1,this.getProducts()}onClearChannelFilter(){this.searchFilter.ChannelID=f.GuidEMpty}onScanAll(){let t=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);this.productService.scanAll(this.searchFilter.ChannelID,this.searchFilter.ScanFull,this.searchFilter.UpdatedProduct,this.searchFilter.Async).subscribe(n=>{this.searchFilter.Async?this.toastrService.warning("You will be notified when the scan is completed.","Scan In Progress",{toastClass:"ngx-toastr toast-waiting"}):(this.initPageLoader(f.GuidEMpty),this.productService.successToastrScanAllProduct(n,t,!this.searchFilter.UpdatedProduct)),this.searchFilter.ChannelID=f.GuidEMpty})}openScanDialog(){let t=JSON.parse(JSON.stringify(this.searchFilter));t.ChannelID=f.GuidEMpty,this.dialog.open(L,{data:{filter:t,channelOptions:this.channelOptions},width:"600px"}).afterClosed().pipe(D(e=>f.IsNotEmpty(e))).subscribe(e=>{this.searchFilter.ChannelID=e.ChannelID,this.searchFilter.UpdatedProduct=e.UpdatedProduct,this.searchFilter.ScanFull=e.ScanFull,this.searchFilter.Async=e.Async,this.onScanAll()})}onDownloadAllProduct(t){let n;t=="ALL"?n=this.products:n=this.productService.selectedProduct(this.products),n.length>0&&this.productService.downloadMultipleProduct(n).subscribe({next:()=>{this.getProducts()}})}onSelectProduct(t,n){this.products[n].selected=t}onDownloadProduct(t){confirm(`Are you sure you want to Retrieve product ${t?.Name} from ${t?.Channel.Name} to POS?`)&&this.productService.downloadProduct(t).subscribe({next:()=>{this.getProducts()}})}onScanChannel(t){let n=JSON.parse(JSON.stringify(t));delete n.Channel,this.productService.scanCompareToPos([n]).subscribe(e=>{e.Status?(this.initPageLoader(f.GuidEMpty),this.toastrService.success(`product ${t.Name} have been successfully scanned and synchronized with POS`,"Success")):this.toastrService.error(`Product ${t.Name} is not existed in POS`,"Error")})}onShowVariantDetail(t){let n=this.products[t].Variant;n.length>0&&this.dialog.open(pn,{data:{title:this.products[t].Name,variants:n},width:"30%"})}getRowCount(){let t={ChannelID:this.searchFilter.ChannelID,text:this.searchFilter.text,HaveSku:parseInt(this.searchFilter.HaveSku)};this.http.post("/api/product/GetProductChannelNotPOSRowCount",t).subscribe(n=>{this.hasClickRowCount=!0,this.rowCount=n.Count})}static{this.\u0275fac=function(n){return new(n||i)(S(W),S(it),S(q),S(H),S(Gt),S(K))}}static{this.\u0275cmp=T({type:i,selectors:[["app-not-in-pos"]],standalone:!1,decls:30,vars:17,consts:[["headerTitle","Not in POS","textButton","Search","description","SKU sold in Marketplace but not exist in DEALPOS",3,"onSubmit"],[4,"ngxPermissionsOnly"],[1,"fw-bold","mb-2"],["bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel","appendTo","body",1,"center-text",3,"ngModelChange","clearable","items","ngModel"],["ng-option-tmp",""],[1,"mt-5"],[1,"fw-bold"],["name","haveSKU",1,"form-control","h-100","pt-3","rounded","mt-2",3,"ngModelChange","ngModel"],[1,"me-5",3,"value"],["type","text","name","Item_id","id","Item_id","placeholder","item id",1,"form-control","mt-2",3,"ngModelChange","ngModel"],[1,"container-fluid","mt-3"],[1,"row","mt-8"],["class","col-12 col-md-6 col-xl-4 px-3 my-3",4,"ngFor","ngForOf"],[4,"ngIf"],["class","row",4,"ngIf"],["type","button","data-cy","scanNotInPos",1,"btn","btn-outline-secondary","shadow","rounded"],["type","button","data-cy","scanNotInPos",1,"btn","btn-outline-secondary","shadow","rounded",3,"click"],[1,"fas","fa-lg","fa-crosshairs"],["type","button",1,"btn","btn-success","shadow-sm","rounded","ms-3"],["type","button",1,"btn","btn-success","shadow-sm","rounded","ms-3",3,"click"],[1,"fa","fa-download"],[1,"me-2"],[2,"width","18px",3,"src","alt"],[1,"col-12","col-md-6","col-xl-4","px-3","my-3"],[3,"onCheckBoxChange","onDescEvent","onDownload","onScan","showRedirectIcon","title","image","imageForZoom","code","description","downloadButton","channels","showCheckBox","scanButton"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"row"],[1,"col-12"],[3,"total","next","previous","filter","totaldata","paginationTotal","hasClicked"]],template:function(n,e){n&1&&(o(0,"mainpanel",0),C("onSubmit",function(h){return e.onSearch(h)}),o(1,"actions"),_(2,Zi,2,1,"ng-container",1)(3,Qi,2,1,"ng-container",1),r(),o(4,"filters")(5,"div")(6,"label",2),p(7,"Channel"),r(),o(8,"ng-select",3),E("ngModelChange",function(h){return k(e.searchFilter.ChannelID,h)||(e.searchFilter.ChannelID=h),h}),_(9,Xi,3,3,"ng-template",4),r()(),o(10,"div",5)(11,"label",6),p(12,"SKU Assigned"),r(),o(13,"mat-radio-group",7),E("ngModelChange",function(h){return k(e.searchFilter.HaveSku,h)||(e.searchFilter.HaveSku=h),h}),o(14,"mat-radio-button",8),p(15," All "),r(),o(16,"mat-radio-button",8),p(17," Yes "),r(),o(18,"mat-radio-button",8),p(19," No "),r()()(),o(20,"div",5)(21,"label",6),p(22,"Item ID"),r(),o(23,"input",9),E("ngModelChange",function(h){return k(e.searchFilter.Item_id,h)||(e.searchFilter.Item_id=h),h}),r()()(),o(24,"content")(25,"div",10)(26,"div",11),_(27,to,2,13,"div",12)(28,eo,3,0,"ng-container",13),r(),_(29,no,3,4,"div",14),r()()()),n&2&&(a(2),l("ngxPermissionsOnly",w(13,ge,e.scanProductRole)),a(),l("ngxPermissionsOnly",w(15,ge,e.downloadProductRole)),a(5),l("clearable",!0)("items",e.channelOptions),O("ngModel",e.searchFilter.ChannelID),a(5),O("ngModel",e.searchFilter.HaveSku),a(),l("value",0),a(2),l("value",1),a(2),l("value",2),a(5),O("ngModel",e.searchFilter.Item_id),a(4),l("ngForOf",e.products),a(),l("ngIf",e.products.length==0),a(),l("ngIf",(e.products==null?null:e.products.length)>0))},dependencies:[B,V,xt,j,$,Z,lt,bt,Zt,qt,ot,pt,Q,nt],styles:[".badge-pill[_ngcontent-%COMP%]{padding-bottom:16px!important}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]:checked + label[_ngcontent-%COMP%]{background:#dfeffc;border:1px solid #dfeffc}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{visibility:hidden;position:absolute;left:0;top:0}.rad-btn[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{border:1px solid #ddd;border-radius:3px;margin-right:10px;cursor:pointer;padding:10px;margin-bottom:10px;color:#000;width:80px;text-align:center}.modal-dialog[_ngcontent-%COMP%]{max-width:30%!important}.product[_ngcontent-%COMP%]{height:100%!important}.row[_ngcontent-%COMP%]{margin-left:0;margin-right:0}ul[_ngcontent-%COMP%]{list-style-type:none}.link[_ngcontent-%COMP%]{color:#0202ab;cursor:pointer}.px-1[_ngcontent-%COMP%]{padding-left:5px!important}.sku[_ngcontent-%COMP%]{color:#696969;font-style:italic}.badge-pill[_ngcontent-%COMP%]{height:16px}.itemTitle[_ngcontent-%COMP%]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.no-title[_ngcontent-%COMP%]{margin-top:.33em;margin-bottom:.33rem}.mb-upload[_ngcontent-%COMP%]{padding-bottom:.625rem}.my-1rem[_ngcontent-%COMP%]{margin-bottom:1rem!important;margin-top:1rem!important}.pr-rem[_ngcontent-%COMP%]{padding-right:.6rem}.text-larger[_ngcontent-%COMP%]{font-size:larger}.bg-lightpink[_ngcontent-%COMP%]{background-color:#f9dede}.bottom-buttons[_ngcontent-%COMP%]{margin-left:97px}@media (min-width: 1200px){.max-w-xl[_ngcontent-%COMP%]{max-width:205px}}.navbar-toggler[_ngcontent-%COMP%]:focus{box-shadow:none!important}.itemTitle[_ngcontent-%COMP%]{cursor:pointer}"]})}}return i})();function io(i,d){if(i&1&&(o(0,"span",11),g(1,"img",12),r(),p(2)),i&2){let t=d.item,n=s();a(),l("src",n.getChannelLogo(t.TypeID),M),a(),v(" ",t.Name," ")}}function oo(i,d){if(i&1&&(o(0,"div",13),g(1,"app-duplicate-product-card",14),r()),i&2){let t=d.$implicit,n=d.index;a(),l("imageForZoom",t.ImageUrl)("title",t.Name)("code",t.Code)("id",n)("image",t.ThumbnailURL)("channels",t.Channels)}}function ao(i,d){i&1&&(y(0),o(1,"div",15),g(2,"app-empty-state"),r(),b())}function ro(i,d){if(i&1){let t=x();y(0),o(1,"div",16)(2,"div",17)(3,"app-custom-paginator",18),C("next",function(){m(t);let e=s();return u(e.getProducts())})("previous",function(){m(t);let e=s();return u(e.getProducts())})("total",function(){m(t);let e=s();return u(e.getRowCount())}),r()()(),b()}if(i&2){let t=s();a(3),l("filter",t.searchFilter)("totaldata",t.products==null?null:t.products.length)("paginationTotal",t.rowCount)("hasClicked",t.hasClickedRowCount)}}var bn=(()=>{class i{constructor(t,n,e){this.httpService=t,this.productService=n,this.authService=e,this.searchFilter=new dt,this.products=[],this.hasClickedRowCount=!1,this.getPageLoader(),this.channelOptions=e.getChannels()}getPageLoader(){this.productService.loader().subscribe(t=>{this.searchFilter=t.Filter,this.searchFilter.PageSize=t.Filter.RowCount,this.getProducts()})}getProducts(){let t={ListChannelID:this.searchFilter.ListChannelID,RowCount:this.searchFilter.RowCount,PageNumber:this.searchFilter.PageNumber,text:this.searchFilter.text};this.httpService.post("/api/product/GetDuplicateInChannel",t).subscribe(n=>{this.products=n.Data})}onSearch(t){this.searchFilter.text=t,this.hasClickedRowCount=!1,this.getProducts()}onClearFilter(){this.searchFilter.ChannelID=f.GuidEMpty}getChannelLogo(t){return f.getChannelLogoByTypeId(t)}getRowCount(){let t={text:this.searchFilter.text,ChannelID:this.searchFilter.ChannelID};this.httpService.post("/api/product/GetDuplicateInChannelRowCount",t).subscribe(n=>{this.hasClickedRowCount=!0,this.rowCount=n.Total})}static{this.\u0275fac=function(n){return new(n||i)(S(W),S(q),S(K))}}static{this.\u0275cmp=T({type:i,selectors:[["app-duplicate-sku"]],standalone:!1,decls:19,vars:7,consts:[["headerTitle","Multiple Listing","textButton"," Search","description","SKU(s) which is listed more than one time (one to many)",3,"onSubmit"],["routerLink","/menu/products/status/duplicate-sku/table",1,"btn","btn-outline-secondary","btn-lg","d-flex","align-items-center","gap-2"],[1,"fa-solid","fa-table"],["container",""],[1,"mb-2"],["appendTo","body","bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"ngModelChange","clear","multiple","clearable","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],[1,"container-fluid"],[1,"row","mt-8","mx-1"],["class","col-12 col-md-6 col-xl-4 px-3 my-3",4,"ngFor","ngForOf"],[4,"ngIf"],[1,"me-2"],["alt","",2,"width","18px",3,"src"],[1,"col-12","col-md-6","col-xl-4","px-3","my-3"],[3,"imageForZoom","title","code","id","image","channels"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"row","mt-2","justify-content-end"],[1,"col-md-12"],[3,"next","previous","total","filter","totaldata","paginationTotal","hasClicked"]],template:function(n,e){n&1&&(o(0,"mainpanel",0),C("onSubmit",function(h){return e.onSearch(h)}),o(1,"actions")(2,"a",1),g(3,"i",2),o(4,"span"),p(5,"Table View"),r()()(),o(6,"filters")(7,"div",3)(8,"div")(9,"h6",4),p(10,"Channel"),r(),o(11,"ng-select",5),E("ngModelChange",function(h){return k(e.searchFilter.ListChannelID,h)||(e.searchFilter.ListChannelID=h),h}),C("clear",function(){return e.onClearFilter()}),_(12,io,3,2,"ng-template",6),r()()()(),o(13,"content")(14,"div",7)(15,"div",8),_(16,oo,2,6,"div",9)(17,ao,3,0,"ng-container",10),r(),_(18,ro,4,4,"ng-container",10),r()()()),n&2&&(a(11),l("multiple",!0)("clearable",!0)("items",e.channelOptions),O("ngModel",e.searchFilter.ListChannelID),a(5),l("ngForOf",e.products),a(),l("ngIf",(e.products==null?null:e.products.length)==0),a(),l("ngIf",(e.products==null?null:e.products.length)>0))},dependencies:[B,V,j,$,Z,lt,bt,Ht,Qt,ot,zt,Q],encapsulation:2})}}return i})();var lo=()=>["/menu/products/status/sold-in-channel"],vn=i=>({ID:i}),co=()=>["/menu/products/status/not-in-pos"],so=i=>[i];function po(i,d){if(i&1&&(y(0),p(1),b()),i&2){let t=s().$implicit;a(),v(" ",t.Count," ")}}function mo(i,d){if(i&1){let t=x();o(0,"span",25),C("click",function(){m(t);let e=s().$implicit,c=s(2);return u(c.getLiveProductCount(e.ID,e))}),g(1,"i",26),r()}}function uo(i,d){if(i&1){let t=x();y(0),o(1,"button",27),C("click",function(){m(t);let e=s().$implicit,c=s(2);return u(c.onScanChannel(e))}),g(2,"i",28),p(3," Scan "),r(),b()}}function ho(i,d){if(i&1){let t=x();o(0,"tr")(1,"td"),g(2,"img",17),o(3,"span",18),p(4),r()(),o(5,"td",19),_(6,po,2,1,"ng-container",6)(7,mo,2,0,"ng-template",null,1,z),r(),o(9,"td",19)(10,"a",20),p(11),F(12,"number"),r()(),o(13,"td",19)(14,"a",20),p(15),F(16,"number"),r()(),o(17,"td"),p(18),F(19,"date"),r(),o(20,"td")(21,"div",21),_(22,uo,4,0,"ng-container",22),o(23,"button",23),C("click",function(){let e=m(t).$implicit,c=s(2);return u(c.onClearCache(e.ID))}),g(24,"i",24),p(25," Clear "),r()()()()}if(i&2){let t=d.$implicit,n=G(8),e=s(2);a(2),l("src",e.getChannelLogo(t.TypeID),M),a(2),A(t.Name),a(2),l("ngIf",t.Count!==void 0)("ngIfElse",n),a(4),l("routerLink",Et(19,lo))("queryParams",w(20,vn,t.ID)),a(),v(" ",N(12,12,t.SoldInChannel)," "),a(3),l("routerLink",Et(22,co))("queryParams",w(23,vn,t.ID)),a(),v(" ",N(16,14,t.NotInPOS)," "),a(3),v(" ",t.LastSync?De(19,16,t.LastSync,"dd MMM yyyy HH:mm"):"Never"," "),a(4),l("ngxPermissionsOnly",w(25,so,e.scanProductRole))}}function _o(i,d){if(i&1&&(y(0),o(1,"div",7)(2,"table",8)(3,"thead",9)(4,"tr",10)(5,"th"),p(6,"Channel"),r(),o(7,"th",11),p(8," Live Product "),r(),o(9,"th",12),p(10," Sold In Channel "),r(),o(11,"th",13),p(12," Product Not in POS "),r(),o(13,"th",14),p(14,"Last Sync"),r(),g(15,"th",15),r()(),o(16,"tbody"),_(17,ho,26,27,"tr",16),F(18,"async"),r()()(),b()),i&2){let t,n=s();a(17),l("ngForOf",(t=N(18,1,n.channels$))==null?null:t.Data)}}function go(i,d){i&1&&(o(0,"div",29),g(1,"app-empty-state"),r())}var Pn=(()=>{class i{constructor(t,n,e,c){this.productService=t,this.toastr=n,this.dialog=e,this.authService=c,this.scanProductRole=U.ProductScan,this.destroy$=new Lt,this.channelOptions=c.getChannels()}ngOnInit(){this.setObsProductStatistic()}setObsProductStatistic(){this.channels$=this.productService.getProductStatistic()}getLiveProductCount(t,n){this.productService.getTotalProductLive(t).pipe(Ot(this.destroy$)).subscribe(e=>{n.Count=e.Count})}onScanChannel(t){this.dialog.open(L,{width:"700px",data:{channelOptions:this.channelOptions,filter:{ChannelID:t.ID},disabledChannelOption:!0}}).afterClosed().pipe(D(n=>f.IsNotEmpty(n))).subscribe(n=>{this.scanAllProduct(t.ID,n)})}scanAllProduct(t,n){let e=this.productService.findChannelById(t,this.channelOptions);this.productService.scanAll(n.ChannelID,n.ScanFull,n.UpdatedProduct,n.Async).pipe(D(c=>c)).subscribe(c=>{n.Async?this.toastr.warning("You will be notified when the scan is completed.","Scan In Progress",{toastClass:"ngx-toastr toast-waiting"}):(this.productService.successToastrScanAllProduct(c,e,!n.UpdatedProduct),this.setObsProductStatistic())})}onClearCache(t){confirm("Are you sure you want to Clear Cache? This Process will remove your product integration to marketplace")&&this.productService.clearCacheChannel(t).pipe(Ot(this.destroy$)).subscribe(e=>{this.toastr.success("Successfully cleared cache","Success"),this.setObsProductStatistic()})}getChannelLogo(t){return f.getChannelLogoByTypeId(t)}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}static{this.\u0275fac=function(n){return new(n||i)(S(q),S(H),S(it),S(K))}}static{this.\u0275cmp=T({type:i,selectors:[["app-channel-statistic"]],standalone:!1,decls:9,vars:6,consts:[["EMPTY",""],["QUESTION",""],["headerTitle","Products Statistic",3,"hideSearchBox","hideSearchDropdown"],[1,"container-fluid"],[1,"row","mt-4"],[1,"col-md-12"],[4,"ngIf","ngIfElse"],[1,"table-responsive"],[1,"table","table-hover"],[1,"sticky-top-thead"],[1,"table-light"],[1,"text-center",2,"width","13rem"],[1,"text-center",2,"width","9rem"],[1,"text-center",2,"width","14rem"],[2,"width","10rem"],[2,"width","12rem"],[4,"ngFor","ngForOf"],[2,"width","24px","height","24px",3,"src"],[1,"ms-3"],[1,"text-center"],[3,"routerLink","queryParams"],[1,"d-flex","align-items-center","justify-content-center"],[4,"ngxPermissionsOnly"],[1,"btn","btn-sm","btn-secondary","fs-6","ms-3",3,"click"],[1,"fa","fa-trash"],["matTooltip","Click to see total live product",1,"cursor-pointer","fs-5","text-primary",3,"click"],[1,"fa-solid","fa-circle-question","cursor"],[1,"btn","btn-sm","btn-secondary","fs-6",3,"click"],[1,"fa","fa-spinner"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"]],template:function(n,e){if(n&1&&(o(0,"mainpanel",2)(1,"content")(2,"div",3)(3,"div",4)(4,"div",5),_(5,_o,19,3,"ng-container",6),F(6,"async"),_(7,go,2,0,"ng-template",null,0,z),r()()()()()),n&2){let c,h=G(8);l("hideSearchBox",!0)("hideSearchDropdown",!0),a(5),l("ngIf",((c=N(6,4,e.channels$))==null||c.Data==null?null:c.Data.length)>0)("ngIfElse",h)}},dependencies:[B,V,Z,ct,zt,Q,nt,ft,St,Oe],encapsulation:2})}}return i})();var Co=[{component:un,path:"",children:[{path:"",redirectTo:"sold-in-channel",pathMatch:"full"},{path:"in-pos",component:Cn,canActivate:[J,Y],data:{title:"Products in POS"}},{path:"sold-in-channel",component:fn,canActivate:[J,Y],data:{title:"Products Sold in Channel"}},{path:"not-in-channel",component:xn,canActivate:[J,Y],data:{title:"Products not in Channel"}},{path:"not-in-pos",component:yn,canActivate:[J,Y],data:{title:"Products not in POS"}},{path:"duplicate-sku",component:bn,canActivate:[J,Y],data:{title:"Duplicate Sku in Channel"}},{path:"duplicate-sku/table",loadComponent(){return import("./chunk-SHRLQGK3.js").then(i=>i.DuplicateSkuV2Component)},canActivate:[J,Y],data:{title:"Duplicate Sku in Channel"}},{path:"channel-statistic",component:Pn,canActivate:[J,Y],data:{title:"Channel Statistic"}},{path:"notification",loadComponent(){return import("./chunk-UML74HNB.js").then(i=>i.NotificationComponent)},canActivate:[J,Y],data:{title:"Notification"}},{path:"notificationV2",loadComponent(){return import("./chunk-BZBQHO76.js").then(i=>i.NotificationV2Component)},canActivate:[J,Y],data:{title:"Notification"}},{path:"notification/detailV2",loadComponent(){return import("./chunk-L7EQZACZ.js").then(i=>i.DetailComponent)},canActivate:[J,Y],data:{title:"Notification Detail"}},{path:"notification/detail",loadComponent(){return import("./chunk-FOFXARTB.js").then(i=>i.DetailComponent)},canActivate:[J,Y],data:{title:"Notification Detail"}}]}],Yr=(()=>{class i{static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275mod=Pe({type:i})}static{this.\u0275inj=ye({imports:[et,yt,Ge,st,Ae,mn,Ye,We,Qt,ot,pt,Ee.forChild(Co),sn,Qe,Tt,Ve]})}}return i})();export{Yr as StatusModule};
@@ -1 +0,0 @@
1
- import{a as x}from"./chunk-PE5AFID4.js";import{g as u}from"./chunk-6VHVQEVM.js";import{b as h,d as C,i as M,j as v,k as S}from"./chunk-FO7G4GMY.js";import{G as g,n as p}from"./chunk-FXQKRJWU.js";import{Gb as m,Gc as t,Yb as f,ic as i,ja as s,jc as n,kc as d,pa as o,tc as c}from"./chunk-OJMQBH6T.js";var y=(()=>{class e{constructor(){this.dialogRef=o(h),this.route=o(g),this.modalConfig=new v,this.modalConfig.title="Switch to modern authorization",this.modalConfig.customWidth="450px",this.modalConfig.hideCancel=!0,this.modalConfig.headerType=M.Warning,this.modalConfig.okText="Setup"}onClose(){this.dialogRef.close()}onOk(){this.dialogRef.close(),this.route.navigate(["/menu/users"])}static{this.\u0275fac=function(r){return new(r||e)}}static{this.\u0275cmp=m({type:e,selectors:[["app-modal-user-migration-confirmation"]],decls:19,vars:1,consts:[[3,"onOk","onCancel","config"],["content",""],[1,"d-flex","align-items-center","justify-content-between","gap-6"],[1,"text-center",2,"width","300px"],[1,"fa-solid","fa-users-gear","fa-6x"],[1,"lh-base"],["href","https://support.dealpos.com/en/collections/16213478-user-group","target","_blank"]],template:function(r,l){r&1&&(i(0,"modal-material",0),c("onOk",function(){return l.onOk()})("onCancel",function(){return l.onClose()}),i(1,"div",1)(2,"div",2)(3,"div",3),d(4,"i",4),n(),i(5,"div",5)(6,"p"),t(7," We have introduced a new Modern Authorization, Please switch from "),i(8,"b"),t(9,"legacy"),n(),t(10," to "),i(11,"b"),t(12,"modern"),n(),t(13," authorization by inviting your users. "),n(),i(14,"div"),t(15," Please refer to this "),i(16,"a",6),t(17,"article"),n(),t(18," for more information "),n()()()()()),r&2&&f("config",l.modalConfig)},dependencies:[p,S],encapsulation:2})}}return e})();var R=(()=>{class e{constructor(){this.dialog=o(C),this.tokenService=o(u),this.dialogRef=null}openDialogMigrationConfirmation(){this.tokenService.getUser()?.AuthorizationMode===x.Legacy&&!this.dialogRef&&(this.dialogRef=this.dialog.open(y),this.dialogRef.afterClosed().subscribe(()=>{this.dialogRef=null}))}resetDialogState(){this.dialogRef&&(this.dialogRef.close(),this.dialogRef=null)}static{this.\u0275fac=function(r){return new(r||e)}}static{this.\u0275prov=s({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var B=(e,b)=>(o(R).openDialogMigrationConfirmation(),!0);export{B as a};
@@ -1 +0,0 @@
1
- import{a as Me}from"./chunk-2I7ZZ3F2.js";import{a as Fe,b as Ve}from"./chunk-YIXZLIPA.js";import"./chunk-HVCIQI7B.js";import"./chunk-QS22J2SC.js";import"./chunk-QP4C4R4W.js";import{a as E}from"./chunk-XHAXYWZ7.js";import{a as Te,b as De,c as Ee,d as B,e as U}from"./chunk-3E7JHNVC.js";import{a as ve,b as be}from"./chunk-PPHTN2H6.js";import"./chunk-RHHHL4OR.js";import{a as Ie}from"./chunk-3FPEQHTI.js";import"./chunk-5LQRO4AI.js";import"./chunk-MO53T3IK.js";import"./chunk-W3JTS22H.js";import"./chunk-SDUUFQUI.js";import"./chunk-6L7TD5DW.js";import"./chunk-WLRPCY65.js";import"./chunk-3RK6DDJD.js";import"./chunk-3UN6FPMN.js";import"./chunk-LDPDLCRL.js";import{a as ce}from"./chunk-UMP6ZMEJ.js";import"./chunk-JVNHFIYT.js";import{a as ye}from"./chunk-3YP6ORBR.js";import"./chunk-FJ455ZYZ.js";import{h as ge}from"./chunk-6VHVQEVM.js";import"./chunk-Z3ITXK3D.js";import"./chunk-ACIMXBIC.js";import"./chunk-J53BPEDH.js";import"./chunk-TGMCGROM.js";import"./chunk-RDRNWLJI.js";import{b as pe,e as _e}from"./chunk-W5L6FMO3.js";import"./chunk-K5XRGNWG.js";import{a as he,b as Ce,d as ue,e as xe}from"./chunk-PYXL7UF7.js";import{c as se}from"./chunk-PW42BQIY.js";import{d as fe,l as Pe,m as Se,n as we}from"./chunk-FO7G4GMY.js";import{A as le,b as ne,c as ie,h as oe,m as ae,o as re}from"./chunk-5PS6ZS3N.js";import"./chunk-V3USB3ZU.js";import{b as me,c as de}from"./chunk-ERXVXBTU.js";import"./chunk-NNRBGHXB.js";import"./chunk-BJUPMCEP.js";import{d as Q,g as X,j as Y,m as D,n as ee,q as te}from"./chunk-FXQKRJWU.js";import{$c as v,Fc as q,G as W,Gb as j,Gc as d,Hc as L,Ic as b,Kc as w,Lc as I,Mb as h,Mc as y,Qc as K,Sc as T,Yb as m,Z as A,ad as F,bd as J,cd as Z,dc as P,ea as $,ec as N,gc as k,hc as R,ic as a,jc as c,kc as S,lc as z,mc as G,oc as u,pa as M,pb as V,rb as l,tc as C,uc as r,xb as f,xc as H,ya as p,za as _}from"./chunk-OJMQBH6T.js";import"./chunk-EU2KAMEK.js";import"./chunk-66YHNWRR.js";var O=i=>[i],Le=i=>({"text-decoration-line-through":i}),Be=i=>({"bg-gradient-warning":i});function Ue(i,s){if(i&1&&(a(0,"span",10),S(1,"img",11),c(),d(2)),i&2){let e=s.item;l(),m("src",e==null?null:e.Img,V),l(),b(" ",e.Name," ")}}function Oe(i,s){if(i&1){let e=u();a(0,"button",16),C("click",function(){p(e);let t=r().ngIf,o=r(2);return _(o.updateStock(t))}),S(1,"i",17),d(2," Update "),c()}}function We(i,s){if(i&1){let e=u();a(0,"actions")(1,"div",12),h(2,Oe,3,0,"button",13),a(3,"button",14),C("click",function(){p(e);let t=r(2);return _(t.openExportDialog())}),S(4,"i",15),a(5,"span"),d(6,"Export"),c()()()()}if(i&2){let e=s.ngIf,n=r(2);l(2),m("ngIf",n.productService.hasSelectionVariant(e))}}function Ae(i,s){if(i&1){let e=u();a(0,"th")(1,"input",32),C("change",function(t){p(e);let o=r().ngIf,g=r(2);return _(g.onSelectAllSKU(t.target.checked,o))}),c()()}}function $e(i,s){if(i&1){let e=u();a(0,"input",49),y("ngModelChange",function(t){p(e);let o=r(4).$implicit;return I(o.selected,t)||(o.selected=t),_(t)}),C("ngModelChange",function(){p(e);let t=r(4).$implicit,o=r(3);return _(o.onCheckboxStateProduct(t))}),c()}if(i&2){let e=r(4).$implicit;w("ngModel",e.selected)}}function je(i,s){if(i&1&&h(0,$e,1,1,"ng-template",26),i&2){let e=r(6);m("ngxPermissionsOnly",T(1,O,e.rolePriceEdit))}}function ze(i,s){if(i&1){let e=u();z(0),a(1,"img",50),C("click",function(t){p(e);let o=r(3).$implicit,g=r(3);return _(g.onZoomImage(t,o==null?null:o.ImageUrl))}),c(),G()}if(i&2){let e=r(3).$implicit;l(),H("src",e.ThumbnailUrl,V)}}function Ge(i,s){i&1&&S(0,"img",51)}function He(i,s){if(i&1&&(a(0,"small",48),d(1),c()),i&2){let e=r(3).$implicit;l(),b("(",e.Category,")")}}function qe(i,s){if(i&1&&(a(0,"td",44)(1,"div",35),h(2,je,1,3,null,26),a(3,"div"),h(4,ze,2,1,"ng-container",45)(5,Ge,1,0,"ng-template",null,0,Z),c()()(),a(7,"td",46)(8,"span",47),d(9),c(),h(10,He,2,1,"small",48),c()),i&2){let e=q(6),n=r(2).$implicit;m("rowSpan",n.Variants.length),l(2),P((n.Variants==null?null:n.Variants.length)>1?2:-1),l(2),m("ngIf",n.ThumbnailUrl)("ngIfElse",e),l(3),m("rowSpan",n.Variants.length),l(2),L(n.Name),l(),P(n.Category?10:-1)}}function Ke(i,s){if(i&1){let e=u();a(0,"input",54),y("ngModelChange",function(t){p(e);let o=r(2).$implicit;return I(o.selected,t)||(o.selected=t),_(t)}),c()}if(i&2){let e=r(2).$implicit;w("ngModel",e.selected)}}function Je(i,s){if(i&1&&(a(0,"td",52),h(1,Ke,1,1,"input",53),c()),i&2){let e=r().$implicit;l(),P(e.UnitPrice>=0?1:-1)}}function Ze(i,s){i&1&&(a(0,"div",36),d(1," Not Found "),c())}function Qe(i,s){if(i&1&&(a(0,"div"),d(1),v(2,"number"),c()),i&2){let e=r().$implicit;l(),b(" ",F(2,1,e.UnitPrice)," ")}}function Xe(i,s){if(i&1&&(a(0,"div",37)(1,"a",40),S(2,"i",55),c()()),i&2){let e=r().$implicit,n=r(4);l(),m("href",n.hostName+"/menu/Products/Catalog/Variants/Info?ID="+(e==null?null:e.ID),V)}}function Ye(i,s){if(i&1){let e=u();a(0,"div",56),C("click",function(){p(e);let t=r().$implicit,o=r().$implicit,g=r(2).ngIf,x=r();return _(x.openTableDialog(t,o,g))}),d(1),v(2,"number"),c()}if(i&2){let e=r().$implicit;l(),b(" ",F(2,1,e.Channel[0]==null?null:e.Channel[0].Price)," ")}}function et(i,s){if(i&1){let e=u();a(0,"tr",33),h(1,qe,11,7),a(2,"td",24),d(3),c(),a(4,"td",27)(5,"span",34),d(6),c()(),h(7,Je,2,1,"ng-template",26),a(8,"td",27)(9,"div",35),h(10,Ze,2,0,"div",36)(11,Qe,3,3,"div")(12,Xe,3,1,"div",37),c()(),a(13,"td",38)(14,"div",35),h(15,Ye,3,3,"div",39),a(16,"div",37)(17,"a",40),S(18,"i",41),c()(),a(19,"div",37)(20,"div",42),C("click",function(){let t=p(e).$implicit,o=r(4);return _(o.refreshPrice(t))}),S(21,"i",43),c()()()()()}if(i&2){let e=s.$implicit,n=s.$index,t=r(4);l(),P(n==0?1:-1),l(2),L(e.Model),l(2),m("matTooltip",e.Discontinued?t.discontinuedVariantMsg:"")("ngClass",T(12,Le,e.Discontinued)),l(),b(" ",e.Code," "),l(),m("ngxPermissionsOnly",T(14,O,t.rolePriceEdit)),l(3),P((e.Channel[0]==null?null:e.Channel[0].Description)!=null?10:-1),l(),P((e.Channel[0]==null?null:e.Channel[0].Description)==null?11:-1),l(),P((e.Channel[0]==null?null:e.Channel[0].Description)==null?12:-1),l(),m("ngClass",T(16,Be,e.UnitPrice!=(e.Channel[0]==null?null:e.Channel[0].Price))),l(2),P(e.Channel.length>0?15:-1),l(2),m("href",e.Channel[0]==null?null:e.Channel[0].Url,V)}}function tt(i,s){if(i&1&&k(0,et,22,18,"tr",33,N),i&2){let e=s.$implicit;R(e.Variants)}}function nt(i,s){if(i&1){let e=u();a(0,"content")(1,"div",18)(2,"div",19)(3,"table",20)(4,"thead",21)(5,"tr")(6,"th",22),d(7," Product "),a(8,"div")(9,"mat-slide-toggle",23),y("ngModelChange",function(t){p(e);let o=r(2);return I(o.toggleDifferentInventory,t)||(o.toggleDifferentInventory=t),_(t)}),C("toggleChange",function(){p(e);let t=r(2);return _(t.onToggleDifferentInventory())}),a(10,"small",7),d(11,"FILTER DIFFERENT PRICE"),c()()()(),a(12,"th",24),d(13,"Variant"),c(),a(14,"th",25),d(15,"SKU"),c(),h(16,Ae,2,0,"ng-template",26),a(17,"th",27),d(18,"POS"),c(),a(19,"th",27)(20,"div",28),C("click",function(){p(e);let t=r(2);return _(t.openModalFilter())}),S(21,"img",29),a(22,"span",30),d(23),v(24,"stringLimit"),c()()()()(),a(25,"tbody"),k(26,tt,2,0,null,null,N),c()(),a(28,"infinite-paginator",31),v(29,"async"),C("onNextPage",function(){p(e);let t=r(2);return _(t.infinitePagination.onNextPage(t.searchFilter))})("onLastPage",function(){p(e);let t=r(2);return _(t.infinitePagination.onLastPage(t.searchFilter))})("onGetRowCount",function(){p(e);let t=r(2);return _(t.infinitePagination.getRowCount(t.searchFilter))}),c()()()()}if(i&2){let e=s.ngIf,n=r(2);l(9),w("ngModel",n.toggleDifferentInventory),l(7),m("ngxPermissionsOnly",T(16,O,n.rolePriceEdit)),l(4),m("matTooltip",(n.selectedChannel==null||n.selectedChannel.Name==null?null:n.selectedChannel.Name.length)>=20?n.selectedChannel==null?null:n.selectedChannel.Name:""),l(),m("src",n.selectedChannel==null?null:n.selectedChannel.Img,V),l(2),b(" ",J(24,11,n.selectedChannel==null?null:n.selectedChannel.Name,20)," "),l(3),R(e),l(2),m("totalData",n.infinitePagination.totalData())("hideCount",n.infinitePagination.hideCount())("rowCount",F(29,14,n.infinitePagination.totalRowCount$))("pageNumber",n.infinitePagination.pageNumber())("disableNextButton",n.infinitePagination.disableNextButton())("goToLastPage",n.infinitePagination.isLastPage())}}function it(i,s){if(i&1){let e=u();a(0,"mainpanel",2),y("textChange",function(t){p(e);let o=r();return I(o.searchFilter.text,t)||(o.searchFilter.text=t),_(t)}),C("onSubmit",function(){p(e);let t=r();return _(t.onSearch())}),a(1,"filters")(2,"div")(3,"label",3),d(4,"Channel"),c(),a(5,"ng-select",4),y("ngModelChange",function(t){p(e);let o=r();return I(o.searchFilter.ChannelID,t)||(o.searchFilter.ChannelID=t),_(t)}),h(6,Ue,3,2,"ng-template",5),c()(),a(7,"div",6)(8,"label",7),d(9,"Page Number"),c(),a(10,"input",8),y("ngModelChange",function(t){p(e);let o=r();return I(o.searchFilter.PageNumber,t)||(o.searchFilter.PageNumber=t),_(t)}),c()(),a(11,"div",6)(12,"label",7),d(13,"Page Size"),c(),a(14,"input",8),y("ngModelChange",function(t){p(e);let o=r();return I(o.searchFilter.RowCount,t)||(o.searchFilter.RowCount=t),_(t)}),c()()(),h(15,We,7,1,"actions",9),v(16,"async"),h(17,nt,30,18,"content",9),v(18,"async"),c()}if(i&2){let e=r();m("headerTitle",e.pageTitle),w("text",e.searchFilter.text),l(5),m("clearable",!1)("items",e.channelOptions),w("ngModel",e.searchFilter.ChannelID),l(5),w("ngModel",e.searchFilter.PageNumber),l(4),w("ngModel",e.searchFilter.RowCount),l(),m("ngIf",F(16,9,e.data$)),l(2),m("ngIf",F(18,11,e.data$))}}var Wt=(()=>{class i{constructor(e,n,t,o,g,x,Ne,ke,Re){this.http=e,this.toastr=n,this.dialog=t,this.productService=o,this.biggerPictureService=g,this.authService=x,this.mainPanelService=Ne,this.exportService=ke,this.decimalPipe=Re,this.infinitePagination=M(B),this.updateResHandling=M(U),this.pageTitle="Price Single Channel Comparison",this.toggleDifferentInventory=!1,this.loaderEndpoint="PriceLoader/Load",this.dataEndpoint="Price/GetSingleChannelComparison",this.rowCountApi="Inventory/GetInventoryByChannelRowCount",this.rolePriceEdit=ce.PriceUpdate,this.discontinuedVariantMsg="This Variant is discontinued from POS, you must Non Active manually at the seller center so that it is not sold again on the channel.",this.hostName=this.authService.getDomain(),this.data$=this.infinitePagination.data$.pipe(A(1)),this.channelOptions=x.getChannels()}ngOnInit(){this.initPageLoader()}initPageLoader(){this.infinitePagination.fetchDataEndpoint=this.dataEndpoint,this.infinitePagination.fethRowCountEndpoint=this.rowCountApi,this.loader$=this.http.post(`/API/${this.loaderEndpoint}`).pipe($(e=>{this.searchFilter=e.Filter,this.searchFilter.filterModel=E.ALL,this.infinitePagination.reloadPagination(this.searchFilter),this.initSelectedChannel()}))}onToggleDifferentInventory(){this.toggleDifferentInventory?this.searchFilter.filterModel=E.ALL:this.searchFilter.filterModel=E.DIFFERENCE,this.onSearch()}onCheckboxStateProduct(e){e.Variants=e.Variants.map(n=>(n.selected=e.selected,n))}openModalFilter(){this.mainPanelService.openModalFilter()}updateStock(e){let t=this.productService.selectedVariantProduct(e).map(g=>({ID:g.ID,ChannelID:g.Channel[0].ChannelID,Code:g.Code,Price:g.UnitPrice})),o={ListChannelID:[this.searchFilter.ChannelID],ListPrice:t};this.http.post("/api/Price/UpdateChannel",o).subscribe(g=>{this.onSearch(),this.handlingUpdateStock(g.Response)})}handlingUpdateStock(e){if(e.success_list?.length>0||e.failure_list?.length>0){let n=e.failure_list,t=e.success_list;this.updateResHandling.responseHandling(t,n,"Price")}else this.toastr.error(e[0]?.Exception,"Error")}refreshPrice(e){let n={ChannelItemID:e?.Channel[0].ChannelItemID,ChannelVariationID:e?.Channel[0]?.ChannelVariationID,ChannelID:e?.Channel[0]?.ChannelID,VariantID:e.ID};this.http.post("/api/Price/RefreshPriceChannel",n).subscribe(t=>{this.toastr.success("Successfully updated","Success"),this.onSearch()})}onSearch(){this.infinitePagination.reloadPagination(this.searchFilter),this.initSelectedChannel()}openTableDialog(e,n,t){let o=JSON.parse(JSON.stringify(e));this.dialog.open(Te,{data:{Name:n.Name,Variant:o,ChannelID:o?.Channel[0]?.ChannelID,Table:"price",ChannelItemID:o?.Channel[0]?.ChannelItemID}}).afterClosed().pipe(W(x=>se.IsNotEmpty(x))).subscribe(x=>{this.updateItemAfterDialog(x,e)})}updateItemAfterDialog(e,n){let t={ID:e.ChannelID,ChannelItemID:e.ChannelItemID,ChannelVariantID:e.ChannelVariationID,Price:parseFloat(e.Price),VariantID:e.ID,SKU:e.Sku};this.http.post("/api/Price/UpdatePriceByID",t).subscribe(o=>{let g=this.productService.findChannelById(t.ID,this.channelOptions),x=t.Price?this.decimalPipe.transform(t.Price):t.Price;this.toastr.success(`Successfully updated ${e.ItemName} (${e.VarName}) price in ${g.Name} to ${x}`,"Success"),n.Channel[0]&&(n.Channel[0].Price=t.Price),this.infinitePagination.reloadPagination(this.searchFilter)})}initSelectedChannel(){this.selectedChannel=this.channelOptions.find(e=>e.ID==this.searchFilter.ChannelID)}onSelectAllSKU(e,n){n=n.map(t=>(t.Variants=t.Variants.map(o=>(o.selected=e,o)),t))}onZoomImage(e,n){this.biggerPictureService.openBiggerPicture(e,n)}openExportDialog(){this.dialog.open(Ve,{data:{title:"Export Price Single Channel Comparison",pageNumber:this.searchFilter.PageNumber,rowCount:this.searchFilter.RowCount,filterExport:this.searchFilter,getRowCountApi:this.rowCountApi,exportApi:"price/GetExportSingleChannelComparison"}}).afterClosed().subscribe()}static{this.\u0275fac=function(n){return new(n||i)(f(_e),f(pe),f(fe),f(Ie),f(ye),f(ge),f(Pe),f(Fe),f(D))}}static{this.\u0275cmp=j({type:i,selectors:[["app-price-single-channel"]],features:[K([B,Me,te("https://res.cloudinary.com/"),D,U])],decls:2,vars:3,consts:[["elsePic",""],["class","single-price",3,"headerTitle","text","textChange","onSubmit",4,"ngIf"],[1,"single-price",3,"textChange","onSubmit","headerTitle","text"],[1,"fw-bold","mb-2"],["bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel","appendTo","body",1,"center-text",3,"ngModelChange","clearable","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],[1,"mt-5"],[1,"fw-bold"],["type","number",1,"form-control","mt-2",3,"ngModelChange","ngModel"],[4,"ngIf"],[1,"me-2"],[2,"width","18px",3,"src"],[1,"d-flex"],["class","btn btn-success",3,"click",4,"ngIf"],[1,"btn","btn-outline-secondary","shadow","rounded","ms-2",3,"click"],[1,"fa-solid","fa-print","me-3"],[1,"btn","btn-success",3,"click"],[1,"fas","fa-chevron-circle-up"],[1,"container-fluid","mt-5"],[1,"table-responsive"],[1,"table"],[1,"thead-light","sticky-top-thead"],["colspan","2",1,"text-center","ps-12",2,"width","36%"],["name","differentInventory",3,"ngModelChange","toggleChange","ngModel"],[1,"text-start"],[1,"text-end",2,"width","20%"],[3,"ngxPermissionsOnly"],[1,"text-end"],["role","button","matTooltipPosition","above",1,"d-inline-block",3,"click","matTooltip"],[2,"width","16px",3,"src"],[1,"ms-1"],[3,"onNextPage","onLastPage","onGetRowCount","totalData","hideCount","rowCount","pageNumber","disableNextButton","goToLastPage"],["type","checkbox",1,"me-3",3,"change"],[1,"w-100"],["matTooltipPosition","above",3,"matTooltip","ngClass"],[1,"d-flex","align-items-center","justify-content-end"],["matTooltip","This product is no longer available in POS","matTooltipPosition","above",1,"text-danger"],[1,"ms-3"],[1,"text-end",3,"ngClass"],[2,"cursor","pointer"],["target","_blank",3,"href"],[1,"fas","external-link-custom","fa-solid","fa-arrow-up-right-from-square"],["matTooltip","Refresh Unit Price according to seller center",1,"pl-5","cursor-pointer",2,"color","var(--bs-link-color)",3,"click"],[1,"fas","external-link-custom","fa-sync","fa-lg"],[1,"text-start",2,"width","0%",3,"rowSpan"],[4,"ngIf","ngIfElse"],[1,"text-start",3,"rowSpan"],[1,"item-name","mb-0"],[1,"d-block"],["type","checkbox",1,"me-3",3,"ngModelChange","ngModel"],["loading","lazy",1,"border","rounded","w-img","cursor-pointer",2,"margin-left","8px",3,"click","src"],["src","//res.cloudinary.com/pos/image/upload/w_40/POS/Images/Icon/products_thumb.png","loading","lazy",1,"border","rounded","w-img",2,"margin-left","8px"],[1,"align-middle"],["type","checkbox",3,"ngModel"],["type","checkbox",3,"ngModelChange","ngModel"],[1,"fa-solid","fa-arrow-up-right-from-square","external-link-custom"],[2,"cursor","pointer",3,"click"]],template:function(n,t){n&1&&(h(0,it,19,13,"mainpanel",1),v(1,"async")),n&2&&m("ngIf",F(1,1,t.loader$))},dependencies:[ee,Q,X,Y,D,we,Se,xe,ue,he,Ce,le,ie,re,ne,oe,ae,De,Ee,de,me,be,ve],styles:[".w-img[_ngcontent-%COMP%]{width:40px;height:40px}input[type=checkbox][_ngcontent-%COMP%]{width:15px;height:15px}i.fas.custom-size[_ngcontent-%COMP%]{font-size:13px}.item-name[_ngcontent-%COMP%]{font-size:larger}"],changeDetection:0})}}return i})();export{Wt as PriceSingleChannelComponent};
@@ -1,2 +0,0 @@
1
- import{a as V}from"./chunk-JVNHFIYT.js";import{K as F,L,k as B,m as j}from"./chunk-BJUPMCEP.js";import{Aa as D,F as u,Gb as I,Hb as x,Ib as H,Ka as w,Mb as R,Pa as C,Ra as M,Xa as A,Xb as m,_b as p,dc as T,f as l,h as f,ic as n,ja as y,jc as d,jd as N,ka as _,kc as P,ma as g,od as a,pa as o,qa as b,ra as v,rb as E,tc as k,vc as Y,wc as z,xa as S,xb as O}from"./chunk-OJMQBH6T.js";var K=["mat-sort-header",""],W=["*"];function Z(e,h){e&1&&(n(0,"div",2),D(),n(1,"svg",3),P(2,"path",4),d()())}var U=new g("MAT_SORT_DEFAULT_OPTIONS"),$=(()=>{class e{_defaultOptions;_initializedStream=new f(1);sortables=new Map;_stateChanges=new l;active;start="asc";get direction(){return this._direction}set direction(t){this._direction=t}_direction="";disableClear;disabled=!1;sortChange=new w;initialized=this._initializedStream;constructor(t){this._defaultOptions=t}register(t){this.sortables.set(t.id,t)}deregister(t){this.sortables.delete(t.id)}sort(t){this.active!=t.id?(this.active=t.id,this.direction=t.start?t.start:this.start):this.direction=this.getNextSortDirection(t),this.sortChange.emit({active:this.active,direction:this.direction})}getNextSortDirection(t){if(!t)return"";let i=t?.disableClear??this.disableClear??!!this._defaultOptions?.disableClear,r=G(t.start||this.start,i),s=r.indexOf(this.direction)+1;return s>=r.length&&(s=0),r[s]}ngOnInit(){this._initializedStream.next()}ngOnChanges(){this._stateChanges.next()}ngOnDestroy(){this._stateChanges.complete(),this._initializedStream.complete()}static \u0275fac=function(i){return new(i||e)(O(U,8))};static \u0275dir=H({type:e,selectors:[["","matSort",""]],hostAttrs:[1,"mat-sort"],inputs:{active:[0,"matSortActive","active"],start:[0,"matSortStart","start"],direction:[0,"matSortDirection","direction"],disableClear:[2,"matSortDisableClear","disableClear",a],disabled:[2,"matSortDisabled","disabled",a]},outputs:{sortChange:"matSortChange"},exportAs:["matSort"],features:[S]})}return e})();function G(e,h){let t=["asc","desc"];return e=="desc"&&t.reverse(),h||t.push(""),t}var c=(()=>{class e{changes=new l;static \u0275fac=function(i){return new(i||e)};static \u0275prov=y({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function J(e){return e||new c}var Q={provide:c,deps:[[new b,new v,c]],useFactory:J},_t=(()=>{class e{_intl=o(c);_sort=o($,{optional:!0});_columnDef=o("MAT_SORT_HEADER_COLUMN_DEF",{optional:!0});_changeDetectorRef=o(N);_focusMonitor=o(B);_elementRef=o(C);_ariaDescriber=o(F,{optional:!0});_renderChanges;_animationModule=o(A,{optional:!0});_recentlyCleared=M(null);_sortButton;id;arrowPosition="after";start;disabled=!1;get sortActionDescription(){return this._sortActionDescription}set sortActionDescription(t){this._updateSortActionDescription(t)}_sortActionDescription="Sort";disableClear;constructor(){o(j).load(V);let t=o(U,{optional:!0});this._sort,t?.arrowPosition&&(this.arrowPosition=t?.arrowPosition)}ngOnInit(){!this.id&&this._columnDef&&(this.id=this._columnDef.name),this._sort.register(this),this._renderChanges=u(this._sort._stateChanges,this._sort.sortChange).subscribe(()=>this._changeDetectorRef.markForCheck()),this._sortButton=this._elementRef.nativeElement.querySelector(".mat-sort-header-container"),this._updateSortActionDescription(this._sortActionDescription)}ngAfterViewInit(){this._focusMonitor.monitor(this._elementRef,!0).subscribe(()=>this._recentlyCleared.set(null))}ngOnDestroy(){this._focusMonitor.stopMonitoring(this._elementRef),this._sort.deregister(this),this._renderChanges?.unsubscribe(),this._sortButton&&this._ariaDescriber?.removeDescription(this._sortButton,this._sortActionDescription)}_toggleOnInteraction(){if(!this._isDisabled()){let t=this._isSorted(),i=this._sort.direction;this._sort.sort(this),this._recentlyCleared.set(t&&!this._isSorted()?i:null)}}_handleKeydown(t){(t.keyCode===32||t.keyCode===13)&&(t.preventDefault(),this._toggleOnInteraction())}_isSorted(){return this._sort.active==this.id&&(this._sort.direction==="asc"||this._sort.direction==="desc")}_isDisabled(){return this._sort.disabled||this.disabled}_getAriaSortAttribute(){return this._isSorted()?this._sort.direction=="asc"?"ascending":"descending":"none"}_renderArrow(){return!this._isDisabled()||this._isSorted()}_updateSortActionDescription(t){this._sortButton&&(this._ariaDescriber?.removeDescription(this._sortButton,this._sortActionDescription),this._ariaDescriber?.describe(this._sortButton,t)),this._sortActionDescription=t}static \u0275fac=function(i){return new(i||e)};static \u0275cmp=I({type:e,selectors:[["","mat-sort-header",""]],hostAttrs:[1,"mat-sort-header"],hostVars:3,hostBindings:function(i,r){i&1&&k("click",function(){return r._toggleOnInteraction()})("keydown",function(q){return r._handleKeydown(q)})("mouseleave",function(){return r._recentlyCleared.set(null)}),i&2&&(m("aria-sort",r._getAriaSortAttribute()),p("mat-sort-header-disabled",r._isDisabled()))},inputs:{id:[0,"mat-sort-header","id"],arrowPosition:"arrowPosition",start:"start",disabled:[2,"disabled","disabled",a],sortActionDescription:"sortActionDescription",disableClear:[2,"disableClear","disableClear",a]},exportAs:["matSortHeader"],attrs:K,ngContentSelectors:W,decls:4,vars:17,consts:[[1,"mat-sort-header-container","mat-focus-indicator"],[1,"mat-sort-header-content"],[1,"mat-sort-header-arrow"],["viewBox","0 -960 960 960","focusable","false","aria-hidden","true"],["d","M440-240v-368L296-464l-56-56 240-240 240 240-56 56-144-144v368h-80Z"]],template:function(i,r){i&1&&(Y(),n(0,"div",0)(1,"div",1),z(2),d(),R(3,Z,3,0,"div",2),d()),i&2&&(p("mat-sort-header-sorted",r._isSorted())("mat-sort-header-position-before",r.arrowPosition==="before")("mat-sort-header-descending",r._sort.direction==="desc")("mat-sort-header-ascending",r._sort.direction==="asc")("mat-sort-header-recently-cleared-ascending",r._recentlyCleared()==="asc")("mat-sort-header-recently-cleared-descending",r._recentlyCleared()==="desc")("mat-sort-header-animations-disabled",r._animationModule==="NoopAnimations"),m("tabindex",r._isDisabled()?null:0)("role",r._isDisabled()?null:"button"),E(3),T(r._renderArrow()?3:-1))},styles:[`.mat-sort-header{cursor:pointer}.mat-sort-header-disabled{cursor:default}.mat-sort-header-container{display:flex;align-items:center;letter-spacing:normal;outline:0}[mat-sort-header].cdk-keyboard-focused .mat-sort-header-container,[mat-sort-header].cdk-program-focused .mat-sort-header-container{border-bottom:solid 1px currentColor}.mat-sort-header-container::before{margin:calc(calc(var(--mat-focus-indicator-border-width, 3px) + 2px)*-1)}.mat-sort-header-content{display:flex;align-items:center}.mat-sort-header-position-before{flex-direction:row-reverse}@keyframes _mat-sort-header-recently-cleared-ascending{from{transform:translateY(0);opacity:1}to{transform:translateY(-25%);opacity:0}}@keyframes _mat-sort-header-recently-cleared-descending{from{transform:translateY(0) rotate(180deg);opacity:1}to{transform:translateY(25%) rotate(180deg);opacity:0}}.mat-sort-header-arrow{height:12px;width:12px;position:relative;transition:transform 225ms cubic-bezier(0.4, 0, 0.2, 1),opacity 225ms cubic-bezier(0.4, 0, 0.2, 1);opacity:0;overflow:visible;color:var(--mat-sort-arrow-color, var(--mat-sys-on-surface))}.mat-sort-header.cdk-keyboard-focused .mat-sort-header-arrow,.mat-sort-header.cdk-program-focused .mat-sort-header-arrow,.mat-sort-header:hover .mat-sort-header-arrow{opacity:.54}.mat-sort-header .mat-sort-header-sorted .mat-sort-header-arrow{opacity:1}.mat-sort-header-descending .mat-sort-header-arrow{transform:rotate(180deg)}.mat-sort-header-recently-cleared-ascending .mat-sort-header-arrow{transform:translateY(-25%)}.mat-sort-header-recently-cleared-ascending .mat-sort-header-arrow{transition:none;animation:_mat-sort-header-recently-cleared-ascending 225ms cubic-bezier(0.4, 0, 0.2, 1) forwards}.mat-sort-header-recently-cleared-descending .mat-sort-header-arrow{transition:none;animation:_mat-sort-header-recently-cleared-descending 225ms cubic-bezier(0.4, 0, 0.2, 1) forwards}.mat-sort-header-animations-disabled .mat-sort-header-arrow{transition-duration:0ms;animation-duration:0ms}.mat-sort-header-arrow svg{width:24px;height:24px;fill:currentColor;position:absolute;top:50%;left:50%;margin:-12px 0 0 -12px;transform:translateZ(0)}.mat-sort-header-arrow,[dir=rtl] .mat-sort-header-position-before .mat-sort-header-arrow{margin:0 0 0 6px}.mat-sort-header-position-before .mat-sort-header-arrow,[dir=rtl] .mat-sort-header-arrow{margin:0 6px 0 0}
2
- `],encapsulation:2,changeDetection:0})}return e})(),gt=(()=>{class e{static \u0275fac=function(i){return new(i||e)};static \u0275mod=x({type:e});static \u0275inj=_({providers:[Q],imports:[L]})}return e})();export{$ as a,_t as b,gt as c};
@@ -1 +0,0 @@
1
- import{a as Y}from"./chunk-FESS3PG3.js";import"./chunk-6VHVQEVM.js";import"./chunk-Z3ITXK3D.js";import"./chunk-ACIMXBIC.js";import"./chunk-J53BPEDH.js";import"./chunk-TGMCGROM.js";import{a as H}from"./chunk-RDRNWLJI.js";import{b as j,e as F}from"./chunk-W5L6FMO3.js";import"./chunk-K5XRGNWG.js";import{e as J}from"./chunk-PYXL7UF7.js";import"./chunk-PW42BQIY.js";import{m as G,n as U}from"./chunk-FO7G4GMY.js";import{A as R,c as B,h as D,m as I}from"./chunk-5PS6ZS3N.js";import"./chunk-V3USB3ZU.js";import"./chunk-ERXVXBTU.js";import"./chunk-NNRBGHXB.js";import"./chunk-BJUPMCEP.js";import{j as P,l as W,n as k}from"./chunk-FXQKRJWU.js";import{$c as S,Gb as x,Gc as i,Hc as E,Kc as C,Lc as b,Mb as M,Mc as _,Nc as T,Oc as V,Pc as v,Ra as h,Yb as f,Z as y,ad as w,dc as O,ic as e,jc as t,kc as A,oc as L,pa as u,rb as d,tc as g,uc as N,ya as s,za as m}from"./chunk-OJMQBH6T.js";import"./chunk-EU2KAMEK.js";import"./chunk-66YHNWRR.js";function z(n,q){if(n&1&&(e(0,"pre",21),i(1),S(2,"json"),t()),n&2){N();let l=v(25);d(),E(w(2,1,l))}}function K(n,q){n&1&&(e(0,"p",22),i(1," Your data will be shown here once it's available "),t())}var ce=(()=>{class n{constructor(){this.httpService=u(F),this.toastr=u(j),this.selectedChannel=h(null),this.orderNumber=h(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(H.GetOrderApiLog,{ChannelID:this.selectedChannel(),OrderNumber:this.orderNumber()}).pipe(y(1))}copyToClipboard(l){if(!l)return;let p=typeof l=="string"?l:JSON.stringify(l,null,2);navigator.clipboard.writeText(p),this.toastr.success("Copied to clipboard!","Success")}static{this.\u0275fac=function(p){return new(p||n)}}static{this.\u0275cmp=x({type:n,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",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(p,r){if(p&1){let a=L();e(0,"mainpanel",0)(1,"actions")(2,"button",1),g("click",function(){return s(a),m(r.fetchLog())}),A(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,"channel-select-options",10),_("ngModelChange",function(o){return s(a),b(r.selectedChannel,o)||(r.selectedChannel=o),m(o)}),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(o){return s(a),b(r.orderNumber,o)||(r.orderNumber=o),m(o)}),t()()()()(),T(25),S(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),g("click",function(){s(a);let o=v(25);return m(r.copyToClipboard(o))}),i(34," Copy "),t()(),e(35,"div",18)(36,"div",19)(37,"div",20),M(38,z,3,3,"pre",21)(39,K,2,0,"p",22),t()()()()()()()()()}if(p&2){f("hideSearchBox",!0)("hideSearchDropdown",!0),d(16),C("ngModel",r.selectedChannel),d(8),C("ngModel",r.orderNumber),d();let a=V(w(26,6,r.orderLog$));d(8),f("disabled",!a),d(5),O(a?38:39)}},dependencies:[k,P,W,U,G,J,R,B,D,I,Y],encapsulation:2})}}return n})();export{ce as OrderApiComponent};
@@ -1 +0,0 @@
1
- import{a as Ve,b as Ae,c as De}from"./chunk-UHJEXTOG.js";import{a as Ie}from"./chunk-H46SHHXR.js";import{a as U}from"./chunk-LHX4ZOLA.js";import{a as Ne}from"./chunk-PFXOFSJG.js";import{a as Pe}from"./chunk-OLANEXLB.js";import"./chunk-BQIB3N6V.js";import"./chunk-B67DSLBY.js";import"./chunk-6RLISMEX.js";import"./chunk-TH6VZX34.js";import"./chunk-QS22J2SC.js";import"./chunk-QP4C4R4W.js";import"./chunk-5LQRO4AI.js";import"./chunk-MO53T3IK.js";import"./chunk-W3JTS22H.js";import"./chunk-SDUUFQUI.js";import"./chunk-6L7TD5DW.js";import"./chunk-WLRPCY65.js";import"./chunk-3RK6DDJD.js";import"./chunk-3UN6FPMN.js";import"./chunk-LDPDLCRL.js";import"./chunk-JVNHFIYT.js";import{a as Ee}from"./chunk-FESS3PG3.js";import"./chunk-3YP6ORBR.js";import{a as Me}from"./chunk-UXPULNCR.js";import"./chunk-6VHVQEVM.js";import"./chunk-Z3ITXK3D.js";import{a as Ce}from"./chunk-ACIMXBIC.js";import"./chunk-J53BPEDH.js";import"./chunk-TGMCGROM.js";import{a as A}from"./chunk-RDRNWLJI.js";import{b as L,e as fe}from"./chunk-W5L6FMO3.js";import"./chunk-K5XRGNWG.js";import"./chunk-PYXL7UF7.js";import{b as m,c as _e}from"./chunk-PW42BQIY.js";import{b as be,d as Se,f as we,g as ve,h as ye,m as Te,n as Le}from"./chunk-FO7G4GMY.js";import{A as B,b as ue,c as he,h as R,m as z,o as ge}from"./chunk-5PS6ZS3N.js";import"./chunk-V3USB3ZU.js";import"./chunk-ERXVXBTU.js";import{r as xe,s as ke}from"./chunk-NNRBGHXB.js";import"./chunk-BJUPMCEP.js";import{j as me,k as ce,m as de,n as W}from"./chunk-FXQKRJWU.js";import{$c as V,B as Q,G as X,Gb as N,Gc as p,Hc as E,Ic as I,J as P,Kc as C,Lc as b,Mb as v,Mc as S,Nc as re,Oc as ae,Pc as F,Qc as le,Ra as H,Sc as pe,Yb as x,Z as Y,aa as Z,ac as te,ad as O,bd as se,dc as y,ec as ie,gc as ne,hc as oe,ic as o,ja as D,jc as a,kc as g,oa as j,oc as k,pa as w,pb as $,q as M,rb as l,tc as f,uc as c,v as T,xb as ee,ya as d,za as u}from"./chunk-OJMQBH6T.js";import"./chunk-EU2KAMEK.js";import{a as q,b as G}from"./chunk-66YHNWRR.js";var Fe=(()=>{class n{constructor(e,i){this.http=e,this.toastr=i}downloadMultipleShippingLabel(e){let i=e.map(t=>{switch(t.channelType){case m.Tokopedia:return this.printTokopediaShippingLabel(t.number).pipe(T(r=>({result:r,channelType:m.Tokopedia})),P(r=>M(null)));case m.Tiktok:return this.printTiktokShippingLabel(t.number,t.shopID).pipe(T(r=>({result:r,channelType:m.Tiktok})),P(r=>M(null)));case m.Shopee:return this.printShopeeShippingLabel(t.number,t.shopID).pipe(T(r=>({result:r,channelType:m.Shopee})),P(r=>M(null)));case m.Lazada:return this.printLazadaShippingLabel(t.number,t.shopID).pipe(T(r=>({result:r,channelType:m.Lazada})),P(r=>M(null)))}});Q(i).subscribe(t=>{t.filter(r=>r!=null).forEach(r=>{this.handleShippingLabelResponse(r.result,r.channelType)})})}printTokopediaShippingLabel(e,i=!1){let t={OrderNumber:e,Printed:i};return this.http.post(A.TokopediaPrintShippingLabel,t)}printTiktokShippingLabel(e,i){let t={ShopID:i,OrderNumber:e};return this.http.post(A.TiktokPrintShippingLabel,t)}printShopeeShippingLabel(e,i){let t={ShopID:i,OrderNumber:e};return this.http.post(A.ShopeePrintShippingLabel,t).pipe(T(r=>(r&&(r.Number=e),r)))}printLazadaShippingLabel(e,i){let t={ShopID:i,OrderNumber:e};return this.http.post(A.LazadaPrintShippingLabel,t)}handleShippingLabelResponse(e,i){switch(i){case m.Tokopedia:let h=window.open("about:blank","_blank");h.document.write(e.File),h.document.close();break;case m.Tiktok:e.data!=null?window.open(e.data.doc_url,"_blank"):this.toastr.error("Cannot Print the Shipping Label,The invoice Number is not set to Pickup","Cannot Print");break;case m.Shopee:var t=Uint8Array.from(atob(e.File),s=>s.charCodeAt(0)),r=new Blob([t],{type:"octet/stream"});_e.openDownloadFile(r,`${e?.Number}.pdf`);break;case m.Lazada:e?.result?.data!=null?window.open(e?.result?.data?.pdf_url,"_blank"):this.toastr.error(e.message,"Cannot Print");break}}static{this.\u0275fac=function(i){return new(i||n)(j(fe),j(L))}}static{this.\u0275prov=D({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})();var Oe=(()=>{class n{constructor(e){this.dialogRef=e,this.tandaiSudahDicetak=!1}onCancel(){this.dialogRef.close()}onPrint(){this.dialogRef.close(this.tandaiSudahDicetak?1:0)}static{this.\u0275fac=function(i){return new(i||n)(ee(be))}}static{this.\u0275cmp=N({type:n,selectors:[["app-print-tokopedia"]],decls:17,vars:1,consts:[[1,"container-fluid"],[1,"text-center","mb-4","fw-bold","mt-6"],[1,"row"],[1,"col-12"],[1,"fs-5"],[1,"d-flex","align-items-center","text-center","justify-content-center","mb-8"],[1,"me-2",3,"ngModelChange","ngModel"],[1,"fs-5","pt-1"],[1,"d-flex","align-items-center","justify-content-center"],[1,"btn","btn-light-blue","text-primary","btn-lg","fw-bold","mx-3",3,"click"],[1,"btn","btn-light-blue","me-6","text-primary","btn-lg","fw-bold","mx-3",3,"click"]],template:function(i,t){i&1&&(o(0,"div",0)(1,"h2",1),p(2,"Cetak label pesanan"),a(),o(3,"mat-dialog-content")(4,"div",2)(5,"div",3)(6,"p",4),p(7,"Kamu akan mencetak label yang berisi detail pesanan"),a(),o(8,"div",5)(9,"mat-checkbox",6),S("ngModelChange",function(h){return b(t.tandaiSudahDicetak,h)||(t.tandaiSudahDicetak=h),h}),a(),o(10,"span",7),p(11,'Pesanan telah ditandai sebagai "Sudah Dicetak"'),a()()()()(),o(12,"mat-dialog-actions",8)(13,"button",9),f("click",function(){return t.onCancel()}),p(14,"Cancel"),a(),o(15,"button",10),f("click",function(){return t.onPrint()}),p(16,"Cetak Pesanan"),a()()()),i&2&&(l(9),C("ngModel",t.tandaiSudahDicetak))},dependencies:[W,B,R,z,ye,ve,we],encapsulation:2})}}return n})();var K=(()=>{class n{constructor(){this.shippingLabelService=w(Fe),this.toastrService=w(L),this.dialog=w(Se)}printShippingLabel(e){switch(e?.MarketType){case m.Shopee:this.shippingLabelService.printShopeeShippingLabel(e.Number,e.ShopID).subscribe(i=>this.shippingLabelService.handleShippingLabelResponse(i,m.Shopee));break;case m.Tiktok:this.shippingLabelService.printTiktokShippingLabel(e.Number,e.ShopID).subscribe(i=>this.shippingLabelService.handleShippingLabelResponse(i,m.Tiktok));break;case m.Tokopedia:this.dialog.open(Oe).afterClosed().pipe(X(i=>Ce.IsNotEmpty(i)),Z(i=>this.shippingLabelService.printTokopediaShippingLabel(e.Number,i))).subscribe(i=>this.shippingLabelService.handleShippingLabelResponse(i,m.Tokopedia));break;case m.Lazada:this.shippingLabelService.printLazadaShippingLabel(e.Number,e.ShopID).subscribe(i=>this.shippingLabelService.handleShippingLabelResponse(i,m.Lazada));break;case m.Shopify:this.toastrService.error("Shopify not supported","Error Not supported");break}}printMultipleShippingLabel(e){let i=e.map(t=>({number:t.Number,shopID:t.ShopID,channelType:t.MarketType}));this.shippingLabelService.downloadMultipleShippingLabel(i)}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275prov=D({token:n,factory:n.\u0275fac})}}return n})();var Re=n=>({"td-cell-hover":n});function ze(n,_){if(n&1){let e=k();o(0,"button",18),f("click",function(){d(e);let t=c(),r=F(0);return u(t.onDowloadShippingLabel(r))}),g(1,"i",19),o(2,"span"),p(3,"Download Shipping Label"),a()()}}function Be(n,_){if(n&1){let e=k();o(0,"input",41),S("ngModelChange",function(t){d(e);let r=c().$implicit;return b(r.selected,t)||(r.selected=t),u(t)}),f("ngModelChange",function(){d(e);let t=c(3),r=F(0);return u(t.onSelectOrders(r))}),a()}if(n&2){let e=c().$implicit;C("ngModel",e.selected)}}function je(n,_){if(n&1&&g(0,"variants-dropdown",35),n&2){let e=c().$implicit;x("variants",e==null?null:e.Variants)}}function He(n,_){if(n&1&&g(0,"variant-with-image",36),n&2){let e=c().$implicit;x("variant",e==null?null:e.Variants[0])}}function Ue(n,_){if(n&1&&(o(0,"span"),p(1),a()),n&2){let e=c().$implicit;l(),I("(",e.LogisticService==null?null:e.LogisticService.Option,")")}}function Je(n,_){if(n&1){let e=k();o(0,"div")(1,"button",42),f("click",function(){d(e);let t=c().$implicit,r=c(2);return u(r.refreshShippingAndRefNumber(t))}),g(2,"i",43),a()()}}function Ke(n,_){if(n&1){let e=k();o(0,"button",44),f("click",function(){d(e);let t=c().$implicit,r=c(2);return u(r.onPrintShippingLabel(t))}),g(1,"i",45),a()}}function qe(n,_){if(n&1&&(o(0,"tr")(1,"td"),v(2,Be,1,1,"input",30),a(),o(3,"td"),p(4),a(),o(5,"td")(6,"div",31)(7,"div",32)(8,"div"),g(9,"img",33),V(10,"channelImage"),a(),o(11,"div"),g(12,"order-link",34),a()(),o(13,"small"),p(14),V(15,"date"),a()()(),o(16,"td"),p(17),a(),o(18,"td"),v(19,je,1,1,"variants-dropdown",35)(20,He,1,1,"variant-with-image",36),a(),o(21,"td",37),p(22),V(23,"number"),a(),o(24,"td")(25,"div",38)(26,"div",31)(27,"div",32)(28,"span"),p(29),a(),v(30,Ue,2,1,"span"),a(),o(31,"small"),p(32),a()(),v(33,Je,3,0,"div"),a()(),o(34,"td",39),v(35,Ke,2,0,"button",40),a()()),n&2){let e=_.$implicit,i=c(2);l(2),y((e==null?null:e.MarketType)!=i.channelType.WooCommerce?2:-1),l(2),E(e.Outlet),l(5),x("src",O(10,16,e==null?null:e.MarketType),$)("alt",e==null||e.Variants[0]==null?null:e.Variants[0].Name),l(3),x("order",e),l(2),I(" ",se(15,18,e==null?null:e.Created,"dd/MM/yyyy HH:mm:ss")," "),l(3),E(e.Customer),l(),te(pe(23,Re,(e.Variants==null?null:e.Variants.length)>1)),l(),y((e.Variants==null?null:e.Variants.length)>1?19:20),l(3),E(O(23,21,e.Amount)),l(7),E(e.LogisticService!=null&&e.LogisticService.Name?e.LogisticService==null?null:e.LogisticService.Name:"-"),l(),y(e.LogisticService!=null&&e.LogisticService.Option&&(e.LogisticService==null?null:e.LogisticService.Option)!="Default"?30:-1),l(2),I(" ",e.ReferenceNumber?e.ReferenceNumber:"-"," "),l(),y(!(e.LogisticService!=null&&e.LogisticService.Name)||!e.ReferenceNumber?33:-1),l(2),y((e==null?null:e.MarketType)!=i.channelType.WooCommerce?35:-1)}}function Ge(n,_){if(n&1){let e=k();o(0,"div",16)(1,"table",20)(2,"thead",21)(3,"tr",22),g(4,"th",23),o(5,"th",24),p(6,"Outlet"),a(),o(7,"th",25),p(8,"Number"),a(),o(9,"th",25),p(10,"Customer"),a(),o(11,"th"),p(12,"Items"),a(),o(13,"th",26),p(14,"Amount"),a(),o(15,"th",27),p(16,"Shipping"),a(),g(17,"th",28),a()(),o(18,"tbody"),ne(19,qe,36,25,"tr",null,ie),a()(),o(21,"app-custom-paginator",29),f("next",function(){d(e);let t=c();return u(t.initAwaitingCollection())})("previous",function(){d(e);let t=c();return u(t.initAwaitingCollection())}),a()()}if(n&2){let e=c(),i=F(0);l(19),oe(i),l(2),x("filter",e.filter())("totaldata",i==null?null:i.length)}}function Qe(n,_){n&1&&(o(0,"div",17),g(1,"app-empty-state"),a())}var Bt=(()=>{class n{constructor(){this.printShippingService=w(K),this.orderService=w(U),this.toastr=w(L),this.channelType=m,this.selectedOrders=H([]),this.filter=H({PageNumber:1,PageSize:20,ListChannelID:[],From:null,To:null,Number:null})}ngOnInit(){let e=this.orderService.getOrderDefaultValue();this.filter.update(i=>G(q({},i),{From:e})),this.initAwaitingCollection()}initAwaitingCollection(){this.awaitingCollections$=this.orderService.getAwaitingCollectionOrders(this.filter()).pipe(Y(1))}onPrintShippingLabel(e){this.printShippingService.printShippingLabel(e)}onSelectOrders(e){let i=e.filter(t=>t.selected);this.selectedOrders.set(i)}onDowloadShippingLabel(e){e=e.map(i=>(i.selected=!1,i)),this.printShippingService.printMultipleShippingLabel(this.selectedOrders()),this.selectedOrders.set([])}refreshShippingAndRefNumber(e){this.orderService.refreshShippingCourier(e.ShopID,e.Number).subscribe(()=>{this.toastr.success("Shipping courier and reference number refreshed","Success"),this.initAwaitingCollection()})}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275cmp=N({type:n,selectors:[["app-awaiting-collection"]],features:[le([U,K])],decls:35,vars:12,consts:[["headerTitle","Awaiting Collection","searchBoxPlaceHolder","Order Number...",3,"onSubmit","textChange","text"],[1,"btn","btn-outline-secondary","shadow","rounded"],["href","https://ods.dealpos.app","target","_blank","matTooltip","Monitor your Order & Fulfillment in real-time from TV!",1,"btn","btn-outline-secondary","shadow","rounded","ms-3"],[1,"fa-regular","fa-tv","me-3"],[1,"fw-bold","mb-2"],[3,"ngModelChange","multiple","ngModel"],[1,"mt-5"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"fw-bold"],["type","number","name","PageNumber",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["type","number","name","PageSize",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"btn","btn-outline-secondary","shadow","rounded",3,"click"],["aria-hidden","true",1,"fa-solid","fa-arrow-down-to-line","me-3"],[1,"table"],[1,"sticky-top-thead"],[1,"table-light"],[2,"width","5px"],[2,"width","100px"],[2,"width","250px"],[1,"text-end",2,"width","150px"],[2,"width","150px"],[2,"width","10px"],["rowCountApi","/api/orders/awaitingcollectioncount",3,"next","previous","filter","totaldata"],["type","checkbox",3,"ngModel"],[1,"lh-sm"],[1,"d-flex","align-items-end","gap-2"],[2,"width","14px","padding-bottom","2.5px",3,"src","alt"],[2,"font-size","14px",3,"order"],[3,"variants"],[3,"variant"],[1,"text-end"],[1,"d-flex","align-items-center","gap-6"],[1,"text-end","td-cell-hover"],["type","button","aria-label","Print order","title","Print","matTooltip","Download shipping label",1,"btn","p-0","border-0","bg-transparent"],["type","checkbox",3,"ngModelChange","ngModel"],["matTooltip","Retrieve shipping courier and reference number",1,"btn","btn-icon-only",3,"click"],[1,"fa-solid","fa-arrows-rotate","fs-6"],["type","button","aria-label","Print order","title","Print","matTooltip","Download shipping label",1,"btn","p-0","border-0","bg-transparent",3,"click"],["aria-hidden","true",1,"fa-solid","fa-arrow-down-to-line"]],template:function(i,t){if(i&1){let r=k();re(0),V(1,"async"),o(2,"mainpanel",0),f("onSubmit",function(){return d(r),u(t.initAwaitingCollection())}),S("textChange",function(s){return d(r),b(t.filter().Number,s)||(t.filter().Number=s),u(s)}),o(3,"actions"),v(4,ze,4,0,"button",1),o(5,"a",2),g(6,"i",3),o(7,"span"),p(8,"Order Fulfillment Display"),a()()(),o(9,"filters")(10,"div")(11,"label",4),p(12,"From/To"),a(),o(13,"channel-select-options",5),S("ngModelChange",function(s){return d(r),b(t.filter().ListChannelID,s)||(t.filter().ListChannelID=s),u(s)}),a()(),o(14,"div",6)(15,"label",4),p(16,"From/To"),a(),o(17,"div",7)(18,"datepicker",8),S("dateChange",function(s){return d(r),b(t.filter().From,s)||(t.filter().From=s),u(s)}),a()(),o(19,"div")(20,"datepicker",9),S("dateChange",function(s){return d(r),b(t.filter().To,s)||(t.filter().To=s),u(s)}),a()()(),o(21,"div",6)(22,"label",10),p(23,"Page Number"),a(),o(24,"input",11),S("ngModelChange",function(s){return d(r),b(t.filter().PageNumber,s)||(t.filter().PageNumber=s),u(s)}),a()(),o(25,"div",6)(26,"label",10),p(27,"Page Size"),a(),o(28,"input",12),S("ngModelChange",function(s){return d(r),b(t.filter().PageSize,s)||(t.filter().PageSize=s),u(s)}),a()()(),o(29,"content")(30,"div",13)(31,"div",14)(32,"div",15),v(33,Ge,22,2,"div",16)(34,Qe,2,0,"div",17),a()()()()()}if(i&2){let r=ae(O(1,9,t.awaitingCollections$));l(2),C("text",t.filter().Number),l(2),y(t.selectedOrders().length>0?4:-1),l(9),x("multiple",!0),C("ngModel",t.filter().ListChannelID),l(5),C("date",t.filter().From),l(2),C("date",t.filter().To),l(4),C("ngModel",t.filter().PageNumber),l(4),C("ngModel",t.filter().PageSize),l(5),y((r==null?null:r.length)>0?33:34)}},dependencies:[W,me,de,ce,Le,Te,Pe,Me,B,he,ge,ue,R,z,Ve,Ae,De,Ne,Ee,ke,xe,Ie],encapsulation:2})}}return n})();export{Bt as AwaitingCollectionComponent};
@@ -1 +0,0 @@
1
- import{a as oe}from"./chunk-OLANEXLB.js";import{a as le,b as re}from"./chunk-HFCAD7GH.js";import"./chunk-4KHHGHFJ.js";import"./chunk-HVCIQI7B.js";import"./chunk-6RLISMEX.js";import"./chunk-TH6VZX34.js";import"./chunk-QS22J2SC.js";import"./chunk-QP4C4R4W.js";import"./chunk-SDUUFQUI.js";import"./chunk-6L7TD5DW.js";import"./chunk-WLRPCY65.js";import"./chunk-3UN6FPMN.js";import"./chunk-LDPDLCRL.js";import"./chunk-JVNHFIYT.js";import{b as ae}from"./chunk-RTT3JVJM.js";import{h as X}from"./chunk-6VHVQEVM.js";import"./chunk-Z3ITXK3D.js";import"./chunk-ACIMXBIC.js";import"./chunk-J53BPEDH.js";import"./chunk-TGMCGROM.js";import"./chunk-RDRNWLJI.js";import{e as Q}from"./chunk-W5L6FMO3.js";import"./chunk-K5XRGNWG.js";import{a as Y,b as Z,d as ee,e as te}from"./chunk-PYXL7UF7.js";import{c as K}from"./chunk-PW42BQIY.js";import{m as ne,n as ie}from"./chunk-FO7G4GMY.js";import{A as G,h as H,m as U}from"./chunk-5PS6ZS3N.js";import"./chunk-V3USB3ZU.js";import"./chunk-ERXVXBTU.js";import"./chunk-NNRBGHXB.js";import"./chunk-BJUPMCEP.js";import{j as V,k as J,l as W,n as k}from"./chunk-FXQKRJWU.js";import{$c as m,Gb as P,Gc as p,Hc as C,Ic as y,Kc as j,Lc as O,Mb as u,Mc as q,Qc as z,Yb as d,Z as M,aa as D,ad as c,bd as A,dc as R,ec as B,g as L,gc as T,hc as $,ic as i,ja as w,jc as a,kc as f,oc as F,pa as g,pb as S,rb as l,tc as v,uc as x,v as I,ya as E,za as N}from"./chunk-OJMQBH6T.js";import"./chunk-EU2KAMEK.js";import{a as _}from"./chunk-66YHNWRR.js";var b=(()=>{class n{constructor(){this.httpService=g(Q),this._pageination=new L({PageNumber:1,RowCount:100,ChannelID:null}),this.filter$=this._pageination.asObservable(),this.log$=this.filter$.pipe(D(e=>this.getLogs$(e).pipe()))}getLogs$(e){return this.httpService.post("/api/Channel/GetChannelLogPaged",e)}onPaginationChange(e){let t=this._pageination.value;t.PageNumber=e.pageIndex+1,this._pageination.next(t)}onFilter(e){let t=this._pageination.value;t.PageNumber=1,t=_(_({},t),e),this._pageination.next(t)}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275prov=w({token:n,factory:n.\u0275fac})}}return n})();function me(n,h){if(n&1&&(i(0,"span",10),f(1,"img",11),a(),p(2)),n&2){let e=h.item;l(),d("src",e.Img,S)("alt",e.Name),l(),y(" ",e.Name," ")}}function se(n,h){if(n&1&&(i(0,"tr")(1,"td"),f(2,"img",17),i(3,"span"),p(4),a()(),i(5,"td")(6,"span",18),p(7),m(8,"json"),a()(),i(9,"td"),p(10),m(11,"json"),a(),i(12,"td"),p(13),m(14,"date"),a()()),n&2){let e=h.$implicit;l(2),d("src",e.Img,S),l(2),y(" ",e.ChannelName," "),l(3),C(c(8,5,e.Request)),l(3),C(c(11,7,e.Response)),l(3),C(A(14,9,e.Created,"dd-MM-yyyy hh:mm:ss"))}}function ce(n,h){if(n&1){let e=F();i(0,"div",8)(1,"table",12)(2,"thead")(3,"tr",13)(4,"th",14),p(5,"Channel"),a(),i(6,"th"),p(7,"Request"),a(),i(8,"th"),p(9,"Response"),a(),i(10,"th",15),p(11,"Created"),a()()(),i(12,"tbody"),T(13,se,15,12,"tr",null,B),m(15,"async"),a()(),i(16,"mat-paginator",16),m(17,"async"),m(18,"async"),m(19,"async"),m(20,"async"),v("page",function(r){E(e);let o=x();return N(o.channelLogService.onPaginationChange(r))}),a()()}if(n&2){let e,t,r,o,s=x();l(13),$((e=c(15,3,s.channelLogs$))==null?null:e.Data),l(3),d("length",(t=c(17,5,s.channelLogs$))==null?null:t.Count)("pageSize",(r=c(18,7,s.filter$))==null?null:r.RowCount)("pageIndex",(o=c(19,9,s.filter$))!=null&&o.PageNumber?0:((o=c(20,11,s.filter$))==null?null:o.PageNumber)-1)}}function de(n,h){n&1&&(i(0,"div",9),f(1,"app-empty-state"),a())}var Oe=(()=>{class n{constructor(){this.channelLogService=g(b),this.authService=g(X),this.channelOptions=this.authService.getChannels(),this.channelLogs$=this.channelLogService.log$.pipe(I(e=>(e.Data?e.Data=e.Data.map(t=>(t.Response=t.Response?JSON.parse(t.Response):"",t.Request=t.Request?JSON.parse(t.Request):"",t.Img=K.getChannelLogoByTypeId(t.TypeID),t)):e.Data=[],e)),M(1)),this.filter$=this.channelLogService.filter$}onSubmitFilter(){this.channelLogService.onFilter({ChannelID:this.channelID})}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=P({type:n,selectors:[["app-channel-log"]],features:[z([b])],decls:15,vars:7,consts:[["headerTitle","Authorization Log",3,"onSubmit","hideSearchBox"],["container",""],[1,"fw-bold","mb-2"],["appendTo","body","bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"ngModelChange","clearable","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"me-2"],[2,"width","18px",3,"src","alt"],[1,"table","table-hover"],[1,"table-light"],[2,"width","250px"],[2,"width","150px"],[3,"page","length","pageSize","pageIndex"],[1,"me-2",2,"width","25px",3,"src"],[1,""]],template:function(t,r){if(t&1&&(i(0,"mainpanel",0),v("onSubmit",function(){return r.onSubmitFilter()}),i(1,"filters")(2,"div",1)(3,"div")(4,"label",2),p(5,"Channel"),a(),i(6,"ng-select",3),q("ngModelChange",function(s){return O(r.channelID,s)||(r.channelID=s),s}),u(7,me,3,3,"ng-template",4),a()()()(),i(8,"content")(9,"div",5)(10,"div",6)(11,"div",7),u(12,ce,21,13,"div",8),m(13,"async"),u(14,de,2,0,"div",9),a()()()()()),t&2){let o;d("hideSearchBox",!0),l(6),d("clearable",!0)("items",r.channelOptions),j("ngModel",r.channelID),l(6),R(((o=c(13,5,r.channelLogs$))==null||o.Data==null?null:o.Data.length)>0?12:14)}},dependencies:[k,V,W,J,ie,ne,oe,re,le,ae,te,ee,Y,Z,G,H,U],encapsulation:2})}}return n})();export{Oe as ChannelLogComponent};
@@ -1 +0,0 @@
1
- var e=(()=>{class t{static{this.SubmitConfig="/api/Channel/SubmitConfig"}static{this.PosAccountTest="/api/POSAccount/Test"}static{this.PosAccountRemove="/api/POSAccount/Remove"}static{this.PosAccountGetConfig="/api/ChannelLoader/GetConfig"}static{this.ChannelGetLastSyncByID="/api/Channel/GetLastSyncByID"}static{this.GetChannel="/api/Channel/GetChannel"}static{this.GetChannelLoader="/api/ChannelLoader/GetChannelLoader"}static{this.TestShopID="/api/Channel/TestShopID"}static{this.UpdateChannelIndex="/api/Channel/UpdateChannelIndex"}static{this.DeleteChannel="/api/Channel/DeleteChannel"}static{this.GetRegisterByOutletName="/api/Channel/GetRegistersByOutletOrder"}static{this.GetChannelRowCount="/api/Channel/GetCountChannel"}static{this.GetChannelWarehouse="/api/Channel/GetChannelWarehouseLocation"}static{this.UnSynchronizedWarehouse="/api/Channel/UnSynchronizedWarehouse"}static{this.GetChannelDetail="/api/ChannelLoader/GetChannelView"}static{this.GetOrderPreview="/api/Orders/Preview"}static{this.GetOrderPreviewV2="/api/Orders/PreviewV2"}static{this.GetDownloadOrder="/api/Orders/Download"}static{this.GetDownloadOrderV2="/api/Orders/DownloadV2"}static{this.ShopeeV2_URL="/api/ChannelAuthorization/ShopeeV2_URL"}static{this.Tiktok_URL="/api/ChannelAuthorization/Tiktok_URL"}static{this.Lazada_URL="/api/ChannelAuthorization/Lazada_URL"}static{this.AddTokopedia="/api/ChannelAdd/Tokopedia"}static{this.AddShopify="/api/ChannelAdd/AddShopify"}static{this.AddWoocommerce="/api/ChannelAdd/AddWooCommerce"}static{this.AddPlugo="/api/ChannelAdd/Plugo"}static{this.UploadPlugoProduct="/api/product/plugo/AddProduct"}static{this.RefreshToken="/api/RefreshToken"}static{this.RefreshInventory="/api/Inventory/RefreshInventory"}static{this.GetToShip="/api/orders/toship"}static{this.GetShipped="/api/orders/shipped"}static{this.GetCompleted="/api/orders/completed"}static{this.GetAll="/api/orders/all"}static{this.GetCancelled="/api/orders/GetCancelled"}static{this.GetAwaitingCollection="/api/orders/AwaitingCollection"}static{this.GetShopeeShippingOptions="/api/v1/shipping/shopee/OptionShip"}static{this.ShopeeSelectShipping="/api/v1/shipping/shopee/SelectShip"}static{this.GetTiktokShippingOptions="/api/v1/shipping/tiktok/OptionShip"}static{this.TiktokSelectShipping="/api/v1/shipping/tiktok/SelectShip"}static{this.GetOrderApiLog="/api/Orders/GetOrderDetailByChannel"}static{this.GetUserLoader="/api/userloader/List"}static{this.GetUsers="/api/user/list"}static{this.GetLoaderForm="/api/userloader/Form"}static{this.UpdateUser="/api/user/Submit"}static{this.DeleteUsers="/api/user/Delete"}static{this.MyProfile="/api/user/myprofile"}static{this.MigrateUsers="/api/user/migrate"}static{this.MigrateLoader="/api/userloader/Migrate"}static{this.GetGroups="/api/UserGroup/list"}static{this.GetGroupsLoader="/api/UserGroupLoader/list"}static{this.GetGroupFormLoader="/api/UserGrouploader/Form"}static{this.SubmitGroup="/api/userGroup/AssignRole"}static{this.DeleteGroups="/api/userGroup/Delete"}static{this.GetEscrowDetail="/api/Orders/GetEscrowDetail"}static{this.DetachVariant="/api/product/DetachVariant"}static{this.GetProductApiLog="/api/Product/GetProductDetailBySKU"}static{this.ScanSyncProductV2="/api/v2/ProductScan/SyncProduct"}static{this.ScanAsyncProductV2="/api/v2/ProductScan/AsyncProduct"}static{this.GetLastInfoDownloadInventory="/api/Inventory/GetOrderDownloadLatestOn"}static{this.UpdateInventoryChannel="/api/Inventory/UpdateChannel"}static{this.GetJobScanList="/api/notification/GetJobScanV2"}static{this.GetJobScanDetail="/api/notification/GetJobScanV2ByID"}static{this.UpdateChannelInventory="/api/Inventory/UpdateChannel"}static{this.GetMultiListingSKU="/api/product/GetMultiListingSKU"}static{this.UpdateUpdateQuantityByItem="/api/Inventory/UpdateQuantityByItem"}static{this.UpdatePriceById="/api/Price/UpdatePriceByID"}static{this.UpdateChannelPrice="/api/Price/UpdateChannel"}static{this.TokopediaPrintShippingLabel="api/v1/Shippinglabel/Tokopedia"}static{this.TiktokPrintShippingLabel="api/v1/Shippinglabel/Tiktok"}static{this.LazadaPrintShippingLabel="api/v1/Shippinglabel/Lazada/DownloadShipping"}static{this.ShopeePrintShippingLabel="api/v1/Shippinglabel/shopee/DownloadShipping"}static{this.RefreshShippingCourierAndRefNumber="/api/orders/RefreshShippingProvider"}}return t})();export{e as a};
@@ -1 +0,0 @@
1
- import{a as de,b as pe,c as se}from"./chunk-UHJEXTOG.js";import{a as ue}from"./chunk-H46SHHXR.js";import{a as A}from"./chunk-LHX4ZOLA.js";import{a as ce}from"./chunk-PFXOFSJG.js";import{a as ae}from"./chunk-OLANEXLB.js";import"./chunk-BQIB3N6V.js";import"./chunk-B67DSLBY.js";import"./chunk-6RLISMEX.js";import"./chunk-TH6VZX34.js";import"./chunk-QS22J2SC.js";import"./chunk-QP4C4R4W.js";import"./chunk-5LQRO4AI.js";import"./chunk-MO53T3IK.js";import"./chunk-W3JTS22H.js";import"./chunk-SDUUFQUI.js";import"./chunk-6L7TD5DW.js";import"./chunk-WLRPCY65.js";import"./chunk-3RK6DDJD.js";import"./chunk-3UN6FPMN.js";import"./chunk-LDPDLCRL.js";import"./chunk-JVNHFIYT.js";import{a as me}from"./chunk-FESS3PG3.js";import"./chunk-3YP6ORBR.js";import{a as oe}from"./chunk-UXPULNCR.js";import"./chunk-6VHVQEVM.js";import"./chunk-Z3ITXK3D.js";import"./chunk-ACIMXBIC.js";import"./chunk-J53BPEDH.js";import"./chunk-TGMCGROM.js";import"./chunk-RDRNWLJI.js";import"./chunk-W5L6FMO3.js";import"./chunk-K5XRGNWG.js";import"./chunk-PYXL7UF7.js";import"./chunk-PW42BQIY.js";import{m as re,n as le}from"./chunk-FO7G4GMY.js";import{A as te,c as Y,h as Z,m as $,o as ee}from"./chunk-5PS6ZS3N.js";import"./chunk-V3USB3ZU.js";import"./chunk-ERXVXBTU.js";import{r as ie,s as ne}from"./chunk-NNRBGHXB.js";import"./chunk-BJUPMCEP.js";import{j as J,k as K,m as Q,n as X}from"./chunk-FXQKRJWU.js";import{$c as v,Gb as W,Gc as a,Hc as x,Ic as b,Kc as f,Lc as g,Mb as w,Mc as C,Nc as z,Oc as R,Pc as H,Qc as j,Ra as O,Rc as U,Sc as q,Yb as c,Z as L,ac as I,ad as V,bd as G,dc as y,ec as D,gc as B,hc as k,ic as t,jc as i,kc as u,oc as E,pa as N,pb as F,rb as o,tc as M,uc as _,ya as p,za as s}from"./chunk-OJMQBH6T.js";import"./chunk-EU2KAMEK.js";import{a as T,b as P}from"./chunk-66YHNWRR.js";var _e=()=>[],fe=r=>({"td-cell-hover":r});function ge(r,h){if(r&1&&u(0,"variants-dropdown",27),r&2){let e=_().$implicit;c("variants",e==null?null:e.Variants)}}function Ce(r,h){if(r&1&&u(0,"variant-with-image",28),r&2){let e=_().$implicit;c("variant",e==null?null:e.Variants[0])}}function he(r,h){if(r&1&&(t(0,"span"),a(1),i()),r&2){let e=_().$implicit;o(),b("(",e.LogisticService==null?null:e.LogisticService.Option,")")}}function Se(r,h){if(r&1&&(t(0,"tr")(1,"td")(2,"div",23)(3,"div",24)(4,"div"),u(5,"img",25),v(6,"channelImage"),i(),t(7,"div"),u(8,"order-link",26),i()(),t(9,"small"),a(10),v(11,"date"),i()()(),t(12,"td"),a(13),i(),t(14,"td"),w(15,ge,1,1,"variants-dropdown",27)(16,Ce,1,1,"variant-with-image",28),i(),t(17,"td"),a(18),v(19,"number"),i(),t(20,"td")(21,"div",23)(22,"div",24)(23,"span"),a(24),i(),w(25,he,2,1,"span"),i(),t(26,"small"),a(27),i()()()()),r&2){let e=h.$implicit;o(5),c("src",V(6,12,e==null?null:e.MarketType),F)("alt",e==null||e.Variants[0]==null?null:e.Variants[0].Name),o(3),c("order",e),o(2),b(" ",G(11,14,e==null?null:e.Created,"dd/MM/yyyy HH:mm:ss")," "),o(3),x(e.Customer),o(),I(q(19,fe,(e.Variants==null?null:e.Variants.length)>1)),o(),y((e.Variants==null?null:e.Variants.length)>1?15:16),o(3),x(V(19,17,e.Amount)),o(6),x(e.LogisticService!=null&&e.LogisticService.Name?e.LogisticService==null?null:e.LogisticService.Name:"-"),o(),y(e.LogisticService!=null&&e.LogisticService.Option&&(e.LogisticService==null?null:e.LogisticService.Option)!="Default"?25:-1),o(2),b(" ",e.ReferenceNumber?e.ReferenceNumber:"-"," ")}}function ve(r,h){if(r&1){let e=E();t(0,"div",15)(1,"table",17)(2,"thead",18)(3,"tr",19)(4,"th",20),a(5,"Number"),i(),t(6,"th",20),a(7,"Customer"),i(),t(8,"th"),a(9,"Items"),i(),t(10,"th",21),a(11,"Amount"),i(),t(12,"th",21),a(13,"Shipping"),i()()(),t(14,"tbody"),B(15,Se,28,21,"tr",null,D),i()(),t(17,"app-custom-paginator",22),M("next",function(){p(e);let n=_();return s(n.initAllOrders())})("previous",function(){p(e);let n=_();return s(n.initAllOrders())}),i()()}if(r&2){let e=_(),m=H(0);o(15),k(m),o(2),c("filter",e.filter())("totaldata",m==null?null:m.length)}}function we(r,h){r&1&&(t(0,"div",16),u(1,"app-empty-state"),i())}var Ue=(()=>{class r{constructor(){this.orderService=N(A),this.filter=O({PageNumber:1,PageSize:20,ListChannelID:[],From:null,To:null,Number:null})}ngOnInit(){let e=this.orderService.getOrderDefaultValue();this.filter.update(m=>P(T({},m),{From:e})),this.initAllOrders()}initAllOrders(){this.allOrders$=this.orderService.getAllOrders(this.filter()).pipe(L(1))}static{this.\u0275fac=function(m){return new(m||r)}}static{this.\u0275cmp=W({type:r,selectors:[["app-all"]],features:[j([A])],decls:34,vars:12,consts:[["headerTitle","Completed","searchBoxPlaceHolder","Order Number...",3,"onSubmit","textChange","text"],["href","https://ods.dealpos.app","target","_blank","matTooltip","Monitor your Order & Fulfillment in real-time from TV!",1,"btn","btn-outline-secondary","shadow","rounded","ms-2"],[1,"fa-solid","fa-clipboard-list","me-3"],[1,"fw-bold","mb-2"],[3,"ngModelChange","multiple","ngModel"],[1,"mt-5"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"fw-bold"],["type","number","name","PageNumber",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["type","number","name","PageSize",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"table"],[1,"sticky-top-thead"],[1,"table-light"],[2,"width","250px"],[2,"width","150px"],["rowCountApi","/api/orders/allcount",3,"next","previous","filter","totaldata"],[1,"lh-sm"],[1,"d-flex","align-items-end","gap-2"],[2,"width","14px","padding-bottom","2.5px",3,"src","alt"],[3,"order"],[3,"variants"],[3,"variant"]],template:function(m,n){if(m&1){let d=E();z(0),v(1,"async"),t(2,"mainpanel",0),M("onSubmit",function(){return p(d),s(n.initAllOrders())}),C("textChange",function(l){return p(d),g(n.filter().Number,l)||(n.filter().Number=l),s(l)}),t(3,"actions")(4,"a",1),u(5,"i",2),t(6,"span"),a(7,"Order Fulfillment Display"),i()()(),t(8,"filters")(9,"div")(10,"label",3),a(11,"From/To"),i(),t(12,"channel-select-options",4),C("ngModelChange",function(l){return p(d),g(n.filter().ListChannelID,l)||(n.filter().ListChannelID=l),s(l)}),i()(),t(13,"div",5)(14,"label",3),a(15,"From/To"),i(),t(16,"div",6)(17,"datepicker",7),C("dateChange",function(l){return p(d),g(n.filter().From,l)||(n.filter().From=l),s(l)}),i()(),t(18,"div")(19,"datepicker",8),C("dateChange",function(l){return p(d),g(n.filter().To,l)||(n.filter().To=l),s(l)}),i()()(),t(20,"div",5)(21,"label",9),a(22,"Page Number"),i(),t(23,"input",10),C("ngModelChange",function(l){return p(d),g(n.filter().PageNumber,l)||(n.filter().PageNumber=l),s(l)}),i()(),t(24,"div",5)(25,"label",9),a(26,"Page Size"),i(),t(27,"input",11),C("ngModelChange",function(l){return p(d),g(n.filter().PageSize,l)||(n.filter().PageSize=l),s(l)}),i()()(),t(28,"content")(29,"div",12)(30,"div",13)(31,"div",14),w(32,ve,18,2,"div",15)(33,we,2,0,"div",16),i()()()()()}if(m&2){let d=R(V(1,8,n.allOrders$)||U(11,_e));o(2),f("text",n.filter().Number),o(10),c("multiple",!0),f("ngModel",n.filter().ListChannelID),o(5),f("date",n.filter().From),o(2),f("date",n.filter().To),o(4),f("ngModel",n.filter().PageNumber),o(4),f("ngModel",n.filter().PageSize),o(5),y((d==null?null:d.length)>0?32:33)}},dependencies:[X,J,Q,K,le,re,ae,oe,te,Y,ee,Z,$,de,pe,se,ce,me,ne,ie,ue],encapsulation:2})}}return r})();export{Ue as AllComponent};
@@ -1 +0,0 @@
1
- import{a as b}from"./chunk-GH5FTODR.js";import{a as h}from"./chunk-ID2YZPRH.js";import{a as m}from"./chunk-MBBQZFI4.js";import"./chunk-PE5AFID4.js";import{c as M}from"./chunk-OK3LLCAK.js";import{b as O}from"./chunk-HFCAD7GH.js";import"./chunk-4KHHGHFJ.js";import"./chunk-HVCIQI7B.js";import{a}from"./chunk-DDVDUCPY.js";import{a as P}from"./chunk-QHE3PKRD.js";import"./chunk-6RLISMEX.js";import"./chunk-TH6VZX34.js";import"./chunk-QS22J2SC.js";import"./chunk-QP4C4R4W.js";import"./chunk-W3JTS22H.js";import"./chunk-SDUUFQUI.js";import"./chunk-6L7TD5DW.js";import"./chunk-WLRPCY65.js";import"./chunk-3UN6FPMN.js";import"./chunk-LDPDLCRL.js";import"./chunk-UMP6ZMEJ.js";import"./chunk-JVNHFIYT.js";import"./chunk-3YP6ORBR.js";import{a as C}from"./chunk-UXPULNCR.js";import"./chunk-6VHVQEVM.js";import"./chunk-Z3ITXK3D.js";import"./chunk-ACIMXBIC.js";import"./chunk-J53BPEDH.js";import"./chunk-TGMCGROM.js";import"./chunk-RDRNWLJI.js";import"./chunk-W5L6FMO3.js";import"./chunk-K5XRGNWG.js";import{e as g}from"./chunk-PYXL7UF7.js";import"./chunk-PW42BQIY.js";import{n as f}from"./chunk-FO7G4GMY.js";import{A as u}from"./chunk-5PS6ZS3N.js";import"./chunk-V3USB3ZU.js";import"./chunk-ERXVXBTU.js";import{s}from"./chunk-NNRBGHXB.js";import"./chunk-BJUPMCEP.js";import{F as l,J as i,n as r}from"./chunk-FXQKRJWU.js";import{Gb as d,Hb as e,ka as n,kc as c}from"./chunk-OJMQBH6T.js";import"./chunk-EU2KAMEK.js";import"./chunk-66YHNWRR.js";var _=(()=>{class t{static{this.\u0275fac=function(o){return new(o||t)}}static{this.\u0275cmp=d({type:t,selectors:[["app-products"]],standalone:!1,decls:1,vars:0,template:function(o,v){o&1&&c(0,"router-outlet")},dependencies:[l],styles:[".badge-pill[_ngcontent-%COMP%]{padding-bottom:16px!important}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]:checked + label[_ngcontent-%COMP%]{background:#dfeffc;border:1px solid #dfeffc}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{visibility:hidden;position:absolute;left:0;top:0}.rad-btn[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{border:1px solid #ddd;border-radius:3px;margin-right:10px;cursor:pointer;padding:10px;margin-bottom:10px;color:#000;width:80px;text-align:center}.modal-dialog[_ngcontent-%COMP%]{max-width:30%!important}.product[_ngcontent-%COMP%]{height:100%!important}.row[_ngcontent-%COMP%]{margin-left:0;margin-right:0}ul[_ngcontent-%COMP%]{list-style-type:none}.link[_ngcontent-%COMP%]{color:#0202ab;cursor:pointer}.px-1[_ngcontent-%COMP%]{padding-left:5px!important}.sku[_ngcontent-%COMP%]{color:#696969;font-style:italic}.badge-pill[_ngcontent-%COMP%]{height:16px}.itemTitle[_ngcontent-%COMP%]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.no-title[_ngcontent-%COMP%]{margin-top:.33em;margin-bottom:.33rem}.mb-upload[_ngcontent-%COMP%]{padding-bottom:.625rem}.my-1rem[_ngcontent-%COMP%]{margin-bottom:1rem!important;margin-top:1rem!important}.pr-rem[_ngcontent-%COMP%]{padding-right:.6rem}.text-larger[_ngcontent-%COMP%]{font-size:larger}.bg-lightpink[_ngcontent-%COMP%]{background-color:#f9dede}.bottom-buttons[_ngcontent-%COMP%]{margin-left:97px}@media (min-width: 1200px){.max-w-xl[_ngcontent-%COMP%]{max-width:205px}}.navbar-toggler[_ngcontent-%COMP%]:focus{box-shadow:none!important}"]})}}return t})();var y=[{path:"",component:_,children:[{path:"",redirectTo:"status",pathMatch:"full"},{path:"status",loadChildren:()=>import("./chunk-LQ2NLQKV.js").then(t=>t.StatusModule),canActivate:[a,m]},{path:"download",loadChildren:()=>import("./chunk-D5YID4W4.js").then(t=>t.DownloadModule),canActivate:[a,m]},{path:"upload",loadComponent:()=>import("./chunk-BYSLV4DQ.js").then(t=>t.ProductUploadComponent),data:{title:"Upload Product"},canActivate:[a,m]}]}],w=(()=>{class t{static{this.\u0275fac=function(o){return new(o||t)}}static{this.\u0275mod=e({type:t})}static{this.\u0275inj=n({imports:[r,i.forChild(y)]})}}return t})();var X=(()=>{class t{static{this.\u0275fac=function(o){return new(o||t)}}static{this.\u0275mod=e({type:t})}static{this.\u0275inj=n({imports:[r,u,i,w,s,f,g,O,C,M,P,h,b]})}}return t})();export{X as ProductModule};
@@ -1 +0,0 @@
1
- import{a as o}from"./chunk-DDVDUCPY.js";import{a as s,b as l}from"./chunk-A64VIOKR.js";import"./chunk-6VHVQEVM.js";import"./chunk-Z3ITXK3D.js";import"./chunk-ACIMXBIC.js";import"./chunk-J53BPEDH.js";import"./chunk-TGMCGROM.js";import"./chunk-RDRNWLJI.js";import"./chunk-W5L6FMO3.js";import"./chunk-K5XRGNWG.js";import"./chunk-PW42BQIY.js";import"./chunk-V3USB3ZU.js";import"./chunk-ERXVXBTU.js";import"./chunk-NNRBGHXB.js";import"./chunk-BJUPMCEP.js";import{F as c,J as d}from"./chunk-FXQKRJWU.js";import{Gb as a,Yb as i,ic as p,jc as m,kc as n,rb as r}from"./chunk-OJMQBH6T.js";import"./chunk-EU2KAMEK.js";import"./chunk-66YHNWRR.js";var f=(()=>{class t{constructor(){this.tabs=[{Title:"Origin Order API",Url:"/menu/json-api/order-api"},{Title:"Origin Product API",Url:"/menu/json-api/product-api"},{Title:"Origin Escrow API",Url:"/menu/json-api/escrow-api"}]}static{this.\u0275fac=function(e){return new(e||t)}}static{this.\u0275cmp=a({type:t,selectors:[["app-json-api"]],decls:5,vars:1,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid"],[3,"Tabs"]],template:function(e,v){e&1&&(p(0,"nav",0)(1,"div",1)(2,"div"),n(3,"nav-tab",2),m()()(),n(4,"router-outlet")),e&2&&(r(3),i("Tabs",v.tabs))},dependencies:[l,s,d,c],encapsulation:2})}}return t})(),g=[{path:"",component:f,children:[{path:"",redirectTo:"order-api",pathMatch:"full"},{path:"order-api",loadComponent(){return import("./chunk-PQGPOOCK.js").then(t=>t.OrderApiComponent)},canActivate:[o],data:{title:"Order API"}},{path:"product-api",loadComponent(){return import("./chunk-YWSUS64O.js").then(t=>t.ProductApiComponent)},canActivate:[o],data:{title:"Product API"}},{path:"escrow-api",loadComponent(){return import("./chunk-4ZQCJGTZ.js").then(t=>t.EscrowApiComponent)},canActivate:[o],data:{title:"Escrow API"}}]}];export{f as JsonApiComponent,g as routes};
@@ -1 +0,0 @@
1
- import{b as t,c as L}from"./chunk-PW42BQIY.js";import{n as y}from"./chunk-FXQKRJWU.js";import{Gb as h,Gc as N,Hb as p,Hc as k,Mb as d,Oa as r,Yb as C,dc as f,ic as i,jc as s,ka as l,kc as u,pb as c,rb as o,uc as g}from"./chunk-OJMQBH6T.js";function x(e,v){if(e&1&&(i(0,"span",2),N(1),s()),e&2){let n=g();o(),k(n.channelName)}}var z=(()=>{class e{set typeId(n){this.channelLogo=L.getChannelLogoByTypeId(n),this.initChannelName(n)}constructor(){this.showChannelName=r(!0)}initChannelName(n){switch(n){case t.Tokopedia:this.channelName="Tokopedia";break;case t.Tiktok:this.channelName="Tiktok";break;case t.WooCommerce:this.channelName="WooCommerce";break;case t.Shopee:this.channelName="Shopee";break;case t.Lazada:this.channelName="Lazada";break;case t.KalCare:this.channelName="Kalcare";break}}static{this.\u0275fac=function(a){return new(a||e)}}static{this.\u0275cmp=h({type:e,selectors:[["app-channel-logo"]],inputs:{showChannelName:[1,"showChannelName"],typeId:"typeId"},standalone:!1,decls:3,vars:2,consts:[[1,"d-flex","align-items-center"],[1,"me-3",2,"width","20px",3,"src"],[1,"fw-normal"]],template:function(a,m){a&1&&(i(0,"div",0),u(1,"img",1),d(2,x,2,1,"span",2),s()),a&2&&(o(),C("src",m.channelLogo,c),o(),f(m.showChannelName()?2:-1))},encapsulation:2})}}return e})();var F=(()=>{class e{static{this.\u0275fac=function(a){return new(a||e)}}static{this.\u0275mod=p({type:e})}static{this.\u0275inj=l({imports:[y]})}}return e})();export{z as a,F as b};
@@ -1 +0,0 @@
1
- import{a as X}from"./chunk-FESS3PG3.js";import{a as Q}from"./chunk-3YP6ORBR.js";import{a as G,b as q}from"./chunk-RTT3JVJM.js";import{a as J}from"./chunk-UXPULNCR.js";import"./chunk-6VHVQEVM.js";import"./chunk-Z3ITXK3D.js";import"./chunk-ACIMXBIC.js";import"./chunk-J53BPEDH.js";import"./chunk-TGMCGROM.js";import{a as Z}from"./chunk-RDRNWLJI.js";import{e as H}from"./chunk-W5L6FMO3.js";import"./chunk-K5XRGNWG.js";import"./chunk-PYXL7UF7.js";import"./chunk-PW42BQIY.js";import{m as j,n as z}from"./chunk-FO7G4GMY.js";import{A as $,h as A,m as W}from"./chunk-5PS6ZS3N.js";import"./chunk-V3USB3ZU.js";import"./chunk-ERXVXBTU.js";import"./chunk-NNRBGHXB.js";import"./chunk-BJUPMCEP.js";import{H as N,J as O,j as B,m as R,n as F}from"./chunk-FXQKRJWU.js";import{$c as w,Gb as M,Gc as l,Hc as g,Kc as E,Lc as T,Mb as b,Mc as K,Nc as P,Ra as V,Yb as s,Z as y,ad as v,dc as k,ec as I,gc as L,hc as U,ic as e,jc as t,kc as c,oc as x,pa as C,pb as D,rb as r,tc as h,uc as S,ya as m,za as u}from"./chunk-OJMQBH6T.js";import"./chunk-EU2KAMEK.js";import"./chunk-66YHNWRR.js";function Y(o,_){if(o&1){let i=x();e(0,"img",21),h("click",function(a){m(i);let n=S().$implicit,d=S();return u(d.onZoomImage(a,n==null?null:n.ImageUrl))}),t()}if(o&2){let i=S().$implicit;s("src",i==null?null:i.ThumbnailUrl,D)}}function ee(o,_){o&1&&c(0,"img",17)}function te(o,_){if(o&1&&(e(0,"tr")(1,"td")(2,"div",15),b(3,Y,1,1,"img",16)(4,ee,1,0,"img",17),t()(),e(5,"td"),l(6),t(),e(7,"td"),l(8),t(),e(9,"td")(10,"div",18),c(11,"app-channel-logo",19),e(12,"span"),l(13),t()()(),e(14,"td",20),l(15),w(16,"number"),t()()),o&2){let i=_.$implicit;r(3),k(i.ImageUrl?3:4),r(3),g(i.Name),r(2),g(i.SKU),r(3),s("typeId",i.TypeID),r(2),g(i.ChannelName),r(2),g(v(16,6,i.Count))}}var ve=(()=>{class o{constructor(){this.httpService=C(H),this.biggerPictureService=C(Q),this.filter=V({PageNumber:1,RowCount:20,ListChannelID:[]}),this.initMultipleListingSKU()}initMultipleListingSKU(){this.multipleListingSKU$=this.httpService.post(Z.GetMultiListingSKU,this.filter()).pipe(y(1))}onZoomImage(i,p){this.biggerPictureService.openBiggerPicture(i,p)}static{this.\u0275fac=function(p){return new(p||o)}}static{this.\u0275cmp=M({type:o,selectors:[["app-duplicate-sku-v2"]],decls:33,vars:9,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","paginationTotal","hasClicked"],[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(p,a){if(p&1){let n=x();P(0),w(1,"async"),e(2,"mainpanel",0),h("onSubmit",function(){return m(n),u(a.initMultipleListingSKU())}),e(3,"actions")(4,"a",1),c(5,"i",2),e(6,"span"),l(7,"Card View"),t()()(),e(8,"filters")(9,"div")(10,"label",3),l(11,"Channel"),t(),e(12,"channel-select-options",4),K("ngModelChange",function(f){return m(n),T(a.filter().ListChannelID,f)||(a.filter().ListChannelID=f),u(f)}),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"),l(22,"Product"),t(),e(23,"th",11),l(24,"SKU"),t(),e(25,"th",12),l(26,"Channel"),t(),e(27,"th",13),l(28,"Count"),t()()(),e(29,"tbody"),L(30,te,17,8,"tr",null,I),t()(),e(32,"app-custom-paginator",14),h("next",function(){return m(n),u(a.initMultipleListingSKU())})("previous",function(){return m(n),u(a.initMultipleListingSKU())}),t()()()()()()}if(p&2){let n=v(1,7,a.multipleListingSKU$);r(2),s("hideSearchBox",!0),r(10),s("multiple",!0),E("ngModel",a.filter().ListChannelID),r(18),U(n==null?null:n.Data),r(2),s("filter",a.filter())("totaldata",n==null||n.Data==null?null:n.Data.length)("paginationTotal",n==null?null:n.Count)("hasClicked",!0)}},dependencies:[F,B,R,z,j,J,O,N,q,G,X,$,A,W],encapsulation:2})}}return o})();export{ve as DuplicateSkuV2Component};
@@ -1 +0,0 @@
1
- import{c as ht}from"./chunk-OK3LLCAK.js";import"./chunk-HVCIQI7B.js";import"./chunk-QP4C4R4W.js";import{b as ut}from"./chunk-PPHTN2H6.js";import"./chunk-W3JTS22H.js";import"./chunk-WLRPCY65.js";import{a as Z}from"./chunk-UMP6ZMEJ.js";import"./chunk-JVNHFIYT.js";import{h as rt}from"./chunk-6VHVQEVM.js";import"./chunk-Z3ITXK3D.js";import"./chunk-ACIMXBIC.js";import"./chunk-J53BPEDH.js";import"./chunk-TGMCGROM.js";import"./chunk-RDRNWLJI.js";import{b as et,e as it}from"./chunk-W5L6FMO3.js";import"./chunk-K5XRGNWG.js";import{a as st,b as at,d as lt,e as ct}from"./chunk-PYXL7UF7.js";import{b as h,c as tt}from"./chunk-PW42BQIY.js";import{m as dt,n as gt}from"./chunk-FO7G4GMY.js";import{A as Y,h as Q,m as X}from"./chunk-5PS6ZS3N.js";import"./chunk-V3USB3ZU.js";import{b as nt,c as ot}from"./chunk-ERXVXBTU.js";import{r as mt,s as pt}from"./chunk-NNRBGHXB.js";import"./chunk-BJUPMCEP.js";import{J as y,f as J,g as G,j as q,n as L}from"./chunk-FXQKRJWU.js";import{$c as C,Fc as P,Gb as V,Gc as a,Hb as S,Hc as u,Ic as W,Kc as w,Lc as D,Mb as g,Mc as R,Nc as $,Oc as A,Pc as H,Sc as z,Yb as l,Z as M,aa as F,ad as x,cd as U,ea as k,ic as o,jc as r,ka as f,kc as j,lc as T,mc as N,oc as O,pb as K,q as B,rb as s,tc as I,uc as c,v,xb as _,ya as b,za as E}from"./chunk-OJMQBH6T.js";import"./chunk-EU2KAMEK.js";import"./chunk-66YHNWRR.js";var Ct=e=>[e];function xt(e,m){if(e&1&&(o(0,"span",15),j(1,"img",16),r(),o(2,"span"),a(3),r()),e&2){let t=m.item;s(),l("src",t.Img,K)("alt",t.Name),s(2),W(" ",t.Name," ")}}function Lt(e,m){if(e&1){let t=O();T(0),$(1),C(2,"async"),o(3,"a",17),I("click",function(){b(t);let n=H(1),p=c();return E(p.submitLogistics(n))}),a(4,"Submit"),r(),N()}if(e&2){let t=c();s(),A(x(2,0,t.logisticServices$))}}function yt(e,m){}function vt(e,m){if(e&1){let t=O();o(0,"ng-select",20),R("ngModelChange",function(n){b(t);let p=c(2).$implicit;return D(p.ProductSKU,n)||(p.ProductSKU=n),E(n)}),r()}if(e&2){let t=c().ngIf,i=c().$implicit;w("ngModel",i.ProductSKU),l("items",t)}}function Mt(e,m){if(e&1&&(o(0,"span"),a(1),r()),e&2){let t=c(2).$implicit;s(),u(t.ProductSKU||"-")}}function bt(e,m){if(e&1&&(T(0),g(1,yt,0,0,"ng-template",19)(2,vt,1,2,"ng-template",null,0,U)(4,Mt,2,1,"ng-template",null,1,U),N()),e&2){let t=P(3),i=P(5),n=c(2);s(),l("ngxPermissionsOnly",z(3,Ct,n.logisticEditRole))("ngxPermissionsOnlyThen",t)("ngxPermissionsOnlyElse",i)}}function Et(e,m){if(e&1&&(o(0,"tr")(1,"td"),a(2),r(),o(3,"td"),a(4),r(),o(5,"td"),a(6),r(),o(7,"td"),g(8,bt,6,5,"ng-container",18),C(9,"async"),r()()),e&2){let t=m.$implicit,i=c();s(2),u(t.Name),s(2),u(t.Service),s(2),u(t.TypeString),s(2),l("ngIf",x(9,4,i.logisticOptions$))}}var _t=(()=>{class e{constructor(t,i,n){this.http=t,this.toastr=i,this.authService=n,this.filter={ChannelID:""},this.logisticEditRole=Z.LogisticUpdate,this.channelOptions=this.authService.getChannels(),this.initUnsupportedChannel(),this.initLoader()}initUnsupportedChannel(){let t=[h.WooCommerce,h.Lazada,h.Shopify,h.Plugo,h.Tokopedia];this.channelOptions=this.channelOptions.map(i=>(t.forEach(n=>{i.TypeID===n&&(i.disabled=!0)}),i))}initLoader(){this.http.post("/api/Logistic/Load",{}).subscribe(t=>{this.filter=t.Filter,this.channelName=this.channelOptions[0].Name,this.initLogisticServiceOptions(),this.getLogisticService()})}initLogisticServiceOptions(){this.logisticOptions$=this.http.get("/api/Logistic/OptionLogisticsService").pipe(M(1))}submitLogistics(t){this.clonedLogisticServices$.pipe(v(i=>t.map(n=>(i.findIndex(d=>d.Name===n.Name&&d.ProductSKU==n.ProductSKU)==-1&&(n.IsChange=!0),n))),F(i=>this.http.post("/api/Logistic/Submit",i))).subscribe(()=>{this.toastr.success("Logistic service updated successfully.","Success"),this.getLogisticService()})}getLogisticService(){this.iniTitle(),this.logisticServices$=this.http.post("/api/Logistic/Get",this.filter).pipe(v(t=>t.map(i=>(i.ProductSKU=tt.IsEmpty(i.ProductSKU)?null:i.ProductSKU,i))),k(t=>{let i=JSON.parse(JSON.stringify(t));this.clonedLogisticServices$=B(i)}),M(1))}iniTitle(){let t=this.channelOptions.find(i=>i.ID==this.filter.ChannelID);this.channelName=t?t.Name:null}static{this.\u0275fac=function(i){return new(i||e)(_(it),_(et),_(rt))}}static{this.\u0275cmp=V({type:e,selectors:[["app-logistic"]],standalone:!1,decls:28,vars:9,consts:[["thenBlock",""],["elseBlock",""],["hideSearchBox","true","searchBoxPlaceHolder","Enter Number...",3,"onSubmit","headerTitle","hideSearchDropdown"],[1,"mb-2","fw-bold"],["appendTo","body","bindLabel","Name","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"ngModelChange","clearable","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],[4,"ngxPermissionsOnly"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"table","table-hover"],[1,"sticky-top-thead"],[1,"table-light"],[4,"ngFor","ngForOf"],[1,"me-2"],[2,"width","18px",3,"src","alt"],["role","button","data-toggle","tooltip","data-placement","top","matTooltip","enter Logistic for recorded",1,"btn","btn-success","btn-fill","btn-lg","text-white",3,"click"],[4,"ngIf"],[3,"ngxPermissionsOnly","ngxPermissionsOnlyThen","ngxPermissionsOnlyElse"],["placeholder","Logistic Service Code","bindLabel","Name","bindValue","Code",1,"w-75",3,"ngModelChange","ngModel","items"]],template:function(i,n){i&1&&(o(0,"mainpanel",2),I("onSubmit",function(){return n.getLogisticService()}),o(1,"filters")(2,"div")(3,"label",3),a(4,"Select a Channel"),r(),o(5,"ng-select",4),R("ngModelChange",function(d){return D(n.filter.ChannelID,d)||(n.filter.ChannelID=d),d}),g(6,xt,4,3,"ng-template",5),r()()(),o(7,"actions"),g(8,Lt,5,3,"ng-container",6),r(),o(9,"content")(10,"div",7)(11,"div",8)(12,"div",9)(13,"div",10)(14,"table",11)(15,"thead",12)(16,"tr",13)(17,"th"),a(18,"Logistic"),r(),o(19,"th"),a(20,"Service"),r(),o(21,"th"),a(22,"Type"),r(),o(23,"th"),a(24,"Logistic Service"),r()()(),o(25,"tbody"),g(26,Et,10,6,"tr",14),C(27,"async"),r()()()()()()()()),i&2&&(l("headerTitle","Logistic Courier - "+n.channelName)("hideSearchDropdown",!1),s(5),l("clearable",!1)("items",n.channelOptions),w("ngModel",n.filter.ChannelID),s(3),l("ngxPermissionsOnly",n.logisticEditRole),s(18),l("ngForOf",x(27,7,n.logisticServices$)))},dependencies:[J,G,Q,X,dt,lt,st,at,mt,nt,q],encapsulation:2})}}return e})();var Tt=[{path:"",component:_t}],St=(()=>{class e{static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275mod=S({type:e})}static{this.\u0275inj=f({imports:[L,y.forChild(Tt)]})}}return e})();var oe=(()=>{class e{static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275mod=S({type:e})}static{this.\u0275inj=f({imports:[L,y,St,Y,gt,ct,ut,ht,pt,ot]})}}return e})();export{oe as LogisticModule};
@@ -1 +0,0 @@
1
- import{$ as a,T as v,Y as L,_ as m,aa as l,ba as r,ma as O}from"./chunk-7AE3725T.js";import{a as C,p as _}from"./chunk-FXQKRJWU.js";import{Ca as d,Ea as y,Ib as u,Pa as p,Qc as g,Wa as S,ja as h,jd as b,pa as i,wb as f,xa as c}from"./chunk-OJMQBH6T.js";import{a as n}from"./chunk-66YHNWRR.js";var T=(()=>{class o extends r{name="common";static \u0275fac=(()=>{let e;return function(s){return(e||(e=d(o)))(s||o)}})();static \u0275prov=h({token:o,factory:o.\u0275fac,providedIn:"root"})}return o})(),B=(()=>{class o{document=i(C);platformId=i(S);el=i(p);injector=i(y);cd=i(b);renderer=i(f);config=i(O);baseComponentStyle=i(T);baseStyle=i(r);scopedStyleEl;rootEl;dt;get styleOptions(){return{nonce:this.config?.csp().nonce}}get _name(){return this.constructor.name.replace(/^_/,"").toLowerCase()}get componentStyle(){return this._componentStyle}attrSelector=L("pc");themeChangeListeners=[];_getHostInstance(e){if(e)return e?this.hostName?e.name===this.hostName?e:this._getHostInstance(e.parentInstance):e.parentInstance:void 0}_getOptionValue(e,t="",s={}){return v(e,t,s)}ngOnInit(){this.document&&this._loadStyles()}ngAfterViewInit(){this.rootEl=this.el?.nativeElement,this.rootEl&&this.rootEl?.setAttribute(this.attrSelector,"")}ngOnChanges(e){if(this.document&&!_(this.platformId)){let{dt:t}=e;t&&t.currentValue&&(this._loadScopedThemeStyles(t.currentValue),this._themeChangeListener(()=>this._loadScopedThemeStyles(t.currentValue)))}}ngOnDestroy(){this._unloadScopedThemeStyles(),this.themeChangeListeners.forEach(e=>m.off("theme:change",e))}_loadStyles(){let e=()=>{l.isStyleNameLoaded("base")||(this.baseStyle.loadGlobalCSS(this.styleOptions),l.setLoadedStyleName("base")),this._loadThemeStyles()};e(),this._themeChangeListener(()=>e())}_loadCoreStyles(){!l.isStyleNameLoaded("base")&&this._name&&(this.baseComponentStyle.loadCSS(this.styleOptions),this.componentStyle&&this.componentStyle?.loadCSS(this.styleOptions),l.setLoadedStyleName(this.componentStyle?.name))}_loadThemeStyles(){if(!a.isStyleNameLoaded("common")){let{primitive:e,semantic:t,global:s,style:I}=this.componentStyle?.getCommonTheme?.()||{};this.baseStyle.load(e?.css,n({name:"primitive-variables"},this.styleOptions)),this.baseStyle.load(t?.css,n({name:"semantic-variables"},this.styleOptions)),this.baseStyle.load(s?.css,n({name:"global-variables"},this.styleOptions)),this.baseStyle.loadGlobalTheme(n({name:"global-style"},this.styleOptions),I),a.setLoadedStyleName("common")}if(!a.isStyleNameLoaded(this.componentStyle?.name)&&this.componentStyle?.name){let{css:e,style:t}=this.componentStyle?.getComponentTheme?.()||{};this.componentStyle?.load(e,n({name:`${this.componentStyle?.name}-variables`},this.styleOptions)),this.componentStyle?.loadTheme(n({name:`${this.componentStyle?.name}-style`},this.styleOptions),t),a.setLoadedStyleName(this.componentStyle?.name)}if(!a.isStyleNameLoaded("layer-order")){let e=this.componentStyle?.getLayerOrderThemeCSS?.();this.baseStyle.load(e,n({name:"layer-order",first:!0},this.styleOptions)),a.setLoadedStyleName("layer-order")}this.dt&&(this._loadScopedThemeStyles(this.dt),this._themeChangeListener(()=>this._loadScopedThemeStyles(this.dt)))}_loadScopedThemeStyles(e){let{css:t}=this.componentStyle?.getPresetTheme?.(e,`[${this.attrSelector}]`)||{},s=this.componentStyle?.load(t,n({name:`${this.attrSelector}-${this.componentStyle?.name}`},this.styleOptions));this.scopedStyleEl=s?.el}_unloadScopedThemeStyles(){this.scopedStyleEl?.remove()}_themeChangeListener(e=()=>{}){l.clearLoadedStyleNames(),m.on("theme:change",e),this.themeChangeListeners.push(e)}cx(e,t){let s=this.parent?this.parent.componentStyle?.classes?.[e]:this.componentStyle?.classes?.[e];return typeof s=="function"?s({instance:this}):typeof s=="string"?s:e}sx(e){let t=this.componentStyle?.inlineStyles?.[e];return typeof t=="function"?t({instance:this}):typeof t=="string"?t:n({},t)}get parent(){return this.parentInstance}static \u0275fac=function(t){return new(t||o)};static \u0275dir=u({type:o,inputs:{dt:"dt"},features:[g([T,r]),c]})}return o})();export{B as a};