marketplacepos 5.40.1 → 5.41.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 (216) hide show
  1. package/Marketplace/3rdpartylicenses.txt +123 -123
  2. package/Marketplace/{chunk-5MRT2EFE.js → chunk-25OT4I3W.js} +1 -1
  3. package/Marketplace/chunk-26ZUWPMS.js +1 -0
  4. package/Marketplace/chunk-2BUABOHG.js +1 -0
  5. package/Marketplace/chunk-2SXRC4IG.js +1 -0
  6. package/Marketplace/{chunk-KXZCGKQW.js → chunk-2TZBEYNY.js} +1 -1
  7. package/Marketplace/chunk-2ZTDLZVZ.js +1 -0
  8. package/Marketplace/chunk-33IXC6UG.js +1 -0
  9. package/Marketplace/chunk-42Q6LYIG.js +1 -0
  10. package/Marketplace/{chunk-7477X7LJ.js → chunk-4CTORK4F.js} +1 -1
  11. package/Marketplace/{chunk-BUFEIJAI.js → chunk-4M63ID5T.js} +1 -1
  12. package/Marketplace/chunk-4PZ5Q3HI.js +1 -0
  13. package/Marketplace/chunk-54JEYTAI.js +1 -0
  14. package/Marketplace/{chunk-RVYGL22E.js → chunk-55OI2SUF.js} +1 -1
  15. package/Marketplace/chunk-57YWGJWG.js +1 -0
  16. package/Marketplace/{chunk-OF7BOKNS.js → chunk-5ANFGKBV.js} +1 -1
  17. package/Marketplace/chunk-5B4KSPFM.js +1 -0
  18. package/Marketplace/chunk-5DIRXS7I.js +1 -0
  19. package/Marketplace/chunk-5EQNOCXP.js +1 -0
  20. package/Marketplace/chunk-5QAURMZF.js +222 -0
  21. package/Marketplace/{chunk-V2OJQHE3.js → chunk-5XI7HWS5.js} +2 -2
  22. package/Marketplace/chunk-66YHNWRR.js +1 -0
  23. package/Marketplace/chunk-6IFZ2TO6.js +1 -0
  24. package/Marketplace/chunk-6IOVMVRS.js +5 -0
  25. package/Marketplace/chunk-6L2THCHF.js +1 -0
  26. package/Marketplace/{chunk-Q72ZXPDP.js → chunk-6LH7FSOW.js} +1 -1
  27. package/Marketplace/{chunk-OLSC6KHB.js → chunk-6MPSYC77.js} +1 -1
  28. package/Marketplace/chunk-6RJV6M56.js +1 -0
  29. package/Marketplace/{chunk-BIQHA7UA.js → chunk-6X2OBNJQ.js} +4 -4
  30. package/Marketplace/chunk-7P65ADBU.js +1 -0
  31. package/Marketplace/{chunk-IYYVZ6B6.js → chunk-A2YNWIX6.js} +1 -1
  32. package/Marketplace/chunk-A4F37V57.js +1 -0
  33. package/Marketplace/{chunk-77IUCPIQ.js → chunk-ACIMXBIC.js} +1 -1
  34. package/Marketplace/chunk-AFSORQR4.js +4 -0
  35. package/Marketplace/chunk-AGRVVEIR.js +397 -0
  36. package/Marketplace/chunk-ALKC77XL.js +78 -0
  37. package/Marketplace/chunk-AS2UDXSX.js +5 -0
  38. package/Marketplace/chunk-AVEGIEYT.js +193 -0
  39. package/Marketplace/chunk-AYATC6J5.js +1 -0
  40. package/Marketplace/chunk-B46KV6AB.js +1 -0
  41. package/Marketplace/chunk-BQTUAYGY.js +1 -0
  42. package/Marketplace/chunk-BVLV6UAF.js +1 -0
  43. package/Marketplace/chunk-BXFJ3LAT.js +1 -0
  44. package/Marketplace/chunk-CEQA4PTY.js +1 -0
  45. package/Marketplace/chunk-CMZW5QAE.js +1 -0
  46. package/Marketplace/chunk-CSSG7NAJ.js +1 -0
  47. package/Marketplace/chunk-CZ2CQU4Q.js +1 -0
  48. package/Marketplace/chunk-CZOD43PN.js +1 -0
  49. package/Marketplace/chunk-DBHTTLSK.js +1 -0
  50. package/Marketplace/chunk-DJILLV4M.js +1 -0
  51. package/Marketplace/chunk-DVX3M74S.js +1 -0
  52. package/Marketplace/{chunk-ZD5LURJS.js → chunk-E2CS7ZMC.js} +1 -1
  53. package/Marketplace/chunk-EL3GM6CV.js +1 -0
  54. package/Marketplace/chunk-EU2KAMEK.js +1 -0
  55. package/Marketplace/chunk-F4GMWHYJ.js +33 -0
  56. package/Marketplace/{chunk-RGR34QZ3.js → chunk-FBZW4Y3J.js} +1 -1
  57. package/Marketplace/chunk-FFAZ3Q3F.js +1 -0
  58. package/Marketplace/chunk-FSJSQVUK.js +1 -0
  59. package/Marketplace/chunk-FWG4H3QG.js +13 -0
  60. package/Marketplace/chunk-GCECFUOP.js +1 -0
  61. package/Marketplace/{chunk-UBMI3NQH.js → chunk-GHBGGQNM.js} +1 -1
  62. package/Marketplace/chunk-GOS4RIF2.js +1 -0
  63. package/Marketplace/{chunk-IEYFOHME.js → chunk-GPC4DECX.js} +1 -1
  64. package/Marketplace/chunk-GPVSWXHS.js +1 -0
  65. package/Marketplace/chunk-GZXQUJKX.js +1 -0
  66. package/Marketplace/{chunk-TMFFA26Y.js → chunk-HFKKITEW.js} +1 -1
  67. package/Marketplace/chunk-HNVG4QKG.js +1 -0
  68. package/Marketplace/{chunk-KHWTOD6H.js → chunk-HPYTL6TX.js} +1 -1
  69. package/Marketplace/chunk-HTQJCQ32.js +1 -0
  70. package/Marketplace/chunk-HZFWCHSY.js +1 -0
  71. package/Marketplace/chunk-I3LFKNW4.js +3 -0
  72. package/Marketplace/{chunk-GBABJLPQ.js → chunk-IKPRRD5D.js} +1 -1
  73. package/Marketplace/chunk-IL4YQGTS.js +1 -0
  74. package/Marketplace/chunk-IUI6TA5K.js +2 -0
  75. package/Marketplace/{chunk-EGTYAIU5.js → chunk-JOBWFOGC.js} +1 -1
  76. package/Marketplace/{chunk-PPDHTO44.js → chunk-JRWFZQ5K.js} +1 -1
  77. package/Marketplace/chunk-JS55A2RS.js +7 -0
  78. package/Marketplace/chunk-JV4MMNGD.js +79 -0
  79. package/Marketplace/chunk-K6YEZYU4.js +5 -0
  80. package/Marketplace/{chunk-KQOYVGBL.js → chunk-KJHSB4A2.js} +1 -1
  81. package/Marketplace/chunk-KOKHDU4I.js +1 -0
  82. package/Marketplace/{chunk-GBXNTL4E.js → chunk-KQQCKHF3.js} +1 -1
  83. package/Marketplace/chunk-KWQS4KX7.js +1 -0
  84. package/Marketplace/{chunk-COBHWPGI.js → chunk-KX5AWR75.js} +1 -1
  85. package/Marketplace/chunk-KXS76PRS.js +70 -0
  86. package/Marketplace/chunk-KYIY3VQ6.js +141 -0
  87. package/Marketplace/{chunk-J7AGLBPL.js → chunk-LHD7CYML.js} +1 -1
  88. package/Marketplace/chunk-LR4UZ2OS.js +30 -0
  89. package/Marketplace/{chunk-M3SJUKTG.js → chunk-LSXUXG54.js} +1 -1
  90. package/Marketplace/chunk-LWSRD5LF.js +1 -0
  91. package/Marketplace/chunk-M3OOU4DF.js +1 -0
  92. package/Marketplace/{chunk-Q2OEJFVT.js → chunk-M5IQRAHV.js} +1 -1
  93. package/Marketplace/chunk-M7ZBU4PP.js +1 -0
  94. package/Marketplace/{chunk-RIHLYYZU.js → chunk-MQXPOHBV.js} +1 -1
  95. package/Marketplace/chunk-MTUIRWOB.js +2 -0
  96. package/Marketplace/chunk-MYLIBJND.js +2 -0
  97. package/Marketplace/chunk-MZI5AYCE.js +1 -0
  98. package/Marketplace/chunk-NJFNMUFH.js +1 -0
  99. package/Marketplace/{chunk-JBKHY4HH.js → chunk-NRCXYGO3.js} +5 -5
  100. package/Marketplace/chunk-NTW6FBP5.js +1 -0
  101. package/Marketplace/chunk-NZA4BEER.js +102 -0
  102. package/Marketplace/chunk-O55KM5KY.js +1 -0
  103. package/Marketplace/{chunk-6MJRS7KB.js → chunk-OH6LACWK.js} +11 -11
  104. package/Marketplace/{chunk-G6EG5QJS.js → chunk-OKAPL3YZ.js} +1 -1
  105. package/Marketplace/{chunk-WAW37FIG.js → chunk-OZ77CAJD.js} +1 -1
  106. package/Marketplace/chunk-OZ7LWNOK.js +15 -0
  107. package/Marketplace/{chunk-LXB5L2OC.js → chunk-PBGDP6XV.js} +1 -1
  108. package/Marketplace/chunk-PE5AFID4.js +1 -0
  109. package/Marketplace/chunk-PEA6KVUS.js +252 -0
  110. package/Marketplace/{chunk-7TWBIV3T.js → chunk-PO7JVKK3.js} +1 -1
  111. package/Marketplace/chunk-PW42BQIY.js +1 -0
  112. package/Marketplace/{chunk-75BDXSG3.js → chunk-R76V3PTN.js} +10 -10
  113. package/Marketplace/chunk-REL734JM.js +1 -0
  114. package/Marketplace/chunk-SD7M7HOB.js +1 -0
  115. package/Marketplace/{chunk-VGXQU74M.js → chunk-SH7KN2AS.js} +1 -1
  116. package/Marketplace/{chunk-CH2MLZU7.js → chunk-SIYMMMKQ.js} +1 -1
  117. package/Marketplace/chunk-SLQA5QBT.js +1 -0
  118. package/Marketplace/chunk-SQINA5SO.js +1 -0
  119. package/Marketplace/{chunk-QCZIDOKW.js → chunk-SXLKJLAE.js} +1 -1
  120. package/Marketplace/{chunk-6IAGGRZN.js → chunk-SYENQYR7.js} +1 -1
  121. package/Marketplace/chunk-TDIZT7CR.js +265 -0
  122. package/Marketplace/{chunk-V5WYSCVT.js → chunk-TGMCGROM.js} +1 -1
  123. package/Marketplace/{chunk-OE2JYQHN.js → chunk-TNKPTRB3.js} +1 -1
  124. package/Marketplace/chunk-U42BDUJ6.js +15 -0
  125. package/Marketplace/chunk-UAVYFLCM.js +1 -0
  126. package/Marketplace/chunk-UF4FKEE7.js +93 -0
  127. package/Marketplace/chunk-UGAQVMUE.js +1 -0
  128. package/Marketplace/chunk-UJYSVGLV.js +1 -0
  129. package/Marketplace/{chunk-5GX2GLRY.js → chunk-UMY6NG57.js} +1 -1
  130. package/Marketplace/{chunk-YXFTLQ5M.js → chunk-UPYS4A4M.js} +1 -1
  131. package/Marketplace/chunk-UT7K3K63.js +1 -0
  132. package/Marketplace/chunk-VRI3CYGG.js +1 -0
  133. package/Marketplace/chunk-WCY4XEUN.js +1 -0
  134. package/Marketplace/{chunk-6XFYITUD.js → chunk-WGXUKTYP.js} +1 -1
  135. package/Marketplace/{chunk-ZZVNB72Q.js → chunk-WHZ44BAL.js} +1 -1
  136. package/Marketplace/{chunk-MNFHFW3E.js → chunk-XEMNZHW6.js} +1 -1
  137. package/Marketplace/chunk-XFFZDBGC.js +1 -0
  138. package/Marketplace/chunk-XIYHWVQR.js +1 -0
  139. package/Marketplace/{chunk-J3P46Z53.js → chunk-XQGRC7V2.js} +1 -1
  140. package/Marketplace/chunk-YISSSY6C.js +1 -0
  141. package/Marketplace/{chunk-YR2WEZDG.js → chunk-YPVYJUXS.js} +1 -1
  142. package/Marketplace/chunk-YZ74HE2T.js +1 -0
  143. package/Marketplace/chunk-Z3ITXK3D.js +1 -0
  144. package/Marketplace/chunk-ZAVDOMSW.js +1 -0
  145. package/Marketplace/{chunk-BZRANPRO.js → chunk-ZBW2ISZY.js} +1 -1
  146. package/Marketplace/{chunk-GHQH62TZ.js → chunk-ZIOAOUAM.js} +1 -1
  147. package/Marketplace/{chunk-2G6NLWKN.js → chunk-ZIUDNFYT.js} +1 -1
  148. package/Marketplace/chunk-ZKPIENCH.js +1 -0
  149. package/Marketplace/chunk-ZMVP6H6B.js +1 -0
  150. package/Marketplace/chunk-ZNDU44GH.js +51 -0
  151. package/Marketplace/chunk-ZOJYBTIP.js +1 -0
  152. package/Marketplace/{chunk-7FUVW73P.js → chunk-ZR5IXNXB.js} +1 -1
  153. package/Marketplace/index.html +3 -3
  154. package/Marketplace/main-B54MN6EI.js +1 -0
  155. package/Marketplace/{styles-NJFTKO3E.css → styles-X3FXEB7T.css} +1 -1
  156. package/package.json +1 -1
  157. package/Marketplace/chunk-23FG7KLD.js +0 -1
  158. package/Marketplace/chunk-2BBMPSAE.js +0 -93
  159. package/Marketplace/chunk-4663RHYK.js +0 -2
  160. package/Marketplace/chunk-4ASUM4N5.js +0 -1
  161. package/Marketplace/chunk-4G3QN54S.js +0 -193
  162. package/Marketplace/chunk-4NPPJE6V.js +0 -2
  163. package/Marketplace/chunk-62PFQNHJ.js +0 -1
  164. package/Marketplace/chunk-6ALHX2I4.js +0 -1
  165. package/Marketplace/chunk-7GQIIDFF.js +0 -4
  166. package/Marketplace/chunk-A5M5PE4P.js +0 -1
  167. package/Marketplace/chunk-AMXLXRQK.js +0 -1
  168. package/Marketplace/chunk-B36GHVS5.js +0 -1
  169. package/Marketplace/chunk-BF6RJNF2.js +0 -3
  170. package/Marketplace/chunk-CLKCSTGQ.js +0 -13
  171. package/Marketplace/chunk-D54NUPYF.js +0 -153
  172. package/Marketplace/chunk-DI4V7KMK.js +0 -1
  173. package/Marketplace/chunk-DPLEMBB4.js +0 -1
  174. package/Marketplace/chunk-DZ2EE5MV.js +0 -1
  175. package/Marketplace/chunk-E3HMIPER.js +0 -2
  176. package/Marketplace/chunk-ECVG56LR.js +0 -1
  177. package/Marketplace/chunk-F4FSW4IN.js +0 -15
  178. package/Marketplace/chunk-F72G2UJU.js +0 -1
  179. package/Marketplace/chunk-FFDMLLA4.js +0 -1
  180. package/Marketplace/chunk-FGDYKXWX.js +0 -1
  181. package/Marketplace/chunk-FGUFEIUH.js +0 -1
  182. package/Marketplace/chunk-FLZT42BJ.js +0 -2
  183. package/Marketplace/chunk-G27HWIHP.js +0 -1
  184. package/Marketplace/chunk-GIU55QWG.js +0 -1
  185. package/Marketplace/chunk-GPEVUTDI.js +0 -2
  186. package/Marketplace/chunk-HESF3TFE.js +0 -1
  187. package/Marketplace/chunk-HKYVBAMV.js +0 -1
  188. package/Marketplace/chunk-IIJMZKPL.js +0 -1
  189. package/Marketplace/chunk-IQGQSQGT.js +0 -1
  190. package/Marketplace/chunk-J5LZMQ7W.js +0 -1
  191. package/Marketplace/chunk-JR7HFVDD.js +0 -1
  192. package/Marketplace/chunk-K2H6WANG.js +0 -1
  193. package/Marketplace/chunk-K3XS4GTD.js +0 -1
  194. package/Marketplace/chunk-KH3NFWQA.js +0 -1
  195. package/Marketplace/chunk-KVP6OL4J.js +0 -2
  196. package/Marketplace/chunk-LPXBSHUI.js +0 -180
  197. package/Marketplace/chunk-MATSRG2L.js +0 -447
  198. package/Marketplace/chunk-NGJKZT7N.js +0 -5
  199. package/Marketplace/chunk-ORXEOOVG.js +0 -1
  200. package/Marketplace/chunk-P7SK6WYZ.js +0 -1
  201. package/Marketplace/chunk-PCZ4SAPZ.js +0 -1
  202. package/Marketplace/chunk-PO4DVIYG.js +0 -4
  203. package/Marketplace/chunk-PXB4YEY3.js +0 -1
  204. package/Marketplace/chunk-QXZQENOE.js +0 -1
  205. package/Marketplace/chunk-T5ONJF63.js +0 -7
  206. package/Marketplace/chunk-T6QOFDEE.js +0 -1
  207. package/Marketplace/chunk-UXLY7K45.js +0 -2
  208. package/Marketplace/chunk-VETHPEVU.js +0 -1
  209. package/Marketplace/chunk-VSEWXNVC.js +0 -291
  210. package/Marketplace/chunk-XJNY6BAG.js +0 -1
  211. package/Marketplace/chunk-XM6GN4VF.js +0 -1
  212. package/Marketplace/chunk-XUNM3IGC.js +0 -5
  213. package/Marketplace/chunk-YC7ADUHG.js +0 -1
  214. package/Marketplace/chunk-YIUQQGOQ.js +0 -1
  215. package/Marketplace/chunk-ZD45HY2A.js +0 -1
  216. package/Marketplace/main-4NCVCGUI.js +0 -1
@@ -0,0 +1 @@
1
+ import{a as se,b as ce,c as ue}from"./chunk-2BUABOHG.js";import{a as _e}from"./chunk-CZOD43PN.js";import{a as pe}from"./chunk-K6YEZYU4.js";import{a as de}from"./chunk-5ANFGKBV.js";import{a as me}from"./chunk-E2CS7ZMC.js";import"./chunk-R76V3PTN.js";import{a as ae}from"./chunk-5EQNOCXP.js";import"./chunk-6LH7FSOW.js";import"./chunk-XEMNZHW6.js";import"./chunk-WHZ44BAL.js";import"./chunk-LHD7CYML.js";import"./chunk-DJILLV4M.js";import"./chunk-OKAPL3YZ.js";import"./chunk-SDUUFQUI.js";import"./chunk-3RK6DDJD.js";import"./chunk-MQXPOHBV.js";import"./chunk-M5IQRAHV.js";import"./chunk-SYENQYR7.js";import"./chunk-2ZTDLZVZ.js";import"./chunk-2TZBEYNY.js";import"./chunk-SXLKJLAE.js";import"./chunk-I3LFKNW4.js";import"./chunk-Z3ITXK3D.js";import"./chunk-ACIMXBIC.js";import"./chunk-TGMCGROM.js";import{a as ne}from"./chunk-CMZW5QAE.js";import{e as ie}from"./chunk-4M63ID5T.js";import"./chunk-K5XRGNWG.js";import"./chunk-HPYTL6TX.js";import"./chunk-PW42BQIY.js";import{m as le,n as oe}from"./chunk-6X2OBNJQ.js";import{c as Y,h as Z,m as $,o as ee,z as te}from"./chunk-CSSG7NAJ.js";import"./chunk-MZI5AYCE.js";import"./chunk-UJYSVGLV.js";import{s as re}from"./chunk-HFKKITEW.js";import"./chunk-OZ77CAJD.js";import{j as J,k as K,m as Q,n as X}from"./chunk-MTUIRWOB.js";import{$c as w,Gb as I,Gc as a,Hc as v,Ic as k,Kc as g,Lc as C,Mb as x,Mc as h,Nc as z,Oc as j,Pc as H,Qc as R,Ra as O,Rc as U,Sc as G,Yb as c,Z as T,ac as W,ad as b,bd as q,dc as A,ec as N,gc as B,hc as D,ic as i,ja as L,jc as n,kc as f,oc as E,pa as y,pb as F,rb as l,tc as M,uc as u,v as P,ya as d,za as s}from"./chunk-JS55A2RS.js";import"./chunk-EU2KAMEK.js";import"./chunk-66YHNWRR.js";var V=(()=>{class t{constructor(){this.httpService=y(ie)}getAllOrders(e){return this.httpService.post(ne.GetAll,e).pipe(P(m=>m.Data))}static{this.\u0275fac=function(m){return new(m||t)}}static{this.\u0275prov=L({token:t,factory:t.\u0275fac})}}return t})();var ge=()=>[],Ce=t=>({"td-cell-hover":t});function he(t,_){if(t&1&&f(0,"variants-dropdown",25),t&2){let e=u().$implicit;c("variants",e==null?null:e.Variants)}}function Se(t,_){if(t&1&&f(0,"variant-with-image",26),t&2){let e=u().$implicit;c("variant",e==null?null:e.Variants[0])}}function ve(t,_){if(t&1&&(i(0,"span"),a(1),n()),t&2){let e=u().$implicit;l(),v(e.LogisticService==null?null:e.LogisticService.Option)}}function we(t,_){if(t&1&&(i(0,"tr")(1,"td")(2,"div",21)(3,"div",22)(4,"div"),f(5,"img",23),w(6,"channelImage"),n(),i(7,"div"),f(8,"order-link",24),n()(),i(9,"small"),a(10),w(11,"date"),n()()(),i(12,"td"),a(13),n(),i(14,"td"),x(15,he,1,1,"variants-dropdown",25)(16,Se,1,1,"variant-with-image",26),n(),i(17,"td"),a(18),w(19,"number"),n(),i(20,"td")(21,"span"),a(22),n(),x(23,ve,2,1,"span"),n()()),t&2){let e=_.$implicit;l(5),c("src",b(6,11,e==null?null:e.MarketType),F)("alt",e==null||e.Variants[0]==null?null:e.Variants[0].Name),l(3),c("order",e),l(2),k(" ",q(11,13,e==null?null:e.Created,"dd/MM/yyyy HH:mm:ss")," "),l(3),v(e.Customer),l(),W(G(18,Ce,(e.Variants==null?null:e.Variants.length)>1)),l(),A((e.Variants==null?null:e.Variants.length)>1?15:16),l(3),v(b(19,16,e.Amount)),l(4),v(e.LogisticService!=null&&e.LogisticService.Name?e.LogisticService==null?null:e.LogisticService.Name:"-"),l(),A(e.LogisticService!=null&&e.LogisticService.Option&&(e.LogisticService==null?null:e.LogisticService.Option)!="Default"?23:-1)}}function ye(t,_){if(t&1){let e=E();i(0,"div",13)(1,"table",15)(2,"thead",16)(3,"tr",17)(4,"th",18),a(5,"Number"),n(),i(6,"th",18),a(7,"Customer"),n(),i(8,"th"),a(9,"Items"),n(),i(10,"th",19),a(11,"Amount"),n(),i(12,"th",19),a(13,"Shipping"),n()()(),i(14,"tbody"),B(15,we,24,20,"tr",null,N),n()(),i(17,"app-custom-paginator",20),M("next",function(){d(e);let r=u();return s(r.initAllOrders())})("previous",function(){d(e);let r=u();return s(r.initAllOrders())}),n()()}if(t&2){let e=u(),m=H(0);l(15),D(m),l(2),c("filter",e.filter())("totaldata",m==null?null:m.length)}}function xe(t,_){t&1&&(i(0,"div",14),f(1,"app-empty-state"),n())}var Xe=(()=>{class t{constructor(){this.allService=y(V),this.filter=O({PageNumber:1,PageSize:100,ListChannelID:[],From:null,To:null})}ngOnInit(){this.initAllOrders()}initAllOrders(){this.allOrders$=this.allService.getAllOrders(this.filter()).pipe(T(1))}static{this.\u0275fac=function(m){return new(m||t)}}static{this.\u0275cmp=I({type:t,selectors:[["app-all"]],features:[R([V])],decls:29,vars:12,consts:[["headerTitle","Completed","searchBoxPlaceHolder","Search Orders...",3,"onSubmit","hideSearchBox"],[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,r){if(m&1){let p=E();z(0),w(1,"async"),i(2,"mainpanel",0),M("onSubmit",function(){return d(p),s(r.initAllOrders())}),i(3,"filters")(4,"div")(5,"label",1),a(6,"From/To"),n(),i(7,"channel-select-options",2),h("ngModelChange",function(o){return d(p),C(r.filter().ListChannelID,o)||(r.filter().ListChannelID=o),s(o)}),n()(),i(8,"div",3)(9,"label",1),a(10,"From/To"),n(),i(11,"div",4)(12,"datepicker",5),h("dateChange",function(o){return d(p),C(r.filter().From,o)||(r.filter().From=o),s(o)}),n()(),i(13,"div")(14,"datepicker",6),h("dateChange",function(o){return d(p),C(r.filter().To,o)||(r.filter().To=o),s(o)}),n()()(),i(15,"div",3)(16,"label",7),a(17,"Page Number"),n(),i(18,"input",8),h("ngModelChange",function(o){return d(p),C(r.filter().PageNumber,o)||(r.filter().PageNumber=o),s(o)}),n()(),i(19,"div",3)(20,"label",7),a(21,"Page Size"),n(),i(22,"input",9),h("ngModelChange",function(o){return d(p),C(r.filter().PageSize,o)||(r.filter().PageSize=o),s(o)}),n()()(),i(23,"content")(24,"div",10)(25,"div",11)(26,"div",12),x(27,ye,18,2,"div",13)(28,xe,2,0,"div",14),n()()()()()}if(m&2){let p=j(b(1,8,r.allOrders$)||U(11,ge));l(2),c("hideSearchBox",!0),l(5),c("multiple",!0),g("ngModel",r.filter().ListChannelID),l(5),g("date",r.filter().From),l(2),g("date",r.filter().To),l(4),g("ngModel",r.filter().PageNumber),l(4),g("ngModel",r.filter().PageSize),l(5),A((p==null?null:p.length)>0?27:28)}},dependencies:[X,J,Q,K,oe,le,me,ae,te,Y,ee,Z,$,se,ce,ue,pe,de,re,_e],encapsulation:2})}}return t})();export{Xe as AllComponent};
@@ -0,0 +1 @@
1
+ import{a as Gt,b as ke}from"./chunk-ZIUDNFYT.js";import{a as Ce}from"./chunk-ZMVP6H6B.js";import"./chunk-MS4AQ6UA.js";import{a as z}from"./chunk-E2CS7ZMC.js";import{e as ft}from"./chunk-UGAQVMUE.js";import{d as be,k as De,l as Te,m as Oe,n as Fe,o as Ee}from"./chunk-R76V3PTN.js";import{a as $t}from"./chunk-XQGRC7V2.js";import{a as st}from"./chunk-UT7K3K63.js";import"./chunk-PE5AFID4.js";import{b as Re}from"./chunk-ZR5IXNXB.js";import{a as Ie,b as we}from"./chunk-LSXUXG54.js";import{a as X}from"./chunk-5EQNOCXP.js";import{a as ot}from"./chunk-O55KM5KY.js";import{c as ve,f as ye}from"./chunk-6LH7FSOW.js";import"./chunk-XEMNZHW6.js";import{a as fe,b as Se}from"./chunk-5QAURMZF.js";import"./chunk-FWG4H3QG.js";import"./chunk-NZA4BEER.js";import"./chunk-JV4MMNGD.js";import"./chunk-GZXQUJKX.js";import"./chunk-ALKC77XL.js";import"./chunk-NTW6FBP5.js";import"./chunk-LR4UZ2OS.js";import"./chunk-F4GMWHYJ.js";import{a as Ve}from"./chunk-JRWFZQ5K.js";import{a as it}from"./chunk-7KG3DC5J.js";import{a as jt,b as Wt,c as Pe}from"./chunk-ZIOAOUAM.js";import{b as Ne}from"./chunk-GPC4DECX.js";import"./chunk-SIYMMMKQ.js";import"./chunk-WHZ44BAL.js";import"./chunk-UPYS4A4M.js";import{a as $}from"./chunk-JOBWFOGC.js";import"./chunk-PO7JVKK3.js";import"./chunk-LHD7CYML.js";import"./chunk-DJILLV4M.js";import{a as Me}from"./chunk-SH7KN2AS.js";import"./chunk-OKAPL3YZ.js";import"./chunk-SDUUFQUI.js";import"./chunk-3RK6DDJD.js";import{a as Bt}from"./chunk-MQXPOHBV.js";import{f as xe}from"./chunk-M5IQRAHV.js";import{a as R}from"./chunk-5DIRXS7I.js";import"./chunk-KXS76PRS.js";import"./chunk-OZ7LWNOK.js";import"./chunk-VRI3CYGG.js";import"./chunk-AVEGIEYT.js";import{a as _t,b as Vt,d as nt,e as ue}from"./chunk-SYENQYR7.js";import{a as ct}from"./chunk-NJFNMUFH.js";import"./chunk-2ZTDLZVZ.js";import"./chunk-2TZBEYNY.js";import"./chunk-SXLKJLAE.js";import{i as W}from"./chunk-I3LFKNW4.js";import"./chunk-Z3ITXK3D.js";import"./chunk-ACIMXBIC.js";import"./chunk-TGMCGROM.js";import"./chunk-CMZW5QAE.js";import{b as Y,e as Z}from"./chunk-4M63ID5T.js";import"./chunk-K5XRGNWG.js";import{a as he,b as _e}from"./chunk-TNKPTRB3.js";import"./chunk-HPYTL6TX.js";import{b as w,c as g}from"./chunk-PW42BQIY.js";import{b as kt,c as Rt,d as Q,i as Ut,j as At,k as Lt,m as G,n as ge}from"./chunk-6X2OBNJQ.js";import{b as de,c as ut,h as L,m as B,z as ht}from"./chunk-CSSG7NAJ.js";import"./chunk-MZI5AYCE.js";import{a as pe,b as q,c as me}from"./chunk-UJYSVGLV.js";import{r as gt,s as Ct}from"./chunk-HFKKITEW.js";import"./chunk-OZ77CAJD.js";import{E as Et,F as ce,G as et,H as Nt,J as se,f as U,g as A,j as pt,k as le,m as Ft,n as mt}from"./chunk-MTUIRWOB.js";import{$c as N,Fc as J,G as F,Gb as E,Gc as p,Hb as ae,Hc as K,Ic as b,Kc as D,Lc as T,Mb as h,Mc as O,Ra as vt,Rc as lt,Sc as I,Yb as c,Z as ne,aa as Ot,ad as k,bd as re,ca as qt,cd as H,dc as V,ea as ie,f as ee,ic as a,jc as r,ka as oe,kc as C,lc as P,mc as v,oc as x,pa as rt,pb as M,rb as o,tc as f,uc as s,v as Tt,xb as S,ya as m,za as u}from"./chunk-JS55A2RS.js";import"./chunk-EU2KAMEK.js";import"./chunk-66YHNWRR.js";var Ye=()=>["/menu/products/download/by-url"],Ue=(()=>{class i{constructor(){this.productTabs=[{Title:"Sold in Channel",Url:"/menu/products/status/sold-in-channel",Description:"SKU has been mapped between dealpos and marketplace"},{Title:"Not in POS",Url:"/menu/products/status/not-in-pos",Description:"SKU sold in Marketplace but not exist in DEALPOS"},{Title:"Not in Channel",Url:"/menu/products/status/not-in-channel",Description:"SKU has not been sold on one of channels"},{Title:"In POS",Url:"/menu/products/status/in-pos",Description:"All products which is already available in POS"},{Title:"Multiple Listing",Url:"/menu/products/status/duplicate-sku",Description:"SKU(s) which is listed more than one time (one to many)"},{Title:"Channel Statistic",Url:"/menu/products/status/channel-statistic",Description:"Product statistic from each channel obtained from the last product scan"}]}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275cmp=E({type:i,selectors:[["app-status"]],standalone:!1,decls:13,vars:3,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid","d-flex","align-items-center","justify-content-between"],[3,"Tabs"],[1,"dropdown","me-6"],["role","button","data-bs-toggle","dropdown","aria-expanded","false",1,"text-dark"],[1,"fa-solid","fa-bars","fa-lg"],[1,"dropdown-menu","dropdown-menu-end","row"],[1,"d-flex"],[1,"dropdown-item",3,"routerLink"]],template:function(n,e){n&1&&(a(0,"nav",0)(1,"div",1)(2,"div"),C(3,"nav-tab",2),r()(),a(4,"div")(5,"div",3)(6,"a",4),C(7,"i",5),r(),a(8,"div",6)(9,"div",7)(10,"a",8),p(11,"Download Product By Url"),r()()()()()(),C(12,"router-outlet")),n&2&&(o(3),c("Tabs",e.productTabs),o(7),c("routerLink",lt(2,Ye)))},dependencies:[he,ce,Nt],encapsulation:2})}}return i})();function Ze(i,d){if(i&1&&(a(0,"div",10),C(1,"img",11),a(2,"span"),p(3),r()()),i&2){let t=d.$implicit;c("matTooltip",t.disabled?"Single Product Scan disabled for this type of Channel":null),o(),c("src",t.Img,M),o(2),K(t.Name)}}function qe(i,d){if(i&1&&(a(0,"div",10),C(1,"img",11),a(2,"span"),p(3),r()()),i&2){let t=d.$implicit;c("matTooltip",t.disabled?"Single Product Scan disabled for this type of Channel":null),o(),c("src",t.Img,M),o(2),K(t.Name)}}function Qe(i,d){if(i&1&&(a(0,"div",10),C(1,"img",11),a(2,"span"),p(3),r()()),i&2){let t=d.$implicit;c("matTooltip",t.disabled?"Single Product Scan disabled for this type of Channel":null),o(),c("src",t.Img,M),o(2),K(t.Name)}}function Xe(i,d){if(i&1){let t=x();a(0,"div",12)(1,"label",13),p(2,"Scan Type"),r(),a(3,"mat-radio-group",14),O("ngModelChange",function(e){m(t);let l=s();return T(l.filter.ScanFull,e)||(l.filter.ScanFull=e),u(e)}),a(4,"mat-radio-button",15),p(5," Full (Include Inactive Products) "),r(),a(6,"mat-radio-button",16),p(7," Active "),r()()()}if(i&2){let t=s();o(3),D("ngModel",t.filter.ScanFull),o(),c("value",!0),o(2),c("value",!1)}}function tn(i,d){i&1&&(a(0,"span"),p(1,"Never"),r())}function en(i,d){if(i&1&&(a(0,"span"),p(1),N(2,"async"),r()),i&2){let t=s(2);o(),K(k(2,1,t.lastSync$))}}function nn(i,d){if(i&1){let t=x();a(0,"div",8)(1,"label",5)(2,"span",17),p(3,"Last Scan:"),r(),h(4,tn,2,0,"span"),N(5,"async"),h(6,en,3,3,"span"),r(),a(7,"mat-radio-group",18),O("ngModelChange",function(e){m(t);let l=s();return T(l.filter.UpdatedProduct,e)||(l.filter.UpdatedProduct=e),u(e)}),a(8,"mat-radio-button",19),p(9," Scan All Products "),r(),a(10,"mat-radio-button",20),p(11),r()()()}if(i&2){let t=s();o(4),V(k(5,6,t.lastSync$)==null?4:6),o(3),D("ngModel",t.filter.UpdatedProduct),o(),c("value",!1),o(2),c("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"),o(),b(" ",t.selectedChannel.TypeID==t.channelType.Tokopedia?"Product Download By URL":"Scan Updated Products"," ")}}function on(i,d){if(i&1){let t=x();a(0,"div",8)(1,"label",5),p(2," Scan Option "),r(),a(3,"mat-radio-group",21),O("ngModelChange",function(e){m(t);let l=s();return T(l.filter.Async,e)||(l.filter.Async=e),u(e)}),a(4,"mat-radio-button",22),p(5," Asynchronous (Get Notified when Complete) "),r(),a(6,"mat-radio-button",23),p(7," Synchronous (Wait until Complete) "),r()()()}if(i&2){let t=s();o(3),D("ngModel",t.filter.Async),o(),c("value",!0),o(2),c("value",!1)}}var j=(()=>{class i{constructor(t,n,e){this.dialogRef=t,this.data=n,this.router=e,this.channelService=rt(Ce),this.channelType=w,this.disabledChannelOption=!1,this.filter={ChannelID:g.GuidEMpty,ScanFull:!1,UpdatedProduct:!1,Async:!1},this.isSingleChannel=g.IsNotEmpty(n.isSingleChannel)?this.data.isSingleChannel:!1,this.disabledChannelOption=g.IsEmpty(n.disabledChannelOption)?!1:this.data.disabledChannelOption}ngOnInit(){this.initChannelOptions(),this.initFilter(),this.onSelectChannel(this.data?.filter?.ChannelID),this.initModalConfig()}initModalConfig(){this.modalConfig=new At,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==w.Tiktok||t.TypeID==w.Tokopedia||t.TypeID==w.Lazada||t.TypeID==w.WooCommerce)&&(t.disabled=!1),t)).sort(t=>t.disabled?1:-1))}onSelectChannel(t){let n=this.filterChannelById(t);this.selectedChannel=n,this.filter.Async=!0,this.iniHasScanUpdate(),this.getLastSync(t)}getLastSync(t){this.lastSync$=this.channelService.getLastSync(t).pipe(Tt(n=>(this.selectedChannel.LastSync=n.LastSync,this.setDefaultConfigUpdate(),g.IsNotEmpty(n.LastSync)?g.convertToReadableDate(n.LastSync):null)),ne(1))}setDefaultConfigUpdate(){this.filter.UpdatedProduct=!1,this.selectedChannel&&g.IsNotEmpty(this.selectedChannel.LastSync)&&(this.selectedChannel.TypeID==w.Shopee||this.selectedChannel.TypeID==w.Tiktok||this.selectedChannel.TypeID==w.Lazada)&&(this.filter.UpdatedProduct=!0)}iniHasScanUpdate(){this.selectedChannel?.TypeID!=w.WooCommerce&&this.selectedChannel?.TypeID!=w.KalCare&&this.selectedChannel?.TypeID!=w.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==w.Tokopedia&&this.filter.UpdatedProduct?this.router.navigate(["/menu/products/download/by-url"]).then(()=>{this.dialogRef.close()}):this.dialogRef.close(this.filter)}isNotEmpty(t){return g.IsNotEmpty(t)}onClose(){this.dialogRef.close()}static{this.\u0275fac=function(n){return new(n||i)(S(kt),S(Rt),S(et))}}static{this.\u0275cmp=E({type:i,selectors:[["app-scan-dialog"]],decls:15,vars:8,consts:[["selectedItem",""],["item",""],[3,"onOk","onClose","onCancel","dynamicValidated","config"],["content",""],[1,"mx-4"],[1,"mb-2","fw-bold"],["optionLabel","Name","optionValue","ID","placeholder","Select a Channel","appendTo","body","filterBy","Name",1,"w-100",2,"--p-select-padding-y","0.75rem",3,"ngModelChange","options","ngModel","filter"],["class","mt-4",4,"ngIf"],[1,"mt-8"],["class","mt-8",4,"ngIf"],["matTooltipPosition","above","matTooltipClass","custom-width-tooltip",3,"matTooltip"],[2,"width","18px","margin-right","10px",3,"src"],[1,"mt-4"],[1,"mb-2","fw-bold","mt-3"],["name","scanType",1,"form-control","h-100","rounded-1",3,"ngModelChange","ngModel"],["matTooltipClass","custom-width-tooltip","matTooltipPosition","above","matTooltip","Full Scan Product",1,"me-5",3,"value"],["matTooltipClass","custom-width-tooltip","matTooltipPosition","above","matTooltip","Only Active Product",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 l=x();a(0,"modal-material",2),f("onOk",function(){return m(l),u(e.submit())})("onClose",function(){return m(l),u(e.onClose())})("onCancel",function(){return m(l),u(e.onClose())}),a(1,"div",3)(2,"div",4)(3,"label",5),p(4,"Select a Channel"),r(),a(5,"p-select",6),O("ngModelChange",function(y){return m(l),T(e.filter.ChannelID,y)||(e.filter.ChannelID=y),u(y)}),f("ngModelChange",function(y){return m(l),u(e.onSelectChannel(y))}),h(6,Ze,4,3,"ng-template",null,0,H)(8,qe,4,3,"ng-template",null,1,H)(10,Qe,4,3,"ng-template",null,1,H),r(),h(12,Xe,8,3,"div",7)(13,nn,12,8,"div",8)(14,on,8,3,"div",9),r()()()}n&2&&(c("dynamicValidated",e.isNotEmpty(e.filter.ChannelID))("config",e.modalConfig),o(5),c("options",e.channelOptions),D("ngModel",e.filter.ChannelID),c("filter",!0),o(7),c("ngIf",!e.isSingleChannel&&e.isNotEmpty(e.filter.ChannelID)),o(),V(e.hasScanUpdate&&e.selectedChannel?13:-1),o(),c("ngIf",!e.isSingleChannel&&e.isNotEmpty(e.filter.ChannelID)))},dependencies:[mt,A,pt,Se,fe,ht,L,B,Lt,Bt,Wt,Ct,gt,ye,jt],encapsulation:2})}}return i})();function an(i,d){if(i&1&&(a(0,"mat-option",6)(1,"div"),C(2,"img",7),a(3,"span"),p(4),r()()()),i&2){let t=d.$implicit;c("value",t.ChannelID),o(2),c("src",t.logo,M),o(2),K(t.Title)}}var Pt=(()=>{class i{constructor(){this.dialogRef=rt(kt),this.channels=rt(Rt),this.channelIds=vt([]),this.channelOptions=vt([])}ngOnInit(){this.initModalConfig();let t=this.channels.filter((n,e,l)=>l.findIndex(_=>_.ChannelID===n.ChannelID)===e);this.channelOptions.set(t)}initModalConfig(){this.modalConfig=new At,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=E({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&&(a(0,"modal-material",0),f("onClose",function(){return e.onClose()})("onCancel",function(){return e.onClose()})("onOk",function(){return e.onSave()}),a(1,"div",1)(2,"div")(3,"label",2),p(4,"Select a Channel"),r(),a(5,"mat-form-field",3)(6,"mat-select",4),O("ngModelChange",function(_){return T(e.channelIds,_)||(e.channelIds=_),_}),h(7,an,5,3,"mat-option",5),r()()()()()),n&2&&(c("dynamicValidated",e.channelIds().length>0)("config",e.modalConfig),o(6),D("ngModel",e.channelIds),c("multiple",!0),o(),c("ngForOf",e.channelOptions()))},dependencies:[mt,U,Lt,Bt,xe,we,Ie,ve,ht,L,B,Ct],encapsulation:2})}}return i})();var zt=i=>[i];function rn(i,d){if(i&1){let t=x();a(0,"button",14),f("click",function(){m(t);let e=s(2);return u(e.onDetachMultipleProduct())}),C(1,"i",15),p(2),r()}if(i&2){let t,n=s(2);o(2),b("Detach (",(t=n.productService.selectedProduct(n.products))==null?null:t.length,") ")}}function ln(i,d){if(i&1&&(P(0),h(1,rn,3,1,"button",13),v()),i&2){let t=s();o(),V(t.productService.hasSelection(t.products)?1:-1)}}function cn(i,d){if(i&1){let t=x();a(0,"button",18),f("click",function(){m(t);let e=s(3);return u(e.onOpenScanDialog())}),C(1,"i",19),p(2," Scan Channel "),r()}}function sn(i,d){if(i&1&&h(0,cn,3,0,"button",17),i&2){let t=s(2);c("ngIf",!t.productService.hasSelection(t.products))}}function dn(i,d){if(i&1&&(P(0),h(1,sn,1,1,"button",16),v()),i&2){let t=s();o(),V(t.productService.hasSelection(t.products)?-1:1)}}function pn(i,d){if(i&1){let t=x();a(0,"button",21),f("click",function(){m(t);let e=s(2);return u(e.onScanMultipleProduct())}),C(1,"i",19),p(2),r()}if(i&2){let t,n=s(2);o(2),b(" Scan (",(t=n.productService.selectedProduct(n.products))==null?null:t.length,") ")}}function mn(i,d){if(i&1&&(P(0),h(1,pn,3,1,"button",20),v()),i&2){let t=s();o(),V(t.productService.hasSelection(t.products)&&t.multipeScanChannels.length>0?1:-1)}}function un(i,d){if(i&1){let t=x();a(0,"button",23),f("click",function(){m(t);let e=s(2);return u(e.onUploadMultipleProduct())}),C(1,"i",24),p(2),r()}if(i&2){let t,n=s(2);o(2),b(" Upload (",(t=n.productService.selectedProduct(n.products))==null?null:t.length,") ")}}function hn(i,d){if(i&1&&(P(0),h(1,un,3,1,"button",22),v()),i&2){let t=s();o(),V(t.productService.hasSelection(t.products)?1:-1)}}function _n(i,d){if(i&1){let t=x();a(0,"div",25)(1,"app-product-card",26),f("onUpload",function(){let e=m(t).$implicit,l=s();return u(l.onUploadToMultipleChannel(e))})("onScan",function(){let e=m(t).$implicit,l=s();return u(l.onScanSingleProduct(e))})("onDescEvent",function(){let e=m(t).index,l=s();return u(l.onOpenDialogVariant(e))})("onCheckBoxChange",function(e){let l=m(t).$implicit;return u(l.selected=e)})("onDetach",function(){let e=m(t).$implicit,l=s();return u(l.onDetachProduct([e]))}),r()()}if(i&2){let t=d.$implicit,n=s();o(),c("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 gn(i,d){i&1&&(P(0),a(1,"div",27),C(2,"app-empty-state"),r(),v())}function Cn(i,d){if(i&1){let t=x();P(0),a(1,"div",28)(2,"div",29)(3,"app-custom-paginator",30),f("next",function(){m(t);let e=s();return u(e.getProducts())})("previous",function(){m(t);let e=s();return u(e.getProducts())}),r()()(),v()}if(i&2){let t=s();o(3),c("filter",t.searchFilter)("totaldata",t.products==null?null:t.products.length)("paginationTotal",t.rowCount)("hasClicked",!0)("nextButtonAlwaysVisible",!0)}}var je=(()=>{class i{constructor(t,n,e,l,_,y,at){this.http=t,this.toastr=n,this.dialog=e,this.productService=l,this.authService=_,this.uploadProductService=y,this.route=at,this.searchFilter=new it,this.products=[],this.rowCount=0,this.multipeScanChannels=[],this.scanProductRole=R.ProductScan,this.uploadProductRole=R.ProductUpload,this.detachProductRole=R.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,[w.Tokopedia,w.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=g.GuidEMpty,this.dialog.open(j,{data:{filter:t,channelOptions:this.channelOptions},width:"600px"}).afterClosed().pipe(F(e=>g.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(Gt,{data:{title:this.products[t].Name,variants:n},width:"800px"})}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=g.GuidEMpty;let n=this.productService.filterChannelByTypeId(this.channelOptions,[w.Tokopedia,w.Tiktok]);this.dialog.open(j,{data:{filter:t,channelOptions:n,isSingleChannel:!0},width:"600px"}).afterClosed().pipe(F(l=>g.IsNotEmpty(l))).subscribe(l=>{this.searchFilter.ChannelID=l.ChannelID,this.searchFilter.ScanFull=l.ScanFull,this.searchFilter.UpdatedProduct=l.UpdatedProduct;let _=this.productService.selectedProduct(this.products),y=this.productService.getVariantCodesProducts(_);this.scanSingleProduct(y)})}onScanSingleProduct(t){let n=JSON.parse(JSON.stringify(this.searchFilter));n.ChannelID=g.GuidEMpty,this.dialog.open(j,{data:{filter:n,channelOptions:this.channelOptions,isSingleChannel:!0},width:"600px"}).afterClosed().pipe(F(e=>g.IsNotEmpty(e))).subscribe(e=>{this.searchFilter.ChannelID=e.ChannelID;let l=this.productService.getVariantCodesProduct(t);this.scanSingleProduct(l)})}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=g.GuidEMpty,n&&this.getProducts()},error:n=>{this.searchFilter.ChannelID=g.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=g.assignChannelLogo(e.Channel),n.push(...e.Channel)}),this.dialog.open(Pt,{width:"600px",data:[...n]}).afterClosed().pipe(F(e=>g.IsNotEmpty(e)),Ot(e=>this.productService.detachProduct(e))).subscribe(e=>{this.toastr.success(e.Message,Ut.Success),this.getProducts()})}onDetachMultipleProduct(){let t=this.productService.selectedProduct(this.products);this.onDetachProduct(t)}static{this.\u0275fac=function(n){return new(n||i)(S(Z),S(Y),S(Q),S($),S(W),S(ft),S(et))}}static{this.\u0275cmp=E({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 l=x();a(0,"mainpanel",1),f("onSubmit",function(y){return m(l),u(e.searchProduct(y))}),a(1,"actions"),h(2,ln,2,1,"ng-container",2)(3,dn,2,1,"ng-container",2)(4,mn,2,1,"ng-container",2)(5,hn,2,1,"ng-container",2),r(),a(6,"filters")(7,"div")(8,"label",3),p(9,"Category"),r(),a(10,"ng-select",4),f("ngModelChange",function(y){return m(l),u(e.searchFilter.Category=y)}),r()(),a(11,"div",5)(12,"mat-date-range-input",6)(13,"input",7),O("ngModelChange",function(y){return m(l),T(e.startDate,y)||(e.startDate=y),u(y)}),f("click",function(){m(l);let y=J(16);return u(y.open())}),r(),a(14,"input",8),O("ngModelChange",function(y){return m(l),T(e.endDate,y)||(e.endDate=y),u(y)}),f("click",function(){m(l);let y=J(16);return u(y.open())}),r()(),C(15,"mat-date-range-picker",null,0),r()(),a(17,"content")(18,"div",9)(19,"div",10),h(20,_n,2,11,"div",11)(21,gn,3,0,"ng-container",12),r(),h(22,Cn,4,5,"ng-container",12),r()()()}if(n&2){let l=J(16);c("headerTitle","In POS ("+e.rowCount+")"),o(2),c("ngxPermissionsOnly",I(14,zt,e.detachProductRole)),o(),c("ngxPermissionsOnly",I(16,zt,e.scanProductRole)),o(),c("ngxPermissionsOnly",I(18,zt,e.scanProductRole)),o(),c("ngxPermissionsOnly",I(20,zt,e.scanProductRole)),o(5),c("clearable",!0)("items",e.Categories)("ngModel",e.searchFilter.Category),o(2),c("rangePicker",l),o(),D("ngModel",e.startDate),o(),D("ngModel",e.endDate),o(6),c("ngForOf",e.products),o(),c("ngIf",e.products.length==0),o(),c("ngIf",e.products.length>0)}},dependencies:[U,A,ut,L,B,G,nt,X,ot,z,De,Te,Oe,Fe,q],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 Yt=i=>[i];function fn(i,d){if(i&1){let t=x();a(0,"button",12),f("click",function(){m(t);let e=s(2);return u(e.onDetachMultipleProduct())}),C(1,"i",13),p(2),r()}if(i&2){let t,n=s(2);o(2),b("Detach (",(t=n.productService.selectedProduct(n.products))==null?null:t.length,") ")}}function Sn(i,d){if(i&1&&(P(0),h(1,fn,3,1,"button",11),v()),i&2){let t=s();o(),V(t.productService.hasSelection(t.products)?1:-1)}}function xn(i,d){if(i&1){let t=x();a(0,"button",15),f("click",function(){m(t);let e=s(2);return u(e.onOpenScanDialog())}),C(1,"i",16),p(2," Scan Channel "),r()}}function Pn(i,d){if(i&1&&(P(0),h(1,xn,3,0,"button",14),v()),i&2){let t=s();o(),V(t.productService.hasSelection(t.products)?-1:1)}}function vn(i,d){if(i&1){let t=x();a(0,"button",18),f("click",function(){m(t);let e=s(2);return u(e.onScanMultipleProduct())}),C(1,"i",16),p(2),r()}if(i&2){let t=s(2);o(2),b(" Scan (",t.productService.selectedProduct(t.products).length,") ")}}function yn(i,d){if(i&1&&(P(0),h(1,vn,3,1,"button",17),v()),i&2){let t=s();o(),V(t.multipeScanChannels.length>0&&t.productService.hasSelection(t.products)?1:-1)}}function bn(i,d){if(i&1){let t=x();a(0,"button",20),f("click",function(){m(t);let e=s(2);return u(e.onUploadMultipleProduct())}),C(1,"i",21),p(2),r()}if(i&2){let t=s(2);o(2),b(" Upload (",t.productService.selectedProduct(t.products).length,") ")}}function In(i,d){if(i&1&&(P(0),h(1,bn,3,1,"button",19),v()),i&2){let t=s();o(),V(t.productService.hasSelection(t.products)?1:-1)}}function wn(i,d){if(i&1&&(a(0,"span",22),C(1,"img",23),r(),p(2)),i&2){let t=d.item;o(),c("src",t.Img,M)("alt",t.Name),o(),b(" ",t.Name," ")}}function Mn(i,d){if(i&1){let t=x();a(0,"div",24)(1,"label",25),p(2,"Item ID"),r(),a(3,"input",26),O("ngModelChange",function(e){m(t);let l=s();return T(l.searchFilter.Item_id,e)||(l.searchFilter.Item_id=e),u(e)}),r()()}if(i&2){let t=s();o(3),D("ngModel",t.searchFilter.Item_id)}}function Dn(i,d){if(i&1){let t=x();a(0,"div",27)(1,"app-product-card",28),f("onUpload",function(){let e=m(t).$implicit,l=s();return u(l.onUploadToMultipleChannel(e))})("onDescEvent",function(){let e=m(t).index,l=s();return u(l.onOpenVariantDetail(e))})("onScan",function(){let e=m(t).$implicit,l=s();return u(l.onScanSingleProduct(e))})("onCheckBoxChange",function(e){let l=m(t).$implicit;return u(l.selected=e)})("onDetach",function(){let e=m(t).$implicit,l=s();return u(l.onDetachProduct([e]))}),r()()}if(i&2){let t=d.$implicit,n=s();o(),c("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 Tn(i,d){i&1&&(P(0),a(1,"div",29),C(2,"app-empty-state"),r(),v())}function On(i,d){if(i&1){let t=x();a(0,"div",30)(1,"div",31)(2,"app-custom-paginator",32),f("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();o(2),c("filter",t.searchFilter)("totaldata",t.products==null?null:t.products.length)("paginationTotal",t.rowCount)("hasClicked",t.hasClickRowCount)}}var We=(()=>{class i{constructor(t,n,e,l,_,y,at,Dt){this.http=t,this.dialog=n,this.toastr=e,this.productService=l,this.activateRouter=_,this.authService=y,this.route=at,this.uploadProductService=Dt,this.searchFilter=new it,this.products=[],this.rowCount=0,this.hasClickRowCount=!1,this.guidEmpty=g.GuidEMpty,this.multipeScanChannels=[],this.scanProductRole=R.ProductScan,this.uploadProductRole=R.ProductUpload,this.detachProductRole=R.ProductDetach,this.channelOptions=this.authService.getChannels(),this.initMultiScanChannels()}ngOnInit(){this.activateRouter.queryParams.subscribe(t=>{t.ID?this.initPageLoader(t.ID):this.initPageLoader(g.GuidEMpty)})}initPageLoader(t){this.productService.loader(t).subscribe(n=>{this.searchFilter=n.Filter,n.Filter.ChannelID!=g.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,[w.Tokopedia,w.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(Gt,{data:{variants:n,title:this.products[t].Name},width:"800px"})}onOpenScanDialog(){let t=JSON.parse(JSON.stringify(this.searchFilter));t.ChannelID=g.GuidEMpty,this.dialog.open(j,{data:{filter:t,channelOptions:this.channelOptions},width:"600px"}).afterClosed().pipe(F(e=>g.IsNotEmpty(e))).subscribe(e=>{this.searchFilter.ChannelID=e.ChannelID,this.searchFilter.ScanFull=e.ScanFull,this.searchFilter.UpdatedProduct=e.UpdatedProduct,this.searchFilter.Async=e.Async,this.scanAllProduct()})}scanAllProduct(){let t=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);this.productService.scanAll(this.searchFilter.ChannelID,this.searchFilter.ScanFull,this.searchFilter.UpdatedProduct,this.searchFilter.Async).pipe(F(n=>n)).subscribe(n=>{this.searchFilter.Async?this.toastr.warning("You will be notified when the scan is completed.","Scan In Progress",{toastClass:"ngx-toastr toast-waiting"}):(this.productService.successToastrScanAllProduct(n,t,!this.searchFilter.UpdatedProduct),this.initPageLoader(g.GuidEMpty))})}onScanSingleProduct(t){t.Channel=this.productService.getChannelProduct(t);let n=JSON.parse(JSON.stringify(this.searchFilter));this.dialog.open(j,{data:{filter:n,channelOptions:this.channelOptions,isSingleChannel:!0},width:"600px"}).afterClosed().pipe(F(e=>g.IsNotEmpty(e))).subscribe(e=>{this.searchFilter.ChannelID=e.ChannelID;let l=this.productService.getVariantCodesProduct(t);this.scanProducts(l)})}onUploadToMultipleChannel(t){this.uploadProductService.setSelectedProduct([t]),this.route.navigate(["/menu/products/upload"])}onScanMultipleProduct(){this.searchFilter.ChannelID=g.GuidEMpty;let t=JSON.parse(JSON.stringify(this.searchFilter));this.dialog.open(j,{data:{filter:t,channelOptions:this.multipeScanChannels,isSingleChannel:!0},width:"600px"}).afterClosed().pipe(F(e=>g.IsNotEmpty(e))).subscribe(e=>{this.searchFilter.ChannelID=e.ChannelID,this.searchFilter.ScanFull=e.ScanFull,this.searchFilter.UpdatedProduct=e.UpdatedProduct;let l=this.productService.selectedProduct(this.products),_=this.productService.getVariantCodesProducts(l);this.scanProducts(_)})}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=g.GuidEMpty,n&&this.getProducts()},error:n=>{this.searchFilter.ChannelID=g.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=g.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=g.assignChannelLogo(e.Channel),n.push(...e.Channel)}),this.dialog.open(Pt,{width:"600px",data:[...n]}).afterClosed().pipe(F(e=>g.IsNotEmpty(e)),Ot(e=>this.productService.detachProduct(e))).subscribe(e=>{this.toastr.success(e.Message,Ut.Success),this.getProducts()})}onDetachMultipleProduct(){let t=this.productService.selectedProduct(this.products);this.onDetachProduct(t)}static{this.\u0275fac=function(n){return new(n||i)(S(Z),S(Q),S(Y),S($),S(Et),S(W),S(et),S(ft))}}static{this.\u0275cmp=E({type:i,selectors:[["app-sold-in-channel"]],standalone:!1,decls:19,vars:21,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"],["type","button","data-cy","scanSoldinChannel",1,"btn","btn-outline-secondary","shadow","rounded"],["type","button","data-cy","scanSoldinChannel",1,"btn","btn-outline-secondary","shadow","rounded",3,"click"],[1,"fas","fa-lg","fa-crosshairs"],["type","button","data-cy","scanInPos",1,"btn","btn-outline-secondary","shadow","rounded","me-2"],["type","button","data-cy","scanInPos",1,"btn","btn-outline-secondary","shadow","rounded","me-2",3,"click"],[1,"btn","btn-light","shadow","rounded","ms-2"],[1,"btn","btn-light","shadow","rounded","ms-2",3,"click"],["aria-hidden","true",1,"fa","fa-upload"],[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&&(a(0,"mainpanel",0),f("onSubmit",function(_){return e.searchProduct(_)}),a(1,"actions"),h(2,Sn,2,1,"ng-container",1)(3,Pn,2,1,"ng-container",1)(4,yn,2,1,"ng-container",1)(5,In,2,1,"ng-container",1),r(),a(6,"filters")(7,"div")(8,"label",2),p(9,"Channel"),r(),a(10,"ng-select",3),f("ngModelChange",function(_){return e.searchFilter.ListChannelID=_})("clear",function(){return e.onClearFilterChannel()}),h(11,wn,3,3,"ng-template",4),r()(),h(12,Mn,4,1,"div",5),r(),a(13,"content")(14,"div",6)(15,"div",7),h(16,Dn,2,11,"div",8)(17,Tn,3,0,"ng-container",9),r(),h(18,On,3,4,"div",10),r()()()),n&2&&(c("headerTitle","Sold in Channel"),o(2),c("ngxPermissionsOnly",I(13,Yt,e.detachProductRole)),o(),c("ngxPermissionsOnly",I(15,Yt,e.scanProductRole)),o(),c("ngxPermissionsOnly",I(17,Yt,e.scanProductRole)),o(),c("ngxPermissionsOnly",I(19,Yt,e.uploadProductRole)),o(5),c("clearable",!0)("multiple",!0)("items",e.channelOptions)("ngModel",e.searchFilter.ListChannelID),o(2),c("ngIf",e.searchFilter.ListChannelID!=null),o(4),c("ngForOf",e.products),o(),c("ngIf",e.products.length==0),o(),c("ngIf",e.products==null?null:e.products.length))},dependencies:[U,A,ut,L,B,G,nt,_t,Vt,X,ot,z,q],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 Zt=i=>[i];function Fn(i,d){if(i&1){let t=x();a(0,"button",12),f("click",function(){m(t);let e=s(3);return u(e.uploadMultipleProduct())}),C(1,"i",13),p(2),r()}if(i&2){let t=s(3);o(2),b(" upload (",t.selectedProducts==null?null:t.selectedProducts.length,") ")}}function En(i,d){if(i&1&&(P(0),h(1,Fn,3,1,"button",11),v()),i&2){let t=s(2);o(),c("ngIf",t.hasSelectionProduct)}}function Nn(i,d){if(i&1){let t=x();P(0),a(1,"button",14),f("click",function(){m(t);let e=s(2);return u(e.openScanDialog())}),C(2,"i",15),p(3," Scan Channel "),r(),v()}}function Vn(i,d){i&1&&(P(0),C(1,"th",23),v())}function kn(i,d){if(i&1){let t=x();P(0),a(1,"td",30)(2,"input",31),O("ngModelChange",function(e){m(t);let l=s(3).$implicit;return T(l.selected,e)||(l.selected=e),u(e)}),f("ngModelChange",function(){m(t);let e=s(4).ngIf,l=s(3);return u(l.onSelectProduct(e))}),r()(),v()}if(i&2){let t=s(3).$implicit;o(),c("rowSpan",t==null?null:t.Variants.length),o(),D("ngModel",t.selected)}}function Rn(i,d){if(i&1&&(P(0),h(1,kn,3,2,"ng-container",10),v()),i&2){let t=s().index;o(),c("ngIf",t==0)}}function Un(i,d){if(i&1){let t=x();P(0),a(1,"img",36),f("click",function(e){m(t);let l=s(3).$implicit,_=s(4);return u(_.onZoomImage(e,l==null?null:l.ImageUrl))}),r(),v()}if(i&2){let t=s(3).$implicit;o(),c("src",t==null?null:t.ImageUrl,M)}}function An(i,d){i&1&&C(0,"img",37)}function Ln(i,d){if(i&1&&(P(0),a(1,"td",30)(2,"div",32),h(3,Un,2,1,"ng-container",9)(4,An,1,0,"ng-template",null,1,H),r()(),a(6,"td",33)(7,"h4",34)(8,"span",35),p(9),r()()(),v()),i&2){let t=J(5),n=s(2).$implicit;o(),c("rowSpan",n==null?null:n.Variants.length),o(2),c("ngIf",n==null?null:n.ImageUrl)("ngIfElse",t),o(3),c("rowSpan",n==null?null:n.Variants.length),o(2),c("matTooltip",(n==null||n.Name==null?null:n.Name.length)>50?n==null?null:n.Name:""),o(),b(" ",n==null?null:n.Name," ")}}function Bn(i,d){if(i&1&&(a(0,"div")(1,"a",26),C(2,"img",38),r()()),i&2){let t=d.$implicit;o(),c("href",t.URL,M),o(),c("src",t.Img,M)("matTooltip",t.Name)}}function jn(i,d){if(i&1&&(a(0,"div"),C(1,"img",38),r()),i&2){let t=d.$implicit;o(),c("src",t.Img,M)("matTooltip",t.Name)}}function Wn(i,d){if(i&1&&(a(0,"tr"),h(1,Rn,2,1,"ng-container",4)(2,Ln,10,6,"ng-container",10),a(3,"td"),p(4),r(),a(5,"td")(6,"span"),p(7),r(),a(8,"span",25)(9,"a",26),C(10,"i",27),r()()(),a(11,"td",28)(12,"div",29),h(13,Bn,3,3,"div",24),r()(),a(14,"td",28)(15,"div",29),h(16,jn,2,2,"div",24),r()()()),i&2){let t=d.$implicit,n=d.index,e=s(5);o(),c("ngxPermissionsOnly",I(7,Zt,e.uploadProductRole)),o(),c("ngIf",n==0),o(2),b(" ",t.Name," "),o(3),b(" ",t.Code," "),o(2),c("href",e.hostName+"/menu/Products/Catalog/Variants/Info?ID="+(t==null?null:t.ID),M),o(4),c("ngForOf",t==null?null:t.Available),o(3),c("ngForOf",t==null?null:t.NotAvailable)}}function Gn(i,d){if(i&1&&(P(0),h(1,Wn,17,9,"tr",24),v()),i&2){let t=d.$implicit;o(),c("ngForOf",t.Variants)}}function $n(i,d){if(i&1&&(a(0,"tbody"),h(1,Gn,2,1,"ng-container",24),r()),i&2){let t=d.ngIf;o(),c("ngForOf",t)}}function zn(i,d){if(i&1&&(P(0),a(1,"div",16)(2,"table",17)(3,"thead",18)(4,"tr"),h(5,Vn,2,0,"ng-container",4),a(6,"th",19),p(7," Product "),r(),a(8,"th",20),p(9,"Variant"),r(),a(10,"th",20),p(11,"SKU"),r(),a(12,"th",21),p(13,"Available In"),r(),a(14,"th",22),p(15,"Not Available In"),r()()(),h(16,$n,2,1,"tbody",10),N(17,"async"),r()(),v()),i&2){let t=s(2);o(5),c("ngxPermissionsOnly",I(4,Zt,t.uploadProductRole)),o(11),c("ngIf",k(17,2,t.data$))}}function Kn(i,d){i&1&&(a(0,"div",39),C(1,"app-empty-state"),r())}function Jn(i,d){if(i&1){let t=x();a(0,"span",47),f("click",function(){m(t);let e=s(4);return u(e.getRowCount())}),a(1,"i",48),p(2,"?"),r()()}}function Hn(i,d){if(i&1&&(a(0,"span"),p(1),N(2,"number"),r()),i&2){let t=d.ngIf;o(),K(k(2,1,t==null?null:t.Count))}}function Yn(i,d){if(i&1){let t=x();a(0,"a",49),f("click",function(){m(t);let e=s(4);return u(e.onNextPage())}),C(1,"i",50),p(2," Next"),r()}}function Zn(i,d){if(i&1){let t=x();a(0,"a",51),f("click",function(){m(t);let e=s(4);return u(e.onLastPage())}),C(1,"i",52),p(2," Last"),r()}}function qn(i,d){if(i&1&&(P(0),a(1,"div",40)(2,"div",41)(3,"div",42),p(4),N(5,"number"),h(6,Jn,3,0,"span",43)(7,Hn,3,3,"span",10),N(8,"async"),p(9),r()(),a(10,"div",44),h(11,Yn,3,0,"a",45)(12,Zn,3,0,"a",46),r()(),v()),i&2){let t=s().ngIf,n=s(2);o(4),b(" Showing 1 - ",k(5,6,t==null?null:t.length)," of "),o(2),c("ngIf",n.paginationService.hideCount),o(),c("ngIf",!n.paginationService.hideCount&&k(8,8,n.rowCount$)),o(2),b(" records ~ ",n.paginationService.footerPageNumber," Page "),o(2),c("ngIf",n.paginationService.disableNextButton&&!n.paginationService.goToLastPage),o(),c("ngIf",n.paginationService.disableNextButton&&!n.paginationService.goToLastPage)}}function Qn(i,d){if(i&1&&(P(0),h(1,qn,13,10,"ng-container",10),v()),i&2){let t=d.ngIf;o(),c("ngIf",(t==null?null:t.length)>0)}}function Xn(i,d){if(i&1){let t=x();a(0,"mainpanel",3),f("onSubmit",function(e){m(t);let l=s();return u(l.searchProduct(e))}),a(1,"actions"),h(2,En,2,1,"ng-container",4)(3,Nn,4,0,"ng-container",4),a(4,"button",5),f("click",function(){m(t);let e=s();return u(e.openExportDialog())}),C(5,"i",6),a(6,"span"),p(7,"Export"),r()()(),a(8,"content")(9,"div",7)(10,"div",8),h(11,zn,18,6,"ng-container",9),N(12,"async"),h(13,Kn,2,0,"ng-template",null,0,H),r(),h(15,Qn,2,1,"ng-container",10),N(16,"async"),r()()()}if(i&2){let t,n=J(14),e=s();c("hideSearchDropdown",!0),o(2),c("ngxPermissionsOnly",I(10,Zt,e.uploadProductRole)),o(),c("ngxPermissionsOnly",I(12,Zt,e.scanProductRole)),o(8),c("ngIf",((t=k(12,6,e.data$))==null?null:t.length)>0)("ngIfElse",n),o(4),c("ngIf",k(16,8,e.data$))}}var Ge=(()=>{class i{constructor(t,n,e,l,_,y,at,Dt,He){this.http=t,this.dialog=n,this.toastr=e,this.route=l,this.productService=_,this.paginationService=y,this.biggerPictureService=at,this.authService=Dt,this.uploadProductService=He,this.loaderAPI="product/Load",this.rowCountAPI="product/GetNotInChannelRowCount",this.notChannelAPI="product/GetNotInChannelV2",this.hasSelectionProduct=!1,this.selectedProducts=[],this.scanProductRole=R.ProductScan,this.uploadProductRole=R.ProductUpload,this.channelOptions=Dt.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(ie(t=>{this.filterSearch=t.Filter,this.paginationService.reloadPagination(t.Filter)}))}iniData(){this.data$=this.paginationService.data$.pipe(Tt(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=g.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=g.GuidEMpty,this.dialog.open(j,{data:{filter:t,channelOptions:this.channelOptions},width:"600px"}).afterClosed().pipe(F(e=>g.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(Ne,{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(Z),S(Q),S(Y),S(et),S($),S(Ve),S(Me),S(W),S(ft))}}static{this.\u0275cmp=E({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&&(h(0,Xn,17,14,"mainpanel",2),N(1,"async")),n&2&&c("ngIf",k(1,1,e.loader$))},dependencies:[U,A,de,L,B,G,gt,z,q,pt,Ft],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 te=i=>[i],ti=()=>[];function ei(i,d){if(i&1){let t=x();a(0,"button",16),f("click",function(){m(t);let e=s(2);return u(e.openScanDialog())}),C(1,"i",17),p(2," Scan Channel "),r()}}function ni(i,d){if(i&1&&(P(0),h(1,ei,3,0,"button",15),v()),i&2){let t=s();o(),V(t.productService.hasSelection(t.products)?-1:1)}}function ii(i,d){if(i&1){let t=x();a(0,"button",19),f("click",function(){m(t);let e=s(2);return u(e.onDownloadAllProduct("SELECTED"))}),C(1,"i",20),p(2),r()}if(i&2){let t,n=s(2);o(2),b(" Download (",(t=n.productService.selectedProduct(n.products))==null?null:t.length,") ")}}function oi(i,d){if(i&1&&(P(0),h(1,ii,3,1,"button",18),v()),i&2){let t=s();o(),V(t.productService.hasSelection(t.products)?1:-1)}}function ai(i,d){if(i&1&&(a(0,"span",21),C(1,"img",22),r(),p(2)),i&2){let t=d.item;o(),c("src",t.Img,M)("alt",t.Name),o(),b(" ",t.Name," ")}}function ri(i,d){if(i&1){let t=x();a(0,"div",23)(1,"app-product-card",24),f("onCheckBoxChange",function(e){let l=m(t).index,_=s();return u(_.onSelectProduct(e,l))})("onDescEvent",function(){let e=m(t).index,l=s();return u(l.onShowVariantDetail(e))})("onDownload",function(){let e=m(t).$implicit,l=s();return u(l.onDownloadProduct(e))})("onScan",function(){let e=m(t).$implicit,l=s();return u(l.onScanChannel(e))}),r()()}if(i&2){let t=d.$implicit,n=s();o(),c("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?I(10,te,t==null?null:t.Channel):lt(12,ti))("showCheckBox",n.hasDownloadRole())("scanButton",!0)}}function li(i,d){i&1&&(P(0),a(1,"div",25),C(2,"app-empty-state"),r(),v())}function ci(i,d){if(i&1){let t=x();a(0,"div",26)(1,"div",27)(2,"app-custom-paginator",28),f("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();o(2),c("filter",t.searchFilter)("totaldata",t.products==null?null:t.products.length)("paginationTotal",t.rowCount)("hasClicked",t.hasClickRowCount)}}var $e=(()=>{class i{constructor(t,n,e,l,_,y){this.http=t,this.dialog=n,this.productService=e,this.toastrService=l,this.activateRouter=_,this.authService=y,this.permissionService=rt(pe),this.searchFilter=new it,this.products=[],this.hasClickRowCount=!1,this.scanProductRole=R.ProductScan,this.downloadProductRole=R.ProductDownload,this.hasDownloadRole=vt(!0),this.channelOptions=this.authService.getChannels(),this.permissionService.hasPermission(this.downloadProductRole).then(at=>{this.hasDownloadRole.set(at)})}ngOnInit(){this.activateRouter.queryParams.subscribe(t=>{t.ID?this.initPageLoader(t.ID):this.initPageLoader(g.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?g.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=g.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(g.GuidEMpty),this.productService.successToastrScanAllProduct(n,t,!this.searchFilter.UpdatedProduct)),this.searchFilter.ChannelID=g.GuidEMpty})}openScanDialog(){let t=JSON.parse(JSON.stringify(this.searchFilter));t.ChannelID=g.GuidEMpty,this.dialog.open(j,{data:{filter:t,channelOptions:this.channelOptions},width:"600px"}).afterClosed().pipe(F(e=>g.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(g.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(ke,{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(Z),S(Q),S($),S(Y),S(Et),S(W))}}static{this.\u0275cmp=E({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&&(a(0,"mainpanel",0),f("onSubmit",function(_){return e.onSearch(_)}),a(1,"actions"),h(2,ni,2,1,"ng-container",1)(3,oi,2,1,"ng-container",1),r(),a(4,"filters")(5,"div")(6,"label",2),p(7,"Channel"),r(),a(8,"ng-select",3),O("ngModelChange",function(_){return T(e.searchFilter.ChannelID,_)||(e.searchFilter.ChannelID=_),_}),h(9,ai,3,3,"ng-template",4),r()(),a(10,"div",5)(11,"label",6),p(12,"SKU Assigned"),r(),a(13,"mat-radio-group",7),O("ngModelChange",function(_){return T(e.searchFilter.HaveSku,_)||(e.searchFilter.HaveSku=_),_}),a(14,"mat-radio-button",8),p(15," All "),r(),a(16,"mat-radio-button",8),p(17," Yes "),r(),a(18,"mat-radio-button",8),p(19," No "),r()()(),a(20,"div",5)(21,"label",6),p(22,"Item ID"),r(),a(23,"input",9),O("ngModelChange",function(_){return T(e.searchFilter.Item_id,_)||(e.searchFilter.Item_id=_),_}),r()()(),a(24,"content")(25,"div",10)(26,"div",11),h(27,ri,2,13,"div",12)(28,li,3,0,"ng-container",13),r(),h(29,ci,3,4,"div",14),r()()()),n&2&&(o(2),c("ngxPermissionsOnly",I(13,te,e.scanProductRole)),o(),c("ngxPermissionsOnly",I(15,te,e.downloadProductRole)),o(5),c("clearable",!0)("items",e.channelOptions),D("ngModel",e.searchFilter.ChannelID),o(5),D("ngModel",e.searchFilter.HaveSku),o(),c("value",0),o(2),c("value",1),o(2),c("value",2),o(5),D("ngModel",e.searchFilter.Item_id),o(4),c("ngForOf",e.products),o(),c("ngIf",e.products.length==0),o(),c("ngIf",(e.products==null?null:e.products.length)>0))},dependencies:[U,A,ut,L,B,G,nt,_t,jt,Wt,X,ot,z,q],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 si(i,d){if(i&1&&(a(0,"span",9),C(1,"img",10),r(),p(2)),i&2){let t=d.item,n=s();o(),c("src",n.getChannelLogo(t.TypeID),M),o(),b(" ",t.Name," ")}}function di(i,d){if(i&1&&(a(0,"div",11),C(1,"app-duplicate-product-card",12),r()),i&2){let t=d.$implicit,n=d.index;o(),c("imageForZoom",t.ImageUrl)("title",t.Name)("code",t.Code)("id",n)("image",t.ThumbnailURL)("channels",t.Channels)}}function pi(i,d){i&1&&(P(0),a(1,"div",13),C(2,"app-empty-state"),r(),v())}function mi(i,d){if(i&1){let t=x();P(0),a(1,"div",14)(2,"div",15)(3,"app-custom-paginator",16),f("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()()(),v()}if(i&2){let t=s();o(3),c("filter",t.searchFilter)("totaldata",t.products==null?null:t.products.length)("paginationTotal",t.rowCount)("hasClicked",t.hasClickedRowCount)}}var ze=(()=>{class i{constructor(t,n,e){this.httpService=t,this.productService=n,this.authService=e,this.searchFilter=new it,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=g.GuidEMpty}getChannelLogo(t){return g.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(Z),S($),S(W))}}static{this.\u0275cmp=E({type:i,selectors:[["app-duplicate-sku"]],standalone:!1,decls:14,vars:7,consts:[["headerTitle","Multiple Listing","textButton"," Search","description","SKU(s) which is listed more than one time (one to many)",3,"onSubmit"],["container",""],[1,"mb-2"],["appendTo","body","bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"ngModelChange","clear","multiple","clearable","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],[1,"container-fluid"],[1,"row","mt-8","mx-1"],["class","col-12 col-md-6 col-xl-4 px-3 my-3",4,"ngFor","ngForOf"],[4,"ngIf"],[1,"me-2"],["alt","",2,"width","18px",3,"src"],[1,"col-12","col-md-6","col-xl-4","px-3","my-3"],[3,"imageForZoom","title","code","id","image","channels"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"row","mt-2","justify-content-end"],[1,"col-md-12"],[3,"next","previous","total","filter","totaldata","paginationTotal","hasClicked"]],template:function(n,e){n&1&&(a(0,"mainpanel",0),f("onSubmit",function(_){return e.onSearch(_)}),a(1,"filters")(2,"div",1)(3,"div")(4,"h6",2),p(5,"Channel"),r(),a(6,"ng-select",3),O("ngModelChange",function(_){return T(e.searchFilter.ListChannelID,_)||(e.searchFilter.ListChannelID=_),_}),f("clear",function(){return e.onClearFilter()}),h(7,si,3,2,"ng-template",4),r()()()(),a(8,"content")(9,"div",5)(10,"div",6),h(11,di,2,6,"div",7)(12,pi,3,0,"ng-container",8),r(),h(13,mi,4,4,"ng-container",8),r()()()),n&2&&(o(6),c("multiple",!0)("clearable",!0)("items",e.channelOptions),D("ngModel",e.searchFilter.ListChannelID),o(5),c("ngForOf",e.products),o(),c("ngIf",(e.products==null?null:e.products.length)==0),o(),c("ngIf",(e.products==null?null:e.products.length)>0))},dependencies:[U,A,L,B,G,nt,_t,Vt,$t,X,z],encapsulation:2})}}return i})();var ui=()=>["/menu/products/status/sold-in-channel"],Ke=i=>({ID:i}),hi=()=>["/menu/products/status/not-in-pos"],_i=i=>[i];function gi(i,d){if(i&1&&(P(0),p(1),v()),i&2){let t=s().$implicit;o(),b(" ",t.Count," ")}}function Ci(i,d){if(i&1){let t=x();a(0,"span",25),f("click",function(){m(t);let e=s().$implicit,l=s(2);return u(l.getLiveProductCount(e.ID,e))}),C(1,"i",26),r()}}function fi(i,d){if(i&1){let t=x();P(0),a(1,"button",27),f("click",function(){m(t);let e=s().$implicit,l=s(2);return u(l.onScanChannel(e))}),C(2,"i",28),p(3," Scan "),r(),v()}}function Si(i,d){if(i&1){let t=x();a(0,"tr")(1,"td"),C(2,"img",17),a(3,"span",18),p(4),r()(),a(5,"td",19),h(6,gi,2,1,"ng-container",6)(7,Ci,2,0,"ng-template",null,1,H),r(),a(9,"td",19)(10,"a",20),p(11),N(12,"number"),r()(),a(13,"td",19)(14,"a",20),p(15),N(16,"number"),r()(),a(17,"td"),p(18),N(19,"date"),r(),a(20,"td")(21,"div",21),h(22,fi,4,0,"ng-container",22),a(23,"button",23),f("click",function(){let e=m(t).$implicit,l=s(2);return u(l.onClearCache(e.ID))}),C(24,"i",24),p(25," Clear "),r()()()()}if(i&2){let t=d.$implicit,n=J(8),e=s(2);o(2),c("src",e.getChannelLogo(t.TypeID),M),o(2),K(t.Name),o(2),c("ngIf",t.Count!==void 0)("ngIfElse",n),o(4),c("routerLink",lt(19,ui))("queryParams",I(20,Ke,t.ID)),o(),b(" ",k(12,12,t.SoldInChannel)," "),o(3),c("routerLink",lt(22,hi))("queryParams",I(23,Ke,t.ID)),o(),b(" ",k(16,14,t.NotInPOS)," "),o(3),b(" ",t.LastSync?re(19,16,t.LastSync,"dd MMM yyyy HH:mm"):"Never"," "),o(4),c("ngxPermissionsOnly",I(25,_i,e.scanProductRole))}}function xi(i,d){if(i&1&&(P(0),a(1,"div",7)(2,"table",8)(3,"thead",9)(4,"tr",10)(5,"th"),p(6,"Channel"),r(),a(7,"th",11),p(8," Live Product "),r(),a(9,"th",12),p(10," Sold In Channel "),r(),a(11,"th",13),p(12," Product Not in POS "),r(),a(13,"th",14),p(14,"Last Sync"),r(),C(15,"th",15),r()(),a(16,"tbody"),h(17,Si,26,27,"tr",16),N(18,"async"),r()()(),v()),i&2){let t,n=s();o(17),c("ngForOf",(t=k(18,1,n.channels$))==null?null:t.Data)}}function Pi(i,d){i&1&&(a(0,"div",29),C(1,"app-empty-state"),r())}var Je=(()=>{class i{constructor(t,n,e,l){this.productService=t,this.toastr=n,this.dialog=e,this.authService=l,this.scanProductRole=R.ProductScan,this.destroy$=new ee,this.channelOptions=l.getChannels()}ngOnInit(){this.setObsProductStatistic()}setObsProductStatistic(){this.channels$=this.productService.getProductStatistic()}getLiveProductCount(t,n){this.productService.getTotalProductLive(t).pipe(qt(this.destroy$)).subscribe(e=>{n.Count=e.Count})}onScanChannel(t){this.dialog.open(j,{width:"700px",data:{channelOptions:this.channelOptions,filter:{ChannelID:t.ID},disabledChannelOption:!0}}).afterClosed().pipe(F(n=>g.IsNotEmpty(n))).subscribe(n=>{this.scanAllProduct(t.ID,n)})}scanAllProduct(t,n){let e=this.productService.findChannelById(t,this.channelOptions);this.productService.scanAll(n.ChannelID,n.ScanFull,n.UpdatedProduct,n.Async).pipe(F(l=>l)).subscribe(l=>{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(l,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(qt(this.destroy$)).subscribe(e=>{this.toastr.success("Successfully cleared cache","Success"),this.setObsProductStatistic()})}getChannelLogo(t){return g.getChannelLogoByTypeId(t)}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}static{this.\u0275fac=function(n){return new(n||i)(S($),S(Y),S(Q),S(W))}}static{this.\u0275cmp=E({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&&(a(0,"mainpanel",2)(1,"content")(2,"div",3)(3,"div",4)(4,"div",5),h(5,xi,19,3,"ng-container",6),N(6,"async"),h(7,Pi,2,0,"ng-template",null,0,H),r()()()()()),n&2){let l,_=J(8);c("hideSearchBox",!0)("hideSearchDropdown",!0),o(5),c("ngIf",((l=k(6,4,e.channels$))==null||l.Data==null?null:l.Data.length)>0)("ngIfElse",_)}},dependencies:[U,A,G,gt,Nt,z,q,pt,Ft,le],encapsulation:2})}}return i})();var vi=[{component:Ue,path:"",children:[{path:"",redirectTo:"sold-in-channel",pathMatch:"full"},{path:"in-pos",component:je,canActivate:[ct,st],data:{title:"Products in POS"}},{path:"sold-in-channel",component:We,canActivate:[ct,st],data:{title:"Products Sold in Channel"}},{path:"not-in-channel",component:Ge,canActivate:[ct,st],data:{title:"Products not in Channel"}},{path:"not-in-pos",component:$e,canActivate:[ct,st],data:{title:"Products not in POS"}},{path:"duplicate-sku",component:ze,canActivate:[ct,st],data:{title:"Duplicate Sku in Channel"}},{path:"channel-statistic",component:Je,canActivate:[ct,st],data:{title:"Channel Statistic"}}]}],Ma=(()=>{class i{static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275mod=ae({type:i})}static{this.\u0275inj=oe({imports:[mt,ht,ge,Ct,ue,Re,Pe,_e,$t,X,ot,se.forChild(vi),Ee,be,Pt,me]})}}return i})();export{Ma as StatusModule};
@@ -1 +1 @@
1
- import{a as V}from"./chunk-VGXQU74M.js";import{r as j,s as L}from"./chunk-TMFFA26Y.js";import{y as U}from"./chunk-DPLEMBB4.js";import{c as z}from"./chunk-PXB4YEY3.js";import{d as F,f as T,g as D,n as N,r as k}from"./chunk-GPEVUTDI.js";import{Dc as I,Eb as P,Ec as s,Fc as v,Gc as M,Hc as O,Kb as p,Qc as C,Vb as f,Wb as a,ad as E,gc as r,hc as l,ic as m,jc as _,kc as h,mc as w,ob as u,qb as i,rc as S,sc as d,wb as y,ya as x,za as b}from"./chunk-T5ONJF63.js";var Z=t=>({"border-bottom-0":t}),B=t=>({"border-bottom":t});function $(t,c){if(t&1){let e=w();_(0),r(1,"img",14),S("click",function(n){x(e);let g=d();return b(g.onZoomImage(n))}),l(),h()}if(t&2){let e=d();i(),a("ngSrc",e.image)("fill",!0)}}function R(t,c){t&1&&m(0,"img",15),t&2&&a("fill",!0)}function q(t,c){if(t&1&&(r(0,"div",16),m(1,"i",17),r(2,"span"),s(3),l()()),t&2){let e=d();i(3),v(e.code)}}function A(t,c){if(t&1&&(_(0),r(1,"div",27)(2,"div",28),s(3),l(),r(4,"div")(5,"a",29),m(6,"i",30),l()()(),h()),t&2){let e=c.$implicit,o=c.index,n=d().$implicit;i(),a("ngClass",C(4,B,o!==(n==null?null:n.Variants.length)-1)),i(2),O(" ",e.ProductName," - ",e.Name," "),i(2),a("href",e.URL,u)}}function G(t,c){if(t&1&&(r(0,"div",18)(1,"h2",19)(2,"button",20)(3,"div",21),m(4,"img",22),r(5,"span",23),s(6),l()()()(),r(7,"div",24)(8,"div",25),p(9,A,7,6,"ng-container",26),l()()()),t&2){let e=c.$implicit,o=c.index,n=d();a("ngClass",C(10,Z,n.channels.length-1==o)),i(),a("id","heading"+o+n.id),i(),f("data-bs-target","#collapse"+o+n.id)("aria-controls","#collapse"+o+n.id),i(2),a("src",n.getChannelLogo(e.TypeID),u),i(),a("matTooltip",(e==null||e.ChannelName==null?null:e.ChannelName.length)>30?e.ChannelName:""),i(),v(e.ChannelName),i(),a("id","collapse"+o+n.id),f("aria-labelledby","heading"+o+n.id),i(2),a("ngForOf",e.Variants)}}var te=(()=>{class t{constructor(e){this.biggerPictureService=e}getChannelLogo(e){return z.getChannelLogoByTypeId(e)}onZoomImage(e){this.biggerPictureService.openBiggerPicture(e,this.imageForZoom)}static{this.\u0275fac=function(o){return new(o||t)(y(V))}}static{this.\u0275cmp=P({type:t,selectors:[["app-duplicate-product-card"]],inputs:{image:"image",imageForZoom:"imageForZoom",title:"title",code:"code",channels:"channels",id:"id"},decls:16,vars:5,consts:[["elsePic",""],[1,"card"],[1,"card-body","py-6"],[1,"row"],[1,"col-4"],[1,"productUpload_defaultSize","me-2","image-upload"],[1,"imgContainer"],[4,"ngIf","ngIfElse"],[1,"col-8","d-inline-block","justify-content-between","gx-0",2,"padding-left","0px"],[1,"itemTitle"],["class","description",4,"ngIf"],[1,"card-footer",2,"padding-left","0px","padding-right","0px"],["id","accordionParent",1,"accordion","accordion-flush"],["class","accordion-item border-start-0 border-end-0",3,"ngClass",4,"ngFor","ngForOf"],[1,"rounded","imgUpload","float-left","cursor-pointer",3,"click","ngSrc","fill"],["ngSrc","//res.cloudinary.com/pos/image/upload/w_110/POS/Images/Icon/products_thumb.png",1,"rounded","float-left","imgUpload",3,"fill"],[1,"description"],[1,"fa","fa-barcode","me-2"],[1,"accordion-item","border-start-0","border-end-0",3,"ngClass"],[1,"accordion-header",3,"id"],["type","button","data-bs-toggle","collapse","aria-expanded","true",1,"accordion-button","collapsed",2,"height","40px"],[1,"d-flex","align-items-center","justify-content-start","w-100"],["alt","",1,"channel-logo",3,"src"],[1,"fs-4","ps-4","text-ellipsis",2,"max-width","13vw",3,"matTooltip"],["data-bs-parent","#accordionParent",1,"accordion-collapse","collapse",3,"id"],[1,"accordion-body",2,"padding-top","0px","padding-bottom","0px"],[4,"ngFor","ngForOf"],[1,"d-flex","justify-content-between","align-items-center","py-4",3,"ngClass"],[1,"text-ellipsis"],["target","_blank",1,"text-secondary",3,"href"],[1,"fa-solid","fa-arrow-up-right-from-square","external-link-custom"]],template:function(o,n){if(o&1&&(r(0,"div",1)(1,"div",2)(2,"div",3)(3,"div",4)(4,"div",5)(5,"div",6),p(6,$,2,2,"ng-container",7)(7,R,1,1,"ng-template",null,0,E),l()()(),r(9,"div",8)(10,"h4",9),s(11),l(),p(12,q,4,1,"div",10),l()()(),r(13,"div",11)(14,"div",12),p(15,G,10,12,"div",13),l()()()),o&2){let g=I(8);i(6),a("ngIf",n.image)("ngIfElse",g),i(5),M(" ",n.title," "),i(),a("ngIf",n.code),i(3),a("ngForOf",n.channels)}},dependencies:[N,F,T,D,U,L,j,k],styles:[`.productUpload_defaultSize[_ngcontent-%COMP%]{max-width:100px!important;max-height:100px!important;width:auto!important;height:auto!important}.image-upload[_ngcontent-%COMP%]{position:relative}.imgContainer[_ngcontent-%COMP%]{width:100%;height:100px}.imgUpload[_ngcontent-%COMP%]{width:100%;height:100%;object-fit:scale-down}.channel-logo[_ngcontent-%COMP%]{width:18px;height:18px}.accordion-button[_ngcontent-%COMP%]{background-color:#ededed69!important}.accordion-button[_ngcontent-%COMP%]:not(.collapsed){background-color:#ededed69!important;color:#333}.accordion-button[_ngcontent-%COMP%]:after{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23333333'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e")}.accordion-button[_ngcontent-%COMP%]:focus{box-shadow:none!important}.card[_ngcontent-%COMP%]{margin-bottom:0!important}`]})}}return t})();export{te as a};
1
+ import{a as V}from"./chunk-SH7KN2AS.js";import{c as z}from"./chunk-PW42BQIY.js";import{z as U}from"./chunk-CSSG7NAJ.js";import{r as j,s as L}from"./chunk-HFKKITEW.js";import{d as F,f as T,g as D,n as N,r as k}from"./chunk-MTUIRWOB.js";import{Fc as I,Gb as P,Gc as s,Hc as v,Ic as M,Jc as O,Mb as p,Sc as C,Xb as f,Yb as a,cd as E,ic as r,jc as l,kc as m,lc as _,mc as h,oc as w,pb as u,rb as i,tc as S,uc as d,xb as y,ya as x,za as b}from"./chunk-JS55A2RS.js";var Z=t=>({"border-bottom-0":t}),B=t=>({"border-bottom":t});function $(t,c){if(t&1){let e=w();_(0),r(1,"img",14),S("click",function(n){x(e);let g=d();return b(g.onZoomImage(n))}),l(),h()}if(t&2){let e=d();i(),a("ngSrc",e.image)("fill",!0)}}function R(t,c){t&1&&m(0,"img",15),t&2&&a("fill",!0)}function q(t,c){if(t&1&&(r(0,"div",16),m(1,"i",17),r(2,"span"),s(3),l()()),t&2){let e=d();i(3),v(e.code)}}function A(t,c){if(t&1&&(_(0),r(1,"div",27)(2,"div",28),s(3),l(),r(4,"div")(5,"a",29),m(6,"i",30),l()()(),h()),t&2){let e=c.$implicit,o=c.index,n=d().$implicit;i(),a("ngClass",C(4,B,o!==(n==null?null:n.Variants.length)-1)),i(2),O(" ",e.ProductName," - ",e.Name," "),i(2),a("href",e.URL,u)}}function G(t,c){if(t&1&&(r(0,"div",18)(1,"h2",19)(2,"button",20)(3,"div",21),m(4,"img",22),r(5,"span",23),s(6),l()()()(),r(7,"div",24)(8,"div",25),p(9,A,7,6,"ng-container",26),l()()()),t&2){let e=c.$implicit,o=c.index,n=d();a("ngClass",C(10,Z,n.channels.length-1==o)),i(),a("id","heading"+o+n.id),i(),f("data-bs-target","#collapse"+o+n.id)("aria-controls","#collapse"+o+n.id),i(2),a("src",n.getChannelLogo(e.TypeID),u),i(),a("matTooltip",(e==null||e.ChannelName==null?null:e.ChannelName.length)>30?e.ChannelName:""),i(),v(e.ChannelName),i(),a("id","collapse"+o+n.id),f("aria-labelledby","heading"+o+n.id),i(2),a("ngForOf",e.Variants)}}var te=(()=>{class t{constructor(e){this.biggerPictureService=e}getChannelLogo(e){return z.getChannelLogoByTypeId(e)}onZoomImage(e){this.biggerPictureService.openBiggerPicture(e,this.imageForZoom)}static{this.\u0275fac=function(o){return new(o||t)(y(V))}}static{this.\u0275cmp=P({type:t,selectors:[["app-duplicate-product-card"]],inputs:{image:"image",imageForZoom:"imageForZoom",title:"title",code:"code",channels:"channels",id:"id"},decls:16,vars:5,consts:[["elsePic",""],[1,"card"],[1,"card-body","py-6"],[1,"row"],[1,"col-4"],[1,"productUpload_defaultSize","me-2","image-upload"],[1,"imgContainer"],[4,"ngIf","ngIfElse"],[1,"col-8","d-inline-block","justify-content-between","gx-0",2,"padding-left","0px"],[1,"itemTitle"],["class","description",4,"ngIf"],[1,"card-footer",2,"padding-left","0px","padding-right","0px"],["id","accordionParent",1,"accordion","accordion-flush"],["class","accordion-item border-start-0 border-end-0",3,"ngClass",4,"ngFor","ngForOf"],[1,"rounded","imgUpload","float-left","cursor-pointer",3,"click","ngSrc","fill"],["ngSrc","//res.cloudinary.com/pos/image/upload/w_110/POS/Images/Icon/products_thumb.png",1,"rounded","float-left","imgUpload",3,"fill"],[1,"description"],[1,"fa","fa-barcode","me-2"],[1,"accordion-item","border-start-0","border-end-0",3,"ngClass"],[1,"accordion-header",3,"id"],["type","button","data-bs-toggle","collapse","aria-expanded","true",1,"accordion-button","collapsed",2,"height","40px"],[1,"d-flex","align-items-center","justify-content-start","w-100"],["alt","",1,"channel-logo",3,"src"],[1,"fs-4","ps-4","text-ellipsis",2,"max-width","13vw",3,"matTooltip"],["data-bs-parent","#accordionParent",1,"accordion-collapse","collapse",3,"id"],[1,"accordion-body",2,"padding-top","0px","padding-bottom","0px"],[4,"ngFor","ngForOf"],[1,"d-flex","justify-content-between","align-items-center","py-4",3,"ngClass"],[1,"text-ellipsis"],["target","_blank",1,"text-secondary",3,"href"],[1,"fa-solid","fa-arrow-up-right-from-square","external-link-custom"]],template:function(o,n){if(o&1&&(r(0,"div",1)(1,"div",2)(2,"div",3)(3,"div",4)(4,"div",5)(5,"div",6),p(6,$,2,2,"ng-container",7)(7,R,1,1,"ng-template",null,0,E),l()()(),r(9,"div",8)(10,"h4",9),s(11),l(),p(12,q,4,1,"div",10),l()()(),r(13,"div",11)(14,"div",12),p(15,G,10,12,"div",13),l()()()),o&2){let g=I(8);i(6),a("ngIf",n.image)("ngIfElse",g),i(5),M(" ",n.title," "),i(),a("ngIf",n.code),i(3),a("ngForOf",n.channels)}},dependencies:[N,F,T,D,U,L,j,k],styles:[`.productUpload_defaultSize[_ngcontent-%COMP%]{max-width:100px!important;max-height:100px!important;width:auto!important;height:auto!important}.image-upload[_ngcontent-%COMP%]{position:relative}.imgContainer[_ngcontent-%COMP%]{width:100%;height:100px}.imgUpload[_ngcontent-%COMP%]{width:100%;height:100%;object-fit:scale-down}.channel-logo[_ngcontent-%COMP%]{width:18px;height:18px}.accordion-button[_ngcontent-%COMP%]{background-color:#ededed69!important}.accordion-button[_ngcontent-%COMP%]:not(.collapsed){background-color:#ededed69!important;color:#333}.accordion-button[_ngcontent-%COMP%]:after{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23333333'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e")}.accordion-button[_ngcontent-%COMP%]:focus{box-shadow:none!important}.card[_ngcontent-%COMP%]{margin-bottom:0!important}`]})}}return t})();export{te as a};
@@ -0,0 +1 @@
1
+ import{a as C}from"./chunk-4CTORK4F.js";import{a as r}from"./chunk-NJFNMUFH.js";import"./chunk-I3LFKNW4.js";import"./chunk-Z3ITXK3D.js";import"./chunk-ACIMXBIC.js";import"./chunk-TGMCGROM.js";import"./chunk-CMZW5QAE.js";import"./chunk-4M63ID5T.js";import"./chunk-K5XRGNWG.js";import{a as h,b as y}from"./chunk-TNKPTRB3.js";import"./chunk-PW42BQIY.js";import"./chunk-MZI5AYCE.js";import"./chunk-UJYSVGLV.js";import"./chunk-HFKKITEW.js";import"./chunk-OZ77CAJD.js";import{F as v,J as o,n}from"./chunk-MTUIRWOB.js";import{Gb as l,Hb as s,Qc as f,Yb as u,ic as c,jc as d,ka as m,kc as i,rb as p}from"./chunk-JS55A2RS.js";import"./chunk-EU2KAMEK.js";import"./chunk-66YHNWRR.js";var M=(()=>{class e{constructor(){this.inventoryTabs=[{Title:"Single Channel Comparison",Url:"/menu/inventory/bychannel"},{Title:"Multi Channel Comparison",Url:"/menu/inventory/pos"},{Title:"Different Inventory",Url:"/menu/inventory/channel_summary"}]}static{this.\u0275fac=function(t){return new(t||e)}}static{this.\u0275cmp=l({type:e,selectors:[["app-inventory"]],features:[f([C])],decls:5,vars:1,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid"],[3,"Tabs"]],template:function(t,b){t&1&&(c(0,"nav",0)(1,"div",1)(2,"div"),i(3,"nav-tab",2),d()()(),i(4,"router-outlet")),t&2&&(p(3),u("Tabs",b.inventoryTabs))},dependencies:[n,y,h,o,v],encapsulation:2})}}return e})();var g=[{path:"",component:M,children:[{path:"",redirectTo:"bychannel",pathMatch:"full"},{path:"pos",loadComponent(){return import("./chunk-YZ74HE2T.js").then(e=>e.MultiChannelComparison)},canActivate:[r],data:{title:"Inventory Comparison"}},{path:"bychannel",loadComponent(){return import("./chunk-IUI6TA5K.js").then(e=>e.SingleChannelComparisonComponent)},canActivate:[r],data:{title:"Inventory Comparison"}},{path:"channel_summary",loadComponent(){return import("./chunk-OH6LACWK.js").then(e=>e.ChannelSummaryComponent)},canActivate:[r],data:{title:"Different Inventory"}}]}],E=(()=>{class e{static{this.\u0275fac=function(t){return new(t||e)}}static{this.\u0275mod=s({type:e})}static{this.\u0275inj=m({imports:[n,o.forChild(g)]})}}return e})();export{E as InventoryRoutingModule};
@@ -1 +1 @@
1
- import{a as R}from"./chunk-OLSC6KHB.js";import{b as V,c as A,i as D,j as P}from"./chunk-BIQHA7UA.js";import{h as U,m as b}from"./chunk-DPLEMBB4.js";import{Eb as f,Ec as g,Fc as k,Ic as I,Jc as O,Kb as u,Kc as T,Wb as c,bc as M,cc as y,ec as w,fc as v,gc as l,hc as r,ic as S,mc as p,ob as _,qb as a,rc as h,sc as x,wb as m,ya as s,za as d}from"./chunk-T5ONJF63.js";function j(o,C){if(o&1){let e=p();l(0,"span")(1,"mat-checkbox",4),h("change",function(t){s(e);let i=x();return d(i.onSelectAll(t==null?null:t.checked))}),l(2,"h5",5),g(3,"Select All"),r()()()}}function E(o,C){if(o&1){let e=p();l(0,"li")(1,"mat-checkbox",6),T("ngModelChange",function(t){let i=s(e).$implicit;return O(i.selected,t)||(i.selected=t),d(t)}),l(2,"div",7),S(3,"img",8),l(4,"h5",9),g(5),r()()()()}if(o&2){let e=C.$implicit;a(),I("ngModel",e.selected),a(2),c("src",e.Img,_),a(2),k(e.Name)}}var q=(()=>{class o{constructor(e,n){this.data=e,this.dialogRef=n,this.selectedItems=this.data.selectedItems,this.channels=this.data.channels}ngOnInit(){this.initModalConfig()}initModalConfig(){let e=this.data.title?this.data.title:"Updating Inventory";this.modalConfig=new D,this.modalConfig.title=e}onSelectAll(e){this.channels=this.channels.map(n=>(n.selected=e,n))}onOk(){this.dialogRef.close(this.channels)}onClose(){this.dialogRef.close()}getSelectedChannel(){return this.channels.filter(e=>e.selected)}static{this.\u0275fac=function(n){return new(n||o)(m(A),m(V))}}static{this.\u0275cmp=f({type:o,selectors:[["app-modal-update-channels"]],standalone:!1,decls:7,vars:3,consts:[[3,"onOk","onClose","onCancel","dynamicValidated","config"],["content",""],[2,"overflow-y","auto","max-height","28rem"],[1,"no-bullet",2,"margin-bottom","0px !important","overflow","hidden"],["color","primary",1,"me-6",3,"change"],[1,"fw-light"],["color","primary",3,"ngModelChange","ngModel"],[1,"d-flex","align-items-center"],[1,"channelLogo-md",3,"src"],[1,"fw-light","ms-2","my-auto"]],template:function(n,t){if(n&1&&(l(0,"modal-material",0),h("onOk",function(){return t.onOk()})("onClose",function(){return t.onClose()})("onCancel",function(){return t.onClose()}),l(1,"div",1)(2,"div",2),u(3,j,4,0,"span"),l(4,"ul",3),w(5,E,6,3,"li",null,y),r()()()()),n&2){let i;c("dynamicValidated",((i=t.getSelectedChannel())==null?null:i.length)>0)("config",t.modalConfig),a(3),M((t.channels==null?null:t.channels.length)>1?3:-1),a(2),v(t.channels)}},dependencies:[U,b,R,P],styles:[".no-bullet[_ngcontent-%COMP%]{list-style-type:none}mat-form-field[_ngcontent-%COMP%]{width:100%;height:100%}.mat-dialog-title[_ngcontent-%COMP%]{margin-bottom:0%;margin-left:24px}.vertical-radio[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin:15px 0}"]})}}return o})();export{q as a};
1
+ import{a as R}from"./chunk-6MPSYC77.js";import{b as V,c as A,j as D,k as P}from"./chunk-6X2OBNJQ.js";import{h as U,m as b}from"./chunk-CSSG7NAJ.js";import{Gb as f,Gc as g,Hc as k,Kc as I,Lc as O,Mb as u,Mc as T,Yb as c,dc as M,ec as y,gc as w,hc as v,ic as l,jc as r,kc as S,oc as p,pb as _,rb as a,tc as h,uc as x,xb as m,ya as s,za as d}from"./chunk-JS55A2RS.js";function j(o,C){if(o&1){let e=p();l(0,"span")(1,"mat-checkbox",4),h("change",function(t){s(e);let i=x();return d(i.onSelectAll(t==null?null:t.checked))}),l(2,"h5",5),g(3,"Select All"),r()()()}}function E(o,C){if(o&1){let e=p();l(0,"li")(1,"mat-checkbox",6),T("ngModelChange",function(t){let i=s(e).$implicit;return O(i.selected,t)||(i.selected=t),d(t)}),l(2,"div",7),S(3,"img",8),l(4,"h5",9),g(5),r()()()()}if(o&2){let e=C.$implicit;a(),I("ngModel",e.selected),a(2),c("src",e.Img,_),a(2),k(e.Name)}}var q=(()=>{class o{constructor(e,n){this.data=e,this.dialogRef=n,this.selectedItems=this.data.selectedItems,this.channels=this.data.channels}ngOnInit(){this.initModalConfig()}initModalConfig(){let e=this.data.title?this.data.title:"Updating Inventory";this.modalConfig=new D,this.modalConfig.title=e}onSelectAll(e){this.channels=this.channels.map(n=>(n.selected=e,n))}onOk(){this.dialogRef.close(this.channels)}onClose(){this.dialogRef.close()}getSelectedChannel(){return this.channels.filter(e=>e.selected)}static{this.\u0275fac=function(n){return new(n||o)(m(A),m(V))}}static{this.\u0275cmp=f({type:o,selectors:[["app-modal-update-channels"]],standalone:!1,decls:7,vars:3,consts:[[3,"onOk","onClose","onCancel","dynamicValidated","config"],["content",""],[2,"overflow-y","auto","max-height","28rem"],[1,"no-bullet",2,"margin-bottom","0px !important","overflow","hidden"],["color","primary",1,"me-6",3,"change"],[1,"fw-light"],["color","primary",3,"ngModelChange","ngModel"],[1,"d-flex","align-items-center"],[1,"channelLogo-md",3,"src"],[1,"fw-light","ms-2","my-auto"]],template:function(n,t){if(n&1&&(l(0,"modal-material",0),h("onOk",function(){return t.onOk()})("onClose",function(){return t.onClose()})("onCancel",function(){return t.onClose()}),l(1,"div",1)(2,"div",2),u(3,j,4,0,"span"),l(4,"ul",3),w(5,E,6,3,"li",null,y),r()()()()),n&2){let i;c("dynamicValidated",((i=t.getSelectedChannel())==null?null:i.length)>0)("config",t.modalConfig),a(3),M((t.channels==null?null:t.channels.length)>1?3:-1),a(2),v(t.channels)}},dependencies:[U,b,R,P],styles:[".no-bullet[_ngcontent-%COMP%]{list-style-type:none}mat-form-field[_ngcontent-%COMP%]{width:100%;height:100%}.mat-dialog-title[_ngcontent-%COMP%]{margin-bottom:0%;margin-left:24px}.vertical-radio[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin:15px 0}"]})}}return o})();export{q as a};
@@ -0,0 +1 @@
1
+ import{a as de}from"./chunk-BQTUAYGY.js";import"./chunk-AGRVVEIR.js";import"./chunk-ZNDU44GH.js";import"./chunk-5XI7HWS5.js";import"./chunk-WGXUKTYP.js";import"./chunk-4CTORK4F.js";import{a as he}from"./chunk-54JEYTAI.js";import{a as D}from"./chunk-XHAXYWZ7.js";import{a as pe}from"./chunk-YPVYJUXS.js";import"./chunk-6MPSYC77.js";import{c as me,d as R}from"./chunk-GOS4RIF2.js";import"./chunk-NZA4BEER.js";import"./chunk-JV4MMNGD.js";import"./chunk-GZXQUJKX.js";import"./chunk-ALKC77XL.js";import"./chunk-NTW6FBP5.js";import"./chunk-LR4UZ2OS.js";import"./chunk-F4GMWHYJ.js";import"./chunk-UPYS4A4M.js";import{a as ce}from"./chunk-JOBWFOGC.js";import"./chunk-PO7JVKK3.js";import"./chunk-LHD7CYML.js";import"./chunk-DJILLV4M.js";import"./chunk-SH7KN2AS.js";import"./chunk-OKAPL3YZ.js";import"./chunk-SDUUFQUI.js";import"./chunk-3RK6DDJD.js";import"./chunk-MQXPOHBV.js";import"./chunk-M5IQRAHV.js";import{a as ee}from"./chunk-5DIRXS7I.js";import"./chunk-OZ7LWNOK.js";import"./chunk-VRI3CYGG.js";import"./chunk-AVEGIEYT.js";import"./chunk-2TZBEYNY.js";import"./chunk-SXLKJLAE.js";import{i as w}from"./chunk-I3LFKNW4.js";import"./chunk-Z3ITXK3D.js";import"./chunk-ACIMXBIC.js";import"./chunk-TGMCGROM.js";import"./chunk-CMZW5QAE.js";import{b as te,e as ne}from"./chunk-4M63ID5T.js";import"./chunk-K5XRGNWG.js";import"./chunk-HPYTL6TX.js";import{c as C}from"./chunk-PW42BQIY.js";import{d as oe,l as re,m as le,n as se}from"./chunk-6X2OBNJQ.js";import{c as K,h as q,m as X,o as Y,z as Z}from"./chunk-CSSG7NAJ.js";import"./chunk-MZI5AYCE.js";import{b as ie,c as ae}from"./chunk-UJYSVGLV.js";import"./chunk-HFKKITEW.js";import"./chunk-OZ77CAJD.js";import{g as $,j as Q,n as J}from"./chunk-MTUIRWOB.js";import{$c as I,G as U,Gb as A,Gc as v,Kc as T,Lc as E,Mb as u,Mc as x,Qc as H,Ra as M,Sc as z,Yb as h,ad as y,ea as k,ic as s,ja as j,jc as p,kc as G,lc as N,mc as F,nc as W,oc as L,pa as S,rb as c,tc as g,uc as m,xb as d,ya as b,za as P}from"./chunk-JS55A2RS.js";import"./chunk-EU2KAMEK.js";import{a as V,b as B}from"./chunk-66YHNWRR.js";var O=(()=>{class o{constructor(){this.authService=S(w),this.channelOptions=this.authService.getChannels()}filterSelectedChannels(t,i){let e=Object.assign([],this.channelOptions),n=[],a;return t.forEach(r=>{a=e.find(l=>l.ID==r?.parent?.id),a&&(a=B(V({},a),{Name:`${r?.parent?.label} - ${r?.label}`,LocationID:r?.id}),n.push(a))}),i.forEach(r=>{a=e.find(l=>l.ID==r.id),a&&n.push(a)}),n}generateFilterLocation(t,i){let e=[],n=[],a=[];return t.length>0?(e=t.map(r=>r.id),n=t.filter(r=>C.IsNotEmpty(r?.parent?.id)).map(r=>r?.parent?.id).filter((r,l,_)=>_.indexOf(r)===l)):(e=[],n=[]),a=i.map(r=>r.id),a=a.concat(n).filter((r,l,_)=>_.indexOf(r)===l),{locationIds:e,channelIds:a}}static{this.\u0275fac=function(i){return new(i||o)}}static{this.\u0275prov=j({token:o,factory:o.\u0275fac})}}return o})();var ge=o=>[o];function Ce(o,f){if(o&1){let t=L();s(0,"button",16),g("click",function(){b(t);let e=m(2).ngIf,n=m();return P(n.onUpdateItems(e))}),G(1,"i",17),v(2," Update "),p()}}function fe(o,f){if(o&1&&(N(0),u(1,Ce,3,0,"button",15),F()),o&2){let t=m().ngIf,i=m();c(),h("ngIf",i.productService.hasSelectionVariant(t))}}function _e(o,f){if(o&1&&(s(0,"actions")(1,"div",13),u(2,fe,2,1,"ng-container",14),p()()),o&2){let t=m();c(2),h("ngxPermissionsOnly",z(1,ge,t.inventoryUpdateRole))}}function Se(o,f){o&1&&W(0)}function ve(o,f){if(o&1){let t=L();N(0),s(1,"app-table",18),g("onToggle",function(e){b(t);let n=m();return P(n.onShowDifferenceStock(e))})("onSubmit",function(e){b(t);let n=m();return P(n.updateStockByVariant(e))}),p(),F()}if(o&2){let t=f.ngIf,i=m();c(),h("data",t)("channel",i.channels())("showProductToggle",!0)("hiddenIPOSInventory",i.searchFilter.HiddenIPOSInventory)}}var et=(()=>{class o{constructor(t,i,e,n,a,r){this.http=t,this.toastr=i,this.dialog=e,this.productService=n,this.authService=a,this.mainPanelService=r,this.paginationService=S(R),this.multiChannelService=S(O),this.searchFilter={PageNumber:1,RowCount:100},this.loaderEndpoint="InventoryLoader/GetMultipleInventoryComparison",this.dataEndpoint="Inventory/GetMultipleChannelComparison",this.allDataCountEndpoint="Inventory/GetMultipleChannelComparisonRowCount",this.selectedLocations=M([]),this.selectedChannels=M([]),this.channels=M([]),this.inventoryUpdateRole=ee.InventoryUpdate,this.pageData={Title:"Inventory",Nav:[{Title:"Inventory Cache",Url:"/menu/inventory/pos",Active:!0},{Title:"Inventory Realtime",Url:"/menu/inventory/realtime",Active:!1}]},this.channelOptions=this.authService.getChannels()}ngOnInit(){this.initPageLoader()}initPageLoader(){this.paginationService.fetchDataEndpoint=this.dataEndpoint,this.paginationService.fethRowCountEndpoint=this.allDataCountEndpoint,this.loader$=this.http.post(`/API/${this.loaderEndpoint}`,{}).pipe(k(t=>{t.Filter={PageNumber:t.Filter.PageNumber,filterModel:D.ALL,RowCount:t.Filter.PageSize,HiddenIPOSInventory:t.Filter.HiddenIPOSInventory},this.searchFilter=t.Filter,this.mainPanelService.openModalFilter()}))}onChannelChange(t=[]){let i=t.filter(n=>C.isValidGUID(n.id)==!1),e=t.filter(n=>C.isValidGUID(n.id));this.selectedLocations.set(i),this.selectedChannels.set(e)}onSearch(t){let i=this.multiChannelService.filterSelectedChannels(this.selectedLocations(),this.selectedChannels());this.channels.set(i);let e=this.multiChannelService.generateFilterLocation(this.selectedLocations(),this.selectedChannels());this.searchFilter.ListChannelID=e.channelIds,this.searchFilter.ListLocationID=e.locationIds,this.searchFilter.text=t,this.paginationService.reloadPagination(this.searchFilter)}updateStock(t,i){let e=this.productService.selectedVariantProduct(t);if(e.length>0){let n=[];e.forEach(l=>{l.Channel?.forEach(_=>{n.push({ID:l.ID,Code:l.Code,Inventory:l.Inventory,LocationID:_.LocationID})})});let r={ListChannelID:i.filter(l=>l.selected).map(l=>l.ID),List:n};this.http.post("/api/Inventory/UpdateChannel",r).subscribe(l=>{this.paginationService.reloadPagination(this.searchFilter),this.toastr.success("Successfully updated "+r.List.length+" variants in "+r.ListChannelID.length+" channels","Success")})}}updateStockByVariant(t){let i={ID:t.ChannelID,ChannelItemID:t.ChannelItemID,ChannelVariantID:t.ChannelVariationID,NewQuantity:parseFloat(t.Inventory),VariantID:t.ID,SKU:t.Sku,LocationID:t.LocationID};this.http.post("/api/Inventory/UpdateQuantityByItem",i).subscribe(e=>{this.paginationService.reloadPagination(this.searchFilter);let n=this.productService.findChannelById(i.ID,this.channelOptions);this.toastr.success("Successfully updated "+t.ItemName+"("+t.VarName+") inventory in "+n.Name+" to "+i.NewQuantity,"Success")})}onShowDifferenceStock(t){t?this.searchFilter.filterModel=D.DIFFERENCE:this.searchFilter.filterModel=D.ALL,this.paginationService.reloadPagination(this.searchFilter)}onUpdateItems(t){let i=this.productService.selectedVariantProduct(t),e=this.channelOptions.filter(n=>this.channels()?.find(a=>a.ID===n.ID));this.dialog.open(pe,{data:{selectedItems:i,channels:JSON.parse(JSON.stringify(e))},width:"400px"}).afterClosed().pipe(U(n=>C.IsNotEmpty(n))).subscribe(n=>{this.updateStock(t,n)})}static{this.\u0275fac=function(i){return new(i||o)(d(ne),d(te),d(oe),d(ce),d(w),d(re))}}static{this.\u0275cmp=A({type:o,selectors:[["app-multi-channel-comparison"]],features:[H([R,O])],decls:26,vars:22,consts:[["headerTitle","Inventory Comparison","textButton","Search",3,"onSubmit","pageData","hideSearchBox"],[4,"ngIf"],["for","selectChannel",1,"fw-bold","mb-3"],["id","selectChannel",3,"onChannelChange","multiple"],[1,"mt-5"],["for","PageNumber",1,"fw-bold"],["type","number","id","PageNumber","placeholder","PageNumber","name","PageNumber","data-toggle","tooltip","matTooltip","Page Number",1,"form-control","mt-2",3,"ngModelChange","ngModel"],["for","RowCount",1,"fw-bold"],["type","number","id","RowCount","placeholder","Page Size","name","RowCount","data-toggle","tooltip","matTooltip","Page Size",1,"form-control","mt-2",3,"ngModelChange","ngModel"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[3,"onNextPage","onLastPage","onGetRowCount","totalData","hideCount","rowCount","pageNumber","disableNextButton","goToLastPage"],[1,"d-flex"],[4,"ngxPermissionsOnly"],["type","button","class","btn btn-success shadow-sm rounded me-3",3,"click",4,"ngIf"],["type","button",1,"btn","btn-success","shadow-sm","rounded","me-3",3,"click"],[1,"fas","fa-chevron-circle-up"],["table","inventory",3,"onToggle","onSubmit","data","channel","showProductToggle","hiddenIPOSInventory"]],template:function(i,e){i&1&&(s(0,"mainpanel",0),g("onSubmit",function(a){return e.onSearch(a)}),u(1,_e,3,3,"actions",1),I(2,"async"),s(3,"filters"),u(4,Se,1,0,"ng-container",1),I(5,"async"),s(6,"div")(7,"label",2),v(8,"Channel"),p(),s(9,"multiwarehouse-tree-select",3),g("onChannelChange",function(a){return e.onChannelChange(a)}),p()(),s(10,"div",4)(11,"label",5),v(12,"PageNumber"),p(),s(13,"input",6),x("ngModelChange",function(a){return E(e.searchFilter.PageNumber,a)||(e.searchFilter.PageNumber=a),a}),p()(),s(14,"div",4)(15,"label",7),v(16,"Page Size"),p(),s(17,"input",8),x("ngModelChange",function(a){return E(e.searchFilter.RowCount,a)||(e.searchFilter.RowCount=a),a}),p()()(),s(18,"content")(19,"div",9)(20,"div",10)(21,"div",11),u(22,ve,2,4,"ng-container",1),I(23,"async"),s(24,"infinite-paginator",12),I(25,"async"),g("onNextPage",function(){return e.paginationService.onNextPage(e.searchFilter)})("onLastPage",function(){return e.paginationService.onLastPage(e.searchFilter)})("onGetRowCount",function(){return e.paginationService.getRowCount(e.searchFilter)}),p()()()()()()),i&2&&(h("pageData",e.pageData)("hideSearchBox",!1),c(),h("ngIf",y(2,14,e.paginationService.data$)),c(3),h("ngIf",y(5,16,e.loader$)),c(5),h("multiple",!0),c(4),T("ngModel",e.searchFilter.PageNumber),c(4),T("ngModel",e.searchFilter.RowCount),c(5),h("ngIf",y(23,18,e.paginationService.data$)),c(2),h("totalData",e.paginationService.totalData())("hideCount",e.paginationService.hideCount())("rowCount",y(25,20,e.paginationService.totalRowCount$))("pageNumber",e.paginationService.pageNumber())("disableNextButton",e.paginationService.disableNextButton())("goToLastPage",e.paginationService.isLastPage()))},dependencies:[J,$,Q,se,le,he,Z,K,Y,q,X,me,de,ae,ie],styles:[".no-bullet[_ngcontent-%COMP%]{list-style-type:none}"]})}}return o})();export{et as MultiChannelComparison};
@@ -0,0 +1 @@
1
+ var u=function(n){return n.USER="user",n.CHANNELS="channels",n.AUTHORIZATION="Authorization",n.INTERCOM="Intercom",n}(u||{});export{u as a};
@@ -0,0 +1 @@
1
+ import{a as F}from"./chunk-E2CS7ZMC.js";import{e as B}from"./chunk-4M63ID5T.js";import"./chunk-K5XRGNWG.js";import{m as $,n as H}from"./chunk-6X2OBNJQ.js";import"./chunk-CSSG7NAJ.js";import"./chunk-MZI5AYCE.js";import"./chunk-HFKKITEW.js";import"./chunk-OZ77CAJD.js";import{E as I,H as M,J as R,f as w,j as y,k as b,n as T}from"./chunk-MTUIRWOB.js";import{$c as m,Gb as _,Gc as o,Ic as d,Mb as p,Yb as h,Z as v,ad as u,bd as S,dc as O,ea as E,ic as e,jc as t,kc as C,q as x,rb as a,uc as g,v as D,xb as c}from"./chunk-JS55A2RS.js";import"./chunk-EU2KAMEK.js";import"./chunk-66YHNWRR.js";function N(n,s){if(n&1&&(e(0,"tr")(1,"td"),o(2),t(),e(3,"td"),o(4),t(),e(5,"td"),o(6),m(7,"date"),t(),e(8,"td"),o(9),m(10,"date"),t(),e(11,"td"),o(12),t()()),n&2){let i=s.$implicit;a(2),d(" ",i.Number," "),a(2),d(" ",i.Status," "),a(2),d(" ",S(7,5,i.Start,"HH:mm:ss:SSS")," "),a(3),d(" ",S(10,8,i.End,"HH:mm:ss:SSS")," "),a(3),d(" ",i.Exception," ")}}function P(n,s){if(n&1&&(e(0,"div",5)(1,"table",7)(2,"thead")(3,"tr",8)(4,"th",9),o(5,"Number"),t(),e(6,"th",10),o(7,"Status"),t(),e(8,"th",11),o(9,"Start Time"),t(),e(10,"th",11),o(11,"End Time"),t(),e(12,"th"),o(13,"Exception"),t()()(),e(14,"tbody"),p(15,N,13,11,"tr",12),m(16,"async"),t()()()),n&2){let i=g();a(15),h("ngForOf",u(16,1,i.orderDetails$))}}function L(n,s){n&1&&(e(0,"div",6),C(1,"app-empty-state"),t())}var V=(()=>{class n{constructor(i,r){this.route=i,this.httpService=r,this.orderDetails$=x([])}ngOnInit(){this.initOrderDetails()}initOrderDetails(){let i=this.route.snapshot?.queryParams;this.orderDetails$=this.httpService.post("/api/Orders/DownloadOrderLogsDetail",{ID:i.ID}).pipe(E(r=>{let l=r?.hits[0]?._source;this.headerTitle=`${l?.ChannelName} (${l?.DateRange})`}),D(r=>r?.hits[0]._source?.Detail),v(1))}static{this.\u0275fac=function(r){return new(r||n)(c(I),c(B))}}static{this.\u0275cmp=_({type:n,selectors:[["app-download-order-detail"]],decls:11,vars:7,consts:[[3,"headerTitle","description","hideSearchBox","hideSearchDropdown"],["role","button","routerLink","/menu/Order/Download_Order_Log",1,"btn","btn-secondary","btn-fill","btn-lg","me-2"],[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","table-hover"],[1,"table-light"],[2,"width","200px"],[2,"width","150px"],[2,"width","100px"],[4,"ngFor","ngForOf"]],template:function(r,l){if(r&1&&(e(0,"mainpanel",0)(1,"actions")(2,"a",1),o(3,"Back"),t()(),e(4,"content")(5,"div",2)(6,"div",3)(7,"div",4),p(8,P,17,3,"div",5),m(9,"async"),p(10,L,2,0,"div",6),t()()()()()),r&2){let f;h("headerTitle",l.headerTitle)("description",l.headerTitle)("hideSearchBox",!0)("hideSearchDropdown",!0),a(8),O(((f=u(9,5,l.orderDetails$))==null?null:f.length)>0?8:10)}},dependencies:[T,w,y,b,H,$,F,R,M],encapsulation:2})}}return n})();export{V as DownloadOrderDetailComponent};