marketplacepos 5.40.1 → 5.41.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (216) hide show
  1. package/Marketplace/3rdpartylicenses.txt +123 -123
  2. package/Marketplace/{chunk-5MRT2EFE.js → chunk-25OT4I3W.js} +1 -1
  3. package/Marketplace/chunk-26ZUWPMS.js +1 -0
  4. package/Marketplace/chunk-2BUABOHG.js +1 -0
  5. package/Marketplace/chunk-2SXRC4IG.js +1 -0
  6. package/Marketplace/{chunk-KXZCGKQW.js → chunk-2TZBEYNY.js} +1 -1
  7. package/Marketplace/chunk-2ZTDLZVZ.js +1 -0
  8. package/Marketplace/chunk-33IXC6UG.js +1 -0
  9. package/Marketplace/chunk-42Q6LYIG.js +1 -0
  10. package/Marketplace/{chunk-7477X7LJ.js → chunk-4CTORK4F.js} +1 -1
  11. package/Marketplace/{chunk-BUFEIJAI.js → chunk-4M63ID5T.js} +1 -1
  12. package/Marketplace/chunk-4PZ5Q3HI.js +1 -0
  13. package/Marketplace/chunk-54JEYTAI.js +1 -0
  14. package/Marketplace/{chunk-RVYGL22E.js → chunk-55OI2SUF.js} +1 -1
  15. package/Marketplace/chunk-57YWGJWG.js +1 -0
  16. package/Marketplace/{chunk-OF7BOKNS.js → chunk-5ANFGKBV.js} +1 -1
  17. package/Marketplace/chunk-5B4KSPFM.js +1 -0
  18. package/Marketplace/chunk-5DIRXS7I.js +1 -0
  19. package/Marketplace/chunk-5EQNOCXP.js +1 -0
  20. package/Marketplace/chunk-5QAURMZF.js +222 -0
  21. package/Marketplace/{chunk-V2OJQHE3.js → chunk-5XI7HWS5.js} +2 -2
  22. package/Marketplace/chunk-66YHNWRR.js +1 -0
  23. package/Marketplace/chunk-6IFZ2TO6.js +1 -0
  24. package/Marketplace/chunk-6IOVMVRS.js +5 -0
  25. package/Marketplace/chunk-6L2THCHF.js +1 -0
  26. package/Marketplace/{chunk-Q72ZXPDP.js → chunk-6LH7FSOW.js} +1 -1
  27. package/Marketplace/{chunk-OLSC6KHB.js → chunk-6MPSYC77.js} +1 -1
  28. package/Marketplace/chunk-6RJV6M56.js +1 -0
  29. package/Marketplace/{chunk-BIQHA7UA.js → chunk-6X2OBNJQ.js} +4 -4
  30. package/Marketplace/chunk-7P65ADBU.js +1 -0
  31. package/Marketplace/{chunk-IYYVZ6B6.js → chunk-A2YNWIX6.js} +1 -1
  32. package/Marketplace/chunk-A4F37V57.js +1 -0
  33. package/Marketplace/{chunk-77IUCPIQ.js → chunk-ACIMXBIC.js} +1 -1
  34. package/Marketplace/chunk-AFSORQR4.js +4 -0
  35. package/Marketplace/chunk-AGRVVEIR.js +397 -0
  36. package/Marketplace/chunk-ALKC77XL.js +78 -0
  37. package/Marketplace/chunk-AS2UDXSX.js +5 -0
  38. package/Marketplace/chunk-AVEGIEYT.js +193 -0
  39. package/Marketplace/chunk-AYATC6J5.js +1 -0
  40. package/Marketplace/chunk-B46KV6AB.js +1 -0
  41. package/Marketplace/chunk-BQTUAYGY.js +1 -0
  42. package/Marketplace/chunk-BVLV6UAF.js +1 -0
  43. package/Marketplace/chunk-BXFJ3LAT.js +1 -0
  44. package/Marketplace/chunk-CEQA4PTY.js +1 -0
  45. package/Marketplace/chunk-CMZW5QAE.js +1 -0
  46. package/Marketplace/chunk-CSSG7NAJ.js +1 -0
  47. package/Marketplace/chunk-CZ2CQU4Q.js +1 -0
  48. package/Marketplace/chunk-CZOD43PN.js +1 -0
  49. package/Marketplace/chunk-DBHTTLSK.js +1 -0
  50. package/Marketplace/chunk-DJILLV4M.js +1 -0
  51. package/Marketplace/chunk-DVX3M74S.js +1 -0
  52. package/Marketplace/{chunk-ZD5LURJS.js → chunk-E2CS7ZMC.js} +1 -1
  53. package/Marketplace/chunk-EL3GM6CV.js +1 -0
  54. package/Marketplace/chunk-EU2KAMEK.js +1 -0
  55. package/Marketplace/chunk-F4GMWHYJ.js +33 -0
  56. package/Marketplace/{chunk-RGR34QZ3.js → chunk-FBZW4Y3J.js} +1 -1
  57. package/Marketplace/chunk-FFAZ3Q3F.js +1 -0
  58. package/Marketplace/chunk-FSJSQVUK.js +1 -0
  59. package/Marketplace/chunk-FWG4H3QG.js +13 -0
  60. package/Marketplace/chunk-GCECFUOP.js +1 -0
  61. package/Marketplace/{chunk-UBMI3NQH.js → chunk-GHBGGQNM.js} +1 -1
  62. package/Marketplace/chunk-GOS4RIF2.js +1 -0
  63. package/Marketplace/{chunk-IEYFOHME.js → chunk-GPC4DECX.js} +1 -1
  64. package/Marketplace/chunk-GPVSWXHS.js +1 -0
  65. package/Marketplace/chunk-GZXQUJKX.js +1 -0
  66. package/Marketplace/{chunk-TMFFA26Y.js → chunk-HFKKITEW.js} +1 -1
  67. package/Marketplace/chunk-HNVG4QKG.js +1 -0
  68. package/Marketplace/{chunk-KHWTOD6H.js → chunk-HPYTL6TX.js} +1 -1
  69. package/Marketplace/chunk-HTQJCQ32.js +1 -0
  70. package/Marketplace/chunk-HZFWCHSY.js +1 -0
  71. package/Marketplace/chunk-I3LFKNW4.js +3 -0
  72. package/Marketplace/{chunk-GBABJLPQ.js → chunk-IKPRRD5D.js} +1 -1
  73. package/Marketplace/chunk-IL4YQGTS.js +1 -0
  74. package/Marketplace/chunk-IUI6TA5K.js +2 -0
  75. package/Marketplace/{chunk-EGTYAIU5.js → chunk-JOBWFOGC.js} +1 -1
  76. package/Marketplace/{chunk-PPDHTO44.js → chunk-JRWFZQ5K.js} +1 -1
  77. package/Marketplace/chunk-JS55A2RS.js +7 -0
  78. package/Marketplace/chunk-JV4MMNGD.js +79 -0
  79. package/Marketplace/chunk-K6YEZYU4.js +5 -0
  80. package/Marketplace/{chunk-KQOYVGBL.js → chunk-KJHSB4A2.js} +1 -1
  81. package/Marketplace/chunk-KOKHDU4I.js +1 -0
  82. package/Marketplace/{chunk-GBXNTL4E.js → chunk-KQQCKHF3.js} +1 -1
  83. package/Marketplace/chunk-KWQS4KX7.js +1 -0
  84. package/Marketplace/{chunk-COBHWPGI.js → chunk-KX5AWR75.js} +1 -1
  85. package/Marketplace/chunk-KXS76PRS.js +70 -0
  86. package/Marketplace/chunk-KYIY3VQ6.js +141 -0
  87. package/Marketplace/{chunk-J7AGLBPL.js → chunk-LHD7CYML.js} +1 -1
  88. package/Marketplace/chunk-LR4UZ2OS.js +30 -0
  89. package/Marketplace/{chunk-M3SJUKTG.js → chunk-LSXUXG54.js} +1 -1
  90. package/Marketplace/chunk-LWSRD5LF.js +1 -0
  91. package/Marketplace/chunk-M3OOU4DF.js +1 -0
  92. package/Marketplace/{chunk-Q2OEJFVT.js → chunk-M5IQRAHV.js} +1 -1
  93. package/Marketplace/chunk-M7ZBU4PP.js +1 -0
  94. package/Marketplace/{chunk-RIHLYYZU.js → chunk-MQXPOHBV.js} +1 -1
  95. package/Marketplace/chunk-MTUIRWOB.js +2 -0
  96. package/Marketplace/chunk-MYLIBJND.js +2 -0
  97. package/Marketplace/chunk-MZI5AYCE.js +1 -0
  98. package/Marketplace/chunk-NJFNMUFH.js +1 -0
  99. package/Marketplace/{chunk-JBKHY4HH.js → chunk-NRCXYGO3.js} +5 -5
  100. package/Marketplace/chunk-NTW6FBP5.js +1 -0
  101. package/Marketplace/chunk-NZA4BEER.js +102 -0
  102. package/Marketplace/chunk-O55KM5KY.js +1 -0
  103. package/Marketplace/{chunk-6MJRS7KB.js → chunk-OH6LACWK.js} +11 -11
  104. package/Marketplace/{chunk-G6EG5QJS.js → chunk-OKAPL3YZ.js} +1 -1
  105. package/Marketplace/{chunk-WAW37FIG.js → chunk-OZ77CAJD.js} +1 -1
  106. package/Marketplace/chunk-OZ7LWNOK.js +15 -0
  107. package/Marketplace/{chunk-LXB5L2OC.js → chunk-PBGDP6XV.js} +1 -1
  108. package/Marketplace/chunk-PE5AFID4.js +1 -0
  109. package/Marketplace/chunk-PEA6KVUS.js +252 -0
  110. package/Marketplace/{chunk-7TWBIV3T.js → chunk-PO7JVKK3.js} +1 -1
  111. package/Marketplace/chunk-PW42BQIY.js +1 -0
  112. package/Marketplace/{chunk-75BDXSG3.js → chunk-R76V3PTN.js} +10 -10
  113. package/Marketplace/chunk-REL734JM.js +1 -0
  114. package/Marketplace/chunk-SD7M7HOB.js +1 -0
  115. package/Marketplace/{chunk-VGXQU74M.js → chunk-SH7KN2AS.js} +1 -1
  116. package/Marketplace/{chunk-CH2MLZU7.js → chunk-SIYMMMKQ.js} +1 -1
  117. package/Marketplace/chunk-SLQA5QBT.js +1 -0
  118. package/Marketplace/chunk-SQINA5SO.js +1 -0
  119. package/Marketplace/{chunk-QCZIDOKW.js → chunk-SXLKJLAE.js} +1 -1
  120. package/Marketplace/{chunk-6IAGGRZN.js → chunk-SYENQYR7.js} +1 -1
  121. package/Marketplace/chunk-TDIZT7CR.js +265 -0
  122. package/Marketplace/{chunk-V5WYSCVT.js → chunk-TGMCGROM.js} +1 -1
  123. package/Marketplace/{chunk-OE2JYQHN.js → chunk-TNKPTRB3.js} +1 -1
  124. package/Marketplace/chunk-U42BDUJ6.js +15 -0
  125. package/Marketplace/chunk-UAVYFLCM.js +1 -0
  126. package/Marketplace/chunk-UF4FKEE7.js +93 -0
  127. package/Marketplace/chunk-UGAQVMUE.js +1 -0
  128. package/Marketplace/chunk-UJYSVGLV.js +1 -0
  129. package/Marketplace/{chunk-5GX2GLRY.js → chunk-UMY6NG57.js} +1 -1
  130. package/Marketplace/{chunk-YXFTLQ5M.js → chunk-UPYS4A4M.js} +1 -1
  131. package/Marketplace/chunk-UT7K3K63.js +1 -0
  132. package/Marketplace/chunk-VRI3CYGG.js +1 -0
  133. package/Marketplace/chunk-WCY4XEUN.js +1 -0
  134. package/Marketplace/{chunk-6XFYITUD.js → chunk-WGXUKTYP.js} +1 -1
  135. package/Marketplace/{chunk-ZZVNB72Q.js → chunk-WHZ44BAL.js} +1 -1
  136. package/Marketplace/{chunk-MNFHFW3E.js → chunk-XEMNZHW6.js} +1 -1
  137. package/Marketplace/chunk-XFFZDBGC.js +1 -0
  138. package/Marketplace/chunk-XIYHWVQR.js +1 -0
  139. package/Marketplace/{chunk-J3P46Z53.js → chunk-XQGRC7V2.js} +1 -1
  140. package/Marketplace/chunk-YISSSY6C.js +1 -0
  141. package/Marketplace/{chunk-YR2WEZDG.js → chunk-YPVYJUXS.js} +1 -1
  142. package/Marketplace/chunk-YZ74HE2T.js +1 -0
  143. package/Marketplace/chunk-Z3ITXK3D.js +1 -0
  144. package/Marketplace/chunk-ZAVDOMSW.js +1 -0
  145. package/Marketplace/{chunk-BZRANPRO.js → chunk-ZBW2ISZY.js} +1 -1
  146. package/Marketplace/{chunk-GHQH62TZ.js → chunk-ZIOAOUAM.js} +1 -1
  147. package/Marketplace/{chunk-2G6NLWKN.js → chunk-ZIUDNFYT.js} +1 -1
  148. package/Marketplace/chunk-ZKPIENCH.js +1 -0
  149. package/Marketplace/chunk-ZMVP6H6B.js +1 -0
  150. package/Marketplace/chunk-ZNDU44GH.js +51 -0
  151. package/Marketplace/chunk-ZOJYBTIP.js +1 -0
  152. package/Marketplace/{chunk-7FUVW73P.js → chunk-ZR5IXNXB.js} +1 -1
  153. package/Marketplace/index.html +3 -3
  154. package/Marketplace/main-B54MN6EI.js +1 -0
  155. package/Marketplace/{styles-NJFTKO3E.css → styles-X3FXEB7T.css} +1 -1
  156. package/package.json +1 -1
  157. package/Marketplace/chunk-23FG7KLD.js +0 -1
  158. package/Marketplace/chunk-2BBMPSAE.js +0 -93
  159. package/Marketplace/chunk-4663RHYK.js +0 -2
  160. package/Marketplace/chunk-4ASUM4N5.js +0 -1
  161. package/Marketplace/chunk-4G3QN54S.js +0 -193
  162. package/Marketplace/chunk-4NPPJE6V.js +0 -2
  163. package/Marketplace/chunk-62PFQNHJ.js +0 -1
  164. package/Marketplace/chunk-6ALHX2I4.js +0 -1
  165. package/Marketplace/chunk-7GQIIDFF.js +0 -4
  166. package/Marketplace/chunk-A5M5PE4P.js +0 -1
  167. package/Marketplace/chunk-AMXLXRQK.js +0 -1
  168. package/Marketplace/chunk-B36GHVS5.js +0 -1
  169. package/Marketplace/chunk-BF6RJNF2.js +0 -3
  170. package/Marketplace/chunk-CLKCSTGQ.js +0 -13
  171. package/Marketplace/chunk-D54NUPYF.js +0 -153
  172. package/Marketplace/chunk-DI4V7KMK.js +0 -1
  173. package/Marketplace/chunk-DPLEMBB4.js +0 -1
  174. package/Marketplace/chunk-DZ2EE5MV.js +0 -1
  175. package/Marketplace/chunk-E3HMIPER.js +0 -2
  176. package/Marketplace/chunk-ECVG56LR.js +0 -1
  177. package/Marketplace/chunk-F4FSW4IN.js +0 -15
  178. package/Marketplace/chunk-F72G2UJU.js +0 -1
  179. package/Marketplace/chunk-FFDMLLA4.js +0 -1
  180. package/Marketplace/chunk-FGDYKXWX.js +0 -1
  181. package/Marketplace/chunk-FGUFEIUH.js +0 -1
  182. package/Marketplace/chunk-FLZT42BJ.js +0 -2
  183. package/Marketplace/chunk-G27HWIHP.js +0 -1
  184. package/Marketplace/chunk-GIU55QWG.js +0 -1
  185. package/Marketplace/chunk-GPEVUTDI.js +0 -2
  186. package/Marketplace/chunk-HESF3TFE.js +0 -1
  187. package/Marketplace/chunk-HKYVBAMV.js +0 -1
  188. package/Marketplace/chunk-IIJMZKPL.js +0 -1
  189. package/Marketplace/chunk-IQGQSQGT.js +0 -1
  190. package/Marketplace/chunk-J5LZMQ7W.js +0 -1
  191. package/Marketplace/chunk-JR7HFVDD.js +0 -1
  192. package/Marketplace/chunk-K2H6WANG.js +0 -1
  193. package/Marketplace/chunk-K3XS4GTD.js +0 -1
  194. package/Marketplace/chunk-KH3NFWQA.js +0 -1
  195. package/Marketplace/chunk-KVP6OL4J.js +0 -2
  196. package/Marketplace/chunk-LPXBSHUI.js +0 -180
  197. package/Marketplace/chunk-MATSRG2L.js +0 -447
  198. package/Marketplace/chunk-NGJKZT7N.js +0 -5
  199. package/Marketplace/chunk-ORXEOOVG.js +0 -1
  200. package/Marketplace/chunk-P7SK6WYZ.js +0 -1
  201. package/Marketplace/chunk-PCZ4SAPZ.js +0 -1
  202. package/Marketplace/chunk-PO4DVIYG.js +0 -4
  203. package/Marketplace/chunk-PXB4YEY3.js +0 -1
  204. package/Marketplace/chunk-QXZQENOE.js +0 -1
  205. package/Marketplace/chunk-T5ONJF63.js +0 -7
  206. package/Marketplace/chunk-T6QOFDEE.js +0 -1
  207. package/Marketplace/chunk-UXLY7K45.js +0 -2
  208. package/Marketplace/chunk-VETHPEVU.js +0 -1
  209. package/Marketplace/chunk-VSEWXNVC.js +0 -291
  210. package/Marketplace/chunk-XJNY6BAG.js +0 -1
  211. package/Marketplace/chunk-XM6GN4VF.js +0 -1
  212. package/Marketplace/chunk-XUNM3IGC.js +0 -5
  213. package/Marketplace/chunk-YC7ADUHG.js +0 -1
  214. package/Marketplace/chunk-YIUQQGOQ.js +0 -1
  215. package/Marketplace/chunk-ZD45HY2A.js +0 -1
  216. package/Marketplace/main-4NCVCGUI.js +0 -1
@@ -1,5 +0,0 @@
1
- import{a as ne,b as oe,c as re,d as ae,e as le,f as pe,g as se}from"./chunk-IYYVZ6B6.js";import{b as ie}from"./chunk-RVYGL22E.js";import{a as ee,b as te}from"./chunk-OE2JYQHN.js";import{a as X}from"./chunk-F72G2UJU.js";import"./chunk-T6QOFDEE.js";import"./chunk-KXZCGKQW.js";import"./chunk-QCZIDOKW.js";import{l as Q}from"./chunk-BF6RJNF2.js";import{e as J}from"./chunk-BUFEIJAI.js";import"./chunk-K5XRGNWG.js";import"./chunk-V5WYSCVT.js";import"./chunk-KHWTOD6H.js";import{l as Y,m as Z}from"./chunk-BIQHA7UA.js";import"./chunk-TMFFA26Y.js";import"./chunk-WAW37FIG.js";import{c as G,h as z,m as K,y as q}from"./chunk-DPLEMBB4.js";import"./chunk-PXB4YEY3.js";import{F as W,H as j,J as $,f as x,g as V,h as A,n as H}from"./chunk-GPEVUTDI.js";import{Dc as v,Eb as C,Ec as p,Fb as k,Fc as B,Gc as L,Ic as O,Jc as F,Ka as M,Kb as m,Kc as R,Oc as P,Qc as w,Wb as l,gc as n,hc as i,ic as c,ja as I,jc as f,ka as T,kc as _,mc as S,nb as N,oa as U,qb as a,rc as y,sc as d,wb as D,ya as g,za as h}from"./chunk-T5ONJF63.js";import"./chunk-K2H6WANG.js";var _e=e=>[e];function ge(e,s){if(e&1&&(f(0),n(1,"a",9),p(2),i(),_()),e&2){let t=s.$implicit;a(),l("routerLink",w(2,_e,t.url)),a(),L(" ",t.title,"")}}var ce=(()=>{class e{constructor(){this.tabs=[{Title:"Download By Url",Url:"/menu/products/download/by-url",Description:"Download products information by product URL as a parameter"}],this.moreMenu=[{title:"Sold In Channel",url:"/menu/products/status/sold-in-channel"},{title:"In POS",url:"/menu/products/status/in-pos"},{title:"Not In Channel",url:"/menu/products/status/not-in-channel"},{title:"Duplicate SKU",url:"/menu/products/status/duplicate-sku"}]}static{this.\u0275fac=function(o){return new(o||e)}}static{this.\u0275cmp=C({type:e,selectors:[["app-download"]],standalone:!1,decls:12,vars:2,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid","d-flex","align-items-center","justify-content-between"],[3,"Tabs"],[1,"dropdown","me-6"],["role","button","data-bs-toggle","dropdown","aria-expanded","false",1,"text-dark"],[1,"fa-solid","fa-bars","fa-lg"],[1,"dropdown-menu","dropdown-menu-end","row"],[1,"d-block"],[4,"ngFor","ngForOf"],[1,"dropdown-item",3,"routerLink"]],template:function(o,r){o&1&&(n(0,"nav",0)(1,"div",1)(2,"div"),c(3,"nav-tab",2),i()(),n(4,"div")(5,"div",3)(6,"a",4),c(7,"i",5),i(),n(8,"div",6)(9,"div",7),m(10,ge,3,4,"ng-container",8),i()()()()(),c(11,"router-outlet")),o&2&&(a(3),l("Tabs",r.tabs),a(7),l("ngForOf",r.moreMenu))},dependencies:[x,ee,W,j],encapsulation:2})}}return e})();var E=(()=>{class e{constructor(t){this.httpService=t}download(t){return this.httpService.post("/api/Product/downloadurl",t)}static{this.\u0275fac=function(o){return new(o||e)(U(J))}}static{this.\u0275prov=I({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var Se=e=>({"background-color":e});function Ce(e,s){if(e&1&&(n(0,"th"),p(1),i()),e&2){let t=s.$implicit;a(),B(t.column)}}function ye(e,s){if(e&1&&(f(0),n(1,"td"),c(2,"span",6),i(),_()),e&2){let t=s.$implicit,o=d().$implicit;a(2),l("innerHTML",o[t.prop],N)}}function ve(e,s){if(e&1&&(n(0,"tr",5),m(1,ye,3,1,"ng-container",3),i()),e&2){let t=s.$implicit,o=d();l("ngStyle",w(2,Se,t.Status>200?"#F4D6D5":"#DEE9C9")),a(),l("ngForOf",o.configs)}}var de=(()=>{class e{constructor(){this.eventClose=new M}ngOnInit(){}onClose(){this.eventClose.emit()}static{this.\u0275fac=function(o){return new(o||e)}}static{this.\u0275cmp=C({type:e,selectors:[["app-response-api-list"]],inputs:{configs:"configs",data:"data",status:"status"},outputs:{eventClose:"onClose"},standalone:!1,decls:7,vars:2,consts:[[1,"table-responsive"],[1,"table"],[1,"thead-light"],[4,"ngFor","ngForOf"],[3,"ngStyle",4,"ngFor","ngForOf"],[3,"ngStyle"],[3,"innerHTML"]],template:function(o,r){o&1&&(n(0,"div",0)(1,"table",1)(2,"thead",2)(3,"tr"),m(4,Ce,2,1,"th",3),i()(),n(5,"tbody"),m(6,ve,2,4,"tr",4),i()()()),o&2&&(a(4),l("ngForOf",r.configs),a(2),l("ngForOf",r.data))},dependencies:[x,A],encapsulation:2})}}return e})();function xe(e,s){if(e&1){let t=S();f(0),n(1,"button",15),y("click",function(){g(t);let r=d(),u=v(11);return h(r.onNewStepperState(u))}),c(2,"i",16),p(3," New "),i(),_()}}function be(e,s){if(e&1){let t=S();f(0),n(1,"button",15),y("click",function(){g(t),d();let r=v(11);return h(r.previous())}),p(2," Back "),i(),_()}}function Ee(e,s){if(e&1){let t=S();f(0),n(1,"button",17),y("click",function(){g(t);let r=d(),u=v(11);return h(r.onStepperNext(u))}),p(2," Next "),i(),_()}}function De(e,s){if(e&1){let t=S();f(0),n(1,"button",18),y("click",function(){g(t);let r=d(),u=v(11);return h(r.onSubmit(u))}),p(2,"Download"),i(),_()}if(e&2){let t=d();a(),l("disabled",!t.urls)}}function Ie(e,s){e&1&&(c(0,"i",19),n(1,"span"),p(2,"Instruction"),i())}function Te(e,s){e&1&&(n(0,"div",20)(1,"div",21)(2,"div",22)(3,"h4",23),p(4,"Note"),i()(),n(5,"div",24)(6,"ol",25)(7,"li"),p(8," Use this form to Download Products from Tokopedia using product URL "),i(),n(9,"li"),p(10," Copy Product URL from "),n(11,"a",26),p(12,"https://seller.tokopedia.com/ "),i(),p(13," and paste in this form "),i(),n(14,"li"),p(15," Use New Line when you want to input several product URLs "),i()()()()())}function Ue(e,s){e&1&&(c(0,"i",27),n(1,"span"),p(2,"Download"),i())}function Me(e,s){if(e&1){let t=S();n(0,"div",20)(1,"textarea",28),R("ngModelChange",function(r){g(t);let u=d();return F(u.urls,r)||(u.urls=r),h(r)}),i()()}if(e&2){let t=d();a(),l("placeholder",t.urlPlaceholder),O("ngModel",t.urls)}}function Ne(e,s){e&1&&(c(0,"i",29),n(1,"span"),p(2,"Finish"),i())}function ke(e,s){if(e&1&&(n(0,"div",20),c(1,"app-response-api-list",30),i()),e&2){let t=d();a(),l("data",t.downloadResponses)("configs",t.configs)}}function Be(e,s){e&1&&(n(0,"h6"),p(1,"1"),i())}function Le(e,s){e&1&&(n(0,"h6"),p(1,"2"),i())}function Oe(e,s){e&1&&(n(0,"h6"),p(1,"3"),i())}var ue=(()=>{class e{constructor(t,o){this.downloadService=t,this.authService=o,this.configs=[{column:"Url",prop:"URL"},{column:"POS",prop:"Name"},{column:"Exception",prop:"Message"}],this.downloadResponses=[],this.stepperState="DOWNLOAD",this.urlPlaceholder=`https://tokopedia.com/tokoriyanadi/kaos-polos-biru
2
- https://tokopedia.com/tokoriyanadi/Celana-Chinos-Coklat`,this.currentDomain=this.authService.getDomain()}onStepperChange(t){this.stepperState=t.selectedStep.state}onSubmit(t){let o=this.urls.split(/\r?\n/);this.downloadService.download(o).subscribe(r=>{this.downloadResponses=r,this.mappingLinkToProduct(),this.onStepperNext(t)})}mappingLinkToProduct(){this.downloadResponses=this.downloadResponses.map(t=>(t.Name=t?.Name?`<a href="${this.currentDomain}/menu/Products/Catalog/Products/Info?ID=${t.ID}" target="_blank">
3
- ${t?.Name}
4
- </a>`:"-",t))}onNewStepperState(t){this.downloadResponses=[],this.urls=null,this.stepperState="DOWNLOAD",t.reset(),this.onStepperNext(t)}onStepperNext(t){t.selected.completed=!0,t.next()}static{this.\u0275fac=function(o){return new(o||e)(D(E),D(Q))}}static{this.\u0275cmp=C({type:e,selectors:[["app-by-url"]],standalone:!1,features:[P([{provide:ne,useValue:{displayDefaultIndicatorType:!1}}])],decls:24,vars:11,consts:[["stepper",""],["headerTitle","Tokopedia - Product Download By Url",3,"hideSearchBox","hideSearchDropdown"],[4,"ngIf"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-12"],["linear","",1,"stepper-downloadByUrl",3,"selectionChange","selectedIndex"],["state","GUIDE",3,"editable","completed"],["matStepLabel",""],["matStepContent",""],["state","DOWNLOAD",3,"editable","completed"],["state","FINISH"],["matStepperIcon","GUIDE"],["matStepperIcon","DOWNLOAD"],["matStepperIcon","FINISH"],[1,"btn","btn-outline-secondary","btn-fill","btn-lg",3,"click"],["aria-hidden","true",1,"fa","fa-file-alt","me-2"],["type","button",1,"btn","btn-outline-secondary","btn-fill","btn-lg","ms-3",3,"click"],["role","button",1,"btn","btn-success","btn-fill","btn-lg","text-white","ms-3",3,"click","disabled"],[1,"fa-solid","fa-info","me-3"],[1,"mt-8"],[1,"card","border","w-50"],[1,"card-header","py-6"],[1,"text-primary"],[1,"card-body",2,"padding-left","0px"],[1,"mt-6"],["href","https://seller.tokopedia.com","target","_blank"],[1,"fa-solid","fa-download","me-3"],["name","url","cols","30","rows","25",1,"form-control",3,"ngModelChange","placeholder","ngModel"],[1,"fa-sharp","fa-solid","fa-flag","me-3"],["status","error",3,"data","configs"]],template:function(o,r){if(o&1){let u=S();n(0,"mainpanel",1)(1,"actions"),m(2,xe,4,0,"ng-container",2)(3,be,3,0,"ng-container",2)(4,Ee,3,0,"ng-container",2)(5,De,3,1,"ng-container",2),i(),n(6,"content")(7,"div",3)(8,"div",4)(9,"div",5)(10,"mat-stepper",6,0),y("selectionChange",function(fe){return g(u),h(r.onStepperChange(fe))}),n(12,"mat-step",7),m(13,Ie,3,0,"ng-template",8)(14,Te,16,0,"ng-template",9),i(),n(15,"mat-step",10),m(16,Ue,3,0,"ng-template",8)(17,Me,2,2,"ng-template",9),i(),n(18,"mat-step",11),m(19,Ne,3,0,"ng-template",8)(20,ke,2,2,"ng-template",9),i(),m(21,Be,2,0,"ng-template",12)(22,Le,2,0,"ng-template",13)(23,Oe,2,0,"ng-template",14),i()()()()()()}o&2&&(l("hideSearchBox",!0)("hideSearchDropdown",!0),a(2),l("ngIf",r.stepperState=="FINISH"),a(),l("ngIf",r.stepperState=="DOWNLOAD"),a(),l("ngIf",r.stepperState=="GUIDE"),a(),l("ngIf",r.stepperState=="DOWNLOAD"),a(5),l("selectedIndex",1),a(2),l("editable",r.stepperState!="FINISH")("completed",!0),a(3),l("editable",r.stepperState!="FINISH")("completed",!1))},dependencies:[V,G,z,K,Y,le,oe,pe,re,ae,de],styles:[`@import"https://fonts.googleapis.com/icon?family=Material+Icons";.card-header{background-color:#00000008}mat-stepper.stepper-downloadByUrl>div.mat-horizontal-stepper-wrapper>div.mat-horizontal-stepper-header-container{position:relative;width:60%;left:18%}
5
- `],encapsulation:2})}}return e})();var Fe=[{path:"",component:ce,children:[{path:"by-url",component:ue,data:{title:"Download Product By Url"},canActivate:[X]},{pathMatch:"full",path:"",redirectTo:"by-url"}]}],ct=(()=>{class e{static{this.\u0275fac=function(o){return new(o||e)}}static{this.\u0275mod=k({type:e})}static{this.\u0275inj=T({providers:[E],imports:[H,q,te,Z,se,ie,$.forChild(Fe)]})}}return e})();export{ct as DownloadModule};
@@ -1 +0,0 @@
1
- import{a as E}from"./chunk-CLKCSTGQ.js";import{a as T}from"./chunk-EGTYAIU5.js";import{j as D,l as w}from"./chunk-BF6RJNF2.js";import{b as j,e as s}from"./chunk-BUFEIJAI.js";import{b as i,c as m}from"./chunk-PXB4YEY3.js";import{G as C}from"./chunk-GPEVUTDI.js";import{B as A,G as U,J as u,Qa as I,g as k,ja as p,pa as a,q as d,v as b}from"./chunk-T5ONJF63.js";var F=(()=>{class r{constructor(){this.httpService=a(s)}getAttributes(t,e){return this.httpService.get("api/product/shopee/GetAttributesTree",[{key:"ID",value:t},{key:"CategoryID",value:e}])}getCategories(t){return this.httpService.get("api/product/shopee/GetCategories",[{key:"ID",value:t}])}uploadProduct(t){return this.httpService.post("api/product/shopee/AddProduct",t).pipe(u(o=>d(null)))}generateAttribute(t){return t.map(e=>({attribute_id:e.attribute_id,attribute_value_list:e.attribute_value_list.map(o=>({value_id:o.value_id,name:o.name}))})),t}static{this.\u0275fac=function(e){return new(e||r)}}static{this.\u0275prov=p({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})();var x=(()=>{class r{constructor(){this.httpService=a(s)}getCategories(t){return this.httpService.get("api/product/tiktok/GetCategories",[{key:"ID",value:t}])}uploadProduct(t){return this.httpService.post("api/product/tiktok/AddProduct",t).pipe(u(o=>d(null)))}generateAttribute(t){let e;return t.map(o=>(o.type=="PRODUCT_PROPERTY"?e={id:o.id,name:o.name,type:o.type,values:o.values}:e={id:o.id,name:o.values[0].id,type:o.type},e))}static{this.\u0275fac=function(e){return new(e||r)}}static{this.\u0275prov=p({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})();var H=(()=>{class r{constructor(){this.httpService=a(s)}getAttributes(t,e){return this.httpService.get("api/product/lazada/GetAttributes",[{key:"ID",value:t},{key:"CategoryID",value:e}])}getCategories(t){return this.httpService.get("api/product/lazada/GetCategories",[{key:"ID",value:t}])}uploadProduct(t){return this.httpService.post("api/product/lazada/AddProduct",t).pipe(u(o=>d(null)))}static{this.\u0275fac=function(e){return new(e||r)}}static{this.\u0275prov=p({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})();var z=(()=>{class r{constructor(){this.httpService=a(s)}getAttributes(t,e){return this.httpService.get("api/product/woo/GetAttributes",[{key:"ID",value:t},{key:"CategoryID",value:e}])}getCategories(t){return this.httpService.get("api/product/woo/GetCategories",[{key:"ID",value:t}])}uploadProduct(t){return this.httpService.post("api/product/woo/AddProduct",t).pipe(u(o=>d(null)))}static{this.\u0275fac=function(e){return new(e||r)}}static{this.\u0275prov=p({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})();var g=class{};var v=class{};var R=(()=>{class r{constructor(){this.httpService=a(s)}getCategories(t){return this.httpService.get("api/product/tokopedia/GetCategories",[{key:"ID",value:t}])}uploadProduct(t){return this.httpService.post("api/product/tokopedia/AddProduct",t).pipe(u(o=>d(null)))}static{this.\u0275fac=function(e){return new(e||r)}}static{this.\u0275prov=p({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})();var G=(()=>{class r{constructor(){this.httpService=a(s)}uploadProduct(t){return this.httpService.post("api/product/shopify/AddProduct",t).pipe(u(o=>d(null)))}static{this.\u0275fac=function(e){return new(e||r)}}static{this.\u0275prov=p({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})();var O=(()=>{class r{constructor(){this.httpService=a(s)}uploadProduct(t){return this.httpService.post(D.UploadPlugoProduct,t).pipe(u(e=>d(null)))}static{this.\u0275fac=function(e){return new(e||r)}}static{this.\u0275prov=p({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})();var Vt=(()=>{class r{constructor(){this.authService=a(w),this.productService=a(T),this.shoppeUploadService=a(F),this.tiktokUploadService=a(x),this.lazadaUploadService=a(H),this.tokopediaUploadService=a(R),this.wooUploadService=a(z),this.shopifyUploadService=a(G),this.plugoUploadService=a(O),this.toastrHandlingService=a(E),this.toastr=a(j),this.router=a(C),this.httpService=a(s),this._selectedProduct=new k(this.getStoredProducts()),this.selectedProduct$=this._selectedProduct.asObservable().pipe(U(t=>t&&t.length>0))}getStoredProducts(){let t=localStorage.getItem("productsUpload");if(t){let e=JSON.parse(t);return e&&e.length>0?e:[]}else return[]}setSelectedProduct(t){localStorage.setItem("productsUpload",JSON.stringify(t)),this._selectedProduct.next(t)}clearSelectedProduct(){localStorage.removeItem("productsUpload"),this._selectedProduct.next([])}getUnselectedChannels(){let t=this.authService.getChannels(),e=this._selectedProduct.getValue();return this.productService.filterUnselectedChannel(e,t)}getDefaultCategory(){return this.httpService.get("api/v1/Channel/ProductCategory/Default")}get channelProductUpload(){let t=this.getUnselectedChannels();return I(t.map(o=>{let c=new g;return c.id=o.ID,c.name=o.Name,c.type=o.TypeID,c.categoryId=null,c.attributes=[],c.selected=!1,c}))}onUploadProduct(t){let e=t.filter(o=>o.selected&&m.IsNotEmpty(o.categoryId)||o.selected&&(o.type==i.Shopify||o.type==i.Plugo));if(e.length>0){let o=this.generateDataForUpload(e);this.uploadProduct(o)}else this.toastr.warning("Please select a channel and category to upload the product.","Warning!")}uploadProduct(t){let e=this.generateObservableForUpload(t);A(e).pipe(b(o=>{let c=[];return o.forEach(f=>{c=[...c,...f]}),c})).subscribe({next:(o=[])=>{m.IsNotEmpty(o)&&this.toastrHandlingService.showToastrUploadMultiple(o),this.hasSuccessRes(o)&&this.onSuccessUpload()}})}hasSuccessRes(t){let e=!1;return t.forEach(o=>{o?.Response.Success_list?.length>0&&m.IsNotEmpty(o)&&(e=!0)}),e}onSuccessUpload(){this.router.navigate(["/menu/products/status/sold-in-channel"]),this.clearSelectedProduct()}generateObservableForUpload(t){let e=[],o=[],c=[],f=[],S=[],y=[],P=[];t.forEach(l=>{switch(l.ChannelType){case i.Shopee:o.push(l);break;case i.Tiktok:e.push(l);break;case i.Lazada:c.push(l);break;case i.Tokopedia:f.push(l);break;case i.WooCommerce:S.push(l);break;case i.Shopify:y.push(l);break;case i.Plugo:P.push(l);break}});let n=[];return[{type:i.Shopee,data:o},{type:i.Tiktok,data:e},{type:i.Lazada,data:c},{type:i.Tokopedia,data:f},{type:i.WooCommerce,data:S},{type:i.Shopify,data:y},{type:i.Plugo,data:P}].filter(l=>l.data.length>0).forEach(l=>{switch(l.type){case i.Shopee:n.push(this.shoppeUploadService.uploadProduct(o));break;case i.Tiktok:n.push(this.tiktokUploadService.uploadProduct(e));break;case i.Lazada:n.push(this.lazadaUploadService.uploadProduct(c));break;case i.Tokopedia:n.push(this.tokopediaUploadService.uploadProduct(f));break;case i.WooCommerce:n.push(this.wooUploadService.uploadProduct(S));break;case i.Shopify:n.push(this.shopifyUploadService.uploadProduct(y));break;case i.Plugo:n.push(this.plugoUploadService.uploadProduct(P));break}}),n}generateDataForUpload(t){let e=[];return t.forEach(o=>{let c=new v;c.ChannelID=o.id,c.ChannelType=o.type,c.Products=this._selectedProduct.getValue(),o.type==i.Shopify?delete c.CategoryID:c.CategoryID=o.categoryId,o.type==i.WooCommerce||o.type==i.Shopify?c.Attribute=o.attributes[0]:c.Attributes=this.formatAttributes(o.type,o.attributes),e.push(c)}),e}formatAttributes(t,e){let o;switch(t){case i.Shopee:o=this.shoppeUploadService.generateAttribute(e);break;case i.Tiktok:o=this.tiktokUploadService.generateAttribute(e);break;case i.WooCommerce:o=this.tiktokUploadService.generateAttribute(e);break;case i.Tokopedia:o=e;break;case i.Shopify:o=e;break;default:o=[];break}return o}static{this.\u0275fac=function(e){return new(e||r)}}static{this.\u0275prov=p({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})();export{F as a,x as b,H as c,z as d,Vt as e};
@@ -1 +0,0 @@
1
- import{a as bt}from"./chunk-7TWBIV3T.js";import{b as xt}from"./chunk-J7AGLBPL.js";import{a as Ct}from"./chunk-RIHLYYZU.js";import{a as rt}from"./chunk-BF6RJNF2.js";import{e as st}from"./chunk-BUFEIJAI.js";import{b as ut,c as gt,g as ht,i as ft,j as _t}from"./chunk-BIQHA7UA.js";import{r as pt,s as dt}from"./chunk-TMFFA26Y.js";import{c as it,h as nt,m as ot,y as at}from"./chunk-DPLEMBB4.js";import{b as lt,d as mt,f as ct}from"./chunk-PXB4YEY3.js";import{g as V,i as et,m as L,n as R}from"./chunk-GPEVUTDI.js";import{Dc as S,Eb as M,Ec as m,Fc as w,G,Gc as k,Hb as K,Ic as X,Jc as Z,K as U,Ka as D,Kb as u,Kc as tt,Na as h,Qa as _,Wb as g,X as z,Z as J,Zc as I,_c as y,ad as $,bc as P,ca as W,ea as O,f as j,fa as Y,g as A,gc as r,hc as l,ic as B,ja as H,jc as T,kc as v,lc as Q,mc as f,oa as q,pd as N,qb as a,rc as C,sc as s,v as b,wb as E,ya as p,za as d}from"./chunk-T5ONJF63.js";function Tt(e,c){e&1&&Q(0)}function vt(e,c){if(e&1&&(T(0),u(1,Tt,1,0,"ng-container",5),v()),e&2){s(2);let t=S(4);a(),g("ngTemplateOutlet",t)}}function wt(e,c){if(e&1&&(r(0,"div",6)(1,"label"),m(2,"Editing Data"),l(),r(3,"div")(4,"span"),m(5),I(6,"number"),l()()()),e&2){let t=s(2);a(5),w(y(6,1,t.value))}}function It(e,c){if(e&1&&(T(0),u(1,vt,2,1,"ng-container",4)(2,wt,7,3,"ng-template",null,1,$),v()),e&2){let t=S(3),i=s();a(),g("ngIf",i.hasPriceEdit)("ngIfElse",t)}}function yt(e,c){if(e&1){let t=f();r(0,"div",7)(1,"input",8),tt("ngModelChange",function(n){p(t);let o=s();return Z(o.value,n)||(o.value=n),d(n)}),l(),r(2,"label",9),m(3),l()()}if(e&2){let t=s();a(),X("ngModel",t.value),g("max",t.maxEditInventory),a(2),w(t.item.Table)}}var Ht=(()=>{class e{constructor(t,i,n){this.dialogRef=t,this.item=i,this.permissionService=n,this.maxEditInventory=1e5,this.permissionService.hasPermission(rt.price).then(o=>this.hasPriceEdit=o)}ngOnInit(){this.selectedChannel=this.item.Variant.Channel.find(t=>t.ChannelID==this.item.ChannelID),this.selectedChannel.ID=this.item.Variant.ID,this.selectedChannel.Sku=this.item.Variant.Code,this.item.Table=="inventory"?(this.value=this.selectedChannel.Inventory,this.maxEditInventory=this.selectedChannel?.TypeID==lt.Tokopedia?1e5:null):this.item.Table=="price"&&(this.value=this.selectedChannel.Price,this.maxEditInventory=null),this.selectedChannel.ItemName=this.item.Name,this.selectedChannel.VarName=this.item.Variant.Model,this.initModalConfig()}initModalConfig(){let t=this.item.Table=="inventory"?"Update Inventory":"Update Price";this.modalConfig=new ft,this.modalConfig.title=`${t} ${this.item?.Name} in ${this.selectedChannel?.Title}`}onSubmit(){this.item.Table=="inventory"?this.selectedChannel.Inventory=this.value:this.item.Table=="price"&&(this.selectedChannel.Price=this.value),this.dialogRef.close(this.selectedChannel)}onClose(){this.dialogRef.close()}static{this.\u0275fac=function(i){return new(i||e)(E(ut),E(gt),E(mt))}}static{this.\u0275cmp=M({type:e,selectors:[["app-table-dialog"]],decls:5,vars:4,consts:[["INVENTORY",""],["DISABLED",""],[3,"onClose","onCancel","onOk","dynamicValidated","config"],["content",""],[4,"ngIf","ngIfElse"],[4,"ngTemplateOutlet"],["matTooltipPosition","above","matTooltip","Cannot edit Unit Price because you dont have access ProductEditor role",1,"info-label-group","mt-3",2,"background","#e9ecef","opacity","1"],[1,"form-label-group","mt-3"],["type","text","name","edit","autoNum","",1,"form-control",3,"ngModelChange","ngModel","max"],["for","edit",1,"text-capitalize"]],template:function(i,n){if(i&1){let o=f();r(0,"modal-material",2),C("onClose",function(){return p(o),d(n.onClose())})("onCancel",function(){return p(o),d(n.onClose())})("onOk",function(){return p(o),d(n.onSubmit())}),r(1,"div",3),u(2,It,4,2,"ng-container",4)(3,yt,4,3,"ng-template",null,0,$),l()()}if(i&2){let o=S(4);g("dynamicValidated",n.value)("config",n.modalConfig),a(2),g("ngIf",n.item.Table=="price")("ngIfElse",o)}},dependencies:[R,V,et,L,ht,Ct,xt,bt,_t,at,it,nt,ot,ct,dt,pt],styles:["mat-form-field[_ngcontent-%COMP%]{width:100%;height:100%}.mat-dialog-title[_ngcontent-%COMP%]{margin-left:1rem;margin-right:1rem}.mat-dialog-content[_ngcontent-%COMP%]{padding-left:.5rem;padding-right:.5rem;margin-left:.5rem;margin-right:.5rem}.font-lg[_ngcontent-%COMP%]{font-size:large}.font-lgr[_ngcontent-%COMP%]{font-size:larger}"]})}}return e})();var Kt=(()=>{class e{transform(t,i,n=0){if(!t)return t;let o=i?parseInt(i,10):10;return t.length>o?t.substring(n,o)+"...":t}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275pipe=K({name:"stringLimit",type:e,pure:!0})}}return e})();function Nt(e,c){if(e&1){let t=f();r(0,"span",6),C("click",function(){p(t);let n=s();return d(n.onGetRowCount())}),r(1,"i",7),m(2,"?"),l()()}}function Dt(e,c){if(e&1&&(T(0),r(1,"span"),m(2),I(3,"number"),l(),v()),e&2){let t=s();a(2),w(y(3,1,t.rowCount()))}}function Et(e,c){if(e&1){let t=f();r(0,"a",10),C("click",function(){p(t);let n=s(2);return d(n.onNextPage())}),B(1,"i",11),m(2," Next"),l()}}function Mt(e,c){if(e&1){let t=f();r(0,"a",12),C("click",function(){p(t);let n=s(2);return d(n.onLastPage())}),B(1,"i",13),m(2," Last"),l()}}function St(e,c){if(e&1&&(r(0,"div",5),u(1,Et,3,0,"a",8)(2,Mt,3,0,"a",9),l()),e&2){let t=s();a(),P(t.disableNextButton()&&!t.goToLastPage()?1:-1),a(),P(t.disableNextButton()&&!t.goToLastPage()?2:-1)}}var ie=(()=>{class e{constructor(){this.totalData=h(0),this.rowCount=h(),this.pageNumber=h(),this.disableNextButton=h(),this.goToLastPage=h(),this.hideCount=h(),this.nextPage=new D,this.lastPage=new D,this.getRowCount=new D}onNextPage(){this.nextPage.emit()}onLastPage(){this.lastPage.emit()}onGetRowCount(){this.getRowCount.emit()}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=M({type:e,selectors:[["infinite-paginator"]],inputs:{totalData:[1,"totalData"],rowCount:[1,"rowCount"],pageNumber:[1,"pageNumber"],disableNextButton:[1,"disableNextButton"],goToLastPage:[1,"goToLastPage"],hideCount:[1,"hideCount"]},outputs:{nextPage:"onNextPage",lastPage:"onLastPage",getRowCount:"onGetRowCount"},decls:9,vars:7,consts:[[1,"d-flex","justify-content-between","mt-5"],[1,"me-auto","d-sm-block","collapse","mt-3"],[1,"font-weight-bold","font-italic","hidden-xxs"],[2,"cursor","pointer"],[4,"ngIf"],[1,"btn-group"],[2,"cursor","pointer",3,"click"],["title","Retreive rows count",1,"border","p-3"],["role","button","title","Load more for 20 products",1,"btn","btn-outline-secondary","btn-sm","text-primary"],["role","button","title","Load all products",1,"btn","btn-outline-secondary","btn-sm","text-primary","border-start-0"],["role","button","title","Load more for 20 products",1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"click"],[1,"fas","fa-arrow-right"],["role","button","title","Load all products",1,"btn","btn-outline-secondary","btn-sm","text-primary","border-start-0",3,"click"],[1,"fas","fa-share"]],template:function(i,n){i&1&&(r(0,"div",0)(1,"div",1)(2,"div",2),m(3),I(4,"number"),u(5,Nt,3,0,"span",3)(6,Dt,4,3,"ng-container",4),m(7),l()(),u(8,St,3,2,"div",5),l()),i&2&&(a(3),k(" Showing 1 - ",y(4,5,n.totalData())," of "),a(2),P(n.hideCount()?5:-1),a(),g("ngIf",!n.hideCount()&&n.rowCount()),a(),k(" records ~ ",n.pageNumber()," Page "),a(),P(n.totalData()>0?8:-1))},dependencies:[R,V,L],encapsulation:2})}}return e})();var se=(()=>{class e{constructor(t){this.http=t,this.pagination$=new A(null),this._pageNumber=_(1),this.pageNumber=N(()=>this._pageNumber()),this._hideCount=_(!0),this.hideCount=N(()=>this._hideCount()),this._disableNextButton=_(!0),this.disableNextButton=N(()=>this._disableNextButton()),this._goToLastPage=_(!1),this.isLastPage=N(()=>this._goToLastPage()),this.totalData=_(0),this.destroy$=new j,this.data$=this.paginationFunction()}onNextPage(t){t.PageNumber+=1,this.pagination$.next(t)}setPageNumberFooter(t){this._pageNumber.set(t.PageNumber)}setPaginationButtonState(t,i){i==0?this._disableNextButton.set(!0):this._disableNextButton.set(!(i<t.RowCount*t.PageNumber))}reloadPagination(t){t.PageNumber=1,this.pagination$.next(t),this._hideCount.set(!0),this._goToLastPage.set(!1)}onLastPage(t={}){let i=JSON.parse(JSON.stringify(t));this.totalRowCount$=this.http.post(`/api/${this.fethRowCountEndpoint}`,i).pipe(b(n=>n.Total),O(n=>{this._hideCount.set(!1),i.RowCount=n,i.PageNumber=1,this.pagination$.next(i),this._goToLastPage.set(!0)}))}paginationFunction(){return this.pagination$.pipe(W(this.destroy$),G(t=>t!=null),U(t=>this.http.post(`/API/${this.fetchDataEndpoint}`,JSON.stringify(t)).pipe(b(i=>i.Data?i.Data:[]))),Y(this.pagination$),z((t,i)=>{let[n,o]=t,[x]=i;return o.PageNumber==1?[x,o]:[n.concat(x),o]}),O(([t,i])=>{this.setPageNumberFooter(i);let n=this.calculateProductLength(t);this.totalData.set(n),this.setPaginationButtonState(i,n)}),b(([t])=>t),J())}getRowCount(t){this._hideCount.set(!1),this.totalRowCount$=this.http.post(`/API/${this.fethRowCountEndpoint}`,t).pipe(b(i=>i.Total))}calculateProductLength(t=[]){return t.reduce((n,o)=>n+(o.Variants?.length?o.Variants?.length:0),0)}static{this.\u0275fac=function(i){return new(i||e)(q(st))}}static{this.\u0275prov=H({token:e,factory:e.\u0275fac})}}return e})();export{Ht as a,Kt as b,ie as c,se as d};
@@ -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-BF6RJNF2.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{l as ne,m as oe}from"./chunk-BIQHA7UA.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};
@@ -1,4 +0,0 @@
1
- import{a as Ae,b as Ct}from"./chunk-5GX2GLRY.js";import{a as H}from"./chunk-KVP6OL4J.js";import"./chunk-77IUCPIQ.js";import"./chunk-JBKHY4HH.js";import{a as ne,b as ae,c as ot}from"./chunk-RGR34QZ3.js";import"./chunk-MS4AQ6UA.js";import{a as oe}from"./chunk-ZD5LURJS.js";import{b as ht}from"./chunk-IEYFOHME.js";import"./chunk-YXFTLQ5M.js";import{g as _t}from"./chunk-IYYVZ6B6.js";import"./chunk-RVYGL22E.js";import{a as pt,b as mt}from"./chunk-OE2JYQHN.js";import"./chunk-7GQIIDFF.js";import"./chunk-6XFYITUD.js";import{a as ft,b as St}from"./chunk-OLSC6KHB.js";import{a as re,b as lt}from"./chunk-COBHWPGI.js";import{a as st}from"./chunk-VETHPEVU.js";import{m as gt}from"./chunk-75BDXSG3.js";import"./chunk-D54NUPYF.js";import"./chunk-7TWBIV3T.js";import"./chunk-J7AGLBPL.js";import"./chunk-6ALHX2I4.js";import"./chunk-4G3QN54S.js";import"./chunk-3RK6DDJD.js";import{a as j}from"./chunk-UBMI3NQH.js";import{b as ut}from"./chunk-7FUVW73P.js";import{b as ct}from"./chunk-M3SJUKTG.js";import{c as dt}from"./chunk-GHQH62TZ.js";import"./chunk-CH2MLZU7.js";import{a as le}from"./chunk-F72G2UJU.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-BF6RJNF2.js";import{b as Ve,e as R}from"./chunk-BUFEIJAI.js";import"./chunk-K5XRGNWG.js";import"./chunk-V5WYSCVT.js";import"./chunk-KHWTOD6H.js";import{b as tt,d as ue,e as it,f as nt,g as at,l as G,m as rt}from"./chunk-BIQHA7UA.js";import{s as et}from"./chunk-TMFFA26Y.js";import"./chunk-WAW37FIG.js";import{b as ke,c as Q,h as B,m as z,o as Z,y as Ze}from"./chunk-DPLEMBB4.js";import{b as w,c as N}from"./chunk-PXB4YEY3.js";import{E as Xe,F as Qe,H as X,J as Le,f as A,g as F,j as Oe,k as V,m as W,n as he}from"./chunk-GPEVUTDI.js";import{$c as k,Aa as Ge,B as qe,Ba as je,Dc as U,Eb as L,Ec as l,Fb as Me,Fc as u,G as Ye,Gc as I,Ic as C,Jc as b,Kb as f,Kc as y,Pc as K,Rc as pe,Wb as d,Z as be,Zc as T,_c as M,aa as Je,ad as q,ea as Ie,gc as i,hc as n,ic as S,ja as Ne,jc as P,ka as De,kc as E,mc as D,oa as se,ob as O,qb as o,rc as v,sc as s,v as J,wb as x,xa as Ke,ya as g,za as h}from"./chunk-T5ONJF63.js";import"./chunk-K2H6WANG.js";var bt=(()=>{class r{constructor(){this.ObjectOrderTabs=[{Title:"1 - New Order",Url:"/menu/Order/new",Permissions:[]},{Title:"2 - Ready to Ship",Url:"/menu/Order/ready_to_ship",Permissions:[]},{Title:"3 - Shipped",Url:"/menu/Order/Shipped",Permissions:[]},{Title:"4 - Completed",Url:"/menu/Order/Delivered",Permissions:[]},{Title:"All",Url:"/menu/Order/All",Permissions:[]},{Title:"99 - Cancelled",Url:"/menu/Order/Cancelled",Permissions:[]},{Title:"Download",Url:"/menu/Order/Download",Permissions:[He.downloadOrder]},{Title:"Log",Url:"/menu/Order/Download_Order_Log",Permissions:[He.downloadOrder]}]}ngOnInit(){}static{this.\u0275fac=function(a){return new(a||r)}}static{this.\u0275cmp=L({type:r,selectors:[["app-orders"]],standalone:!1,decls:5,vars:2,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid"],[3,"Tabs","usePermissions"]],template:function(a,t){a&1&&(i(0,"nav",0)(1,"div",1)(2,"div"),S(3,"nav-tab",2),n()()(),S(4,"router-outlet")),a&2&&(o(3),d("Tabs",t.ObjectOrderTabs)("usePermissions",!0))},dependencies:[pt,Qe],encapsulation:2})}}return r})();var Fe=(()=>{class r{constructor(e,a){this.http=e,this.toastr=a}acceptTokopediaOrders(e){return this.http.post("/api/Orders/AcceptOrderTokopedia",e).pipe(Ie(a=>{this.tokopediaAcceptOrderHandler(a)}))}tokopediaAcceptOrderHandler(e){let a=e.filter(m=>m.Status==!1),t=e.filter(m=>m.Status==!0);if(a.length==0&&t.length>0){let m=`<ol>${this.generateSuccessMessage(t)}</ol>`;this.toastr.success(m,"Success",{enableHtml:!0})}else if(a.length>0&&t.length>0){let m=`<ol>
2
- ${this.generateSuccessMessage(t)}
3
- ${this.generateErrorMessage(a)}
4
- </ol>`;this.toastr.warning(m,"Warning",{enableHtml:!0})}else{let m=`<ol>${this.generateErrorMessage(a)}</ol>`;this.toastr.error(m,"Error",{enableHtml:!0})}}generateSuccessMessage(e){let a="";return e.forEach(t=>{a+=`<li><b>${t.OrderNumber}</b> was successfully Accept</li>`}),a}generateErrorMessage(e){let a="";return e.forEach(t=>{a+=`<li><b>${t.OrderNumber}</b> ${t.Message}</li>`}),a}static{this.\u0275fac=function(a){return new(a||r)(se(R),se(Ve))}}static{this.\u0275prov=Ne({token:r,factory:r.\u0275fac})}}return r})();function Ot(r,c){if(r&1){let e=D();P(0),i(1,"button",20),v("click",function(){g(e);let t=s().ngIf,m=s();return h(m.onAcceptOrder(t))}),S(2,"i",21),l(3," Accept "),n(),E()}}function Lt(r,c){if(r&1&&(P(0),f(1,Ot,4,0,"ng-container",3),E()),r&2){let e=s();o(),d("ngIf",e.isTokopediaAvailable&&e.isTokopediaSelected)}}function kt(r,c){if(r&1&&(i(0,"span",22),S(1,"img",23),n(),l(2)),r&2){let e=c.item;o(),d("src",e==null?null:e.Img,O),o(),I(" ",e.Name," ")}}function Vt(r,c){if(r&1){let e=D();P(0),i(1,"th",35)(2,"input",36),y("ngModelChange",function(t){g(e);let m=s(3);return b(m.isCheckAll,t)||(m.isCheckAll=t),h(t)}),v("ngModelChange",function(){g(e);let t=s(2).ngIf,m=s();return h(m.onSelectAllOrderData(t))}),n()(),E()}if(r&2){let e=s(3);o(2),C("ngModel",e.isCheckAll)}}function At(r,c){if(r&1){let e=D();P(0),i(1,"input",36),y("ngModelChange",function(t){g(e);let m=s(2).$implicit;return b(m.selected,t)||(m.selected=t),h(t)}),v("ngModelChange",function(){g(e);let t=s(4).ngIf,m=s();return h(m.onSelectOrderData(t))}),n(),E()}if(r&2){let e=s(2).$implicit;o(),C("ngModel",e.selected)}}function Ft(r,c){if(r&1&&(P(0),i(1,"td"),f(2,At,2,1,"ng-container",3),n(),E()),r&2){let e=s().$implicit,a=s(3);o(2),d("ngIf",e.Type==a.tokopediaType)}}function Rt(r,c){if(r&1&&(P(0),i(1,"span"),l(2),n(),E()),r&2){let e=s().$implicit;o(2),u(e.Number)}}function Wt(r,c){if(r&1&&(i(0,"a",38),l(1),n()),r&2){let e=s().$implicit,a=s(3);d("href",a.domain+"/menu/Orders/Order/Sales_Order/Info?ID="+e.ID,O),o(),u(e.Number)}}function Bt(r,c){if(r&1&&(i(0,"tr"),f(1,Ft,3,1,"ng-container",3),i(2,"td"),l(3),n(),i(4,"td"),f(5,Rt,3,1,"ng-container",24)(6,Wt,2,2,"ng-template",null,1,q),n(),i(8,"td"),l(9),n(),i(10,"td"),l(11),T(12,"date"),n(),i(13,"td"),S(14,"app-channel-logo",37),n()()),r&2){let e=c.$implicit,a=U(7),t=s(3);o(),d("ngIf",t.isTokopediaAvailable),o(2),u(e.Outlet),o(2),d("ngIf",e.ID==t.guidEmpty)("ngIfElse",a),o(4),u(e.Customer),o(2),u(k(12,7,e.Created,"dd MMM yyyy HH:mm")),o(3),d("typeId",e.Type)}}function zt(r,c){if(r&1){let e=D();P(0),i(1,"div",25)(2,"table",26),v("matSortChange",function(t){g(e);let m=s(2);return h(m.onSort(t))}),i(3,"thead",27)(4,"tr",28),f(5,Vt,3,1,"ng-container",3),i(6,"th",29),l(7,"Outlet"),n(),i(8,"th",30),l(9,"Order number"),n(),i(10,"th"),l(11,"Customer"),n(),i(12,"th",31),l(13," Created On "),n(),i(14,"th",32),l(15,"Channel"),n()()(),i(16,"tbody"),f(17,Bt,15,10,"tr",33),n()(),i(18,"app-mat-paginator-no-count",34),T(19,"async"),T(20,"async"),v("total",function(){g(e);let t=s(2);return h(t.getPaginatonTotal())})("next",function(){g(e);let t=s(2);return h(t.onNextPage())})("previous",function(){g(e);let t=s(2);return h(t.onPreviousPage())}),n()(),E()}if(r&2){let e,a=s().ngIf,t=s();o(5),d("ngIf",t.isTokopediaAvailable&&a),o(12),d("ngForOf",a),o(),d("filter",t.filter)("totaldata",(e=M(19,5,t.newOrdersData$))==null?null:e.length)("paginationTotal",M(20,7,t.paginationTotal$))}}function Gt(r,c){if(r&1&&(P(0),f(1,zt,21,9,"ng-container",24),E()),r&2){let e=c.ngIf;s();let a=U(36);o(),d("ngIf",(e==null?null:e.length)>0)("ngIfElse",a)}}function jt(r,c){r&1&&(i(0,"div",39),S(1,"app-empty-state"),n())}var yt=(()=>{class r{constructor(e,a,t,m){this.localDataService=e,this.orderService=a,this.acceptOrderService=t,this.authService=m,this.filter={PageNumber:null,PageSize:null,ListChannelID:[],From:null,To:null},this.domain=`https://${this.localDataService.getHostName()}`,this.guidEmpty=N.GuidEMpty,this.tokopediaType=w.Tokopedia,this.isTokopediaSelected=!1,this.isTokopediaAvailable=!1,this.isCheckAll=!1,this.channelOptions=this.authService.getChannels()}ngOnInit(){this.initLoadPage()}initLoadPage(){this.orderService.loadInitialPage().subscribe(e=>{this.filter.PageNumber=e.Filter.PageNumber,this.filter.PageSize=e.Filter.RowCount,this.filter.From=e.Filter.From,this.filter.To=e.Filter.To,this.getNewOrders()})}getNewOrders(){let e={PageNumber:this.filter.PageNumber,PageSize:this.filter.PageSize,ListChannelID:this.filter.ListChannelID,From:this.filter.From,To:this.filter.To};this.sourceObs$=this.orderService.getNewOrders(e).pipe(be()),this.newOrdersData$=this.sourceObs$.pipe(Ie(a=>{a.filter(m=>m.Type==w.Tokopedia).length>0&&(this.isTokopediaAvailable=!0)}))}getPaginatonTotal(){this.paginationTotal$=this.orderService.getTotalNewOrders(this.filter.ListChannelID,this.filter.From,this.filter.To).pipe(be())}onNextPage(){this.filter.PageNumber=this.filter.PageNumber+1,this.getNewOrders()}onPreviousPage(){this.filter.PageNumber=this.filter.PageNumber-1,this.getNewOrders()}onSelectOrderData(e){this.isTokopediaSelected=!1,e.filter(t=>t.selected).length>0&&(this.isTokopediaSelected=!0)}onSelectAllOrderData(e){e=e.map(a=>(a.Type==w.Tokopedia&&(a.selected=this.isCheckAll),a)),this.onSelectOrderData(e)}onAcceptOrder(e){let a=this.getSelectedTokopediaOrders(e);this.acceptOrderService.acceptTokopediaOrders(a).subscribe(t=>{this.isTokopediaSelected=!1,location.reload()})}getSelectedTokopediaOrders(e){return e.filter(t=>t.selected).map(t=>t.Number)}onSort(e){if(e.direction==""){this.newOrdersData$=this.sourceObs$;return}if(e.active=="created"){let a=e.direction=="asc";this.newOrdersData$=this.newOrdersData$.pipe(J(t=>(t=t.sort((m,_)=>N.compare(m.Created,_.Created,a)),t)))}}static{this.\u0275fac=function(a){return new(a||r)(x(me),x(Ae),x(Fe),x($))}}static{this.\u0275cmp=L({type:r,selectors:[["app-new-order"]],standalone:!1,decls:37,vars:15,consts:[["EMPTY_STATE",""],["NOT_EMPTY",""],["headerTitle","1 - New Order","searchBoxPlaceHolder","Search Orders...",3,"onSubmit","hideSearchBox"],[4,"ngIf"],["href","https://ods.dealpos.app","target","_blank",1,"btn","btn-outline-secondary","shadow","rounded","ms-2"],[1,"fa-solid","fa-clipboard-list","me-3"],[1,"fw-bold","mb-2"],["appendTo","body","bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"ngModelChange","clearable","multiple","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],[1,"mt-5"],[1,"fw-bold"],["type","number","name","PageNumber",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["type","number","name","PageSize",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid","mt-3","d-print-none"],[1,"row"],[1,"col-md-12"],["type","button","data-cy","scanInPos",1,"btn","btn-outline-secondary","shadow","rounded","me-3",3,"click"],[1,"fa-solid","fa-check"],[1,"me-2"],["alt","",2,"width","18px",3,"src"],[4,"ngIf","ngIfElse"],[1,"table-responsive"],["matSort","",1,"table","table-hover",3,"matSortChange"],[1,"sticky-top-thead"],[1,"table-light"],[2,"width","120px"],[2,"width","220px"],["mat-sort-header","created",2,"width","130px"],[2,"width","130px"],[4,"ngFor","ngForOf"],[3,"total","next","previous","filter","totaldata","paginationTotal"],[2,"width","5px"],["type","checkbox",3,"ngModelChange","ngModel"],[3,"typeId"],["target","_blank",3,"href"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"]],template:function(a,t){if(a&1){let m=D();i(0,"mainpanel",2),v("onSubmit",function(){return g(m),h(t.getNewOrders())}),i(1,"actions"),f(2,Lt,2,1,"ng-container",3),T(3,"async"),i(4,"a",4),S(5,"i",5),i(6,"span"),l(7,"Visit our Fulfillment Display System"),n()()(),i(8,"filters")(9,"div")(10,"label",6),l(11,"Channel"),n(),i(12,"ng-select",7),y("ngModelChange",function(p){return g(m),b(t.filter.ListChannelID,p)||(t.filter.ListChannelID=p),h(p)}),f(13,kt,3,2,"ng-template",8),n()(),i(14,"div",9)(15,"label",10),l(16,"Page Number"),n(),i(17,"input",11),y("ngModelChange",function(p){return g(m),b(t.filter.PageNumber,p)||(t.filter.PageNumber=p),h(p)}),n()(),i(18,"div",9)(19,"label",10),l(20,"Page Size"),n(),i(21,"input",12),y("ngModelChange",function(p){return g(m),b(t.filter.PageSize,p)||(t.filter.PageSize=p),h(p)}),n()(),i(22,"div",9)(23,"label",13),l(24,"From/To"),n(),i(25,"div",14)(26,"datepicker",15),y("dateChange",function(p){return g(m),b(t.filter.From,p)||(t.filter.From=p),h(p)}),n()(),i(27,"div")(28,"datepicker",16),y("dateChange",function(p){return g(m),b(t.filter.To,p)||(t.filter.To=p),h(p)}),n()()()(),i(29,"content")(30,"div",17)(31,"div",18)(32,"div",19),f(33,Gt,2,2,"ng-container",3),T(34,"async"),f(35,jt,2,0,"ng-template",null,0,q),n()()()()()}a&2&&(d("hideSearchBox",!0),o(2),d("ngIf",M(3,11,t.newOrdersData$)),o(10),d("clearable",!0)("multiple",!0)("items",t.channelOptions),C("ngModel",t.filter.ListChannelID),o(5),C("ngModel",t.filter.PageNumber),o(4),C("ngModel",t.filter.PageSize),o(5),C("date",t.filter.From),o(2),C("date",t.filter.To),o(5),d("ngIf",M(34,13,t.newOrdersData$)))},dependencies:[A,F,Q,Z,ke,B,z,G,ie,ee,te,j,re,oe,ne,ae,H,Oe,V],encapsulation:2})}}return r})();var Ht=()=>["/menu/Order"];function Ut(r,c){if(r&1&&(i(0,"tr")(1,"td"),l(2),n(),i(3,"td"),l(4),T(5,"number"),n(),i(6,"td"),l(7),T(8,"number"),n()()),r&2){let e=c.$implicit;o(2),u(e.Code),o(2),u(M(5,3,e.Quantity)),o(3),u(M(8,5,e.Price))}}function qt(r,c){if(r&1&&(i(0,"div",4)(1,"div",5)(2,"div",6)(3,"div",7)(4,"h3",8),l(5,"Outlet Info"),n()(),i(6,"div",4)(7,"div",9),l(8," Outlet : "),n(),i(9,"div",9),l(10),n()(),i(11,"div",4)(12,"div",9),l(13," Date : "),n(),i(14,"div",9),l(15),T(16,"date"),n()(),i(17,"div",4)(18,"div",9),l(19," Status : "),n(),i(20,"div",9),l(21),n()(),i(22,"div",4)(23,"div",9),l(24," Tax Type : "),n(),i(25,"div",9),l(26),n()(),i(27,"div",4)(28,"div",9),l(29," Due Date : "),n(),i(30,"div",9),l(31),T(32,"date"),n()()(),i(33,"div",6)(34,"div",7)(35,"h3",8),l(36,"Customer Info"),n()(),i(37,"div",4)(38,"div",9),l(39," Name : "),n(),i(40,"div",9),l(41),n()(),i(42,"div",4)(43,"div",9),l(44," Email : "),n(),i(45,"div",9),l(46),n()(),i(47,"div",4)(48,"div",9),l(49," Mobile : "),n(),i(50,"div",9),l(51),n()()()(),i(52,"div",10)(53,"h3",11),l(54,"Products Sold"),n(),i(55,"div",12)(56,"table",13)(57,"thead",14)(58,"tr",15)(59,"th"),l(60,"Code"),n(),i(61,"th"),l(62,"Quantity"),n(),i(63,"th"),l(64,"Price"),n()()(),i(65,"tbody"),f(66,Ut,9,7,"tr",16),n()()()()()),r&2){let e=s();o(10),I(" ",e.model.Outlet," "),o(5),I(" ",k(16,9,e.model.Date,"dd MMM yyyy")," "),o(6),I(" ",e.model.Delivery," "),o(5),I(" ",e.model.TaxType," "),o(5),I(" ",k(32,12,e.model.DueDate,"dd MMM yyyy")," "),o(10),I(" ",e.model.Customer.Name," "),o(5),I(" ",e.model.Customer.Email," "),o(5),I(" ",e.model.Customer.Mobile," "),o(15),d("ngForOf",e.model.Variants)}}var vt=(()=>{class r{constructor(e,a){this.http=e,this.url=a,this.number=this.url.snapshot.queryParams.Number,this.outlet=this.url.snapshot.queryParams.Outlet}ngOnInit(){this.Load()}Load(){var e={Number:this.number,Outlet:this.outlet};this.http.post("/api/orders/GetInvoiceDetail",e).subscribe(a=>{this.model=a})}static{this.\u0275fac=function(a){return new(a||r)(x(R),x(Xe))}}static{this.\u0275cmp=L({type:r,selectors:[["app-detail-order"]],standalone:!1,decls:7,vars:6,consts:[[3,"headerTitle","hideSearchBox","hideSearchDropdown"],["role","button",1,"btn","btn-secondary","btn-fill","btn-lg","me-3",3,"routerLink"],[1,"container"],["class","row",4,"ngIf"],[1,"row"],[1,"col-4"],[1,"border","my-3","py-3","col-12"],[1,"row","m-2"],[1,"text-center"],[1,"col"],[1,"col-8"],[1,"text-center","my-3","py-3"],[1,"table-responsive"],[1,"table"],[1,"sticky-top-thead"],[1,"table-light"],[4,"ngFor","ngForOf"]],template:function(a,t){a&1&&(i(0,"mainpanel",0)(1,"actions")(2,"a",1),l(3,"Back"),n()(),i(4,"content")(5,"div",2),f(6,qt,67,15,"div",3),n()()()),a&2&&(d("headerTitle","Order #"+t.number)("hideSearchBox",!0)("hideSearchDropdown",!0),o(2),d("routerLink",K(5,Ht)),o(4),d("ngIf",t.model))},dependencies:[A,F,G,X,W,V],encapsulation:2})}}return r})();var xt=(()=>{class r{constructor(e){this.dialogRef=e,this.tandaiSudahDicetak=!1}onCancel(){this.dialogRef.close()}onPrint(){this.dialogRef.close(this.tandaiSudahDicetak?1:0)}static{this.\u0275fac=function(a){return new(a||r)(x(tt))}}static{this.\u0275cmp=L({type:r,selectors:[["app-print-tokopedia"]],standalone:!1,decls:17,vars:1,consts:[[1,"container-fluid"],[1,"text-center","mb-4","fw-bold","mt-6"],[1,"row"],[1,"col-12"],[1,"fs-5"],[1,"d-flex","align-items-center","text-center","justify-content-center","mb-8"],[1,"me-2",3,"ngModelChange","ngModel"],[1,"fs-5","pt-1"],[1,"d-flex","align-items-center","justify-content-center"],[1,"btn","btn-light-blue","text-primary","btn-lg","fw-bold","mx-3",3,"click"],[1,"btn","btn-light-blue","me-6","text-primary","btn-lg","fw-bold","mx-3",3,"click"]],template:function(a,t){a&1&&(i(0,"div",0)(1,"h2",1),l(2,"Cetak label pesanan"),n(),i(3,"mat-dialog-content")(4,"div",2)(5,"div",3)(6,"p",4),l(7,"Kamu akan mencetak label yang berisi detail pesanan"),n(),i(8,"div",5)(9,"mat-checkbox",6),y("ngModelChange",function(_){return b(t.tandaiSudahDicetak,_)||(t.tandaiSudahDicetak=_),_}),n(),i(10,"span",7),l(11,'Pesanan telah ditandai sebagai "Sudah Dicetak"'),n()()()()(),i(12,"mat-dialog-actions",8)(13,"button",9),v("click",function(){return t.onCancel()}),l(14,"Cancel"),n(),i(15,"button",10),v("click",function(){return t.onPrint()}),l(16,"Cetak Pesanan"),n()()()),a&2&&(o(9),C("ngModel",t.tandaiSudahDicetak))},dependencies:[B,z,ft,nt,it],encapsulation:2})}}return r})();var We=(()=>{class r{constructor(e,a,t){this.http=e,this.toastr=a,this.dialog=t}getTokopediaShippingLabel(e){return this.http.post("/api/v1/Shippinglabel/Tokopedia/Multiple",{Orders:e}).pipe(J(a=>(a=a.map(t=>(t.ChannelType=w.Tokopedia,t)),a)))}getTiktokShippingLabel(e){return this.http.post("/api/v1/Shippinglabel/TIktok/Multiple",{Orders:e}).pipe(J(a=>(a=a.map(t=>(t.ChannelType=w.Tiktok,t)),a)))}getShopeeShippingLabel(e){return this.http.post("/api/v1/Shippinglabel/shopee/Multiple",{Orders:e}).pipe(J(a=>(a=a.map(t=>(t.ChannelType=w.Shopee,t)),a)))}getLazadaShippingLabel(e){return this.http.post("/api/v1/Shippinglabel/lazada/Multiple",{Orders:e}).pipe(J(a=>(a=a.map(t=>(t.ChannelType=w.Lazada,t)),a)))}printShippingLabelTokopedia(e){let a={OrderNumber:e,Printed:!0};this.dialog.open(xt).afterClosed().pipe(Ye(t=>t!==void 0),Je(t=>(a.Printed=t,this.http.post("api/v1/Shippinglabel/Tokopedia",a)))).subscribe(t=>{let m=window.open("about:blank","_blank");m.document.write(t.File),m.document.close()})}printShippingLabelTiktok(e,a){let t={ShopID:a,OrderNumber:e};this.http.post("api/v1/Shippinglabel/Tiktok",t).subscribe(m=>{m.data!=null?window.open(m.data.doc_url,"_blank"):this.toastr.error("Cannot Print the Shipping Label,The invoice Number is not set to Pickup","Cannot Print")})}printShippingLabelShopee(e,a){let t={ShopID:a,OrderNumber:e};this.http.post("api/v1/Shippinglabel/shopee/DownloadShipping",t).subscribe(m=>{var _=Uint8Array.from(atob(m.File),ze=>ze.charCodeAt(0)),p=new Blob([_],{type:"octet/stream"});N.openDownloadFile(p,`${e}.pdf`)})}printShippingLabelLazada(e,a){let t={ShopID:a,OrderNumber:e};this.http.post("api/v1/Shippinglabel/Lazada/DownloadShipping",t).subscribe(m=>{m.result.data!=null?window.open(m.result.data.pdf_url,"_blank"):this.toastr.error(m.message,"Cannot Print")})}static{this.\u0275fac=function(a){return new(a||r)(se(R),se(Ve),se(ue))}}static{this.\u0275prov=Ne({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})();var de=function(r){return r.SPX="https://res.cloudinary.com/pos/image/upload/v1698216798/APP/Print%20Shipping%20Label/SPX_Logo.png",r.SICEPAT="https://res.cloudinary.com/pos/image/upload/v1698216793/APP/Print%20Shipping%20Label/SiCepat_Logo.png",r.JNT="https://res.cloudinary.com/pos/image/upload/v1698216792/APP/Print%20Shipping%20Label/J_T_Logo.png",r.ANTERAJA="https://res.cloudinary.com/pos/image/upload/v1698218271/APP/Print%20Shipping%20Label/anteraja_Logo.png",r.JNE="https://res.cloudinary.com/pos/image/upload/v1698216791/APP/Print%20Shipping%20Label/JNE_Logo.png",r.GRAB="https://res.cloudinary.com/pos/image/upload/v1698216794/APP/Print%20Shipping%20Label/GrabExpress_Logo.png",r.GOSEND="https://res.cloudinary.com/pos/image/upload/v1698218375/APP/Print%20Shipping%20Label/Gosend_Logo.png",r.LAZADA_EXPRESS="https://res.cloudinary.com/pos/image/upload/v1698914677/icons/Marketplace%20logo/lazada-Logistics.png",r}(de||{});var Ce=function(r){return r.TOKOPEDIA="https://res.cloudinary.com/pos/image/upload/v1698216793/APP/Print%20Shipping%20Label/Tokopedia_Logo.png",r.SHOPEE="https://res.cloudinary.com/pos/image/upload/v1698219243/APP/Print%20Shipping%20Label/shopee-logo.png",r.LAZADA="https://res.cloudinary.com/pos/image/upload/v1698912333/icons/Marketplace%20logo/Lazada_icon.png",r.TIKTOK="https://res.cloudinary.com/pos/image/upload/v1645761565/icons/Marketplace%20logo/tiktok-logo.png",r}(Ce||{});function Jt(r,c){if(r&1&&(P(0),i(1,"div",36)(2,"div",12)(3,"div",37),l(4),n()(),i(5,"div",12)(6,"div",37),l(7),n()()(),E()),r&2){let e=s();o(4),I(" ",e.recipient==null?null:e.recipient.City," "),o(3),I(" ",e.recipient==null?null:e.recipient.District," ")}}function Kt(r,c){if(r&1&&(P(0),i(1,"div")(2,"span",15),l(3,"Berat: "),n(),i(4,"span",18),l(5),n()(),E()),r&2){let e=s();o(5),I("",e.shippingLabel==null?null:e.shippingLabel.Weight," gr")}}function Xt(r,c){if(r&1&&(P(0),i(1,"div",38)(2,"span",14),l(3,"Batas Kirim:"),n(),i(4,"span",18),l(5),T(6,"date"),n()(),E()),r&2){let e=s();o(5),u(k(6,1,e.logistic==null?null:e.logistic.Batas_kirim,"dd-MM-yyy"))}}function Qt(r,c){if(r&1&&(P(0),i(1,"div",38)(2,"span",14),l(3,"No.Pesanan:"),n(),i(4,"span",18),l(5),n()(),E()),r&2){let e=s();o(5),u(e.shippingLabel==null?null:e.shippingLabel.OrderNumber)}}function Zt(r,c){if(r&1&&(i(0,"tr")(1,"td",39),l(2),n(),i(3,"td"),l(4),n(),i(5,"td"),l(6),n(),i(7,"td"),l(8),T(9,"number"),n()()),r&2){let e=c.$implicit,a=c.index;o(2),u(a+1),o(2),u(e.Product_Name),o(2),u(e.SKU),o(2),u(M(9,4,e.Quantity))}}var Be=(()=>{class r{constructor(){this.minDate=N.MinDate,this.channelType=w}ngOnChanges(e){e.shippingLabel&&e.shippingLabel.currentValue&&(this.initShippingLabel(),this.getShippingLogo(),this.getChannelLogo())}ngAfterViewInit(){this.initBarcodeConfig()}getChannelLogo(){switch(this.shippingLabel.ChannelType){case w.Tokopedia:this.marketplaceLogo=Ce.TOKOPEDIA;break;case w.Shopee:this.marketplaceLogo=Ce.SHOPEE;break;case w.Lazada:this.marketplaceLogo=Ce.LAZADA;break;case w.Tiktok:this.marketplaceLogo=Ce.TIKTOK;break}}getShippingLogo(){let e=this.shippingLabel.Logistic.Logistic_Name;e=e?.toLowerCase(),e.includes("anteraja")?this.shippingLogo=de.ANTERAJA:e.includes("grabexpress")?this.shippingLogo=de.GRAB:e.includes("jne")?this.shippingLogo=de.JNE:e.includes("gosend")?this.shippingLogo=de.GOSEND:e.includes("j&t")||e.includes("jnt")?this.shippingLogo=de.JNT:e.includes("sicepat")?this.shippingLogo=de.SICEPAT:e.includes("spx")?this.shippingLogo=de.SPX:(e.includes("lex")||e.includes("lx")||e.includes("lazada express"))&&(this.shippingLogo=de.LAZADA_EXPRESS)}initShippingLabel(){this.recipient=this.shippingLabel.Recipient,this.store=this.shippingLabel.Store,this.products=this.shippingLabel.Products,this.logistic=this.shippingLabel.Logistic}initBarcodeConfig(){if(N.IsNotEmpty(this.logistic?.Resi_Number)){let e=this.logistic?.Resi_Number;JsBarcode(`#RESI${this.id}`,this.logistic?.Resi_Number,{displayValue:!1,width:e.length>15?1:1.5,height:40})}N.IsNotEmpty(this.shippingLabel?.OrderNumber)&&JsBarcode(`#NO${this.id}`,this.shippingLabel?.OrderNumber,{displayValue:!1,width:this.shippingLabel?.OrderNumber.length>15?.5:1,height:40})}static{this.\u0275fac=function(a){return new(a||r)}}static{this.\u0275cmp=L({type:r,selectors:[["app-shipping-label"]],inputs:{shippingLabel:"shippingLabel",id:"id"},features:[Ke],decls:87,vars:20,consts:[[1,"label-container"],[2,"border","1px solid","padding","12px"],[1,"row","mb-2"],[1,"col-12"],[1,"d-flex","align-items-center","justify-content-between"],["width","105px",1,"border-0",3,"src"],[1,"mb-4"],[1,"row","mb-1"],[1,"text-center","fw-bold","border","p-2","fs-5","border-dark"],[1,"me-2"],[1,"col-12","text-center"],[3,"id"],[1,"col-6"],[1,"d-flex"],[1,"fw-bold","fs-6","me-1"],[1,"fw-bold","fs-6"],[1,"mt-2"],[1,"mb-0","fs-6",2,"max-width","200px","word-wrap","break-word"],[1,"fs-6"],[1,"fs-6",2,"word-wrap","break-word","max-width","160px"],[4,"ngIf"],[1,"row","px-6"],[1,"col-5","border","border-dark","border-end-0","text-center","p-2"],[1,"col-7","border","border-dark","p-2","text-center","fs-6"],[1,"fst-italic"],[1,"row"],[1,"col-5","pt-4",2,"padding-right","0px"],[1,"d-flex","justify-content-between"],[1,"col-7","text-center"],[1,"mt-1",3,"id"],[1,"table","table-sm","fs-6"],[1,"text-center",2,"width","5px"],[2,"width","150px"],[2,"width","50px"],[2,"width","25px"],[4,"ngFor","ngForOf"],[1,"row","mb-4"],[1,"text-center","fw-bold","border","p-2","fs-6","border-dark","text-uppercase"],[1,"mt-4"],[1,"text-center"]],template:function(a,t){a&1&&(i(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4)(5,"div"),S(6,"img",5),n(),i(7,"div")(8,"h4"),l(9),n()(),i(10,"div"),S(11,"img",5),n()()()(),i(12,"div",6),S(13,"hr"),n(),i(14,"div",7)(15,"div",3)(16,"div",8)(17,"span",9),l(18),n(),i(19,"span"),l(20),n()()()(),i(21,"div",7)(22,"div",10),Ge(),S(23,"svg",11),n()(),je(),i(24,"div",6),S(25,"hr"),n(),i(26,"div",2)(27,"div",12)(28,"div",13)(29,"div",14),l(30,"Penerima: "),n(),i(31,"div",15),l(32),n()(),i(33,"div",16)(34,"span",15),l(35,"Alamat Pengiriman:"),n(),i(36,"div",17),l(37),n()()(),i(38,"div",12)(39,"div",13)(40,"div",14),l(41,"Pengirim: "),n(),i(42,"div")(43,"div",15),l(44),n(),i(45,"div",18),l(46),n(),i(47,"div",19),l(48),n()()(),S(49,"div"),n()(),f(50,Jt,8,2,"ng-container",20),i(51,"div",21)(52,"div",22)(53,"div",15),l(54,"CASHLESS"),n()(),i(55,"div",23)(56,"small",24),l(57,"Penjual tidak perlu membayar ongkos kirim ke kurir"),n()()(),i(58,"div",25)(59,"div",26)(60,"div",27),f(61,Kt,6,1,"ng-container",20),i(62,"div")(63,"span",15),l(64,"COD: "),n(),i(65,"span",18),l(66),T(67,"number"),n()()(),f(68,Xt,7,4,"ng-container",20)(69,Qt,6,1,"ng-container",20),n(),i(70,"div",28),Ge(),S(71,"svg",29),n()()(),je(),i(72,"div",25)(73,"div",3)(74,"table",30)(75,"thead")(76,"tr")(77,"th",31),l(78,"No."),n(),i(79,"th",32),l(80,"Nama Produk"),n(),i(81,"th",33),l(82,"SKU"),n(),i(83,"th",34),l(84,"Qty"),n()()(),i(85,"tbody"),f(86,Zt,10,6,"tr",35),n()()()()()),a&2&&(o(6),d("src",t.marketplaceLogo,O),o(3),u(t.logistic==null?null:t.logistic.Service),o(2),d("src",t.shippingLogo,O),o(7),I(" ",(t.shippingLabel==null?null:t.shippingLabel.ChannelType)==(t.channelType==null?null:t.channelType.Tokopedia)?"Kode Booking: ":"No. Resi: "," "),o(2),u(t.logistic==null?null:t.logistic.Resi_Number),o(3),d("id","RESI"+t.id),o(9),u(t.recipient==null?null:t.recipient.Name),o(5),I(" ",t.recipient==null?null:t.recipient.Address," "),o(7),u(t.store==null?null:t.store.Name),o(2),u(t.store==null?null:t.store.Phone),o(2),I(" ",t.store==null?null:t.store.Address," "),o(2),d("ngIf",(t.recipient==null?null:t.recipient.City)&&(t.recipient==null?null:t.recipient.District)),o(11),d("ngIf",t.shippingLabel==null?null:t.shippingLabel.Weight),o(5),I("Rp. ",t.shippingLabel!=null&&t.shippingLabel.IsCOD?M(67,18,t.shippingLabel==null||t.shippingLabel.SummaryPrice==null?null:t.shippingLabel.SummaryPrice.Total):0,""),o(2),d("ngIf",(t.logistic==null?null:t.logistic.Batas_kirim)&&(t.logistic==null?null:t.logistic.Batas_kirim)!==t.minDate),o(),d("ngIf",t.shippingLabel==null?null:t.shippingLabel.OrderNumber),o(2),d("id","NO"+t.id),o(15),d("ngForOf",t.products))},dependencies:[he,A,F,W,V],styles:[".table[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]{border:none!important}.table[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{text-transform:capitalize;padding:4px!important}.table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{border:none!important;padding:2px 2px 2px 5px!important;font-size:10px}.table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%]{border-bottom:1px solid rgba(0,0,0,.4509803922)}.label-container[_ngcontent-%COMP%]{width:465px;float:left}hr[_ngcontent-%COMP%]{opacity:.8;margin:0}"]})}}return r})();var ei=()=>["/menu/Order/detail"],ti=(r,c)=>({Number:r,Outlet:c});function ii(r,c){if(r&1){let e=D();P(0),i(1,"button",21),v("click",function(){g(e);let t=s();return h(t.onPrintMultipleShippingLabel())}),S(2,"i",22),i(3,"span"),l(4,"Print Shipping Label"),n()(),E()}}function ni(r,c){if(r&1&&(i(0,"span",23),S(1,"img",24),n(),l(2)),r&2){let e=c.item;o(),d("src",e==null?null:e.Img,O)("alt",e.Name),o(),I(" ",e.Name," ")}}function ai(r,c){if(r&1){let e=D();P(0),i(1,"input",31),y("ngModelChange",function(t){g(e);let m=s().$implicit;return b(m.Selected,t)||(m.Selected=t),h(t)}),v("ngModelChange",function(){g(e);let t=s(3).ngIf,m=s();return h(m.onSelectReadyToShip(t))}),n(),E()}if(r&2){let e=s().$implicit;o(),C("ngModel",e.Selected)}}function ri(r,c){if(r&1&&(i(0,"a",44),l(1),n()),r&2){let e=s().$implicit;d("routerLink",K(3,ei))("queryParams",pe(4,ti,e.Number,e.Outlet)),o(),u(e.Number)}}function oi(r,c){if(r&1&&(i(0,"a",45),l(1),n()),r&2){let e=s().$implicit,a=s(3);d("href",a.domain+e.ID,O),o(),u(e.Number)}}function li(r,c){if(r&1){let e=D();i(0,"a",46),v("click",function(){g(e);let t=s().$implicit,m=s(3);return h(m.onPrintShippingLabel(t.Number,t.ShopID,t.TypeID))}),S(1,"i",47),n()}}function pi(r,c){if(r&1&&(i(0,"tr")(1,"td"),f(2,ai,2,1,"ng-container",4),n(),i(3,"td"),l(4),n(),i(5,"td"),f(6,ri,2,7,"a",39)(7,oi,2,2,"a",40),n(),i(8,"td"),l(9),n(),i(10,"td"),l(11),T(12,"number"),n(),i(13,"td"),l(14),T(15,"date"),n(),i(16,"td"),S(17,"app-channel-logo",41),n(),i(18,"td",42),f(19,li,2,0,"a",43),n()()),r&2){let e=c.$implicit,a=s(3);o(2),d("ngIf",e.TypeID==a.channelType.Shopee||e.TypeID==a.channelType.Tokopedia||e.TypeID==a.channelType.Tiktok),o(2),u(e.Outlet),o(2),d("ngIf",a.guidEmpty==e.ID),o(),d("ngIf",a.guidEmpty!=e.ID),o(2),u(e.Customer),o(2),u(M(12,9,e.Amount)),o(3),u(k(15,11,e.Date,"dd MMM yyyy")),o(3),d("typeId",e.TypeID),o(2),d("ngIf",e.TypeID==a.channelType.Shopee||e.TypeID==a.channelType.Tokopedia||e.TypeID==a.channelType.Tiktok||e.TypeID==a.channelType.Lazada)}}function mi(r,c){if(r&1){let e=D();P(0),i(1,"div",26)(2,"table",27),v("matSortChange",function(t){g(e);let m=s(2);return h(m.onSort(t))}),i(3,"thead",28)(4,"tr",29)(5,"th",30)(6,"input",31),y("ngModelChange",function(t){g(e);let m=s(2);return b(m.isCheckAll,t)||(m.isCheckAll=t),h(t)}),v("ngModelChange",function(){g(e);let t=s().ngIf,m=s();return h(m.onSelectAllReadyToShip(t))}),n()(),i(7,"th",32),l(8,"Outlet"),n(),i(9,"th",33),l(10,"Order number"),n(),i(11,"th"),l(12,"Customer"),n(),i(13,"th",34),l(14,"Amount"),n(),i(15,"th",35),l(16,"Date"),n(),i(17,"th",36),l(18,"Channel"),n(),S(19,"th",37),n()(),i(20,"tbody"),f(21,pi,20,14,"tr",20),n()(),i(22,"app-mat-paginator-no-count",38),T(23,"async"),T(24,"async"),v("total",function(){g(e);let t=s(2);return h(t.getRowCount())})("next",function(){g(e);let t=s(2);return h(t.NextPage())})("previous",function(){g(e);let t=s(2);return h(t.PreviousPage())}),n()(),E()}if(r&2){let e,a=s().ngIf,t=s();o(6),C("ngModel",t.isCheckAll),o(15),d("ngForOf",a),o(),d("filter",t.filter)("totaldata",(e=M(23,5,t.readyToShip$))==null?null:e.length)("paginationTotal",M(24,7,t.paginationTotal$))}}function di(r,c){if(r&1&&(P(0),f(1,mi,25,9,"ng-container",25),E()),r&2){let e=c.ngIf;s();let a=U(35);o(),d("ngIf",e.length>0)("ngIfElse",a)}}function si(r,c){r&1&&(i(0,"div",48),S(1,"app-empty-state"),n())}function ci(r,c){r&1&&(P(0),i(1,"div",50),l(2,"\xA0"),n(),E())}function gi(r,c){if(r&1&&(P(0),S(1,"app-shipping-label",49),f(2,ci,3,0,"ng-container",4),E()),r&2){let e=c.$implicit,a=c.index,t=s();o(),d("shippingLabel",e)("id",a),o(),d("ngIf",a!==(t.shippingLabels==null?null:t.shippingLabels.length)-1)}}var Tt=(()=>{class r{constructor(e,a,t,m,_,p){this.http=e,this.localDataService=a,this.dialog=t,this.shippingLabelService=m,this.datePipe=_,this.authService=p,this.filter={PageNumber:null,PageSize:null,ListChannelID:[],From:null,To:null},this.channelType=w,this.guidEmpty=N.GuidEMpty,this.selectedReadyToShip=[],this.isCheckAll=!1,this.channelOptions=this.authService.getChannels()}ngOnInit(){this.Load()}Load(){this.http.post("/api/ordersLoader/GetOrder",{}).subscribe(e=>{this.filter.PageNumber=e.Filter.PageNumber,this.filter.PageSize=e.Filter.RowCount,this.filter.From=e.Filter.From,this.filter.To=e.Filter.To,this.domain=`https://${this.localDataService.getHostName()}/menu/Orders/Orders/Customer_Invoice/Info?ID=`,this.getReadyToShip()})}getReadyToShip(e){var a={Number:e,PageNumber:this.filter.PageNumber,PageSize:this.filter.PageSize,ListChannelID:this.filter.ListChannelID,From:this.filter.From,To:this.filter.To};this.sourceObs$=this.http.post("api/orders/GetReadyToShip",a).pipe(J(t=>t.Data),be(1)),this.readyToShip$=this.sourceObs$}onPrintMultipleShippingLabel(){let e=this.filterReadyToShipByChannel(this.selectedReadyToShip,w.Tokopedia),a=this.filterReadyToShipByChannel(this.selectedReadyToShip,w.Shopee),t=this.filterReadyToShipByChannel(this.selectedReadyToShip,w.Tiktok),m=[];e.length>0&&m.push(this.shippingLabelService.getTokopediaShippingLabel(this.shippingLabelPayload(e))),a.length>0&&m.push(this.shippingLabelService.getShopeeShippingLabel(this.shippingLabelPayload(a))),t.length>0&&m.push(this.shippingLabelService.getTiktokShippingLabel(this.shippingLabelPayload(t))),qe(m).pipe(J(_=>_.reduce((p,ze)=>p.concat(ze),[]))).subscribe({next:_=>{this.shippingLabels=_,this.printShippingLabel()}})}filterReadyToShipByChannel(e,a){return e.filter(t=>t.TypeID==a)}shippingLabelPayload(e){return e.map(a=>({ShopID:a.ShopID,OrderNumber:a.Number}))}printShippingLabel(){setTimeout(()=>{this.setPdfname(),window.print()},500)}onPrintShippingLabel(e,a,t){switch(t){case w.Tokopedia:this.shippingLabelService.printShippingLabelTokopedia(e);break;case w.Tiktok:this.shippingLabelService.printShippingLabelTiktok(e,a);break;case w.Shopee:this.shippingLabelService.printShippingLabelShopee(e,a);break;case w.Lazada:this.shippingLabelService.printShippingLabelLazada(e,a);break}}setPdfname(){if(this.selectedReadyToShip.length>1){let e=new Date,a=this.datePipe.transform(e,"dd-MM-yyyy"),t=this.datePipe.transform(e,"HH-mm");document.title=`ShippingLabel_${a}_${t}`}else{let e=this.selectedReadyToShip[0].Number;document.title=`ShippingLabel_${e}`}}getSelectedReadyToShip(e){return e.filter(a=>a.Selected)}getRowCount(){var e={PaymentState:"Unpaid",DeliveryState:"Unsent",ListChannelID:this.filter.ListChannelID,From:this.filter.From,To:this.filter.To};this.paginationTotal$=this.http.post("api/orders/GetRowCount",e).pipe(J(a=>a?.Total))}NextPage(){this.filter.PageNumber=this.filter.PageNumber+1,this.getReadyToShip()}PreviousPage(){this.filter.PageNumber=this.filter.PageNumber-1,this.getReadyToShip()}onSort(e){if(e.direction==""){this.readyToShip$=this.sourceObs$;return}if(e.active=="date"){let a=e.direction=="asc";this.readyToShip$=this.readyToShip$.pipe(J(t=>t.sort((m,_)=>N.compare(m.Date,_.Date,a))))}}onSelectReadyToShip(e){this.selectedReadyToShip=this.getSelectedReadyToShip(e)}onSelectAllReadyToShip(e){e=e.map(a=>((a.TypeID==w.Tokopedia||a.TypeID==w.Shopee||a.TypeID==w.Lazada)&&(a.Selected=this.isCheckAll),a)),this.selectedReadyToShip=this.getSelectedReadyToShip(e)}static{this.\u0275fac=function(a){return new(a||r)(x(R),x(me),x(ue),x(We),x(V),x($))}}static{this.\u0275cmp=L({type:r,selectors:[["app-ready-to-ship"]],standalone:!1,decls:38,vars:13,consts:[["EMPTY_STATE",""],["headerTitle","2 - Ready to Ship","searchBoxPlaceHolder","Search ...",3,"onSubmit"],["href","https://ods.dealpos.app","target","_blank",1,"btn","btn-outline-secondary","shadow","rounded","ms-2"],[1,"fa-solid","fa-clipboard-list","me-3"],[4,"ngIf"],[1,"fw-bold","mb-2"],["appendTo","body","bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"ngModelChange","clearable","multiple","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],[1,"mt-5"],[1,"fw-bold"],["type","number","name","PageNumber",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["type","number","name","PageSize",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid","mt-3","d-print-none"],[1,"row"],[1,"col-md-12"],[1,"print_containers"],[4,"ngFor","ngForOf"],[1,"btn","btn-outline-secondary","shadow","rounded","me-3",3,"click"],[1,"fa-solid","fa-print","me-3"],[1,"me-2"],[2,"width","18px",3,"src","alt"],[4,"ngIf","ngIfElse"],[1,"table-responsive"],["matSort","",1,"table","table-hover",3,"matSortChange"],[1,"sticky-top-thead"],[1,"table-light"],[2,"width","5px"],["type","checkbox",3,"ngModelChange","ngModel"],[2,"width","120px"],[2,"width","220px"],[2,"width","100px"],["mat-sort-header","date",2,"width","130px"],[2,"width","114px"],[2,"width","10px"],[3,"total","next","previous","filter","totaldata","paginationTotal"],[3,"routerLink","queryParams",4,"ngIf"],["target","_blank",3,"href",4,"ngIf"],[3,"typeId"],[1,"text-center","text-primary"],["title","Print shipping label",3,"click",4,"ngIf"],[3,"routerLink","queryParams"],["target","_blank",3,"href"],["title","Print shipping label",3,"click"],[1,"fa-solid","fa-print","fs-3","cursor"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[3,"shippingLabel","id"],[1,"page-break"]],template:function(a,t){if(a&1){let m=D();i(0,"mainpanel",1),v("onSubmit",function(p){return g(m),h(t.getReadyToShip(p))}),i(1,"actions")(2,"a",2),S(3,"i",3),i(4,"span"),l(5,"Visit our Fulfillment Display System"),n()(),f(6,ii,5,0,"ng-container",4),n(),i(7,"filters")(8,"div")(9,"label",5),l(10,"Channel"),n(),i(11,"ng-select",6),y("ngModelChange",function(p){return g(m),b(t.filter.ListChannelID,p)||(t.filter.ListChannelID=p),h(p)}),f(12,ni,3,3,"ng-template",7),n()(),i(13,"div",8)(14,"label",9),l(15,"Page Number"),n(),i(16,"input",10),y("ngModelChange",function(p){return g(m),b(t.filter.PageNumber,p)||(t.filter.PageNumber=p),h(p)}),n()(),i(17,"div",8)(18,"label",9),l(19,"Page Size"),n(),i(20,"input",11),y("ngModelChange",function(p){return g(m),b(t.filter.PageSize,p)||(t.filter.PageSize=p),h(p)}),n()(),i(21,"div",8)(22,"label",12),l(23,"From/To"),n(),i(24,"div",13)(25,"datepicker",14),y("dateChange",function(p){return g(m),b(t.filter.From,p)||(t.filter.From=p),h(p)}),n()(),i(26,"div")(27,"datepicker",15),y("dateChange",function(p){return g(m),b(t.filter.To,p)||(t.filter.To=p),h(p)}),n()()()(),i(28,"content")(29,"div",16)(30,"div",17)(31,"div",18),f(32,di,2,2,"ng-container",4),T(33,"async"),f(34,si,2,0,"ng-template",null,0,q),n()()()()(),i(36,"div",19),f(37,gi,3,3,"ng-container",20),n()}a&2&&(o(6),d("ngIf",t.selectedReadyToShip.length>0),o(5),d("clearable",!0)("multiple",!0)("items",t.channelOptions),C("ngModel",t.filter.ListChannelID),o(5),C("ngModel",t.filter.PageNumber),o(4),C("ngModel",t.filter.PageSize),o(5),C("date",t.filter.From),o(2),C("date",t.filter.To),o(5),d("ngIf",M(33,11,t.readyToShip$)),o(5),d("ngForOf",t.shippingLabels))},dependencies:[A,F,Q,Z,ke,B,z,G,X,ie,ee,te,j,re,oe,ne,ae,H,Be,Oe,W,V],styles:[".print_containers[_ngcontent-%COMP%]{display:none}@media print{.print_containers[_ngcontent-%COMP%]{display:block}}@media print{.page-break[_ngcontent-%COMP%]{page-break-after:always}}"]})}}return r})();var hi=()=>["/menu/Order/detail"],ui=(r,c)=>({Number:r,Outlet:c});function _i(r,c){if(r&1&&(i(0,"span",19),S(1,"img",20),n(),l(2)),r&2){let e=c.item;o(),d("src",e==null?null:e.Img,O)("alt",e.Name),o(),I(" ",e.Name," ")}}function fi(r,c){if(r&1&&(i(0,"a",35),l(1),n()),r&2){let e=s().$implicit;d("routerLink",K(3,hi))("queryParams",pe(4,ui,e.Number,e.Outlet)),o(),u(e.Number)}}function Si(r,c){if(r&1&&(i(0,"a",36),l(1),n()),r&2){let e=s().$implicit,a=s(2);d("href",a.domain+e.ID,O),o(),u(e.Number)}}function Ci(r,c){if(r&1&&(i(0,"tr")(1,"td"),l(2),n(),i(3,"td"),f(4,fi,2,7,"a",32)(5,Si,2,2,"a",33),n(),i(6,"td"),l(7),n(),i(8,"td"),l(9),T(10,"number"),n(),i(11,"td"),l(12),T(13,"date"),n(),i(14,"td"),S(15,"app-channel-logo",34),n()()),r&2){let e=c.$implicit,a=s(2);o(2),u(e.Outlet),o(2),d("ngIf",a.hasGuidEmpty(e.ID)),o(),d("ngIf",!a.hasGuidEmpty(e.ID)),o(2),u(e.Customer),o(2),u(M(10,7,e.Amount)),o(3),u(k(13,9,e.Created,"dd MMM yyyy HH:mm")),o(3),d("typeId",e.TypeID)}}function bi(r,c){if(r&1){let e=D();P(0),i(1,"div",21)(2,"table",22),v("matSortChange",function(t){g(e);let m=s();return h(m.onSort(t))}),i(3,"thead",23)(4,"tr",24)(5,"th",25),l(6,"Outlet"),n(),i(7,"th",26),l(8,"Order number"),n(),i(9,"th"),l(10,"Customer"),n(),i(11,"th",27),l(12,"Amount"),n(),i(13,"th",28),l(14," Created On "),n(),i(15,"th",29),l(16,"Channel"),n()()(),i(17,"tbody"),f(18,Ci,16,12,"tr",30),n()(),i(19,"app-mat-paginator-no-count",31),v("total",function(){g(e);let t=s();return h(t.StoreRowsCountAPIResult())})("next",function(){g(e);let t=s();return h(t.NextPage())})("previous",function(){g(e);let t=s();return h(t.PreviousPage())}),n()(),E()}if(r&2){let e=s();o(18),d("ngForOf",e.data),o(),d("filter",e.filter)("totaldata",e.totaldata)("paginationTotal",e.paginationTotal)}}function yi(r,c){r&1&&(i(0,"div",37),S(1,"app-empty-state"),n())}var wt=(()=>{class r{constructor(e,a,t){this.http=e,this.localDataService=a,this.authService=t,this.filter={PageNumber:null,PageSize:null,ListChannelID:[],From:null,To:null},this.totaldata=0,this.paginationTotal=0,this.channelType=w,this.channelOptions=this.authService.getChannels()}ngOnInit(){this.Load()}Load(){this.http.post("/api/ordersLoader/GetOrder",{}).subscribe(e=>{this.filter.PageNumber=e.Filter.PageNumber,this.filter.PageSize=e.Filter.RowCount,this.filter.From=e.Filter.From,this.filter.To=e.Filter.To,this.domain=`https://${this.localDataService.getHostName()}/menu/Orders/Orders/Customer_Invoice/Info?ID=`,this.Get()})}hasGuidEmpty(e){return e==N.GuidEMpty}Get(e){var a={Number:e,PageNumber:this.filter.PageNumber,PageSize:this.filter.PageSize,ListChannelID:this.filter.ListChannelID,From:this.filter.From,To:this.filter.To};this.http.post("api/orders/GetShipped",a).subscribe(t=>{this.data=t.Data,this.sourceData=[...t.Data],this.totaldata=this.data.length})}changePage(e){this.filter.PageNumber=e.pageIndex+1,this.Get()}StoreRowsCountAPIResult(){var e={PaymentState:"Unpaid",DeliveryState:"Sent",ListChannelID:this.filter.ListChannelID,From:this.filter.From,To:this.filter.To};this.http.post("api/orders/GetRowCount",e).subscribe(a=>{this.paginationTotal=a.Total})}NextPage(){this.filter.PageNumber=this.filter.PageNumber+1,this.Get()}PreviousPage(){this.filter.PageNumber=this.filter.PageNumber-1,this.Get()}onSort(e){if(e.direction==""){this.data=this.sourceData;return}if(e.active=="created"){let a=e.direction=="asc";this.data=this.data.sort((t,m)=>N.compare(t.Created,m.Created,a))}}static{this.\u0275fac=function(a){return new(a||r)(x(R),x(me),x($))}}static{this.\u0275cmp=L({type:r,selectors:[["app-shipped"]],standalone:!1,decls:34,vars:10,consts:[["EMPTY_STATE",""],["headerTitle","3 - Shipped","searchBoxPlaceHolder","Search ...",3,"onSubmit"],["href","https://ods.dealpos.app","target","_blank",1,"btn","btn-outline-secondary","shadow","rounded","ms-2"],[1,"fa-solid","fa-clipboard-list","me-3"],[1,"fw-bold","mb-2"],["appendTo","body","bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"ngModelChange","clearable","multiple","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],[1,"mt-5"],[1,"fw-bold"],["type","number","name","PageNumber",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["type","number","name","PageSize",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[4,"ngIf","ngIfElse"],[1,"me-2"],[2,"width","18px",3,"src","alt"],[1,"table-responsive"],["matSort","",1,"table","table-hover",3,"matSortChange"],[1,"sticky-top-thead"],[1,"table-light"],[2,"width","120px"],[2,"width","220px"],[2,"width","100px"],["mat-sort-header","created",2,"width","130px"],[2,"width","130px"],[4,"ngFor","ngForOf"],[3,"total","next","previous","filter","totaldata","paginationTotal"],[3,"routerLink","queryParams",4,"ngIf"],["target","_blank",3,"href",4,"ngIf"],[3,"typeId"],[3,"routerLink","queryParams"],["target","_blank",3,"href"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"]],template:function(a,t){if(a&1){let m=D();i(0,"mainpanel",1),v("onSubmit",function(p){return g(m),h(t.Get(p))}),i(1,"actions")(2,"a",2),S(3,"i",3),i(4,"span"),l(5,"Visit our Fulfillment Display System"),n()()(),i(6,"filters")(7,"div")(8,"label",4),l(9,"Channel"),n(),i(10,"ng-select",5),y("ngModelChange",function(p){return g(m),b(t.filter.ListChannelID,p)||(t.filter.ListChannelID=p),h(p)}),f(11,_i,3,3,"ng-template",6),n()(),i(12,"div",7)(13,"label",8),l(14,"Page Number"),n(),i(15,"input",9),y("ngModelChange",function(p){return g(m),b(t.filter.PageNumber,p)||(t.filter.PageNumber=p),h(p)}),n()(),i(16,"div",7)(17,"label",8),l(18,"Page Size"),n(),i(19,"input",10),y("ngModelChange",function(p){return g(m),b(t.filter.PageSize,p)||(t.filter.PageSize=p),h(p)}),n()(),i(20,"div",7)(21,"label",11),l(22,"From/To"),n(),i(23,"div",12)(24,"datepicker",13),y("dateChange",function(p){return g(m),b(t.filter.From,p)||(t.filter.From=p),h(p)}),n()(),i(25,"div")(26,"datepicker",14),y("dateChange",function(p){return g(m),b(t.filter.To,p)||(t.filter.To=p),h(p)}),n()()()(),i(27,"content")(28,"div",15)(29,"div",16)(30,"div",17),f(31,bi,20,4,"ng-container",18)(32,yi,2,0,"ng-template",null,0,q),n()()()()()}if(a&2){let m=U(33);o(10),d("clearable",!0)("multiple",!0)("items",t.channelOptions),C("ngModel",t.filter.ListChannelID),o(5),C("ngModel",t.filter.PageNumber),o(4),C("ngModel",t.filter.PageSize),o(5),C("date",t.filter.From),o(2),C("date",t.filter.To),o(5),d("ngIf",t.data&&t.data.length>0)("ngIfElse",m)}},dependencies:[A,F,Q,Z,B,z,G,X,ie,ee,te,j,re,oe,ne,ae,H,W,V],encapsulation:2})}}return r})();var vi=()=>["/menu/Order/detail"],xi=(r,c)=>({Number:r,Outlet:c});function Ti(r,c){if(r&1&&(i(0,"span",19),S(1,"img",20),n(),l(2)),r&2){let e=c.item;o(),d("src",e==null?null:e.Img,O)("alt",e.Name),o(),I(" ",e.Name," ")}}function wi(r,c){if(r&1&&(i(0,"a",35),l(1),n()),r&2){let e=s().$implicit;d("routerLink",K(3,vi))("queryParams",pe(4,xi,e.Number,e.Outlet)),o(),u(e.Number)}}function Pi(r,c){if(r&1&&(i(0,"a",36),l(1),n()),r&2){let e=s().$implicit,a=s(2);d("href",a.customerInfoUrl+e.ID,O),o(),u(e.Number)}}function Ei(r,c){if(r&1&&(i(0,"tr")(1,"td"),l(2),n(),i(3,"td"),f(4,wi,2,7,"a",32)(5,Pi,2,2,"a",33),n(),i(6,"td"),l(7),n(),i(8,"td"),l(9),T(10,"number"),n(),i(11,"td"),l(12),T(13,"date"),n(),i(14,"td"),S(15,"app-channel-logo",34),n()()),r&2){let e=c.$implicit,a=s(2);o(2),u(e.Outlet),o(2),d("ngIf",a.hasGuidEmpty(e.ID)),o(),d("ngIf",!a.hasGuidEmpty(e.ID)),o(2),u(e.Customer),o(2),u(M(10,7,e.Amount)),o(3),u(k(13,9,e.Created,"dd MMM yyyy HH:mm")),o(3),d("typeId",e.TypeID)}}function Ii(r,c){if(r&1){let e=D();P(0),i(1,"div",21)(2,"table",22),v("matSortChange",function(t){g(e);let m=s();return h(m.onSort(t))}),i(3,"thead",23)(4,"tr",24)(5,"th",25),l(6,"Outlet"),n(),i(7,"th",26),l(8,"Order number"),n(),i(9,"th"),l(10,"Customer"),n(),i(11,"th",27),l(12,"Amount"),n(),i(13,"th",28),l(14," Created On "),n(),i(15,"th",29),l(16,"Channel"),n()()(),i(17,"tbody"),f(18,Ei,16,12,"tr",30),n()(),i(19,"app-mat-paginator-no-count",31),v("total",function(){g(e);let t=s();return h(t.StoreRowsCountAPIResult())})("next",function(){g(e);let t=s();return h(t.NextPage())})("previous",function(){g(e);let t=s();return h(t.PreviousPage())}),n()(),E()}if(r&2){let e=s();o(18),d("ngForOf",e.data),o(),d("filter",e.filter)("totaldata",e.totaldata)("paginationTotal",e.paginationTotal)}}function Ni(r,c){r&1&&(i(0,"div",37),S(1,"app-empty-state"),n())}var Pt=(()=>{class r{constructor(e,a){this.http=e,this.authService=a,this.filter={PageNumber:null,PageSize:null,ListChannelID:[],From:null,To:null},this.totaldata=0,this.paginationTotal=0,this.channelType=w,this.channelOptions=this.authService.getChannels()}ngOnInit(){this.Load()}hasGuidEmpty(e){return e==N.GuidEMpty}getChannelLogo(e){return N.getChannelLogoByTypeId(e)}Load(){this.http.post("/api/ordersLoader/GetOrder",{}).subscribe(e=>{this.filter.PageNumber=e.Filter.PageNumber,this.filter.PageSize=e.Filter.RowCount,this.filter.From=e.Filter.From,this.filter.To=e.Filter.To,this.customerInfoUrl=`${this.authService.getDomain()}/menu/Orders/Orders/Customer_Invoice/Info?ID=`,this.Get()})}Get(e){var a={Number:e,PageNumber:this.filter.PageNumber,PageSize:this.filter.PageSize,ListChannelID:this.filter.ListChannelID,From:this.filter.From,To:this.filter.To};this.http.post("api/orders/GetDelivered ",a).subscribe(t=>{this.data=t.Data,this.sourceData=[...t.Data],this.totaldata=this.data.length})}changePage(e){this.filter.PageNumber=e.pageIndex+1,this.Get()}StoreRowsCountAPIResult(){var e={PaymentState:"Paid",DeliveryState:"Sent",ListChannelID:this.filter.ListChannelID,From:this.filter.From,To:this.filter.To};this.http.post("api/orders/GetRowCount",e).subscribe(a=>{this.paginationTotal=a.Total})}NextPage(){this.filter.PageNumber=this.filter.PageNumber+1,this.Get()}PreviousPage(){this.filter.PageNumber=this.filter.PageNumber-1,this.Get()}onSort(e){if(e.direction==""){this.data=this.sourceData;return}if(e.active=="created"){let a=e.direction=="asc";this.data=this.data.sort((t,m)=>N.compare(t.Created,m.Created,a))}}static{this.\u0275fac=function(a){return new(a||r)(x(R),x($))}}static{this.\u0275cmp=L({type:r,selectors:[["app-delivered"]],standalone:!1,decls:34,vars:10,consts:[["EMPTY_STATE",""],["headerTitle","4 - Completed","searchBoxPlaceHolder","Search ...",3,"onSubmit"],["href","https://ods.dealpos.app","target","_blank",1,"btn","btn-outline-secondary","shadow","rounded","ms-2"],[1,"fa-solid","fa-clipboard-list","me-3"],[1,"fw-bold","mb-2"],["appendTo","body","bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"ngModelChange","clearable","multiple","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],[1,"mt-5"],[1,"fw-bold"],["type","number","name","PageNumber",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["type","number","name","PageSize",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[4,"ngIf","ngIfElse"],[1,"me-2"],[2,"width","18px",3,"src","alt"],[1,"table-responsive"],["matSort","",1,"table","table-hover",3,"matSortChange"],[1,"sticky-top-thead"],[1,"table-light"],[2,"width","120px"],[2,"width","220px"],[2,"width","100px"],["mat-sort-header","created",2,"width","130px"],[2,"width","130px"],[4,"ngFor","ngForOf"],[3,"total","next","previous","filter","totaldata","paginationTotal"],[3,"routerLink","queryParams",4,"ngIf"],["target","_blank",3,"href",4,"ngIf"],[3,"typeId"],[3,"routerLink","queryParams"],["target","_blank",3,"href"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"]],template:function(a,t){if(a&1){let m=D();i(0,"mainpanel",1),v("onSubmit",function(p){return g(m),h(t.Get(p))}),i(1,"actions")(2,"a",2),S(3,"i",3),i(4,"span"),l(5,"Visit our Fulfillment Display System"),n()()(),i(6,"filters")(7,"div")(8,"label",4),l(9,"Channel"),n(),i(10,"ng-select",5),y("ngModelChange",function(p){return g(m),b(t.filter.ListChannelID,p)||(t.filter.ListChannelID=p),h(p)}),f(11,Ti,3,3,"ng-template",6),n()(),i(12,"div",7)(13,"label",8),l(14,"Page Number"),n(),i(15,"input",9),y("ngModelChange",function(p){return g(m),b(t.filter.PageNumber,p)||(t.filter.PageNumber=p),h(p)}),n()(),i(16,"div",7)(17,"label",8),l(18,"Page Size"),n(),i(19,"input",10),y("ngModelChange",function(p){return g(m),b(t.filter.PageSize,p)||(t.filter.PageSize=p),h(p)}),n()(),i(20,"div",7)(21,"label",11),l(22,"From/To"),n(),i(23,"div",12)(24,"datepicker",13),y("dateChange",function(p){return g(m),b(t.filter.From,p)||(t.filter.From=p),h(p)}),n()(),i(25,"div")(26,"datepicker",14),y("dateChange",function(p){return g(m),b(t.filter.To,p)||(t.filter.To=p),h(p)}),n()()()(),i(27,"content")(28,"div",15)(29,"div",16)(30,"div",17),f(31,Ii,20,4,"ng-container",18)(32,Ni,2,0,"ng-template",null,0,q),n()()()()()}if(a&2){let m=U(33);o(10),d("clearable",!0)("multiple",!0)("items",t.channelOptions),C("ngModel",t.filter.ListChannelID),o(5),C("ngModel",t.filter.PageNumber),o(4),C("ngModel",t.filter.PageSize),o(5),C("date",t.filter.From),o(2),C("date",t.filter.To),o(5),d("ngIf",t.data&&t.data.length>0)("ngIfElse",m)}},dependencies:[A,F,Q,Z,B,z,G,X,ie,ee,te,j,re,oe,ne,ae,H,W,V],encapsulation:2})}}return r})();var Di=()=>["/menu/Order/detail"],Mi=(r,c)=>({Number:r,Outlet:c});function Oi(r,c){if(r&1&&(i(0,"span",21),S(1,"img",22),n(),l(2)),r&2){let e=c.item;o(),d("src",e==null?null:e.Img,O)("alt",e.Name),o(),I(" ",e.Name," ")}}function Li(r,c){if(r&1&&(i(0,"a",38),l(1),n()),r&2){let e=s().$implicit;d("routerLink",K(3,Di))("queryParams",pe(4,Mi,e.Number,e.Outlet)),o(),u(e.Number)}}function ki(r,c){if(r&1&&(i(0,"a",39),l(1),n()),r&2){let e=s().$implicit,a=s(2);d("href",a.domain+e.ID,O),o(),u(e.Number)}}function Vi(r,c){if(r&1&&(i(0,"tr")(1,"td"),l(2),n(),i(3,"td"),f(4,Li,2,7,"a",35)(5,ki,2,2,"a",36),n(),i(6,"td"),l(7),n(),i(8,"td"),l(9),T(10,"number"),n(),i(11,"td"),l(12),T(13,"date"),n(),i(14,"td"),l(15),n(),i(16,"td"),S(17,"app-channel-logo",37),n()()),r&2){let e=c.$implicit,a=s(2);o(2),u(e.Outlet),o(2),d("ngIf",a.hasGuidEmpty(e.ID)),o(),d("ngIf",!a.hasGuidEmpty(e.ID)),o(2),u(e.Customer),o(2),u(M(10,8,e.Amount)),o(3),u(k(13,10,e.Created,"dd MMM yyyy HH:mm")),o(3),u(e.State),o(2),d("typeId",e.TypeID)}}function Ai(r,c){if(r&1){let e=D();P(0),i(1,"div",23)(2,"table",24),v("matSortChange",function(t){g(e);let m=s();return h(m.onSort(t))}),i(3,"thead",25)(4,"tr",26)(5,"th",27),l(6,"Outlet"),n(),i(7,"th",28),l(8,"Order number"),n(),i(9,"th"),l(10,"Customer"),n(),i(11,"th",29),l(12,"Amount"),n(),i(13,"th",30),l(14," Created On "),n(),i(15,"th",31),l(16,"Status"),n(),i(17,"th",32),l(18,"Channel"),n()()(),i(19,"tbody"),f(20,Vi,18,13,"tr",33),n()(),i(21,"app-mat-paginator-no-count",34),v("total",function(){g(e);let t=s();return h(t.StoreRowsCountAPIResult())})("next",function(){g(e);let t=s();return h(t.NextPage())})("previous",function(){g(e);let t=s();return h(t.PreviousPage())}),n()(),E()}if(r&2){let e=s();o(20),d("ngForOf",e.data),o(),d("filter",e.filter)("totaldata",e.totaldata)("paginationTotal",e.paginationTotal)}}function Fi(r,c){r&1&&(i(0,"div",40),S(1,"app-empty-state"),n())}var Et=(()=>{class r{constructor(e,a,t,m){this.http=e,this.localDataService=a,this.authService=t,this.dialog=m,this.filter={PageNumber:null,PageSize:null,ListChannelID:[],From:null,To:null},this.totaldata=0,this.paginationTotal=0,this.channelOptions=this.authService.getChannels()}ngOnInit(){this.Load()}hasGuidEmpty(e){return e==N.GuidEMpty}Load(){this.http.post("/api/ordersLoader/GetOrder",{}).subscribe(e=>{this.filter.PageNumber=e.Filter.PageNumber,this.filter.PageSize=e.Filter.RowCount,this.filter.From=e.Filter.From,this.filter.To=e.Filter.To,this.domain=`https://${this.localDataService.getHostName()}/menu/Orders/Orders/Customer_Invoice/Info?ID=`,this.Get()})}Get(e){var a={Number:e,PageNumber:this.filter.PageNumber,PageSize:this.filter.PageSize,ListChannelID:this.filter.ListChannelID,From:this.filter.From,To:this.filter.To};this.http.post("api/orders/GetAll",a).subscribe(t=>{this.data=t.Data,this.sourceData=[...t.Data],this.totaldata=this.data.length})}openExportDialog(){this.dialog.open(ht,{data:{title:"Export Order All",pageNumber:this.filter.PageNumber,rowCount:this.filter.PageSize,filterExport:this.filter,getRowCountApi:"orders/GetRowCount",exportApi:"orders/GetExportAll"}}).afterClosed().subscribe()}changePage(e){this.filter=e,this.Get()}StoreRowsCountAPIResult(){var e={PaymentState:"",DeliveryState:"",Bin:!1,ListChannelID:this.filter.ListChannelID,From:this.filter.From,To:this.filter.To};this.http.post("api/orders/GetRowCount",e).subscribe(a=>{this.paginationTotal=a.Total})}NextPage(){this.filter.PageNumber=this.filter.PageNumber+1,this.Get()}PreviousPage(){this.filter.PageNumber=this.filter.PageNumber-1,this.Get()}onSort(e){if(e.direction==""){this.data=this.sourceData;return}if(e.active=="created"){let a=e.direction=="asc";this.data=this.data.sort((t,m)=>N.compare(t.Created,m.Created,a))}}static{this.\u0275fac=function(a){return new(a||r)(x(R),x(me),x($),x(ue))}}static{this.\u0275cmp=L({type:r,selectors:[["app-all-order"]],standalone:!1,decls:38,vars:10,consts:[["EMPTY_STATE",""],["headerTitle","All","searchBoxPlaceHolder","Search ...",3,"onSubmit"],["href","https://ods.dealpos.app","target","_blank",1,"btn","btn-outline-secondary","shadow","rounded","ms-2"],[1,"fa-solid","fa-clipboard-list","me-3"],[1,"btn","btn-outline-secondary","shadow","rounded","ms-2",3,"click"],[1,"fa-solid","fa-print","me-3"],[1,"fw-bold","mb-2"],["appendTo","body","bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"ngModelChange","clearable","multiple","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],[1,"mt-5"],[1,"fw-bold"],["type","number","name","PageNumber",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["type","number","name","PageSize",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[4,"ngIf","ngIfElse"],[1,"me-2"],[2,"width","18px",3,"src","alt"],[1,"table-responsive"],["matSort","",1,"table","table-hover",3,"matSortChange"],[1,"sticky-top-thead"],[1,"table-light"],[2,"width","120px"],[2,"width","220px"],[2,"width","100px"],["mat-sort-header","created",2,"width","130px"],[2,"width","135px"],[2,"width","130px"],[4,"ngFor","ngForOf"],[3,"total","next","previous","filter","totaldata","paginationTotal"],[3,"routerLink","queryParams",4,"ngIf"],["target","_blank",3,"href",4,"ngIf"],[3,"typeId"],[3,"routerLink","queryParams"],["target","_blank",3,"href"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"]],template:function(a,t){if(a&1){let m=D();i(0,"mainpanel",1),v("onSubmit",function(p){return g(m),h(t.Get(p))}),i(1,"actions")(2,"a",2),S(3,"i",3),i(4,"span"),l(5,"Visit our Fulfillment Display System"),n()(),i(6,"button",4),v("click",function(){return g(m),h(t.openExportDialog())}),S(7,"i",5),i(8,"span"),l(9,"Export"),n()()(),i(10,"filters")(11,"div")(12,"label",6),l(13,"Channel"),n(),i(14,"ng-select",7),y("ngModelChange",function(p){return g(m),b(t.filter.ListChannelID,p)||(t.filter.ListChannelID=p),h(p)}),f(15,Oi,3,3,"ng-template",8),n()(),i(16,"div",9)(17,"label",10),l(18,"Page Number"),n(),i(19,"input",11),y("ngModelChange",function(p){return g(m),b(t.filter.PageNumber,p)||(t.filter.PageNumber=p),h(p)}),n()(),i(20,"div",9)(21,"label",10),l(22,"Page Size"),n(),i(23,"input",12),y("ngModelChange",function(p){return g(m),b(t.filter.PageSize,p)||(t.filter.PageSize=p),h(p)}),n()(),i(24,"div",9)(25,"label",13),l(26,"From/To"),n(),i(27,"div",14)(28,"datepicker",15),y("dateChange",function(p){return g(m),b(t.filter.From,p)||(t.filter.From=p),h(p)}),n()(),i(29,"div")(30,"datepicker",16),y("dateChange",function(p){return g(m),b(t.filter.To,p)||(t.filter.To=p),h(p)}),n()()()(),i(31,"content")(32,"div",17)(33,"div",18)(34,"div",19),f(35,Ai,22,4,"ng-container",20)(36,Fi,2,0,"ng-template",null,0,q),n()()()()()}if(a&2){let m=U(37);o(14),d("clearable",!0)("multiple",!0)("items",t.channelOptions),C("ngModel",t.filter.ListChannelID),o(5),C("ngModel",t.filter.PageNumber),o(4),C("ngModel",t.filter.PageSize),o(5),C("date",t.filter.From),o(2),C("date",t.filter.To),o(5),d("ngIf",t.data&&t.data.length>0)("ngIfElse",m)}},dependencies:[A,F,Q,Z,B,z,G,X,ie,ee,te,j,re,oe,ne,ae,H,W,V],encapsulation:2})}}return r})();var Ri=()=>["/menu/Order/detail"],Wi=(r,c)=>({Number:r,Outlet:c});function Bi(r,c){if(r&1&&(i(0,"span",20),S(1,"img",21),n(),l(2)),r&2){let e=c.item;o(),d("src",e==null?null:e.Img,O)("alt",e.Name),o(),I(" ",e.Name," ")}}function zi(r,c){if(r&1&&(i(0,"a",36),l(1),n()),r&2){let e=s().$implicit;d("routerLink",K(3,Ri))("queryParams",pe(4,Wi,e.Number,e.Outlet)),o(),u(e.Number)}}function Gi(r,c){if(r&1&&(i(0,"a",37),l(1),n()),r&2){let e=s().$implicit,a=s(2);d("href",a.domain+e.ID,O),o(),u(e.Number)}}function ji(r,c){if(r&1&&(i(0,"tr")(1,"td"),l(2),n(),i(3,"td"),f(4,zi,2,7,"a",33)(5,Gi,2,2,"a",34),n(),i(6,"td"),l(7),n(),i(8,"td"),l(9),T(10,"number"),n(),i(11,"td"),l(12),T(13,"date"),n(),i(14,"td"),S(15,"app-channel-logo",35),n()()),r&2){let e=c.$implicit,a=s(2);o(2),u(e.Outlet),o(2),d("ngIf",a.hasGuidEmpty(e.ID)),o(),d("ngIf",!a.hasGuidEmpty(e.ID)),o(2),u(e.Customer),o(2),u(M(10,7,e.Amount)),o(3),u(k(13,9,e.Created,"dd MMM yyyy HH:mm")),o(3),d("typeId",e.TypeID)}}function Hi(r,c){if(r&1){let e=D();P(0),i(1,"div",22)(2,"table",23),v("matSortChange",function(t){g(e);let m=s();return h(m.onSort(t))}),i(3,"thead",24)(4,"tr",25)(5,"th",26),l(6,"Outlet"),n(),i(7,"th",27),l(8,"Order number"),n(),i(9,"th"),l(10,"Customer"),n(),i(11,"th",28),l(12,"Amount"),n(),i(13,"th",29),l(14," Created On "),n(),i(15,"th",30),l(16,"Channel"),n()()(),i(17,"tbody"),f(18,ji,16,12,"tr",31),n()(),i(19,"app-mat-paginator-no-count",32),v("total",function(){g(e);let t=s();return h(t.StoreRowsCountAPIResult())})("next",function(){g(e);let t=s();return h(t.NextPage())})("previous",function(){g(e);let t=s();return h(t.PreviousPage())}),n()(),E()}if(r&2){let e=s();o(18),d("ngForOf",e.data),o(),d("filter",e.filter)("totaldata",e.totaldata)("paginationTotal",e.paginationTotal)}}function Ui(r,c){r&1&&(i(0,"div",38),S(1,"app-empty-state"),n())}var It=(()=>{class r{constructor(e,a,t){this.http=e,this.localDataService=a,this.authService=t,this.filter={PageNumber:null,PageSize:null,ListChannelID:[],Note:"",From:null,To:null},this.totaldata=0,this.paginationTotal=0,this.channelOptions=this.authService.getChannels()}ngOnInit(){this.Load()}hasGuidEmpty(e){return e==N.GuidEMpty}Load(){this.http.post("/api/ordersLoader/GetOrder",{}).subscribe(e=>{this.filter.PageNumber=e.Filter.PageNumber,this.filter.PageSize=e.Filter.RowCount,this.filter.From=e.Filter.From,this.filter.To=e.Filter.To,this.domain=`https://${this.localDataService.getHostName()}/menu/Orders/Orders/Customer_Invoice/Info?ID=`,this.Get()})}Get(e){var a={Number:e,PageNumber:this.filter.PageNumber,PageSize:this.filter.PageSize,ListChannelID:this.filter.ListChannelID,Note:this.filter.Note,From:this.filter.From,To:this.filter.To};this.http.post("api/orders/GetCancelled ",a).subscribe(t=>{this.data=t.Data,this.sourceData=[...t.Data],this.totaldata=this.data.length})}changePage(e){this.filter.PageNumber=e.pageIndex+1,this.Get()}StoreRowsCountAPIResult(){var e={PaymentState:"",DeliveryState:"",Bin:!0,ListChannelID:this.filter.ListChannelID,From:this.filter.From,To:this.filter.To};this.http.post("api/orders/GetRowCount",e).subscribe(a=>{this.paginationTotal=a.Total})}NextPage(){this.filter.PageNumber=this.filter.PageNumber+1,this.Get()}PreviousPage(){this.filter.PageNumber=this.filter.PageNumber-1,this.Get()}getChannelLogo(e){return N.getChannelLogoByTypeId(e)}onSort(e){if(e.direction==""){this.data=this.sourceData;return}if(e.active=="created"){let a=e.direction=="asc";this.data=this.data.sort((t,m)=>N.compare(t.Created,m.Created,a))}}static{this.\u0275fac=function(a){return new(a||r)(x(R),x(me),x($))}}static{this.\u0275cmp=L({type:r,selectors:[["app-cancelled"]],standalone:!1,decls:38,vars:11,consts:[["EMPTY_STATE",""],["headerTitle","99 - Cancelled","searchBoxPlaceHolder","Search ...",3,"onSubmit"],["href","https://ods.dealpos.app","target","_blank",1,"btn","btn-outline-secondary","shadow","rounded","ms-2"],[1,"fa-solid","fa-clipboard-list","me-3"],[1,"fw-bold","mb-2"],["appendTo","body","bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"ngModelChange","clearable","multiple","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],[1,"mt-5"],[1,"fw-bold"],["type","number","name","PageNumber",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["type","number","name","PageSize",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["type","text","name","Note",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[4,"ngIf","ngIfElse"],[1,"me-2"],[2,"width","18px",3,"src","alt"],[1,"table-responsive"],["matSort","",1,"table","table-hover",3,"matSortChange"],[1,"sticky-top-thead"],[1,"table-light"],[2,"width","120px"],[2,"width","220px"],[2,"width","100px"],["mat-sort-header","created",2,"width","130px"],[2,"width","130px"],[4,"ngFor","ngForOf"],[3,"total","next","previous","filter","totaldata","paginationTotal"],[3,"routerLink","queryParams",4,"ngIf"],["target","_blank",3,"href",4,"ngIf"],[3,"typeId"],[3,"routerLink","queryParams"],["target","_blank",3,"href"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"]],template:function(a,t){if(a&1){let m=D();i(0,"mainpanel",1),v("onSubmit",function(p){return g(m),h(t.Get(p))}),i(1,"actions")(2,"a",2),S(3,"i",3),i(4,"span"),l(5,"Visit our Fulfillment Display System"),n()()(),i(6,"filters")(7,"div")(8,"label",4),l(9,"Channel"),n(),i(10,"ng-select",5),y("ngModelChange",function(p){return g(m),b(t.filter.ListChannelID,p)||(t.filter.ListChannelID=p),h(p)}),f(11,Bi,3,3,"ng-template",6),n()(),i(12,"div",7)(13,"label",8),l(14,"Page Number"),n(),i(15,"input",9),y("ngModelChange",function(p){return g(m),b(t.filter.PageNumber,p)||(t.filter.PageNumber=p),h(p)}),n()(),i(16,"div",7)(17,"label",8),l(18,"Page Size"),n(),i(19,"input",10),y("ngModelChange",function(p){return g(m),b(t.filter.PageSize,p)||(t.filter.PageSize=p),h(p)}),n()(),i(20,"div",7)(21,"label",8),l(22,"Note"),n(),i(23,"input",11),y("ngModelChange",function(p){return g(m),b(t.filter.Note,p)||(t.filter.Note=p),h(p)}),n()(),i(24,"div",7)(25,"label",12),l(26,"From/To"),n(),i(27,"div",13)(28,"datepicker",14),y("dateChange",function(p){return g(m),b(t.filter.From,p)||(t.filter.From=p),h(p)}),n()(),i(29,"div")(30,"datepicker",15),y("dateChange",function(p){return g(m),b(t.filter.To,p)||(t.filter.To=p),h(p)}),n()()()(),i(31,"content")(32,"div",16)(33,"div",17)(34,"div",18),f(35,Hi,20,4,"ng-container",19)(36,Ui,2,0,"ng-template",null,0,q),n()()()()()}if(a&2){let m=U(37);o(10),d("clearable",!0)("multiple",!0)("items",t.channelOptions),C("ngModel",t.filter.ListChannelID),o(5),C("ngModel",t.filter.PageNumber),o(4),C("ngModel",t.filter.PageSize),o(4),C("ngModel",t.filter.Note),o(5),C("date",t.filter.From),o(2),C("date",t.filter.To),o(5),d("ngIf",t.data&&t.data.length>0)("ngIfElse",m)}},dependencies:[A,F,Q,Z,B,z,G,X,ie,ee,te,j,re,oe,ne,ae,H,W,V],encapsulation:2})}}return r})();var qi=[{path:"",component:bt,children:[{path:"",redirectTo:"new",pathMatch:"full"},{path:"new",component:yt,canActivate:[le],data:{title:"New Order"}},{path:"detail",component:vt,canActivate:[le],data:{title:"Orders detail"}},{path:"ready_to_ship",component:Tt,canActivate:[le],data:{title:"Ready To Ship"}},{path:"Shipped",component:wt,canActivate:[le],data:{title:"Shipped"}},{path:"Delivered",component:Pt,canActivate:[le],data:{title:"Delivered"}},{path:"All",component:Et,canActivate:[le],data:{title:"All Order"}},{path:"Cancelled",component:It,canActivate:[le],data:{title:"Cancelled"}},{path:"Download",loadComponent(){return import("./chunk-XUNM3IGC.js").then(r=>r.DownloadV2Component)},canActivate:[le],data:{title:"Download"}},{path:"Download_Order_Log",loadComponent:()=>import("./chunk-IQGQSQGT.js").then(r=>r.DownloadOrderLogComponent),canActivate:[le],data:{title:"Download Order Log"}},{path:"Download_Order_Log/Detail",loadComponent:()=>import("./chunk-DI4V7KMK.js").then(r=>r.DownloadOrderDetailComponent),canActivate:[le],data:{title:"Download Order Log Detail"}}]}],Nt=(()=>{class r{static{this.\u0275fac=function(a){return new(a||r)}}static{this.\u0275mod=Me({type:r})}static{this.\u0275inj=De({imports:[he,Le.forChild(qi)]})}}return r})();var Va=(()=>{class r{static{this.\u0275fac=function(a){return new(a||r)}}static{this.\u0275mod=Me({type:r})}static{this.\u0275inj=De({providers:[Ae,Fe,We],imports:[he,Ze,Nt,mt,rt,ut,Le,$e,gt,st,j,_t,et,lt,St,at,ct,ot,H,Be,Ct,dt]})}}return r})();export{Va as OrdersModule};
@@ -1 +0,0 @@
1
- import{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 X}from"./chunk-FGUFEIUH.js";import{a as Q}from"./chunk-YR2WEZDG.js";import{c as Y,d as D}from"./chunk-P7SK6WYZ.js";import{b as K}from"./chunk-IEYFOHME.js";import"./chunk-YXFTLQ5M.js";import"./chunk-OLSC6KHB.js";import{a as J}from"./chunk-EGTYAIU5.js";import"./chunk-7TWBIV3T.js";import"./chunk-J7AGLBPL.js";import"./chunk-6ALHX2I4.js";import"./chunk-3RK6DDJD.js";import"./chunk-CH2MLZU7.js";import"./chunk-ZZVNB72Q.js";import"./chunk-VGXQU74M.js";import"./chunk-SDUUFQUI.js";import"./chunk-G6EG5QJS.js";import"./chunk-RIHLYYZU.js";import"./chunk-Q2OEJFVT.js";import"./chunk-T6QOFDEE.js";import"./chunk-KXZCGKQW.js";import"./chunk-QCZIDOKW.js";import{l as $}from"./chunk-BF6RJNF2.js";import{b as G,e as W}from"./chunk-BUFEIJAI.js";import"./chunk-K5XRGNWG.js";import"./chunk-V5WYSCVT.js";import"./chunk-KHWTOD6H.js";import{d as H,l as q,m as z}from"./chunk-BIQHA7UA.js";import"./chunk-TMFFA26Y.js";import"./chunk-WAW37FIG.js";import{c as B,h as O,m as U,o as j,y as k}from"./chunk-DPLEMBB4.js";import"./chunk-PXB4YEY3.js";import{g as R,j as L,m as x,n as A}from"./chunk-GPEVUTDI.js";import{Eb as N,Ec as g,G as V,Ic as S,Jc as v,Kb as f,Kc as y,Oc as E,Wb as u,Z as T,Zc as _,_c as C,ea as F,gc as a,hc as p,ic as I,mc as b,pa as M,qb as d,rc as P,sc as o,wb as h,ya as s,za as l}from"./chunk-T5ONJF63.js";import"./chunk-K2H6WANG.js";function Z(r,w){if(r&1){let e=b();a(0,"button",15),P("click",function(){s(e);let t=o().ngIf,n=o(2);return l(n.onUpdateItems(t))}),I(1,"i",16),g(2," Update "),p()}}function ee(r,w){if(r&1&&(a(0,"div"),f(1,Z,3,0,"button",14),p()),r&2){let e=w.ngIf,i=o(2);d(),u("ngIf",i.productService.hasSelectionVariant(e))}}function te(r,w){if(r&1){let e=b();a(0,"mainpanel",1),P("onSubmit",function(t){s(e);let n=o();return l(n.onSearch(t))}),a(1,"actions")(2,"div",2),f(3,ee,2,1,"div",3),_(4,"async"),a(5,"button",4),P("click",function(){s(e);let t=o();return l(t.openExportDialog())}),I(6,"i",5),a(7,"span"),g(8,"Export"),p()()()(),a(9,"filters")(10,"div")(11,"label",6),g(12,"Page Number"),p(),a(13,"input",7),y("ngModelChange",function(t){s(e);let n=o();return v(n.searchFilter.PageNumber,t)||(n.searchFilter.PageNumber=t),l(t)}),p()(),a(14,"div",8)(15,"label",6),g(16,"Page Size"),p(),a(17,"input",7),y("ngModelChange",function(t){s(e);let n=o();return v(n.searchFilter.RowCount,t)||(n.searchFilter.RowCount=t),l(t)}),p()()(),a(18,"content")(19,"div",9)(20,"div",10)(21,"div",11)(22,"app-table",12),_(23,"async"),P("onToggle",function(t){s(e);let n=o();return l(n.onShowDifferencePrice(t))})("onSubmit",function(t){s(e);let n=o();return l(n.updatePriceByVariant(t))}),p(),a(24,"infinite-paginator",13),_(25,"async"),P("onNextPage",function(){s(e);let t=o();return l(t.infinitePagination.onNextPage(t.searchFilter))})("onLastPage",function(){s(e);let t=o();return l(t.infinitePagination.onLastPage(t.searchFilter))})("onGetRowCount",function(){s(e);let t=o();return l(t.infinitePagination.getRowCount(t.searchFilter))}),p()()()()()()}if(r&2){let e=o();u("textButton","Search"),d(3),u("ngIf",C(4,14,e.data$)),d(10),S("ngModel",e.searchFilter.PageNumber),d(4),S("ngModel",e.searchFilter.RowCount),d(5),u("showProductToggle",!0)("data",C(23,16,e.data$))("channel",e.channelOptions)("hiddenIPOSInventory",!1),d(2),u("totalData",e.infinitePagination.totalData())("hideCount",e.infinitePagination.hideCount())("rowCount",C(25,18,e.infinitePagination.totalRowCount$))("pageNumber",e.infinitePagination.pageNumber())("disableNextButton",e.infinitePagination.disableNextButton())("goToLastPage",e.infinitePagination.isLastPage())}}var be=(()=>{class r{constructor(e,i,t,n,m,c){this.http=e,this.toastr=i,this.dialog=t,this.productService=n,this.authService=m,this.decimalPipe=c,this.infinitePagination=M(D),this.loaderAPI="PriceLoader/LoadMultiple",this.getDataAPI="Price/GetMultipleChannelComparison",this.rowCountAPI="Inventory/GetMultipleChannelComparisonRowCount",this.data$=this.infinitePagination.data$.pipe(T()),this.pageData={Title:"Price",Nav:[{Title:"Price Cache",Url:"/menu/price",Active:!0},{Title:"Price Realtime",Url:"/menu/price/realtime",Active:!1}]},this.channelOptions=this.authService.getChannels()}ngOnInit(){this.initPageLoader()}initPageLoader(){this.infinitePagination.fetchDataEndpoint=this.getDataAPI,this.infinitePagination.fethRowCountEndpoint=this.rowCountAPI,this.loader$=this.http.post(`/api/${this.loaderAPI}`).pipe(F(e=>{e.Filter={PageNumber:e.Filter.PageNumber,RowCount:e.Filter.RowCount,filterModel:1},this.searchFilter=e.Filter,this.infinitePagination.reloadPagination(this.searchFilter)}))}onShowDifferencePrice(e){this.searchFilter.filterModel=1,e&&(this.searchFilter.filterModel=3),this.infinitePagination.reloadPagination(this.searchFilter)}onSearch(e){this.searchFilter.text=e,this.infinitePagination.reloadPagination(this.searchFilter)}updatePrice(e){let i=this.productService.selectedVariantProduct(e);if(i.length>0){let n=i.map(c=>({ID:c.ID,Code:c.Code,Price:c.UnitPrice}));var t=this.channelOptions.filter(c=>c.selected).map(c=>c.ID);let m={ListChannelID:t,ListPrice:n};this.http.post("/api/Price/UpdateChannel",m).subscribe(c=>{this.infinitePagination.reloadPagination(this.searchFilter),this.toastr.success("Successfully updated "+m.ListPrice.length+" items in "+m.ListChannelID.length+" channels","Success")})}}updatePriceByVariant(e){let i={ID:e.ChannelID,ChannelItemID:e.ChannelItemID,ChannelVariantID:e.ChannelVariationID,Price:e.Price-0,VariantID:e.ID};this.http.post("/api/Price/UpdatePriceByID",i).subscribe(t=>{let n=this.productService.findChannelById(i.ID,this.channelOptions),m=i.Price?this.decimalPipe.transform(i.Price):i.Price;this.toastr.success("Successfully updated "+e.ItemName+"("+e.VarName+") price in "+n.Name+" to "+m,"Success"),this.infinitePagination.reloadPagination(this.searchFilter)})}onUpdateItems(e){let i=this.productService.selectedVariantProduct(e);this.dialog.open(Q,{data:{title:"Updating Price",selectedItems:i,channels:this.channelOptions},width:"400px"}).afterClosed().pipe(V(t=>t!==void 0)).subscribe(t=>{this.channelOptions=t,this.updatePrice(e)})}openExportDialog(){this.dialog.open(K,{data:{title:"Export Multi Channel Comparison",pageNumber:this.searchFilter.PageNumber,rowCount:this.searchFilter.RowCount,filterExport:this.searchFilter,getRowCountApi:this.rowCountAPI,exportApi:"price/GetExportMultipleChannelComparison"}}).afterClosed().subscribe()}static{this.\u0275fac=function(i){return new(i||r)(h(W),h(G),h(H),h(J),h($),h(x))}}static{this.\u0275cmp=N({type:r,selectors:[["app-price-pos-channel"]],features:[E([D,x])],decls:2,vars:3,consts:[["headerTitle","Price Comparison",3,"textButton","onSubmit",4,"ngIf"],["headerTitle","Price Comparison",3,"onSubmit","textButton"],[1,"d-flex"],[4,"ngIf"],[1,"btn","btn-outline-secondary","shadow","rounded","ms-2",3,"click"],[1,"fa-solid","fa-print","me-3"],[1,"fw-bold"],["type","number",1,"form-control","mt-2",3,"ngModelChange","ngModel"],[1,"mt-5"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],["productToggleTitle","FILTER DIFFERENT PRICE","table","price",3,"onToggle","onSubmit","showProductToggle","data","channel","hiddenIPOSInventory"],[3,"onNextPage","onLastPage","onGetRowCount","totalData","hideCount","rowCount","pageNumber","disableNextButton","goToLastPage"],["type","button","class","btn btn-success shadow rounded","data-toggle","modal",3,"click",4,"ngIf"],["type","button","data-toggle","modal",1,"btn","btn-success","shadow","rounded",3,"click"],[1,"fas","fa-chevron-circle-up"]],template:function(i,t){i&1&&(f(0,te,26,20,"mainpanel",0),_(1,"async")),i&2&&u("ngIf",C(1,1,t.loader$))},dependencies:[A,R,L,k,B,j,O,U,Y,z,q,X],styles:[".no-bullet[_ngcontent-%COMP%]{list-style-type:none}"]})}}return r})();export{be as PricePosChannelComponent};