marketplacepos 5.46.0 → 5.46.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (183) hide show
  1. package/Marketplace/chunk-26ZM2UD3.js +1 -0
  2. package/Marketplace/{chunk-FPYZBABH.js → chunk-2O4IEGGR.js} +1 -1
  3. package/Marketplace/chunk-2SGPD432.js +1 -0
  4. package/Marketplace/{chunk-PONMPAT5.js → chunk-2XWZQCUR.js} +1 -1
  5. package/Marketplace/{chunk-VPFSU3X4.js → chunk-2Z7CPNRS.js} +1 -1
  6. package/Marketplace/{chunk-Z3ZYINRX.js → chunk-3BALA33G.js} +1 -1
  7. package/Marketplace/{chunk-6RLISMEX.js → chunk-3GDM5JNY.js} +1 -1
  8. package/Marketplace/chunk-3VUO4APC.js +1 -0
  9. package/Marketplace/{chunk-LBXSZJDS.js → chunk-4G7SG2H6.js} +1 -1
  10. package/Marketplace/{chunk-EBCTTFHD.js → chunk-4LZODV4E.js} +2 -2
  11. package/Marketplace/chunk-4NEKWRL7.js +1 -0
  12. package/Marketplace/chunk-4TDVVQ64.js +1 -0
  13. package/Marketplace/chunk-4YRBARG2.js +1 -0
  14. package/Marketplace/{chunk-LDD4NVMB.js → chunk-5CKVZBHM.js} +1 -1
  15. package/Marketplace/{chunk-PFXOFSJG.js → chunk-67HPC5Y3.js} +1 -1
  16. package/Marketplace/{chunk-X5KQU53P.js → chunk-6CIQBRO4.js} +1 -1
  17. package/Marketplace/{chunk-FFCWYWBW.js → chunk-6H2KAYSB.js} +6 -99
  18. package/Marketplace/{chunk-WLRPCY65.js → chunk-6OMSPZZC.js} +1 -1
  19. package/Marketplace/{chunk-A6G2H7IF.js → chunk-6U4YIJLC.js} +2 -2
  20. package/Marketplace/chunk-6VYFG4AQ.js +1 -0
  21. package/Marketplace/chunk-77MWKV5I.js +158 -0
  22. package/Marketplace/chunk-7DJXZQ7M.js +1 -0
  23. package/Marketplace/{chunk-DFGZ4L65.js → chunk-7G6GQTSH.js} +1 -1
  24. package/Marketplace/{chunk-BBQGPXDH.js → chunk-A6PXM4YX.js} +1 -1
  25. package/Marketplace/{chunk-HFCAD7GH.js → chunk-ABYG6YZT.js} +1 -1
  26. package/Marketplace/{chunk-3TYYN7ZX.js → chunk-AGZCB65X.js} +1 -1
  27. package/Marketplace/{chunk-QHE3PKRD.js → chunk-BAXQ2L7B.js} +1 -1
  28. package/Marketplace/{chunk-2HNZ6XV3.js → chunk-BKRCW7SH.js} +1 -1
  29. package/Marketplace/{chunk-IQ4AFE6X.js → chunk-BMYBLBSP.js} +3 -3
  30. package/Marketplace/chunk-CGEIIRYF.js +1 -0
  31. package/Marketplace/{chunk-MW6Q6DZF.js → chunk-CGOB6Y3X.js} +1 -1
  32. package/Marketplace/{chunk-5X2WQKXH.js → chunk-CJ4F7QUO.js} +1 -1
  33. package/Marketplace/chunk-CRKCNTXF.js +1 -0
  34. package/Marketplace/{chunk-NERXQ5KH.js → chunk-CVM573KF.js} +1 -1
  35. package/Marketplace/{chunk-ZDXNJIJA.js → chunk-DAXM2MPK.js} +1 -1
  36. package/Marketplace/chunk-DB7C3AL2.js +257 -0
  37. package/Marketplace/chunk-DSYYZDXI.js +1 -0
  38. package/Marketplace/chunk-DZEO4HK4.js +1 -0
  39. package/Marketplace/chunk-EFI2CLNP.js +1 -0
  40. package/Marketplace/{chunk-WKSCLDT7.js → chunk-EHBCYQSG.js} +1 -1
  41. package/Marketplace/{chunk-QP4C4R4W.js → chunk-EHUVS2VB.js} +1 -1
  42. package/Marketplace/{chunk-ZWEHKGL5.js → chunk-EI65NYTN.js} +1 -1
  43. package/Marketplace/chunk-EPBVNII2.js +51 -0
  44. package/Marketplace/{chunk-G7T42LFR.js → chunk-EYONZQ2W.js} +1 -1
  45. package/Marketplace/chunk-F2533PAC.js +1 -0
  46. package/Marketplace/chunk-FB2AEPXA.js +15 -0
  47. package/Marketplace/{chunk-VVX6LRMW.js → chunk-FGFIV3VO.js} +1 -1
  48. package/Marketplace/chunk-FGRPTNDB.js +234 -0
  49. package/Marketplace/chunk-FHWKSD5A.js +3 -0
  50. package/Marketplace/chunk-FIAI5SPR.js +1 -0
  51. package/Marketplace/chunk-FTWATKXK.js +1 -0
  52. package/Marketplace/chunk-GHVAGYK3.js +2 -0
  53. package/Marketplace/chunk-GKRWJPI3.js +2 -0
  54. package/Marketplace/chunk-GPGD3XQH.js +1 -0
  55. package/Marketplace/{chunk-N6HMVYWS.js → chunk-GQXYHXWJ.js} +1 -1
  56. package/Marketplace/{chunk-YIXZLIPA.js → chunk-GRYGUILI.js} +2 -2
  57. package/Marketplace/{chunk-BJUPMCEP.js → chunk-GZKOMS4T.js} +1 -1
  58. package/Marketplace/{chunk-W3JKSCRF.js → chunk-HERZ7KEM.js} +1 -1
  59. package/Marketplace/{chunk-QNM4JQ46.js → chunk-HHO2NGCF.js} +1 -1
  60. package/Marketplace/{chunk-3UN6FPMN.js → chunk-HIC5QC3Y.js} +1 -1
  61. package/Marketplace/{chunk-4VITMSIA.js → chunk-HITTNWB6.js} +1 -1
  62. package/Marketplace/{chunk-FO7G4GMY.js → chunk-HJXYT6MI.js} +3 -3
  63. package/Marketplace/{chunk-5LQRO4AI.js → chunk-IHSGQFDX.js} +2 -2
  64. package/Marketplace/{chunk-XXWBR6S5.js → chunk-IITU3NV6.js} +1 -1
  65. package/Marketplace/chunk-ISUN5G42.js +5 -0
  66. package/Marketplace/chunk-IWKRZSYG.js +1 -0
  67. package/Marketplace/{chunk-LDPDLCRL.js → chunk-JBT7GBCM.js} +1 -1
  68. package/Marketplace/{chunk-VKFFHT27.js → chunk-JGEU4EJT.js} +1 -1
  69. package/Marketplace/chunk-JYCBJ7CC.js +1 -0
  70. package/Marketplace/chunk-KCFCXS2F.js +1 -0
  71. package/Marketplace/{chunk-OPKLFRVD.js → chunk-KFOHH7PE.js} +1 -1
  72. package/Marketplace/chunk-KRQHTRFM.js +7 -0
  73. package/Marketplace/{chunk-B67DSLBY.js → chunk-KS7ACI26.js} +6 -6
  74. package/Marketplace/{chunk-OK3LLCAK.js → chunk-KSHWHTCH.js} +1 -1
  75. package/Marketplace/{chunk-3NHZEKEI.js → chunk-L7TKCTLD.js} +1 -1
  76. package/Marketplace/{chunk-RNTPX24O.js → chunk-LBMUKJV5.js} +1 -1
  77. package/Marketplace/{chunk-UXPULNCR.js → chunk-LDL3A7NM.js} +1 -1
  78. package/Marketplace/chunk-LFGPYQCI.js +1 -0
  79. package/Marketplace/chunk-LOU3DIPY.js +1 -0
  80. package/Marketplace/{chunk-DZYBXWL2.js → chunk-LYPHZP72.js} +1 -1
  81. package/Marketplace/chunk-M7LXGXUM.js +1 -0
  82. package/Marketplace/{chunk-NNRBGHXB.js → chunk-MFQQEEHJ.js} +3 -3
  83. package/Marketplace/chunk-MJNFY4NT.js +1 -0
  84. package/Marketplace/chunk-MX5SR3SR.js +94 -0
  85. package/Marketplace/{chunk-LSCMIKJ2.js → chunk-NLPXBGIX.js} +1 -1
  86. package/Marketplace/{chunk-CHWXOJDB.js → chunk-NNOI3AG4.js} +1 -1
  87. package/Marketplace/{chunk-I2Y5WJEO.js → chunk-NWWYOZ4V.js} +1 -1
  88. package/Marketplace/chunk-OAG6OVUY.js +1 -0
  89. package/Marketplace/{chunk-OIEZ4JUJ.js → chunk-OE7TF7SI.js} +1 -1
  90. package/Marketplace/{chunk-QK4BGDSS.js → chunk-OHVOVAKD.js} +1 -1
  91. package/Marketplace/chunk-OJZ7NGRW.js +1 -0
  92. package/Marketplace/{chunk-FHH5BTG7.js → chunk-ORLTYLPA.js} +1 -1
  93. package/Marketplace/chunk-OVPVQS4J.js +33 -0
  94. package/Marketplace/{chunk-UIFPDTMW.js → chunk-OXWPLJEW.js} +1 -1
  95. package/Marketplace/{chunk-BQIB3N6V.js → chunk-PFY5UG5D.js} +1 -1
  96. package/Marketplace/{chunk-74ELVGDK.js → chunk-PHUHUFYL.js} +1 -1
  97. package/Marketplace/{chunk-AHLYED4C.js → chunk-PIBVGTHJ.js} +1 -1
  98. package/Marketplace/{chunk-OFZOAEW5.js → chunk-PQQSREEC.js} +1 -1
  99. package/Marketplace/{chunk-QBL6V7QF.js → chunk-Q4N2QUV6.js} +1 -1
  100. package/Marketplace/{chunk-OXOTD33C.js → chunk-QOP7KZK7.js} +1 -1
  101. package/Marketplace/{chunk-M7V7A7Z6.js → chunk-QW4EOJRM.js} +1 -1
  102. package/Marketplace/{chunk-WPELZYFP.js → chunk-QWISVEBT.js} +1 -1
  103. package/Marketplace/{chunk-4KHHGHFJ.js → chunk-RAQRGWCZ.js} +2 -2
  104. package/Marketplace/chunk-RC5PUUVM.js +193 -0
  105. package/Marketplace/{chunk-WWISWZF5.js → chunk-RGAKHXPF.js} +1 -1
  106. package/Marketplace/{chunk-ZBKUZ4CN.js → chunk-RGAWEFPQ.js} +1 -1
  107. package/Marketplace/{chunk-V5KHEF77.js → chunk-RJ5D24ZW.js} +1 -1
  108. package/Marketplace/chunk-RM2OSYMV.js +1 -0
  109. package/Marketplace/{chunk-KXEADFBM.js → chunk-RNNH3EZC.js} +1 -1
  110. package/Marketplace/{chunk-753FTTID.js → chunk-S3FZRSRP.js} +1 -1
  111. package/Marketplace/{chunk-FXVFO74P.js → chunk-SLEJQAL7.js} +1 -1
  112. package/Marketplace/chunk-SZGOLKC6.js +1 -0
  113. package/Marketplace/{chunk-UYLSZYOD.js → chunk-T2OSIFLN.js} +1 -1
  114. package/Marketplace/chunk-T43QRQH5.js +1 -0
  115. package/Marketplace/{chunk-F6HNCBQX.js → chunk-TE5EYKIN.js} +1 -1
  116. package/Marketplace/chunk-TGQ5CJ3A.js +1 -0
  117. package/Marketplace/chunk-UGG2CIUU.js +1 -0
  118. package/Marketplace/{chunk-WFT47MCY.js → chunk-UZWED4UK.js} +1 -1
  119. package/Marketplace/{chunk-WCVSETLP.js → chunk-V6UNCLNJ.js} +2 -2
  120. package/Marketplace/{chunk-LRUVI2Z3.js → chunk-VFATXJRG.js} +1 -1
  121. package/Marketplace/chunk-VIDSOLHF.js +1 -0
  122. package/Marketplace/{chunk-FVORY74O.js → chunk-W3DTXPRM.js} +1 -1
  123. package/Marketplace/{chunk-6KBMGQMI.js → chunk-WAZXTB4X.js} +1 -1
  124. package/Marketplace/{chunk-W5L6FMO3.js → chunk-WN5DZGA4.js} +1 -1
  125. package/Marketplace/{chunk-A64VIOKR.js → chunk-WRJFUNM3.js} +1 -1
  126. package/Marketplace/{chunk-TYG67JH3.js → chunk-XPCRS7AL.js} +1 -1
  127. package/Marketplace/{chunk-TH6VZX34.js → chunk-XXT6F2ZS.js} +1 -1
  128. package/Marketplace/{chunk-RDJPSZRF.js → chunk-YB4KXB2C.js} +1 -1
  129. package/Marketplace/chunk-YFDFIBAG.js +1 -0
  130. package/Marketplace/{chunk-N2SPK2VI.js → chunk-YQLOB7IQ.js} +1 -1
  131. package/Marketplace/{chunk-PPHTN2H6.js → chunk-YTCIQBSO.js} +1 -1
  132. package/Marketplace/chunk-ZUYGRGXM.js +1 -0
  133. package/Marketplace/{chunk-7WG7VRYR.js → chunk-ZVKOEYH7.js} +1 -1
  134. package/Marketplace/chunk-ZXTHWBJ4.js +1 -0
  135. package/Marketplace/index.html +2 -2
  136. package/Marketplace/main-RRL4BIVO.js +1 -0
  137. package/package.json +1 -1
  138. package/Marketplace/chunk-2KDM4NDG.js +0 -266
  139. package/Marketplace/chunk-3NFS6ZDY.js +0 -1
  140. package/Marketplace/chunk-43E7L4CY.js +0 -1
  141. package/Marketplace/chunk-4UWGWYKJ.js +0 -1
  142. package/Marketplace/chunk-5QLKBL54.js +0 -1
  143. package/Marketplace/chunk-76XHGJE7.js +0 -1
  144. package/Marketplace/chunk-7AE3725T.js +0 -193
  145. package/Marketplace/chunk-A6PK5NP6.js +0 -1
  146. package/Marketplace/chunk-AKVBFSUI.js +0 -1
  147. package/Marketplace/chunk-AP24AK5A.js +0 -1
  148. package/Marketplace/chunk-DFFRRMPT.js +0 -1
  149. package/Marketplace/chunk-DLURPTQ3.js +0 -1
  150. package/Marketplace/chunk-DQ3XZQ7W.js +0 -7
  151. package/Marketplace/chunk-DUF425GC.js +0 -1
  152. package/Marketplace/chunk-EOLVRL5H.js +0 -2
  153. package/Marketplace/chunk-EWTJL2KE.js +0 -1
  154. package/Marketplace/chunk-FHPIPQMB.js +0 -15
  155. package/Marketplace/chunk-GVLJDP5K.js +0 -1
  156. package/Marketplace/chunk-I4WCZRNL.js +0 -1
  157. package/Marketplace/chunk-ID2YZPRH.js +0 -1
  158. package/Marketplace/chunk-IL2CPGYS.js +0 -1
  159. package/Marketplace/chunk-J53BPEDH.js +0 -1
  160. package/Marketplace/chunk-JL5DYPDV.js +0 -1
  161. package/Marketplace/chunk-K5XRGNWG.js +0 -1
  162. package/Marketplace/chunk-KVZ7LQSK.js +0 -1
  163. package/Marketplace/chunk-LFMEBDL2.js +0 -1
  164. package/Marketplace/chunk-MVBY6S4R.js +0 -1
  165. package/Marketplace/chunk-NFN7BQB3.js +0 -3
  166. package/Marketplace/chunk-ORDCBJ4G.js +0 -2
  167. package/Marketplace/chunk-PFZOP2J7.js +0 -1
  168. package/Marketplace/chunk-QGK4LEFP.js +0 -1
  169. package/Marketplace/chunk-RTT3JVJM.js +0 -1
  170. package/Marketplace/chunk-SMRDRDSH.js +0 -1
  171. package/Marketplace/chunk-UBAADH47.js +0 -1
  172. package/Marketplace/chunk-UHTMVOX6.js +0 -1
  173. package/Marketplace/chunk-UUJWRGO4.js +0 -1
  174. package/Marketplace/chunk-V3CLQBGH.js +0 -1
  175. package/Marketplace/chunk-V4UHOZJ4.js +0 -1
  176. package/Marketplace/chunk-VCTMSNVC.js +0 -1
  177. package/Marketplace/chunk-WHNSPPOH.js +0 -1
  178. package/Marketplace/chunk-WJAE4LW2.js +0 -51
  179. package/Marketplace/chunk-WVHSR3DQ.js +0 -5
  180. package/Marketplace/chunk-XB3CW7KH.js +0 -1
  181. package/Marketplace/chunk-XEBKP2KL.js +0 -1
  182. package/Marketplace/chunk-ZHDGR4XE.js +0 -1
  183. package/Marketplace/main-3TBM4ISM.js +0 -1
@@ -1 +0,0 @@
1
- import{a as ae}from"./chunk-PFXOFSJG.js";import{a as ie}from"./chunk-OLANEXLB.js";import"./chunk-BQIB3N6V.js";import"./chunk-B67DSLBY.js";import{a as oe,b as re}from"./chunk-HFCAD7GH.js";import"./chunk-4KHHGHFJ.js";import"./chunk-HVCIQI7B.js";import"./chunk-6RLISMEX.js";import"./chunk-TH6VZX34.js";import"./chunk-QS22J2SC.js";import"./chunk-QP4C4R4W.js";import"./chunk-5LQRO4AI.js";import"./chunk-MO53T3IK.js";import"./chunk-W3JTS22H.js";import"./chunk-SDUUFQUI.js";import"./chunk-6L7TD5DW.js";import"./chunk-WLRPCY65.js";import"./chunk-3RK6DDJD.js";import"./chunk-3UN6FPMN.js";import"./chunk-LDPDLCRL.js";import"./chunk-JVNHFIYT.js";import{h as Q}from"./chunk-NFN7BQB3.js";import"./chunk-Z3ITXK3D.js";import"./chunk-ACIMXBIC.js";import"./chunk-J53BPEDH.js";import"./chunk-TGMCGROM.js";import"./chunk-MW6Q6DZF.js";import{e as K}from"./chunk-W5L6FMO3.js";import"./chunk-K5XRGNWG.js";import{a as X,b as Z,d as $,e as ee}from"./chunk-PYXL7UF7.js";import{c as J}from"./chunk-PW42BQIY.js";import{m as te,n as ne}from"./chunk-FO7G4GMY.js";import{A as Y,c as U,h as j,m as q,o as G}from"./chunk-5PS6ZS3N.js";import"./chunk-V3USB3ZU.js";import"./chunk-ERXVXBTU.js";import"./chunk-NNRBGHXB.js";import"./chunk-BJUPMCEP.js";import{H as A,J as H,f as W,g as F,k as B,m as k,n as z}from"./chunk-FXQKRJWU.js";import{$c as L,Fc as P,Gb as T,Gc as l,Hc as S,Ic as y,Kc as c,Lc as u,Mb as w,Mc as h,Sc as I,Yb as m,ad as N,bd as V,cd as R,ic as t,jc as n,kc as C,lc as M,mc as x,oc as O,pb as b,rb as r,tc as E,uc as v,xb as D,ya as p,za as s}from"./chunk-OJMQBH6T.js";import"./chunk-EU2KAMEK.js";import"./chunk-66YHNWRR.js";var le=a=>({ID:a});function de(a,f){if(a&1&&(t(0,"span",17),C(1,"img",18),n(),l(2)),a&2){let e=f.item;r(),m("src",e.Img,b)("alt",e.Name),r(),y(" ",e.Name," ")}}function me(a,f){if(a&1&&(t(0,"tr")(1,"td"),l(2),n(),t(3,"td"),C(4,"img",28),n(),t(5,"td"),l(6),n(),t(7,"td",29)(8,"a",30),l(9),L(10,"number"),n()(),t(11,"td"),l(12),n(),t(13,"td"),l(14),L(15,"date"),n()()),a&2){let e=f.$implicit;r(2),S(e._source.ChannelName),r(2),m("src",e.logo,b),r(2),S(e._source.DateRange),r(2),m("queryParams",I(12,le,e._source.ID)),r(),y(" ",N(10,7,e._source.CountOrder)," "),r(3),S(e._source.UserLogin),r(2),y(" ",V(15,9,e._source["@timestamp_received"],"dd MMM yyyy HH:mm")," ")}}function pe(a,f){if(a&1){let e=O();M(0),t(1,"div",19)(2,"table",20)(3,"thead")(4,"tr",21)(5,"th",22),l(6,"Channel"),n(),t(7,"th",23),l(8,"Type"),n(),t(9,"th",24),l(10,"Download Date Range"),n(),t(11,"th",25),l(12,"Count"),n(),t(13,"th"),l(14,"User Login"),n(),t(15,"th"),l(16,"Created"),n()()(),t(17,"tbody"),w(18,me,16,14,"tr",26),n()(),t(19,"mat-paginator",27),E("page",function(i){p(e);let d=v();return s(d.onPaginationChange(i))}),n()(),x()}if(a&2){let e=v();r(18),m("ngForOf",e.downloadOrders),r(),m("length",e.paginationTotal)("pageSize",e.paginationPageSize)("pageIndex",(e.filter==null?null:e.filter.PageNumber)==0?0:(e.filter==null?null:e.filter.PageNumber)-1)}}function se(a,f){a&1&&(t(0,"div",31),C(1,"app-empty-state"),n())}var xe=(()=>{class a{constructor(e,g){this.http=e,this.authService=g,this.filter={PageNumber:0,RowCount:20,ChannelID:"",From:"",To:""},this.channelOptions=this.authService.getChannels(),this.onGetLoader()}onGetLoader(){this.http.post("/api/OrdersLoader/OrderLogsLoader",{}).subscribe(e=>{this.filter=e.Filter,this.getDownloadOrders()})}getDownloadOrders(){this.http.post("api/Orders/OrderLogsPaged",this.filter).subscribe(e=>{this.downloadOrders=e.hits,this.setChannelLogo(),this.paginationTotal=e.total.value,this.paginationPageSize=this.filter.RowCount>this.paginationTotal?this.paginationTotal:this.filter.RowCount})}setChannelLogo(){this.downloadOrders=this.downloadOrders.map(e=>(e.logo=J.getChannelLogoByTypeId(e._source.TypeID),e))}onPaginationChange(e){this.filter.PageNumber=e.pageIndex+1,this.getDownloadOrders()}static{this.\u0275fac=function(g){return new(g||a)(D(K),D(Q))}}static{this.\u0275cmp=T({type:a,selectors:[["app-download-order-log"]],decls:29,vars:10,consts:[["EMPTY_STATE",""],["headerTitle","Download Order Log",3,"onSubmit","hideSearchBox"],[1,"fw-bold","mb-2"],["bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel","appendTo","body",1,"center-text",3,"ngModelChange","clearable","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],[1,"mt-5"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"fw-bold"],["type","number","name","PageNumber",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["type","number","name","RowCount",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],[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"],[1,"table","table-hover"],[1,"table-light"],[2,"width","250px"],[2,"width","150px"],[2,"width","200px"],[1,"text-end",2,"width","200px"],[4,"ngFor","ngForOf"],[3,"page","length","pageSize","pageIndex"],[2,"width","25px",3,"src"],[1,"text-end"],["routerLink","/menu/Order/Download_Order_Log/Detail",3,"queryParams"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"]],template:function(g,i){if(g&1){let d=O();t(0,"mainpanel",1),E("onSubmit",function(){return p(d),s(i.getDownloadOrders())}),t(1,"filters")(2,"div")(3,"label",2),l(4,"Channel"),n(),t(5,"ng-select",3),h("ngModelChange",function(o){return p(d),u(i.filter.ChannelID,o)||(i.filter.ChannelID=o),s(o)}),w(6,de,3,3,"ng-template",4),n()(),t(7,"div",5)(8,"label",6),l(9,"From/To"),n(),t(10,"div",7)(11,"datepicker",8),h("dateChange",function(o){return p(d),u(i.filter.From,o)||(i.filter.From=o),s(o)}),n()(),t(12,"div")(13,"datepicker",9),h("dateChange",function(o){return p(d),u(i.filter.To,o)||(i.filter.To=o),s(o)}),n()()(),t(14,"div",5)(15,"label",10),l(16,"Page Number"),n(),t(17,"input",11),h("ngModelChange",function(o){return p(d),u(i.filter.PageNumber,o)||(i.filter.PageNumber=o),s(o)}),n()(),t(18,"div",5)(19,"label",10),l(20,"Page Size"),n(),t(21,"input",12),h("ngModelChange",function(o){return p(d),u(i.filter.RowCount,o)||(i.filter.RowCount=o),s(o)}),n()()(),t(22,"content")(23,"div",13)(24,"div",14)(25,"div",15),w(26,pe,20,4,"ng-container",16)(27,se,2,0,"ng-template",null,0,R),n()()()()()}if(g&2){let d=P(28);m("hideSearchBox",!0),r(5),m("clearable",!0)("items",i.channelOptions),c("ngModel",i.filter.ChannelID),r(6),c("date",i.filter.From),r(2),c("date",i.filter.To),r(4),c("ngModel",i.filter.PageNumber),r(4),c("ngModel",i.filter.RowCount),r(5),m("ngIf",(i.downloadOrders==null?null:i.downloadOrders.length)>0)("ngIfElse",d)}},dependencies:[z,W,F,k,B,re,oe,ne,te,ee,$,X,Z,Y,U,G,j,q,ae,H,A,ie],encapsulation:2})}}return a})();export{xe as DownloadOrderLogComponent};
@@ -1,7 +0,0 @@
1
- import{a as I}from"./chunk-VCTMSNVC.js";import{h as m}from"./chunk-NFN7BQB3.js";import{a as d}from"./chunk-MW6Q6DZF.js";import{b as g,e as C}from"./chunk-W5L6FMO3.js";import{c as o}from"./chunk-PW42BQIY.js";import{J as h,ea as l,ja as S,oa as u,pa as f,r as c}from"./chunk-OJMQBH6T.js";var N=(()=>{class i{constructor(t,e,s){this.httpService=t,this.toastrService=e,this.notificationService=s,this.authService=f(m),this.channelOptions=this.authService.getChannels()}loader(t=o.GuidEMpty){return this.httpService.post("/api/product/Load",{ID:t})}LoadInPOS(t=o.GuidEMpty){return this.httpService.post("/api/product/LoadInPOS",{ID:t})}filterChannelByTypeId(t,e){return t.filter(s=>e.findIndex(n=>s.TypeID==n)!==-1)}getProductStatistic(){return this.httpService.post("/api/product/ProductStatistic",{})}getTotalProductLive(t){let e={ID:t};return this.httpService.post("/api/product/TotalProductLive",e)}clearCacheChannel(t){let e={ID:t};return this.httpService.post("/api/Channel/ClearCacheChannel",e)}detachProduct(t){return this.httpService.post("/api/product/Detach",t)}uploadSingleProduct(t,e){let s={Channel:e,Products:t};return this.httpService.post("api/product/UploadMultipleChannel",s).pipe(l(n=>{this.showToastrSuccessUploadSingle(n,t[0])}),h(n=>(this.showToastErrorUploadSingle(n,t[0]),c(()=>new Error(n)))))}uploadMultipleProduct(t,e){let s={Channel:e,Products:t};return this.httpService.post("api/product/UploadMultipleProductAndMultipleChannel",s).pipe(l(n=>{this.showToastrUploadMultiple(n.Message)}),h(n=>(this.showToastrUploadMultiple(n.error?.Message),c(()=>new Error(n)))))}uploadNotInChannel(t,e){let s={Products:t,Channel:e};return this.httpService.post("/api/product/UploadProductNotInChannelToChannel",s).pipe(l(n=>{this.showToastrUploadMultiple(n)}),h(n=>(this.showToastrUploadMultiple(n.error?.Message),c(()=>new Error(n)))))}scanSingle(t,e){let s={ID:t,SKU:e};return this.httpService.post("/api/product/ScanSingle",s)}scanNotInChannel(t){let e={ID:t};return this.httpService.post("/api/product/ScanNotinChannel",e)}findAllSoldInChannel(t){return this.httpService.post("/api/product/GetSoldInChannel",t)}scanAll(t,e,s,n=!1){let a={ID:t,ScanFull:e,UpdatedProduct:s,Async:n};return this.httpService.post("/api/product/ScanOptimized",a)}scanAsyncProductV2(t,e,s){let n={ID:t,ScanFull:e,UpdatedProduct:s,Async:!0};return this.httpService.post(d.ScanAsyncProductV2,n).pipe(l(a=>{this.notificationService.subscribeToJobGroup(a.JobID)}))}scanSyncProductV2(t,e,s){let n={ID:t,ScanFull:e,UpdatedProduct:s,Async:!1};return this.httpService.post(d.ScanSyncProductV2,n)}scanProductV2(t,e,s,n=!1){return n?this.scanAsyncProductV2(t,e,s).pipe(l(()=>{this.toastrService.warning("You will be notified when the scan is completed.","Scan In Progress",{toastClass:"ngx-toastr toast-waiting"})})):this.scanSyncProductV2(t,e,s).pipe(l(a=>{let r=this.findChannelById(t,this.channelOptions);this.successToastrScanAllProduct(a,r,!s)}))}scanCompareToPos(t){return this.httpService.post("/api/product/CompareMarketplaceToPOS",t)}getVariantCodesProduct(t){return(t.Variants||[]).map(n=>n.Code)}downloadMultipleProduct(t){let e=t.map(s=>({ChannelItemID:s.ChannelItemID,ChannelID:s.ChannelID}));return this.httpService.post("/api/product/DownloadMultipleProductFromChannel",e).pipe(l(s=>{this.toastrService.success(`${s.Count} products downloaded to POS`,"Download Complete")}))}downloadProduct(t){let e={ChannelItemID:t.ChannelItemID,ChannelID:t.ChannelID};return this.httpService.post("/api/product/DownloadProductFromChannel",e).pipe(l(()=>{this.toastrService.success("Product successfully downloaded to POS","Download Complete")}))}getVariantCodesProducts(t=[]){let e=[];return t.forEach(s=>{s.Variants.forEach(n=>{e=[...e,n.Code]})}),e}filterUnselectedChannel(t,e){let s=[];t.forEach(a=>{s=[...s,...a.Channel]});let n;if(!s||s.length==0)n=e;else{let a=[];n=e.filter(r=>(a=s.filter(p=>p.ChannelID==r.ID),a.length!==t.length))}return n}findChannelById(t,e){return e.find(s=>s.ID==t)}sortChannel(t=[]){return t.sort((e,s)=>e.TypeID<s.TypeID?1:e.TypeID===s.TypeID?0:-1)}hasSelection(t=[]){return this.selectedProduct(t).length>0}selectedProduct(t=[]){return t.filter(e=>e.selected)}hasSelectionVariant(t){return this.selectedVariantProduct(t).length>0}selectedVariantProduct(t){let e=[];return t.forEach(s=>{e=[...e,...s.Variants!=null?s.Variants.filter(n=>n.selected):""]}),e}getChannelProduct(t){let e=t.Variants||[],s=[];for(let n of e)if(n.Channel!=null)for(let a of n.Channel)s.filter(r=>r.ChannelID==a.ChannelID).length==0&&s.push(a);return this.sortChannel(s)}successToastrScanAllProduct(t,e,s){let n=t.InChannel?t?.InChannel?.Product:0,a=t?.NotInPOS?.Product?t?.NotInPOS?.Product:0,r=o.IsNotEmpty(t.LastUpdate)?o.convertToReadableDate(t.LastUpdate):null;s?this.toastrService.success(`
2
- ${a+n} product updates in ${e.Name} </br>
3
- (${n} In Channel + ${a} Not In Pos)
4
- ${o.IsNotEmpty(r)?"since "+r:""}
5
- `,"Scan Complete!",{enableHtml:!0,timeOut:1e4}):this.toastrService.success(`${n} product updates in ${e.Name} </br>
6
- (${n} In Channel + ${a} Not In Pos)
7
- ${o.IsNotEmpty(r)?"since "+r:""}`,"Scan Complete!",{enableHtml:!0,timeOut:1e4})}checkProductHasScanButton(t,e){let s;return t.map(n=>(n.Channel=this.getChannelProduct(n),s=this.filterUnselectedChannel([n],e),n.hasScan=s.length>0,n))}checkProductHasUploadBtn(t,e){let s;return t.map(n=>(n.Channel=this.getChannelProduct(n),s=this.filterUnselectedChannel([n],e),n.hasUpload=s.length>0,n))}showToastrUploadMultiple(t=[]){let e=[],s=[],n=this.getResponseList(t);if(t.forEach(a=>{typeof a?.Response=="string"?s=[...s,n.length>1?this.setHtmlli(a.Response):this.setHtmlli(a.Response,!1)]:(a?.Response?.Success.forEach(r=>{e=[...e,n.length>1?this.setHtmlli(`Product ${r} was <b>successfully</b> uploaded to ${a.Name}`):this.setHtmlli(`Product ${r} was <b>successfully</b> uploaded to ${a.Name}`,!1)]}),a?.Response.Fail.forEach(r=>{s=[...s,n.length>1?this.setHtmlli(r):this.setHtmlli(r,!1)]}))}),s.length>0&&e.length>0){let a=[...e,...s];this.toastrService.warning(this.concatMessage(a),"Warning!",{enableHtml:!0})}else e.length>0&&s.length==0?this.toastrService.success(this.concatMessage(e),"Success",{enableHtml:!0}):this.toastrService.error(this.concatMessage(s),"Error",{enableHtml:!0})}setHtmlli(t,e=!0){return e?`<li>${t}</li>`:t}getResponseList(t){let e=[];return t.forEach(s=>{typeof s?.Response=="string"?e=[...e,s.Response]:(s?.Response?.Success.forEach(n=>{e=[...e,s.Name]}),s?.Response.Fail.forEach(n=>{e=[...e,n]}))}),e}concatMessage(t=[]){let e="";return t.forEach(s=>{e+=s}),t.length>1?`<ol>${e}</ol>`:e}showToastrSuccessUploadSingle(t,e){let s=t.filter(r=>r.Status==!1),n=t.filter(r=>r.Status==!0),a=this.generateToastrMessage(s,n,e);this.toastrService.success(a.message,"Success",{enableHtml:!0})}showToastErrorUploadSingle(t,e){let s=t?.error?.Message.filter(r=>r.Status==!1),n=t?.error?.Message.filter(r=>r.Status==!0),a=this.generateToastrMessage(s,n,e);a.status=="WARNING"?this.toastrService.warning(a.message,"Warning!",{enableHtml:!0}):this.toastrService.error(a.message,`Error - ${t.status}`,{enableHtml:!0})}generateToastrMessage(t,e,s){let n="",a,r=[...t,...e];if(t.length==0&&e.length>0)a="SUCCESS",n=this.createSuccessResponse(e,s);else if(t.length>0&&e.length==0)a="ERROR",n=this.createErrResponse(t,s);else{a="WARNING";let p=this.createSuccessResponse(e,s),P=this.createErrResponse(t,s);n=`${p} ${P}`}return r.length>1&&(n=`<ol>${n}</ol>`),{status:a,message:n}}createErrResponse(t,e){let s="";return t.length>1?t.forEach((n,a)=>{s+=`<li>${n.Response}</li>`}):t.length==1&&(s+=`${t[0].Response}`),s}createSuccessResponse(t,e){let s="";return t.length>1?t.forEach((n,a)=>{s+=`<li>Product ${e.Name} was <b>successfully</b> uploaded to ${n.Name}</li>`}):t.length==1&&(s+=`Product ${e.Name} was <b>successfully</b> uploaded to ${t[0].Name}`),s}static{this.\u0275fac=function(e){return new(e||i)(u(C),u(g),u(I))}}static{this.\u0275prov=S({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();export{N as a};
@@ -1 +0,0 @@
1
- import{a as Y}from"./chunk-QNM4JQ46.js";import"./chunk-NFN7BQB3.js";import"./chunk-Z3ITXK3D.js";import"./chunk-ACIMXBIC.js";import"./chunk-J53BPEDH.js";import"./chunk-TGMCGROM.js";import{a as H}from"./chunk-MW6Q6DZF.js";import{b as j,e as F}from"./chunk-W5L6FMO3.js";import"./chunk-K5XRGNWG.js";import{e as J}from"./chunk-PYXL7UF7.js";import"./chunk-PW42BQIY.js";import{m as G,n as U}from"./chunk-FO7G4GMY.js";import{A as R,c as B,h as D,m as I}from"./chunk-5PS6ZS3N.js";import"./chunk-V3USB3ZU.js";import"./chunk-ERXVXBTU.js";import"./chunk-NNRBGHXB.js";import"./chunk-BJUPMCEP.js";import{j as P,l as W,n as k}from"./chunk-FXQKRJWU.js";import{$c as S,Gb as x,Gc as i,Hc as E,Kc as C,Lc as b,Mb as M,Mc as _,Nc as T,Oc as V,Pc as v,Ra as h,Yb as f,Z as y,ad as w,dc as O,ic as e,jc as t,kc as A,oc as L,pa as u,rb as d,tc as g,uc as N,ya as s,za as m}from"./chunk-OJMQBH6T.js";import"./chunk-EU2KAMEK.js";import"./chunk-66YHNWRR.js";function z(n,q){if(n&1&&(e(0,"pre",21),i(1),S(2,"json"),t()),n&2){N();let l=v(25);d(),E(w(2,1,l))}}function K(n,q){n&1&&(e(0,"p",22),i(1," Your data will be shown here once it's available "),t())}var ce=(()=>{class n{constructor(){this.httpService=u(F),this.toastr=u(j),this.selectedChannel=h(null),this.orderNumber=h(null)}fetchLog(){if(!this.selectedChannel()||!this.orderNumber()){this.toastr.warning("Please select a channel and enter an order number","Warning");return}this.orderLog$=this.httpService.post(H.GetOrderApiLog,{ChannelID:this.selectedChannel(),OrderNumber:this.orderNumber()}).pipe(y(1))}copyToClipboard(l){if(!l)return;let p=typeof l=="string"?l:JSON.stringify(l,null,2);navigator.clipboard.writeText(p),this.toastr.success("Copied to clipboard!","Success")}static{this.\u0275fac=function(p){return new(p||n)}}static{this.\u0275cmp=x({type:n,selectors:[["app-order-api"]],decls:40,vars:9,consts:[["headerTitle","Origin Order Api",3,"hideSearchBox","hideSearchDropdown"],[1,"btn","btn-success","btn-fill","me-3",3,"click"],[1,"fa","fa-search"],[1,"container-fluid","mt-8","px-10"],[1,"row"],[1,"col-7"],[1,"d-flex","align-items-center"],[1,"w-75"],[1,"mb-0","text-muted","fst-italic"],[1,"w-100"],[3,"ngModelChange","ngModel"],[1,"d-flex","align-items-center","mt-3"],["type","text","placeholder","Order Number or Invoice Number",1,"form-control",3,"ngModelChange","ngModel"],[1,"row","mt-6"],[1,"col-12"],[1,"card"],[1,"card-header","d-flex","justify-content-between","align-items-center"],["type","button",1,"btn","btn-sm","btn-outline-primary",3,"click","disabled"],[1,"card-body"],[1,"col-sm-12"],[1,"form-group","position-relative"],["id","orderLogText"],[1,"text-center","my-12","text-muted"]],template:function(p,r){if(p&1){let a=L();e(0,"mainpanel",0)(1,"actions")(2,"button",1),g("click",function(){return s(a),m(r.fetchLog())}),A(3,"i",2),i(4," Search "),t()(),e(5,"content")(6,"div",3)(7,"div",4)(8,"div",5)(9,"div",6)(10,"div",7)(11,"h6"),i(12,"Channel"),t(),e(13,"p",8),i(14," View logs related to Order API activities. "),t()(),e(15,"div",9)(16,"channel-select-options",10),_("ngModelChange",function(o){return s(a),b(r.selectedChannel,o)||(r.selectedChannel=o),m(o)}),t()()(),e(17,"div",11)(18,"div",7)(19,"h6"),i(20,"Order Number"),t(),e(21,"p",8),i(22," Order or Invoice number from Channel. "),t()(),e(23,"div",9)(24,"input",12),_("ngModelChange",function(o){return s(a),b(r.orderNumber,o)||(r.orderNumber=o),m(o)}),t()()()()(),T(25),S(26,"async"),e(27,"div",13)(28,"div",14)(29,"div",15)(30,"div",16)(31,"h5"),i(32,"Response"),t(),e(33,"button",17),g("click",function(){s(a);let o=v(25);return m(r.copyToClipboard(o))}),i(34," Copy "),t()(),e(35,"div",18)(36,"div",19)(37,"div",20),M(38,z,3,3,"pre",21)(39,K,2,0,"p",22),t()()()()()()()()()}if(p&2){f("hideSearchBox",!0)("hideSearchDropdown",!0),d(16),C("ngModel",r.selectedChannel),d(8),C("ngModel",r.orderNumber),d();let a=V(w(26,6,r.orderLog$));d(8),f("disabled",!a),d(5),O(a?38:39)}},dependencies:[k,P,W,U,G,J,R,B,D,I,Y],encapsulation:2})}}return n})();export{ce as OrderApiComponent};
@@ -1,2 +0,0 @@
1
- import{g as f}from"./chunk-NFN7BQB3.js";import{a}from"./chunk-MW6Q6DZF.js";import{e as u}from"./chunk-W5L6FMO3.js";import{ea as h,ja as c,pa as s,v as p}from"./chunk-OJMQBH6T.js";var m=(()=>{class o{constructor(){}convertToCSV(t,e){let r;if(typeof t=="string")r=t;else{var i=typeof t=="object"?t:JSON.parse(t);r=this.transformToCSVStringFormat(i)}this.downloadCSV(r,e)}transformToCSVStringFormat(t){if(!t||!t.length)return;let e=",",r=Object.keys(t[0]);return t.map(l=>r.map(d=>{let n=l[d]===null||l[d]===void 0?"":l[d];return n=n instanceof Date?n.toLocaleString():n.toString().replace(/"/g,'""'),n.search(/("|,|\n)/g)>=0&&(n=`"${n}"`),n}).join(e)).join(`
2
- `)}downloadCSV(t,e){var r=new Blob([t],{type:"text/csv;charset=utf8;"}),i=document.createElement("a");i.setAttribute("href",window.URL.createObjectURL(r)),i.setAttribute("download",e),document.body.appendChild(i),i.click(),document.body.removeChild(i)}static{this.\u0275fac=function(e){return new(e||o)}}static{this.\u0275prov=c({token:o,factory:o.\u0275fac,providedIn:"root"})}}return o})();var V=(()=>{class o{constructor(){this.httpService=s(u),this.tokenService=s(f),this.exportService=s(m)}getShippedOrders(t){return this.httpService.post(a.GetShipped,t).pipe(p(e=>e.Data||[]))}getReadyToShipOrders(t){return this.httpService.post(a.GetToShip,t).pipe(p(e=>e?.Data))}getCompletedOrders(t){return this.httpService.post(a.GetCompleted,t).pipe(p(e=>e?.Data||[]))}getCancelledOrders(t){return this.httpService.post(a.GetCancelled,t).pipe(p(e=>e.Data))}getAwaitingCollectionOrders(t){return this.httpService.post(a.GetAwaitingCollection,t).pipe(p(e=>e?.Data))}getOrderDefaultValue(){let t=this.tokenService.getTokenValue(),e=Number(t?.orddfl??0),r=new Date;return e===0?null:new Date(r.setDate(r.getDate()-e))}getAllOrders(t){return this.httpService.post(a.GetAll,t).pipe(p(e=>e.Data))}exportOrders(t,e){return this.httpService.post("api/Orders/ExportOrder",t).pipe(h(r=>{this.exportService.convertToCSV(r,e)}))}refreshShippingCourier(t,e){let r={ShopID:t,OrderNumber:e};return this.httpService.post(a.RefreshShippingCourierAndRefNumber,r)}static{this.\u0275fac=function(e){return new(e||o)}}static{this.\u0275prov=c({token:o,factory:o.\u0275fac})}}return o})();export{V as a};
@@ -1 +0,0 @@
1
- import{a as ae}from"./chunk-WKSCLDT7.js";import{b as te}from"./chunk-YIXZLIPA.js";import"./chunk-HVCIQI7B.js";import"./chunk-QS22J2SC.js";import"./chunk-QP4C4R4W.js";import{a as oe}from"./chunk-PONMPAT5.js";import{a as ne}from"./chunk-ZBKUZ4CN.js";import{c as re,d as F,e as V}from"./chunk-I2Y5WJEO.js";import"./chunk-PPHTN2H6.js";import"./chunk-DZYBXWL2.js";import"./chunk-RHHHL4OR.js";import{a as ee}from"./chunk-DQ3XZQ7W.js";import"./chunk-5LQRO4AI.js";import"./chunk-MO53T3IK.js";import"./chunk-W3JTS22H.js";import"./chunk-SDUUFQUI.js";import"./chunk-6L7TD5DW.js";import"./chunk-WLRPCY65.js";import"./chunk-3RK6DDJD.js";import"./chunk-3UN6FPMN.js";import"./chunk-LDPDLCRL.js";import"./chunk-UMP6ZMEJ.js";import"./chunk-JVNHFIYT.js";import{a as ie}from"./chunk-QNM4JQ46.js";import"./chunk-3YP6ORBR.js";import"./chunk-VCTMSNVC.js";import{h as K}from"./chunk-NFN7BQB3.js";import"./chunk-Z3ITXK3D.js";import"./chunk-ACIMXBIC.js";import"./chunk-J53BPEDH.js";import"./chunk-TGMCGROM.js";import{a as D}from"./chunk-MW6Q6DZF.js";import{b as q,e as z}from"./chunk-W5L6FMO3.js";import"./chunk-K5XRGNWG.js";import"./chunk-PYXL7UF7.js";import{c as $}from"./chunk-PW42BQIY.js";import{d as Q,l as X,m as Y,n as Z}from"./chunk-FO7G4GMY.js";import{A as J,c as k,h as j,m as G,o as H}from"./chunk-5PS6ZS3N.js";import"./chunk-V3USB3ZU.js";import"./chunk-ERXVXBTU.js";import"./chunk-NNRBGHXB.js";import"./chunk-BJUPMCEP.js";import{g as B,j as U,m as x,n as W}from"./chunk-FXQKRJWU.js";import{$c as P,G as R,Gb as L,Gc as g,Kc as w,Lc as S,Mb as y,Mc as b,Nc as O,Qc as A,Ra as I,Yb as m,Z as N,ad as C,ea as T,ic as r,jc as p,kc as v,oc as M,pa as f,rb as d,tc as u,uc as _,xb as h,ya as s,za as l}from"./chunk-OJMQBH6T.js";import"./chunk-EU2KAMEK.js";import"./chunk-66YHNWRR.js";function se(c,E){if(c&1){let t=M();r(0,"button",16),u("click",function(){s(t);let e=_().ngIf,o=_();return l(o.onUpdateItems(e))}),v(1,"i",17),g(2," Update "),p()}}function le(c,E){if(c&1&&(r(0,"div"),y(1,se,3,0,"button",15),p()),c&2){let t=E.ngIf,i=_();d(),m("ngIf",i.productService.hasSelectionVariant(t))}}var Ae=(()=>{class c{constructor(t,i,e,o,a){this.http=t,this.toastr=i,this.dialog=e,this.productService=o,this.authService=a,this.infinitePagination=f(F),this.updateResHandling=f(V),this.mainPanelService=f(X),this.channelOptions=I([]),this.searchFilter=I({PageNumber:1,RowCount:50,filterModel:1,text:"",ListChannelID:[]}),this.loaderAPI="PriceLoader/LoadMultiple",this.getDataAPI="Price/GetMultipleChannelComparison",this.rowCountAPI="Inventory/GetMultipleChannelComparisonRowCount",this.data$=this.infinitePagination.data$.pipe(N())}ngOnInit(){this.initPageLoader()}initPageLoader(){this.infinitePagination.fetchDataEndpoint=this.getDataAPI,this.infinitePagination.fethRowCountEndpoint=this.rowCountAPI,this.loader$=this.http.post(`/api/${this.loaderAPI}`).pipe(T(t=>{t.Filter={PageNumber:t.Filter.PageNumber,RowCount:t.Filter.RowCount,filterModel:1},this.searchFilter.set(t.Filter),this.mainPanelService.openModalFilter()}))}onShowDifferencePrice(t){let i=1;t&&(i=3),this.searchFilter.update(e=>(e.filterModel=i,e)),this.infinitePagination.reloadPagination(this.searchFilter())}onSearch(t){this.searchFilter.update(i=>(i.text=t,i)),this.infinitePagination.reloadPagination(this.searchFilter()),this.filterSelectedChannels()}onUpdateItems(t){let i=JSON.parse(JSON.stringify(this.channelOptions())),e=this.productService.selectedVariantProduct(t);this.dialog.open(ne,{data:{title:"Updating Price",selectedItems:e,channels:i},width:"400px"}).afterClosed().pipe(R(o=>$.IsNotEmpty(o))).subscribe(o=>{this.channelOptions.set(o),this.updatePrice(t)})}filterSelectedChannels(){let i=this.authService.getChannels().filter(e=>this.searchFilter().ListChannelID?.indexOf(e.ID)!==-1);this.channelOptions.set(i)}updatePrice(t){let i=this.productService.selectedVariantProduct(t);if(i.length>0){let e=i.map(n=>({ID:n.ID,Code:n.Code,Price:n.UnitPrice})),a={ListChannelID:this.getSelectedChannels().map(n=>n.ID),ListPrice:e};this.http.post(D.UpdateChannelPrice,a).subscribe(n=>{this.infinitePagination.reloadPagination(this.searchFilter()),this.handlingUpdatePrice(n),this.resetSelectedChannels()})}}updatePriceByVariant(t){let i={ID:t.ChannelID,ChannelItemID:t.ChannelItemID,ChannelVariantID:t.ChannelVariationID,Price:t.Price-0,VariantID:t.ID};this.http.post(D.UpdatePriceById,i).subscribe(e=>{this.infinitePagination.reloadPagination(this.searchFilter()),this.handlingUpdatePrice(e)})}handlingUpdatePrice(t){let i=t?.Response?.success_list,e=t?.Response?.failure_list,o=this.getSelectedChannels();i?.length>0||e?.length>0?this.updateResHandling.responseHandling(i,e,"Price",o):this.toastr.error(t[0]?.Exception,"Error")}openExportDialog(){this.dialog.open(te,{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()}resetSelectedChannels(){this.channelOptions.update(t=>(t.forEach(i=>{i.selected=!1}),t))}getSelectedChannels(){return this.channelOptions().filter(t=>t.selected)}static{this.\u0275fac=function(i){return new(i||c)(h(z),h(q),h(Q),h(ee),h(K))}}static{this.\u0275cmp=L({type:c,selectors:[["app-price-pos-channel"]],features:[A([F,x,ae,V])],decls:32,vars:23,consts:[["headerTitle","Price Comparison","textButton","Search",3,"onSubmit"],[1,"d-flex"],[4,"ngIf"],[1,"btn","btn-outline-secondary","shadow","rounded","ms-2",3,"click"],[1,"fa-solid","fa-print","me-3"],[1,"mb-5"],[1,"fw-bold","mb-2"],[3,"ngModelChange","multiple","ngModel"],[1,"fw-bold"],["type","number",1,"form-control","mt-2",3,"ngModelChange","ngModel"],[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,e){if(i&1){let o=M();O(0),P(1,"async"),r(2,"mainpanel",0),u("onSubmit",function(n){return s(o),l(e.onSearch(n))}),r(3,"actions")(4,"div",1),y(5,le,2,1,"div",2),P(6,"async"),r(7,"button",3),u("click",function(){return s(o),l(e.openExportDialog())}),v(8,"i",4),r(9,"span"),g(10,"Export"),p()()()(),r(11,"filters")(12,"div",5)(13,"label",6),g(14,"Channel"),p(),r(15,"channel-select-options",7),b("ngModelChange",function(n){return s(o),S(e.searchFilter().ListChannelID,n)||(e.searchFilter().ListChannelID=n),l(n)}),p()(),r(16,"div",5)(17,"label",8),g(18,"Page Number"),p(),r(19,"input",9),b("ngModelChange",function(n){return s(o),S(e.searchFilter().PageNumber,n)||(e.searchFilter().PageNumber=n),l(n)}),p()(),r(20,"div")(21,"label",8),g(22,"Page Size"),p(),r(23,"input",9),b("ngModelChange",function(n){return s(o),S(e.searchFilter().RowCount,n)||(e.searchFilter().RowCount=n),l(n)}),p()()(),r(24,"content")(25,"div",10)(26,"div",11)(27,"div",12)(28,"app-table",13),P(29,"async"),u("onToggle",function(n){return s(o),l(e.onShowDifferencePrice(n))})("onSubmit",function(n){return s(o),l(e.updatePriceByVariant(n))}),p(),r(30,"infinite-paginator",14),P(31,"async"),u("onNextPage",function(){return s(o),l(e.infinitePagination.onNextPage(e.searchFilter()))})("onLastPage",function(){return s(o),l(e.infinitePagination.onLastPage(e.searchFilter()))})("onGetRowCount",function(){return s(o),l(e.infinitePagination.getRowCount(e.searchFilter()))}),p()()()()()()}i&2&&(C(1,15,e.loader$),d(5),m("ngIf",C(6,17,e.data$)),d(10),m("multiple",!0),w("ngModel",e.searchFilter().ListChannelID),d(4),w("ngModel",e.searchFilter().PageNumber),d(4),w("ngModel",e.searchFilter().RowCount),d(5),m("showProductToggle",!0)("data",C(29,19,e.data$))("channel",e.channelOptions())("hiddenIPOSInventory",!1),d(2),m("totalData",e.infinitePagination.totalData())("hideCount",e.infinitePagination.hideCount())("rowCount",C(31,21,e.infinitePagination.totalRowCount$))("pageNumber",e.infinitePagination.pageNumber())("disableNextButton",e.infinitePagination.disableNextButton())("goToLastPage",e.infinitePagination.isLastPage()))},dependencies:[W,B,U,J,k,H,j,G,re,Z,Y,oe,ie],styles:[".no-bullet[_ngcontent-%COMP%]{list-style-type:none}"]})}}return c})();export{Ae as PricePosChannelComponent};