dealposbooks 1.9.9 → 5.32.0
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.
- package/3rdpartylicenses.txt +52 -52
- package/assets/scss/style.scss +7 -0
- package/{chunk-6JMIM647.js → chunk-253IFSMV.js} +1 -1
- package/chunk-2BCAGP7R.js +1 -0
- package/chunk-2FU3LWGL.js +1 -0
- package/{chunk-6KUGZE4D.js → chunk-2KB4NNVP.js} +1 -1
- package/chunk-33YEAYJV.js +1 -0
- package/{chunk-RSBHWSQP.js → chunk-3LDYJV3L.js} +1 -1
- package/chunk-3WD3CTYC.js +1 -0
- package/{chunk-AAV2CBYL.js → chunk-42UIGXWH.js} +1 -1
- package/chunk-4ANXHXE3.js +7 -0
- package/{chunk-XSV3RUSY.js → chunk-4LGDNQMZ.js} +1 -1
- package/chunk-56GDP75Z.js +1 -0
- package/{chunk-VLOOUXSK.js → chunk-5R3XKSDM.js} +1 -1
- package/chunk-63YXSI43.js +1 -0
- package/{chunk-BOLQVS6Y.js → chunk-67VPWIWW.js} +51 -51
- package/chunk-6ACYDH2N.js +1 -0
- package/{chunk-EUZRP4IL.js → chunk-6DRYMDZA.js} +1 -1
- package/{chunk-RDNX4GB3.js → chunk-6LENP6AB.js} +1 -1
- package/{chunk-RSNWAAG7.js → chunk-6NGIQJIP.js} +2 -2
- package/chunk-6OQPMZXU.js +1 -0
- package/{chunk-5CKNZSY2.js → chunk-6UGXXSQ3.js} +1 -1
- package/chunk-74MJ3NFN.js +1 -0
- package/chunk-7EJVMM7V.js +252 -0
- package/chunk-7EZGTYA2.js +1 -0
- package/chunk-7VQQO4OE.js +1 -0
- package/{chunk-3XHIVI4R.js → chunk-A7EGGUJQ.js} +1 -1
- package/{chunk-UGW4WHZE.js → chunk-ABBBWSSO.js} +1 -1
- package/{chunk-6IIHHTGW.js → chunk-AIZN44RL.js} +2 -2
- package/{chunk-EFM3IZ4E.js → chunk-AZUQDRJU.js} +1 -1
- package/chunk-B5JORMF2.js +1 -0
- package/{chunk-7SS54GTW.js → chunk-B7WHT2EP.js} +1 -1
- package/{chunk-GW67NFVX.js → chunk-BLJMNWUM.js} +1 -1
- package/{chunk-7EZ4X3EY.js → chunk-BMBVCXB4.js} +1 -1
- package/chunk-BQXWTZHK.js +129 -0
- package/chunk-C2GO6SPF.js +1 -0
- package/{chunk-7F26ZTCS.js → chunk-C6U3U6SW.js} +1 -1
- package/{chunk-I7SRN7BD.js → chunk-C7LM5UCK.js} +1 -1
- package/{chunk-WKMCO5GR.js → chunk-EDCDR4RJ.js} +1 -1
- package/{chunk-B6WHUOA5.js → chunk-EW3R2HAB.js} +1 -1
- package/{chunk-CQFTV5NO.js → chunk-F5Z3IX4J.js} +1 -1
- package/{chunk-WJ2UEWWN.js → chunk-FBEBMNVC.js} +1 -1
- package/{chunk-QTHCFSIO.js → chunk-GH5Z5SPB.js} +1 -1
- package/chunk-GORMHEMA.js +1 -0
- package/{chunk-ZZJ3I6VU.js → chunk-HAZ77TED.js} +1 -1
- package/{chunk-CLLHHYX6.js → chunk-HHDFSN55.js} +1 -1
- package/{chunk-PCSX3PMT.js → chunk-HHJMN4BS.js} +1 -1
- package/chunk-INXSCWN3.js +1 -0
- package/{chunk-GMAMEQ3J.js → chunk-IU2PF53V.js} +1 -1
- package/{chunk-2U35WLGR.js → chunk-J4XRJAME.js} +1 -1
- package/chunk-JPP5O2O5.js +1 -0
- package/{chunk-VWCH5LXN.js → chunk-KJ6CKUEI.js} +1 -1
- package/chunk-L725MUU2.js +160 -0
- package/{chunk-GQALHR6D.js → chunk-LRRVQSMI.js} +1 -1
- package/chunk-MFH4UZ6J.js +1 -0
- package/chunk-MXBBJHYA.js +202 -0
- package/{chunk-7Z3LI5KJ.js → chunk-NA5YXAMJ.js} +1 -1
- package/{chunk-E4IYO245.js → chunk-OLOVFS3Y.js} +1 -1
- package/{chunk-KZWUDERE.js → chunk-OYHHWU2W.js} +1 -1
- package/{chunk-MP3KNNAP.js → chunk-P3V7Z3A6.js} +1 -1
- package/{chunk-KOLMNCWR.js → chunk-PKN47FQE.js} +2 -2
- package/chunk-PV3NLUKC.js +1 -0
- package/chunk-Q33XIUDN.js +1 -0
- package/chunk-QCLAOAVG.js +1 -0
- package/chunk-QLUQTLSH.js +1 -0
- package/{chunk-7EIOX5NB.js → chunk-QSWSGP4B.js} +1 -1
- package/{chunk-LETMLT3U.js → chunk-QYXQYPHB.js} +1 -1
- package/chunk-RBTNUVT5.js +130 -0
- package/chunk-REXWFSN3.js +1 -0
- package/chunk-RMRYZWCP.js +1 -0
- package/chunk-SEGRH6C4.js +1 -0
- package/chunk-TT745CJN.js +1 -0
- package/{chunk-QDMJKW6E.js → chunk-TVNXFJII.js} +1 -1
- package/chunk-UWNAF5OL.js +1 -0
- package/{chunk-ZJXOMTHP.js → chunk-UYC454VQ.js} +1 -1
- package/{chunk-MFLZ4HZM.js → chunk-VFEEFGWW.js} +1 -1
- package/chunk-VVHTNAHQ.js +1 -0
- package/{chunk-ZD25QBHW.js → chunk-VYK2CQ72.js} +1 -1
- package/{chunk-IZLAA63M.js → chunk-W24I5WPW.js} +1 -1
- package/{chunk-GNCW5Q2A.js → chunk-W4SAEISC.js} +12 -12
- package/chunk-WSZ5MU6V.js +1 -0
- package/{chunk-CEGCR3XO.js → chunk-XILGARZ5.js} +1 -1
- package/chunk-XJEZJFWN.js +1 -0
- package/chunk-XKI7WLHE.js +1 -0
- package/chunk-YDEVG4CR.js +1 -0
- package/{chunk-RFFPFL5K.js → chunk-YO23YVSC.js} +1 -1
- package/{chunk-EDULXXOB.js → chunk-YOUPD27G.js} +1 -1
- package/{chunk-Q4RMIZY5.js → chunk-YRCXWYJC.js} +1 -1
- package/chunk-ZNIFAG4O.js +1 -0
- package/index.html +4 -4
- package/main-OTYR5DFR.js +1 -0
- package/package.json +1 -1
- package/{styles-6GJ4BYO3.css → styles-TTHIY3OR.css} +1 -1
- package/chunk-7BNTEMFA.js +0 -1
- package/chunk-BVWHK6FQ.js +0 -1
- package/chunk-BZKPOL7V.js +0 -1
- package/chunk-CF5CCUC7.js +0 -1
- package/chunk-CYY5JJLN.js +0 -1
- package/chunk-D7VZOVPI.js +0 -130
- package/chunk-DCKLQNGL.js +0 -1
- package/chunk-G7JKAPFA.js +0 -160
- package/chunk-HERTD63G.js +0 -1
- package/chunk-I4KQVYMH.js +0 -1
- package/chunk-J6QKJ5IE.js +0 -1
- package/chunk-JKTB4WTW.js +0 -1
- package/chunk-JPZJ6KUM.js +0 -1
- package/chunk-KYPFNXXK.js +0 -1
- package/chunk-LNWZEFKE.js +0 -1
- package/chunk-LW5XWJJA.js +0 -1
- package/chunk-M3N34WLW.js +0 -1
- package/chunk-O3H5V64X.js +0 -1
- package/chunk-OW2GYBXF.js +0 -7
- package/chunk-QLPEPLQ4.js +0 -1
- package/chunk-UD2JTFXA.js +0 -1
- package/chunk-UQMQ34KD.js +0 -1
- package/chunk-VH4SDRSP.js +0 -129
- package/chunk-W223GVMJ.js +0 -1
- package/chunk-WKDV7R2E.js +0 -1
- package/chunk-WPUAF2DP.js +0 -1
- package/chunk-WXJP4ZEP.js +0 -1
- package/chunk-Y3JWOPHT.js +0 -1
- package/chunk-ZEMTTJBT.js +0 -1
- package/main-SDHARJTN.js +0 -1
package/3rdpartylicenses.txt
CHANGED
|
@@ -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"
|
|
@@ -415,32 +415,6 @@ Package: ngx-scrollbar
|
|
|
415
415
|
License: "MIT"
|
|
416
416
|
|
|
417
417
|
|
|
418
|
-
--------------------------------------------------------------------------------
|
|
419
|
-
Package: jwt-decode
|
|
420
|
-
License: "MIT"
|
|
421
|
-
|
|
422
|
-
The MIT License (MIT)
|
|
423
|
-
|
|
424
|
-
Copyright (c) 2015 Auth0, Inc. <support@auth0.com> (http://auth0.com)
|
|
425
|
-
|
|
426
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
427
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
428
|
-
in the Software without restriction, including without limitation the rights
|
|
429
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
430
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
431
|
-
furnished to do so, subject to the following conditions:
|
|
432
|
-
|
|
433
|
-
The above copyright notice and this permission notice shall be included in all
|
|
434
|
-
copies or substantial portions of the Software.
|
|
435
|
-
|
|
436
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
437
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
438
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
439
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
440
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
441
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
442
|
-
SOFTWARE.
|
|
443
|
-
|
|
444
418
|
--------------------------------------------------------------------------------
|
|
445
419
|
Package: papaparse
|
|
446
420
|
License: "MIT"
|
|
@@ -1142,6 +1116,32 @@ Package: @ng-select/ng-select
|
|
|
1142
1116
|
License: "MIT"
|
|
1143
1117
|
|
|
1144
1118
|
|
|
1119
|
+
--------------------------------------------------------------------------------
|
|
1120
|
+
Package: jwt-decode
|
|
1121
|
+
License: "MIT"
|
|
1122
|
+
|
|
1123
|
+
The MIT License (MIT)
|
|
1124
|
+
|
|
1125
|
+
Copyright (c) 2015 Auth0, Inc. <support@auth0.com> (http://auth0.com)
|
|
1126
|
+
|
|
1127
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
1128
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
1129
|
+
in the Software without restriction, including without limitation the rights
|
|
1130
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
1131
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
1132
|
+
furnished to do so, subject to the following conditions:
|
|
1133
|
+
|
|
1134
|
+
The above copyright notice and this permission notice shall be included in all
|
|
1135
|
+
copies or substantial portions of the Software.
|
|
1136
|
+
|
|
1137
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
1138
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
1139
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
1140
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
1141
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
1142
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
1143
|
+
SOFTWARE.
|
|
1144
|
+
|
|
1145
1145
|
--------------------------------------------------------------------------------
|
|
1146
1146
|
Package: @ngrx/signals
|
|
1147
1147
|
License: "MIT"
|
package/assets/scss/style.scss
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as p}from"./chunk-
|
|
1
|
+
import{h as p}from"./chunk-67VPWIWW.js";import{Ab as s,Jb as l,Ob as C,Ub as c,Vb as m,Wb as d,ra as o,ta as a,wb as r}from"./chunk-JP6RBSB3.js";var g=(()=>{class t extends p{static \u0275fac=(()=>{let i;return function(e){return(i||(i=a(t)))(e||t)}})();static \u0275cmp=r({type:t,selectors:[["ChevronRightIcon"]],features:[s],decls:2,vars:5,consts:[["width","14","height","14","viewBox","0 0 14 14","fill","none","xmlns","http://www.w3.org/2000/svg"],["d","M4.38708 13C4.28408 13.0005 4.18203 12.9804 4.08691 12.9409C3.99178 12.9014 3.9055 12.8433 3.83313 12.7701C3.68634 12.6231 3.60388 12.4238 3.60388 12.2161C3.60388 12.0084 3.68634 11.8091 3.83313 11.6622L8.50507 6.99022L3.83313 2.31827C3.69467 2.16968 3.61928 1.97313 3.62287 1.77005C3.62645 1.56698 3.70872 1.37322 3.85234 1.22959C3.99596 1.08597 4.18972 1.00371 4.3928 1.00012C4.59588 0.996539 4.79242 1.07192 4.94102 1.21039L10.1669 6.43628C10.3137 6.58325 10.3962 6.78249 10.3962 6.99022C10.3962 7.19795 10.3137 7.39718 10.1669 7.54416L4.94102 12.7701C4.86865 12.8433 4.78237 12.9014 4.68724 12.9409C4.59212 12.9804 4.49007 13.0005 4.38708 13Z","fill","currentColor"]],template:function(n,e){n&1&&(o(),c(0,"svg",0),d(1,"path",1),m()),n&2&&(C(e.getClassNames()),l("aria-label",e.ariaLabel)("aria-hidden",e.ariaHidden)("role",e.role))},encapsulation:2})}return t})();export{g as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as y,b as C,e as F,f as M}from"./chunk-EDCDR4RJ.js";import{b as T}from"./chunk-HHDFSN55.js";import{a as G}from"./chunk-P3V7Z3A6.js";import{F as L,G as S,m as U}from"./chunk-B63BKC6F.js";import{Ac as g,Kb as n,Ob as l,Sb as m,Tb as f,Ub as a,Vb as p,ba as c,ec as h,gb as s,ha as i,qc as v,rc as b,wb as d}from"./chunk-JP6RBSB3.js";var $=(()=>{class t{constructor(){this.httpService=i(G)}getUserLoaderList(){return this.httpService.get(void 0,"api/UserLoader/List")}getUsers(e){return this.httpService.post(void 0,"api/User/List",e)}getUserFormMeta(e){return this.httpService.post(void 0,"api/UserLoader/Form",{ID:e})}inviteUser(e){return this.httpService.post(void 0,"api/User/Submit",e)}deleteUser(e){return this.httpService.post(void 0,"api/User/Delete",{ListID:e})}getGroupLoader(){return this.httpService.get(void 0,"api/UserGroupLoader/List")}getGroupList(e){return this.httpService.post(void 0,"api/UserGroup/List",e)}getGroupFormMeta(e){return this.httpService.get(void 0,e?`api/UserGroup/Form/${e}`:"api/UserGroup/Form")}assignGroupRole(e){return this.httpService.post(void 0,"api/UserGroup/AssignRole",e)}deleteGroup(e){return this.httpService.post(void 0,"api/UserGroup/Delete",{ListID:e})}static{this.\u0275fac=function(r){return new(r||t)}}static{this.\u0275prov=c({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var k=t=>({"ps-0":t}),x=(t,o)=>o.route;function _(t,o){if(t&1&&(a(0,"p-tab",2)(1,"span"),v(2),p()()),t&2){let e=o.$implicit,r=h();l(g(5,k,r.router.url.includes("forms"))),n("value",e.route)("routerLink",e.route),s(2),b(e.label)}}var B=(()=>{class t{constructor(){this.router=i(L),this.tabs=[{route:"/pages/users/users",label:"Users"},{route:"/pages/users/groups",label:"Groups"}]}get activeTab(){return this.tabs.find(r=>this.router.url.startsWith(r.route)).route||this.tabs[0].route}static{this.\u0275fac=function(r){return new(r||t)}}static{this.\u0275cmp=d({type:t,selectors:[["app-user-tabs"]],decls:4,vars:1,consts:[[3,"value"],[3,"value","routerLink","class"],[3,"value","routerLink"]],template:function(r,u){r&1&&(a(0,"p-tabs",0)(1,"p-tablist"),m(2,_,3,7,"p-tab",1,x),p()()),r&2&&(n("value",u.activeTab),s(2),f(u.tabs))},dependencies:[M,F,y,C,S,T,U],styles:["[_nghost-%COMP%]{display:block} .p-tabs .p-tab{padding:0 1.125rem .6rem 0!important}"],changeDetection:0})}}return t})();export{$ as a,B as b};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as we}from"./chunk-2KB4NNVP.js";import"./chunk-VVHTNAHQ.js";import{a as Ce,b as ve,c as Ee,d as he,e as Ie,f as be}from"./chunk-BLJMNWUM.js";import{b as ye,c as Ve,d as Se}from"./chunk-6LENP6AB.js";import"./chunk-C2GO6SPF.js";import{d as _e,f as ue,g as fe,h as xe,k as ge}from"./chunk-EW3R2HAB.js";import"./chunk-OLOVFS3Y.js";import"./chunk-QCLAOAVG.js";import"./chunk-Q33XIUDN.js";import{a as R}from"./chunk-XKCLERWG.js";import{a as ie}from"./chunk-4LGDNQMZ.js";import"./chunk-PKN47FQE.js";import"./chunk-LRRVQSMI.js";import"./chunk-42UIGXWH.js";import"./chunk-NA5YXAMJ.js";import"./chunk-253IFSMV.js";import"./chunk-QYXQYPHB.js";import"./chunk-FBEBMNVC.js";import"./chunk-6NGIQJIP.js";import"./chunk-YDEVG4CR.js";import{a as ce,b as de}from"./chunk-5R3XKSDM.js";import{e as pe,f as me,h as se}from"./chunk-UYC454VQ.js";import"./chunk-C7LM5UCK.js";import{a as ae,b as le}from"./chunk-J4XRJAME.js";import"./chunk-JBSIAXM5.js";import"./chunk-GH5Z5SPB.js";import{w as oe,x as re}from"./chunk-67VPWIWW.js";import"./chunk-BHV2HCJY.js";import"./chunk-FMVCTBCQ.js";import"./chunk-P3V7Z3A6.js";import"./chunk-VFEEFGWW.js";import"./chunk-F2X3VGZZ.js";import{F as ne,c as X,f as Y,k as Z,l as ee,m as te}from"./chunk-B63BKC6F.js";import{Ac as T,Cb as d,Cc as q,Ga as S,I as N,Jc as E,Kb as m,Kc as I,Lc as G,Mc as c,Nb as A,Pb as h,Qb as F,Sb as P,Tb as D,Ub as n,Vb as i,Wb as _,X as U,Z as w,_b as v,dc as y,eb as j,ec as s,gb as l,ha as k,kc as H,lc as L,m as M,mc as O,pa as f,pc as $,qa as x,qc as r,rc as g,s as B,sc as C,vc as Q,wb as K,wc as W,xc as z,zc as J}from"./chunk-JP6RBSB3.js";import{e as Re}from"./chunk-YQFG5XE2.js";var Je=Re(Ve());var ke=["stepper"],Ae=()=>({width:"30vw"}),Fe=()=>({"1199px":"75vw","575px":"100vw"}),Pe=()=>({height:"calc(100vh - 70px)"}),De=t=>({"col-12":t}),Me=(t,p,e)=>({"bg-gradient-danger":t,"bg-gradient-success":p,"bg-gradient-warning":e}),Te=t=>({"state-danger":t});function Be(t,p){if(t&1){let e=v();n(0,"p-button",14),y("click",function(){f(e);let o=s(2);return x(o.onPrevStep())}),i()}if(t&2){let e=s(2);m("disabled",e.stepActiveIndex()===1)}}function Ne(t,p){if(t&1){let e=v();n(0,"p-button",15),y("click",function(){f(e);let o=s(2);return x(o.onNextStep())}),i()}if(t&2){let e=s(2);m("disabled",e.stepActiveIndex()===3||!e.JournalEntryImport())}}function Ue(t,p){if(t&1){let e=v();n(0,"p-button",16),y("click",function(){f(e);let o=s(2);return x(o.onReset())}),i()}}function je(t,p){if(t&1&&d(0,Be,1,1,"p-button",11)(1,Ne,1,1,"p-button",12)(2,Ue,1,0,"p-button",13),t&2){let e=s();m("ngIf",e.stepActiveIndex()>1),l(),m("ngIf",e.stepActiveIndex()<3),l(),m("ngIf",e.stepActiveIndex()===3)}}function Ke(t,p){if(t&1){let e=v();n(0,"POS-uppy",25),y("fileUploaded",function(o){f(e);let u=s(2);return x(u.onFileUploaded(o))})("fileRemoved",function(o){f(e);let u=s(2);return x(u.onFileRemoved(o))}),i(),n(1,"p",26),r(2," Please refer this "),n(3,"a",27),r(4,"article"),i(),r(5," for more information "),i()}if(t&2){let e=s(2);m("uppyCoreConfiguration",e.uppyCore)("dashboardPropsConfiguration",e.dashboardProps)("sampleUrl",e.SAMPLE_URL)("subtitle",e.subtitle)}}function He(t,p){t&1&&(n(0,"tr"),_(1,"th",29),n(2,"th",30),r(3," Number "),_(4,"p-sortIcon",31),i(),n(5,"th",32),r(6," Outlet "),_(7,"p-sortIcon",33),i(),n(8,"th",34),r(9," Date "),_(10,"p-sortIcon",35),i(),n(11,"th",36),r(12," Status "),_(13,"p-sortIcon",37),i(),n(14,"th"),r(15,"Message"),i()())}function Le(t,p){if(t&1&&(n(0,"div",41)(1,"span"),r(2),i(),n(3,"span"),r(4),i()()),t&2){let e=p.$implicit;l(2),g(e.issue),l(2),g(e.solution)}}function Oe(t,p){if(t&1&&(n(0,"div",40),P(1,Le,5,2,"div",41,F),i()),t&2){let e=s(2).$implicit;l(),D(e.issues)}}function $e(t,p){}function Qe(t,p){if(t&1&&d(0,Oe,3,0,"div",40)(1,$e,0,0),t&2){let e=s().$implicit;h(e.issues&&e.issues.length>0?0:1)}}function We(t,p){if(t&1&&(n(0,"tr")(1,"td"),_(2,"p-button",38),i(),n(3,"td"),r(4),i(),n(5,"td"),r(6),i(),n(7,"td"),r(8),E(9,"date"),i(),n(10,"td",39),r(11),i(),n(12,"td",39),d(13,Qe,2,1),i()()),t&2){let e=p.$implicit,a=p.expanded,o=s(4);l(2),m("pRowToggler",e)("text",!0)("rounded",!0)("plain",!0)("icon",a?"fa-solid fa-chevron-down":"fa-solid fa-chevron-right"),l(2),g(e.number),l(2),C(" ",e.outlet," "),l(2),g(G(9,12,e.date,"d MMM y")),l(2),m("ngClass",q(15,Me,e.actionName==="Error",e.actionName==="New",e.actionName==="Update")),l(),C(" ",e.actionName," "),l(),m("ngClass",T(19,Te,o.hasIssue)),l(),h(o.hasIssue?13:-1)}}function ze(t,p){t&1&&(n(0,"tr")(1,"th",45),r(2," Code "),_(3,"p-sortIcon",46),i(),n(4,"th",47),r(5," Name "),_(6,"p-sortIcon",48),i(),n(7,"th",49),r(8," Note "),_(9,"p-sortIcon",50),i(),n(10,"th",51),r(11," Debit "),_(12,"p-sortIcon",52),i(),n(13,"th",53),r(14," Credit "),_(15,"p-sortIcon",54),i(),n(16,"th"),r(17,"Message"),i()())}function qe(t,p){if(t&1&&(n(0,"div",41)(1,"span"),r(2),i(),n(3,"span"),r(4),i()()),t&2){let e=p.$implicit;l(2),g(e.issue),l(2),g(e.solution)}}function Ge(t,p){if(t&1&&(n(0,"div",40),P(1,qe,5,2,"div",41,F),i()),t&2){let e=s().$implicit;l(),D(e.issues)}}function Xe(t,p){if(t&1&&(n(0,"tr")(1,"td"),r(2),i(),n(3,"td"),r(4),i(),n(5,"td"),r(6),i(),n(7,"td"),r(8),E(9,"number"),i(),n(10,"td"),r(11),E(12,"number"),i(),n(13,"td",39),d(14,Ge,3,0,"div",40),i()()),t&2){let e=p.$implicit,a=s(5);l(2),g(e.accountCode),l(2),g(e.accountName),l(2),g(e.note),l(2),C(" ",I(9,7,e.debitAmount)," "),l(3),C(" ",I(12,9,e.creditAmount)," "),l(2),m("ngClass",T(11,Te,e.issues&&e.issues.length>0)),l(),h(a.hasIssue?14:-1)}}function Ye(t,p){t&1&&(n(0,"tr")(1,"td",55),r(2," There are no order for this product yet. "),i()())}function Ze(t,p){if(t&1&&(n(0,"tr")(1,"td",42)(2,"div",43)(3,"p-table",44),d(4,ze,18,0,"ng-template",null,3,c)(6,Xe,15,13,"ng-template",null,6,c)(8,Ye,3,0,"ng-template",null,8,c),i()()()()),t&2){let e=p.$implicit;l(3),m("value",e.items)}}function et(t,p){if(t&1&&(n(0,"p-table",28),d(1,He,16,0,"ng-template",null,3,c)(3,We,14,21,"ng-template",null,6,c)(5,Ze,10,1,"ng-template",null,7,c),i()),t&2){let e=s(3);m("scrollable",!0)("scrollHeight","calc(100vh - 160px)")("value",e.JournalEntryImport().dataRow)}}function tt(t,p){if(t&1&&d(0,et,7,3,"p-table",28),t&2){let e=s(2);h(e.JournalEntryImport()?0:-1)}}function nt(t,p){t&1&&(n(0,"h5"),r(1,"Successfully Imported"),i())}function it(t,p){if(t&1&&(n(0,"p-panel")(1,"p-scroll-panel")(2,"div",17)(3,"div",18)(4,"p-stepper",19,5)(6,"p-step-list")(7,"p-step",20)(8,"div",21),_(9,"i",22),n(10,"span"),r(11,"Upload"),i()()(),n(12,"p-step",20)(13,"div",21),_(14,"i",23),n(15,"span"),r(16,"Preview"),i()()(),n(17,"p-step",20)(18,"div",21),_(19,"i",24),n(20,"span"),r(21,"Finish"),i()()()(),n(22,"p-step-panels")(23,"p-step-panel",20),d(24,Ke,6,4,"ng-template",null,1,c),i(),n(26,"p-step-panel",20),d(27,tt,1,1,"ng-template",null,1,c),i(),n(29,"p-step-panel",20),d(30,nt,2,0,"ng-template",null,1,c),i()()()()()()()),t&2){let e=s();l(),A(J(11,Pe)),l(2),m("ngClass",T(12,De,e.stepActiveIndex()===2)),l(),m("linear",!0)("value",e.stepActiveIndex()),l(3),m("value",1),l(5),m("value",2),l(5),m("value",3),l(6),m("value",1),l(3),m("value",2),l(3),m("value",3)}}function ot(t,p){if(t&1){let e=v();n(0,"p-button",56),y("onClick",function(){f(e);let o=s();return x(o.summaryDialogVisible.set(!1))}),i()}t&2&&m("rounded",!0)("text",!0)}function rt(t,p){if(t&1&&(n(0,"div",57)(1,"h4",58),r(2,"Import Summary"),i(),n(3,"p",59),r(4),i()()),t&2){let e=s();l(4),C("(",e.CSVRowCount()," rows ready for import)")}}function at(t,p){t&1&&(n(0,"div",63)(1,"h4",64),r(2,"Journal"),i()())}function lt(t,p){t&1&&(n(0,"div",65)(1,"h4",64),r(2,"Debit"),i()())}function pt(t,p){t&1&&(n(0,"div",65)(1,"h4",64),r(2,"Credit"),i()())}function mt(t,p){if(t&1&&(n(0,"div",60)(1,"div",61)(2,"p-card"),d(3,at,3,0,"ng-template",null,3,c),n(5,"div",60)(6,"div",61)(7,"h5",62),r(8),E(9,"number"),i()()()()(),n(10,"div",61)(11,"p-card"),d(12,lt,3,0,"ng-template",null,3,c),n(14,"div",60)(15,"div",61)(16,"h5",62),r(17),E(18,"number"),i()()()()(),n(19,"div",61)(20,"p-card"),d(21,pt,3,0,"ng-template",null,3,c),n(23,"div",60)(24,"div",61)(25,"h5",62),r(26),E(27,"number"),i()()()()()()),t&2){let e=s(2);l(8),C(" ",I(9,3,e.JournalEntryImport().summary.journal)," "),l(9),C(" ",I(18,5,e.JournalEntryImport().summary.debit)," "),l(9),C(" ",I(27,7,e.JournalEntryImport().summary.credit)," ")}}function st(t,p){if(t&1&&d(0,mt,28,9,"div",60),t&2){let e=s();h(e.JournalEntryImport()?0:-1)}}function ct(t,p){if(t&1){let e=v();n(0,"p-button",66),y("click",function(){f(e);let o=s();return x(o.summaryDialogVisible.set(!1))}),i(),n(1,"p-button",67),y("click",function(){f(e);let o=s();return x(o.onConfirmImport())}),i()}}var jt=(()=>{class t{constructor(){this.service=k(we),this.router=k(ne),this.subtitle="Accepted file format: .csv & max file size: 1MB",this.stepActiveIndex=S(1),this.JournalEntryImport=S(null),this.summaryDialogVisible=S(!1),this.CSVRowCount=S(0),this.dashboardProps={inline:!0,width:580,height:350},this.uppyCore={restrictions:{allowedFileTypes:["text/csv","application/vnd.ms-excel","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"]}},this.SAMPLE_URL="https://res.cloudinary.com/pos/raw/upload/POS/CSV/Journal_DealPOS.csv"}ngAfterViewInit(){console.log("Stepper instance:",this.stepperRef)}onFileUpload(e){console.log("File upload event:",e);let a=new FormData;Array.isArray(e.currentFiles)&&e.currentFiles.forEach(o=>{o instanceof File&&a.append("File",o,o.name)}),console.log("Form data prepared for upload:",a.get("File")),this.service.importPreviewJournal(a).pipe(R("Import Preview"),B(o=>({cacheKey:o.cacheKey})),U(o=>this.service.importConfirmJournal(o)),w(()=>{this.router.navigate(["/pages/journal/journal-entry"])})).subscribe()}onFileRemoved(e){console.log("File removed event:",e),this.JournalEntryImport.set(null),this.CSVRowCount.set(0)}onNextStep(){if(this.stepActiveIndex()<3&&(this.stepActiveIndex.update(e=>e+1),this.stepActiveIndex()===3)){this.stepActiveIndex.update(()=>this.stepActiveIndex()-1),this.summaryDialogVisible.set(!0);return}}onPrevStep(){this.stepActiveIndex()>1&&this.stepActiveIndex.update(e=>e-1)}onFileUploaded(e){let a=new FormData;if("name"in e&&typeof e.name=="string")a.append("File",e,e.name),this.service.importPreviewJournal(a).pipe(R("Import Preview"),w(o=>{this.JournalEntryImport.set(o)})).subscribe(),Je.default.parse(e,{header:!0,skipEmptyLines:!0,complete:o=>{console.log("CSV Parsing Results:",o),this.CSVRowCount.set(o.data.length)},error:o=>{console.error("Error parsing CSV:",o)}});else return}onConfirmImport(){if(this.JournalEntryImport()&&this.JournalEntryImport().canProceed){let e={cacheKey:this.JournalEntryImport().cacheKey};this.service.importConfirmJournal(e).pipe(R("Import Confirm"),w(()=>{this.router.navigate(["/pages/journal/journal-entry"]),this.stepActiveIndex.update(a=>a+1),this.summaryDialogVisible.update(a=>!a)}),N(a=>(console.error("Error occurred during import confirmation:",a),this.stepActiveIndex.update(o=>o+1),this.summaryDialogVisible.update(o=>!o),M(null)))).subscribe()}else{console.error("Cannot proceed with import, JournalEntryImport is not set or canProceed is false.");return}}onReset(){this.stepActiveIndex.set(1),this.JournalEntryImport.set(null)}handleKeyboardEvent(e){e.key==="F2"&&this.onConfirmImport()}get hasIssue(){let e=this.JournalEntryImport();return e&&Array.isArray(e.dataRow)?e.dataRow.some(a=>{let o=a.issues&&a.issues.length>0,u=Array.isArray(a.items)&&a.items.some(b=>b.issues&&b.issues.length>0);return o||u}):!1}static{this.\u0275fac=function(a){return new(a||t)}}static{this.\u0275cmp=K({type:t,selectors:[["app-journal-entry-import"]],viewQuery:function(a,o){if(a&1&&H(ke,5),a&2){let u;L(u=O())&&(o.stepperRef=u.first)}},hostBindings:function(a,o){a&1&&y("keydown",function(b){return o.handleKeyboardEvent(b)},!1,j)},decls:14,vars:10,consts:[["actionButton",""],["content",""],["closeIconTemplate",""],["header",""],["footer",""],["stepper",""],["body",""],["expandedrow",""],["emptymessage",""],["pageTitle","Manual Journal Import"],["position","center","appendTo","body",3,"visibleChange","modal","visible","breakpoints","draggable","closeIconTemplate","dismissableMask"],["label","Back","severity","secondary","variant","outlined",3,"disabled","click",4,"ngIf"],["label","Next","severity","primary",3,"disabled","click",4,"ngIf"],["label","Finish","severity","primary",3,"click",4,"ngIf"],["label","Back","severity","secondary","variant","outlined",3,"click","disabled"],["label","Next","severity","primary",3,"click","disabled"],["label","Finish","severity","primary",3,"click"],[1,"row","justify-content-center"],[1,"col-6",3,"ngClass"],[3,"linear","value"],[3,"value"],[1,"d-flex","gap-2","align-items-center"],[1,"fa-solid","fa-upload"],[1,"fa-solid","fa-file"],[1,"fa-solid","fa-check"],[3,"fileUploaded","fileRemoved","uppyCoreConfiguration","dashboardPropsConfiguration","sampleUrl","subtitle"],[1,"fst-italic"],["href","#","target","_blank",1,"link","link-primary"],["dataKey","number",3,"scrollable","scrollHeight","value"],[2,"width","5rem"],["pSortableColumn","number"],["field","number"],["pSortableColumn","outlet"],["field","outlet"],["pSortableColumn","date"],["field","date"],["pSortableColumn","inventoryStatus"],["field","inventoryStatus"],["type","button","pRipple","",3,"pRowToggler","text","rounded","plain","icon"],[3,"ngClass"],[1,"d-flex","flex-column","gap-2"],[1,"d-flex","flex-column"],["colspan","8"],[1,"p-4"],["dataKey","accountID",3,"value"],["pSortableColumn","accountCode"],["field","accountCode"],["pSortableColumn","accountName"],["field","accountName"],["pSortableColumn","note"],["field","note"],["pSortableColumn","debitAmount"],["field","debitAmount"],["pSortableColumn","creditAmount"],["field","creditAmount"],["colspan","6"],["severity","secondary","variant","outlined","icon","fa-solid fa-xmark",3,"onClick","rounded","text"],[1,"d-flex","gap-2","align-items-baseline"],[1,"fs-4","text-white","m-0"],[1,"m-0","fs-3"],[1,"row"],[1,"col"],[1,"fs-2"],[1,"state-new"],[1,"fs-3","m-0"],[1,"state-unchanged"],["label","Cancel","severity","secondary","variant","outlined",3,"click"],["label","OK (F2)",3,"click"]],template:function(a,o){if(a&1){let u=v();n(0,"app-main-panel",9),d(1,je,3,3,"ng-template",null,0,c)(3,it,32,14,"ng-template",null,1,c),i(),n(5,"p-dialog",10),z("visibleChange",function(V){return f(u),W(o.summaryDialogVisible,V)||(o.summaryDialogVisible=V),x(V)}),d(6,ot,1,2,"ng-template",null,2,c)(8,rt,5,1,"ng-template",null,3,c)(10,st,1,1,"ng-template",null,1,c)(12,ct,2,0,"ng-template",null,4,c),i()}if(a&2){let u=$(7);l(5),A(J(8,Ae)),m("modal",!0),Q("visible",o.summaryDialogVisible),m("breakpoints",J(9,Fe))("draggable",!1)("closeIconTemplate",u)("dismissableMask",!0)}},dependencies:[se,te,X,Y,ee,Z,le,ae,ye,de,ce,be,Ie,Ce,he,Ee,ve,Se,re,oe,ge,_e,ue,xe,fe,me,pe,ie],styles:[".p-datatable-thead>tr>th{background-color:transparent!important;color:#000!important} .p-stepper{display:flex;flex-direction:column;align-items:center} .p-stepper .p-steplist{width:40vw} .p-stepper .p-steppanels{width:100%} .p-card{border-radius:4px} .p-card .p-card-body{padding:.75rem!important} .p-card .p-card-header{display:flex;align-items:center;width:100%} .p-card .p-card-header .state-new{width:inherit;padding:.75rem;vertical-align:middle;background:repeating-linear-gradient(-60deg,#beeebb,#beeebb 15px,#afeba8 15px 30px)!important} .p-card .p-card-header .state-updated{width:inherit;padding:.75rem;background:repeating-linear-gradient(-60deg,#fcf3cf,#fcf3cf 15px,#f9e79f 15px 30px)!important} .p-card .p-card-header .state-unchanged{width:inherit;padding:.75rem;border-bottom:1px solid #dee2e6} .p-card .p-card-header .state-error{width:inherit;padding:.75rem;background:repeating-linear-gradient(-60deg,#f8d7da,#f8d7da 15px,#f5c6cb 15px 30px)!important} pos-uppy div div h4{font-size:16px} pos-uppy div div p{font-size:14px!important} pos-uppy div div hr{margin:0}"],changeDetection:0})}}return t})();export{jt as JournalEntryImportComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as i}from"./chunk-
|
|
1
|
+
import{a as i}from"./chunk-VVHTNAHQ.js";import{a}from"./chunk-P3V7Z3A6.js";import{ba as o,ha as n}from"./chunk-JP6RBSB3.js";var h=(()=>{class e{constructor(){this.#t=n(a),this.authService=n(i)}#t;getJournalEntryLoader(){return this.#t.get("","api/JournalLoader/JournalEntry")}getJournalReceiveMoney(){return this.#t.get("","api/JournalLoader/ReceiveJournal")}getJournalRecordExpenseLoader(){return this.#t.get("","api/JournalLoader/RecordExpense")}getJournalEntryData(t,r={}){return this.#t.post("","api/Journal/JournalEntry",t,r)}getJournalEntryInfo(t){let r={ID:t};return this.#t.get("","/api/Journal/Info",{params:r})}getJournalEntryForm(t){return this.#t.get("",`api/journalloader/form/${t}`).pipe()}getJournalEntryCount(t){return this.#t.post("","api/Journal/JournalEntryCount",t)}getJournalEntryCustomerSuggestions(t){let r={Prefix:t,Count:100};return this.#t.get(this.authService.getTenantExternalURL(),"/API/AC/GetCustomerSuggestion",{params:r})}getJournalEntrySupplierSuggestions(t){let r={Prefix:t,Count:100};return this.#t.get(this.authService.getTenantExternalURL(),"/API/AC/GetSupplierSuggestion",{params:r})}submitJournalEntry(t){return this.#t.post(void 0,"api/journal/submit",t,{observe:"response"})}deleteJournalEntry(t){let r={params:{ID:t.join(",")}};return this.#t.delete(void 0,"/api/Journal/delete",r)}fetchCategoryOptions(){return this.#t.get("","api/ChartOfAccount/CategoryOptions")}submitChartAccount(t,r={}){return this.#t.post("","api/ChartOfAccount/Submit",t,r)}getImageFileName(t){return new URL(t).pathname.split("/").pop()||""}importPreviewJournal(t){return this.#t.post(void 0,"api/Journal/ImportPreview",t)}importConfirmJournal(t){return this.#t.post(void 0,"api/Journal/ImportConfirm",t)}static{this.\u0275fac=function(r){return new(r||e)}}static{this.\u0275prov=o({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();export{h as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as F}from"./chunk-W24I5WPW.js";import{a as Be,b as Oe}from"./chunk-HHJMN4BS.js";import{a as He}from"./chunk-MDH73MG3.js";import{b as D}from"./chunk-XILGARZ5.js";import"./chunk-MFH4UZ6J.js";import{a as ae}from"./chunk-VVHTNAHQ.js";import"./chunk-YOUPD27G.js";import{a as je}from"./chunk-XKI7WLHE.js";import"./chunk-AZUQDRJU.js";import"./chunk-C2GO6SPF.js";import{a as j,b as H}from"./chunk-O4QM64EH.js";import{d as ke,i as Pe,j as Me,k as ze}from"./chunk-EW3R2HAB.js";import{a as Fe,b as Je}from"./chunk-OLOVFS3Y.js";import"./chunk-QCLAOAVG.js";import"./chunk-Q33XIUDN.js";import"./chunk-PKN47FQE.js";import{a as Re,b as Ne}from"./chunk-LRRVQSMI.js";import"./chunk-42UIGXWH.js";import"./chunk-NA5YXAMJ.js";import"./chunk-253IFSMV.js";import"./chunk-QYXQYPHB.js";import"./chunk-FBEBMNVC.js";import"./chunk-6NGIQJIP.js";import"./chunk-YDEVG4CR.js";import{g as Ae,h as De}from"./chunk-UYC454VQ.js";import{b as Te,c as Ve}from"./chunk-C7LM5UCK.js";import{a as Se,b as be}from"./chunk-J4XRJAME.js";import{a as w,b as ve,c as we,d as ye,e as Ee,f as Ie}from"./chunk-JBSIAXM5.js";import"./chunk-GH5Z5SPB.js";import{n as ge,o as he,w as xe,x as Ce}from"./chunk-67VPWIWW.js";import"./chunk-BHV2HCJY.js";import{b as le,c as pe,e as me,f as se,k as ce,l as ue,o as de,v as fe,y as _e}from"./chunk-FMVCTBCQ.js";import"./chunk-P3V7Z3A6.js";import"./chunk-VFEEFGWW.js";import"./chunk-F2X3VGZZ.js";import{c as ee,e as te,f as ie,i as ne,k as oe,m as re}from"./chunk-B63BKC6F.js";import{Ab as W,Ac as V,Cb as x,Ga as k,Jc as I,Kb as c,Kc as Z,Lc as A,Mc as v,Nb as $,Ub as r,Vb as o,Wb as S,X as N,Yc as T,Z as U,_b as y,bb as L,c as J,cb as G,dc as E,ec as _,gb as l,ha as C,pa as g,qa as h,qc as s,rc as b,s as R,sc as P,uc as q,vc as Q,wb as K,wc as M,xc as X,yc as Y,zc as z}from"./chunk-JP6RBSB3.js";import{a as u,b as f}from"./chunk-YQFG5XE2.js";var qe={data:{data:[],totalCount:0},filter:{number:null,outletName:null,from:null,to:null,supplierID:null,pageNumber:1,rowCount:20,pageSize:20,export:!1,exportPageNumber:1,exportRowCount:1e4,paymentState:0},meta:{options:{outlets:[]},filter:{number:null,outletName:null,from:null,to:null,supplierID:null,pageNumber:1,rowCount:20,pageSize:20,export:!1,exportPageNumber:1,exportRowCount:1e4,paymentState:0}}},B=ve(Ie(qe),we(t=>({first:T(()=>(t.filter().pageNumber-1)*t.filter().pageSize+1),end:T(()=>Math.min(t.filter().pageNumber*t.filter().pageSize,t.data().totalCount)),hasCheckedRows:T(()=>t.data().data.some(a=>a.checked)),checkedAPCollection:T(()=>t.data().data.filter(a=>a.checked).map(a=>a.id))})),Ee(t=>{let a=C(F),e=C(D);return{updateFilter(n){w(t,i=>f(u({},i),{filter:u(u({},i.filter),n)}))},onRowSelect(n){w(t,i=>{let d=i.data.data.map(m=>m.id===n.id?f(u({},m),{checked:!0}):m);return f(u({},i),{data:f(u({},i.data),{data:d})})})},onRowUnselect(n){w(t,i=>{let d=i.data.data.map(m=>m.id===n.id?f(u({},m),{checked:!1}):m);return f(u({},i),{data:f(u({},i.data),{data:d})})})},onHeaderCheckboxToggle(n){w(t,i=>{let d=i.data.data.map(m=>f(u({},m),{checked:n}));return f(u({},i),{data:f(u({},i.data),{data:d})})})},getAPLoader:j(J(N(()=>a.getAPJournalLoader().pipe(H({next:n=>{w(t,i=>f(u({},i),{meta:n}))},error:n=>{console.error("Error fetching AP journal:",n)}}))))),getARCollection:j(J(R(n=>Object.entries(n).reduce((i,[d,m])=>(m!=null&&(i[d]=m),i),{})),N(n=>a.getAPJournal(n).pipe(R(i=>f(u({},i),{data:i.data.map(d=>f(u({},d),{due:e.from(d.due)?e.from(d.due).format():null,checked:!1}))})),H({next:i=>{w(t,d=>f(u({},d),{data:i}))},error:i=>{console.error("Error fetching customer invoice:",i)}})))))}}),ye(t=>({onInit:()=>{t.getAPLoader(),t.getARCollection(t.filter)}})));var Qe=()=>({height:"calc(100vh - 70px)"}),O=t=>({"ng-invalid ng-dirty":t}),Xe=()=>({});function Ye(t,a){if(t&1){let e=y();r(0,"p-button",10),E("onClick",function(){g(e);let n=_(2);return h(n.onCreateJournal())}),o()}}function Ze(t,a){if(t&1&&x(0,Ye,1,0,"p-button",9),t&2){let e=_();c("ngIf",e.store.hasCheckedRows())}}function et(t,a){t&1&&(r(0,"tr")(1,"th",12),S(2,"p-tableHeaderCheckbox"),o(),r(3,"th",13),s(4,"Outlet"),o(),r(5,"th",14),s(6,"Number"),o(),r(7,"th",15),s(8,"Supplier"),o(),r(9,"th",16),s(10,"Date"),o(),r(11,"th",16),s(12,"Due"),o(),r(13,"th",15),s(14,"Note"),o(),r(15,"th",17),s(16,"Payment"),o(),S(17,"th",12),o())}function tt(t,a){if(t&1&&(r(0,"tr")(1,"td"),S(2,"p-tableCheckbox",18),o(),r(3,"td"),s(4),o(),r(5,"td")(6,"a",19),s(7),o()(),r(8,"td"),s(9),o(),r(10,"td"),s(11),I(12,"date"),o(),r(13,"td"),s(14),I(15,"date"),o(),r(16,"td"),S(17,"div",20),o(),r(18,"td"),s(19),o(),r(20,"td"),S(21,"p-button",21),o()()),t&2){let e=a.$implicit,p=_(2);l(2),c("value",e),l(2),b(e.outlet),l(2),c("href",p.authService.getTenantExternalURL()+"/menu/Debt/Debt/Join_Bill/New_Join_Bill/Info?ID="+e.id,G),l(),P(" ",e.number," "),l(2),b(e.customer),l(2),b(A(12,12,e.date,"d MMM y")),l(3),b(e.due?A(15,15,e.due,"d MMM y hh:mm"):"-"),l(3),c("innerHTML",e.note,L),l(2),b(e.payment),l(2),c("icon",e.integrated?"fa-solid fa-circle-check":"fa-solid fa-circle-xmark")("severity",e.integrated?"success":"danger")("text",!0)}}function it(t,a){if(t&1&&s(0),t&2){let e=_(2);q(" Showing ",e.store.first()," to ",e.store.end()," of ",e.store.data().totalCount," entries ")}}function nt(t,a){t&1&&(r(0,"tr")(1,"td",22)(2,"span"),s(3,"No records found."),o()()())}function ot(t,a){if(t&1){let e=y();r(0,"p-panel")(1,"p-table",11),E("onPage",function(n){g(e);let i=_();return h(i.onPageChange(n))})("onHeaderCheckboxToggle",function(n){g(e);let i=_();return h(i.onHeaderCheckboxToggle(n))})("onRowSelect",function(n){g(e);let i=_();return h(i.onRowSelect(n))})("onRowUnselect",function(n){g(e);let i=_();return h(i.onRowUnselect(n))}),x(2,et,18,0,"ng-template",null,3,v)(4,tt,22,18,"ng-template",null,4,v)(6,it,1,3,"ng-template",null,5,v)(8,nt,4,0,"ng-template",null,6,v),o()()}if(t&2){let e=_();$(z(9,Qe)),l(),c("value",e.store.data().data)("scrollable",!0)("scrollHeight","calc(100vh - 142px)")("paginator",!0)("rows",e.store.filter().pageSize)("totalRecords",e.store.data().totalCount)("lazy",!0)}}function rt(t,a){if(t&1&&(r(0,"span",32),s(1),I(2,"truncate"),o()),t&2){let e=a.$implicit;c("pTooltip",e.name),l(),P(" ",A(2,2,e.name,30)," ")}}function at(t,a){if(t&1&&(r(0,"div")(1,"span",34),s(2),o()()),t&2){let e=a.$implicit;l(2),b(e)}}function lt(t,a){if(t&1&&(r(0,"div"),x(1,at,3,1,"div",33),o()),t&2){let e=_(2);l(),c("ngForOf",e.getErrors("from"))}}function pt(t,a){if(t&1&&(r(0,"div")(1,"span",34),s(2),o()()),t&2){let e=a.$implicit;l(2),b(e)}}function mt(t,a){if(t&1&&(r(0,"div"),x(1,pt,3,1,"div",33),o()),t&2){let e=_(2);l(),c("ngForOf",e.getErrors("to"))}}function st(t,a){if(t&1&&(r(0,"div")(1,"span",34),s(2),o()()),t&2){let e=a.$implicit;l(2),b(e)}}function ct(t,a){if(t&1&&(r(0,"div"),x(1,st,3,1,"div",33),o()),t&2){let e=_(2);l(),c("ngForOf",e.getErrors("pageSize"))}}function ut(t,a){if(t&1){let e=y();r(0,"form",23)(1,"div",24)(2,"label",25),s(3,"Outlet"),o(),r(4,"p-select",26),x(5,rt,3,5,"ng-template",null,7,v),o()(),r(7,"div",24)(8,"label",25),s(9,"From"),o(),S(10,"p-datepicker",27),x(11,lt,2,1,"div",28),o(),r(12,"div",24)(13,"label",25),s(14,"To"),o(),S(15,"p-datepicker",29),x(16,mt,2,1,"div",28),o(),r(17,"div",24)(18,"label",25),s(19,"Supplier"),o(),r(20,"p-autocomplete",30),I(21,"async"),E("completeMethod",function(n){g(e);let i=_();return h(i.onSearchSupplier(n))}),o()(),r(22,"div",24)(23,"label",25),s(24,"Page Size"),o(),S(25,"input",31),x(26,ct,2,1,"div",28),o()()}if(t&2){let e=_();c("formGroup",e.form),l(4),c("virtualScrollItemSize",50)("options",e.store.meta().options.outlets),l(6),c("iconDisplay","input")("showIcon",!0)("ngClass",V(17,O,e.isInvalid("from"))),l(),c("ngIf",e.isInvalid("from")),l(4),c("iconDisplay","input")("showIcon",!0)("ngClass",V(19,O,e.isInvalid("to"))),l(),c("ngIf",e.isInvalid("to")),l(4),c("suggestions",Z(21,15,e.supplierSuggestions$)),l(5),c("autoNumeric",z(21,Xe))("ngClass",V(22,O,e.isInvalid("pageSize"))),l(),c("ngIf",e.isInvalid("pageSize"))}}var ti=(()=>{class t extends je{constructor(){super(),this.store=C(B),this.generateJournalService=C(F),this.authService=C(ae),this.isDialogFilterVisible=k(!1),this.isInitDialogFilterVisible=k(!1),this.fb=C(fe),this.dayjsService=C(D)}ngOnInit(){this.initform()}initform(){let{outletName:e,number:p,from:n,to:i,paymentState:d,supplierID:m,pageNumber:Ue,rowCount:Le,pageSize:Ge,export:Ke,exportPageNumber:We,exportRowCount:$e}=this.store.filter();this.form=this.fb.group({outletName:this.fb.control(e),number:this.fb.control(p),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(d),supplierID:this.fb.control(m),pageNumber:this.fb.control(Ue),rowCount:this.fb.control(Le),pageSize:this.fb.control(Ge,[pe.required]),export:this.fb.control(Ke),exportPageNumber:this.fb.control(We),exportRowCount:this.fb.control($e)})}onFilterOKEvent(){if(this.form.invalid){this.form.markAllAsTouched();return}let e=Object.entries(this.form.getRawValue()).reduce((p,[n,i])=>(i!=null&&(n==="from"||n==="to"?(typeof i=="string"||typeof i=="number"||i instanceof Date)&&(p[n]=this.dayjsService.from(i)?this.dayjsService.format(i):null):p[n]=i),p),{});this.store.updateFilter(e),this.isDialogFilterVisible.update(p=>!p)}onSearch(e){this.store.updateFilter(f(u({},this.store.filter()),{number:e}))}onSearchSupplier(e){this.supplierSuggestions$=this.generateJournalService.getSupplierSuggestions(e.query).pipe()}onPageChange(e){let p=e.first/e.rows;this.store.updateFilter(f(u({},this.store.filter()),{pageNumber:p+1}))}onHeaderCheckboxToggle(e){this.store.onHeaderCheckboxToggle(e.checked)}onRowSelect(e){this.store.onRowSelect(e.data)}onRowUnselect(e){if(Array.isArray(e.data)){e.data.forEach(p=>{this.store.onRowUnselect(p)});return}else this.store.onRowUnselect(e.data)}onCreateJournal(){this.generateJournalService.createAPJournal(this.store.checkedAPCollection()).pipe(U(()=>{this.store.getARCollection(this.store.filter)})).subscribe()}static{this.\u0275fac=function(p){return new(p||t)}}static{this.\u0275cmp=K({type:t,selectors:[["app-ap-journal"]],features:[Y([B]),W],decls:7,vars:4,consts:[["actionButton",""],["content",""],["filters",""],["header",""],["body",""],["paginatorleft",""],["emptymessage",""],["item",""],["pageTitle","AP Collection",3,"isDialogFilterVisibleChange","isInitDialogFilterVisibleChange","filterConfirmed","search","isSearchableInput","isFilterable","isDialogFilterVisible","isInitDialogFilterVisible"],["label","Generate Journal",3,"onClick",4,"ngIf"],["label","Generate Journal",3,"onClick"],["dataKey","id",3,"onPage","onHeaderCheckboxToggle","onRowSelect","onRowUnselect","value","scrollable","scrollHeight","paginator","rows","totalRecords","lazy"],[2,"width","4rem"],[2,"width","10rem"],[2,"width","12rem"],[2,"width","14rem"],[2,"width","11rem"],[2,"width","9rem"],[3,"value"],["target","_blank",1,"link","link-primary",3,"href"],[3,"innerHTML"],[3,"icon","severity","text"],["colspan","9"],[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","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(p,n){if(p&1){let i=y();r(0,"app-main-panel",8),X("isDialogFilterVisibleChange",function(m){return g(i),M(n.isDialogFilterVisible,m)||(n.isDialogFilterVisible=m),h(m)})("isInitDialogFilterVisibleChange",function(m){return g(i),M(n.isInitDialogFilterVisible,m)||(n.isInitDialogFilterVisible=m),h(m)}),E("filterConfirmed",function(){return g(i),h(n.onFilterOKEvent())})("search",function(m){return g(i),h(n.onSearch(m))}),x(1,Ze,1,1,"ng-template",null,0,v)(3,ot,10,10,"ng-template",null,1,v)(5,ut,27,24,"ng-template",null,2,v),o()}p&2&&(c("isSearchableInput",!0)("isFilterable",!0),Q("isDialogFilterVisible",n.isDialogFilterVisible)("isInitDialogFilterVisible",n.isInitDialogFilterVisible))},dependencies:[De,ze,ke,Pe,Me,re,ee,te,ie,ne,oe,Ce,xe,be,Se,_e,ce,le,me,se,ue,de,Ne,Re,Je,Fe,he,ge,Oe,Be,Ve,Te,Ae,He],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();export{ti as ApJournalComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as r}from"./chunk-
|
|
1
|
+
import{a as r}from"./chunk-P3V7Z3A6.js";import{ba as i,ha as n}from"./chunk-JP6RBSB3.js";var u=(()=>{class e{constructor(){this.httpService=n(r)}getClosingEntries(t){return this.httpService.get(void 0,"api/SetupClosingEntries/GetAll",{params:t})}createClosingEntry(t){return this.httpService.post(void 0,"api/SetupClosingEntries/Submit",t)}deleteClosingEntry(t){return this.httpService.delete(void 0,`api/SetupClosingEntries/Delete?closingEntryIds=${t}`)}getClosingEntryCount(){return this.httpService.get(void 0,"api/SetupClosingEntries/GetAllCount")}static{this.\u0275fac=function(o){return new(o||e)}}static{this.\u0275prov=i({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();export{u as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as K}from"./chunk-3LDYJV3L.js";import{b as J}from"./chunk-XILGARZ5.js";import"./chunk-MFH4UZ6J.js";import{a as q,b as z}from"./chunk-TVNXFJII.js";import{a as H}from"./chunk-XKI7WLHE.js";import{a as O,b as W}from"./chunk-OLOVFS3Y.js";import"./chunk-QCLAOAVG.js";import"./chunk-Q33XIUDN.js";import"./chunk-253IFSMV.js";import"./chunk-QYXQYPHB.js";import{h as I}from"./chunk-UYC454VQ.js";import"./chunk-C7LM5UCK.js";import{a as G,b as A}from"./chunk-J4XRJAME.js";import"./chunk-JBSIAXM5.js";import"./chunk-GH5Z5SPB.js";import{o as j,w as k,x as B}from"./chunk-67VPWIWW.js";import"./chunk-BHV2HCJY.js";import{b as y,e as D,f as M,k as T,l as w,o as N,v as V,y as R}from"./chunk-FMVCTBCQ.js";import"./chunk-P3V7Z3A6.js";import"./chunk-VFEEFGWW.js";import"./chunk-F2X3VGZZ.js";import{F as P,m as F}from"./chunk-B63BKC6F.js";import{Ab as S,Cb as p,Kb as c,Mc as a,Ub as i,Vb as t,Wb as f,Z as C,_b as b,dc as E,ec as u,gb as _,ha as m,pa as x,qa as h,qc as l,wb as v}from"./chunk-JP6RBSB3.js";import"./chunk-YQFG5XE2.js";function L(e,d){if(e&1){let o=b();i(0,"p-button",4),E("onClick",function(){x(o);let n=u();return h(n.onSubmit())}),t()}}function Q(e,d){e&1&&(i(0,"div",13)(1,"h3",14),l(2,"General"),t(),i(3,"span",15),l(4,"Enter your closing Fiscal Date"),t()())}function U(e,d){if(e&1&&(i(0,"div",5)(1,"div",6)(2,"p-panel"),p(3,Q,5,0,"ng-template",null,2,a),i(5,"div",5)(6,"div",7)(7,"form",8)(8,"div",9)(9,"label",10),l(10,"Period"),t(),f(11,"p-datePicker",11),t(),i(12,"div",9)(13,"label",10),l(14,"Description"),t(),f(15,"textarea",12),t()()()()()()()),e&2){let o=u();_(7),c("formGroup",o.form)}}var he=(()=>{class e extends H{constructor(){super(),this.closingEntriesService=m(K),this.dayjsService=m(J),this.fb=m(V),this.router=m(P)}ngOnInit(){this.initForm()}initForm(){this.form=this.fb.group({Period:this.fb.control(new Date),Note:this.fb.control("")})}onSubmit(){if(this.form.invalid){this.form.markAllAsTouched();return}let{Period:o}=this.form.getRawValue(),r=Object.entries(this.form.getRawValue()).reduce((n,[s,g])=>(s==="Period"?n[s]=this.dayjsService.from(o)?this.dayjsService.format(g):"":n[s]=g,n),{});this.closingEntriesService.createClosingEntry(r).pipe(C(()=>{this.router.navigate(["/pages/accounting-setup/closing-entries"])})).subscribe()}static{this.\u0275fac=function(r){return new(r||e)}}static{this.\u0275cmp=v({type:e,selectors:[["app-closing-form"]],features:[S],decls:5,vars:1,consts:[["actionButton",""],["content",""],["header",""],["pageTitle","Closing Entries Form",3,"hasMainWrapperPadding"],["label","Submit",3,"onClick"],[1,"row"],[1,"col"],[1,"col-4"],[1,"d-flex","flex-column","row-gap-3",3,"formGroup"],[1,"d-flex","flex-column"],["for",""],["formControlName","Period","fluid",""],["formControlName","Note","rows","5","cols","30","pTextarea",""],[1,"d-flex","flex-column","mx-2"],[1,"fs-5","m-0"],[1,"fs-3"]],template:function(r,n){r&1&&(i(0,"app-main-panel",3),p(1,L,1,0,"ng-template",null,0,a)(3,U,16,1,"ng-template",null,1,a),t()),r&2&&c("hasMainWrapperPadding",!0)},dependencies:[I,F,A,G,W,O,j,z,q,B,k,R,T,y,D,M,w,N],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return e})();export{he as ClosingFormComponent};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as ce,b as u,c as he,d as f,f as b}from"./chunk-
|
|
1
|
+
import{a as ce,b as u,c as he,d as f,f as b}from"./chunk-67VPWIWW.js";import{A as j,C as se,Ja as le,Ma as ae,Na as C,S as Z,Va as de,ca as re,ja as m}from"./chunk-FMVCTBCQ.js";import{c as oe,d as R,f as I,h as V,i as M,k as A}from"./chunk-F2X3VGZZ.js";import{c as W,f as X,g as ee,h as te,m as ie,n as ne}from"./chunk-B63BKC6F.js";import{Aa as Q,Ab as P,Ac as _,Cb as g,Cc as G,Ic as J,Kb as d,Ob as w,Ub as T,Vb as S,Zb as q,_b as E,ba as z,ca as H,dc as k,ec as r,fc as U,gb as O,gc as $,ha as F,jc as D,kc as L,lc as v,mb as x,mc as y,pa as h,qa as p,ta as B,wb as K,xb as N,yc as Y,za as s}from"./chunk-JP6RBSB3.js";import{a as c}from"./chunk-YQFG5XE2.js";var pe=["content"],be=["overlay"],Oe=["*"],xe=(i,l,e,t,n,o,a,ye,me,ue,fe,ge,_e,Ce)=>({"p-overlay p-component":!0,"p-overlay-modal p-overlay-mask p-overlay-mask-enter":i,"p-overlay-center":l,"p-overlay-top":e,"p-overlay-top-start":t,"p-overlay-top-end":n,"p-overlay-bottom":o,"p-overlay-bottom-start":a,"p-overlay-bottom-end":ye,"p-overlay-left":me,"p-overlay-left-start":ue,"p-overlay-left-end":fe,"p-overlay-right":ge,"p-overlay-right-start":_e,"p-overlay-right-end":Ce}),we=(i,l,e)=>({showTransitionParams:i,hideTransitionParams:l,transform:e}),Te=i=>({value:"visible",params:i}),Se=i=>({mode:i}),Ee=i=>({$implicit:i});function ke(i,l){i&1&&q(0)}function De(i,l){if(i&1){let e=E();T(0,"div",3,1),k("click",function(n){h(e);let o=r(2);return p(o.onOverlayContentClick(n))})("@overlayContentAnimation.start",function(n){h(e);let o=r(2);return p(o.onOverlayContentAnimationStart(n))})("@overlayContentAnimation.done",function(n){h(e);let o=r(2);return p(o.onOverlayContentAnimationDone(n))}),$(2),g(3,ke,1,0,"ng-container",4),S()}if(i&2){let e=r(2);w(e.contentStyleClass),d("ngStyle",e.contentStyle)("ngClass","p-overlay-content")("@overlayContentAnimation",_(11,Te,G(7,we,e.showTransitionOptions,e.hideTransitionOptions,e.transformOptions[e.modal?e.overlayResponsiveDirection:"default"]))),O(3),d("ngTemplateOutlet",e.contentTemplate||e._contentTemplate)("ngTemplateOutletContext",_(15,Ee,_(13,Se,e.overlayMode)))}}function Le(i,l){if(i&1){let e=E();T(0,"div",3,0),k("click",function(){h(e);let n=r();return p(n.onOverlayClick())}),g(2,De,4,17,"div",2),S()}if(i&2){let e=r();w(e.styleClass),d("ngStyle",e.style)("ngClass",J(5,xe,[e.modal,e.modal&&e.overlayResponsiveDirection==="center",e.modal&&e.overlayResponsiveDirection==="top",e.modal&&e.overlayResponsiveDirection==="top-start",e.modal&&e.overlayResponsiveDirection==="top-end",e.modal&&e.overlayResponsiveDirection==="bottom",e.modal&&e.overlayResponsiveDirection==="bottom-start",e.modal&&e.overlayResponsiveDirection==="bottom-end",e.modal&&e.overlayResponsiveDirection==="left",e.modal&&e.overlayResponsiveDirection==="left-start",e.modal&&e.overlayResponsiveDirection==="left-end",e.modal&&e.overlayResponsiveDirection==="right",e.modal&&e.overlayResponsiveDirection==="right-start",e.modal&&e.overlayResponsiveDirection==="right-end"])),O(2),d("ngIf",e.visible)}}var Re=({dt:i})=>`
|
|
2
2
|
.p-overlay {
|
|
3
3
|
position: absolute;
|
|
4
4
|
top: 0;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import{a as Le,b as Ve}from"./chunk-HHJMN4BS.js";import{a as yt,b as be}from"./chunk-XILGARZ5.js";import"./chunk-MFH4UZ6J.js";import{a as we}from"./chunk-VVHTNAHQ.js";import{b as xt,c as St,d as Ct}from"./chunk-KJ6CKUEI.js";import{a as ye,b as ve}from"./chunk-YRCXWYJC.js";import"./chunk-YOUPD27G.js";import{b as ht}from"./chunk-YO23YVSC.js";import"./chunk-AZUQDRJU.js";import{a as me}from"./chunk-6ACYDH2N.js";import"./chunk-C2GO6SPF.js";import{a as q,b as H}from"./chunk-O4QM64EH.js";import{a as _t,b as ft,d as Se,k as Ce}from"./chunk-EW3R2HAB.js";import{a as he,b as xe}from"./chunk-OLOVFS3Y.js";import"./chunk-QCLAOAVG.js";import"./chunk-Q33XIUDN.js";import{a as gt}from"./chunk-C6U3U6SW.js";import{a as Ie}from"./chunk-XKCLERWG.js";import{a as oe,b as Re}from"./chunk-4LGDNQMZ.js";import"./chunk-PKN47FQE.js";import{b as Te}from"./chunk-LRRVQSMI.js";import"./chunk-42UIGXWH.js";import"./chunk-NA5YXAMJ.js";import"./chunk-253IFSMV.js";import"./chunk-QYXQYPHB.js";import"./chunk-FBEBMNVC.js";import{d as st}from"./chunk-6NGIQJIP.js";import"./chunk-YDEVG4CR.js";import{b as ge}from"./chunk-5R3XKSDM.js";import{f as ut,h as fe}from"./chunk-UYC454VQ.js";import"./chunk-C7LM5UCK.js";import{a as le,b as pe}from"./chunk-J4XRJAME.js";import{a as V,b as ce,c as se,d as de,e as ue,f as _e,g as dt}from"./chunk-JBSIAXM5.js";import"./chunk-GH5Z5SPB.js";import{w as re,x as ae}from"./chunk-67VPWIWW.js";import"./chunk-BHV2HCJY.js";import{e as X,f as Z,g as mt,i as G,k as ee,l as te,o as ie,t as ct,v as De,y as ne}from"./chunk-FMVCTBCQ.js";import{a as pt}from"./chunk-P3V7Z3A6.js";import{a as lt}from"./chunk-VFEEFGWW.js";import"./chunk-F2X3VGZZ.js";import{D as at,G as J,N as Q,f as z,k as ot,l as U,m as $,s as rt}from"./chunk-B63BKC6F.js";import{Ac as F,Cb as x,D as Fe,Ga as L,Jc as S,Kb as c,Kc as C,L as Je,Lc as it,Mc as s,Nb as j,Pb as O,Qb as ke,Sb as Be,Tb as Oe,Ub as n,V as Qe,Vb as i,W as Xe,Wb as I,X as P,Yc as T,Z as M,Zc as nt,_b as D,ba as Ze,c as A,cb as et,dc as w,ec as d,gb as l,ha as g,hc as tt,pa as v,qa as b,qc as a,rc as _,s as $e,sc as R,vc as Y,wb as k,wc as N,xc as W,yc as K,zc as E}from"./chunk-JP6RBSB3.js";import{a as h,b as y,c as Me,e as Ue}from"./chunk-YQFG5XE2.js";var B=(()=>{class t{constructor(){this.httpService=g(pt),this.authService=g(we)}fetchGeneralLedgerLoader(){return this.httpService.get(void 0,"api/GeneralLedgerLoader/GetFilter")}fetchGeneralLedgerReport(e){return this.httpService.post(void 0,"api/GeneralLedger/Get",e)}exportGeneralLedger(e){let o={responseType:"blob"};return this.httpService.post(void 0,"/api/GeneralLedgerExport/GetGeneralLedgerExport",e,o)}getCustomerSuggestions(e){let o={Prefix:e,Count:100};return this.httpService.get(this.authService.getTenantExternalURL(),"/API/AC/GetCustomerSuggestion",{params:o})}getSupplierSuggestions(e){let o={Prefix:e,Count:100};return this.httpService.get(this.authService.getTenantExternalURL(),"/API/AC/GetSupplierSuggestion",{params:o})}getCashierSuggestions(e){let o={Prefix:e,Count:100};return this.httpService.get(this.authService.getTenantExternalURL(),"/api/ac/GetUserSuggestion",{params:o})}getBalanceSheetLoader(){return this.httpService.get(void 0,"/api/BalanceSheetLoader/GetBalanceSheet")}getBalanceSheet(e,o={}){let r=new rt({fromObject:Object.fromEntries(Object.entries(e).map(([f,u])=>[f,String(u)]))}),m=h({params:r},o);return this.httpService.get(void 0,"/api/BalanceSheet",m)}getIncomeStatementLoader(){return this.httpService.get(void 0,"api/IncomeStatementLoader/Filter")}getIncomeStatement(e,o={}){return this.httpService.post(void 0,"api/IncomeStatement/List",h({},e),o)}static{this.\u0275fac=function(o){return new(o||t)}}static{this.\u0275prov=Ze({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var Gt={metadata:{filter:{listAccountID:[],from:null,to:null,listOutletID:[],listCategoryID:[],contactType:0,contactID:""},options:{accounts:[],outlets:[],contactTypeOptions:[]},roles:{isInEmptyOutletRole:!1}},items:{data:[],pageTitle:""},filter:{listAccountID:[],from:null,to:null,listOutletID:[],listCategoryID:[],contactType:1,contactID:null}},Ge=ce(_e(Gt),dt("General Ledger Store"),se(t=>({debitTotal:T(()=>t.items.data().reduce((p,e)=>p+e.data.reduce((o,r)=>o+(r.debitAmount||0),0),0)),creditTotal:T(()=>t.items.data().reduce((p,e)=>p+e.data.reduce((o,r)=>o+(r.creditAmount||0),0),0))})),ue(t=>{let p=g(B),e={updateFilter:o=>{V(t,r=>y(h({},r),{filter:o}))},loadList:q(A(Fe(o=>o.listAccountID.length>0),P(o=>p.fetchGeneralLedgerReport(o).pipe(H({next:r=>{V(t,m=>y(h({},m),{items:r}))},error:r=>{console.error(r)}}))))),loadLoader:q(A(P(()=>p.fetchGeneralLedgerLoader().pipe(H({next:o=>{V(t,r=>y(h({},r),{metadata:o,filter:y(h({},r.filter),{listCategoryID:o.filter.listCategoryID})})),e.loadList(t.filter)},error:o=>{console.error(o)}})))))};return e}),de({onInit:t=>{t.loadLoader()}}));var jt=()=>({height:"calc(100vh - 70px)"}),Nt=()=>({height:"calc(100vh - 100px)"}),qt=t=>["/pages/journal/journal-entry/",t],Ht=()=>({scrollHeight:"250px"});function Yt(t,p){if(t&1){let e=D();n(0,"p-button",14),w("onClick",function(){v(e);let r=d(2);return b(r.onExport())}),i()}}function Wt(t,p){if(t&1&&(n(0,"div",11)(1,"a",12),a(2,"Return to Accounts"),i(),x(3,Yt,1,0,"p-button",13),i()),t&2){let e=d();l(3),c("ngIf",e.roleService.global.export)}}function Kt(t,p){if(t&1&&(n(0,"div",11)(1,"span",17)(2,"h2",18),a(3),i()(),n(4,"span",17)(5,"h2",18),a(6),i()()()),t&2){let e=d().$implicit;l(3),_(e.name),l(3),R(" (",e.chartOfAccountCode,") ")}}function zt(t,p){t&1&&(n(0,"tr")(1,"th",19),a(2,"Outlet"),i(),n(3,"th",19),a(4,"No."),i(),n(5,"th",19),a(6,"Date"),i(),n(7,"th",19),a(8,"Name"),i(),n(9,"th",19),a(10,"Description"),i(),n(11,"th",20),a(12,"Debit"),i(),n(13,"th",21),a(14,"Credit"),i(),n(15,"th",21),a(16,"Balance"),i()())}function Ut(t,p){if(t&1&&(n(0,"td",26),a(1,"Starting Balance"),i(),n(2,"td",27),a(3),S(4,"number"),i()),t&2){let e=d(2).$implicit;l(3),R(" ",C(4,1,e.startBalance)," ")}}function $t(t,p){if(t&1&&(n(0,"tr"),x(1,Ut,5,3),i(),n(2,"tr")(3,"td",22),a(4),i(),n(5,"td",22)(6,"a",23),a(7),i()(),n(8,"td",22),a(9),S(10,"date"),i(),n(11,"td",22)(12,"a",24),a(13),i()(),I(14,"td"),n(15,"td",25),a(16),S(17,"number"),i(),n(18,"td",25),a(19),S(20,"number"),i(),n(21,"td",25),a(22),S(23,"number"),i()()),t&2){let e=p.$implicit,o=p.rowIndex,r=d(4);l(),O(o===0&&r.store.items().data.length>1?1:-1),l(3),_(e.outletName),l(2),c("routerLink",F(19,qt,e.id)),l(),_(e.number),l(2),_(it(10,10,e.date,"dd MMM yyyy")),l(3),c("href",r.authService.getTenantExternalURL()+"/menu/Contacts/Contact/Customers/Info?ID="+e.contactID,et),l(),_(e.contactName),l(3),R(" ",C(17,13,e.debitAmount)," "),l(3),R(" ",C(20,15,e.creditAmount)," "),l(3),_(C(23,17,e.balance))}}function Jt(t,p){if(t&1&&(n(0,"tr"),I(1,"td",28),n(2,"td",29),a(3,"Total"),i(),n(4,"td",29),a(5),S(6,"number"),i(),n(7,"td",29),a(8),S(9,"number"),i(),I(10,"td"),i()),t&2){let e=d().$index,o=d(3);l(5),R(" ",C(6,2,o.store.items().data[e].debitTotal)," "),l(3),R(" ",C(9,4,o.store.items().data[e].creditTotal)," ")}}function Qt(t,p){t&1&&(n(0,"tr")(1,"td",30)(2,"span"),a(3,"No records found."),i()()())}function Xt(t,p){if(t&1&&(n(0,"p-table",16),x(1,Kt,7,2,"ng-template",null,3,s)(3,zt,17,0,"ng-template",null,4,s)(5,$t,24,21,"ng-template",null,5,s)(7,Jt,11,6,"ng-template",null,6,s)(9,Qt,4,0,"ng-template",null,7,s),i()),t&2){let e=p.$implicit;c("value",e.data)("scrollable",!0)}}function Zt(t,p){if(t&1&&(n(0,"p-panel")(1,"p-scroll-panel"),Be(2,Xt,11,2,"p-table",16,ke),i()()),t&2){let e=d(2);j(E(4,jt)),l(),j(E(5,Nt)),l(),Oe(e.store.items().data)}}function ei(t,p){if(t&1&&x(0,Zt,4,6,"p-panel",15),t&2){let e=d();c("ngIf",e.store.items()&&e.store.items().data.length)}}function ti(t,p){if(t&1&&(n(0,"div",11)(1,"div",17)(2,"span",42),a(3),i()(),n(4,"div")(5,"span"),a(6,"-"),i()(),n(7,"div",17)(8,"span",43),a(9),i()()()),t&2){let e=p.$implicit;l(3),R("(",e.code,")"),l(6),_(e.name)}}function ii(t,p){if(t&1&&(n(0,"div",11)(1,"div",17)(2,"span",42),a(3),i()(),n(4,"div")(5,"span"),a(6,"-"),i()(),n(7,"div",17)(8,"span",43),a(9),i()()()),t&2){let e=p.$implicit;l(3),R("(",e.code,")"),l(6),_(e.name)}}function ni(t,p){if(t&1&&(n(0,"div",44)(1,"div"),a(2),i()()),t&2){let e=p.$implicit;l(2),_(e.value)}}function oi(t,p){if(t&1&&(n(0,"div",41),I(1,"p-radiobutton",45),n(2,"label",46),a(3),i()()),t&2){let e=p.$implicit;l(),c("value",e.key)("inputId",e.key),l(),tt("for",e.key),l(),_(e.value)}}function ri(t,p){if(t&1){let e=D();n(0,"div",32)(1,"label",33),a(2,"Customer"),i(),n(3,"p-autocomplete",47),w("completeMethod",function(r){v(e);let m=d(2);return b(m.searchCustomer(r))}),i()()}if(t&2){let e=d(2);l(3),c("suggestions",e.customerSuggestions())}}function ai(t,p){if(t&1){let e=D();n(0,"div",32)(1,"label",33),a(2,"Supplier"),i(),n(3,"p-autocomplete",48),w("completeMethod",function(r){v(e);let m=d(2);return b(m.searchSupplier(r))}),i()()}if(t&2){let e=d(2);l(3),c("suggestions",e.supplierSuggestions())}}function li(t,p){if(t&1){let e=D();n(0,"div",32)(1,"label",33),a(2,"Customer"),i(),n(3,"p-autocomplete",47),w("completeMethod",function(r){v(e);let m=d(2);return b(m.searchCustomer(r))}),i()()}if(t&2){let e=d(2);l(3),c("suggestions",e.customerSuggestions())}}function pi(t,p){if(t&1){let e=D();n(0,"form",31)(1,"div",32)(2,"label",33),a(3,"Accounts"),i(),n(4,"p-multiselect",34),w("onChange",function(r){v(e);let m=d();return b(m.onAccountChange(r))}),x(5,ti,10,2,"ng-template",null,8,s)(7,ii,10,2,"ng-template",null,9,s),i()(),n(9,"div",32)(10,"label",33),a(11,"From"),i(),I(12,"p-datepicker",35),i(),n(13,"div",32)(14,"label",33),a(15,"To"),i(),I(16,"p-datepicker",36),i(),n(17,"div",32)(18,"label",33),a(19,"Outlets"),i(),n(20,"p-multiselect",37),x(21,ni,3,1,"ng-template",null,9,s),i()(),n(23,"div",32)(24,"label",33),a(25,"Category"),i(),n(26,"p-treeselect",38),w("onFocus",function(){v(e);let r=d();return b(r.onCategoryFocus())}),i()(),n(27,"div",32)(28,"label",39),a(29,"Contact Type"),i(),n(30,"div",40),Be(31,oi,4,4,"div",41,ke),i()(),x(33,ri,4,1,"div",32)(34,ai,4,1,"div",32)(35,li,4,1,"div",32),i()}if(t&2){let e,o=d();c("formGroup",o.generalLedgerFilterForm),l(4),c("virtualScroll",!0)("virtualScrollItemSize",50)("maxlength",5)("options",o.store.metadata().options.accounts),l(8),c("iconDisplay","input")("showIcon",!0),l(4),c("iconDisplay","input")("showIcon",!0),l(4),c("virtualScroll",!0)("virtualScrollItemSize",50)("options",o.store.metadata().options.outlets),l(6),c("metaKeySelection",!1)("virtualScroll",!0)("virtualScrollItemSize",50)("virtualScrollOptions",E(18,Ht))("options",o.categoriesOptions()),l(5),Oe(o.store.metadata().options.contactTypeOptions),l(2),O((e=o.generalLedgerFilterForm.controls.contactType.value)===1?33:e===2?34:35)}}var Tt=(()=>{class t{constructor(){this.dialogFilterVisible=L(!1),this.reportService=g(B),this.coaService=g(gt),this.authService=g(we),this.store=g(Ge),this.roleService=g(me),this.categoriesOptions=L([]),this.customerSuggestions=L([]),this.supplierSuggestions=L([]),this.route=g(at),this.dayjsService=g(be),this.initDialogVisible=L(!0),this.fb=g(De),this.toastr=g(lt)}ngOnInit(){this.generateFilterForm(),this.route.queryParamMap.pipe($e(e=>e.get("id")),M(e=>{e&&(this.initDialogVisible.update(o=>!o),this.generalLedgerFilterForm.patchValue({listAccountID:[e]}),this.store.updateFilter(y(h({},this.store.filter()),{listAccountID:[e]})))})).subscribe(),this.clearContactValueOnContactTypeChange(),this.generalLedgerFilterForm.valueChanges.pipe(Je(500),M(e=>{Array.isArray(e.listAccountID)&&e.listAccountID.length>0?this.generalLedgerFilterForm.controls.listCategoryID.disable():this.generalLedgerFilterForm.controls.listCategoryID.enable(),e.listCategoryID&&e.listCategoryID.filter(o=>o.key).length>0?this.generalLedgerFilterForm.controls.listAccountID.disable():this.generalLedgerFilterForm.controls.listAccountID.enable()})).subscribe()}clearContactValueOnContactTypeChange(){this.generalLedgerFilterForm.get("contactType")?.valueChanges.subscribe(()=>this.generalLedgerFilterForm.get("contactID")?.setValue(""))}onAccountChange(e){Array.isArray(e.value)&&e.value.length>5&&this.toastr.warning("Please select at least 5 accounts for the general ledger report.","Warning")}onCategoryFocus(){this.coaService.getCachedCategoriesOptions().pipe(M(e=>this.categoriesOptions.set(e))).subscribe()}generateFilterForm(){this.generalLedgerFilterForm=this.fb.group({listAccountID:new G([]),listCategoryID:new G([]),listOutletID:new G([]),contactID:new G(""),from:new G(""),to:new G(""),contactType:new G(1)})}onFilterOKEvent(){let f=this.generalLedgerFilterForm.value,{from:e,to:o}=f,r=Me(f,["from","to"]);if(this.generalLedgerFilterForm.invalid){this.generalLedgerFilterForm.markAllAsTouched(),this.dialogFilterVisible.set(!0);return}let m={listCategoryID:r.listCategoryID?r.listCategoryID.map(u=>u.key):[],contactID:r.contactID.length===0?null:r.contactID,listOutletID:r.listOutletID?r.listOutletID:[],listAccountID:r.listAccountID?r.listAccountID:[],from:this.dayjsService.from(e)?this.dayjsService.format(e):null,to:this.dayjsService.from(o)?this.dayjsService.format(o):null,contactType:r.contactType};this.dialogFilterVisible.update(u=>!u),this.store.updateFilter(m),this.dialogFilterVisible.set(!1)}searchCustomer(e){this.reportService.getCustomerSuggestions(e.query).pipe(M(o=>this.customerSuggestions.set(o))).subscribe()}searchSupplier(e){this.reportService.getSupplierSuggestions(e.query).pipe(M(o=>this.supplierSuggestions.set(o))).subscribe()}onExport(){let f=this.generalLedgerFilterForm.value,{from:e,to:o}=f,r=Me(f,["from","to"]),m={listCategoryID:r.listCategoryID?r.listCategoryID.map(u=>u.key):[],contactID:r.contactID.length===0?null:r.contactID,listOutletID:r.listOutletID?r.listOutletID:[],listAccountID:r.listAccountID?r.listAccountID:[],from:this.dayjsService.from(e)?this.dayjsService.format(e):null,to:this.dayjsService.from(o)?this.dayjsService.format(o):null,contactType:r.contactType};this.reportService.exportGeneralLedger(m).pipe(M(u=>{Ct(u,`general-ledger-${this.dayjsService.now.format("D-MM-YYYY")}.${u.type.split("/")[1]}`,u.type)})).subscribe()}static{this.\u0275fac=function(o){return new(o||t)}}static{this.\u0275cmp=k({type:t,selectors:[["app-report-general-ledger"]],features:[K([Ge])],decls:7,vars:4,consts:[["actionButton",""],["content",""],["filters",""],["caption",""],["header",""],["body",""],["footer",""],["emptymessage",""],["selectedItem",""],["item",""],[3,"isDialogFilterVisibleChange","isInitDialogFilterVisibleChange","filterConfirmed","pageTitle","isDialogFilterVisible","isFilterable","isInitDialogFilterVisible"],[1,"d-flex","gap-2"],["routerLink","/pages/chart-of-account/account",1,"p-button","p-button-secondary","p-button-outlined","fs-3"],["severity","secondary","variant","outlined","icon","fa-solid fa-upload","label","Export",3,"onClick",4,"ngIf"],["severity","secondary","variant","outlined","icon","fa-solid fa-upload","label","Export",3,"onClick"],[3,"style",4,"ngIf"],["scrollHeight","calc(100vh - 150px)",3,"value","scrollable"],[1,""],[1,"fs-5","fw-semibold"],[2,"width","10%"],[1,"text-end",2,"width","10%"],[1,"text-end",2,"width","20%"],[1,"text-break"],["target","_blank",1,"link","link-primary",3,"routerLink"],["target","_blank",1,"link","link-primary",3,"href"],[1,"text-end","text-break"],["colspan","7",1,"text-end"],[1,"text-end"],["colspan","4"],[1,"text-end","fw-semibold"],["colspan","8"],[1,"d-flex","flex-column","row-gap-3",3,"formGroup"],[1,"d-flex","flex-column"],["for","outlet"],["showClear","","filter","","filterBy","code,name","display","chip","formControlName","listAccountID","appendTo","body","optionLabel","name","optionValue","id","placeholder","Select Accounts",3,"onChange","virtualScroll","virtualScrollItemSize","maxlength","options"],["showClear","","formControlName","from","styleClass","w-100","appendTo","body","inputId","icondisplay",3,"iconDisplay","showIcon"],["showClear","","formControlName","to","styleClass","w-100","appendTo","body","inputId","icondisplay",3,"iconDisplay","showIcon"],["showClear","","display","chip","formControlName","listOutletID","appendTo","body","optionLabel","value","optionValue","key","placeholder","Select Outlets",3,"virtualScroll","virtualScrollItemSize","options"],["showClear","","display","chip","selectionMode","multiple","filter","","filterBy","label","formControlName","listCategoryID","appendTo","body","containerStyleClass","w-100","optionLabel","label","optionValue","id","placeholder","Select Category",3,"onFocus","metaKeySelection","virtualScroll","virtualScrollItemSize","virtualScrollOptions","options"],["for",""],[1,"d-flex","gap-3"],[1,"d-flex","align-items-center","gap-2"],[1,"h-full","align-middle"],[1,"text-truncate","d-inline-block","h-full","align-middle"],[1,"flex","items-center","gap-2"],["name","contactType","formControlName","contactType",3,"value","inputId"],[1,"m-0",3,"for"],["formControlName","contactID","appendTo","body","styleClass","w-100","optionLabel","Value","optionValue","Key","inputStyleClass","w-100",3,"completeMethod","suggestions"],["formControlName","ContactID","appendTo","body","styleClass","w-100","optionLabel","Value","optionValue","Key","inputStyleClass","w-100",3,"completeMethod","suggestions"]],template:function(o,r){if(o&1){let m=D();n(0,"app-main-panel",10),W("isDialogFilterVisibleChange",function(u){return v(m),N(r.dialogFilterVisible,u)||(r.dialogFilterVisible=u),b(u)})("isInitDialogFilterVisibleChange",function(u){return v(m),N(r.initDialogVisible,u)||(r.initDialogVisible=u),b(u)}),w("filterConfirmed",function(){return v(m),b(r.onFilterOKEvent())}),x(1,Wt,4,1,"ng-template",null,0,s)(3,ei,1,1,"ng-template",null,1,s)(5,pi,36,19,"ng-template",null,2,s),i()}o&2&&(c("pageTitle",r.store.items().pageTitle.length?r.store.items().pageTitle:"General Ledger"),Y("isDialogFilterVisible",r.dialogFilterVisible),c("isFilterable",!0),Y("isInitDialogFilterVisible",r.initDialogVisible))},dependencies:[fe,$,z,U,ot,ge,Ce,Se,ut,ae,re,Te,xe,he,Ve,Le,ne,ee,X,Z,ct,te,ie,ve,ye,Re,oe,st,St,xt,ht,pe,le,Q,J,ft,_t],styles:["[_nghost-%COMP%] .p-datatable .p-datatable-header{padding:.75rem 1rem .75rem 0}"],changeDetection:0})}}return t})();var mi={data:{},filter:{EntityID:[],CashierID:null,Text:null,from:null,to:null},isLoading:!0,loader:{options:{outlets:[]},filter:{from:"",to:"",outletID:[]},roles:{isInRoleEmptyOutlet:!1}}},Ae=ce(_e(mi),se(t=>{let p={totalCOGS:T(()=>{let e=t.data()?.data?.cogs;return Array.isArray(e)?e.reduce((o,r)=>o+(r?.amount??0),0):0}),totalRevenue:T(()=>{let e=t.data()?.data?.revenue;return Array.isArray(e)?e.reduce((o,r)=>o+(r?.amount??0),0):0}),totalExpense:T(()=>{let e=t.data()?.data?.expense;return Array.isArray(e)?e.reduce((o,r)=>o+(r?.amount??0),0):0}),grossProfit:T(()=>Array.isArray(t.data()?.data?.cogs)&&Array.isArray(t.data()?.data?.revenue)?p.totalRevenue()-p.totalCOGS():0),profitOrLoss:T(()=>p.totalRevenue()-p.totalCOGS()-p.totalExpense()),isDataEmpty:T(()=>Object.keys(t.data()?.data??{}).length===0)};return p}),ue(t=>{let p=g(B),e=g(be),o={updateFilter(r){V(t,m=>y(h({},m),{filter:h(h({},m.filter),r)}))},getLoader:q(A(P(()=>p.getIncomeStatementLoader().pipe(H({next:r=>{V(t,m=>y(h({},m),{loader:r,filter:y(h({},m.filter),{from:e.from(r.filter.from).format(),to:e.from(r.filter.to).format()})})),o.getIncomeStatement(t.filter)},error:r=>{console.error(r)}}))))),getIncomeStatement:q(A(P(r=>p.getIncomeStatement(r).pipe(Xe(()=>V(t,m=>y(h({},m),{isLoading:!0}))),H({next:m=>{V(t,f=>y(h({},f),{data:m,isLoading:!1}))},error:m=>{console.error(m)}})))))};return o}),de({onInit:t=>{t.getLoader()}}));var ci=()=>({height:"calc(100vh - 70px)"}),si=()=>({height:"calc(100vh - 150px)"}),Pe=()=>({}),je=t=>["/pages/chart-of-account/account/",t],Ne=()=>["/pages/report/general-ledger"],qe=t=>({id:t});function di(t,p){if(t&1){let e=D();n(0,"p-button",10),w("onClick",function(){v(e);let r=d(2);return b(r.onExport())}),i()}}function ui(t,p){if(t&1&&(n(0,"div",8),x(1,di,1,0,"p-button",9),i()),t&2){let e=d();l(),c("ngIf",e.roleService.global.export)}}function _i(t,p){t&1&&(n(0,"tr")(1,"th",15),a(2,"Code"),i(),n(3,"th",16),a(4,"Name"),i(),n(5,"th",17),a(6,"Total"),i()())}function fi(t,p){if(t&1&&(n(0,"tr")(1,"td"),a(2),i(),n(3,"td")(4,"a",18),a(5),i()(),n(6,"td",17)(7,"a",19),a(8),S(9,"number"),i()()()),t&2){let e=p.$implicit;l(2),_(e.code),l(2),c("routerLink",F(8,je,e.accountID)),l(),_(e.name),l(2),c("routerLink",E(10,Ne))("queryParams",F(11,qe,e.accountID)),l(),_(C(9,6,e.amount))}}function gi(t,p){if(t&1&&(n(0,"tr"),I(1,"td",20),n(2,"td",21)(3,"div",22)(4,"span",23),a(5,"Total Revenue :"),i(),n(6,"span",24),a(7),S(8,"number"),i()()()()),t&2){let e=d(4);l(7),_(C(8,1,e.store.totalRevenue()))}}function hi(t,p){t&1&&(n(0,"tr")(1,"td",25)(2,"span"),a(3,"No revenue records available"),i()()())}function xi(t,p){if(t&1&&(n(0,"h6",13),a(1,"Revenue"),i(),n(2,"p-table",14),x(3,_i,7,0,"ng-template",null,3,s)(5,fi,10,13,"ng-template",null,4,s)(7,gi,9,3,"ng-template",null,5,s)(9,hi,4,0,"ng-template",null,6,s),i()),t&2){let e,o=d(3);l(2),c("value",(e=o.store.data())==null||e.data==null?null:e.data.revenue)}}function Si(t,p){t&1&&(n(0,"tr")(1,"th",15),a(2,"Code"),i(),n(3,"th",16),a(4,"Name"),i(),n(5,"th",26),a(6,"Total"),i()())}function Ci(t,p){if(t&1&&(n(0,"tr")(1,"td"),a(2),i(),n(3,"td")(4,"a",18),a(5),i()(),n(6,"td",17)(7,"a",19),a(8),S(9,"number"),i()()()),t&2){let e=p.$implicit;l(2),_(e.code),l(2),c("routerLink",F(8,je,e.accountID)),l(),_(e.name),l(2),c("routerLink",E(10,Ne))("queryParams",F(11,qe,e.AccountID)),l(),_(C(9,6,e.amount))}}function yi(t,p){if(t&1&&(n(0,"tr"),I(1,"td",27),n(2,"td",21)(3,"div",22)(4,"span",23),a(5,"Total COGS :"),i(),n(6,"span",24),a(7),S(8,"number"),i()()()(),n(9,"tr"),I(10,"td",27),n(11,"td",21)(12,"div",22)(13,"span",23),a(14,"Gross Profit :"),i(),n(15,"span",24),a(16),S(17,"number"),i()()()()),t&2){let e=d(4);l(7),_(C(8,2,e.store.totalCOGS())),l(9),_(C(17,4,e.store.grossProfit()))}}function vi(t,p){t&1&&(n(0,"tr")(1,"td",25)(2,"span"),a(3,"No COGS records available"),i()()())}function bi(t,p){if(t&1&&(n(0,"h4",13),a(1,"COGS"),i(),n(2,"p-table",14),x(3,Si,7,0,"ng-template",null,3,s)(5,Ci,10,13,"ng-template",null,4,s)(7,yi,18,6,"ng-template",null,5,s)(9,vi,4,0,"ng-template",null,6,s),i()),t&2){let e,o=d(3);l(2),c("value",(e=o.store.data())==null||e.data==null?null:e.data.cogs)}}function Ei(t,p){t&1&&(n(0,"tr")(1,"th",15),a(2,"Code"),i(),n(3,"th",16),a(4,"Name"),i(),n(5,"th",17),a(6,"Total"),i()())}function Ii(t,p){if(t&1&&(n(0,"tr")(1,"td"),a(2),i(),n(3,"td")(4,"a",18),a(5),i()(),n(6,"td",17)(7,"a",19),a(8),S(9,"number"),i()()()),t&2){let e=p.$implicit;l(2),_(e.code),l(2),c("routerLink",F(8,je,e.accountID)),l(),_(e.name),l(2),c("routerLink",E(10,Ne))("queryParams",F(11,qe,e.AccountID)),l(),_(C(9,6,e.amount))}}function Fi(t,p){if(t&1&&(n(0,"tr"),I(1,"td",27),n(2,"td",21)(3,"div",22)(4,"span",23),a(5,"Total Expense :"),i(),n(6,"span",24),a(7),S(8,"number"),i()()()(),n(9,"tr"),I(10,"td",27),n(11,"td",21)(12,"div",22)(13,"span",23),a(14,"Profit / Loss :"),i(),n(15,"span",24),a(16),S(17,"number"),i()()()()),t&2){let e=d(4);l(7),_(C(8,2,e.store.totalExpense())),l(9),_(C(17,4,e.store.profitOrLoss()))}}function wi(t,p){t&1&&(n(0,"tr")(1,"td",25)(2,"span"),a(3,"No expense records available"),i()()())}function Di(t,p){if(t&1&&(n(0,"h4",13),a(1,"Expense"),i(),n(2,"p-table",14),x(3,Ei,7,0,"ng-template",null,3,s)(5,Ii,10,13,"ng-template",null,4,s)(7,Fi,18,6,"ng-template",null,5,s)(9,wi,4,0,"ng-template",null,6,s),i()),t&2){let e,o=d(3);l(2),c("value",(e=o.store.data())==null||e.data==null?null:e.data.expense)}}function Ri(t,p){if(t&1&&(n(0,"p-scroll-panel")(1,"div",12),x(2,xi,11,1)(3,bi,11,1)(4,Di,11,1),i()()),t&2){let e,o,r,m=d(2);j(E(5,si)),l(2),O(m.Object.keys((e=m.store.data().data)!==null&&e!==void 0?e:E(6,Pe)).length>0?2:-1),l(),O(m.Object.keys((o=(o=m.store.data().data)==null?null:o.cogs)!==null&&o!==void 0?o:E(7,Pe)).length>0?3:-1),l(),O(m.Object.keys((r=(r=m.store.data().data)==null?null:r.expense)!==null&&r!==void 0?r:E(8,Pe)).length>0?4:-1)}}function Ti(t,p){if(t&1&&(n(0,"p-panel"),x(1,Ri,5,9,"p-scroll-panel",11),i()),t&2){let e=d();j(E(3,ci)),l(),c("ngIf",e.store.data())}}function Li(t,p){if(t&1){let e=D();n(0,"form",28)(1,"div",29)(2,"label",30),a(3,"Outlet"),i(),I(4,"p-multiselect",31),i(),n(5,"div",29)(6,"label",30),a(7,"Cashier"),i(),n(8,"p-autocomplete",32),w("completeMethod",function(r){v(e);let m=d();return b(m.onCashierSearch(r))})("onSelect",function(r){v(e);let m=d();return b(m.onCashierSelect(r))}),i()(),n(9,"div",29)(10,"label",30),a(11,"From"),i(),I(12,"p-datepicker",33),i(),n(13,"div",29)(14,"label",30),a(15,"To"),i(),I(16,"p-datepicker",34),i()()}if(t&2){let e=d();c("formGroup",e.formFilter),l(4),c("virtualScroll",!0)("virtualScrollItemSize",50)("options",e.store.loader().options.outlets)("showClear",!0),l(4),c("showClear",!0)("suggestions",e.cashierSuggestions())("showClear",!0)}}var Lt=(()=>{class t{constructor(){this.dayjsService=g(be),this.store=g(Ae),this.fb=g(De),this.reportService=g(B),this.roleService=g(me),this.isInitDialogFilterVisible=L(!1),this.dialogFilterVisible=L(!1),this.cashierSuggestions=L([]),this.cashierHashMap=new Map,this.Object=Object,nt(()=>{this.store.filter()&&this.initForm()})}ngOnInit(){this.initForm(),console.log(this.cashierHashMap.entries())}onSearch(e){this.store.updateFilter(y(h({},this.store.filter()),{Text:e}))}onCashierSearch(e){this.reportService.getCashierSuggestions(e.query).pipe(Ie("Cashier Suggestions"),M(o=>this.cashierSuggestions.set(o))).subscribe()}initForm(){let e=this.store.filter();console.log("initForm",this.cashierHashMap.get(e.CashierID)),this.formFilter=this.fb.group({EntityID:this.fb.control(e.EntityID??[]),CashierID:this.fb.control(this.cashierHashMap.get(e.CashierID)??""),Text:this.fb.control(e.Text??""),from:this.fb.control(e.from?this.dayjsService.from(e.from).toDate():null),to:this.fb.control(e.to?this.dayjsService.from(e.to).toDate():null)})}onFilterOK(){let e=this.formFilter.getRawValue(),o=Object.entries(e).reduce((r,[m,f])=>(m==="from"||m==="to"?f instanceof Date&&(r[m]=this.dayjsService.from(f).format()):r[m]=f||null,r),{});this.store.updateFilter(h(h({},this.store.filter()),o)),this.dialogFilterVisible.update(r=>!r),console.log("body",e)}onCashierSelect(e){console.log("Cashier selected:",e),!this.cashierHashMap.has(e.value.Key)&&(this.cashierHashMap.set(e.value.Key,e.value.Value),console.log("Cashier HashMap:",this.cashierHashMap))}onExport(){let e=y(h({},this.store.filter()),{export:!0,ExportPageNumber:1,ExportRowCount:1e4});this.reportService.getIncomeStatement(e,{responseType:"blob"}).pipe(Ie("Export Profit & Loss"),M(o=>{let r=o.type,m=[o],f=document.createElement("a");f.href=window.URL.createObjectURL(new Blob(m,{type:r}));let u=`profit-and-loss.${r.split("/")[1]}`;f.setAttribute("download",u),document.body.appendChild(f),f.click(),document.body.removeChild(f)})).subscribe()}static{this.\u0275fac=function(o){return new(o||t)}}static{this.\u0275cmp=k({type:t,selectors:[["app-report-income-statement"]],features:[K([Ae])],decls:7,vars:4,consts:[["actionButton",""],["content",""],["filters",""],["header",""],["body",""],["footer",""],["emptymessage",""],[3,"isDialogFilterVisibleChange","isInitDialogFilterVisibleChange","filterConfirmed","isFilterable","pageTitle","isDialogFilterVisible","isInitDialogFilterVisible"],[1,"d-flex","gap-2"],["severity","secondary","variant","outlined","icon","fa-solid fa-download","label","Export",3,"onClick",4,"ngIf"],["severity","secondary","variant","outlined","icon","fa-solid fa-download","label","Export",3,"onClick"],[3,"style",4,"ngIf"],[1,"d-flex","flex-column","gap-3"],[1,"fs-5","fw-semibold"],[3,"value"],[2,"width","20%"],[2,"width","30%"],[1,"text-end"],["target","_blank",1,"link","link-primary",3,"routerLink"],["target","_blank",1,"link","link-primary",3,"routerLink","queryParams"],["colspan","2 ",1,"fw-semibold","text-end",2,"width","50%"],[1,"text-end","fw-semibold"],[1,"row"],[1,"col-9"],[1,"col"],["colspan","3",1,""],[1,"text-end",2,"min-width","10%"],["colspan","2",1,"fw-semibold"],[1,"d-flex","flex-column","gap-3",3,"formGroup"],[1,"d-flex","flex-column"],["for",""],["formControlName","EntityID","filterBy","value","appendTo","body","display","chip","optionLabel","value","optionValue","key","placeholder","Select an Outlet",3,"virtualScroll","virtualScrollItemSize","options","showClear"],["appendTo","body","formControlName","CashierID","optionLabel","Value","optionValue","Key","styleClass","w-100","inputStyleClass","w-100","field","Value","placeholder","Search a cashier",3,"completeMethod","onSelect","showClear","suggestions"],["formControlName","from","styleClass","w-100","appendTo","body"],["formControlName","to","styleClass","w-100","appendTo","body"]],template:function(o,r){if(o&1){let m=D();n(0,"app-main-panel",7),W("isDialogFilterVisibleChange",function(u){return v(m),N(r.dialogFilterVisible,u)||(r.dialogFilterVisible=u),b(u)})("isInitDialogFilterVisibleChange",function(u){return v(m),N(r.isInitDialogFilterVisible,u)||(r.isInitDialogFilterVisible=u),b(u)}),w("filterConfirmed",function(){return v(m),b(r.onFilterOK())}),x(1,ui,2,1,"ng-template",null,0,s)(3,Ti,2,4,"ng-template",null,1,s)(5,Li,17,8,"ng-template",null,2,s),i()}o&2&&(c("isFilterable",!0)("pageTitle",r.store.data().pageTitle),Y("isDialogFilterVisible",r.dialogFilterVisible)("isInitDialogFilterVisible",r.isInitDialogFilterVisible))},dependencies:[fe,$,z,U,Te,xe,he,ne,ee,X,Z,te,ie,ve,ye,ge,Ce,Se,pe,le,oe,Q,J,Ve,Le,ae,re],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var He=Ue(yt());var Vi={metadata:{options:{outlets:[]},filter:{to:"",outletID:[]},roles:{isInRoleEmptyOutlet:!1}},data:{asset:[],liability:[],equity:[],pageTitle:""},filter:{date:(0,He.default)().format("YYYY-MM-DD"),listOutletParam:[]}},Ye=ce(_e(Vi),se(t=>({totalAsset:T(()=>t.data().asset.reduce((p,e)=>p+ +e.amount,0)),totalLiability:T(()=>t.data().liability.reduce((p,e)=>p+ +e.counterAmount,0)),totalEquity:T(()=>t.data().equity.reduce((p,e)=>p+ +e.counterAmount,0))})),ue(t=>{let p=g(B),e={updateFilter:o=>{V(t,r=>y(h({},r),{filter:o}))},fetchBalanceSheet:q(A(Fe(()=>{let o=t.filter();return Object.entries(o).every(([r,m])=>m!=null&&m!=="")}),P(o=>p.getBalanceSheet(o).pipe(H({next:r=>{V(t,m=>y(h({},m),{data:r}))},error:r=>{console.error(r)}}))),Qe(1))),fetchLoader:q(A(P(()=>p.getBalanceSheetLoader().pipe(H({next:o=>{V(t,r=>y(h({},r),{metadata:o,filter:{date:(0,He.default)(o.filter.to).format("YYYY-MM-DD")}})),e.fetchBalanceSheet(t.filter)},error:o=>{console.error(o)}})))))};return e}),de(t=>({onInit:()=>{t.fetchLoader()}})));var Vt=Ue(yt());var Mi=()=>({height:"calc(100vh - 70px)"}),ki=()=>({height:"calc(100vh - 100px)"}),We=t=>["/pages/chart-of-account/account/",t],Ke=()=>["/pages/report/general-ledger"],ze=t=>({id:t});function Bi(t,p){if(t&1){let e=D();n(0,"p-button",11),w("onClick",function(){v(e);let r=d(2);return b(r.onExport())}),i()}}function Oi(t,p){if(t&1&&(n(0,"div",9),x(1,Bi,1,0,"p-button",10),i()),t&2){let e=d();l(),c("ngIf",e.roleService.global.export)}}function Gi(t,p){t&1&&(n(0,"tr")(1,"th",16),a(2,"Code"),i(),n(3,"th"),a(4,"Asset"),i(),n(5,"th",17),a(6,"Total"),i()())}function Ai(t,p){if(t&1&&(n(0,"tr")(1,"td"),a(2),i(),n(3,"td")(4,"a",18),a(5),i()(),n(6,"td",19)(7,"a",20),a(8),S(9,"number"),i()()()),t&2){let e=p.$implicit;l(2),_(e.code),l(2),c("routerLink",F(8,We,e.accountID)),l(),_(e.name),l(2),c("routerLink",E(10,Ke))("queryParams",F(11,ze,e.accountID)),l(),_(C(9,6,e.amount))}}function Pi(t,p){if(t&1&&(n(0,"tr")(1,"td",21),a(2,"Total Asset"),i(),n(3,"td",22),a(4),S(5,"number"),i()()),t&2){let e=d(3);l(4),R(" ",C(5,1,e.store.totalAsset())," ")}}function ji(t,p){t&1&&(n(0,"tr")(1,"td",23)(2,"span"),a(3,"No asset records found."),i()()())}function Ni(t,p){if(t&1&&(n(0,"h4",14),a(1,"Asset"),i(),n(2,"p-table",15),x(3,Gi,7,0,"ng-template",null,3,s)(5,Ai,10,13,"ng-template",null,4,s)(7,Pi,6,3,"ng-template",null,5,s)(9,ji,4,0,"ng-template",null,6,s),i()),t&2){let e=d(2);l(2),c("value",e.store.data().asset)}}function qi(t,p){t&1&&(n(0,"tr")(1,"th",16),a(2,"Code"),i(),n(3,"th"),a(4,"Liability"),i(),n(5,"th",17),a(6,"Total"),i()())}function Hi(t,p){if(t&1&&(n(0,"tr")(1,"td"),a(2),i(),n(3,"td")(4,"a",25),a(5),i()(),n(6,"td",19)(7,"a",20),a(8),S(9,"number"),i()()()),t&2){let e=p.$implicit;l(2),_(e.code),l(2),c("routerLink",F(8,We,e.accountID)),l(),_(e.name),l(2),c("routerLink",E(10,Ke))("queryParams",F(11,ze,e.accountID)),l(),_(C(9,6,e.counterAmount))}}function Yi(t,p){if(t&1&&(n(0,"tr")(1,"td",21),a(2," Total Liability "),i(),n(3,"td",22),a(4),S(5,"number"),i()()),t&2){let e=d(3);l(4),R(" ",C(5,1,e.store.totalLiability())," ")}}function Wi(t,p){t&1&&(n(0,"tr")(1,"td",23)(2,"span"),a(3,"No liability records found."),i()()())}function Ki(t,p){if(t&1&&(n(0,"h4",24),a(1,"Liability"),i(),n(2,"p-table",15),x(3,qi,7,0,"ng-template",null,3,s)(5,Hi,10,13,"ng-template",null,4,s)(7,Yi,6,3,"ng-template",null,5,s)(9,Wi,4,0,"ng-template",null,6,s),i()),t&2){let e=d(2);l(2),c("value",e.store.data().liability)}}function zi(t,p){t&1&&(n(0,"tr")(1,"th",16),a(2,"Code"),i(),n(3,"th"),a(4,"Equity"),i(),n(5,"th",17),a(6,"Total"),i()())}function Ui(t,p){if(t&1&&(n(0,"tr")(1,"td"),a(2),i(),n(3,"td")(4,"a",18),a(5),i()(),n(6,"td",19)(7,"a",20),a(8),S(9,"number"),i()()()),t&2){let e=p.$implicit;l(2),_(e.code),l(2),c("routerLink",F(8,We,e.accountID)),l(),_(e.name),l(2),c("routerLink",E(10,Ke))("queryParams",F(11,ze,e.accountID)),l(),_(C(9,6,e.counterAmount))}}function $i(t,p){if(t&1&&(n(0,"tr")(1,"td",21),a(2,"Total Equity"),i(),n(3,"td",22),a(4),S(5,"number"),i()(),n(6,"tr")(7,"td",21),a(8," Total Liability + Equity "),i(),n(9,"td",22),a(10),S(11,"number"),i()()),t&2){let e=d(3);l(4),R(" ",C(5,2,e.store.totalEquity())," "),l(6),R(" ",C(11,4,e.store.totalLiability()+e.store.totalEquity())," ")}}function Ji(t,p){t&1&&(n(0,"tr")(1,"td",23)(2,"span"),a(3,"No equity records found."),i()()())}function Qi(t,p){if(t&1&&(n(0,"h4",24),a(1,"Equity"),i(),n(2,"p-table",15),x(3,zi,7,0,"ng-template",null,3,s)(5,Ui,10,13,"ng-template",null,4,s),a(7," <"),x(8,$i,12,6,"ng-template",null,5,s)(10,Ji,4,0,"ng-template",null,6,s),i()),t&2){let e=d(2);l(2),c("value",e.store.data().equity)}}function Xi(t,p){if(t&1&&(n(0,"p-panel",12)(1,"p-scroll-panel")(2,"div",13),x(3,Ni,11,1)(4,Ki,11,1)(5,Qi,12,1),i()()()),t&2){let e=d();j(E(8,Mi)),c("showHeader",!1),l(),j(E(9,ki)),l(2),O(e.Object.keys(e.store.data().asset).length>0?3:-1),l(),O(e.Object.keys(e.store.data().liability).length>0?4:-1),l(),O(e.Object.keys(e.store.data().equity).length>0?5:-1)}}function Zi(t,p){if(t&1&&(n(0,"div",31)(1,"div"),a(2),i()()),t&2){let e=p.$implicit;l(2),_(e.value)}}function en(t,p){if(t&1&&(n(0,"form",26)(1,"div",27)(2,"label",28),a(3,"Outlet"),i(),n(4,"p-multiselect",29),x(5,Zi,3,1,"ng-template",null,7,s),i()(),n(7,"div",27)(8,"label",28),a(9,"From"),i(),I(10,"p-datepicker",30),i()()),t&2){let e=d();c("formGroup",e.filterForm),l(4),c("virtualScroll",!0)("virtualScrollItemSize",50)("options",e.store.metadata().options.outlets)("showClear",!0),l(6),c("iconDisplay","input")("showIcon",!0)}}var Mt=(()=>{class t{constructor(){this.store=g(Ye),this.ReportServiceStore=g(B),this.dialogFilterVisible=L(!1),this.isInitDialogFilterVisible=L(!1),this.roleService=g(me),this.Object=Object}ngOnInit(){this.generateFilterForm()}generateFilterForm(){this.filterForm=new mt({date:new G(new Date),outletID:new G([])})}onFilterOKEvent(){let{date:e,outletID:o}=this.filterForm.value;this.store.updateFilter({date:(0,Vt.default)(e).format("YYYY-MM-DD"),listOutletParam:o}),this.dialogFilterVisible.update(r=>!r)}onExport(){let e=y(h({},this.store.filter()),{export:!0,ExportPageNumber:1,ExportRowCount:1e4});this.ReportServiceStore.getBalanceSheet(e,{responseType:"blob"}).pipe(Ie("Export Balance Sheet"),M(o=>{let r=o.type,m=[o],f=document.createElement("a");f.href=window.URL.createObjectURL(new Blob(m,{type:r}));let u=`balance-sheet.${r.split("/")[1]}`;f.setAttribute("download",u),document.body.appendChild(f),f.click(),document.body.removeChild(f)})).subscribe()}static{this.\u0275fac=function(o){return new(o||t)}}static{this.\u0275cmp=k({type:t,selectors:[["app-report-balance-sheet"]],features:[K([Ye])],decls:7,vars:4,consts:[["actionButton",""],["content",""],["filters",""],["header",""],["body",""],["footer",""],["emptymessage",""],["item",""],[3,"isDialogFilterVisibleChange","isInitDialogFilterVisibleChange","filterConfirmed","pageTitle","isFilterable","isDialogFilterVisible","isInitDialogFilterVisible"],[1,"d-flex","gap-2"],["severity","secondary","variant","outlined","icon","fa-solid fa-download","label","Export",3,"onClick",4,"ngIf"],["severity","secondary","variant","outlined","icon","fa-solid fa-download","label","Export",3,"onClick"],[3,"showHeader"],[1,"d-flex","flex-column","gap-3"],[1,"fs-5","fw-semibold","mt-3"],[3,"value"],[2,"width","20%"],[1,"text-end",2,"width","5%"],["target","_blank",1,"link","link-primary",3,"routerLink"],[1,"text-end"],["target","_blank",1,"link","link-primary",3,"routerLink","queryParams"],["colspan","2",1,"fw-semibold","text-end"],[1,"text-end","fw-semibold"],["colspan","3",1,""],[1,"fs-5","fw-semibold"],["target","_blank",1,"link","link-primary","d-flex","align-items-center",3,"routerLink"],[1,"d-flex","flex-column","row-gap-3",3,"formGroup"],[1,"d-flex","flex-column"],["for","outlet"],["formControlName","outletID","display","chip","appendTo","body","optionLabel","value","optionValue","key","placeholder","Select Outlet",3,"virtualScroll","virtualScrollItemSize","options","showClear"],["formControlName","date","styleClass","w-100","appendTo","body","inputId","icondisplay",3,"iconDisplay","showIcon"],[1,"flex","items-center","gap-2"]],template:function(o,r){if(o&1){let m=D();n(0,"app-main-panel",8),W("isDialogFilterVisibleChange",function(u){return v(m),N(r.dialogFilterVisible,u)||(r.dialogFilterVisible=u),b(u)})("isInitDialogFilterVisibleChange",function(u){return v(m),N(r.isInitDialogFilterVisible,u)||(r.isInitDialogFilterVisible=u),b(u)}),w("filterConfirmed",function(){return v(m),b(r.onFilterOKEvent())}),x(1,Oi,2,1,"ng-template",null,0,s)(3,Xi,6,10,"ng-template",null,1,s)(5,en,11,7,"ng-template",null,2,s),i()}o&2&&(c("pageTitle",r.store.data().pageTitle)("isFilterable",!0),Y("isDialogFilterVisible",r.dialogFilterVisible)("isInitDialogFilterVisible",r.isInitDialogFilterVisible))},dependencies:[fe,$,z,U,Ce,Se,ge,ae,re,ne,ee,X,Z,te,ie,ve,ye,xe,he,Re,oe,pe,le,Q,J],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var kt=(()=>{class t{static{this.\u0275fac=function(o){return new(o||t)}}static{this.\u0275cmp=k({type:t,selectors:[["app-report-comparative-balance"]],decls:3,vars:0,template:function(o,r){o&1&&(n(0,"p"),a(1,"report-comparative-balance works!"),i(),a(2,`
|
|
2
|
+
,
|
|
3
|
+
`))},styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var Bt=(()=>{class t{static{this.\u0275fac=function(o){return new(o||t)}}static{this.\u0275cmp=k({type:t,selectors:[["app-report-cash-flow"]],decls:3,vars:0,template:function(o,r){o&1&&(n(0,"p"),a(1,"report-cash-flow works!"),i(),a(2,`
|
|
4
|
+
,
|
|
5
|
+
`))},styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var Ot=(()=>{class t{static{this.\u0275fac=function(o){return new(o||t)}}static{this.\u0275cmp=k({type:t,selectors:[["app-report-trial-balance"]],decls:3,vars:0,template:function(o,r){o&1&&(n(0,"p"),a(1,"report-trial-balance works!"),i(),a(2,`
|
|
6
|
+
,
|
|
7
|
+
`))},styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var gr=[{path:"",redirectTo:"general-ledger",pathMatch:"full"},{path:"",children:[{path:"general-ledger",component:Tt},{path:"profit-loss",component:Lt},{path:"balance-sheet",component:Mt},{path:"comparative-balance",component:kt},{path:"trial-balance",component:Ot},{path:"cash-flow",component:Bt}]}];export{gr as REPORTS_ROUTES};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as J}from"./chunk-
|
|
1
|
+
import{a as J}from"./chunk-67VPWIWW.js";import{A as d,C as f,Ea as K,Ma as Z,Na as B,Va as G,W as O}from"./chunk-FMVCTBCQ.js";import{c as $,g as q,h as W,m as N,n as j}from"./chunk-B63BKC6F.js";import{Aa as k,Ab as X,Cb as Y,Jb as m,Kb as V,Ob as x,Pb as P,Ub as v,Vb as g,Wc as U,Zb as z,_b as R,ba as S,ca as E,dc as y,fc as I,gb as u,gc as H,ha as _,jc as L,kc as b,lc as h,mc as p,pa as s,qa as a,ta as C,wb as F,xb as A,yc as Q}from"./chunk-JP6RBSB3.js";var ee=["content"],oe=["container"],re=["xBar"],le=["yBar"],se=["*"];function ae(i,ie){i&1&&H(0)}function ce(i,ie){i&1&&z(0)}var ue=({dt:i})=>`
|
|
2
2
|
.p-scrollpanel-content-container {
|
|
3
3
|
overflow: hidden;
|
|
4
4
|
width: 100%;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./chunk-YQFG5XE2.js";var t=[{path:"",redirectTo:"tax-account",pathMatch:"full"},{path:"tax-account",loadComponent:()=>import("./chunk-F5Z3IX4J.js").then(o=>o.TaxAccountComponent)},{path:"chart-of-account",loadComponent:()=>import("./chunk-74MJ3NFN.js").then(o=>o.ChartOfAccountComponent)},{path:"manual-journal",loadComponent:()=>import("./chunk-WSZ5MU6V.js").then(o=>o.ManualJournalComponent)},{path:"payment-account",loadComponent:()=>import("./chunk-QSWSGP4B.js").then(o=>o.PaymentAccountComponent)},{path:"writeoff-outlet",loadComponent:()=>import("./chunk-A7EGGUJQ.js").then(o=>o.WriteOffOutletComponent)},{path:"expense-account",loadComponent:()=>import("./chunk-OYHHWU2W.js").then(o=>o.ExpenseAccountComponent)},{path:"coa-configuration",loadComponent:()=>import("./chunk-6OQPMZXU.js").then(o=>o.CoaConfigurationComponent)},{path:"coa-category",loadComponent:()=>import("./chunk-7EZGTYA2.js").then(o=>o.CoaCategoryComponent)},{path:"outlet-account",loadComponent:()=>import("./chunk-HAZ77TED.js").then(o=>o.OutletAccountComponent)}];export{t as MIGRATE_ROUTES};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as G}from"./chunk-
|
|
1
|
+
import{a as G}from"./chunk-67VPWIWW.js";import{Ka as P,La as A,Ma as H,Na as g,Va as V,ta as z}from"./chunk-FMVCTBCQ.js";import{c as R,f as w,g as O,h as N,m as B}from"./chunk-B63BKC6F.js";import{Ab as k,Cb as c,Ga as x,Jb as D,Kb as r,Ob as $,Ub as f,Vb as u,Xb as b,Yb as v,Zb as y,ba as S,ca as F,ec as _,fc as j,gb as i,gc as h,ha as I,jc as p,lc as d,mc as s,qc as C,rc as Q,ta as T,wb as E,xb as M,yc as q}from"./chunk-JP6RBSB3.js";var K=["header"],L=["title"],U=["subtitle"],W=["content"],X=["footer"],Y=["*",[["p-header"]],[["p-footer"]]],Z=["*","p-header","p-footer"];function ee(e,o){e&1&&y(0)}function te(e,o){if(e&1&&(f(0,"div",8),h(1,1),c(2,ee,1,0,"ng-container",6),u()),e&2){let t=_();i(2),r("ngTemplateOutlet",t.headerTemplate||t._headerTemplate)}}function ne(e,o){if(e&1&&(b(0),C(1),v()),e&2){let t=_(2);i(),Q(t.header)}}function ae(e,o){e&1&&y(0)}function ie(e,o){if(e&1&&(f(0,"div",9),c(1,ne,2,1,"ng-container",10)(2,ae,1,0,"ng-container",6),u()),e&2){let t=_();i(),r("ngIf",t.header&&!t._titleTemplate&&!t.titleTemplate),i(),r("ngTemplateOutlet",t.titleTemplate||t._titleTemplate)}}function re(e,o){if(e&1&&(b(0),C(1),v()),e&2){let t=_(2);i(),Q(t.subheader)}}function oe(e,o){e&1&&y(0)}function le(e,o){if(e&1&&(f(0,"div",11),c(1,re,2,1,"ng-container",10)(2,oe,1,0,"ng-container",6),u()),e&2){let t=_();i(),r("ngIf",t.subheader&&!t._subtitleTemplate&&!t.subtitleTemplate),i(),r("ngTemplateOutlet",t.subtitleTemplate||t._subtitleTemplate)}}function ce(e,o){e&1&&y(0)}function pe(e,o){e&1&&y(0)}function de(e,o){if(e&1&&(f(0,"div",12),h(1,2),c(2,pe,1,0,"ng-container",6),u()),e&2){let t=_();i(2),r("ngTemplateOutlet",t.footerTemplate||t._footerTemplate)}}var se=({dt:e})=>`
|
|
2
2
|
.p-card {
|
|
3
3
|
background: ${e("card.background")};
|
|
4
4
|
color: ${e("card.color")};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as v,b as A}from"./chunk-O4QM64EH.js";import{d as V,k as W}from"./chunk-EW3R2HAB.js";import"./chunk-OLOVFS3Y.js";import"./chunk-QCLAOAVG.js";import"./chunk-Q33XIUDN.js";import"./chunk-PKN47FQE.js";import"./chunk-LRRVQSMI.js";import"./chunk-42UIGXWH.js";import"./chunk-NA5YXAMJ.js";import"./chunk-253IFSMV.js";import"./chunk-QYXQYPHB.js";import"./chunk-FBEBMNVC.js";import"./chunk-6NGIQJIP.js";import"./chunk-YDEVG4CR.js";import{b as Q}from"./chunk-5R3XKSDM.js";import{h as J}from"./chunk-UYC454VQ.js";import"./chunk-C7LM5UCK.js";import{a as N,b as j}from"./chunk-J4XRJAME.js";import{a as S,b as G,c as K,d as U,e as q,f as $,g as z}from"./chunk-JBSIAXM5.js";import"./chunk-GH5Z5SPB.js";import"./chunk-67VPWIWW.js";import"./chunk-BHV2HCJY.js";import{x as H}from"./chunk-FMVCTBCQ.js";import{a as O}from"./chunk-P3V7Z3A6.js";import"./chunk-VFEEFGWW.js";import"./chunk-F2X3VGZZ.js";import{G as R,N as F,l as I,m as L}from"./chunk-B63BKC6F.js";import{Ac as x,Cb as g,Jc as k,Kb as m,Kc as B,Mc as c,Nb as b,Ub as n,Vb as a,Wb as M,X as u,Yc as D,ba as y,c as f,ec as C,gb as l,ha as p,qc as i,rc as s,sc as T,wb as P,yc as w,zc as _}from"./chunk-JP6RBSB3.js";import{a as d,b as h}from"./chunk-YQFG5XE2.js";var X=(()=>{class t{constructor(){this.httpService=p(O)}fetchCashAndBankLoader(){return this.httpService.get("","api/CashAndBankLoader/GetCashAndBank")}fetchCashAndBankData(){return this.httpService.get("","api/CashAndBank/GetCashAndBank")}static{this.\u0275fac=function(r){return new(r||t)}}static{this.\u0275prov=y({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var et={data:[],filter:[],options:{hasGeneralLedger:!1}},E=G(z("cash-bank-store"),$(et),K(t=>({totalBalance:D(()=>t.data().reduce((o,e)=>o+e.balance,0))})),q(t=>{let o=p(X);return{loadCashAndBankLoader:v(f(u(()=>o.fetchCashAndBankLoader().pipe(A({next:e=>{console.log("response",e),S(t,r=>h(d({},r),{options:e.options}))},error:e=>{console.log("error",e)}}))))),loadCashAndBankData:v(f(u(()=>o.fetchCashAndBankData().pipe(A({next:e=>{console.log("response",e),S(t,r=>h(d({},r),{data:e}))},error:e=>{console.log("error",e)}})))))}}),U({onInit(t){t.loadCashAndBankLoader(),t.loadCashAndBankData()}}));var nt=["class","page"],at=()=>({height:"calc(100vh - 70px)"}),ot=t=>[t],it=()=>["/pages/report/general-ledger"],rt=t=>({id:t});function lt(t,o){t&1&&(n(0,"tr")(1,"th"),i(2,"Code"),a(),n(3,"th"),i(4,"Name"),a(),n(5,"th",7),i(6,"Balance"),a()())}function pt(t,o){if(t&1&&(n(0,"tr")(1,"td"),i(2),a(),n(3,"td")(4,"a",8),i(5),a()(),n(6,"td",7)(7,"a",9),i(8),k(9,"number"),a()()()),t&2){let e=o.$implicit;l(2),s(e.code),l(2),m("routerLink",x(8,ot,"/pages/chart-of-account/account/"+e.accountID)),l(),s(e.name),l(2),m("routerLink",_(10,it))("queryParams",x(11,rt,e.accountID)),l(),s(B(9,6,e.balance))}}function ct(t,o){if(t&1&&(n(0,"tr"),M(1,"td"),n(2,"td",10),i(3,"Total"),a(),n(4,"td",11),i(5),k(6,"number"),a()()),t&2){let e=C(2);l(5),T(" ",B(6,1,e.store.totalBalance())," ")}}function mt(t,o){t&1&&(n(0,"tr")(1,"td",12)(2,"span"),i(3,"No records found."),a()()())}function st(t,o){if(t&1&&(n(0,"p-panel")(1,"p-table",6),g(2,lt,7,0,"ng-template",null,1,c)(4,pt,10,13,"ng-template",null,2,c)(6,ct,7,3,"ng-template",null,3,c)(8,mt,4,0,"ng-template",null,4,c),a()()),t&2){let e=C();b(_(4,at)),l(),m("value",e.store.data())("scrollHeight","calc(100vh - 100px)")}}var Y=(()=>{class t{constructor(){this.store=p(E),this.routeInfo=Z}static{this.\u0275fac=function(r){return new(r||t)}}static{this.\u0275cmp=P({type:t,selectors:[["app-cash-bank",8,"page"]],features:[w([E])],attrs:nt,decls:3,vars:0,consts:[["content",""],["header",""],["body",""],["footer",""],["emptymessage",""],["pageTitle","Cash and Bank"],["scrollable","",3,"value","scrollHeight"],[1,"text-end"],[1,"link","link-primary",3,"routerLink"],[1,"link","link-primary",3,"routerLink","queryParams"],[1,"fw-bold"],[1,"text-end","fw-bold"],["colspan","3"]],template:function(r,dt){r&1&&(n(0,"app-main-panel",5),g(1,st,10,5,"ng-template",null,0,c),a())},dependencies:[L,I,J,H,W,V,Q,F,R,j,N],styles:[".card[_ngcontent-%COMP%]{height:calc(100vh - 120px)}.card[_ngcontent-%COMP%] .card-body[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:inherit;overflow-y:auto}"],changeDetection:0})}}return t})();var qt=[{path:"",component:Y,children:[]}],Z={path:"cash-of-account",title:"COA",iconName:"fa fa-calculator",class:"",label:"",labelClass:"",extralink:!1,submenu:[]};export{qt as CASH_BANK_ROUTES,Z as CASH_BANK_ROUTE_PAGE};
|