marketplacepos 5.41.2 → 5.41.4

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 (218) hide show
  1. package/Marketplace/3rdpartylicenses.txt +123 -123
  2. package/Marketplace/chunk-2BBMPSAE.js +93 -0
  3. package/Marketplace/chunk-3CZJUTLZ.js +1 -0
  4. package/Marketplace/chunk-4ASUM4N5.js +1 -0
  5. package/Marketplace/chunk-4G3QN54S.js +193 -0
  6. package/Marketplace/chunk-4S4G5UPJ.js +1 -0
  7. package/Marketplace/{chunk-4DV4IT7R.js → chunk-5FEQZAWX.js} +1 -1
  8. package/Marketplace/{chunk-UMY6NG57.js → chunk-5GX2GLRY.js} +1 -1
  9. package/Marketplace/{chunk-25OT4I3W.js → chunk-5MRT2EFE.js} +1 -1
  10. package/Marketplace/chunk-62PFQNHJ.js +1 -0
  11. package/Marketplace/chunk-6ALHX2I4.js +1 -0
  12. package/Marketplace/{chunk-SYENQYR7.js → chunk-6IAGGRZN.js} +1 -1
  13. package/Marketplace/{chunk-FWG4H3QG.js → chunk-6NNAICJE.js} +1 -1
  14. package/Marketplace/{chunk-WGXUKTYP.js → chunk-6XFYITUD.js} +1 -1
  15. package/Marketplace/chunk-742J5UZZ.js +1 -0
  16. package/Marketplace/{chunk-4CTORK4F.js → chunk-7477X7LJ.js} +1 -1
  17. package/Marketplace/{chunk-R76V3PTN.js → chunk-75BDXSG3.js} +10 -10
  18. package/Marketplace/{chunk-ACIMXBIC.js → chunk-77IUCPIQ.js} +1 -1
  19. package/Marketplace/{chunk-ZR5IXNXB.js → chunk-7FUVW73P.js} +1 -1
  20. package/Marketplace/chunk-7G53KEUW.js +1 -0
  21. package/Marketplace/chunk-7GQIIDFF.js +4 -0
  22. package/Marketplace/chunk-7P3SGW2P.js +1 -0
  23. package/Marketplace/{chunk-PO7JVKK3.js → chunk-7TWBIV3T.js} +1 -1
  24. package/Marketplace/chunk-AIIRPK4M.js +1 -0
  25. package/Marketplace/chunk-B54QGLED.js +2 -0
  26. package/Marketplace/chunk-BG6DO7RW.js +5 -0
  27. package/Marketplace/{chunk-4M63ID5T.js → chunk-BUFEIJAI.js} +1 -1
  28. package/Marketplace/{chunk-SIYMMMKQ.js → chunk-CH2MLZU7.js} +1 -1
  29. package/Marketplace/{chunk-KX5AWR75.js → chunk-COBHWPGI.js} +1 -1
  30. package/Marketplace/chunk-D54NUPYF.js +153 -0
  31. package/Marketplace/chunk-DPLEMBB4.js +1 -0
  32. package/Marketplace/{chunk-R5TTZPDX.js → chunk-DVE7IIN7.js} +11 -11
  33. package/Marketplace/{chunk-PBGDP6XV.js → chunk-E3HHEPKQ.js} +1 -1
  34. package/Marketplace/chunk-E3HMIPER.js +2 -0
  35. package/Marketplace/{chunk-KQQCKHF3.js → chunk-E6HA2AGS.js} +1 -1
  36. package/Marketplace/{chunk-JOBWFOGC.js → chunk-EGTYAIU5.js} +1 -1
  37. package/Marketplace/chunk-EYNCNJ3I.js +1 -0
  38. package/Marketplace/chunk-FX6CFPPN.js +1 -0
  39. package/Marketplace/chunk-G5CQLP7H.js +1 -0
  40. package/Marketplace/{chunk-OKAPL3YZ.js → chunk-G6EG5QJS.js} +1 -1
  41. package/Marketplace/{chunk-IKPRRD5D.js → chunk-GBABJLPQ.js} +1 -1
  42. package/Marketplace/{chunk-MCJRJUAO.js → chunk-GCJBQRHI.js} +1 -1
  43. package/Marketplace/{chunk-ZIOAOUAM.js → chunk-GHQH62TZ.js} +1 -1
  44. package/Marketplace/chunk-GPEVUTDI.js +2 -0
  45. package/Marketplace/chunk-HMB7FZD7.js +1 -0
  46. package/Marketplace/chunk-HNYOBOEW.js +4 -0
  47. package/Marketplace/chunk-HUMGZRJQ.js +1 -0
  48. package/Marketplace/{chunk-GPC4DECX.js → chunk-ICSMRW7O.js} +1 -1
  49. package/Marketplace/chunk-IIJMZKPL.js +1 -0
  50. package/Marketplace/{chunk-6X2OBNJQ.js → chunk-ITTRZMEX.js} +4 -4
  51. package/Marketplace/{chunk-A2YNWIX6.js → chunk-IYYVZ6B6.js} +1 -1
  52. package/Marketplace/{chunk-XQGRC7V2.js → chunk-J3P46Z53.js} +1 -1
  53. package/Marketplace/{chunk-LHD7CYML.js → chunk-J7AGLBPL.js} +1 -1
  54. package/Marketplace/{chunk-NRCXYGO3.js → chunk-JBKHY4HH.js} +5 -5
  55. package/Marketplace/chunk-JTZJTXCN.js +1 -0
  56. package/Marketplace/chunk-K2H6WANG.js +1 -0
  57. package/Marketplace/chunk-K3FQGMAY.js +1 -0
  58. package/Marketplace/chunk-KC2DJUBC.js +1 -0
  59. package/Marketplace/{chunk-HPYTL6TX.js → chunk-KHWTOD6H.js} +1 -1
  60. package/Marketplace/chunk-KOJ2R5XW.js +1 -0
  61. package/Marketplace/chunk-KVP6OL4J.js +2 -0
  62. package/Marketplace/{chunk-2TZBEYNY.js → chunk-KXZCGKQW.js} +1 -1
  63. package/Marketplace/chunk-L4JWBBBC.js +1 -0
  64. package/Marketplace/chunk-LEMNVA5V.js +3 -0
  65. package/Marketplace/chunk-LFJIZAV2.js +15 -0
  66. package/Marketplace/chunk-LJTMOYLO.js +1 -0
  67. package/Marketplace/chunk-LPXBSHUI.js +180 -0
  68. package/Marketplace/{chunk-LSXUXG54.js → chunk-M3SJUKTG.js} +1 -1
  69. package/Marketplace/chunk-MATSRG2L.js +447 -0
  70. package/Marketplace/{chunk-XEMNZHW6.js → chunk-MNFHFW3E.js} +1 -1
  71. package/Marketplace/chunk-O5SSMLCS.js +1 -0
  72. package/Marketplace/{chunk-YPVYJUXS.js → chunk-OAS72QB2.js} +1 -1
  73. package/Marketplace/chunk-OAVAVDIP.js +1 -0
  74. package/Marketplace/{chunk-TNKPTRB3.js → chunk-OE2JYQHN.js} +1 -1
  75. package/Marketplace/{chunk-6MPSYC77.js → chunk-OLSC6KHB.js} +1 -1
  76. package/Marketplace/{chunk-JRWFZQ5K.js → chunk-PPDHTO44.js} +1 -1
  77. package/Marketplace/chunk-PQ6Z7K5L.js +1 -0
  78. package/Marketplace/chunk-PXB4YEY3.js +1 -0
  79. package/Marketplace/chunk-PZTMYAA7.js +1 -0
  80. package/Marketplace/{chunk-M5IQRAHV.js → chunk-Q2OEJFVT.js} +1 -1
  81. package/Marketplace/{chunk-6LH7FSOW.js → chunk-Q72ZXPDP.js} +1 -1
  82. package/Marketplace/{chunk-SXLKJLAE.js → chunk-QCZIDOKW.js} +1 -1
  83. package/Marketplace/chunk-QJFAPDI7.js +1 -0
  84. package/Marketplace/chunk-REYGC4GG.js +1 -0
  85. package/Marketplace/{chunk-FBZW4Y3J.js → chunk-RGR34QZ3.js} +1 -1
  86. package/Marketplace/{chunk-MQXPOHBV.js → chunk-RIHLYYZU.js} +1 -1
  87. package/Marketplace/{chunk-55OI2SUF.js → chunk-RVYGL22E.js} +1 -1
  88. package/Marketplace/chunk-S7LCZRSD.js +1 -0
  89. package/Marketplace/chunk-SL4ID42P.js +1 -0
  90. package/Marketplace/chunk-SZ6MQ6EW.js +1 -0
  91. package/Marketplace/chunk-T5ONJF63.js +7 -0
  92. package/Marketplace/chunk-T6QOFDEE.js +1 -0
  93. package/Marketplace/{chunk-HFKKITEW.js → chunk-TMFFA26Y.js} +1 -1
  94. package/Marketplace/chunk-TXPNZLOJ.js +5 -0
  95. package/Marketplace/chunk-TZXF4K2V.js +1 -0
  96. package/Marketplace/{chunk-GHBGGQNM.js → chunk-UBMI3NQH.js} +1 -1
  97. package/Marketplace/chunk-UUUVVJG4.js +2 -0
  98. package/Marketplace/{chunk-5XI7HWS5.js → chunk-V2OJQHE3.js} +2 -2
  99. package/Marketplace/{chunk-TGMCGROM.js → chunk-V5WYSCVT.js} +1 -1
  100. package/Marketplace/chunk-VDSO2BHA.js +1 -0
  101. package/Marketplace/chunk-VETHPEVU.js +1 -0
  102. package/Marketplace/{chunk-SH7KN2AS.js → chunk-VGXQU74M.js} +1 -1
  103. package/Marketplace/chunk-VSEWXNVC.js +291 -0
  104. package/Marketplace/{chunk-OZ77CAJD.js → chunk-WAW37FIG.js} +1 -1
  105. package/Marketplace/chunk-XFCMKJV6.js +1 -0
  106. package/Marketplace/chunk-XM6GN4VF.js +1 -0
  107. package/Marketplace/chunk-Y7VC2AGS.js +1 -0
  108. package/Marketplace/chunk-YIUQQGOQ.js +1 -0
  109. package/Marketplace/chunk-YPM6IC2W.js +1 -0
  110. package/Marketplace/{chunk-UPYS4A4M.js → chunk-YXFTLQ5M.js} +1 -1
  111. package/Marketplace/chunk-Z46DDENN.js +1 -0
  112. package/Marketplace/{chunk-E2CS7ZMC.js → chunk-ZD5LURJS.js} +1 -1
  113. package/Marketplace/{chunk-WHZ44BAL.js → chunk-ZZVNB72Q.js} +1 -1
  114. package/Marketplace/index.html +3 -3
  115. package/Marketplace/main-5HHAD6NX.js +1 -0
  116. package/Marketplace/{styles-X3FXEB7T.css → styles-NJFTKO3E.css} +1 -1
  117. package/package.json +1 -1
  118. package/Marketplace/chunk-2BUABOHG.js +0 -1
  119. package/Marketplace/chunk-2SXRC4IG.js +0 -1
  120. package/Marketplace/chunk-2ZTDLZVZ.js +0 -1
  121. package/Marketplace/chunk-33IXC6UG.js +0 -1
  122. package/Marketplace/chunk-4HZR3O3W.js +0 -1
  123. package/Marketplace/chunk-4JG3ZRYP.js +0 -5
  124. package/Marketplace/chunk-4PZ5Q3HI.js +0 -1
  125. package/Marketplace/chunk-4YOHPIVG.js +0 -1
  126. package/Marketplace/chunk-5B4KSPFM.js +0 -1
  127. package/Marketplace/chunk-5DIRXS7I.js +0 -1
  128. package/Marketplace/chunk-5EQNOCXP.js +0 -1
  129. package/Marketplace/chunk-5JYR3YJW.js +0 -1
  130. package/Marketplace/chunk-5QAURMZF.js +0 -222
  131. package/Marketplace/chunk-5ZX2OVBB.js +0 -1
  132. package/Marketplace/chunk-66YHNWRR.js +0 -1
  133. package/Marketplace/chunk-6IFZ2TO6.js +0 -1
  134. package/Marketplace/chunk-6RSAOZUV.js +0 -1
  135. package/Marketplace/chunk-6SBCWEJJ.js +0 -1
  136. package/Marketplace/chunk-6UEHSA6E.js +0 -1
  137. package/Marketplace/chunk-7H5ILTTK.js +0 -1
  138. package/Marketplace/chunk-A4F37V57.js +0 -1
  139. package/Marketplace/chunk-AGRVVEIR.js +0 -397
  140. package/Marketplace/chunk-ALKC77XL.js +0 -78
  141. package/Marketplace/chunk-AVEGIEYT.js +0 -193
  142. package/Marketplace/chunk-BBVWQJ7M.js +0 -1
  143. package/Marketplace/chunk-BM4KX73T.js +0 -1
  144. package/Marketplace/chunk-BQTUAYGY.js +0 -1
  145. package/Marketplace/chunk-C7QA2BEN.js +0 -3
  146. package/Marketplace/chunk-CEQA4PTY.js +0 -1
  147. package/Marketplace/chunk-CMZW5QAE.js +0 -1
  148. package/Marketplace/chunk-CSSG7NAJ.js +0 -1
  149. package/Marketplace/chunk-DG32XLYI.js +0 -1
  150. package/Marketplace/chunk-DJILLV4M.js +0 -1
  151. package/Marketplace/chunk-DS4AAABV.js +0 -1
  152. package/Marketplace/chunk-EL2JACEW.js +0 -1
  153. package/Marketplace/chunk-EU2KAMEK.js +0 -1
  154. package/Marketplace/chunk-EVLYO3HX.js +0 -1
  155. package/Marketplace/chunk-F4GMWHYJ.js +0 -33
  156. package/Marketplace/chunk-FFAZ3Q3F.js +0 -1
  157. package/Marketplace/chunk-FUWROOE4.js +0 -265
  158. package/Marketplace/chunk-GCECFUOP.js +0 -1
  159. package/Marketplace/chunk-GOS4RIF2.js +0 -1
  160. package/Marketplace/chunk-GZXQUJKX.js +0 -1
  161. package/Marketplace/chunk-H4PA2O6O.js +0 -1
  162. package/Marketplace/chunk-H6WIS2HR.js +0 -2
  163. package/Marketplace/chunk-HPGFBOM4.js +0 -1
  164. package/Marketplace/chunk-HTQJCQ32.js +0 -1
  165. package/Marketplace/chunk-IARG7PLL.js +0 -1
  166. package/Marketplace/chunk-IIMHYIRJ.js +0 -1
  167. package/Marketplace/chunk-JS55A2RS.js +0 -7
  168. package/Marketplace/chunk-JV4MMNGD.js +0 -79
  169. package/Marketplace/chunk-K6YEZYU4.js +0 -5
  170. package/Marketplace/chunk-KJHSB4A2.js +0 -1
  171. package/Marketplace/chunk-KOKHDU4I.js +0 -1
  172. package/Marketplace/chunk-KTIKLSOU.js +0 -1
  173. package/Marketplace/chunk-KTXS7IPU.js +0 -1
  174. package/Marketplace/chunk-KWQS4KX7.js +0 -1
  175. package/Marketplace/chunk-KXS76PRS.js +0 -70
  176. package/Marketplace/chunk-KYIY3VQ6.js +0 -141
  177. package/Marketplace/chunk-LOPJ3O56.js +0 -1
  178. package/Marketplace/chunk-LR4UZ2OS.js +0 -30
  179. package/Marketplace/chunk-LWSRD5LF.js +0 -1
  180. package/Marketplace/chunk-MGVYUYPC.js +0 -15
  181. package/Marketplace/chunk-MP43HA4R.js +0 -1
  182. package/Marketplace/chunk-MTUIRWOB.js +0 -2
  183. package/Marketplace/chunk-MZI5AYCE.js +0 -1
  184. package/Marketplace/chunk-NTW6FBP5.js +0 -1
  185. package/Marketplace/chunk-NZA4BEER.js +0 -102
  186. package/Marketplace/chunk-O55KM5KY.js +0 -1
  187. package/Marketplace/chunk-OZ7LWNOK.js +0 -15
  188. package/Marketplace/chunk-P5FCWMYK.js +0 -1
  189. package/Marketplace/chunk-PE5AFID4.js +0 -1
  190. package/Marketplace/chunk-PEA6KVUS.js +0 -252
  191. package/Marketplace/chunk-PW42BQIY.js +0 -1
  192. package/Marketplace/chunk-Q6V3IOGL.js +0 -1
  193. package/Marketplace/chunk-REL734JM.js +0 -1
  194. package/Marketplace/chunk-RHRJXX4W.js +0 -1
  195. package/Marketplace/chunk-S3YMF63V.js +0 -1
  196. package/Marketplace/chunk-SD7M7HOB.js +0 -1
  197. package/Marketplace/chunk-SLQA5QBT.js +0 -1
  198. package/Marketplace/chunk-SRJREA2O.js +0 -5
  199. package/Marketplace/chunk-T4K3CJ2R.js +0 -1
  200. package/Marketplace/chunk-TQ4ZLZ7C.js +0 -1
  201. package/Marketplace/chunk-TQIIWFRF.js +0 -1
  202. package/Marketplace/chunk-UDQBFSOV.js +0 -1
  203. package/Marketplace/chunk-UF4FKEE7.js +0 -93
  204. package/Marketplace/chunk-UJYSVGLV.js +0 -1
  205. package/Marketplace/chunk-UYW53K3I.js +0 -1
  206. package/Marketplace/chunk-VRI3CYGG.js +0 -1
  207. package/Marketplace/chunk-WTAJSWM2.js +0 -4
  208. package/Marketplace/chunk-WX5S3HCU.js +0 -1
  209. package/Marketplace/chunk-XGYBJAFE.js +0 -1
  210. package/Marketplace/chunk-YP2IPJ2O.js +0 -1
  211. package/Marketplace/chunk-Z3ITXK3D.js +0 -1
  212. package/Marketplace/chunk-Z3KD73SP.js +0 -2
  213. package/Marketplace/chunk-ZAVDOMSW.js +0 -1
  214. package/Marketplace/chunk-ZGZ74AJR.js +0 -1
  215. package/Marketplace/chunk-ZIUDNFYT.js +0 -1
  216. package/Marketplace/chunk-ZLNGASME.js +0 -1
  217. package/Marketplace/chunk-ZNDU44GH.js +0 -51
  218. package/Marketplace/main-SPNULRF2.js +0 -1
@@ -1 +0,0 @@
1
- import{a as M}from"./chunk-REL734JM.js";import{a as fe}from"./chunk-ZNDU44GH.js";import"./chunk-F4GMWHYJ.js";import{a as D}from"./chunk-5DIRXS7I.js";import"./chunk-VRI3CYGG.js";import"./chunk-AVEGIEYT.js";import{a as re}from"./chunk-Z3ITXK3D.js";import{a as pe}from"./chunk-ACIMXBIC.js";import"./chunk-CMZW5QAE.js";import{b as ae}from"./chunk-4M63ID5T.js";import"./chunk-K5XRGNWG.js";import{c as oe}from"./chunk-PW42BQIY.js";import{m as ce,n as ue}from"./chunk-6X2OBNJQ.js";import{z as ie}from"./chunk-CSSG7NAJ.js";import"./chunk-MZI5AYCE.js";import{b as le,c as se}from"./chunk-UJYSVGLV.js";import{r as de,s as me}from"./chunk-HFKKITEW.js";import"./chunk-OZ77CAJD.js";import{E as Y,G as ee,H as te,J as ne,d as K,g as Q,j as W,m as X,n as S}from"./chunk-MTUIRWOB.js";import{$c as y,Gb as x,Gc as s,Hc as v,Ic as z,Jb as F,Mb as c,Nc as q,Oc as $,Pc as C,Qc as j,Sc as I,Tc as J,Yb as p,Z as V,aa as w,ac as U,ad as _,dc as P,ec as k,gc as A,hc as H,ic as a,jc as r,kc as u,lc as g,mc as h,ob as L,oc as B,pa as b,rb as l,rd as Z,tc as G,uc as m,v as T,ya as R,za as N}from"./chunk-JS55A2RS.js";import"./chunk-EU2KAMEK.js";import{a as E,b as O}from"./chunk-66YHNWRR.js";var ge=(()=>{class t{transform(e){return typeof e=="number"&&(e=e.toString()),e!=null?e.replace(/\n/g,"<br />"):e}static{this.\u0275fac=function(o){return new(o||t)}}static{this.\u0275pipe=F({name:"newlines",type:t,pure:!0})}}return t})();var Ce=t=>({disabled:t}),ye=(t,d)=>({labelFilledInput:t,labelEmptyInput:d});function _e(t,d){if(t&1&&(a(0,"p"),s(1),y(2,"number"),r()),t&2){let e=m();l(),v(e.inputValueType()==="number"?_(2,1,e.inputValue):e.inputValue)}}function xe(t,d){if(t&1&&(u(0,"p",3),y(1,"newlines")),t&2){let e=m();p("innerHTML",_(1,1,e.inputValue),L)}}function Ie(t,d){if(t&1&&(g(0),s(1),h()),t&2){let e=m();l(),z(" ",e.labelValue," ")}}var he=(()=>{class t{constructor(){this.inputValue="",this.labelValue="",this.inputType="input",this.labelVisible=!0,this.disabled=!1,this.class="mb-6",this.tooltip="",this.isInputFilled=!1,this.isNotEmpty=pe.IsNotEmpty}inputValueType(){return typeof this.inputValue}static{this.\u0275fac=function(o){return new(o||t)}}static{this.\u0275cmp=x({type:t,selectors:[["lib-info-page-input"]],inputs:{inputValue:"inputValue",labelValue:"labelValue",inputType:"inputType",labelVisible:"labelVisible",disabled:"disabled",class:"class",tooltip:"tooltip"},decls:5,vars:14,consts:[["matTooltipPosition","above",3,"ngClass","matTooltip"],[4,"ngIf"],[3,"innerHTML",4,"ngIf"],[3,"innerHTML"]],template:function(o,n){o&1&&(a(0,"div",0),c(1,_e,3,3,"p",1)(2,xe,2,3,"p",2),a(3,"label"),c(4,Ie,2,1,"ng-container",1),r()()),o&2&&(U(n.class),p("ngClass",I(9,Ce,n.disabled))("matTooltip",n.tooltip),l(),p("ngIf",n.isNotEmpty(n.inputValue)&&n.inputType=="input"),l(),p("ngIf",n.isNotEmpty(n.inputValue)&&n.inputType=="textarea"),l(),U(J(11,ye,n.isNotEmpty(n.inputValue),!n.isNotEmpty(n.inputValue))),l(),p("ngIf",n.labelVisible))},dependencies:[S,K,Q,X,ge,me,de],styles:["div[_ngcontent-%COMP%]{border:1px solid #ced4da;position:relative;margin-bottom:1rem;border-radius:.25rem!important}p[_ngcontent-%COMP%]{margin-top:18px;margin-bottom:18px;padding-left:.75rem!important;font-size:.875rem}.labelFilledInput[_ngcontent-%COMP%]{position:absolute;top:-10px;left:10px;background:#fff;padding-left:4px;padding-right:4px;font-size:.75rem!important;color:#9da2a6}.labelEmptyInput[_ngcontent-%COMP%]{margin-top:18px;margin-bottom:18px;padding-left:.75rem!important;font-size:.875rem;color:#ccc}.disabled[_ngcontent-%COMP%]{background-color:#e9ecef;opacity:1}"]})}}return t})();var Se=t=>({ID:t});function Te(t,d){if(t&1){let e=B();a(0,"button",23),G("click",function(){R(e);let n=m(2),i=C(0);return N(n.onDeleteUser(i==null||i.selectedUser==null?null:i.selectedUser.ID))}),u(1,"i",24),s(2," Delete "),r()}}function Ue(t,d){if(t&1&&(g(0),c(1,Te,3,0,"button",22),h()),t&2){let e,o=m(),n=C(0);l(),P((n==null||n.selectedUser==null?null:n.selectedUser.Name)!==((e=o.currentLoginUser())==null?null:e.username)?1:-1)}}function Pe(t,d){if(t&1&&(g(0),a(1,"a",25),u(2,"i",26),s(3," Edit "),r(),h()),t&2){m();let e=C(0);l(),p("queryParams",I(1,Se,e==null||e.selectedUser==null?null:e.selectedUser.ID))}}function De(t,d){t&1&&(a(0,"div",19),s(1," All channels assigned to this user "),r())}function Me(t,d){if(t&1&&u(0,"p-chip",27),t&2){let e=d.$implicit;p("label",e.Name)("image",e.logo)("alt",e.Name)}}function Ee(t,d){if(t&1&&A(0,Me,1,3,"p-chip",27,k),t&2){m();let e=C(0);H(e==null?null:e.selectedChannels)}}var ot=(()=>{class t{constructor(){this.userService=b(M),this.activatedRoute=b(Y),this.toastService=b(ae),this.router=b(ee),this.userLoader$=this.activatedRoute.queryParams.pipe(w(e=>{let o=e.ID||null;return this.userService.getUserFormLoader(o).pipe(V(1),T(n=>(n.Options.Channels=oe.assignChannelLogo(n.Options.Channels),n)))}),T(e=>{let o=e.Options.Users.find(f=>f.ID===e.Form?.ID),n=e.Options.Groups.find(f=>f.ID===e.Form?.GroupID),i=e.Options.Channels.filter(f=>e.UserChannels?.includes(f.ID));return O(E({},e),{selectedUser:o||null,selectedGroup:n||null,selectedChannels:i||[],DownloadOrderDaysRange:e.Form?.DownloadOrderDaysRange||"0"})})),this.userEditRole=D.UserEdit,this.userDeleteRole=D.UserDelete,this.currentLoginUser=Z(()=>{let e=localStorage.getItem(re.AUTHORIZATION);return e?JSON.parse(e):null})}onDeleteUser(e){confirm("Are you sure you want to delete this user?")&&this.userService.deleteUsers([e]).subscribe({next:()=>{this.router.navigate(["/menu/users/users"]),this.toastService.success("User deleted successfully","Success")}})}static{this.\u0275fac=function(o){return new(o||t)}}static{this.\u0275cmp=x({type:t,selectors:[["app-user-info"]],features:[j([M])],decls:53,vars:12,consts:[[3,"headerTitle","hideSearchBox","hideSearchDropdown"],["role","group","aria-label","User Actions",1,"btn-group"],[4,"ngxPermissionsOnly"],[1,"container-fluid","py-5","bg-light-gray"],[1,"row","mt-8"],[1,"col-12"],[1,"card"],[1,"card-header"],[1,"card-body","mt-8","pb-4"],[1,"row"],[1,"col-6"],[1,"info-label-group"],[1,"card-body","mt-8","pb-10"],["id","myTab","role","tablist",1,"nav","nav-tabs"],["role","presentation",1,"nav-item"],["id","channel-tab","data-bs-toggle","tab","data-bs-target","#channel-tab-pane","type","button","role","tab","aria-controls","channel-tab-pane","aria-selected","true",1,"nav-link","active"],["id","restriction-tab","data-bs-toggle","tab","data-bs-target","#restriction-tab-pane","type","button","role","tab","aria-controls","restriction-tab-pane","aria-selected","false",1,"nav-link"],["id","myTabContent",1,"tab-content","mt-3"],["id","channel-tab-pane","role","tabpanel","aria-labelledby","channel-tab","tabindex","0",1,"tab-pane","fade","show","active"],[1,"text-center","mt-5","fs-5","opacity-50"],["id","restriction-tab-pane","role","tabpanel","aria-labelledby","restriction-tab-pane","tabindex","1",1,"tab-pane","fade"],["tooltip","How many days of past orders this user can download.","labelValue","Download Order Days Range","inputType","input",3,"inputValue"],[1,"btn","btn-outline-secondary"],[1,"btn","btn-outline-secondary",3,"click"],[1,"fa","fa-trash","me-1"],["role","button","routerLink","/menu/users/users/form",1,"btn","btn-outline-secondary",3,"queryParams"],[1,"fa","fa-edit","me-1"],[1,"me-3","mb-3",2,"--p-chip-image-width","1.2rem","--p-chip-image-height","1.2rem","--p-chip-padding-x","1rem","--p-chip-padding-y","0.5rem","--p-chip-border-radius","0.5rem","--p-chip-font-size","1.2rem",3,"label","image","alt"]],template:function(o,n){if(o&1&&(q(0),y(1,"async"),a(2,"mainpanel",0)(3,"actions")(4,"div",1),c(5,Ue,2,1,"ng-container",2)(6,Pe,4,3,"ng-container",2),r()(),a(7,"content")(8,"div",3)(9,"div",4)(10,"div",5)(11,"div",6)(12,"div",7)(13,"h3"),s(14,"User Information"),r()(),a(15,"div",8)(16,"div",9)(17,"div",10)(18,"div",11)(19,"label"),s(20,"Selected User"),r(),a(21,"div")(22,"span"),s(23),r()()()(),a(24,"div",10)(25,"div",11)(26,"label"),s(27,"Selected Group"),r(),a(28,"div")(29,"span"),s(30),r()()()()()()()()(),a(31,"div",9)(32,"div",5)(33,"div",6)(34,"div",7)(35,"h3"),s(36,"Advanced"),r()(),a(37,"div",12)(38,"ul",13)(39,"li",14)(40,"button",15),s(41," Channels "),r()(),a(42,"li",14)(43,"button",16),s(44," Restriction "),r()()(),a(45,"div",17)(46,"div",18),c(47,De,2,0,"div",19)(48,Ee,2,0),r(),a(49,"div",20)(50,"div",9)(51,"div",10),u(52,"lib-info-page-input",21),r()()()()()()()()()()()),o&2){let i=$(_(1,9,n.userLoader$));l(2),p("headerTitle",(i==null||i.selectedUser==null?null:i.selectedUser.Name)+" Info")("hideSearchBox",!0)("hideSearchDropdown",!0),l(3),p("ngxPermissionsOnly",n.userDeleteRole),l(),p("ngxPermissionsOnly",n.userEditRole),l(17),v(i==null||i.selectedUser==null?null:i.selectedUser.LoginID),l(7),v(i==null||i.selectedGroup==null?null:i.selectedGroup.Name),l(17),P((i==null||i.selectedChannels==null?null:i.selectedChannels.length)===0?47:48),l(5),p("inputValue",i==null?null:i.DownloadOrderDaysRange)}},dependencies:[S,W,ue,ce,ie,ne,te,fe,se,le,he],styles:[".nav-tabs[_ngcontent-%COMP%] .nav-link.active[_ngcontent-%COMP%], .nav-tabs[_ngcontent-%COMP%] .nav-item.show[_ngcontent-%COMP%] .nav-link[_ngcontent-%COMP%]{color:#495057;background-color:#fff;border-color:#dee2e6 #dee2e6 #fff}"]})}}return t})();export{ot as UserInfoComponent};
@@ -1,2 +0,0 @@
1
- import{a as L}from"./chunk-PBGDP6XV.js";import{a as Be}from"./chunk-BQTUAYGY.js";import"./chunk-AGRVVEIR.js";import"./chunk-ZNDU44GH.js";import"./chunk-5XI7HWS5.js";import"./chunk-WGXUKTYP.js";import"./chunk-4CTORK4F.js";import{a as K}from"./chunk-XHAXYWZ7.js";import{a as Ne,b as Le,c as Ae,d as Y}from"./chunk-GOS4RIF2.js";import{a as Te,b as Ee,c as Pe}from"./chunk-FBZW4Y3J.js";import"./chunk-NZA4BEER.js";import"./chunk-JV4MMNGD.js";import"./chunk-GZXQUJKX.js";import"./chunk-ALKC77XL.js";import"./chunk-NTW6FBP5.js";import"./chunk-LR4UZ2OS.js";import"./chunk-F4GMWHYJ.js";import{b as Re}from"./chunk-GPC4DECX.js";import"./chunk-SIYMMMKQ.js";import"./chunk-WHZ44BAL.js";import{a as De,b as ke}from"./chunk-UPYS4A4M.js";import{a as Ve}from"./chunk-JOBWFOGC.js";import"./chunk-PO7JVKK3.js";import"./chunk-LHD7CYML.js";import"./chunk-DJILLV4M.js";import{a as Me}from"./chunk-SH7KN2AS.js";import"./chunk-OKAPL3YZ.js";import"./chunk-SDUUFQUI.js";import"./chunk-3RK6DDJD.js";import"./chunk-MQXPOHBV.js";import"./chunk-M5IQRAHV.js";import{a as H}from"./chunk-5DIRXS7I.js";import"./chunk-OZ7LWNOK.js";import"./chunk-VRI3CYGG.js";import"./chunk-AVEGIEYT.js";import{e as Se}from"./chunk-SYENQYR7.js";import"./chunk-2ZTDLZVZ.js";import"./chunk-2TZBEYNY.js";import"./chunk-SXLKJLAE.js";import{i as fe}from"./chunk-C7QA2BEN.js";import"./chunk-Z3ITXK3D.js";import"./chunk-ACIMXBIC.js";import"./chunk-TGMCGROM.js";import"./chunk-CMZW5QAE.js";import{b as ue,e as he}from"./chunk-4M63ID5T.js";import"./chunk-K5XRGNWG.js";import"./chunk-HPYTL6TX.js";import{c as f}from"./chunk-PW42BQIY.js";import{d as Ie,l as we,m as be,n as Fe}from"./chunk-6X2OBNJQ.js";import{b as se,c as ce,h as pe,m as me,o as _e,z as de}from"./chunk-CSSG7NAJ.js";import"./chunk-MZI5AYCE.js";import{a as Ce,b as ge,c as xe}from"./chunk-UJYSVGLV.js";import{r as ve,s as ye}from"./chunk-HFKKITEW.js";import"./chunk-OZ77CAJD.js";import{d as te,g as ie,j as oe,k as ae,m as le,n as re}from"./chunk-MTUIRWOB.js";import{$c as g,Fc as z,G as q,Gb as X,Gc as p,Hc as k,Ic as V,Kc as w,Lc as b,Mb as u,Mc as F,Qc as ne,Ra as R,Sc as M,Yb as m,Z as $,ac as J,ad as v,bd as N,cd as G,dc as y,ea as O,ec as W,gc as j,hc as Q,ic as a,jc as r,kc as x,lc as E,mc as P,oc as S,pa as U,pb as D,rb as s,tc as h,uc as l,v as B,xb as I,xc as ee,ya as _,za as d}from"./chunk-JS55A2RS.js";import"./chunk-EU2KAMEK.js";import{a as A}from"./chunk-66YHNWRR.js";var Z=t=>[t],Ue=t=>({"text-decoration-line-through":t}),We=t=>({"me-10":t}),je=t=>({"bg-gradient-warning":t}),Qe=t=>({cursor:t});function ze(t,c){if(t&1){let e=S();a(0,"button",39),h("click",function(){_(e);let n=l().ngIf,i=l(2);return d(i.onScanInventory(n))}),x(1,"i",40),p(2,"Refresh "),r()}}function Ge(t,c){if(t&1){let e=S();a(0,"div",37)(1,"button",41),h("click",function(){_(e);let n=l().ngIf,i=l(2);return d(i.updateStock(n))}),x(2,"i",42),p(3," Update "),r(),x(4,"button",43),a(5,"ul",44)(6,"a",45),h("click",function(){_(e);let n=l(3);return d(n.openExportDialog())}),x(7,"i",46),a(8,"span"),p(9,"Export"),r()()()()}}function He(t,c){if(t&1){let e=S();a(0,"button",47),h("click",function(){_(e);let n=l(3);return d(n.openExportDialog())}),x(1,"i",46),a(2,"span"),p(3,"Export"),r()()}}function Ye(t,c){if(t&1&&(a(0,"div"),u(1,ze,3,0,"button",36)(2,Ge,10,0,"div",37)(3,He,4,0,"button",38),r()),t&2){let e=c.ngIf,o=l(2);s(),m("ngIf",o.productService.hasSelectionVariant(e)),s(),y(o.productService.hasSelectionVariant(e)?2:3)}}function Ke(t,c){t&1&&(a(0,"div",48)(1,"span"),p(2," showing only different stock, please press next to populate more data "),r()())}function Ze(t,c){if(t&1){let e=S();a(0,"th")(1,"input",49),F("ngModelChange",function(n){_(e);let i=l(3);return b(i.checkboxState,n)||(i.checkboxState=n),d(n)}),h("ngModelChange",function(){let n=_(e).ngIf,i=l(3);return d(i.onCheckboxStateChange(n))}),r()()}if(t&2){let e=l(3);s(),w("ngModel",e.checkboxState)}}function qe(t,c){if(t&1&&(E(0),u(1,Ze,2,1,"th",5),g(2,"async"),P()),t&2){let e=l(2);s(),m("ngIf",v(2,1,e.products$))}}function Xe(t,c){t&1&&(a(0,"th",33),p(1," Reserved "),r())}function Je(t,c){if(t&1){let e=S();a(0,"input",65),F("ngModelChange",function(n){_(e);let i=l(4).$implicit;return b(i.selected,n)||(i.selected=n),d(n)}),h("ngModelChange",function(){_(e);let n=l(4).$implicit,i=l(2);return d(i.onCheckboxStateProduct(n))}),r()}if(t&2){let e=l(4).$implicit;w("ngModel",e.selected)}}function en(t,c){if(t&1&&(E(0),a(1,"div",63),u(2,Je,1,1,"input",64),r(),P()),t&2){let e=l(3).$implicit;s(),m("ngClass",M(2,We,e.Variants.length<=1)),s(),y(e.Variants.length>1?2:-1)}}function nn(t,c){if(t&1){let e=S();a(0,"img",66),h("click",function(n){_(e);let i=l(3).$implicit,C=l(2);return d(C.onZoomImage(n,i==null?null:i.ImageUrl))}),r()}if(t&2){let e=l(3).$implicit;ee("src",e==null?null:e.ThumbnailUrl,D)}}function tn(t,c){t&1&&x(0,"img",60)}function on(t,c){if(t&1&&(x(0,"br"),a(1,"div",67),x(2,"i",68),a(3,"small"),p(4),r()()),t&2){let e=l(3).$implicit;s(4),V("(",e==null?null:e.Category,")")}}function an(t,c){if(t&1&&(a(0,"td",58)(1,"div",14),u(2,en,3,4,"ng-container",27),a(3,"div"),u(4,nn,1,1,"img",59)(5,tn,1,0,"img",60),r()()(),a(6,"td",61)(7,"span",62),p(8),r(),u(9,on,5,1),r()),t&2){let e=l(2).$implicit,o=l(2);m("rowSpan",e==null?null:e.Variants.length),s(2),m("ngxPermissionsOnly",M(6,Z,o.inventoryUpdateRole)),s(2),y(e!=null&&e.ThumbnailUrl?4:5),s(2),m("rowSpan",e==null?null:e.Variants.length),s(2),k(e==null?null:e.Name),s(),y(e.CategoryID!==null&&e.CategoryID!=o.guidEmpty?9:-1)}}function ln(t,c){if(t&1){let e=S();a(0,"input",49),F("ngModelChange",function(n){_(e);let i=l(3).$implicit;return b(i.selected,n)||(i.selected=n),d(n)}),r()}if(t&2){let e=l(3).$implicit;w("ngModel",e.selected)}}function rn(t,c){if(t&1&&u(0,ln,1,1,"input",70),t&2){let e=l(2).$implicit;y((e==null?null:e.Inventory)<=1e5?0:-1)}}function sn(t,c){if(t&1){let e=S();a(0,"input",49),F("ngModelChange",function(n){_(e);let i=l(2).$implicit;return b(i.selected,n)||(i.selected=n),d(n)}),r()}if(t&2){let e=l(2).$implicit;w("ngModel",e.selected)}}function cn(t,c){if(t&1&&(E(0),a(1,"td",69),u(2,rn,1,1)(3,sn,1,1,"input",70),r(),P()),t&2){let e=l().$implicit;s(2),y((e==null?null:e.Channel[0].TypeID)==1?2:(e==null?null:e.Inventory)>=0?3:-1)}}function pn(t,c){t&1&&(a(0,"div",71),p(1," Not Found "),r())}function mn(t,c){if(t&1&&(a(0,"div")(1,"span",72),p(2),g(3,"number"),r(),p(4," => "),a(5,"span",73),p(6),g(7,"number"),r()()),t&2){let e=l().$implicit;s(2),V(" ",v(3,2,e==null||e.I==null?null:e.I.Available),""),s(4),k(v(7,4,e==null?null:e.Inventory))}}function _n(t,c){if(t&1&&(p(0),g(1,"number")),t&2){let e=l().$implicit;V(" ",v(1,1,e==null?null:e.Inventory)," ")}}function dn(t,c){if(t&1&&(E(0),a(1,"div",74)(2,"a",75),x(3,"i",76),r()(),P()),t&2){let e=l().$implicit,o=l(3);s(2),m("href",o.hostName+"/menu/Products/Catalog/Variants/Info?ID="+(e==null?null:e.ID),D)}}function un(t,c){if(t&1){let e=S();a(0,"span",81),h("click",function(){_(e);let n=l(2).$implicit,i=l().$implicit,C=l(2);return d(C.openTableDialog(i,n))}),p(1),g(2,"number"),r()}if(t&2){let e=l(2).$implicit,o=l(3);J(M(5,Qe,o.hasInventoryEdit())),s(),V(" ",v(2,3,e==null||e.Channel[0]==null?null:e.Channel[0].Inventory)," ")}}function hn(t,c){if(t&1){let e=S();a(0,"td",77)(1,"div",53)(2,"div"),u(3,un,3,7,"span",78),g(4,"async"),r(),a(5,"div",74)(6,"a",75),x(7,"i",76),r()(),a(8,"div",74)(9,"span",79),h("click",function(){_(e);let n=l().$implicit,i=l(3);return d(i.refreshInventory(n==null||n.Channel[0]==null?null:n.Channel[0].ChannelItemID,n==null||n.Channel[0]==null?null:n.Channel[0].ChannelVariationID,n==null||n.Channel[0]==null?null:n.Channel[0].ChannelID,n==null?null:n.ID))}),x(10,"i",80),r()()()()}if(t&2){let e=l().$implicit,o=l(3);m("ngClass",M(5,je,(e==null?null:e.Inventory)!=(e==null||e.Channel[0]==null?null:e.Channel[0].Inventory))),s(3),m("ngIf",v(4,3,o.products$)),s(3),m("href",e==null||e.Channel[0]==null?null:e.Channel[0].Url,D)}}function Cn(t,c){if(t&1&&(E(0),a(1,"span",82),p(2),g(3,"number"),r(),P()),t&2){let e=l(2).$implicit;s(2),V(" (",v(3,1,e==null||e.Channel[0]==null?null:e.Channel[0].InventoryReserved),") ")}}function gn(t,c){t&1&&p(0," - ")}function xn(t,c){if(t&1&&(E(0),a(1,"td",51),u(2,Cn,4,3,"ng-container",57)(3,gn,1,0,"ng-template",null,1,G),r(),P()),t&2){let e=z(4),o=l().$implicit;s(2),m("ngIf",o==null||o.Channel[0]==null?null:o.Channel[0].InventoryReserved)("ngIfElse",e)}}function fn(t,c){t&1&&(E(0),p(1," - "),P())}function Sn(t,c){if(t&1&&(a(0,"span",83),g(1,"date"),p(2),g(3,"date"),r()),t&2){let e=l().$implicit;m("matTooltip",N(1,2,e==null||e.Channel[0]==null?null:e.Channel[0].LastInventorySync,"dd MMMM yyyy HH:mm:ss")),s(2),V(" ",N(3,5,e==null||e.Channel[0]==null?null:e.Channel[0].LastInventorySync,"dd MMM yy HH:mm")," ")}}function vn(t,c){if(t&1&&(a(0,"tr"),u(1,an,10,8),a(2,"td",50),p(3),r(),a(4,"td",51)(5,"span",52),p(6),r()(),u(7,cn,4,1,"ng-container",27),a(8,"td")(9,"div",53),u(10,pn,2,0,"div",54)(11,mn,8,6,"div")(12,_n,2,3)(13,dn,4,1,"ng-container",5),r()(),u(14,hn,11,7,"td",55)(15,xn,5,2,"ng-container",5),a(16,"td",56),u(17,fn,2,0,"ng-container",57)(18,Sn,4,8,"ng-template",null,0,G),r()()),t&2){let e=c.$implicit,o=c.$index,n=z(19),i=l(3);s(),y(o==0?1:-1),s(2),k(e==null?null:e.Model),s(2),m("matTooltip",e.Discontinued?i.discontinuedVariantMsg:"")("ngClass",M(14,Ue,e.Discontinued)),s(),k(e==null?null:e.Code),s(),m("ngxPermissionsOnly",M(16,Z,i.inventoryUpdateRole)),s(3),m("ngIf",(e==null?null:e.I)==null),s(),y((e==null?null:e.I)!=null&&(e==null?null:e.Inventory)!=(e==null||e.I==null?null:e.I.Available)?11:-1),s(),y((e==null?null:e.Inventory)==(e==null||e.I==null?null:e.I.Available)?12:-1),s(),m("ngIf",(e==null?null:e.I)!=null),s(),m("ngIf",e==null?null:e.Channel),s(),m("ngIf",i.isShowReservedColumn),s(2),m("ngIf",(e==null||e.Channel[0]==null?null:e.Channel[0].LastInventorySync)==i.minDate)("ngIfElse",n)}}function yn(t,c){if(t&1&&(a(0,"tbody"),j(1,vn,20,18,"tr",null,W),r()),t&2){let e=c.$implicit;s(),Q(e.Variants)}}function In(t,c){if(t&1){let e=S();a(0,"mainpanel",3),h("onSubmit",function(n){_(e);let i=l();return d(i.onSearch(n))}),a(1,"actions")(2,"div",4),u(3,Ye,4,2,"div",5),g(4,"async"),r()(),a(5,"filters")(6,"div")(7,"label",6),p(8,"Channel"),r(),a(9,"multiwarehouse-tree-select",7),h("onChannelChange",function(n){_(e);let i=l();return d(i.onChannelChange(n))}),r()(),a(10,"div",8)(11,"label",9),p(12,"PageNumber"),r(),a(13,"input",10),F("ngModelChange",function(n){_(e);let i=l();return b(i.searchFilter.PageNumber,n)||(i.searchFilter.PageNumber=n),d(n)}),r()(),a(14,"div",8)(15,"label",11),p(16,"Page Size"),r(),a(17,"input",12),F("ngModelChange",function(n){_(e);let i=l();return b(i.searchFilter.RowCount,n)||(i.searchFilter.RowCount=n),d(n)}),r()(),a(18,"div",8)(19,"label",13),p(20,"Quantity From - To"),r(),a(21,"div",14)(22,"input",15),F("ngModelChange",function(n){_(e);let i=l();return b(i.searchFilter.QuantityFrom,n)||(i.searchFilter.QuantityFrom=n),d(n)}),r(),p(23," - "),a(24,"input",16),F("ngModelChange",function(n){_(e);let i=l();return b(i.searchFilter.QuantityTo,n)||(i.searchFilter.QuantityTo=n),d(n)}),r()()()(),a(25,"content")(26,"div",17)(27,"div",18)(28,"div",19),u(29,Ke,3,0,"div",20),a(30,"table",21),h("matSortChange",function(n){_(e);let i=l();return d(i.onSortVariant(n))}),a(31,"thead",22)(32,"tr")(33,"th",23),p(34," Product "),x(35,"br"),a(36,"mat-slide-toggle",24),h("toggleChange",function(){_(e);let n=l();return n.showDifferenceStock=!n.showDifferenceStock,d(n.onShowDifferenceStock())}),a(37,"small",13),p(38,"FILTER DIFFERENT INVENTORY"),r()()(),a(39,"th",25),p(40,"Variant"),r(),a(41,"th",26),p(42,"SKU"),r(),u(43,qe,3,3,"ng-container",27),a(44,"th",28),p(45," POS "),r(),a(46,"th",29)(47,"div",30),h("click",function(){_(e);let n=l();return d(n.openModalFilter())}),x(48,"img",31),a(49,"span",32),p(50),g(51,"stringLimit"),r()()(),u(52,Xe,2,0,"th",33),a(53,"th",34),p(54,"Last Sync"),r()()(),j(55,yn,3,0,"tbody",null,W),g(57,"async"),r(),a(58,"infinite-paginator",35),g(59,"async"),h("onNextPage",function(){_(e);let n=l();return d(n.infinitePagination.onNextPage(n.searchFilter))})("onLastPage",function(){_(e);let n=l();return d(n.infinitePagination.onLastPage(n.searchFilter))})("onGetRowCount",function(){_(e);let n=l();return d(n.infinitePagination.getRowCount(n.searchFilter))}),r()()()()()()}if(t&2){let e,o,n,i=l();m("headerTitle","Inventory Comparison")("pageData",i.pageData)("hideSearchBox",!1),s(3),m("ngIf",v(4,21,i.products$)),s(6),m("ngModel",(i.searchFilter==null?null:i.searchFilter.LocationID)||(i.searchFilter==null?null:i.searchFilter.ChannelID)),s(4),w("ngModel",i.searchFilter.PageNumber),s(4),w("ngModel",i.searchFilter.RowCount),s(5),w("ngModel",i.searchFilter.QuantityFrom),s(2),w("ngModel",i.searchFilter.QuantityTo),s(5),m("ngIf",(i.searchFilter==null?null:i.searchFilter.filterModel)==3),s(14),m("ngxPermissionsOnly",M(30,Z,i.inventoryUpdateRole)),s(4),m("matTooltip",((e=i.channelIdentity())==null||e.label==null?null:e.label.length)>13?(e=i.channelIdentity())==null?null:e.label:""),s(),m("src",(o=i.channelIdentity())==null?null:o.img,D),s(2),V(" ",N(51,23,(n=i.channelIdentity())==null?null:n.label,13)," "),s(2),y(i.isShowReservedColumn?52:-1),s(3),Q(v(57,26,i.products$)),s(3),m("totalData",i.infinitePagination.totalData())("hideCount",i.infinitePagination.hideCount())("rowCount",v(59,28,i.infinitePagination.totalRowCount$))("pageNumber",i.infinitePagination.pageNumber())("disableNextButton",i.infinitePagination.disableNextButton())("goToLastPage",i.infinitePagination.isLastPage())}}var st=(()=>{class t{constructor(e,o,n,i,C,T,$e,Oe){this.http=e,this.toastr=o,this.dialog=n,this.productService=i,this.authService=C,this.biggerPictureService=T,this.inventoryService=$e,this.mainPanelService=Oe,this.infinitePagination=U(Y),this.ngxPermissionsService=U(Ce),this.checkboxState=!1,this.showDifferenceStock=!1,this.loaderApi="InventoryLoader/Load",this.fetchApi="Inventory/GetSingleChannelComparison",this.rowCountApi="Inventory/GetInventoryByChannelRowCount",this.minDate=f.MinDate,this.isShowReservedColumn=!0,this.discontinuedVariantMsg="This Variant is discontinued from POS, you must Non Active manually at the seller center so that it is not sold again on the channel.",this.guidEmpty=f.GuidEMpty,this.selectedChannel=R(null),this.channelIdentity=R({img:null,label:null}),this.inventoryUpdateRole=H.InventoryUpdate,this.hasInventoryEdit=R(!0),this.pageData={Title:"Inventory Realtime",Nav:[{Title:"Inventory Cache",Url:"/menu/inventory",Active:!1},{Title:"Inventory Realtime",Url:"/menu/inventory/realtime",Active:!0}]}}ngOnInit(){this.initRoles(),this.hostName=this.authService.getDomain(),this.initPageLoader(),this.sourceObs$=this.infinitePagination.data$.pipe(O(e=>{this.checkShowReservedColumn(e)}),B(e=>(e=this.calculateAvailableStock(e),e)),$(1)),this.products$=this.sourceObs$}initRoles(){this.ngxPermissionsService.hasPermission(H.InventoryUpdate).then(e=>this.hasInventoryEdit.set(e))}calculateAvailableStock(e){return e.map(n=>(n.totalAvailable=n.Variants.reduce((i,C)=>(i+=C.I?.Available||0,i),0),n))}checkShowReservedColumn(e){let o=0,n;e.forEach(i=>{n=i.Variants.find(C=>f.IsNotEmpty(C?.Channel[0]?.InventoryReserved)),n&&(o+=1)}),this.isShowReservedColumn=o>0}initPageLoader(){this.infinitePagination.fetchDataEndpoint=this.fetchApi,this.infinitePagination.fethRowCountEndpoint=this.rowCountApi,this.loader$=this.http.post(`/api/${this.loaderApi}`,{}).pipe($(1),O(e=>{this.searchFilter={RowCount:e.Filter.PageSize,filterModel:1,PageNumber:1,ChannelID:e.Filter.ChannelID,LocationID:e.Filter.LocationID},this.initReloadData(),this.showToastrMarketplaceInactive(!e.Filter.IsMarketplaceAppActive)}))}onChannelChange(e){let o=Object.assign({},e);this.selectedChannel.set(o),f.IsEmpty(this.channelIdentity()?.label)&&this.setChannelFilter()}setChannelFilter(){if(this.selectedChannel()){let e=Object.assign({},this.selectedChannel());f.IsNotEmpty(e.parent)?(this.searchFilter.LocationID=e.id,this.searchFilter.ChannelID=e?.parent?.id,e.label=e?.parent?.label+" - "+e?.label,e.img=f.getChannelLogoByTypeId(e?.parent?.typeid)):(this.searchFilter.LocationID=null,e.img=f.getChannelLogoByTypeId(e?.typeid),this.searchFilter.ChannelID=e?.id,this.selectedChannel.set(e)),this.channelIdentity.update(()=>({img:e.img,label:e.label}))}}initReloadData(){this.infinitePagination.reloadPagination(this.searchFilter)}showToastrMarketplaceInactive(e){e&&this.toastr.warning(`Automatic inventory sync disabled.
2
- Please enable Dealpos X Marketplace Apps integration in POS Configuration`,"Warning")}onSearch(e){this.searchFilter.text=e,this.setChannelFilter(),this.initReloadData()}openModalFilter(){this.mainPanelService.openModalFilter()}updateStock(e){let o=this.productService.selectedVariantProduct(e);if(o.length>0){let n=this.searchFilter.LocationID,i=o.map(T=>A({ID:T.ID,Code:T.Code,Inventory:T.Inventory},f.IsNotEmpty(n)&&{LocationID:n})),C={ListChannelID:[this.searchFilter.ChannelID],List:i};this.http.post("/api/Inventory/UpdateChannel",C).subscribe(T=>{this.initReloadData(),this.checkboxState=!1,this.handlingUpdateStock(T)})}}handlingUpdateStock(e){if(e[0]?.Response){let o=e[0]?.Response?.Fail_list,n=e[0]?.Response?.Success_list;this.inventoryService.showToastrUpdateInventory("Stock",n,o)}else this.toastr.error(e[0]?.Exception,"Error")}refreshInventory(e,o,n,i){let C={ChannelItemID:e,ChannelVariationID:o,ChannelID:n,VariantID:i};this.http.post("/api/Inventory/RefreshInventoryChannel",C).subscribe(T=>{this.toastr.success("Successfully updated","Success"),this.initReloadData()})}onCheckboxStateProduct(e){e.Variants=e.Variants.map(o=>(o.Inventory>=0&&(o.selected=e.selected),o))}onCheckboxStateChange(e){e=e.map(o=>(o.Variants=o.Variants.map(n=>(n.selected=this.checkboxState,n)),o))}openTableDialog(e,o){this.hasInventoryEdit()&&this.dialog.open(Ne,{data:{Name:e.Name,Variant:o,ChannelID:o?.Channel[0].ChannelID,Table:"inventory",ChannelItemID:e.ChannelItemID}}).afterClosed().pipe(q(i=>f.IsNotEmpty(i))).subscribe(i=>{this.updateItemAfterDialog(i)})}updateItemAfterDialog(e){let o=this.searchFilter.LocationID,n=A({ID:e.ChannelID,ChannelItemID:e.ChannelItemID,ChannelVariantID:e.ChannelVariationID,NewQuantity:parseFloat(e.Inventory),VariantID:e.ID,SKU:e.Sku},f.IsNotEmpty(o)&&{LocationID:o});this.http.post("/api/Inventory/UpdateQuantityByItem",n).subscribe(i=>{this.searchFilter.PageNumber=1,this.initReloadData(),this.handlingUpdateStock([i])})}onScanInventory(e){let o=this.productService.selectedVariantProduct(e);this.inventoryService.refreshInventory(o).subscribe(()=>{this.initReloadData(),this.toastr.success("Inventory refreshed successfully","Success")})}openExportDialog(){this.dialog.open(Re,{data:{title:"Export Inventory Single Channel Comparison",pageNumber:this.searchFilter.PageNumber,rowCount:this.searchFilter.RowCount,filterExport:this.searchFilter,getRowCountApi:this.rowCountApi,QuantityFrom:this.searchFilter.QuantityFrom,QuantityTo:this.searchFilter.QuantityTo,exportApi:"Inventory/GetExportSingleChannelComparison"}}).afterClosed().subscribe()}onShowDifferenceStock(){this.showDifferenceStock?this.searchFilter.filterModel=K.DIFFERENCE:this.searchFilter.filterModel=K.ALL,this.initReloadData()}onZoomImage(e,o){this.biggerPictureService.openBiggerPicture(e,o)}onSortVariant(e){if(e.direction==""){this.products$=this.sourceObs$;return}this.products$=this.products$.pipe(B(o=>o.map(n=>(n.Variants=n.Variants.sort((i,C)=>f.compare(i.I?.Available,C.I?.Available,e.direction==="asc")),n)).sort((n,i)=>f.compare(n.totalAvailable,i.totalAvailable,e.direction==="asc"))))}static{this.\u0275fac=function(o){return new(o||t)(I(he),I(ue),I(Ie),I(Ve),I(fe),I(Me),I(L),I(we))}}static{this.\u0275cmp=X({type:t,selectors:[["app-single-channel-comparison"]],features:[ne([Y,L])],decls:2,vars:3,consts:[["SYNCDATE",""],["EMPTY_RESERVED",""],["textButton","Search",3,"headerTitle","pageData","hideSearchBox","onSubmit",4,"ngIf"],["textButton","Search",3,"onSubmit","headerTitle","pageData","hideSearchBox"],[1,"d-flex"],[4,"ngIf"],["for","channelOptions",1,"fw-bold","mb-2"],["id","channelOptions",3,"onChannelChange","ngModel"],[1,"mt-5"],["for","PageNumber",1,"fw-bold"],["type","number","id","PageNumber","placeholder","PageNumber","name","PageNumber","data-toggle","tooltip","matTooltip","Page Number",1,"mat-mdc-tooltip-trigger","form-control","ng-pristine","ng-valid","ng-touched","mt-3",3,"ngModelChange","ngModel"],["for","RowCount",1,"fw-bold"],["type","number","id","RowCount","placeholder","Page Size","name","RowCount","data-toggle","tooltip","matTooltip","Page Size",1,"mat-mdc-tooltip-trigger","form-control","ng-pristine","ng-valid","ng-touched","mt-3",3,"ngModelChange","ngModel"],[1,"fw-bold"],[1,"d-flex","align-items-center","justify-content-start"],["type","number","name","QuantityFrom",1,"w-25","me-2","mt-3","form-control",3,"ngModelChange","ngModel"],["type","number","name","QuantityTo",1,"w-25","ms-2","form-control","mt-2",3,"ngModelChange","ngModel"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],["class","alert alert-warning d-flex justify-content-between text-dark","role","alert",4,"ngIf"],["matSort","",1,"table","border-bottom",3,"matSortChange"],[1,"thead-light","sticky-top-thead"],["scope","col","colspan","2",1,"text-center","ps-12",2,"width","25%"],[3,"toggleChange"],["scope","col",1,"text-start"],["scope","col",1,"text-end",2,"width","10%"],[4,"ngxPermissionsOnly"],["scope","col","mat-sort-header","Available","arrowPosition","before",1,"text-end","w-10",2,"width","8%"],[1,"text-end",2,"width","150px"],["role","button","matTooltipPosition","above",1,"d-inline-block",3,"click","matTooltip"],[2,"width","16px",3,"src"],[1,"ms-1"],["matTooltip","Reserved Stock","matTooltipPosition","above",1,"text-end",2,"width","80px"],[1,"text-center",2,"width","145px"],[3,"onNextPage","onLastPage","onGetRowCount","totalData","hideCount","rowCount","pageNumber","disableNextButton","goToLastPage"],["class","btn btn-outline-dark me-3","matTooltip","Fetch the latest stock directly from the channel",3,"click",4,"ngIf"],[1,"btn-group"],[1,"btn","btn-outline-secondary","shadow","rounded"],["matTooltip","Fetch the latest stock directly from the channel",1,"btn","btn-outline-dark","me-3",3,"click"],[1,"fa-solid","fa-arrows-rotate","me-3"],[1,"btn","btn-success",3,"click"],[1,"fas","fa-chevron-circle-up"],["data-bs-toggle","dropdown","aria-expanded","false",1,"btn","btn-success","btn-sm","dropdown-toggle","border-start"],[1,"dropdown-menu","dropdown-menu-end","pointer"],["role","button",1,"dropdown-item","cursor-pointer","fs-5",3,"click"],[1,"fa-solid","fa-print","me-3"],[1,"btn","btn-outline-secondary","shadow","rounded",3,"click"],["role","alert",1,"alert","alert-warning","d-flex","justify-content-between","text-dark"],["type","checkbox",3,"ngModelChange","ngModel"],[1,"text-start"],[1,"text-end"],["matTooltipPosition","above",3,"matTooltip","ngClass"],[1,"d-flex","align-items-center","justify-content-end"],["class","text-danger","matTooltip","This product is no longer available in POS","matTooltipPosition","above",4,"ngIf"],["class","text-end",3,"ngClass",4,"ngIf"],[1,"text-center"],[4,"ngIf","ngIfElse"],[1,"text-start",2,"width","0%",3,"rowSpan"],[1,"border","rounded","w-img","cursor-pointer",2,"margin-left","20px",3,"src"],["src","//res.cloudinary.com/pos/image/upload/w_40/POS/Images/Icon/products_thumb.png",1,"border","rounded","w-img",2,"margin-left","20px"],[1,"text-start",3,"rowSpan"],[1,"item-name","mb-0"],[3,"ngClass"],["type","checkbox",1,"me-3",3,"ngModel"],["type","checkbox",1,"me-3",3,"ngModelChange","ngModel"],[1,"border","rounded","w-img","cursor-pointer",2,"margin-left","20px",3,"click","src"],[1,"d-flex","align-items-center"],["title","Category",1,"fa-solid","fa-tags","me-2",2,"opacity","60%"],[1,"align-middle"],["type","checkbox",3,"ngModel"],["matTooltip","This product is no longer available in POS","matTooltipPosition","above",1,"text-danger"],["title","Stock Available"],["title","Inventory below minimum inventory"],[1,"ms-3"],["target","_blank",3,"href"],[1,"fa-solid","fa-arrow-up-right-from-square","external-link-custom"],[1,"text-end",3,"ngClass"],[3,"class","click",4,"ngIf"],["matTooltip","Refresh stock according to seller center",1,"pl-5","cursor-pointer",2,"color","var(--bs-link-color)",3,"click"],[1,"fas","fa-sync","fa-lg","external-link-custom","pt-1"],[3,"click"],[1,"text-danger"],["matTooltipShowDelay","500",3,"matTooltip"]],template:function(o,n){o&1&&(u(0,In,60,32,"mainpanel",2),g(1,"async")),o&2&&m("ngIf",v(1,1,n.loader$))},dependencies:[re,te,ie,oe,le,ae,Fe,be,Se,de,ce,_e,se,pe,me,Le,Ae,xe,ge,ke,De,ye,ve,Pe,Te,Ee,Be],styles:[".w-10[_ngcontent-%COMP%]{width:10%}.w-img[_ngcontent-%COMP%]{width:40px;height:40px}.item-name[_ngcontent-%COMP%]{margin-bottom:-14px!important;font-size:larger}input[type=checkbox][_ngcontent-%COMP%]{width:15px;height:15px}"]})}}return t})();export{st as SingleChannelComparisonComponent};
@@ -1 +0,0 @@
1
- import{a as u,b as l}from"./chunk-TNKPTRB3.js";import"./chunk-UJYSVGLV.js";import"./chunk-HFKKITEW.js";import"./chunk-OZ77CAJD.js";import{F as i,J as m}from"./chunk-MTUIRWOB.js";import{Gb as r,Yb as s,ic as p,jc as a,kc as o,rb as n}from"./chunk-JS55A2RS.js";import"./chunk-EU2KAMEK.js";import"./chunk-66YHNWRR.js";var f=(()=>{class e{constructor(){this.tabs=[{Title:"Users",Url:"/menu/users/users",Description:""},{Title:"Groups",Url:"/menu/users/groups",Description:""}]}static{this.\u0275fac=function(t){return new(t||e)}}static{this.\u0275cmp=r({type:e,selectors:[["app-user-menu"]],decls:5,vars:2,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid"],[3,"Tabs","usePermissions"]],template:function(t,c){t&1&&(p(0,"nav",0)(1,"div",1)(2,"div"),o(3,"nav-tab",2),a()()(),o(4,"router-outlet")),t&2&&(n(3),s("Tabs",c.tabs)("usePermissions",!0))},dependencies:[l,u,m,i],encapsulation:2})}}return e})(),g=[{path:"",component:f,children:[{path:"users",loadComponent(){return import("./chunk-IIMHYIRJ.js").then(e=>e.UsersComponent)},data:{title:"Users"}},{path:"users/form",loadComponent(){return import("./chunk-FUWROOE4.js").then(e=>e.UserFormComponent)},data:{title:"Users Form"}},{path:"users/info",loadComponent(){return import("./chunk-H4PA2O6O.js").then(e=>e.UserInfoComponent)},data:{title:"Users Info"}},{path:"groups",loadComponent(){return import("./chunk-PEA6KVUS.js").then(e=>e.GroupsComponent)},data:{title:"Groups"}},{path:"groups/form",loadComponent(){return import("./chunk-FFAZ3Q3F.js").then(e=>e.GroupsFormComponent)},data:{title:"Groups Form"}},{path:"groups/info",loadComponent(){return import("./chunk-CEQA4PTY.js").then(e=>e.GroupInfoComponent)},data:{title:"Groups Info"}},{path:"",pathMatch:"full",redirectTo:"users"}]}];export{f as UserMenuComponent,g as userRoutes};
@@ -1 +0,0 @@
1
- import{a as L,b as G}from"./chunk-6MPSYC77.js";import"./chunk-OKAPL3YZ.js";import"./chunk-SXLKJLAE.js";import{b as W,e as H}from"./chunk-4M63ID5T.js";import"./chunk-K5XRGNWG.js";import"./chunk-HPYTL6TX.js";import{m as q,n as z}from"./chunk-6X2OBNJQ.js";import{h as N,m as P,z as j}from"./chunk-CSSG7NAJ.js";import"./chunk-MZI5AYCE.js";import"./chunk-HFKKITEW.js";import"./chunk-OZ77CAJD.js";import{g as R,j as $,n as A}from"./chunk-MTUIRWOB.js";import{$c as S,Gb as E,Gc as p,Ic as y,Kc as T,Lc as V,Mb as _,Mc as B,Qc as D,Ra as M,Yb as s,Z as F,ad as v,ec as O,gc as I,hc as k,ic as o,ja as w,jc as r,lc as C,mc as f,oc as g,pa as m,rb as c,tc as x,uc as l,ya as d,za as u}from"./chunk-JS55A2RS.js";import"./chunk-EU2KAMEK.js";import"./chunk-66YHNWRR.js";var b=(()=>{class t{constructor(){this.httpService=m(H)}getClearCacheOptions$(){return this.httpService.get("/api/channelloader/OptionClearCache")}flushCache(e){return this.httpService.post("/api/Channel/RemoveCacheByRequest",e)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=w({token:t,factory:t.\u0275fac})}}return t})();function Q(t,h){if(t&1){let e=g();C(0),o(1,"button",10),x("click",function(){let n=d(e).ngIf,a=l();return u(a.onFlushCache(n))}),p(2," Flush Cache "),r(),f()}if(t&2){let e,i=l();c(),s("disabled",((e=i.selectedOptions())==null?null:e.length)==0)}}function U(t,h){if(t&1){let e=g();C(0),o(1,"mat-checkbox",11),x("change",function(n){let a=d(e).ngIf,J=l();return u(J.onSelectAll(n.checked,a))}),r(),f()}}function X(t,h){if(t&1){let e=g();o(0,"tr")(1,"td")(2,"div")(3,"mat-checkbox",12),B("ngModelChange",function(n){let a=d(e).$implicit;return V(a.selected,n)||(a.selected=n),u(n)}),x("ngModelChange",function(){d(e);let n=l().ngIf,a=l();return u(a.onSelectOption(n))}),r()()(),o(4,"td"),p(5),r(),o(6,"td")(7,"div",13),p(8),r()()()}if(t&2){let e=h.$implicit;c(3),T("ngModel",e.selected),c(2),y(" ",e.Name," "),c(3),y(" ",e.Description," ")}}function Y(t,h){if(t&1&&(C(0),I(1,X,9,3,"tr",null,O),f()),t&2){let e=h.ngIf;c(),k(e)}}var fe=(()=>{class t{constructor(){this.flushCacheService=m(b),this.toastr=m(W),this.clearCacheOptions$=this.flushCacheService.getClearCacheOptions$().pipe(F(1)),this.selectedOptions=M([])}onFlushCache(e){confirm("Are you sure you want to flush the cache?")&&this.flushCacheService.flushCache(this.selectedOptions()).subscribe(n=>{this.toastr.success(n.Message,"Successfully flushed the cache"),e.forEach(a=>a.selected=!1)})}onSelectAll(e,i){i.forEach(n=>n.selected=e),this.onSelectOption(i)}onSelectOption(e){let i=e.filter(n=>n.selected).map(n=>n.ID);this.selectedOptions.set(i)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=E({type:t,selectors:[["app-flush-cache"]],features:[D([b])],decls:22,vars:11,consts:[["headerTitle","Flush Cache",3,"hideSearchBox","hideSearchDropdown"],[4,"ngIf"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-12"],[1,"table-responsive"],[1,"table","table-hover"],[1,"table-light"],[2,"width","20px"],[2,"width","300px"],[1,"btn","btn-success","btn-lg","text-success","me-2",3,"click","disabled"],["color","primary",2,"margin-bottom","-5px","margin-top","-5px",3,"change"],["color","primary",2,"margin-bottom","-5px","margin-top","-5px",3,"ngModelChange","ngModel"],[1,"text-capitalize"]],template:function(i,n){i&1&&(o(0,"mainpanel",0)(1,"actions"),_(2,Q,3,1,"ng-container",1),S(3,"async"),r(),o(4,"content")(5,"div",2)(6,"div",3)(7,"div",4)(8,"div",5)(9,"table",6)(10,"thead")(11,"tr",7)(12,"th",8),_(13,U,2,0,"ng-container",1),S(14,"async"),r(),o(15,"th",9),p(16,"Cache"),r(),o(17,"th"),p(18,"Description"),r()()(),o(19,"tbody"),_(20,Y,3,0,"ng-container",1),S(21,"async"),r()()()()()()()()),i&2&&(s("hideSearchBox",!0)("hideSearchDropdown",!0),c(2),s("ngIf",v(3,5,n.clearCacheOptions$)),c(11),s("ngIf",v(14,7,n.clearCacheOptions$)),c(7),s("ngIf",v(21,9,n.clearCacheOptions$)))},dependencies:[A,R,$,z,q,G,L,j,N,P],encapsulation:2})}}return t})();export{fe as FlushCacheComponent};
@@ -1 +0,0 @@
1
- import{a as F}from"./chunk-4DV4IT7R.js";import{a as k}from"./chunk-5EQNOCXP.js";import{a as _t}from"./chunk-7KG3DC5J.js";import{a as dt,b as st,d as ft,e as ut}from"./chunk-SYENQYR7.js";import{i as pt}from"./chunk-C7QA2BEN.js";import"./chunk-Z3ITXK3D.js";import"./chunk-ACIMXBIC.js";import"./chunk-TGMCGROM.js";import"./chunk-CMZW5QAE.js";import{e as ct}from"./chunk-4M63ID5T.js";import"./chunk-K5XRGNWG.js";import{c as mt}from"./chunk-PW42BQIY.js";import{m as B,n as gt}from"./chunk-6X2OBNJQ.js";import{h as at,m as rt,z as lt}from"./chunk-CSSG7NAJ.js";import"./chunk-MZI5AYCE.js";import"./chunk-UJYSVGLV.js";import"./chunk-HFKKITEW.js";import"./chunk-OZ77CAJD.js";import{E as ot,H as L,J as R,d as it,f as nt,g as D,j as M,k as T,m as w,n as P}from"./chunk-MTUIRWOB.js";import{$c as d,Fc as J,Gb as N,Gc as a,Hb as b,Hc as p,Ic as C,Kc as K,Lc as Q,Mb as f,Mc as X,Rc as Y,Sc as Z,Tc as tt,Yb as m,Z as O,aa as z,ad as h,bd as S,ca as q,cd as et,f as A,ic as o,jc as n,ka as x,kc as E,lc as u,mc as g,ob as U,oc as W,pb as j,rb as r,tc as H,uc as s,v,xb as _,xc as G,ya as I,za as y}from"./chunk-JS55A2RS.js";import"./chunk-EU2KAMEK.js";import"./chunk-66YHNWRR.js";var bt=(e,c)=>({"bg-gradient-danger":e,"bg-gradient-warning":c}),Et=()=>["/menu/notification/detail"],Dt=e=>({ID:e});function Mt(e,c){if(e&1&&(o(0,"span",14),E(1,"img",15),n(),a(2)),e&2){let t=c.item;r(),m("src",t.Img,j)("alt",t.Name),r(),C(" ",t.Name," ")}}function Tt(e,c){if(e&1&&(u(0),a(1),d(2,"number"),o(3,"span"),a(4,"s"),n(),g()),e&2){let t=s().$implicit;r(),C(" ",S(2,1,t.DurationInSecond,"1.1-1")," ")}}function wt(e,c){e&1&&a(0," - ")}function Pt(e,c){if(e&1&&(u(0),o(1,"tr",16)(2,"td")(3,"a",17),E(4,"img",18),o(5,"span"),a(6),n()()(),o(7,"td")(8,"b"),a(9),n(),E(10,"div",19),n(),o(11,"td"),f(12,Tt,5,4,"ng-container",20)(13,wt,1,0,"ng-template",null,0,et),n(),o(15,"td"),a(16),n(),o(17,"td"),a(18),d(19,"date"),n()(),g()),e&2){let t=c.$implicit,i=J(14);r(),m("ngClass",tt(14,bt,t.Status==1,t.Status==0)),r(2),m("routerLink",Y(17,Et))("queryParams",Z(18,Dt,t.ID)),r(),G("src",t.Img,j),r(2),p(t.Name),r(3),p(t.Label),r(),m("innerHTML",t.Message,U),r(2),m("ngIf",t.DurationInSecond)("ngIfElse",i),r(4),p(t.StatusLabel),r(2),C(" ",S(19,11,t.Created,"dd MMM yyyy HH:mm")," ")}}function Lt(e,c){if(e&1){let t=W();u(0),o(1,"div",6)(2,"div",21)(3,"app-custom-paginator",22),d(4,"async"),d(5,"async"),H("total",function(){I(t);let l=s(2);return y(l.getRowCount())})("next",function(){I(t);let l=s(2);return y(l.getNotifications())})("previous",function(){I(t);let l=s(2);return y(l.getNotifications())}),n()()(),g()}if(e&2){let t=s().ngIf,i=s();r(3),m("filter",i.filter)("totaldata",t==null?null:t.length)("paginationTotal",h(4,4,i.rowCount$))("hasClicked",h(5,6,i.rowCount$))}}function Rt(e,c){if(e&1&&(u(0),f(1,Lt,6,8,"ng-container",13),g()),e&2){let t=c.ngIf;r(),m("ngIf",t.length>0)}}var ht=(()=>{class e{constructor(t,i,l){this.http=t,this.notificationService=i,this.authService=l,this.filter=new _t,this.destroy$=new A,this.channelOptions=l.getChannels()}ngOnInit(){this.notificationService.clearNotification(),this.initPageLoader(),this.subscribeNotification()}subscribeNotification(){this.notificationService.getNotification().pipe(q(this.destroy$)).subscribe(t=>{t.length>0&&(this.getNotifications(),this.notificationService.clearNotification())})}initPageLoader(){this.http.post("/api/notification/Load",{}).subscribe(t=>{this.filter=t.Filter,this.filter.PageSize=this.filter.RowCount,this.getNotifications()})}onFilter(){this.rowCount$=null,this.getNotifications()}getNotifications(){let t={ChannelID:this.filter.ChannelID,RowCount:this.filter.PageSize,PageNumber:this.filter.PageNumber};this.notifications$=this.http.post("/api/notification/Get",t).pipe(v(i=>i.Data),v(i=>(i=this.setChannelLogoToNotifications(i),i=this.setTimeToSecond(i),i)),O(1))}setTimeToSecond(t){return t=t.map(i=>(i.DurationInSecond=parseInt(i.Duration)/1e3,i)),t}setChannelLogoToNotifications(t){return t=t.map(i=>(i.Img=mt.getChannelLogoByTypeId(i.TypeID),i)),t}getRowCount(){let t={ChannelID:this.filter.ChannelID};this.rowCount$=this.http.post("/api/notification/RowCount",t).pipe(v(i=>i.Count),O(1))}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}static{this.\u0275fac=function(i){return new(i||e)(_(ct),_(F),_(pt))}}static{this.\u0275cmp=N({type:e,selectors:[["app-notification"]],standalone:!1,decls:30,vars:9,consts:[["timeNotAvailable",""],["headerTitle","Notification","hideSearchBox","true",3,"onSubmit"],[1,"mb-2"],["appendTo","body","bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"ngModelChange","clearable","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],[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"],[4,"ngIf"],[1,"me-2"],[2,"width","18px",3,"src","alt"],[3,"ngClass"],[3,"routerLink","queryParams"],["alt","",1,"channelLogo-md","me-4",3,"src"],[3,"innerHTML"],[4,"ngIf","ngIfElse"],[1,"col-12"],[3,"total","next","previous","filter","totaldata","paginationTotal","hasClicked"]],template:function(i,l){i&1&&(o(0,"mainpanel",1),H("onSubmit",function(){return l.onFilter()}),o(1,"filters")(2,"div")(3,"h6",2),a(4,"Channel"),n(),o(5,"ng-select",3),X("ngModelChange",function($){return Q(l.filter.ChannelID,$)||(l.filter.ChannelID=$),$}),f(6,Mt,3,3,"ng-template",4),n()()(),o(7,"content")(8,"div",5)(9,"div",6)(10,"div",7)(11,"div",8)(12,"table",9)(13,"thead",10)(14,"tr",11)(15,"th"),a(16,"Channel"),n(),o(17,"th"),a(18,"Process"),n(),o(19,"th"),a(20,"Duration"),n(),o(21,"th"),a(22,"Status"),n(),o(23,"th"),a(24,"Created"),n()()(),o(25,"tbody"),f(26,Pt,20,20,"ng-container",12),d(27,"async"),n()()()()(),f(28,Rt,2,1,"ng-container",13),d(29,"async"),n()()()),i&2&&(r(5),m("clearable",!0)("items",l.channelOptions),K("ngModel",l.filter.ChannelID),r(21),m("ngForOf",h(27,5,l.notifications$)),r(2),m("ngIf",h(29,7,l.notifications$)))},dependencies:[it,nt,D,ft,dt,st,at,rt,B,L,k,M,w,T],encapsulation:2})}}return e})();function Ft(e,c){if(e&1&&(o(0,"div",10)(1,"div",13)(2,"div",7)(3,"h5"),a(4,"Perflog"),n()(),o(5,"div",8)(6,"div",14)(7,"div",15)(8,"pre"),a(9),n()()()()()()),e&2){let t=s().ngIf;r(9),p(t.Perflog)}}function Bt(e,c){if(e&1&&(u(0),o(1,"div",17)(2,"div",13)(3,"div",7)(4,"h5"),a(5,"StackTrace"),n()(),o(6,"div",8)(7,"div",14)(8,"div",15)(9,"pre"),a(10),n()()()()()(),g()),e&2){let t=s().ngIf;r(10),p(t==null?null:t.StackTrace)}}function kt(e,c){if(e&1&&(u(0),o(1,"mainpanel",1)(2,"actions")(3,"a",2),a(4,"Back"),n()(),o(5,"content")(6,"div",3)(7,"div",4)(8,"div",5)(9,"div",6)(10,"div",7)(11,"h5"),a(12,"General"),n()(),o(13,"div",8)(14,"div",9)(15,"div",10)(16,"div",11)(17,"label"),a(18,"Created Date"),n(),o(19,"div")(20,"span"),a(21),d(22,"date"),n()()()(),o(23,"div",10)(24,"div",11)(25,"label"),a(26,"Status"),n(),o(27,"div")(28,"span"),a(29),n()()()()(),o(30,"div",12)(31,"div",10)(32,"div",11)(33,"label"),a(34,"Duration"),n(),o(35,"div")(36,"span"),a(37),d(38,"number"),n()()()(),o(39,"div",10)(40,"div",11)(41,"label"),a(42,"Label"),n(),o(43,"div")(44,"span"),a(45),n()()()()()()()()(),o(46,"div",4)(47,"div",10)(48,"div",13)(49,"div",7)(50,"h5"),a(51,"Message"),n()(),o(52,"div",8)(53,"div",14)(54,"div",15)(55,"pre"),a(56),n()()()()()(),f(57,Ft,10,1,"div",16)(58,Bt,11,1,"ng-container",0),n()()()(),g()),e&2){let t=c.ngIf;r(),m("headerTitle","Notification "+t.Name)("hideSearchBox",!0)("hideSearchDropdown",!0),r(20),p(S(22,10,t.Created,"dd MMM yyyy HH:mm:ss")),r(8),p(t.StatusLabel),r(8),C("",S(38,13,t.DurationInSecond,"1.1-1")," s"),r(8),p(t.Label),r(11),p(t.Message),r(),m("ngIf",t==null?null:t.Perflog),r(),m("ngIf",t==null?null:t.StackTrace)}}var vt=(()=>{class e{constructor(t,i){this.activatedRoute=t,this.notificationService=i}ngOnInit(){this.notification$=this.activatedRoute.queryParams.pipe(z(t=>{let i=t.ID;return this.notificationService.getNotificationDetail(i).pipe(v(l=>(l.DurationInSecond=parseInt(l.Duration)/1e3,l)))}))}static{this.\u0275fac=function(i){return new(i||e)(_(ot),_(F))}}static{this.\u0275cmp=N({type:e,selectors:[["app-detail"]],standalone:!1,decls:2,vars:3,consts:[[4,"ngIf"],[3,"headerTitle","hideSearchBox","hideSearchDropdown"],["role","button","routerLink","/menu/notification",1,"btn","btn-secondary","btn-fill","btn-lg","me-3"],[1,"container-fluid","mt-8"],[1,"row"],[1,"col-12"],[1,"card","mb-8"],[1,"card-header"],[1,"card-body"],[1,"row","mt-6"],[1,"col-sm-6"],[1,"info-label-group"],[1,"row","mt-4"],[1,"card"],[1,"col-sm-12","mt-2"],[1,"form-group"],["class","col-sm-6",4,"ngIf"],[1,"col-sm-12"]],template:function(i,l){i&1&&(f(0,kt,59,16,"ng-container",0),d(1,"async")),i&2&&m("ngIf",h(1,1,l.notification$))},dependencies:[D,B,L,M,w,T],encapsulation:2})}}return e})();var $t=[{path:"",component:ht},{path:"detail",component:vt}],Ct=(()=>{class e{static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275mod=b({type:e})}static{this.\u0275inj=x({imports:[P,R.forChild($t)]})}}return e})();var de=(()=>{class e{static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275mod=b({type:e})}static{this.\u0275inj=x({imports:[P,Ct,ut,lt,gt,R,k]})}}return e})();export{de as NotificationModule};
@@ -1 +0,0 @@
1
- import{a as E}from"./chunk-REL734JM.js";import{a as Ee}from"./chunk-GHBGGQNM.js";import{a as we,b as be}from"./chunk-ZNDU44GH.js";import{b as Te,c as De}from"./chunk-5XI7HWS5.js";import{a as Me}from"./chunk-5QAURMZF.js";import"./chunk-NZA4BEER.js";import"./chunk-JV4MMNGD.js";import"./chunk-GZXQUJKX.js";import"./chunk-ALKC77XL.js";import"./chunk-NTW6FBP5.js";import"./chunk-LR4UZ2OS.js";import"./chunk-F4GMWHYJ.js";import{a as Y}from"./chunk-5DIRXS7I.js";import"./chunk-KXS76PRS.js";import"./chunk-OZ7LWNOK.js";import"./chunk-VRI3CYGG.js";import"./chunk-AVEGIEYT.js";import{d as Ce,e as he}from"./chunk-SYENQYR7.js";import{a as de}from"./chunk-Z3ITXK3D.js";import"./chunk-CMZW5QAE.js";import{b as Z}from"./chunk-4M63ID5T.js";import"./chunk-K5XRGNWG.js";import{c as me}from"./chunk-PW42BQIY.js";import{b as fe,c as te,d as xe,j as ye,k as Ue,m as Se,n as ve}from"./chunk-6X2OBNJQ.js";import{b as pe,h as z,m as H,z as j}from"./chunk-CSSG7NAJ.js";import"./chunk-MZI5AYCE.js";import{a as ue,b as _e,c as ge}from"./chunk-UJYSVGLV.js";import"./chunk-HFKKITEW.js";import"./chunk-OZ77CAJD.js";import{H as le,J as ce,j as $,n as q}from"./chunk-MTUIRWOB.js";import{$b as K,$c as A,G as se,Gb as B,Gc as g,Hc as Q,Ic as D,Kc as v,Lc as M,Mb as x,Mc as w,Nc as N,Oc as O,Pc as C,Qc as W,Ra as U,Rc as X,Sc as ee,Yb as u,Z as k,ad as F,dc as S,ea as J,ec as V,gc as P,hc as L,ic as o,jc as s,kc as I,lc as b,mc as T,oc as y,pa as f,pb as ae,q as oe,rb as a,rd as R,tc as h,uc as l,v as G,ya as c,za as p}from"./chunk-JS55A2RS.js";import"./chunk-EU2KAMEK.js";import{a as ne,b as re}from"./chunk-66YHNWRR.js";var ie=function(i){return i.ERROR="https://res.cloudinary.com/pos/image/upload/v1705387550/POS/Images/Cashier/globalerror.svg",i.UNAUTHORIZED="https://res.cloudinary.com/pos/image/upload/v1702547639/POS/Images/Dashboard/locked.svg",i.EMPTY_LIST="https://res.cloudinary.com/pos/image/upload/v1705388070/POS/Images/Cashier/globalnodata.svg",i.REMOVE="https://res.cloudinary.com/pos/image/upload/v1706156973/icons/globalerrorclear.svg",i}(ie||{});var ke=()=>({display:"d-flex"});function Oe(i,m){if(i&1&&(o(0,"div",6),I(1,"img",9),o(2,"p",10),g(3," All users already migrated. "),s()()),i&2){let e=l();a(),u("src",e.emptyStateIcon,ae)}}function Ae(i,m){if(i&1){let e=y();o(0,"div",14)(1,"p-checkBox",15),w("ngModelChange",function(t){let n=c(e).$implicit;return M(n.selected,t)||(n.selected=t),p(t)}),h("ngModelChange",function(){c(e);let t=l(2),n=C(0);return p(t.onUserCheckChange(n))}),s(),o(2,"label",16),g(3),s()()}if(i&2){let e=m.$implicit;a(),K(X(7,ke)),u("binary",!0)("id",e.ID),v("ngModel",e.selected),a(),u("for",e.ID),a(),D(" ",e.Name," ")}}function Fe(i,m){if(i&1){let e=y();o(0,"div",11)(1,"p-checkBox",12),w("ngModelChange",function(t){c(e);let n=l();return M(n.isCheckAll,t)||(n.isCheckAll=t),p(t)}),h("ngModelChange",function(t){c(e);let n=l(),_=C(0);return p(n.onCheckAllChange(t,_))}),s(),o(2,"label",13),g(3," Check All "),s()(),P(4,Ae,4,8,"div",14,V)}if(i&2){let e=l(),r=C(0);a(),K(X(4,ke)),u("binary",!0),v("ngModel",e.isCheckAll),a(3),L(r)}}var Ve=(()=>{class i{constructor(){this.dialogRef=f(fe),this.data=f(te),this.userService=f(E),this.dialogData=f(te),this.toastr=f(Z),this.userGroups=R(()=>this.dialogData.userGroups||[]),this.availableUsers=R(()=>{let e=new Map;return this.dialogData.availableUsers.forEach(r=>e.set(r.ID,r)),e}),this.migrateLoader$=this.userService.getUserMigrateLoader().pipe(G(e=>e.Data),G(e=>e.filter(t=>this.availableUsers().has(t.ID)===!1)),G(e=>e.map(t=>(t.selected=!0,t))),k(1)),this.isCheckAll=U(!0),this.selectedGroup=U(null),this.emptyStateIcon=ie.EMPTY_LIST,this.config=new ye,this.config.title="Migrate Users",this.config.customWidth="600px"}onUserCheckChange(e){let r=e.every(t=>t.selected);this.isCheckAll.set(r)}onCheckAllChange(e,r){this.isCheckAll.set(e),r.forEach(t=>t.selected=e)}onClose(){this.dialogRef.close(!1)}onSubmit(e){let r=e.filter(n=>n.selected);if(r.length===0){this.toastr.error("Please select at least one user","Error");return}if(me.IsEmpty(this.selectedGroup())){this.toastr.error("Please select a user group","Error");return}let t={userIds:r.map(n=>n.ID),groupId:this.selectedGroup()};this.userService.migrateUser(t).subscribe(()=>{this.dialogRef.close(!0),this.toastr.success("Users migrated successfully","Success")})}static{this.\u0275fac=function(r){return new(r||i)}}static{this.\u0275cmp=B({type:i,selectors:[["app-migrate-dialog"]],features:[W([E])],decls:15,vars:8,consts:[[3,"onClose","onCancel","onOk","config"],["content",""],[1,"row"],[1,"col","border-end"],[1,"modal-title","mb-8"],[1,"mt-5"],[1,"d-flex","flex-column","align-items-center","mt-5"],[1,"col"],["optionLabel","Name","optionValue","ID","placeholder","Select a Channel","appendTo","body","filterBy","Name",1,"w-100",2,"--p-select-padding-y","0.75rem",3,"ngModelChange","options","filter","ngModel"],["alt","No users found",2,"width","100px","height","100px",3,"src"],[1,"text-muted","mt-4","opacity-50",2,"margin-bottom","0px"],[1,"d-flex","w-100","align-items-center","mb-4"],["id","checkBoxAll",3,"ngModelChange","binary","ngModel"],["for","checkBoxAll",1,"ms-2"],[1,"d-flex","w-100","align-items-center","mb-3","ms-10"],[3,"ngModelChange","binary","id","ngModel"],[1,"ms-2",3,"for"]],template:function(r,t){if(r&1){let n=y();N(0),A(1,"async"),o(2,"modal-material",0),h("onClose",function(){return c(n),p(t.onClose())})("onCancel",function(){return c(n),p(t.onClose())})("onOk",function(){c(n);let d=C(0);return p(t.onSubmit(d))}),o(3,"div",1)(4,"div",2)(5,"div",3)(6,"h5",4),g(7,"Users from POS"),s(),o(8,"div",5),x(9,Oe,4,1,"div",6)(10,Fe,6,5),s()(),o(11,"div",7)(12,"h5",4),g(13,"Assign Group"),s(),o(14,"p-select",8),w("ngModelChange",function(d){return c(n),M(t.selectedGroup,d)||(t.selectedGroup=d),p(d)}),s()()()()()}if(r&2){let n=O(F(1,5,t.migrateLoader$));a(2),u("config",t.config),a(7),S((n==null?null:n.length)===0?9:10),a(5),u("options",t.userGroups())("filter",!0),v("ngModel",t.selectedGroup)}},dependencies:[q,$,Ue,j,z,H,Te,Me],encapsulation:2})}}return i})();var Pe=i=>({ID:i});function Re(i,m){if(i&1){let e=y();o(0,"button",13),h("click",function(){c(e);let t=l(2),n=C(0);return p(t.onDeleteUser(n==null?null:n.Filter))}),I(1,"i",14),g(2),s()}if(i&2){let e,r=l(2);a(2),D(" Delete (",(e=r.selectedUsers())==null?null:e.length,") ")}}function Ge(i,m){if(i&1&&(b(0),x(1,Re,3,1,"button",12),T()),i&2){let e,r=l();a(),S(((e=r.selectedUsers())==null?null:e.length)>0?1:-1)}}function Be(i,m){if(i&1){let e=y();b(0),o(1,"button",15),h("click",function(){c(e);let t=l(),n=C(0),_=C(2);return p(t.onMigrateUser(n==null||n.Options==null?null:n.Options.Groups,_==null?null:_.Data))}),g(2," Migrate "),s(),T()}}function We(i,m){i&1&&(b(0),o(1,"a",16),g(2," Invite "),s(),T())}function $e(i,m){if(i&1){let e=y();b(0),o(1,"th",17)(2,"div",18)(3,"input",19),h("change",function(t){c(e);let n=l(),_=C(2);return p(n.onCheckAllUser(t.target.checked,_==null?null:_.Data))}),s()()(),T()}}function qe(i,m){if(i&1){let e=y();o(0,"div",18)(1,"input",24),w("ngModelChange",function(t){c(e);let n=l(2).$implicit;return M(n.checked,t)||(n.checked=t),p(t)}),h("ngModelChange",function(){c(e);let t=l(3),n=C(2);return p(t.onSelectUser(n==null?null:n.Data))}),s()()}if(i&2){let e=l(2).$implicit;a(),v("ngModel",e.checked)}}function ze(i,m){if(i&1&&(b(0),o(1,"td"),x(2,qe,2,1,"div",18),s(),T()),i&2){let e,r=l().$implicit,t=l();a(2),S(r.Name!==((e=t.currentLoginUser())==null?null:e.username)?2:-1)}}function He(i,m){if(i&1&&(o(0,"a",20),g(1),s()),i&2){let e=l().$implicit;u("queryParams",ee(2,Pe,e.UserID)),a(),D(" ",e.Name," ")}}function je(i,m){if(i&1&&(o(0,"span"),g(1),s()),i&2){let e=l().$implicit;a(),Q(e.Name)}}function Ye(i,m){if(i&1&&(o(0,"a",21),g(1),s()),i&2){let e=l().$implicit;u("queryParams",ee(2,Pe,e.GroupID)),a(),D(" ",e.GroupName," ")}}function Ze(i,m){if(i&1&&(o(0,"span"),g(1),s()),i&2){let e=l().$implicit;a(),Q(e.GroupName)}}function Je(i,m){if(i&1&&I(0,"p-chip",23),i&2){let e=m.$implicit;u("label",e.Name)("image",e.Logo)("alt",e.Name)}}function Ke(i,m){if(i&1&&(o(0,"tr"),x(1,ze,3,1,"ng-container",3),o(2,"td"),x(3,He,2,4,"a",20)(4,je,2,1,"span"),s(),o(5,"td"),x(6,Ye,2,4,"a",21)(7,Ze,2,1,"span"),s(),o(8,"td")(9,"div",22),P(10,Je,1,3,"p-chip",23,V),s()()()),i&2){let e=m.$implicit,r=l();a(),u("ngxPermissionsOnly",r.userDeleteRole),a(2),S(r.hasUserEditRole()?3:4),a(3),S(r.hasUserEditRole()?6:7),a(4),L(e.Channels)}}function Qe(i,m){if(i&1){let e=y();o(0,"app-mat-paginator-no-count",25),h("next",function(){c(e);let t=l(),n=C(0);return p(t.onNextPage(n==null?null:n.Filter))})("previous",function(){c(e);let t=l(),n=C(0);return p(t.onPrevPage(n==null?null:n.Filter))}),s()}if(i&2){l();let e=C(0),r=C(2);u("filter",e==null?null:e.Filter)("totaldata",r==null||r.Data==null?null:r.Data.length)("paginationTotal",r==null?null:r.Count)("hasClicked",!0)}}var Rt=(()=>{class i{constructor(){this.usersService=f(E),this.permissionService=f(ue),this.toastService=f(Z),this.dialog=f(xe),this.userInviteOptions=U([]),this.searchText=U(null),this.selectedGroup=U(null),this.userLoader$=this.usersService.getLoader().pipe(J(e=>{this.userInviteOptions.set(e.Options.Users),this.initUsers(e.Filter)}),k(1)),this.users$=oe({Count:0,Data:[]}),this.userAddRole=Y.UserAdd,this.userDeleteRole=Y.UserDelete,this.hasUserEditRole=U(!1),this.selectedUsers=U([]),this.currentLoginUser=R(()=>{let e=localStorage.getItem(de.AUTHORIZATION);return e?JSON.parse(e):null}),this.permissionService.hasPermission(Y.UserEdit).then(e=>{this.hasUserEditRole.set(e)})}initUsers(e){let r=re(ne({},e),{Name:this.searchText(),GroupID:this.selectedGroup()});this.users$=this.usersService.getUsers(r).pipe(J(t=>this.filterUserInvtiteOptions(t.Data)),k(1))}filterUserInvtiteOptions(e){this.userInviteOptions.update(r=>r.filter(t=>e.findIndex(n=>n.UserID===t.ID)===-1))}onCheckAllUser(e,r){r.forEach(n=>{n.Name!==this.currentLoginUser()?.username&&(n.checked=e)});let t=r.filter(n=>n.checked);this.selectedUsers.set(t)}onSelectUser(e){let r=e.filter(t=>t.checked);this.selectedUsers.set(r)}onDeleteUser(e={PageNumber:1,PageSize:10}){let r=this.selectedUsers().map(n=>n.UserID);confirm("Are you sure you want to delete selected users?")&&this.usersService.deleteUsers(r).subscribe(()=>{this.selectedUsers.set([]),this.toastService.success("User deleted successfully","Success"),this.initUsers(e)})}onMigrateUser(e,r){this.dialog.open(Ve,{data:{userGroups:e,availableUsers:r}}).afterClosed().pipe(se(t=>t===!0)).subscribe(()=>{this.initUsers({PageNumber:1,PageSize:10})})}onNextPage(e){e.PageNumber+=1,this.initUsers(e)}onPrevPage(e){e.PageNumber-=1,this.initUsers(e)}onSuccessUpdateUser(e){e.PageNumber=1,this.initUsers(e)}static{this.\u0275fac=function(r){return new(r||i)}}static{this.\u0275cmp=B({type:i,selectors:[["app-users"]],features:[W([E])],decls:33,vars:17,consts:[["headerTitle","Users","description","Manage your users and their permissions",3,"textChange","onSubmit","text"],[1,"fw-bold","mb-2"],["appendTo","body","bindLabel","Name","name","Name","bindValue","ID","placeholder","Select Group",1,"center-text",3,"ngModelChange","clearable","items","ngModel"],[4,"ngxPermissionsOnly"],[1,"container-fluid"],[1,"row","mt-6"],[1,"col-12"],[1,"table"],[1,"thead-light","sticky-top-thead"],[2,"width","15%"],[3,"filter","totaldata","paginationTotal","hasClicked"],[3,"onSuccessUpdateUser","groups","users"],[1,"btn","btn-danger","me-3"],[1,"btn","btn-danger","me-3",3,"click"],[1,"fa","fa-trash","me-1"],[1,"btn","btn-success","me-3",3,"click"],["role","button","routerLink","/menu/users/users/form",1,"btn","btn-success"],[2,"width","5px"],[1,"d-flex"],["name","selectAll","type","checkbox",3,"change"],["routerLink","/menu/users/users/info",3,"queryParams"],["routerLink","/menu/users/groups/info",3,"queryParams"],[1,"lh-base"],[1,"me-3","mb-3",2,"--p-chip-image-width","1.2rem","--p-chip-image-height","1.2rem","--p-chip-padding-x","1rem","--p-chip-padding-y","0.5rem","--p-chip-border-radius","0.5rem","--p-chip-font-size","1.2rem",3,"label","image","alt"],["type","checkbox",3,"ngModelChange","ngModel"],[3,"next","previous","filter","totaldata","paginationTotal","hasClicked"]],template:function(r,t){if(r&1){let n=y();N(0),A(1,"async"),N(2),A(3,"async"),o(4,"mainpanel",0),w("textChange",function(d){return c(n),M(t.searchText,d)||(t.searchText=d),p(d)}),h("onSubmit",function(){c(n);let d=C(0);return p(t.initUsers(d==null?null:d.Filter))}),o(5,"filters")(6,"div")(7,"label",1),g(8,"Group"),s(),o(9,"ng-select",2),w("ngModelChange",function(d){return c(n),M(t.selectedGroup,d)||(t.selectedGroup=d),p(d)}),s()()(),o(10,"actions"),x(11,Ge,2,1,"ng-container",3)(12,Be,3,0,"ng-container",3)(13,We,3,0,"ng-container",3),s(),o(14,"content")(15,"div",4)(16,"div",5)(17,"div",6)(18,"table",7)(19,"thead",8)(20,"tr"),x(21,$e,4,0,"ng-container",3),o(22,"th",9),g(23,"Login ID"),s(),o(24,"th",9),g(25,"Group"),s(),o(26,"th"),g(27,"Channel Filter"),s()()(),o(28,"tbody"),P(29,Ke,12,3,"tr",null,V),s()(),x(31,Qe,1,4,"app-mat-paginator-no-count",10),s()()()()(),o(32,"invite-group",11),h("onSuccessUpdateUser",function(){c(n);let d=C(0);return p(t.onSuccessUpdateUser(d==null?null:d.Filter))}),s()}if(r&2){let n=O(F(1,11,t.userLoader$));a(2);let _=O(F(3,14,t.users$));a(2),v("text",t.searchText),a(5),u("clearable",!0)("items",n==null||n.Options==null?null:n.Options.Groups),v("ngModel",t.selectedGroup),a(2),u("ngxPermissionsOnly",t.userDeleteRole),a(),u("ngxPermissionsOnly",t.userAddRole),a(),u("ngxPermissionsOnly",t.userAddRole),a(8),u("ngxPermissionsOnly",t.userDeleteRole),a(8),L(_==null?null:_.Data),a(2),S(n?31:-1),a(),u("groups",n==null||n.Options==null?null:n.Options.Groups)("users",t.userInviteOptions())}},dependencies:[q,$,ve,Se,ce,le,Ee,ge,_e,he,Ce,j,pe,z,H,De,be,we],encapsulation:2})}}return i})();export{Rt as UsersComponent};