marketplacepos 5.41.6 → 5.43.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (220) hide show
  1. package/Marketplace/3rdpartylicenses.txt +123 -123
  2. package/Marketplace/chunk-222IBZU6.js +1 -0
  3. package/Marketplace/chunk-235G2DSM.js +1 -0
  4. package/Marketplace/{chunk-5MRT2EFE.js → chunk-25OT4I3W.js} +1 -1
  5. package/Marketplace/chunk-2BUABOHG.js +1 -0
  6. package/Marketplace/{chunk-7GQIIDFF.js → chunk-2DJWDXTZ.js} +1 -1
  7. package/Marketplace/chunk-2SXRC4IG.js +1 -0
  8. package/Marketplace/chunk-2TL43SUD.js +1 -0
  9. package/Marketplace/{chunk-KXZCGKQW.js → chunk-2TZBEYNY.js} +1 -1
  10. package/Marketplace/chunk-2ZTDLZVZ.js +1 -0
  11. package/Marketplace/chunk-33IXC6UG.js +1 -0
  12. package/Marketplace/chunk-3D323DES.js +1 -0
  13. package/Marketplace/chunk-3K33MNZY.js +1 -0
  14. package/Marketplace/{chunk-7477X7LJ.js → chunk-4CTORK4F.js} +1 -1
  15. package/Marketplace/{chunk-BUFEIJAI.js → chunk-4M63ID5T.js} +1 -1
  16. package/Marketplace/chunk-4PZ5Q3HI.js +1 -0
  17. package/Marketplace/chunk-4VFVMBPQ.js +1 -0
  18. package/Marketplace/{chunk-RVYGL22E.js → chunk-55OI2SUF.js} +1 -1
  19. package/Marketplace/chunk-5DIRXS7I.js +1 -0
  20. package/Marketplace/chunk-5EQNOCXP.js +1 -0
  21. package/Marketplace/chunk-5PVFITW6.js +252 -0
  22. package/Marketplace/chunk-5QAURMZF.js +222 -0
  23. package/Marketplace/{chunk-V2OJQHE3.js → chunk-5XI7HWS5.js} +2 -2
  24. package/Marketplace/chunk-66YHNWRR.js +1 -0
  25. package/Marketplace/chunk-6IFZ2TO6.js +1 -0
  26. package/Marketplace/chunk-6J745ID2.js +4 -0
  27. package/Marketplace/{chunk-Q72ZXPDP.js → chunk-6LH7FSOW.js} +1 -1
  28. package/Marketplace/{chunk-OLSC6KHB.js → chunk-6MPSYC77.js} +1 -1
  29. package/Marketplace/{chunk-ITTRZMEX.js → chunk-6X2OBNJQ.js} +4 -4
  30. package/Marketplace/chunk-74L5LOR4.js +1 -0
  31. package/Marketplace/chunk-7HYMSL6P.js +1 -0
  32. package/Marketplace/{chunk-IYYVZ6B6.js → chunk-A2YNWIX6.js} +1 -1
  33. package/Marketplace/chunk-A4F37V57.js +1 -0
  34. package/Marketplace/{chunk-77IUCPIQ.js → chunk-ACIMXBIC.js} +1 -1
  35. package/Marketplace/chunk-AGRVVEIR.js +397 -0
  36. package/Marketplace/chunk-ALKC77XL.js +78 -0
  37. package/Marketplace/chunk-ALSWTSZR.js +1 -0
  38. package/Marketplace/chunk-AUO2UUO7.js +1 -0
  39. package/Marketplace/chunk-AVEGIEYT.js +193 -0
  40. package/Marketplace/chunk-B37XDXUI.js +1 -0
  41. package/Marketplace/chunk-BJWQKM5G.js +1 -0
  42. package/Marketplace/chunk-BQTUAYGY.js +1 -0
  43. package/Marketplace/{chunk-IINERY5O.js → chunk-CGJ37FLZ.js} +11 -11
  44. package/Marketplace/chunk-CINZW7MA.js +1 -0
  45. package/Marketplace/chunk-CPJFWVUP.js +1 -0
  46. package/Marketplace/chunk-CQ6GTQW6.js +1 -0
  47. package/Marketplace/chunk-CSSG7NAJ.js +1 -0
  48. package/Marketplace/chunk-CVFPPKTF.js +1 -0
  49. package/Marketplace/chunk-DJILLV4M.js +1 -0
  50. package/Marketplace/{chunk-ZD5LURJS.js → chunk-E2CS7ZMC.js} +1 -1
  51. package/Marketplace/chunk-E7X3E2GE.js +2 -0
  52. package/Marketplace/chunk-EL2TGTHA.js +1 -0
  53. package/Marketplace/chunk-EU2KAMEK.js +1 -0
  54. package/Marketplace/chunk-F4GMWHYJ.js +33 -0
  55. package/Marketplace/{chunk-RGR34QZ3.js → chunk-FBZW4Y3J.js} +1 -1
  56. package/Marketplace/chunk-FN6AYDMI.js +1 -0
  57. package/Marketplace/{chunk-6NNAICJE.js → chunk-FWG4H3QG.js} +1 -1
  58. package/Marketplace/chunk-G4OF4YLE.js +2 -0
  59. package/Marketplace/chunk-GCECFUOP.js +1 -0
  60. package/Marketplace/{chunk-UBMI3NQH.js → chunk-GHBGGQNM.js} +1 -1
  61. package/Marketplace/chunk-GOS4RIF2.js +1 -0
  62. package/Marketplace/{chunk-ICSMRW7O.js → chunk-GPC4DECX.js} +1 -1
  63. package/Marketplace/chunk-GZXQUJKX.js +1 -0
  64. package/Marketplace/{chunk-TMFFA26Y.js → chunk-HFKKITEW.js} +1 -1
  65. package/Marketplace/{chunk-KHWTOD6H.js → chunk-HPYTL6TX.js} +1 -1
  66. package/Marketplace/chunk-HTQJCQ32.js +1 -0
  67. package/Marketplace/{chunk-LQZTRBOB.js → chunk-HV6V6JHY.js} +1 -1
  68. package/Marketplace/{chunk-GBABJLPQ.js → chunk-IKPRRD5D.js} +1 -1
  69. package/Marketplace/chunk-ILQQ6R7K.js +15 -0
  70. package/Marketplace/chunk-IMO7KDT2.js +1 -0
  71. package/Marketplace/chunk-IYHPRFB5.js +1 -0
  72. package/Marketplace/{chunk-EGTYAIU5.js → chunk-JOBWFOGC.js} +1 -1
  73. package/Marketplace/{chunk-PPDHTO44.js → chunk-JRWFZQ5K.js} +1 -1
  74. package/Marketplace/chunk-JS55A2RS.js +7 -0
  75. package/Marketplace/chunk-JSA73LJT.js +1 -0
  76. package/Marketplace/chunk-JT4Y2ID4.js +1 -0
  77. package/Marketplace/chunk-JTOYNS32.js +1 -0
  78. package/Marketplace/chunk-JV4MMNGD.js +79 -0
  79. package/Marketplace/chunk-JX5NLHUQ.js +2 -0
  80. package/Marketplace/{chunk-E6HA2AGS.js → chunk-KQQCKHF3.js} +1 -1
  81. package/Marketplace/chunk-KWQS4KX7.js +1 -0
  82. package/Marketplace/{chunk-COBHWPGI.js → chunk-KX5AWR75.js} +1 -1
  83. package/Marketplace/chunk-KXS76PRS.js +70 -0
  84. package/Marketplace/chunk-KYIY3VQ6.js +141 -0
  85. package/Marketplace/{chunk-Z2PI4IS6.js → chunk-L53DCJFT.js} +1 -1
  86. package/Marketplace/{chunk-J7AGLBPL.js → chunk-LHD7CYML.js} +1 -1
  87. package/Marketplace/chunk-LPK5TPBQ.js +1 -0
  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-MC3GSUIF.js +1 -0
  93. package/Marketplace/{chunk-RIHLYYZU.js → chunk-MQXPOHBV.js} +1 -1
  94. package/Marketplace/chunk-MTUIRWOB.js +2 -0
  95. package/Marketplace/chunk-MZI5AYCE.js +1 -0
  96. package/Marketplace/chunk-NB4T45CV.js +1 -0
  97. package/Marketplace/chunk-NOO3VUTK.js +1 -0
  98. package/Marketplace/chunk-NPG45B2D.js +1 -0
  99. package/Marketplace/{chunk-JBKHY4HH.js → chunk-NRCXYGO3.js} +5 -5
  100. package/Marketplace/chunk-NTW6FBP5.js +1 -0
  101. package/Marketplace/chunk-NXC2W6VA.js +1 -0
  102. package/Marketplace/chunk-NZA4BEER.js +102 -0
  103. package/Marketplace/chunk-O55KM5KY.js +1 -0
  104. package/Marketplace/chunk-O6U5QCHJ.js +1 -0
  105. package/Marketplace/chunk-OJWFYXZX.js +1 -0
  106. package/Marketplace/{chunk-G6EG5QJS.js → chunk-OKAPL3YZ.js} +1 -1
  107. package/Marketplace/chunk-OL5RQ7K4.js +1 -0
  108. package/Marketplace/chunk-OMDX33L2.js +266 -0
  109. package/Marketplace/chunk-OUEMCONQ.js +5 -0
  110. package/Marketplace/{chunk-WAW37FIG.js → chunk-OZ77CAJD.js} +1 -1
  111. package/Marketplace/chunk-OZ7LWNOK.js +15 -0
  112. package/Marketplace/chunk-PE5AFID4.js +1 -0
  113. package/Marketplace/{chunk-7TWBIV3T.js → chunk-PO7JVKK3.js} +1 -1
  114. package/Marketplace/chunk-PW42BQIY.js +1 -0
  115. package/Marketplace/chunk-QQ3TCYLJ.js +1 -0
  116. package/Marketplace/chunk-R4IYKVKK.js +1 -0
  117. package/Marketplace/chunk-R62F5NWC.js +1 -0
  118. package/Marketplace/{chunk-75BDXSG3.js → chunk-R76V3PTN.js} +10 -10
  119. package/Marketplace/chunk-RBRIJGT2.js +3 -0
  120. package/Marketplace/chunk-RFGNZCTV.js +1 -0
  121. package/Marketplace/{chunk-VGXQU74M.js → chunk-SH7KN2AS.js} +1 -1
  122. package/Marketplace/{chunk-CH2MLZU7.js → chunk-SIYMMMKQ.js} +1 -1
  123. package/Marketplace/chunk-SLQA5QBT.js +1 -0
  124. package/Marketplace/chunk-SMCI6XBO.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-SZECT5VQ.js +1 -0
  128. package/Marketplace/{chunk-V5WYSCVT.js → chunk-TGMCGROM.js} +1 -1
  129. package/Marketplace/{chunk-OE2JYQHN.js → chunk-TNKPTRB3.js} +1 -1
  130. package/Marketplace/{chunk-PQ6Z7K5L.js → chunk-UEWZXE4O.js} +1 -1
  131. package/Marketplace/chunk-UF4FKEE7.js +93 -0
  132. package/Marketplace/chunk-UJYSVGLV.js +1 -0
  133. package/Marketplace/chunk-UJZ3KSBV.js +1 -0
  134. package/Marketplace/{chunk-5GX2GLRY.js → chunk-UMY6NG57.js} +1 -1
  135. package/Marketplace/{chunk-YXFTLQ5M.js → chunk-UPYS4A4M.js} +1 -1
  136. package/Marketplace/{chunk-CTUXL543.js → chunk-USRA2YIW.js} +1 -1
  137. package/Marketplace/chunk-V3NCYRCF.js +1 -0
  138. package/Marketplace/chunk-VRI3CYGG.js +1 -0
  139. package/Marketplace/chunk-WCU6IR2R.js +1 -0
  140. package/Marketplace/{chunk-6XFYITUD.js → chunk-WGXUKTYP.js} +1 -1
  141. package/Marketplace/chunk-WHRDK5NL.js +1 -0
  142. package/Marketplace/{chunk-ZZVNB72Q.js → chunk-WHZ44BAL.js} +1 -1
  143. package/Marketplace/{chunk-MNFHFW3E.js → chunk-XEMNZHW6.js} +1 -1
  144. package/Marketplace/chunk-XND52RIU.js +1 -0
  145. package/Marketplace/{chunk-J3P46Z53.js → chunk-XQGRC7V2.js} +1 -1
  146. package/Marketplace/chunk-XXKHKD6T.js +1 -0
  147. package/Marketplace/chunk-Y5IPCXWN.js +1 -0
  148. package/Marketplace/chunk-YA7OZNAF.js +1 -0
  149. package/Marketplace/{chunk-OAS72QB2.js → chunk-YPVYJUXS.js} +1 -1
  150. package/Marketplace/chunk-Z3ITXK3D.js +1 -0
  151. package/Marketplace/chunk-ZAVDOMSW.js +1 -0
  152. package/Marketplace/chunk-ZBVPUFFS.js +5 -0
  153. package/Marketplace/{chunk-GHQH62TZ.js → chunk-ZIOAOUAM.js} +1 -1
  154. package/Marketplace/chunk-ZN47D2EO.js +1 -0
  155. package/Marketplace/chunk-ZNDU44GH.js +51 -0
  156. package/Marketplace/{chunk-7FUVW73P.js → chunk-ZR5IXNXB.js} +1 -1
  157. package/Marketplace/index.html +3 -3
  158. package/Marketplace/main-HEFRSFSR.js +1 -0
  159. package/Marketplace/{styles-NJFTKO3E.css → styles-X3FXEB7T.css} +1 -1
  160. package/package.json +1 -1
  161. package/Marketplace/chunk-25HVJVYO.js +0 -1
  162. package/Marketplace/chunk-2BBMPSAE.js +0 -93
  163. package/Marketplace/chunk-34CTATL6.js +0 -1
  164. package/Marketplace/chunk-3OD47PUU.js +0 -15
  165. package/Marketplace/chunk-4ASUM4N5.js +0 -1
  166. package/Marketplace/chunk-4G3QN54S.js +0 -193
  167. package/Marketplace/chunk-5KHDEW35.js +0 -1
  168. package/Marketplace/chunk-62PFQNHJ.js +0 -1
  169. package/Marketplace/chunk-6ALHX2I4.js +0 -1
  170. package/Marketplace/chunk-73OLUI2Z.js +0 -1
  171. package/Marketplace/chunk-743EWFUY.js +0 -1
  172. package/Marketplace/chunk-AB3DHTC7.js +0 -1
  173. package/Marketplace/chunk-ACV6YALZ.js +0 -1
  174. package/Marketplace/chunk-BB5SMGW7.js +0 -5
  175. package/Marketplace/chunk-D54NUPYF.js +0 -153
  176. package/Marketplace/chunk-DFRA5ORA.js +0 -1
  177. package/Marketplace/chunk-DPLEMBB4.js +0 -1
  178. package/Marketplace/chunk-E3HMIPER.js +0 -2
  179. package/Marketplace/chunk-F2X5N2W5.js +0 -2
  180. package/Marketplace/chunk-FJVZ33X4.js +0 -1
  181. package/Marketplace/chunk-GPEVUTDI.js +0 -2
  182. package/Marketplace/chunk-HUEPKUQW.js +0 -1
  183. package/Marketplace/chunk-HW3FX455.js +0 -1
  184. package/Marketplace/chunk-I4QWUPXR.js +0 -1
  185. package/Marketplace/chunk-IHYEQWAY.js +0 -3
  186. package/Marketplace/chunk-IIBM2V3E.js +0 -1
  187. package/Marketplace/chunk-IIJMZKPL.js +0 -1
  188. package/Marketplace/chunk-JB6W72VA.js +0 -1
  189. package/Marketplace/chunk-JTZJTXCN.js +0 -1
  190. package/Marketplace/chunk-K2H6WANG.js +0 -1
  191. package/Marketplace/chunk-KVP6OL4J.js +0 -2
  192. package/Marketplace/chunk-LNXJNBJQ.js +0 -1
  193. package/Marketplace/chunk-LPXBSHUI.js +0 -180
  194. package/Marketplace/chunk-MATSRG2L.js +0 -447
  195. package/Marketplace/chunk-NTGWFIOH.js +0 -1
  196. package/Marketplace/chunk-OHN3VXQV.js +0 -1
  197. package/Marketplace/chunk-OIZORVCZ.js +0 -1
  198. package/Marketplace/chunk-OOKURHR4.js +0 -1
  199. package/Marketplace/chunk-OQNYXG6U.js +0 -1
  200. package/Marketplace/chunk-PV6JAW7E.js +0 -5
  201. package/Marketplace/chunk-PWJ2Z5EH.js +0 -4
  202. package/Marketplace/chunk-PXB4YEY3.js +0 -1
  203. package/Marketplace/chunk-PZTMYAA7.js +0 -1
  204. package/Marketplace/chunk-SUC77PQU.js +0 -1
  205. package/Marketplace/chunk-T5ONJF63.js +0 -7
  206. package/Marketplace/chunk-T6Q5SGJG.js +0 -2
  207. package/Marketplace/chunk-T6QOFDEE.js +0 -1
  208. package/Marketplace/chunk-TZXF4K2V.js +0 -1
  209. package/Marketplace/chunk-UQVGVHST.js +0 -1
  210. package/Marketplace/chunk-VETHPEVU.js +0 -1
  211. package/Marketplace/chunk-VSEWXNVC.js +0 -291
  212. package/Marketplace/chunk-XFCMKJV6.js +0 -1
  213. package/Marketplace/chunk-XM6GN4VF.js +0 -1
  214. package/Marketplace/chunk-YIUQQGOQ.js +0 -1
  215. package/Marketplace/chunk-YJ6KE7ER.js +0 -1
  216. package/Marketplace/chunk-Z46DDENN.js +0 -1
  217. package/Marketplace/chunk-ZOVPSET6.js +0 -1
  218. package/Marketplace/chunk-ZSHPWPPL.js +0 -1
  219. package/Marketplace/chunk-ZTQGQXIT.js +0 -1
  220. package/Marketplace/main-36VYJM2O.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-ICSMRW7O.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-5KHDEW35.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-IHYEQWAY.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,f as it,g as nt,h as at,m as G,n as rt}from"./chunk-ITTRZMEX.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-PV6JAW7E.js").then(r=>r.DownloadV2Component)},canActivate:[le],data:{title:"Download"}},{path:"Download_Order_Log",loadComponent:()=>import("./chunk-LNXJNBJQ.js").then(r=>r.DownloadOrderLogComponent),canActivate:[le],data:{title:"Download Order Log"}},{path:"Download_Order_Log/Detail",loadComponent:()=>import("./chunk-JTZJTXCN.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{G as ee}from"./chunk-GPEVUTDI.js";import{B as I,F as M,Fb as Q,Gb as X,J as F,Ka as N,O as G,R as H,T as x,_ as z,aa as C,ea as j,g as m,hd as _,ja as P,ka as Y,ma as A,oa as l,p as f,pa as y,q as h,sb as J,v,x as p,xa as Z,y as U,yb as q}from"./chunk-T5ONJF63.js";import{a as g,b as O}from"./chunk-K2H6WANG.js";var a=function(s){return s[s.Tokopedia=1]="Tokopedia",s[s.WooCommerce=2]="WooCommerce",s[s.None=3]="None",s[s.KalCare=4]="KalCare",s[s.Shopee=5]="Shopee",s[s.Tiktok=6]="Tiktok",s[s.Lazada=7]="Lazada",s[s.Shopify=8]="Shopify",s[s.Plugo=9]="Plugo",s}(a||{});var c=function(s){return s.SHOOPE="https://res.cloudinary.com/pos/image/upload/v1598262220/icons/marketplace_icons/shopee.png",s.WOOCOMMERCE="https://res.cloudinary.com/pos/image/upload/w_50/v1632447439/icons/WooCommerce/woocommerce-icon.webp",s.TOKOPEDIA="https://res.cloudinary.com/pos/image/upload/v1598262221/icons/marketplace_icons/tokopedia.png",s.TIKTOK="https://res.cloudinary.com/pos/image/upload/w_30/v1645761611/icons/Marketplace%20logo/tiktok.png",s.LAZADA="https://res.cloudinary.com/pos/image/upload/v1680681836/icons/marketplace_icons/Lazadanew.png",s.KALCARE="https://res.cloudinary.com/pos/image/upload/v1654230268/icons/marketplace_icons/kalcare.png",s.SHOPIFY="https://res.cloudinary.com/pos/image/upload/v1707987435/icons/marketplace_icons/shopify.png",s.PLUGO="https://res.cloudinary.com/pos/image/upload/v1739236419/icons/marketplace_icons/plugo.ico",s.PLUGONEW="https://res.cloudinary.com/pos/image/upload/v1739263497/icons/marketplace_icons/plugonew.ico",s}(c||{});var fe=(()=>{class s{static{this.GuidEMpty="00000000-0000-0000-0000-000000000000"}static{this.MinDate="0001-01-01T00:00:00"}static IsNotEmpty(e){return e!=""&&e!=s.GuidEMpty&&e!=null&&e!=null}static IsEmpty(e){return e==""||e==null||e==null||e==s.GuidEMpty}static getChannelLogoByTypeId(e){let t;switch(e){case a.Tokopedia:t=c.TOKOPEDIA;break;case a.Shopee:t=c.SHOOPE;break;case a.WooCommerce:t=c.WOOCOMMERCE;break;case a.Lazada:t=c.LAZADA;break;case a.Tiktok:t=c.TIKTOK;break;case a.KalCare:t=c.KALCARE;break;case a.Shopify:t=c.SHOPIFY;break;case a.Plugo:t=c.PLUGO;break}return t}static getChannelLogoByName(e=""){e=e.toLowerCase();let t;switch(e){case"tokopedia":t=c.TOKOPEDIA;break;case"shoppe":t=c.SHOOPE;break;case"woocommerce":t=c.WOOCOMMERCE;break;case"tiktok":t=c.TIKTOK;break;case"lazada":t=c.LAZADA;break;case"kalCare":t=c.KALCARE;break;case"plugo":t=c.PLUGO;break}return t}static getChannelName(e){let t;switch(e){case a.Shopee:t="Shopee";break;case a.Tokopedia:t="Tokopedia";break;case a.Lazada:t="Lazada";break;case a.Tiktok:t="Tiktok";break;case a.WooCommerce:t="WooCommerce";break;case a.KalCare:t="KalCare";break;case a.Plugo:t="Plugo";break}return t}static assignChannelLogo(e){return e=e.map(t=>(t.logo=this.getChannelLogoByTypeId(t.TypeID),t)),e}static getCssChannelColor(e){let t;switch(e){case a.Shopee:t="#ee4d2d";break;case a.Tokopedia:t="var(--G500,#03AC0E)";break;case a.Lazada:t="#FF00B2";break;case a.Tiktok:t="black";break;case a.WooCommerce:t="#674399";break;case a.KalCare:t="rgb(128, 188, 0)";break;case a.Plugo:t="#F2A954";break}return t}static getDaysDiff(e,t){var i=t.getTime()-e.getTime(),r=i/(1e3*60*60*24);return r}static addDays(e,t){let i=new Date(Number(e));return i.setDate(e.getDate()-t),i}static isValidDate(e){return e instanceof Date&&!isNaN(e)}static getImageInfo(e){return new Promise((t,i)=>{let r=new Image;r.src=e,r.decode().then(()=>{t({img:e,height:r.height,width:r.width})}).catch(()=>{i(new Error(`Image load error for ${e}`))})})}static formatTitleFromDate(e,t){let i=null,r=new Date(e),n=new Date(t);return r.getDate()!=n.getDate()&&(i="dd"),r.getMonth()!=n.getMonth()&&(i="dd MMM"),r.getFullYear()!=n.getFullYear()&&(i="dd MMM yyyy"),i}static openDownloadFile(e,t){var i=window.URL.createObjectURL(e),r=document.createElement("a");r.href=i,r.download=t,r.click()}static compare(e,t,i){return(e<t?-1:1)*(i?1:-1)}static isDateExpired(e){let t=new Date,i=!1;return e.getTime()<t.getTime()&&(i=!0),i}static getLabelPathTree(e){let t=[],i=e;for(;i;)t.unshift(i.label),i=i.parent;return t.join(" / ")}static searchByIdWithParentDFS(e,t){let i=[...e],r;for(typeof t=="number"?r=JSON.stringify(t):r=t;i.length>0;){let n=i.pop();if(n.id===r)return n;if(n.children&&n.children.length>0)for(let o of n.children)o.parent=n,i.push(o)}return null}static getTimeDifference(e){let t=new Date(e),i=new Date,r=Math.abs(t.getTime()-i.getTime()),n=1e3,o=6e4,d=60*o,S=24*d,ne=Math.floor(r/S),oe=Math.floor(r%S/d),ae=Math.floor(r%d/o),ce=Math.floor(r%o/n);return{days:ne,hours:oe,minutes:ae,seconds:ce}}static convertToReadableDate(e){let{days:t,hours:i,minutes:r,seconds:n}=s.getTimeDifference(e),o="";return t>0&&i>0&&r>0&&(o=`${t} days, ${i} hours and ${r} minutes ago`),t>0&&i>0&&r==0&&(o=`${t} days and ${i} hours ago`),t>0&&i==0&&(o=`${t} days ago`),t==0&&i>0&&r>0&&(o=`${i} hours and ${r} minutes ago`),t==0&&i>0&&r==0&&(o=`${i} hours ago`),t==0&&i==0&&r>0&&(o=`${r} minutes ago`),t==0&&i==0&&r==0&&n>0&&(o=`${n} seconds ago`),o}static isValidGUID(e){return/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/.test(e)}}return s})();var D={REMOVE:"remove",SHOW:"show"},ie=(()=>{class s{constructor(){this.strategiesSource=new m({}),this.strategies$=this.strategiesSource.asObservable()}static{this.\u0275fac=function(t){return new(t||s)}}static{this.\u0275prov=P({token:s,factory:s.\u0275fac})}}return s})(),$=new A("USE_CONFIGURATION_STORE"),L=(()=>{class s{constructor(e=!1,t){this.isolate=e,this.configurationStore=t,this.strategiesSource=this.isolate?new m({}):this.configurationStore.strategiesSource,this.strategies$=this.strategiesSource.asObservable(),this.onAuthorisedDefaultStrategy=this.isolate?void 0:this.configurationStore.onAuthorisedDefaultStrategy,this.onUnAuthorisedDefaultStrategy=this.isolate?void 0:this.configurationStore.onUnAuthorisedDefaultStrategy}setDefaultOnAuthorizedStrategy(e){this.isolate?this.onAuthorisedDefaultStrategy=this.getDefinedStrategy(e):(this.configurationStore.onAuthorisedDefaultStrategy=this.getDefinedStrategy(e),this.onAuthorisedDefaultStrategy=this.configurationStore.onAuthorisedDefaultStrategy)}setDefaultOnUnauthorizedStrategy(e){this.isolate?this.onUnAuthorisedDefaultStrategy=this.getDefinedStrategy(e):(this.configurationStore.onUnAuthorisedDefaultStrategy=this.getDefinedStrategy(e),this.onUnAuthorisedDefaultStrategy=this.configurationStore.onUnAuthorisedDefaultStrategy)}addPermissionStrategy(e,t){this.strategiesSource.value[e]=t}getStrategy(e){return this.strategiesSource.value[e]}getAllStrategies(){return this.strategiesSource.value}getDefinedStrategy(e){if(this.strategiesSource.value[e]||this.isPredefinedStrategy(e))return e;throw new Error(`No ' ${e} ' strategy is found please define one`)}isPredefinedStrategy(e){return e===D.SHOW||e===D.REMOVE}static{this.\u0275fac=function(t){return new(t||s)(l($),l(ie))}}static{this.\u0275prov=P({token:s,factory:s.\u0275fac})}}return s})();function u(s){return typeof s=="function"}function V(s){if(Object.prototype.toString.call(s)!=="[object Object]")return!1;{let B=Object.getPrototypeOf(s);return B===null||B===Object.prototype}}function se(s){return!!s&&typeof s=="string"}function w(s){return typeof s=="boolean"}function he(s){return Object.prototype.toString.call(s)==="[object Promise]"}function T(s){return Array.isArray(s)?s.length>0:!!s}function R(s){return se(s)?[s]:s}var re=(()=>{class s{constructor(){this.permissionsSource=new m({}),this.permissions$=this.permissionsSource.asObservable()}static{this.\u0275fac=function(t){return new(t||s)}}static{this.\u0275prov=P({token:s,factory:s.\u0275fac})}}return s})(),W=new A("USE_PERMISSIONS_STORE"),E=(()=>{class s{constructor(e=!1,t){this.isolate=e,this.permissionsStore=t,this.permissionsSource=this.isolate?new m({}):this.permissionsStore.permissionsSource,this.permissions$=this.permissionsSource.asObservable()}flushPermissions(){this.permissionsSource.next({})}hasPermission(e){return!e||Array.isArray(e)&&e.length===0?Promise.resolve(!0):(e=R(e),this.hasArrayPermission(e))}loadPermissions(e,t){let i=e.reduce((r,n)=>this.reducePermission(r,n,t),{});this.permissionsSource.next(i)}addPermission(e,t){if(Array.isArray(e)){let i=e.reduce((r,n)=>this.reducePermission(r,n,t),this.permissionsSource.value);this.permissionsSource.next(i)}else{let i=this.reducePermission(this.permissionsSource.value,e,t);this.permissionsSource.next(i)}}removePermission(e){let t=g({},this.permissionsSource.value);delete t[e],this.permissionsSource.next(t)}getPermission(e){return this.permissionsSource.value[e]}getPermissions(){return this.permissionsSource.value}reducePermission(e,t,i){return i&&u(i)?O(g({},e),{[t]:{name:t,validationFunction:i}}):O(g({},e),{[t]:{name:t}})}hasArrayPermission(e){let t=e.map(i=>{if(this.hasPermissionValidationFunction(i)){let r=this.permissionsSource.value[i].validationFunction,n=g({},this.permissionsSource.value);return h(null).pipe(v(()=>r(i,n)),C(o=>w(o)?h(o):o),F(()=>h(!1)))}return h(!!this.permissionsSource.value[i])});return f(t).pipe(U(),x(i=>i!==!1,!1),v(i=>i!==!1)).toPromise().then(i=>i)}hasPermissionValidationFunction(e){return!!this.permissionsSource.value[e]&&!!this.permissionsSource.value[e].validationFunction&&u(this.permissionsSource.value[e].validationFunction)}static{this.\u0275fac=function(t){return new(t||s)(l(W),l(re))}}static{this.\u0275prov=P({token:s,factory:s.\u0275fac})}}return s})(),b=class{constructor(){this.rolesSource=new m({}),this.roles$=this.rolesSource.asObservable()}},K=new A("USE_ROLES_STORE"),k=(()=>{class s{constructor(e=!1,t,i){this.isolate=e,this.rolesStore=t,this.permissionsService=i,this.rolesSource=this.isolate?new m({}):this.rolesStore.rolesSource,this.roles$=this.rolesSource.asObservable()}addRole(e,t){let i=O(g({},this.rolesSource.value),{[e]:{name:e,validationFunction:t}});this.rolesSource.next(i)}addRoleWithPermissions(e,t){this.permissionsService.addPermission(t),this.addRole(e,t)}addRoles(e){Object.keys(e).forEach((t,i)=>{this.addRole(t,e[t])})}addRolesWithPermissions(e){Object.keys(e).forEach((t,i)=>{this.addRoleWithPermissions(t,e[t])})}flushRoles(){this.rolesSource.next({})}flushRolesAndPermissions(){this.flushRoles(),this.permissionsService.flushPermissions()}removeRole(e){let t=g({},this.rolesSource.value);delete t[e],this.rolesSource.next(t)}getRoles(){return this.rolesSource.value}getRole(e){return this.rolesSource.value[e]}hasOnlyRoles(e){return!e||Array.isArray(e)&&e.length===0?Promise.resolve(!0):(e=R(e),Promise.all([this.hasRoleKey(e),this.hasRolePermission(this.rolesSource.value,e)]).then(([i,r])=>i||r))}hasRoleKey(e){let t=e.map(i=>{if(!!this.rolesSource.value[i]&&!!this.rolesSource.value[i].validationFunction&&u(this.rolesSource.value[i].validationFunction)&&!he(this.rolesSource.value[i].validationFunction)){let n=this.rolesSource.value[i].validationFunction,o=g({},this.rolesSource.value);return h(null).pipe(v(()=>n(i,o)),C(d=>w(d)?h(d):d),F(()=>h(!1)))}return h(!1)});return f(t).pipe(U(),x(i=>i!==!1,!1),v(i=>i!==!1)).toPromise().then(i=>i)}hasRolePermission(e,t){return f(t).pipe(p(i=>e[i]&&Array.isArray(e[i].validationFunction)?f(e[i].validationFunction).pipe(p(r=>this.permissionsService.hasPermission(r)),H(r=>r===!0)):h(!1)),x(i=>i===!0,!1)).toPromise()}static{this.\u0275fac=function(t){return new(t||s)(l(K),l(b),l(E))}}static{this.\u0275prov=P({token:s,factory:s.\u0275fac})}}return s})(),Re=(()=>{class s{constructor(){this.permissionsAuthorized=new N,this.permissionsUnauthorized=new N,this.firstMergeUnusedRun=1,this.permissionsService=y(E),this.configurationService=y(L),this.rolesService=y(k),this.viewContainer=y(q),this.changeDetector=y(_),this.templateRef=y(J)}ngOnInit(){this.viewContainer.clear(),this.initPermissionSubscription=this.validateExceptOnlyPermissions()}ngOnChanges(e){let t=e.ngxPermissionsOnly,i=e.ngxPermissionsExcept;if(t||i){if(t&&t.firstChange||i&&i.firstChange)return;M(this.permissionsService.permissions$,this.rolesService.roles$).pipe(z(this.firstMergeUnusedRun),G(1)).subscribe(()=>{if(T(this.ngxPermissionsExcept)){this.validateExceptAndOnlyPermissions();return}if(T(this.ngxPermissionsOnly)){this.validateOnlyPermissions();return}this.handleAuthorisedPermission(this.getAuthorisedTemplates())})}}ngOnDestroy(){this.initPermissionSubscription&&this.initPermissionSubscription.unsubscribe()}validateExceptOnlyPermissions(){return M(this.permissionsService.permissions$,this.rolesService.roles$).pipe(z(this.firstMergeUnusedRun)).subscribe(()=>{if(T(this.ngxPermissionsExcept)){this.validateExceptAndOnlyPermissions();return}if(T(this.ngxPermissionsOnly)){this.validateOnlyPermissions();return}this.handleAuthorisedPermission(this.getAuthorisedTemplates())})}validateExceptAndOnlyPermissions(){Promise.all([this.permissionsService.hasPermission(this.ngxPermissionsExcept),this.rolesService.hasOnlyRoles(this.ngxPermissionsExcept)]).then(([e,t])=>{if(e||t){this.handleUnauthorisedPermission(this.ngxPermissionsExceptElse||this.ngxPermissionsElse);return}if(this.ngxPermissionsOnly)throw!1;this.handleAuthorisedPermission(this.ngxPermissionsExceptThen||this.ngxPermissionsThen||this.templateRef)}).catch(()=>{this.ngxPermissionsOnly?this.validateOnlyPermissions():this.handleAuthorisedPermission(this.ngxPermissionsExceptThen||this.ngxPermissionsThen||this.templateRef)})}validateOnlyPermissions(){Promise.all([this.permissionsService.hasPermission(this.ngxPermissionsOnly),this.rolesService.hasOnlyRoles(this.ngxPermissionsOnly)]).then(([e,t])=>{e||t?this.handleAuthorisedPermission(this.ngxPermissionsOnlyThen||this.ngxPermissionsThen||this.templateRef):this.handleUnauthorisedPermission(this.ngxPermissionsOnlyElse||this.ngxPermissionsElse)}).catch(()=>{this.handleUnauthorisedPermission(this.ngxPermissionsOnlyElse||this.ngxPermissionsElse)})}handleUnauthorisedPermission(e){if(!(w(this.currentAuthorizedState)&&!this.currentAuthorizedState)){if(this.currentAuthorizedState=!1,this.permissionsUnauthorized.emit(),this.getUnAuthorizedStrategyInput()){this.applyStrategyAccordingToStrategyType(this.getUnAuthorizedStrategyInput());return}this.configurationService.onUnAuthorisedDefaultStrategy&&!this.elseBlockDefined()?this.applyStrategy(this.configurationService.onUnAuthorisedDefaultStrategy):this.showTemplateBlockInView(e)}}handleAuthorisedPermission(e){if(!(w(this.currentAuthorizedState)&&this.currentAuthorizedState)){if(this.currentAuthorizedState=!0,this.permissionsAuthorized.emit(),this.getAuthorizedStrategyInput()){this.applyStrategyAccordingToStrategyType(this.getAuthorizedStrategyInput());return}this.configurationService.onAuthorisedDefaultStrategy&&!this.thenBlockDefined()?this.applyStrategy(this.configurationService.onAuthorisedDefaultStrategy):this.showTemplateBlockInView(e)}}applyStrategyAccordingToStrategyType(e){if(se(e)){this.applyStrategy(e);return}if(u(e)){this.showTemplateBlockInView(this.templateRef),e(this.templateRef);return}}showTemplateBlockInView(e){this.viewContainer.clear(),e&&(this.viewContainer.createEmbeddedView(e),this.changeDetector.markForCheck())}getAuthorisedTemplates(){return this.ngxPermissionsOnlyThen||this.ngxPermissionsExceptThen||this.ngxPermissionsThen||this.templateRef}elseBlockDefined(){return!!this.ngxPermissionsExceptElse||!!this.ngxPermissionsElse}thenBlockDefined(){return!!this.ngxPermissionsExceptThen||!!this.ngxPermissionsThen}getAuthorizedStrategyInput(){return this.ngxPermissionsOnlyAuthorisedStrategy||this.ngxPermissionsExceptAuthorisedStrategy||this.ngxPermissionsAuthorisedStrategy}getUnAuthorizedStrategyInput(){return this.ngxPermissionsOnlyUnauthorisedStrategy||this.ngxPermissionsExceptUnauthorisedStrategy||this.ngxPermissionsUnauthorisedStrategy}applyStrategy(e){if(e===D.SHOW){this.showTemplateBlockInView(this.templateRef);return}if(e===D.REMOVE){this.viewContainer.clear();return}let t=this.configurationService.getStrategy(e);this.showTemplateBlockInView(this.templateRef),t(this.templateRef)}static{this.\u0275fac=function(t){return new(t||s)}}static{this.\u0275dir=X({type:s,selectors:[["","ngxPermissionsOnly",""],["","ngxPermissionsExcept",""]],inputs:{ngxPermissionsOnly:"ngxPermissionsOnly",ngxPermissionsOnlyThen:"ngxPermissionsOnlyThen",ngxPermissionsOnlyElse:"ngxPermissionsOnlyElse",ngxPermissionsExcept:"ngxPermissionsExcept",ngxPermissionsExceptElse:"ngxPermissionsExceptElse",ngxPermissionsExceptThen:"ngxPermissionsExceptThen",ngxPermissionsThen:"ngxPermissionsThen",ngxPermissionsElse:"ngxPermissionsElse",ngxPermissionsOnlyAuthorisedStrategy:"ngxPermissionsOnlyAuthorisedStrategy",ngxPermissionsOnlyUnauthorisedStrategy:"ngxPermissionsOnlyUnauthorisedStrategy",ngxPermissionsExceptUnauthorisedStrategy:"ngxPermissionsExceptUnauthorisedStrategy",ngxPermissionsExceptAuthorisedStrategy:"ngxPermissionsExceptAuthorisedStrategy",ngxPermissionsUnauthorisedStrategy:"ngxPermissionsUnauthorisedStrategy",ngxPermissionsAuthorisedStrategy:"ngxPermissionsAuthorisedStrategy"},outputs:{permissionsAuthorized:"permissionsAuthorized",permissionsUnauthorized:"permissionsUnauthorized"},standalone:!1,features:[Z]})}}return s})(),ue="default";var te=(()=>{class s{constructor(e,t,i){this.permissionsService=e,this.rolesService=t,this.router=i}canActivate(e,t){return this.hasPermissions(e,t)}canActivateChild(e,t){return this.hasPermissions(e,t)}canLoad(e){return this.hasPermissions(e)}canMatch(e){return this.hasPermissions(e)}hasPermissions(e,t){let i=e&&e.data?e.data.permissions:{},r=this.transformPermission(i,e,t);return this.isParameterAvailable(r.except)?this.passingExceptPermissionsValidation(r,e,t):this.isParameterAvailable(r.only)?this.passingOnlyPermissionsValidation(r,e,t):!0}transformPermission(e,t,i){let r=u(e.only)?e.only(t,i):R(e.only),n=u(e.except)?e.except(t,i):R(e.except),o=e.redirectTo;return{only:r,except:n,redirectTo:o}}isParameterAvailable(e){return!!e&&e.length>0}passingExceptPermissionsValidation(e,t,i){if(e.redirectTo&&(u(e.redirectTo)||V(e.redirectTo)&&!this.isRedirectionWithParameters(e.redirectTo))){let r="";return f(e.except).pipe(p(n=>I([this.permissionsService.hasPermission(n),this.rolesService.hasOnlyRoles(n)]).pipe(j(o=>{o.every(S=>S===!1)||(r=n)}))),x(n=>n.some(o=>o===!0),!1),p(n=>r?(this.handleRedirectOfFailedPermission(e,r,t,i),h(!1)):!n&&e.only?this.onlyRedirectCheck(e,t,i):h(!n))).toPromise()}return Promise.all([this.permissionsService.hasPermission(e.except),this.rolesService.hasOnlyRoles(e.except)]).then(([r,n])=>r||n?(e.redirectTo&&this.redirectToAnotherRoute(e.redirectTo,t,i),!1):e.only?this.checkOnlyPermissions(e,t,i):!0)}redirectToAnotherRoute(e,t,i,r){let n=u(e)?e(r,t,i):e;if(this.isRedirectionWithParameters(n)){n.navigationCommands=this.transformNavigationCommands(n.navigationCommands,t,i),n.navigationExtras=this.transformNavigationExtras(n.navigationExtras,t,i),this.router.navigate(n.navigationCommands,n.navigationExtras);return}Array.isArray(n)?this.router.navigate(n):this.router.navigate([n])}isRedirectionWithParameters(e){return V(e)&&(!!e.navigationCommands||!!e.navigationExtras)}transformNavigationCommands(e,t,i){return u(e)?e(t,i):e}transformNavigationExtras(e,t,i){return u(e)?e(t,i):e}onlyRedirectCheck(e,t,i){let r="";return f(e.only).pipe(p(n=>I([this.permissionsService.hasPermission(n),this.rolesService.hasOnlyRoles(n)]).pipe(j(o=>{o.every(S=>S===!1)&&(r=n)}))),x(n=>u(e.redirectTo)?n.some(o=>o===!0):n.every(o=>o===!1),!1),p(n=>u(e.redirectTo)?n?h(!0):(this.handleRedirectOfFailedPermission(e,r,t,i),h(!1)):(r&&this.handleRedirectOfFailedPermission(e,r,t,i),h(!n)))).toPromise()}handleRedirectOfFailedPermission(e,t,i,r){this.isFailedPermissionPropertyOfRedirectTo(e,t)?this.redirectToAnotherRoute(e.redirectTo[t],i,r,t):u(e.redirectTo)?this.redirectToAnotherRoute(e.redirectTo,i,r,t):this.redirectToAnotherRoute(e.redirectTo[ue],i,r,t)}isFailedPermissionPropertyOfRedirectTo(e,t){return!!e.redirectTo&&e.redirectTo[t]}checkOnlyPermissions(e,t,i){let r=g({},e);return Promise.all([this.permissionsService.hasPermission(r.only),this.rolesService.hasOnlyRoles(r.only)]).then(([n,o])=>n||o?!0:(r.redirectTo&&this.redirectToAnotherRoute(r.redirectTo,t,i),!1))}passingOnlyPermissionsValidation(e,t,i){return u(e.redirectTo)||V(e.redirectTo)&&!this.isRedirectionWithParameters(e.redirectTo)?this.onlyRedirectCheck(e,t,i):this.checkOnlyPermissions(e,t,i)}static{this.\u0275fac=function(t){return new(t||s)(l(E),l(k),l(ee))}}static{this.\u0275prov=P({token:s,factory:s.\u0275fac})}}return s})();var be=(()=>{class s{static forRoot(e={}){return{ngModule:s,providers:[re,b,ie,E,te,k,L,{provide:W,useValue:e.permissionsIsolate},{provide:K,useValue:e.rolesIsolate},{provide:$,useValue:e.configurationIsolate}]}}static forChild(e={}){return{ngModule:s,providers:[{provide:W,useValue:e.permissionsIsolate},{provide:K,useValue:e.rolesIsolate},{provide:$,useValue:e.configurationIsolate},L,E,k,te]}}static{this.\u0275fac=function(t){return new(t||s)}}static{this.\u0275mod=Q({type:s})}static{this.\u0275inj=Y({})}}return s})();export{c as a,a as b,fe as c,E as d,Re as e,be as f};
@@ -1 +0,0 @@
1
- import{a as _}from"./chunk-GBABJLPQ.js";import"./chunk-BUFEIJAI.js";import"./chunk-K5XRGNWG.js";import{m as A,n as L}from"./chunk-ITTRZMEX.js";import"./chunk-TMFFA26Y.js";import"./chunk-WAW37FIG.js";import"./chunk-DPLEMBB4.js";import{E as R,H as b,J as M,g as I,j as g,k as x,l as D,m as E,n as C}from"./chunk-GPEVUTDI.js";import{$c as v,Eb as h,Ec as o,Fc as p,Gc as S,Kb as f,Wb as c,Z as y,Zc as l,_c as s,gc as i,hc as n,qb as a,v as u,wb as m}from"./chunk-T5ONJF63.js";import"./chunk-K2H6WANG.js";function P(r,B){if(r&1&&(i(0,"div",3)(1,"div",4)(2,"div",5)(3,"div",6)(4,"div",7)(5,"h5"),o(6,"General"),n()(),i(7,"div",8)(8,"div",9)(9,"div",10)(10,"div",11)(11,"label"),o(12,"Created"),n(),i(13,"div")(14,"span"),o(15),l(16,"date"),n()()()(),i(17,"div",10)(18,"div",11)(19,"label"),o(20,"Duration"),n(),i(21,"div")(22,"span"),o(23),l(24,"number"),n()()()(),i(25,"div",10)(26,"div",11)(27,"label"),o(28,"Response Code"),n(),i(29,"div")(30,"span"),o(31),n()()()()()()()()(),i(32,"div",4)(33,"div",10)(34,"div",6)(35,"div",7)(36,"h5"),o(37,"Request"),n()(),i(38,"div",8)(39,"div",12)(40,"div",13)(41,"pre"),o(42),l(43,"json"),n()()()()()(),i(44,"div",10)(45,"div",6)(46,"div",7)(47,"h5"),o(48,"Response"),n()(),i(49,"div",8)(50,"div",14)(51,"div",13)(52,"pre"),o(53),l(54,"json"),n()()()()()()()()),r&2){let e=B.ngIf;a(15),p(v(16,5,e==null?null:e._source["@timestamp"],"dd MMM yyyy HH:mm:ss")),a(8),S("",v(24,8,e==null?null:e.DurationInSecond,"1.1-1")," s"),a(8),p(e==null?null:e.respCode),a(11),p(s(43,11,e==null?null:e.req)),a(11),p(s(54,13,e==null?null:e.res))}}var $=(()=>{class r{constructor(e,t){this.inventoryAsyncServiceLog=e,this.activatedRoute=t}ngOnInit(){let e=this.activatedRoute.snapshot.queryParams;this.initInventoryLog(e?.ID)}initInventoryLog(e){this.inventoryLog$=this.inventoryAsyncServiceLog.getInventoryAsyncLogDetail(e).pipe(u(t=>{let d=JSON.parse(t.hits[0]._source?.log?.response);return t.hits[0].DurationInSecond=parseInt(d.Duration)/1e3,t.hits[0].respCode=d?.StatusCode,t.hits[0].req=JSON.parse(t.hits[0]._source?.log?.request),t.hits[0].res=d,t?.hits[0]}),y(1))}static{this.\u0275fac=function(t){return new(t||r)(m(_),m(R))}}static{this.\u0275cmp=h({type:r,selectors:[["app-inventory-async-detail"]],decls:7,vars:5,consts:[["headerTitle","Product Inventory Sync Detail",3,"hideSearchBox","hideSearchDropdown"],["role","button","routerLink","/menu/log/inventory",1,"btn","btn-secondary","btn-fill","btn-lg","me-2"],["class","container-fluid mt-3",4,"ngIf"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-12"],[1,"card"],[1,"card-header"],[1,"card-body"],[1,"row","mt-7"],[1,"col-sm-6"],[1,"info-label-group"],[1,"col-sm-12"],[1,"form-group"],[1,"col-sm-12","mt-2"]],template:function(t,d){t&1&&(i(0,"mainpanel",0)(1,"actions")(2,"a",1),o(3,"Back"),n()(),i(4,"content"),f(5,P,55,15,"div",2),l(6,"async"),n()()),t&2&&(c("hideSearchBox",!0)("hideSearchDropdown",!0),a(5),c("ngIf",s(6,3,d.inventoryLog$)))},dependencies:[C,I,g,D,E,x,L,A,M,b],encapsulation:2})}}return r})();export{$ as InventoryAsyncDetailComponent};
@@ -1 +0,0 @@
1
- import{b as ae}from"./chunk-YXFTLQ5M.js";import{c as re}from"./chunk-GHQH62TZ.js";import"./chunk-CH2MLZU7.js";import"./chunk-G6EG5QJS.js";import{a as X,b as Y,d as Z,e as ee}from"./chunk-6IAGGRZN.js";import"./chunk-T6QOFDEE.js";import"./chunk-QCZIDOKW.js";import{l as Q}from"./chunk-IHYEQWAY.js";import{b as G,e as q}from"./chunk-BUFEIJAI.js";import"./chunk-K5XRGNWG.js";import"./chunk-V5WYSCVT.js";import"./chunk-KHWTOD6H.js";import{m as ne,n as oe}from"./chunk-ITTRZMEX.js";import{r as te,s as ie}from"./chunk-TMFFA26Y.js";import"./chunk-WAW37FIG.js";import{h as A,m as H,y as z}from"./chunk-DPLEMBB4.js";import{b as d,c as J}from"./chunk-PXB4YEY3.js";import{J as b,f as W,g as $,j as k,n as v}from"./chunk-GPEVUTDI.js";import{Eb as V,Ec as s,Fb as S,Fc as _,Gc as B,Ic as O,Jc as P,Kb as g,Kc as D,Wb as l,Z as M,Zc as C,_c as L,aa as F,ea as R,gc as o,hc as r,ic as j,jc as I,ka as u,kc as T,mc as w,ob as K,q as U,qb as a,rc as E,sc as h,v as y,wb as f,ya as x,za as N}from"./chunk-T5ONJF63.js";import"./chunk-K2H6WANG.js";function me(i,m){if(i&1&&(o(0,"span",13),j(1,"img",14),r(),o(2,"span"),s(3),r()),i&2){let t=m.item;a(),l("src",t.Img,K)("alt",t.Name),a(2),B(" ",t.Name," ")}}function pe(i,m){if(i&1){let t=w();I(0),o(1,"a",15),E("click",function(){let n=x(t).ngIf,c=h();return N(c.submitLogistics(n))}),s(2,"Submit"),r(),T()}}function de(i,m){if(i&1){let t=w();I(0),o(1,"ng-select",16),D("ngModelChange",function(n){x(t);let c=h().$implicit;return P(c.ProductSKU,n)||(c.ProductSKU=n),N(n)}),r(),T()}if(i&2){let t=m.ngIf,e=h().$implicit;a(),O("ngModel",e.ProductSKU),l("items",t)}}function ge(i,m){if(i&1&&(o(0,"tr")(1,"td"),s(2),r(),o(3,"td"),s(4),r(),o(5,"td"),s(6),r(),o(7,"td"),g(8,de,2,2,"ng-container",4),C(9,"async"),r()()),i&2){let t=m.$implicit,e=h();a(2),_(t.Name),a(2),_(t.Service),a(2),_(t.TypeString),a(2),l("ngIf",L(9,4,e.logisticOptions$))}}var le=(()=>{class i{constructor(t,e,n){this.http=t,this.toastr=e,this.authService=n,this.filter={ChannelID:""},this.channelOptions=this.authService.getChannels(),this.initUnsupportedChannel(),this.initLoader()}initUnsupportedChannel(){let t=[d.WooCommerce,d.Lazada,d.Shopify,d.Plugo,d.Tokopedia];this.channelOptions=this.channelOptions.map(e=>(t.forEach(n=>{e.TypeID===n&&(e.disabled=!0)}),e))}initLoader(){this.http.post("/api/Logistic/Load",{}).subscribe(t=>{this.filter=t.Filter,this.channelName=this.channelOptions[0].Name,this.initLogisticServiceOptions(),this.getLogisticService()})}initLogisticServiceOptions(){this.logisticOptions$=this.http.get("/api/Logistic/OptionLogisticsService").pipe(M(1))}submitLogistics(t){this.clonedLogisticServices$.pipe(y(e=>t.map(n=>(e.findIndex(p=>p.Name===n.Name&&p.ProductSKU==n.ProductSKU)==-1&&(n.IsChange=!0),n))),F(e=>this.http.post("/api/Logistic/Submit",e))).subscribe(()=>{this.toastr.success("Logistic service updated successfully.","Success"),this.getLogisticService()})}getLogisticService(){this.iniTitle(),this.logisticServices$=this.http.post("/api/Logistic/Get",this.filter).pipe(y(t=>t.map(e=>(e.ProductSKU=J.IsEmpty(e.ProductSKU)?null:e.ProductSKU,e))),R(t=>{let e=JSON.parse(JSON.stringify(t));this.clonedLogisticServices$=U(e)}),M(1))}iniTitle(){let t=this.channelOptions.find(e=>e.ID==this.filter.ChannelID);this.channelName=t?t.Name:null}static{this.\u0275fac=function(e){return new(e||i)(f(q),f(G),f(Q))}}static{this.\u0275cmp=V({type:i,selectors:[["app-logistic"]],standalone:!1,decls:29,vars:11,consts:[["hideSearchBox","true","searchBoxPlaceHolder","Enter Number...",3,"onSubmit","headerTitle","hideSearchDropdown"],[1,"mb-2","fw-bold"],["appendTo","body","bindLabel","Name","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"ngModelChange","clearable","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],[4,"ngIf"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"table","table-hover"],[1,"sticky-top-thead"],[1,"table-light"],[4,"ngFor","ngForOf"],[1,"me-2"],[2,"width","18px",3,"src","alt"],["role","button","data-toggle","tooltip","data-placement","top","matTooltip","enter Logistic for recorded",1,"btn","btn-success","btn-fill","btn-lg","text-white",3,"click"],["placeholder","Logistic Service Code","bindLabel","Name","bindValue","Code",1,"w-75",3,"ngModelChange","ngModel","items"]],template:function(e,n){e&1&&(o(0,"mainpanel",0),E("onSubmit",function(){return n.getLogisticService()}),o(1,"filters")(2,"div")(3,"label",1),s(4,"Select a Channel"),r(),o(5,"ng-select",2),D("ngModelChange",function(p){return P(n.filter.ChannelID,p)||(n.filter.ChannelID=p),p}),g(6,me,4,3,"ng-template",3),r()()(),o(7,"actions"),g(8,pe,3,0,"ng-container",4),C(9,"async"),r(),o(10,"content")(11,"div",5)(12,"div",6)(13,"div",7)(14,"div",8)(15,"table",9)(16,"thead",10)(17,"tr",11)(18,"th"),s(19,"Logistic"),r(),o(20,"th"),s(21,"Service"),r(),o(22,"th"),s(23,"Type"),r(),o(24,"th"),s(25,"Logistic Service"),r()()(),o(26,"tbody"),g(27,ge,10,6,"tr",12),C(28,"async"),r()()()()()()()()),e&2&&(l("headerTitle","Logistic Courier - "+n.channelName)("hideSearchDropdown",!1),a(5),l("clearable",!1)("items",n.channelOptions),O("ngModel",n.filter.ChannelID),a(3),l("ngIf",L(9,7,n.logisticServices$)),a(19),l("ngForOf",L(28,9,n.logisticServices$)))},dependencies:[W,$,A,H,ne,Z,X,Y,te,k],encapsulation:2})}}return i})();var he=[{path:"",component:le}],ce=(()=>{class i{static{this.\u0275fac=function(e){return new(e||i)}}static{this.\u0275mod=S({type:i})}static{this.\u0275inj=u({imports:[v,b.forChild(he)]})}}return i})();var $e=(()=>{class i{static{this.\u0275fac=function(e){return new(e||i)}}static{this.\u0275mod=S({type:i})}static{this.\u0275inj=u({imports:[v,b,ce,z,oe,ee,ae,re,ie]})}}return i})();export{$e as LogisticModule};