marketplacepos 5.41.3 → 5.43.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (219) hide show
  1. package/Marketplace/3rdpartylicenses.txt +123 -123
  2. package/Marketplace/chunk-24DT5FN2.js +1 -0
  3. package/Marketplace/{chunk-5MRT2EFE.js → chunk-25OT4I3W.js} +1 -1
  4. package/Marketplace/chunk-2BUABOHG.js +1 -0
  5. package/Marketplace/{chunk-7GQIIDFF.js → chunk-2DJWDXTZ.js} +1 -1
  6. package/Marketplace/chunk-2EL3WEWS.js +1 -0
  7. package/Marketplace/chunk-2SXRC4IG.js +1 -0
  8. package/Marketplace/{chunk-KXZCGKQW.js → chunk-2TZBEYNY.js} +1 -1
  9. package/Marketplace/chunk-2ZTDLZVZ.js +1 -0
  10. package/Marketplace/chunk-33IXC6UG.js +1 -0
  11. package/Marketplace/chunk-3Y6LJS2H.js +1 -0
  12. package/Marketplace/{chunk-7477X7LJ.js → chunk-4CTORK4F.js} +1 -1
  13. package/Marketplace/{chunk-BUFEIJAI.js → chunk-4M63ID5T.js} +1 -1
  14. package/Marketplace/chunk-4PZ5Q3HI.js +1 -0
  15. package/Marketplace/{chunk-RVYGL22E.js → chunk-55OI2SUF.js} +1 -1
  16. package/Marketplace/chunk-5DIRXS7I.js +1 -0
  17. package/Marketplace/chunk-5EQNOCXP.js +1 -0
  18. package/Marketplace/chunk-5QAURMZF.js +222 -0
  19. package/Marketplace/{chunk-V2OJQHE3.js → chunk-5XI7HWS5.js} +2 -2
  20. package/Marketplace/chunk-66YHNWRR.js +1 -0
  21. package/Marketplace/chunk-6BFXOKCB.js +1 -0
  22. package/Marketplace/chunk-6DZKFXDF.js +1 -0
  23. package/Marketplace/chunk-6IFZ2TO6.js +1 -0
  24. package/Marketplace/{chunk-Q72ZXPDP.js → chunk-6LH7FSOW.js} +1 -1
  25. package/Marketplace/chunk-6LULIB2P.js +2 -0
  26. package/Marketplace/{chunk-OLSC6KHB.js → chunk-6MPSYC77.js} +1 -1
  27. package/Marketplace/chunk-6QGSDBR7.js +1 -0
  28. package/Marketplace/{chunk-BIQHA7UA.js → chunk-6X2OBNJQ.js} +4 -4
  29. package/Marketplace/chunk-736E275F.js +1 -0
  30. package/Marketplace/{chunk-IYYVZ6B6.js → chunk-A2YNWIX6.js} +1 -1
  31. package/Marketplace/chunk-A4F37V57.js +1 -0
  32. package/Marketplace/{chunk-NMJGLMWI.js → chunk-ABQG3LB5.js} +1 -1
  33. package/Marketplace/{chunk-77IUCPIQ.js → chunk-ACIMXBIC.js} +1 -1
  34. package/Marketplace/chunk-AGRVVEIR.js +397 -0
  35. package/Marketplace/chunk-ALKC77XL.js +78 -0
  36. package/Marketplace/chunk-ARZ2S6YD.js +1 -0
  37. package/Marketplace/chunk-AVEGIEYT.js +193 -0
  38. package/Marketplace/chunk-AVVPZ3NI.js +1 -0
  39. package/Marketplace/chunk-AZ2FLWCK.js +266 -0
  40. package/Marketplace/chunk-BAYW2AHI.js +1 -0
  41. package/Marketplace/chunk-BCM6WRZR.js +5 -0
  42. package/Marketplace/chunk-BQTUAYGY.js +1 -0
  43. package/Marketplace/chunk-CFC5CQ3V.js +1 -0
  44. package/Marketplace/chunk-CLDURV35.js +2 -0
  45. package/Marketplace/chunk-CRZOIZUQ.js +1 -0
  46. package/Marketplace/chunk-CSSG7NAJ.js +1 -0
  47. package/Marketplace/chunk-D66XCOBY.js +1 -0
  48. package/Marketplace/chunk-DIUEZVRG.js +1 -0
  49. package/Marketplace/chunk-DJILLV4M.js +1 -0
  50. package/Marketplace/chunk-DLSU35PZ.js +5 -0
  51. package/Marketplace/chunk-DMW4DWIM.js +1 -0
  52. package/Marketplace/{chunk-ZD5LURJS.js → chunk-E2CS7ZMC.js} +1 -1
  53. package/Marketplace/chunk-ECN3QRMT.js +1 -0
  54. package/Marketplace/chunk-EU2KAMEK.js +1 -0
  55. package/Marketplace/chunk-F4GMWHYJ.js +33 -0
  56. package/Marketplace/chunk-F4HFUSVI.js +1 -0
  57. package/Marketplace/{chunk-RGR34QZ3.js → chunk-FBZW4Y3J.js} +1 -1
  58. package/Marketplace/{chunk-6NNAICJE.js → chunk-FWG4H3QG.js} +1 -1
  59. package/Marketplace/chunk-G4OF4YLE.js +2 -0
  60. package/Marketplace/chunk-GCECFUOP.js +1 -0
  61. package/Marketplace/{chunk-UBMI3NQH.js → chunk-GHBGGQNM.js} +1 -1
  62. package/Marketplace/chunk-GMGCY3OL.js +1 -0
  63. package/Marketplace/chunk-GOS4RIF2.js +1 -0
  64. package/Marketplace/{chunk-IEYFOHME.js → chunk-GPC4DECX.js} +1 -1
  65. package/Marketplace/chunk-GZXQUJKX.js +1 -0
  66. package/Marketplace/{chunk-TMFFA26Y.js → chunk-HFKKITEW.js} +1 -1
  67. package/Marketplace/{chunk-KHWTOD6H.js → chunk-HPYTL6TX.js} +1 -1
  68. package/Marketplace/chunk-HTQJCQ32.js +1 -0
  69. package/Marketplace/chunk-I5IZPTXZ.js +1 -0
  70. package/Marketplace/{chunk-GBABJLPQ.js → chunk-IKPRRD5D.js} +1 -1
  71. package/Marketplace/chunk-IR5OMZTZ.js +1 -0
  72. package/Marketplace/chunk-ITTTKW6F.js +1 -0
  73. package/Marketplace/chunk-IUWXRFDI.js +1 -0
  74. package/Marketplace/{chunk-EGTYAIU5.js → chunk-JOBWFOGC.js} +1 -1
  75. package/Marketplace/{chunk-PPDHTO44.js → chunk-JRWFZQ5K.js} +1 -1
  76. package/Marketplace/chunk-JRXB6762.js +252 -0
  77. package/Marketplace/chunk-JS55A2RS.js +7 -0
  78. package/Marketplace/chunk-JV4MMNGD.js +79 -0
  79. package/Marketplace/chunk-K654EZ3I.js +1 -0
  80. package/Marketplace/chunk-KC3C62UO.js +4 -0
  81. package/Marketplace/{chunk-GBXNTL4E.js → chunk-KQQCKHF3.js} +1 -1
  82. package/Marketplace/chunk-KR2UT3GA.js +1 -0
  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-Q2OEJFVT.js → chunk-M5IQRAHV.js} +1 -1
  92. package/Marketplace/chunk-MKOJVMRR.js +1 -0
  93. package/Marketplace/chunk-MMT3VFZZ.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-MZI5AYCE.js +1 -0
  97. package/Marketplace/chunk-NB5XHM62.js +1 -0
  98. package/Marketplace/{chunk-JBKHY4HH.js → chunk-NRCXYGO3.js} +5 -5
  99. package/Marketplace/chunk-NTW6FBP5.js +1 -0
  100. package/Marketplace/chunk-NZA4BEER.js +102 -0
  101. package/Marketplace/chunk-O55KM5KY.js +1 -0
  102. package/Marketplace/chunk-O6U5QCHJ.js +1 -0
  103. package/Marketplace/chunk-OJWFYXZX.js +1 -0
  104. package/Marketplace/{chunk-G6EG5QJS.js → chunk-OKAPL3YZ.js} +1 -1
  105. package/Marketplace/chunk-OTFACGUB.js +1 -0
  106. package/Marketplace/{chunk-WAW37FIG.js → chunk-OZ77CAJD.js} +1 -1
  107. package/Marketplace/chunk-OZ7LWNOK.js +15 -0
  108. package/Marketplace/chunk-PB2SJSML.js +1 -0
  109. package/Marketplace/chunk-PE5AFID4.js +1 -0
  110. package/Marketplace/{chunk-7TWBIV3T.js → chunk-PO7JVKK3.js} +1 -1
  111. package/Marketplace/chunk-PW42BQIY.js +1 -0
  112. package/Marketplace/chunk-PZ4PSWYM.js +3 -0
  113. package/Marketplace/chunk-QACWANJT.js +1 -0
  114. package/Marketplace/chunk-QUXUEWEF.js +1 -0
  115. package/Marketplace/chunk-R22TUWCL.js +15 -0
  116. package/Marketplace/{chunk-75BDXSG3.js → chunk-R76V3PTN.js} +10 -10
  117. package/Marketplace/chunk-RCRPQNNW.js +1 -0
  118. package/Marketplace/chunk-SACERVTF.js +1 -0
  119. package/Marketplace/chunk-SDKAJBVB.js +1 -0
  120. package/Marketplace/{chunk-VGXQU74M.js → chunk-SH7KN2AS.js} +1 -1
  121. package/Marketplace/{chunk-CH2MLZU7.js → chunk-SIYMMMKQ.js} +1 -1
  122. package/Marketplace/chunk-SLQA5QBT.js +1 -0
  123. package/Marketplace/chunk-SMCI6XBO.js +1 -0
  124. package/Marketplace/chunk-SNDG7727.js +1 -0
  125. package/Marketplace/{chunk-QCZIDOKW.js → chunk-SXLKJLAE.js} +1 -1
  126. package/Marketplace/{chunk-6IAGGRZN.js → chunk-SYENQYR7.js} +1 -1
  127. package/Marketplace/chunk-T2IGESWD.js +1 -0
  128. package/Marketplace/chunk-T3Z5OMIZ.js +1 -0
  129. package/Marketplace/{chunk-V5WYSCVT.js → chunk-TGMCGROM.js} +1 -1
  130. package/Marketplace/chunk-TGN4NMQY.js +1 -0
  131. package/Marketplace/{chunk-OE2JYQHN.js → chunk-TNKPTRB3.js} +1 -1
  132. package/Marketplace/{chunk-DRSUXHAY.js → chunk-UBB6E4VL.js} +1 -1
  133. package/Marketplace/chunk-UDIAPGRB.js +1 -0
  134. package/Marketplace/chunk-UEWZXE4O.js +1 -0
  135. package/Marketplace/chunk-UF4FKEE7.js +93 -0
  136. package/Marketplace/chunk-UJYSVGLV.js +1 -0
  137. package/Marketplace/{chunk-5GX2GLRY.js → chunk-UMY6NG57.js} +1 -1
  138. package/Marketplace/{chunk-YXFTLQ5M.js → chunk-UPYS4A4M.js} +1 -1
  139. package/Marketplace/chunk-VRI3CYGG.js +1 -0
  140. package/Marketplace/{chunk-6XFYITUD.js → chunk-WGXUKTYP.js} +1 -1
  141. package/Marketplace/{chunk-ZZVNB72Q.js → chunk-WHZ44BAL.js} +1 -1
  142. package/Marketplace/chunk-WXQDF2MX.js +1 -0
  143. package/Marketplace/chunk-X5DJBQUZ.js +1 -0
  144. package/Marketplace/{chunk-MNFHFW3E.js → chunk-XEMNZHW6.js} +1 -1
  145. package/Marketplace/chunk-XENOOCI4.js +1 -0
  146. package/Marketplace/{chunk-J3P46Z53.js → chunk-XQGRC7V2.js} +1 -1
  147. package/Marketplace/{chunk-YR2WEZDG.js → chunk-YPVYJUXS.js} +1 -1
  148. package/Marketplace/{chunk-VWFLNITX.js → chunk-YR3PNRLA.js} +1 -1
  149. package/Marketplace/chunk-Z3ITXK3D.js +1 -0
  150. package/Marketplace/chunk-ZAVDOMSW.js +1 -0
  151. package/Marketplace/{chunk-GSPHYK6J.js → chunk-ZDYYX736.js} +11 -11
  152. package/Marketplace/chunk-ZFDUVL4I.js +1 -0
  153. package/Marketplace/{chunk-GHQH62TZ.js → chunk-ZIOAOUAM.js} +1 -1
  154. package/Marketplace/chunk-ZNDU44GH.js +51 -0
  155. package/Marketplace/{chunk-7FUVW73P.js → chunk-ZR5IXNXB.js} +1 -1
  156. package/Marketplace/index.html +3 -3
  157. package/Marketplace/main-OO7ZEZW4.js +1 -0
  158. package/Marketplace/{styles-NJFTKO3E.css → styles-X3FXEB7T.css} +1 -1
  159. package/package.json +1 -1
  160. package/Marketplace/chunk-26DZ5AMC.js +0 -1
  161. package/Marketplace/chunk-2BBMPSAE.js +0 -93
  162. package/Marketplace/chunk-2G6NLWKN.js +0 -1
  163. package/Marketplace/chunk-3E5FYRN4.js +0 -1
  164. package/Marketplace/chunk-3PNMJUYQ.js +0 -15
  165. package/Marketplace/chunk-4AMQ66FW.js +0 -1
  166. package/Marketplace/chunk-4ASUM4N5.js +0 -1
  167. package/Marketplace/chunk-4G3QN54S.js +0 -193
  168. package/Marketplace/chunk-4NRAXW65.js +0 -1
  169. package/Marketplace/chunk-4RTZASVJ.js +0 -1
  170. package/Marketplace/chunk-4XMCJ7I5.js +0 -1
  171. package/Marketplace/chunk-5KMCSNS6.js +0 -2
  172. package/Marketplace/chunk-5S6SIKR7.js +0 -1
  173. package/Marketplace/chunk-62PFQNHJ.js +0 -1
  174. package/Marketplace/chunk-6AKFGBPY.js +0 -4
  175. package/Marketplace/chunk-6ALHX2I4.js +0 -1
  176. package/Marketplace/chunk-7XREAR3H.js +0 -1
  177. package/Marketplace/chunk-AMXLXRQK.js +0 -1
  178. package/Marketplace/chunk-AWDLMHBL.js +0 -1
  179. package/Marketplace/chunk-CHZLFJFI.js +0 -3
  180. package/Marketplace/chunk-CMCNEAGC.js +0 -1
  181. package/Marketplace/chunk-CPAHXWMO.js +0 -1
  182. package/Marketplace/chunk-CTN7GW4H.js +0 -1
  183. package/Marketplace/chunk-CYZQNZDB.js +0 -1
  184. package/Marketplace/chunk-D54NUPYF.js +0 -153
  185. package/Marketplace/chunk-DI4V7KMK.js +0 -1
  186. package/Marketplace/chunk-DPLEMBB4.js +0 -1
  187. package/Marketplace/chunk-DZ2EE5MV.js +0 -1
  188. package/Marketplace/chunk-E3HMIPER.js +0 -2
  189. package/Marketplace/chunk-GJOCO2OS.js +0 -2
  190. package/Marketplace/chunk-GPEVUTDI.js +0 -2
  191. package/Marketplace/chunk-GSH5BYZ6.js +0 -1
  192. package/Marketplace/chunk-HKYVBAMV.js +0 -1
  193. package/Marketplace/chunk-IIJMZKPL.js +0 -1
  194. package/Marketplace/chunk-JDEKWXPV.js +0 -1
  195. package/Marketplace/chunk-JFJCXZD3.js +0 -1
  196. package/Marketplace/chunk-K2H6WANG.js +0 -1
  197. package/Marketplace/chunk-KQOYVGBL.js +0 -1
  198. package/Marketplace/chunk-KVP6OL4J.js +0 -2
  199. package/Marketplace/chunk-LPXBSHUI.js +0 -180
  200. package/Marketplace/chunk-MATSRG2L.js +0 -447
  201. package/Marketplace/chunk-PJ72KMDS.js +0 -1
  202. package/Marketplace/chunk-PVUSCHKJ.js +0 -1
  203. package/Marketplace/chunk-PXB4YEY3.js +0 -1
  204. package/Marketplace/chunk-Q2R4GEW5.js +0 -1
  205. package/Marketplace/chunk-RBC7ADJF.js +0 -1
  206. package/Marketplace/chunk-REFJUWLL.js +0 -5
  207. package/Marketplace/chunk-RIYAYANU.js +0 -1
  208. package/Marketplace/chunk-T5ONJF63.js +0 -7
  209. package/Marketplace/chunk-T6QOFDEE.js +0 -1
  210. package/Marketplace/chunk-U5VX6JLT.js +0 -1
  211. package/Marketplace/chunk-VAU6MFH7.js +0 -1
  212. package/Marketplace/chunk-VETHPEVU.js +0 -1
  213. package/Marketplace/chunk-VJKFHBPN.js +0 -5
  214. package/Marketplace/chunk-VSEWXNVC.js +0 -291
  215. package/Marketplace/chunk-X3LH2IJE.js +0 -1
  216. package/Marketplace/chunk-XM6GN4VF.js +0 -1
  217. package/Marketplace/chunk-YIUQQGOQ.js +0 -1
  218. package/Marketplace/chunk-ZHUHOS5T.js +0 -1
  219. package/Marketplace/main-CCWBPZQH.js +0 -1
@@ -1,4 +0,0 @@
1
- import{a as Ae,b as Ct}from"./chunk-5GX2GLRY.js";import{a as H}from"./chunk-KVP6OL4J.js";import"./chunk-77IUCPIQ.js";import"./chunk-JBKHY4HH.js";import{a as ne,b as ae,c as ot}from"./chunk-RGR34QZ3.js";import"./chunk-MS4AQ6UA.js";import{a as oe}from"./chunk-ZD5LURJS.js";import{b as ht}from"./chunk-IEYFOHME.js";import"./chunk-YXFTLQ5M.js";import{g as _t}from"./chunk-IYYVZ6B6.js";import"./chunk-RVYGL22E.js";import{a as pt,b as mt}from"./chunk-OE2JYQHN.js";import"./chunk-7GQIIDFF.js";import"./chunk-6XFYITUD.js";import{a as ft,b as St}from"./chunk-OLSC6KHB.js";import{a as re,b as lt}from"./chunk-COBHWPGI.js";import{a as st}from"./chunk-VETHPEVU.js";import{m as gt}from"./chunk-75BDXSG3.js";import"./chunk-D54NUPYF.js";import"./chunk-7TWBIV3T.js";import"./chunk-J7AGLBPL.js";import"./chunk-6ALHX2I4.js";import"./chunk-4G3QN54S.js";import"./chunk-3RK6DDJD.js";import{a as j}from"./chunk-UBMI3NQH.js";import{b as ut}from"./chunk-7FUVW73P.js";import{b as ct}from"./chunk-M3SJUKTG.js";import{c as dt}from"./chunk-GHQH62TZ.js";import"./chunk-CH2MLZU7.js";import{a as le}from"./chunk-7XREAR3H.js";import"./chunk-Q72ZXPDP.js";import"./chunk-MNFHFW3E.js";import"./chunk-ZZVNB72Q.js";import"./chunk-SDUUFQUI.js";import"./chunk-G6EG5QJS.js";import"./chunk-RIHLYYZU.js";import"./chunk-Q2OEJFVT.js";import{a as ee,b as te,d as ie,e as $e}from"./chunk-6IAGGRZN.js";import"./chunk-T6QOFDEE.js";import"./chunk-KXZCGKQW.js";import"./chunk-QCZIDOKW.js";import{a as He,h as me,l as $}from"./chunk-CHZLFJFI.js";import{b as Ve,e as R}from"./chunk-BUFEIJAI.js";import"./chunk-K5XRGNWG.js";import"./chunk-V5WYSCVT.js";import"./chunk-KHWTOD6H.js";import{b as tt,d as ue,e as it,f as nt,g as at,l as G,m as rt}from"./chunk-BIQHA7UA.js";import{s as et}from"./chunk-TMFFA26Y.js";import"./chunk-WAW37FIG.js";import{b as ke,c as Q,h as B,m as z,o as Z,y as Ze}from"./chunk-DPLEMBB4.js";import{b as w,c as N}from"./chunk-PXB4YEY3.js";import{E as Xe,F as Qe,H as X,J as Le,f as A,g as F,j as Oe,k as V,m as W,n as he}from"./chunk-GPEVUTDI.js";import{$c as k,Aa as Ge,B as qe,Ba as je,Dc as U,Eb as L,Ec as l,Fb as Me,Fc as u,G as Ye,Gc as I,Ic as C,Jc as b,Kb as f,Kc as y,Pc as K,Rc as pe,Wb as d,Z as be,Zc as T,_c as M,aa as Je,ad as q,ea as Ie,gc as i,hc as n,ic as S,ja as Ne,jc as P,ka as De,kc as E,mc as D,oa as se,ob as O,qb as o,rc as v,sc as s,v as J,wb as x,xa as Ke,ya as g,za as h}from"./chunk-T5ONJF63.js";import"./chunk-K2H6WANG.js";var bt=(()=>{class r{constructor(){this.ObjectOrderTabs=[{Title:"1 - New Order",Url:"/menu/Order/new",Permissions:[]},{Title:"2 - Ready to Ship",Url:"/menu/Order/ready_to_ship",Permissions:[]},{Title:"3 - Shipped",Url:"/menu/Order/Shipped",Permissions:[]},{Title:"4 - Completed",Url:"/menu/Order/Delivered",Permissions:[]},{Title:"All",Url:"/menu/Order/All",Permissions:[]},{Title:"99 - Cancelled",Url:"/menu/Order/Cancelled",Permissions:[]},{Title:"Download",Url:"/menu/Order/Download",Permissions:[He.downloadOrder]},{Title:"Log",Url:"/menu/Order/Download_Order_Log",Permissions:[He.downloadOrder]}]}ngOnInit(){}static{this.\u0275fac=function(a){return new(a||r)}}static{this.\u0275cmp=L({type:r,selectors:[["app-orders"]],standalone:!1,decls:5,vars:2,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid"],[3,"Tabs","usePermissions"]],template:function(a,t){a&1&&(i(0,"nav",0)(1,"div",1)(2,"div"),S(3,"nav-tab",2),n()()(),S(4,"router-outlet")),a&2&&(o(3),d("Tabs",t.ObjectOrderTabs)("usePermissions",!0))},dependencies:[pt,Qe],encapsulation:2})}}return r})();var Fe=(()=>{class r{constructor(e,a){this.http=e,this.toastr=a}acceptTokopediaOrders(e){return this.http.post("/api/Orders/AcceptOrderTokopedia",e).pipe(Ie(a=>{this.tokopediaAcceptOrderHandler(a)}))}tokopediaAcceptOrderHandler(e){let a=e.filter(m=>m.Status==!1),t=e.filter(m=>m.Status==!0);if(a.length==0&&t.length>0){let m=`<ol>${this.generateSuccessMessage(t)}</ol>`;this.toastr.success(m,"Success",{enableHtml:!0})}else if(a.length>0&&t.length>0){let m=`<ol>
2
- ${this.generateSuccessMessage(t)}
3
- ${this.generateErrorMessage(a)}
4
- </ol>`;this.toastr.warning(m,"Warning",{enableHtml:!0})}else{let m=`<ol>${this.generateErrorMessage(a)}</ol>`;this.toastr.error(m,"Error",{enableHtml:!0})}}generateSuccessMessage(e){let a="";return e.forEach(t=>{a+=`<li><b>${t.OrderNumber}</b> was successfully Accept</li>`}),a}generateErrorMessage(e){let a="";return e.forEach(t=>{a+=`<li><b>${t.OrderNumber}</b> ${t.Message}</li>`}),a}static{this.\u0275fac=function(a){return new(a||r)(se(R),se(Ve))}}static{this.\u0275prov=Ne({token:r,factory:r.\u0275fac})}}return r})();function Ot(r,c){if(r&1){let e=D();P(0),i(1,"button",20),v("click",function(){g(e);let t=s().ngIf,m=s();return h(m.onAcceptOrder(t))}),S(2,"i",21),l(3," Accept "),n(),E()}}function Lt(r,c){if(r&1&&(P(0),f(1,Ot,4,0,"ng-container",3),E()),r&2){let e=s();o(),d("ngIf",e.isTokopediaAvailable&&e.isTokopediaSelected)}}function kt(r,c){if(r&1&&(i(0,"span",22),S(1,"img",23),n(),l(2)),r&2){let e=c.item;o(),d("src",e==null?null:e.Img,O),o(),I(" ",e.Name," ")}}function Vt(r,c){if(r&1){let e=D();P(0),i(1,"th",35)(2,"input",36),y("ngModelChange",function(t){g(e);let m=s(3);return b(m.isCheckAll,t)||(m.isCheckAll=t),h(t)}),v("ngModelChange",function(){g(e);let t=s(2).ngIf,m=s();return h(m.onSelectAllOrderData(t))}),n()(),E()}if(r&2){let e=s(3);o(2),C("ngModel",e.isCheckAll)}}function At(r,c){if(r&1){let e=D();P(0),i(1,"input",36),y("ngModelChange",function(t){g(e);let m=s(2).$implicit;return b(m.selected,t)||(m.selected=t),h(t)}),v("ngModelChange",function(){g(e);let t=s(4).ngIf,m=s();return h(m.onSelectOrderData(t))}),n(),E()}if(r&2){let e=s(2).$implicit;o(),C("ngModel",e.selected)}}function Ft(r,c){if(r&1&&(P(0),i(1,"td"),f(2,At,2,1,"ng-container",3),n(),E()),r&2){let e=s().$implicit,a=s(3);o(2),d("ngIf",e.Type==a.tokopediaType)}}function Rt(r,c){if(r&1&&(P(0),i(1,"span"),l(2),n(),E()),r&2){let e=s().$implicit;o(2),u(e.Number)}}function Wt(r,c){if(r&1&&(i(0,"a",38),l(1),n()),r&2){let e=s().$implicit,a=s(3);d("href",a.domain+"/menu/Orders/Order/Sales_Order/Info?ID="+e.ID,O),o(),u(e.Number)}}function Bt(r,c){if(r&1&&(i(0,"tr"),f(1,Ft,3,1,"ng-container",3),i(2,"td"),l(3),n(),i(4,"td"),f(5,Rt,3,1,"ng-container",24)(6,Wt,2,2,"ng-template",null,1,q),n(),i(8,"td"),l(9),n(),i(10,"td"),l(11),T(12,"date"),n(),i(13,"td"),S(14,"app-channel-logo",37),n()()),r&2){let e=c.$implicit,a=U(7),t=s(3);o(),d("ngIf",t.isTokopediaAvailable),o(2),u(e.Outlet),o(2),d("ngIf",e.ID==t.guidEmpty)("ngIfElse",a),o(4),u(e.Customer),o(2),u(k(12,7,e.Created,"dd MMM yyyy HH:mm")),o(3),d("typeId",e.Type)}}function zt(r,c){if(r&1){let e=D();P(0),i(1,"div",25)(2,"table",26),v("matSortChange",function(t){g(e);let m=s(2);return h(m.onSort(t))}),i(3,"thead",27)(4,"tr",28),f(5,Vt,3,1,"ng-container",3),i(6,"th",29),l(7,"Outlet"),n(),i(8,"th",30),l(9,"Order number"),n(),i(10,"th"),l(11,"Customer"),n(),i(12,"th",31),l(13," Created On "),n(),i(14,"th",32),l(15,"Channel"),n()()(),i(16,"tbody"),f(17,Bt,15,10,"tr",33),n()(),i(18,"app-mat-paginator-no-count",34),T(19,"async"),T(20,"async"),v("total",function(){g(e);let t=s(2);return h(t.getPaginatonTotal())})("next",function(){g(e);let t=s(2);return h(t.onNextPage())})("previous",function(){g(e);let t=s(2);return h(t.onPreviousPage())}),n()(),E()}if(r&2){let e,a=s().ngIf,t=s();o(5),d("ngIf",t.isTokopediaAvailable&&a),o(12),d("ngForOf",a),o(),d("filter",t.filter)("totaldata",(e=M(19,5,t.newOrdersData$))==null?null:e.length)("paginationTotal",M(20,7,t.paginationTotal$))}}function Gt(r,c){if(r&1&&(P(0),f(1,zt,21,9,"ng-container",24),E()),r&2){let e=c.ngIf;s();let a=U(36);o(),d("ngIf",(e==null?null:e.length)>0)("ngIfElse",a)}}function jt(r,c){r&1&&(i(0,"div",39),S(1,"app-empty-state"),n())}var yt=(()=>{class r{constructor(e,a,t,m){this.localDataService=e,this.orderService=a,this.acceptOrderService=t,this.authService=m,this.filter={PageNumber:null,PageSize:null,ListChannelID:[],From:null,To:null},this.domain=`https://${this.localDataService.getHostName()}`,this.guidEmpty=N.GuidEMpty,this.tokopediaType=w.Tokopedia,this.isTokopediaSelected=!1,this.isTokopediaAvailable=!1,this.isCheckAll=!1,this.channelOptions=this.authService.getChannels()}ngOnInit(){this.initLoadPage()}initLoadPage(){this.orderService.loadInitialPage().subscribe(e=>{this.filter.PageNumber=e.Filter.PageNumber,this.filter.PageSize=e.Filter.RowCount,this.filter.From=e.Filter.From,this.filter.To=e.Filter.To,this.getNewOrders()})}getNewOrders(){let e={PageNumber:this.filter.PageNumber,PageSize:this.filter.PageSize,ListChannelID:this.filter.ListChannelID,From:this.filter.From,To:this.filter.To};this.sourceObs$=this.orderService.getNewOrders(e).pipe(be()),this.newOrdersData$=this.sourceObs$.pipe(Ie(a=>{a.filter(m=>m.Type==w.Tokopedia).length>0&&(this.isTokopediaAvailable=!0)}))}getPaginatonTotal(){this.paginationTotal$=this.orderService.getTotalNewOrders(this.filter.ListChannelID,this.filter.From,this.filter.To).pipe(be())}onNextPage(){this.filter.PageNumber=this.filter.PageNumber+1,this.getNewOrders()}onPreviousPage(){this.filter.PageNumber=this.filter.PageNumber-1,this.getNewOrders()}onSelectOrderData(e){this.isTokopediaSelected=!1,e.filter(t=>t.selected).length>0&&(this.isTokopediaSelected=!0)}onSelectAllOrderData(e){e=e.map(a=>(a.Type==w.Tokopedia&&(a.selected=this.isCheckAll),a)),this.onSelectOrderData(e)}onAcceptOrder(e){let a=this.getSelectedTokopediaOrders(e);this.acceptOrderService.acceptTokopediaOrders(a).subscribe(t=>{this.isTokopediaSelected=!1,location.reload()})}getSelectedTokopediaOrders(e){return e.filter(t=>t.selected).map(t=>t.Number)}onSort(e){if(e.direction==""){this.newOrdersData$=this.sourceObs$;return}if(e.active=="created"){let a=e.direction=="asc";this.newOrdersData$=this.newOrdersData$.pipe(J(t=>(t=t.sort((m,_)=>N.compare(m.Created,_.Created,a)),t)))}}static{this.\u0275fac=function(a){return new(a||r)(x(me),x(Ae),x(Fe),x($))}}static{this.\u0275cmp=L({type:r,selectors:[["app-new-order"]],standalone:!1,decls:37,vars:15,consts:[["EMPTY_STATE",""],["NOT_EMPTY",""],["headerTitle","1 - New Order","searchBoxPlaceHolder","Search Orders...",3,"onSubmit","hideSearchBox"],[4,"ngIf"],["href","https://ods.dealpos.app","target","_blank",1,"btn","btn-outline-secondary","shadow","rounded","ms-2"],[1,"fa-solid","fa-clipboard-list","me-3"],[1,"fw-bold","mb-2"],["appendTo","body","bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"ngModelChange","clearable","multiple","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],[1,"mt-5"],[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,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid","mt-3","d-print-none"],[1,"row"],[1,"col-md-12"],["type","button","data-cy","scanInPos",1,"btn","btn-outline-secondary","shadow","rounded","me-3",3,"click"],[1,"fa-solid","fa-check"],[1,"me-2"],["alt","",2,"width","18px",3,"src"],[4,"ngIf","ngIfElse"],[1,"table-responsive"],["matSort","",1,"table","table-hover",3,"matSortChange"],[1,"sticky-top-thead"],[1,"table-light"],[2,"width","120px"],[2,"width","220px"],["mat-sort-header","created",2,"width","130px"],[2,"width","130px"],[4,"ngFor","ngForOf"],[3,"total","next","previous","filter","totaldata","paginationTotal"],[2,"width","5px"],["type","checkbox",3,"ngModelChange","ngModel"],[3,"typeId"],["target","_blank",3,"href"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"]],template:function(a,t){if(a&1){let m=D();i(0,"mainpanel",2),v("onSubmit",function(){return g(m),h(t.getNewOrders())}),i(1,"actions"),f(2,Lt,2,1,"ng-container",3),T(3,"async"),i(4,"a",4),S(5,"i",5),i(6,"span"),l(7,"Visit our Fulfillment Display System"),n()()(),i(8,"filters")(9,"div")(10,"label",6),l(11,"Channel"),n(),i(12,"ng-select",7),y("ngModelChange",function(p){return g(m),b(t.filter.ListChannelID,p)||(t.filter.ListChannelID=p),h(p)}),f(13,kt,3,2,"ng-template",8),n()(),i(14,"div",9)(15,"label",10),l(16,"Page Number"),n(),i(17,"input",11),y("ngModelChange",function(p){return g(m),b(t.filter.PageNumber,p)||(t.filter.PageNumber=p),h(p)}),n()(),i(18,"div",9)(19,"label",10),l(20,"Page Size"),n(),i(21,"input",12),y("ngModelChange",function(p){return g(m),b(t.filter.PageSize,p)||(t.filter.PageSize=p),h(p)}),n()(),i(22,"div",9)(23,"label",13),l(24,"From/To"),n(),i(25,"div",14)(26,"datepicker",15),y("dateChange",function(p){return g(m),b(t.filter.From,p)||(t.filter.From=p),h(p)}),n()(),i(27,"div")(28,"datepicker",16),y("dateChange",function(p){return g(m),b(t.filter.To,p)||(t.filter.To=p),h(p)}),n()()()(),i(29,"content")(30,"div",17)(31,"div",18)(32,"div",19),f(33,Gt,2,2,"ng-container",3),T(34,"async"),f(35,jt,2,0,"ng-template",null,0,q),n()()()()()}a&2&&(d("hideSearchBox",!0),o(2),d("ngIf",M(3,11,t.newOrdersData$)),o(10),d("clearable",!0)("multiple",!0)("items",t.channelOptions),C("ngModel",t.filter.ListChannelID),o(5),C("ngModel",t.filter.PageNumber),o(4),C("ngModel",t.filter.PageSize),o(5),C("date",t.filter.From),o(2),C("date",t.filter.To),o(5),d("ngIf",M(34,13,t.newOrdersData$)))},dependencies:[A,F,Q,Z,ke,B,z,G,ie,ee,te,j,re,oe,ne,ae,H,Oe,V],encapsulation:2})}}return r})();var Ht=()=>["/menu/Order"];function Ut(r,c){if(r&1&&(i(0,"tr")(1,"td"),l(2),n(),i(3,"td"),l(4),T(5,"number"),n(),i(6,"td"),l(7),T(8,"number"),n()()),r&2){let e=c.$implicit;o(2),u(e.Code),o(2),u(M(5,3,e.Quantity)),o(3),u(M(8,5,e.Price))}}function qt(r,c){if(r&1&&(i(0,"div",4)(1,"div",5)(2,"div",6)(3,"div",7)(4,"h3",8),l(5,"Outlet Info"),n()(),i(6,"div",4)(7,"div",9),l(8," Outlet : "),n(),i(9,"div",9),l(10),n()(),i(11,"div",4)(12,"div",9),l(13," Date : "),n(),i(14,"div",9),l(15),T(16,"date"),n()(),i(17,"div",4)(18,"div",9),l(19," Status : "),n(),i(20,"div",9),l(21),n()(),i(22,"div",4)(23,"div",9),l(24," Tax Type : "),n(),i(25,"div",9),l(26),n()(),i(27,"div",4)(28,"div",9),l(29," Due Date : "),n(),i(30,"div",9),l(31),T(32,"date"),n()()(),i(33,"div",6)(34,"div",7)(35,"h3",8),l(36,"Customer Info"),n()(),i(37,"div",4)(38,"div",9),l(39," Name : "),n(),i(40,"div",9),l(41),n()(),i(42,"div",4)(43,"div",9),l(44," Email : "),n(),i(45,"div",9),l(46),n()(),i(47,"div",4)(48,"div",9),l(49," Mobile : "),n(),i(50,"div",9),l(51),n()()()(),i(52,"div",10)(53,"h3",11),l(54,"Products Sold"),n(),i(55,"div",12)(56,"table",13)(57,"thead",14)(58,"tr",15)(59,"th"),l(60,"Code"),n(),i(61,"th"),l(62,"Quantity"),n(),i(63,"th"),l(64,"Price"),n()()(),i(65,"tbody"),f(66,Ut,9,7,"tr",16),n()()()()()),r&2){let e=s();o(10),I(" ",e.model.Outlet," "),o(5),I(" ",k(16,9,e.model.Date,"dd MMM yyyy")," "),o(6),I(" ",e.model.Delivery," "),o(5),I(" ",e.model.TaxType," "),o(5),I(" ",k(32,12,e.model.DueDate,"dd MMM yyyy")," "),o(10),I(" ",e.model.Customer.Name," "),o(5),I(" ",e.model.Customer.Email," "),o(5),I(" ",e.model.Customer.Mobile," "),o(15),d("ngForOf",e.model.Variants)}}var vt=(()=>{class r{constructor(e,a){this.http=e,this.url=a,this.number=this.url.snapshot.queryParams.Number,this.outlet=this.url.snapshot.queryParams.Outlet}ngOnInit(){this.Load()}Load(){var e={Number:this.number,Outlet:this.outlet};this.http.post("/api/orders/GetInvoiceDetail",e).subscribe(a=>{this.model=a})}static{this.\u0275fac=function(a){return new(a||r)(x(R),x(Xe))}}static{this.\u0275cmp=L({type:r,selectors:[["app-detail-order"]],standalone:!1,decls:7,vars:6,consts:[[3,"headerTitle","hideSearchBox","hideSearchDropdown"],["role","button",1,"btn","btn-secondary","btn-fill","btn-lg","me-3",3,"routerLink"],[1,"container"],["class","row",4,"ngIf"],[1,"row"],[1,"col-4"],[1,"border","my-3","py-3","col-12"],[1,"row","m-2"],[1,"text-center"],[1,"col"],[1,"col-8"],[1,"text-center","my-3","py-3"],[1,"table-responsive"],[1,"table"],[1,"sticky-top-thead"],[1,"table-light"],[4,"ngFor","ngForOf"]],template:function(a,t){a&1&&(i(0,"mainpanel",0)(1,"actions")(2,"a",1),l(3,"Back"),n()(),i(4,"content")(5,"div",2),f(6,qt,67,15,"div",3),n()()()),a&2&&(d("headerTitle","Order #"+t.number)("hideSearchBox",!0)("hideSearchDropdown",!0),o(2),d("routerLink",K(5,Ht)),o(4),d("ngIf",t.model))},dependencies:[A,F,G,X,W,V],encapsulation:2})}}return r})();var xt=(()=>{class r{constructor(e){this.dialogRef=e,this.tandaiSudahDicetak=!1}onCancel(){this.dialogRef.close()}onPrint(){this.dialogRef.close(this.tandaiSudahDicetak?1:0)}static{this.\u0275fac=function(a){return new(a||r)(x(tt))}}static{this.\u0275cmp=L({type:r,selectors:[["app-print-tokopedia"]],standalone:!1,decls:17,vars:1,consts:[[1,"container-fluid"],[1,"text-center","mb-4","fw-bold","mt-6"],[1,"row"],[1,"col-12"],[1,"fs-5"],[1,"d-flex","align-items-center","text-center","justify-content-center","mb-8"],[1,"me-2",3,"ngModelChange","ngModel"],[1,"fs-5","pt-1"],[1,"d-flex","align-items-center","justify-content-center"],[1,"btn","btn-light-blue","text-primary","btn-lg","fw-bold","mx-3",3,"click"],[1,"btn","btn-light-blue","me-6","text-primary","btn-lg","fw-bold","mx-3",3,"click"]],template:function(a,t){a&1&&(i(0,"div",0)(1,"h2",1),l(2,"Cetak label pesanan"),n(),i(3,"mat-dialog-content")(4,"div",2)(5,"div",3)(6,"p",4),l(7,"Kamu akan mencetak label yang berisi detail pesanan"),n(),i(8,"div",5)(9,"mat-checkbox",6),y("ngModelChange",function(_){return b(t.tandaiSudahDicetak,_)||(t.tandaiSudahDicetak=_),_}),n(),i(10,"span",7),l(11,'Pesanan telah ditandai sebagai "Sudah Dicetak"'),n()()()()(),i(12,"mat-dialog-actions",8)(13,"button",9),v("click",function(){return t.onCancel()}),l(14,"Cancel"),n(),i(15,"button",10),v("click",function(){return t.onPrint()}),l(16,"Cetak Pesanan"),n()()()),a&2&&(o(9),C("ngModel",t.tandaiSudahDicetak))},dependencies:[B,z,ft,nt,it],encapsulation:2})}}return r})();var We=(()=>{class r{constructor(e,a,t){this.http=e,this.toastr=a,this.dialog=t}getTokopediaShippingLabel(e){return this.http.post("/api/v1/Shippinglabel/Tokopedia/Multiple",{Orders:e}).pipe(J(a=>(a=a.map(t=>(t.ChannelType=w.Tokopedia,t)),a)))}getTiktokShippingLabel(e){return this.http.post("/api/v1/Shippinglabel/TIktok/Multiple",{Orders:e}).pipe(J(a=>(a=a.map(t=>(t.ChannelType=w.Tiktok,t)),a)))}getShopeeShippingLabel(e){return this.http.post("/api/v1/Shippinglabel/shopee/Multiple",{Orders:e}).pipe(J(a=>(a=a.map(t=>(t.ChannelType=w.Shopee,t)),a)))}getLazadaShippingLabel(e){return this.http.post("/api/v1/Shippinglabel/lazada/Multiple",{Orders:e}).pipe(J(a=>(a=a.map(t=>(t.ChannelType=w.Lazada,t)),a)))}printShippingLabelTokopedia(e){let a={OrderNumber:e,Printed:!0};this.dialog.open(xt).afterClosed().pipe(Ye(t=>t!==void 0),Je(t=>(a.Printed=t,this.http.post("api/v1/Shippinglabel/Tokopedia",a)))).subscribe(t=>{let m=window.open("about:blank","_blank");m.document.write(t.File),m.document.close()})}printShippingLabelTiktok(e,a){let t={ShopID:a,OrderNumber:e};this.http.post("api/v1/Shippinglabel/Tiktok",t).subscribe(m=>{m.data!=null?window.open(m.data.doc_url,"_blank"):this.toastr.error("Cannot Print the Shipping Label,The invoice Number is not set to Pickup","Cannot Print")})}printShippingLabelShopee(e,a){let t={ShopID:a,OrderNumber:e};this.http.post("api/v1/Shippinglabel/shopee/DownloadShipping",t).subscribe(m=>{var _=Uint8Array.from(atob(m.File),ze=>ze.charCodeAt(0)),p=new Blob([_],{type:"octet/stream"});N.openDownloadFile(p,`${e}.pdf`)})}printShippingLabelLazada(e,a){let t={ShopID:a,OrderNumber:e};this.http.post("api/v1/Shippinglabel/Lazada/DownloadShipping",t).subscribe(m=>{m.result.data!=null?window.open(m.result.data.pdf_url,"_blank"):this.toastr.error(m.message,"Cannot Print")})}static{this.\u0275fac=function(a){return new(a||r)(se(R),se(Ve),se(ue))}}static{this.\u0275prov=Ne({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})();var de=function(r){return r.SPX="https://res.cloudinary.com/pos/image/upload/v1698216798/APP/Print%20Shipping%20Label/SPX_Logo.png",r.SICEPAT="https://res.cloudinary.com/pos/image/upload/v1698216793/APP/Print%20Shipping%20Label/SiCepat_Logo.png",r.JNT="https://res.cloudinary.com/pos/image/upload/v1698216792/APP/Print%20Shipping%20Label/J_T_Logo.png",r.ANTERAJA="https://res.cloudinary.com/pos/image/upload/v1698218271/APP/Print%20Shipping%20Label/anteraja_Logo.png",r.JNE="https://res.cloudinary.com/pos/image/upload/v1698216791/APP/Print%20Shipping%20Label/JNE_Logo.png",r.GRAB="https://res.cloudinary.com/pos/image/upload/v1698216794/APP/Print%20Shipping%20Label/GrabExpress_Logo.png",r.GOSEND="https://res.cloudinary.com/pos/image/upload/v1698218375/APP/Print%20Shipping%20Label/Gosend_Logo.png",r.LAZADA_EXPRESS="https://res.cloudinary.com/pos/image/upload/v1698914677/icons/Marketplace%20logo/lazada-Logistics.png",r}(de||{});var Ce=function(r){return r.TOKOPEDIA="https://res.cloudinary.com/pos/image/upload/v1698216793/APP/Print%20Shipping%20Label/Tokopedia_Logo.png",r.SHOPEE="https://res.cloudinary.com/pos/image/upload/v1698219243/APP/Print%20Shipping%20Label/shopee-logo.png",r.LAZADA="https://res.cloudinary.com/pos/image/upload/v1698912333/icons/Marketplace%20logo/Lazada_icon.png",r.TIKTOK="https://res.cloudinary.com/pos/image/upload/v1645761565/icons/Marketplace%20logo/tiktok-logo.png",r}(Ce||{});function Jt(r,c){if(r&1&&(P(0),i(1,"div",36)(2,"div",12)(3,"div",37),l(4),n()(),i(5,"div",12)(6,"div",37),l(7),n()()(),E()),r&2){let e=s();o(4),I(" ",e.recipient==null?null:e.recipient.City," "),o(3),I(" ",e.recipient==null?null:e.recipient.District," ")}}function Kt(r,c){if(r&1&&(P(0),i(1,"div")(2,"span",15),l(3,"Berat: "),n(),i(4,"span",18),l(5),n()(),E()),r&2){let e=s();o(5),I("",e.shippingLabel==null?null:e.shippingLabel.Weight," gr")}}function Xt(r,c){if(r&1&&(P(0),i(1,"div",38)(2,"span",14),l(3,"Batas Kirim:"),n(),i(4,"span",18),l(5),T(6,"date"),n()(),E()),r&2){let e=s();o(5),u(k(6,1,e.logistic==null?null:e.logistic.Batas_kirim,"dd-MM-yyy"))}}function Qt(r,c){if(r&1&&(P(0),i(1,"div",38)(2,"span",14),l(3,"No.Pesanan:"),n(),i(4,"span",18),l(5),n()(),E()),r&2){let e=s();o(5),u(e.shippingLabel==null?null:e.shippingLabel.OrderNumber)}}function Zt(r,c){if(r&1&&(i(0,"tr")(1,"td",39),l(2),n(),i(3,"td"),l(4),n(),i(5,"td"),l(6),n(),i(7,"td"),l(8),T(9,"number"),n()()),r&2){let e=c.$implicit,a=c.index;o(2),u(a+1),o(2),u(e.Product_Name),o(2),u(e.SKU),o(2),u(M(9,4,e.Quantity))}}var Be=(()=>{class r{constructor(){this.minDate=N.MinDate,this.channelType=w}ngOnChanges(e){e.shippingLabel&&e.shippingLabel.currentValue&&(this.initShippingLabel(),this.getShippingLogo(),this.getChannelLogo())}ngAfterViewInit(){this.initBarcodeConfig()}getChannelLogo(){switch(this.shippingLabel.ChannelType){case w.Tokopedia:this.marketplaceLogo=Ce.TOKOPEDIA;break;case w.Shopee:this.marketplaceLogo=Ce.SHOPEE;break;case w.Lazada:this.marketplaceLogo=Ce.LAZADA;break;case w.Tiktok:this.marketplaceLogo=Ce.TIKTOK;break}}getShippingLogo(){let e=this.shippingLabel.Logistic.Logistic_Name;e=e?.toLowerCase(),e.includes("anteraja")?this.shippingLogo=de.ANTERAJA:e.includes("grabexpress")?this.shippingLogo=de.GRAB:e.includes("jne")?this.shippingLogo=de.JNE:e.includes("gosend")?this.shippingLogo=de.GOSEND:e.includes("j&t")||e.includes("jnt")?this.shippingLogo=de.JNT:e.includes("sicepat")?this.shippingLogo=de.SICEPAT:e.includes("spx")?this.shippingLogo=de.SPX:(e.includes("lex")||e.includes("lx")||e.includes("lazada express"))&&(this.shippingLogo=de.LAZADA_EXPRESS)}initShippingLabel(){this.recipient=this.shippingLabel.Recipient,this.store=this.shippingLabel.Store,this.products=this.shippingLabel.Products,this.logistic=this.shippingLabel.Logistic}initBarcodeConfig(){if(N.IsNotEmpty(this.logistic?.Resi_Number)){let e=this.logistic?.Resi_Number;JsBarcode(`#RESI${this.id}`,this.logistic?.Resi_Number,{displayValue:!1,width:e.length>15?1:1.5,height:40})}N.IsNotEmpty(this.shippingLabel?.OrderNumber)&&JsBarcode(`#NO${this.id}`,this.shippingLabel?.OrderNumber,{displayValue:!1,width:this.shippingLabel?.OrderNumber.length>15?.5:1,height:40})}static{this.\u0275fac=function(a){return new(a||r)}}static{this.\u0275cmp=L({type:r,selectors:[["app-shipping-label"]],inputs:{shippingLabel:"shippingLabel",id:"id"},features:[Ke],decls:87,vars:20,consts:[[1,"label-container"],[2,"border","1px solid","padding","12px"],[1,"row","mb-2"],[1,"col-12"],[1,"d-flex","align-items-center","justify-content-between"],["width","105px",1,"border-0",3,"src"],[1,"mb-4"],[1,"row","mb-1"],[1,"text-center","fw-bold","border","p-2","fs-5","border-dark"],[1,"me-2"],[1,"col-12","text-center"],[3,"id"],[1,"col-6"],[1,"d-flex"],[1,"fw-bold","fs-6","me-1"],[1,"fw-bold","fs-6"],[1,"mt-2"],[1,"mb-0","fs-6",2,"max-width","200px","word-wrap","break-word"],[1,"fs-6"],[1,"fs-6",2,"word-wrap","break-word","max-width","160px"],[4,"ngIf"],[1,"row","px-6"],[1,"col-5","border","border-dark","border-end-0","text-center","p-2"],[1,"col-7","border","border-dark","p-2","text-center","fs-6"],[1,"fst-italic"],[1,"row"],[1,"col-5","pt-4",2,"padding-right","0px"],[1,"d-flex","justify-content-between"],[1,"col-7","text-center"],[1,"mt-1",3,"id"],[1,"table","table-sm","fs-6"],[1,"text-center",2,"width","5px"],[2,"width","150px"],[2,"width","50px"],[2,"width","25px"],[4,"ngFor","ngForOf"],[1,"row","mb-4"],[1,"text-center","fw-bold","border","p-2","fs-6","border-dark","text-uppercase"],[1,"mt-4"],[1,"text-center"]],template:function(a,t){a&1&&(i(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4)(5,"div"),S(6,"img",5),n(),i(7,"div")(8,"h4"),l(9),n()(),i(10,"div"),S(11,"img",5),n()()()(),i(12,"div",6),S(13,"hr"),n(),i(14,"div",7)(15,"div",3)(16,"div",8)(17,"span",9),l(18),n(),i(19,"span"),l(20),n()()()(),i(21,"div",7)(22,"div",10),Ge(),S(23,"svg",11),n()(),je(),i(24,"div",6),S(25,"hr"),n(),i(26,"div",2)(27,"div",12)(28,"div",13)(29,"div",14),l(30,"Penerima: "),n(),i(31,"div",15),l(32),n()(),i(33,"div",16)(34,"span",15),l(35,"Alamat Pengiriman:"),n(),i(36,"div",17),l(37),n()()(),i(38,"div",12)(39,"div",13)(40,"div",14),l(41,"Pengirim: "),n(),i(42,"div")(43,"div",15),l(44),n(),i(45,"div",18),l(46),n(),i(47,"div",19),l(48),n()()(),S(49,"div"),n()(),f(50,Jt,8,2,"ng-container",20),i(51,"div",21)(52,"div",22)(53,"div",15),l(54,"CASHLESS"),n()(),i(55,"div",23)(56,"small",24),l(57,"Penjual tidak perlu membayar ongkos kirim ke kurir"),n()()(),i(58,"div",25)(59,"div",26)(60,"div",27),f(61,Kt,6,1,"ng-container",20),i(62,"div")(63,"span",15),l(64,"COD: "),n(),i(65,"span",18),l(66),T(67,"number"),n()()(),f(68,Xt,7,4,"ng-container",20)(69,Qt,6,1,"ng-container",20),n(),i(70,"div",28),Ge(),S(71,"svg",29),n()()(),je(),i(72,"div",25)(73,"div",3)(74,"table",30)(75,"thead")(76,"tr")(77,"th",31),l(78,"No."),n(),i(79,"th",32),l(80,"Nama Produk"),n(),i(81,"th",33),l(82,"SKU"),n(),i(83,"th",34),l(84,"Qty"),n()()(),i(85,"tbody"),f(86,Zt,10,6,"tr",35),n()()()()()),a&2&&(o(6),d("src",t.marketplaceLogo,O),o(3),u(t.logistic==null?null:t.logistic.Service),o(2),d("src",t.shippingLogo,O),o(7),I(" ",(t.shippingLabel==null?null:t.shippingLabel.ChannelType)==(t.channelType==null?null:t.channelType.Tokopedia)?"Kode Booking: ":"No. Resi: "," "),o(2),u(t.logistic==null?null:t.logistic.Resi_Number),o(3),d("id","RESI"+t.id),o(9),u(t.recipient==null?null:t.recipient.Name),o(5),I(" ",t.recipient==null?null:t.recipient.Address," "),o(7),u(t.store==null?null:t.store.Name),o(2),u(t.store==null?null:t.store.Phone),o(2),I(" ",t.store==null?null:t.store.Address," "),o(2),d("ngIf",(t.recipient==null?null:t.recipient.City)&&(t.recipient==null?null:t.recipient.District)),o(11),d("ngIf",t.shippingLabel==null?null:t.shippingLabel.Weight),o(5),I("Rp. ",t.shippingLabel!=null&&t.shippingLabel.IsCOD?M(67,18,t.shippingLabel==null||t.shippingLabel.SummaryPrice==null?null:t.shippingLabel.SummaryPrice.Total):0,""),o(2),d("ngIf",(t.logistic==null?null:t.logistic.Batas_kirim)&&(t.logistic==null?null:t.logistic.Batas_kirim)!==t.minDate),o(),d("ngIf",t.shippingLabel==null?null:t.shippingLabel.OrderNumber),o(2),d("id","NO"+t.id),o(15),d("ngForOf",t.products))},dependencies:[he,A,F,W,V],styles:[".table[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]{border:none!important}.table[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{text-transform:capitalize;padding:4px!important}.table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{border:none!important;padding:2px 2px 2px 5px!important;font-size:10px}.table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%]{border-bottom:1px solid rgba(0,0,0,.4509803922)}.label-container[_ngcontent-%COMP%]{width:465px;float:left}hr[_ngcontent-%COMP%]{opacity:.8;margin:0}"]})}}return r})();var ei=()=>["/menu/Order/detail"],ti=(r,c)=>({Number:r,Outlet:c});function ii(r,c){if(r&1){let e=D();P(0),i(1,"button",21),v("click",function(){g(e);let t=s();return h(t.onPrintMultipleShippingLabel())}),S(2,"i",22),i(3,"span"),l(4,"Print Shipping Label"),n()(),E()}}function ni(r,c){if(r&1&&(i(0,"span",23),S(1,"img",24),n(),l(2)),r&2){let e=c.item;o(),d("src",e==null?null:e.Img,O)("alt",e.Name),o(),I(" ",e.Name," ")}}function ai(r,c){if(r&1){let e=D();P(0),i(1,"input",31),y("ngModelChange",function(t){g(e);let m=s().$implicit;return b(m.Selected,t)||(m.Selected=t),h(t)}),v("ngModelChange",function(){g(e);let t=s(3).ngIf,m=s();return h(m.onSelectReadyToShip(t))}),n(),E()}if(r&2){let e=s().$implicit;o(),C("ngModel",e.Selected)}}function ri(r,c){if(r&1&&(i(0,"a",44),l(1),n()),r&2){let e=s().$implicit;d("routerLink",K(3,ei))("queryParams",pe(4,ti,e.Number,e.Outlet)),o(),u(e.Number)}}function oi(r,c){if(r&1&&(i(0,"a",45),l(1),n()),r&2){let e=s().$implicit,a=s(3);d("href",a.domain+e.ID,O),o(),u(e.Number)}}function li(r,c){if(r&1){let e=D();i(0,"a",46),v("click",function(){g(e);let t=s().$implicit,m=s(3);return h(m.onPrintShippingLabel(t.Number,t.ShopID,t.TypeID))}),S(1,"i",47),n()}}function pi(r,c){if(r&1&&(i(0,"tr")(1,"td"),f(2,ai,2,1,"ng-container",4),n(),i(3,"td"),l(4),n(),i(5,"td"),f(6,ri,2,7,"a",39)(7,oi,2,2,"a",40),n(),i(8,"td"),l(9),n(),i(10,"td"),l(11),T(12,"number"),n(),i(13,"td"),l(14),T(15,"date"),n(),i(16,"td"),S(17,"app-channel-logo",41),n(),i(18,"td",42),f(19,li,2,0,"a",43),n()()),r&2){let e=c.$implicit,a=s(3);o(2),d("ngIf",e.TypeID==a.channelType.Shopee||e.TypeID==a.channelType.Tokopedia||e.TypeID==a.channelType.Tiktok),o(2),u(e.Outlet),o(2),d("ngIf",a.guidEmpty==e.ID),o(),d("ngIf",a.guidEmpty!=e.ID),o(2),u(e.Customer),o(2),u(M(12,9,e.Amount)),o(3),u(k(15,11,e.Date,"dd MMM yyyy")),o(3),d("typeId",e.TypeID),o(2),d("ngIf",e.TypeID==a.channelType.Shopee||e.TypeID==a.channelType.Tokopedia||e.TypeID==a.channelType.Tiktok||e.TypeID==a.channelType.Lazada)}}function mi(r,c){if(r&1){let e=D();P(0),i(1,"div",26)(2,"table",27),v("matSortChange",function(t){g(e);let m=s(2);return h(m.onSort(t))}),i(3,"thead",28)(4,"tr",29)(5,"th",30)(6,"input",31),y("ngModelChange",function(t){g(e);let m=s(2);return b(m.isCheckAll,t)||(m.isCheckAll=t),h(t)}),v("ngModelChange",function(){g(e);let t=s().ngIf,m=s();return h(m.onSelectAllReadyToShip(t))}),n()(),i(7,"th",32),l(8,"Outlet"),n(),i(9,"th",33),l(10,"Order number"),n(),i(11,"th"),l(12,"Customer"),n(),i(13,"th",34),l(14,"Amount"),n(),i(15,"th",35),l(16,"Date"),n(),i(17,"th",36),l(18,"Channel"),n(),S(19,"th",37),n()(),i(20,"tbody"),f(21,pi,20,14,"tr",20),n()(),i(22,"app-mat-paginator-no-count",38),T(23,"async"),T(24,"async"),v("total",function(){g(e);let t=s(2);return h(t.getRowCount())})("next",function(){g(e);let t=s(2);return h(t.NextPage())})("previous",function(){g(e);let t=s(2);return h(t.PreviousPage())}),n()(),E()}if(r&2){let e,a=s().ngIf,t=s();o(6),C("ngModel",t.isCheckAll),o(15),d("ngForOf",a),o(),d("filter",t.filter)("totaldata",(e=M(23,5,t.readyToShip$))==null?null:e.length)("paginationTotal",M(24,7,t.paginationTotal$))}}function di(r,c){if(r&1&&(P(0),f(1,mi,25,9,"ng-container",25),E()),r&2){let e=c.ngIf;s();let a=U(35);o(),d("ngIf",e.length>0)("ngIfElse",a)}}function si(r,c){r&1&&(i(0,"div",48),S(1,"app-empty-state"),n())}function ci(r,c){r&1&&(P(0),i(1,"div",50),l(2,"\xA0"),n(),E())}function gi(r,c){if(r&1&&(P(0),S(1,"app-shipping-label",49),f(2,ci,3,0,"ng-container",4),E()),r&2){let e=c.$implicit,a=c.index,t=s();o(),d("shippingLabel",e)("id",a),o(),d("ngIf",a!==(t.shippingLabels==null?null:t.shippingLabels.length)-1)}}var Tt=(()=>{class r{constructor(e,a,t,m,_,p){this.http=e,this.localDataService=a,this.dialog=t,this.shippingLabelService=m,this.datePipe=_,this.authService=p,this.filter={PageNumber:null,PageSize:null,ListChannelID:[],From:null,To:null},this.channelType=w,this.guidEmpty=N.GuidEMpty,this.selectedReadyToShip=[],this.isCheckAll=!1,this.channelOptions=this.authService.getChannels()}ngOnInit(){this.Load()}Load(){this.http.post("/api/ordersLoader/GetOrder",{}).subscribe(e=>{this.filter.PageNumber=e.Filter.PageNumber,this.filter.PageSize=e.Filter.RowCount,this.filter.From=e.Filter.From,this.filter.To=e.Filter.To,this.domain=`https://${this.localDataService.getHostName()}/menu/Orders/Orders/Customer_Invoice/Info?ID=`,this.getReadyToShip()})}getReadyToShip(e){var a={Number:e,PageNumber:this.filter.PageNumber,PageSize:this.filter.PageSize,ListChannelID:this.filter.ListChannelID,From:this.filter.From,To:this.filter.To};this.sourceObs$=this.http.post("api/orders/GetReadyToShip",a).pipe(J(t=>t.Data),be(1)),this.readyToShip$=this.sourceObs$}onPrintMultipleShippingLabel(){let e=this.filterReadyToShipByChannel(this.selectedReadyToShip,w.Tokopedia),a=this.filterReadyToShipByChannel(this.selectedReadyToShip,w.Shopee),t=this.filterReadyToShipByChannel(this.selectedReadyToShip,w.Tiktok),m=[];e.length>0&&m.push(this.shippingLabelService.getTokopediaShippingLabel(this.shippingLabelPayload(e))),a.length>0&&m.push(this.shippingLabelService.getShopeeShippingLabel(this.shippingLabelPayload(a))),t.length>0&&m.push(this.shippingLabelService.getTiktokShippingLabel(this.shippingLabelPayload(t))),qe(m).pipe(J(_=>_.reduce((p,ze)=>p.concat(ze),[]))).subscribe({next:_=>{this.shippingLabels=_,this.printShippingLabel()}})}filterReadyToShipByChannel(e,a){return e.filter(t=>t.TypeID==a)}shippingLabelPayload(e){return e.map(a=>({ShopID:a.ShopID,OrderNumber:a.Number}))}printShippingLabel(){setTimeout(()=>{this.setPdfname(),window.print()},500)}onPrintShippingLabel(e,a,t){switch(t){case w.Tokopedia:this.shippingLabelService.printShippingLabelTokopedia(e);break;case w.Tiktok:this.shippingLabelService.printShippingLabelTiktok(e,a);break;case w.Shopee:this.shippingLabelService.printShippingLabelShopee(e,a);break;case w.Lazada:this.shippingLabelService.printShippingLabelLazada(e,a);break}}setPdfname(){if(this.selectedReadyToShip.length>1){let e=new Date,a=this.datePipe.transform(e,"dd-MM-yyyy"),t=this.datePipe.transform(e,"HH-mm");document.title=`ShippingLabel_${a}_${t}`}else{let e=this.selectedReadyToShip[0].Number;document.title=`ShippingLabel_${e}`}}getSelectedReadyToShip(e){return e.filter(a=>a.Selected)}getRowCount(){var e={PaymentState:"Unpaid",DeliveryState:"Unsent",ListChannelID:this.filter.ListChannelID,From:this.filter.From,To:this.filter.To};this.paginationTotal$=this.http.post("api/orders/GetRowCount",e).pipe(J(a=>a?.Total))}NextPage(){this.filter.PageNumber=this.filter.PageNumber+1,this.getReadyToShip()}PreviousPage(){this.filter.PageNumber=this.filter.PageNumber-1,this.getReadyToShip()}onSort(e){if(e.direction==""){this.readyToShip$=this.sourceObs$;return}if(e.active=="date"){let a=e.direction=="asc";this.readyToShip$=this.readyToShip$.pipe(J(t=>t.sort((m,_)=>N.compare(m.Date,_.Date,a))))}}onSelectReadyToShip(e){this.selectedReadyToShip=this.getSelectedReadyToShip(e)}onSelectAllReadyToShip(e){e=e.map(a=>((a.TypeID==w.Tokopedia||a.TypeID==w.Shopee||a.TypeID==w.Lazada)&&(a.Selected=this.isCheckAll),a)),this.selectedReadyToShip=this.getSelectedReadyToShip(e)}static{this.\u0275fac=function(a){return new(a||r)(x(R),x(me),x(ue),x(We),x(V),x($))}}static{this.\u0275cmp=L({type:r,selectors:[["app-ready-to-ship"]],standalone:!1,decls:38,vars:13,consts:[["EMPTY_STATE",""],["headerTitle","2 - Ready to Ship","searchBoxPlaceHolder","Search ...",3,"onSubmit"],["href","https://ods.dealpos.app","target","_blank",1,"btn","btn-outline-secondary","shadow","rounded","ms-2"],[1,"fa-solid","fa-clipboard-list","me-3"],[4,"ngIf"],[1,"fw-bold","mb-2"],["appendTo","body","bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"ngModelChange","clearable","multiple","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],[1,"mt-5"],[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,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid","mt-3","d-print-none"],[1,"row"],[1,"col-md-12"],[1,"print_containers"],[4,"ngFor","ngForOf"],[1,"btn","btn-outline-secondary","shadow","rounded","me-3",3,"click"],[1,"fa-solid","fa-print","me-3"],[1,"me-2"],[2,"width","18px",3,"src","alt"],[4,"ngIf","ngIfElse"],[1,"table-responsive"],["matSort","",1,"table","table-hover",3,"matSortChange"],[1,"sticky-top-thead"],[1,"table-light"],[2,"width","5px"],["type","checkbox",3,"ngModelChange","ngModel"],[2,"width","120px"],[2,"width","220px"],[2,"width","100px"],["mat-sort-header","date",2,"width","130px"],[2,"width","114px"],[2,"width","10px"],[3,"total","next","previous","filter","totaldata","paginationTotal"],[3,"routerLink","queryParams",4,"ngIf"],["target","_blank",3,"href",4,"ngIf"],[3,"typeId"],[1,"text-center","text-primary"],["title","Print shipping label",3,"click",4,"ngIf"],[3,"routerLink","queryParams"],["target","_blank",3,"href"],["title","Print shipping label",3,"click"],[1,"fa-solid","fa-print","fs-3","cursor"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[3,"shippingLabel","id"],[1,"page-break"]],template:function(a,t){if(a&1){let m=D();i(0,"mainpanel",1),v("onSubmit",function(p){return g(m),h(t.getReadyToShip(p))}),i(1,"actions")(2,"a",2),S(3,"i",3),i(4,"span"),l(5,"Visit our Fulfillment Display System"),n()(),f(6,ii,5,0,"ng-container",4),n(),i(7,"filters")(8,"div")(9,"label",5),l(10,"Channel"),n(),i(11,"ng-select",6),y("ngModelChange",function(p){return g(m),b(t.filter.ListChannelID,p)||(t.filter.ListChannelID=p),h(p)}),f(12,ni,3,3,"ng-template",7),n()(),i(13,"div",8)(14,"label",9),l(15,"Page Number"),n(),i(16,"input",10),y("ngModelChange",function(p){return g(m),b(t.filter.PageNumber,p)||(t.filter.PageNumber=p),h(p)}),n()(),i(17,"div",8)(18,"label",9),l(19,"Page Size"),n(),i(20,"input",11),y("ngModelChange",function(p){return g(m),b(t.filter.PageSize,p)||(t.filter.PageSize=p),h(p)}),n()(),i(21,"div",8)(22,"label",12),l(23,"From/To"),n(),i(24,"div",13)(25,"datepicker",14),y("dateChange",function(p){return g(m),b(t.filter.From,p)||(t.filter.From=p),h(p)}),n()(),i(26,"div")(27,"datepicker",15),y("dateChange",function(p){return g(m),b(t.filter.To,p)||(t.filter.To=p),h(p)}),n()()()(),i(28,"content")(29,"div",16)(30,"div",17)(31,"div",18),f(32,di,2,2,"ng-container",4),T(33,"async"),f(34,si,2,0,"ng-template",null,0,q),n()()()()(),i(36,"div",19),f(37,gi,3,3,"ng-container",20),n()}a&2&&(o(6),d("ngIf",t.selectedReadyToShip.length>0),o(5),d("clearable",!0)("multiple",!0)("items",t.channelOptions),C("ngModel",t.filter.ListChannelID),o(5),C("ngModel",t.filter.PageNumber),o(4),C("ngModel",t.filter.PageSize),o(5),C("date",t.filter.From),o(2),C("date",t.filter.To),o(5),d("ngIf",M(33,11,t.readyToShip$)),o(5),d("ngForOf",t.shippingLabels))},dependencies:[A,F,Q,Z,ke,B,z,G,X,ie,ee,te,j,re,oe,ne,ae,H,Be,Oe,W,V],styles:[".print_containers[_ngcontent-%COMP%]{display:none}@media print{.print_containers[_ngcontent-%COMP%]{display:block}}@media print{.page-break[_ngcontent-%COMP%]{page-break-after:always}}"]})}}return r})();var hi=()=>["/menu/Order/detail"],ui=(r,c)=>({Number:r,Outlet:c});function _i(r,c){if(r&1&&(i(0,"span",19),S(1,"img",20),n(),l(2)),r&2){let e=c.item;o(),d("src",e==null?null:e.Img,O)("alt",e.Name),o(),I(" ",e.Name," ")}}function fi(r,c){if(r&1&&(i(0,"a",35),l(1),n()),r&2){let e=s().$implicit;d("routerLink",K(3,hi))("queryParams",pe(4,ui,e.Number,e.Outlet)),o(),u(e.Number)}}function Si(r,c){if(r&1&&(i(0,"a",36),l(1),n()),r&2){let e=s().$implicit,a=s(2);d("href",a.domain+e.ID,O),o(),u(e.Number)}}function Ci(r,c){if(r&1&&(i(0,"tr")(1,"td"),l(2),n(),i(3,"td"),f(4,fi,2,7,"a",32)(5,Si,2,2,"a",33),n(),i(6,"td"),l(7),n(),i(8,"td"),l(9),T(10,"number"),n(),i(11,"td"),l(12),T(13,"date"),n(),i(14,"td"),S(15,"app-channel-logo",34),n()()),r&2){let e=c.$implicit,a=s(2);o(2),u(e.Outlet),o(2),d("ngIf",a.hasGuidEmpty(e.ID)),o(),d("ngIf",!a.hasGuidEmpty(e.ID)),o(2),u(e.Customer),o(2),u(M(10,7,e.Amount)),o(3),u(k(13,9,e.Created,"dd MMM yyyy HH:mm")),o(3),d("typeId",e.TypeID)}}function bi(r,c){if(r&1){let e=D();P(0),i(1,"div",21)(2,"table",22),v("matSortChange",function(t){g(e);let m=s();return h(m.onSort(t))}),i(3,"thead",23)(4,"tr",24)(5,"th",25),l(6,"Outlet"),n(),i(7,"th",26),l(8,"Order number"),n(),i(9,"th"),l(10,"Customer"),n(),i(11,"th",27),l(12,"Amount"),n(),i(13,"th",28),l(14," Created On "),n(),i(15,"th",29),l(16,"Channel"),n()()(),i(17,"tbody"),f(18,Ci,16,12,"tr",30),n()(),i(19,"app-mat-paginator-no-count",31),v("total",function(){g(e);let t=s();return h(t.StoreRowsCountAPIResult())})("next",function(){g(e);let t=s();return h(t.NextPage())})("previous",function(){g(e);let t=s();return h(t.PreviousPage())}),n()(),E()}if(r&2){let e=s();o(18),d("ngForOf",e.data),o(),d("filter",e.filter)("totaldata",e.totaldata)("paginationTotal",e.paginationTotal)}}function yi(r,c){r&1&&(i(0,"div",37),S(1,"app-empty-state"),n())}var wt=(()=>{class r{constructor(e,a,t){this.http=e,this.localDataService=a,this.authService=t,this.filter={PageNumber:null,PageSize:null,ListChannelID:[],From:null,To:null},this.totaldata=0,this.paginationTotal=0,this.channelType=w,this.channelOptions=this.authService.getChannels()}ngOnInit(){this.Load()}Load(){this.http.post("/api/ordersLoader/GetOrder",{}).subscribe(e=>{this.filter.PageNumber=e.Filter.PageNumber,this.filter.PageSize=e.Filter.RowCount,this.filter.From=e.Filter.From,this.filter.To=e.Filter.To,this.domain=`https://${this.localDataService.getHostName()}/menu/Orders/Orders/Customer_Invoice/Info?ID=`,this.Get()})}hasGuidEmpty(e){return e==N.GuidEMpty}Get(e){var a={Number:e,PageNumber:this.filter.PageNumber,PageSize:this.filter.PageSize,ListChannelID:this.filter.ListChannelID,From:this.filter.From,To:this.filter.To};this.http.post("api/orders/GetShipped",a).subscribe(t=>{this.data=t.Data,this.sourceData=[...t.Data],this.totaldata=this.data.length})}changePage(e){this.filter.PageNumber=e.pageIndex+1,this.Get()}StoreRowsCountAPIResult(){var e={PaymentState:"Unpaid",DeliveryState:"Sent",ListChannelID:this.filter.ListChannelID,From:this.filter.From,To:this.filter.To};this.http.post("api/orders/GetRowCount",e).subscribe(a=>{this.paginationTotal=a.Total})}NextPage(){this.filter.PageNumber=this.filter.PageNumber+1,this.Get()}PreviousPage(){this.filter.PageNumber=this.filter.PageNumber-1,this.Get()}onSort(e){if(e.direction==""){this.data=this.sourceData;return}if(e.active=="created"){let a=e.direction=="asc";this.data=this.data.sort((t,m)=>N.compare(t.Created,m.Created,a))}}static{this.\u0275fac=function(a){return new(a||r)(x(R),x(me),x($))}}static{this.\u0275cmp=L({type:r,selectors:[["app-shipped"]],standalone:!1,decls:34,vars:10,consts:[["EMPTY_STATE",""],["headerTitle","3 - Shipped","searchBoxPlaceHolder","Search ...",3,"onSubmit"],["href","https://ods.dealpos.app","target","_blank",1,"btn","btn-outline-secondary","shadow","rounded","ms-2"],[1,"fa-solid","fa-clipboard-list","me-3"],[1,"fw-bold","mb-2"],["appendTo","body","bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"ngModelChange","clearable","multiple","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],[1,"mt-5"],[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,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[4,"ngIf","ngIfElse"],[1,"me-2"],[2,"width","18px",3,"src","alt"],[1,"table-responsive"],["matSort","",1,"table","table-hover",3,"matSortChange"],[1,"sticky-top-thead"],[1,"table-light"],[2,"width","120px"],[2,"width","220px"],[2,"width","100px"],["mat-sort-header","created",2,"width","130px"],[2,"width","130px"],[4,"ngFor","ngForOf"],[3,"total","next","previous","filter","totaldata","paginationTotal"],[3,"routerLink","queryParams",4,"ngIf"],["target","_blank",3,"href",4,"ngIf"],[3,"typeId"],[3,"routerLink","queryParams"],["target","_blank",3,"href"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"]],template:function(a,t){if(a&1){let m=D();i(0,"mainpanel",1),v("onSubmit",function(p){return g(m),h(t.Get(p))}),i(1,"actions")(2,"a",2),S(3,"i",3),i(4,"span"),l(5,"Visit our Fulfillment Display System"),n()()(),i(6,"filters")(7,"div")(8,"label",4),l(9,"Channel"),n(),i(10,"ng-select",5),y("ngModelChange",function(p){return g(m),b(t.filter.ListChannelID,p)||(t.filter.ListChannelID=p),h(p)}),f(11,_i,3,3,"ng-template",6),n()(),i(12,"div",7)(13,"label",8),l(14,"Page Number"),n(),i(15,"input",9),y("ngModelChange",function(p){return g(m),b(t.filter.PageNumber,p)||(t.filter.PageNumber=p),h(p)}),n()(),i(16,"div",7)(17,"label",8),l(18,"Page Size"),n(),i(19,"input",10),y("ngModelChange",function(p){return g(m),b(t.filter.PageSize,p)||(t.filter.PageSize=p),h(p)}),n()(),i(20,"div",7)(21,"label",11),l(22,"From/To"),n(),i(23,"div",12)(24,"datepicker",13),y("dateChange",function(p){return g(m),b(t.filter.From,p)||(t.filter.From=p),h(p)}),n()(),i(25,"div")(26,"datepicker",14),y("dateChange",function(p){return g(m),b(t.filter.To,p)||(t.filter.To=p),h(p)}),n()()()(),i(27,"content")(28,"div",15)(29,"div",16)(30,"div",17),f(31,bi,20,4,"ng-container",18)(32,yi,2,0,"ng-template",null,0,q),n()()()()()}if(a&2){let m=U(33);o(10),d("clearable",!0)("multiple",!0)("items",t.channelOptions),C("ngModel",t.filter.ListChannelID),o(5),C("ngModel",t.filter.PageNumber),o(4),C("ngModel",t.filter.PageSize),o(5),C("date",t.filter.From),o(2),C("date",t.filter.To),o(5),d("ngIf",t.data&&t.data.length>0)("ngIfElse",m)}},dependencies:[A,F,Q,Z,B,z,G,X,ie,ee,te,j,re,oe,ne,ae,H,W,V],encapsulation:2})}}return r})();var vi=()=>["/menu/Order/detail"],xi=(r,c)=>({Number:r,Outlet:c});function Ti(r,c){if(r&1&&(i(0,"span",19),S(1,"img",20),n(),l(2)),r&2){let e=c.item;o(),d("src",e==null?null:e.Img,O)("alt",e.Name),o(),I(" ",e.Name," ")}}function wi(r,c){if(r&1&&(i(0,"a",35),l(1),n()),r&2){let e=s().$implicit;d("routerLink",K(3,vi))("queryParams",pe(4,xi,e.Number,e.Outlet)),o(),u(e.Number)}}function Pi(r,c){if(r&1&&(i(0,"a",36),l(1),n()),r&2){let e=s().$implicit,a=s(2);d("href",a.customerInfoUrl+e.ID,O),o(),u(e.Number)}}function Ei(r,c){if(r&1&&(i(0,"tr")(1,"td"),l(2),n(),i(3,"td"),f(4,wi,2,7,"a",32)(5,Pi,2,2,"a",33),n(),i(6,"td"),l(7),n(),i(8,"td"),l(9),T(10,"number"),n(),i(11,"td"),l(12),T(13,"date"),n(),i(14,"td"),S(15,"app-channel-logo",34),n()()),r&2){let e=c.$implicit,a=s(2);o(2),u(e.Outlet),o(2),d("ngIf",a.hasGuidEmpty(e.ID)),o(),d("ngIf",!a.hasGuidEmpty(e.ID)),o(2),u(e.Customer),o(2),u(M(10,7,e.Amount)),o(3),u(k(13,9,e.Created,"dd MMM yyyy HH:mm")),o(3),d("typeId",e.TypeID)}}function Ii(r,c){if(r&1){let e=D();P(0),i(1,"div",21)(2,"table",22),v("matSortChange",function(t){g(e);let m=s();return h(m.onSort(t))}),i(3,"thead",23)(4,"tr",24)(5,"th",25),l(6,"Outlet"),n(),i(7,"th",26),l(8,"Order number"),n(),i(9,"th"),l(10,"Customer"),n(),i(11,"th",27),l(12,"Amount"),n(),i(13,"th",28),l(14," Created On "),n(),i(15,"th",29),l(16,"Channel"),n()()(),i(17,"tbody"),f(18,Ei,16,12,"tr",30),n()(),i(19,"app-mat-paginator-no-count",31),v("total",function(){g(e);let t=s();return h(t.StoreRowsCountAPIResult())})("next",function(){g(e);let t=s();return h(t.NextPage())})("previous",function(){g(e);let t=s();return h(t.PreviousPage())}),n()(),E()}if(r&2){let e=s();o(18),d("ngForOf",e.data),o(),d("filter",e.filter)("totaldata",e.totaldata)("paginationTotal",e.paginationTotal)}}function Ni(r,c){r&1&&(i(0,"div",37),S(1,"app-empty-state"),n())}var Pt=(()=>{class r{constructor(e,a){this.http=e,this.authService=a,this.filter={PageNumber:null,PageSize:null,ListChannelID:[],From:null,To:null},this.totaldata=0,this.paginationTotal=0,this.channelType=w,this.channelOptions=this.authService.getChannels()}ngOnInit(){this.Load()}hasGuidEmpty(e){return e==N.GuidEMpty}getChannelLogo(e){return N.getChannelLogoByTypeId(e)}Load(){this.http.post("/api/ordersLoader/GetOrder",{}).subscribe(e=>{this.filter.PageNumber=e.Filter.PageNumber,this.filter.PageSize=e.Filter.RowCount,this.filter.From=e.Filter.From,this.filter.To=e.Filter.To,this.customerInfoUrl=`${this.authService.getDomain()}/menu/Orders/Orders/Customer_Invoice/Info?ID=`,this.Get()})}Get(e){var a={Number:e,PageNumber:this.filter.PageNumber,PageSize:this.filter.PageSize,ListChannelID:this.filter.ListChannelID,From:this.filter.From,To:this.filter.To};this.http.post("api/orders/GetDelivered ",a).subscribe(t=>{this.data=t.Data,this.sourceData=[...t.Data],this.totaldata=this.data.length})}changePage(e){this.filter.PageNumber=e.pageIndex+1,this.Get()}StoreRowsCountAPIResult(){var e={PaymentState:"Paid",DeliveryState:"Sent",ListChannelID:this.filter.ListChannelID,From:this.filter.From,To:this.filter.To};this.http.post("api/orders/GetRowCount",e).subscribe(a=>{this.paginationTotal=a.Total})}NextPage(){this.filter.PageNumber=this.filter.PageNumber+1,this.Get()}PreviousPage(){this.filter.PageNumber=this.filter.PageNumber-1,this.Get()}onSort(e){if(e.direction==""){this.data=this.sourceData;return}if(e.active=="created"){let a=e.direction=="asc";this.data=this.data.sort((t,m)=>N.compare(t.Created,m.Created,a))}}static{this.\u0275fac=function(a){return new(a||r)(x(R),x($))}}static{this.\u0275cmp=L({type:r,selectors:[["app-delivered"]],standalone:!1,decls:34,vars:10,consts:[["EMPTY_STATE",""],["headerTitle","4 - Completed","searchBoxPlaceHolder","Search ...",3,"onSubmit"],["href","https://ods.dealpos.app","target","_blank",1,"btn","btn-outline-secondary","shadow","rounded","ms-2"],[1,"fa-solid","fa-clipboard-list","me-3"],[1,"fw-bold","mb-2"],["appendTo","body","bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"ngModelChange","clearable","multiple","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],[1,"mt-5"],[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,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[4,"ngIf","ngIfElse"],[1,"me-2"],[2,"width","18px",3,"src","alt"],[1,"table-responsive"],["matSort","",1,"table","table-hover",3,"matSortChange"],[1,"sticky-top-thead"],[1,"table-light"],[2,"width","120px"],[2,"width","220px"],[2,"width","100px"],["mat-sort-header","created",2,"width","130px"],[2,"width","130px"],[4,"ngFor","ngForOf"],[3,"total","next","previous","filter","totaldata","paginationTotal"],[3,"routerLink","queryParams",4,"ngIf"],["target","_blank",3,"href",4,"ngIf"],[3,"typeId"],[3,"routerLink","queryParams"],["target","_blank",3,"href"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"]],template:function(a,t){if(a&1){let m=D();i(0,"mainpanel",1),v("onSubmit",function(p){return g(m),h(t.Get(p))}),i(1,"actions")(2,"a",2),S(3,"i",3),i(4,"span"),l(5,"Visit our Fulfillment Display System"),n()()(),i(6,"filters")(7,"div")(8,"label",4),l(9,"Channel"),n(),i(10,"ng-select",5),y("ngModelChange",function(p){return g(m),b(t.filter.ListChannelID,p)||(t.filter.ListChannelID=p),h(p)}),f(11,Ti,3,3,"ng-template",6),n()(),i(12,"div",7)(13,"label",8),l(14,"Page Number"),n(),i(15,"input",9),y("ngModelChange",function(p){return g(m),b(t.filter.PageNumber,p)||(t.filter.PageNumber=p),h(p)}),n()(),i(16,"div",7)(17,"label",8),l(18,"Page Size"),n(),i(19,"input",10),y("ngModelChange",function(p){return g(m),b(t.filter.PageSize,p)||(t.filter.PageSize=p),h(p)}),n()(),i(20,"div",7)(21,"label",11),l(22,"From/To"),n(),i(23,"div",12)(24,"datepicker",13),y("dateChange",function(p){return g(m),b(t.filter.From,p)||(t.filter.From=p),h(p)}),n()(),i(25,"div")(26,"datepicker",14),y("dateChange",function(p){return g(m),b(t.filter.To,p)||(t.filter.To=p),h(p)}),n()()()(),i(27,"content")(28,"div",15)(29,"div",16)(30,"div",17),f(31,Ii,20,4,"ng-container",18)(32,Ni,2,0,"ng-template",null,0,q),n()()()()()}if(a&2){let m=U(33);o(10),d("clearable",!0)("multiple",!0)("items",t.channelOptions),C("ngModel",t.filter.ListChannelID),o(5),C("ngModel",t.filter.PageNumber),o(4),C("ngModel",t.filter.PageSize),o(5),C("date",t.filter.From),o(2),C("date",t.filter.To),o(5),d("ngIf",t.data&&t.data.length>0)("ngIfElse",m)}},dependencies:[A,F,Q,Z,B,z,G,X,ie,ee,te,j,re,oe,ne,ae,H,W,V],encapsulation:2})}}return r})();var Di=()=>["/menu/Order/detail"],Mi=(r,c)=>({Number:r,Outlet:c});function Oi(r,c){if(r&1&&(i(0,"span",21),S(1,"img",22),n(),l(2)),r&2){let e=c.item;o(),d("src",e==null?null:e.Img,O)("alt",e.Name),o(),I(" ",e.Name," ")}}function Li(r,c){if(r&1&&(i(0,"a",38),l(1),n()),r&2){let e=s().$implicit;d("routerLink",K(3,Di))("queryParams",pe(4,Mi,e.Number,e.Outlet)),o(),u(e.Number)}}function ki(r,c){if(r&1&&(i(0,"a",39),l(1),n()),r&2){let e=s().$implicit,a=s(2);d("href",a.domain+e.ID,O),o(),u(e.Number)}}function Vi(r,c){if(r&1&&(i(0,"tr")(1,"td"),l(2),n(),i(3,"td"),f(4,Li,2,7,"a",35)(5,ki,2,2,"a",36),n(),i(6,"td"),l(7),n(),i(8,"td"),l(9),T(10,"number"),n(),i(11,"td"),l(12),T(13,"date"),n(),i(14,"td"),l(15),n(),i(16,"td"),S(17,"app-channel-logo",37),n()()),r&2){let e=c.$implicit,a=s(2);o(2),u(e.Outlet),o(2),d("ngIf",a.hasGuidEmpty(e.ID)),o(),d("ngIf",!a.hasGuidEmpty(e.ID)),o(2),u(e.Customer),o(2),u(M(10,8,e.Amount)),o(3),u(k(13,10,e.Created,"dd MMM yyyy HH:mm")),o(3),u(e.State),o(2),d("typeId",e.TypeID)}}function Ai(r,c){if(r&1){let e=D();P(0),i(1,"div",23)(2,"table",24),v("matSortChange",function(t){g(e);let m=s();return h(m.onSort(t))}),i(3,"thead",25)(4,"tr",26)(5,"th",27),l(6,"Outlet"),n(),i(7,"th",28),l(8,"Order number"),n(),i(9,"th"),l(10,"Customer"),n(),i(11,"th",29),l(12,"Amount"),n(),i(13,"th",30),l(14," Created On "),n(),i(15,"th",31),l(16,"Status"),n(),i(17,"th",32),l(18,"Channel"),n()()(),i(19,"tbody"),f(20,Vi,18,13,"tr",33),n()(),i(21,"app-mat-paginator-no-count",34),v("total",function(){g(e);let t=s();return h(t.StoreRowsCountAPIResult())})("next",function(){g(e);let t=s();return h(t.NextPage())})("previous",function(){g(e);let t=s();return h(t.PreviousPage())}),n()(),E()}if(r&2){let e=s();o(20),d("ngForOf",e.data),o(),d("filter",e.filter)("totaldata",e.totaldata)("paginationTotal",e.paginationTotal)}}function Fi(r,c){r&1&&(i(0,"div",40),S(1,"app-empty-state"),n())}var Et=(()=>{class r{constructor(e,a,t,m){this.http=e,this.localDataService=a,this.authService=t,this.dialog=m,this.filter={PageNumber:null,PageSize:null,ListChannelID:[],From:null,To:null},this.totaldata=0,this.paginationTotal=0,this.channelOptions=this.authService.getChannels()}ngOnInit(){this.Load()}hasGuidEmpty(e){return e==N.GuidEMpty}Load(){this.http.post("/api/ordersLoader/GetOrder",{}).subscribe(e=>{this.filter.PageNumber=e.Filter.PageNumber,this.filter.PageSize=e.Filter.RowCount,this.filter.From=e.Filter.From,this.filter.To=e.Filter.To,this.domain=`https://${this.localDataService.getHostName()}/menu/Orders/Orders/Customer_Invoice/Info?ID=`,this.Get()})}Get(e){var a={Number:e,PageNumber:this.filter.PageNumber,PageSize:this.filter.PageSize,ListChannelID:this.filter.ListChannelID,From:this.filter.From,To:this.filter.To};this.http.post("api/orders/GetAll",a).subscribe(t=>{this.data=t.Data,this.sourceData=[...t.Data],this.totaldata=this.data.length})}openExportDialog(){this.dialog.open(ht,{data:{title:"Export Order All",pageNumber:this.filter.PageNumber,rowCount:this.filter.PageSize,filterExport:this.filter,getRowCountApi:"orders/GetRowCount",exportApi:"orders/GetExportAll"}}).afterClosed().subscribe()}changePage(e){this.filter=e,this.Get()}StoreRowsCountAPIResult(){var e={PaymentState:"",DeliveryState:"",Bin:!1,ListChannelID:this.filter.ListChannelID,From:this.filter.From,To:this.filter.To};this.http.post("api/orders/GetRowCount",e).subscribe(a=>{this.paginationTotal=a.Total})}NextPage(){this.filter.PageNumber=this.filter.PageNumber+1,this.Get()}PreviousPage(){this.filter.PageNumber=this.filter.PageNumber-1,this.Get()}onSort(e){if(e.direction==""){this.data=this.sourceData;return}if(e.active=="created"){let a=e.direction=="asc";this.data=this.data.sort((t,m)=>N.compare(t.Created,m.Created,a))}}static{this.\u0275fac=function(a){return new(a||r)(x(R),x(me),x($),x(ue))}}static{this.\u0275cmp=L({type:r,selectors:[["app-all-order"]],standalone:!1,decls:38,vars:10,consts:[["EMPTY_STATE",""],["headerTitle","All","searchBoxPlaceHolder","Search ...",3,"onSubmit"],["href","https://ods.dealpos.app","target","_blank",1,"btn","btn-outline-secondary","shadow","rounded","ms-2"],[1,"fa-solid","fa-clipboard-list","me-3"],[1,"btn","btn-outline-secondary","shadow","rounded","ms-2",3,"click"],[1,"fa-solid","fa-print","me-3"],[1,"fw-bold","mb-2"],["appendTo","body","bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"ngModelChange","clearable","multiple","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],[1,"mt-5"],[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,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[4,"ngIf","ngIfElse"],[1,"me-2"],[2,"width","18px",3,"src","alt"],[1,"table-responsive"],["matSort","",1,"table","table-hover",3,"matSortChange"],[1,"sticky-top-thead"],[1,"table-light"],[2,"width","120px"],[2,"width","220px"],[2,"width","100px"],["mat-sort-header","created",2,"width","130px"],[2,"width","135px"],[2,"width","130px"],[4,"ngFor","ngForOf"],[3,"total","next","previous","filter","totaldata","paginationTotal"],[3,"routerLink","queryParams",4,"ngIf"],["target","_blank",3,"href",4,"ngIf"],[3,"typeId"],[3,"routerLink","queryParams"],["target","_blank",3,"href"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"]],template:function(a,t){if(a&1){let m=D();i(0,"mainpanel",1),v("onSubmit",function(p){return g(m),h(t.Get(p))}),i(1,"actions")(2,"a",2),S(3,"i",3),i(4,"span"),l(5,"Visit our Fulfillment Display System"),n()(),i(6,"button",4),v("click",function(){return g(m),h(t.openExportDialog())}),S(7,"i",5),i(8,"span"),l(9,"Export"),n()()(),i(10,"filters")(11,"div")(12,"label",6),l(13,"Channel"),n(),i(14,"ng-select",7),y("ngModelChange",function(p){return g(m),b(t.filter.ListChannelID,p)||(t.filter.ListChannelID=p),h(p)}),f(15,Oi,3,3,"ng-template",8),n()(),i(16,"div",9)(17,"label",10),l(18,"Page Number"),n(),i(19,"input",11),y("ngModelChange",function(p){return g(m),b(t.filter.PageNumber,p)||(t.filter.PageNumber=p),h(p)}),n()(),i(20,"div",9)(21,"label",10),l(22,"Page Size"),n(),i(23,"input",12),y("ngModelChange",function(p){return g(m),b(t.filter.PageSize,p)||(t.filter.PageSize=p),h(p)}),n()(),i(24,"div",9)(25,"label",13),l(26,"From/To"),n(),i(27,"div",14)(28,"datepicker",15),y("dateChange",function(p){return g(m),b(t.filter.From,p)||(t.filter.From=p),h(p)}),n()(),i(29,"div")(30,"datepicker",16),y("dateChange",function(p){return g(m),b(t.filter.To,p)||(t.filter.To=p),h(p)}),n()()()(),i(31,"content")(32,"div",17)(33,"div",18)(34,"div",19),f(35,Ai,22,4,"ng-container",20)(36,Fi,2,0,"ng-template",null,0,q),n()()()()()}if(a&2){let m=U(37);o(14),d("clearable",!0)("multiple",!0)("items",t.channelOptions),C("ngModel",t.filter.ListChannelID),o(5),C("ngModel",t.filter.PageNumber),o(4),C("ngModel",t.filter.PageSize),o(5),C("date",t.filter.From),o(2),C("date",t.filter.To),o(5),d("ngIf",t.data&&t.data.length>0)("ngIfElse",m)}},dependencies:[A,F,Q,Z,B,z,G,X,ie,ee,te,j,re,oe,ne,ae,H,W,V],encapsulation:2})}}return r})();var Ri=()=>["/menu/Order/detail"],Wi=(r,c)=>({Number:r,Outlet:c});function Bi(r,c){if(r&1&&(i(0,"span",20),S(1,"img",21),n(),l(2)),r&2){let e=c.item;o(),d("src",e==null?null:e.Img,O)("alt",e.Name),o(),I(" ",e.Name," ")}}function zi(r,c){if(r&1&&(i(0,"a",36),l(1),n()),r&2){let e=s().$implicit;d("routerLink",K(3,Ri))("queryParams",pe(4,Wi,e.Number,e.Outlet)),o(),u(e.Number)}}function Gi(r,c){if(r&1&&(i(0,"a",37),l(1),n()),r&2){let e=s().$implicit,a=s(2);d("href",a.domain+e.ID,O),o(),u(e.Number)}}function ji(r,c){if(r&1&&(i(0,"tr")(1,"td"),l(2),n(),i(3,"td"),f(4,zi,2,7,"a",33)(5,Gi,2,2,"a",34),n(),i(6,"td"),l(7),n(),i(8,"td"),l(9),T(10,"number"),n(),i(11,"td"),l(12),T(13,"date"),n(),i(14,"td"),S(15,"app-channel-logo",35),n()()),r&2){let e=c.$implicit,a=s(2);o(2),u(e.Outlet),o(2),d("ngIf",a.hasGuidEmpty(e.ID)),o(),d("ngIf",!a.hasGuidEmpty(e.ID)),o(2),u(e.Customer),o(2),u(M(10,7,e.Amount)),o(3),u(k(13,9,e.Created,"dd MMM yyyy HH:mm")),o(3),d("typeId",e.TypeID)}}function Hi(r,c){if(r&1){let e=D();P(0),i(1,"div",22)(2,"table",23),v("matSortChange",function(t){g(e);let m=s();return h(m.onSort(t))}),i(3,"thead",24)(4,"tr",25)(5,"th",26),l(6,"Outlet"),n(),i(7,"th",27),l(8,"Order number"),n(),i(9,"th"),l(10,"Customer"),n(),i(11,"th",28),l(12,"Amount"),n(),i(13,"th",29),l(14," Created On "),n(),i(15,"th",30),l(16,"Channel"),n()()(),i(17,"tbody"),f(18,ji,16,12,"tr",31),n()(),i(19,"app-mat-paginator-no-count",32),v("total",function(){g(e);let t=s();return h(t.StoreRowsCountAPIResult())})("next",function(){g(e);let t=s();return h(t.NextPage())})("previous",function(){g(e);let t=s();return h(t.PreviousPage())}),n()(),E()}if(r&2){let e=s();o(18),d("ngForOf",e.data),o(),d("filter",e.filter)("totaldata",e.totaldata)("paginationTotal",e.paginationTotal)}}function Ui(r,c){r&1&&(i(0,"div",38),S(1,"app-empty-state"),n())}var It=(()=>{class r{constructor(e,a,t){this.http=e,this.localDataService=a,this.authService=t,this.filter={PageNumber:null,PageSize:null,ListChannelID:[],Note:"",From:null,To:null},this.totaldata=0,this.paginationTotal=0,this.channelOptions=this.authService.getChannels()}ngOnInit(){this.Load()}hasGuidEmpty(e){return e==N.GuidEMpty}Load(){this.http.post("/api/ordersLoader/GetOrder",{}).subscribe(e=>{this.filter.PageNumber=e.Filter.PageNumber,this.filter.PageSize=e.Filter.RowCount,this.filter.From=e.Filter.From,this.filter.To=e.Filter.To,this.domain=`https://${this.localDataService.getHostName()}/menu/Orders/Orders/Customer_Invoice/Info?ID=`,this.Get()})}Get(e){var a={Number:e,PageNumber:this.filter.PageNumber,PageSize:this.filter.PageSize,ListChannelID:this.filter.ListChannelID,Note:this.filter.Note,From:this.filter.From,To:this.filter.To};this.http.post("api/orders/GetCancelled ",a).subscribe(t=>{this.data=t.Data,this.sourceData=[...t.Data],this.totaldata=this.data.length})}changePage(e){this.filter.PageNumber=e.pageIndex+1,this.Get()}StoreRowsCountAPIResult(){var e={PaymentState:"",DeliveryState:"",Bin:!0,ListChannelID:this.filter.ListChannelID,From:this.filter.From,To:this.filter.To};this.http.post("api/orders/GetRowCount",e).subscribe(a=>{this.paginationTotal=a.Total})}NextPage(){this.filter.PageNumber=this.filter.PageNumber+1,this.Get()}PreviousPage(){this.filter.PageNumber=this.filter.PageNumber-1,this.Get()}getChannelLogo(e){return N.getChannelLogoByTypeId(e)}onSort(e){if(e.direction==""){this.data=this.sourceData;return}if(e.active=="created"){let a=e.direction=="asc";this.data=this.data.sort((t,m)=>N.compare(t.Created,m.Created,a))}}static{this.\u0275fac=function(a){return new(a||r)(x(R),x(me),x($))}}static{this.\u0275cmp=L({type:r,selectors:[["app-cancelled"]],standalone:!1,decls:38,vars:11,consts:[["EMPTY_STATE",""],["headerTitle","99 - Cancelled","searchBoxPlaceHolder","Search ...",3,"onSubmit"],["href","https://ods.dealpos.app","target","_blank",1,"btn","btn-outline-secondary","shadow","rounded","ms-2"],[1,"fa-solid","fa-clipboard-list","me-3"],[1,"fw-bold","mb-2"],["appendTo","body","bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"ngModelChange","clearable","multiple","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],[1,"mt-5"],[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"],["type","text","name","Note",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[4,"ngIf","ngIfElse"],[1,"me-2"],[2,"width","18px",3,"src","alt"],[1,"table-responsive"],["matSort","",1,"table","table-hover",3,"matSortChange"],[1,"sticky-top-thead"],[1,"table-light"],[2,"width","120px"],[2,"width","220px"],[2,"width","100px"],["mat-sort-header","created",2,"width","130px"],[2,"width","130px"],[4,"ngFor","ngForOf"],[3,"total","next","previous","filter","totaldata","paginationTotal"],[3,"routerLink","queryParams",4,"ngIf"],["target","_blank",3,"href",4,"ngIf"],[3,"typeId"],[3,"routerLink","queryParams"],["target","_blank",3,"href"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"]],template:function(a,t){if(a&1){let m=D();i(0,"mainpanel",1),v("onSubmit",function(p){return g(m),h(t.Get(p))}),i(1,"actions")(2,"a",2),S(3,"i",3),i(4,"span"),l(5,"Visit our Fulfillment Display System"),n()()(),i(6,"filters")(7,"div")(8,"label",4),l(9,"Channel"),n(),i(10,"ng-select",5),y("ngModelChange",function(p){return g(m),b(t.filter.ListChannelID,p)||(t.filter.ListChannelID=p),h(p)}),f(11,Bi,3,3,"ng-template",6),n()(),i(12,"div",7)(13,"label",8),l(14,"Page Number"),n(),i(15,"input",9),y("ngModelChange",function(p){return g(m),b(t.filter.PageNumber,p)||(t.filter.PageNumber=p),h(p)}),n()(),i(16,"div",7)(17,"label",8),l(18,"Page Size"),n(),i(19,"input",10),y("ngModelChange",function(p){return g(m),b(t.filter.PageSize,p)||(t.filter.PageSize=p),h(p)}),n()(),i(20,"div",7)(21,"label",8),l(22,"Note"),n(),i(23,"input",11),y("ngModelChange",function(p){return g(m),b(t.filter.Note,p)||(t.filter.Note=p),h(p)}),n()(),i(24,"div",7)(25,"label",12),l(26,"From/To"),n(),i(27,"div",13)(28,"datepicker",14),y("dateChange",function(p){return g(m),b(t.filter.From,p)||(t.filter.From=p),h(p)}),n()(),i(29,"div")(30,"datepicker",15),y("dateChange",function(p){return g(m),b(t.filter.To,p)||(t.filter.To=p),h(p)}),n()()()(),i(31,"content")(32,"div",16)(33,"div",17)(34,"div",18),f(35,Hi,20,4,"ng-container",19)(36,Ui,2,0,"ng-template",null,0,q),n()()()()()}if(a&2){let m=U(37);o(10),d("clearable",!0)("multiple",!0)("items",t.channelOptions),C("ngModel",t.filter.ListChannelID),o(5),C("ngModel",t.filter.PageNumber),o(4),C("ngModel",t.filter.PageSize),o(4),C("ngModel",t.filter.Note),o(5),C("date",t.filter.From),o(2),C("date",t.filter.To),o(5),d("ngIf",t.data&&t.data.length>0)("ngIfElse",m)}},dependencies:[A,F,Q,Z,B,z,G,X,ie,ee,te,j,re,oe,ne,ae,H,W,V],encapsulation:2})}}return r})();var qi=[{path:"",component:bt,children:[{path:"",redirectTo:"new",pathMatch:"full"},{path:"new",component:yt,canActivate:[le],data:{title:"New Order"}},{path:"detail",component:vt,canActivate:[le],data:{title:"Orders detail"}},{path:"ready_to_ship",component:Tt,canActivate:[le],data:{title:"Ready To Ship"}},{path:"Shipped",component:wt,canActivate:[le],data:{title:"Shipped"}},{path:"Delivered",component:Pt,canActivate:[le],data:{title:"Delivered"}},{path:"All",component:Et,canActivate:[le],data:{title:"All Order"}},{path:"Cancelled",component:It,canActivate:[le],data:{title:"Cancelled"}},{path:"Download",loadComponent(){return import("./chunk-REFJUWLL.js").then(r=>r.DownloadV2Component)},canActivate:[le],data:{title:"Download"}},{path:"Download_Order_Log",loadComponent:()=>import("./chunk-X3LH2IJE.js").then(r=>r.DownloadOrderLogComponent),canActivate:[le],data:{title:"Download Order Log"}},{path:"Download_Order_Log/Detail",loadComponent:()=>import("./chunk-DI4V7KMK.js").then(r=>r.DownloadOrderDetailComponent),canActivate:[le],data:{title:"Download Order Log Detail"}}]}],Nt=(()=>{class r{static{this.\u0275fac=function(a){return new(a||r)}}static{this.\u0275mod=Me({type:r})}static{this.\u0275inj=De({imports:[he,Le.forChild(qi)]})}}return r})();var Va=(()=>{class r{static{this.\u0275fac=function(a){return new(a||r)}}static{this.\u0275mod=Me({type:r})}static{this.\u0275inj=De({providers:[Ae,Fe,We],imports:[he,Ze,Nt,mt,rt,ut,Le,$e,gt,st,j,_t,et,lt,St,at,ct,ot,H,Be,Ct,dt]})}}return r})();export{Va as OrdersModule};
@@ -1 +0,0 @@
1
- import{ma as o}from"./chunk-T5ONJF63.js";var _=new o("MAT_INPUT_VALUE_ACCESSOR");export{_ as a};
@@ -1 +0,0 @@
1
- import{l as d}from"./chunk-CHZLFJFI.js";import{b as u}from"./chunk-BUFEIJAI.js";import{G as h}from"./chunk-GPEVUTDI.js";import{ja as c,oa as s}from"./chunk-T5ONJF63.js";import{i as n}from"./chunk-K2H6WANG.js";var A=(()=>{class i{constructor(t,e,r){this.toastr=t,this.authService=e,this.router=r}canActivate(t,e){return n(this,null,function*(){let r=JSON.parse(window.localStorage.getItem("user")),a=new Date,o=!1;if(r!=null){let l=new Date(r?.Token?.expiredAt);a<l?o=yield this.checkDashboardAccess(t):(this.authService.logout(),this.onTokenExpired())}else this.router.navigate([""]),this.onTokenExpired();return o})}checkDashboardAccess(t){return n(this,null,function*(){let e=!0;if(t?.url[0]?.path=="dashboard"){let a=yield this.authService.redirectUrl();a.includes("dashboard")||this.router.navigate([a])}return e})}onTokenExpired(){this.toastr.error("Your session has expired. Please login again.","Session Expired")}static{this.\u0275fac=function(e){return new(e||i)(s(u),s(d),s(h))}}static{this.\u0275prov=c({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();export{A as a};
@@ -1 +0,0 @@
1
- import{a as L,b as G}from"./chunk-OLSC6KHB.js";import"./chunk-G6EG5QJS.js";import"./chunk-QCZIDOKW.js";import{b as W,e as H}from"./chunk-BUFEIJAI.js";import"./chunk-K5XRGNWG.js";import"./chunk-KHWTOD6H.js";import{l as q,m as z}from"./chunk-BIQHA7UA.js";import"./chunk-TMFFA26Y.js";import"./chunk-WAW37FIG.js";import{h as N,m as P,y as j}from"./chunk-DPLEMBB4.js";import{g as R,j as $,n as A}from"./chunk-GPEVUTDI.js";import{Eb as E,Ec as p,Gc as y,Ic as T,Jc as V,Kb as _,Kc as B,Oc as D,Qa as M,Wb as s,Z as F,Zc as S,_c as v,cc as O,ec as I,fc as k,gc as o,hc as r,ja as w,jc as C,kc as f,mc as g,pa as m,qb as c,rc as x,sc as l,ya as d,za as u}from"./chunk-T5ONJF63.js";import"./chunk-K2H6WANG.js";var b=(()=>{class t{constructor(){this.httpService=m(H)}getClearCacheOptions$(){return this.httpService.get("/api/channelloader/OptionClearCache")}flushCache(e){return this.httpService.post("/api/Channel/RemoveCacheByRequest",e)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=w({token:t,factory:t.\u0275fac})}}return t})();function Q(t,h){if(t&1){let e=g();C(0),o(1,"button",10),x("click",function(){let n=d(e).ngIf,a=l();return u(a.onFlushCache(n))}),p(2," Flush Cache "),r(),f()}if(t&2){let e,i=l();c(),s("disabled",((e=i.selectedOptions())==null?null:e.length)==0)}}function U(t,h){if(t&1){let e=g();C(0),o(1,"mat-checkbox",11),x("change",function(n){let a=d(e).ngIf,J=l();return u(J.onSelectAll(n.checked,a))}),r(),f()}}function X(t,h){if(t&1){let e=g();o(0,"tr")(1,"td")(2,"div")(3,"mat-checkbox",12),B("ngModelChange",function(n){let a=d(e).$implicit;return V(a.selected,n)||(a.selected=n),u(n)}),x("ngModelChange",function(){d(e);let n=l().ngIf,a=l();return u(a.onSelectOption(n))}),r()()(),o(4,"td"),p(5),r(),o(6,"td")(7,"div",13),p(8),r()()()}if(t&2){let e=h.$implicit;c(3),T("ngModel",e.selected),c(2),y(" ",e.Name," "),c(3),y(" ",e.Description," ")}}function Y(t,h){if(t&1&&(C(0),I(1,X,9,3,"tr",null,O),f()),t&2){let e=h.ngIf;c(),k(e)}}var fe=(()=>{class t{constructor(){this.flushCacheService=m(b),this.toastr=m(W),this.clearCacheOptions$=this.flushCacheService.getClearCacheOptions$().pipe(F(1)),this.selectedOptions=M([])}onFlushCache(e){confirm("Are you sure you want to flush the cache?")&&this.flushCacheService.flushCache(this.selectedOptions()).subscribe(n=>{this.toastr.success(n.Message,"Successfully flushed the cache"),e.forEach(a=>a.selected=!1)})}onSelectAll(e,i){i.forEach(n=>n.selected=e),this.onSelectOption(i)}onSelectOption(e){let i=e.filter(n=>n.selected).map(n=>n.ID);this.selectedOptions.set(i)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=E({type:t,selectors:[["app-flush-cache"]],features:[D([b])],decls:22,vars:11,consts:[["headerTitle","Flush Cache",3,"hideSearchBox","hideSearchDropdown"],[4,"ngIf"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-12"],[1,"table-responsive"],[1,"table","table-hover"],[1,"table-light"],[2,"width","20px"],[2,"width","300px"],[1,"btn","btn-success","btn-lg","text-success","me-2",3,"click","disabled"],["color","primary",2,"margin-bottom","-5px","margin-top","-5px",3,"change"],["color","primary",2,"margin-bottom","-5px","margin-top","-5px",3,"ngModelChange","ngModel"],[1,"text-capitalize"]],template:function(i,n){i&1&&(o(0,"mainpanel",0)(1,"actions"),_(2,Q,3,1,"ng-container",1),S(3,"async"),r(),o(4,"content")(5,"div",2)(6,"div",3)(7,"div",4)(8,"div",5)(9,"table",6)(10,"thead")(11,"tr",7)(12,"th",8),_(13,U,2,0,"ng-container",1),S(14,"async"),r(),o(15,"th",9),p(16,"Cache"),r(),o(17,"th"),p(18,"Description"),r()()(),o(19,"tbody"),_(20,Y,3,0,"ng-container",1),S(21,"async"),r()()()()()()()()),i&2&&(s("hideSearchBox",!0)("hideSearchDropdown",!0),c(2),s("ngIf",v(3,5,n.clearCacheOptions$)),c(11),s("ngIf",v(14,7,n.clearCacheOptions$)),c(7),s("ngIf",v(21,9,n.clearCacheOptions$)))},dependencies:[A,R,$,z,q,G,L,j,N,P],encapsulation:2})}}return t})();export{fe as FlushCacheComponent};
@@ -1 +0,0 @@
1
- import{a as ke}from"./chunk-NMJGLMWI.js";import{a as De}from"./chunk-YR2WEZDG.js";import{a as W}from"./chunk-XHAXYWZ7.js";import{a as Oe,b as Ve,c as Ne,d as J}from"./chunk-4XMCJ7I5.js";import{a as Te}from"./chunk-PPDHTO44.js";import{a as we}from"./chunk-7KG3DC5J.js";import{b as Ee}from"./chunk-IEYFOHME.js";import"./chunk-YXFTLQ5M.js";import"./chunk-OLSC6KHB.js";import{a as Fe}from"./chunk-EGTYAIU5.js";import"./chunk-7TWBIV3T.js";import"./chunk-J7AGLBPL.js";import"./chunk-6ALHX2I4.js";import"./chunk-3RK6DDJD.js";import{a as ve,b as Ie,c as ye}from"./chunk-GHQH62TZ.js";import"./chunk-CH2MLZU7.js";import"./chunk-ZZVNB72Q.js";import{a as Me}from"./chunk-VGXQU74M.js";import"./chunk-SDUUFQUI.js";import"./chunk-G6EG5QJS.js";import"./chunk-RIHLYYZU.js";import"./chunk-Q2OEJFVT.js";import"./chunk-6IAGGRZN.js";import"./chunk-T6QOFDEE.js";import"./chunk-KXZCGKQW.js";import"./chunk-QCZIDOKW.js";import{a as ue,l as xe}from"./chunk-CHZLFJFI.js";import{b as he,e as ge}from"./chunk-BUFEIJAI.js";import"./chunk-K5XRGNWG.js";import"./chunk-V5WYSCVT.js";import"./chunk-KHWTOD6H.js";import{d as Pe,l as be,m as Se}from"./chunk-BIQHA7UA.js";import{r as A,s as j}from"./chunk-TMFFA26Y.js";import"./chunk-WAW37FIG.js";import{b as _e,h as R,m as L,y as $}from"./chunk-DPLEMBB4.js";import{c as U,e as Ce,f as fe}from"./chunk-PXB4YEY3.js";import{d as se,f as k,g as me,j as pe,m as de,n as B}from"./chunk-GPEVUTDI.js";import{$c as ce,Dc as z,Eb as N,Ec as p,Fc as re,G as K,Gc as f,Ic as D,Jc as O,Ka as ee,Kb as u,Kc as V,Oc as ae,Qa as te,Qc as w,Rc as le,Wb as s,Z as G,Zb as ne,Zc as b,_c as y,ad as H,bc as ie,cc as M,ea as Y,ec as E,fc as T,gc as o,hc as a,ic as P,jc as S,kc as v,mc as I,ob as F,pa as Q,qb as r,rc as h,sc as m,v as q,vc as oe,wb as x,ya as g,za as C}from"./chunk-T5ONJF63.js";import{a as X,b as Z}from"./chunk-K2H6WANG.js";var We=(n,c)=>({color:n,"font-weight":c});function Ke(n,c){if(n&1&&(o(0,"mat-radio-button",2),p(1),a()),n&2){let e=c.$implicit,i=c.index,t=m();ne(le(7,We,t.model==e.Key&&t.activeBold?"#0976b4":"",t.model==e.Key&&t.activeBold?"700":"")),s("disabled",t.exception==e.Value)("matTooltip",t.title.length>0?t.title[i]:"")("value",e.Key)("name",t.name),r(),f("",e.Value," ")}}var Be=(()=>{class n{constructor(){this.disabled=!1,this.modelChange=new ee,this.options=[{Key:!1,Value:"No"},{Key:!0,Value:"Yes"}],this.border=!1,this.name="",this.title=[],this.exception="",this.activeBold=""}change(e){this.modelChange.emit(e)}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275cmp=N({type:n,selectors:[["lib-radio-options"]],inputs:{model:"model",disabled:"disabled",options:"options",border:"border",name:"name",title:"title",exception:"exception",activeBold:"activeBold"},outputs:{modelChange:"modelChange"},decls:2,vars:3,consts:[["color","primary",3,"ngModelChange","disabled","ngModel"],["matTooltipPosition","above","class","me-4 mt-1",3,"style","disabled","matTooltip","value","name",4,"ngFor","ngForOf"],["matTooltipPosition","above",1,"me-4","mt-1",3,"disabled","matTooltip","value","name"]],template:function(i,t){i&1&&(o(0,"mat-radio-group",0),h("ngModelChange",function(d){return t.change(d)}),u(1,Ke,2,10,"mat-radio-button",1),a()),i&2&&(s("disabled",t.disabled)("ngModel",t.model),r(),s("ngForOf",t.options))},dependencies:[B,k,ye,ve,Ie,$,R,L,j,A],styles:["html[_ngcontent-%COMP%]{--mdc-radio-state-layer-size: 36px}html[_ngcontent-%COMP%]{--mat-radio-touch-target-display: block}.mat-mdc-radio-button[_ngcontent-%COMP%] .mdc-radio[_ngcontent-%COMP%] .mdc-radio__native-control[_ngcontent-%COMP%]:enabled:checked + .mdc-radio__background[_ngcontent-%COMP%] .mdc-radio__outer-circle[_ngcontent-%COMP%]{border-color:#0976b4!important}.mat-mdc-radio-button[_ngcontent-%COMP%] .mdc-radio[_ngcontent-%COMP%] .mdc-radio__native-control[_ngcontent-%COMP%]:enabled + .mdc-radio__background[_ngcontent-%COMP%] .mdc-radio__inner-circle[_ngcontent-%COMP%]{background-color:#0976b4!important;border-color:#0976b4!important}"]})}}return n})();var Re=n=>[n],Ge=n=>({"text-decoration-line-through":n}),ze=n=>({"border-bottom":n}),He=n=>({"bg-gradient-warning":n});function Je(n,c){if(n&1){let e=I();S(0),o(1,"div")(2,"label",21),p(3,"Channel"),a(),o(4,"channel-select-options",22),V("ngModelChange",function(t){g(e);let l=m();return O(l.searchFilter.ListChannelID,t)||(l.searchFilter.ListChannelID=t),C(t)}),a()(),o(5,"div",23)(6,"label",24),p(7,"Filter by"),a(),o(8,"lib-radio-options",25),V("modelChange",function(t){g(e);let l=m();return O(l.searchFilter.filterModel,t)||(l.searchFilter.filterModel=t),C(t)}),a()(),v()}if(n&2){let e=m();r(4),s("multiple",!0),D("ngModel",e.searchFilter.ListChannelID),r(4),D("model",e.searchFilter.filterModel),s("options",e.filterTypeOptions)}}function Xe(n,c){if(n&1){let e=I();o(0,"button",27),h("click",function(){g(e);let t=m().ngIf,l=m();return C(l.onUpdateItems(t))}),P(1,"i",28),p(2," Update "),a()}}function Ze(n,c){if(n&1&&(S(0),o(1,"div",4),u(2,Xe,3,0,"button",26),a(),v()),n&2){let e=c.ngIf,i=m();r(2),s("ngIf",i.productService.hasSelectionVariant(e))}}function qe(n,c){if(n&1&&(o(0,"th",15)(1,"div",29),P(2,"img",30),o(3,"div",31),p(4),b(5,"stringLimit"),a()()()),n&2){let e=c.$implicit;r(),s("matTooltip",(e.Name==null?null:e.Name.length)>20?e.Name:""),r(),s("src",e==null?null:e.Img,F),r(2),f(" ",ce(5,3,e.Name,20)," ")}}function Ye(n,c){if(n&1){let e=I();o(0,"th")(1,"input",32),V("ngModelChange",function(t){g(e);let l=m();return O(l.checkboxState,t)||(l.checkboxState=t),C(t)}),h("ngModelChange",function(){g(e);let t=m();return C(t.onSelectAllData())}),a()()}if(n&2){let e=m();r(),D("ngModel",e.checkboxState)}}function Qe(n,c){n&1&&(o(0,"th",33)(1,"span"),p(2,"Expected"),a(),o(3,"span",34),p(4,"(POS)"),a()(),o(5,"th",33),p(6,"Channel"),a())}function et(n,c){if(n&1){let e=I();o(0,"img",47),h("click",function(t){g(e);let l=m(3).$implicit,d=m(2);return C(d.onZoomImage(t,l==null?null:l.ImageUrl))}),a()}if(n&2){let e=m(3).$implicit;oe("src",e==null?null:e.ImageUrl,F)}}function tt(n,c){n&1&&P(0,"img",48)}function nt(n,c){if(n&1&&(o(0,"small",46),p(1),a()),n&2){let e=m(3).$implicit;r(),f("(",e==null?null:e.Category,")")}}function it(n,c){if(n&1&&(S(0),o(1,"td",42),u(2,et,1,1,"img",43)(3,tt,1,0,"ng-template",null,0,H),a(),o(5,"td",44)(6,"h5",45),p(7),a(),u(8,nt,2,1,"small",46),a(),v()),n&2){let e=z(4),i=m().$index,t=m().$implicit,l=m().ngIf;r(),s("rowSpan",t==null?null:t.Variants.length)("ngClass",w(7,ze,i+1==l.length)),r(),s("ngIf",t==null?null:t.ImageUrl)("ngIfElse",e),r(3),s("rowSpan",t==null?null:t.Variants.length),r(2),re(t==null?null:t.Name),r(),ie(t!=null&&t.Category?8:-1)}}function ot(n,c){if(n&1){let e=I();o(0,"td",49)(1,"input",32),V("ngModelChange",function(t){g(e);let l=m().$implicit;return O(l.selected,t)||(l.selected=t),C(t)}),a()()}if(n&2){let e=m().$implicit;r(),D("ngModel",e.selected)}}function rt(n,c){if(n&1){let e=I();S(0),o(1,"td",51),p(2),b(3,"number"),a(),o(4,"td",52),h("click",function(){let t=g(e).$implicit,l=m(2).$implicit,d=m().$implicit,_=m(2);return C(_.openTableDialog(l,d,t))}),o(5,"div",53)(6,"div",54),p(7),b(8,"number"),a(),o(9,"a",55),h("click",function(t){return g(e),C(t==null?null:t.stopPropagation())}),P(10,"i",40),a()()(),v()}if(n&2){let e=c.$implicit;r(2),f(" ",y(3,4,e.PriceExpected)," "),r(2),s("ngClass",w(8,He,e.Price!=e.PriceExpected)),r(3),f(" ",y(8,6,e.Price)," "),r(2),s("href",e.Url,F)}}function at(n,c){n&1&&(o(0,"td",56),p(1," X "),a(),o(2,"td",56),p(3," X "),a())}function lt(n,c){if(n&1&&(S(0),u(1,rt,11,10,"ng-container",50)(2,at,4,0,"ng-template",null,1,H),v()),n&2){let e=c.$implicit,i=z(3),t=m().$implicit,l=m(3);r(),s("ngIf",l.getItemFromChannel(t,e.ID))("ngIfElse",i)}}function ct(n,c){if(n&1&&(o(0,"tr"),u(1,it,9,9,"ng-container",3),o(2,"td",35),p(3),a(),o(4,"td",36)(5,"div",37)(6,"div",38),p(7),a(),o(8,"div",31)(9,"a",39),P(10,"i",40),a()()()(),u(11,ot,2,1,"ng-template",19)(12,lt,4,2,"ng-container",41),a()),n&2){let e=c.$implicit,i=c.$index,t=m(3);r(),s("ngIf",i==0),r(2),f(" ",e==null?null:e.Model," "),r(),s("matTooltip",e.Discontinued?t.discontinuedVariantMsg:""),r(2),s("ngClass",w(8,Ge,e.Discontinued)),r(),f(" ",e==null?null:e.Code," "),r(2),s("href",t.hostName+"/menu/Products/Catalog/Variants/Info?ID="+(e==null?null:e.ID),F),r(2),s("ngxPermissionsOnly",w(10,Re,t.rolePriceEdit)),r(),s("ngForOf",t.channels())}}function st(n,c){if(n&1&&(o(0,"tbody"),E(1,ct,13,12,"tr",null,M),a()),n&2){let e=c.$implicit;r(),T(e.Variants)}}function mt(n,c){if(n&1&&(S(0),E(1,st,3,0,"tbody",null,M),v()),n&2){let e=c.ngIf;r(),T(e)}}var qt=(()=>{class n{constructor(e,i,t,l,d,_,Le){this.http=e,this.toastr=i,this.dialog=t,this.productService=l,this.authService=d,this.biggerPictureService=_,this.paginationService=Le,this.infinitePagination=Q(J),this.searchFilter=new we,this.checkboxState=!1,this.rolePriceEdit=ue.price,this.discontinuedVariantMsg="This Variant is discontinued from POS, you must Non Active manually at the seller center so that it is not sold again on the channel.",this.rowCountAPI="Inventory/GetMultipleChannelComparisonRowCount",this.channels=te([]),this.filterTypeOptions=[{Key:W.ALL,Value:"All"},{Key:W.DIFFERENCE,Value:"Difference"}],this.pageData={Title:"Price Realtime",Nav:[{Title:"Price Cache",Url:"/menu/price",Active:!1}]},this.channelOptions=this.authService.getChannels(),this.hostName=this.authService.getDomain(),this.initPagination(),this.initChannelTable()}initChannelTable(){let e=this.searchFilter.ListChannelID,i=[];U.IsEmpty(e)||e?.length==0?i=this.channelOptions:i=this.channelOptions.filter(t=>e.findIndex(l=>l==t.ID)>-1),this.channels.update(()=>i)}initPagination(){this.infinitePagination.fetchDataEndpoint="Price/GetOutletPrice",this.infinitePagination.fethRowCountEndpoint=this.rowCountAPI,this.initProduct(),this.initPageLoader()}initProduct(){this.data$=this.infinitePagination.data$.pipe(G(1))}initPageLoader(){this.loader$=this.http.post("/api/PriceLoader/LoadMultiple",{}).pipe(Y(e=>{this.searchFilter=e.Filter,this.searchFilter.filterModel=W.ALL,this.infinitePagination.reloadPagination(this.searchFilter)}),G(1))}onSelectAllData(){this.data$=this.data$.pipe(q(e=>(e.map(i=>(i.Variants&&(i.Variants=i.Variants.map(t=>(t.selected=this.checkboxState,t))),i)),e)))}onFilter(e){this.searchFilter.text=e;let i=Z(X({},this.searchFilter),{text:e,PageNumber:this.searchFilter.PageNumber,RowCount:this.searchFilter.RowCount});this.initChannelTable(),this.infinitePagination.reloadPagination(i)}updatePrice(e){let i=this.productService.selectedVariantProduct(e);if(i.length>0){let t=i.map(_=>_.ID),d={ListChannelID:this.channelOptions.filter(_=>_.selected).map(_=>_.ID),ListID:t};this.http.post("/api/Price/UpdateChannelOutletPrice",d).subscribe({next:_=>{this.resetSelectedChannel(),this.onFilter(),this.toastr.success("Successfully updated "+d.ListID.length+" items in "+d.ListChannelID.length+" channels","Success")},error:_=>{this.resetSelectedChannel()}})}}resetSelectedChannel(){this.channelOptions=this.channelOptions.map(e=>(e.selected=!1,e))}getItemFromChannel(e,i){return e.Channel.find(t=>t.ChannelID==i)}onUpdateItems(e){let i=this.productService.selectedVariantProduct(e);this.dialog.open(De,{data:{title:"Updating Price",selectedItems:i,channels:this.channelOptions},width:"400px"}).afterClosed().pipe(K(t=>U.IsNotEmpty(t))).subscribe(t=>{this.channelOptions=t,this.updatePrice(e)})}openTableDialog(e,i,t){let l=JSON.parse(JSON.stringify(e));this.dialog.open(Oe,{data:{Name:i.Name,Variant:l,ChannelID:t?.ChannelID,Table:"price",ChannelItemID:t?.ChannelItemID}}).afterClosed().pipe(K(_=>U.IsNotEmpty(_))).subscribe(_=>{this.updateProductPrice(_,t)})}updateProductPrice(e,i){let t={ID:e.ChannelID,ChannelItemID:e.ChannelItemID,ChannelVariantID:e.ChannelVariationID,Price:parseFloat(e.Price),VariantID:e.ID,SKU:e.Sku};this.http.post("/api/Price/UpdatePriceByID",t).subscribe(l=>{i.Price=t.Price;let d=this.productService.findChannelById(t.ID,this.channelOptions);this.toastr.success(`Successfully updated ${e.ItemName} (${e.VarName}) inventory in ${d.Name} to ${t.Price}`,"Success")})}openExportDialog(){this.dialog.open(Ee,{data:{title:"Export Custom Channel Price",pageNumber:this.searchFilter.PageNumber,rowCount:this.searchFilter.RowCount,filterExport:this.searchFilter,getRowCountApi:this.rowCountAPI,exportApi:"price/GetExportOutletPrice"}}).afterClosed().subscribe()}onZoomImage(e,i){this.biggerPictureService.openBiggerPicture(e,i)}static{this.\u0275fac=function(i){return new(i||n)(x(ge),x(he),x(Pe),x(Fe),x(xe),x(Me),x(Te))}}static{this.\u0275cmp=N({type:n,selectors:[["app-custom-channel-price"]],features:[ae([J])],decls:38,vars:23,consts:[["elsePic",""],["elseCol",""],["headerTitle","Price Comparison",3,"onSubmit","hideSearchBox","hideSearchDropdown","textButton"],[4,"ngIf"],[1,"d-flex"],[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"],[1,"col-md-12"],[1,"table-responsive"],[1,"table"],[1,"thead-light","sticky-top-thead"],[1,"channel-column"],["colspan","5"],["scope","col","colspan","2",1,"text-center","border-bottom-0","border","text-uppercase"],["scope","col","colspan","2",1,"text-center","w-25"],["scope","col",1,"text-start","w-20"],["scope","col",1,"text-end","w-10"],[3,"ngxPermissionsOnly"],[3,"onNextPage","onLastPage","onGetRowCount","totalData","hideCount","rowCount","pageNumber","disableNextButton","goToLastPage"],[1,"fw-bold","mb-2"],[3,"ngModelChange","multiple","ngModel"],[1,"mt-5",2,"height","46px"],[1,"fw-bold","mb-2","d-block"],["name","filterModel",3,"modelChange","model","options"],["type","button","class","btn btn-success shadow rounded","data-toggle","modal",3,"click",4,"ngIf"],["type","button","data-toggle","modal",1,"btn","btn-success","shadow","rounded",3,"click"],[1,"fas","fa-chevron-circle-up"],["matTooltipPosition","above",1,"d-flex","align-items-center","justify-content-center",2,"width","180px",3,"matTooltip"],[2,"width","16px","height","16px",3,"src"],[1,"ms-2"],["type","checkbox",3,"ngModelChange","ngModel"],[1,"text-end","border-top-0","border","w-10"],[1,"ms-1"],[1,"text-start","border-bottom"],["matTooltipPosition","above",1,"text-end","border-bottom",3,"matTooltip"],[1,"d-flex","align-items-center","justify-content-end"],[3,"ngClass"],["target","_blank",3,"href"],[1,"fas","fa-solid","fa-arrow-up-right-from-square","external-link-custom"],[4,"ngFor","ngForOf"],[1,"text-center",3,"rowSpan","ngClass"],["class","border rounded w-img cursor-pointer",3,"src","click",4,"ngIf","ngIfElse"],[1,"text-start","border-bottom",2,"padding-left","0px",3,"rowSpan"],[1,"mb-0","item-name"],[1,"mt-1"],[1,"border","rounded","w-img","cursor-pointer",3,"click","src"],["src","//res.cloudinary.com/pos/image/upload/w_40/POS/Images/Icon/products_thumb.png",1,"border","rounded","w-img"],[1,"align-middle"],[4,"ngIf","ngIfElse"],[1,"text-end","border"],[1,"text-center","border","pointer","cell-hover",3,"click","ngClass"],[1,"d-flex","align-items-center","justify-content-center"],[1,"me-2"],["target","_blank",3,"click","href"],[1,"table-white","border","text-end",2,"color","red"]],template:function(i,t){i&1&&(o(0,"mainpanel",2),h("onSubmit",function(d){return t.onFilter(d)}),o(1,"filters"),u(2,Je,9,4,"ng-container",3),b(3,"async"),a(),o(4,"actions")(5,"div",4),u(6,Ze,3,1,"ng-container",3),b(7,"async"),o(8,"button",5),h("click",function(){return t.openExportDialog()}),P(9,"i",6),o(10,"span"),p(11,"Export"),a()()()(),o(12,"content")(13,"div",7)(14,"div",8)(15,"div",9)(16,"div",10)(17,"table",11)(18,"thead",12)(19,"tr",13),P(20,"th",14),E(21,qe,6,6,"th",15,M),a(),o(23,"tr")(24,"th",16)(25,"span"),p(26," Product "),a()(),o(27,"th",17),p(28,"Variant"),a(),o(29,"th",18),p(30,"SKU"),a(),u(31,Ye,2,1,"ng-template",19),E(32,Qe,7,0,null,null,M),a()(),u(34,mt,3,0,"ng-container",3),b(35,"async"),a(),o(36,"infinite-paginator",20),b(37,"async"),h("onNextPage",function(){return t.infinitePagination.onNextPage(t.searchFilter)})("onLastPage",function(){return t.infinitePagination.onLastPage(t.searchFilter)})("onGetRowCount",function(){return t.infinitePagination.getRowCount(t.searchFilter)}),a()()()()()()()),i&2&&(s("hideSearchBox",!1)("hideSearchDropdown",!1)("textButton","Search"),r(2),s("ngIf",y(3,13,t.loader$)),r(4),s("ngIf",y(7,15,t.data$)),r(15),T(t.channels()),r(10),s("ngxPermissionsOnly",w(21,Re,t.rolePriceEdit)),r(),T(t.channels()),r(2),s("ngIf",y(35,17,t.data$)),r(2),s("totalData",t.infinitePagination.totalData())("hideCount",t.infinitePagination.hideCount())("rowCount",y(37,19,t.infinitePagination.totalRowCount$))("pageNumber",t.infinitePagination.pageNumber())("disableNextButton",t.infinitePagination.disableNextButton())("goToLastPage",t.infinitePagination.isLastPage()))},dependencies:[B,se,k,me,pe,de,Se,be,$,_e,R,L,Ne,Be,j,A,Ve,fe,Ce,ke],styles:[".w-10[_ngcontent-%COMP%]{width:10%}.w-20[_ngcontent-%COMP%]{width:20%}.w-img[_ngcontent-%COMP%]{width:40px;height:40px}.item-name[_ngcontent-%COMP%]{font-weight:400;font-size:larger}.cell-hover[_ngcontent-%COMP%]:hover{background-color:#c9c9c9!important}"]})}}return n})();export{qt as CustomChannelPriceComponent};
@@ -1,3 +0,0 @@
1
- import{e as te}from"./chunk-BUFEIJAI.js";import{a as ze,b as ge,c as Ge,d as Ve,e as me,f as Ke,g as Ae,h as qe,i as q,j as we,k as C}from"./chunk-V5WYSCVT.js";import{b as fe,c as ee,d as Ze}from"./chunk-PXB4YEY3.js";import{G as $e,L as Je,n as Ue,o as We,p as He}from"./chunk-GPEVUTDI.js";import{F as je,Fb as W,G as Ne,La as F,O as ue,T as Be,Va as U,Z as de,aa as _,ba as he,bd as Le,c as g,cd as Fe,ea as V,f as Y,gd as K,j as _e,ja as k,k as xe,ka as M,ma as y,n as z,o as Q,oa as h,p as x,pa as L,q as G,qa as Me,ua as pe,v as D,w as Oe}from"./chunk-T5ONJF63.js";import{a as le,i as I}from"./chunk-K2H6WANG.js";var Se=function(t){return t.dashboardView="Dashboard",t.report="Report",t.outlet="Outlet",t.price="Price",t.channelView="ChannelView",t.channelAdd="ChannelAdd",t.channelEdit="ChannelEdit",t.channelDelete="ChannelDelete",t.orderView="OrderView",t.downloadOrder="DownloadOrder",t}(Se||{});var Xe={production:!0,version:"5.41.3",firebaseConfig:{apiKey:"AIzaSyDnnitFXpM8TglWKNpzu4ChgF98n25Rgvw",authDomain:"auth.dealpos.com",projectId:"devops-signin",storageBucket:"devops-signin.appspot.com",messagingSenderId:"412465165194",appId:"1:412465165194:web:03d806f6b6ab6f8b460e73",measurementId:"G-MNDBRJ5XZD"},news:"https://changelog.dealpos.app/umbraco/delivery/api/v2/content?fetch=children:omni&sort=sortOrder:asc"};var Ye=(()=>{class t{static{this.SubmitConfig="/api/Channel/SubmitConfig"}static{this.PosAccountTest="/api/POSAccount/Test"}static{this.PosAccountRemove="/api/POSAccount/Remove"}static{this.PosAccountGetConfig="/api/ChannelLoader/GetConfig"}static{this.ChannelGetLastSyncByID="/api/Channel/GetLastSyncByID"}static{this.GetChannel="/api/Channel/GetChannel"}static{this.GetChannelLoader="/api/ChannelLoader/GetChannelLoader"}static{this.TestShopID="/api/Channel/TestShopID"}static{this.UpdateChannelIndex="/api/Channel/UpdateChannelIndex"}static{this.DeleteChannel="/api/Channel/DeleteChannel"}static{this.GetRegisterByOutletName="/api/Channel/GetRegistersByOutletOrder"}static{this.GetChannelRowCount="/api/Channel/GetCountChannel"}static{this.GetChannelWarehouse="/api/Channel/GetChannelWarehouseLocation"}static{this.UnSynchronizedWarehouse="/api/Channel/UnSynchronizedWarehouse"}static{this.GetChannelDetail="/api/ChannelLoader/GetChannelView"}static{this.GetOrderPreview="/api/Orders/Preview"}static{this.GetOrderPreviewV2="/api/Orders/PreviewV2"}static{this.GetDownloadOrder="/api/Orders/Download"}static{this.GetDownloadOrderV2="/api/Orders/DownloadV2"}static{this.ShopeeV2_URL="/api/ChannelAuthorization/ShopeeV2_URL"}static{this.Tiktok_URL="/api/ChannelAuthorization/Tiktok_URL"}static{this.Lazada_URL="/api/ChannelAuthorization/Lazada_URL"}static{this.AddTokopedia="/api/ChannelAdd/Tokopedia"}static{this.AddShopify="/api/ChannelAdd/AddShopify"}static{this.AddWoocommerce="/api/ChannelAdd/AddWooCommerce"}static{this.AddPlugo="/api/ChannelAdd/Plugo"}static{this.UploadPlugoProduct="/api/product/plugo/AddProduct"}static{this.RefreshToken="/api/RefreshToken"}static{this.RefreshInventory="/api/Inventory/RefreshInventory"}static{this.GetOrderApiLog="/api/Orders/GetOrderDetailByChannel"}static{this.GetProductApiLog="/api/Product/GetProductDetailBySKU"}}return t})();var St="firebase",vt="11.10.0";q(St,vt,"app");var H=new Le("ANGULARFIRE2_VERSION");var Qe=(t,a)=>{let e=a?[a]:qe(),n=[];return e.forEach(r=>{r.container.getProvider(t).instances.forEach(i=>{n.includes(i)||n.push(i)})}),n},ve=function(t){return t[t.SILENT=0]="SILENT",t[t.WARN=1]="WARN",t[t.VERBOSE=2]="VERBOSE",t}(ve||{}),_n=K()&&typeof Zone<"u"?ve.WARN:ve.SILENT;var ne=class{zone;delegate;constructor(a,e=xe){this.zone=a,this.delegate=e}now(){return this.delegate.now()}schedule(a,e,n){let r=this.zone,o=function(i){r?r.runGuarded(()=>{a.apply(this,[i])}):a.apply(this,[i])};return this.delegate.schedule(o,e,n)}},ke=(()=>{class t{outsideAngular;insideAngular;constructor(){let e=L(F);this.outsideAngular=e.runOutsideAngular(()=>new ne(typeof Zone>"u"?void 0:Zone.current)),this.insideAngular=e.run(()=>new ne(typeof Zone>"u"?void 0:Zone.current,_e))}static \u0275fac=function(n){return new(n||t)};static \u0275prov=k({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var It=new Map,bt={activated:!1,tokenObservers:[]},yt={initialized:!1,enabled:!1};function T(t){return It.get(t)||Object.assign({},bt)}function rt(){return yt}var Et="https://content-firebaseappcheck.googleapis.com/v1";var Ct="exchangeDebugToken",et={OFFSET_DURATION:5*60*1e3,RETRIAL_MIN_WAIT:30*1e3,RETRIAL_MAX_WAIT:16*60*1e3},Hn=24*60*60*1e3;var ye=class{constructor(a,e,n,r,o){if(this.operation=a,this.retryPolicy=e,this.getWaitDuration=n,this.lowerBound=r,this.upperBound=o,this.pending=null,this.nextErrorWaitInterval=r,r>o)throw new Error("Proactive refresh lower bound greater than upper bound!")}start(){this.nextErrorWaitInterval=this.lowerBound,this.process(!0).catch(()=>{})}stop(){this.pending&&(this.pending.reject("cancelled"),this.pending=null)}isRunning(){return!!this.pending}process(a){return I(this,null,function*(){this.stop();try{this.pending=new ge,this.pending.promise.catch(e=>{}),yield Tt(this.getNextRun(a)),this.pending.resolve(),yield this.pending.promise,this.pending=new ge,this.pending.promise.catch(e=>{}),yield this.operation(),this.pending.resolve(),yield this.pending.promise,this.process(!0).catch(()=>{})}catch(e){this.retryPolicy(e)?this.process(!1).catch(()=>{}):this.stop()}})}getNextRun(a){if(a)return this.nextErrorWaitInterval=this.lowerBound,this.getWaitDuration();{let e=this.nextErrorWaitInterval;return this.nextErrorWaitInterval*=2,this.nextErrorWaitInterval>this.upperBound&&(this.nextErrorWaitInterval=this.upperBound),e}}};function Tt(t){return new Promise(a=>{setTimeout(a,t)})}var Pt={"already-initialized":"You have already called initializeAppCheck() for FirebaseApp {$appName} with different options. To avoid this error, call initializeAppCheck() with the same options as when it was originally called. This will return the already initialized instance.","use-before-activation":"App Check is being used before initializeAppCheck() is called for FirebaseApp {$appName}. Call initializeAppCheck() before instantiating other Firebase services.","fetch-network-error":"Fetch failed to connect to a network. Check Internet connection. Original error: {$originalErrorMessage}.","fetch-parse-error":"Fetch client could not parse response. Original error: {$originalErrorMessage}.","fetch-status-error":"Fetch server returned an HTTP error status. HTTP status: {$httpStatus}.","storage-open":"Error thrown when opening storage. Original error: {$originalErrorMessage}.","storage-get":"Error thrown when reading from storage. Original error: {$originalErrorMessage}.","storage-set":"Error thrown when writing to storage. Original error: {$originalErrorMessage}.","recaptcha-error":"ReCAPTCHA error.","initial-throttle":"{$httpStatus} error. Attempts allowed again after {$time}",throttled:"Requests throttled due to previous {$httpStatus} error. Attempts allowed again after {$time}"},j=new Ve("appCheck","AppCheck",Pt);function ot(t){if(!T(t).activated)throw j.create("use-before-activation",{appName:t.name})}function it(n,r){return I(this,arguments,function*({url:t,body:a},e){let o={"Content-Type":"application/json"},i=e.getImmediate({optional:!0});if(i){let f=yield i.getHeartbeatsHeader();f&&(o["X-Firebase-Client"]=f)}let s={method:"POST",body:JSON.stringify(a),headers:o},l;try{l=yield fetch(t,s)}catch(f){throw j.create("fetch-network-error",{originalErrorMessage:f?.message})}if(l.status!==200)throw j.create("fetch-status-error",{httpStatus:l.status});let c;try{c=yield l.json()}catch(f){throw j.create("fetch-parse-error",{originalErrorMessage:f?.message})}let d=c.ttl.match(/^([\d.]+)(s)$/);if(!d||!d[2]||isNaN(Number(d[1])))throw j.create("fetch-parse-error",{originalErrorMessage:`ttl field (timeToLive) is not in standard Protobuf Duration format: ${c.ttl}`});let u=Number(d[1])*1e3,p=Date.now();return{token:c.token,expireTimeMillis:p+u,issuedAtTimeMillis:p}})}function at(t,a){let{projectId:e,appId:n,apiKey:r}=t.options;return{url:`${Et}/projects/${e}/apps/${n}:${Ct}?key=${r}`,body:{debug_token:a}}}var Dt="firebase-app-check-database",Rt=1,Ee="firebase-app-check-store";var re=null;function _t(){return re||(re=new Promise((t,a)=>{try{let e=indexedDB.open(Dt,Rt);e.onsuccess=n=>{t(n.target.result)},e.onerror=n=>{var r;a(j.create("storage-open",{originalErrorMessage:(r=n.target.error)===null||r===void 0?void 0:r.message}))},e.onupgradeneeded=n=>{let r=n.target.result;switch(n.oldVersion){case 0:r.createObjectStore(Ee,{keyPath:"compositeKey"})}}}catch(e){a(j.create("storage-open",{originalErrorMessage:e?.message}))}}),re)}function xt(t,a){return Ot(jt(t),a)}function Ot(t,a){return I(this,null,function*(){let n=(yield _t()).transaction(Ee,"readwrite"),o=n.objectStore(Ee).put({compositeKey:t,value:a});return new Promise((i,s)=>{o.onsuccess=l=>{i()},n.onerror=l=>{var c;s(j.create("storage-set",{originalErrorMessage:(c=l.target.error)===null||c===void 0?void 0:c.message}))}})})}function jt(t){return`${t.options.appId}-${t.name}`}var J=new Ke("@firebase/app-check");function Ie(t,a){return Ge()?xt(t,a).catch(e=>{J.warn(`Failed to write token to IndexedDB. Error: ${e}`)}):Promise.resolve()}function st(){return rt().enabled}function ct(){return I(this,null,function*(){let t=rt();if(t.enabled&&t.token)return t.token.promise;throw Error(`
2
- Can't get debug token in production mode.
3
- `)})}var Nt={error:"UNKNOWN_ERROR"};function Bt(t){return ze.encodeString(JSON.stringify(t),!1)}function Ce(t,a=!1,e=!1){return I(this,null,function*(){let n=t.app;ot(n);let r=T(n),o=r.token,i;if(o&&!Z(o)&&(r.token=void 0,o=void 0),!o){let c=yield r.cachedTokenPromise;c&&(Z(c)?o=c:yield Ie(n,void 0))}if(!a&&o&&Z(o))return{token:o.token};let s=!1;if(st())try{r.exchangeTokenPromise||(r.exchangeTokenPromise=it(at(n,yield ct()),t.heartbeatServiceProvider).finally(()=>{r.exchangeTokenPromise=void 0}),s=!0);let c=yield r.exchangeTokenPromise;return yield Ie(n,c),r.token=c,{token:c.token}}catch(c){return c.code==="appCheck/throttled"||c.code==="appCheck/initial-throttle"?J.warn(c.message):e&&J.error(c),be(c)}try{r.exchangeTokenPromise||(r.exchangeTokenPromise=r.provider.getToken().finally(()=>{r.exchangeTokenPromise=void 0}),s=!0),o=yield T(n).exchangeTokenPromise}catch(c){c.code==="appCheck/throttled"||c.code==="appCheck/initial-throttle"?J.warn(c.message):e&&J.error(c),i=c}let l;return o?i?Z(o)?l={token:o.token,internalError:i}:l=be(i):(l={token:o.token},r.token=o,yield Ie(n,o)):l=be(i),s&&Ut(n,l),l})}function Mt(t){return I(this,null,function*(){let a=t.app;ot(a);let{provider:e}=T(a);if(st()){let n=yield ct(),{token:r}=yield it(at(a,n),t.heartbeatServiceProvider);return{token:r}}else{let{token:n}=yield e.getToken();return{token:n}}})}function Lt(t,a,e,n){let{app:r}=t,o=T(r),i={next:e,error:n,type:a};if(o.tokenObservers=[...o.tokenObservers,i],o.token&&Z(o.token)){let s=o.token;Promise.resolve().then(()=>{e({token:s.token}),tt(t)}).catch(()=>{})}o.cachedTokenPromise.then(()=>tt(t))}function lt(t,a){let e=T(t),n=e.tokenObservers.filter(r=>r.next!==a);n.length===0&&e.tokenRefresher&&e.tokenRefresher.isRunning()&&e.tokenRefresher.stop(),e.tokenObservers=n}function tt(t){let{app:a}=t,e=T(a),n=e.tokenRefresher;n||(n=Ft(t),e.tokenRefresher=n),!n.isRunning()&&e.isTokenAutoRefreshEnabled&&n.start()}function Ft(t){let{app:a}=t;return new ye(()=>I(null,null,function*(){let e=T(a),n;if(e.token?n=yield Ce(t,!0):n=yield Ce(t),n.error)throw n.error;if(n.internalError)throw n.internalError}),()=>!0,()=>{let e=T(a);if(e.token){let n=e.token.issuedAtTimeMillis+(e.token.expireTimeMillis-e.token.issuedAtTimeMillis)*.5+3e5,r=e.token.expireTimeMillis-5*60*1e3;return n=Math.min(n,r),Math.max(0,n-Date.now())}else return 0},et.RETRIAL_MIN_WAIT,et.RETRIAL_MAX_WAIT)}function Ut(t,a){let e=T(t).tokenObservers;for(let n of e)try{n.type==="EXTERNAL"&&a.error!=null?n.error(a.error):n.next(a)}catch{}}function Z(t){return t.expireTimeMillis-Date.now()>0}function be(t){return{token:Bt(Nt),error:t}}var Te=class{constructor(a,e){this.app=a,this.heartbeatServiceProvider=e}_delete(){let{tokenObservers:a}=T(this.app);for(let e of a)lt(this.app,e.next);return Promise.resolve()}};function Wt(t,a){return new Te(t,a)}function Ht(t){return{getToken:a=>Ce(t,a),getLimitedUseToken:()=>Mt(t),addTokenListener:a=>Lt(t,"INTERNAL",a),removeTokenListener:a=>lt(t.app,a)}}var $t="@firebase/app-check",zt="0.10.1";var Gt="app-check",nt="app-check-internal";function Vt(){Ae(new me(Gt,t=>{let a=t.getProvider("app").getImmediate(),e=t.getProvider("heartbeat");return Wt(a,e)},"PUBLIC").setInstantiationMode("EXPLICIT").setInstanceCreatedCallback((t,a,e)=>{t.getProvider(nt).initialize()})),Ae(new me(nt,t=>{let a=t.getProvider("app-check").getImmediate();return Ht(a)},"PUBLIC").setInstantiationMode("EXPLICIT")),q($t,zt)}Vt();var Kt="app-check";var oe=class{constructor(){return Qe(Kt)}};var qt=["localhost","0.0.0.0","127.0.0.1"],rr=typeof window<"u"&&qt.includes(window.location.hostname);var E=function(t){return t.USER="user",t.CHANNELS="channels",t.AUTHORIZATION="Authorization",t.INTERCOM="Intercom",t}(E||{});var ut=(()=>{class t{constructor(){}getParseToken(){let e=JSON.parse(window.localStorage.getItem("user"));return this.ParseToken(e.Token.access_token)}GetRoles(){let n=this.getParseToken()["http://schemas.microsoft.com/ws/2008/06/identity/claims/role"];return n||[]}ParseToken(e){try{let r=e.split(".")[0].replace("-","+").replace("_","/"),o=JSON.parse(window.atob(r)),s=e.split(".")[1].replace("-","+").replace("_","/"),l=JSON.parse(window.atob(s));return l.header=o,l}catch{return!1}}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275prov=k({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var Xt="firebase",Yt="11.10.0";C.registerVersion(Xt,Yt,"app-compat");var Qt=["ngOnDestroy"],ht=(t,a,e,n={})=>new Proxy(t,{get:(r,o)=>e.runOutsideAngular(()=>{if(t[o])return n?.spy?.get&&n.spy.get(o,t[o]),t[o];if(Qt.indexOf(o)>-1)return()=>{};let i=a.toPromise().then(s=>{let l=s?.[o];return typeof l=="function"?l.bind(s):l?.then?l.then(c=>e.run(()=>c)):e.run(()=>l)});return new Proxy(()=>{},{get:(s,l)=>i[l],apply:(s,l,c)=>i.then(d=>{let u=d?.(...c);return n?.spy?.apply&&n.spy.apply(o,c,u),u})})})});var ie=class{constructor(a){return a}},ae=new y("angularfire2.app.options"),se=new y("angularfire2.app.name");function Pe(t,a,e){let n=typeof e=="string"&&e||"[DEFAULT]",r=typeof e=="object"&&e||{};r.name=r.name||n;let i=C.apps.filter(s=>s&&s.name===r.name)[0]||a.runOutsideAngular(()=>C.initializeApp(t,r));try{if(JSON.stringify(t)!==JSON.stringify(i.options)){let s=!!module.hot;en("error",`${i.name} Firebase App already initialized with different options${s?", you may need to reload as Firebase is not HMR aware.":"."}`)}}catch{}return new ie(i)}var en=(t,...a)=>{K()&&typeof console<"u"&&console[t](...a)},tn={provide:ie,useFactory:Pe,deps:[ae,F,[new Me,se]]},Xo=(()=>{class t{static initializeApp(e,n){return{ngModule:t,providers:[{provide:ae,useValue:e},{provide:se,useValue:n}]}}constructor(e){C.registerVersion("angularfire",H.full,"core"),C.registerVersion("angularfire",H.full,"app-compat"),C.registerVersion("angular",Fe.full,e.toString())}static \u0275fac=function(n){return new(n||t)(h(U))};static \u0275mod=W({type:t});static \u0275inj=M({providers:[tn]})}return t})();function pt(t,a,e,n,r){let[,o,i]=globalThis.\u0275AngularfireInstanceCache.find(s=>s[0]===t)||[];if(o)return nn(r,i)||(dt("error",`${a} was already initialized on the ${e} Firebase App with different settings.${rn?" You may need to reload as Firebase is not HMR aware.":""}`),dt("warn",{is:r,was:i})),o;{let s=n();return globalThis.\u0275AngularfireInstanceCache.push([t,s,r]),s}}function nn(t,a){try{return t.toString()===a.toString()}catch{return t===a}}var rn=typeof module<"u"&&!!module.hot,dt=(t,...a)=>{K()&&typeof console<"u"&&console[t](...a)};globalThis.\u0275AngularfireInstanceCache||=[];var on=new y("angularfire2.auth.use-emulator"),an=new y("angularfire2.auth.settings"),sn=new y("angularfire2.auth.tenant-id"),cn=new y("angularfire2.auth.langugage-code"),ln=new y("angularfire2.auth.use-device-language"),un=new y("angularfire.auth.persistence"),dn=(t,a,e,n,r,o,i,s)=>pt(`${t.name}.auth`,"AngularFireAuth",t.name,()=>{let l=a.runOutsideAngular(()=>t.auth());if(e&&l.useEmulator(...e),n&&(l.tenantId=n),l.languageCode=r,o&&l.useDeviceLanguage(),i)for(let[c,d]of Object.entries(i))l.settings[c]=d;return s&&l.setPersistence(s),l},[e,n,r,o,i,s]),De=(()=>{class t{injector=L(pe);authState;idToken;user;idTokenResult;credential;constructor(e,n,r,o,i,s,l,c,d,u,p,f){let $=new Y,N=G(void 0).pipe(z(i.outsideAngular),_(()=>o.runOutsideAngular(()=>import("./chunk-IIJMZKPL.js"))),D(()=>Pe(e,o,n)),D(P=>dn(P,o,s,c,d,u,l,p)),de({bufferSize:1,refCount:!1}));if(He(r))this.authState=this.user=this.idToken=this.idTokenResult=this.credential=G(null);else{N.pipe(Be()).subscribe();let P=N.pipe(_(A=>A.getRedirectResult().then(R=>R,()=>null)),Je(this.injector),de({bufferSize:1,refCount:!1})),X=N.pipe(_(A=>new g(R=>({unsubscribe:o.runOutsideAngular(()=>A.onAuthStateChanged(B=>R.next(B),B=>R.error(B),()=>R.complete()))})))),ce=N.pipe(_(A=>new g(R=>({unsubscribe:o.runOutsideAngular(()=>A.onIdTokenChanged(B=>R.next(B),B=>R.error(B),()=>R.complete()))}))));this.authState=P.pipe(he(X),Q(i.outsideAngular),z(i.insideAngular)),this.user=P.pipe(he(ce),Q(i.outsideAngular),z(i.insideAngular)),this.idToken=this.user.pipe(_(A=>A?x(A.getIdToken()):G(null))),this.idTokenResult=this.user.pipe(_(A=>A?x(A.getIdTokenResult()):G(null))),this.credential=je(P,$,this.authState.pipe(Ne(A=>!A))).pipe(D(A=>A?.user?A:null),Q(i.outsideAngular),z(i.insideAngular))}return ht(this,N,o,{spy:{apply:(P,X,ce)=>{(P.startsWith("signIn")||P.startsWith("createUser"))&&ce.then(A=>$.next(A))}}})}static \u0275fac=function(n){return new(n||t)(h(ae),h(se,8),h(U),h(F),h(ke),h(on,8),h(an,8),h(sn,8),h(cn,8),h(ln,8),h(un,8),h(oe,8))};static \u0275prov=k({token:t,factory:t.\u0275fac,providedIn:"any"})}return t})(),pi=(()=>{class t{constructor(){C.registerVersion("angularfire",H.full,"auth-compat")}static \u0275fac=function(n){return new(n||t)};static \u0275mod=W({type:t});static \u0275inj=M({providers:[De]})}return t})();function m(t,a,e,n){return new Promise((r,o)=>{t||o("IndexedDB not available");let i=t.open(a,e),s;i.onsuccess=l=>{s=i.result,r(s)},i.onerror=l=>{o(`IndexedDB error: ${i.error}`)},typeof n=="function"&&(i.onupgradeneeded=l=>{n(l,s)})})}function ft(t,a,e,n,r){if(!t)return;let o=t.open(a,e);o.onupgradeneeded=i=>{let s=i.target.result;n.forEach(c=>{if(!s.objectStoreNames.contains(c.store)){let d=s.createObjectStore(c.store,c.storeConfig);c.storeSchema.forEach(u=>{d.createIndex(u.name,u.keypath,u.options)})}});let l=r&&r();l&&Object.keys(l).map(c=>parseInt(c,10)).filter(c=>c>i.oldVersion).sort((c,d)=>c-d).forEach(c=>{l[c](s,o.transaction)}),s.close()},o.onsuccess=i=>{i.target.result.close()}}function pn(t,a,e){if(!t||!a||!e)throw Error('Params: "dbName", "version", "storeName" are mandatory.');return new g(n=>{try{let r=a+1,o=indexedDB.open(t,r);o.onupgradeneeded=i=>{let s=i.target.result;s.deleteObjectStore(e),s.close(),console.log("onupgradeneeded"),n.next(!0),n.complete()},o.onerror=i=>n.error(i)}catch(r){n.error(r)}})}function fn(t,a){return t.objectStoreNames.contains(a)}function b(t,a,e){t||e("You need to use the openDatabase function to create a database before you query it!"),fn(t,a)||e(`objectStore does not exists: ${a}`)}function S(t,a){let e=t.transaction(a.storeName,a.dbMode);return e.onerror=a.error,e.onabort=a.abort,e}function v(t,a,e,n){return{storeName:a,dbMode:t,error:r=>{e(r)},abort:r=>{e(r)}}}var w=function(t){return t.readonly="readonly",t.readwrite="readwrite",t}(w||{}),gt=new y(null),Re=(()=>{class t{constructor(e,n){if(this.dbConfig=e,this.platformId=n,!e.name)throw new Error("NgxIndexedDB: Please, provide the dbName in the configuration");if(!e.version)throw new Error("NgxIndexedDB: Please, provide the db version in the configuration");this.isBrowser=We(this.platformId),this.isBrowser&&(this.indexedDB=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB,ft(this.indexedDB,e.name,e.version,e.objectStoresMeta,e.migrationFactory),m(this.indexedDB,e.name).then(r=>{r.version!==e.version&&(this.dbConfig.version=r.version)}))}createObjectStore(e,n){let r=[e];ft(this.indexedDB,this.dbConfig.name,++this.dbConfig.version,r,n)}add(e,n,r){return new g(o=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(i=>{let l=S(i,v(w.readwrite,e,d=>o.error(d))).objectStore(e),c=r?l.add(n,r):l.add(n);c.onsuccess=d=>I(this,null,function*(){let u=d.target.result,p=l.get(u);p.onsuccess=f=>{o.next(f.target.result),o.complete()}})}).catch(i=>o.error(i))})}bulkAdd(e,n){let r=new Promise((o,i)=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(s=>{let c=S(s,v(w.readwrite,e,o,i)).objectStore(e),d=n.map(u=>new Promise((p,f)=>{let $=u.key;delete u.key;let N=$?c.add(u,$):c.add(u);N.onsuccess=P=>{let X=P.target.result;p(X)}}));o(Promise.all(d))}).catch(s=>i(s))});return x(r)}bulkDelete(e,n){let r=n.map(o=>new Promise((i,s)=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(l=>{let c=S(l,v(w.readwrite,e,s,i));c.objectStore(e).delete(o),c.oncomplete=()=>{this.getAll(e).pipe(ue(1)).subscribe(u=>{i(u)})}}).catch(l=>s(l))}));return x(Promise.all(r))}getByKey(e,n){return new g(r=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(o=>{let l=S(o,v(w.readonly,e,r.error)).objectStore(e).get(n);l.onsuccess=c=>{r.next(c.target.result),r.complete()},l.onerror=c=>{r.error(c)}}).catch(o=>r.error(o))})}bulkGet(e,n){let r=n.map(o=>this.getByKey(e,o));return new g(o=>{Oe(r).subscribe(i=>{o.next(i),o.complete()})})}getByID(e,n){return new g(r=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(o=>{b(o,e,c=>r.error(c));let l=S(o,v(w.readonly,e,r.error,r.next)).objectStore(e).get(n);l.onsuccess=c=>{r.next(c.target.result)}}).catch(o=>r.error(o))})}getByIndex(e,n,r){return new g(o=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(i=>{b(i,e,u=>o.error(u));let d=S(i,v(w.readonly,e,o.error)).objectStore(e).index(n).get(r);d.onsuccess=u=>{o.next(u.target.result),o.complete()}}).catch(i=>o.error(i))})}getAll(e){return new g(n=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(r=>{b(r,e,l=>n.error(l));let s=S(r,v(w.readonly,e,n.error,n.next)).objectStore(e).getAll();s.onerror=l=>{n.error(l)},s.onsuccess=({target:{result:l}})=>{n.next(l),n.complete()}}).catch(r=>n.error(r))})}update(e,n){return new g(r=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(o=>{b(o,e,c=>r.error(c));let s=S(o,v(w.readwrite,e,c=>r.error(c))).objectStore(e),l=s.put(n);l.onsuccess=c=>I(this,null,function*(){let d=c.target.result,u=s.get(d);u.onsuccess=p=>{r.next(p.target.result),r.complete()}})}).catch(o=>r.error(o))})}delete(e,n){return new g(r=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(o=>{b(o,e,l=>r.error(l));let i=S(o,v(w.readwrite,e,l=>r.error(l)));i.objectStore(e).delete(n),i.oncomplete=()=>{this.getAll(e).pipe(ue(1)).subscribe(l=>{r.next(l),r.complete()})}}).catch(o=>r.error(o))})}deleteByKey(e,n){return new g(r=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(o=>{b(o,e,l=>r.error(l));let i=S(o,v(w.readwrite,e,l=>r.error(l))),s=i.objectStore(e);i.oncomplete=()=>{r.next(!0),r.complete()},s.delete(n)}).catch(o=>r.error(o))})}clear(e){return new g(n=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(r=>{b(r,e,s=>n.error(s));let o=S(r,v(w.readwrite,e,s=>n.error(s)));o.objectStore(e).clear(),o.oncomplete=()=>{n.next(!0),n.complete()}}).catch(r=>n.error(r))})}deleteDatabase(){return new g(e=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(n=>I(this,null,function*(){yield n.close();let r=this.indexedDB.deleteDatabase(this.dbConfig.name);r.onsuccess=()=>{e.next(!0),e.complete()},r.onerror=o=>e.error(o),r.onblocked=()=>{throw new Error("Unable to delete database because it's blocked")}})).catch(n=>e.error(n))})}openCursor(e,n){return new g(r=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(o=>{b(o,e,c=>r.error(c));let s=S(o,v(w.readonly,e,r.error)).objectStore(e),l=n===void 0?s.openCursor():s.openCursor(n);l.onsuccess=c=>{r.next(c),r.complete()}}).catch(o=>r.error(o))})}openCursorByIndex(e,n,r,o=w.readonly){let i=new Y;return m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(s=>{b(s,e,p=>{i.error(p)});let u=S(s,v(o,e,p=>{i.error(p)},()=>{i.next()})).objectStore(e).index(n).openCursor(r);u.onsuccess=p=>{i.next(p)}}).catch(s=>i.error(s)),i}getAllByIndex(e,n,r){let o=[];return new g(i=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(s=>{b(s,e,p=>i.error(p));let u=S(s,v(w.readonly,e,i.error)).objectStore(e).index(n).openCursor(r);u.onsuccess=p=>{let f=p.target.result;f?(o.push(f.value),f.continue()):(i.next(o),i.complete())}}).catch(s=>i.error(s))})}getAllKeysByIndex(e,n,r){let o=[];return new g(i=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(s=>{b(s,e,p=>i.error(p));let u=S(s,v(w.readonly,e,i.error)).objectStore(e).index(n).openKeyCursor(r);u.onsuccess=p=>{let f=p.target.result;f?(o.push({primaryKey:f.primaryKey,key:f.key}),f.continue()):(i.next(o),i.complete())}}).catch(s=>i.error(s))})}count(e,n){return new g(r=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(o=>{b(o,e,c=>r.error(c));let l=S(o,v(w.readonly,e,r.error)).objectStore(e).count(n);l.onerror=c=>r.error(c),l.onsuccess=c=>{r.next(c.target.result),r.complete()}}).catch(o=>r.error(o))})}countByIndex(e,n,r){return new g(o=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(i=>{b(i,e,u=>o.error(u));let d=S(i,v(w.readonly,e,o.error)).objectStore(e).index(n).count(r);d.onerror=u=>o.error(u),d.onsuccess=u=>{o.next(u.target.result),o.complete()}}).catch(i=>o.error(i))})}deleteObjectStore(e){return pn(this.dbConfig.name,++this.dbConfig.version,e)}}return t.\u0275fac=function(e){return new(e||t)(h(gt),h(U))},t.\u0275prov=k({token:t,factory:t.\u0275fac}),t})(),ki=(()=>{class t{static forRoot(e){return{ngModule:t,providers:[Re,{provide:gt,useValue:e}]}}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=W({type:t}),t.\u0275inj=M({imports:[[Ue]]}),t})();var mt=(()=>{class t{constructor(e){this.db=e,this.DATABASE="Categories"}saveCategoriesByChannelType(e,n){let r=this.getKey(n);return this.db.add(this.DATABASE,e,r).pipe(D(o=>e))}getCategoriesByChannelType(e){let n=this.getKey(e);return this.db.getByKey(this.DATABASE,n)}getKey(e){let n="";switch(e){case fe.Lazada:n="Lazada";break;case fe.Tokopedia:n="Tokopedia";break}return n}clearDatabase(){this.db.clear(this.DATABASE)}getHostName(){let e=localStorage.getItem("Authorization");return this.hostName=JSON.parse(e)?.Host,this.hostName}static{this.\u0275fac=function(n){return new(n||t)(h(Re))}}static{this.\u0275prov=k({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var At=(()=>{class t{inititalizeIntercom(){let e=this.getFromLocalStorage();e?.Enabled&&window.Intercom("boot",{app_id:"xv1oomgl",name:e.Name,email:e.Email,created_at:e.Created,user_hash:e.Hash})}shutdown(){this.getFromLocalStorage()?.Enabled&&(window.Intercom("shutdown"),this.clearStorage())}clearStorage(){localStorage.removeItem("Intercom")}updateLocalStorage(e){let n={Enabled:!0};e&&(n=le(le({},n),e)),localStorage.setItem("Intercom",JSON.stringify(n))}getFromLocalStorage(){let e=localStorage.getItem("Intercom");return JSON.parse(e)}hideLauncher(){let e=this.getFromLocalStorage();e?.Enabled&&(window.Intercom("update",{app_id:"xv1oomgl",hide_default_launcher:!0}),e.hide_default_launcher=!0,this.updateLocalStorage(e))}showLauncher(){let e=this.getFromLocalStorage();e?.Enabled&&(window.Intercom("update",{app_id:"xv1oomgl",hide_default_launcher:!1}),e.hide_default_launcher=!1,this.updateLocalStorage(e))}isHideLauncher(){let e=this.getFromLocalStorage();return ee.IsEmpty(e?.hide_default_launcher)?!1:e?.hide_default_launcher}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275prov=k({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var wt=(()=>{class t{constructor(){this.httpService=L(te)}refreshToken(){return this.httpService.get(Ye.RefreshToken).pipe(V(e=>{this.updateTokenInLocalStorage(e)}))}updateTokenInLocalStorage(e){this.saveUserToLocalStorage(e),this.saveChannelsToLocalStorage(e.Channels)}saveUserToLocalStorage(e){let n=JSON.stringify(e);localStorage.setItem(E.USER,n)}getUser(){let e=localStorage.getItem(E.USER);return e?JSON.parse(e):null}saveChannelsToLocalStorage(e){let n=JSON.stringify(e);localStorage.setItem(E.CHANNELS,n)}getChannels(){let e=localStorage.getItem(E.CHANNELS);return e?JSON.parse(e):[]}clearStorage(){localStorage.removeItem(E.USER),localStorage.removeItem(E.CHANNELS)}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275prov=k({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var Hi=(()=>{class t{constructor(e,n,r,o,i,s,l,c){this.httpService=e,this.tokenDecodeService=n,this.afAuth=r,this.ngxPermission=o,this.localDataService=i,this.router=s,this.intercomService=l,this.tokenService=c}login(e){return this.httpService.post("/api/token/Login",e).pipe(V(n=>{this.setLocalStorage(n,e.Host,e.Username),this.loadPermissions()}))}getNews(){return this.httpService.get(Xe.news).pipe(D(e=>e?.items?.map(n=>n?.properties)))}loginWithGoogle(e,n){e.preventDefault();let r=new we;return r.setCustomParameters({prompt:"select_account"}),x(this.afAuth.signInWithPopup(r)).pipe(D(o=>o.credential),D(o=>o.idToken),_(o=>this.httpService.post("/api/token/LoginWithSocialProvider",JSON.stringify({IDToken:o,Host:n}))),V(o=>{this.setLocalStorage(o,n,null),this.loadPermissions()}))}setLocalStorage(e,n,r){this.tokenService.updateTokenInLocalStorage(e),localStorage.setItem(E.AUTHORIZATION,JSON.stringify({Host:n,username:r})),this.intercomService.updateLocalStorage(e.IntercomWidget),this.intercomService.inititalizeIntercom()}loadPermissions(){this.ngxPermission.loadPermissions([]);let e=localStorage.getItem(E.USER);if(ee.IsNotEmpty(e)){let n=this.tokenDecodeService.GetRoles();this.ngxPermission.loadPermissions(n)}}redirectUrl(){return I(this,null,function*(){let e=null;return(yield this.ngxPermission.hasPermission(Se.dashboardView))?e="/menu/dashboard":e="/menu/products/status",e})}getChannels(){return this.tokenService.getChannels()}logout(){this.clearLocalStorage(),this.ngxPermission.flushPermissions()}isActiveToken(){let e=this.tokenService.getUser(),n=new Date;if(e!=null){let r=new Date(e.Token.expiredAt);return n<r?!0:(this.clearLocalStorage(),!1)}else return!1}getDomain(){if(!this.domain){let e=localStorage.getItem(E.AUTHORIZATION);this.domain="https://"+JSON.parse(e).Host}return this.domain}clearLocalStorage(){this.domain=null,this.tokenService.clearStorage(),this.intercomService.shutdown(),this.localDataService.clearDatabase(),this.router.navigate([""])}static{this.\u0275fac=function(n){return new(n||t)(h(te),h(ut),h(De),h(Ze),h(mt),h($e),h(At),h(wt))}}static{this.\u0275prov=k({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();export{Se as a,Xe as b,E as c,ut as d,Xo as e,pi as f,ki as g,mt as h,At as i,Ye as j,wt as k,Hi as l};
@@ -1 +0,0 @@
1
- import{a as xe,b as Ce}from"./chunk-4XMCJ7I5.js";import{a as ge,b as ue}from"./chunk-YXFTLQ5M.js";import{b as se}from"./chunk-J7AGLBPL.js";import{a as de}from"./chunk-VGXQU74M.js";import{a as pe}from"./chunk-RIHLYYZU.js";import{a as ne,l as le}from"./chunk-CHZLFJFI.js";import{d as _e,g as me}from"./chunk-BIQHA7UA.js";import{r as ae,s as ce}from"./chunk-TMFFA26Y.js";import{b as J,h as Q,m as ee,y as te}from"./chunk-DPLEMBB4.js";import{c as ie,e as oe,f as re}from"./chunk-PXB4YEY3.js";import{d as Z,f as q,g as K,i as X,m as Y,n as G}from"./chunk-GPEVUTDI.js";import{$c as H,Dc as b,Eb as z,Ec as s,Fc as V,Gc as y,Ic as k,Jc as O,Ka as $,Kb as p,Kc as D,Na as B,Qc as u,Wb as m,Zc as N,_c as R,ad as w,bc as v,ca as W,cc as P,ec as E,f as L,fc as M,gc as a,hc as _,ic as I,jc as C,kc as h,lc as U,mc as f,ob as S,qb as r,rc as T,sc as o,vc as A,wb as F,ya as d,za as g}from"./chunk-T5ONJF63.js";var j=t=>[t],fe=t=>({"text-decoration-line-through":t}),Te=t=>({"ms-10":t}),be=t=>({"text-danger":t}),ye=t=>({"bg-gradient-warning":t});function Se(t,c){if(t&1){let e=f();a(0,"mat-slide-toggle",13),T("toggleChange",function(){d(e);let n=o();return n.toggleStatus=!n.toggleStatus,g(n.onToggle())}),a(1,"small",14),s(2),_()()}if(t&2){let e=o();r(2),y(" ",e.productToggleTitle?e.productToggleTitle:"FILTER DIFFERENT INVENTORY"," ")}}function ve(t,c){if(t&1){let e=f();a(0,"th")(1,"input",16),D("ngModelChange",function(n){d(e);let l=o(2);return O(l.checkboxState,n)||(l.checkboxState=n),g(n)}),T("ngModelChange",function(){d(e);let n=o(2);return g(n.onCheckboxStateChange())}),_()()}if(t&2){let e=o(2);r(),k("ngModel",e.checkboxState)}}function Ie(t,c){if(t&1&&(p(0,ve,2,1,"ng-template",15),a(1,"th",11),s(2,"POS"),_()),t&2){let e=o();m("ngxPermissionsOnly",u(1,j,e.rolePriceEdit))}}function we(t,c){if(t&1&&(C(0),a(1,"th",17)(2,"div",18)(3,"div",19),I(4,"img",20),a(5,"div",21),s(6),N(7,"stringLimit"),_()()()(),h()),t&2){let e=c.$implicit;r(3),m("matTooltip",(e.Name==null?null:e.Name.length)>20?e.Name:""),r(),m("src",e==null?null:e.Img,S),r(2),y(" ",H(7,3,e.Name,20)," ")}}function Fe(t,c){t&1&&U(0)}function Pe(t,c){if(t&1&&(C(0),p(1,Fe,1,0,"ng-container",33),h()),t&2){o();let e=b(7);r(),m("ngTemplateOutlet",e)}}function Ee(t,c){t&1&&U(0)}function Me(t,c){if(t&1&&p(0,Ee,1,0,"ng-container",33),t&2){o(2);let e=b(7);m("ngTemplateOutlet",e)}}function Ve(t,c){if(t&1&&p(0,Me,1,1,"ng-template",15),t&2){let e=o(4);m("ngxPermissionsOnly",u(1,j,e.rolePriceEdit))}}function ke(t,c){if(t&1){let e=f();C(0),a(1,"input",34),D("ngModelChange",function(n){d(e);let l=o(4).$implicit;return O(l.selected,n)||(l.selected=n),g(n)}),T("ngModelChange",function(){d(e);let n=o(4).$implicit,l=o();return g(l.onCheckboxStateProduct(n.ID))}),_(),h()}if(t&2){let e=o(4).$implicit;r(),k("ngModel",e.selected),m("disabled",!(e!=null&&e.Category))}}function Oe(t,c){if(t&1&&p(0,ke,2,2,"ng-container",22),t&2){let e=o(3).$implicit;m("ngIf",(e==null||e.Variants==null?null:e.Variants.length)>1)}}function De(t,c){if(t&1){let e=f();C(0),a(1,"img",35),T("click",function(n){d(e);let l=o(3).$implicit,x=o();return g(x.onZoomImage(n,l==null?null:l.ImageUrl))}),_(),h()}if(t&2){let e=o(3).$implicit;r(),A("src",e==null?null:e.ThumbnailUrl,S)}}function Ne(t,c){t&1&&I(0,"img",36)}function $e(t,c){if(t&1&&(C(0),a(1,"td",28)(2,"div",29),p(3,Pe,2,1,"ng-container",30)(4,Ve,1,3,"ng-template",null,0,w)(6,Oe,1,1,"ng-template",null,1,w),a(8,"div",26),p(9,De,2,1,"ng-container",30)(10,Ne,1,0,"ng-template",null,2,w),_()()(),a(12,"td",31)(13,"div"),s(14),_(),a(15,"small",32),s(16),_()(),h()),t&2){let e=b(5),i=b(11),n=o(2).$implicit,l=o();r(),m("rowSpan",n==null?null:n.Variants.length),r(2),m("ngIf",l.table=="inventory")("ngIfElse",e),r(5),m("ngClass",u(10,Te,(n==null||n.Variants==null?null:n.Variants.length)<=1)),r(),m("ngIf",n==null?null:n.ThumbnailUrl)("ngIfElse",i),r(3),m("rowSpan",n==null?null:n.Variants.length),r(2),V(n==null?null:n.Name),r(),m("ngClass",u(12,be,!(n!=null&&n.Category))),r(),y("(",n!=null&&n.Category?n==null?null:n.Category:"Not Found In POS",")")}}function Be(t,c){if(t&1&&(a(0,"a",27),I(1,"i",37),_()),t&2){let e=o().$implicit,i=o(2);m("href",i.hostName+"/menu/Products/Catalog/Variants/Info?ID="+(e==null?null:e.ID),S)}}function Ue(t,c){if(t&1){let e=f();a(0,"input",40),D("ngModelChange",function(n){d(e);let l=o(3).$implicit;return O(l.selected,n)||(l.selected=n),g(n)}),_()}if(t&2){let e=o(3).$implicit,i=o().$implicit;k("ngModel",e.selected),m("disabled",!(i!=null&&i.Category))}}function Re(t,c){if(t&1&&(a(0,"td",38),p(1,Ue,1,2,"input",39),_()),t&2){let e=o(2).$implicit,i=o(2);r(),m("ngIf",i.printPOS(e)>=0||i.table=="price")}}function je(t,c){if(t&1&&(p(0,Re,2,1,"ng-template",15),a(1,"td",24),s(2),N(3,"number"),_()),t&2){let e=o().$implicit,i=o(2);m("ngxPermissionsOnly",u(4,j,i.rolePriceEdit)),r(2),V(R(3,2,i.printPOS(e)))}}function Le(t,c){if(t&1){let e=f();C(0),a(1,"td",41),T("click",function(){d(e);let n=o().$implicit,l=o().$implicit,x=o().$implicit,he=o();return g(he.openTableDialog(x.Name,l,n.ID,x.ChannelItemID))}),a(2,"div",29)(3,"div",42),s(4),N(5,"number"),_(),a(6,"a",43),T("click",function(n){return d(e),g(n==null?null:n.stopPropagation())}),I(7,"i",37),_()()(),h()}if(t&2){let e=c.$implicit,i=o(2).$implicit,n=o(2);r(),m("ngClass",u(5,ye,n.printPOS(i)!=n.printItem(e)&&n.hiddenIPOSInventory()==!1)),r(3),y(" ",R(5,3,n.printItem(e))," "),r(2),m("href",e.Url,S)}}function We(t,c){t&1&&(a(0,"td",44)(1,"div",29)(2,"span"),s(3,"X"),_()()())}function ze(t,c){if(t&1&&p(0,Le,8,7,"ng-container",30)(1,We,4,0,"ng-template",null,3,w),t&2){let e=c.$implicit,i=b(2),n=o().$implicit,l=o(2);m("ngIf",l.getItemFromChannel(n,e))("ngIfElse",i)}}function Ae(t,c){if(t&1&&(a(0,"tr"),p(1,$e,17,14,"ng-container",22),a(2,"td",23),s(3),_(),a(4,"td",24)(5,"div",25)(6,"div",26),s(7),_(),a(8,"div",21),p(9,Be,2,1,"a",27),_()()(),p(10,je,4,6),E(11,ze,3,2,null,null,P),_()),t&2){let e=c.$implicit,i=c.$index,n=o().$implicit,l=o();r(),m("ngIf",i==0),r(2),V(e==null?null:e.Model),r(2),m("matTooltip",e.Discontinued?l.discontinuedVariantMsg:""),r(),m("ngClass",u(7,fe,e.Discontinued)),r(),y(" ",e.Code," "),r(2),v(n.Category?9:-1),r(),v(l.hiddenIPOSInventory()==!1?10:-1),r(),M(l.channel)}}function He(t,c){if(t&1&&(a(0,"tbody"),E(1,Ae,13,9,"tr",null,P),_()),t&2){let e=c.$implicit;r(),M(e.Variants)}}var ht=(()=>{class t{constructor(e,i,n){this.dialog=e,this.biggerPictureService=i,this.authService=n,this.showProductToggle=!1,this.multiwarehouse=B(!1),this.hiddenIPOSInventory=B(!1),this.toggleStatus=!1,this.checkboxState=!1,this.rolePriceEdit=ne.price,this.discontinuedVariantMsg="This Variant is discontinued from POS, you must Non Active manually at the seller center so that it is not sold again on the channel.",this.onSubmit=new $,this.destroy$=new L,this.toggle=new $,this.hostName=this.authService.getDomain()}ngOnInit(){this.table=="inventory"?this.stockHeader="Stock":this.table=="price"&&(this.stockHeader="Price")}onCheckboxStateProduct(e){let i=this.data.filter(n=>n.ID==e);i.length>0&&(i=i.map(n=>(n.Variants=n.Variants.map(l=>(l.selected=n.selected,l)),n)))}onCheckboxStateChange(){this.data=this.data.map(e=>(e.Variants=e.Variants.map(i=>(i.selected=this.checkboxState,i)),e))}getItemFromChannel(e,i){return e.Channel.find(l=>ie.IsNotEmpty(i.LocationID)?l.LocationID==i.LocationID:l.ChannelID==i.ID)}printItem(e){if(this.table=="inventory")return e.Inventory;if(this.table=="price")return e.Price}openTableDialog(e,i,n,l){this.dialog.open(xe,{data:{Name:e,Variant:i,ChannelID:n,Table:this.table,ChannelItemID:l}}).afterClosed().pipe(W(this.destroy$)).subscribe(x=>{x!=null&&this.onSubmit.emit(x)})}printPOS(e){return this.table=="inventory"?e.Inventory?e.Inventory:0:this.table=="price"?e.UnitPrice:null}onToggle(){this.toggle.emit(this.toggleStatus)}onZoomImage(e,i){this.biggerPictureService.openBiggerPicture(e,i)}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}static{this.\u0275fac=function(i){return new(i||t)(F(_e),F(de),F(le))}}static{this.\u0275cmp=z({type:t,selectors:[["app-table"]],inputs:{data:"data",table:"table",channel:"channel",showProductToggle:"showProductToggle",productToggleTitle:"productToggleTitle",multiwarehouse:[1,"multiwarehouse"],hiddenIPOSInventory:[1,"hiddenIPOSInventory"]},outputs:{onSubmit:"onSubmit",toggle:"onToggle"},decls:17,vars:3,consts:[["PRICE",""],["checkbox_update",""],["elsePic",""],["elseCol",""],[1,"table-responsive"],[1,"table"],[1,"thead-light","sticky-top-thead"],["scope","col","colspan","2",1,"text-center","w-25"],[1,"w-100"],[2,"width","200px"],["scope","col",1,"text-start","w-20"],["scope","col",1,"text-end","w-10"],[4,"ngFor","ngForOf"],[2,"width","200px",3,"toggleChange"],[1,"fw-bold"],[3,"ngxPermissionsOnly"],["type","checkbox",3,"ngModelChange","ngModel"],["scope","col"],[1,"w-100","d-flex","align-items-center","justify-content-center"],["matTooltipPosition","above",1,"d-flex","align-items-center","justify-content-center",2,"width","180px",3,"matTooltip"],[2,"width","16px","height","16px",3,"src"],[1,"ms-2"],[4,"ngIf"],[1,"text-start"],[1,"text-end"],["matTooltipPosition","above",1,"d-flex","align-items-center","justify-content-end",3,"matTooltip"],[3,"ngClass"],["target","_blank",3,"href"],[1,"text-center",3,"rowSpan"],[1,"d-flex","align-items-center","justify-content-center"],[4,"ngIf","ngIfElse"],[1,"text-start",2,"padding-left","0px",3,"rowSpan"],[1,"mt-1",3,"ngClass"],[4,"ngTemplateOutlet"],["type","checkbox",1,"me-3",3,"ngModelChange","ngModel","disabled"],[1,"border","rounded","w-img","cursor-pointer",3,"click","src"],["src","//res.cloudinary.com/pos/image/upload/w_40/POS/Images/Icon/products_thumb.png",1,"border","rounded","w-img"],[1,"fas","fa-solid","fa-arrow-up-right-from-square","external-link-custom"],[1,"align-middle"],["type","checkbox",3,"ngModel","disabled","ngModelChange",4,"ngIf"],["type","checkbox",3,"ngModelChange","ngModel","disabled"],[1,"p-0","pointer","cell-hover",3,"click","ngClass"],[1,"me-2","mt-1"],["target","_blank",3,"click","href"],[1,"table-white","text-center",2,"color","red"]],template:function(i,n){i&1&&(a(0,"div",4)(1,"table",5)(2,"thead",6)(3,"tr")(4,"th",7)(5,"div",8)(6,"div"),s(7,"Product"),_(),p(8,Se,3,1,"mat-slide-toggle",9),_()(),a(9,"th",10),s(10,"Variant"),_(),a(11,"th",11),s(12,"SKU"),_(),p(13,Ie,3,3)(14,we,8,6,"ng-container",12),_()(),E(15,He,3,0,"tbody",null,P),_()()),i&2&&(r(8),v(n.showProductToggle?8:-1),r(5),v(n.hiddenIPOSInventory()==!1?13:-1),r(),m("ngForOf",n.channel),r(),M(n.data))},dependencies:[G,Z,q,K,X,Y,te,J,Q,ee,ue,ge,me,pe,se,re,oe,ce,ae,Ce],styles:[".w-10[_ngcontent-%COMP%]{width:10%}.w-20[_ngcontent-%COMP%]{width:20%}.w-img[_ngcontent-%COMP%]{width:40px;height:40px}.item-name[_ngcontent-%COMP%]{margin-bottom:-14px!important;font-size:larger}.cell-hover[_ngcontent-%COMP%]:hover{background-color:#c9c9c9!important}.text-wrapping[_ngcontent-%COMP%]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden;width:88px}.cell-hover[_ngcontent-%COMP%]{width:400px!important}"]})}}return t})();export{ht as a};
@@ -1 +0,0 @@
1
- import{a as H}from"./chunk-NMJGLMWI.js";import"./chunk-6IAGGRZN.js";import{j}from"./chunk-CHZLFJFI.js";import{e as N}from"./chunk-BUFEIJAI.js";import"./chunk-K5XRGNWG.js";import"./chunk-V5WYSCVT.js";import{l as I,m as F}from"./chunk-BIQHA7UA.js";import"./chunk-TMFFA26Y.js";import"./chunk-WAW37FIG.js";import{c as O,h as R,m as U,y as K}from"./chunk-DPLEMBB4.js";import"./chunk-PXB4YEY3.js";import{j as D,l as B,n as W}from"./chunk-GPEVUTDI.js";import{Eb as b,Ec as i,Fc as T,Ic as C,Jc as g,Kb as x,Kc as _,Lc as k,Mc as V,Nc as S,Qa as u,Wb as h,Z as y,Zc as v,_c as w,bc as M,gc as e,hc as t,ic as A,mc as L,pa as P,qb as a,rc as f,sc as E,ya as c,za as s}from"./chunk-T5ONJF63.js";import"./chunk-K2H6WANG.js";function G(n,J){if(n&1&&(e(0,"pre",21),i(1),v(2,"json"),t()),n&2){E();let l=S(25);a(),T(w(2,1,l))}}function Y(n,J){n&1&&(e(0,"p",22),i(1," Your data will be shown here once it's available "),t())}var ae=(()=>{class n{constructor(){this.httpService=P(N),this.selectedChannel=u(null),this.sku=u(null)}initProductLog(){this.productLog$=this.httpService.post(j.GetProductApiLog,{ChannelID:this.selectedChannel(),SKU:this.sku()}).pipe(y(1))}copyToClipboard(l){if(!l)return;let p=typeof l=="string"?l:JSON.stringify(l,null,2);navigator.clipboard.writeText(p),alert("Copied to clipboard!")}static{this.\u0275fac=function(p){return new(p||n)}}static{this.\u0275cmp=b({type:n,selectors:[["app-product-api"]],decls:40,vars:9,consts:[["headerTitle","Origin Product Api",3,"hideSearchBox","hideSearchDropdown"],[1,"btn","btn-success","btn-fill","me-3",3,"click"],[1,"fa","fa-search"],[1,"container-fluid","mt-8","px-10"],[1,"row"],[1,"col-7"],[1,"d-flex","align-items-center"],[1,"w-75"],[1,"mb-0","text-muted","fst-italic"],[1,"w-100"],[3,"ngModelChange","ngModel"],[1,"d-flex","align-items-center","mt-3"],["type","text","placeholder","Product Code / SKU",1,"form-control",3,"ngModelChange","ngModel"],[1,"row","mt-6"],[1,"col-12"],[1,"card"],[1,"card-header","d-flex","justify-content-between","align-items-center"],["type","button",1,"btn","btn-sm","btn-outline-primary",3,"click","disabled"],[1,"card-body"],[1,"col-sm-12"],[1,"form-group","position-relative"],["id","productLogText"],[1,"text-center","my-12","text-muted"]],template:function(p,o){if(p&1){let d=L();e(0,"mainpanel",0)(1,"actions")(2,"button",1),f("click",function(){return c(d),s(o.initProductLog())}),A(3,"i",2),i(4," Search "),t()(),e(5,"content")(6,"div",3)(7,"div",4)(8,"div",5)(9,"div",6)(10,"div",7)(11,"h6"),i(12,"Channel"),t(),e(13,"p",8),i(14," View logs related to Product API Detail "),t()(),e(15,"div",9)(16,"channel-select-options",10),_("ngModelChange",function(r){return c(d),g(o.selectedChannel,r)||(o.selectedChannel=r),s(r)}),t()()(),e(17,"div",11)(18,"div",7)(19,"h6"),i(20,"Product Code / SKU"),t(),e(21,"p",8),i(22," Product SKU or Code from Channel Product "),t()(),e(23,"div",9)(24,"input",12),_("ngModelChange",function(r){return c(d),g(o.sku,r)||(o.sku=r),s(r)}),t()()()()(),k(25),v(26,"async"),e(27,"div",13)(28,"div",14)(29,"div",15)(30,"div",16)(31,"h5"),i(32,"Response"),t(),e(33,"button",17),f("click",function(){c(d);let r=S(25);return s(o.copyToClipboard(r))}),i(34," Copy "),t()(),e(35,"div",18)(36,"div",19)(37,"div",20),x(38,G,3,3,"pre",21)(39,Y,2,0,"p",22),t()()()()()()()()()}if(p&2){h("hideSearchBox",!0)("hideSearchDropdown",!0),a(16),C("ngModel",o.selectedChannel),a(8),C("ngModel",o.sku),a();let d=V(w(26,6,o.productLog$));a(8),h("disabled",!d),a(5),M(d?38:39)}},dependencies:[W,D,B,K,O,R,U,F,I,H],encapsulation:2})}}return n})();export{ae as ProductApiComponent};
@@ -1 +0,0 @@
1
- import{j as r,k as C}from"./chunk-CHZLFJFI.js";import{b as l,e as S}from"./chunk-BUFEIJAI.js";import{b as a,c as u}from"./chunk-PXB4YEY3.js";import{aa as p,ea as h,ja as c,oa as o,v as s}from"./chunk-T5ONJF63.js";var y=(()=>{class i{constructor(e,t,n){this.httpService=e,this.toastr=t,this.tokenService=n}saveChannel(e){return this.httpService.post("/api/Channel/SubmitChannel",e).pipe(p(t=>this.tokenService.refreshToken().pipe(s(n=>t))))}getLastSync(e){return this.httpService.get(`${r.ChannelGetLastSyncByID}/?ID=${e}`)}getChannel(e){return this.httpService.post(r.GetChannel,e)}getChannelLoader(){return this.httpService.get(r.GetChannelLoader)}testShopID(e){return this.httpService.post(r.TestShopID,e).pipe(h(t=>{this.showTostrSuccessTestShopID(t)}))}updateChannelIndex(e){return this.httpService.post(r.UpdateChannelIndex,e)}deleteChannel(e){return this.httpService.post(r.DeleteChannel,e)}mapChannelImage(e){return e.map(t=>(t.img=u.getChannelLogoByTypeId(t.TypeID),t))}showTostrSuccessTestShopID(e){let t="";for(var n in e)t+=n+" : "+e[n]+"<br/>";this.toastr.success(t,"Success",{enableHtml:!0,closeButton:!0,positionClass:"toast-bottom-right"})}getRegisterByOutletName(e){return this.httpService.post(r.GetRegisterByOutletName,{Outlet:e})}getChannelRowCount(e){return this.httpService.post(r.GetChannelRowCount,e).pipe(s(t=>t.Count))}getChannelWarehouse(e){return this.httpService.get(`${r.GetChannelWarehouse}/?ChannelID=${e}`)}unSynchronizedWarehouse(e){return this.httpService.delete(`${r.UnSynchronizedWarehouse}?ID=${e}`)}authorizedChannel(e){let t=this.getApiAuthorize(e);return this.httpService.post(`/api/${t}`,null).pipe(h(n=>{window.open(n.Url,"_blank")}))}getApiAuthorize(e){let t;switch(e){case a.Shopee:t="ChannelAuthorization/ShopeeV2_URL";break;case a.Tiktok:t="ChannelAuthorization/Tiktok_URL";break;case a.Lazada:t="ChannelAuthorization/Lazada_URL";break}return t}static{this.\u0275fac=function(t){return new(t||i)(o(S),o(l),o(C))}}static{this.\u0275prov=c({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();export{y as a};