dealposbooks 5.33.1 → 5.34.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 +15 -15
- package/{chunk-YDEVG4CR.js → chunk-2KERKGCG.js} +1 -1
- package/chunk-2LSXB7YZ.js +1 -0
- package/chunk-2MVACU4N.js +1 -0
- package/{chunk-Q33XIUDN.js → chunk-3NU3P6NL.js} +1 -1
- package/{chunk-EDCDR4RJ.js → chunk-3VJJTR55.js} +1 -1
- package/chunk-45LSSSIH.js +1 -0
- package/chunk-4ANXCMQU.js +1 -0
- package/{chunk-5R3XKSDM.js → chunk-4CDAAU6Z.js} +1 -1
- package/{chunk-42UIGXWH.js → chunk-4DOELXOP.js} +1 -1
- package/chunk-5ATZKXRQ.js +1 -0
- package/{chunk-67VPWIWW.js → chunk-5FSMHZSY.js} +1 -1
- package/chunk-5JDKHEBJ.js +1 -0
- package/chunk-5LRPK5BI.js +1 -0
- package/{chunk-KJ6CKUEI.js → chunk-5XDCBC5Q.js} +1 -1
- package/chunk-6KHNAQCS.js +1 -0
- package/chunk-6MOM7AXR.js +1 -0
- package/chunk-6TVP5OOO.js +1 -0
- package/chunk-754GP2RS.js +1 -0
- package/{chunk-R2SYW2WU.js → chunk-7LVIHCFH.js} +2 -2
- package/{chunk-HHJMN4BS.js → chunk-AACWH3EJ.js} +1 -1
- package/chunk-AP26QGQW.js +1 -0
- package/chunk-APY3KUFM.js +1 -0
- package/{chunk-ABBBWSSO.js → chunk-B46T5XRJ.js} +1 -1
- package/{chunk-EXGI2AG7.js → chunk-BBQIPZWM.js} +1 -1
- package/{chunk-HICPZPJI.js → chunk-BGOI3WIG.js} +1 -1
- package/{chunk-VFEEFGWW.js → chunk-BLQJXMNV.js} +1 -1
- package/{chunk-6UGXXSQ3.js → chunk-BV4GM72W.js} +1 -1
- package/chunk-BY6QUHQI.js +1 -0
- package/chunk-CZNQPNZD.js +160 -0
- package/{chunk-AZUQDRJU.js → chunk-DHW7UHFT.js} +1 -1
- package/{chunk-LRRVQSMI.js → chunk-DLUALPHU.js} +1 -1
- package/chunk-DQQ6JL6H.js +1 -0
- package/chunk-DYCHYHHI.js +1 -0
- package/{chunk-QYXQYPHB.js → chunk-EDGADVEY.js} +1 -1
- package/chunk-EGR3U7VD.js +1 -0
- package/chunk-EUOA6ZNN.js +1 -0
- package/{chunk-YOUPD27G.js → chunk-FLZXCWDU.js} +1 -1
- package/{chunk-GH5Z5SPB.js → chunk-FUZFAJGJ.js} +1 -1
- package/{chunk-F22SO6BQ.js → chunk-G2YSKFGD.js} +3 -3
- package/chunk-G33PO2GU.js +1 -0
- package/{chunk-FMVCTBCQ.js → chunk-G5S5AZA7.js} +4 -4
- package/chunk-GBKTFERL.js +1 -0
- package/{chunk-PKN47FQE.js → chunk-GDX5XEV3.js} +1 -1
- package/chunk-GWSNPXC6.js +1 -0
- package/{chunk-4LGDNQMZ.js → chunk-H57SDRPH.js} +1 -1
- package/chunk-HNBUQBBT.js +1 -0
- package/chunk-IDDGY7P4.js +1 -0
- package/chunk-IDW6F2F3.js +1 -0
- package/chunk-IOIIEN6T.js +129 -0
- package/{chunk-JBSIAXM5.js → chunk-JMEBBWX4.js} +1 -1
- package/{chunk-FBEBMNVC.js → chunk-JTDJJORR.js} +1 -1
- package/{chunk-J4XRJAME.js → chunk-JYCUE5HV.js} +1 -1
- package/{chunk-JL2CN3ZY.js → chunk-KPWIGW52.js} +1 -1
- package/chunk-LD7LVE2B.js +1 -0
- package/{chunk-SUYXXZHZ.js → chunk-LRDAZKGE.js} +1 -1
- package/chunk-LUPSXHRX.js +180 -0
- package/{chunk-QCLAOAVG.js → chunk-LWLJZPBI.js} +1 -1
- package/{chunk-6NGIQJIP.js → chunk-LZUGPBFD.js} +1 -1
- package/{chunk-XHUJABH3.js → chunk-MDEJN7RJ.js} +1 -1
- package/chunk-N2GNLX5X.js +1 -0
- package/{chunk-TVNXFJII.js → chunk-NJO5TWIA.js} +1 -1
- package/{chunk-PI5RBOCG.js → chunk-OHDWZ3ZU.js} +1 -1
- package/chunk-OKCHQM5Q.js +2 -0
- package/{chunk-2CSSUKCF.js → chunk-OZ2ESPRJ.js} +1 -1
- package/chunk-P2OCX57R.js +1 -0
- package/{chunk-YO23YVSC.js → chunk-Q23KXB3T.js} +1 -1
- package/{chunk-IQ6VG3YL.js → chunk-RHOQDE75.js} +1 -1
- package/{chunk-6LENP6AB.js → chunk-RN2UFUFZ.js} +1 -1
- package/{chunk-OLOVFS3Y.js → chunk-S6X7PJAB.js} +1 -1
- package/{chunk-BMBVCXB4.js → chunk-SLHUSJER.js} +1 -1
- package/{chunk-EW3R2HAB.js → chunk-SVXDMOLP.js} +1 -1
- package/{chunk-BLJMNWUM.js → chunk-SY6XFKYM.js} +1 -1
- package/{chunk-33PMTNWY.js → chunk-T4EHT3H4.js} +1 -1
- package/chunk-TJLNG6VF.js +1 -0
- package/chunk-U72SOCJH.js +1 -0
- package/{chunk-MWDWM2EU.js → chunk-UQZHGK5W.js} +1 -1
- package/chunk-UZZM57TN.js +130 -0
- package/chunk-V3CVBFI5.js +1 -0
- package/chunk-VRCICMG6.js +1 -0
- package/{chunk-NA5YXAMJ.js → chunk-VVUSFS6O.js} +1 -1
- package/chunk-WFQ3EPZT.js +7 -0
- package/{chunk-C7LM5UCK.js → chunk-X22YKT5B.js} +1 -1
- package/{chunk-B7WHT2EP.js → chunk-XAWSZFE3.js} +4 -4
- package/{chunk-BDDB5AS7.js → chunk-XVS4T3KX.js} +1 -1
- package/chunk-Y75WHRI7.js +202 -0
- package/{chunk-P7Z64VPC.js → chunk-YPBGL37O.js} +1 -1
- package/{chunk-BPAXVUBR.js → chunk-YWXAUVYL.js} +1 -1
- package/{chunk-HHDFSN55.js → chunk-YYDAQ7AW.js} +1 -1
- package/{chunk-YRCXWYJC.js → chunk-YYVQS5LF.js} +1 -1
- package/{chunk-RPPLUBX5.js → chunk-Z2QDMAKC.js} +1 -1
- package/chunk-Z45NTTES.js +1 -0
- package/chunk-ZJ4T6ZG6.js +1 -0
- package/{chunk-253IFSMV.js → chunk-ZTEDQLOG.js} +1 -1
- package/index.html +35 -2
- package/main-YSVUVFRK.js +1 -0
- package/package.json +1 -1
- package/chunk-3CO4TF6P.js +0 -1
- package/chunk-4W2QF5R5.js +0 -130
- package/chunk-6ACYDH2N.js +0 -1
- package/chunk-7GKCOHDX.js +0 -1
- package/chunk-7M7NEFRU.js +0 -1
- package/chunk-AGLKA7OG.js +0 -1
- package/chunk-AWXT2WGR.js +0 -180
- package/chunk-B3PT57AE.js +0 -1
- package/chunk-B63BKC6F.js +0 -2
- package/chunk-CI2PQN6B.js +0 -1
- package/chunk-FA5SZDUK.js +0 -1
- package/chunk-FDTB3ERA.js +0 -1
- package/chunk-GJTECHST.js +0 -129
- package/chunk-GQWMJTTS.js +0 -1
- package/chunk-IBUJP2RH.js +0 -1
- package/chunk-J4Z57NEI.js +0 -1
- package/chunk-JZM3B2LL.js +0 -1
- package/chunk-KPAVEB7H.js +0 -1
- package/chunk-LMNTEWLI.js +0 -1
- package/chunk-MNFWDRDS.js +0 -1
- package/chunk-NGY7QDWS.js +0 -1
- package/chunk-NKV2CQXX.js +0 -1
- package/chunk-O2ZSYZMM.js +0 -1
- package/chunk-OD62LD7H.js +0 -160
- package/chunk-P37DL4A6.js +0 -1
- package/chunk-PBN5IYNX.js +0 -1
- package/chunk-PDFK6YU3.js +0 -1
- package/chunk-PKLV4S5S.js +0 -7
- package/chunk-QAQ2CXF3.js +0 -202
- package/chunk-QK4W3BGY.js +0 -1
- package/chunk-S5LYGYPM.js +0 -1
- package/chunk-SCNZ5AYG.js +0 -1
- package/chunk-TYIRHEAK.js +0 -1
- package/chunk-U5M4TYR3.js +0 -1
- package/chunk-UEWFM35O.js +0 -1
- package/chunk-VAXEGESW.js +0 -1
- package/chunk-VDDGE5HW.js +0 -1
- package/chunk-ZGXJEG37.js +0 -1
- package/chunk-ZXCNQW44.js +0 -1
- package/main-2G5QRDWJ.js +0 -1
package/3rdpartylicenses.txt
CHANGED
|
@@ -1338,12 +1338,12 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
|
1338
1338
|
SOFTWARE.
|
|
1339
1339
|
|
|
1340
1340
|
--------------------------------------------------------------------------------
|
|
1341
|
-
Package:
|
|
1341
|
+
Package: @angular/router
|
|
1342
1342
|
License: "MIT"
|
|
1343
1343
|
|
|
1344
|
-
The MIT License
|
|
1344
|
+
The MIT License
|
|
1345
1345
|
|
|
1346
|
-
Copyright (c)
|
|
1346
|
+
Copyright (c) 2010-2025 Google LLC. https://angular.dev/license
|
|
1347
1347
|
|
|
1348
1348
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
1349
1349
|
of this software and associated documentation files (the "Software"), to deal
|
|
@@ -1352,24 +1352,24 @@ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
|
1352
1352
|
copies of the Software, and to permit persons to whom the Software is
|
|
1353
1353
|
furnished to do so, subject to the following conditions:
|
|
1354
1354
|
|
|
1355
|
-
The above copyright notice and this permission notice shall be included in
|
|
1356
|
-
copies or substantial portions of the Software.
|
|
1355
|
+
The above copyright notice and this permission notice shall be included in
|
|
1356
|
+
all copies or substantial portions of the Software.
|
|
1357
1357
|
|
|
1358
1358
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
1359
1359
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
1360
1360
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
1361
1361
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
1362
1362
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
1363
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
1364
|
-
SOFTWARE.
|
|
1363
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
1364
|
+
THE SOFTWARE.
|
|
1365
1365
|
|
|
1366
1366
|
--------------------------------------------------------------------------------
|
|
1367
|
-
Package:
|
|
1367
|
+
Package: ngx-toastr
|
|
1368
1368
|
License: "MIT"
|
|
1369
1369
|
|
|
1370
|
-
The MIT License
|
|
1370
|
+
The MIT License (MIT)
|
|
1371
1371
|
|
|
1372
|
-
Copyright (c)
|
|
1372
|
+
Copyright (c) Scott Cooper <scttcper@gmail.com>
|
|
1373
1373
|
|
|
1374
1374
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
1375
1375
|
of this software and associated documentation files (the "Software"), to deal
|
|
@@ -1378,19 +1378,19 @@ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
|
1378
1378
|
copies of the Software, and to permit persons to whom the Software is
|
|
1379
1379
|
furnished to do so, subject to the following conditions:
|
|
1380
1380
|
|
|
1381
|
-
The above copyright notice and this permission notice shall be included in
|
|
1382
|
-
|
|
1381
|
+
The above copyright notice and this permission notice shall be included in all
|
|
1382
|
+
copies or substantial portions of the Software.
|
|
1383
1383
|
|
|
1384
1384
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
1385
1385
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
1386
1386
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
1387
1387
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
1388
1388
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
1389
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
1390
|
-
|
|
1389
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
1390
|
+
SOFTWARE.
|
|
1391
1391
|
|
|
1392
1392
|
--------------------------------------------------------------------------------
|
|
1393
|
-
Package: @angular/
|
|
1393
|
+
Package: @angular/common
|
|
1394
1394
|
License: "MIT"
|
|
1395
1395
|
|
|
1396
1396
|
The MIT License
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as p}from"./chunk-
|
|
1
|
+
import{h as p}from"./chunk-5FSMHZSY.js";import{Ab as s,Jb as l,Ob as C,Ub as c,Vb as m,Wb as d,ra as a,ta as o,wb as r}from"./chunk-JP6RBSB3.js";var u=(()=>{class t extends p{static \u0275fac=(()=>{let i;return function(e){return(i||(i=o(t)))(e||t)}})();static \u0275cmp=r({type:t,selectors:[["CheckIcon"]],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.86199 11.5948C4.78717 11.5923 4.71366 11.5745 4.64596 11.5426C4.57826 11.5107 4.51779 11.4652 4.46827 11.4091L0.753985 7.69483C0.683167 7.64891 0.623706 7.58751 0.580092 7.51525C0.536478 7.44299 0.509851 7.36177 0.502221 7.27771C0.49459 7.19366 0.506156 7.10897 0.536046 7.03004C0.565935 6.95111 0.613367 6.88 0.674759 6.82208C0.736151 6.76416 0.8099 6.72095 0.890436 6.69571C0.970973 6.67046 1.05619 6.66385 1.13966 6.67635C1.22313 6.68886 1.30266 6.72017 1.37226 6.76792C1.44186 6.81567 1.4997 6.8786 1.54141 6.95197L4.86199 10.2503L12.6397 2.49483C12.7444 2.42694 12.8689 2.39617 12.9932 2.40745C13.1174 2.41873 13.2343 2.47141 13.3251 2.55705C13.4159 2.64268 13.4753 2.75632 13.4938 2.87973C13.5123 3.00315 13.4888 3.1292 13.4271 3.23768L5.2557 11.4091C5.20618 11.4652 5.14571 11.5107 5.07801 11.5426C5.01031 11.5745 4.9368 11.5923 4.86199 11.5948Z","fill","currentColor"]],template:function(n,e){n&1&&(a(),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{u as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as D}from"./chunk-BBQIPZWM.js";import{a as ot}from"./chunk-G4XX7EU2.js";import{a as He,b as Le}from"./chunk-AACWH3EJ.js";import{a as je}from"./chunk-YPBGL37O.js";import{b as N}from"./chunk-RHOQDE75.js";import{a as ie}from"./chunk-DQQ6JL6H.js";import{a as Ae,b as Me}from"./chunk-FLZXCWDU.js";import{a as Pe}from"./chunk-XKI7WLHE.js";import"./chunk-DHW7UHFT.js";import"./chunk-C2GO6SPF.js";import{a as j,b as z}from"./chunk-O4QM64EH.js";import{d as Re,i as ke,j as Ne,k as Je}from"./chunk-SVXDMOLP.js";import{a as Te,b as Fe}from"./chunk-S6X7PJAB.js";import"./chunk-LWLJZPBI.js";import"./chunk-3NU3P6NL.js";import{a as Be}from"./chunk-XKCLERWG.js";import"./chunk-GDX5XEV3.js";import{a as Ve,b as De}from"./chunk-DLUALPHU.js";import"./chunk-4DOELXOP.js";import"./chunk-VVUSFS6O.js";import"./chunk-ZTEDQLOG.js";import"./chunk-EDGADVEY.js";import"./chunk-JTDJJORR.js";import"./chunk-LZUGPBFD.js";import"./chunk-2KERKGCG.js";import{g as Ie,h as Ee}from"./chunk-LUPSXHRX.js";import{b as ye,c as we}from"./chunk-X22YKT5B.js";import{a as ge,b as he}from"./chunk-JYCUE5HV.js";import{a as y,b as Se,c as Ce,d as xe,e as be,f as ve,g as nt}from"./chunk-JMEBBWX4.js";import"./chunk-FUZFAJGJ.js";import{n as ue,o as de,w as fe,x as _e}from"./chunk-5FSMHZSY.js";import"./chunk-BHV2HCJY.js";import{b as ne,c as oe,e as re,f as le,k as ae,l as pe,o as me,u as se,x as ce}from"./chunk-G5S5AZA7.js";import"./chunk-Z45NTTES.js";import"./chunk-LD7LVE2B.js";import"./chunk-BLQJXMNV.js";import"./chunk-F2X3VGZZ.js";import{h as Q,j as X,k as Y,n as it,p as Z,q as ee,r as te}from"./chunk-OKCHQM5Q.js";import{Ab as H,Ac as F,Cb as g,Ga as R,Jc as w,Kb as s,Kc as P,Lc as V,Mc as b,Ub as l,Vb as o,Wb as C,X as B,Yc as I,Z as G,_b as E,c as J,cb as U,dc as T,ec as _,gb as a,ha as v,pa as h,qa as S,qc as m,rc as x,s as O,sc as k,ta as tt,uc as L,vc as W,wb as A,wc as M,xc as K,yc as q,zc as $}from"./chunk-JP6RBSB3.js";import{a as c,b as u}from"./chunk-YQFG5XE2.js";var St={data:{data:[],totalCount:0},meta:{options:{outlets:[],paymentStates:[],deliveryStates:[]},filter:{number:null,outletName:null,paymentState:0,deliveryState:0,from:null,to:null,customerID:null,pageNumber:1,rowCount:20,pageSize:20,export:!1,exportPageNumber:1,exportRowCount:1e4}},filter:{number:null,outletName:null,paymentState:0,deliveryState:0,from:null,to:null,customerID:null,pageNumber:1,rowCount:20,pageSize:20,export:!1,exportPageNumber:1,exportRowCount:1e4}},$e=Se(ve(St),Ce(t=>({first:I(()=>(t.filter().pageNumber-1)*t.filter().pageSize+1),end:I(()=>Math.min(t.filter().pageNumber*t.filter().pageSize,t.data().totalCount)),hasCheckedRows:I(()=>t.data().data.some(p=>p.checked)),checkedInvoice:I(()=>t.data().data.filter(p=>p.checked).map(p=>p.id))})),be(t=>{let p=v(D),e=v(N);return{updateFilter(n){y(t,i=>u(c({},i),{filter:c(c({},i.filter),n),skipRequestFirst:!1}))},onRowSelect(n){y(t,i=>{let f=i.data.data.map(d=>d.id===n.id?u(c({},d),{checked:!0}):d);return u(c({},i),{data:u(c({},i.data),{data:f})})})},onRowUnselect(n){y(t,i=>{let f=i.data.data.map(d=>d.id===n.id?u(c({},d),{checked:!1}):d);return u(c({},i),{data:u(c({},i.data),{data:f})})})},onHeaderCheckboxToggle(n){y(t,i=>{let f=i.data.data.map(d=>u(c({},d),{checked:n}));return u(c({},i),{data:u(c({},i.data),{data:f})})})},getCustomerInvoice:j(J(O(n=>Object.entries(n).reduce((i,[f,d])=>(d!=null&&(i[f]=d),i),{})),B(n=>p.getJournalInvoice(n).pipe(O(i=>u(c({},i),{data:i.data.map(f=>u(c({},f),{due:e.from(f.due)?e.from(f.due).format():null,checked:!1}))})),Be("getCustomerInvoice"),z({next:i=>{y(t,f=>u(c({},f),{data:u(c({},f.data),{data:i.data,totalCount:i.totalCount})}))},error:i=>{console.error("Error fetching customer invoice:",i)}}))))),getCustomerInvoiceLoader:j(J(B(()=>p.getJournalInvoiceLoader().pipe(z({next:n=>{y(t,i=>u(c({},i),{meta:n}))},error:n=>{console.error("Error fetching customer invoice loader:",n)}})))))}}),xe(t=>({onInit:()=>{t.getCustomerInvoiceLoader(),t.getCustomerInvoice(t.filter)}})));var Qe=t=>({"ng-invalid ng-dirty":t}),bt=()=>({});function vt(t,p){if(t&1){let e=E();l(0,"p-button",10),T("onClick",function(){h(e);let n=_(2);return S(n.onGenerateJournal())}),o()}}function yt(t,p){if(t&1&&g(0,vt,1,0,"p-button",9),t&2){let e=_();s("ngIf",e.store.hasCheckedRows())}}function wt(t,p){t&1&&(l(0,"tr")(1,"th",12),C(2,"p-tableHeaderCheckbox"),o(),l(3,"th",13),m(4,"Outlet"),o(),l(5,"th",14),m(6,"Number"),o(),l(7,"th",15),m(8,"Customer"),o(),l(9,"th",16),m(10,"Date"),o(),l(11,"th",16),m(12,"Due"),o(),l(13,"th",13),m(14,"Amount"),o(),l(15,"th",17),m(16,"Payment"),o(),l(17,"th",17),m(18,"Delivery"),o(),C(19,"th",18),o())}function It(t,p){if(t&1&&(l(0,"tr")(1,"td"),C(2,"p-tableCheckbox",19),o(),l(3,"td"),m(4),o(),l(5,"td")(6,"a",20),m(7),o()(),l(8,"td")(9,"a",20),m(10),o()(),l(11,"td"),m(12),w(13,"date"),o(),l(14,"td"),m(15),w(16,"date"),o(),l(17,"td"),m(18),w(19,"number"),o(),l(20,"td"),C(21,"p-chip",21),o(),l(22,"td"),C(23,"p-chip",21),o(),l(24,"td"),C(25,"p-button",22),o()()),t&2){let e=p.$implicit,r=_(2);a(2),s("value",e),a(2),x(e.outlet),a(2),s("href",r.authService.getTenantExternalURL()+"/menu/Orders/Orders/Customer_Invoice/Info?ID="+e.id,U),a(),k(" ",e.number," "),a(2),s("href",r.authService.getTenantExternalURL()+"/menu/Contacts/Contact/Customers/Info?ID="+e.customerID,U),a(),k(" ",e.customer," "),a(2),x(V(13,14,e.date,"d MMM y hh:mm")),a(3),x(e.due?V(16,17,e.due,"d MMM y hh:mm"):"-"),a(3),x(P(19,20,e.amount)),a(3),s("label",e.payment),a(2),s("label",e.delivery),a(2),s("icon",e.integrated?"fa-solid fa-circle-check":"fa-solid fa-circle-xmark")("severity",e.integrated?"success":"danger")("text",!0)}}function Et(t,p){if(t&1&&m(0),t&2){let e=_(2);L(" Showing ",e.store.first()," to ",e.store.end()," of ",e.store.data().totalCount," entries ")}}function Tt(t,p){t&1&&(l(0,"tr")(1,"td",23)(2,"span"),m(3,"No records found."),o()()())}function Ft(t,p){if(t&1){let e=E();l(0,"p-panel")(1,"p-table",11),T("onPage",function(n){h(e);let i=_();return S(i.onPageChange(n))})("onRowSelect",function(n){h(e);let i=_();return S(i.onRowSelect(n))})("onRowUnselect",function(n){h(e);let i=_();return S(i.onRowUnselect(n))})("onHeaderCheckboxToggle",function(n){h(e);let i=_();return S(i.onHeaderCheckboxToggle(n))}),g(2,wt,20,0,"ng-template",null,3,b)(4,It,26,22,"ng-template",null,4,b)(6,Et,1,3,"ng-template",null,5,b)(8,Tt,4,0,"ng-template",null,6,b),o()()}if(t&2){let e=_();a(),s("lazy",!0)("paginator",!0)("rows",e.store.filter().pageSize)("totalRecords",e.store.data().totalCount)("value",e.store.data().data)}}function Vt(t,p){if(t&1&&(l(0,"span",36),m(1),w(2,"truncate"),o()),t&2){let e=p.$implicit;s("pTooltip",e.name),a(),k(" ",V(2,2,e.name,30)," ")}}function Dt(t,p){if(t&1&&(l(0,"div")(1,"span",38),m(2),o()()),t&2){let e=p.$implicit;a(2),x(e)}}function Rt(t,p){if(t&1&&(l(0,"div"),g(1,Dt,3,1,"div",37),o()),t&2){let e=_(2);a(),s("ngForOf",e.getErrors("from"))}}function kt(t,p){if(t&1&&(l(0,"div")(1,"span",38),m(2),o()()),t&2){let e=p.$implicit;a(2),x(e)}}function Nt(t,p){if(t&1&&(l(0,"div"),g(1,kt,3,1,"div",37),o()),t&2){let e=_(2);a(),s("ngForOf",e.getErrors("to"))}}function Jt(t,p){if(t&1&&(l(0,"div")(1,"span",38),m(2),o()()),t&2){let e=p.$implicit;a(2),x(e)}}function Bt(t,p){if(t&1&&(l(0,"div"),g(1,Jt,3,1,"div",37),o()),t&2){let e=_(2);a(),s("ngForOf",e.getErrors("pageSize"))}}function Mt(t,p){if(t&1){let e=E();l(0,"form",24)(1,"div",25)(2,"label",26),m(3,"Outlet"),o(),l(4,"p-select",27),g(5,Vt,3,5,"ng-template",null,7,b),o()(),l(7,"div",25)(8,"label",26),m(9,"Payment"),o(),C(10,"p-select",28),o(),l(11,"div",25)(12,"label",26),m(13,"Delivery"),o(),C(14,"p-select",29),o(),l(15,"div",25)(16,"label",26),m(17,"From - To"),o(),l(18,"div",30),C(19,"p-datepicker",31),g(20,Rt,2,1,"div",32),C(21,"p-datepicker",33),g(22,Nt,2,1,"div",32),o()(),l(23,"div",25)(24,"label",26),m(25,"Customer"),o(),l(26,"p-autocomplete",34),T("completeMethod",function(n){h(e);let i=_();return S(i.onSearchContact(n))}),o()(),l(27,"div",25)(28,"label",26),m(29,"Page Size"),o(),C(30,"input",35),g(31,Bt,2,1,"div",32),o()()}if(t&2){let e=_();s("formGroup",e.form),a(4),s("virtualScrollItemSize",50)("options",e.store.meta().options.outlets),a(6),s("options",e.store.meta().options.paymentStates),a(4),s("options",e.store.meta().options.deliveryStates),a(5),s("iconDisplay","input")("showIcon",!0)("ngClass",F(17,Qe,e.isInvalid("from"))),a(),s("ngIf",e.isInvalid("from")),a(),s("iconDisplay","input")("showIcon",!0)("ngClass",F(19,Qe,e.isInvalid("to"))),a(),s("ngIf",e.isInvalid("to")),a(4),s("suggestions",e.customerSuggestions()),a(4),s("ngClass",F(21,Qe,e.isInvalid("pageSize")))("autoNumeric",$(23,bt)),a(),s("ngIf",e.isInvalid("pageSize"))}}var _t=(()=>{class t extends Pe{constructor(){super(...arguments),this.store=v($e),this.dayjsService=v(N),this.generateJournalService=v(D),this.authService=v(ie),this.isDialogFilterVisible=R(!1),this.isInitDialogFilterVisible=R(!1),this.customerSuggestions=R([]),this.fb=v(se)}ngOnInit(){console.log(this.dayjsService.from('0001-01-01T00:00:00"')&&!0),this.generateFilterForm()}generateFilterForm(){let{number:e,outletName:r,paymentState:n,deliveryState:i,from:f,to:d,customerID:ze,pageNumber:Oe,rowCount:Ge,pageSize:Ue,export:We,exportPageNumber:Ke,exportRowCount:qe}=this.store.filter();this.form=this.fb.group({number:this.fb.control(e),outletName:this.fb.control(r),paymentState:this.fb.control(n),deliveryState:this.fb.control(i),from:this.fb.control(this.dayjsService.from(f)?this.dayjsService.from(f).toDate():null),to:this.fb.control(this.dayjsService.from(d)?this.dayjsService.from(d).toDate():null),customerID:this.fb.control(ze),pageNumber:this.fb.control(Oe),rowCount:this.fb.control(Ge),pageSize:this.fb.control(Ue,[oe.required]),export:this.fb.control(We),exportPageNumber:this.fb.control(Ke),exportRowCount:this.fb.control(qe)})}onSearchContact(e){let{query:r}=e;this.generateJournalService.getCustomerSuggestions(r).pipe(Be("Customer Suggestions"),G(n=>{this.customerSuggestions.set(n)})).subscribe()}onSearch(e){this.store.updateFilter(u(c({},this.store.filter()),{number:e}))}onRowSelect(e){this.store.onRowSelect(e.data)}onRowUnselect(e){if(Array.isArray(e.data)){e.data.forEach(r=>{this.store.onRowUnselect(r)});return}else this.store.onRowUnselect(e.data)}onHeaderCheckboxToggle(e){this.store.onHeaderCheckboxToggle(e.checked)}onPageChange(e){let r=e.first/e.rows;this.store.updateFilter(u(c({},this.store.filter()),{pageNumber:r+1}))}onGenerateJournal(){this.generateJournalService.generateJournalInvoice(this.store.checkedInvoice()).pipe(G(()=>{this.store.getCustomerInvoice(this.store.filter)})).subscribe()}onFilterOKEvent(){if(this.form.invalid){this.form.markAllAsTouched();return}let e=Object.entries(this.form.getRawValue()).reduce((r,[n,i])=>{switch(n){case"customerID":i||(r[n]=ot);break;case"from":typeof i=="object"?r[n]=this.dayjsService.from(i)?this.dayjsService.format(i):null:r[n]=i!=null?String(i):null;break;case"to":typeof i=="object"?r[n]=this.dayjsService.from(i)?this.dayjsService.format(i):null:r[n]=i!=null?String(i):null;break;default:r[n]=i===null?"":i;break}return r},{});console.log("Filter Body:",e),this.store.updateFilter(e),this.isDialogFilterVisible.set(!1)}static{this.\u0275fac=(()=>{let e;return function(n){return(e||(e=tt(t)))(n||t)}})()}static{this.\u0275cmp=A({type:t,selectors:[["app-customer-invoice"]],features:[q([$e]),H],decls:7,vars:5,consts:[["actionButton",""],["content",""],["filters",""],["header",""],["body",""],["paginatorleft",""],["emptymessage",""],["item",""],["pageTitle","Customer Invoice",3,"isDialogFilterVisibleChange","isInitDialogFilterVisibleChange","filterConfirmed","search","isSearchableInput","isFilterable","isDialogFilterVisible","isInitDialogFilterVisible","scrollable"],["label","Generate Journal",3,"onClick",4,"ngIf"],["label","Generate Journal",3,"onClick"],["dataKey","id",3,"onPage","onRowSelect","onRowUnselect","onHeaderCheckboxToggle","lazy","paginator","rows","totalRecords","value"],[2,"width","1rem"],[2,"width","10rem"],[2,"width","12rem"],[2,"width","14rem"],[2,"width","11rem"],[2,"width","9rem"],[2,"width","4rem"],[3,"value"],["target","_blank",1,"link","link-primary",3,"href"],[3,"label"],[3,"icon","severity","text"],["colspan","10"],[1,"d-flex","flex-column","row-gap-3",3,"formGroup"],[1,"d-flex","flex-column"],["for","outlet"],["virtualScroll","","showClear","","filter","","filterBy","name","formControlName","outletName","appendTo","body","optionLabel","name","optionValue","name","placeholder","Select an Outlet",3,"virtualScrollItemSize","options"],["showClear","","formControlName","paymentState","appendTo","body","optionLabel","value","optionValue","key","placeholder","Select a Payment",3,"options"],["showClear","","formControlName","deliveryState","appendTo","body","optionLabel","value","optionValue","key","placeholder","Select a Delivery",3,"options"],[1,"d-flex","flex-column","gap-2"],["showClear","","formControlName","from","styleClass","w-100","appendTo","body","inputId","icondisplay",3,"iconDisplay","showIcon","ngClass"],[4,"ngIf"],["showClear","","formControlName","to","styleClass","w-100","appendTo","body","inputId","icondisplay",3,"iconDisplay","showIcon","ngClass"],["showClear","","formControlName","customerID","appendTo","body","styleClass","w-100","optionLabel","Value","optionValue","Key","inputStyleClass","w-100",3,"completeMethod","suggestions"],["type","text","pInputText","","formControlName","pageSize",3,"ngClass","autoNumeric"],[3,"pTooltip"],[4,"ngFor","ngForOf"],[1,"text-danger"]],template:function(r,n){if(r&1){let i=E();l(0,"app-main-panel",8),K("isDialogFilterVisibleChange",function(d){return h(i),M(n.isDialogFilterVisible,d)||(n.isDialogFilterVisible=d),S(d)})("isInitDialogFilterVisibleChange",function(d){return h(i),M(n.isInitDialogFilterVisible,d)||(n.isInitDialogFilterVisible=d),S(d)}),T("filterConfirmed",function(){return h(i),S(n.onFilterOKEvent())})("search",function(d){return h(i),S(n.onSearch(d))}),g(1,yt,1,1,"ng-template",null,0,b)(3,Ft,10,5,"ng-template",null,1,b)(5,Mt,32,24,"ng-template",null,2,b),o()}r&2&&(s("isSearchableInput",!0)("isFilterable",!0),W("isDialogFilterVisible",n.isDialogFilterVisible)("isInitDialogFilterVisible",n.isInitDialogFilterVisible),s("scrollable",!0))},dependencies:[Ee,Je,Re,ke,Ne,te,Q,X,Y,ee,Z,Me,Ae,he,ge,_e,fe,De,Ve,Fe,Te,de,ue,Le,He,ce,ae,ne,re,le,pe,me,we,ye,Ie,je],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var Pt={data:{data:[],totalCount:0},meta:{options:{Outlets:[],PaymentStates:[],DeliveryStates:[]},filter:{number:null,outletName:null,paymentState:0,deliveryState:0,from:null,to:null,supplierID:null,pageNumber:1,rowCount:20,pageSize:20,export:!1,exportPageNumber:1,exportRowCount:1e4}},filter:{number:null,outletName:null,paymentState:0,deliveryState:0,from:null,to:null,supplierID:null,pageNumber:1,rowCount:20,pageSize:20,export:!1,exportPageNumber:1,exportRowCount:1e4},skipRequestFirst:!0},Xe=Se(nt("JournalSupplierBillStore"),ve(Pt),Ce(t=>({first:I(()=>(t.filter().pageNumber-1)*t.filter().pageSize+1),end:I(()=>Math.min(t.filter().pageNumber*t.filter().pageSize,t.data().totalCount)),hasCheckedRows:I(()=>t.data().data.some(p=>p.checked)),checkedSupplierBill:I(()=>t.data().data.filter(p=>p.checked).map(p=>p.id))})),be(t=>{let p=v(D),e=v(N);return{updateFilter(r){y(t,n=>u(c({},n),{filter:c(c({},n.filter),r),skipRequestFirst:!1}))},onRowSelect(r){y(t,n=>{let i=n.data.data.map(f=>f.id===r.id?u(c({},f),{checked:!0}):f);return u(c({},n),{data:u(c({},n.data),{data:i})})})},onRowUnselect(r){y(t,n=>{let i=n.data.data.map(f=>f.id===r.id?u(c({},f),{checked:!1}):f);return u(c({},n),{data:u(c({},n.data),{data:i})})})},onHeaderCheckboxToggle(r){y(t,n=>{let i=n.data.data.map(f=>u(c({},f),{checked:r}));return u(c({},n),{data:u(c({},n.data),{data:i})})})},getGJSupplierBillLoader:j(J(B(()=>p.getGJSupplierBillLoader().pipe(z({next:r=>{console.log("GJSupplierBillLoader response:",r),y(t,n=>u(c({},n),{meta:r}))},error:r=>{console.error("Error fetching GJSupplierBillLoader:",r)}}))))),getJournalSupplierBill:j(J(O(r=>Object.entries(r).reduce((n,[i,f])=>(f!=null&&(n[i]=f),n),{})),B(r=>p.getJournalSupplierBill(r).pipe(O(n=>u(c({},n),{data:n.data.map(i=>u(c({},i),{due:e.from(i.due)?e.from(i.due).format():null,checked:!1}))})),z({next:n=>{y(t,i=>u(c({},i),{data:n}))},error:n=>{console.error("Error fetching journal supplier bill:",n)}})))))}}),xe(t=>({onInit:()=>{t.getGJSupplierBillLoader(),t.getJournalSupplierBill(t.filter)}})));var Ye=t=>({"ng-invalid ng-dirty":t}),jt=()=>({});function zt(t,p){if(t&1){let e=E();l(0,"p-button",10),T("onClick",function(){h(e);let n=_(2);return S(n.onGenerateJournal())}),o()}}function Ot(t,p){if(t&1&&g(0,zt,1,0,"p-button",9),t&2){let e=_();s("ngIf",e.store.hasCheckedRows())}}function Gt(t,p){t&1&&(l(0,"tr")(1,"th",12),C(2,"p-tableHeaderCheckbox"),o(),l(3,"th",13),m(4,"Outlet"),o(),l(5,"th",14),m(6,"Number"),o(),l(7,"th",15),m(8,"Supplier"),o(),l(9,"th",16),m(10,"Date"),o(),l(11,"th",16),m(12,"Due"),o(),l(13,"th",13),m(14,"Amount"),o(),l(15,"th",17),m(16,"Payment"),o(),l(17,"th",17),m(18,"Delivery"),o(),C(19,"th",18),o())}function Ut(t,p){if(t&1&&(l(0,"tr")(1,"td"),C(2,"p-tableCheckbox",19),o(),l(3,"td"),m(4),o(),l(5,"td")(6,"a",20),m(7),o()(),l(8,"td"),m(9),o(),l(10,"td"),m(11),w(12,"date"),o(),l(13,"td"),m(14),w(15,"date"),o(),l(16,"td"),m(17),w(18,"number"),o(),l(19,"td"),C(20,"p-chip",21),o(),l(21,"td"),C(22,"p-chip",21),o(),l(23,"td"),C(24,"p-button",22),o()()),t&2){let e=p.$implicit,r=_(2);a(2),s("value",e),a(2),x(e.outlet),a(2),s("href",r.authService.getTenantExternalURL()+"/menu/Orders/Orders/Supplier_Bill/Info?ID="+e.id,U),a(),k(" ",e.number," "),a(2),x(e.customer),a(2),x(V(12,13,e.date,"d MMM y hh:mm")),a(3),x(e.due?V(15,16,e.due,"d MMM y hh:mm"):"-"),a(3),x(P(18,19,e.amount)),a(3),s("label",e.payment),a(2),s("label",e.delivery),a(2),s("icon",e.integrated?"fa-solid fa-circle-check":"fa-solid fa-circle-xmark")("severity",e.integrated?"success":"danger")("text",!0)}}function At(t,p){if(t&1&&m(0),t&2){let e=_(2);L(" Showing ",e.store.first()," to ",e.store.end()," of ",e.store.data().totalCount," entries ")}}function Ht(t,p){t&1&&(l(0,"tr")(1,"td",23)(2,"span"),m(3,"No records found."),o()()())}function Lt(t,p){if(t&1){let e=E();l(0,"p-panel")(1,"p-table",11),T("onPage",function(n){h(e);let i=_();return S(i.onPageChange(n))})("onRowSelect",function(n){h(e);let i=_();return S(i.onRowSelect(n))})("onRowUnselect",function(n){h(e);let i=_();return S(i.onRowUnselect(n))})("onHeaderCheckboxToggle",function(n){h(e);let i=_();return S(i.onHeaderCheckboxToggle(n))}),g(2,Gt,20,0,"ng-template",null,3,b)(4,Ut,25,21,"ng-template",null,4,b)(6,At,1,3,"ng-template",null,5,b)(8,Ht,4,0,"ng-template",null,6,b),o()()}if(t&2){let e=_();a(),s("value",e.store.data().data)("paginator",!0)("rows",e.store.filter().pageSize)("totalRecords",e.store.data().totalCount)("lazy",!0)}}function Wt(t,p){if(t&1&&(l(0,"span",36),m(1),w(2,"truncate"),o()),t&2){let e=p.$implicit;s("pTooltip",e.name),a(),k(" ",V(2,2,e.name,30)," ")}}function Kt(t,p){if(t&1&&(l(0,"div")(1,"span",38),m(2),o()()),t&2){let e=p.$implicit;a(2),x(e)}}function qt(t,p){if(t&1&&(l(0,"div"),g(1,Kt,3,1,"div",37),o()),t&2){let e=_(2);a(),s("ngForOf",e.getErrors("from"))}}function $t(t,p){if(t&1&&(l(0,"div")(1,"span",38),m(2),o()()),t&2){let e=p.$implicit;a(2),x(e)}}function Qt(t,p){if(t&1&&(l(0,"div"),g(1,$t,3,1,"div",37),o()),t&2){let e=_(2);a(),s("ngForOf",e.getErrors("to"))}}function Xt(t,p){if(t&1&&(l(0,"div")(1,"span",38),m(2),o()()),t&2){let e=p.$implicit;a(2),x(e)}}function Yt(t,p){if(t&1&&(l(0,"div"),g(1,Xt,3,1,"div",37),o()),t&2){let e=_(2);a(),s("ngForOf",e.getErrors("pageSize"))}}function Zt(t,p){if(t&1){let e=E();l(0,"form",24)(1,"div",25)(2,"label",26),m(3,"Outlet"),o(),l(4,"p-select",27),g(5,Wt,3,5,"ng-template",null,7,b),o()(),l(7,"div",25)(8,"label",26),m(9,"Payment"),o(),C(10,"p-select",28),o(),l(11,"div",25)(12,"label",26),m(13,"Delivery"),o(),C(14,"p-select",29),o(),l(15,"div",25)(16,"label",26),m(17,"From - To"),o(),l(18,"div",30),C(19,"p-datepicker",31),g(20,qt,2,1,"div",32),C(21,"p-datepicker",33),g(22,Qt,2,1,"div",32),o()(),l(23,"div",25)(24,"label",26),m(25,"Supplier"),o(),l(26,"p-autocomplete",34),w(27,"async"),T("completeMethod",function(n){h(e);let i=_();return S(i.onSearchSupplier(n))}),o()(),l(28,"div",25)(29,"label",26),m(30,"Page Size"),o(),C(31,"input",35),g(32,Yt,2,1,"div",32),o()()}if(t&2){let e=_();s("formGroup",e.form),a(4),s("virtualScrollItemSize",50)("options",e.store.meta().options.Outlets),a(6),s("options",e.store.meta().options.PaymentStates),a(4),s("options",e.store.meta().options.DeliveryStates),a(5),s("iconDisplay","input")("showIcon",!0)("ngClass",F(19,Ye,e.isInvalid("from"))),a(),s("ngIf",e.isInvalid("from")),a(),s("iconDisplay","input")("showIcon",!0)("ngClass",F(21,Ye,e.isInvalid("to"))),a(),s("ngIf",e.isInvalid("to")),a(4),s("suggestions",P(27,17,e.supplierSuggestions$)),a(5),s("autoNumeric",$(23,jt))("ngClass",F(24,Ye,e.isInvalid("pageSize"))),a(),s("ngIf",e.isInvalid("pageSize"))}}var gt=(()=>{class t extends Pe{constructor(){super(),this.generateJournalService=v(D),this.store=v(Xe),this.authService=v(ie),this.isDialogFilterVisible=R(!1),this.isInitDialogFilterVisible=R(!1),this.fb=v(se),this.dayjsService=v(N)}ngOnInit(){this.initform()}onFilterOKEvent(){if(this.form.invalid){this.form.markAllAsTouched();return}let e=Object.entries(this.form.getRawValue()).reduce((r,[n,i])=>(i!=null&&(n==="from"||n==="to"?(typeof i=="string"||typeof i=="number"||i instanceof Date)&&(r[n]=this.dayjsService.from(i)?this.dayjsService.format(i):null):r[n]=i),r),{});this.store.updateFilter(e),this.isDialogFilterVisible.update(r=>!r)}onRowSelect(e){this.store.onRowSelect(e.data)}onSearchSupplier(e){this.supplierSuggestions$=this.generateJournalService.getSupplierSuggestions(e.query).pipe(Be("Supplier Suggestions"))}initform(){let{outletName:e,number:r,from:n,to:i,paymentState:f,deliveryState:d,supplierID:ze,pageNumber:Oe,rowCount:Ge,pageSize:Ue,export:We,exportPageNumber:Ke,exportRowCount:qe}=this.store.filter();this.form=this.fb.group({outletName:this.fb.control(e),number:this.fb.control(r),from:this.fb.control(this.dayjsService.from(n)?this.dayjsService.from(n).toDate():null),to:this.fb.control(this.dayjsService.from(i)?this.dayjsService.from(i).toDate():null),paymentState:this.fb.control(f),deliveryState:this.fb.control(d),supplierID:this.fb.control(ze),pageNumber:this.fb.control(Oe),rowCount:this.fb.control(Ge),pageSize:this.fb.control(Ue,[oe.required]),export:this.fb.control(We),exportPageNumber:this.fb.control(Ke),exportRowCount:this.fb.control(qe)})}onRowUnselect(e){if(Array.isArray(e.data)){e.data.forEach(r=>{this.store.onRowUnselect(r)});return}else this.store.onRowUnselect(e.data)}onHeaderCheckboxToggle(e){this.store.onHeaderCheckboxToggle(e.checked)}onGenerateJournal(){this.generateJournalService.generateJournalSupplierBill(this.store.checkedSupplierBill()).pipe(G(()=>{this.store.getJournalSupplierBill(this.store.filter)})).subscribe()}onSearch(e){this.store.updateFilter(u(c({},this.store.filter()),{number:e}))}onPageChange(e){this.store.updateFilter(u(c({},this.store.filter()),{pageNumber:e.first/e.rows+1}))}static{this.\u0275fac=function(r){return new(r||t)}}static{this.\u0275cmp=A({type:t,selectors:[["app-journal-supplier-bill"]],features:[q([Xe]),H],decls:7,vars:5,consts:[["actionButton",""],["content",""],["filters",""],["header",""],["body",""],["paginatorleft",""],["emptymessage",""],["item",""],["pageTitle","Supplier Bill",3,"isDialogFilterVisibleChange","isInitDialogFilterVisibleChange","filterConfirmed","search","isSearchableInput","isFilterable","isDialogFilterVisible","isInitDialogFilterVisible","scrollable"],["label","Generate Journal",3,"onClick",4,"ngIf"],["label","Generate Journal",3,"onClick"],["dataKey","id",3,"onPage","onRowSelect","onRowUnselect","onHeaderCheckboxToggle","value","paginator","rows","totalRecords","lazy"],[2,"width","1rem"],[2,"width","10rem"],[2,"width","12rem"],[2,"width","14rem"],[2,"width","11rem"],[2,"width","9rem"],[2,"width","4rem"],[3,"value"],["target","_blank",1,"link","link-primary",3,"href"],[3,"label"],[3,"icon","severity","text"],["colspan","10"],[1,"d-flex","flex-column","row-gap-3",3,"formGroup"],[1,"d-flex","flex-column"],["for","outlet"],["virtualScroll","","showClear","","filter","","filterBy","name","formControlName","outletName","appendTo","body","optionLabel","name","optionValue","name","placeholder","Select an Outlet",3,"virtualScrollItemSize","options"],["showClear","","formControlName","paymentState","appendTo","body","optionLabel","value","optionValue","key","placeholder","Select a Payment",3,"options"],["showClear","","formControlName","deliveryState","appendTo","body","optionLabel","value","optionValue","key","placeholder","Select a Delivery",3,"options"],[1,"d-flex","flex-column","gap-2"],["showClear","","formControlName","from","styleClass","w-100","appendTo","body","inputId","icondisplay",3,"iconDisplay","showIcon","ngClass"],[4,"ngIf"],["showClear","","formControlName","to","styleClass","w-100","appendTo","body","inputId","icondisplay",3,"iconDisplay","showIcon","ngClass"],["showClear","","formControlName","supplierID","appendTo","body","styleClass","w-100","optionLabel","Value","optionValue","Key","inputStyleClass","w-100",3,"completeMethod","suggestions"],["type","text","pInputText","","formControlName","pageSize",3,"autoNumeric","ngClass"],[3,"pTooltip"],[4,"ngFor","ngForOf"],[1,"text-danger"]],template:function(r,n){if(r&1){let i=E();l(0,"app-main-panel",8),K("isDialogFilterVisibleChange",function(d){return h(i),M(n.isDialogFilterVisible,d)||(n.isDialogFilterVisible=d),S(d)})("isInitDialogFilterVisibleChange",function(d){return h(i),M(n.isInitDialogFilterVisible,d)||(n.isInitDialogFilterVisible=d),S(d)}),T("filterConfirmed",function(){return h(i),S(n.onFilterOKEvent())})("search",function(d){return h(i),S(n.onSearch(d))}),g(1,Ot,1,1,"ng-template",null,0,b)(3,Lt,10,5,"ng-template",null,1,b)(5,Zt,33,26,"ng-template",null,2,b),o()}r&2&&(s("isSearchableInput",!0)("isFilterable",!0),W("isDialogFilterVisible",n.isDialogFilterVisible)("isInitDialogFilterVisible",n.isInitDialogFilterVisible),s("scrollable",!0))},dependencies:[Ee,Je,Re,ke,Ne,te,Q,X,Y,it,ee,Z,Me,Ae,he,ge,_e,fe,De,Ve,Fe,Te,Le,He,ce,ae,ne,re,le,pe,me,de,ue,Ie,we,ye,je],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var ei={data:{data:[],totalCount:0},meta:{options:{outlets:[]},filter:{number:null,outletName:null,from:null,to:null,pageNumber:1,rowCount:20,pageSize:20,export:!1,exportPageNumber:1,exportRowCount:1e4}},filter:{number:null,outletName:null,from:null,to:null,pageNumber:1,rowCount:20,pageSize:20,export:!1,exportPageNumber:1,exportRowCount:1e4}},Ze=Se(ve(ei),Ce(t=>({first:I(()=>(t.filter().pageNumber-1)*t.filter().pageSize+1),end:I(()=>Math.min(t.filter().pageNumber*t.filter().pageSize,t.data().totalCount)),hasCheckedRows:I(()=>t.data().data.some(p=>p.checked)),checkedShift:I(()=>t.data().data.filter(p=>p.checked).map(p=>p.id))})),be(t=>{let p=v(D);return{updateFilter(e){y(t,r=>u(c({},r),{filter:c(c({},r.filter),e)}))},onRowSelect(e){y(t,r=>{let n=r.data.data.map(i=>i.id===e.id?u(c({},i),{checked:!0}):i);return u(c({},r),{data:u(c({},r.data),{data:n})})})},onRowUnselect(e){y(t,r=>{let n=r.data.data.map(i=>i.id===e.id?u(c({},i),{checked:!1}):i);return u(c({},r),{data:u(c({},r.data),{data:n})})})},onHeaderCheckboxToggle(e){y(t,r=>{let n=r.data.data.map(i=>u(c({},i),{checked:e}));return u(c({},r),{data:u(c({},r.data),{data:n})})})},getGJShiftLoader:j(J(B(()=>p.getGJShiftLoader().pipe(z(e=>y(t,r=>u(c({},r),{meta:e})),e=>console.error("Error fetching GJ Shift Loader:",e)))))),getJournalShift:j(J(O(e=>Object.entries(e).reduce((r,[n,i])=>(i!=null&&(r[n]=i),r),{})),B(e=>p.getJournalShift(e).pipe(z(r=>y(t,n=>u(c({},n),{data:r})),r=>console.error("Error fetching journal shift:",r))))))}}),xe(t=>({onInit:()=>{t.getGJShiftLoader(),t.getJournalShift(t.filter)}})));var et=t=>({"ng-invalid ng-dirty":t}),ti=()=>({});function ii(t,p){if(t&1){let e=E();l(0,"p-button",10),T("onClick",function(){h(e);let n=_(2);return S(n.onGenerateJournal())}),o()}}function ni(t,p){if(t&1&&g(0,ii,1,0,"p-button",9),t&2){let e=_();s("ngIf",e.store.hasCheckedRows())}}function oi(t,p){t&1&&(l(0,"tr")(1,"th",12),C(2,"p-tableHeaderCheckbox"),o(),l(3,"th",13),m(4,"Number"),o(),l(5,"th",14),m(6,"Open"),o(),l(7,"th",14),m(8,"Close"),o(),l(9,"th",15),m(10,"Cashier"),o(),l(11,"th",16),m(12,"Sales + Tax"),o(),l(13,"th",17),m(14,"Invoices"),o(),l(15,"th",16),m(16,"Outlet"),o(),l(17,"th",17),m(18,"Register"),o(),l(19,"th",17),m(20,"Visitors"),o(),C(21,"th",18),o())}function ri(t,p){if(t&1&&(l(0,"tr")(1,"td"),C(2,"p-tableCheckbox",19),o(),l(3,"td")(4,"a",20),m(5),o()(),l(6,"td"),m(7),w(8,"date"),o(),l(9,"td"),m(10),w(11,"date"),o(),l(12,"td"),m(13),o(),l(14,"td"),m(15),w(16,"number"),o(),l(17,"td"),m(18),w(19,"number"),o(),l(20,"td"),m(21),o(),l(22,"td"),m(23),o(),l(24,"td"),m(25),w(26,"number"),o(),l(27,"td"),C(28,"p-button",21),o()()),t&2){let e=p.$implicit,r=_(2);a(2),s("value",e),a(2),s("href",r.authService.getTenantExternalURL()+"/menu/Shift/Main/Previous_Shift/Register_Shift_Detail?ID="+e.id,U),a(),k(" ",e.number," "),a(2),x(V(8,14,e.open,"dd MMM y hh:mm")),a(3),x(V(11,17,e.close,"dd MMM y hh:mm")),a(3),x(e.cashier),a(2),x(P(16,20,e.salesNTax)),a(3),x(P(19,22,e.totalInvoice)),a(3),x(e.outlet),a(2),x(e.register),a(2),x(P(26,24,e.visitors)),a(3),s("icon",e.integrated?"fa-solid fa-circle-check":"fa-solid fa-circle-xmark")("severity",e.integrated?"success":"danger")("text",!0)}}function li(t,p){if(t&1&&m(0),t&2){let e=_(2);L(" Showing ",e.store.first()," to ",e.store.end()," of ",e.store.data().totalCount," entries ")}}function ai(t,p){t&1&&(l(0,"tr")(1,"td",22)(2,"span"),m(3,"No records found."),o()()())}function pi(t,p){if(t&1){let e=E();l(0,"p-panel")(1,"p-table",11),T("onPage",function(n){h(e);let i=_();return S(i.onPageChange(n))})("onRowSelect",function(n){h(e);let i=_();return S(i.onRowSelect(n))})("onRowUnselect",function(n){h(e);let i=_();return S(i.onRowUnselect(n))})("onHeaderCheckboxToggle",function(n){h(e);let i=_();return S(i.onHeaderCheckboxToggle(n))}),g(2,oi,22,0,"ng-template",null,3,b)(4,ri,29,26,"ng-template",null,4,b)(6,li,1,3,"ng-template",null,5,b)(8,ai,4,0,"ng-template",null,6,b),o()()}if(t&2){let e=_();a(),s("paginator",!0)("lazy",!0)("rows",e.store.filter().pageSize)("totalRecords",e.store.data().totalCount)("value",e.store.data().data)}}function mi(t,p){if(t&1&&(l(0,"span",32),m(1),w(2,"truncate"),o()),t&2){let e=p.$implicit;s("pTooltip",e.name),a(),k(" ",V(2,2,e.name,30)," ")}}function si(t,p){if(t&1&&(l(0,"div")(1,"span",34),m(2),o()()),t&2){let e=p.$implicit;a(2),x(e)}}function ci(t,p){if(t&1&&(l(0,"div"),g(1,si,3,1,"div",33),o()),t&2){let e=_(2);a(),s("ngForOf",e.getErrors("from"))}}function ui(t,p){if(t&1&&(l(0,"div")(1,"span",34),m(2),o()()),t&2){let e=p.$implicit;a(2),x(e)}}function di(t,p){if(t&1&&(l(0,"div"),g(1,ui,3,1,"div",33),o()),t&2){let e=_(2);a(),s("ngForOf",e.getErrors("to"))}}function fi(t,p){if(t&1&&(l(0,"div")(1,"span",34),m(2),o()()),t&2){let e=p.$implicit;a(2),x(e)}}function _i(t,p){if(t&1&&(l(0,"div"),g(1,fi,3,1,"div",33),o()),t&2){let e=_(2);a(),s("ngForOf",e.getErrors("pageSize"))}}function gi(t,p){if(t&1&&(l(0,"form",23)(1,"div",24)(2,"label",25),m(3,"Outlet"),o(),l(4,"p-select",26),g(5,mi,3,5,"ng-template",null,7,b),o()(),l(7,"div",24)(8,"label",25),m(9,"From - To"),o(),l(10,"div",27),C(11,"p-datepicker",28),g(12,ci,2,1,"div",29),C(13,"p-datepicker",30),g(14,di,2,1,"div",29),o()(),l(15,"div",24)(16,"label",25),m(17,"Page Size"),o(),C(18,"input",31),g(19,_i,2,1,"div",29),o()()),t&2){let e=_();s("formGroup",e.form),a(4),s("virtualScrollItemSize",50)("options",e.store.meta().options.outlets),a(7),s("iconDisplay","input")("showIcon",!0)("ngClass",F(14,et,e.isInvalid("from"))),a(),s("ngIf",e.isInvalid("from")),a(),s("iconDisplay","input")("showIcon",!0)("ngClass",F(16,et,e.isInvalid("to"))),a(),s("ngIf",e.isInvalid("to")),a(4),s("autoNumeric",$(18,ti))("ngClass",F(19,et,e.isInvalid("pageSize"))),a(),s("ngIf",e.isInvalid("pageSize"))}}var ht=(()=>{class t extends Pe{constructor(){super(),this.generateJournalService=v(D),this.store=v(Ze),this.authService=v(ie),this.isDialogFilterVisible=R(!1),this.isInitDialogFilterVisible=R(!1),this.fb=v(se),this.dayjsService=v(N)}ngOnInit(){this.initForm()}initForm(){let{number:e,outletName:r,from:n,to:i,pageNumber:f,rowCount:d,pageSize:ze,export:Oe,exportPageNumber:Ge,exportRowCount:Ue}=this.store.filter();this.form=this.fb.group({number:this.fb.control(e),outletName:this.fb.control(r),from:this.fb.control(this.dayjsService.from(n)?this.dayjsService.from(n).toDate():null),to:this.fb.control(this.dayjsService.from(i)?this.dayjsService.from(i).toDate():null),pageNumber:this.fb.control(f),rowCount:this.fb.control(d),pageSize:this.fb.control(ze,[oe.required]),export:this.fb.control(Oe),exportPageNumber:this.fb.control(Ge),exportRowCount:this.fb.control(Ue)})}onFilterOKEvent(){if(this.form.invalid){this.form.markAllAsTouched();return}let e=Object.entries(this.form.getRawValue()).reduce((r,[n,i])=>{switch(n){case"from":typeof i=="object"?r[n]=this.dayjsService.from(i)?this.dayjsService.format(i):null:r[n]=i!=null?String(i):null;break;case"to":typeof i=="object"?r[n]=this.dayjsService.from(i)?this.dayjsService.format(i):null:r[n]=i!=null?String(i):null;break;default:r[n]=i===null?"":i;break}return r},{});this.store.updateFilter(e),this.isDialogFilterVisible.set(!1)}onRowSelect(e){this.store.onRowSelect(e.data)}onRowUnselect(e){if(Array.isArray(e.data)){e.data.forEach(r=>{this.store.onRowUnselect(r)});return}else this.store.onRowUnselect(e.data)}onHeaderCheckboxToggle(e){this.store.onHeaderCheckboxToggle(e.checked)}onGenerateJournal(){this.generateJournalService.generateJournalSupplierBill(this.store.checkedShift()).pipe(G(()=>{this.store.getJournalShift(this.store.filter)})).subscribe()}onSearch(e){this.store.updateFilter(u(c({},this.store.filter()),{number:e}))}onPageChange(e){let r=e.first/e.rows;this.store.updateFilter(u(c({},this.store.filter()),{pageNumber:r+1}))}static{this.\u0275fac=function(r){return new(r||t)}}static{this.\u0275cmp=A({type:t,selectors:[["app-journal-shift"]],features:[q([Ze]),H],decls:7,vars:5,consts:[["actionButton",""],["content",""],["filters",""],["header",""],["body",""],["paginatorleft",""],["emptymessage",""],["item",""],["pageTitle","Shift Journal",3,"isDialogFilterVisibleChange","isInitDialogFilterVisibleChange","filterConfirmed","search","isSearchableInput","isFilterable","isDialogFilterVisible","isInitDialogFilterVisible","scrollable"],["label","Generate Journal",3,"onClick",4,"ngIf"],["label","Generate Journal",3,"onClick"],["dataKey","id",3,"onPage","onRowSelect","onRowUnselect","onHeaderCheckboxToggle","paginator","lazy","rows","totalRecords","value"],[2,"width","1rem"],[2,"width","12rem"],[2,"width","11rem"],[2,"width","14rem"],[2,"width","10rem"],[2,"width","9rem"],[2,"width","4rem"],[3,"value"],["target","_blank",1,"link","link-primary",3,"href"],[3,"icon","severity","text"],["colspan","11"],[1,"d-flex","flex-column","row-gap-3",3,"formGroup"],[1,"d-flex","flex-column"],["for","outlet"],["virtualScroll","","showClear","","filter","","filterBy","name","formControlName","outletName","appendTo","body","optionLabel","name","optionValue","name","placeholder","Select an Outlet",3,"virtualScrollItemSize","options"],[1,"d-flex","flex-column","gap-2"],["showClear","","formControlName","from","styleClass","w-100","appendTo","body","inputId","icondisplay",3,"iconDisplay","showIcon","ngClass"],[4,"ngIf"],["showClear","","formControlName","to","styleClass","w-100","appendTo","body","inputId","icondisplay",3,"iconDisplay","showIcon","ngClass"],["type","text","pInputText","","formControlName","pageSize",3,"autoNumeric","ngClass"],[3,"pTooltip"],[4,"ngFor","ngForOf"],[1,"text-danger"]],template:function(r,n){if(r&1){let i=E();l(0,"app-main-panel",8),K("isDialogFilterVisibleChange",function(d){return h(i),M(n.isDialogFilterVisible,d)||(n.isDialogFilterVisible=d),S(d)})("isInitDialogFilterVisibleChange",function(d){return h(i),M(n.isInitDialogFilterVisible,d)||(n.isInitDialogFilterVisible=d),S(d)}),T("filterConfirmed",function(){return h(i),S(n.onFilterOKEvent())})("search",function(d){return h(i),S(n.onSearch(d))}),g(1,ni,1,1,"ng-template",null,0,b)(3,pi,10,5,"ng-template",null,1,b)(5,gi,20,21,"ng-template",null,2,b),o()}r&2&&(s("isSearchableInput",!0)("isFilterable",!0),W("isDialogFilterVisible",n.isDialogFilterVisible)("isInitDialogFilterVisible",n.isInitDialogFilterVisible),s("scrollable",!0))},dependencies:[Ee,Je,Re,ke,Ne,te,Q,X,Y,ee,Z,Me,he,ge,_e,fe,ce,ae,ne,re,le,pe,me,De,Ve,Fe,Te,Ie,we,ye,de,ue,je],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var Co=[{path:"invoice",component:_t},{path:"supplier-bill",component:gt},{path:"shift",component:ht},{path:"join-invoice",loadComponent:()=>import("./chunk-HNBUQBBT.js").then(t=>t.ARJournalComponent)},{path:"join-bill",loadComponent:()=>import("./chunk-2MVACU4N.js").then(t=>t.ApJournalComponent)},{path:"adjustment",loadComponent:()=>import("./chunk-VRCICMG6.js").then(t=>t.AdjustmentJournalComponent)}];export{Co as generateJournalRoutes};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as F}from"./chunk-BBQIPZWM.js";import{a as Be,b as Oe}from"./chunk-AACWH3EJ.js";import{a as je}from"./chunk-YPBGL37O.js";import{b as D}from"./chunk-RHOQDE75.js";import{a as re}from"./chunk-DQQ6JL6H.js";import"./chunk-FLZXCWDU.js";import{a as ze}from"./chunk-XKI7WLHE.js";import"./chunk-DHW7UHFT.js";import"./chunk-C2GO6SPF.js";import{a as z,b as j}from"./chunk-O4QM64EH.js";import{d as Ne,i as ke,j as Pe,k as Me}from"./chunk-SVXDMOLP.js";import{a as De,b as Fe}from"./chunk-S6X7PJAB.js";import"./chunk-LWLJZPBI.js";import"./chunk-3NU3P6NL.js";import"./chunk-GDX5XEV3.js";import{a as Je,b as Re}from"./chunk-DLUALPHU.js";import"./chunk-4DOELXOP.js";import"./chunk-VVUSFS6O.js";import"./chunk-ZTEDQLOG.js";import"./chunk-EDGADVEY.js";import"./chunk-JTDJJORR.js";import"./chunk-LZUGPBFD.js";import"./chunk-2KERKGCG.js";import{g as Ve,h as Ae}from"./chunk-LUPSXHRX.js";import{b as Te,c as Ee}from"./chunk-X22YKT5B.js";import{a as Ce,b as Se}from"./chunk-JYCUE5HV.js";import{a as v,b as be,c as we,d as ve,e as ye,f as Ie}from"./chunk-JMEBBWX4.js";import"./chunk-FUZFAJGJ.js";import{n as _e,o as ge,w as he,x as xe}from"./chunk-5FSMHZSY.js";import"./chunk-BHV2HCJY.js";import{b as ae,c as le,e as pe,f as me,k as se,l as ce,o as ue,u as de,x as fe}from"./chunk-G5S5AZA7.js";import"./chunk-Z45NTTES.js";import"./chunk-LD7LVE2B.js";import"./chunk-BLQJXMNV.js";import"./chunk-F2X3VGZZ.js";import{h as Z,j as ee,k as te,n as ie,p as ne,r as oe}from"./chunk-OKCHQM5Q.js";import{Ab as K,Ac as V,Cb as x,Ga as k,Jc as T,Kb as c,Kc as Y,Lc as A,Mc as w,Ub as r,Vb as o,Wb as S,X as N,Yc as E,Z as H,_b as y,bb as U,c as J,cb as L,dc as I,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 W,vc as $,wb as G,wc as M,xc as q,yc as Q,zc as X}from"./chunk-JP6RBSB3.js";import{a as u,b as f}from"./chunk-YQFG5XE2.js";var $e={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=be(Ie($e),we(t=>({first:E(()=>(t.filter().pageNumber-1)*t.filter().pageSize+1),end:E(()=>Math.min(t.filter().pageNumber*t.filter().pageSize,t.data().totalCount)),hasCheckedRows:E(()=>t.data().data.some(a=>a.checked)),checkedAPCollection:E(()=>t.data().data.filter(a=>a.checked).map(a=>a.id))})),ye(t=>{let a=C(F),e=C(D);return{updateFilter(n){v(t,i=>f(u({},i),{filter:u(u({},i.filter),n)}))},onRowSelect(n){v(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){v(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){v(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:z(J(N(()=>a.getAPJournalLoader().pipe(j({next:n=>{v(t,i=>f(u({},i),{meta:n}))},error:n=>{console.error("Error fetching AP journal:",n)}}))))),getARCollection:z(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}))})),j({next:i=>{v(t,d=>f(u({},d),{data:i}))},error:i=>{console.error("Error fetching customer invoice:",i)}})))))}}),ve(t=>({onInit:()=>{t.getAPLoader(),t.getARCollection(t.filter)}})));var O=t=>({"ng-invalid ng-dirty":t}),qe=()=>({});function Qe(t,a){if(t&1){let e=y();r(0,"p-button",10),I("onClick",function(){g(e);let n=_(2);return h(n.onCreateJournal())}),o()}}function Xe(t,a){if(t&1&&x(0,Qe,1,0,"p-button",9),t&2){let e=_();c("ngIf",e.store.hasCheckedRows())}}function Ye(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",18),o())}function Ze(t,a){if(t&1&&(r(0,"tr")(1,"td"),S(2,"p-tableCheckbox",19),o(),r(3,"td"),s(4),o(),r(5,"td")(6,"a",20),s(7),o()(),r(8,"td"),s(9),o(),r(10,"td"),s(11),T(12,"date"),o(),r(13,"td"),s(14),T(15,"date"),o(),r(16,"td"),S(17,"div",21),o(),r(18,"td"),s(19),o(),r(20,"td"),S(21,"p-button",22),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,L),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,U),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 et(t,a){if(t&1&&s(0),t&2){let e=_(2);W(" Showing ",e.store.first()," to ",e.store.end()," of ",e.store.data().totalCount," entries ")}}function tt(t,a){t&1&&(r(0,"tr")(1,"td",23)(2,"span"),s(3,"No records found."),o()()())}function it(t,a){if(t&1){let e=y();r(0,"p-panel")(1,"p-table",11),I("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,Ye,18,0,"ng-template",null,3,w)(4,Ze,22,18,"ng-template",null,4,w)(6,et,1,3,"ng-template",null,5,w)(8,tt,4,0,"ng-template",null,6,w),o()()}if(t&2){let e=_();l(),c("value",e.store.data().data)("paginator",!0)("rows",e.store.filter().pageSize)("totalRecords",e.store.data().totalCount)("lazy",!0)}}function nt(t,a){if(t&1&&(r(0,"span",34),s(1),T(2,"truncate"),o()),t&2){let e=a.$implicit;c("pTooltip",e.name),l(),P(" ",A(2,2,e.name,30)," ")}}function ot(t,a){if(t&1&&(r(0,"div")(1,"span",36),s(2),o()()),t&2){let e=a.$implicit;l(2),b(e)}}function rt(t,a){if(t&1&&(r(0,"div"),x(1,ot,3,1,"div",35),o()),t&2){let e=_(2);l(),c("ngForOf",e.getErrors("from"))}}function at(t,a){if(t&1&&(r(0,"div")(1,"span",36),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",35),o()),t&2){let e=_(2);l(),c("ngForOf",e.getErrors("to"))}}function pt(t,a){if(t&1&&(r(0,"div")(1,"span",36),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",35),o()),t&2){let e=_(2);l(),c("ngForOf",e.getErrors("pageSize"))}}function st(t,a){if(t&1){let e=y();r(0,"form",24)(1,"div",25)(2,"label",26),s(3,"Outlet"),o(),r(4,"p-select",27),x(5,nt,3,5,"ng-template",null,7,w),o()(),r(7,"div",25)(8,"label",26),s(9,"From - To"),o(),r(10,"div",28),S(11,"p-datepicker",29),x(12,rt,2,1,"div",30),S(13,"p-datepicker",31),x(14,lt,2,1,"div",30),o()(),r(15,"div",25)(16,"label",26),s(17,"Supplier"),o(),r(18,"p-autocomplete",32),T(19,"async"),I("completeMethod",function(n){g(e);let i=_();return h(i.onSearchSupplier(n))}),o()(),r(20,"div",25)(21,"label",26),s(22,"Page Size"),o(),S(23,"input",33),x(24,mt,2,1,"div",30),o()()}if(t&2){let e=_();c("formGroup",e.form),l(4),c("virtualScrollItemSize",50)("options",e.store.meta().options.outlets),l(7),c("iconDisplay","input")("showIcon",!0)("ngClass",V(17,O,e.isInvalid("from"))),l(),c("ngIf",e.isInvalid("from")),l(),c("iconDisplay","input")("showIcon",!0)("ngClass",V(19,O,e.isInvalid("to"))),l(),c("ngIf",e.isInvalid("to")),l(4),c("suggestions",Y(19,15,e.supplierSuggestions$)),l(5),c("autoNumeric",X(21,qe))("ngClass",V(22,O,e.isInvalid("pageSize"))),l(),c("ngIf",e.isInvalid("pageSize"))}}var Zt=(()=>{class t extends ze{constructor(){super(),this.store=C(B),this.generateJournalService=C(F),this.authService=C(re),this.isDialogFilterVisible=k(!1),this.isInitDialogFilterVisible=k(!1),this.fb=C(de),this.dayjsService=C(D)}ngOnInit(){this.initform()}initform(){let{outletName:e,number:p,from:n,to:i,paymentState:d,supplierID:m,pageNumber:He,rowCount:Ue,pageSize:Le,export:Ge,exportPageNumber:Ke,exportRowCount:We}=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(He),rowCount:this.fb.control(Ue),pageSize:this.fb.control(Le,[le.required]),export:this.fb.control(Ge),exportPageNumber:this.fb.control(Ke),exportRowCount:this.fb.control(We)})}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(H(()=>{this.store.getARCollection(this.store.filter)})).subscribe()}static{this.\u0275fac=function(p){return new(p||t)}}static{this.\u0275cmp=G({type:t,selectors:[["app-ap-journal"]],features:[Q([B]),K],decls:7,vars:5,consts:[["actionButton",""],["content",""],["filters",""],["header",""],["body",""],["paginatorleft",""],["emptymessage",""],["item",""],["pageTitle","AP Collection",3,"isDialogFilterVisibleChange","isInitDialogFilterVisibleChange","filterConfirmed","search","isSearchableInput","isFilterable","isDialogFilterVisible","isInitDialogFilterVisible","scrollable"],["label","Generate Journal",3,"onClick",4,"ngIf"],["label","Generate Journal",3,"onClick"],["dataKey","id",3,"onPage","onHeaderCheckboxToggle","onRowSelect","onRowUnselect","value","paginator","rows","totalRecords","lazy"],[2,"width","1rem"],[2,"width","10rem"],[2,"width","12rem"],[2,"width","14rem"],[2,"width","11rem"],[2,"width","9rem"],[2,"width","4rem"],[3,"value"],["target","_blank",1,"link","link-primary",3,"href"],[3,"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"],[1,"d-flex","flex-column","gap-2"],["showClear","","formControlName","from","styleClass","w-100","appendTo","body","inputId","icondisplay",3,"iconDisplay","showIcon","ngClass"],[4,"ngIf"],["showClear","","formControlName","to","styleClass","w-100","appendTo","body","inputId","icondisplay",3,"iconDisplay","showIcon","ngClass"],["showClear","","formControlName","supplierID","appendTo","body","styleClass","w-100","optionLabel","Value","optionValue","Key","inputStyleClass","w-100",3,"completeMethod","suggestions"],["type","text","pInputText","","formControlName","pageSize",3,"autoNumeric","ngClass"],[3,"pTooltip"],[4,"ngFor","ngForOf"],[1,"text-danger"]],template:function(p,n){if(p&1){let i=y();r(0,"app-main-panel",8),q("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)}),I("filterConfirmed",function(){return g(i),h(n.onFilterOKEvent())})("search",function(m){return g(i),h(n.onSearch(m))}),x(1,Xe,1,1,"ng-template",null,0,w)(3,it,10,5,"ng-template",null,1,w)(5,st,25,24,"ng-template",null,2,w),o()}p&2&&(c("isSearchableInput",!0)("isFilterable",!0),$("isDialogFilterVisible",n.isDialogFilterVisible)("isInitDialogFilterVisible",n.isInitDialogFilterVisible),c("scrollable",!0))},dependencies:[Ae,Me,Ne,ke,Pe,oe,Z,ee,te,ie,ne,xe,he,Se,Ce,fe,se,ae,pe,me,ce,ue,Re,Je,Fe,De,ge,_e,Oe,Be,Ee,Te,Ve,je],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();export{Zt as ApJournalComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as d}from"./chunk-
|
|
1
|
+
import{h as d}from"./chunk-5FSMHZSY.js";import{Ab as s,Jb as l,Ob as C,Ub as c,Vb as f,Wb as m,ra as o,ta as a,wb as r}from"./chunk-JP6RBSB3.js";var u=(()=>{class t extends d{static \u0275fac=(()=>{let n;return function(e){return(n||(n=a(t)))(e||t)}})();static \u0275cmp=r({type:t,selectors:[["ChevronLeftIcon"]],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","M9.61296 13C9.50997 13.0005 9.40792 12.9804 9.3128 12.9409C9.21767 12.9014 9.13139 12.8433 9.05902 12.7701L3.83313 7.54416C3.68634 7.39718 3.60388 7.19795 3.60388 6.99022C3.60388 6.78249 3.68634 6.58325 3.83313 6.43628L9.05902 1.21039C9.20762 1.07192 9.40416 0.996539 9.60724 1.00012C9.81032 1.00371 10.0041 1.08597 10.1477 1.22959C10.2913 1.37322 10.3736 1.56698 10.3772 1.77005C10.3808 1.97313 10.3054 2.16968 10.1669 2.31827L5.49496 6.99022L10.1669 11.6622C10.3137 11.8091 10.3962 12.0084 10.3962 12.2161C10.3962 12.4238 10.3137 12.6231 10.1669 12.7701C10.0945 12.8433 10.0083 12.9014 9.91313 12.9409C9.81801 12.9804 9.71596 13.0005 9.61296 13Z","fill","currentColor"]],template:function(i,e){i&1&&(o(),c(0,"svg",0),m(1,"path",1),f()),i&2&&(C(e.getClassNames()),l("aria-label",e.ariaLabel)("aria-hidden",e.ariaHidden)("role",e.role))},encapsulation:2})}return t})();export{u as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as ft}from"./chunk-
|
|
1
|
+
import{a as ft}from"./chunk-3NU3P6NL.js";import{a as ht}from"./chunk-ZTEDQLOG.js";import{a as $,p as J,q as vt}from"./chunk-5FSMHZSY.js";import{Da as ut,I as lt,La as pt,Ma as G,Q as ct,R as bt,S as L,Ua as dt,_ as q,ca as F,ha as W,sa as U}from"./chunk-G5S5AZA7.js";import{h as st,m as rt,r as k,s as z}from"./chunk-OKCHQM5Q.js";import{Ab as m,Ac as it,Bb as et,Cb as u,Da as d,Ea as Z,Ga as P,Jb as r,Kb as M,Mb as _,Pb as y,Ub as D,Vb as N,Vc as C,Wb as S,Wc as at,Yc as s,Zb as j,Zc as ot,_b as A,aa as B,ba as X,ca as Y,dc as I,ec as f,fc as T,gb as v,gc as w,ha as p,jc as Q,kc as x,lc as l,mc as c,pa as O,qa as V,rb as R,ta as h,wb as g,xb as tt,yc as nt}from"./chunk-JP6RBSB3.js";var _t=["previcon"],yt=["nexticon"],Tt=["content"],wt=["prevButton"],xt=["nextButton"],Ct=["inkbar"],kt=["tabs"],E=["*"],$t=e=>({"p-tablist-viewport":e});function Bt(e,b){e&1&&j(0)}function Dt(e,b){if(e&1&&u(0,Bt,1,0,"ng-container",11),e&2){let t=f(2);M("ngTemplateOutlet",t.prevIconTemplate||t._prevIconTemplate)}}function It(e,b){e&1&&S(0,"ChevronLeftIcon")}function Lt(e,b){if(e&1){let t=A();D(0,"button",10,3),I("click",function(){O(t);let n=f();return V(n.onPrevButtonClick())}),u(2,Dt,1,1,"ng-container")(3,It,1,0,"ChevronLeftIcon"),N()}if(e&2){let t=f();r("aria-label",t.prevButtonAriaLabel)("tabindex",t.tabindex())("data-pc-group-section","navigator"),v(2),y(t.prevIconTemplate||t._prevIconTemplate?2:3)}}function Ft(e,b){e&1&&j(0)}function Et(e,b){if(e&1&&u(0,Ft,1,0,"ng-container",11),e&2){let t=f(2);M("ngTemplateOutlet",t.nextIconTemplate||t._nextIconTemplate)}}function Ot(e,b){e&1&&S(0,"ChevronRightIcon")}function Vt(e,b){if(e&1){let t=A();D(0,"button",12,4),I("click",function(){O(t);let n=f();return V(n.onNextButtonClick())}),u(2,Et,1,1,"ng-container")(3,Ot,1,0,"ChevronRightIcon"),N()}if(e&2){let t=f();r("aria-label",t.nextButtonAriaLabel)("tabindex",t.tabindex())("data-pc-group-section","navigator"),v(2),y(t.nextIconTemplate||t._nextIconTemplate?2:3)}}function Pt(e,b){e&1&&w(0)}var Rt=({dt:e})=>`
|
|
2
2
|
.p-tabs {
|
|
3
3
|
display: flex;
|
|
4
4
|
flex-direction: column;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as n}from"./chunk-DQQ6JL6H.js";import"./chunk-C2GO6SPF.js";import{d as e}from"./chunk-Z45NTTES.js";import"./chunk-LD7LVE2B.js";import"./chunk-BLQJXMNV.js";import"./chunk-F2X3VGZZ.js";import"./chunk-OKCHQM5Q.js";import{ha as o}from"./chunk-JP6RBSB3.js";import"./chunk-YQFG5XE2.js";var r=()=>{let t=o(n),i=o(e);return t.isAuthenticated()&&!t.isTokenExpired()&&t.checkAuthKeysExists()?(i.navigate(["/pages/dashboard"]),!1):!0};var h=[{path:"",canActivate:[r],loadComponent:()=>import("./chunk-G2YSKFGD.js").then(t=>t.LoginComponent)},{path:"404",loadComponent:()=>import("./chunk-IDW6F2F3.js").then(t=>t.NotfoundComponent)},{path:"signup",loadComponent:()=>import("./chunk-SLHUSJER.js").then(t=>t.SignupComponent)},{path:"504",loadComponent:()=>import("./chunk-M4Z3FI3C.js").then(t=>t.TimeoutComponent)}];export{h as AuthenticationRoutes};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as v,b as L}from"./chunk-MDEJN7RJ.js";import"./chunk-RHOQDE75.js";import{a as I,b as E}from"./chunk-H57SDRPH.js";import"./chunk-4CDAAU6Z.js";import{h as H}from"./chunk-LUPSXHRX.js";import{b as N,c as G}from"./chunk-X22YKT5B.js";import{a as R,b as D}from"./chunk-JYCUE5HV.js";import"./chunk-JMEBBWX4.js";import"./chunk-FUZFAJGJ.js";import{w as V,x as j}from"./chunk-5FSMHZSY.js";import"./chunk-BHV2HCJY.js";import"./chunk-G5S5AZA7.js";import"./chunk-LD7LVE2B.js";import{a as F}from"./chunk-BLQJXMNV.js";import"./chunk-F2X3VGZZ.js";import{n as O,r as $}from"./chunk-OKCHQM5Q.js";import{Cb as w,Jc as s,Kb as p,Kc as m,Mc as x,Nb as h,Ub as o,V as y,Vb as n,Wb as l,X as M,Z as b,_b as B,dc as C,ec as c,gb as a,h as T,ha as f,pa as g,qa as d,ra as S,s as u,sa as A,wb as k,yc as P,zc as _}from"./chunk-JP6RBSB3.js";import"./chunk-YQFG5XE2.js";var q=()=>({height:"calc(100vh - 100px)"});function J(i,z){if(i&1){let t=B();o(0,"div",3)(1,"p-button",4),C("onClick",function(){g(t);let r=c();return d(r.onFormatCOA())}),n(),o(2,"p-button",5),s(3,"async"),s(4,"async"),C("onClick",function(){g(t);let r=c();return d(r.onMigrateCoaAccount())}),n()()}if(i&2){let t=c();a(2),p("disabled",m(3,2,t.countInBooks$)!==0)("pTooltip",m(4,4,t.countInBooks$)!==0?"Books already has entries. Please format before re-migrating.":null)}}function K(i,z){if(i&1&&(o(0,"p-scroll-panel")(1,"p-panel")(2,"div",6),l(3,"app-migration-cards",7),s(4,"async"),S(),o(5,"svg",8),l(6,"path",9),n(),A(),l(7,"app-migration-cards",10),s(8,"async"),n()()()),i&2){let t=c();h(_(12,q)),a(),h(_(13,q)),a(2),p("migrationCount",m(4,8,t.countInPOS$))("migrationTitle",t.pageTitle),a(4),p("migrationCount",m(8,10,t.countInBooks$))("migrationTitle",t.pageTitle)}}var gt=(()=>{class i{constructor(){this.migrateService=f(v),this.toastr=f(F),this.refresh$=new T(void 0),this.pageTitle="Chart of Account"}ngOnInit(){let t=this.refresh$.pipe(M(()=>this.migrateService.getCOACount()),b(e=>console.log("API response:",e)),y(1));this.countInPOS$=t.pipe(u(e=>Number(e.pos))),this.countInBooks$=t.pipe(u(e=>Number(e.books)))}onMigrateCoaAccount(){this.migrateService.migrateCoaAccount().subscribe(t=>{this.refresh$.next(),this.toastr.success(t.message,"Migration Successful")})}onFormatCOA(){window.confirm("Are you sure you want to format this data? This action cannot be undone.")&&this.migrateService.formatManualCOA().subscribe(e=>{this.refresh$.next(),this.toastr.success(e.message,"Format Successful")})}static{this.\u0275fac=function(e){return new(e||i)}}static{this.\u0275cmp=k({type:i,selectors:[["app-chart-of-account"]],features:[P([v])],decls:5,vars:1,consts:[["actionButton",""],["content",""],[3,"pageTitle"],[1,"d-flex","gap-2"],["label","Format","severity","danger",3,"onClick"],["label","Migrate","tooltipPosition","left",3,"onClick","disabled","pTooltip"],[1,"flex","gap-30","flex-wrap",2,"display","flex","justify-content","center","align-items","center","gap","1rem","margin-top","40px"],["migrationPlace","Accounting",3,"migrationCount","migrationTitle"],["width","40","height","40","viewBox","0 0 24 24","fill","none"],["d","M8 5l8 7-8 7","stroke","#007bff","stroke-width","2","stroke-linecap","round","stroke-linejoin","round"],["migrationPlace","Books",3,"migrationCount","migrationTitle"]],template:function(e,r){e&1&&(o(0,"app-main-panel",2),w(1,J,5,6,"ng-template",null,0,x)(3,K,9,14,"ng-template",null,1,x),n()),e&2&&p("pageTitle",r.pageTitle)},dependencies:[H,$,O,L,j,V,E,I,D,R,G,N],encapsulation:2})}}return i})();export{gt as ChartOfAccountComponent};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as G}from"./chunk-
|
|
1
|
+
import{a as G}from"./chunk-5FSMHZSY.js";import{Ja as P,Ka as A,La as H,Ma as g,Ua as V,sa as z}from"./chunk-G5S5AZA7.js";import{h as R,k as w,l as O,m as N,r as B}from"./chunk-OKCHQM5Q.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")};
|
|
@@ -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-5FSMHZSY.js";import{B as se,Ia as le,La as ae,Ma as C,R as Z,Ua as de,ba as re,ia as m,z as j}from"./chunk-G5S5AZA7.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{h as W,k as X,l as ee,m as te,r as ie,s as ne}from"./chunk-OKCHQM5Q.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 @@
|
|
|
1
|
+
import{a as re}from"./chunk-G4XX7EU2.js";import{a as dt,b as gt}from"./chunk-AACWH3EJ.js";import{a as ut}from"./chunk-YPBGL37O.js";import{a as It,b as mt}from"./chunk-RHOQDE75.js";import{a as Ke}from"./chunk-DQQ6JL6H.js";import"./chunk-FLZXCWDU.js";import{a as pt,b as st}from"./chunk-NJO5TWIA.js";import{a as ct}from"./chunk-XKI7WLHE.js";import"./chunk-DHW7UHFT.js";import{a as et}from"./chunk-BY6QUHQI.js";import"./chunk-C2GO6SPF.js";import{a as ne,b as ie}from"./chunk-O4QM64EH.js";import{b as ot,d as Me,i as at,j as lt,k as ke}from"./chunk-SVXDMOLP.js";import{a as it,b as rt}from"./chunk-S6X7PJAB.js";import"./chunk-LWLJZPBI.js";import"./chunk-3NU3P6NL.js";import{a as Ne}from"./chunk-XKCLERWG.js";import{a as ye,b as Re}from"./chunk-H57SDRPH.js";import"./chunk-GDX5XEV3.js";import{a as De,b as Pe}from"./chunk-DLUALPHU.js";import"./chunk-4DOELXOP.js";import"./chunk-VVUSFS6O.js";import"./chunk-ZTEDQLOG.js";import"./chunk-EDGADVEY.js";import"./chunk-JTDJJORR.js";import"./chunk-LZUGPBFD.js";import"./chunk-2KERKGCG.js";import{b as Q}from"./chunk-4CDAAU6Z.js";import{f as nt,h as L}from"./chunk-LUPSXHRX.js";import"./chunk-X22YKT5B.js";import{a as N,b as A}from"./chunk-JYCUE5HV.js";import{a as w,b as Ie,c as tt,d as we,e as Te,f as Fe}from"./chunk-JMEBBWX4.js";import"./chunk-FUZFAJGJ.js";import{n as Ce,o as Se,w as Y,x as J}from"./chunk-5FSMHZSY.js";import"./chunk-BHV2HCJY.js";import{b as xe,c as K,e as X,f as _e,i as Xe,j as Ye,k as he,l as Ee,o as ve,u as Je,v as Qe,w as Ze,x as be}from"./chunk-G5S5AZA7.js";import{b as de,d as ge,e as k,l as V}from"./chunk-Z45NTTES.js";import{a as fe}from"./chunk-LD7LVE2B.js";import"./chunk-BLQJXMNV.js";import"./chunk-F2X3VGZZ.js";import{h as ze,k as P,p as ue,q as z,r as M}from"./chunk-OKCHQM5Q.js";import{Ab as He,Ac as S,Cb as h,Ga as q,J as qe,Jc as C,Kb as m,Kc as F,Lc as U,Mc as x,Pb as $e,Qb as H,Sb as $,Tb as W,Ub as r,Vb as n,Wb as d,X as O,Yc as te,Z as T,_b as y,ba as le,c as ee,dc as R,ec as g,gb as l,ha as u,pa as v,qa as b,qc as a,rc as E,s as G,sc as I,ta as Ue,uc as We,vc as pe,wa as Ge,wb as D,wc as se,xc as ce,yc as me,zc as Ve}from"./chunk-JP6RBSB3.js";import{a as f,b as _,e as Rt}from"./chunk-YQFG5XE2.js";var B=(()=>{class t{#e=u(fe);#t=u(Ke);getRecurringExpenseLoader(){return this.#e.get(void 0,"api/RecurringExpenseLoader/GetList")}getRecurringExpenses(e){return this.#e.post(void 0,"api/RecurringExpense/GetList",e)}fetchRecurringExpenseForm(e){return this.#e.get(void 0,`api/RecurringExpense/form/${e??""}`)}fetchSupplierSuggestion(e){let o={count:100,prefix:e};return this.#e.post(this.#t.getTenantExternalURL(),"/API/AC/GetSupplierSuggestion",o)}fetchCustomerSuggestion(e){let o={count:100,prefix:e};return this.#e.post(this.#t.getTenantExternalURL(),"/API/AC/GetCustomerSuggestion",o)}submitRecurringExpense(e,o={}){return this.#e.post(void 0,"api/RecurringExpense/submit",e,o)}removeRecurringExpense(e){return this.#e.delete(void 0,`api/RecurringExpense/${e}`,void 0)}removeRecurringExpenses(e){let o={body:e};return this.#e.delete(void 0,"api/RecurringExpense/Batch",o)}getRecurringExpenseByID(e){return this.#e.get(void 0,`api/RecurringExpense/Info/${e}`)}getAssetValueList(){return this.#e.get(void 0,"api/AssetValue/GetListt")}static{this.\u0275fac=function(o){return new(o||t)}}static{this.\u0275prov=le({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var wt={data:{data:[],count:0},meta:{Options:{Frequencies:[]},Filter:{text:null,Frequency:0,pageNumber:1,rowCount:20,pageSize:20,export:!1,exportPageNumber:1,exportRowCount:1e4}},filter:{text:null,Frequency:0,pageNumber:1,rowCount:20,pageSize:20,export:!1,exportPageNumber:1,exportRowCount:1e4}},Ae=Ie(Fe(wt),tt(t=>({first:te(()=>(t.filter().pageNumber-1)*t.filter().pageSize+1),end:te(()=>Math.min(t.filter().pageNumber*t.filter().pageSize,t.data().count)),hasCheckedRows:te(()=>t.data().data.some(c=>c.checked)),checkedInvoice:te(()=>t.data().data.filter(c=>c.checked).map(c=>c.id))})),Te(t=>{let c=u(B);return{updateFilter(o){w(t,i=>_(f({},i),{filter:f(f({},i.filter),o)}))},onRowSelect(o){w(t,i=>{let s=i.data.data.map(p=>p.id===o.id?_(f({},p),{checked:!0}):p);return _(f({},i),{data:_(f({},i.data),{data:s})})})},onRowUnselect(o){w(t,i=>{let s=i.data.data.map(p=>p.id===o.id?_(f({},p),{checked:!1}):p);return _(f({},i),{data:_(f({},i.data),{data:s})})})},onHeaderCheckboxToggle(o){w(t,i=>{let s=i.data.data.map(p=>_(f({},p),{checked:o}));return _(f({},i),{data:_(f({},i.data),{data:s})})})},getRecurringExpenseLoader:ne(ee(O(()=>c.getRecurringExpenseLoader().pipe(ie({next:o=>{w(t,i=>_(f({},i),{meta:o}))},error:o=>{console.error("Error fetching Recurring Expense Loader:",o)}}))))),getRecurringExpenses:ne(ee(G(o=>Object.entries(o).reduce((i,[s,p])=>(p!=null&&(i[s]=p),i),{})),O(o=>c.getRecurringExpenses(o).pipe(ie({next:i=>{w(t,s=>_(f({},s),{data:i}))},error:i=>{console.error("Error fetching Recurring Expenses:",i)}})))))}}),we(t=>({onInit:()=>{t.getRecurringExpenseLoader(),t.getRecurringExpenses(t.filter)}})));var Dt=["class","page"],Pt=t=>["details/",t];function Mt(t,c){if(t&1){let e=y();r(0,"p-button",12),R("onClick",function(){v(e);let i=g(2);return b(i.onDeleteSelected())}),n()}}function kt(t,c){if(t&1&&(r(0,"div",8),h(1,Mt,1,0,"p-button",9),r(2,"a",10),d(3,"i",11),r(4,"span"),a(5,"Add"),n()()()),t&2){let e=g();l(),m("ngIf",e.store.hasCheckedRows())}}function Vt(t,c){t&1&&(r(0,"tr")(1,"th"),d(2,"p-tableHeaderCheckbox"),n(),r(3,"th"),a(4,"Outlet"),n(),r(5,"th"),a(6,"Name"),n(),r(7,"th"),a(8,"Expense Account"),n(),r(9,"th"),a(10,"Start Date"),n(),r(11,"th"),a(12,"End Date"),n(),r(13,"th"),a(14,"Last Expense"),n(),r(15,"th"),a(16,"Amount"),n(),r(17,"th"),a(18,"Frequency"),n()())}function Nt(t,c){if(t&1&&(r(0,"tr")(1,"td"),d(2,"p-tableCheckbox",14),n(),r(3,"td"),a(4),n(),r(5,"td")(6,"a",15),a(7),n()(),r(8,"td"),a(9),n(),r(10,"td"),a(11),C(12,"date"),n(),r(13,"td"),a(14),C(15,"date"),n(),r(16,"td"),a(17),C(18,"date"),n(),r(19,"td"),a(20),C(21,"number"),n(),r(22,"td"),a(23),n()()),t&2){let e=c.$implicit;l(2),m("value",e),l(2),E(e.outletName),l(2),m("routerLink",S(21,Pt,e.id)),l(),E(e.name),l(2),E(e.expenseName),l(2),E(U(12,10,e.startDate,"d MMM y")),l(3),E(U(15,13,e.endDate,"d MMM y")),l(3),E(U(18,16,e.lastExpenseDate,"d MMM y")),l(3),E(F(21,19,e.amount)),l(3),E(e.repeatTypeLabel)}}function At(t,c){if(t&1&&(r(0,"div"),a(1),n()),t&2){let e=g(2);l(),We(" Showing ",e.store.first()," to ",e.store.end()," of ",e.store.data().count," entries ")}}function Lt(t,c){t&1&&(r(0,"tr")(1,"td",16)(2,"span"),a(3,"No recurring expenses found."),n()()())}function Bt(t,c){if(t&1){let e=y();r(0,"p-panel")(1,"p-table",13),R("onPage",function(i){v(e);let s=g();return b(s.onPageChange(i))})("onHeaderCheckboxToggle",function(i){v(e);let s=g();return b(s.onHeaderCheckboxToggle(i))})("onRowSelect",function(i){v(e);let s=g();return b(s.onRowSelect(i))})("onRowUnselect",function(i){v(e);let s=g();return b(s.onRowUnselect(i))}),h(2,Vt,19,0,"ng-template",null,3,x)(4,Nt,24,23,"ng-template",null,4,x)(6,At,2,3,"ng-template",null,5,x)(8,Lt,4,0,"ng-template",null,6,x),n()()}if(t&2){let e=g();l(),m("lazy",!0)("totalRecords",e.store.data().count)("rows",e.store.filter().pageSize)("paginator",!0)("value",e.store.data().data)}}function jt(t,c){if(t&1&&(r(0,"form",17)(1,"div",18)(2,"label",19),a(3,"Type"),n(),d(4,"p-select",20),n()()),t&2){let e=g();m("formGroup",e.form),l(4),m("options",e.store.meta().Options.Frequencies)}}var _t=(()=>{class t extends ct{constructor(){super(...arguments),this.store=u(Ae),this.recurringExpenseService=u(B),this.fb=u(Je),this.isDialogFilterVisible=q(!1)}ngOnInit(){this.initForm()}onPageChange(e){let o=e.first/e.rows;this.store.updateFilter(_(f({},this.store.filter()),{pageNumber:o+1}))}onDeleteSelected(){this.recurringExpenseService.removeRecurringExpenses(this.store.checkedInvoice()).pipe(T(()=>{this.store.updateFilter(_(f({},this.store.filter()),{pageNumber:1}))})).subscribe()}onSearchEvent(e){this.store.updateFilter(_(f({},this.store.filter()),{text:e}))}onFilterEvent(){this.onSubmitFilterDialog()}onSubmitFilterDialog(){if(this.form.invalid){this.form.markAllAsTouched();return}let e=Object.entries(this.form.getRawValue()).reduce((o,[i,s])=>(s!=null&&(o[i]=s),o),{});this.store.updateFilter(e),this.isDialogFilterVisible.update(o=>!o)}onHeaderCheckboxToggle(e){this.store.onHeaderCheckboxToggle(e.checked)}onRowSelect(e){this.store.onRowSelect(e.data)}onRowUnselect(e){if(Array.isArray(e.data)){e.data.forEach(o=>{this.store.onRowUnselect(o)});return}else this.store.onRowUnselect(e.data)}initForm(){let{text:e,Frequency:o,pageNumber:i,rowCount:s,pageSize:p,export:j,exportPageNumber:St,exportRowCount:yt}=this.store.filter();this.form=this.fb.group({text:this.fb.control(e),Frequency:this.fb.control(o),pageNumber:this.fb.control(i),rowCount:this.fb.control(s),pageSize:this.fb.control(p),export:this.fb.control(j),exportPageNumber:this.fb.control(St),exportRowCount:this.fb.control(yt)})}static{this.\u0275fac=(()=>{let e;return function(i){return(e||(e=Ue(t)))(i||t)}})()}static{this.\u0275cmp=D({type:t,selectors:[["app-recurring-expense",8,"page"]],features:[me([Ae]),He],attrs:Dt,decls:7,vars:4,consts:[["actionButton",""],["content",""],["filters",""],["header",""],["body",""],["paginatorleft",""],["emptymessage",""],["pageTitle","Recurring Expenses",3,"search","isDialogFilterVisibleChange","filterConfirmed","isSearchableInput","isFilterable","isDialogFilterVisible","scrollable"],[1,"d-flex","gap-2"],["severity","danger","label","Delete","icon","fa-solid fa-trash",3,"onClick",4,"ngIf"],["routerLink","create",1,"p-button"],[1,"fa-solid","fa-plus"],["severity","danger","label","Delete","icon","fa-solid fa-trash",3,"onClick"],["dataKey","id","styleClass","d-flex flex-column justify-content-between h-100",3,"onPage","onHeaderCheckboxToggle","onRowSelect","onRowUnselect","lazy","totalRecords","rows","paginator","value"],[3,"value"],[1,"link-primary",3,"routerLink"],["colspan","9"],[1,"d-flex","flex-column",3,"formGroup"],[1,"d-flex","flex-column"],["for","outlet"],["formControlName","Frequency","appendTo","body","optionLabel","value","optionValue","key","placeholder","Select Type",3,"options"]],template:function(o,i){if(o&1){let s=y();r(0,"app-main-panel",7),R("search",function(j){return v(s),b(i.onSearchEvent(j))}),ce("isDialogFilterVisibleChange",function(j){return v(s),se(i.isDialogFilterVisible,j)||(i.isDialogFilterVisible=j),b(j)}),R("filterConfirmed",function(){return v(s),b(i.onFilterEvent())}),h(1,kt,6,1,"ng-template",null,0,x)(3,Bt,10,5,"ng-template",null,1,x)(5,jt,5,2,"ng-template",null,2,x),n()}o&2&&(m("isSearchableInput",!0)("isFilterable",!0),pe("isDialogFilterVisible",i.isDialogFilterVisible),m("scrollable",!0))},dependencies:[L,k,Q,ke,Me,at,lt,M,P,z,ue,V,nt,Pe,De,J,Y,be,he,X,_e,Ee,ve,A,N],styles:["[_nghost-%COMP%]{display:block} .p-card{height:100%} .p-card .p-card-body{height:inherit} .p-card .p-card-body .p-card-content{height:inherit}"],changeDetection:0})}}return t})();var Z=Rt(It());var Ut=["class","page"],Gt=()=>["/pages/recurring/recurring-expense"],ae=t=>({"ng-dirty ng-invalid":t}),Ht=()=>({});function $t(t,c){if(t&1){let e=y();r(0,"div",5)(1,"a",6),a(2," Cancel "),n(),r(3,"p-button",7),R("click",function(){v(e);let i=g();return b(i.onSubmit())}),n()()}t&2&&(l(),m("routerLink",Ve(1,Gt)))}function Wt(t,c){if(t&1&&(r(0,"small",19),a(1),n()),t&2){let e=c.$implicit;l(),E(e)}}function zt(t,c){if(t&1&&(r(0,"div",32)(1,"div",33),a(2),n()()),t&2){let e=c.$implicit;l(2),I(" ",e.name," ")}}function Kt(t,c){if(t&1&&(r(0,"small",19),a(1),n()),t&2){let e=c.$implicit;l(),E(e)}}function Xt(t,c){if(t&1&&(r(0,"small",19),a(1),n()),t&2){let e=c.$implicit;l(),E(e)}}function Yt(t,c){if(t&1&&(r(0,"div",5)(1,"div")(2,"span"),a(3),n()(),r(4,"div",33),a(5),n()()),t&2){let e=c.$implicit;l(3),I("(",e.code,")"),l(2),I(" ",e.value," ")}}function Jt(t,c){if(t&1&&(r(0,"small",19),a(1),n()),t&2){let e=c.$implicit;l(),E(e)}}function Qt(t,c){if(t&1&&(r(0,"div",5)(1,"div")(2,"span"),a(3),n()(),r(4,"div",33),a(5),n()()),t&2){let e=c.$implicit;l(3),I("(",e.code,")"),l(2),I(" ",e.value," ")}}function Zt(t,c){if(t&1&&(r(0,"small",19),a(1),n()),t&2){let e=c.$implicit;l(),E(e)}}function en(t,c){if(t&1){let e=y();r(0,"div",9)(1,"div",10)(2,"p-panel",11)(3,"p-scroll-panel")(4,"div",12)(5,"div",13)(6,"form",14)(7,"div",15)(8,"div",13)(9,"div",16)(10,"label",17),a(11,"Name"),n(),d(12,"input",18),r(13,"div"),$(14,Wt,2,1,"small",19,H),n()()(),r(16,"div",20,2)(18,"div",16)(19,"label",17),a(20,"Outlet"),n(),r(21,"p-select",21),h(22,zt,3,1,"ng-template",null,3,x),n()()(),r(24,"div",20)(25,"div",16)(26,"div")(27,"label",17),a(28,"Supplier"),n(),r(29,"p-autocomplete",22),R("completeMethod",function(i){v(e);let s=g(2);return b(s.searchContact(i))}),n()(),r(30,"div"),$(31,Kt,2,1,"small",19,H),n()()(),r(33,"div",20)(34,"div",16)(35,"label",17),a(36,"From"),n(),d(37,"p-datepicker",23),n()(),r(38,"div",20)(39,"div",16)(40,"label",17),a(41,"To"),n(),d(42,"p-datepicker",24),n()(),d(43,"div",25),n(),d(44,"hr"),r(45,"div",15)(46,"div",20)(47,"div",16)(48,"label",17),a(49,"Amount"),n(),d(50,"input",26),r(51,"div"),$(52,Xt,2,1,"small",19,H),n()()(),r(54,"div",20)(55,"div",16)(56,"label",17),a(57,"Frequency"),n(),d(58,"p-select",27),n()(),r(59,"div",20)(60,"div",16)(61,"label",17),a(62,"Expense (Debit)"),n(),r(63,"p-select",28),h(64,Yt,6,2,"ng-template",null,3,x),n()(),r(66,"div"),$(67,Jt,2,1,"small",19,H),n()(),r(69,"div",20)(70,"div",16)(71,"label",17),a(72,"Payment (Credit)"),n(),r(73,"p-select",29),h(74,Qt,6,2,"ng-template",null,3,x),n()(),r(76,"div"),$(77,Zt,2,1,"small",19,H),n()(),r(79,"div",30)(80,"div",16)(81,"label",17),a(82,"Description"),n(),d(83,"textarea",31),n()()()()()()()()()()}if(t&2){let e,o,i,s,p=g(2);l(6),m("formGroup",p.recurringExpenseForm),l(6),m("ngClass",S(17,ae,p.isInvalid("name"))),l(2),W(p.getErrors("name")),l(7),m("options",(e=p.recurringExpenseData())==null||e.options==null?null:e.options.entities),l(8),m("showClear",!0)("ngClass",S(19,ae,p.isInvalid("contact")))("suggestions",p.customerSupplierSuggestions()),l(2),W(p.getErrors("contact")),l(6),m("iconDisplay","input")("showIcon",!0),l(5),m("iconDisplay","input")("showIcon",!0),l(8),m("ngClass",S(21,ae,p.isInvalid("amount")))("autoNumeric",Ve(23,Ht)),l(2),W(p.getErrors("amount")),l(6),m("options",(o=p.recurringExpenseData())==null||o.options==null?null:o.options.frequency),l(5),m("options",(i=p.recurringExpenseData())==null||i.options==null?null:i.options.expenses)("ngClass",S(24,ae,p.isInvalid("expenseAccountID"))),l(4),W(p.getErrors("expenseAccountID")),l(6),m("ngClass",S(26,ae,p.isInvalid("paymentAccountID")))("options",(s=p.recurringExpenseData())==null||s.options==null?null:s.options.assets),l(4),W(p.getErrors("paymentAccountID"))}}function tn(t,c){if(t&1&&h(0,en,84,28,"div",8),t&2){let e=g();m("ngIf",e.recurringExpenseData())}}var je=(()=>{class t{constructor(){this.recurringExpenseService=u(B),this.fb=u(Qe),this.destroyRef=u(Ge),this.route=u(de),this.recurringExpenseData=q(null),this.customerSupplierSuggestions=q([]),this.router=u(ge),this.contactType=new Xe(0),this.dayjsService=u(mt)}ngOnInit(){this.initializeForm(),this.fetchRecurringExpenseForm()}initializeForm(){this.recurringExpenseForm=this.fb.group({id:this.fb.control(""),name:this.fb.control("",[K.required]),repeatTypeID:this.fb.control(1,[K.required]),startDate:this.fb.control((0,Z.default)().toISOString()),endDate:this.fb.control(null),lastExpenseDate:this.fb.control(""),amount:this.fb.control(0,[K.required]),paymentAccountID:this.fb.control(null,[K.required]),expenseAccountID:this.fb.control(null,[K.required]),contact:this.fb.control("",[]),description:this.fb.control(""),repeatTypeLabel:this.fb.control(""),outletID:this.fb.control(""),creatorID:this.fb.control(""),created:this.fb.control(""),modifierID:this.fb.control(""),modified:this.fb.control("")})}fetchRecurringExpenseForm(){this.route.paramMap.pipe(G(e=>e.get("id")),O(e=>e?this.recurringExpenseService.fetchRecurringExpenseForm(e):this.recurringExpenseService.fetchRecurringExpenseForm()),T(e=>{this.recurringExpenseData.set(e),this.updateFormWithRecurringExpense(e.form)})).subscribe()}updateFormWithRecurringExpense(e){let o=Object.entries(e).reduce((i,[s,p])=>{switch(s){case"startDate":i[s]=(0,Z.default)(p).isSame((0,Z.default)("0001-01-01T00:00:00"))?(0,Z.default)().toDate():(0,Z.default)(p).toDate();break;case"repeatTypeID":i[s]=1;break;case"contactID":i.contact=e.contactID?{Key:e.contactID,Value:e.contactName}:null;break;case"paymentAccountID":i[s]=p===re?null:p;break;case"expenseAccountID":i[s]=p===re?null:p;break;default:i[s]=p}return i},{});this.recurringExpenseForm.patchValue(o)}searchContact(e){this.recurringExpenseService.fetchSupplierSuggestion(e.query).pipe(T(this.customerSupplierSuggestions.set)).subscribe()}onSubmit(){let e=this.recurringExpenseForm.value;if(this.recurringExpenseForm.invalid){this.recurringExpenseForm.markAllAsTouched();return}let o=Object.entries(e).reduce((i,[s,p])=>{switch(s){case"amount":i[s]=+p;break;case"startDate":i[s]=p?this.dayjsService.from(p).format():null;break;case"endDate":i[s]=p?this.dayjsService.from(p).format():null;break;case"contact":typeof p=="string"?i.contactID=p:typeof p=="object"&&p!==null?i.contactID=p&&Object.prototype.hasOwnProperty.call(p,"Key")?p.Key:p:i.contactID=re;break;default:i[s]=p;break}return i},{});this.recurringExpenseService.submitRecurringExpense(o).pipe(T(()=>{this.router.navigate(["/pages/recurring/recurring-expense"])})).subscribe()}isInvalid(e){let o=this.recurringExpenseForm.controls[e];return o.invalid&&(o.dirty||o.touched)}getErrors(e){if(!this.isInvalid(e))return null;let o=this.recurringExpenseForm.controls[e];if(!o.errors)return null;let i=[];for(let[s,p]of Object.entries(o.errors))switch(s){case"required":i.push("This field is required.");break;case"minlength":i.push(`Minimum length is ${p.requiredLength} characters.`);break;case"maxlength":i.push(`Maximum length is ${p.requiredLength} characters.`);break;case"email":i.push("Please enter a valid email address.");break;case"pattern":i.push("The format is invalid.");break;case"min":i.push(`Minimum value is ${p.min}.`);break;case"max":i.push(`Maximum value is ${p.max}.`);break;default:i.push("Invalid value.")}return i}static{this.\u0275fac=function(o){return new(o||t)}}static{this.\u0275cmp=D({type:t,selectors:[["app-recurring-expense-form",8,"page"]],attrs:Ut,decls:5,vars:2,consts:[["actionButton",""],["content",""],["outlet",""],["item",""],["pageTitle","Recurring Expense Form",3,"hasMainWrapperPadding","overflowScroll"],[1,"d-flex","gap-2"],["type","button",1,"p-button","p-button-secondary","p-button-outlined",3,"routerLink"],["label","Submit","icon","fa-solid fa-plus",3,"click"],["class","row justify-content-center",4,"ngIf"],[1,"row","justify-content-center"],[1,"col-6"],[1,"h-100","d-flex"],[1,"row","justify-content-center","h-100"],[1,"col-12"],[1,"d-flex","flex-column","row-gap-2",3,"formGroup"],[1,"row","row-gap-2"],[1,"d-flex","flex-column"],["for",""],["formControlName","name","type","text","pInputText","",3,"ngClass"],[1,"text-danger"],[1,"col","col-lg-6"],["filter","","filterBy","name","appendTo","body","formControlName","outletID","optionLabel","name","optionValue","id","placeholder","Select Outlet",3,"options"],["formControlName","contact","inputStyleClass","w-100","styleClass","w-100","optionLabel","Value","optionValue","Key",3,"completeMethod","showClear","ngClass","suggestions"],["dateFormat","mm/dd/yy","appendTo","body","formControlName","startDate","styleClass","w-100","inputId","icondisplay",3,"iconDisplay","showIcon"],["appendTo","body","formControlName","endDate","styleClass","w-100","inputId","icondisplay",3,"iconDisplay","showIcon"],[1,"col"],["formControlName","amount","type","text","pInputText","",3,"ngClass","autoNumeric"],["appendTo","body","formControlName","repeatTypeID","optionLabel","value","optionValue","key","placeholder","Select Outlet",3,"options"],["appendTo","body","formControlName","expenseAccountID","optionLabel","value","optionValue","key","placeholder","Select Expense","filter","","filterBy","code,value",3,"options","ngClass"],["appendTo","body","formControlName","paymentAccountID","optionLabel","value","optionValue","key","filter","","filterBy","code,value","placeholder","Select Payment",3,"ngClass","options"],[1,"col","col-lg-12"],["formControlName","description","rows","3","cols","30","pTextarea",""],[1,"flex","items-center","gap-2"],[1,"text-truncate","d-inline-block",2,"max-width","250px"]],template:function(o,i){o&1&&(r(0,"app-main-panel",4),h(1,$t,4,2,"ng-template",null,0,x)(3,tn,1,1,"ng-template",null,1,x),n()),o&2&&m("hasMainWrapperPadding",!0)("overflowScroll",!0)},dependencies:[L,Q,Se,Ce,Pe,De,rt,it,gt,dt,st,pt,Re,ye,M,ze,P,be,he,xe,X,_e,Ee,ve,V,k,J,Y,ut,A,N,ot],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var nn=["class","page"],rn=t=>["/pages/recurring/recurring-expense/edit",t];function on(t,c){if(t&1&&(r(0,"a",7),d(1,"i",8),r(2,"span"),a(3,"Edit"),n()()),t&2){let e=g(4);m("routerLink",S(1,rn,e.currentRecurringExpense().id))}}function an(t,c){if(t&1){let e=y();r(0,"p-button",9),R("onClick",function(){v(e);let i=g(4);return b(i.onDeleteRecurringExpense(i.currentRecurringExpense().id))}),n()}}function ln(t,c){if(t&1&&(r(0,"div",4),h(1,on,4,3,"a",5)(2,an,1,0,"p-button",6),n()),t&2){let e=g(3);l(),m("ngIf",e.roleService.setup.recurring),l(),m("ngIf",e.roleService.setup.recurring)}}function pn(t,c){if(t&1&&h(0,ln,3,2,"div",3),t&2){let e=g(2);m("ngIf",e.currentRecurringExpense())}}function sn(t,c){if(t&1){let e=y();r(0,"p-panel",13)(1,"p-scroll-panel")(2,"div",10)(3,"div",14)(4,"div",15)(5,"div",14)(6,"div",16)(7,"div",17)(8,"div",18)(9,"label",19),a(10,"Outlet"),n(),r(11,"input",20),ce("ngModelChange",function(i){v(e);let s=g(3);return se(s.currentRecurringExpense().outletName,i)||(s.currentRecurringExpense().outletName=i),b(i)}),n()()(),r(12,"div",17)(13,"div",18)(14,"label",19),a(15,"Supplier"),n(),d(16,"input",21),n()(),r(17,"div",17)(18,"div",18)(19,"label",19),a(20,"From"),n(),d(21,"input",22),C(22,"date"),n()(),r(23,"div",17)(24,"div",18)(25,"label",19),a(26,"To"),n(),d(27,"input",22),C(28,"date"),n()()(),d(29,"hr"),r(30,"div",16)(31,"div",17)(32,"div",18)(33,"label",19),a(34,"Amount"),n(),d(35,"input",22),C(36,"number"),n()(),r(37,"div",17)(38,"div",18)(39,"label",19),a(40,"Frequency"),n(),d(41,"input",22),n()(),r(42,"div",17)(43,"div",18)(44,"label",19),a(45,"Expense (Debit)"),n(),d(46,"input",22),n()(),r(47,"div",17)(48,"div",18)(49,"label",19),a(50,"Payment (Credit)"),n(),d(51,"input",22),n()(),r(52,"div",23)(53,"div",18)(54,"label",19),a(55,"Description"),n(),d(56,"textarea",24),n()()()()()()()()()}if(t&2){let e=g(3);l(11),pe("ngModel",e.currentRecurringExpense().outletName),l(5),m("value",e.currentRecurringExpense().contactName),l(5),m("value",U(22,9,e.currentRecurringExpense().startDate,"d MMM y")),l(6),m("value",U(28,12,e.currentRecurringExpense().endDate,"d MMM y")),l(8),m("value",F(36,15,e.currentRecurringExpense().amount)),l(6),m("value",e.currentRecurringExpense().repeatTypeLabel),l(5),m("value",e.currentRecurringExpense().expenseName),l(5),m("value",e.currentRecurringExpense().paymentName),l(5),m("value",e.currentRecurringExpense().description)}}function cn(t,c){if(t&1&&(r(0,"div",10)(1,"div",11),h(2,sn,57,17,"p-panel",12),n()()),t&2){let e=g(2);l(2),m("ngIf",e.currentRecurringExpense())}}function mn(t,c){if(t&1&&(r(0,"app-main-panel",2),h(1,pn,1,1,"ng-template",null,0,x)(3,cn,3,1,"ng-template",null,1,x),n()),t&2){let e=g();m("pageTitle",e.currentRecurringExpense().name+" Info")("hasMainWrapperPadding",!0)("overflowScroll",!0)}}var Et=(()=>{class t{constructor(){this.recurringExpenseService=u(B),this.route=u(de),this.router=u(ge),this.currentRecurringExpense=q(null),this.roleService=u(et)}ngOnInit(){this.route.paramMap.pipe(G(e=>e.get("id")),Ne("params"),qe(e=>this.recurringExpenseService.getRecurringExpenseByID(e)),T(e=>this.currentRecurringExpense.set(e)),Ne("recurringExpense")).subscribe()}onDeleteRecurringExpense(e){this.recurringExpenseService.removeRecurringExpense(e).pipe(T(()=>{this.router.navigate(["/pages/recurring/recurring-expense"])})).subscribe()}static{this.\u0275fac=function(o){return new(o||t)}}static{this.\u0275cmp=D({type:t,selectors:[["app-recurring-expense-info",8,"page"]],attrs:nn,decls:1,vars:1,consts:[["actionButton",""],["content",""],[3,"pageTitle","hasMainWrapperPadding","overflowScroll"],["class","d-flex gap-2",4,"ngIf"],[1,"d-flex","gap-2"],["class","p-button p-button-outlined p-button-secondary d-flex gap-2 align-items-center",3,"routerLink",4,"ngIf"],["icon","fa-solid fa-trash","label","Delete","severity","danger",3,"onClick",4,"ngIf"],[1,"p-button","p-button-outlined","p-button-secondary","d-flex","gap-2","align-items-center",3,"routerLink"],[1,"fa-solid","fa-pen-to-square"],["icon","fa-solid fa-trash","label","Delete","severity","danger",3,"onClick"],[1,"row","justify-content-center"],[1,"col-6"],["class","h-100 d-flex",4,"ngIf"],[1,"h-100","d-flex"],[1,"col"],[1,"row"],[1,"row","row-gap-2"],[1,"col","col-lg-6"],[1,"d-flex","flex-column"],["for",""],["readonly","","type","text","pInputText","",3,"ngModelChange","ngModel"],["type","text","readonly","","pInputText","",3,"value"],["readonly","","type","text","pInputText","",3,"value"],[1,"col","col-lg-12"],["readonly","","rows","5","cols","30","pTextarea","",3,"value"]],template:function(o,i){o&1&&h(0,mn,5,3,"app-main-panel",2),o&2&&$e(i.currentRecurringExpense()?0:-1)},dependencies:[L,Q,M,P,z,ue,Se,Ce,Ze,xe,X,Ye,J,Y,V,k,A,N,Re,ye],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var vt=[{path:"",redirectTo:"",pathMatch:"full"},{path:"",children:[{path:"",component:_t},{path:"create",component:je},{path:"details/:id",component:Et},{path:"edit/:id",component:je}]}];var bt=(()=>{class t{constructor(){this.httpService=u(fe)}getAssetValue(e){return this.httpService.post(void 0,"/api/AssetValue/GetList",e)}static{this.\u0275fac=function(o){return new(o||t)}}static{this.\u0275prov=le({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var un={filter:{Text:"",Frequency:0,PageNumber:1,RowCount:10},data:null},Oe=Ie(Fe(un),Te(t=>{let c=u(bt);return{getAssetValue:ne(ee(O(o=>c.getAssetValue(o).pipe(ie({next:i=>{w(t,s=>_(f({},s),{data:i}))},error:i=>{console.error("Error fetching asset value:",i)}}))))),updateFilter:o=>{w(t,i=>_(f({},i),{filter:o}))}}}),we({onInit:t=>{t.getAssetValue(t.filter())}}));var dn=t=>["/pages/recurring/recurring-expense/details/",t];function gn(t,c){t&1&&d(0,"div",5)}function fn(t,c){t&1&&(r(0,"tr")(1,"th"),a(2,"Outlet"),n(),r(3,"th"),a(4,"Name"),n(),r(5,"th"),a(6,"Account Code"),n(),r(7,"th",8),a(8,"Price on Purchase"),n(),r(9,"th",8),a(10,"Accomulated Depreciation"),n(),r(11,"th",8),a(12,"Book Value"),n(),r(13,"th",8),a(14,"Frequency"),n()())}function xn(t,c){if(t&1&&(r(0,"tr")(1,"td"),a(2),n(),r(3,"td")(4,"a",9),a(5),n()(),r(6,"td"),a(7),n(),r(8,"td",8),a(9),C(10,"number"),n(),r(11,"td",8),a(12),C(13,"number"),n(),r(14,"td",8),a(15),C(16,"number"),n(),r(17,"td",8),a(18),C(19,"number"),n()()),t&2){let e=c.$implicit;l(2),E(e.entityName),l(2),m("routerLink",S(16,dn,e.id)),l(),E(e.name),l(2),E(e.accountCode),l(2),E(F(10,8,e.priceOnPurchase)),l(3),I(" ",F(13,10,e.accumulatedDepreciation)," "),l(3),I(" ",F(16,12,e.bookValue)," "),l(3),I(" ",F(19,14,e.depreciationPerYear)," ")}}function _n(t,c){if(t&1&&(r(0,"p-panel")(1,"p-table",7),h(2,fn,15,0,"ng-template",null,2,x)(4,xn,20,18,"ng-template",null,3,x),n()()),t&2){let e=g(2);l(),m("value",e.store.data().data)("rows",e.store.filter().RowCount)("totalRecords",e.store.data().count)}}function hn(t,c){if(t&1&&h(0,_n,6,3,"p-panel",6),t&2){let e=g();m("ngIf",e.store.data())}}var Ct=(()=>{class t{constructor(){this.store=u(Oe)}static{this.\u0275fac=function(o){return new(o||t)}}static{this.\u0275cmp=D({type:t,selectors:[["app-asset-value"]],features:[me([Oe])],decls:5,vars:2,consts:[["actionButton",""],["content",""],["header",""],["body",""],["pageTitle","Asset Value",3,"isSearchableInput","scrollable"],[1,"d-flex","gap-2"],[4,"ngIf"],["styleClass","h-100","dataKey","id",1,"",3,"value","rows","totalRecords"],[1,"text-end"],["target","_blank",1,"link","link-primary",3,"routerLink"]],template:function(o,i){o&1&&(r(0,"app-main-panel",4),h(1,gn,1,0,"ng-template",null,0,x)(3,hn,1,1,"ng-template",null,1,x),n()),o&2&&m("isSearchableInput",!0)("scrollable",!0)},dependencies:[L,M,P,z,A,N,ke,Me,V,k],encapsulation:2})}}return t})();var dr=[{path:"",redirectTo:"recurring-expense",pathMatch:"full"},{path:"recurring-expense",children:vt},{path:"asset-value",component:Ct},{path:"post-to-journal",loadComponent:()=>import("./chunk-6TVP5OOO.js").then(t=>t.PostRecurringExpenseComponent)}];export{dr as RECURRING_ROUTES};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{$ as
|
|
1
|
+
import{$ as Qt,B as Y,Da as it,I as jt,La as Gt,Ma as T,Q as K,Qa as Ct,Sa as Z,Ta as J,Ua as $,V as vt,Va as Xt,_ as qt,ca as $t,j as Rt,ja as Zt,na as _,qa as xt,xa as Ut,z as Q}from"./chunk-G5S5AZA7.js";import{a as gt,h as At,k as Nt,l as Ht,m as Vt,r as P,s as ft,t as Wt}from"./chunk-OKCHQM5Q.js";import{Aa as Ft,Ab as g,Ac as yt,Cb as q,Da as N,Ea as lt,Jb as O,Ka as at,Kb as f,Lb as Dt,Mb as M,Nb as Bt,Ob as z,Qc as Ot,Ub as G,Vb as X,Vc as p,Wb as H,Wc as Pt,Xb as ct,Yb as ut,Yc as ot,Zb as Mt,Zc as Lt,ba as C,ca as w,dc as dt,ec as B,fc as V,gb as S,gc as W,ha as c,jc as tt,lb as _t,lc as et,mb as Tt,mc as nt,nc as mt,oa as U,oc as zt,pb as ht,qc as pt,ra as kt,rc as bt,ta as u,va as Et,wb as F,xb as I,yb as E,yc as y,za as st}from"./chunk-JP6RBSB3.js";import{a as k}from"./chunk-YQFG5XE2.js";var Yt=(()=>{class e extends ${name="common";static \u0275fac=(()=>{let t;return function(o){return(t||(t=u(e)))(o||e)}})();static \u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),v=(()=>{class e{document=c(gt);platformId=c(at);el=c(lt);injector=c(Et);cd=c(Ot);renderer=c(_t);config=c(Xt);baseComponentStyle=c(Yt);baseStyle=c($);scopedStyleEl;rootEl;dt;get styleOptions(){return{nonce:this.config?.csp().nonce}}get _name(){return this.constructor.name.replace(/^_/,"").toLowerCase()}get componentStyle(){return this._componentStyle}attrSelector=it("pc");themeChangeListeners=[];_getHostInstance(t){if(t)return t?this.hostName?t.name===this.hostName?t:this._getHostInstance(t.parentInstance):t.parentInstance:void 0}_getOptionValue(t,n="",o={}){return Ut(t,n,o)}ngOnInit(){this.document&&this._loadStyles()}ngAfterViewInit(){this.rootEl=this.el?.nativeElement,this.rootEl&&this.rootEl?.setAttribute(this.attrSelector,"")}ngOnChanges(t){if(this.document&&!Wt(this.platformId)){let{dt:n}=t;n&&n.currentValue&&(this._loadScopedThemeStyles(n.currentValue),this._themeChangeListener(()=>this._loadScopedThemeStyles(n.currentValue)))}}ngOnDestroy(){this._unloadScopedThemeStyles(),this.themeChangeListeners.forEach(t=>Ct.off("theme:change",t))}_loadStyles(){let t=()=>{J.isStyleNameLoaded("base")||(this.baseStyle.loadGlobalCSS(this.styleOptions),J.setLoadedStyleName("base")),this._loadThemeStyles()};t(),this._themeChangeListener(()=>t())}_loadCoreStyles(){!J.isStyleNameLoaded("base")&&this._name&&(this.baseComponentStyle.loadCSS(this.styleOptions),this.componentStyle&&this.componentStyle?.loadCSS(this.styleOptions),J.setLoadedStyleName(this.componentStyle?.name))}_loadThemeStyles(){if(!Z.isStyleNameLoaded("common")){let{primitive:t,semantic:n,global:o,style:r}=this.componentStyle?.getCommonTheme?.()||{};this.baseStyle.load(t?.css,k({name:"primitive-variables"},this.styleOptions)),this.baseStyle.load(n?.css,k({name:"semantic-variables"},this.styleOptions)),this.baseStyle.load(o?.css,k({name:"global-variables"},this.styleOptions)),this.baseStyle.loadGlobalTheme(k({name:"global-style"},this.styleOptions),r),Z.setLoadedStyleName("common")}if(!Z.isStyleNameLoaded(this.componentStyle?.name)&&this.componentStyle?.name){let{css:t,style:n}=this.componentStyle?.getComponentTheme?.()||{};this.componentStyle?.load(t,k({name:`${this.componentStyle?.name}-variables`},this.styleOptions)),this.componentStyle?.loadTheme(k({name:`${this.componentStyle?.name}-style`},this.styleOptions),n),Z.setLoadedStyleName(this.componentStyle?.name)}if(!Z.isStyleNameLoaded("layer-order")){let t=this.componentStyle?.getLayerOrderThemeCSS?.();this.baseStyle.load(t,k({name:"layer-order",first:!0},this.styleOptions)),Z.setLoadedStyleName("layer-order")}this.dt&&(this._loadScopedThemeStyles(this.dt),this._themeChangeListener(()=>this._loadScopedThemeStyles(this.dt)))}_loadScopedThemeStyles(t){let{css:n}=this.componentStyle?.getPresetTheme?.(t,`[${this.attrSelector}]`)||{},o=this.componentStyle?.load(n,k({name:`${this.attrSelector}-${this.componentStyle?.name}`},this.styleOptions));this.scopedStyleEl=o?.el}_unloadScopedThemeStyles(){this.scopedStyleEl?.remove()}_themeChangeListener(t=()=>{}){J.clearLoadedStyleNames(),Ct.on("theme:change",t),this.themeChangeListeners.push(t)}cx(t,n){let o=this.parent?this.parent.componentStyle?.classes?.[t]:this.componentStyle?.classes?.[t];return typeof o=="function"?o({instance:this}):typeof o=="string"?o:t}sx(t){let n=this.componentStyle?.inlineStyles?.[t];return typeof n=="function"?n({instance:this}):typeof n=="string"?n:k({},n)}get parent(){return this.parentInstance}static \u0275fac=function(n){return new(n||e)};static \u0275dir=E({type:e,inputs:{dt:"dt"},features:[y([Yt,$]),U]})}return e})();var fe=["*"],he=({dt:e})=>`
|
|
2
2
|
.p-iconfield {
|
|
3
3
|
position: relative;
|
|
4
4
|
display: block;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as v,b as L}from"./chunk-MDEJN7RJ.js";import"./chunk-RHOQDE75.js";import{a as E,b as O}from"./chunk-H57SDRPH.js";import"./chunk-4CDAAU6Z.js";import{h as H}from"./chunk-LUPSXHRX.js";import{b as N,c as G}from"./chunk-X22YKT5B.js";import{a as R,b as D}from"./chunk-JYCUE5HV.js";import"./chunk-JMEBBWX4.js";import"./chunk-FUZFAJGJ.js";import{w as V,x as j}from"./chunk-5FSMHZSY.js";import"./chunk-BHV2HCJY.js";import"./chunk-G5S5AZA7.js";import"./chunk-LD7LVE2B.js";import{a as I}from"./chunk-BLQJXMNV.js";import"./chunk-F2X3VGZZ.js";import{n as A,r as F}from"./chunk-OKCHQM5Q.js";import{Cb as B,Jc as m,Kb as p,Kc as l,Mc as x,Nb as d,Ub as o,V as y,Vb as n,Wb as c,X as M,Z as b,_b as P,dc as h,ec as s,gb as a,h as T,ha as f,pa as g,qa as C,ra as S,s as u,sa as k,wb as w,yc as $,zc as _}from"./chunk-JP6RBSB3.js";import"./chunk-YQFG5XE2.js";var q=()=>({height:"calc(100vh - 100px)"});function J(i,z){if(i&1){let e=P();o(0,"div",3)(1,"p-button",4),h("onClick",function(){g(e);let r=s();return C(r.onFormatCOAConfig())}),n(),o(2,"p-button",5),m(3,"async"),m(4,"async"),h("onClick",function(){g(e);let r=s();return C(r.onMigrateCoaConfig())}),n()()}if(i&2){let e=s();a(2),p("disabled",l(3,2,e.countInBooks$)!==0)("pTooltip",l(4,4,e.countInBooks$)!==0?"Books already has entries. Please format before re-migrating.":null)}}function K(i,z){if(i&1&&(o(0,"p-scroll-panel")(1,"p-panel")(2,"div",6),c(3,"app-migration-cards",7),m(4,"async"),S(),o(5,"svg",8),c(6,"path",9),n(),k(),c(7,"app-migration-cards",10),m(8,"async"),n()()()),i&2){let e=s();d(_(12,q)),a(),d(_(13,q)),a(2),p("migrationCount",l(4,8,e.countInPOS$))("migrationTitle",e.pageTitle),a(4),p("migrationCount",l(8,10,e.countInBooks$))("migrationTitle",e.pageTitle)}}var ge=(()=>{class i{constructor(){this.migrateService=f(v),this.toastr=f(I),this.refresh$=new T(void 0),this.pageTitle="Chart of Account Configuration"}ngOnInit(){let e=this.refresh$.pipe(M(()=>this.migrateService.getCOAConfigurationCount()),b(t=>console.log("API response:",t)),y(1));this.countInPOS$=e.pipe(u(t=>Number(t.pos))),this.countInBooks$=e.pipe(u(t=>Number(t.books)))}onMigrateCoaConfig(){this.migrateService.migrateCoaConfig().subscribe(e=>{this.refresh$.next(),this.toastr.success(e.message,"Migration Successful")})}onFormatCOAConfig(){window.confirm("Are you sure you want to format this data? This action cannot be undone.")&&this.migrateService.formatManualCOAConfig().subscribe(t=>{this.refresh$.next(),this.toastr.success(t.message,"Format Successful")})}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=w({type:i,selectors:[["app-coa-configuration"]],features:[$([v])],decls:5,vars:1,consts:[["actionButton",""],["content",""],[3,"pageTitle"],[1,"d-flex","gap-2"],["label","Format","severity","danger",3,"onClick"],["label","Migrate","tooltipPosition","left",3,"onClick","disabled","pTooltip"],[1,"flex","gap-30","flex-wrap",2,"display","flex","justify-content","center","align-items","center","gap","1rem","margin-top","40px"],["migrationPlace","Accounting",3,"migrationCount","migrationTitle"],["width","40","height","40","viewBox","0 0 24 24","fill","none"],["d","M8 5l8 7-8 7","stroke","#007bff","stroke-width","2","stroke-linecap","round","stroke-linejoin","round"],["migrationPlace","Books",3,"migrationCount","migrationTitle"]],template:function(t,r){t&1&&(o(0,"app-main-panel",2),B(1,J,5,6,"ng-template",null,0,x)(3,K,9,14,"ng-template",null,1,x),n()),t&2&&p("pageTitle",r.pageTitle)},dependencies:[H,F,A,j,V,O,E,D,R,G,N,L],encapsulation:2})}}return i})();export{ge as CoaConfigurationComponent};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"./chunk-OZ2ESPRJ.js";import"./chunk-DQQ6JL6H.js";import"./chunk-C2GO6SPF.js";import"./chunk-Z45NTTES.js";import"./chunk-LD7LVE2B.js";import"./chunk-BLQJXMNV.js";import"./chunk-F2X3VGZZ.js";import"./chunk-OKCHQM5Q.js";import"./chunk-JP6RBSB3.js";import"./chunk-YQFG5XE2.js";var o=[{path:"",canActivate:[a],children:[{path:"",loadComponent:()=>import("./chunk-KPWIGW52.js").then(t=>t.Dashboard1Component),data:{title:"Dashboard",headerTemplate:"header"}}]}];export{o as DashboardRoutes};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as Ke}from"./chunk-YOUPD27G.js";import{a as qe}from"./chunk-42UIGXWH.js";import{a as $e}from"./chunk-253IFSMV.js";import{a as se}from"./chunk-QYXQYPHB.js";import{a as Ue}from"./chunk-FBEBMNVC.js";import{b as Le,c as Pe}from"./chunk-6NGIQJIP.js";import{a as ze}from"./chunk-C7LM5UCK.js";import{a as X,i as ye,j as Re,l as Ae,n as Qe,p as Be,r as ce,s as He}from"./chunk-67VPWIWW.js";import{Ca as me,Ea as Me,Ma as le,Na as U,Oa as Oe,Pa as Fe,Q as he,R as Ee,S as Q,U as J,V as ke,Va as ae,_ as Ve,a as Ne,e as we,j as Ie,ra as fe,sa as De,x as _e,z as L}from"./chunk-FMVCTBCQ.js";import{c as q,e as K,f as j,g as W,h as G,m as Y}from"./chunk-B63BKC6F.js";import{Ab as H,Ac as D,Bc as $,Cb as d,Jb as N,Kb as a,Lb as te,Mc as k,Nb as ie,Ob as O,Pb as ue,Ub as f,Vb as m,Vc as y,Wb as w,Wc as z,Xb as S,Yb as C,Zb as I,_b as V,aa as Z,ba as ee,ca as de,dc as x,ec as s,gb as c,ha as B,jc as T,kc as E,lc as _,mb as xe,mc as h,oa as be,pa as u,pc as ge,qa as g,qc as A,rc as ne,sc as oe,ta as R,vc as ve,wb as P,wc as Se,xb as pe,xc as Ce,yc as re,za as b}from"./chunk-JP6RBSB3.js";import{a as F}from"./chunk-YQFG5XE2.js";var Ge=t=>({height:t}),Ye=t=>({"p-tree-node-droppoint-active":t}),ot=(t,l)=>({$implicit:t,loading:l}),rt=(t,l)=>({$implicit:t,partialSelected:l,class:"p-tree-node-checkbox"}),Je=t=>({$implicit:t});function lt(t,l){if(t&1){let e=V();f(0,"li",11),x("drop",function(i){u(e);let o=s(2);return g(o.onDropPoint(i,-1))})("dragover",function(i){u(e);let o=s(2);return g(o.onDropPointDragOver(i))})("dragenter",function(i){u(e);let o=s(2);return g(o.onDropPointDragEnter(i,-1))})("dragleave",function(i){u(e);let o=s(2);return g(o.onDropPointDragLeave(i))}),m()}if(t&2){let e=s(2);a("ngClass",D(2,Ye,e.draghoverPrev)),N("aria-hidden",!0)}}function at(t,l){t&1&&w(0,"ChevronRightIcon",13),t&2&&a("styleClass","p-tree-node-toggle-icon")}function st(t,l){t&1&&w(0,"ChevronDownIcon",13),t&2&&a("styleClass","p-tree-node-toggle-icon")}function ct(t,l){if(t&1&&(S(0),d(1,at,1,1,"ChevronRightIcon",12)(2,st,1,1,"ChevronDownIcon",12),C()),t&2){let e=s(3);c(),a("ngIf",!e.node.expanded),c(),a("ngIf",e.node.expanded)}}function dt(t,l){t&1&&(S(0),w(1,"SpinnerIcon",13),C()),t&2&&(c(),a("styleClass","pi-spin p-tree-node-toggle-icon"))}function pt(t,l){if(t&1&&(S(0),d(1,ct,3,2,"ng-container",5)(2,dt,2,1,"ng-container",5),C()),t&2){let e=s(2);c(),a("ngIf",!e.node.loading),c(),a("ngIf",e.loadingMode==="icon"&&e.node.loading)}}function ut(t,l){}function gt(t,l){t&1&&d(0,ut,0,0,"ng-template")}function _t(t,l){if(t&1&&(f(0,"span",14),d(1,gt,1,0,null,15),m()),t&2){let e=s(2);c(),a("ngTemplateOutlet",e.tree.togglerIconTemplate||e.tree._togglerIconTemplate)("ngTemplateOutletContext",$(2,ot,e.node.expanded,e.node.loading))}}function ht(t,l){}function ft(t,l){t&1&&d(0,ht,0,0,"ng-template")}function mt(t,l){if(t&1&&d(0,ft,1,0,null,15),t&2){let e=s(4);a("ngTemplateOutlet",e.tree.checkboxIconTemplate||e.tree._checkboxIconTemplate)("ngTemplateOutletContext",$(2,rt,e.isSelected(),e.node.partialSelected))}}function yt(t,l){t&1&&(S(0),d(1,mt,1,5,"ng-template",null,0,k),C())}function Tt(t,l){if(t&1){let e=V();f(0,"p-checkbox",16),x("click",function(i){return u(e),g(i.preventDefault())}),d(1,yt,3,0,"ng-container",5),m()}if(t&2){let e=s(2);a("ngModel",e.isSelected())("binary",!0)("indeterminate",e.node.partialSelected)("disabled",e.node.selectable===!1)("variant",(e.tree==null?null:e.tree.config.inputStyle())==="filled"||(e.tree==null?null:e.tree.config.inputVariant())==="filled"?"filled":"outlined")("tabindex",-1),N("data-p-partialchecked",e.node.partialSelected),c(),a("ngIf",e.tree.checkboxIconTemplate||e.tree._checkboxIconTemplate)}}function bt(t,l){if(t&1&&w(0,"span"),t&2){let e=s(2);O(e.getIcon())}}function xt(t,l){if(t&1&&(f(0,"span"),A(1),m()),t&2){let e=s(2);c(),ne(e.node.label)}}function vt(t,l){t&1&&I(0)}function St(t,l){if(t&1&&(f(0,"span"),d(1,vt,1,0,"ng-container",15),m()),t&2){let e=s(2);c(),a("ngTemplateOutlet",e.tree.getTemplateForNode(e.node))("ngTemplateOutletContext",D(2,Je,e.node))}}function Ct(t,l){if(t&1&&w(0,"p-treeNode",19),t&2){let e=l.$implicit,n=l.first,i=l.last,o=l.index,r=s(3);a("node",e)("parentNode",r.node)("firstChild",n)("lastChild",i)("index",o)("itemSize",r.itemSize)("level",r.level+1)("loadingMode",r.loadingMode)}}function Nt(t,l){if(t&1&&(f(0,"ul",17),d(1,Ct,1,8,"p-treeNode",18),m()),t&2){let e=s(2);te("display",e.node.expanded?"flex":"none"),c(),a("ngForOf",e.node.children)("ngForTrackBy",e.tree.trackBy.bind(e))}}function wt(t,l){if(t&1){let e=V();f(0,"li",11),x("drop",function(i){u(e);let o=s(2);return g(o.onDropPoint(i,1))})("dragover",function(i){u(e);let o=s(2);return g(o.onDropPointDragOver(i))})("dragenter",function(i){u(e);let o=s(2);return g(o.onDropPointDragEnter(i,1))})("dragleave",function(i){u(e);let o=s(2);return g(o.onDropPointDragLeave(i))}),m()}if(t&2){let e=s(2);a("ngClass",D(2,Ye,e.draghoverNext)),N("aria-hidden",!0)}}function It(t,l){if(t&1){let e=V();d(0,lt,1,4,"li",1),f(1,"li",2),x("keydown",function(i){u(e);let o=s();return g(o.onKeyDown(i))}),f(2,"div",3),x("click",function(i){u(e);let o=s();return g(o.onNodeClick(i))})("contextmenu",function(i){u(e);let o=s();return g(o.onNodeRightClick(i))})("dblclick",function(i){u(e);let o=s();return g(o.onNodeDblClick(i))})("touchend",function(){u(e);let i=s();return g(i.onNodeTouchEnd())})("drop",function(i){u(e);let o=s();return g(o.onDropNode(i))})("dragover",function(i){u(e);let o=s();return g(o.onDropNodeDragOver(i))})("dragenter",function(i){u(e);let o=s();return g(o.onDropNodeDragEnter(i))})("dragleave",function(i){u(e);let o=s();return g(o.onDropNodeDragLeave(i))})("dragstart",function(i){u(e);let o=s();return g(o.onDragStart(i))})("dragend",function(i){u(e);let o=s();return g(o.onDragStop(i))}),f(3,"button",4),x("click",function(i){u(e);let o=s();return g(o.toggle(i))}),d(4,pt,3,2,"ng-container",5)(5,_t,2,5,"span",6),m(),d(6,Tt,2,8,"p-checkbox",7)(7,bt,1,2,"span",8),f(8,"span",9),d(9,xt,2,1,"span",5)(10,St,2,4,"span",5),m()(),d(11,Nt,2,4,"ul",10),m(),d(12,wt,1,4,"li",1)}if(t&2){let e=s();a("ngIf",e.tree.droppableNodes),c(),ie(e.node.style),O(e.node.styleClass),a("ngClass",e.nodeClass)("ngStyle",D(29,Ge,e.itemSize+"px")),N("aria-label",e.node.label)("aria-checked",e.checked)("aria-setsize",e.node.children?e.node.children.length:0)("aria-selected",e.selected)("aria-expanded",e.node.expanded)("aria-posinset",e.index+1)("aria-level",e.level+1)("tabindex",e.index===0?0:-1)("data-id",e.node.key),c(),te("padding-left",e.level*e.indentation+"rem"),a("ngClass",e.nodeContentClass)("draggable",e.tree.draggableNodes),c(),N("data-pc-section","toggler"),c(),a("ngIf",!e.tree.togglerIconTemplate&&!e.tree._togglerIconTemplate),c(),a("ngIf",e.tree.togglerIconTemplate||e.tree._togglerIconTemplate),c(),a("ngIf",e.tree.selectionMode=="checkbox"),c(),a("ngIf",e.node.icon||e.node.expandedIcon||e.node.collapsedIcon),c(2),a("ngIf",!e.tree.getTemplateForNode(e.node)),c(),a("ngIf",e.tree.getTemplateForNode(e.node)),c(),a("ngIf",!e.tree.virtualScroll&&e.node.children&&e.node.expanded),c(),a("ngIf",e.tree.droppableNodes&&e.lastChild)}}var je=["filter"],Et=["node"],kt=["header"],Vt=["footer"],Dt=["loader"],Mt=["empty"],Ot=["togglericon"],Ft=["checkboxicon"],$t=["loadingicon"],Lt=["filtericon"],zt=["scroller"],Ut=["wrapper"],Rt=t=>({options:t});function At(t,l){if(t&1&&w(0,"i"),t&2){let e=s(2);O("p-tree-loading-icon pi-spin "+e.loadingIcon)}}function Qt(t,l){t&1&&w(0,"SpinnerIcon",16),t&2&&a("spin",!0)("styleClass","p-tree-loading-icon")}function Bt(t,l){}function Pt(t,l){t&1&&d(0,Bt,0,0,"ng-template")}function Ht(t,l){if(t&1&&(f(0,"span",17),d(1,Pt,1,0,null,9),m()),t&2){let e=s(3);c(),a("ngTemplateOutlet",e.loadingIconTemplate||e._loadingIconTemplate)}}function qt(t,l){if(t&1&&(S(0),d(1,Qt,1,2,"SpinnerIcon",14)(2,Ht,2,1,"span",15),C()),t&2){let e=s(2);c(),a("ngIf",!e.loadingIconTemplate&&!e._loadingIconTemplate),c(),a("ngIf",e.loadingIconTemplate||e._loadingIconTemplate)}}function Kt(t,l){if(t&1&&(f(0,"div",12),d(1,At,1,2,"i",13)(2,qt,3,2,"ng-container",10),m()),t&2){let e=s();c(),a("ngIf",e.loadingIcon),c(),a("ngIf",!e.loadingIcon)}}function jt(t,l){t&1&&I(0)}function Wt(t,l){t&1&&I(0)}function Gt(t,l){if(t&1&&d(0,Wt,1,0,"ng-container",18),t&2){let e=s();a("ngTemplateOutlet",e.filterTemplate||e._filterTemplate)("ngTemplateOutletContext",D(2,Je,e.filterOptions))}}function Yt(t,l){t&1&&w(0,"SearchIcon",21)}function Jt(t,l){}function Xt(t,l){t&1&&d(0,Jt,0,0,"ng-template")}function Zt(t,l){if(t&1&&(f(0,"span"),d(1,Xt,1,0,null,9),m()),t&2){let e=s(3);c(),a("ngTemplateOutlet",e.filterIconTemplate||e._filterIconTemplate)}}function ei(t,l){if(t&1){let e=V();f(0,"p-iconField")(1,"input",19,0),x("keydown.enter",function(i){return u(e),g(i.preventDefault())})("input",function(i){u(e);let o=s(2);return g(o._filter(i.target.value))}),m(),f(3,"p-inputIcon"),d(4,Yt,1,0,"SearchIcon",20)(5,Zt,2,1,"span",10),m()()}if(t&2){let e=s(2);c(),a("pAutoFocus",e.filterInputAutoFocus),N("placeholder",e.filterPlaceholder),c(3),a("ngIf",!e.filterIconTemplate&&!e._filterIconTemplate),c(),a("ngIf",e.filterIconTemplate||e._filterIconTemplate)}}function ti(t,l){if(t&1&&d(0,ei,6,4,"p-iconField",10),t&2){let e=s();a("ngIf",e.filter)}}function ii(t,l){if(t&1&&w(0,"p-treeNode",27,3),t&2){let e=l.$implicit,n=l.first,i=l.last,o=l.index,r=s(2).options,p=s(3);a("level",e.level)("rowNode",e)("node",e.node)("parentNode",e.parent)("firstChild",n)("lastChild",i)("index",p.getIndex(r,o))("itemSize",r.itemSize)("indentation",p.indentation)("loadingMode",p.loadingMode)}}function ni(t,l){if(t&1&&(f(0,"ul",25),d(1,ii,2,10,"p-treeNode",26),m()),t&2){let e=s(),n=e.$implicit,i=e.options,o=s(3);ie(i.contentStyle),a("ngClass",i.contentStyleClass),N("aria-label",o.ariaLabel)("aria-labelledby",o.ariaLabelledBy),c(),a("ngForOf",n)("ngForTrackBy",o.trackBy)}}function oi(t,l){if(t&1&&d(0,ni,2,7,"ul",24),t&2){let e=l.$implicit;a("ngIf",e)}}function ri(t,l){t&1&&I(0)}function li(t,l){if(t&1&&d(0,ri,1,0,"ng-container",18),t&2){let e=l.options,n=s(4);a("ngTemplateOutlet",n.loaderTemplate||n._loaderTemplate)("ngTemplateOutletContext",D(2,Rt,e))}}function ai(t,l){t&1&&(S(0),d(1,li,1,4,"ng-template",null,4,k),C())}function si(t,l){if(t&1){let e=V();f(0,"p-scroller",23,1),x("onScroll",function(i){u(e);let o=s(2);return g(o.onScroll.emit(i))})("onScrollIndexChange",function(i){u(e);let o=s(2);return g(o.onScrollIndexChange.emit(i))})("onLazyLoad",function(i){u(e);let o=s(2);return g(o.onLazyLoad.emit(i))}),d(2,oi,1,1,"ng-template",null,2,k)(4,ai,3,0,"ng-container",10),m()}if(t&2){let e=s(2);ie(D(9,Ge,e.scrollHeight!=="flex"?e.scrollHeight:void 0)),a("items",e.serializedValue)("tabindex",-1)("scrollHeight",e.scrollHeight!=="flex"?void 0:"100%")("itemSize",e.virtualScrollItemSize||e._virtualNodeHeight)("lazy",e.lazy)("options",e.virtualScrollOptions),c(4),a("ngIf",e.loaderTemplate||e._loaderTemplate)}}function ci(t,l){if(t&1&&w(0,"p-treeNode",32),t&2){let e=l.$implicit,n=l.first,i=l.last,o=l.index,r=s(4);a("node",e)("firstChild",n)("lastChild",i)("index",o)("level",0)("loadingMode",r.loadingMode)}}function di(t,l){if(t&1&&(f(0,"ul",30),d(1,ci,1,6,"p-treeNode",31),m()),t&2){let e=s(3);N("aria-label",e.ariaLabel)("aria-labelledby",e.ariaLabelledBy),c(),a("ngForOf",e.getRootNode())("ngForTrackBy",e.trackBy.bind(e))}}function pi(t,l){if(t&1&&(S(0),f(1,"div",28,5),d(3,di,2,4,"ul",29),m(),C()),t&2){let e=s(2);c(),te("max-height",e.scrollHeight),c(2),a("ngIf",e.getRootNode())}}function ui(t,l){if(t&1&&(S(0),d(1,si,5,11,"p-scroller",22)(2,pi,4,3,"ng-container",10),C()),t&2){let e=s();c(),a("ngIf",e.virtualScroll),c(),a("ngIf",!e.virtualScroll)}}function gi(t,l){if(t&1&&(S(0),A(1),C()),t&2){let e=s(2);c(),oe(" ",e.emptyMessageLabel," ")}}function _i(t,l){}function hi(t,l){t&1&&d(0,_i,0,0,"ng-template",null,6,k)}function fi(t,l){if(t&1&&(f(0,"div",33),d(1,gi,2,1,"ng-container",34)(2,hi,2,0,null,9),m()),t&2){let e=s();c(),a("ngIf",!e.emptyMessageTemplate&&!e._emptyMessageTemplate)("ngIfElse",e.emptyFilter),c(),a("ngTemplateOutlet",e.emptyMessageTemplate||e._emptyMessageTemplate)}}function mi(t,l){t&1&&I(0)}var yi=({dt:t})=>`
|
|
1
|
+
import{a as Ke}from"./chunk-FLZXCWDU.js";import{a as qe}from"./chunk-4DOELXOP.js";import{a as $e}from"./chunk-ZTEDQLOG.js";import{a as se}from"./chunk-EDGADVEY.js";import{a as Ue}from"./chunk-JTDJJORR.js";import{b as Le,c as Pe}from"./chunk-LZUGPBFD.js";import{a as ze}from"./chunk-X22YKT5B.js";import{a as X,i as ye,j as Re,l as Ae,n as Qe,p as Be,r as ce,s as He}from"./chunk-5FSMHZSY.js";import{Ba as me,Da as Me,La as le,Ma as U,Na as Oe,Oa as Fe,P as he,Q as Ee,R as Q,T as J,U as ke,Ua as ae,Z as Ve,a as Ne,e as we,j as Ie,qa as fe,ra as De,w as _e,y as L}from"./chunk-G5S5AZA7.js";import{h as q,j as K,k as j,l as W,m as G,r as Y}from"./chunk-OKCHQM5Q.js";import{Ab as H,Ac as D,Bc as $,Cb as d,Jb as N,Kb as a,Lb as te,Mc as k,Nb as ie,Ob as O,Pb as ue,Ub as f,Vb as m,Vc as y,Wb as w,Wc as z,Xb as S,Yb as C,Zb as I,_b as V,aa as Z,ba as ee,ca as de,dc as x,ec as s,gb as c,ha as B,jc as T,kc as E,lc as _,mb as xe,mc as h,oa as be,pa as u,pc as ge,qa as g,qc as A,rc as ne,sc as oe,ta as R,vc as ve,wb as P,wc as Se,xb as pe,xc as Ce,yc as re,za as b}from"./chunk-JP6RBSB3.js";import{a as F}from"./chunk-YQFG5XE2.js";var Ge=t=>({height:t}),Ye=t=>({"p-tree-node-droppoint-active":t}),ot=(t,l)=>({$implicit:t,loading:l}),rt=(t,l)=>({$implicit:t,partialSelected:l,class:"p-tree-node-checkbox"}),Je=t=>({$implicit:t});function lt(t,l){if(t&1){let e=V();f(0,"li",11),x("drop",function(i){u(e);let o=s(2);return g(o.onDropPoint(i,-1))})("dragover",function(i){u(e);let o=s(2);return g(o.onDropPointDragOver(i))})("dragenter",function(i){u(e);let o=s(2);return g(o.onDropPointDragEnter(i,-1))})("dragleave",function(i){u(e);let o=s(2);return g(o.onDropPointDragLeave(i))}),m()}if(t&2){let e=s(2);a("ngClass",D(2,Ye,e.draghoverPrev)),N("aria-hidden",!0)}}function at(t,l){t&1&&w(0,"ChevronRightIcon",13),t&2&&a("styleClass","p-tree-node-toggle-icon")}function st(t,l){t&1&&w(0,"ChevronDownIcon",13),t&2&&a("styleClass","p-tree-node-toggle-icon")}function ct(t,l){if(t&1&&(S(0),d(1,at,1,1,"ChevronRightIcon",12)(2,st,1,1,"ChevronDownIcon",12),C()),t&2){let e=s(3);c(),a("ngIf",!e.node.expanded),c(),a("ngIf",e.node.expanded)}}function dt(t,l){t&1&&(S(0),w(1,"SpinnerIcon",13),C()),t&2&&(c(),a("styleClass","pi-spin p-tree-node-toggle-icon"))}function pt(t,l){if(t&1&&(S(0),d(1,ct,3,2,"ng-container",5)(2,dt,2,1,"ng-container",5),C()),t&2){let e=s(2);c(),a("ngIf",!e.node.loading),c(),a("ngIf",e.loadingMode==="icon"&&e.node.loading)}}function ut(t,l){}function gt(t,l){t&1&&d(0,ut,0,0,"ng-template")}function _t(t,l){if(t&1&&(f(0,"span",14),d(1,gt,1,0,null,15),m()),t&2){let e=s(2);c(),a("ngTemplateOutlet",e.tree.togglerIconTemplate||e.tree._togglerIconTemplate)("ngTemplateOutletContext",$(2,ot,e.node.expanded,e.node.loading))}}function ht(t,l){}function ft(t,l){t&1&&d(0,ht,0,0,"ng-template")}function mt(t,l){if(t&1&&d(0,ft,1,0,null,15),t&2){let e=s(4);a("ngTemplateOutlet",e.tree.checkboxIconTemplate||e.tree._checkboxIconTemplate)("ngTemplateOutletContext",$(2,rt,e.isSelected(),e.node.partialSelected))}}function yt(t,l){t&1&&(S(0),d(1,mt,1,5,"ng-template",null,0,k),C())}function Tt(t,l){if(t&1){let e=V();f(0,"p-checkbox",16),x("click",function(i){return u(e),g(i.preventDefault())}),d(1,yt,3,0,"ng-container",5),m()}if(t&2){let e=s(2);a("ngModel",e.isSelected())("binary",!0)("indeterminate",e.node.partialSelected)("disabled",e.node.selectable===!1)("variant",(e.tree==null?null:e.tree.config.inputStyle())==="filled"||(e.tree==null?null:e.tree.config.inputVariant())==="filled"?"filled":"outlined")("tabindex",-1),N("data-p-partialchecked",e.node.partialSelected),c(),a("ngIf",e.tree.checkboxIconTemplate||e.tree._checkboxIconTemplate)}}function bt(t,l){if(t&1&&w(0,"span"),t&2){let e=s(2);O(e.getIcon())}}function xt(t,l){if(t&1&&(f(0,"span"),A(1),m()),t&2){let e=s(2);c(),ne(e.node.label)}}function vt(t,l){t&1&&I(0)}function St(t,l){if(t&1&&(f(0,"span"),d(1,vt,1,0,"ng-container",15),m()),t&2){let e=s(2);c(),a("ngTemplateOutlet",e.tree.getTemplateForNode(e.node))("ngTemplateOutletContext",D(2,Je,e.node))}}function Ct(t,l){if(t&1&&w(0,"p-treeNode",19),t&2){let e=l.$implicit,n=l.first,i=l.last,o=l.index,r=s(3);a("node",e)("parentNode",r.node)("firstChild",n)("lastChild",i)("index",o)("itemSize",r.itemSize)("level",r.level+1)("loadingMode",r.loadingMode)}}function Nt(t,l){if(t&1&&(f(0,"ul",17),d(1,Ct,1,8,"p-treeNode",18),m()),t&2){let e=s(2);te("display",e.node.expanded?"flex":"none"),c(),a("ngForOf",e.node.children)("ngForTrackBy",e.tree.trackBy.bind(e))}}function wt(t,l){if(t&1){let e=V();f(0,"li",11),x("drop",function(i){u(e);let o=s(2);return g(o.onDropPoint(i,1))})("dragover",function(i){u(e);let o=s(2);return g(o.onDropPointDragOver(i))})("dragenter",function(i){u(e);let o=s(2);return g(o.onDropPointDragEnter(i,1))})("dragleave",function(i){u(e);let o=s(2);return g(o.onDropPointDragLeave(i))}),m()}if(t&2){let e=s(2);a("ngClass",D(2,Ye,e.draghoverNext)),N("aria-hidden",!0)}}function It(t,l){if(t&1){let e=V();d(0,lt,1,4,"li",1),f(1,"li",2),x("keydown",function(i){u(e);let o=s();return g(o.onKeyDown(i))}),f(2,"div",3),x("click",function(i){u(e);let o=s();return g(o.onNodeClick(i))})("contextmenu",function(i){u(e);let o=s();return g(o.onNodeRightClick(i))})("dblclick",function(i){u(e);let o=s();return g(o.onNodeDblClick(i))})("touchend",function(){u(e);let i=s();return g(i.onNodeTouchEnd())})("drop",function(i){u(e);let o=s();return g(o.onDropNode(i))})("dragover",function(i){u(e);let o=s();return g(o.onDropNodeDragOver(i))})("dragenter",function(i){u(e);let o=s();return g(o.onDropNodeDragEnter(i))})("dragleave",function(i){u(e);let o=s();return g(o.onDropNodeDragLeave(i))})("dragstart",function(i){u(e);let o=s();return g(o.onDragStart(i))})("dragend",function(i){u(e);let o=s();return g(o.onDragStop(i))}),f(3,"button",4),x("click",function(i){u(e);let o=s();return g(o.toggle(i))}),d(4,pt,3,2,"ng-container",5)(5,_t,2,5,"span",6),m(),d(6,Tt,2,8,"p-checkbox",7)(7,bt,1,2,"span",8),f(8,"span",9),d(9,xt,2,1,"span",5)(10,St,2,4,"span",5),m()(),d(11,Nt,2,4,"ul",10),m(),d(12,wt,1,4,"li",1)}if(t&2){let e=s();a("ngIf",e.tree.droppableNodes),c(),ie(e.node.style),O(e.node.styleClass),a("ngClass",e.nodeClass)("ngStyle",D(29,Ge,e.itemSize+"px")),N("aria-label",e.node.label)("aria-checked",e.checked)("aria-setsize",e.node.children?e.node.children.length:0)("aria-selected",e.selected)("aria-expanded",e.node.expanded)("aria-posinset",e.index+1)("aria-level",e.level+1)("tabindex",e.index===0?0:-1)("data-id",e.node.key),c(),te("padding-left",e.level*e.indentation+"rem"),a("ngClass",e.nodeContentClass)("draggable",e.tree.draggableNodes),c(),N("data-pc-section","toggler"),c(),a("ngIf",!e.tree.togglerIconTemplate&&!e.tree._togglerIconTemplate),c(),a("ngIf",e.tree.togglerIconTemplate||e.tree._togglerIconTemplate),c(),a("ngIf",e.tree.selectionMode=="checkbox"),c(),a("ngIf",e.node.icon||e.node.expandedIcon||e.node.collapsedIcon),c(2),a("ngIf",!e.tree.getTemplateForNode(e.node)),c(),a("ngIf",e.tree.getTemplateForNode(e.node)),c(),a("ngIf",!e.tree.virtualScroll&&e.node.children&&e.node.expanded),c(),a("ngIf",e.tree.droppableNodes&&e.lastChild)}}var je=["filter"],Et=["node"],kt=["header"],Vt=["footer"],Dt=["loader"],Mt=["empty"],Ot=["togglericon"],Ft=["checkboxicon"],$t=["loadingicon"],Lt=["filtericon"],zt=["scroller"],Ut=["wrapper"],Rt=t=>({options:t});function At(t,l){if(t&1&&w(0,"i"),t&2){let e=s(2);O("p-tree-loading-icon pi-spin "+e.loadingIcon)}}function Qt(t,l){t&1&&w(0,"SpinnerIcon",16),t&2&&a("spin",!0)("styleClass","p-tree-loading-icon")}function Bt(t,l){}function Pt(t,l){t&1&&d(0,Bt,0,0,"ng-template")}function Ht(t,l){if(t&1&&(f(0,"span",17),d(1,Pt,1,0,null,9),m()),t&2){let e=s(3);c(),a("ngTemplateOutlet",e.loadingIconTemplate||e._loadingIconTemplate)}}function qt(t,l){if(t&1&&(S(0),d(1,Qt,1,2,"SpinnerIcon",14)(2,Ht,2,1,"span",15),C()),t&2){let e=s(2);c(),a("ngIf",!e.loadingIconTemplate&&!e._loadingIconTemplate),c(),a("ngIf",e.loadingIconTemplate||e._loadingIconTemplate)}}function Kt(t,l){if(t&1&&(f(0,"div",12),d(1,At,1,2,"i",13)(2,qt,3,2,"ng-container",10),m()),t&2){let e=s();c(),a("ngIf",e.loadingIcon),c(),a("ngIf",!e.loadingIcon)}}function jt(t,l){t&1&&I(0)}function Wt(t,l){t&1&&I(0)}function Gt(t,l){if(t&1&&d(0,Wt,1,0,"ng-container",18),t&2){let e=s();a("ngTemplateOutlet",e.filterTemplate||e._filterTemplate)("ngTemplateOutletContext",D(2,Je,e.filterOptions))}}function Yt(t,l){t&1&&w(0,"SearchIcon",21)}function Jt(t,l){}function Xt(t,l){t&1&&d(0,Jt,0,0,"ng-template")}function Zt(t,l){if(t&1&&(f(0,"span"),d(1,Xt,1,0,null,9),m()),t&2){let e=s(3);c(),a("ngTemplateOutlet",e.filterIconTemplate||e._filterIconTemplate)}}function ei(t,l){if(t&1){let e=V();f(0,"p-iconField")(1,"input",19,0),x("keydown.enter",function(i){return u(e),g(i.preventDefault())})("input",function(i){u(e);let o=s(2);return g(o._filter(i.target.value))}),m(),f(3,"p-inputIcon"),d(4,Yt,1,0,"SearchIcon",20)(5,Zt,2,1,"span",10),m()()}if(t&2){let e=s(2);c(),a("pAutoFocus",e.filterInputAutoFocus),N("placeholder",e.filterPlaceholder),c(3),a("ngIf",!e.filterIconTemplate&&!e._filterIconTemplate),c(),a("ngIf",e.filterIconTemplate||e._filterIconTemplate)}}function ti(t,l){if(t&1&&d(0,ei,6,4,"p-iconField",10),t&2){let e=s();a("ngIf",e.filter)}}function ii(t,l){if(t&1&&w(0,"p-treeNode",27,3),t&2){let e=l.$implicit,n=l.first,i=l.last,o=l.index,r=s(2).options,p=s(3);a("level",e.level)("rowNode",e)("node",e.node)("parentNode",e.parent)("firstChild",n)("lastChild",i)("index",p.getIndex(r,o))("itemSize",r.itemSize)("indentation",p.indentation)("loadingMode",p.loadingMode)}}function ni(t,l){if(t&1&&(f(0,"ul",25),d(1,ii,2,10,"p-treeNode",26),m()),t&2){let e=s(),n=e.$implicit,i=e.options,o=s(3);ie(i.contentStyle),a("ngClass",i.contentStyleClass),N("aria-label",o.ariaLabel)("aria-labelledby",o.ariaLabelledBy),c(),a("ngForOf",n)("ngForTrackBy",o.trackBy)}}function oi(t,l){if(t&1&&d(0,ni,2,7,"ul",24),t&2){let e=l.$implicit;a("ngIf",e)}}function ri(t,l){t&1&&I(0)}function li(t,l){if(t&1&&d(0,ri,1,0,"ng-container",18),t&2){let e=l.options,n=s(4);a("ngTemplateOutlet",n.loaderTemplate||n._loaderTemplate)("ngTemplateOutletContext",D(2,Rt,e))}}function ai(t,l){t&1&&(S(0),d(1,li,1,4,"ng-template",null,4,k),C())}function si(t,l){if(t&1){let e=V();f(0,"p-scroller",23,1),x("onScroll",function(i){u(e);let o=s(2);return g(o.onScroll.emit(i))})("onScrollIndexChange",function(i){u(e);let o=s(2);return g(o.onScrollIndexChange.emit(i))})("onLazyLoad",function(i){u(e);let o=s(2);return g(o.onLazyLoad.emit(i))}),d(2,oi,1,1,"ng-template",null,2,k)(4,ai,3,0,"ng-container",10),m()}if(t&2){let e=s(2);ie(D(9,Ge,e.scrollHeight!=="flex"?e.scrollHeight:void 0)),a("items",e.serializedValue)("tabindex",-1)("scrollHeight",e.scrollHeight!=="flex"?void 0:"100%")("itemSize",e.virtualScrollItemSize||e._virtualNodeHeight)("lazy",e.lazy)("options",e.virtualScrollOptions),c(4),a("ngIf",e.loaderTemplate||e._loaderTemplate)}}function ci(t,l){if(t&1&&w(0,"p-treeNode",32),t&2){let e=l.$implicit,n=l.first,i=l.last,o=l.index,r=s(4);a("node",e)("firstChild",n)("lastChild",i)("index",o)("level",0)("loadingMode",r.loadingMode)}}function di(t,l){if(t&1&&(f(0,"ul",30),d(1,ci,1,6,"p-treeNode",31),m()),t&2){let e=s(3);N("aria-label",e.ariaLabel)("aria-labelledby",e.ariaLabelledBy),c(),a("ngForOf",e.getRootNode())("ngForTrackBy",e.trackBy.bind(e))}}function pi(t,l){if(t&1&&(S(0),f(1,"div",28,5),d(3,di,2,4,"ul",29),m(),C()),t&2){let e=s(2);c(),te("max-height",e.scrollHeight),c(2),a("ngIf",e.getRootNode())}}function ui(t,l){if(t&1&&(S(0),d(1,si,5,11,"p-scroller",22)(2,pi,4,3,"ng-container",10),C()),t&2){let e=s();c(),a("ngIf",e.virtualScroll),c(),a("ngIf",!e.virtualScroll)}}function gi(t,l){if(t&1&&(S(0),A(1),C()),t&2){let e=s(2);c(),oe(" ",e.emptyMessageLabel," ")}}function _i(t,l){}function hi(t,l){t&1&&d(0,_i,0,0,"ng-template",null,6,k)}function fi(t,l){if(t&1&&(f(0,"div",33),d(1,gi,2,1,"ng-container",34)(2,hi,2,0,null,9),m()),t&2){let e=s();c(),a("ngIf",!e.emptyMessageTemplate&&!e._emptyMessageTemplate)("ngIfElse",e.emptyFilter),c(),a("ngTemplateOutlet",e.emptyMessageTemplate||e._emptyMessageTemplate)}}function mi(t,l){t&1&&I(0)}var yi=({dt:t})=>`
|
|
2
2
|
.p-tree {
|
|
3
3
|
background: ${t("tree.background")};
|
|
4
4
|
color: ${t("tree.color")};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as I,b as k,c as F,d as j,e as R,f as O}from"./chunk-3VJJTR55.js";import"./chunk-3NU3P6NL.js";import{a as E}from"./chunk-XKCLERWG.js";import"./chunk-ZTEDQLOG.js";import{b as T}from"./chunk-JTDJJORR.js";import"./chunk-2KERKGCG.js";import{h as w}from"./chunk-LUPSXHRX.js";import"./chunk-X22YKT5B.js";import{a as S}from"./chunk-JYCUE5HV.js";import"./chunk-JMEBBWX4.js";import"./chunk-FUZFAJGJ.js";import"./chunk-5FSMHZSY.js";import"./chunk-BHV2HCJY.js";import"./chunk-G5S5AZA7.js";import{a as P}from"./chunk-LD7LVE2B.js";import"./chunk-BLQJXMNV.js";import"./chunk-F2X3VGZZ.js";import{r as M}from"./chunk-OKCHQM5Q.js";import{Cb as h,Ga as u,Mc as C,Nb as v,Qb as m,Sb as c,Tb as s,Ub as o,Vb as r,Z as f,ba as d,ec as g,gb as n,ha as l,qc as p,rc as x,sc as y,wb as b,zc as _}from"./chunk-JP6RBSB3.js";import"./chunk-YQFG5XE2.js";var D=(()=>{class e{constructor(){this.httpService=l(P)}getUserProfile(){return this.httpService.get(void 0,"api/MyProfile")}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=d({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var A=()=>({height:"calc(100vh - 70px)"});function B(e,a){if(e&1&&(o(0,"div",10)(1,"div",11)(2,"p",12),p(3),r()()()),e&2){let t=a.$implicit;n(3),y(" ",t.roleName," ")}}function L(e,a){if(e&1&&(o(0,"div",4)(1,"div",5)(2,"div",6)(3,"span",7),p(4),r()()(),o(5,"div",8)(6,"div",9),c(7,B,4,1,"div",10,m),r()()()),e&2){let t=a.$implicit;n(4),x(t.roleGroupName),n(3),s(t.listRole)}}function $(e,a){if(e&1&&(o(0,"p-panel")(1,"p-tabs",2)(2,"p-tablist")(3,"p-tab",2),p(4,"Roles"),r()(),o(5,"p-tabpanels")(6,"p-tabpanel",2)(7,"div",3),c(8,L,9,1,"div",4,m),r()()()()()),e&2){let t,i=g();v(_(2,A)),n(8),s((t=i.roles())==null?null:t.Roles)}}var N=(()=>{class e{constructor(){this.profileService=l(D),this.roles=u(null)}ngOnInit(){this.profileService.getUserProfile().pipe(E("response"),f(t=>this.roles.set(t))).subscribe()}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=b({type:e,selectors:[["app-my-profile"]],decls:3,vars:0,consts:[["content",""],["pageTitle","My Profile"],["value","0"],["formArrayName","roles",1,"container-fluid","d-flex","flex-column","row-gap-3"],[1,"row"],[1,"col-2","border","d-flex","align-items-center","justify-content-between",2,"height","40px","background","#f6f6f6"],[1,"d-flex","justify-content-center","w-100"],[1,"text-dark","fw-semibold","fs-2"],[1,"col"],["formArrayName","roles",1,"row","h-100"],[1,"col-3","border-top","border-bottom","border-end","p-0","bg-white"],[1,"d-flex","h-100","align-items-center","gap-2","px-2"],[1,"fs-2","text-dark","m-0"]],template:function(i,G){i&1&&(o(0,"app-main-panel",1),h(1,$,10,3,"ng-template",null,0,C),r())},dependencies:[w,S,O,R,j,F,I,k,M,T],styles:["[_nghost-%COMP%]{display:block} .p-tabs .p-tab{padding-top:0!important}"],changeDetection:0})}}return e})();var le=[{path:"",redirectTo:"my-profile",pathMatch:"full"},{path:"",children:[{path:"my-profile",component:N}]}];export{le as PROFILE_ROUTES};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as y,b as C,e as F,f as M}from"./chunk-3VJJTR55.js";import{b as T}from"./chunk-YYDAQ7AW.js";import{d as L,e as S}from"./chunk-Z45NTTES.js";import{a as G}from"./chunk-LD7LVE2B.js";import{r as U}from"./chunk-OKCHQM5Q.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};
|