dealposbooks 5.44.3 → 5.44.5

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 (114) hide show
  1. package/3rdpartylicenses.txt +26 -26
  2. package/{chunk-36OX4S7M.js → chunk-2LQVI4EI.js} +1 -1
  3. package/{chunk-4N6GSIPJ.js → chunk-2NT6QV6Z.js} +1 -1
  4. package/{chunk-6Y5MGXZH.js → chunk-3IBMNMTG.js} +1 -1
  5. package/{chunk-Q5CVMJZC.js → chunk-3KYU6FI2.js} +1 -1
  6. package/{chunk-XJ2ROPTU.js → chunk-3S2PNR4Z.js} +1 -1
  7. package/{chunk-G227DH7O.js → chunk-4XSIXXLN.js} +1 -1
  8. package/{chunk-SGBIYUPN.js → chunk-5EFOWA6Y.js} +1 -1
  9. package/{chunk-2XUSZCQL.js → chunk-5JV52UYK.js} +1 -1
  10. package/{chunk-DEO5BTFZ.js → chunk-6DLTMMFM.js} +1 -1
  11. package/{chunk-Y5CORHF4.js → chunk-6E53DN2U.js} +1 -1
  12. package/{chunk-NMCKMUY4.js → chunk-6K5LNQ4J.js} +3 -3
  13. package/{chunk-OTVQDO2E.js → chunk-6MWBFPW4.js} +1 -1
  14. package/{chunk-LFZCMZAP.js → chunk-6O5EWYT7.js} +1 -1
  15. package/{chunk-UP67MADL.js → chunk-6V36DOK2.js} +1 -1
  16. package/{chunk-HAQ36ZI6.js → chunk-6XT4TD5A.js} +1 -1
  17. package/{chunk-CYUINWHS.js → chunk-72COD6JT.js} +1 -1
  18. package/{chunk-OIBDX2CA.js → chunk-72LNXEXV.js} +1 -1
  19. package/{chunk-75BIDGPN.js → chunk-75JN2ZUW.js} +1 -1
  20. package/{chunk-EQ4PLHI4.js → chunk-76LPTGLX.js} +1 -1
  21. package/{chunk-IGWIRCAS.js → chunk-7COI2POD.js} +1 -1
  22. package/{chunk-H6HNANYB.js → chunk-7FFMPB6T.js} +1 -1
  23. package/{chunk-ZLZ2QJQW.js → chunk-7LLABIQW.js} +1 -1
  24. package/{chunk-YV2QJ63P.js → chunk-ACTRMWEI.js} +1 -1
  25. package/{chunk-5CZNOXPC.js → chunk-AF357XP4.js} +1 -1
  26. package/{chunk-Q24GCSGD.js → chunk-AJZ7YLT4.js} +1 -1
  27. package/{chunk-CNXYBR45.js → chunk-AL647DUL.js} +1 -1
  28. package/{chunk-ARH3WEEF.js → chunk-ARXP327B.js} +1 -1
  29. package/{chunk-KTVH7TAU.js → chunk-ASJWTAOM.js} +2 -2
  30. package/{chunk-6GN3MGBY.js → chunk-ATJ55H5D.js} +1 -1
  31. package/chunk-BEOFO65Z.js +1 -0
  32. package/chunk-BGO2UFK2.js +202 -0
  33. package/{chunk-5HHIKBZO.js → chunk-BMP7MWL5.js} +1 -1
  34. package/{chunk-BLR3HBYP.js → chunk-BUYRVZ5Z.js} +1 -1
  35. package/{chunk-NQRIRHVH.js → chunk-C77ODEJ2.js} +1 -1
  36. package/{chunk-7DYACF4D.js → chunk-CNXEJBY5.js} +1 -1
  37. package/{chunk-H7Q35Y7G.js → chunk-CWHL7PNC.js} +1 -1
  38. package/{chunk-EO3GF7R2.js → chunk-DGVRVSM5.js} +1 -1
  39. package/{chunk-YP2C337W.js → chunk-DRHCM45R.js} +1 -1
  40. package/{chunk-VJ3IBUVO.js → chunk-E3QNEH3B.js} +1 -1
  41. package/{chunk-NCDT6JPP.js → chunk-E3ZGQRZ3.js} +1 -1
  42. package/{chunk-AOOG6YOT.js → chunk-EFDD6Q3K.js} +1 -1
  43. package/{chunk-U327WXYA.js → chunk-EYSAPK3T.js} +1 -1
  44. package/{chunk-ABDCHGHN.js → chunk-F4PAYMEC.js} +2 -2
  45. package/{chunk-VULUKLC5.js → chunk-FDQ2LFLZ.js} +1 -1
  46. package/{chunk-2AMKRQCQ.js → chunk-FLZOFUGM.js} +1 -1
  47. package/{chunk-MHCRVMJ6.js → chunk-GNP5EK7S.js} +1 -1
  48. package/{chunk-TUXKYFBU.js → chunk-GPY62T54.js} +1 -1
  49. package/{chunk-7S5V5Z5W.js → chunk-HB2WBGBC.js} +1 -1
  50. package/{chunk-KA4OB5NC.js → chunk-HMO5KXY6.js} +1 -1
  51. package/{chunk-6A2KUPOG.js → chunk-I7ILLTFH.js} +1 -1
  52. package/{chunk-MFK5RQPJ.js → chunk-IJTQE2H4.js} +1 -1
  53. package/{chunk-XF4KAC7E.js → chunk-IYDX6YH6.js} +1 -1
  54. package/{chunk-B54PFCWI.js → chunk-IYO6P6XI.js} +1 -1
  55. package/{chunk-V5BJICJN.js → chunk-JTZCMNEO.js} +1 -1
  56. package/{chunk-2AAVNIG7.js → chunk-JUCJGYST.js} +1 -1
  57. package/{chunk-7DR2UKQF.js → chunk-JZRV3QOK.js} +1 -1
  58. package/{chunk-JRVYSBUZ.js → chunk-K4P3JOA6.js} +1 -1
  59. package/chunk-KXE3J4PK.js +1 -0
  60. package/{chunk-VGNJD35F.js → chunk-L3PZS6EL.js} +1 -1
  61. package/{chunk-EB6NEJHF.js → chunk-M5PA3FZY.js} +1 -1
  62. package/{chunk-6PNHT5U7.js → chunk-MAID3JDN.js} +1 -1
  63. package/{chunk-RZFXAB7W.js → chunk-MJ6ZJF3H.js} +1 -1
  64. package/chunk-MKPNKYRM.js +1 -0
  65. package/{chunk-HG5MKVNR.js → chunk-MPHY6FVN.js} +1 -1
  66. package/{chunk-KIBBRAL5.js → chunk-MS6WBVQX.js} +1 -1
  67. package/{chunk-U5XXKH2H.js → chunk-MWFWXJG3.js} +1 -1
  68. package/{chunk-PXCKFFIW.js → chunk-MZ2PQW6O.js} +1 -1
  69. package/{chunk-6NX36ZC2.js → chunk-MZAFOBGT.js} +1 -1
  70. package/{chunk-3A4BFUGD.js → chunk-NHZLS6JU.js} +1 -1
  71. package/{chunk-NZN6QJR3.js → chunk-NMSYINDE.js} +1 -1
  72. package/{chunk-XD7VHCRC.js → chunk-OB46Z7ZH.js} +1 -1
  73. package/{chunk-JEMULXNI.js → chunk-OCVB5C44.js} +1 -1
  74. package/{chunk-IHZ55QSI.js → chunk-ODRV6XWO.js} +1 -1
  75. package/{chunk-P5EFFSD2.js → chunk-OJN5WUVR.js} +3 -3
  76. package/{chunk-N4JIPI53.js → chunk-PPKCZMH4.js} +1 -1
  77. package/{chunk-6IREJR5U.js → chunk-RFFE73ZX.js} +1 -1
  78. package/{chunk-5KDU7QSJ.js → chunk-RNOKJSET.js} +1 -1
  79. package/{chunk-VZ5CMS5O.js → chunk-SB5MSLCX.js} +1 -1
  80. package/{chunk-J7UTVREC.js → chunk-SHV5C2MT.js} +1 -1
  81. package/{chunk-3GGXPPQT.js → chunk-SPKOXGSS.js} +1 -1
  82. package/{chunk-PZ6DLHJM.js → chunk-SULNJD5I.js} +1 -1
  83. package/{chunk-CVL3S2HY.js → chunk-SVHOGUGR.js} +1 -1
  84. package/{chunk-F5EY5MQU.js → chunk-SZT2PF27.js} +1 -1
  85. package/{chunk-Z2DQWMXV.js → chunk-T7A5WDM2.js} +1 -1
  86. package/{chunk-ERPTVCO2.js → chunk-TI4QSY62.js} +1 -1
  87. package/{chunk-M5JA7U6K.js → chunk-TIPQLIPA.js} +1 -1
  88. package/{chunk-LXUX6W2U.js → chunk-TUQ4ULKG.js} +2 -2
  89. package/{chunk-BXEGWIR3.js → chunk-UDIFKJ7M.js} +1 -1
  90. package/{chunk-2D2YD753.js → chunk-UKBDY33R.js} +1 -1
  91. package/{chunk-EL5BUFMO.js → chunk-VPQDUC77.js} +1 -1
  92. package/{chunk-R7N6BWL5.js → chunk-VRKBMD72.js} +1 -1
  93. package/{chunk-DYZDM42A.js → chunk-VSVW7QXM.js} +1 -1
  94. package/chunk-WJXJAFHD.js +1 -0
  95. package/{chunk-KJ2WX3FC.js → chunk-WXT6EZ2V.js} +1 -1
  96. package/{chunk-OVAQBQEJ.js → chunk-XLPFLHKU.js} +1 -1
  97. package/{chunk-BKOGQ4CV.js → chunk-Y3DV6GWE.js} +1 -1
  98. package/{chunk-CH72WUSD.js → chunk-YQ6KW4KQ.js} +1 -1
  99. package/{chunk-5EO4AOJJ.js → chunk-YVNFNSPP.js} +1 -1
  100. package/{chunk-2MKKFLNJ.js → chunk-ZDTMCWOO.js} +1 -1
  101. package/{chunk-KGQGMXW6.js → chunk-ZEWON3MW.js} +1 -1
  102. package/{chunk-UBRDL34X.js → chunk-ZZ4C4CJ3.js} +1 -1
  103. package/index.html +2 -2
  104. package/{main-4VED6FSQ.js → main-LNRYDQKN.js} +1 -1
  105. package/package.json +1 -1
  106. package/chunk-3QEXRFQR.js +0 -1
  107. package/chunk-D2FS6PFS.js +0 -1
  108. package/chunk-JCGI23HA.js +0 -1
  109. package/chunk-L3VZGRTM.js +0 -202
  110. package/chunk-O3QTSNFV.js +0 -1
  111. package/chunk-P23UAWUR.js +0 -1
  112. package/chunk-QF4D5YPK.js +0 -1
  113. package/chunk-SHXQ2KL2.js +0 -1
  114. package/chunk-UM7KECFQ.js +0 -1
@@ -1,4 +1,30 @@
1
1
 
2
+ --------------------------------------------------------------------------------
3
+ Package: @angular/animations
4
+ License: "MIT"
5
+
6
+ The MIT License
7
+
8
+ Copyright (c) 2010-2025 Google LLC. https://angular.dev/license
9
+
10
+ Permission is hereby granted, free of charge, to any person obtaining a copy
11
+ of this software and associated documentation files (the "Software"), to deal
12
+ in the Software without restriction, including without limitation the rights
13
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
14
+ copies of the Software, and to permit persons to whom the Software is
15
+ furnished to do so, subject to the following conditions:
16
+
17
+ The above copyright notice and this permission notice shall be included in
18
+ all copies or substantial portions of the Software.
19
+
20
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
23
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
24
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
25
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
26
+ THE SOFTWARE.
27
+
2
28
  --------------------------------------------------------------------------------
3
29
  Package: primeng
4
30
  License: "SEE LICENSE IN LICENSE.md"
@@ -111,32 +137,6 @@ Package: @dealpos-npm/ng-dealpos-library
111
137
  License: "ISC"
112
138
 
113
139
 
114
- --------------------------------------------------------------------------------
115
- Package: @angular/animations
116
- License: "MIT"
117
-
118
- The MIT License
119
-
120
- Copyright (c) 2010-2025 Google LLC. https://angular.dev/license
121
-
122
- Permission is hereby granted, free of charge, to any person obtaining a copy
123
- of this software and associated documentation files (the "Software"), to deal
124
- in the Software without restriction, including without limitation the rights
125
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
126
- copies of the Software, and to permit persons to whom the Software is
127
- furnished to do so, subject to the following conditions:
128
-
129
- The above copyright notice and this permission notice shall be included in
130
- all copies or substantial portions of the Software.
131
-
132
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
133
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
134
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
135
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
136
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
137
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
138
- THE SOFTWARE.
139
-
140
140
  --------------------------------------------------------------------------------
141
141
  Package: uuid
142
142
  License: "MIT"
@@ -1,4 +1,4 @@
1
- import{a as fe}from"./chunk-VGNJD35F.js";import{a as he,h as G,n as _e,r as be}from"./chunk-H6HNANYB.js";import{La as me,Ma as K,Ua as de,a as le,aa as pe,d as ce}from"./chunk-OIBDX2CA.js";import{h as re,k as oe,l as se,m as ue,s as ae}from"./chunk-VZ5CMS5O.js";import{$b as S,$c as E,Aa as k,Bb as F,Cc as ie,Db as g,Kb as _,Lb as l,Ob as te,Pb as w,Vb as I,Wb as C,Xb as x,Yb as R,Zb as $,_c as T,ba as Q,ca as H,da as W,ec as V,fc as u,hb as f,ia as Z,kc as U,lc as ne,mc as A,nb as Y,nc as L,pa as J,qa as m,ra as d,sa as O,ua as N,wa as X,xb as M,yb as ee}from"./chunk-NMCKMUY4.js";import{a as q,b as j}from"./chunk-YQFG5XE2.js";var xe=(()=>{class i extends G{static \u0275fac=(()=>{let e;return function(t){return(e||(e=N(i)))(t||i)}})();static \u0275cmp=M({type:i,selectors:[["AngleDownIcon"]],features:[F],decls:2,vars:5,consts:[["width","14","height","14","viewBox","0 0 14 14","fill","none","xmlns","http://www.w3.org/2000/svg"],["d","M3.58659 4.5007C3.68513 4.50023 3.78277 4.51945 3.87379 4.55723C3.9648 4.59501 4.04735 4.65058 4.11659 4.7207L7.11659 7.7207L10.1166 4.7207C10.2619 4.65055 10.4259 4.62911 10.5843 4.65956C10.7427 4.69002 10.8871 4.77074 10.996 4.88976C11.1049 5.00877 11.1726 5.15973 11.1889 5.32022C11.2052 5.48072 11.1693 5.6422 11.0866 5.7807L7.58659 9.2807C7.44597 9.42115 7.25534 9.50004 7.05659 9.50004C6.85784 9.50004 6.66722 9.42115 6.52659 9.2807L3.02659 5.7807C2.88614 5.64007 2.80725 5.44945 2.80725 5.2507C2.80725 5.05195 2.88614 4.86132 3.02659 4.7207C3.09932 4.64685 3.18675 4.58911 3.28322 4.55121C3.37969 4.51331 3.48305 4.4961 3.58659 4.5007Z","fill","currentColor"]],template:function(n,t){n&1&&(O(),I(0,"svg",0),x(1,"path",1),C()),n&2&&(w(t.getClassNames()),_("aria-label",t.ariaLabel)("aria-hidden",t.ariaHidden)("role",t.role))},encapsulation:2})}return i})();var ye=(()=>{class i extends G{static \u0275fac=(()=>{let e;return function(t){return(e||(e=N(i)))(t||i)}})();static \u0275cmp=M({type:i,selectors:[["AngleUpIcon"]],features:[F],decls:2,vars:5,consts:[["width","14","height","14","viewBox","0 0 14 14","fill","none","xmlns","http://www.w3.org/2000/svg"],["d","M10.4134 9.49931C10.3148 9.49977 10.2172 9.48055 10.1262 9.44278C10.0352 9.405 9.95263 9.34942 9.88338 9.27931L6.88338 6.27931L3.88338 9.27931C3.73811 9.34946 3.57409 9.3709 3.41567 9.34044C3.25724 9.30999 3.11286 9.22926 3.00395 9.11025C2.89504 8.99124 2.82741 8.84028 2.8111 8.67978C2.79478 8.51928 2.83065 8.35781 2.91338 8.21931L6.41338 4.71931C6.55401 4.57886 6.74463 4.49997 6.94338 4.49997C7.14213 4.49997 7.33276 4.57886 7.47338 4.71931L10.9734 8.21931C11.1138 8.35994 11.1927 8.55056 11.1927 8.74931C11.1927 8.94806 11.1138 9.13868 10.9734 9.27931C10.9007 9.35315 10.8132 9.41089 10.7168 9.44879C10.6203 9.48669 10.5169 9.5039 10.4134 9.49931Z","fill","currentColor"]],template:function(n,t){n&1&&(O(),I(0,"svg",0),x(1,"path",1),C()),n&2&&(w(t.getClassNames()),_("aria-label",t.ariaLabel)("aria-hidden",t.ariaHidden)("role",t.role))},encapsulation:2})}return i})();var we=["clearicon"],Te=["incrementbuttonicon"],Be=["decrementbuttonicon"],ve=["input"];function De(i,h){if(i&1){let e=S();I(0,"TimesIcon",7),V("click",function(){m(e);let t=u(2);return d(t.clear())}),C()}i&2&&(l("ngClass","p-inputnumber-clear-icon"),_("data-pc-section","clearIcon"))}function Ve(i,h){}function Ee(i,h){i&1&&g(0,Ve,0,0,"ng-template")}function Se(i,h){if(i&1){let e=S();I(0,"span",8),V("click",function(){m(e);let t=u(2);return d(t.clear())}),g(1,Ee,1,0,null,9),C()}if(i&2){let e=u(2);_("data-pc-section","clearIcon"),f(),l("ngTemplateOutlet",e.clearIconTemplate||e._clearIconTemplate)}}function Ne(i,h){if(i&1&&(R(0),g(1,De,1,2,"TimesIcon",5)(2,Se,2,2,"span",6),$()),i&2){let e=u();f(),l("ngIf",!e.clearIconTemplate&&!e._clearIconTemplate),f(),l("ngIf",e.clearIconTemplate||e._clearIconTemplate)}}function ke(i,h){if(i&1&&x(0,"span",13),i&2){let e=u(2);l("ngClass",e.incrementButtonIcon),_("data-pc-section","incrementbuttonicon")}}function Me(i,h){i&1&&x(0,"AngleUpIcon"),i&2&&_("data-pc-section","incrementbuttonicon")}function Fe(i,h){}function Re(i,h){i&1&&g(0,Fe,0,0,"ng-template")}function $e(i,h){if(i&1&&(R(0),g(1,Me,1,1,"AngleUpIcon",2)(2,Re,1,0,null,9),$()),i&2){let e=u(2);f(),l("ngIf",!e.incrementButtonIconTemplate&&!e._incrementButtonIconTemplate),f(),l("ngTemplateOutlet",e.incrementButtonIconTemplate||e._incrementButtonIconTemplate)}}function Ae(i,h){if(i&1&&x(0,"span",13),i&2){let e=u(2);l("ngClass",e.decrementButtonIcon),_("data-pc-section","decrementbuttonicon")}}function Le(i,h){i&1&&x(0,"AngleDownIcon"),i&2&&_("data-pc-section","decrementbuttonicon")}function Ue(i,h){}function ze(i,h){i&1&&g(0,Ue,0,0,"ng-template")}function Oe(i,h){if(i&1&&(R(0),g(1,Le,1,1,"AngleDownIcon",2)(2,ze,1,0,null,9),$()),i&2){let e=u(2);f(),l("ngIf",!e.decrementButtonIconTemplate&&!e._decrementButtonIconTemplate),f(),l("ngTemplateOutlet",e.decrementButtonIconTemplate||e._decrementButtonIconTemplate)}}function Ke(i,h){if(i&1){let e=S();I(0,"span",10)(1,"button",11),V("mousedown",function(t){m(e);let r=u();return d(r.onUpButtonMouseDown(t))})("mouseup",function(){m(e);let t=u();return d(t.onUpButtonMouseUp())})("mouseleave",function(){m(e);let t=u();return d(t.onUpButtonMouseLeave())})("keydown",function(t){m(e);let r=u();return d(r.onUpButtonKeyDown(t))})("keyup",function(){m(e);let t=u();return d(t.onUpButtonKeyUp())}),g(2,ke,1,2,"span",12)(3,$e,3,2,"ng-container",2),C(),I(4,"button",11),V("mousedown",function(t){m(e);let r=u();return d(r.onDownButtonMouseDown(t))})("mouseup",function(){m(e);let t=u();return d(t.onDownButtonMouseUp())})("mouseleave",function(){m(e);let t=u();return d(t.onDownButtonMouseLeave())})("keydown",function(t){m(e);let r=u();return d(r.onDownButtonKeyDown(t))})("keyup",function(){m(e);let t=u();return d(t.onDownButtonKeyUp())}),g(5,Ae,1,2,"span",12)(6,Oe,3,2,"ng-container",2),C()()}if(i&2){let e=u();_("data-pc-section","buttonGroup"),f(),w(e.incrementButtonClass),l("ngClass",e._incrementButtonClass)("disabled",e.disabled),_("aria-hidden",!0)("data-pc-section","incrementbutton"),f(),l("ngIf",e.incrementButtonIcon),f(),l("ngIf",!e.incrementButtonIcon),f(),w(e.decrementButtonClass),l("ngClass",e._decrementButtonClass)("disabled",e.disabled),_("aria-hidden",!0)("data-pc-section","decrementbutton"),f(),l("ngIf",e.decrementButtonIcon),f(),l("ngIf",!e.decrementButtonIcon)}}function Ge(i,h){if(i&1&&x(0,"span",13),i&2){let e=u(2);l("ngClass",e.incrementButtonIcon),_("data-pc-section","incrementbuttonicon")}}function Pe(i,h){i&1&&x(0,"AngleUpIcon"),i&2&&_("data-pc-section","incrementbuttonicon")}function qe(i,h){}function je(i,h){i&1&&g(0,qe,0,0,"ng-template")}function Qe(i,h){if(i&1&&(R(0),g(1,Pe,1,1,"AngleUpIcon",2)(2,je,1,0,null,9),$()),i&2){let e=u(2);f(),l("ngIf",!e.incrementButtonIconTemplate&&!e._incrementButtonIconTemplate),f(),l("ngTemplateOutlet",e.incrementButtonIconTemplate||e._incrementButtonIconTemplate)}}function He(i,h){if(i&1){let e=S();I(0,"button",11),V("mousedown",function(t){m(e);let r=u();return d(r.onUpButtonMouseDown(t))})("mouseup",function(){m(e);let t=u();return d(t.onUpButtonMouseUp())})("mouseleave",function(){m(e);let t=u();return d(t.onUpButtonMouseLeave())})("keydown",function(t){m(e);let r=u();return d(r.onUpButtonKeyDown(t))})("keyup",function(){m(e);let t=u();return d(t.onUpButtonKeyUp())}),g(1,Ge,1,2,"span",12)(2,Qe,3,2,"ng-container",2),C()}if(i&2){let e=u();w(e.incrementButtonClass),l("ngClass",e._incrementButtonClass)("disabled",e.disabled),_("aria-hidden",!0)("data-pc-section","incrementbutton"),f(),l("ngIf",e.incrementButtonIcon),f(),l("ngIf",!e.incrementButtonIcon)}}function We(i,h){if(i&1&&x(0,"span",13),i&2){let e=u(2);l("ngClass",e.decrementButtonIcon),_("data-pc-section","decrementbuttonicon")}}function Ze(i,h){i&1&&x(0,"AngleDownIcon"),i&2&&_("data-pc-section","decrementbuttonicon")}function Je(i,h){}function Xe(i,h){i&1&&g(0,Je,0,0,"ng-template")}function Ye(i,h){if(i&1&&(R(0),g(1,Ze,1,1,"AngleDownIcon",2)(2,Xe,1,0,null,9),$()),i&2){let e=u(2);f(),l("ngIf",!e.decrementButtonIconTemplate&&!e._decrementButtonIconTemplate),f(),l("ngTemplateOutlet",e.decrementButtonIconTemplate||e._decrementButtonIconTemplate)}}function et(i,h){if(i&1){let e=S();I(0,"button",11),V("mousedown",function(t){m(e);let r=u();return d(r.onDownButtonMouseDown(t))})("mouseup",function(){m(e);let t=u();return d(t.onDownButtonMouseUp())})("mouseleave",function(){m(e);let t=u();return d(t.onDownButtonMouseLeave())})("keydown",function(t){m(e);let r=u();return d(r.onDownButtonKeyDown(t))})("keyup",function(){m(e);let t=u();return d(t.onDownButtonKeyUp())}),g(1,We,1,2,"span",12)(2,Ye,3,2,"ng-container",2),C()}if(i&2){let e=u();w(e.decrementButtonClass),l("ngClass",e._decrementButtonClass)("disabled",e.disabled),_("aria-hidden",!0)("data-pc-section","decrementbutton"),f(),l("ngIf",e.decrementButtonIcon),f(),l("ngIf",!e.decrementButtonIcon)}}var tt=({dt:i})=>`
1
+ import{a as fe}from"./chunk-L3PZS6EL.js";import{a as he,h as G,n as _e,r as be}from"./chunk-7FFMPB6T.js";import{La as me,Ma as K,Ua as de,a as le,aa as pe,d as ce}from"./chunk-72LNXEXV.js";import{h as re,k as oe,l as se,m as ue,s as ae}from"./chunk-SB5MSLCX.js";import{$b as S,$c as E,Aa as k,Bb as F,Cc as ie,Db as g,Kb as _,Lb as l,Ob as te,Pb as w,Vb as I,Wb as C,Xb as x,Yb as R,Zb as $,_c as T,ba as Q,ca as H,da as W,ec as V,fc as u,hb as f,ia as Z,kc as U,lc as ne,mc as A,nb as Y,nc as L,pa as J,qa as m,ra as d,sa as O,ua as N,wa as X,xb as M,yb as ee}from"./chunk-6K5LNQ4J.js";import{a as q,b as j}from"./chunk-YQFG5XE2.js";var xe=(()=>{class i extends G{static \u0275fac=(()=>{let e;return function(t){return(e||(e=N(i)))(t||i)}})();static \u0275cmp=M({type:i,selectors:[["AngleDownIcon"]],features:[F],decls:2,vars:5,consts:[["width","14","height","14","viewBox","0 0 14 14","fill","none","xmlns","http://www.w3.org/2000/svg"],["d","M3.58659 4.5007C3.68513 4.50023 3.78277 4.51945 3.87379 4.55723C3.9648 4.59501 4.04735 4.65058 4.11659 4.7207L7.11659 7.7207L10.1166 4.7207C10.2619 4.65055 10.4259 4.62911 10.5843 4.65956C10.7427 4.69002 10.8871 4.77074 10.996 4.88976C11.1049 5.00877 11.1726 5.15973 11.1889 5.32022C11.2052 5.48072 11.1693 5.6422 11.0866 5.7807L7.58659 9.2807C7.44597 9.42115 7.25534 9.50004 7.05659 9.50004C6.85784 9.50004 6.66722 9.42115 6.52659 9.2807L3.02659 5.7807C2.88614 5.64007 2.80725 5.44945 2.80725 5.2507C2.80725 5.05195 2.88614 4.86132 3.02659 4.7207C3.09932 4.64685 3.18675 4.58911 3.28322 4.55121C3.37969 4.51331 3.48305 4.4961 3.58659 4.5007Z","fill","currentColor"]],template:function(n,t){n&1&&(O(),I(0,"svg",0),x(1,"path",1),C()),n&2&&(w(t.getClassNames()),_("aria-label",t.ariaLabel)("aria-hidden",t.ariaHidden)("role",t.role))},encapsulation:2})}return i})();var ye=(()=>{class i extends G{static \u0275fac=(()=>{let e;return function(t){return(e||(e=N(i)))(t||i)}})();static \u0275cmp=M({type:i,selectors:[["AngleUpIcon"]],features:[F],decls:2,vars:5,consts:[["width","14","height","14","viewBox","0 0 14 14","fill","none","xmlns","http://www.w3.org/2000/svg"],["d","M10.4134 9.49931C10.3148 9.49977 10.2172 9.48055 10.1262 9.44278C10.0352 9.405 9.95263 9.34942 9.88338 9.27931L6.88338 6.27931L3.88338 9.27931C3.73811 9.34946 3.57409 9.3709 3.41567 9.34044C3.25724 9.30999 3.11286 9.22926 3.00395 9.11025C2.89504 8.99124 2.82741 8.84028 2.8111 8.67978C2.79478 8.51928 2.83065 8.35781 2.91338 8.21931L6.41338 4.71931C6.55401 4.57886 6.74463 4.49997 6.94338 4.49997C7.14213 4.49997 7.33276 4.57886 7.47338 4.71931L10.9734 8.21931C11.1138 8.35994 11.1927 8.55056 11.1927 8.74931C11.1927 8.94806 11.1138 9.13868 10.9734 9.27931C10.9007 9.35315 10.8132 9.41089 10.7168 9.44879C10.6203 9.48669 10.5169 9.5039 10.4134 9.49931Z","fill","currentColor"]],template:function(n,t){n&1&&(O(),I(0,"svg",0),x(1,"path",1),C()),n&2&&(w(t.getClassNames()),_("aria-label",t.ariaLabel)("aria-hidden",t.ariaHidden)("role",t.role))},encapsulation:2})}return i})();var we=["clearicon"],Te=["incrementbuttonicon"],Be=["decrementbuttonicon"],ve=["input"];function De(i,h){if(i&1){let e=S();I(0,"TimesIcon",7),V("click",function(){m(e);let t=u(2);return d(t.clear())}),C()}i&2&&(l("ngClass","p-inputnumber-clear-icon"),_("data-pc-section","clearIcon"))}function Ve(i,h){}function Ee(i,h){i&1&&g(0,Ve,0,0,"ng-template")}function Se(i,h){if(i&1){let e=S();I(0,"span",8),V("click",function(){m(e);let t=u(2);return d(t.clear())}),g(1,Ee,1,0,null,9),C()}if(i&2){let e=u(2);_("data-pc-section","clearIcon"),f(),l("ngTemplateOutlet",e.clearIconTemplate||e._clearIconTemplate)}}function Ne(i,h){if(i&1&&(R(0),g(1,De,1,2,"TimesIcon",5)(2,Se,2,2,"span",6),$()),i&2){let e=u();f(),l("ngIf",!e.clearIconTemplate&&!e._clearIconTemplate),f(),l("ngIf",e.clearIconTemplate||e._clearIconTemplate)}}function ke(i,h){if(i&1&&x(0,"span",13),i&2){let e=u(2);l("ngClass",e.incrementButtonIcon),_("data-pc-section","incrementbuttonicon")}}function Me(i,h){i&1&&x(0,"AngleUpIcon"),i&2&&_("data-pc-section","incrementbuttonicon")}function Fe(i,h){}function Re(i,h){i&1&&g(0,Fe,0,0,"ng-template")}function $e(i,h){if(i&1&&(R(0),g(1,Me,1,1,"AngleUpIcon",2)(2,Re,1,0,null,9),$()),i&2){let e=u(2);f(),l("ngIf",!e.incrementButtonIconTemplate&&!e._incrementButtonIconTemplate),f(),l("ngTemplateOutlet",e.incrementButtonIconTemplate||e._incrementButtonIconTemplate)}}function Ae(i,h){if(i&1&&x(0,"span",13),i&2){let e=u(2);l("ngClass",e.decrementButtonIcon),_("data-pc-section","decrementbuttonicon")}}function Le(i,h){i&1&&x(0,"AngleDownIcon"),i&2&&_("data-pc-section","decrementbuttonicon")}function Ue(i,h){}function ze(i,h){i&1&&g(0,Ue,0,0,"ng-template")}function Oe(i,h){if(i&1&&(R(0),g(1,Le,1,1,"AngleDownIcon",2)(2,ze,1,0,null,9),$()),i&2){let e=u(2);f(),l("ngIf",!e.decrementButtonIconTemplate&&!e._decrementButtonIconTemplate),f(),l("ngTemplateOutlet",e.decrementButtonIconTemplate||e._decrementButtonIconTemplate)}}function Ke(i,h){if(i&1){let e=S();I(0,"span",10)(1,"button",11),V("mousedown",function(t){m(e);let r=u();return d(r.onUpButtonMouseDown(t))})("mouseup",function(){m(e);let t=u();return d(t.onUpButtonMouseUp())})("mouseleave",function(){m(e);let t=u();return d(t.onUpButtonMouseLeave())})("keydown",function(t){m(e);let r=u();return d(r.onUpButtonKeyDown(t))})("keyup",function(){m(e);let t=u();return d(t.onUpButtonKeyUp())}),g(2,ke,1,2,"span",12)(3,$e,3,2,"ng-container",2),C(),I(4,"button",11),V("mousedown",function(t){m(e);let r=u();return d(r.onDownButtonMouseDown(t))})("mouseup",function(){m(e);let t=u();return d(t.onDownButtonMouseUp())})("mouseleave",function(){m(e);let t=u();return d(t.onDownButtonMouseLeave())})("keydown",function(t){m(e);let r=u();return d(r.onDownButtonKeyDown(t))})("keyup",function(){m(e);let t=u();return d(t.onDownButtonKeyUp())}),g(5,Ae,1,2,"span",12)(6,Oe,3,2,"ng-container",2),C()()}if(i&2){let e=u();_("data-pc-section","buttonGroup"),f(),w(e.incrementButtonClass),l("ngClass",e._incrementButtonClass)("disabled",e.disabled),_("aria-hidden",!0)("data-pc-section","incrementbutton"),f(),l("ngIf",e.incrementButtonIcon),f(),l("ngIf",!e.incrementButtonIcon),f(),w(e.decrementButtonClass),l("ngClass",e._decrementButtonClass)("disabled",e.disabled),_("aria-hidden",!0)("data-pc-section","decrementbutton"),f(),l("ngIf",e.decrementButtonIcon),f(),l("ngIf",!e.decrementButtonIcon)}}function Ge(i,h){if(i&1&&x(0,"span",13),i&2){let e=u(2);l("ngClass",e.incrementButtonIcon),_("data-pc-section","incrementbuttonicon")}}function Pe(i,h){i&1&&x(0,"AngleUpIcon"),i&2&&_("data-pc-section","incrementbuttonicon")}function qe(i,h){}function je(i,h){i&1&&g(0,qe,0,0,"ng-template")}function Qe(i,h){if(i&1&&(R(0),g(1,Pe,1,1,"AngleUpIcon",2)(2,je,1,0,null,9),$()),i&2){let e=u(2);f(),l("ngIf",!e.incrementButtonIconTemplate&&!e._incrementButtonIconTemplate),f(),l("ngTemplateOutlet",e.incrementButtonIconTemplate||e._incrementButtonIconTemplate)}}function He(i,h){if(i&1){let e=S();I(0,"button",11),V("mousedown",function(t){m(e);let r=u();return d(r.onUpButtonMouseDown(t))})("mouseup",function(){m(e);let t=u();return d(t.onUpButtonMouseUp())})("mouseleave",function(){m(e);let t=u();return d(t.onUpButtonMouseLeave())})("keydown",function(t){m(e);let r=u();return d(r.onUpButtonKeyDown(t))})("keyup",function(){m(e);let t=u();return d(t.onUpButtonKeyUp())}),g(1,Ge,1,2,"span",12)(2,Qe,3,2,"ng-container",2),C()}if(i&2){let e=u();w(e.incrementButtonClass),l("ngClass",e._incrementButtonClass)("disabled",e.disabled),_("aria-hidden",!0)("data-pc-section","incrementbutton"),f(),l("ngIf",e.incrementButtonIcon),f(),l("ngIf",!e.incrementButtonIcon)}}function We(i,h){if(i&1&&x(0,"span",13),i&2){let e=u(2);l("ngClass",e.decrementButtonIcon),_("data-pc-section","decrementbuttonicon")}}function Ze(i,h){i&1&&x(0,"AngleDownIcon"),i&2&&_("data-pc-section","decrementbuttonicon")}function Je(i,h){}function Xe(i,h){i&1&&g(0,Je,0,0,"ng-template")}function Ye(i,h){if(i&1&&(R(0),g(1,Ze,1,1,"AngleDownIcon",2)(2,Xe,1,0,null,9),$()),i&2){let e=u(2);f(),l("ngIf",!e.decrementButtonIconTemplate&&!e._decrementButtonIconTemplate),f(),l("ngTemplateOutlet",e.decrementButtonIconTemplate||e._decrementButtonIconTemplate)}}function et(i,h){if(i&1){let e=S();I(0,"button",11),V("mousedown",function(t){m(e);let r=u();return d(r.onDownButtonMouseDown(t))})("mouseup",function(){m(e);let t=u();return d(t.onDownButtonMouseUp())})("mouseleave",function(){m(e);let t=u();return d(t.onDownButtonMouseLeave())})("keydown",function(t){m(e);let r=u();return d(r.onDownButtonKeyDown(t))})("keyup",function(){m(e);let t=u();return d(t.onDownButtonKeyUp())}),g(1,We,1,2,"span",12)(2,Ye,3,2,"ng-container",2),C()}if(i&2){let e=u();w(e.decrementButtonClass),l("ngClass",e._decrementButtonClass)("disabled",e.disabled),_("aria-hidden",!0)("data-pc-section","decrementbutton"),f(),l("ngIf",e.decrementButtonIcon),f(),l("ngIf",!e.decrementButtonIcon)}}var tt=({dt:i})=>`
2
2
  .p-inputnumber {
3
3
  display: inline-flex;
4
4
  position: relative;
@@ -1 +1 @@
1
- import{a as D}from"./chunk-M5JA7U6K.js";import{a as nt}from"./chunk-G4XX7EU2.js";import{a as ze}from"./chunk-JRVYSBUZ.js";import{a as Ae,b as He}from"./chunk-BLR3HBYP.js";import{a as ie}from"./chunk-KA4OB5NC.js";import{b as J}from"./chunk-F5EY5MQU.js";import{a as Me}from"./chunk-XKI7WLHE.js";import{a as Ue,b as Pe}from"./chunk-7DYACF4D.js";import"./chunk-NZN6QJR3.js";import"./chunk-IGWIRCAS.js";import{a as z,b as j}from"./chunk-3A4BFUGD.js";import{d as ke,i as Ne,j as Je,k as Re}from"./chunk-EL5BUFMO.js";import{a as Te,b as Fe}from"./chunk-EQ4PLHI4.js";import"./chunk-H7Q35Y7G.js";import"./chunk-R7N6BWL5.js";import{a as Be}from"./chunk-QF4D5YPK.js";import"./chunk-2AAVNIG7.js";import{a as Ve,b as De}from"./chunk-LFZCMZAP.js";import"./chunk-6A2KUPOG.js";import"./chunk-36OX4S7M.js";import"./chunk-Q5CVMJZC.js";import"./chunk-3GGXPPQT.js";import"./chunk-MFK5RQPJ.js";import"./chunk-6GN3MGBY.js";import"./chunk-Q24GCSGD.js";import{g as Ie,h as Ee}from"./chunk-P5EFFSD2.js";import{b as ye,c as we}from"./chunk-VGNJD35F.js";import{a as ge,b as he}from"./chunk-2XUSZCQL.js";import{a as y,b as Se,c as xe,d as Ce,e as be,f as ve,g as it}from"./chunk-YV2QJ63P.js";import"./chunk-ARH3WEEF.js";import{n as de,o as ue,w as fe,x as _e}from"./chunk-H6HNANYB.js";import"./chunk-2D2YD753.js";import{b as ne,c as oe,e as re,f as le,k as ae,l as pe,o as me,u as se,x as ce}from"./chunk-OIBDX2CA.js";import"./chunk-AOOG6YOT.js";import"./chunk-BKOGQ4CV.js";import"./chunk-2MKKFLNJ.js";import{h as Q,j as X,k as Y,n as tt,p as Z,q as ee,s as te}from"./chunk-VZ5CMS5O.js";import"./chunk-F2X3VGZZ.js";import{$b as E,Bb as H,Cc as q,Db as g,Dc as $,Ec as F,Ha as k,Lb as s,Nc as w,Oc as M,Pc as V,Rc as b,Vb as l,Wb as o,Xb as x,Y as B,_ as G,bd as I,c as R,db as U,ec as T,fc as _,hb as a,ia as v,qa as h,ra as S,rc as m,s as O,sc as C,tc as N,ua as et,vc as L,wc as W,xb as A,xc as P,yc as K}from"./chunk-NMCKMUY4.js";import{a as c,b as d}from"./chunk-YQFG5XE2.js";var ht={data:{data:[],totalCount:0},meta:{options:{outlets:[],paymentStates:[],deliveryStates:[]},filter:{number:null,outletName:null,paymentState:0,deliveryState:0,from:null,to:null,customerID:null,pageNumber:1,pageSize:20,export:!1,exportPageNumber:1,exportPageSize:1e4}},filter:{number:null,outletName:null,paymentState:0,deliveryState:0,from:null,to:null,customerID:null,pageNumber:1,pageSize:20,export:!1,exportPageNumber:1,exportPageSize:1e4}},qe=Se(ve(ht),xe(t=>({first:I(()=>(t.filter().pageNumber-1)*t.filter().pageSize+1),end:I(()=>Math.min(t.filter().pageNumber*t.filter().pageSize,t.data().totalCount)),hasCheckedRows:I(()=>t.data().data.some(p=>p.checked)),checkedInvoice:I(()=>t.data().data.filter(p=>p.checked).map(p=>p.id))})),be(t=>{let p=v(D),e=v(J);return{updateFilter(n){y(t,i=>d(c({},i),{filter:c(c({},i.filter),n),skipRequestFirst:!1}))},onRowSelect(n){y(t,i=>{let f=i.data.data.map(u=>u.id===n.id?d(c({},u),{checked:!0}):u);return d(c({},i),{data:d(c({},i.data),{data:f})})})},onRowUnselect(n){y(t,i=>{let f=i.data.data.map(u=>u.id===n.id?d(c({},u),{checked:!1}):u);return d(c({},i),{data:d(c({},i.data),{data:f})})})},onHeaderCheckboxToggle(n){y(t,i=>{let f=i.data.data.map(u=>d(c({},u),{checked:n}));return d(c({},i),{data:d(c({},i.data),{data:f})})})},getCustomerInvoice:z(R(O(n=>Object.entries(n).reduce((i,[f,u])=>(u!=null&&(i[f]=u),i),{})),B(n=>p.getJournalInvoice(n).pipe(O(i=>d(c({},i),{data:i.data.map(f=>d(c({},f),{due:e.from(f.due)?e.from(f.due).format():null,checked:!1}))})),Be("getCustomerInvoice"),j({next:i=>{y(t,f=>d(c({},f),{data:d(c({},f.data),{data:i.data,totalCount:i.totalCount})}))},error:i=>{console.error("Error fetching customer invoice:",i)}}))))),getCustomerInvoiceLoader:z(R(B(()=>p.getJournalInvoiceLoader().pipe(j({next:n=>{y(t,i=>d(c({},i),{meta:n}))},error:n=>{console.error("Error fetching customer invoice loader:",n)}})))))}}),Ce(t=>({onInit:()=>{t.getCustomerInvoiceLoader(),t.getCustomerInvoice(t.filter)}})));var $e=t=>({"ng-invalid ng-dirty":t}),Ct=()=>({});function bt(t,p){if(t&1){let e=E();l(0,"p-button",10),T("onClick",function(){h(e);let n=_(2);return S(n.onGenerateJournal())}),o()}}function vt(t,p){if(t&1&&g(0,bt,1,0,"p-button",9),t&2){let e=_();s("ngIf",e.store.hasCheckedRows())}}function yt(t,p){t&1&&(l(0,"tr")(1,"th",12),x(2,"p-tableHeaderCheckbox"),o(),l(3,"th",13),m(4,"Outlet"),o(),l(5,"th",14),m(6,"Number"),o(),l(7,"th",15),m(8,"Customer"),o(),l(9,"th",16),m(10,"Date"),o(),l(11,"th",16),m(12,"Due"),o(),l(13,"th",13),m(14,"Amount"),o(),l(15,"th",17),m(16,"Payment"),o(),l(17,"th",17),m(18,"Delivery"),o(),x(19,"th",18),o())}function wt(t,p){if(t&1&&(l(0,"tr")(1,"td"),x(2,"p-tableCheckbox",19),o(),l(3,"td"),m(4),o(),l(5,"td")(6,"a",20),m(7),o()(),l(8,"td")(9,"a",20),m(10),o()(),l(11,"td"),m(12),w(13,"date"),o(),l(14,"td"),m(15),w(16,"date"),o(),l(17,"td"),m(18),w(19,"number"),o(),l(20,"td"),x(21,"p-chip",21),o(),l(22,"td"),x(23,"p-chip",21),o(),l(24,"td"),x(25,"p-button",22),o()()),t&2){let e=p.$implicit,r=_(2);a(2),s("value",e),a(2),C(e.outlet),a(2),s("href",r.authService.getTenantExternalURL()+"/menu/Orders/Orders/Customer_Invoice/Info?ID="+e.id,U),a(),N(" ",e.number," "),a(2),s("href",r.authService.getTenantExternalURL()+"/menu/Contacts/Contact/Customers/Info?ID="+e.customerID,U),a(),N(" ",e.customer," "),a(2),C(V(13,14,e.date,"d MMM y hh:mm")),a(3),C(e.due?V(16,17,e.due,"d MMM y hh:mm"):"-"),a(3),C(M(19,20,e.amount)),a(3),s("label",e.payment),a(2),s("label",e.delivery),a(2),s("icon",e.integrated?"fa-solid fa-circle-check":"fa-solid fa-circle-xmark")("severity",e.integrated?"success":"danger")("text",!0)}}function It(t,p){if(t&1&&m(0),t&2){let e=_(2);L(" Showing ",e.store.first()," to ",e.store.end()," of ",e.store.data().totalCount," entries ")}}function Et(t,p){t&1&&(l(0,"tr")(1,"td",23)(2,"span"),m(3,"No records found."),o()()())}function Tt(t,p){if(t&1){let e=E();l(0,"p-panel")(1,"p-table",11),T("onPage",function(n){h(e);let i=_();return S(i.onPageChange(n))})("onRowSelect",function(n){h(e);let i=_();return S(i.onRowSelect(n))})("onRowUnselect",function(n){h(e);let i=_();return S(i.onRowUnselect(n))})("onHeaderCheckboxToggle",function(n){h(e);let i=_();return S(i.onHeaderCheckboxToggle(n))}),g(2,yt,20,0,"ng-template",null,3,b)(4,wt,26,22,"ng-template",null,4,b)(6,It,1,3,"ng-template",null,5,b)(8,Et,4,0,"ng-template",null,6,b),o()()}if(t&2){let e=_();a(),s("lazy",!0)("paginator",!0)("rows",e.store.filter().pageSize)("totalRecords",e.store.data().totalCount)("value",e.store.data().data)}}function Ft(t,p){if(t&1&&(l(0,"span",36),m(1),w(2,"truncate"),o()),t&2){let e=p.$implicit;s("pTooltip",e.name),a(),N(" ",V(2,2,e.name,30)," ")}}function Vt(t,p){if(t&1&&(l(0,"div")(1,"span",38),m(2),o()()),t&2){let e=p.$implicit;a(2),C(e)}}function Dt(t,p){if(t&1&&(l(0,"div"),g(1,Vt,3,1,"div",37),o()),t&2){let e=_(2);a(),s("ngForOf",e.getErrors("from"))}}function kt(t,p){if(t&1&&(l(0,"div")(1,"span",38),m(2),o()()),t&2){let e=p.$implicit;a(2),C(e)}}function Nt(t,p){if(t&1&&(l(0,"div"),g(1,kt,3,1,"div",37),o()),t&2){let e=_(2);a(),s("ngForOf",e.getErrors("to"))}}function Jt(t,p){if(t&1&&(l(0,"div")(1,"span",38),m(2),o()()),t&2){let e=p.$implicit;a(2),C(e)}}function Rt(t,p){if(t&1&&(l(0,"div"),g(1,Jt,3,1,"div",37),o()),t&2){let e=_(2);a(),s("ngForOf",e.getErrors("pageSize"))}}function Bt(t,p){if(t&1){let e=E();l(0,"form",24)(1,"div",25)(2,"label",26),m(3,"Outlet"),o(),l(4,"p-select",27),g(5,Ft,3,5,"ng-template",null,7,b),o()(),l(7,"div",25)(8,"label",26),m(9,"Payment"),o(),x(10,"p-select",28),o(),l(11,"div",25)(12,"label",26),m(13,"Delivery"),o(),x(14,"p-select",29),o(),l(15,"div",25)(16,"label",26),m(17,"From - To"),o(),l(18,"div",30),x(19,"p-datepicker",31),g(20,Dt,2,1,"div",32),x(21,"p-datepicker",33),g(22,Nt,2,1,"div",32),o()(),l(23,"div",25)(24,"label",26),m(25,"Customer"),o(),l(26,"p-autocomplete",34),T("completeMethod",function(n){h(e);let i=_();return S(i.onSearchContact(n))}),o()(),l(27,"div",25)(28,"label",26),m(29,"Page Size"),o(),x(30,"input",35),g(31,Rt,2,1,"div",32),o()()}if(t&2){let e=_();s("formGroup",e.form),a(4),s("virtualScrollItemSize",50)("options",e.store.meta().options.outlets),a(6),s("options",e.store.meta().options.paymentStates),a(4),s("options",e.store.meta().options.deliveryStates),a(5),s("iconDisplay","input")("showIcon",!0)("ngClass",F(17,$e,e.isInvalid("from"))),a(),s("ngIf",e.isInvalid("from")),a(),s("iconDisplay","input")("showIcon",!0)("ngClass",F(19,$e,e.isInvalid("to"))),a(),s("ngIf",e.isInvalid("to")),a(4),s("suggestions",e.customerSuggestions()),a(4),s("ngClass",F(21,$e,e.isInvalid("pageSize")))("autoNumeric",$(23,Ct)),a(),s("ngIf",e.isInvalid("pageSize"))}}var ft=(()=>{class t extends Me{constructor(){super(...arguments),this.store=v(qe),this.dayjsService=v(J),this.generateJournalService=v(D),this.authService=v(ie),this.isDialogFilterVisible=k(!1),this.isInitDialogFilterVisible=k(!1),this.customerSuggestions=k([]),this.fb=v(se)}ngOnInit(){console.log(this.dayjsService.from('0001-01-01T00:00:00"')&&!0),this.generateFilterForm()}generateFilterForm(){let{number:e,outletName:r,paymentState:n,deliveryState:i,from:f,to:u,customerID:je,pageNumber:Oe,pageSize:Ge,export:Le,exportPageNumber:We,exportPageSize:Ke}=this.store.filter();this.form=this.fb.group({number:this.fb.control(e),outletName:this.fb.control(r),paymentState:this.fb.control(n),deliveryState:this.fb.control(i),from:this.fb.control(this.dayjsService.from(f)?this.dayjsService.from(f).toDate():null),to:this.fb.control(this.dayjsService.from(u)?this.dayjsService.from(u).toDate():null),customerID:this.fb.control(je),pageNumber:this.fb.control(Oe),pageSize:this.fb.control(Ge,[oe.required]),export:this.fb.control(Le),exportPageNumber:this.fb.control(We),exportPageSize:this.fb.control(Ke)})}onSearchContact(e){let{query:r}=e;this.generateJournalService.getCustomerSuggestions(r).pipe(Be("Customer Suggestions"),G(n=>{this.customerSuggestions.set(n)})).subscribe()}onSearch(e){this.store.updateFilter(d(c({},this.store.filter()),{number:e}))}onRowSelect(e){this.store.onRowSelect(e.data)}onRowUnselect(e){if(Array.isArray(e.data)){e.data.forEach(r=>{this.store.onRowUnselect(r)});return}else this.store.onRowUnselect(e.data)}onHeaderCheckboxToggle(e){this.store.onHeaderCheckboxToggle(e.checked)}onPageChange(e){let r=e.first/e.rows;this.store.updateFilter(d(c({},this.store.filter()),{pageNumber:r+1}))}onGenerateJournal(){this.generateJournalService.generateJournalInvoice(this.store.checkedInvoice()).pipe(G(()=>{this.store.getCustomerInvoice(this.store.filter)})).subscribe()}onFilterOKEvent(){if(this.form.invalid){this.form.markAllAsTouched();return}let e=Object.entries(this.form.getRawValue()).reduce((r,[n,i])=>{switch(n){case"customerID":i||(r[n]=nt);break;case"from":typeof i=="object"?r[n]=this.dayjsService.from(i)?this.dayjsService.format(i):null:r[n]=i!=null?String(i):null;break;case"to":typeof i=="object"?r[n]=this.dayjsService.from(i)?this.dayjsService.format(i):null:r[n]=i!=null?String(i):null;break;default:r[n]=i===null?"":i;break}return r},{});console.log("Filter Body:",e),this.store.updateFilter(e),this.isDialogFilterVisible.set(!1)}static{this.\u0275fac=(()=>{let e;return function(n){return(e||(e=et(t)))(n||t)}})()}static{this.\u0275cmp=A({type:t,selectors:[["app-customer-invoice"]],features:[q([qe]),H],decls:7,vars:5,consts:[["actionButton",""],["content",""],["filters",""],["header",""],["body",""],["paginatorleft",""],["emptymessage",""],["item",""],["pageTitle","Customer Invoice",3,"isDialogFilterVisibleChange","isInitDialogFilterVisibleChange","filterConfirmed","search","isSearchableInput","isFilterable","isDialogFilterVisible","isInitDialogFilterVisible","scrollable"],["label","Generate Journal",3,"onClick",4,"ngIf"],["label","Generate Journal",3,"onClick"],["dataKey","id",3,"onPage","onRowSelect","onRowUnselect","onHeaderCheckboxToggle","lazy","paginator","rows","totalRecords","value"],[2,"width","1rem"],[2,"width","10rem"],[2,"width","12rem"],[2,"width","14rem"],[2,"width","11rem"],[2,"width","9rem"],[2,"width","4rem"],[3,"value"],["target","_blank",1,"link","link-primary",3,"href"],[3,"label"],[3,"icon","severity","text"],["colspan","10"],[1,"d-flex","flex-column","row-gap-3",3,"formGroup"],[1,"d-flex","flex-column"],["for","outlet"],["virtualScroll","","showClear","","filter","","filterBy","name","formControlName","outletName","appendTo","body","optionLabel","name","optionValue","name","placeholder","Select an Outlet",3,"virtualScrollItemSize","options"],["showClear","","formControlName","paymentState","appendTo","body","optionLabel","value","optionValue","key","placeholder","Select a Payment",3,"options"],["showClear","","formControlName","deliveryState","appendTo","body","optionLabel","value","optionValue","key","placeholder","Select a Delivery",3,"options"],[1,"d-flex","flex-column","gap-2"],["showClear","","formControlName","from","styleClass","w-100","appendTo","body","inputId","icondisplay",3,"iconDisplay","showIcon","ngClass"],[4,"ngIf"],["showClear","","formControlName","to","styleClass","w-100","appendTo","body","inputId","icondisplay",3,"iconDisplay","showIcon","ngClass"],["showClear","","formControlName","customerID","appendTo","body","styleClass","w-100","optionLabel","Value","optionValue","Key","inputStyleClass","w-100",3,"completeMethod","suggestions"],["type","text","pInputText","","formControlName","pageSize",3,"ngClass","autoNumeric"],[3,"pTooltip"],[4,"ngFor","ngForOf"],[1,"text-danger"]],template:function(r,n){if(r&1){let i=E();l(0,"app-main-panel",8),K("isDialogFilterVisibleChange",function(u){return h(i),P(n.isDialogFilterVisible,u)||(n.isDialogFilterVisible=u),S(u)})("isInitDialogFilterVisibleChange",function(u){return h(i),P(n.isInitDialogFilterVisible,u)||(n.isInitDialogFilterVisible=u),S(u)}),T("filterConfirmed",function(){return h(i),S(n.onFilterOKEvent())})("search",function(u){return h(i),S(n.onSearch(u))}),g(1,vt,1,1,"ng-template",null,0,b)(3,Tt,10,5,"ng-template",null,1,b)(5,Bt,32,24,"ng-template",null,2,b),o()}r&2&&(s("isSearchableInput",!0)("isFilterable",!0),W("isDialogFilterVisible",n.isDialogFilterVisible)("isInitDialogFilterVisible",n.isInitDialogFilterVisible),s("scrollable",!0))},dependencies:[Ee,Re,ke,Ne,Je,te,Q,X,Y,ee,Z,Pe,Ue,he,ge,_e,fe,De,Ve,Fe,Te,ue,de,He,Ae,ce,ae,ne,re,le,pe,me,we,ye,Ie,ze],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var Pt={data:{data:[],totalCount:0},meta:{options:{Outlets:[],PaymentStates:[],DeliveryStates:[]},filter:{number:null,outletName:null,paymentState:0,deliveryState:0,from:null,to:null,supplierID:null,pageNumber:1,pageSize:20,export:!1,exportPageNumber:1,exportPageSize:1e4}},filter:{number:null,outletName:null,paymentState:0,deliveryState:0,from:null,to:null,supplierID:null,pageNumber:1,pageSize:20,export:!1,exportPageNumber:1,exportPageSize:1e4},skipRequestFirst:!0},Qe=Se(it("JournalSupplierBillStore"),ve(Pt),xe(t=>({first:I(()=>(t.filter().pageNumber-1)*t.filter().pageSize+1),end:I(()=>Math.min(t.filter().pageNumber*t.filter().pageSize,t.data().totalCount)),hasCheckedRows:I(()=>t.data().data.some(p=>p.checked)),checkedSupplierBill:I(()=>t.data().data.filter(p=>p.checked).map(p=>p.id))})),be(t=>{let p=v(D),e=v(J);return{updateFilter(r){y(t,n=>d(c({},n),{filter:c(c({},n.filter),r),skipRequestFirst:!1}))},onRowSelect(r){y(t,n=>{let i=n.data.data.map(f=>f.id===r.id?d(c({},f),{checked:!0}):f);return d(c({},n),{data:d(c({},n.data),{data:i})})})},onRowUnselect(r){y(t,n=>{let i=n.data.data.map(f=>f.id===r.id?d(c({},f),{checked:!1}):f);return d(c({},n),{data:d(c({},n.data),{data:i})})})},onHeaderCheckboxToggle(r){y(t,n=>{let i=n.data.data.map(f=>d(c({},f),{checked:r}));return d(c({},n),{data:d(c({},n.data),{data:i})})})},getGJSupplierBillLoader:z(R(B(()=>p.getGJSupplierBillLoader().pipe(j({next:r=>{console.log("GJSupplierBillLoader response:",r),y(t,n=>d(c({},n),{meta:r}))},error:r=>{console.error("Error fetching GJSupplierBillLoader:",r)}}))))),getJournalSupplierBill:z(R(O(r=>Object.entries(r).reduce((n,[i,f])=>(f!=null&&(n[i]=f),n),{})),B(r=>p.getJournalSupplierBill(r).pipe(O(n=>d(c({},n),{data:n.data.map(i=>d(c({},i),{due:e.from(i.due)?e.from(i.due).format():null,checked:!1}))})),j({next:n=>{y(t,i=>d(c({},i),{data:n}))},error:n=>{console.error("Error fetching journal supplier bill:",n)}})))))}}),Ce(t=>({onInit:()=>{t.getGJSupplierBillLoader(),t.getJournalSupplierBill(t.filter)}})));var Xe=t=>({"ng-invalid ng-dirty":t}),Mt=()=>({});function zt(t,p){if(t&1){let e=E();l(0,"p-button",10),T("onClick",function(){h(e);let n=_(2);return S(n.onGenerateJournal())}),o()}}function jt(t,p){if(t&1&&g(0,zt,1,0,"p-button",9),t&2){let e=_();s("ngIf",e.store.hasCheckedRows())}}function Ot(t,p){t&1&&(l(0,"tr")(1,"th",12),x(2,"p-tableHeaderCheckbox"),o(),l(3,"th",13),m(4,"Outlet"),o(),l(5,"th",14),m(6,"Number"),o(),l(7,"th",15),m(8,"Supplier"),o(),l(9,"th",16),m(10,"Date"),o(),l(11,"th",16),m(12,"Due"),o(),l(13,"th",13),m(14,"Amount"),o(),l(15,"th",17),m(16,"Payment"),o(),l(17,"th",17),m(18,"Delivery"),o(),x(19,"th",18),o())}function Gt(t,p){if(t&1&&(l(0,"tr")(1,"td"),x(2,"p-tableCheckbox",19),o(),l(3,"td"),m(4),o(),l(5,"td")(6,"a",20),m(7),o()(),l(8,"td"),m(9),o(),l(10,"td"),m(11),w(12,"date"),o(),l(13,"td"),m(14),w(15,"date"),o(),l(16,"td"),m(17),w(18,"number"),o(),l(19,"td"),x(20,"p-chip",21),o(),l(21,"td"),x(22,"p-chip",21),o(),l(23,"td"),x(24,"p-button",22),o()()),t&2){let e=p.$implicit,r=_(2);a(2),s("value",e),a(2),C(e.outlet),a(2),s("href",r.authService.getTenantExternalURL()+"/menu/Orders/Orders/Supplier_Bill/Info?ID="+e.id,U),a(),N(" ",e.number," "),a(2),C(e.customer),a(2),C(V(12,13,e.date,"d MMM y hh:mm")),a(3),C(e.due?V(15,16,e.due,"d MMM y hh:mm"):"-"),a(3),C(M(18,19,e.amount)),a(3),s("label",e.payment),a(2),s("label",e.delivery),a(2),s("icon",e.integrated?"fa-solid fa-circle-check":"fa-solid fa-circle-xmark")("severity",e.integrated?"success":"danger")("text",!0)}}function Ut(t,p){if(t&1&&m(0),t&2){let e=_(2);L(" Showing ",e.store.first()," to ",e.store.end()," of ",e.store.data().totalCount," entries ")}}function At(t,p){t&1&&(l(0,"tr")(1,"td",23)(2,"span"),m(3,"No records found."),o()()())}function Ht(t,p){if(t&1){let e=E();l(0,"p-panel")(1,"p-table",11),T("onPage",function(n){h(e);let i=_();return S(i.onPageChange(n))})("onRowSelect",function(n){h(e);let i=_();return S(i.onRowSelect(n))})("onRowUnselect",function(n){h(e);let i=_();return S(i.onRowUnselect(n))})("onHeaderCheckboxToggle",function(n){h(e);let i=_();return S(i.onHeaderCheckboxToggle(n))}),g(2,Ot,20,0,"ng-template",null,3,b)(4,Gt,25,21,"ng-template",null,4,b)(6,Ut,1,3,"ng-template",null,5,b)(8,At,4,0,"ng-template",null,6,b),o()()}if(t&2){let e=_();a(),s("value",e.store.data().data)("paginator",!0)("rows",e.store.filter().pageSize)("totalRecords",e.store.data().totalCount)("lazy",!0)}}function Lt(t,p){if(t&1&&(l(0,"span",36),m(1),w(2,"truncate"),o()),t&2){let e=p.$implicit;s("pTooltip",e.name),a(),N(" ",V(2,2,e.name,30)," ")}}function Wt(t,p){if(t&1&&(l(0,"div")(1,"span",38),m(2),o()()),t&2){let e=p.$implicit;a(2),C(e)}}function Kt(t,p){if(t&1&&(l(0,"div"),g(1,Wt,3,1,"div",37),o()),t&2){let e=_(2);a(),s("ngForOf",e.getErrors("from"))}}function qt(t,p){if(t&1&&(l(0,"div")(1,"span",38),m(2),o()()),t&2){let e=p.$implicit;a(2),C(e)}}function $t(t,p){if(t&1&&(l(0,"div"),g(1,qt,3,1,"div",37),o()),t&2){let e=_(2);a(),s("ngForOf",e.getErrors("to"))}}function Qt(t,p){if(t&1&&(l(0,"div")(1,"span",38),m(2),o()()),t&2){let e=p.$implicit;a(2),C(e)}}function Xt(t,p){if(t&1&&(l(0,"div"),g(1,Qt,3,1,"div",37),o()),t&2){let e=_(2);a(),s("ngForOf",e.getErrors("pageSize"))}}function Yt(t,p){if(t&1){let e=E();l(0,"form",24)(1,"div",25)(2,"label",26),m(3,"Outlet"),o(),l(4,"p-select",27),g(5,Lt,3,5,"ng-template",null,7,b),o()(),l(7,"div",25)(8,"label",26),m(9,"Payment"),o(),x(10,"p-select",28),o(),l(11,"div",25)(12,"label",26),m(13,"Delivery"),o(),x(14,"p-select",29),o(),l(15,"div",25)(16,"label",26),m(17,"From - To"),o(),l(18,"div",30),x(19,"p-datepicker",31),g(20,Kt,2,1,"div",32),x(21,"p-datepicker",33),g(22,$t,2,1,"div",32),o()(),l(23,"div",25)(24,"label",26),m(25,"Supplier"),o(),l(26,"p-autocomplete",34),w(27,"async"),T("completeMethod",function(n){h(e);let i=_();return S(i.onSearchSupplier(n))}),o()(),l(28,"div",25)(29,"label",26),m(30,"Page Size"),o(),x(31,"input",35),g(32,Xt,2,1,"div",32),o()()}if(t&2){let e=_();s("formGroup",e.form),a(4),s("virtualScrollItemSize",50)("options",e.store.meta().options.Outlets),a(6),s("options",e.store.meta().options.PaymentStates),a(4),s("options",e.store.meta().options.DeliveryStates),a(5),s("iconDisplay","input")("showIcon",!0)("ngClass",F(19,Xe,e.isInvalid("from"))),a(),s("ngIf",e.isInvalid("from")),a(),s("iconDisplay","input")("showIcon",!0)("ngClass",F(21,Xe,e.isInvalid("to"))),a(),s("ngIf",e.isInvalid("to")),a(4),s("suggestions",M(27,17,e.supplierSuggestions$)),a(5),s("autoNumeric",$(23,Mt))("ngClass",F(24,Xe,e.isInvalid("pageSize"))),a(),s("ngIf",e.isInvalid("pageSize"))}}var _t=(()=>{class t extends Me{constructor(){super(),this.generateJournalService=v(D),this.store=v(Qe),this.authService=v(ie),this.isDialogFilterVisible=k(!1),this.isInitDialogFilterVisible=k(!1),this.fb=v(se),this.dayjsService=v(J)}ngOnInit(){this.initform()}onFilterOKEvent(){if(this.form.invalid){this.form.markAllAsTouched();return}let e=Object.entries(this.form.getRawValue()).reduce((r,[n,i])=>(i!=null&&(n==="from"||n==="to"?(typeof i=="string"||typeof i=="number"||i instanceof Date)&&(r[n]=this.dayjsService.from(i)?this.dayjsService.format(i):null):r[n]=i),r),{});this.store.updateFilter(e),this.isDialogFilterVisible.update(r=>!r)}onRowSelect(e){this.store.onRowSelect(e.data)}onSearchSupplier(e){this.supplierSuggestions$=this.generateJournalService.getSupplierSuggestions(e.query).pipe(Be("Supplier Suggestions"))}initform(){let{outletName:e,number:r,from:n,to:i,paymentState:f,deliveryState:u,supplierID:je,pageNumber:Oe,pageSize:Ge,export:Le,exportPageNumber:We,exportPageSize:Ke}=this.store.filter();this.form=this.fb.group({outletName:this.fb.control(e),number:this.fb.control(r),from:this.fb.control(this.dayjsService.from(n)?this.dayjsService.from(n).toDate():null),to:this.fb.control(this.dayjsService.from(i)?this.dayjsService.from(i).toDate():null),paymentState:this.fb.control(f),deliveryState:this.fb.control(u),supplierID:this.fb.control(je),pageNumber:this.fb.control(Oe),pageSize:this.fb.control(Ge,[oe.required]),export:this.fb.control(Le),exportPageNumber:this.fb.control(We),exportPageSize:this.fb.control(Ke)})}onRowUnselect(e){if(Array.isArray(e.data)){e.data.forEach(r=>{this.store.onRowUnselect(r)});return}else this.store.onRowUnselect(e.data)}onHeaderCheckboxToggle(e){this.store.onHeaderCheckboxToggle(e.checked)}onGenerateJournal(){this.generateJournalService.generateJournalSupplierBill(this.store.checkedSupplierBill()).pipe(G(()=>{this.store.getJournalSupplierBill(this.store.filter)})).subscribe()}onSearch(e){this.store.updateFilter(d(c({},this.store.filter()),{number:e}))}onPageChange(e){this.store.updateFilter(d(c({},this.store.filter()),{pageNumber:e.first/e.rows+1}))}static{this.\u0275fac=function(r){return new(r||t)}}static{this.\u0275cmp=A({type:t,selectors:[["app-journal-supplier-bill"]],features:[q([Qe]),H],decls:7,vars:5,consts:[["actionButton",""],["content",""],["filters",""],["header",""],["body",""],["paginatorleft",""],["emptymessage",""],["item",""],["pageTitle","Supplier Bill",3,"isDialogFilterVisibleChange","isInitDialogFilterVisibleChange","filterConfirmed","search","isSearchableInput","isFilterable","isDialogFilterVisible","isInitDialogFilterVisible","scrollable"],["label","Generate Journal",3,"onClick",4,"ngIf"],["label","Generate Journal",3,"onClick"],["dataKey","id",3,"onPage","onRowSelect","onRowUnselect","onHeaderCheckboxToggle","value","paginator","rows","totalRecords","lazy"],[2,"width","1rem"],[2,"width","10rem"],[2,"width","12rem"],[2,"width","14rem"],[2,"width","11rem"],[2,"width","9rem"],[2,"width","4rem"],[3,"value"],["target","_blank",1,"link","link-primary",3,"href"],[3,"label"],[3,"icon","severity","text"],["colspan","10"],[1,"d-flex","flex-column","row-gap-3",3,"formGroup"],[1,"d-flex","flex-column"],["for","outlet"],["virtualScroll","","showClear","","filter","","filterBy","name","formControlName","outletName","appendTo","body","optionLabel","name","optionValue","name","placeholder","Select an Outlet",3,"virtualScrollItemSize","options"],["showClear","","formControlName","paymentState","appendTo","body","optionLabel","value","optionValue","key","placeholder","Select a Payment",3,"options"],["showClear","","formControlName","deliveryState","appendTo","body","optionLabel","value","optionValue","key","placeholder","Select a Delivery",3,"options"],[1,"d-flex","flex-column","gap-2"],["showClear","","formControlName","from","styleClass","w-100","appendTo","body","inputId","icondisplay",3,"iconDisplay","showIcon","ngClass"],[4,"ngIf"],["showClear","","formControlName","to","styleClass","w-100","appendTo","body","inputId","icondisplay",3,"iconDisplay","showIcon","ngClass"],["showClear","","formControlName","supplierID","appendTo","body","styleClass","w-100","optionLabel","Value","optionValue","Key","inputStyleClass","w-100",3,"completeMethod","suggestions"],["type","text","pInputText","","formControlName","pageSize",3,"autoNumeric","ngClass"],[3,"pTooltip"],[4,"ngFor","ngForOf"],[1,"text-danger"]],template:function(r,n){if(r&1){let i=E();l(0,"app-main-panel",8),K("isDialogFilterVisibleChange",function(u){return h(i),P(n.isDialogFilterVisible,u)||(n.isDialogFilterVisible=u),S(u)})("isInitDialogFilterVisibleChange",function(u){return h(i),P(n.isInitDialogFilterVisible,u)||(n.isInitDialogFilterVisible=u),S(u)}),T("filterConfirmed",function(){return h(i),S(n.onFilterOKEvent())})("search",function(u){return h(i),S(n.onSearch(u))}),g(1,jt,1,1,"ng-template",null,0,b)(3,Ht,10,5,"ng-template",null,1,b)(5,Yt,33,26,"ng-template",null,2,b),o()}r&2&&(s("isSearchableInput",!0)("isFilterable",!0),W("isDialogFilterVisible",n.isDialogFilterVisible)("isInitDialogFilterVisible",n.isInitDialogFilterVisible),s("scrollable",!0))},dependencies:[Ee,Re,ke,Ne,Je,te,Q,X,Y,tt,ee,Z,Pe,Ue,he,ge,_e,fe,De,Ve,Fe,Te,He,Ae,ce,ae,ne,re,le,pe,me,ue,de,Ie,we,ye,ze],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var Zt={data:{data:[],totalCount:0},meta:{options:{outlets:[]},filter:{number:null,outletName:null,from:null,to:null,pageNumber:1,pageSize:20,export:!1,exportPageNumber:1,exportPageSize:1e4}},filter:{number:null,outletName:null,from:null,to:null,pageNumber:1,pageSize:20,export:!1,exportPageNumber:1,exportPageSize:1e4}},Ye=Se(ve(Zt),xe(t=>({first:I(()=>(t.filter().pageNumber-1)*t.filter().pageSize+1),end:I(()=>Math.min(t.filter().pageNumber*t.filter().pageSize,t.data().totalCount)),hasCheckedRows:I(()=>t.data().data.some(p=>p.checked)),checkedShift:I(()=>t.data().data.filter(p=>p.checked).map(p=>p.id))})),be(t=>{let p=v(D);return{updateFilter(e){y(t,r=>d(c({},r),{filter:c(c({},r.filter),e)}))},onRowSelect(e){y(t,r=>{let n=r.data.data.map(i=>i.id===e.id?d(c({},i),{checked:!0}):i);return d(c({},r),{data:d(c({},r.data),{data:n})})})},onRowUnselect(e){y(t,r=>{let n=r.data.data.map(i=>i.id===e.id?d(c({},i),{checked:!1}):i);return d(c({},r),{data:d(c({},r.data),{data:n})})})},onHeaderCheckboxToggle(e){y(t,r=>{let n=r.data.data.map(i=>d(c({},i),{checked:e}));return d(c({},r),{data:d(c({},r.data),{data:n})})})},getGJShiftLoader:z(R(B(()=>p.getGJShiftLoader().pipe(j(e=>y(t,r=>d(c({},r),{meta:e})),e=>console.error("Error fetching GJ Shift Loader:",e)))))),getJournalShift:z(R(O(e=>Object.entries(e).reduce((r,[n,i])=>(i!=null&&(r[n]=i),r),{})),B(e=>p.getJournalShift(e).pipe(j(r=>y(t,n=>d(c({},n),{data:r})),r=>console.error("Error fetching journal shift:",r))))))}}),Ce(t=>({onInit:()=>{t.getGJShiftLoader(),t.getJournalShift(t.filter)}})));var Ze=t=>({"ng-invalid ng-dirty":t}),ei=()=>({});function ti(t,p){if(t&1){let e=E();l(0,"p-button",10),T("onClick",function(){h(e);let n=_(2);return S(n.onGenerateJournal())}),o()}}function ii(t,p){if(t&1&&g(0,ti,1,0,"p-button",9),t&2){let e=_();s("ngIf",e.store.hasCheckedRows())}}function ni(t,p){t&1&&(l(0,"tr")(1,"th",12),x(2,"p-tableHeaderCheckbox"),o(),l(3,"th",13),m(4,"Number"),o(),l(5,"th",14),m(6,"Open"),o(),l(7,"th",14),m(8,"Close"),o(),l(9,"th",15),m(10,"Cashier"),o(),l(11,"th",16),m(12,"Sales + Tax"),o(),l(13,"th",17),m(14,"Invoices"),o(),l(15,"th",16),m(16,"Outlet"),o(),l(17,"th",17),m(18,"Register"),o(),l(19,"th",17),m(20,"Visitors"),o(),x(21,"th",18),o())}function oi(t,p){if(t&1&&(l(0,"tr")(1,"td"),x(2,"p-tableCheckbox",19),o(),l(3,"td")(4,"a",20),m(5),o()(),l(6,"td"),m(7),w(8,"date"),o(),l(9,"td"),m(10),w(11,"date"),o(),l(12,"td"),m(13),o(),l(14,"td"),m(15),w(16,"number"),o(),l(17,"td"),m(18),w(19,"number"),o(),l(20,"td"),m(21),o(),l(22,"td"),m(23),o(),l(24,"td"),m(25),w(26,"number"),o(),l(27,"td"),x(28,"p-button",21),o()()),t&2){let e=p.$implicit,r=_(2);a(2),s("value",e),a(2),s("href",r.authService.getTenantExternalURL()+"/menu/Shift/Main/Previous_Shift/Register_Shift_Detail?ID="+e.id,U),a(),N(" ",e.number," "),a(2),C(V(8,14,e.open,"dd MMM y hh:mm")),a(3),C(V(11,17,e.close,"dd MMM y hh:mm")),a(3),C(e.cashier),a(2),C(M(16,20,e.salesNTax)),a(3),C(M(19,22,e.totalInvoice)),a(3),C(e.outlet),a(2),C(e.register),a(2),C(M(26,24,e.visitors)),a(3),s("icon",e.integrated?"fa-solid fa-circle-check":"fa-solid fa-circle-xmark")("severity",e.integrated?"success":"danger")("text",!0)}}function ri(t,p){if(t&1&&m(0),t&2){let e=_(2);L(" Showing ",e.store.first()," to ",e.store.end()," of ",e.store.data().totalCount," entries ")}}function li(t,p){t&1&&(l(0,"tr")(1,"td",22)(2,"span"),m(3,"No records found."),o()()())}function ai(t,p){if(t&1){let e=E();l(0,"p-panel")(1,"p-table",11),T("onPage",function(n){h(e);let i=_();return S(i.onPageChange(n))})("onRowSelect",function(n){h(e);let i=_();return S(i.onRowSelect(n))})("onRowUnselect",function(n){h(e);let i=_();return S(i.onRowUnselect(n))})("onHeaderCheckboxToggle",function(n){h(e);let i=_();return S(i.onHeaderCheckboxToggle(n))}),g(2,ni,22,0,"ng-template",null,3,b)(4,oi,29,26,"ng-template",null,4,b)(6,ri,1,3,"ng-template",null,5,b)(8,li,4,0,"ng-template",null,6,b),o()()}if(t&2){let e=_();a(),s("paginator",!0)("lazy",!0)("rows",e.store.filter().pageSize)("totalRecords",e.store.data().totalCount)("value",e.store.data().data)}}function pi(t,p){if(t&1&&(l(0,"span",32),m(1),w(2,"truncate"),o()),t&2){let e=p.$implicit;s("pTooltip",e.name),a(),N(" ",V(2,2,e.name,30)," ")}}function mi(t,p){if(t&1&&(l(0,"div")(1,"span",34),m(2),o()()),t&2){let e=p.$implicit;a(2),C(e)}}function si(t,p){if(t&1&&(l(0,"div"),g(1,mi,3,1,"div",33),o()),t&2){let e=_(2);a(),s("ngForOf",e.getErrors("from"))}}function ci(t,p){if(t&1&&(l(0,"div")(1,"span",34),m(2),o()()),t&2){let e=p.$implicit;a(2),C(e)}}function di(t,p){if(t&1&&(l(0,"div"),g(1,ci,3,1,"div",33),o()),t&2){let e=_(2);a(),s("ngForOf",e.getErrors("to"))}}function ui(t,p){if(t&1&&(l(0,"div")(1,"span",34),m(2),o()()),t&2){let e=p.$implicit;a(2),C(e)}}function fi(t,p){if(t&1&&(l(0,"div"),g(1,ui,3,1,"div",33),o()),t&2){let e=_(2);a(),s("ngForOf",e.getErrors("pageSize"))}}function _i(t,p){if(t&1&&(l(0,"form",23)(1,"div",24)(2,"label",25),m(3,"Outlet"),o(),l(4,"p-select",26),g(5,pi,3,5,"ng-template",null,7,b),o()(),l(7,"div",24)(8,"label",25),m(9,"From - To"),o(),l(10,"div",27),x(11,"p-datepicker",28),g(12,si,2,1,"div",29),x(13,"p-datepicker",30),g(14,di,2,1,"div",29),o()(),l(15,"div",24)(16,"label",25),m(17,"Page Size"),o(),x(18,"input",31),g(19,fi,2,1,"div",29),o()()),t&2){let e=_();s("formGroup",e.form),a(4),s("virtualScrollItemSize",50)("options",e.store.meta().options.outlets),a(7),s("iconDisplay","input")("showIcon",!0)("ngClass",F(14,Ze,e.isInvalid("from"))),a(),s("ngIf",e.isInvalid("from")),a(),s("iconDisplay","input")("showIcon",!0)("ngClass",F(16,Ze,e.isInvalid("to"))),a(),s("ngIf",e.isInvalid("to")),a(4),s("autoNumeric",$(18,ei))("ngClass",F(19,Ze,e.isInvalid("pageSize"))),a(),s("ngIf",e.isInvalid("pageSize"))}}var gt=(()=>{class t extends Me{constructor(){super(),this.generateJournalService=v(D),this.store=v(Ye),this.authService=v(ie),this.isDialogFilterVisible=k(!1),this.isInitDialogFilterVisible=k(!1),this.fb=v(se),this.dayjsService=v(J)}ngOnInit(){this.initForm()}initForm(){let{number:e,outletName:r,from:n,to:i,pageNumber:f,pageSize:u,export:je,exportPageNumber:Oe,exportPageSize:Ge}=this.store.filter();this.form=this.fb.group({number:this.fb.control(e),outletName:this.fb.control(r),from:this.fb.control(this.dayjsService.from(n)?this.dayjsService.from(n).toDate():null),to:this.fb.control(this.dayjsService.from(i)?this.dayjsService.from(i).toDate():null),pageNumber:this.fb.control(f),pageSize:this.fb.control(u,[oe.required]),export:this.fb.control(je),exportPageNumber:this.fb.control(Oe),exportPageSize:this.fb.control(Ge)})}onFilterOKEvent(){if(this.form.invalid){this.form.markAllAsTouched();return}let e=Object.entries(this.form.getRawValue()).reduce((r,[n,i])=>{switch(n){case"from":typeof i=="object"?r[n]=this.dayjsService.from(i)?this.dayjsService.format(i):null:r[n]=i!=null?String(i):null;break;case"to":typeof i=="object"?r[n]=this.dayjsService.from(i)?this.dayjsService.format(i):null:r[n]=i!=null?String(i):null;break;default:r[n]=i===null?"":i;break}return r},{});this.store.updateFilter(e),this.isDialogFilterVisible.set(!1)}onRowSelect(e){this.store.onRowSelect(e.data)}onRowUnselect(e){if(Array.isArray(e.data)){e.data.forEach(r=>{this.store.onRowUnselect(r)});return}else this.store.onRowUnselect(e.data)}onHeaderCheckboxToggle(e){this.store.onHeaderCheckboxToggle(e.checked)}onGenerateJournal(){this.generateJournalService.generateJournalSupplierBill(this.store.checkedShift()).pipe(G(()=>{this.store.getJournalShift(this.store.filter)})).subscribe()}onSearch(e){this.store.updateFilter(d(c({},this.store.filter()),{number:e}))}onPageChange(e){let r=e.first/e.rows;this.store.updateFilter(d(c({},this.store.filter()),{pageNumber:r+1}))}static{this.\u0275fac=function(r){return new(r||t)}}static{this.\u0275cmp=A({type:t,selectors:[["app-journal-shift"]],features:[q([Ye]),H],decls:7,vars:5,consts:[["actionButton",""],["content",""],["filters",""],["header",""],["body",""],["paginatorleft",""],["emptymessage",""],["item",""],["pageTitle","Shift Journal",3,"isDialogFilterVisibleChange","isInitDialogFilterVisibleChange","filterConfirmed","search","isSearchableInput","isFilterable","isDialogFilterVisible","isInitDialogFilterVisible","scrollable"],["label","Generate Journal",3,"onClick",4,"ngIf"],["label","Generate Journal",3,"onClick"],["dataKey","id",3,"onPage","onRowSelect","onRowUnselect","onHeaderCheckboxToggle","paginator","lazy","rows","totalRecords","value"],[2,"width","1rem"],[2,"width","12rem"],[2,"width","11rem"],[2,"width","14rem"],[2,"width","10rem"],[2,"width","9rem"],[2,"width","4rem"],[3,"value"],["target","_blank",1,"link","link-primary",3,"href"],[3,"icon","severity","text"],["colspan","11"],[1,"d-flex","flex-column","row-gap-3",3,"formGroup"],[1,"d-flex","flex-column"],["for","outlet"],["virtualScroll","","showClear","","filter","","filterBy","name","formControlName","outletName","appendTo","body","optionLabel","name","optionValue","name","placeholder","Select an Outlet",3,"virtualScrollItemSize","options"],[1,"d-flex","flex-column","gap-2"],["showClear","","formControlName","from","styleClass","w-100","appendTo","body","inputId","icondisplay",3,"iconDisplay","showIcon","ngClass"],[4,"ngIf"],["showClear","","formControlName","to","styleClass","w-100","appendTo","body","inputId","icondisplay",3,"iconDisplay","showIcon","ngClass"],["type","text","pInputText","","formControlName","pageSize",3,"autoNumeric","ngClass"],[3,"pTooltip"],[4,"ngFor","ngForOf"],[1,"text-danger"]],template:function(r,n){if(r&1){let i=E();l(0,"app-main-panel",8),K("isDialogFilterVisibleChange",function(u){return h(i),P(n.isDialogFilterVisible,u)||(n.isDialogFilterVisible=u),S(u)})("isInitDialogFilterVisibleChange",function(u){return h(i),P(n.isInitDialogFilterVisible,u)||(n.isInitDialogFilterVisible=u),S(u)}),T("filterConfirmed",function(){return h(i),S(n.onFilterOKEvent())})("search",function(u){return h(i),S(n.onSearch(u))}),g(1,ii,1,1,"ng-template",null,0,b)(3,ai,10,5,"ng-template",null,1,b)(5,_i,20,21,"ng-template",null,2,b),o()}r&2&&(s("isSearchableInput",!0)("isFilterable",!0),W("isDialogFilterVisible",n.isDialogFilterVisible)("isInitDialogFilterVisible",n.isInitDialogFilterVisible),s("scrollable",!0))},dependencies:[Ee,Re,ke,Ne,Je,te,Q,X,Y,ee,Z,Pe,he,ge,_e,fe,ce,ae,ne,re,le,pe,me,De,Ve,Fe,Te,Ie,we,ye,ue,de,ze],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var So=[{path:"invoice",component:ft},{path:"supplier-bill",component:_t},{path:"shift",component:gt},{path:"join-invoice",loadComponent:()=>import("./chunk-NQRIRHVH.js").then(t=>t.ARJournalComponent)},{path:"join-bill",loadComponent:()=>import("./chunk-PXCKFFIW.js").then(t=>t.ApJournalComponent)},{path:"adjustment",loadComponent:()=>import("./chunk-J7UTVREC.js").then(t=>t.AdjustmentJournalComponent)}];export{So as generateJournalRoutes};
1
+ import{a as D}from"./chunk-TIPQLIPA.js";import{a as nt}from"./chunk-G4XX7EU2.js";import{a as Ae,b as He}from"./chunk-BUYRVZ5Z.js";import{a as ze}from"./chunk-K4P3JOA6.js";import{a as ie}from"./chunk-HMO5KXY6.js";import{b as J}from"./chunk-SZT2PF27.js";import{a as Ue,b as Pe}from"./chunk-CNXEJBY5.js";import{a as Me}from"./chunk-XKI7WLHE.js";import"./chunk-NMSYINDE.js";import"./chunk-7COI2POD.js";import{a as z,b as j}from"./chunk-NHZLS6JU.js";import{d as ke,i as Ne,j as Je,k as Re}from"./chunk-VPQDUC77.js";import{a as Te,b as Fe}from"./chunk-76LPTGLX.js";import"./chunk-CWHL7PNC.js";import"./chunk-VRKBMD72.js";import{a as Be}from"./chunk-KXE3J4PK.js";import"./chunk-JUCJGYST.js";import{a as Ve,b as De}from"./chunk-6O5EWYT7.js";import"./chunk-I7ILLTFH.js";import"./chunk-2LQVI4EI.js";import"./chunk-SPKOXGSS.js";import"./chunk-3KYU6FI2.js";import"./chunk-IJTQE2H4.js";import"./chunk-AJZ7YLT4.js";import"./chunk-ATJ55H5D.js";import{g as Ie,h as Ee}from"./chunk-OJN5WUVR.js";import{b as ye,c as we}from"./chunk-L3PZS6EL.js";import{a as ge,b as he}from"./chunk-5JV52UYK.js";import{a as y,b as Se,c as xe,d as Ce,e as be,f as ve,g as it}from"./chunk-ACTRMWEI.js";import"./chunk-ARXP327B.js";import{n as de,o as ue,w as fe,x as _e}from"./chunk-7FFMPB6T.js";import"./chunk-UKBDY33R.js";import{b as ne,c as oe,e as re,f as le,k as ae,l as pe,o as me,u as se,x as ce}from"./chunk-72LNXEXV.js";import"./chunk-EFDD6Q3K.js";import"./chunk-Y3DV6GWE.js";import"./chunk-ZDTMCWOO.js";import"./chunk-F2X3VGZZ.js";import{h as Q,j as X,k as Y,n as tt,p as Z,q as ee,s as te}from"./chunk-SB5MSLCX.js";import{$b as E,Bb as H,Cc as q,Db as g,Dc as $,Ec as F,Ha as k,Lb as s,Nc as w,Oc as M,Pc as V,Rc as b,Vb as l,Wb as o,Xb as x,Y as B,_ as G,bd as I,c as R,db as U,ec as T,fc as _,hb as a,ia as v,qa as h,ra as S,rc as m,s as O,sc as C,tc as N,ua as et,vc as L,wc as W,xb as A,xc as P,yc as K}from"./chunk-6K5LNQ4J.js";import{a as c,b as d}from"./chunk-YQFG5XE2.js";var ht={data:{data:[],totalCount:0},meta:{options:{outlets:[],paymentStates:[],deliveryStates:[]},filter:{number:null,outletName:null,paymentState:0,deliveryState:0,from:null,to:null,customerID:null,pageNumber:1,pageSize:20,export:!1,exportPageNumber:1,exportPageSize:1e4}},filter:{number:null,outletName:null,paymentState:0,deliveryState:0,from:null,to:null,customerID:null,pageNumber:1,pageSize:20,export:!1,exportPageNumber:1,exportPageSize:1e4}},qe=Se(ve(ht),xe(t=>({first:I(()=>(t.filter().pageNumber-1)*t.filter().pageSize+1),end:I(()=>Math.min(t.filter().pageNumber*t.filter().pageSize,t.data().totalCount)),hasCheckedRows:I(()=>t.data().data.some(p=>p.checked)),checkedInvoice:I(()=>t.data().data.filter(p=>p.checked).map(p=>p.id))})),be(t=>{let p=v(D),e=v(J);return{updateFilter(n){y(t,i=>d(c({},i),{filter:c(c({},i.filter),n),skipRequestFirst:!1}))},onRowSelect(n){y(t,i=>{let f=i.data.data.map(u=>u.id===n.id?d(c({},u),{checked:!0}):u);return d(c({},i),{data:d(c({},i.data),{data:f})})})},onRowUnselect(n){y(t,i=>{let f=i.data.data.map(u=>u.id===n.id?d(c({},u),{checked:!1}):u);return d(c({},i),{data:d(c({},i.data),{data:f})})})},onHeaderCheckboxToggle(n){y(t,i=>{let f=i.data.data.map(u=>d(c({},u),{checked:n}));return d(c({},i),{data:d(c({},i.data),{data:f})})})},getCustomerInvoice:z(R(O(n=>Object.entries(n).reduce((i,[f,u])=>(u!=null&&(i[f]=u),i),{})),B(n=>p.getJournalInvoice(n).pipe(O(i=>d(c({},i),{data:i.data.map(f=>d(c({},f),{due:e.from(f.due)?e.from(f.due).format():null,checked:!1}))})),Be("getCustomerInvoice"),j({next:i=>{y(t,f=>d(c({},f),{data:d(c({},f.data),{data:i.data,totalCount:i.totalCount})}))},error:i=>{console.error("Error fetching customer invoice:",i)}}))))),getCustomerInvoiceLoader:z(R(B(()=>p.getJournalInvoiceLoader().pipe(j({next:n=>{y(t,i=>d(c({},i),{meta:n}))},error:n=>{console.error("Error fetching customer invoice loader:",n)}})))))}}),Ce(t=>({onInit:()=>{t.getCustomerInvoiceLoader(),t.getCustomerInvoice(t.filter)}})));var $e=t=>({"ng-invalid ng-dirty":t}),Ct=()=>({});function bt(t,p){if(t&1){let e=E();l(0,"p-button",10),T("onClick",function(){h(e);let n=_(2);return S(n.onGenerateJournal())}),o()}}function vt(t,p){if(t&1&&g(0,bt,1,0,"p-button",9),t&2){let e=_();s("ngIf",e.store.hasCheckedRows())}}function yt(t,p){t&1&&(l(0,"tr")(1,"th",12),x(2,"p-tableHeaderCheckbox"),o(),l(3,"th",13),m(4,"Outlet"),o(),l(5,"th",14),m(6,"Number"),o(),l(7,"th",15),m(8,"Customer"),o(),l(9,"th",16),m(10,"Date"),o(),l(11,"th",16),m(12,"Due"),o(),l(13,"th",13),m(14,"Amount"),o(),l(15,"th",17),m(16,"Payment"),o(),l(17,"th",17),m(18,"Delivery"),o(),x(19,"th",18),o())}function wt(t,p){if(t&1&&(l(0,"tr")(1,"td"),x(2,"p-tableCheckbox",19),o(),l(3,"td"),m(4),o(),l(5,"td")(6,"a",20),m(7),o()(),l(8,"td")(9,"a",20),m(10),o()(),l(11,"td"),m(12),w(13,"date"),o(),l(14,"td"),m(15),w(16,"date"),o(),l(17,"td"),m(18),w(19,"number"),o(),l(20,"td"),x(21,"p-chip",21),o(),l(22,"td"),x(23,"p-chip",21),o(),l(24,"td"),x(25,"p-button",22),o()()),t&2){let e=p.$implicit,r=_(2);a(2),s("value",e),a(2),C(e.outlet),a(2),s("href",r.authService.getTenantExternalURL()+"/menu/Orders/Orders/Customer_Invoice/Info?ID="+e.id,U),a(),N(" ",e.number," "),a(2),s("href",r.authService.getTenantExternalURL()+"/menu/Contacts/Contact/Customers/Info?ID="+e.customerID,U),a(),N(" ",e.customer," "),a(2),C(V(13,14,e.date,"d MMM y hh:mm")),a(3),C(e.due?V(16,17,e.due,"d MMM y hh:mm"):"-"),a(3),C(M(19,20,e.amount)),a(3),s("label",e.payment),a(2),s("label",e.delivery),a(2),s("icon",e.integrated?"fa-solid fa-circle-check":"fa-solid fa-circle-xmark")("severity",e.integrated?"success":"danger")("text",!0)}}function It(t,p){if(t&1&&m(0),t&2){let e=_(2);L(" Showing ",e.store.first()," to ",e.store.end()," of ",e.store.data().totalCount," entries ")}}function Et(t,p){t&1&&(l(0,"tr")(1,"td",23)(2,"span"),m(3,"No records found."),o()()())}function Tt(t,p){if(t&1){let e=E();l(0,"p-panel")(1,"p-table",11),T("onPage",function(n){h(e);let i=_();return S(i.onPageChange(n))})("onRowSelect",function(n){h(e);let i=_();return S(i.onRowSelect(n))})("onRowUnselect",function(n){h(e);let i=_();return S(i.onRowUnselect(n))})("onHeaderCheckboxToggle",function(n){h(e);let i=_();return S(i.onHeaderCheckboxToggle(n))}),g(2,yt,20,0,"ng-template",null,3,b)(4,wt,26,22,"ng-template",null,4,b)(6,It,1,3,"ng-template",null,5,b)(8,Et,4,0,"ng-template",null,6,b),o()()}if(t&2){let e=_();a(),s("lazy",!0)("paginator",!0)("rows",e.store.filter().pageSize)("totalRecords",e.store.data().totalCount)("value",e.store.data().data)}}function Ft(t,p){if(t&1&&(l(0,"span",36),m(1),w(2,"truncate"),o()),t&2){let e=p.$implicit;s("pTooltip",e.name),a(),N(" ",V(2,2,e.name,30)," ")}}function Vt(t,p){if(t&1&&(l(0,"div")(1,"span",38),m(2),o()()),t&2){let e=p.$implicit;a(2),C(e)}}function Dt(t,p){if(t&1&&(l(0,"div"),g(1,Vt,3,1,"div",37),o()),t&2){let e=_(2);a(),s("ngForOf",e.getErrors("from"))}}function kt(t,p){if(t&1&&(l(0,"div")(1,"span",38),m(2),o()()),t&2){let e=p.$implicit;a(2),C(e)}}function Nt(t,p){if(t&1&&(l(0,"div"),g(1,kt,3,1,"div",37),o()),t&2){let e=_(2);a(),s("ngForOf",e.getErrors("to"))}}function Jt(t,p){if(t&1&&(l(0,"div")(1,"span",38),m(2),o()()),t&2){let e=p.$implicit;a(2),C(e)}}function Rt(t,p){if(t&1&&(l(0,"div"),g(1,Jt,3,1,"div",37),o()),t&2){let e=_(2);a(),s("ngForOf",e.getErrors("pageSize"))}}function Bt(t,p){if(t&1){let e=E();l(0,"form",24)(1,"div",25)(2,"label",26),m(3,"Outlet"),o(),l(4,"p-select",27),g(5,Ft,3,5,"ng-template",null,7,b),o()(),l(7,"div",25)(8,"label",26),m(9,"Payment"),o(),x(10,"p-select",28),o(),l(11,"div",25)(12,"label",26),m(13,"Delivery"),o(),x(14,"p-select",29),o(),l(15,"div",25)(16,"label",26),m(17,"From - To"),o(),l(18,"div",30),x(19,"p-datepicker",31),g(20,Dt,2,1,"div",32),x(21,"p-datepicker",33),g(22,Nt,2,1,"div",32),o()(),l(23,"div",25)(24,"label",26),m(25,"Customer"),o(),l(26,"p-autocomplete",34),T("completeMethod",function(n){h(e);let i=_();return S(i.onSearchContact(n))}),o()(),l(27,"div",25)(28,"label",26),m(29,"Page Size"),o(),x(30,"input",35),g(31,Rt,2,1,"div",32),o()()}if(t&2){let e=_();s("formGroup",e.form),a(4),s("virtualScrollItemSize",50)("options",e.store.meta().options.outlets),a(6),s("options",e.store.meta().options.paymentStates),a(4),s("options",e.store.meta().options.deliveryStates),a(5),s("iconDisplay","input")("showIcon",!0)("ngClass",F(17,$e,e.isInvalid("from"))),a(),s("ngIf",e.isInvalid("from")),a(),s("iconDisplay","input")("showIcon",!0)("ngClass",F(19,$e,e.isInvalid("to"))),a(),s("ngIf",e.isInvalid("to")),a(4),s("suggestions",e.customerSuggestions()),a(4),s("ngClass",F(21,$e,e.isInvalid("pageSize")))("autoNumeric",$(23,Ct)),a(),s("ngIf",e.isInvalid("pageSize"))}}var ft=(()=>{class t extends Me{constructor(){super(...arguments),this.store=v(qe),this.dayjsService=v(J),this.generateJournalService=v(D),this.authService=v(ie),this.isDialogFilterVisible=k(!1),this.isInitDialogFilterVisible=k(!1),this.customerSuggestions=k([]),this.fb=v(se)}ngOnInit(){console.log(this.dayjsService.from('0001-01-01T00:00:00"')&&!0),this.generateFilterForm()}generateFilterForm(){let{number:e,outletName:r,paymentState:n,deliveryState:i,from:f,to:u,customerID:je,pageNumber:Oe,pageSize:Ge,export:Le,exportPageNumber:We,exportPageSize:Ke}=this.store.filter();this.form=this.fb.group({number:this.fb.control(e),outletName:this.fb.control(r),paymentState:this.fb.control(n),deliveryState:this.fb.control(i),from:this.fb.control(this.dayjsService.from(f)?this.dayjsService.from(f).toDate():null),to:this.fb.control(this.dayjsService.from(u)?this.dayjsService.from(u).toDate():null),customerID:this.fb.control(je),pageNumber:this.fb.control(Oe),pageSize:this.fb.control(Ge,[oe.required]),export:this.fb.control(Le),exportPageNumber:this.fb.control(We),exportPageSize:this.fb.control(Ke)})}onSearchContact(e){let{query:r}=e;this.generateJournalService.getCustomerSuggestions(r).pipe(Be("Customer Suggestions"),G(n=>{this.customerSuggestions.set(n)})).subscribe()}onSearch(e){this.store.updateFilter(d(c({},this.store.filter()),{number:e}))}onRowSelect(e){this.store.onRowSelect(e.data)}onRowUnselect(e){if(Array.isArray(e.data)){e.data.forEach(r=>{this.store.onRowUnselect(r)});return}else this.store.onRowUnselect(e.data)}onHeaderCheckboxToggle(e){this.store.onHeaderCheckboxToggle(e.checked)}onPageChange(e){let r=e.first/e.rows;this.store.updateFilter(d(c({},this.store.filter()),{pageNumber:r+1}))}onGenerateJournal(){this.generateJournalService.generateJournalInvoice(this.store.checkedInvoice()).pipe(G(()=>{this.store.getCustomerInvoice(this.store.filter)})).subscribe()}onFilterOKEvent(){if(this.form.invalid){this.form.markAllAsTouched();return}let e=Object.entries(this.form.getRawValue()).reduce((r,[n,i])=>{switch(n){case"customerID":i||(r[n]=nt);break;case"from":typeof i=="object"?r[n]=this.dayjsService.from(i)?this.dayjsService.format(i):null:r[n]=i!=null?String(i):null;break;case"to":typeof i=="object"?r[n]=this.dayjsService.from(i)?this.dayjsService.format(i):null:r[n]=i!=null?String(i):null;break;default:r[n]=i===null?"":i;break}return r},{});console.log("Filter Body:",e),this.store.updateFilter(e),this.isDialogFilterVisible.set(!1)}static{this.\u0275fac=(()=>{let e;return function(n){return(e||(e=et(t)))(n||t)}})()}static{this.\u0275cmp=A({type:t,selectors:[["app-customer-invoice"]],features:[q([qe]),H],decls:7,vars:5,consts:[["actionButton",""],["content",""],["filters",""],["header",""],["body",""],["paginatorleft",""],["emptymessage",""],["item",""],["pageTitle","Customer Invoice",3,"isDialogFilterVisibleChange","isInitDialogFilterVisibleChange","filterConfirmed","search","isSearchableInput","isFilterable","isDialogFilterVisible","isInitDialogFilterVisible","scrollable"],["label","Generate Journal",3,"onClick",4,"ngIf"],["label","Generate Journal",3,"onClick"],["dataKey","id",3,"onPage","onRowSelect","onRowUnselect","onHeaderCheckboxToggle","lazy","paginator","rows","totalRecords","value"],[2,"width","1rem"],[2,"width","10rem"],[2,"width","12rem"],[2,"width","14rem"],[2,"width","11rem"],[2,"width","9rem"],[2,"width","4rem"],[3,"value"],["target","_blank",1,"link","link-primary",3,"href"],[3,"label"],[3,"icon","severity","text"],["colspan","10"],[1,"d-flex","flex-column","row-gap-3",3,"formGroup"],[1,"d-flex","flex-column"],["for","outlet"],["virtualScroll","","showClear","","filter","","filterBy","name","formControlName","outletName","appendTo","body","optionLabel","name","optionValue","name","placeholder","Select an Outlet",3,"virtualScrollItemSize","options"],["showClear","","formControlName","paymentState","appendTo","body","optionLabel","value","optionValue","key","placeholder","Select a Payment",3,"options"],["showClear","","formControlName","deliveryState","appendTo","body","optionLabel","value","optionValue","key","placeholder","Select a Delivery",3,"options"],[1,"d-flex","flex-column","gap-2"],["showClear","","formControlName","from","styleClass","w-100","appendTo","body","inputId","icondisplay",3,"iconDisplay","showIcon","ngClass"],[4,"ngIf"],["showClear","","formControlName","to","styleClass","w-100","appendTo","body","inputId","icondisplay",3,"iconDisplay","showIcon","ngClass"],["showClear","","formControlName","customerID","appendTo","body","styleClass","w-100","optionLabel","Value","optionValue","Key","inputStyleClass","w-100",3,"completeMethod","suggestions"],["type","text","pInputText","","formControlName","pageSize",3,"ngClass","autoNumeric"],[3,"pTooltip"],[4,"ngFor","ngForOf"],[1,"text-danger"]],template:function(r,n){if(r&1){let i=E();l(0,"app-main-panel",8),K("isDialogFilterVisibleChange",function(u){return h(i),P(n.isDialogFilterVisible,u)||(n.isDialogFilterVisible=u),S(u)})("isInitDialogFilterVisibleChange",function(u){return h(i),P(n.isInitDialogFilterVisible,u)||(n.isInitDialogFilterVisible=u),S(u)}),T("filterConfirmed",function(){return h(i),S(n.onFilterOKEvent())})("search",function(u){return h(i),S(n.onSearch(u))}),g(1,vt,1,1,"ng-template",null,0,b)(3,Tt,10,5,"ng-template",null,1,b)(5,Bt,32,24,"ng-template",null,2,b),o()}r&2&&(s("isSearchableInput",!0)("isFilterable",!0),W("isDialogFilterVisible",n.isDialogFilterVisible)("isInitDialogFilterVisible",n.isInitDialogFilterVisible),s("scrollable",!0))},dependencies:[Ee,Re,ke,Ne,Je,te,Q,X,Y,ee,Z,Pe,Ue,he,ge,_e,fe,De,Ve,Fe,Te,ue,de,He,Ae,ce,ae,ne,re,le,pe,me,we,ye,Ie,ze],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var Pt={data:{data:[],totalCount:0},meta:{options:{Outlets:[],PaymentStates:[],DeliveryStates:[]},filter:{number:null,outletName:null,paymentState:0,deliveryState:0,from:null,to:null,supplierID:null,pageNumber:1,pageSize:20,export:!1,exportPageNumber:1,exportPageSize:1e4}},filter:{number:null,outletName:null,paymentState:0,deliveryState:0,from:null,to:null,supplierID:null,pageNumber:1,pageSize:20,export:!1,exportPageNumber:1,exportPageSize:1e4},skipRequestFirst:!0},Qe=Se(it("JournalSupplierBillStore"),ve(Pt),xe(t=>({first:I(()=>(t.filter().pageNumber-1)*t.filter().pageSize+1),end:I(()=>Math.min(t.filter().pageNumber*t.filter().pageSize,t.data().totalCount)),hasCheckedRows:I(()=>t.data().data.some(p=>p.checked)),checkedSupplierBill:I(()=>t.data().data.filter(p=>p.checked).map(p=>p.id))})),be(t=>{let p=v(D),e=v(J);return{updateFilter(r){y(t,n=>d(c({},n),{filter:c(c({},n.filter),r),skipRequestFirst:!1}))},onRowSelect(r){y(t,n=>{let i=n.data.data.map(f=>f.id===r.id?d(c({},f),{checked:!0}):f);return d(c({},n),{data:d(c({},n.data),{data:i})})})},onRowUnselect(r){y(t,n=>{let i=n.data.data.map(f=>f.id===r.id?d(c({},f),{checked:!1}):f);return d(c({},n),{data:d(c({},n.data),{data:i})})})},onHeaderCheckboxToggle(r){y(t,n=>{let i=n.data.data.map(f=>d(c({},f),{checked:r}));return d(c({},n),{data:d(c({},n.data),{data:i})})})},getGJSupplierBillLoader:z(R(B(()=>p.getGJSupplierBillLoader().pipe(j({next:r=>{console.log("GJSupplierBillLoader response:",r),y(t,n=>d(c({},n),{meta:r}))},error:r=>{console.error("Error fetching GJSupplierBillLoader:",r)}}))))),getJournalSupplierBill:z(R(O(r=>Object.entries(r).reduce((n,[i,f])=>(f!=null&&(n[i]=f),n),{})),B(r=>p.getJournalSupplierBill(r).pipe(O(n=>d(c({},n),{data:n.data.map(i=>d(c({},i),{due:e.from(i.due)?e.from(i.due).format():null,checked:!1}))})),j({next:n=>{y(t,i=>d(c({},i),{data:n}))},error:n=>{console.error("Error fetching journal supplier bill:",n)}})))))}}),Ce(t=>({onInit:()=>{t.getGJSupplierBillLoader(),t.getJournalSupplierBill(t.filter)}})));var Xe=t=>({"ng-invalid ng-dirty":t}),Mt=()=>({});function zt(t,p){if(t&1){let e=E();l(0,"p-button",10),T("onClick",function(){h(e);let n=_(2);return S(n.onGenerateJournal())}),o()}}function jt(t,p){if(t&1&&g(0,zt,1,0,"p-button",9),t&2){let e=_();s("ngIf",e.store.hasCheckedRows())}}function Ot(t,p){t&1&&(l(0,"tr")(1,"th",12),x(2,"p-tableHeaderCheckbox"),o(),l(3,"th",13),m(4,"Outlet"),o(),l(5,"th",14),m(6,"Number"),o(),l(7,"th",15),m(8,"Supplier"),o(),l(9,"th",16),m(10,"Date"),o(),l(11,"th",16),m(12,"Due"),o(),l(13,"th",13),m(14,"Amount"),o(),l(15,"th",17),m(16,"Payment"),o(),l(17,"th",17),m(18,"Delivery"),o(),x(19,"th",18),o())}function Gt(t,p){if(t&1&&(l(0,"tr")(1,"td"),x(2,"p-tableCheckbox",19),o(),l(3,"td"),m(4),o(),l(5,"td")(6,"a",20),m(7),o()(),l(8,"td"),m(9),o(),l(10,"td"),m(11),w(12,"date"),o(),l(13,"td"),m(14),w(15,"date"),o(),l(16,"td"),m(17),w(18,"number"),o(),l(19,"td"),x(20,"p-chip",21),o(),l(21,"td"),x(22,"p-chip",21),o(),l(23,"td"),x(24,"p-button",22),o()()),t&2){let e=p.$implicit,r=_(2);a(2),s("value",e),a(2),C(e.outlet),a(2),s("href",r.authService.getTenantExternalURL()+"/menu/Orders/Orders/Supplier_Bill/Info?ID="+e.id,U),a(),N(" ",e.number," "),a(2),C(e.customer),a(2),C(V(12,13,e.date,"d MMM y hh:mm")),a(3),C(e.due?V(15,16,e.due,"d MMM y hh:mm"):"-"),a(3),C(M(18,19,e.amount)),a(3),s("label",e.payment),a(2),s("label",e.delivery),a(2),s("icon",e.integrated?"fa-solid fa-circle-check":"fa-solid fa-circle-xmark")("severity",e.integrated?"success":"danger")("text",!0)}}function Ut(t,p){if(t&1&&m(0),t&2){let e=_(2);L(" Showing ",e.store.first()," to ",e.store.end()," of ",e.store.data().totalCount," entries ")}}function At(t,p){t&1&&(l(0,"tr")(1,"td",23)(2,"span"),m(3,"No records found."),o()()())}function Ht(t,p){if(t&1){let e=E();l(0,"p-panel")(1,"p-table",11),T("onPage",function(n){h(e);let i=_();return S(i.onPageChange(n))})("onRowSelect",function(n){h(e);let i=_();return S(i.onRowSelect(n))})("onRowUnselect",function(n){h(e);let i=_();return S(i.onRowUnselect(n))})("onHeaderCheckboxToggle",function(n){h(e);let i=_();return S(i.onHeaderCheckboxToggle(n))}),g(2,Ot,20,0,"ng-template",null,3,b)(4,Gt,25,21,"ng-template",null,4,b)(6,Ut,1,3,"ng-template",null,5,b)(8,At,4,0,"ng-template",null,6,b),o()()}if(t&2){let e=_();a(),s("value",e.store.data().data)("paginator",!0)("rows",e.store.filter().pageSize)("totalRecords",e.store.data().totalCount)("lazy",!0)}}function Lt(t,p){if(t&1&&(l(0,"span",36),m(1),w(2,"truncate"),o()),t&2){let e=p.$implicit;s("pTooltip",e.name),a(),N(" ",V(2,2,e.name,30)," ")}}function Wt(t,p){if(t&1&&(l(0,"div")(1,"span",38),m(2),o()()),t&2){let e=p.$implicit;a(2),C(e)}}function Kt(t,p){if(t&1&&(l(0,"div"),g(1,Wt,3,1,"div",37),o()),t&2){let e=_(2);a(),s("ngForOf",e.getErrors("from"))}}function qt(t,p){if(t&1&&(l(0,"div")(1,"span",38),m(2),o()()),t&2){let e=p.$implicit;a(2),C(e)}}function $t(t,p){if(t&1&&(l(0,"div"),g(1,qt,3,1,"div",37),o()),t&2){let e=_(2);a(),s("ngForOf",e.getErrors("to"))}}function Qt(t,p){if(t&1&&(l(0,"div")(1,"span",38),m(2),o()()),t&2){let e=p.$implicit;a(2),C(e)}}function Xt(t,p){if(t&1&&(l(0,"div"),g(1,Qt,3,1,"div",37),o()),t&2){let e=_(2);a(),s("ngForOf",e.getErrors("pageSize"))}}function Yt(t,p){if(t&1){let e=E();l(0,"form",24)(1,"div",25)(2,"label",26),m(3,"Outlet"),o(),l(4,"p-select",27),g(5,Lt,3,5,"ng-template",null,7,b),o()(),l(7,"div",25)(8,"label",26),m(9,"Payment"),o(),x(10,"p-select",28),o(),l(11,"div",25)(12,"label",26),m(13,"Delivery"),o(),x(14,"p-select",29),o(),l(15,"div",25)(16,"label",26),m(17,"From - To"),o(),l(18,"div",30),x(19,"p-datepicker",31),g(20,Kt,2,1,"div",32),x(21,"p-datepicker",33),g(22,$t,2,1,"div",32),o()(),l(23,"div",25)(24,"label",26),m(25,"Supplier"),o(),l(26,"p-autocomplete",34),w(27,"async"),T("completeMethod",function(n){h(e);let i=_();return S(i.onSearchSupplier(n))}),o()(),l(28,"div",25)(29,"label",26),m(30,"Page Size"),o(),x(31,"input",35),g(32,Xt,2,1,"div",32),o()()}if(t&2){let e=_();s("formGroup",e.form),a(4),s("virtualScrollItemSize",50)("options",e.store.meta().options.Outlets),a(6),s("options",e.store.meta().options.PaymentStates),a(4),s("options",e.store.meta().options.DeliveryStates),a(5),s("iconDisplay","input")("showIcon",!0)("ngClass",F(19,Xe,e.isInvalid("from"))),a(),s("ngIf",e.isInvalid("from")),a(),s("iconDisplay","input")("showIcon",!0)("ngClass",F(21,Xe,e.isInvalid("to"))),a(),s("ngIf",e.isInvalid("to")),a(4),s("suggestions",M(27,17,e.supplierSuggestions$)),a(5),s("autoNumeric",$(23,Mt))("ngClass",F(24,Xe,e.isInvalid("pageSize"))),a(),s("ngIf",e.isInvalid("pageSize"))}}var _t=(()=>{class t extends Me{constructor(){super(),this.generateJournalService=v(D),this.store=v(Qe),this.authService=v(ie),this.isDialogFilterVisible=k(!1),this.isInitDialogFilterVisible=k(!1),this.fb=v(se),this.dayjsService=v(J)}ngOnInit(){this.initform()}onFilterOKEvent(){if(this.form.invalid){this.form.markAllAsTouched();return}let e=Object.entries(this.form.getRawValue()).reduce((r,[n,i])=>(i!=null&&(n==="from"||n==="to"?(typeof i=="string"||typeof i=="number"||i instanceof Date)&&(r[n]=this.dayjsService.from(i)?this.dayjsService.format(i):null):r[n]=i),r),{});this.store.updateFilter(e),this.isDialogFilterVisible.update(r=>!r)}onRowSelect(e){this.store.onRowSelect(e.data)}onSearchSupplier(e){this.supplierSuggestions$=this.generateJournalService.getSupplierSuggestions(e.query).pipe(Be("Supplier Suggestions"))}initform(){let{outletName:e,number:r,from:n,to:i,paymentState:f,deliveryState:u,supplierID:je,pageNumber:Oe,pageSize:Ge,export:Le,exportPageNumber:We,exportPageSize:Ke}=this.store.filter();this.form=this.fb.group({outletName:this.fb.control(e),number:this.fb.control(r),from:this.fb.control(this.dayjsService.from(n)?this.dayjsService.from(n).toDate():null),to:this.fb.control(this.dayjsService.from(i)?this.dayjsService.from(i).toDate():null),paymentState:this.fb.control(f),deliveryState:this.fb.control(u),supplierID:this.fb.control(je),pageNumber:this.fb.control(Oe),pageSize:this.fb.control(Ge,[oe.required]),export:this.fb.control(Le),exportPageNumber:this.fb.control(We),exportPageSize:this.fb.control(Ke)})}onRowUnselect(e){if(Array.isArray(e.data)){e.data.forEach(r=>{this.store.onRowUnselect(r)});return}else this.store.onRowUnselect(e.data)}onHeaderCheckboxToggle(e){this.store.onHeaderCheckboxToggle(e.checked)}onGenerateJournal(){this.generateJournalService.generateJournalSupplierBill(this.store.checkedSupplierBill()).pipe(G(()=>{this.store.getJournalSupplierBill(this.store.filter)})).subscribe()}onSearch(e){this.store.updateFilter(d(c({},this.store.filter()),{number:e}))}onPageChange(e){this.store.updateFilter(d(c({},this.store.filter()),{pageNumber:e.first/e.rows+1}))}static{this.\u0275fac=function(r){return new(r||t)}}static{this.\u0275cmp=A({type:t,selectors:[["app-journal-supplier-bill"]],features:[q([Qe]),H],decls:7,vars:5,consts:[["actionButton",""],["content",""],["filters",""],["header",""],["body",""],["paginatorleft",""],["emptymessage",""],["item",""],["pageTitle","Supplier Bill",3,"isDialogFilterVisibleChange","isInitDialogFilterVisibleChange","filterConfirmed","search","isSearchableInput","isFilterable","isDialogFilterVisible","isInitDialogFilterVisible","scrollable"],["label","Generate Journal",3,"onClick",4,"ngIf"],["label","Generate Journal",3,"onClick"],["dataKey","id",3,"onPage","onRowSelect","onRowUnselect","onHeaderCheckboxToggle","value","paginator","rows","totalRecords","lazy"],[2,"width","1rem"],[2,"width","10rem"],[2,"width","12rem"],[2,"width","14rem"],[2,"width","11rem"],[2,"width","9rem"],[2,"width","4rem"],[3,"value"],["target","_blank",1,"link","link-primary",3,"href"],[3,"label"],[3,"icon","severity","text"],["colspan","10"],[1,"d-flex","flex-column","row-gap-3",3,"formGroup"],[1,"d-flex","flex-column"],["for","outlet"],["virtualScroll","","showClear","","filter","","filterBy","name","formControlName","outletName","appendTo","body","optionLabel","name","optionValue","name","placeholder","Select an Outlet",3,"virtualScrollItemSize","options"],["showClear","","formControlName","paymentState","appendTo","body","optionLabel","value","optionValue","key","placeholder","Select a Payment",3,"options"],["showClear","","formControlName","deliveryState","appendTo","body","optionLabel","value","optionValue","key","placeholder","Select a Delivery",3,"options"],[1,"d-flex","flex-column","gap-2"],["showClear","","formControlName","from","styleClass","w-100","appendTo","body","inputId","icondisplay",3,"iconDisplay","showIcon","ngClass"],[4,"ngIf"],["showClear","","formControlName","to","styleClass","w-100","appendTo","body","inputId","icondisplay",3,"iconDisplay","showIcon","ngClass"],["showClear","","formControlName","supplierID","appendTo","body","styleClass","w-100","optionLabel","Value","optionValue","Key","inputStyleClass","w-100",3,"completeMethod","suggestions"],["type","text","pInputText","","formControlName","pageSize",3,"autoNumeric","ngClass"],[3,"pTooltip"],[4,"ngFor","ngForOf"],[1,"text-danger"]],template:function(r,n){if(r&1){let i=E();l(0,"app-main-panel",8),K("isDialogFilterVisibleChange",function(u){return h(i),P(n.isDialogFilterVisible,u)||(n.isDialogFilterVisible=u),S(u)})("isInitDialogFilterVisibleChange",function(u){return h(i),P(n.isInitDialogFilterVisible,u)||(n.isInitDialogFilterVisible=u),S(u)}),T("filterConfirmed",function(){return h(i),S(n.onFilterOKEvent())})("search",function(u){return h(i),S(n.onSearch(u))}),g(1,jt,1,1,"ng-template",null,0,b)(3,Ht,10,5,"ng-template",null,1,b)(5,Yt,33,26,"ng-template",null,2,b),o()}r&2&&(s("isSearchableInput",!0)("isFilterable",!0),W("isDialogFilterVisible",n.isDialogFilterVisible)("isInitDialogFilterVisible",n.isInitDialogFilterVisible),s("scrollable",!0))},dependencies:[Ee,Re,ke,Ne,Je,te,Q,X,Y,tt,ee,Z,Pe,Ue,he,ge,_e,fe,De,Ve,Fe,Te,He,Ae,ce,ae,ne,re,le,pe,me,ue,de,Ie,we,ye,ze],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var Zt={data:{data:[],totalCount:0},meta:{options:{outlets:[]},filter:{number:null,outletName:null,from:null,to:null,pageNumber:1,pageSize:20,export:!1,exportPageNumber:1,exportPageSize:1e4}},filter:{number:null,outletName:null,from:null,to:null,pageNumber:1,pageSize:20,export:!1,exportPageNumber:1,exportPageSize:1e4}},Ye=Se(ve(Zt),xe(t=>({first:I(()=>(t.filter().pageNumber-1)*t.filter().pageSize+1),end:I(()=>Math.min(t.filter().pageNumber*t.filter().pageSize,t.data().totalCount)),hasCheckedRows:I(()=>t.data().data.some(p=>p.checked)),checkedShift:I(()=>t.data().data.filter(p=>p.checked).map(p=>p.id))})),be(t=>{let p=v(D);return{updateFilter(e){y(t,r=>d(c({},r),{filter:c(c({},r.filter),e)}))},onRowSelect(e){y(t,r=>{let n=r.data.data.map(i=>i.id===e.id?d(c({},i),{checked:!0}):i);return d(c({},r),{data:d(c({},r.data),{data:n})})})},onRowUnselect(e){y(t,r=>{let n=r.data.data.map(i=>i.id===e.id?d(c({},i),{checked:!1}):i);return d(c({},r),{data:d(c({},r.data),{data:n})})})},onHeaderCheckboxToggle(e){y(t,r=>{let n=r.data.data.map(i=>d(c({},i),{checked:e}));return d(c({},r),{data:d(c({},r.data),{data:n})})})},getGJShiftLoader:z(R(B(()=>p.getGJShiftLoader().pipe(j(e=>y(t,r=>d(c({},r),{meta:e})),e=>console.error("Error fetching GJ Shift Loader:",e)))))),getJournalShift:z(R(O(e=>Object.entries(e).reduce((r,[n,i])=>(i!=null&&(r[n]=i),r),{})),B(e=>p.getJournalShift(e).pipe(j(r=>y(t,n=>d(c({},n),{data:r})),r=>console.error("Error fetching journal shift:",r))))))}}),Ce(t=>({onInit:()=>{t.getGJShiftLoader(),t.getJournalShift(t.filter)}})));var Ze=t=>({"ng-invalid ng-dirty":t}),ei=()=>({});function ti(t,p){if(t&1){let e=E();l(0,"p-button",10),T("onClick",function(){h(e);let n=_(2);return S(n.onGenerateJournal())}),o()}}function ii(t,p){if(t&1&&g(0,ti,1,0,"p-button",9),t&2){let e=_();s("ngIf",e.store.hasCheckedRows())}}function ni(t,p){t&1&&(l(0,"tr")(1,"th",12),x(2,"p-tableHeaderCheckbox"),o(),l(3,"th",13),m(4,"Number"),o(),l(5,"th",14),m(6,"Open"),o(),l(7,"th",14),m(8,"Close"),o(),l(9,"th",15),m(10,"Cashier"),o(),l(11,"th",16),m(12,"Sales + Tax"),o(),l(13,"th",17),m(14,"Invoices"),o(),l(15,"th",16),m(16,"Outlet"),o(),l(17,"th",17),m(18,"Register"),o(),l(19,"th",17),m(20,"Visitors"),o(),x(21,"th",18),o())}function oi(t,p){if(t&1&&(l(0,"tr")(1,"td"),x(2,"p-tableCheckbox",19),o(),l(3,"td")(4,"a",20),m(5),o()(),l(6,"td"),m(7),w(8,"date"),o(),l(9,"td"),m(10),w(11,"date"),o(),l(12,"td"),m(13),o(),l(14,"td"),m(15),w(16,"number"),o(),l(17,"td"),m(18),w(19,"number"),o(),l(20,"td"),m(21),o(),l(22,"td"),m(23),o(),l(24,"td"),m(25),w(26,"number"),o(),l(27,"td"),x(28,"p-button",21),o()()),t&2){let e=p.$implicit,r=_(2);a(2),s("value",e),a(2),s("href",r.authService.getTenantExternalURL()+"/menu/Shift/Main/Previous_Shift/Register_Shift_Detail?ID="+e.id,U),a(),N(" ",e.number," "),a(2),C(V(8,14,e.open,"dd MMM y hh:mm")),a(3),C(V(11,17,e.close,"dd MMM y hh:mm")),a(3),C(e.cashier),a(2),C(M(16,20,e.salesNTax)),a(3),C(M(19,22,e.totalInvoice)),a(3),C(e.outlet),a(2),C(e.register),a(2),C(M(26,24,e.visitors)),a(3),s("icon",e.integrated?"fa-solid fa-circle-check":"fa-solid fa-circle-xmark")("severity",e.integrated?"success":"danger")("text",!0)}}function ri(t,p){if(t&1&&m(0),t&2){let e=_(2);L(" Showing ",e.store.first()," to ",e.store.end()," of ",e.store.data().totalCount," entries ")}}function li(t,p){t&1&&(l(0,"tr")(1,"td",22)(2,"span"),m(3,"No records found."),o()()())}function ai(t,p){if(t&1){let e=E();l(0,"p-panel")(1,"p-table",11),T("onPage",function(n){h(e);let i=_();return S(i.onPageChange(n))})("onRowSelect",function(n){h(e);let i=_();return S(i.onRowSelect(n))})("onRowUnselect",function(n){h(e);let i=_();return S(i.onRowUnselect(n))})("onHeaderCheckboxToggle",function(n){h(e);let i=_();return S(i.onHeaderCheckboxToggle(n))}),g(2,ni,22,0,"ng-template",null,3,b)(4,oi,29,26,"ng-template",null,4,b)(6,ri,1,3,"ng-template",null,5,b)(8,li,4,0,"ng-template",null,6,b),o()()}if(t&2){let e=_();a(),s("paginator",!0)("lazy",!0)("rows",e.store.filter().pageSize)("totalRecords",e.store.data().totalCount)("value",e.store.data().data)}}function pi(t,p){if(t&1&&(l(0,"span",32),m(1),w(2,"truncate"),o()),t&2){let e=p.$implicit;s("pTooltip",e.name),a(),N(" ",V(2,2,e.name,30)," ")}}function mi(t,p){if(t&1&&(l(0,"div")(1,"span",34),m(2),o()()),t&2){let e=p.$implicit;a(2),C(e)}}function si(t,p){if(t&1&&(l(0,"div"),g(1,mi,3,1,"div",33),o()),t&2){let e=_(2);a(),s("ngForOf",e.getErrors("from"))}}function ci(t,p){if(t&1&&(l(0,"div")(1,"span",34),m(2),o()()),t&2){let e=p.$implicit;a(2),C(e)}}function di(t,p){if(t&1&&(l(0,"div"),g(1,ci,3,1,"div",33),o()),t&2){let e=_(2);a(),s("ngForOf",e.getErrors("to"))}}function ui(t,p){if(t&1&&(l(0,"div")(1,"span",34),m(2),o()()),t&2){let e=p.$implicit;a(2),C(e)}}function fi(t,p){if(t&1&&(l(0,"div"),g(1,ui,3,1,"div",33),o()),t&2){let e=_(2);a(),s("ngForOf",e.getErrors("pageSize"))}}function _i(t,p){if(t&1&&(l(0,"form",23)(1,"div",24)(2,"label",25),m(3,"Outlet"),o(),l(4,"p-select",26),g(5,pi,3,5,"ng-template",null,7,b),o()(),l(7,"div",24)(8,"label",25),m(9,"From - To"),o(),l(10,"div",27),x(11,"p-datepicker",28),g(12,si,2,1,"div",29),x(13,"p-datepicker",30),g(14,di,2,1,"div",29),o()(),l(15,"div",24)(16,"label",25),m(17,"Page Size"),o(),x(18,"input",31),g(19,fi,2,1,"div",29),o()()),t&2){let e=_();s("formGroup",e.form),a(4),s("virtualScrollItemSize",50)("options",e.store.meta().options.outlets),a(7),s("iconDisplay","input")("showIcon",!0)("ngClass",F(14,Ze,e.isInvalid("from"))),a(),s("ngIf",e.isInvalid("from")),a(),s("iconDisplay","input")("showIcon",!0)("ngClass",F(16,Ze,e.isInvalid("to"))),a(),s("ngIf",e.isInvalid("to")),a(4),s("autoNumeric",$(18,ei))("ngClass",F(19,Ze,e.isInvalid("pageSize"))),a(),s("ngIf",e.isInvalid("pageSize"))}}var gt=(()=>{class t extends Me{constructor(){super(),this.generateJournalService=v(D),this.store=v(Ye),this.authService=v(ie),this.isDialogFilterVisible=k(!1),this.isInitDialogFilterVisible=k(!1),this.fb=v(se),this.dayjsService=v(J)}ngOnInit(){this.initForm()}initForm(){let{number:e,outletName:r,from:n,to:i,pageNumber:f,pageSize:u,export:je,exportPageNumber:Oe,exportPageSize:Ge}=this.store.filter();this.form=this.fb.group({number:this.fb.control(e),outletName:this.fb.control(r),from:this.fb.control(this.dayjsService.from(n)?this.dayjsService.from(n).toDate():null),to:this.fb.control(this.dayjsService.from(i)?this.dayjsService.from(i).toDate():null),pageNumber:this.fb.control(f),pageSize:this.fb.control(u,[oe.required]),export:this.fb.control(je),exportPageNumber:this.fb.control(Oe),exportPageSize:this.fb.control(Ge)})}onFilterOKEvent(){if(this.form.invalid){this.form.markAllAsTouched();return}let e=Object.entries(this.form.getRawValue()).reduce((r,[n,i])=>{switch(n){case"from":typeof i=="object"?r[n]=this.dayjsService.from(i)?this.dayjsService.format(i):null:r[n]=i!=null?String(i):null;break;case"to":typeof i=="object"?r[n]=this.dayjsService.from(i)?this.dayjsService.format(i):null:r[n]=i!=null?String(i):null;break;default:r[n]=i===null?"":i;break}return r},{});this.store.updateFilter(e),this.isDialogFilterVisible.set(!1)}onRowSelect(e){this.store.onRowSelect(e.data)}onRowUnselect(e){if(Array.isArray(e.data)){e.data.forEach(r=>{this.store.onRowUnselect(r)});return}else this.store.onRowUnselect(e.data)}onHeaderCheckboxToggle(e){this.store.onHeaderCheckboxToggle(e.checked)}onGenerateJournal(){this.generateJournalService.generateJournalSupplierBill(this.store.checkedShift()).pipe(G(()=>{this.store.getJournalShift(this.store.filter)})).subscribe()}onSearch(e){this.store.updateFilter(d(c({},this.store.filter()),{number:e}))}onPageChange(e){let r=e.first/e.rows;this.store.updateFilter(d(c({},this.store.filter()),{pageNumber:r+1}))}static{this.\u0275fac=function(r){return new(r||t)}}static{this.\u0275cmp=A({type:t,selectors:[["app-journal-shift"]],features:[q([Ye]),H],decls:7,vars:5,consts:[["actionButton",""],["content",""],["filters",""],["header",""],["body",""],["paginatorleft",""],["emptymessage",""],["item",""],["pageTitle","Shift Journal",3,"isDialogFilterVisibleChange","isInitDialogFilterVisibleChange","filterConfirmed","search","isSearchableInput","isFilterable","isDialogFilterVisible","isInitDialogFilterVisible","scrollable"],["label","Generate Journal",3,"onClick",4,"ngIf"],["label","Generate Journal",3,"onClick"],["dataKey","id",3,"onPage","onRowSelect","onRowUnselect","onHeaderCheckboxToggle","paginator","lazy","rows","totalRecords","value"],[2,"width","1rem"],[2,"width","12rem"],[2,"width","11rem"],[2,"width","14rem"],[2,"width","10rem"],[2,"width","9rem"],[2,"width","4rem"],[3,"value"],["target","_blank",1,"link","link-primary",3,"href"],[3,"icon","severity","text"],["colspan","11"],[1,"d-flex","flex-column","row-gap-3",3,"formGroup"],[1,"d-flex","flex-column"],["for","outlet"],["virtualScroll","","showClear","","filter","","filterBy","name","formControlName","outletName","appendTo","body","optionLabel","name","optionValue","name","placeholder","Select an Outlet",3,"virtualScrollItemSize","options"],[1,"d-flex","flex-column","gap-2"],["showClear","","formControlName","from","styleClass","w-100","appendTo","body","inputId","icondisplay",3,"iconDisplay","showIcon","ngClass"],[4,"ngIf"],["showClear","","formControlName","to","styleClass","w-100","appendTo","body","inputId","icondisplay",3,"iconDisplay","showIcon","ngClass"],["type","text","pInputText","","formControlName","pageSize",3,"autoNumeric","ngClass"],[3,"pTooltip"],[4,"ngFor","ngForOf"],[1,"text-danger"]],template:function(r,n){if(r&1){let i=E();l(0,"app-main-panel",8),K("isDialogFilterVisibleChange",function(u){return h(i),P(n.isDialogFilterVisible,u)||(n.isDialogFilterVisible=u),S(u)})("isInitDialogFilterVisibleChange",function(u){return h(i),P(n.isInitDialogFilterVisible,u)||(n.isInitDialogFilterVisible=u),S(u)}),T("filterConfirmed",function(){return h(i),S(n.onFilterOKEvent())})("search",function(u){return h(i),S(n.onSearch(u))}),g(1,ii,1,1,"ng-template",null,0,b)(3,ai,10,5,"ng-template",null,1,b)(5,_i,20,21,"ng-template",null,2,b),o()}r&2&&(s("isSearchableInput",!0)("isFilterable",!0),W("isDialogFilterVisible",n.isDialogFilterVisible)("isInitDialogFilterVisible",n.isInitDialogFilterVisible),s("scrollable",!0))},dependencies:[Ee,Re,ke,Ne,Je,te,Q,X,Y,ee,Z,Pe,he,ge,_e,fe,ce,ae,ne,re,le,pe,me,De,Ve,Fe,Te,Ie,we,ye,ue,de,ze],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var So=[{path:"invoice",component:ft},{path:"supplier-bill",component:_t},{path:"shift",component:gt},{path:"join-invoice",loadComponent:()=>import("./chunk-C77ODEJ2.js").then(t=>t.ARJournalComponent)},{path:"join-bill",loadComponent:()=>import("./chunk-MZ2PQW6O.js").then(t=>t.ApJournalComponent)},{path:"adjustment",loadComponent:()=>import("./chunk-SHV5C2MT.js").then(t=>t.AdjustmentJournalComponent)}];export{So as generateJournalRoutes};
@@ -1 +1 @@
1
- import{a as re}from"./chunk-G4XX7EU2.js";import{a as ut}from"./chunk-JRVYSBUZ.js";import{a as dt,b as gt}from"./chunk-BLR3HBYP.js";import{a as Ke}from"./chunk-KA4OB5NC.js";import{a as Rt,b as ot}from"./chunk-F5EY5MQU.js";import{a as mt}from"./chunk-XKI7WLHE.js";import"./chunk-7DYACF4D.js";import"./chunk-NZN6QJR3.js";import{a as st,b as ct}from"./chunk-EB6NEJHF.js";import{a as et}from"./chunk-5CZNOXPC.js";import"./chunk-IGWIRCAS.js";import{a as ne,b as ie}from"./chunk-3A4BFUGD.js";import{b as at,d as Me,i as lt,j as pt,k as ke}from"./chunk-EL5BUFMO.js";import{a as it,b as rt}from"./chunk-EQ4PLHI4.js";import"./chunk-H7Q35Y7G.js";import"./chunk-R7N6BWL5.js";import{a as Ne}from"./chunk-QF4D5YPK.js";import{a as ye,b as Re}from"./chunk-VJ3IBUVO.js";import"./chunk-2AAVNIG7.js";import{a as Pe,b as De}from"./chunk-LFZCMZAP.js";import"./chunk-6A2KUPOG.js";import"./chunk-36OX4S7M.js";import"./chunk-Q5CVMJZC.js";import"./chunk-3GGXPPQT.js";import"./chunk-MFK5RQPJ.js";import{b as Q}from"./chunk-KJ2WX3FC.js";import"./chunk-6GN3MGBY.js";import"./chunk-Q24GCSGD.js";import{f as nt,h as L}from"./chunk-P5EFFSD2.js";import"./chunk-VGNJD35F.js";import{a as N,b as A}from"./chunk-2XUSZCQL.js";import{a as T,b as Ie,c as tt,d as Te,e as we,f as Fe}from"./chunk-YV2QJ63P.js";import"./chunk-ARH3WEEF.js";import{n as Se,o as Ce,w as Y,x as J}from"./chunk-H6HNANYB.js";import"./chunk-2D2YD753.js";import{b as xe,c as K,e as X,f as _e,i as Xe,j as Ye,k as he,l as Ee,o as ve,u as Je,v as Qe,w as Ze,x as be}from"./chunk-OIBDX2CA.js";import{b as de,d as ge,e as k,l as V}from"./chunk-AOOG6YOT.js";import{a as fe}from"./chunk-BKOGQ4CV.js";import"./chunk-2MKKFLNJ.js";import{h as We,k as D,p as ue,q as W,s as M}from"./chunk-VZ5CMS5O.js";import"./chunk-F2X3VGZZ.js";import{$b as y,Bb as Ge,Cc as me,Db as h,Dc as Ve,Ec as C,Ha as q,J as qe,Lb as m,Nc as S,Oc as F,Pc as U,Qb as He,Rb as G,Rc as x,Tb as H,Ub as $,Vb as r,Wb as n,Xb as d,Y as O,_ as w,bd as te,c as ee,ca as le,ec as R,fc as g,hb as l,ia as u,qa as v,ra as b,rc as a,s as z,sc as E,tc as I,ua as Ue,vc as $e,wc as pe,xa as ze,xb as P,xc as se,yc as ce}from"./chunk-NMCKMUY4.js";import{a as f,b as _,e as yt}from"./chunk-YQFG5XE2.js";var B=(()=>{class t{#e=u(fe);#t=u(Ke);getRecurringExpenseLoader(){return this.#e.get(void 0,"api/RecurringExpenseLoader/GetList")}getRecurringExpenses(e){return this.#e.post(void 0,"api/RecurringExpense/GetList",e)}fetchRecurringExpenseForm(e){return this.#e.get(void 0,`api/RecurringExpense/form/${e??""}`)}fetchSupplierSuggestion(e){let o={count:100,prefix:e};return this.#e.post(this.#t.getTenantExternalURL(),"/API/AC/GetSupplierSuggestion",o)}fetchCustomerSuggestion(e){let o={count:100,prefix:e};return this.#e.post(this.#t.getTenantExternalURL(),"/API/AC/GetCustomerSuggestion",o)}submitRecurringExpense(e,o={}){return this.#e.post(void 0,"api/RecurringExpense/submit",e,o)}removeRecurringExpense(e){return this.#e.delete(void 0,`api/RecurringExpense/${e}`,void 0)}removeRecurringExpenses(e){let o={body:e};return this.#e.delete(void 0,"api/RecurringExpense/Batch",o)}getRecurringExpenseByID(e){return this.#e.get(void 0,`api/RecurringExpense/Info/${e}`)}getAssetValueList(){return this.#e.get(void 0,"api/AssetValue/GetListt")}static{this.\u0275fac=function(o){return new(o||t)}}static{this.\u0275prov=le({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var It={data:{data:[],count:0},meta:{Options:{Frequencies:[]},Filter:{text:null,Frequency:0,pageNumber:1,pageSize:20,export:!1,exportPageNumber:1,exportPageSize:1e4}},filter:{text:null,Frequency:0,pageNumber:1,pageSize:20,export:!1,exportPageNumber:1,exportPageSize:1e4}},Ae=Ie(Fe(It),tt(t=>({first:te(()=>(t.filter().pageNumber-1)*t.filter().pageSize+1),end:te(()=>Math.min(t.filter().pageNumber*t.filter().pageSize,t.data().count)),hasCheckedRows:te(()=>t.data().data.some(c=>c.checked)),checkedInvoice:te(()=>t.data().data.filter(c=>c.checked).map(c=>c.id))})),we(t=>{let c=u(B);return{updateFilter(o){T(t,i=>_(f({},i),{filter:f(f({},i.filter),o)}))},onRowSelect(o){T(t,i=>{let s=i.data.data.map(p=>p.id===o.id?_(f({},p),{checked:!0}):p);return _(f({},i),{data:_(f({},i.data),{data:s})})})},onRowUnselect(o){T(t,i=>{let s=i.data.data.map(p=>p.id===o.id?_(f({},p),{checked:!1}):p);return _(f({},i),{data:_(f({},i.data),{data:s})})})},onHeaderCheckboxToggle(o){T(t,i=>{let s=i.data.data.map(p=>_(f({},p),{checked:o}));return _(f({},i),{data:_(f({},i.data),{data:s})})})},getRecurringExpenseLoader:ne(ee(O(()=>c.getRecurringExpenseLoader().pipe(ie({next:o=>{T(t,i=>_(f({},i),{meta:o}))},error:o=>{console.error("Error fetching Recurring Expense Loader:",o)}}))))),getRecurringExpenses:ne(ee(z(o=>Object.entries(o).reduce((i,[s,p])=>(p!=null&&(i[s]=p),i),{})),O(o=>c.getRecurringExpenses(o).pipe(ie({next:i=>{T(t,s=>_(f({},s),{data:i}))},error:i=>{console.error("Error fetching Recurring Expenses:",i)}})))))}}),Te(t=>({onInit:()=>{t.getRecurringExpenseLoader(),t.getRecurringExpenses(t.filter)}})));var Ft=["class","page"],Pt=t=>["details/",t];function Dt(t,c){if(t&1){let e=y();r(0,"p-button",12),R("onClick",function(){v(e);let i=g(2);return b(i.onDeleteSelected())}),n()}}function Mt(t,c){if(t&1&&(r(0,"div",8),h(1,Dt,1,0,"p-button",9),r(2,"a",10),d(3,"i",11),r(4,"span"),a(5,"Add"),n()()()),t&2){let e=g();l(),m("ngIf",e.store.hasCheckedRows())}}function kt(t,c){t&1&&(r(0,"tr")(1,"th"),d(2,"p-tableHeaderCheckbox"),n(),r(3,"th"),a(4,"Outlet"),n(),r(5,"th"),a(6,"Name"),n(),r(7,"th"),a(8,"Expense Account"),n(),r(9,"th"),a(10,"Start Date"),n(),r(11,"th"),a(12,"End Date"),n(),r(13,"th"),a(14,"Last Expense"),n(),r(15,"th"),a(16,"Amount"),n(),r(17,"th"),a(18,"Frequency"),n()())}function Vt(t,c){if(t&1&&(r(0,"tr")(1,"td"),d(2,"p-tableCheckbox",14),n(),r(3,"td"),a(4),n(),r(5,"td")(6,"a",15),a(7),n()(),r(8,"td"),a(9),n(),r(10,"td"),a(11),S(12,"date"),n(),r(13,"td"),a(14),S(15,"date"),n(),r(16,"td"),a(17),S(18,"date"),n(),r(19,"td"),a(20),S(21,"number"),n(),r(22,"td"),a(23),n()()),t&2){let e=c.$implicit;l(2),m("value",e),l(2),E(e.outletName),l(2),m("routerLink",C(21,Pt,e.id)),l(),E(e.name),l(2),E(e.expenseName),l(2),E(U(12,10,e.startDate,"d MMM y")),l(3),E(U(15,13,e.endDate,"d MMM y")),l(3),E(U(18,16,e.lastExpenseDate,"d MMM y")),l(3),E(F(21,19,e.amount)),l(3),E(e.repeatTypeLabel)}}function Nt(t,c){if(t&1&&(r(0,"div"),a(1),n()),t&2){let e=g(2);l(),$e(" Showing ",e.store.first()," to ",e.store.end()," of ",e.store.data().count," entries ")}}function At(t,c){t&1&&(r(0,"tr")(1,"td",16)(2,"span"),a(3,"No recurring expenses found."),n()()())}function Lt(t,c){if(t&1){let e=y();r(0,"p-panel")(1,"p-table",13),R("onPage",function(i){v(e);let s=g();return b(s.onPageChange(i))})("onHeaderCheckboxToggle",function(i){v(e);let s=g();return b(s.onHeaderCheckboxToggle(i))})("onRowSelect",function(i){v(e);let s=g();return b(s.onRowSelect(i))})("onRowUnselect",function(i){v(e);let s=g();return b(s.onRowUnselect(i))}),h(2,kt,19,0,"ng-template",null,3,x)(4,Vt,24,23,"ng-template",null,4,x)(6,Nt,2,3,"ng-template",null,5,x)(8,At,4,0,"ng-template",null,6,x),n()()}if(t&2){let e=g();l(),m("lazy",!0)("totalRecords",e.store.data().count)("rows",e.store.filter().pageSize)("paginator",!0)("value",e.store.data().data)}}function Bt(t,c){if(t&1&&(r(0,"form",17)(1,"div",18)(2,"label",19),a(3,"Type"),n(),d(4,"p-select",20),n()()),t&2){let e=g();m("formGroup",e.form),l(4),m("options",e.store.meta().Options.Frequencies)}}var _t=(()=>{class t extends mt{constructor(){super(...arguments),this.store=u(Ae),this.recurringExpenseService=u(B),this.fb=u(Je),this.isDialogFilterVisible=q(!1)}ngOnInit(){this.initForm()}onPageChange(e){let o=e.first/e.rows;this.store.updateFilter(_(f({},this.store.filter()),{pageNumber:o+1}))}onDeleteSelected(){this.recurringExpenseService.removeRecurringExpenses(this.store.checkedInvoice()).pipe(w(()=>{this.store.updateFilter(_(f({},this.store.filter()),{pageNumber:1}))})).subscribe()}onSearchEvent(e){this.store.updateFilter(_(f({},this.store.filter()),{text:e}))}onFilterEvent(){this.onSubmitFilterDialog()}onSubmitFilterDialog(){if(this.form.invalid){this.form.markAllAsTouched();return}let e=Object.entries(this.form.getRawValue()).reduce((o,[i,s])=>(s!=null&&(o[i]=s),o),{});this.store.updateFilter(e),this.isDialogFilterVisible.update(o=>!o)}onHeaderCheckboxToggle(e){this.store.onHeaderCheckboxToggle(e.checked)}onRowSelect(e){this.store.onRowSelect(e.data)}onRowUnselect(e){if(Array.isArray(e.data)){e.data.forEach(o=>{this.store.onRowUnselect(o)});return}else this.store.onRowUnselect(e.data)}initForm(){let{text:e,Frequency:o,pageNumber:i,pageSize:s,export:p,exportPageNumber:j,exportPageSize:Ct}=this.store.filter();this.form=this.fb.group({text:this.fb.control(e),Frequency:this.fb.control(o),pageNumber:this.fb.control(i),pageSize:this.fb.control(s),export:this.fb.control(p),exportPageNumber:this.fb.control(j),exportPageSize:this.fb.control(Ct)})}static{this.\u0275fac=(()=>{let e;return function(i){return(e||(e=Ue(t)))(i||t)}})()}static{this.\u0275cmp=P({type:t,selectors:[["app-recurring-expense",8,"page"]],features:[me([Ae]),Ge],attrs:Ft,decls:7,vars:4,consts:[["actionButton",""],["content",""],["filters",""],["header",""],["body",""],["paginatorleft",""],["emptymessage",""],["pageTitle","Recurring Expenses",3,"search","isDialogFilterVisibleChange","filterConfirmed","isSearchableInput","isFilterable","isDialogFilterVisible","scrollable"],[1,"d-flex","gap-2"],["severity","danger","label","Delete","icon","fa-solid fa-trash",3,"onClick",4,"ngIf"],["routerLink","create",1,"p-button"],[1,"fa-solid","fa-plus"],["severity","danger","label","Delete","icon","fa-solid fa-trash",3,"onClick"],["dataKey","id","styleClass","d-flex flex-column justify-content-between h-100",3,"onPage","onHeaderCheckboxToggle","onRowSelect","onRowUnselect","lazy","totalRecords","rows","paginator","value"],[3,"value"],[1,"link-primary",3,"routerLink"],["colspan","9"],[1,"d-flex","flex-column",3,"formGroup"],[1,"d-flex","flex-column"],["for","outlet"],["formControlName","Frequency","appendTo","body","optionLabel","value","optionValue","key","placeholder","Select Type",3,"options"]],template:function(o,i){if(o&1){let s=y();r(0,"app-main-panel",7),R("search",function(j){return v(s),b(i.onSearchEvent(j))}),ce("isDialogFilterVisibleChange",function(j){return v(s),se(i.isDialogFilterVisible,j)||(i.isDialogFilterVisible=j),b(j)}),R("filterConfirmed",function(){return v(s),b(i.onFilterEvent())}),h(1,Mt,6,1,"ng-template",null,0,x)(3,Lt,10,5,"ng-template",null,1,x)(5,Bt,5,2,"ng-template",null,2,x),n()}o&2&&(m("isSearchableInput",!0)("isFilterable",!0),pe("isDialogFilterVisible",i.isDialogFilterVisible),m("scrollable",!0))},dependencies:[L,k,Q,ke,Me,lt,pt,M,D,W,ue,V,nt,De,Pe,J,Y,be,he,X,_e,Ee,ve,A,N],styles:["[_nghost-%COMP%]{display:block} .p-card{height:100%} .p-card .p-card-body{height:inherit} .p-card .p-card-body .p-card-content{height:inherit}"],changeDetection:0})}}return t})();var Z=yt(Rt());var qt=["class","page"],Ut=()=>["/pages/recurring/recurring-expense"],ae=t=>({"ng-dirty ng-invalid":t}),zt=()=>({});function Gt(t,c){if(t&1){let e=y();r(0,"div",5)(1,"a",6),a(2," Cancel "),n(),r(3,"p-button",7),R("click",function(){v(e);let i=g();return b(i.onSubmit())}),n()()}t&2&&(l(),m("routerLink",Ve(1,Ut)))}function Ht(t,c){if(t&1&&(r(0,"small",19),a(1),n()),t&2){let e=c.$implicit;l(),E(e)}}function $t(t,c){if(t&1&&(r(0,"div",32)(1,"div",33),a(2),n()()),t&2){let e=c.$implicit;l(2),I(" ",e.name," ")}}function Wt(t,c){if(t&1&&(r(0,"small",19),a(1),n()),t&2){let e=c.$implicit;l(),E(e)}}function Kt(t,c){if(t&1&&(r(0,"small",19),a(1),n()),t&2){let e=c.$implicit;l(),E(e)}}function Xt(t,c){if(t&1&&(r(0,"div",5)(1,"div")(2,"span"),a(3),n()(),r(4,"div",33),a(5),n()()),t&2){let e=c.$implicit;l(3),I("(",e.code,")"),l(2),I(" ",e.value," ")}}function Yt(t,c){if(t&1&&(r(0,"small",19),a(1),n()),t&2){let e=c.$implicit;l(),E(e)}}function Jt(t,c){if(t&1&&(r(0,"div",5)(1,"div")(2,"span"),a(3),n()(),r(4,"div",33),a(5),n()()),t&2){let e=c.$implicit;l(3),I("(",e.code,")"),l(2),I(" ",e.value," ")}}function Qt(t,c){if(t&1&&(r(0,"small",19),a(1),n()),t&2){let e=c.$implicit;l(),E(e)}}function Zt(t,c){if(t&1){let e=y();r(0,"div",9)(1,"div",10)(2,"p-panel",11)(3,"p-scroll-panel")(4,"div",12)(5,"div",13)(6,"form",14)(7,"div",15)(8,"div",13)(9,"div",16)(10,"label",17),a(11,"Name"),n(),d(12,"input",18),r(13,"div"),H(14,Ht,2,1,"small",19,G),n()()(),r(16,"div",20,2)(18,"div",16)(19,"label",17),a(20,"Outlet"),n(),r(21,"p-select",21),h(22,$t,3,1,"ng-template",null,3,x),n()()(),r(24,"div",20)(25,"div",16)(26,"div")(27,"label",17),a(28,"Supplier"),n(),r(29,"p-autocomplete",22),R("completeMethod",function(i){v(e);let s=g(2);return b(s.searchContact(i))}),n()(),r(30,"div"),H(31,Wt,2,1,"small",19,G),n()()(),r(33,"div",20)(34,"div",16)(35,"label",17),a(36,"From"),n(),d(37,"p-datepicker",23),n()(),r(38,"div",20)(39,"div",16)(40,"label",17),a(41,"To"),n(),d(42,"p-datepicker",24),n()(),d(43,"div",25),n(),d(44,"hr"),r(45,"div",15)(46,"div",20)(47,"div",16)(48,"label",17),a(49,"Amount"),n(),d(50,"input",26),r(51,"div"),H(52,Kt,2,1,"small",19,G),n()()(),r(54,"div",20)(55,"div",16)(56,"label",17),a(57,"Frequency"),n(),d(58,"p-select",27),n()(),r(59,"div",20)(60,"div",16)(61,"label",17),a(62,"Expense (Debit)"),n(),r(63,"p-select",28),h(64,Xt,6,2,"ng-template",null,3,x),n()(),r(66,"div"),H(67,Yt,2,1,"small",19,G),n()(),r(69,"div",20)(70,"div",16)(71,"label",17),a(72,"Payment (Credit)"),n(),r(73,"p-select",29),h(74,Jt,6,2,"ng-template",null,3,x),n()(),r(76,"div"),H(77,Qt,2,1,"small",19,G),n()(),r(79,"div",30)(80,"div",16)(81,"label",17),a(82,"Description"),n(),d(83,"textarea",31),n()()()()()()()()()()}if(t&2){let e,o,i,s,p=g(2);l(6),m("formGroup",p.recurringExpenseForm),l(6),m("ngClass",C(17,ae,p.isInvalid("name"))),l(2),$(p.getErrors("name")),l(7),m("options",(e=p.recurringExpenseData())==null||e.options==null?null:e.options.entities),l(8),m("showClear",!0)("ngClass",C(19,ae,p.isInvalid("contact")))("suggestions",p.customerSupplierSuggestions()),l(2),$(p.getErrors("contact")),l(6),m("iconDisplay","input")("showIcon",!0),l(5),m("iconDisplay","input")("showIcon",!0),l(8),m("ngClass",C(21,ae,p.isInvalid("amount")))("autoNumeric",Ve(23,zt)),l(2),$(p.getErrors("amount")),l(6),m("options",(o=p.recurringExpenseData())==null||o.options==null?null:o.options.frequency),l(5),m("options",(i=p.recurringExpenseData())==null||i.options==null?null:i.options.expenses)("ngClass",C(24,ae,p.isInvalid("expenseAccountID"))),l(4),$(p.getErrors("expenseAccountID")),l(6),m("ngClass",C(26,ae,p.isInvalid("paymentAccountID")))("options",(s=p.recurringExpenseData())==null||s.options==null?null:s.options.assets),l(4),$(p.getErrors("paymentAccountID"))}}function en(t,c){if(t&1&&h(0,Zt,84,28,"div",8),t&2){let e=g();m("ngIf",e.recurringExpenseData())}}var je=(()=>{class t{constructor(){this.recurringExpenseService=u(B),this.fb=u(Qe),this.destroyRef=u(ze),this.route=u(de),this.recurringExpenseData=q(null),this.customerSupplierSuggestions=q([]),this.router=u(ge),this.contactType=new Xe(0),this.dayjsService=u(ot)}ngOnInit(){this.initializeForm(),this.fetchRecurringExpenseForm()}initializeForm(){this.recurringExpenseForm=this.fb.group({id:this.fb.control(""),name:this.fb.control("",[K.required]),repeatTypeID:this.fb.control(1,[K.required]),startDate:this.fb.control((0,Z.default)().toISOString()),endDate:this.fb.control(null),lastExpenseDate:this.fb.control(""),amount:this.fb.control(0,[K.required]),paymentAccountID:this.fb.control(null,[K.required]),expenseAccountID:this.fb.control(null,[K.required]),contact:this.fb.control("",[]),description:this.fb.control(""),repeatTypeLabel:this.fb.control(""),outletID:this.fb.control(""),creatorID:this.fb.control(""),created:this.fb.control(""),modifierID:this.fb.control(""),modified:this.fb.control("")})}fetchRecurringExpenseForm(){this.route.paramMap.pipe(z(e=>e.get("id")),O(e=>e?this.recurringExpenseService.fetchRecurringExpenseForm(e):this.recurringExpenseService.fetchRecurringExpenseForm()),w(e=>{this.recurringExpenseData.set(e),this.updateFormWithRecurringExpense(e.form)})).subscribe()}updateFormWithRecurringExpense(e){let o=Object.entries(e).reduce((i,[s,p])=>{switch(s){case"startDate":i[s]=(0,Z.default)(p).isSame((0,Z.default)("0001-01-01T00:00:00"))?(0,Z.default)().toDate():(0,Z.default)(p).toDate();break;case"repeatTypeID":i[s]=1;break;case"contactID":i.contact=e.contactID?{Key:e.contactID,Value:e.contactName}:null;break;case"paymentAccountID":i[s]=p===re?null:p;break;case"expenseAccountID":i[s]=p===re?null:p;break;default:i[s]=p}return i},{});this.recurringExpenseForm.patchValue(o)}searchContact(e){this.recurringExpenseService.fetchSupplierSuggestion(e.query).pipe(w(this.customerSupplierSuggestions.set)).subscribe()}onSubmit(){let e=this.recurringExpenseForm.value;if(this.recurringExpenseForm.invalid){this.recurringExpenseForm.markAllAsTouched();return}let o=Object.entries(e).reduce((i,[s,p])=>{switch(s){case"amount":i[s]=+p;break;case"startDate":i[s]=p?this.dayjsService.from(p).format():null;break;case"endDate":i[s]=p?this.dayjsService.from(p).format():null;break;case"contact":typeof p=="string"?i.contactID=p:typeof p=="object"&&p!==null?i.contactID=p&&Object.prototype.hasOwnProperty.call(p,"Key")?p.Key:p:i.contactID=re;break;default:i[s]=p;break}return i},{});this.recurringExpenseService.submitRecurringExpense(o).pipe(w(()=>{this.router.navigate(["/pages/recurring/recurring-expense"])})).subscribe()}isInvalid(e){let o=this.recurringExpenseForm.controls[e];return o.invalid&&(o.dirty||o.touched)}getErrors(e){if(!this.isInvalid(e))return null;let o=this.recurringExpenseForm.controls[e];if(!o.errors)return null;let i=[];for(let[s,p]of Object.entries(o.errors))switch(s){case"required":i.push("This field is required.");break;case"minlength":i.push(`Minimum length is ${p.requiredLength} characters.`);break;case"maxlength":i.push(`Maximum length is ${p.requiredLength} characters.`);break;case"email":i.push("Please enter a valid email address.");break;case"pattern":i.push("The format is invalid.");break;case"min":i.push(`Minimum value is ${p.min}.`);break;case"max":i.push(`Maximum value is ${p.max}.`);break;default:i.push("Invalid value.")}return i}static{this.\u0275fac=function(o){return new(o||t)}}static{this.\u0275cmp=P({type:t,selectors:[["app-recurring-expense-form",8,"page"]],attrs:qt,decls:5,vars:2,consts:[["actionButton",""],["content",""],["outlet",""],["item",""],["pageTitle","Recurring Expense Form",3,"hasMainWrapperPadding","overflowScroll"],[1,"d-flex","gap-2"],["type","button",1,"p-button","p-button-secondary","p-button-outlined",3,"routerLink"],["label","Submit","icon","fa-solid fa-plus",3,"click"],["class","row justify-content-center",4,"ngIf"],[1,"row","justify-content-center"],[1,"col-6"],[1,"h-100","d-flex"],[1,"row","justify-content-center","h-100"],[1,"col-12"],[1,"d-flex","flex-column","row-gap-2",3,"formGroup"],[1,"row","row-gap-2"],[1,"d-flex","flex-column"],["for",""],["formControlName","name","type","text","pInputText","",3,"ngClass"],[1,"text-danger"],[1,"col","col-lg-6"],["filter","","filterBy","name","appendTo","body","formControlName","outletID","optionLabel","name","optionValue","id","placeholder","Select Outlet",3,"options"],["formControlName","contact","inputStyleClass","w-100","styleClass","w-100","optionLabel","Value","optionValue","Key",3,"completeMethod","showClear","ngClass","suggestions"],["dateFormat","mm/dd/yy","appendTo","body","formControlName","startDate","styleClass","w-100","inputId","icondisplay",3,"iconDisplay","showIcon"],["appendTo","body","formControlName","endDate","styleClass","w-100","inputId","icondisplay",3,"iconDisplay","showIcon"],[1,"col"],["formControlName","amount","type","text","pInputText","",3,"ngClass","autoNumeric"],["appendTo","body","formControlName","repeatTypeID","optionLabel","value","optionValue","key","placeholder","Select Outlet",3,"options"],["appendTo","body","formControlName","expenseAccountID","optionLabel","value","optionValue","key","placeholder","Select Expense","filter","","filterBy","code,value",3,"options","ngClass"],["appendTo","body","formControlName","paymentAccountID","optionLabel","value","optionValue","key","filter","","filterBy","code,value","placeholder","Select Payment",3,"ngClass","options"],[1,"col","col-lg-12"],["formControlName","description","rows","3","cols","30","pTextarea",""],[1,"flex","items-center","gap-2"],[1,"text-truncate","d-inline-block",2,"max-width","250px"]],template:function(o,i){o&1&&(r(0,"app-main-panel",4),h(1,Gt,4,2,"ng-template",null,0,x)(3,en,1,1,"ng-template",null,1,x),n()),o&2&&m("hasMainWrapperPadding",!0)("overflowScroll",!0)},dependencies:[L,Q,Ce,Se,De,Pe,rt,it,gt,dt,ct,st,Re,ye,M,We,D,be,he,xe,X,_e,Ee,ve,V,k,J,Y,ut,A,N,at],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var tn=["class","page"],nn=t=>["/pages/recurring/recurring-expense/edit",t];function rn(t,c){if(t&1&&(r(0,"a",7),d(1,"i",8),r(2,"span"),a(3,"Edit"),n()()),t&2){let e=g(4);m("routerLink",C(1,nn,e.currentRecurringExpense().id))}}function on(t,c){if(t&1){let e=y();r(0,"p-button",9),R("onClick",function(){v(e);let i=g(4);return b(i.onDeleteRecurringExpense(i.currentRecurringExpense().id))}),n()}}function an(t,c){if(t&1&&(r(0,"div",4),h(1,rn,4,3,"a",5)(2,on,1,0,"p-button",6),n()),t&2){let e=g(3);l(),m("ngIf",e.roleService.setup().recurring),l(),m("ngIf",e.roleService.setup().recurring)}}function ln(t,c){if(t&1&&h(0,an,3,2,"div",3),t&2){let e=g(2);m("ngIf",e.currentRecurringExpense())}}function pn(t,c){if(t&1){let e=y();r(0,"p-panel",13)(1,"p-scroll-panel")(2,"div",10)(3,"div",14)(4,"div",15)(5,"div",14)(6,"div",16)(7,"div",17)(8,"div",18)(9,"label",19),a(10,"Outlet"),n(),r(11,"input",20),ce("ngModelChange",function(i){v(e);let s=g(3);return se(s.currentRecurringExpense().outletName,i)||(s.currentRecurringExpense().outletName=i),b(i)}),n()()(),r(12,"div",17)(13,"div",18)(14,"label",19),a(15,"Supplier"),n(),d(16,"input",21),n()(),r(17,"div",17)(18,"div",18)(19,"label",19),a(20,"From"),n(),d(21,"input",22),S(22,"date"),n()(),r(23,"div",17)(24,"div",18)(25,"label",19),a(26,"To"),n(),d(27,"input",22),S(28,"date"),n()()(),d(29,"hr"),r(30,"div",16)(31,"div",17)(32,"div",18)(33,"label",19),a(34,"Amount"),n(),d(35,"input",22),S(36,"number"),n()(),r(37,"div",17)(38,"div",18)(39,"label",19),a(40,"Frequency"),n(),d(41,"input",22),n()(),r(42,"div",17)(43,"div",18)(44,"label",19),a(45,"Expense (Debit)"),n(),d(46,"input",22),n()(),r(47,"div",17)(48,"div",18)(49,"label",19),a(50,"Payment (Credit)"),n(),d(51,"input",22),n()(),r(52,"div",23)(53,"div",18)(54,"label",19),a(55,"Description"),n(),d(56,"textarea",24),n()()()()()()()()()}if(t&2){let e=g(3);l(11),pe("ngModel",e.currentRecurringExpense().outletName),l(5),m("value",e.currentRecurringExpense().contactName),l(5),m("value",U(22,9,e.currentRecurringExpense().startDate,"d MMM y")),l(6),m("value",U(28,12,e.currentRecurringExpense().endDate,"d MMM y")),l(8),m("value",F(36,15,e.currentRecurringExpense().amount)),l(6),m("value",e.currentRecurringExpense().repeatTypeLabel),l(5),m("value",e.currentRecurringExpense().expenseName),l(5),m("value",e.currentRecurringExpense().paymentName),l(5),m("value",e.currentRecurringExpense().description)}}function sn(t,c){if(t&1&&(r(0,"div",10)(1,"div",11),h(2,pn,57,17,"p-panel",12),n()()),t&2){let e=g(2);l(2),m("ngIf",e.currentRecurringExpense())}}function cn(t,c){if(t&1&&(r(0,"app-main-panel",2),h(1,ln,1,1,"ng-template",null,0,x)(3,sn,3,1,"ng-template",null,1,x),n()),t&2){let e=g();m("pageTitle",e.currentRecurringExpense().name+" Info")("hasMainWrapperPadding",!0)("overflowScroll",!0)}}var Et=(()=>{class t{constructor(){this.recurringExpenseService=u(B),this.route=u(de),this.router=u(ge),this.currentRecurringExpense=q(null),this.roleService=u(et)}ngOnInit(){this.route.paramMap.pipe(z(e=>e.get("id")),Ne("params"),qe(e=>this.recurringExpenseService.getRecurringExpenseByID(e)),w(e=>this.currentRecurringExpense.set(e)),Ne("recurringExpense")).subscribe()}onDeleteRecurringExpense(e){this.recurringExpenseService.removeRecurringExpense(e).pipe(w(()=>{this.router.navigate(["/pages/recurring/recurring-expense"])})).subscribe()}static{this.\u0275fac=function(o){return new(o||t)}}static{this.\u0275cmp=P({type:t,selectors:[["app-recurring-expense-info",8,"page"]],attrs:tn,decls:1,vars:1,consts:[["actionButton",""],["content",""],[3,"pageTitle","hasMainWrapperPadding","overflowScroll"],["class","d-flex gap-2",4,"ngIf"],[1,"d-flex","gap-2"],["class","p-button p-button-outlined p-button-secondary d-flex gap-2 align-items-center",3,"routerLink",4,"ngIf"],["icon","fa-solid fa-trash","label","Delete","severity","danger",3,"onClick",4,"ngIf"],[1,"p-button","p-button-outlined","p-button-secondary","d-flex","gap-2","align-items-center",3,"routerLink"],[1,"fa-solid","fa-pen-to-square"],["icon","fa-solid fa-trash","label","Delete","severity","danger",3,"onClick"],[1,"row","justify-content-center"],[1,"col-6"],["class","h-100 d-flex",4,"ngIf"],[1,"h-100","d-flex"],[1,"col"],[1,"row"],[1,"row","row-gap-2"],[1,"col","col-lg-6"],[1,"d-flex","flex-column"],["for",""],["readonly","","type","text","pInputText","",3,"ngModelChange","ngModel"],["type","text","readonly","","pInputText","",3,"value"],["readonly","","type","text","pInputText","",3,"value"],[1,"col","col-lg-12"],["readonly","","rows","5","cols","30","pTextarea","",3,"value"]],template:function(o,i){o&1&&h(0,cn,5,3,"app-main-panel",2),o&2&&He(i.currentRecurringExpense()?0:-1)},dependencies:[L,Q,M,D,W,ue,Ce,Se,Ze,xe,X,Ye,J,Y,V,k,A,N,Re,ye],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var vt=[{path:"",redirectTo:"",pathMatch:"full"},{path:"",children:[{path:"",component:_t},{path:"create",component:je},{path:"details/:id",component:Et},{path:"edit/:id",component:je}]}];var bt=(()=>{class t{constructor(){this.httpService=u(fe)}getAssetValue(e){return this.httpService.post(void 0,"/api/AssetValue/GetList",e)}static{this.\u0275fac=function(o){return new(o||t)}}static{this.\u0275prov=le({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var mn={filter:{Text:"",Frequency:0,PageNumber:1,PageSize:10},data:null},Oe=Ie(Fe(mn),we(t=>{let c=u(bt);return{getAssetValue:ne(ee(O(o=>c.getAssetValue(o).pipe(ie({next:i=>{T(t,s=>_(f({},s),{data:i}))},error:i=>{console.error("Error fetching asset value:",i)}}))))),updateFilter:o=>{T(t,i=>_(f({},i),{filter:o}))}}}),Te({onInit:t=>{t.getAssetValue(t.filter())}}));var un=t=>["/pages/recurring/recurring-expense/details/",t];function dn(t,c){t&1&&d(0,"div",5)}function gn(t,c){t&1&&(r(0,"tr")(1,"th"),a(2,"Outlet"),n(),r(3,"th"),a(4,"Name"),n(),r(5,"th"),a(6,"Account Code"),n(),r(7,"th",8),a(8,"Price on Purchase"),n(),r(9,"th",8),a(10,"Accomulated Depreciation"),n(),r(11,"th",8),a(12,"Book Value"),n(),r(13,"th",8),a(14,"Frequency"),n()())}function fn(t,c){if(t&1&&(r(0,"tr")(1,"td"),a(2),n(),r(3,"td")(4,"a",9),a(5),n()(),r(6,"td"),a(7),n(),r(8,"td",8),a(9),S(10,"number"),n(),r(11,"td",8),a(12),S(13,"number"),n(),r(14,"td",8),a(15),S(16,"number"),n(),r(17,"td",8),a(18),S(19,"number"),n()()),t&2){let e=c.$implicit;l(2),E(e.entityName),l(2),m("routerLink",C(16,un,e.id)),l(),E(e.name),l(2),E(e.accountCode),l(2),E(F(10,8,e.priceOnPurchase)),l(3),I(" ",F(13,10,e.accumulatedDepreciation)," "),l(3),I(" ",F(16,12,e.bookValue)," "),l(3),I(" ",F(19,14,e.depreciationPerYear)," ")}}function xn(t,c){if(t&1&&(r(0,"p-panel")(1,"p-table",7),h(2,gn,15,0,"ng-template",null,2,x)(4,fn,20,18,"ng-template",null,3,x),n()()),t&2){let e=g(2);l(),m("value",e.store.data().data)("rows",e.store.filter().PageSize)("totalRecords",e.store.data().count)}}function _n(t,c){if(t&1&&h(0,xn,6,3,"p-panel",6),t&2){let e=g();m("ngIf",e.store.data())}}var St=(()=>{class t{constructor(){this.store=u(Oe)}static{this.\u0275fac=function(o){return new(o||t)}}static{this.\u0275cmp=P({type:t,selectors:[["app-asset-value"]],features:[me([Oe])],decls:5,vars:2,consts:[["actionButton",""],["content",""],["header",""],["body",""],["pageTitle","Asset Value",3,"isSearchableInput","scrollable"],[1,"d-flex","gap-2"],[4,"ngIf"],["styleClass","h-100","dataKey","id",1,"",3,"value","rows","totalRecords"],[1,"text-end"],["target","_blank",1,"link","link-primary",3,"routerLink"]],template:function(o,i){o&1&&(r(0,"app-main-panel",4),h(1,dn,1,0,"ng-template",null,0,x)(3,_n,1,1,"ng-template",null,1,x),n()),o&2&&m("isSearchableInput",!0)("scrollable",!0)},dependencies:[L,M,D,W,A,N,ke,Me,V,k],encapsulation:2})}}return t})();var ur=[{path:"",redirectTo:"recurring-expense",pathMatch:"full"},{path:"recurring-expense",children:vt},{path:"asset-value",component:St},{path:"post-to-journal",loadComponent:()=>import("./chunk-ZLZ2QJQW.js").then(t=>t.PostRecurringExpenseComponent)}];export{ur as RECURRING_ROUTES};
1
+ import{a as re}from"./chunk-G4XX7EU2.js";import{a as dt,b as gt}from"./chunk-BUYRVZ5Z.js";import{a as ut}from"./chunk-K4P3JOA6.js";import{a as Ke}from"./chunk-HMO5KXY6.js";import{a as Rt,b as ot}from"./chunk-SZT2PF27.js";import"./chunk-CNXEJBY5.js";import{a as st,b as ct}from"./chunk-M5PA3FZY.js";import{a as mt}from"./chunk-XKI7WLHE.js";import"./chunk-NMSYINDE.js";import{a as et}from"./chunk-AF357XP4.js";import"./chunk-7COI2POD.js";import{a as ne,b as ie}from"./chunk-NHZLS6JU.js";import{b as at,d as Me,i as lt,j as pt,k as ke}from"./chunk-VPQDUC77.js";import{a as it,b as rt}from"./chunk-76LPTGLX.js";import"./chunk-CWHL7PNC.js";import"./chunk-VRKBMD72.js";import{a as Ne}from"./chunk-KXE3J4PK.js";import{a as ye,b as Re}from"./chunk-E3QNEH3B.js";import"./chunk-JUCJGYST.js";import{a as Pe,b as De}from"./chunk-6O5EWYT7.js";import"./chunk-I7ILLTFH.js";import"./chunk-2LQVI4EI.js";import"./chunk-SPKOXGSS.js";import"./chunk-3KYU6FI2.js";import"./chunk-IJTQE2H4.js";import{b as Q}from"./chunk-WXT6EZ2V.js";import"./chunk-AJZ7YLT4.js";import"./chunk-ATJ55H5D.js";import{f as nt,h as L}from"./chunk-OJN5WUVR.js";import"./chunk-L3PZS6EL.js";import{a as N,b as A}from"./chunk-5JV52UYK.js";import{a as T,b as Ie,c as tt,d as Te,e as we,f as Fe}from"./chunk-ACTRMWEI.js";import"./chunk-ARXP327B.js";import{n as Se,o as Ce,w as Y,x as J}from"./chunk-7FFMPB6T.js";import"./chunk-UKBDY33R.js";import{b as xe,c as K,e as X,f as _e,i as Xe,j as Ye,k as he,l as Ee,o as ve,u as Je,v as Qe,w as Ze,x as be}from"./chunk-72LNXEXV.js";import{b as de,d as ge,e as k,l as V}from"./chunk-EFDD6Q3K.js";import{a as fe}from"./chunk-Y3DV6GWE.js";import"./chunk-ZDTMCWOO.js";import"./chunk-F2X3VGZZ.js";import{h as We,k as D,p as ue,q as W,s as M}from"./chunk-SB5MSLCX.js";import{$b as y,Bb as Ge,Cc as me,Db as h,Dc as Ve,Ec as C,Ha as q,J as qe,Lb as m,Nc as S,Oc as F,Pc as U,Qb as He,Rb as G,Rc as x,Tb as H,Ub as $,Vb as r,Wb as n,Xb as d,Y as O,_ as w,bd as te,c as ee,ca as le,ec as R,fc as g,hb as l,ia as u,qa as v,ra as b,rc as a,s as z,sc as E,tc as I,ua as Ue,vc as $e,wc as pe,xa as ze,xb as P,xc as se,yc as ce}from"./chunk-6K5LNQ4J.js";import{a as f,b as _,e as yt}from"./chunk-YQFG5XE2.js";var B=(()=>{class t{#e=u(fe);#t=u(Ke);getRecurringExpenseLoader(){return this.#e.get(void 0,"api/RecurringExpenseLoader/GetList")}getRecurringExpenses(e){return this.#e.post(void 0,"api/RecurringExpense/GetList",e)}fetchRecurringExpenseForm(e){return this.#e.get(void 0,`api/RecurringExpense/form/${e??""}`)}fetchSupplierSuggestion(e){let o={count:100,prefix:e};return this.#e.post(this.#t.getTenantExternalURL(),"/API/AC/GetSupplierSuggestion",o)}fetchCustomerSuggestion(e){let o={count:100,prefix:e};return this.#e.post(this.#t.getTenantExternalURL(),"/API/AC/GetCustomerSuggestion",o)}submitRecurringExpense(e,o={}){return this.#e.post(void 0,"api/RecurringExpense/submit",e,o)}removeRecurringExpense(e){return this.#e.delete(void 0,`api/RecurringExpense/${e}`,void 0)}removeRecurringExpenses(e){let o={body:e};return this.#e.delete(void 0,"api/RecurringExpense/Batch",o)}getRecurringExpenseByID(e){return this.#e.get(void 0,`api/RecurringExpense/Info/${e}`)}getAssetValueList(){return this.#e.get(void 0,"api/AssetValue/GetListt")}static{this.\u0275fac=function(o){return new(o||t)}}static{this.\u0275prov=le({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var It={data:{data:[],count:0},meta:{Options:{Frequencies:[]},Filter:{text:null,Frequency:0,pageNumber:1,pageSize:20,export:!1,exportPageNumber:1,exportPageSize:1e4}},filter:{text:null,Frequency:0,pageNumber:1,pageSize:20,export:!1,exportPageNumber:1,exportPageSize:1e4}},Ae=Ie(Fe(It),tt(t=>({first:te(()=>(t.filter().pageNumber-1)*t.filter().pageSize+1),end:te(()=>Math.min(t.filter().pageNumber*t.filter().pageSize,t.data().count)),hasCheckedRows:te(()=>t.data().data.some(c=>c.checked)),checkedInvoice:te(()=>t.data().data.filter(c=>c.checked).map(c=>c.id))})),we(t=>{let c=u(B);return{updateFilter(o){T(t,i=>_(f({},i),{filter:f(f({},i.filter),o)}))},onRowSelect(o){T(t,i=>{let s=i.data.data.map(p=>p.id===o.id?_(f({},p),{checked:!0}):p);return _(f({},i),{data:_(f({},i.data),{data:s})})})},onRowUnselect(o){T(t,i=>{let s=i.data.data.map(p=>p.id===o.id?_(f({},p),{checked:!1}):p);return _(f({},i),{data:_(f({},i.data),{data:s})})})},onHeaderCheckboxToggle(o){T(t,i=>{let s=i.data.data.map(p=>_(f({},p),{checked:o}));return _(f({},i),{data:_(f({},i.data),{data:s})})})},getRecurringExpenseLoader:ne(ee(O(()=>c.getRecurringExpenseLoader().pipe(ie({next:o=>{T(t,i=>_(f({},i),{meta:o}))},error:o=>{console.error("Error fetching Recurring Expense Loader:",o)}}))))),getRecurringExpenses:ne(ee(z(o=>Object.entries(o).reduce((i,[s,p])=>(p!=null&&(i[s]=p),i),{})),O(o=>c.getRecurringExpenses(o).pipe(ie({next:i=>{T(t,s=>_(f({},s),{data:i}))},error:i=>{console.error("Error fetching Recurring Expenses:",i)}})))))}}),Te(t=>({onInit:()=>{t.getRecurringExpenseLoader(),t.getRecurringExpenses(t.filter)}})));var Ft=["class","page"],Pt=t=>["details/",t];function Dt(t,c){if(t&1){let e=y();r(0,"p-button",12),R("onClick",function(){v(e);let i=g(2);return b(i.onDeleteSelected())}),n()}}function Mt(t,c){if(t&1&&(r(0,"div",8),h(1,Dt,1,0,"p-button",9),r(2,"a",10),d(3,"i",11),r(4,"span"),a(5,"Add"),n()()()),t&2){let e=g();l(),m("ngIf",e.store.hasCheckedRows())}}function kt(t,c){t&1&&(r(0,"tr")(1,"th"),d(2,"p-tableHeaderCheckbox"),n(),r(3,"th"),a(4,"Outlet"),n(),r(5,"th"),a(6,"Name"),n(),r(7,"th"),a(8,"Expense Account"),n(),r(9,"th"),a(10,"Start Date"),n(),r(11,"th"),a(12,"End Date"),n(),r(13,"th"),a(14,"Last Expense"),n(),r(15,"th"),a(16,"Amount"),n(),r(17,"th"),a(18,"Frequency"),n()())}function Vt(t,c){if(t&1&&(r(0,"tr")(1,"td"),d(2,"p-tableCheckbox",14),n(),r(3,"td"),a(4),n(),r(5,"td")(6,"a",15),a(7),n()(),r(8,"td"),a(9),n(),r(10,"td"),a(11),S(12,"date"),n(),r(13,"td"),a(14),S(15,"date"),n(),r(16,"td"),a(17),S(18,"date"),n(),r(19,"td"),a(20),S(21,"number"),n(),r(22,"td"),a(23),n()()),t&2){let e=c.$implicit;l(2),m("value",e),l(2),E(e.outletName),l(2),m("routerLink",C(21,Pt,e.id)),l(),E(e.name),l(2),E(e.expenseName),l(2),E(U(12,10,e.startDate,"d MMM y")),l(3),E(U(15,13,e.endDate,"d MMM y")),l(3),E(U(18,16,e.lastExpenseDate,"d MMM y")),l(3),E(F(21,19,e.amount)),l(3),E(e.repeatTypeLabel)}}function Nt(t,c){if(t&1&&(r(0,"div"),a(1),n()),t&2){let e=g(2);l(),$e(" Showing ",e.store.first()," to ",e.store.end()," of ",e.store.data().count," entries ")}}function At(t,c){t&1&&(r(0,"tr")(1,"td",16)(2,"span"),a(3,"No recurring expenses found."),n()()())}function Lt(t,c){if(t&1){let e=y();r(0,"p-panel")(1,"p-table",13),R("onPage",function(i){v(e);let s=g();return b(s.onPageChange(i))})("onHeaderCheckboxToggle",function(i){v(e);let s=g();return b(s.onHeaderCheckboxToggle(i))})("onRowSelect",function(i){v(e);let s=g();return b(s.onRowSelect(i))})("onRowUnselect",function(i){v(e);let s=g();return b(s.onRowUnselect(i))}),h(2,kt,19,0,"ng-template",null,3,x)(4,Vt,24,23,"ng-template",null,4,x)(6,Nt,2,3,"ng-template",null,5,x)(8,At,4,0,"ng-template",null,6,x),n()()}if(t&2){let e=g();l(),m("lazy",!0)("totalRecords",e.store.data().count)("rows",e.store.filter().pageSize)("paginator",!0)("value",e.store.data().data)}}function Bt(t,c){if(t&1&&(r(0,"form",17)(1,"div",18)(2,"label",19),a(3,"Type"),n(),d(4,"p-select",20),n()()),t&2){let e=g();m("formGroup",e.form),l(4),m("options",e.store.meta().Options.Frequencies)}}var _t=(()=>{class t extends mt{constructor(){super(...arguments),this.store=u(Ae),this.recurringExpenseService=u(B),this.fb=u(Je),this.isDialogFilterVisible=q(!1)}ngOnInit(){this.initForm()}onPageChange(e){let o=e.first/e.rows;this.store.updateFilter(_(f({},this.store.filter()),{pageNumber:o+1}))}onDeleteSelected(){this.recurringExpenseService.removeRecurringExpenses(this.store.checkedInvoice()).pipe(w(()=>{this.store.updateFilter(_(f({},this.store.filter()),{pageNumber:1}))})).subscribe()}onSearchEvent(e){this.store.updateFilter(_(f({},this.store.filter()),{text:e}))}onFilterEvent(){this.onSubmitFilterDialog()}onSubmitFilterDialog(){if(this.form.invalid){this.form.markAllAsTouched();return}let e=Object.entries(this.form.getRawValue()).reduce((o,[i,s])=>(s!=null&&(o[i]=s),o),{});this.store.updateFilter(e),this.isDialogFilterVisible.update(o=>!o)}onHeaderCheckboxToggle(e){this.store.onHeaderCheckboxToggle(e.checked)}onRowSelect(e){this.store.onRowSelect(e.data)}onRowUnselect(e){if(Array.isArray(e.data)){e.data.forEach(o=>{this.store.onRowUnselect(o)});return}else this.store.onRowUnselect(e.data)}initForm(){let{text:e,Frequency:o,pageNumber:i,pageSize:s,export:p,exportPageNumber:j,exportPageSize:Ct}=this.store.filter();this.form=this.fb.group({text:this.fb.control(e),Frequency:this.fb.control(o),pageNumber:this.fb.control(i),pageSize:this.fb.control(s),export:this.fb.control(p),exportPageNumber:this.fb.control(j),exportPageSize:this.fb.control(Ct)})}static{this.\u0275fac=(()=>{let e;return function(i){return(e||(e=Ue(t)))(i||t)}})()}static{this.\u0275cmp=P({type:t,selectors:[["app-recurring-expense",8,"page"]],features:[me([Ae]),Ge],attrs:Ft,decls:7,vars:4,consts:[["actionButton",""],["content",""],["filters",""],["header",""],["body",""],["paginatorleft",""],["emptymessage",""],["pageTitle","Recurring Expenses",3,"search","isDialogFilterVisibleChange","filterConfirmed","isSearchableInput","isFilterable","isDialogFilterVisible","scrollable"],[1,"d-flex","gap-2"],["severity","danger","label","Delete","icon","fa-solid fa-trash",3,"onClick",4,"ngIf"],["routerLink","create",1,"p-button"],[1,"fa-solid","fa-plus"],["severity","danger","label","Delete","icon","fa-solid fa-trash",3,"onClick"],["dataKey","id","styleClass","d-flex flex-column justify-content-between h-100",3,"onPage","onHeaderCheckboxToggle","onRowSelect","onRowUnselect","lazy","totalRecords","rows","paginator","value"],[3,"value"],[1,"link-primary",3,"routerLink"],["colspan","9"],[1,"d-flex","flex-column",3,"formGroup"],[1,"d-flex","flex-column"],["for","outlet"],["formControlName","Frequency","appendTo","body","optionLabel","value","optionValue","key","placeholder","Select Type",3,"options"]],template:function(o,i){if(o&1){let s=y();r(0,"app-main-panel",7),R("search",function(j){return v(s),b(i.onSearchEvent(j))}),ce("isDialogFilterVisibleChange",function(j){return v(s),se(i.isDialogFilterVisible,j)||(i.isDialogFilterVisible=j),b(j)}),R("filterConfirmed",function(){return v(s),b(i.onFilterEvent())}),h(1,Mt,6,1,"ng-template",null,0,x)(3,Lt,10,5,"ng-template",null,1,x)(5,Bt,5,2,"ng-template",null,2,x),n()}o&2&&(m("isSearchableInput",!0)("isFilterable",!0),pe("isDialogFilterVisible",i.isDialogFilterVisible),m("scrollable",!0))},dependencies:[L,k,Q,ke,Me,lt,pt,M,D,W,ue,V,nt,De,Pe,J,Y,be,he,X,_e,Ee,ve,A,N],styles:["[_nghost-%COMP%]{display:block} .p-card{height:100%} .p-card .p-card-body{height:inherit} .p-card .p-card-body .p-card-content{height:inherit}"],changeDetection:0})}}return t})();var Z=yt(Rt());var qt=["class","page"],Ut=()=>["/pages/recurring/recurring-expense"],ae=t=>({"ng-dirty ng-invalid":t}),zt=()=>({});function Gt(t,c){if(t&1){let e=y();r(0,"div",5)(1,"a",6),a(2," Cancel "),n(),r(3,"p-button",7),R("click",function(){v(e);let i=g();return b(i.onSubmit())}),n()()}t&2&&(l(),m("routerLink",Ve(1,Ut)))}function Ht(t,c){if(t&1&&(r(0,"small",19),a(1),n()),t&2){let e=c.$implicit;l(),E(e)}}function $t(t,c){if(t&1&&(r(0,"div",32)(1,"div",33),a(2),n()()),t&2){let e=c.$implicit;l(2),I(" ",e.name," ")}}function Wt(t,c){if(t&1&&(r(0,"small",19),a(1),n()),t&2){let e=c.$implicit;l(),E(e)}}function Kt(t,c){if(t&1&&(r(0,"small",19),a(1),n()),t&2){let e=c.$implicit;l(),E(e)}}function Xt(t,c){if(t&1&&(r(0,"div",5)(1,"div")(2,"span"),a(3),n()(),r(4,"div",33),a(5),n()()),t&2){let e=c.$implicit;l(3),I("(",e.code,")"),l(2),I(" ",e.value," ")}}function Yt(t,c){if(t&1&&(r(0,"small",19),a(1),n()),t&2){let e=c.$implicit;l(),E(e)}}function Jt(t,c){if(t&1&&(r(0,"div",5)(1,"div")(2,"span"),a(3),n()(),r(4,"div",33),a(5),n()()),t&2){let e=c.$implicit;l(3),I("(",e.code,")"),l(2),I(" ",e.value," ")}}function Qt(t,c){if(t&1&&(r(0,"small",19),a(1),n()),t&2){let e=c.$implicit;l(),E(e)}}function Zt(t,c){if(t&1){let e=y();r(0,"div",9)(1,"div",10)(2,"p-panel",11)(3,"p-scroll-panel")(4,"div",12)(5,"div",13)(6,"form",14)(7,"div",15)(8,"div",13)(9,"div",16)(10,"label",17),a(11,"Name"),n(),d(12,"input",18),r(13,"div"),H(14,Ht,2,1,"small",19,G),n()()(),r(16,"div",20,2)(18,"div",16)(19,"label",17),a(20,"Outlet"),n(),r(21,"p-select",21),h(22,$t,3,1,"ng-template",null,3,x),n()()(),r(24,"div",20)(25,"div",16)(26,"div")(27,"label",17),a(28,"Supplier"),n(),r(29,"p-autocomplete",22),R("completeMethod",function(i){v(e);let s=g(2);return b(s.searchContact(i))}),n()(),r(30,"div"),H(31,Wt,2,1,"small",19,G),n()()(),r(33,"div",20)(34,"div",16)(35,"label",17),a(36,"From"),n(),d(37,"p-datepicker",23),n()(),r(38,"div",20)(39,"div",16)(40,"label",17),a(41,"To"),n(),d(42,"p-datepicker",24),n()(),d(43,"div",25),n(),d(44,"hr"),r(45,"div",15)(46,"div",20)(47,"div",16)(48,"label",17),a(49,"Amount"),n(),d(50,"input",26),r(51,"div"),H(52,Kt,2,1,"small",19,G),n()()(),r(54,"div",20)(55,"div",16)(56,"label",17),a(57,"Frequency"),n(),d(58,"p-select",27),n()(),r(59,"div",20)(60,"div",16)(61,"label",17),a(62,"Expense (Debit)"),n(),r(63,"p-select",28),h(64,Xt,6,2,"ng-template",null,3,x),n()(),r(66,"div"),H(67,Yt,2,1,"small",19,G),n()(),r(69,"div",20)(70,"div",16)(71,"label",17),a(72,"Payment (Credit)"),n(),r(73,"p-select",29),h(74,Jt,6,2,"ng-template",null,3,x),n()(),r(76,"div"),H(77,Qt,2,1,"small",19,G),n()(),r(79,"div",30)(80,"div",16)(81,"label",17),a(82,"Description"),n(),d(83,"textarea",31),n()()()()()()()()()()}if(t&2){let e,o,i,s,p=g(2);l(6),m("formGroup",p.recurringExpenseForm),l(6),m("ngClass",C(17,ae,p.isInvalid("name"))),l(2),$(p.getErrors("name")),l(7),m("options",(e=p.recurringExpenseData())==null||e.options==null?null:e.options.entities),l(8),m("showClear",!0)("ngClass",C(19,ae,p.isInvalid("contact")))("suggestions",p.customerSupplierSuggestions()),l(2),$(p.getErrors("contact")),l(6),m("iconDisplay","input")("showIcon",!0),l(5),m("iconDisplay","input")("showIcon",!0),l(8),m("ngClass",C(21,ae,p.isInvalid("amount")))("autoNumeric",Ve(23,zt)),l(2),$(p.getErrors("amount")),l(6),m("options",(o=p.recurringExpenseData())==null||o.options==null?null:o.options.frequency),l(5),m("options",(i=p.recurringExpenseData())==null||i.options==null?null:i.options.expenses)("ngClass",C(24,ae,p.isInvalid("expenseAccountID"))),l(4),$(p.getErrors("expenseAccountID")),l(6),m("ngClass",C(26,ae,p.isInvalid("paymentAccountID")))("options",(s=p.recurringExpenseData())==null||s.options==null?null:s.options.assets),l(4),$(p.getErrors("paymentAccountID"))}}function en(t,c){if(t&1&&h(0,Zt,84,28,"div",8),t&2){let e=g();m("ngIf",e.recurringExpenseData())}}var je=(()=>{class t{constructor(){this.recurringExpenseService=u(B),this.fb=u(Qe),this.destroyRef=u(ze),this.route=u(de),this.recurringExpenseData=q(null),this.customerSupplierSuggestions=q([]),this.router=u(ge),this.contactType=new Xe(0),this.dayjsService=u(ot)}ngOnInit(){this.initializeForm(),this.fetchRecurringExpenseForm()}initializeForm(){this.recurringExpenseForm=this.fb.group({id:this.fb.control(""),name:this.fb.control("",[K.required]),repeatTypeID:this.fb.control(1,[K.required]),startDate:this.fb.control((0,Z.default)().toISOString()),endDate:this.fb.control(null),lastExpenseDate:this.fb.control(""),amount:this.fb.control(0,[K.required]),paymentAccountID:this.fb.control(null,[K.required]),expenseAccountID:this.fb.control(null,[K.required]),contact:this.fb.control("",[]),description:this.fb.control(""),repeatTypeLabel:this.fb.control(""),outletID:this.fb.control(""),creatorID:this.fb.control(""),created:this.fb.control(""),modifierID:this.fb.control(""),modified:this.fb.control("")})}fetchRecurringExpenseForm(){this.route.paramMap.pipe(z(e=>e.get("id")),O(e=>e?this.recurringExpenseService.fetchRecurringExpenseForm(e):this.recurringExpenseService.fetchRecurringExpenseForm()),w(e=>{this.recurringExpenseData.set(e),this.updateFormWithRecurringExpense(e.form)})).subscribe()}updateFormWithRecurringExpense(e){let o=Object.entries(e).reduce((i,[s,p])=>{switch(s){case"startDate":i[s]=(0,Z.default)(p).isSame((0,Z.default)("0001-01-01T00:00:00"))?(0,Z.default)().toDate():(0,Z.default)(p).toDate();break;case"repeatTypeID":i[s]=1;break;case"contactID":i.contact=e.contactID?{Key:e.contactID,Value:e.contactName}:null;break;case"paymentAccountID":i[s]=p===re?null:p;break;case"expenseAccountID":i[s]=p===re?null:p;break;default:i[s]=p}return i},{});this.recurringExpenseForm.patchValue(o)}searchContact(e){this.recurringExpenseService.fetchSupplierSuggestion(e.query).pipe(w(this.customerSupplierSuggestions.set)).subscribe()}onSubmit(){let e=this.recurringExpenseForm.value;if(this.recurringExpenseForm.invalid){this.recurringExpenseForm.markAllAsTouched();return}let o=Object.entries(e).reduce((i,[s,p])=>{switch(s){case"amount":i[s]=+p;break;case"startDate":i[s]=p?this.dayjsService.from(p).format():null;break;case"endDate":i[s]=p?this.dayjsService.from(p).format():null;break;case"contact":typeof p=="string"?i.contactID=p:typeof p=="object"&&p!==null?i.contactID=p&&Object.prototype.hasOwnProperty.call(p,"Key")?p.Key:p:i.contactID=re;break;default:i[s]=p;break}return i},{});this.recurringExpenseService.submitRecurringExpense(o).pipe(w(()=>{this.router.navigate(["/pages/recurring/recurring-expense"])})).subscribe()}isInvalid(e){let o=this.recurringExpenseForm.controls[e];return o.invalid&&(o.dirty||o.touched)}getErrors(e){if(!this.isInvalid(e))return null;let o=this.recurringExpenseForm.controls[e];if(!o.errors)return null;let i=[];for(let[s,p]of Object.entries(o.errors))switch(s){case"required":i.push("This field is required.");break;case"minlength":i.push(`Minimum length is ${p.requiredLength} characters.`);break;case"maxlength":i.push(`Maximum length is ${p.requiredLength} characters.`);break;case"email":i.push("Please enter a valid email address.");break;case"pattern":i.push("The format is invalid.");break;case"min":i.push(`Minimum value is ${p.min}.`);break;case"max":i.push(`Maximum value is ${p.max}.`);break;default:i.push("Invalid value.")}return i}static{this.\u0275fac=function(o){return new(o||t)}}static{this.\u0275cmp=P({type:t,selectors:[["app-recurring-expense-form",8,"page"]],attrs:qt,decls:5,vars:2,consts:[["actionButton",""],["content",""],["outlet",""],["item",""],["pageTitle","Recurring Expense Form",3,"hasMainWrapperPadding","overflowScroll"],[1,"d-flex","gap-2"],["type","button",1,"p-button","p-button-secondary","p-button-outlined",3,"routerLink"],["label","Submit","icon","fa-solid fa-plus",3,"click"],["class","row justify-content-center",4,"ngIf"],[1,"row","justify-content-center"],[1,"col-6"],[1,"h-100","d-flex"],[1,"row","justify-content-center","h-100"],[1,"col-12"],[1,"d-flex","flex-column","row-gap-2",3,"formGroup"],[1,"row","row-gap-2"],[1,"d-flex","flex-column"],["for",""],["formControlName","name","type","text","pInputText","",3,"ngClass"],[1,"text-danger"],[1,"col","col-lg-6"],["filter","","filterBy","name","appendTo","body","formControlName","outletID","optionLabel","name","optionValue","id","placeholder","Select Outlet",3,"options"],["formControlName","contact","inputStyleClass","w-100","styleClass","w-100","optionLabel","Value","optionValue","Key",3,"completeMethod","showClear","ngClass","suggestions"],["dateFormat","mm/dd/yy","appendTo","body","formControlName","startDate","styleClass","w-100","inputId","icondisplay",3,"iconDisplay","showIcon"],["appendTo","body","formControlName","endDate","styleClass","w-100","inputId","icondisplay",3,"iconDisplay","showIcon"],[1,"col"],["formControlName","amount","type","text","pInputText","",3,"ngClass","autoNumeric"],["appendTo","body","formControlName","repeatTypeID","optionLabel","value","optionValue","key","placeholder","Select Outlet",3,"options"],["appendTo","body","formControlName","expenseAccountID","optionLabel","value","optionValue","key","placeholder","Select Expense","filter","","filterBy","code,value",3,"options","ngClass"],["appendTo","body","formControlName","paymentAccountID","optionLabel","value","optionValue","key","filter","","filterBy","code,value","placeholder","Select Payment",3,"ngClass","options"],[1,"col","col-lg-12"],["formControlName","description","rows","3","cols","30","pTextarea",""],[1,"flex","items-center","gap-2"],[1,"text-truncate","d-inline-block",2,"max-width","250px"]],template:function(o,i){o&1&&(r(0,"app-main-panel",4),h(1,Gt,4,2,"ng-template",null,0,x)(3,en,1,1,"ng-template",null,1,x),n()),o&2&&m("hasMainWrapperPadding",!0)("overflowScroll",!0)},dependencies:[L,Q,Ce,Se,De,Pe,rt,it,gt,dt,ct,st,Re,ye,M,We,D,be,he,xe,X,_e,Ee,ve,V,k,J,Y,ut,A,N,at],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var tn=["class","page"],nn=t=>["/pages/recurring/recurring-expense/edit",t];function rn(t,c){if(t&1&&(r(0,"a",7),d(1,"i",8),r(2,"span"),a(3,"Edit"),n()()),t&2){let e=g(4);m("routerLink",C(1,nn,e.currentRecurringExpense().id))}}function on(t,c){if(t&1){let e=y();r(0,"p-button",9),R("onClick",function(){v(e);let i=g(4);return b(i.onDeleteRecurringExpense(i.currentRecurringExpense().id))}),n()}}function an(t,c){if(t&1&&(r(0,"div",4),h(1,rn,4,3,"a",5)(2,on,1,0,"p-button",6),n()),t&2){let e=g(3);l(),m("ngIf",e.roleService.setup().recurring),l(),m("ngIf",e.roleService.setup().recurring)}}function ln(t,c){if(t&1&&h(0,an,3,2,"div",3),t&2){let e=g(2);m("ngIf",e.currentRecurringExpense())}}function pn(t,c){if(t&1){let e=y();r(0,"p-panel",13)(1,"p-scroll-panel")(2,"div",10)(3,"div",14)(4,"div",15)(5,"div",14)(6,"div",16)(7,"div",17)(8,"div",18)(9,"label",19),a(10,"Outlet"),n(),r(11,"input",20),ce("ngModelChange",function(i){v(e);let s=g(3);return se(s.currentRecurringExpense().outletName,i)||(s.currentRecurringExpense().outletName=i),b(i)}),n()()(),r(12,"div",17)(13,"div",18)(14,"label",19),a(15,"Supplier"),n(),d(16,"input",21),n()(),r(17,"div",17)(18,"div",18)(19,"label",19),a(20,"From"),n(),d(21,"input",22),S(22,"date"),n()(),r(23,"div",17)(24,"div",18)(25,"label",19),a(26,"To"),n(),d(27,"input",22),S(28,"date"),n()()(),d(29,"hr"),r(30,"div",16)(31,"div",17)(32,"div",18)(33,"label",19),a(34,"Amount"),n(),d(35,"input",22),S(36,"number"),n()(),r(37,"div",17)(38,"div",18)(39,"label",19),a(40,"Frequency"),n(),d(41,"input",22),n()(),r(42,"div",17)(43,"div",18)(44,"label",19),a(45,"Expense (Debit)"),n(),d(46,"input",22),n()(),r(47,"div",17)(48,"div",18)(49,"label",19),a(50,"Payment (Credit)"),n(),d(51,"input",22),n()(),r(52,"div",23)(53,"div",18)(54,"label",19),a(55,"Description"),n(),d(56,"textarea",24),n()()()()()()()()()}if(t&2){let e=g(3);l(11),pe("ngModel",e.currentRecurringExpense().outletName),l(5),m("value",e.currentRecurringExpense().contactName),l(5),m("value",U(22,9,e.currentRecurringExpense().startDate,"d MMM y")),l(6),m("value",U(28,12,e.currentRecurringExpense().endDate,"d MMM y")),l(8),m("value",F(36,15,e.currentRecurringExpense().amount)),l(6),m("value",e.currentRecurringExpense().repeatTypeLabel),l(5),m("value",e.currentRecurringExpense().expenseName),l(5),m("value",e.currentRecurringExpense().paymentName),l(5),m("value",e.currentRecurringExpense().description)}}function sn(t,c){if(t&1&&(r(0,"div",10)(1,"div",11),h(2,pn,57,17,"p-panel",12),n()()),t&2){let e=g(2);l(2),m("ngIf",e.currentRecurringExpense())}}function cn(t,c){if(t&1&&(r(0,"app-main-panel",2),h(1,ln,1,1,"ng-template",null,0,x)(3,sn,3,1,"ng-template",null,1,x),n()),t&2){let e=g();m("pageTitle",e.currentRecurringExpense().name+" Info")("hasMainWrapperPadding",!0)("overflowScroll",!0)}}var Et=(()=>{class t{constructor(){this.recurringExpenseService=u(B),this.route=u(de),this.router=u(ge),this.currentRecurringExpense=q(null),this.roleService=u(et)}ngOnInit(){this.route.paramMap.pipe(z(e=>e.get("id")),Ne("params"),qe(e=>this.recurringExpenseService.getRecurringExpenseByID(e)),w(e=>this.currentRecurringExpense.set(e)),Ne("recurringExpense")).subscribe()}onDeleteRecurringExpense(e){this.recurringExpenseService.removeRecurringExpense(e).pipe(w(()=>{this.router.navigate(["/pages/recurring/recurring-expense"])})).subscribe()}static{this.\u0275fac=function(o){return new(o||t)}}static{this.\u0275cmp=P({type:t,selectors:[["app-recurring-expense-info",8,"page"]],attrs:tn,decls:1,vars:1,consts:[["actionButton",""],["content",""],[3,"pageTitle","hasMainWrapperPadding","overflowScroll"],["class","d-flex gap-2",4,"ngIf"],[1,"d-flex","gap-2"],["class","p-button p-button-outlined p-button-secondary d-flex gap-2 align-items-center",3,"routerLink",4,"ngIf"],["icon","fa-solid fa-trash","label","Delete","severity","danger",3,"onClick",4,"ngIf"],[1,"p-button","p-button-outlined","p-button-secondary","d-flex","gap-2","align-items-center",3,"routerLink"],[1,"fa-solid","fa-pen-to-square"],["icon","fa-solid fa-trash","label","Delete","severity","danger",3,"onClick"],[1,"row","justify-content-center"],[1,"col-6"],["class","h-100 d-flex",4,"ngIf"],[1,"h-100","d-flex"],[1,"col"],[1,"row"],[1,"row","row-gap-2"],[1,"col","col-lg-6"],[1,"d-flex","flex-column"],["for",""],["readonly","","type","text","pInputText","",3,"ngModelChange","ngModel"],["type","text","readonly","","pInputText","",3,"value"],["readonly","","type","text","pInputText","",3,"value"],[1,"col","col-lg-12"],["readonly","","rows","5","cols","30","pTextarea","",3,"value"]],template:function(o,i){o&1&&h(0,cn,5,3,"app-main-panel",2),o&2&&He(i.currentRecurringExpense()?0:-1)},dependencies:[L,Q,M,D,W,ue,Ce,Se,Ze,xe,X,Ye,J,Y,V,k,A,N,Re,ye],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var vt=[{path:"",redirectTo:"",pathMatch:"full"},{path:"",children:[{path:"",component:_t},{path:"create",component:je},{path:"details/:id",component:Et},{path:"edit/:id",component:je}]}];var bt=(()=>{class t{constructor(){this.httpService=u(fe)}getAssetValue(e){return this.httpService.post(void 0,"/api/AssetValue/GetList",e)}static{this.\u0275fac=function(o){return new(o||t)}}static{this.\u0275prov=le({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var mn={filter:{Text:"",Frequency:0,PageNumber:1,PageSize:10},data:null},Oe=Ie(Fe(mn),we(t=>{let c=u(bt);return{getAssetValue:ne(ee(O(o=>c.getAssetValue(o).pipe(ie({next:i=>{T(t,s=>_(f({},s),{data:i}))},error:i=>{console.error("Error fetching asset value:",i)}}))))),updateFilter:o=>{T(t,i=>_(f({},i),{filter:o}))}}}),Te({onInit:t=>{t.getAssetValue(t.filter())}}));var un=t=>["/pages/recurring/recurring-expense/details/",t];function dn(t,c){t&1&&d(0,"div",5)}function gn(t,c){t&1&&(r(0,"tr")(1,"th"),a(2,"Outlet"),n(),r(3,"th"),a(4,"Name"),n(),r(5,"th"),a(6,"Account Code"),n(),r(7,"th",8),a(8,"Price on Purchase"),n(),r(9,"th",8),a(10,"Accomulated Depreciation"),n(),r(11,"th",8),a(12,"Book Value"),n(),r(13,"th",8),a(14,"Frequency"),n()())}function fn(t,c){if(t&1&&(r(0,"tr")(1,"td"),a(2),n(),r(3,"td")(4,"a",9),a(5),n()(),r(6,"td"),a(7),n(),r(8,"td",8),a(9),S(10,"number"),n(),r(11,"td",8),a(12),S(13,"number"),n(),r(14,"td",8),a(15),S(16,"number"),n(),r(17,"td",8),a(18),S(19,"number"),n()()),t&2){let e=c.$implicit;l(2),E(e.entityName),l(2),m("routerLink",C(16,un,e.id)),l(),E(e.name),l(2),E(e.accountCode),l(2),E(F(10,8,e.priceOnPurchase)),l(3),I(" ",F(13,10,e.accumulatedDepreciation)," "),l(3),I(" ",F(16,12,e.bookValue)," "),l(3),I(" ",F(19,14,e.depreciationPerYear)," ")}}function xn(t,c){if(t&1&&(r(0,"p-panel")(1,"p-table",7),h(2,gn,15,0,"ng-template",null,2,x)(4,fn,20,18,"ng-template",null,3,x),n()()),t&2){let e=g(2);l(),m("value",e.store.data().data)("rows",e.store.filter().PageSize)("totalRecords",e.store.data().count)}}function _n(t,c){if(t&1&&h(0,xn,6,3,"p-panel",6),t&2){let e=g();m("ngIf",e.store.data())}}var St=(()=>{class t{constructor(){this.store=u(Oe)}static{this.\u0275fac=function(o){return new(o||t)}}static{this.\u0275cmp=P({type:t,selectors:[["app-asset-value"]],features:[me([Oe])],decls:5,vars:2,consts:[["actionButton",""],["content",""],["header",""],["body",""],["pageTitle","Asset Value",3,"isSearchableInput","scrollable"],[1,"d-flex","gap-2"],[4,"ngIf"],["styleClass","h-100","dataKey","id",1,"",3,"value","rows","totalRecords"],[1,"text-end"],["target","_blank",1,"link","link-primary",3,"routerLink"]],template:function(o,i){o&1&&(r(0,"app-main-panel",4),h(1,dn,1,0,"ng-template",null,0,x)(3,_n,1,1,"ng-template",null,1,x),n()),o&2&&m("isSearchableInput",!0)("scrollable",!0)},dependencies:[L,M,D,W,A,N,ke,Me,V,k],encapsulation:2})}}return t})();var ur=[{path:"",redirectTo:"recurring-expense",pathMatch:"full"},{path:"recurring-expense",children:vt},{path:"asset-value",component:St},{path:"post-to-journal",loadComponent:()=>import("./chunk-7LLABIQW.js").then(t=>t.PostRecurringExpenseComponent)}];export{ur as RECURRING_ROUTES};
@@ -1,4 +1,4 @@
1
- import{a as Ft,h as U,i as Pt}from"./chunk-H6HNANYB.js";import{Da as Vt,La as Lt,Ma as K,Q as Et,Ua as Ot,V as R,ca as D,ea as et,ia as xt}from"./chunk-OIBDX2CA.js";import{h as St,j as It,k as vt,l as Tt,m as zt,s as bt,t as tt}from"./chunk-VZ5CMS5O.js";import{$b as ut,Aa as J,Ba as ht,Bb as B,Cc as yt,Db as w,Dc as wt,Ec as A,Fc as N,Gc as Ct,Kb as T,Lb as m,Mb as mt,Ob as pt,Pb as Q,Rc as j,Vb as z,Wb as b,Xb as E,Yb as x,Zb as V,_b as W,ca as nt,da as st,ec as _t,fc as y,gc as gt,hb as _,hc as ft,ia as ot,kc as k,lc as Y,mc as L,nb as ct,nc as O,pa as lt,qa as rt,qc as $,ra as at,sa as G,ua as M,xb as H,yb as dt}from"./chunk-NMCKMUY4.js";import{a as Z,b as X}from"./chunk-YQFG5XE2.js";var ge=(()=>{class i extends U{static \u0275fac=(()=>{let t;return function(n){return(t||(t=M(i)))(n||i)}})();static \u0275cmp=H({type:i,selectors:[["BlankIcon"]],features:[B],decls:2,vars:0,consts:[["width","14","height","14","viewBox","0 0 14 14","fill","none","xmlns","http://www.w3.org/2000/svg"],["width","1","height","1","fill","currentColor","fill-opacity","0"]],template:function(e,n){e&1&&(G(),z(0,"svg",0),E(1,"rect",1),b())},encapsulation:2})}return i})();var Ce=(()=>{class i extends U{pathId;ngOnInit(){this.pathId="url(#"+Vt()+")"}static \u0275fac=(()=>{let t;return function(n){return(t||(t=M(i)))(n||i)}})();static \u0275cmp=H({type:i,selectors:[["SearchIcon"]],features:[B],decls:6,vars:7,consts:[["width","14","height","14","viewBox","0 0 14 14","fill","none","xmlns","http://www.w3.org/2000/svg"],["fill-rule","evenodd","clip-rule","evenodd","d","M2.67602 11.0265C3.6661 11.688 4.83011 12.0411 6.02086 12.0411C6.81149 12.0411 7.59438 11.8854 8.32483 11.5828C8.87005 11.357 9.37808 11.0526 9.83317 10.6803L12.9769 13.8241C13.0323 13.8801 13.0983 13.9245 13.171 13.9548C13.2438 13.985 13.3219 14.0003 13.4007 14C13.4795 14.0003 13.5575 13.985 13.6303 13.9548C13.7031 13.9245 13.7691 13.8801 13.8244 13.8241C13.9367 13.7116 13.9998 13.5592 13.9998 13.4003C13.9998 13.2414 13.9367 13.089 13.8244 12.9765L10.6807 9.8328C11.053 9.37773 11.3573 8.86972 11.5831 8.32452C11.8857 7.59408 12.0414 6.81119 12.0414 6.02056C12.0414 4.8298 11.6883 3.66579 11.0268 2.67572C10.3652 1.68564 9.42494 0.913972 8.32483 0.45829C7.22472 0.00260857 6.01418 -0.116618 4.84631 0.115686C3.67844 0.34799 2.60568 0.921393 1.76369 1.76338C0.921698 2.60537 0.348296 3.67813 0.115991 4.84601C-0.116313 6.01388 0.00291375 7.22441 0.458595 8.32452C0.914277 9.42464 1.68595 10.3649 2.67602 11.0265ZM3.35565 2.0158C4.14456 1.48867 5.07206 1.20731 6.02086 1.20731C7.29317 1.20731 8.51338 1.71274 9.41304 2.6124C10.3127 3.51206 10.8181 4.73226 10.8181 6.00457C10.8181 6.95337 10.5368 7.88088 10.0096 8.66978C9.48251 9.45868 8.73328 10.0736 7.85669 10.4367C6.98011 10.7997 6.01554 10.8947 5.08496 10.7096C4.15439 10.5245 3.2996 10.0676 2.62869 9.39674C1.95778 8.72583 1.50089 7.87104 1.31579 6.94046C1.13068 6.00989 1.22568 5.04532 1.58878 4.16874C1.95187 3.29215 2.56675 2.54292 3.35565 2.0158Z","fill","currentColor"],[3,"id"],["width","14","height","14","fill","white"]],template:function(e,n){e&1&&(G(),z(0,"svg",0)(1,"g"),E(2,"path",1),b(),z(3,"defs")(4,"clipPath",2),E(5,"rect",3),b()()()),e&2&&(Q(n.getClassNames()),T("aria-label",n.ariaLabel)("aria-hidden",n.ariaHidden)("role",n.role),_(),T("clip-path",n.pathId),_(3),m("id",n.pathId))},encapsulation:2})}return i})();var Dt=["content"],Bt=["item"],Wt=["loader"],kt=["loadericon"],At=["element"],Qt=["*"],$t=(i,h,t)=>({"p-virtualscroller":!0,"p-virtualscroller-inline":i,"p-virtualscroller-both p-both-scroll":h,"p-virtualscroller-horizontal p-horizontal-scroll":t}),it=(i,h)=>({$implicit:i,options:h}),Nt=i=>({"p-virtualscroller-content":!0,"p-virtualscroller-loading ":i}),jt=i=>({"p-virtualscroller-loader-mask":i}),qt=i=>({numCols:i}),Ht=i=>({options:i}),Zt=()=>({styleClass:"p-virtualscroller-loading-icon"}),Gt=(i,h)=>({rows:i,columns:h});function Jt(i,h){i&1&&W(0)}function Kt(i,h){if(i&1&&(x(0),w(1,Jt,1,0,"ng-container",10),V()),i&2){let t=y(2);_(),m("ngTemplateOutlet",t.contentTemplate||t._contentTemplate)("ngTemplateOutletContext",N(2,it,t.loadedItems,t.getContentOptions()))}}function Ut(i,h){i&1&&W(0)}function Xt(i,h){if(i&1&&(x(0),w(1,Ut,1,0,"ng-container",10),V()),i&2){let t=h.$implicit,e=h.index,n=y(3);_(),m("ngTemplateOutlet",n.itemTemplate||n._itemTemplate)("ngTemplateOutletContext",N(2,it,t,n.getOptions(e)))}}function Yt(i,h){if(i&1&&(z(0,"div",11,3),w(2,Xt,2,5,"ng-container",12),b()),i&2){let t=y(2);pt(t.contentStyle),Q(t.contentStyleClass),m("ngClass",A(8,Nt,t.d_loading)),T("data-pc-section","content"),_(2),m("ngForOf",t.loadedItems)("ngForTrackBy",t._trackBy)}}function te(i,h){if(i&1&&E(0,"div",13),i&2){let t=y(2);m("ngStyle",t.spacerStyle),T("data-pc-section","spacer")}}function ee(i,h){i&1&&W(0)}function ie(i,h){if(i&1&&(x(0),w(1,ee,1,0,"ng-container",10),V()),i&2){let t=h.index,e=y(4);_(),m("ngTemplateOutlet",e.loaderTemplate||e._loaderTemplate)("ngTemplateOutletContext",A(4,Ht,e.getLoaderOptions(t,e.both&&A(2,qt,e.numItemsInViewport.cols))))}}function ne(i,h){if(i&1&&(x(0),w(1,ie,2,6,"ng-container",15),V()),i&2){let t=y(3);_(),m("ngForOf",t.loaderArr)}}function se(i,h){i&1&&W(0)}function oe(i,h){if(i&1&&(x(0),w(1,se,1,0,"ng-container",10),V()),i&2){let t=y(4);_(),m("ngTemplateOutlet",t.loaderIconTemplate||t._loaderIconTemplate)("ngTemplateOutletContext",A(3,Ht,wt(2,Zt)))}}function le(i,h){i&1&&E(0,"SpinnerIcon",16),i&2&&(m("styleClass","p-virtualscroller-loading-icon pi-spin"),T("data-pc-section","loadingIcon"))}function re(i,h){if(i&1&&w(0,oe,2,5,"ng-container",6)(1,le,1,2,"ng-template",null,5,j),i&2){let t=$(2),e=y(3);m("ngIf",e.loaderIconTemplate||e._loaderIconTemplate)("ngIfElse",t)}}function ae(i,h){if(i&1&&(z(0,"div",14),w(1,ne,2,1,"ng-container",6)(2,re,3,2,"ng-template",null,4,j),b()),i&2){let t=$(3),e=y(2);m("ngClass",A(4,jt,!e.loaderTemplate)),T("data-pc-section","loader"),_(),m("ngIf",e.loaderTemplate||e._loaderTemplate)("ngIfElse",t)}}function he(i,h){if(i&1){let t=ut();x(0),z(1,"div",7,1),_t("scroll",function(n){rt(t);let s=y();return at(s.onContainerScroll(n))}),w(3,Kt,2,5,"ng-container",6)(4,Yt,3,10,"ng-template",null,2,j)(6,te,1,2,"div",8)(7,ae,4,6,"div",9),b(),V()}if(i&2){let t=$(5),e=y();_(),Q(e._styleClass),m("ngStyle",e._style)("ngClass",Ct(12,$t,e.inline,e.both,e.horizontal)),T("id",e._id)("tabindex",e.tabindex)("data-pc-name","scroller")("data-pc-section","root"),_(2),m("ngIf",e.contentTemplate||e._contentTemplate)("ngIfElse",t),_(3),m("ngIf",e._showSpacer),_(),m("ngIf",!e.loaderDisabled&&e._showLoader&&e.d_loading)}}function ce(i,h){i&1&&W(0)}function de(i,h){if(i&1&&(x(0),w(1,ce,1,0,"ng-container",10),V()),i&2){let t=y(2);_(),m("ngTemplateOutlet",t.contentTemplate||t._contentTemplate)("ngTemplateOutletContext",N(5,it,t.items,N(2,Gt,t._items,t.loadedColumns)))}}function me(i,h){if(i&1&&(ft(0),w(1,de,2,8,"ng-container",17)),i&2){let t=y();_(),m("ngIf",t.contentTemplate||t._contentTemplate)}}var pe=({dt:i})=>`
1
+ import{a as Ft,h as U,i as Pt}from"./chunk-7FFMPB6T.js";import{Da as Vt,La as Lt,Ma as K,Q as Et,Ua as Ot,V as R,ca as D,ea as et,ia as xt}from"./chunk-72LNXEXV.js";import{h as St,j as It,k as vt,l as Tt,m as zt,s as bt,t as tt}from"./chunk-SB5MSLCX.js";import{$b as ut,Aa as J,Ba as ht,Bb as B,Cc as yt,Db as w,Dc as wt,Ec as A,Fc as N,Gc as Ct,Kb as T,Lb as m,Mb as mt,Ob as pt,Pb as Q,Rc as j,Vb as z,Wb as b,Xb as E,Yb as x,Zb as V,_b as W,ca as nt,da as st,ec as _t,fc as y,gc as gt,hb as _,hc as ft,ia as ot,kc as k,lc as Y,mc as L,nb as ct,nc as O,pa as lt,qa as rt,qc as $,ra as at,sa as G,ua as M,xb as H,yb as dt}from"./chunk-6K5LNQ4J.js";import{a as Z,b as X}from"./chunk-YQFG5XE2.js";var ge=(()=>{class i extends U{static \u0275fac=(()=>{let t;return function(n){return(t||(t=M(i)))(n||i)}})();static \u0275cmp=H({type:i,selectors:[["BlankIcon"]],features:[B],decls:2,vars:0,consts:[["width","14","height","14","viewBox","0 0 14 14","fill","none","xmlns","http://www.w3.org/2000/svg"],["width","1","height","1","fill","currentColor","fill-opacity","0"]],template:function(e,n){e&1&&(G(),z(0,"svg",0),E(1,"rect",1),b())},encapsulation:2})}return i})();var Ce=(()=>{class i extends U{pathId;ngOnInit(){this.pathId="url(#"+Vt()+")"}static \u0275fac=(()=>{let t;return function(n){return(t||(t=M(i)))(n||i)}})();static \u0275cmp=H({type:i,selectors:[["SearchIcon"]],features:[B],decls:6,vars:7,consts:[["width","14","height","14","viewBox","0 0 14 14","fill","none","xmlns","http://www.w3.org/2000/svg"],["fill-rule","evenodd","clip-rule","evenodd","d","M2.67602 11.0265C3.6661 11.688 4.83011 12.0411 6.02086 12.0411C6.81149 12.0411 7.59438 11.8854 8.32483 11.5828C8.87005 11.357 9.37808 11.0526 9.83317 10.6803L12.9769 13.8241C13.0323 13.8801 13.0983 13.9245 13.171 13.9548C13.2438 13.985 13.3219 14.0003 13.4007 14C13.4795 14.0003 13.5575 13.985 13.6303 13.9548C13.7031 13.9245 13.7691 13.8801 13.8244 13.8241C13.9367 13.7116 13.9998 13.5592 13.9998 13.4003C13.9998 13.2414 13.9367 13.089 13.8244 12.9765L10.6807 9.8328C11.053 9.37773 11.3573 8.86972 11.5831 8.32452C11.8857 7.59408 12.0414 6.81119 12.0414 6.02056C12.0414 4.8298 11.6883 3.66579 11.0268 2.67572C10.3652 1.68564 9.42494 0.913972 8.32483 0.45829C7.22472 0.00260857 6.01418 -0.116618 4.84631 0.115686C3.67844 0.34799 2.60568 0.921393 1.76369 1.76338C0.921698 2.60537 0.348296 3.67813 0.115991 4.84601C-0.116313 6.01388 0.00291375 7.22441 0.458595 8.32452C0.914277 9.42464 1.68595 10.3649 2.67602 11.0265ZM3.35565 2.0158C4.14456 1.48867 5.07206 1.20731 6.02086 1.20731C7.29317 1.20731 8.51338 1.71274 9.41304 2.6124C10.3127 3.51206 10.8181 4.73226 10.8181 6.00457C10.8181 6.95337 10.5368 7.88088 10.0096 8.66978C9.48251 9.45868 8.73328 10.0736 7.85669 10.4367C6.98011 10.7997 6.01554 10.8947 5.08496 10.7096C4.15439 10.5245 3.2996 10.0676 2.62869 9.39674C1.95778 8.72583 1.50089 7.87104 1.31579 6.94046C1.13068 6.00989 1.22568 5.04532 1.58878 4.16874C1.95187 3.29215 2.56675 2.54292 3.35565 2.0158Z","fill","currentColor"],[3,"id"],["width","14","height","14","fill","white"]],template:function(e,n){e&1&&(G(),z(0,"svg",0)(1,"g"),E(2,"path",1),b(),z(3,"defs")(4,"clipPath",2),E(5,"rect",3),b()()()),e&2&&(Q(n.getClassNames()),T("aria-label",n.ariaLabel)("aria-hidden",n.ariaHidden)("role",n.role),_(),T("clip-path",n.pathId),_(3),m("id",n.pathId))},encapsulation:2})}return i})();var Dt=["content"],Bt=["item"],Wt=["loader"],kt=["loadericon"],At=["element"],Qt=["*"],$t=(i,h,t)=>({"p-virtualscroller":!0,"p-virtualscroller-inline":i,"p-virtualscroller-both p-both-scroll":h,"p-virtualscroller-horizontal p-horizontal-scroll":t}),it=(i,h)=>({$implicit:i,options:h}),Nt=i=>({"p-virtualscroller-content":!0,"p-virtualscroller-loading ":i}),jt=i=>({"p-virtualscroller-loader-mask":i}),qt=i=>({numCols:i}),Ht=i=>({options:i}),Zt=()=>({styleClass:"p-virtualscroller-loading-icon"}),Gt=(i,h)=>({rows:i,columns:h});function Jt(i,h){i&1&&W(0)}function Kt(i,h){if(i&1&&(x(0),w(1,Jt,1,0,"ng-container",10),V()),i&2){let t=y(2);_(),m("ngTemplateOutlet",t.contentTemplate||t._contentTemplate)("ngTemplateOutletContext",N(2,it,t.loadedItems,t.getContentOptions()))}}function Ut(i,h){i&1&&W(0)}function Xt(i,h){if(i&1&&(x(0),w(1,Ut,1,0,"ng-container",10),V()),i&2){let t=h.$implicit,e=h.index,n=y(3);_(),m("ngTemplateOutlet",n.itemTemplate||n._itemTemplate)("ngTemplateOutletContext",N(2,it,t,n.getOptions(e)))}}function Yt(i,h){if(i&1&&(z(0,"div",11,3),w(2,Xt,2,5,"ng-container",12),b()),i&2){let t=y(2);pt(t.contentStyle),Q(t.contentStyleClass),m("ngClass",A(8,Nt,t.d_loading)),T("data-pc-section","content"),_(2),m("ngForOf",t.loadedItems)("ngForTrackBy",t._trackBy)}}function te(i,h){if(i&1&&E(0,"div",13),i&2){let t=y(2);m("ngStyle",t.spacerStyle),T("data-pc-section","spacer")}}function ee(i,h){i&1&&W(0)}function ie(i,h){if(i&1&&(x(0),w(1,ee,1,0,"ng-container",10),V()),i&2){let t=h.index,e=y(4);_(),m("ngTemplateOutlet",e.loaderTemplate||e._loaderTemplate)("ngTemplateOutletContext",A(4,Ht,e.getLoaderOptions(t,e.both&&A(2,qt,e.numItemsInViewport.cols))))}}function ne(i,h){if(i&1&&(x(0),w(1,ie,2,6,"ng-container",15),V()),i&2){let t=y(3);_(),m("ngForOf",t.loaderArr)}}function se(i,h){i&1&&W(0)}function oe(i,h){if(i&1&&(x(0),w(1,se,1,0,"ng-container",10),V()),i&2){let t=y(4);_(),m("ngTemplateOutlet",t.loaderIconTemplate||t._loaderIconTemplate)("ngTemplateOutletContext",A(3,Ht,wt(2,Zt)))}}function le(i,h){i&1&&E(0,"SpinnerIcon",16),i&2&&(m("styleClass","p-virtualscroller-loading-icon pi-spin"),T("data-pc-section","loadingIcon"))}function re(i,h){if(i&1&&w(0,oe,2,5,"ng-container",6)(1,le,1,2,"ng-template",null,5,j),i&2){let t=$(2),e=y(3);m("ngIf",e.loaderIconTemplate||e._loaderIconTemplate)("ngIfElse",t)}}function ae(i,h){if(i&1&&(z(0,"div",14),w(1,ne,2,1,"ng-container",6)(2,re,3,2,"ng-template",null,4,j),b()),i&2){let t=$(3),e=y(2);m("ngClass",A(4,jt,!e.loaderTemplate)),T("data-pc-section","loader"),_(),m("ngIf",e.loaderTemplate||e._loaderTemplate)("ngIfElse",t)}}function he(i,h){if(i&1){let t=ut();x(0),z(1,"div",7,1),_t("scroll",function(n){rt(t);let s=y();return at(s.onContainerScroll(n))}),w(3,Kt,2,5,"ng-container",6)(4,Yt,3,10,"ng-template",null,2,j)(6,te,1,2,"div",8)(7,ae,4,6,"div",9),b(),V()}if(i&2){let t=$(5),e=y();_(),Q(e._styleClass),m("ngStyle",e._style)("ngClass",Ct(12,$t,e.inline,e.both,e.horizontal)),T("id",e._id)("tabindex",e.tabindex)("data-pc-name","scroller")("data-pc-section","root"),_(2),m("ngIf",e.contentTemplate||e._contentTemplate)("ngIfElse",t),_(3),m("ngIf",e._showSpacer),_(),m("ngIf",!e.loaderDisabled&&e._showLoader&&e.d_loading)}}function ce(i,h){i&1&&W(0)}function de(i,h){if(i&1&&(x(0),w(1,ce,1,0,"ng-container",10),V()),i&2){let t=y(2);_(),m("ngTemplateOutlet",t.contentTemplate||t._contentTemplate)("ngTemplateOutletContext",N(5,it,t.items,N(2,Gt,t._items,t.loadedColumns)))}}function me(i,h){if(i&1&&(ft(0),w(1,de,2,8,"ng-container",17)),i&2){let t=y();_(),m("ngIf",t.contentTemplate||t._contentTemplate)}}var pe=({dt:i})=>`
2
2
  .p-virtualscroller {
3
3
  position: relative;
4
4
  overflow: auto;