dealposbooks 5.33.2 → 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-WTBARN66.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-GY4LV6HX.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-2PDTOOPI.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-2WBUZJAU.js +0 -1
- package/chunk-452RR3Q5.js +0 -1
- package/chunk-4BWEZFB4.js +0 -1
- package/chunk-4W2QF5R5.js +0 -130
- package/chunk-5R5OXGVI.js +0 -1
- package/chunk-62S343UQ.js +0 -1
- package/chunk-6ACYDH2N.js +0 -1
- package/chunk-7MHKOL2S.js +0 -129
- package/chunk-AGLKA7OG.js +0 -1
- package/chunk-AWXT2WGR.js +0 -180
- package/chunk-B63BKC6F.js +0 -2
- package/chunk-GQWMJTTS.js +0 -1
- package/chunk-GYKMLBSE.js +0 -1
- package/chunk-HD2SASNC.js +0 -1
- package/chunk-HNPBGZU4.js +0 -1
- package/chunk-JMFWGTOZ.js +0 -1
- package/chunk-JT7FHN7T.js +0 -1
- package/chunk-LMNTEWLI.js +0 -1
- package/chunk-LRQ6Z4ZX.js +0 -1
- package/chunk-MNFWDRDS.js +0 -1
- package/chunk-N7OV4C3V.js +0 -1
- package/chunk-NI56PZU2.js +0 -1
- package/chunk-OD62LD7H.js +0 -160
- package/chunk-OLUQUWUK.js +0 -1
- package/chunk-P37DL4A6.js +0 -1
- package/chunk-PBN5IYNX.js +0 -1
- package/chunk-PDFK6YU3.js +0 -1
- package/chunk-Q25US4N2.js +0 -1
- package/chunk-QAQ2CXF3.js +0 -202
- package/chunk-RPZIOMLU.js +0 -1
- package/chunk-RVEUNKOZ.js +0 -1
- package/chunk-SHEVSJ34.js +0 -1
- package/chunk-U2WKXQQF.js +0 -1
- package/chunk-UEWFM35O.js +0 -1
- package/chunk-VAXEGESW.js +0 -1
- package/chunk-VXM4FDHN.js +0 -7
- package/chunk-Y6H6VNCN.js +0 -1
- package/chunk-ZGXJEG37.js +0 -1
- package/chunk-ZXCNQW44.js +0 -1
- package/main-GHHA6Y2C.js +0 -1
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import{a as we,b as Te}from"./chunk-AACWH3EJ.js";import{a as jt,b as De}from"./chunk-RHOQDE75.js";import{a as je}from"./chunk-DQQ6JL6H.js";import{b as $e,c as Xe,d as Pt}from"./chunk-5XDCBC5Q.js";import{a as xe,b as he}from"./chunk-YYVQS5LF.js";import"./chunk-FLZXCWDU.js";import{b as Ye}from"./chunk-Q23KXB3T.js";import"./chunk-DHW7UHFT.js";import{a as be}from"./chunk-BY6QUHQI.js";import"./chunk-C2GO6SPF.js";import{a as N,b as H}from"./chunk-O4QM64EH.js";import{a as Ke,b as Ue,d as fe,k as ge}from"./chunk-SVXDMOLP.js";import{a as ue,b as _e}from"./chunk-S6X7PJAB.js";import"./chunk-LWLJZPBI.js";import"./chunk-3NU3P6NL.js";import{a as Gt}from"./chunk-Z2QDMAKC.js";import{a as Me}from"./chunk-XKCLERWG.js";import{b as ve}from"./chunk-H57SDRPH.js";import"./chunk-GDX5XEV3.js";import{a as Ot,b as Ee}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{d as He}from"./chunk-LZUGPBFD.js";import"./chunk-2KERKGCG.js";import{b as de}from"./chunk-4CDAAU6Z.js";import{f as ze,h as ce}from"./chunk-LUPSXHRX.js";import"./chunk-X22YKT5B.js";import{a as qe,b as le}from"./chunk-JYCUE5HV.js";import{a as F,b as ae,c as Ie,d as pe,e as me,f as se,g as We}from"./chunk-JMEBBWX4.js";import"./chunk-FUZFAJGJ.js";import{w as oe,x as re}from"./chunk-5FSMHZSY.js";import"./chunk-BHV2HCJY.js";import{e as J,f as Z,g as At,i as T,k as ee,l as te,o as ie,u as Ne,x as ne}from"./chunk-G5S5AZA7.js";import{b as Vt,e as X,l as Q}from"./chunk-Z45NTTES.js";import{a as Bt}from"./chunk-LD7LVE2B.js";import{a as kt}from"./chunk-BLQJXMNV.js";import"./chunk-F2X3VGZZ.js";import{k as U,p as Pe,q as Y,r as $,x as Lt,y as Mt}from"./chunk-OKCHQM5Q.js";import{Ab as Ae,Ac as R,Bc as Rt,Cb as x,D as ye,Ga as B,Jc as C,Kb as s,Kc as y,L as It,Lc as Ge,Mc as d,Pb as P,Qb as Re,Sb as Fe,Tb as Le,Ub as n,V as Et,Vb as i,W as Dt,Wb as E,X as O,Yc as V,Z as G,Zc as Ft,_b as D,ba as wt,bb as ke,c as A,cb as Be,dc as I,ec as c,gb as a,ha as b,hc as Oe,mb as W,pa as h,qa as S,qc as r,rc as _,s as bt,sc as w,ta as Ve,vc as q,wb as M,wc as j,xc as z,yb as Tt,yc as K,zc as L}from"./chunk-JP6RBSB3.js";import{a as g,b as v,c as it,e as vt}from"./chunk-YQFG5XE2.js";var k=(()=>{class t{constructor(){this.httpService=b(Bt),this.authService=b(je)}fetchGeneralLedgerLoader(){return this.httpService.get(void 0,"api/GeneralLedgerLoader/GetFilter")}fetchGeneralLedgerReport(e,o="single"){return this.httpService.post(void 0,`api/GeneralLedger/${o==="single"?"GetSingle":"Get"}`,e)}exportGeneralLedger(e,o={}){let l=g({responseType:"blob"},o);return this.httpService.post(void 0,"/api/GeneralLedgerExport/GetGeneralLedgerExport",e,l)}getCustomerSuggestions(e){let o={Prefix:e,Count:100};return this.httpService.get(this.authService.getTenantExternalURL(),"/API/AC/GetCustomerSuggestion",{params:o})}getSupplierSuggestions(e){let o={Prefix:e,Count:100};return this.httpService.get(this.authService.getTenantExternalURL(),"/API/AC/GetSupplierSuggestion",{params:o})}getCashierSuggestions(e){let o={Prefix:e,Count:100};return this.httpService.get(this.authService.getTenantExternalURL(),"/api/ac/GetUserSuggestion",{params:o})}getBalanceSheetLoader(){return this.httpService.get(void 0,"/api/BalanceSheetLoader/GetBalanceSheet")}getBalanceSheet(e,o={}){let l=new Mt({fromObject:Object.fromEntries(Object.entries(e).map(([u,Ce])=>[u,String(Ce)]))}),m=new Lt({"X-Timeout":"50000","X-Retry":"3","X-Retry-Delay":"2000","X-Exponential-Backoff":"true","X-Retry-On-500":"true","X-Retry-On-500-Message":"timeout expired"}),f=g({params:l,headers:m},o);return this.httpService.get(void 0,"/api/BalanceSheet",f)}getIncomeStatementLoader(){return this.httpService.get(void 0,"api/IncomeStatementLoader/Filter")}getIncomeStatement(e,o={}){return this.httpService.post(void 0,"api/IncomeStatement/List",g({},e),o)}static{this.\u0275fac=function(o){return new(o||t)}}static{this.\u0275prov=wt({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var Zt={metadata:{filter:{listAccountID:[],from:null,to:null,listOutletID:[],listCategoryID:[],contactType:0,contactID:"",accountID:"",sortAscending:!1},options:{accounts:[],outlets:[],contactTypeOptions:[]},roles:{isInEmptyOutletRole:!1}},items:null,filter:{accountID:"",listAccountID:[],from:null,to:null,listOutletID:[],listCategoryID:[],contactType:1,contactID:null,sortAscending:!1}},nt=ae(se(Zt),We("General Ledger Store"),me(t=>{let p=b(k),e={updateFilter:o=>{F(t,l=>v(g({},l),{filter:o}))},loadList:N(A(ye(o=>o.accountID.length>0),O(o=>p.fetchGeneralLedgerReport(o).pipe(H({next:l=>{F(t,m=>v(g({},m),{items:l}))},error:l=>{console.error(l)}}))))),loadLoader:N(A(O(()=>p.fetchGeneralLedgerLoader().pipe(H({next:o=>{F(t,l=>v(g({},l),{metadata:o,filter:v(g({},l.filter),{listCategoryID:o.filter.listCategoryID})})),e.loadList(t.filter)},error:o=>{console.error(o)}})))))};return e}),pe({onInit:t=>{t.loadLoader()}}));var Ze=(()=>{class t{constructor(e,o,l,m,f,u,Ce,et){this.reportService=e,this.coaService=o,this.authService=l,this.roleService=m,this.dayjsService=f,this.fb=u,this.toastr=Ce,this.route=et,this.dialogFilterVisible=B(!1),this.initDialogVisible=B(!0),this.categoriesOptions=B([]),this.customerSuggestions=B([]),this.supplierSuggestions=B([])}ngOnInit(){this.generateFilterForm(),this.listenQueryParams(),this.clearContactValueOnContactTypeChange(),this.handleFormValueChanges()}listenQueryParams(){this.route.queryParamMap.pipe(bt(e=>({id:e.get("id"),to:e.get("to")})),G(({id:e,to:o})=>{(e||o)&&(this.initDialogVisible.update(l=>!l),this.ledgerAccountType==="single"?(this.generalLedgerFilterForm.patchValue({accountID:e??null,from:null,to:o?this.dayjsService.from(o)?.toDate():this.dayjsService.now.toDate()}),this.store.updateFilter(v(g({},this.store.filter()),{accountID:e??null,from:null,to:o?this.dayjsService.format(o):this.dayjsService.format(this.dayjsService.now.toDate())}))):(this.generalLedgerFilterForm.patchValue({listAccountID:e?[e]:[],from:null,to:o?this.dayjsService.from(o)?.toDate():this.dayjsService.now.toDate()}),this.store.updateFilter(v(g({},this.store.filter()),{listAccountID:e?[e]:[],from:null,to:o?this.dayjsService.format(o):this.dayjsService.format(this.dayjsService.now.toDate())}))))})).subscribe()}clearContactValueOnContactTypeChange(){this.generalLedgerFilterForm.get("contactType")?.valueChanges.subscribe(()=>this.generalLedgerFilterForm.get("contactID")?.setValue(""))}handleFormValueChanges(){this.generalLedgerFilterForm.valueChanges.pipe(It(500),G(e=>{Array.isArray(e.listAccountID)&&e.listAccountID.length>0?this.generalLedgerFilterForm.controls.listCategoryID.disable():this.generalLedgerFilterForm.controls.listCategoryID.enable(),e.listCategoryID?.some(o=>o.key)?this.generalLedgerFilterForm.controls.listAccountID.disable():this.generalLedgerFilterForm.controls.listAccountID.enable()})).subscribe()}onCategoryFocus(){this.coaService.getCachedCategoriesOptions().pipe(G(e=>this.categoriesOptions.set(e))).subscribe()}onFilterOKEvent(){let f=this.generalLedgerFilterForm.value,{from:e,to:o}=f,l=it(f,["from","to"]);if(this.generalLedgerFilterForm.invalid){this.generalLedgerFilterForm.markAllAsTouched(),this.dialogFilterVisible.set(!0);return}let m={sortAscending:l.sortAscending,accountID:l.accountID,listCategoryID:l.listCategoryID?.map(u=>u.key)??[],contactID:l.contactID?.length===0?null:l.contactID,listOutletID:l.listOutletID??[],listAccountID:l.listAccountID??[],from:this.dayjsService.from(e)?this.dayjsService.format(e):null,to:this.dayjsService.from(o)?this.dayjsService.format(o):null,contactType:l.contactType};this.dialogFilterVisible.update(u=>!u),this.store.updateFilter(m),this.dialogFilterVisible.set(!1)}onExport(){let f=this.generalLedgerFilterForm.value,{from:e,to:o}=f,l=it(f,["from","to"]),m={sortAscending:l.sortAscending,accountID:this.ledgerAccountType==="single"?l.accountID:null,listCategoryID:l.listCategoryID?.map(u=>u.key)??[],contactID:l.contactID?.length===0?null:l.contactID,listOutletID:l.listOutletID??[],listAccountID:l.listAccountID??[],from:this.dayjsService.from(e)?this.dayjsService.format(e):null,to:this.dayjsService.from(o)?this.dayjsService.format(o):null,contactType:l.contactType};this.reportService.exportGeneralLedger(m,{responseType:"blob",observe:"response"}).pipe(G(u=>{let Ce=u.headers;console.log("All headers:",Ce.keys());let et=Ce.get("Content-Disposition"),Qt=Ce.get("content-disposition"),St=et??Qt,Ct="download.csv";if(St){let tt=St.match(/filename\*?=(?:UTF-8'')?"?([^;\r\n"]+)/i);tt&&tt[1]&&(Ct=decodeURIComponent(tt[1].replace(/"/g,"")))}let yt=u.body;Pt(yt,Ct,yt.type)})).subscribe()}searchCustomer(e){this.reportService.getCustomerSuggestions(e.query).pipe(G(o=>this.customerSuggestions.set(o))).subscribe()}searchSupplier(e){this.reportService.getSupplierSuggestions(e.query).pipe(G(o=>this.supplierSuggestions.set(o))).subscribe()}onAccountChange(e){Array.isArray(e.value)&&e.value.length>=this.selectionLimit&&this.toastr.warning(`Please select at least ${this.selectionLimit} accounts for the general ledger report.`,"Warning")}static{this.\u0275fac=function(o){return new(o||t)(W(k),W(Gt),W(je),W(be),W(De),W(Ne),W(kt),W(Vt))}}static{this.\u0275dir=Tt({type:t})}}return t})();var ii=t=>["/pages/journal/journal-entry/",t],ni=()=>({scrollHeight:"250px"});function oi(t,p){if(t&1){let e=D();n(0,"p-button",13),I("onClick",function(){h(e);let l=c(2);return S(l.onExport())}),i()}}function ri(t,p){if(t&1&&(n(0,"div",10)(1,"a",11),r(2,"Return to Accounts"),i(),x(3,oi,1,0,"p-button",12),i()),t&2){let e=c();a(3),s("ngIf",e.roleService.global.export)}}function li(t,p){t&1&&(n(0,"tr")(1,"th",17),r(2,"Outlet"),i(),n(3,"th",17),r(4,"No."),i(),n(5,"th",17),r(6,"Date"),i(),n(7,"th"),r(8,"Contact / Note"),i(),n(9,"th",18),r(10,"Debit"),i(),n(11,"th",19),r(12,"Credit"),i(),n(13,"th",19),r(14,"Balance"),i()())}function ai(t,p){if(t&1&&(n(0,"tr")(1,"td",20),r(2),i(),n(3,"td",20)(4,"a",21),r(5),i()(),n(6,"td",20),r(7),C(8,"date"),i(),n(9,"td",20)(10,"div",22)(11,"a",23),r(12),i(),E(13,"div",24),i()(),n(14,"td",25),r(15),C(16,"number"),i(),n(17,"td",25),r(18),C(19,"number"),i(),n(20,"td",25),r(21),C(22,"number"),i()()),t&2){let e=p.$implicit,o=c(3);a(2),_(e.outletName),a(2),s("routerLink",R(19,ii,e.id)),a(),_(e.number),a(2),_(Ge(8,10,e.date,"dd MMM yyyy")),a(4),s("href",o.authService.getTenantExternalURL()+"/menu/Contacts/Contact/Customers/Info?ID="+e.contactID,Be),a(),_(e.contactName),a(),s("innerHTML",e.journalNote,ke),a(2),w(" ",y(16,13,e.debitAmount)," "),a(3),w(" ",y(19,15,e.creditAmount)," "),a(3),_(y(22,17,e.balance))}}function pi(t,p){if(t&1&&(n(0,"tr"),E(1,"td",26),n(2,"td",27),r(3,"Total"),i(),n(4,"td",27),r(5),C(6,"number"),i(),n(7,"td",27),r(8),C(9,"number"),i(),E(10,"td"),i()),t&2){let e=c(3);a(5),w(" ",y(6,2,e.store.items().data.debitTotal)," "),a(3),w(" ",y(9,4,e.store.items().data.creditTotal)," ")}}function mi(t,p){t&1&&(n(0,"tr")(1,"td",28)(2,"span"),r(3,"No records found."),i()()())}function si(t,p){if(t&1&&(n(0,"div",15)(1,"p-table",16),x(2,li,15,0,"ng-template",null,3,d)(4,ai,23,21,"ng-template",null,4,d)(6,pi,11,6,"ng-template",null,5,d)(8,mi,4,0,"ng-template",null,6,d),i()()),t&2){let e=c(2);a(),s("value",e.store.items().data.data)}}function ci(t,p){if(t&1&&x(0,si,10,1,"div",14),t&2){let e=c();s("ngIf",e.store.items()&&e.store.items().data)}}function di(t,p){if(t&1&&(n(0,"div",10)(1,"div",46)(2,"span",47),r(3),i()(),n(4,"div")(5,"span"),r(6,"-"),i()(),n(7,"div",46)(8,"span",48),r(9),i()()()),t&2){let e=p.$implicit;a(3),w("(",e.code,")"),a(6),_(e.name)}}function ui(t,p){if(t&1&&(n(0,"div",10)(1,"div",46)(2,"span",47),r(3),i()(),n(4,"div")(5,"span"),r(6,"-"),i()(),n(7,"div",46)(8,"span",48),r(9),i()()()),t&2){let e=p.$implicit;a(3),w("(",e.code,")"),a(6),_(e.name)}}function _i(t,p){if(t&1&&(n(0,"div",49)(1,"div"),r(2),i()()),t&2){let e=p.$implicit;a(2),_(e.value)}}function fi(t,p){if(t&1&&(n(0,"div",39)(1,"div",40),E(2,"p-radiobutton",50),n(3,"label",51),r(4),i()()()),t&2){let e=p.$implicit;a(2),s("value",e.key)("inputId",e.key),a(),Oe("for",e.key),a(),_(e.value)}}function gi(t,p){if(t&1){let e=D();n(0,"div",22)(1,"label",30),r(2,"Customer"),i(),n(3,"p-autocomplete",52),I("completeMethod",function(l){h(e);let m=c(2);return S(m.searchCustomer(l))}),i()()}if(t&2){let e=c(2);a(3),s("suggestions",e.customerSuggestions())}}function xi(t,p){if(t&1){let e=D();n(0,"div",22)(1,"label",30),r(2,"Supplier"),i(),n(3,"p-autocomplete",53),I("completeMethod",function(l){h(e);let m=c(2);return S(m.searchSupplier(l))}),i()()}if(t&2){let e=c(2);a(3),s("suggestions",e.supplierSuggestions())}}function hi(t,p){if(t&1){let e=D();n(0,"div",22)(1,"label",30),r(2,"Customer"),i(),n(3,"p-autocomplete",52),I("completeMethod",function(l){h(e);let m=c(2);return S(m.searchCustomer(l))}),i()()}if(t&2){let e=c(2);a(3),s("suggestions",e.customerSuggestions())}}function Si(t,p){if(t&1){let e=D();n(0,"form",29)(1,"div",22)(2,"label",30),r(3,"Accounts"),i(),n(4,"p-select",31),x(5,di,10,2,"ng-template",null,7,d)(7,ui,10,2,"ng-template",null,8,d),i()(),n(9,"div",22)(10,"label",30),r(11,"From - To"),i(),n(12,"div",32),E(13,"p-datepicker",33)(14,"p-datepicker",34),i()(),n(15,"div",22)(16,"label",30),r(17,"Outlets"),i(),n(18,"p-multiselect",35),x(19,_i,3,1,"ng-template",null,8,d),i()(),n(21,"div",22)(22,"label",30),r(23,"Category"),i(),n(24,"p-treeselect",36),I("onFocus",function(){h(e);let l=c();return S(l.onCategoryFocus())}),i()(),n(25,"div",22)(26,"label",37),r(27,"Contact Type"),i(),n(28,"div",38),Fe(29,fi,5,4,"div",39,Re),i()(),n(31,"div",22)(32,"label",37),r(33,"Sort order"),i(),n(34,"div",38)(35,"div",39)(36,"div",40),E(37,"p-radiobutton",41),n(38,"label",42),r(39,"Asc"),i()()(),n(40,"div",43)(41,"div",40),E(42,"p-radiobutton",44),n(43,"label",45),r(44,"Desc"),i()()()()(),x(45,gi,4,1,"div",22)(46,xi,4,1,"div",22)(47,hi,4,1,"div",22),i()}if(t&2){let e,o=c();s("formGroup",o.generalLedgerFilterForm),a(4),s("options",o.store.metadata().options.accounts),a(9),s("iconDisplay","input")("showIcon",!0),a(),s("iconDisplay","input")("showIcon",!0),a(4),s("virtualScroll",!0)("virtualScrollItemSize",50)("options",o.store.metadata().options.outlets),a(6),s("metaKeySelection",!1)("virtualScroll",!0)("virtualScrollItemSize",50)("virtualScrollOptions",L(17,ni))("options",o.categoriesOptions()),a(5),Le(o.store.metadata().options.contactTypeOptions),a(8),s("value",!0),a(5),s("value",!1),a(3),P((e=o.generalLedgerFilterForm.controls.contactType.value)===1?45:e===2?46:47)}}var Ht=(()=>{class t extends Ze{constructor(){super(...arguments),this.selectionLimit=1,this.store=b(nt),this.ledgerAccountType="single"}onAccountChange(e){Array.isArray(e.value)&&e.value.length>=this.selectionLimit&&this.toastr.warning(`Please select at least ${this.selectionLimit} accounts for the general ledger report.`,"Warning")}get pageTitle(){return this.store.items()&&this.store.items().pageTitle?this.store.items().pageTitle:"General Ledger"}generateFilterForm(){this.generalLedgerFilterForm=this.fb.group({sortAscending:this.fb.control(!1),accountID:this.fb.control(""),listAccountID:new T([]),listCategoryID:new T([]),listOutletID:new T([]),contactID:new T(""),from:new T(null),to:new T(null),contactType:new T(1)})}static{this.\u0275fac=(()=>{let e;return function(l){return(e||(e=Ve(t)))(l||t)}})()}static{this.\u0275cmp=M({type:t,selectors:[["app-report-general-ledger"]],features:[K([nt]),Ae],decls:7,vars:5,consts:[["actionButton",""],["content",""],["filters",""],["header",""],["body",""],["footer",""],["emptymessage",""],["selectedItem",""],["item",""],[3,"isDialogFilterVisibleChange","isInitDialogFilterVisibleChange","filterConfirmed","pageTitle","isDialogFilterVisible","isFilterable","isInitDialogFilterVisible","scrollable"],[1,"d-flex","gap-2"],["routerLink","/pages/chart-of-account/account",1,"p-button","p-button-secondary","p-button-outlined","fs-3"],["severity","secondary","variant","outlined","icon","fa-solid fa-upload","label","Export",3,"onClick",4,"ngIf"],["severity","secondary","variant","outlined","icon","fa-solid fa-upload","label","Export",3,"onClick"],["class","px-3 py-3 bg-white border-top",4,"ngIf"],[1,"px-3","py-3","bg-white","border-top"],[3,"value"],[2,"width","10%"],[1,"text-end",2,"width","10%"],[1,"text-end",2,"width","20%"],[1,"text-break"],["target","_blank",1,"link","link-primary",3,"routerLink"],[1,"d-flex","flex-column"],["target","_blank",1,"link","link-primary",3,"href"],[3,"innerHTML"],[1,"text-end","text-break"],["colspan","3"],[1,"text-end","fw-semibold"],["colspan","8"],[1,"d-flex","flex-column","row-gap-3",3,"formGroup"],["for","outlet"],["dataKey","id","showClear","","filter","","filterBy","code,name","formControlName","accountID","appendTo","body","optionLabel","name","optionValue","id","placeholder","Select Accounts",3,"options"],[1,"d-flex","flex-column","gap-2"],["formControlName","from","styleClass","w-100 mb-0","appendTo","body","inputId","icondisplay",3,"iconDisplay","showIcon"],["formControlName","to","styleClass","w-100","appendTo","body","inputId","icondisplay",3,"iconDisplay","showIcon"],["showClear","","display","chip","formControlName","listOutletID","appendTo","body","optionLabel","value","optionValue","key","placeholder","Select Outlets",3,"virtualScroll","virtualScrollItemSize","options"],["showClear","","display","chip","selectionMode","multiple","filter","","filterBy","label","formControlName","listCategoryID","appendTo","body","containerStyleClass","w-100","optionLabel","label","optionValue","id","placeholder","Select Category",3,"onFocus","metaKeySelection","virtualScroll","virtualScrollItemSize","virtualScrollOptions","options"],["for",""],[1,"row"],[1,"col-4"],[1,"d-flex","align-items-center","gap-2"],["name","sortAscending","formControlName","sortAscending","inputId","asc",3,"value"],["for","asc",1,"m-0"],[1,"col-3"],["name","sortAscending","formControlName","sortAscending","inputId","desc",3,"value"],["for","desc",1,"m-0"],[1,""],[1,"h-full","align-middle"],[1,"text-truncate","d-inline-block","h-full","align-middle"],[1,"flex","items-center","gap-2"],["name","contactType","formControlName","contactType",3,"value","inputId"],[1,"m-0",3,"for"],["formControlName","contactID","appendTo","body","styleClass","w-100","optionLabel","Value","optionValue","Key","inputStyleClass","w-100",3,"completeMethod","suggestions"],["formControlName","ContactID","appendTo","body","styleClass","w-100","optionLabel","Value","optionValue","Key","inputStyleClass","w-100",3,"completeMethod","suggestions"]],template:function(o,l){if(o&1){let m=D();n(0,"app-main-panel",9),z("isDialogFilterVisibleChange",function(u){return h(m),j(l.dialogFilterVisible,u)||(l.dialogFilterVisible=u),S(u)})("isInitDialogFilterVisibleChange",function(u){return h(m),j(l.initDialogVisible,u)||(l.initDialogVisible=u),S(u)}),I("filterConfirmed",function(){return h(m),S(l.onFilterOKEvent())}),x(1,ri,4,1,"ng-template",null,0,d)(3,ci,1,1,"ng-template",null,1,d)(5,Si,48,18,"ng-template",null,2,d),i()}o&2&&(s("pageTitle",l.pageTitle),q("isDialogFilterVisible",l.dialogFilterVisible),s("isFilterable",!0),q("isInitDialogFilterVisible",l.initDialogVisible),s("scrollable",!0))},dependencies:[ce,$,U,Y,Pe,de,ge,fe,ze,re,oe,Ee,Ot,_e,ue,Te,we,ne,ee,J,Z,te,ie,he,xe,ve,He,Xe,$e,Ye,le,Q,X,Ue,Ke],styles:["[_nghost-%COMP%] .p-datatable .p-datatable-header{padding:.75rem 1rem .75rem 0}"],changeDetection:0})}}return t})();var Ci={data:{},filter:{EntityID:[],CashierID:null,Text:null,from:null,to:null},isLoading:!0,loader:{options:{outlets:[]},filter:{from:"",to:"",outletID:[]},roles:{isInRoleEmptyOutlet:!1}}},mt=ae(se(Ci),Ie(t=>{let p={totalCOGS:V(()=>{let e=t.data()?.data?.cogs;return Array.isArray(e)?e.reduce((o,l)=>o+(l?.amount??0),0):0}),totalRevenue:V(()=>{let e=t.data()?.data?.revenue;return Array.isArray(e)?e.reduce((o,l)=>o+(l?.amount??0),0):0}),totalExpense:V(()=>{let e=t.data()?.data?.expense;return Array.isArray(e)?e.reduce((o,l)=>o+(l?.amount??0),0):0}),grossProfit:V(()=>Array.isArray(t.data()?.data?.cogs)&&Array.isArray(t.data()?.data?.revenue)?p.totalRevenue()-p.totalCOGS():0),profitOrLoss:V(()=>p.totalRevenue()-p.totalCOGS()-p.totalExpense()),isDataEmpty:V(()=>Object.keys(t.data()?.data??{}).length===0)};return p}),me(t=>{let p=b(k),e=b(De),o={updateFilter(l){F(t,m=>v(g({},m),{filter:g(g({},m.filter),l)}))},getLoader:N(A(O(()=>p.getIncomeStatementLoader().pipe(H({next:l=>{F(t,m=>v(g({},m),{loader:l,filter:v(g({},m.filter),{from:e.from(l.filter.from).format(),to:e.from(l.filter.to).format()})})),o.getIncomeStatement(t.filter)},error:l=>{console.error(l)}}))))),getIncomeStatement:N(A(O(l=>p.getIncomeStatement(l).pipe(Dt(()=>F(t,m=>v(g({},m),{isLoading:!0}))),H({next:m=>{F(t,f=>v(g({},f),{data:m,isLoading:!1}))},error:m=>{console.error(m)}})))))};return o}),pe({onInit:t=>{t.getLoader()}}));var st=()=>({}),ct=t=>["/pages/chart-of-account/account/",t],dt=()=>["/pages/report/general-ledger"],ut=t=>({id:t});function vi(t,p){if(t&1){let e=D();n(0,"p-button",10),I("onClick",function(){h(e);let l=c(2);return S(l.onExport())}),i()}}function bi(t,p){if(t&1&&(n(0,"div",8),x(1,vi,1,0,"p-button",9),i()),t&2){let e=c();a(),s("ngIf",e.roleService.global.export)}}function Ii(t,p){t&1&&(n(0,"tr")(1,"th",14),r(2,"Code"),i(),n(3,"th",15),r(4,"Name"),i(),n(5,"th",16),r(6,"Total"),i()())}function Ei(t,p){if(t&1&&(n(0,"tr")(1,"td"),r(2),i(),n(3,"td")(4,"a",17),r(5),i()(),n(6,"td",16)(7,"a",18),r(8),C(9,"number"),i()()()),t&2){let e=p.$implicit;a(2),_(e.code),a(2),s("routerLink",R(8,ct,e.accountID)),a(),_(e.name),a(2),s("routerLink",L(10,dt))("queryParams",R(11,ut,e.accountID)),a(),_(y(9,6,e.amount))}}function Di(t,p){if(t&1&&(n(0,"tr")(1,"td",19)(2,"div",20)(3,"span",21),r(4,"Total Revenue :"),i(),n(5,"span",22),r(6),C(7,"number"),i()()()()),t&2){let e=c(3);a(6),_(y(7,1,e.store.totalRevenue()))}}function wi(t,p){t&1&&(n(0,"tr")(1,"td",23)(2,"span"),r(3,"No revenue records available"),i()()())}function Ti(t,p){if(t&1&&(n(0,"h6",12),r(1,"Revenue"),i(),n(2,"p-table",13),x(3,Ii,7,0,"ng-template",null,3,d)(5,Ei,10,13,"ng-template",null,4,d)(7,Di,8,3,"ng-template",null,5,d)(9,wi,4,0,"ng-template",null,6,d),i()),t&2){let e,o=c(2);a(2),s("value",(e=o.store.data())==null||e.data==null?null:e.data.revenue)}}function Ri(t,p){t&1&&(n(0,"tr")(1,"th",14),r(2,"Code"),i(),n(3,"th",15),r(4,"Name"),i(),n(5,"th",24),r(6,"Total"),i()())}function Fi(t,p){if(t&1&&(n(0,"tr")(1,"td"),r(2),i(),n(3,"td")(4,"a",17),r(5),i()(),n(6,"td",16)(7,"a",18),r(8),C(9,"number"),i()()()),t&2){let e=p.$implicit;a(2),_(e.code),a(2),s("routerLink",R(8,ct,e.accountID)),a(),_(e.name),a(2),s("routerLink",L(10,dt))("queryParams",R(11,ut,e.AccountID)),a(),_(y(9,6,e.amount))}}function Li(t,p){if(t&1&&(n(0,"tr")(1,"td",19)(2,"div",20)(3,"span",21),r(4,"Total COGS :"),i(),n(5,"span",22),r(6),C(7,"number"),i()()()(),n(8,"tr")(9,"td",19)(10,"div",20)(11,"span",21),r(12,"Gross Profit :"),i(),n(13,"span",22),r(14),C(15,"number"),i()()()()),t&2){let e=c(3);a(6),_(y(7,2,e.store.totalCOGS())),a(8),_(y(15,4,e.store.grossProfit()))}}function Mi(t,p){t&1&&(n(0,"tr")(1,"td",23)(2,"span"),r(3,"No COGS records available"),i()()())}function Vi(t,p){if(t&1&&(n(0,"h4",12),r(1,"COGS"),i(),n(2,"p-table",13),x(3,Ri,7,0,"ng-template",null,3,d)(5,Fi,10,13,"ng-template",null,4,d)(7,Li,16,6,"ng-template",null,5,d)(9,Mi,4,0,"ng-template",null,6,d),i()),t&2){let e,o=c(2);a(2),s("value",(e=o.store.data())==null||e.data==null?null:e.data.cogs)}}function ki(t,p){t&1&&(n(0,"tr")(1,"th",14),r(2,"Code"),i(),n(3,"th",15),r(4,"Name"),i(),n(5,"th",16),r(6,"Total"),i()())}function Bi(t,p){if(t&1&&(n(0,"tr")(1,"td"),r(2),i(),n(3,"td")(4,"a",17),r(5),i()(),n(6,"td",16)(7,"a",18),r(8),C(9,"number"),i()()()),t&2){let e=p.$implicit;a(2),_(e.code),a(2),s("routerLink",R(8,ct,e.accountID)),a(),_(e.name),a(2),s("routerLink",L(10,dt))("queryParams",R(11,ut,e.AccountID)),a(),_(y(9,6,e.amount))}}function Ai(t,p){if(t&1&&(n(0,"tr")(1,"td",19)(2,"div",20)(3,"span",21),r(4,"Total Expense :"),i(),n(5,"span",22),r(6),C(7,"number"),i()()()(),n(8,"tr")(9,"td",19)(10,"div",20)(11,"span",21),r(12,"Profit / Loss :"),i(),n(13,"span",22),r(14),C(15,"number"),i()()()()),t&2){let e=c(3);a(6),_(y(7,2,e.store.totalExpense())),a(8),_(y(15,4,e.store.profitOrLoss()))}}function Oi(t,p){t&1&&(n(0,"tr")(1,"td",23)(2,"span"),r(3,"No expense records available"),i()()())}function Gi(t,p){if(t&1&&(n(0,"h4",12),r(1,"Expense"),i(),n(2,"p-table",13),x(3,ki,7,0,"ng-template",null,3,d)(5,Bi,10,13,"ng-template",null,4,d)(7,Ai,16,6,"ng-template",null,5,d)(9,Oi,4,0,"ng-template",null,6,d),i()),t&2){let e,o=c(2);a(2),s("value",(e=o.store.data())==null||e.data==null?null:e.data.expense)}}function Pi(t,p){if(t&1&&(n(0,"p-panel")(1,"div",11),x(2,Ti,11,1)(3,Vi,11,1)(4,Gi,11,1),i()()),t&2){let e,o,l,m=c();a(2),P(m.Object.keys((e=m.store.data().data)!==null&&e!==void 0?e:L(3,st)).length>0?2:-1),a(),P(m.Object.keys((o=(o=m.store.data().data)==null?null:o.cogs)!==null&&o!==void 0?o:L(4,st)).length>0?3:-1),a(),P(m.Object.keys((l=(l=m.store.data().data)==null?null:l.expense)!==null&&l!==void 0?l:L(5,st)).length>0?4:-1)}}function ji(t,p){if(t&1){let e=D();n(0,"form",25)(1,"div",26)(2,"label",27),r(3,"Outlet"),i(),E(4,"p-multiselect",28),i(),n(5,"div",26)(6,"label",27),r(7,"Cashier"),i(),n(8,"p-autocomplete",29),I("completeMethod",function(l){h(e);let m=c();return S(m.onCashierSearch(l))})("onSelect",function(l){h(e);let m=c();return S(m.onCashierSelect(l))}),i()(),n(9,"div",26)(10,"label",30),r(11,"From - To"),i(),n(12,"div",31),E(13,"p-datepicker",32)(14,"p-datepicker",33),i()()()}if(t&2){let e=c();s("formGroup",e.formFilter),a(4),s("virtualScroll",!0)("virtualScrollItemSize",50)("options",e.store.loader().options.outlets)("showClear",!0),a(4),s("showClear",!0)("suggestions",e.cashierSuggestions())("showClear",!0),a(5),s("iconDisplay","input")("showIcon",!0),a(),s("iconDisplay","input")("showIcon",!0)}}var qt=(()=>{class t{constructor(){this.dayjsService=b(De),this.store=b(mt),this.fb=b(Ne),this.reportService=b(k),this.roleService=b(be),this.isInitDialogFilterVisible=B(!1),this.dialogFilterVisible=B(!1),this.cashierSuggestions=B([]),this.cashierHashMap=new Map,this.Object=Object,Ft(()=>{this.store.filter()&&this.initForm()})}ngOnInit(){this.initForm(),console.log(this.cashierHashMap.entries())}onSearch(e){this.store.updateFilter(v(g({},this.store.filter()),{Text:e}))}onCashierSearch(e){this.reportService.getCashierSuggestions(e.query).pipe(Me("Cashier Suggestions"),G(o=>this.cashierSuggestions.set(o))).subscribe()}initForm(){let e=this.store.filter();console.log("initForm",this.cashierHashMap.get(e.CashierID)),this.formFilter=this.fb.group({EntityID:this.fb.control(e.EntityID??[]),CashierID:this.fb.control(this.cashierHashMap.get(e.CashierID)??""),Text:this.fb.control(e.Text??""),from:this.fb.control(e.from?this.dayjsService.from(e.from).toDate():null),to:this.fb.control(e.to?this.dayjsService.from(e.to).toDate():null)})}onFilterOK(){let e=this.formFilter.getRawValue(),o=Object.entries(e).reduce((l,[m,f])=>(m==="from"||m==="to"?f instanceof Date&&(l[m]=this.dayjsService.from(f).format()):l[m]=f||null,l),{});this.store.updateFilter(g(g({},this.store.filter()),o)),this.dialogFilterVisible.update(l=>!l),console.log("body",e)}onCashierSelect(e){console.log("Cashier selected:",e),!this.cashierHashMap.has(e.value.Key)&&(this.cashierHashMap.set(e.value.Key,e.value.Value),console.log("Cashier HashMap:",this.cashierHashMap))}onExport(){let e=v(g({},this.store.filter()),{export:!0,ExportPageNumber:1,ExportRowCount:1e4});this.reportService.getIncomeStatement(e,{responseType:"blob"}).pipe(Me("Export Profit & Loss"),G(o=>{let l=o.type,m=[o],f=document.createElement("a");f.href=window.URL.createObjectURL(new Blob(m,{type:l}));let u=`profit-and-loss.${l.split("/")[1]}`;f.setAttribute("download",u),document.body.appendChild(f),f.click(),document.body.removeChild(f)})).subscribe()}static{this.\u0275fac=function(o){return new(o||t)}}static{this.\u0275cmp=M({type:t,selectors:[["app-report-income-statement"]],features:[K([mt])],decls:7,vars:5,consts:[["actionButton",""],["content",""],["filters",""],["header",""],["body",""],["footer",""],["emptymessage",""],[3,"isDialogFilterVisibleChange","isInitDialogFilterVisibleChange","filterConfirmed","isFilterable","pageTitle","isDialogFilterVisible","isInitDialogFilterVisible","scrollable"],[1,"d-flex","gap-2"],["severity","secondary","variant","outlined","icon","fa-solid fa-upload","label","Export",3,"onClick",4,"ngIf"],["severity","secondary","variant","outlined","icon","fa-solid fa-upload","label","Export",3,"onClick"],[1,"d-flex","flex-column","gap-3"],[1,"fs-5","fw-semibold"],[3,"value"],[2,"width","20%"],[2,"width","30%"],[1,"text-end"],["target","_blank",1,"link","link-primary",3,"routerLink"],["target","_blank",1,"link","link-primary",3,"routerLink","queryParams"],["colspan","3",1,"text-end","fw-semibold"],[1,"row"],[1,"col"],[1,"col-1","col-lg-2"],["colspan","3",1,""],[1,"text-end",2,"min-width","10%"],[1,"d-flex","flex-column","gap-3",3,"formGroup"],[1,"d-flex","flex-column"],["for",""],["formControlName","EntityID","filterBy","value","appendTo","body","display","chip","optionLabel","value","optionValue","key","placeholder","Select an Outlet",3,"virtualScroll","virtualScrollItemSize","options","showClear"],["appendTo","body","formControlName","CashierID","optionLabel","Value","optionValue","Key","styleClass","w-100","inputStyleClass","w-100","field","Value","placeholder","Search a cashier",3,"completeMethod","onSelect","showClear","suggestions"],["for","outlet"],[1,"d-flex","flex-column","gap-2"],["formControlName","from","styleClass","w-100 mb-0","appendTo","body","inputId","icondisplay",3,"iconDisplay","showIcon"],["formControlName","to","styleClass","w-100","appendTo","body","inputId","icondisplay",3,"iconDisplay","showIcon"]],template:function(o,l){if(o&1){let m=D();n(0,"app-main-panel",7),z("isDialogFilterVisibleChange",function(u){return h(m),j(l.dialogFilterVisible,u)||(l.dialogFilterVisible=u),S(u)})("isInitDialogFilterVisibleChange",function(u){return h(m),j(l.isInitDialogFilterVisible,u)||(l.isInitDialogFilterVisible=u),S(u)}),I("filterConfirmed",function(){return h(m),S(l.onFilterOK())}),x(1,bi,2,1,"ng-template",null,0,d)(3,Pi,5,6,"ng-template",null,1,d)(5,ji,15,12,"ng-template",null,2,d),i()}o&2&&(s("isFilterable",!0)("pageTitle",l.store.data().pageTitle),q("isDialogFilterVisible",l.dialogFilterVisible)("isInitDialogFilterVisible",l.isInitDialogFilterVisible),s("scrollable",!0))},dependencies:[ce,$,U,Y,Ee,_e,ue,ne,ee,J,Z,te,ie,he,xe,de,ge,fe,le,qe,Q,X,Te,we,re,oe],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var _t=vt(jt());var Ni={metadata:{options:{outlets:[]},filter:{to:"",outletID:[]},roles:{isInRoleEmptyOutlet:!1}},data:{asset:[],liability:[],equity:[],pageTitle:""},filter:{date:(0,_t.default)().format("YYYY-MM-DD"),listOutletParam:[]}},ft=ae(se(Ni),Ie(t=>({totalAsset:V(()=>t.data().asset.reduce((p,e)=>p+ +e.amount,0)),totalLiability:V(()=>t.data().liability.reduce((p,e)=>p+ +e.counterAmount,0)),totalEquity:V(()=>t.data().equity.reduce((p,e)=>p+ +e.counterAmount,0))})),me(t=>{let p=b(k),e={updateFilter:o=>{F(t,l=>v(g({},l),{filter:o}))},fetchBalanceSheet:N(A(ye(()=>{let o=t.filter();return Object.entries(o).every(([l,m])=>m!=null&&m!=="")}),O(o=>p.getBalanceSheet(o).pipe(H({next:l=>{F(t,m=>v(g({},m),{data:l}))},error:l=>{console.error(l)}}))),Et(1))),fetchLoader:N(A(O(()=>p.getBalanceSheetLoader().pipe(H({next:o=>{F(t,l=>v(g({},l),{metadata:o,filter:{date:(0,_t.default)(o.filter.to).format("YYYY-MM-DD")}})),e.fetchBalanceSheet(t.filter)},error:o=>{console.error(o)}})))))};return e}),pe(t=>({onInit:()=>{t.fetchLoader()}})));var Wt=vt(jt());var gt=t=>["/pages/chart-of-account/account/",t],xt=()=>["/pages/report/general-ledger"],Hi=(t,p)=>({id:t,to:p}),zt=t=>({id:t});function qi(t,p){if(t&1){let e=D();n(0,"p-button",11),I("onClick",function(){h(e);let l=c(2);return S(l.onExport())}),i()}}function Wi(t,p){if(t&1&&(n(0,"div",9),x(1,qi,1,0,"p-button",10),i()),t&2){let e=c();a(),s("ngIf",e.roleService.global.export)}}function zi(t,p){t&1&&(n(0,"tr")(1,"th",16),r(2,"Code"),i(),n(3,"th"),r(4,"Asset"),i(),n(5,"th",17),r(6,"Total"),i()())}function Ki(t,p){if(t&1&&(n(0,"tr")(1,"td"),r(2),i(),n(3,"td")(4,"a",18),r(5),i()(),n(6,"td",19)(7,"a",20),r(8),C(9,"number"),i()()()),t&2){let e=p.$implicit,o=c(3);a(2),_(e.code),a(2),s("routerLink",R(8,gt,e.accountID)),a(),_(e.name),a(2),s("routerLink",L(10,xt))("queryParams",Rt(11,Hi,e.accountID,o.store.filter().date)),a(),_(y(9,6,e.amount))}}function Ui(t,p){if(t&1&&(n(0,"tr")(1,"td",21),r(2,"Total Asset"),i(),n(3,"td",22),r(4),C(5,"number"),i()()),t&2){let e=c(3);a(4),w(" ",y(5,1,e.store.totalAsset())," ")}}function Yi(t,p){t&1&&(n(0,"tr")(1,"td",23)(2,"span"),r(3,"No asset records found."),i()()())}function $i(t,p){if(t&1&&(n(0,"h4",14),r(1,"Asset"),i(),n(2,"p-table",15),x(3,zi,7,0,"ng-template",null,3,d)(5,Ki,10,14,"ng-template",null,4,d)(7,Ui,6,3,"ng-template",null,5,d)(9,Yi,4,0,"ng-template",null,6,d),i()),t&2){let e=c(2);a(2),s("value",e.store.data().asset)}}function Xi(t,p){t&1&&(n(0,"tr")(1,"th",16),r(2,"Code"),i(),n(3,"th"),r(4,"Liability"),i(),n(5,"th",17),r(6,"Total"),i()())}function Qi(t,p){if(t&1&&(n(0,"tr")(1,"td"),r(2),i(),n(3,"td")(4,"a",25),r(5),i()(),n(6,"td",19)(7,"a",20),r(8),C(9,"number"),i()()()),t&2){let e=p.$implicit;a(2),_(e.code),a(2),s("routerLink",R(8,gt,e.accountID)),a(),_(e.name),a(2),s("routerLink",L(10,xt))("queryParams",R(11,zt,e.accountID)),a(),_(y(9,6,e.counterAmount))}}function Ji(t,p){if(t&1&&(n(0,"tr")(1,"td",21),r(2," Total Liability "),i(),n(3,"td",22),r(4),C(5,"number"),i()()),t&2){let e=c(3);a(4),w(" ",y(5,1,e.store.totalLiability())," ")}}function Zi(t,p){t&1&&(n(0,"tr")(1,"td",23)(2,"span"),r(3,"No liability records found."),i()()())}function en(t,p){if(t&1&&(n(0,"h4",24),r(1,"Liability"),i(),n(2,"p-table",15),x(3,Xi,7,0,"ng-template",null,3,d)(5,Qi,10,13,"ng-template",null,4,d)(7,Ji,6,3,"ng-template",null,5,d)(9,Zi,4,0,"ng-template",null,6,d),i()),t&2){let e=c(2);a(2),s("value",e.store.data().liability)}}function tn(t,p){t&1&&(n(0,"tr")(1,"th",16),r(2,"Code"),i(),n(3,"th"),r(4,"Equity"),i(),n(5,"th",17),r(6,"Total"),i()())}function nn(t,p){if(t&1&&(n(0,"tr")(1,"td"),r(2),i(),n(3,"td")(4,"a",18),r(5),i()(),n(6,"td",19)(7,"a",20),r(8),C(9,"number"),i()()()),t&2){let e=p.$implicit;a(2),_(e.code),a(2),s("routerLink",R(8,gt,e.accountID)),a(),_(e.name),a(2),s("routerLink",L(10,xt))("queryParams",R(11,zt,e.accountID)),a(),_(y(9,6,e.counterAmount))}}function on(t,p){if(t&1&&(n(0,"tr")(1,"td",21),r(2,"Total Equity"),i(),n(3,"td",22),r(4),C(5,"number"),i()(),n(6,"tr")(7,"td",21),r(8," Total Liability + Equity "),i(),n(9,"td",22),r(10),C(11,"number"),i()()),t&2){let e=c(3);a(4),w(" ",y(5,2,e.store.totalEquity())," "),a(6),w(" ",y(11,4,e.store.totalLiability()+e.store.totalEquity())," ")}}function rn(t,p){t&1&&(n(0,"tr")(1,"td",23)(2,"span"),r(3,"No equity records found."),i()()())}function ln(t,p){if(t&1&&(n(0,"h4",24),r(1,"Equity"),i(),n(2,"p-table",15),x(3,tn,7,0,"ng-template",null,3,d)(5,nn,10,13,"ng-template",null,4,d),r(7," <"),x(8,on,12,6,"ng-template",null,5,d)(10,rn,4,0,"ng-template",null,6,d),i()),t&2){let e=c(2);a(2),s("value",e.store.data().equity)}}function an(t,p){if(t&1&&(n(0,"p-panel",12)(1,"div",13),x(2,$i,11,1)(3,en,11,1)(4,ln,12,1),i()()),t&2){let e=c();s("showHeader",!1),a(2),P(e.Object.keys(e.store.data().asset).length>0?2:-1),a(),P(e.Object.keys(e.store.data().liability).length>0?3:-1),a(),P(e.Object.keys(e.store.data().equity).length>0?4:-1)}}function pn(t,p){if(t&1&&(n(0,"div",31)(1,"div"),r(2),i()()),t&2){let e=p.$implicit;a(2),_(e.value)}}function mn(t,p){if(t&1&&(n(0,"form",26)(1,"div",27)(2,"label",28),r(3,"Outlet"),i(),n(4,"p-multiselect",29),x(5,pn,3,1,"ng-template",null,7,d),i()(),n(7,"div",27)(8,"label",28),r(9,"From"),i(),E(10,"p-datepicker",30),i()()),t&2){let e=c();s("formGroup",e.filterForm),a(4),s("virtualScroll",!0)("virtualScrollItemSize",50)("options",e.store.metadata().options.outlets)("showClear",!0),a(6),s("iconDisplay","input")("showIcon",!0)}}var Kt=(()=>{class t{constructor(){this.store=b(ft),this.ReportServiceStore=b(k),this.dialogFilterVisible=B(!1),this.isInitDialogFilterVisible=B(!1),this.roleService=b(be),this.Object=Object}ngOnInit(){this.generateFilterForm()}generateFilterForm(){this.filterForm=new At({date:new T(new Date),outletID:new T([])})}onFilterOKEvent(){let{date:e,outletID:o}=this.filterForm.value;this.store.updateFilter({date:(0,Wt.default)(e).format("YYYY-MM-DD"),listOutletParam:o}),this.dialogFilterVisible.update(l=>!l)}onExport(){let e=v(g({},this.store.filter()),{export:!0,ExportPageNumber:1,ExportRowCount:1e4});this.ReportServiceStore.getBalanceSheet(e,{responseType:"blob"}).pipe(Me("Export Balance Sheet"),G(o=>{let l=o.type,m=[o],f=document.createElement("a");f.href=window.URL.createObjectURL(new Blob(m,{type:l}));let u=`balance-sheet.${l.split("/")[1]}`;f.setAttribute("download",u),document.body.appendChild(f),f.click(),document.body.removeChild(f)})).subscribe()}static{this.\u0275fac=function(o){return new(o||t)}}static{this.\u0275cmp=M({type:t,selectors:[["app-report-balance-sheet"]],features:[K([ft])],decls:7,vars:5,consts:[["actionButton",""],["content",""],["filters",""],["header",""],["body",""],["footer",""],["emptymessage",""],["item",""],[3,"isDialogFilterVisibleChange","isInitDialogFilterVisibleChange","filterConfirmed","pageTitle","isFilterable","isDialogFilterVisible","isInitDialogFilterVisible","scrollable"],[1,"d-flex","gap-2"],["severity","secondary","variant","outlined","icon","fa-solid fa-upload","label","Export",3,"onClick",4,"ngIf"],["severity","secondary","variant","outlined","icon","fa-solid fa-upload","label","Export",3,"onClick"],[3,"showHeader"],[1,"d-flex","flex-column","gap-3"],[1,"fs-5","fw-semibold","mt-3"],[3,"value"],[2,"width","20%"],[1,"text-end",2,"width","5%"],["target","_blank",1,"link","link-primary",3,"routerLink"],[1,"text-end"],["target","_blank",1,"link","link-primary",3,"routerLink","queryParams"],["colspan","2",1,"fw-semibold","text-end"],[1,"text-end","fw-semibold"],["colspan","3",1,""],[1,"fs-5","fw-semibold"],["target","_blank",1,"link","link-primary","d-flex","align-items-center",3,"routerLink"],[1,"d-flex","flex-column","row-gap-3",3,"formGroup"],[1,"d-flex","flex-column"],["for","outlet"],["formControlName","outletID","display","chip","appendTo","body","optionLabel","value","optionValue","key","placeholder","Select Outlet",3,"virtualScroll","virtualScrollItemSize","options","showClear"],["formControlName","date","styleClass","w-100","appendTo","body","inputId","icondisplay",3,"iconDisplay","showIcon"],[1,"flex","items-center","gap-2"]],template:function(o,l){if(o&1){let m=D();n(0,"app-main-panel",8),z("isDialogFilterVisibleChange",function(u){return h(m),j(l.dialogFilterVisible,u)||(l.dialogFilterVisible=u),S(u)})("isInitDialogFilterVisibleChange",function(u){return h(m),j(l.isInitDialogFilterVisible,u)||(l.isInitDialogFilterVisible=u),S(u)}),I("filterConfirmed",function(){return h(m),S(l.onFilterOKEvent())}),x(1,Wi,2,1,"ng-template",null,0,d)(3,an,5,4,"ng-template",null,1,d)(5,mn,11,7,"ng-template",null,2,d),i()}o&2&&(s("pageTitle",l.store.data().pageTitle)("isFilterable",!0),q("isDialogFilterVisible",l.dialogFilterVisible)("isInitDialogFilterVisible",l.isInitDialogFilterVisible),s("scrollable",!0))},dependencies:[ce,$,U,Y,ge,fe,de,re,oe,ne,ee,J,Z,te,ie,he,xe,_e,ue,ve,le,qe,Q,X],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var Ut=(()=>{class t{static{this.\u0275fac=function(o){return new(o||t)}}static{this.\u0275cmp=M({type:t,selectors:[["app-report-comparative-balance"]],decls:3,vars:0,template:function(o,l){o&1&&(n(0,"p"),r(1,"report-comparative-balance works!"),i(),r(2,`
|
|
2
|
+
,
|
|
3
|
+
`))},styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var Yt=(()=>{class t{static{this.\u0275fac=function(o){return new(o||t)}}static{this.\u0275cmp=M({type:t,selectors:[["app-report-cash-flow"]],decls:3,vars:0,template:function(o,l){o&1&&(n(0,"p"),r(1,"report-cash-flow works!"),i(),r(2,`
|
|
4
|
+
,
|
|
5
|
+
`))},styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var $t=(()=>{class t{static{this.\u0275fac=function(o){return new(o||t)}}static{this.\u0275cmp=M({type:t,selectors:[["app-report-trial-balance"]],decls:3,vars:0,template:function(o,l){o&1&&(n(0,"p"),r(1,"report-trial-balance works!"),i(),r(2,`
|
|
6
|
+
,
|
|
7
|
+
`))},styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var sn={metadata:{filter:{sortAscending:!1,listAccountID:[],from:null,to:null,listOutletID:[],listCategoryID:[],contactType:0,contactID:""},options:{accounts:[],outlets:[],contactTypeOptions:[]},roles:{isInEmptyOutletRole:!1}},items:{data:null,pageTitle:""},filter:{sortAscending:!1,accountID:"",listAccountID:[],from:null,to:null,listOutletID:[],listCategoryID:[],contactType:1,contactID:null}},ht=ae(se(sn),We("General Ledger Store"),Ie(t=>({debitTotal:V(()=>t.items.data().reduce((p,e)=>p+e.debitTotal,0)),creditTotal:V(()=>t.items.data().reduce((p,e)=>p+e.creditTotal,0))})),me(t=>{let p=b(k),e={updateFilter:o=>{F(t,l=>v(g({},l),{filter:o}))},loadList:N(A(ye(o=>o.listAccountID.length>0),O(o=>{let l=Object.entries(o).reduce((m,[f,u])=>(f==="accountID"?m[f]=null:m[f]=u,m),{});return console.log("normalize",l),p.fetchGeneralLedgerReport(l,"multiple").pipe(H({next:m=>{F(t,f=>v(g({},f),{items:m}))},error:m=>{console.error(m)}}))}))),loadLoader:N(A(O(()=>p.fetchGeneralLedgerLoader().pipe(H({next:o=>{F(t,l=>v(g({},l),{metadata:o,filter:v(g({},l.filter),{listCategoryID:o.filter.listCategoryID})})),e.loadList(t.filter)},error:o=>{console.error(o)}})))))};return e}),pe({onInit:t=>{t.loadLoader()}}));var cn=t=>["/pages/journal/journal-entry/",t],dn=()=>({scrollHeight:"250px"});function un(t,p){if(t&1){let e=D();n(0,"p-button",14),I("onClick",function(){h(e);let l=c(2);return S(l.onExport())}),i()}}function _n(t,p){if(t&1&&(n(0,"div",11)(1,"a",12),r(2,"Return to Accounts"),i(),x(3,un,1,0,"p-button",13),i()),t&2){let e=c();a(3),s("ngIf",e.roleService.global.export)}}function fn(t,p){if(t&1&&(n(0,"div",11)(1,"span",18)(2,"h2",19),r(3),i()(),n(4,"span",18)(5,"h2",19),r(6),i()()()),t&2){let e=c().$implicit;a(3),_(e.name),a(3),w(" (",e.chartOfAccountCode,") ")}}function gn(t,p){t&1&&(n(0,"tr")(1,"th",20),r(2,"Outlet"),i(),n(3,"th",20),r(4,"No."),i(),n(5,"th",20),r(6,"Date"),i(),n(7,"th"),r(8,"Contact / Note"),i(),n(9,"th",21),r(10,"Debit"),i(),n(11,"th",22),r(12,"Credit"),i(),n(13,"th",22),r(14,"Balance"),i()())}function xn(t,p){if(t&1&&(n(0,"tr")(1,"td",23),r(2),i(),n(3,"td",23)(4,"a",24),r(5),i()(),n(6,"td",23),r(7),C(8,"date"),i(),n(9,"td",23)(10,"div",25)(11,"a",26),r(12),i(),E(13,"div",27),i()(),n(14,"td",28),r(15),C(16,"number"),i(),n(17,"td",28),r(18),C(19,"number"),i(),n(20,"td",28),r(21),C(22,"number"),i()()),t&2){let e=p.$implicit,o=c(4);a(2),_(e.outletName),a(2),s("routerLink",R(19,cn,e.id)),a(),_(e.number),a(2),_(Ge(8,10,e.date,"dd MMM yyyy")),a(4),s("href",o.authService.getTenantExternalURL()+"/menu/Contacts/Contact/Customers/Info?ID="+e.contactID,Be),a(),_(e.contactName),a(),s("innerHTML",e.journalNote,ke),a(2),w(" ",y(16,13,e.debitAmount)," "),a(3),w(" ",y(19,15,e.creditAmount)," "),a(3),_(y(22,17,e.balance))}}function hn(t,p){if(t&1&&(n(0,"tr"),E(1,"td",29),n(2,"td",30),r(3,"Total"),i(),n(4,"td",30),r(5),C(6,"number"),i(),n(7,"td",30),r(8),C(9,"number"),i(),E(10,"td"),i()),t&2){let e=c().$index,o=c(3);a(5),w(" ",y(6,2,o.store.items().data[e].debitTotal)," "),a(3),w(" ",y(9,4,o.store.items().data[e].creditTotal)," ")}}function Sn(t,p){t&1&&(n(0,"tr")(1,"td",31)(2,"span"),r(3,"No records found."),i()()())}function Cn(t,p){if(t&1&&(n(0,"p-table",17),x(1,fn,7,2,"ng-template",null,3,d)(3,gn,15,0,"ng-template",null,4,d)(5,xn,23,21,"ng-template",null,5,d)(7,hn,11,6,"ng-template",null,6,d)(9,Sn,4,0,"ng-template",null,7,d),i()),t&2){let e=p.$implicit;s("value",e.data)}}function yn(t,p){if(t&1&&(n(0,"div",16),Fe(1,Cn,11,1,"p-table",17,Re),i()),t&2){let e=c(2);a(),Le(e.store.items().data)}}function vn(t,p){if(t&1&&x(0,yn,3,0,"div",15),t&2){let e=c();s("ngIf",e.store.items()&&e.store.items().data)}}function bn(t,p){if(t&1&&(n(0,"div",11)(1,"div",18)(2,"span",49),r(3),i()(),n(4,"div")(5,"span"),r(6,"-"),i()(),n(7,"div",18)(8,"span",50),r(9),i()()()),t&2){let e=p.$implicit;a(3),w("(",e.code,")"),a(6),_(e.name)}}function In(t,p){if(t&1&&(n(0,"div",11)(1,"div",18)(2,"span",49),r(3),i()(),n(4,"div")(5,"span"),r(6,"-"),i()(),n(7,"div",18)(8,"span",50),r(9),i()()()),t&2){let e=p.$implicit;a(3),w("(",e.code,")"),a(6),_(e.name)}}function En(t,p){if(t&1&&(n(0,"div",51)(1,"div"),r(2),i()()),t&2){let e=p.$implicit;a(2),_(e.value)}}function Dn(t,p){if(t&1&&(n(0,"div",42)(1,"div",43),E(2,"p-radiobutton",52),n(3,"label",53),r(4),i()()()),t&2){let e=p.$implicit;a(2),s("value",e.key)("inputId",e.key),a(),Oe("for",e.key),a(),_(e.value)}}function wn(t,p){if(t&1){let e=D();n(0,"div",25)(1,"label",33),r(2,"Customer"),i(),n(3,"p-autocomplete",54),I("completeMethod",function(l){h(e);let m=c(2);return S(m.searchCustomer(l))}),i()()}if(t&2){let e=c(2);a(3),s("suggestions",e.customerSuggestions())}}function Tn(t,p){if(t&1){let e=D();n(0,"div",25)(1,"label",33),r(2,"Supplier"),i(),n(3,"p-autocomplete",55),I("completeMethod",function(l){h(e);let m=c(2);return S(m.searchSupplier(l))}),i()()}if(t&2){let e=c(2);a(3),s("suggestions",e.supplierSuggestions())}}function Rn(t,p){if(t&1){let e=D();n(0,"div",25)(1,"label",33),r(2,"Customer"),i(),n(3,"p-autocomplete",54),I("completeMethod",function(l){h(e);let m=c(2);return S(m.searchCustomer(l))}),i()()}if(t&2){let e=c(2);a(3),s("suggestions",e.customerSuggestions())}}function Fn(t,p){if(t&1){let e=D();n(0,"form",32)(1,"div",25)(2,"label",33),r(3,"Accounts"),i(),n(4,"p-multiselect",34),I("onChange",function(l){h(e);let m=c();return S(m.onAccountChange(l))}),x(5,bn,10,2,"ng-template",null,8,d)(7,In,10,2,"ng-template",null,9,d),i()(),n(9,"div",25)(10,"label",33),r(11,"From"),i(),n(12,"div",35),E(13,"p-datepicker",36)(14,"p-datepicker",37),i()(),n(15,"div",25)(16,"label",33),r(17,"Outlets"),i(),n(18,"p-multiselect",38),x(19,En,3,1,"ng-template",null,9,d),i()(),n(21,"div",25)(22,"label",33),r(23,"Category"),i(),n(24,"p-treeselect",39),I("onFocus",function(){h(e);let l=c();return S(l.onCategoryFocus())}),i()(),n(25,"div",25)(26,"label",40),r(27,"Contact Type"),i(),n(28,"div",41),Fe(29,Dn,5,4,"div",42,Re),i()(),n(31,"div",25)(32,"label",40),r(33,"Sort order"),i(),n(34,"div",41)(35,"div",42)(36,"div",43),E(37,"p-radiobutton",44),n(38,"label",45),r(39,"Asc"),i()()(),n(40,"div",46)(41,"div",43),E(42,"p-radiobutton",47),n(43,"label",48),r(44,"Desc"),i()()()()(),x(45,wn,4,1,"div",25)(46,Tn,4,1,"div",25)(47,Rn,4,1,"div",25),i()}if(t&2){let e,o=c();s("formGroup",o.generalLedgerFilterForm),a(4),s("virtualScroll",!0)("virtualScrollItemSize",50)("options",o.store.metadata().options.accounts)("selectionLimit",5),a(9),s("iconDisplay","input")("showIcon",!0),a(),s("iconDisplay","input")("showIcon",!0),a(4),s("virtualScroll",!0)("virtualScrollItemSize",50)("options",o.store.metadata().options.outlets),a(6),s("metaKeySelection",!1)("virtualScroll",!0)("virtualScrollItemSize",50)("virtualScrollOptions",L(20,dn))("options",o.categoriesOptions()),a(5),Le(o.store.metadata().options.contactTypeOptions),a(8),s("value",!0),a(5),s("value",!1),a(3),P((e=o.generalLedgerFilterForm.controls.contactType.value)===1?45:e===2?46:47)}}var Xt=(()=>{class t extends Ze{constructor(){super(...arguments),this.selectionLimit=5,this.store=b(ht),this.ledgerAccountType="multiple"}onAccountChange(e){Array.isArray(e.value)&&e.value.length>=this.selectionLimit&&this.toastr.warning(`Please select at least ${this.selectionLimit} accounts for the general ledger report.`,"Warning")}get pageTitle(){return this.store.items()&&this.store.items().pageTitle?this.store.items().pageTitle:"Multi Ledger"}generateFilterForm(){this.generalLedgerFilterForm=this.fb.group({sortAscending:new T(!1),accountID:this.fb.control(""),listAccountID:new T([]),listCategoryID:new T([]),listOutletID:new T([]),contactID:new T(""),from:new T(null),to:new T(null),contactType:new T(1)})}static{this.\u0275fac=(()=>{let e;return function(l){return(e||(e=Ve(t)))(l||t)}})()}static{this.\u0275cmp=M({type:t,selectors:[["app-report-multiple-ledger"]],features:[K([ht]),Ae],decls:7,vars:5,consts:[["actionButton",""],["content",""],["filters",""],["caption",""],["header",""],["body",""],["footer",""],["emptymessage",""],["selectedItem",""],["item",""],[3,"isDialogFilterVisibleChange","isInitDialogFilterVisibleChange","filterConfirmed","pageTitle","isDialogFilterVisible","isFilterable","isInitDialogFilterVisible","scrollable"],[1,"d-flex","gap-2"],["routerLink","/pages/chart-of-account/account",1,"p-button","p-button-secondary","p-button-outlined","fs-3"],["severity","secondary","variant","outlined","icon","fa-solid fa-upload","label","Export",3,"onClick",4,"ngIf"],["severity","secondary","variant","outlined","icon","fa-solid fa-upload","label","Export",3,"onClick"],["class","px-3 bg-white border-top",4,"ngIf"],[1,"px-3","bg-white","border-top"],[3,"value"],[1,""],[1,"fs-5","fw-semibold"],[2,"width","10%"],[1,"text-end",2,"width","10%"],[1,"text-end",2,"width","20%"],[1,"text-break"],["target","_blank",1,"link","link-primary",3,"routerLink"],[1,"d-flex","flex-column"],["target","_blank",1,"link","link-primary",3,"href"],[3,"innerHTML"],[1,"text-end","text-break"],["colspan","3"],[1,"text-end","fw-semibold"],["colspan","8"],[1,"d-flex","flex-column","row-gap-3",3,"formGroup"],["for","outlet"],["showClear","","filter","","filterBy","code,name","display","chip","formControlName","listAccountID","appendTo","body","optionLabel","name","optionValue","id","placeholder","Select Accounts",3,"onChange","virtualScroll","virtualScrollItemSize","options","selectionLimit"],[1,"d-flex","flex-column","gap-2"],["showClear","","formControlName","from","styleClass","w-100","appendTo","body","inputId","icondisplay",3,"iconDisplay","showIcon"],["showClear","","formControlName","to","styleClass","w-100","appendTo","body","inputId","icondisplay",3,"iconDisplay","showIcon"],["showClear","","display","chip","formControlName","listOutletID","appendTo","body","optionLabel","value","optionValue","key","placeholder","Select Outlets",3,"virtualScroll","virtualScrollItemSize","options"],["showClear","","display","chip","selectionMode","multiple","filter","","filterBy","label","formControlName","listCategoryID","appendTo","body","containerStyleClass","w-100","optionLabel","label","optionValue","id","placeholder","Select Category",3,"onFocus","metaKeySelection","virtualScroll","virtualScrollItemSize","virtualScrollOptions","options"],["for",""],[1,"row"],[1,"col-4"],[1,"d-flex","align-items-center","gap-2"],["name","sortAscending","formControlName","sortAscending","inputId","asc",3,"value"],["for","asc",1,"m-0"],[1,"col-3"],["name","sortAscending","formControlName","sortAscending","inputId","desc",3,"value"],["for","desc",1,"m-0"],[1,"h-full","align-middle"],[1,"text-truncate","d-inline-block","h-full","align-middle"],[1,"flex","items-center","gap-2"],["name","contactType","formControlName","contactType",3,"value","inputId"],[1,"m-0",3,"for"],["formControlName","contactID","appendTo","body","styleClass","w-100","optionLabel","Value","optionValue","Key","inputStyleClass","w-100",3,"completeMethod","suggestions"],["formControlName","ContactID","appendTo","body","styleClass","w-100","optionLabel","Value","optionValue","Key","inputStyleClass","w-100",3,"completeMethod","suggestions"]],template:function(o,l){if(o&1){let m=D();n(0,"app-main-panel",10),z("isDialogFilterVisibleChange",function(u){return h(m),j(l.dialogFilterVisible,u)||(l.dialogFilterVisible=u),S(u)})("isInitDialogFilterVisibleChange",function(u){return h(m),j(l.initDialogVisible,u)||(l.initDialogVisible=u),S(u)}),I("filterConfirmed",function(){return h(m),S(l.onFilterOKEvent())}),x(1,_n,4,1,"ng-template",null,0,d)(3,vn,1,1,"ng-template",null,1,d)(5,Fn,48,21,"ng-template",null,2,d),i()}o&2&&(s("pageTitle",l.pageTitle),q("isDialogFilterVisible",l.dialogFilterVisible),s("isFilterable",!0),q("isInitDialogFilterVisible",l.initDialogVisible),s("scrollable",!0))},dependencies:[ce,$,U,Y,Pe,de,ge,fe,ze,re,oe,Ee,_e,ue,Te,we,ne,ee,J,Z,te,ie,he,xe,ve,He,Xe,$e,Ye,le,Q,X,Ue,Ke],styles:["[_nghost-%COMP%]{display:block} .p-datatable .p-datatable-header{padding-left:0!important}"],changeDetection:0})}}return t})();var El=[{path:"",redirectTo:"general-ledger",pathMatch:"full"},{path:"",children:[{path:"general-ledger",component:Ht},{path:"multiple-general-ledger",component:Xt},{path:"profit-loss",component:qt},{path:"balance-sheet",component:Kt},{path:"comparative-balance",component:Ut},{path:"trial-balance",component:$t},{path:"cash-flow",component:Yt}]}];export{El as REPORTS_ROUTES};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as W,c as j,f as u,h as q}from"./chunk-
|
|
1
|
+
import{a as W,c as j,f as u,h as q}from"./chunk-5FSMHZSY.js";import{$ as s,D as P,Da as N,E as A,F as R,I as n,K as m,O as F,Q as v,Ua as _,ka as Z,y as h}from"./chunk-G5S5AZA7.js";import{s as B}from"./chunk-OKCHQM5Q.js";import{Aa as E,Ab as d,Jb as C,Ob as $,Ub as M,Vb as V,Vc as p,Wb as k,Wc as r,ba as b,ca as T,ha as y,ib as x,mb as g,oa as O,ob as D,ra as w,ta as c,wb as I,xb as S,yb as H,yc as z}from"./chunk-JP6RBSB3.js";import{a}from"./chunk-YQFG5XE2.js";var J=({dt:e})=>`
|
|
2
2
|
.p-tooltip {
|
|
3
3
|
position: absolute;
|
|
4
4
|
display: none;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as Ie}from"./chunk-
|
|
1
|
+
import{a as Ie}from"./chunk-DHW7UHFT.js";import{a as Te}from"./chunk-2KERKGCG.js";import{a as xe}from"./chunk-X22YKT5B.js";import{a as S,f as j,h as N}from"./chunk-5FSMHZSY.js";import{Da as I,Ha as ve,La as we,Ma as b,Ua as Q,ma as Ce,na as ye}from"./chunk-G5S5AZA7.js";import{c as J,d as K,f as L,g as ge,h as P,j as be,l as _e}from"./chunk-F2X3VGZZ.js";import{h as U,j as ue,k as de,l as fe,m as he,r as M}from"./chunk-OKCHQM5Q.js";import{Aa as ee,Ab as h,Ac as X,Bc as pe,Cb as g,Dc as me,Jb as l,Kb as s,Mb as oe,Nb as ae,Ob as v,Pb as $,Ub as p,Vb as m,Vc as B,Wb as u,Wc as O,Xb as ie,Yb as ne,Zb as q,_b as A,ba as D,ca as E,dc as Z,ec as c,fc as se,gb as r,gc as re,ha as w,jc as z,kc as R,lc as T,mb as te,mc as x,pa as C,qa as y,qc as G,ra as F,rc as le,sc as ce,ta as d,wb as f,xb as V,yc as k,za as H}from"./chunk-JP6RBSB3.js";var Se=["*"],De=({dt:e})=>`
|
|
2
2
|
.p-floatlabel {
|
|
3
3
|
display: block;
|
|
4
4
|
position: relative;
|
|
@@ -90,7 +90,7 @@ import{a as Ie}from"./chunk-AZUQDRJU.js";import{a as Te}from"./chunk-YDEVG4CR.js
|
|
|
90
90
|
background: ${e("floatlabel.on.active.background")};
|
|
91
91
|
padding: ${e("floatlabel.on.active.padding")};
|
|
92
92
|
}
|
|
93
|
-
`,Ee={root:({instance:e,props:i})=>["p-floatlabel",{"p-floatlabel-over":i.variant==="over","p-floatlabel-on":i.variant==="on","p-floatlabel-in":i.variant==="in"}]},$e=(()=>{class e extends
|
|
93
|
+
`,Ee={root:({instance:e,props:i})=>["p-floatlabel",{"p-floatlabel-over":i.variant==="over","p-floatlabel-on":i.variant==="on","p-floatlabel-in":i.variant==="in"}]},$e=(()=>{class e extends Q{name="floatlabel";theme=De;classes=Ee;static \u0275fac=(()=>{let t;return function(o){return(t||(t=d(e)))(o||e)}})();static \u0275prov=D({token:e,factory:e.\u0275fac})}return e})();var Fe=(()=>{class e extends S{_componentStyle=w($e);variant="over";static \u0275fac=(()=>{let t;return function(o){return(t||(t=d(e)))(o||e)}})();static \u0275cmp=f({type:e,selectors:[["p-floatlabel"],["p-floatLabel"],["p-float-label"]],hostVars:8,hostBindings:function(a,o){a&2&&oe("p-floatlabel",!0)("p-floatlabel-over",o.variant==="over")("p-floatlabel-on",o.variant==="on")("p-floatlabel-in",o.variant==="in")},inputs:{variant:"variant"},features:[k([$e]),h],ngContentSelectors:Se,decls:1,vars:0,template:function(a,o){a&1&&(se(),re(0))},dependencies:[M,b],encapsulation:2,changeDetection:0})}return e})(),Ct=(()=>{class e{static \u0275fac=function(a){return new(a||e)};static \u0275mod=V({type:e});static \u0275inj=E({imports:[Fe,b,b]})}return e})();var ke=(()=>{class e extends N{pathId;ngOnInit(){this.pathId="url(#"+I()+")"}static \u0275fac=(()=>{let t;return function(o){return(t||(t=d(e)))(o||e)}})();static \u0275cmp=f({type:e,selectors:[["ExclamationTriangleIcon"]],features:[h],decls:8,vars:7,consts:[["width","14","height","14","viewBox","0 0 14 14","fill","none","xmlns","http://www.w3.org/2000/svg"],["d","M13.4018 13.1893H0.598161C0.49329 13.189 0.390283 13.1615 0.299143 13.1097C0.208003 13.0578 0.131826 12.9832 0.0780112 12.8932C0.0268539 12.8015 0 12.6982 0 12.5931C0 12.4881 0.0268539 12.3848 0.0780112 12.293L6.47985 1.08982C6.53679 1.00399 6.61408 0.933574 6.70484 0.884867C6.7956 0.836159 6.897 0.810669 7 0.810669C7.103 0.810669 7.2044 0.836159 7.29516 0.884867C7.38592 0.933574 7.46321 1.00399 7.52015 1.08982L13.922 12.293C13.9731 12.3848 14 12.4881 14 12.5931C14 12.6982 13.9731 12.8015 13.922 12.8932C13.8682 12.9832 13.792 13.0578 13.7009 13.1097C13.6097 13.1615 13.5067 13.189 13.4018 13.1893ZM1.63046 11.989H12.3695L7 2.59425L1.63046 11.989Z","fill","currentColor"],["d","M6.99996 8.78801C6.84143 8.78594 6.68997 8.72204 6.57787 8.60993C6.46576 8.49782 6.40186 8.34637 6.39979 8.18784V5.38703C6.39979 5.22786 6.46302 5.0752 6.57557 4.96265C6.68813 4.85009 6.84078 4.78686 6.99996 4.78686C7.15914 4.78686 7.31179 4.85009 7.42435 4.96265C7.5369 5.0752 7.60013 5.22786 7.60013 5.38703V8.18784C7.59806 8.34637 7.53416 8.49782 7.42205 8.60993C7.30995 8.72204 7.15849 8.78594 6.99996 8.78801Z","fill","currentColor"],["d","M6.99996 11.1887C6.84143 11.1866 6.68997 11.1227 6.57787 11.0106C6.46576 10.8985 6.40186 10.7471 6.39979 10.5885V10.1884C6.39979 10.0292 6.46302 9.87658 6.57557 9.76403C6.68813 9.65147 6.84078 9.58824 6.99996 9.58824C7.15914 9.58824 7.31179 9.65147 7.42435 9.76403C7.5369 9.87658 7.60013 10.0292 7.60013 10.1884V10.5885C7.59806 10.7471 7.53416 10.8985 7.42205 11.0106C7.30995 11.1227 7.15849 11.1866 6.99996 11.1887Z","fill","currentColor"],[3,"id"],["width","14","height","14","fill","white"]],template:function(a,o){a&1&&(F(),p(0,"svg",0)(1,"g"),u(2,"path",1)(3,"path",2)(4,"path",3),m(),p(5,"defs")(6,"clipPath",4),u(7,"rect",5),m()()()),a&2&&(v(o.getClassNames()),l("aria-label",o.ariaLabel)("aria-hidden",o.ariaHidden)("role",o.role),r(),l("clip-path",o.pathId),r(5),s("id",o.pathId))},encapsulation:2})}return e})();var Oe=(()=>{class e extends N{pathId;ngOnInit(){this.pathId="url(#"+I()+")"}static \u0275fac=(()=>{let t;return function(o){return(t||(t=d(e)))(o||e)}})();static \u0275cmp=f({type:e,selectors:[["InfoCircleIcon"]],features:[h],decls:6,vars:7,consts:[["width","14","height","14","viewBox","0 0 14 14","fill","none","xmlns","http://www.w3.org/2000/svg"],["fill-rule","evenodd","clip-rule","evenodd","d","M3.11101 12.8203C4.26215 13.5895 5.61553 14 7 14C8.85652 14 10.637 13.2625 11.9497 11.9497C13.2625 10.637 14 8.85652 14 7C14 5.61553 13.5895 4.26215 12.8203 3.11101C12.0511 1.95987 10.9579 1.06266 9.67879 0.532846C8.3997 0.00303296 6.99224 -0.13559 5.63437 0.134506C4.2765 0.404603 3.02922 1.07129 2.05026 2.05026C1.07129 3.02922 0.404603 4.2765 0.134506 5.63437C-0.13559 6.99224 0.00303296 8.3997 0.532846 9.67879C1.06266 10.9579 1.95987 12.0511 3.11101 12.8203ZM3.75918 2.14976C4.71846 1.50879 5.84628 1.16667 7 1.16667C8.5471 1.16667 10.0308 1.78125 11.1248 2.87521C12.2188 3.96918 12.8333 5.45291 12.8333 7C12.8333 8.15373 12.4912 9.28154 11.8502 10.2408C11.2093 11.2001 10.2982 11.9478 9.23232 12.3893C8.16642 12.8308 6.99353 12.9463 5.86198 12.7212C4.73042 12.4962 3.69102 11.9406 2.87521 11.1248C2.05941 10.309 1.50384 9.26958 1.27876 8.13803C1.05367 7.00647 1.16919 5.83358 1.61071 4.76768C2.05222 3.70178 2.79989 2.79074 3.75918 2.14976ZM7.00002 4.8611C6.84594 4.85908 6.69873 4.79698 6.58977 4.68801C6.48081 4.57905 6.4187 4.43185 6.41669 4.27776V3.88888C6.41669 3.73417 6.47815 3.58579 6.58754 3.4764C6.69694 3.367 6.84531 3.30554 7.00002 3.30554C7.15473 3.30554 7.3031 3.367 7.4125 3.4764C7.52189 3.58579 7.58335 3.73417 7.58335 3.88888V4.27776C7.58134 4.43185 7.51923 4.57905 7.41027 4.68801C7.30131 4.79698 7.1541 4.85908 7.00002 4.8611ZM7.00002 10.6945C6.84594 10.6925 6.69873 10.6304 6.58977 10.5214C6.48081 10.4124 6.4187 10.2652 6.41669 10.1111V6.22225C6.41669 6.06754 6.47815 5.91917 6.58754 5.80977C6.69694 5.70037 6.84531 5.63892 7.00002 5.63892C7.15473 5.63892 7.3031 5.70037 7.4125 5.80977C7.52189 5.91917 7.58335 6.06754 7.58335 6.22225V10.1111C7.58134 10.2652 7.51923 10.4124 7.41027 10.5214C7.30131 10.6304 7.1541 10.6925 7.00002 10.6945Z","fill","currentColor"],[3,"id"],["width","14","height","14","fill","white"]],template:function(a,o){a&1&&(F(),p(0,"svg",0)(1,"g"),u(2,"path",1),m(),p(3,"defs")(4,"clipPath",2),u(5,"rect",3),m()()()),a&2&&(v(o.getClassNames()),l("aria-label",o.ariaLabel)("aria-hidden",o.ariaHidden)("role",o.role),r(),l("clip-path",o.pathId),r(3),s("id",o.pathId))},encapsulation:2})}return e})();var Me=["container"],Ve=(e,i,t,a)=>({showTransformParams:e,hideTransformParams:i,showTransitionParams:t,hideTransitionParams:a}),Ae=e=>({value:"visible",params:e}),Ze=(e,i)=>({$implicit:e,closeFn:i}),ze=e=>({$implicit:e});function Be(e,i){e&1&&q(0)}function Le(e,i){if(e&1&&g(0,Be,1,0,"ng-container",3),e&2){let t=c();s("ngTemplateOutlet",t.headlessTemplate)("ngTemplateOutletContext",pe(2,Ze,t.message,t.onCloseIconClick))}}function Pe(e,i){if(e&1&&u(0,"span",4),e&2){let t=c(3);s("ngClass",t.cx("messageIcon"))}}function Qe(e,i){e&1&&u(0,"CheckIcon"),e&2&&l("aria-hidden",!0)("data-pc-section","icon")}function je(e,i){e&1&&u(0,"InfoCircleIcon"),e&2&&l("aria-hidden",!0)("data-pc-section","icon")}function Ne(e,i){e&1&&u(0,"TimesCircleIcon"),e&2&&l("aria-hidden",!0)("data-pc-section","icon")}function Ye(e,i){e&1&&u(0,"ExclamationTriangleIcon"),e&2&&l("aria-hidden",!0)("data-pc-section","icon")}function He(e,i){e&1&&u(0,"InfoCircleIcon"),e&2&&l("aria-hidden",!0)("data-pc-section","icon")}function qe(e,i){if(e&1&&(p(0,"span",4),g(1,Qe,1,2,"CheckIcon")(2,je,1,2,"InfoCircleIcon")(3,Ne,1,2,"TimesCircleIcon")(4,Ye,1,2,"ExclamationTriangleIcon")(5,He,1,2,"InfoCircleIcon"),m()),e&2){let t,a=c(3);s("ngClass",a.cx("messageIcon")),l("aria-hidden",!0)("data-pc-section","icon"),r(),$((t=a.message.severity)==="success"?1:t==="info"?2:t==="error"?3:t==="warn"?4:5)}}function Re(e,i){if(e&1&&(ie(0),g(1,Pe,1,1,"span",6)(2,qe,6,4,"span",6),p(3,"div",4)(4,"div",4),G(5),m(),p(6,"div",4),G(7),m()(),ne()),e&2){let t=c(2);r(),s("ngIf",t.message.icon),r(),s("ngIf",!t.message.icon),r(),s("ngClass",t.cx("messageText")),l("data-pc-section","text"),r(),s("ngClass",t.cx("summary")),l("data-pc-section","summary"),r(),ce(" ",t.message.summary," "),r(),s("ngClass",t.cx("detail")),l("data-pc-section","detail"),r(),le(t.message.detail)}}function Ge(e,i){e&1&&q(0)}function Xe(e,i){if(e&1&&u(0,"span",4),e&2){let t=c(4);s("ngClass",t.cx("closeIcon"))}}function Ue(e,i){if(e&1&&g(0,Xe,1,1,"span",6),e&2){let t=c(3);s("ngIf",t.message.closeIcon)}}function Je(e,i){if(e&1&&u(0,"TimesIcon",4),e&2){let t=c(3);s("ngClass",t.cx("closeIcon")),l("aria-hidden",!0)("data-pc-section","closeicon")}}function Ke(e,i){if(e&1){let t=A();p(0,"div")(1,"button",7),Z("click",function(o){C(t);let n=c(2);return y(n.onCloseIconClick(o))})("keydown.enter",function(o){C(t);let n=c(2);return y(n.onCloseIconClick(o))}),g(2,Ue,1,1,"span",4)(3,Je,1,3,"TimesIcon",4),m()()}if(e&2){let t=c(2);r(),s("ariaLabel",t.closeAriaLabel),l("class",t.cx("closeButton"))("data-pc-section","closebutton"),r(),$(t.message.closeIcon?2:3)}}function We(e,i){if(e&1&&(p(0,"div",4),g(1,Re,8,10,"ng-container",5)(2,Ge,1,0,"ng-container",3)(3,Ke,4,4,"div"),m()),e&2){let t=c();v(t.message==null?null:t.message.contentStyleClass),s("ngClass",t.cx("messageContent")),l("data-pc-section","content"),r(),s("ngIf",!t.template),r(),s("ngTemplateOutlet",t.template)("ngTemplateOutletContext",X(8,ze,t.message)),r(),$((t.message==null?null:t.message.closable)!==!1?3:-1)}}var et=["message"],tt=["headless"];function ot(e,i){if(e&1){let t=A();p(0,"p-toastItem",3),Z("onClose",function(o){C(t);let n=c();return y(n.onMessageClose(o))})("@toastAnimation.start",function(o){C(t);let n=c();return y(n.onAnimationStart(o))})("@toastAnimation.done",function(o){C(t);let n=c();return y(n.onAnimationEnd(o))}),m()}if(e&2){let t=i.$implicit,a=i.index,o=c();s("message",t)("index",a)("life",o.life)("template",o.template||o._template)("headlessTemplate",o.headlessTemplate||o._headlessTemplate)("@toastAnimation",void 0)("showTransformOptions",o.showTransformOptions)("hideTransformOptions",o.hideTransformOptions)("showTransitionOptions",o.showTransitionOptions)("hideTransitionOptions",o.hideTransitionOptions)}}var at=({dt:e})=>`
|
|
94
94
|
.p-toast {
|
|
95
95
|
width: ${e("toast.width")};
|
|
96
96
|
white-space: pre-line;
|
|
@@ -339,10 +339,10 @@ import{a as Ie}from"./chunk-AZUQDRJU.js";import{a as Te}from"./chunk-YDEVG4CR.js
|
|
|
339
339
|
.p-toast-message-leave-active {
|
|
340
340
|
transition: max-height 0.45s cubic-bezier(0, 1, 0, 1), opacity 0.3s, margin-bottom 0.3s;
|
|
341
341
|
}
|
|
342
|
-
`,it={root:({instance:e})=>{let{_position:i}=e;return{position:"fixed",top:i==="top-right"||i==="top-left"||i==="top-center"?"20px":i==="center"?"50%":null,right:(i==="top-right"||i==="bottom-right")&&"20px",bottom:(i==="bottom-left"||i==="bottom-right"||i==="bottom-center")&&"20px",left:i==="top-left"||i==="bottom-left"?"20px":i==="center"||i==="top-center"||i==="bottom-center"?"50%":null}}},nt={root:({instance:e})=>({"p-toast p-component":!0,[`p-toast-${e._position}`]:!!e._position}),message:({instance:e})=>({"p-toast-message":!0,"p-toast-message-info":e.message.severity==="info"||e.message.severity===void 0,"p-toast-message-warn":e.message.severity==="warn","p-toast-message-error":e.message.severity==="error","p-toast-message-success":e.message.severity==="success","p-toast-message-secondary":e.message.severity==="secondary","p-toast-message-contrast":e.message.severity==="contrast"}),messageContent:"p-toast-message-content",messageIcon:({instance:e})=>({"p-toast-message-icon":!0,[`pi ${e.message.icon}`]:!!e.message.icon}),messageText:"p-toast-message-text",summary:"p-toast-summary",detail:"p-toast-detail",closeButton:"p-toast-close-button",closeIcon:({instance:e})=>({"p-toast-close-icon":!0,[`pi ${e.message.closeIcon}`]:!!e.message.closeIcon})},
|
|
342
|
+
`,it={root:({instance:e})=>{let{_position:i}=e;return{position:"fixed",top:i==="top-right"||i==="top-left"||i==="top-center"?"20px":i==="center"?"50%":null,right:(i==="top-right"||i==="bottom-right")&&"20px",bottom:(i==="bottom-left"||i==="bottom-right"||i==="bottom-center")&&"20px",left:i==="top-left"||i==="bottom-left"?"20px":i==="center"||i==="top-center"||i==="bottom-center"?"50%":null}}},nt={root:({instance:e})=>({"p-toast p-component":!0,[`p-toast-${e._position}`]:!!e._position}),message:({instance:e})=>({"p-toast-message":!0,"p-toast-message-info":e.message.severity==="info"||e.message.severity===void 0,"p-toast-message-warn":e.message.severity==="warn","p-toast-message-error":e.message.severity==="error","p-toast-message-success":e.message.severity==="success","p-toast-message-secondary":e.message.severity==="secondary","p-toast-message-contrast":e.message.severity==="contrast"}),messageContent:"p-toast-message-content",messageIcon:({instance:e})=>({"p-toast-message-icon":!0,[`pi ${e.message.icon}`]:!!e.message.icon}),messageText:"p-toast-message-text",summary:"p-toast-summary",detail:"p-toast-detail",closeButton:"p-toast-close-button",closeIcon:({instance:e})=>({"p-toast-close-icon":!0,[`pi ${e.message.closeIcon}`]:!!e.message.closeIcon})},Y=(()=>{class e extends Q{name="toast";theme=at;classes=nt;inlineStyles=it;static \u0275fac=(()=>{let t;return function(o){return(t||(t=d(e)))(o||e)}})();static \u0275prov=D({token:e,factory:e.\u0275fac})}return e})();var st=(()=>{class e extends S{zone;message;index;life;template;headlessTemplate;showTransformOptions;hideTransformOptions;showTransitionOptions;hideTransitionOptions;onClose=new H;containerViewChild;_componentStyle=w(Y);timeout;constructor(t){super(),this.zone=t}ngAfterViewInit(){super.ngAfterViewInit(),this.initTimeout()}initTimeout(){this.message?.sticky||this.zone.runOutsideAngular(()=>{this.timeout=setTimeout(()=>{this.onClose.emit({index:this.index,message:this.message})},this.message?.life||this.life||3e3)})}clearTimeout(){this.timeout&&(clearTimeout(this.timeout),this.timeout=null)}onMouseEnter(){this.clearTimeout()}onMouseLeave(){this.initTimeout()}onCloseIconClick=t=>{this.clearTimeout(),this.onClose.emit({index:this.index,message:this.message}),t.preventDefault()};get closeAriaLabel(){return this.config.translation.aria?this.config.translation.aria.close:void 0}ngOnDestroy(){this.clearTimeout(),super.ngOnDestroy()}static \u0275fac=function(a){return new(a||e)(te(ee))};static \u0275cmp=f({type:e,selectors:[["p-toastItem"]],viewQuery:function(a,o){if(a&1&&R(Me,5),a&2){let n;T(n=x())&&(o.containerViewChild=n.first)}},inputs:{message:"message",index:[2,"index","index",O],life:[2,"life","life",O],template:"template",headlessTemplate:"headlessTemplate",showTransformOptions:"showTransformOptions",hideTransformOptions:"hideTransformOptions",showTransitionOptions:"showTransitionOptions",hideTransitionOptions:"hideTransitionOptions"},outputs:{onClose:"onClose"},features:[k([Y]),h],decls:4,vars:15,consts:[["container",""],["role","alert","aria-live","assertive","aria-atomic","true",3,"mouseenter","mouseleave","ngClass"],[3,"ngClass","class"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[3,"ngClass"],[4,"ngIf"],[3,"ngClass",4,"ngIf"],["type","button","autofocus","",3,"click","keydown.enter","ariaLabel"]],template:function(a,o){if(a&1){let n=A();p(0,"div",1,0),Z("mouseenter",function(){return C(n),y(o.onMouseEnter())})("mouseleave",function(){return C(n),y(o.onMouseLeave())}),g(2,Le,1,5,"ng-container")(3,We,4,10,"div",2),m()}a&2&&(v(o.message==null?null:o.message.styleClass),s("ngClass",o.cx("message"))("@messageState",X(13,Ae,me(8,Ve,o.showTransformOptions,o.hideTransformOptions,o.showTransitionOptions,o.hideTransitionOptions))),l("id",o.message==null?null:o.message.id)("data-pc-name","toast")("data-pc-section","root"),r(2),$(o.headlessTemplate?2:3))},dependencies:[M,U,de,he,Te,ke,Oe,xe,Ie,b],encapsulation:2,data:{animation:[J("messageState",[ge("visible",L({transform:"translateY(0)",opacity:1})),P("void => *",[L({transform:"{{showTransformParams}}",opacity:0}),K("{{showTransitionParams}}")]),P("* => void",[K("{{hideTransitionParams}}",L({height:0,opacity:0,transform:"{{hideTransformParams}}"}))])])]},changeDetection:0})}return e})(),rt=(()=>{class e extends S{key;autoZIndex=!0;baseZIndex=0;life=3e3;style;styleClass;get position(){return this._position}set position(t){this._position=t,this.cd.markForCheck()}preventOpenDuplicates=!1;preventDuplicates=!1;showTransformOptions="translateY(100%)";hideTransformOptions="translateY(-100%)";showTransitionOptions="300ms ease-out";hideTransitionOptions="250ms ease-in";breakpoints;onClose=new H;template;headlessTemplate;containerViewChild;messageSubscription;clearSubscription;messages;messagesArchieve;_position="top-right";messageService=w(ve);_componentStyle=w(Y);styleElement;id=I("pn_id_");templates;ngOnInit(){super.ngOnInit(),this.messageSubscription=this.messageService.messageObserver.subscribe(t=>{if(t)if(Array.isArray(t)){let a=t.filter(o=>this.canAdd(o));this.add(a)}else this.canAdd(t)&&this.add([t])}),this.clearSubscription=this.messageService.clearObserver.subscribe(t=>{t?this.key===t&&(this.messages=null):this.messages=null,this.cd.markForCheck()})}_template;_headlessTemplate;ngAfterContentInit(){this.templates?.forEach(t=>{switch(t.getType()){case"message":this._template=t.template;break;case"headless":this._headlessTemplate=t.template;break;default:this._template=t.template;break}})}ngAfterViewInit(){super.ngAfterViewInit(),this.breakpoints&&this.createStyle()}add(t){this.messages=this.messages?[...this.messages,...t]:[...t],this.preventDuplicates&&(this.messagesArchieve=this.messagesArchieve?[...this.messagesArchieve,...t]:[...t]),this.cd.markForCheck()}canAdd(t){let a=this.key===t.key;return a&&this.preventOpenDuplicates&&(a=!this.containsMessage(this.messages,t)),a&&this.preventDuplicates&&(a=!this.containsMessage(this.messagesArchieve,t)),a}containsMessage(t,a){return t?t.find(o=>o.summary===a.summary&&o.detail==a.detail&&o.severity===a.severity)!=null:!1}onMessageClose(t){this.messages?.splice(t.index,1),this.onClose.emit({message:t.message}),this.cd.detectChanges()}onAnimationStart(t){t.fromState==="void"&&(this.renderer.setAttribute(this.containerViewChild?.nativeElement,this.id,""),this.autoZIndex&&this.containerViewChild?.nativeElement.style.zIndex===""&&j.set("modal",this.containerViewChild?.nativeElement,this.baseZIndex||this.config.zIndex.modal))}onAnimationEnd(t){t.toState==="void"&&this.autoZIndex&&ye(this.messages)&&j.clear(this.containerViewChild?.nativeElement)}createStyle(){if(!this.styleElement){this.styleElement=this.renderer.createElement("style"),this.styleElement.type="text/css",this.renderer.appendChild(this.document.head,this.styleElement);let t="";for(let a in this.breakpoints){let o="";for(let n in this.breakpoints[a])o+=n+":"+this.breakpoints[a][n]+" !important;";t+=`
|
|
343
343
|
@media screen and (max-width: ${a}) {
|
|
344
344
|
.p-toast[${this.id}] {
|
|
345
345
|
${o}
|
|
346
346
|
}
|
|
347
347
|
}
|
|
348
|
-
`}this.renderer.setProperty(this.styleElement,"innerHTML",t),Ce(this.styleElement,"nonce",this.config?.csp()?.nonce)}}destroyStyle(){this.styleElement&&(this.renderer.removeChild(this.document.head,this.styleElement),this.styleElement=null)}ngOnDestroy(){this.messageSubscription&&this.messageSubscription.unsubscribe(),this.containerViewChild&&this.autoZIndex&&
|
|
348
|
+
`}this.renderer.setProperty(this.styleElement,"innerHTML",t),Ce(this.styleElement,"nonce",this.config?.csp()?.nonce)}}destroyStyle(){this.styleElement&&(this.renderer.removeChild(this.document.head,this.styleElement),this.styleElement=null)}ngOnDestroy(){this.messageSubscription&&this.messageSubscription.unsubscribe(),this.containerViewChild&&this.autoZIndex&&j.clear(this.containerViewChild.nativeElement),this.clearSubscription&&this.clearSubscription.unsubscribe(),this.destroyStyle(),super.ngOnDestroy()}static \u0275fac=(()=>{let t;return function(o){return(t||(t=d(e)))(o||e)}})();static \u0275cmp=f({type:e,selectors:[["p-toast"]],contentQueries:function(a,o,n){if(a&1&&(z(n,et,5),z(n,tt,5),z(n,we,4)),a&2){let _;T(_=x())&&(o.template=_.first),T(_=x())&&(o.headlessTemplate=_.first),T(_=x())&&(o.templates=_)}},viewQuery:function(a,o){if(a&1&&R(Me,5),a&2){let n;T(n=x())&&(o.containerViewChild=n.first)}},inputs:{key:"key",autoZIndex:[2,"autoZIndex","autoZIndex",B],baseZIndex:[2,"baseZIndex","baseZIndex",O],life:[2,"life","life",O],style:"style",styleClass:"styleClass",position:"position",preventOpenDuplicates:[2,"preventOpenDuplicates","preventOpenDuplicates",B],preventDuplicates:[2,"preventDuplicates","preventDuplicates",B],showTransformOptions:"showTransformOptions",hideTransformOptions:"hideTransformOptions",showTransitionOptions:"showTransitionOptions",hideTransitionOptions:"hideTransitionOptions",breakpoints:"breakpoints"},outputs:{onClose:"onClose"},features:[k([Y]),h],decls:3,vars:7,consts:[["container",""],[3,"ngClass","ngStyle"],[3,"message","index","life","template","headlessTemplate","showTransformOptions","hideTransformOptions","showTransitionOptions","hideTransitionOptions","onClose",4,"ngFor","ngForOf"],[3,"onClose","message","index","life","template","headlessTemplate","showTransformOptions","hideTransformOptions","showTransitionOptions","hideTransitionOptions"]],template:function(a,o){a&1&&(p(0,"div",1,0),g(2,ot,1,10,"p-toastItem",2),m()),a&2&&(ae(o.style),v(o.styleClass),s("ngClass",o.cx("root"))("ngStyle",o.sx("root")),r(2),s("ngForOf",o.messages))},dependencies:[M,U,ue,fe,st,b],encapsulation:2,data:{animation:[J("toastAnimation",[P(":enter, :leave",[_e("@*",be())])])]},changeDetection:0})}return e})(),Rt=(()=>{class e{static \u0275fac=function(a){return new(a||e)};static \u0275mod=V({type:e});static \u0275inj=E({imports:[rt,b,b]})}return e})();export{Fe as a,Ct as b,rt as c,Rt as d};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as i}from"./chunk-
|
|
1
|
+
import{a as i}from"./chunk-DQQ6JL6H.js";import{a}from"./chunk-LD7LVE2B.js";import{ba as o,ha as n}from"./chunk-JP6RBSB3.js";var h=(()=>{class e{constructor(){this.#t=n(a),this.authService=n(i)}#t;getJournalEntryLoader(){return this.#t.get("","api/JournalLoader/JournalEntry")}getJournalReceiveMoney(){return this.#t.get("","api/JournalLoader/ReceiveJournal")}getJournalRecordExpenseLoader(){return this.#t.get("","api/JournalLoader/RecordExpense")}getJournalEntryData(t,r={}){return this.#t.post("","api/Journal/JournalEntry",t,r)}getJournalEntryInfo(t){let r={ID:t};return this.#t.get("","/api/Journal/Info",{params:r})}getJournalEntryForm(t){return this.#t.get("",`api/journalloader/form/${t}`).pipe()}getJournalEntryCount(t){return this.#t.post("","api/Journal/JournalEntryCount",t)}getJournalEntryCustomerSuggestions(t){let r={Prefix:t,Count:100};return this.#t.get(this.authService.getTenantExternalURL(),"/API/AC/GetCustomerSuggestion",{params:r})}getJournalEntrySupplierSuggestions(t){let r={Prefix:t,Count:100};return this.#t.get(this.authService.getTenantExternalURL(),"/API/AC/GetSupplierSuggestion",{params:r})}submitJournalEntry(t){return this.#t.post(void 0,"api/journal/submit",t,{observe:"response"})}deleteJournalEntry(t){let r={params:{ID:t.join(",")}};return this.#t.delete(void 0,"/api/Journal/delete",r)}fetchCategoryOptions(){return this.#t.get("","api/ChartOfAccount/CategoryOptions")}submitChartAccount(t,r={}){return this.#t.post("","api/ChartOfAccount/Submit",t,r)}getImageFileName(t){return new URL(t).pathname.split("/").pop()||""}importPreviewJournal(t){return this.#t.post(void 0,"api/Journal/ImportPreview",t)}importConfirmJournal(t){return this.#t.post(void 0,"api/Journal/ImportConfirm",t)}static{this.\u0275fac=function(r){return new(r||e)}}static{this.\u0275prov=o({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();export{h as a};
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
import{a as K,b as Ct}from"./chunk-6MOM7AXR.js";import{a as bt}from"./chunk-G4XX7EU2.js";import{f as xt}from"./chunk-3VJJTR55.js";import"./chunk-YYDAQ7AW.js";import{a as wt}from"./chunk-XKI7WLHE.js";import{a as rt}from"./chunk-BY6QUHQI.js";import"./chunk-C2GO6SPF.js";import{a as $,b as W}from"./chunk-O4QM64EH.js";import{d as _t,i as ft,j as ht,k as gt}from"./chunk-SVXDMOLP.js";import"./chunk-S6X7PJAB.js";import"./chunk-LWLJZPBI.js";import"./chunk-3NU3P6NL.js";import{a as ue}from"./chunk-XKCLERWG.js";import"./chunk-GDX5XEV3.js";import{a as dt,b as ut}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{h as mt}from"./chunk-LUPSXHRX.js";import{a as Ke}from"./chunk-X22YKT5B.js";import{a as it,b as nt}from"./chunk-JYCUE5HV.js";import{a as I,b as ot,c as at,d as st,e as lt,f as pt,g as ct}from"./chunk-JMEBBWX4.js";import"./chunk-FUZFAJGJ.js";import{a as We,f as L,k as Je,m as Xe,o as Ye,s as et,w as Z,x as tt}from"./chunk-5FSMHZSY.js";import"./chunk-BHV2HCJY.js";import{A as ze,C as Ge,K as je,La as Ze,Ma as q,Ua as $e,c as me,e as Oe,f as Ae,l as Be,ma as qe,o as He,u as Ne,x as Qe,z as de}from"./chunk-G5S5AZA7.js";import{b as Pe,d as Re,e as Le}from"./chunk-Z45NTTES.js";import"./chunk-LD7LVE2B.js";import"./chunk-BLQJXMNV.js";import{c as Me,d as ae,f as se,h as le,i as pe,k as ce}from"./chunk-F2X3VGZZ.js";import{h as z,k as G,m as Ve,r as j}from"./chunk-OKCHQM5Q.js";import{Ab as H,Ac as V,Bc as De,Cb as _,Fc as Ee,Ga as R,Jb as D,Kb as a,Mc as x,Nb as be,Ob as Y,Pb as xe,Qb as ee,Sb as te,Tb as ie,Ub as p,Vb as m,Vc as T,Wb as k,Wc as Ue,X as O,Xb as Ce,Yb as ye,Yc as P,Z as J,Zb as E,Zc as Fe,_b as S,ba as he,c as M,ca as ge,dc as b,ec as l,fc as ve,gb as s,gc as ke,ha as C,jc as U,kc as N,lc as y,mc as v,pa as d,pc as Se,qa as u,qc as g,rc as F,sc as Te,ta as X,uc as Ie,vc as ne,wb as B,wc as re,xb as we,xc as oe,yc as Q,za as A}from"./chunk-JP6RBSB3.js";import{a as f,b as h}from"./chunk-YQFG5XE2.js";var St={data:[],count:0,filter:{pagination:1,pageSize:10,groupID:null,text:""},meta:{filter:{pagination:1,pageSize:10,groupID:null,text:""},options:{groups:[]}},metaForm:{form:{id:"",groupID:""},options:{users:[],groups:[]}}},_e=ot(ct("UserStore"),pt(St),at(t=>({first:P(()=>(t.filter().pagination-1)*t.filter().pageSize+1),end:P(()=>Math.min(t.filter().pagination*t.filter().pageSize,t.count())),hasCheckedRows:P(()=>t.data().some(o=>o.checked)),checkedData:P(()=>t.data().filter(o=>o.checked).map(o=>o.userID)),selectedID:P(()=>t.data().find(o=>o.checked)?.userID||null)})),lt(t=>{let o=C(K);return{setFilter(n){I(t,i=>h(f({},i),{filter:n}))},onRowSelect(n){I(t,i=>{let r=i.data.map(c=>c.userID===n.userID?h(f({},c),{checked:!0}):c);return h(f({},i),{data:r})})},onRowUnselect(n){I(t,i=>{let r=i.data.map(c=>c.userID===n.userID?h(f({},c),{checked:!1}):c);return h(f({},i),{data:r})})},onHeaderCheckboxToggle(n){let i=localStorage.getItem("AUTH_USERNAME");I(t,r=>{let c=r.data.map(w=>w.userName!==i?h(f({},w),{checked:n}):h(f({},w),{checked:!1}));return h(f({},r),{data:c})})},getUserLoader:$(M(O(()=>o.getUserLoaderList().pipe(W({next:n=>{I(t,i=>h(f({},i),{meta:n}))},error:n=>{console.error("Failed to fetch user loader list:",n)}}))))),getUserFormMeta:$(M(O(n=>o.getUserFormMeta(n).pipe(W({next:i=>{I(t,r=>h(f({},r),{metaForm:i}))},error:i=>{console.error("Failed to fetch user form meta:",i)}}))))),getUsers:$(M(O(n=>o.getUsers(n).pipe(W({next:i=>{I(t,r=>h(f({},r),{data:i.data.map(c=>h(f({},c),{checked:!1})),count:i.count}))},error:i=>{console.error("Failed to fetch users:",i)}})))))}}),st({onInit:t=>{t.getUserLoader(),t.getUsers(t.filter)}}));var Dt=["header"],Et=["footer"],Ut=["content"],Ft=["closeicon"],Vt=["headless"],Pt=["maskRef"],Rt=["container"],Lt=["closeButton"],Mt=["*"],Ot=(t,o,e,n,i,r)=>({"p-drawer":!0,"p-drawer-active":t,"p-drawer-left":o,"p-drawer-right":e,"p-drawer-top":n,"p-drawer-bottom":i,"p-drawer-full":r}),At=(t,o)=>({transform:t,transition:o}),Bt=t=>({value:"visible",params:t});function Ht(t,o){t&1&&E(0)}function Nt(t,o){if(t&1&&_(0,Ht,1,0,"ng-container",4),t&2){let e=l(2);a("ngTemplateOutlet",e.headlessTemplate||e._headlessTemplate)}}function Qt(t,o){t&1&&E(0)}function zt(t,o){if(t&1&&(p(0,"div"),g(1),m()),t&2){let e=l(3);Y(e.cx("title")),s(),F(e.header)}}function Gt(t,o){t&1&&k(0,"TimesIcon"),t&2&&D("data-pc-section","closeicon")}function jt(t,o){}function qt(t,o){t&1&&_(0,jt,0,0,"ng-template")}function Zt(t,o){if(t&1&&_(0,Gt,1,1,"TimesIcon",8)(1,qt,1,0,null,4),t&2){let e=l(4);a("ngIf",!e.closeIconTemplate&&!e._closeIconTemplate),s(),a("ngTemplateOutlet",e.closeIconTemplate||e._closeIconTemplate)}}function $t(t,o){if(t&1){let e=S();p(0,"p-button",9),b("onClick",function(i){d(e);let r=l(3);return u(r.close(i))})("keydown.enter",function(i){d(e);let r=l(3);return u(r.close(i))}),_(1,Zt,2,2,"ng-template",null,1,x),m()}if(t&2){let e=l(3);a("ngClass",e.cx("closeButton"))("buttonProps",e.closeButtonProps)("ariaLabel",e.ariaCloseLabel),D("data-pc-section","closebutton")("data-pc-group-section","iconcontainer")}}function Wt(t,o){t&1&&E(0)}function Kt(t,o){t&1&&E(0)}function Jt(t,o){if(t&1&&(Ce(0),p(1,"div",5),_(2,Kt,1,0,"ng-container",4),m(),ye()),t&2){let e=l(3);s(),a("ngClass",e.cx("footer")),D("data-pc-section","footer"),s(),a("ngTemplateOutlet",e.footerTemplate||e._footerTemplate)}}function Xt(t,o){if(t&1&&(p(0,"div",5),_(1,Qt,1,0,"ng-container",4)(2,zt,2,3,"div",6)(3,$t,3,5,"p-button",7),m(),p(4,"div",5),ke(5),_(6,Wt,1,0,"ng-container",4),m(),_(7,Jt,3,3,"ng-container",8)),t&2){let e=l(2);a("ngClass",e.cx("header")),D("data-pc-section","header"),s(),a("ngTemplateOutlet",e.headerTemplate||e._headerTemplate),s(),a("ngIf",e.header),s(),a("ngIf",e.showCloseIcon&&e.closable),s(),a("ngClass",e.cx("content")),D("data-pc-section","content"),s(2),a("ngTemplateOutlet",e.contentTemplate||e._contentTemplate),s(),a("ngIf",e.footerTemplate||e._footerTemplate)}}function Yt(t,o){if(t&1){let e=S();p(0,"div",3,0),b("@panelState.start",function(i){d(e);let r=l();return u(r.onAnimationStart(i))})("@panelState.done",function(i){d(e);let r=l();return u(r.onAnimationEnd(i))})("keydown",function(i){d(e);let r=l();return u(r.onKeyDown(i))}),_(2,Nt,1,1,"ng-container")(3,Xt,8,9),m()}if(t&2){let e=l();be(e.style),Y(e.styleClass),a("ngClass",Ee(9,Ot,e.visible,e.position==="left"&&!e.fullScreen,e.position==="right"&&!e.fullScreen,e.position==="top"&&!e.fullScreen,e.position==="bottom"&&!e.fullScreen,e.fullScreen||e.position==="full"))("@panelState",V(19,Bt,De(16,At,e.transformOptions,e.transitionOptions))),D("data-pc-name","sidebar")("data-pc-section","root"),s(2),xe(e.headlessTemplate||e._headlessTemplate?2:3)}}var ei=({dt:t})=>`
|
|
2
|
+
.p-drawer {
|
|
3
|
+
display: flex;
|
|
4
|
+
flex-direction: column;
|
|
5
|
+
pointer-events: auto;
|
|
6
|
+
transform: translate3d(0px, 0px, 0px);
|
|
7
|
+
position: fixed;
|
|
8
|
+
transition: transform 0.3s;
|
|
9
|
+
background: ${t("drawer.background")};
|
|
10
|
+
color: ${t("drawer.color")};
|
|
11
|
+
border: 1px solid ${t("drawer.border.color")};
|
|
12
|
+
box-shadow: ${t("drawer.shadow")};
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.p-drawer-content {
|
|
16
|
+
overflow-y: auto;
|
|
17
|
+
flex-grow: 1;
|
|
18
|
+
padding: ${t("drawer.content.padding")};
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.p-drawer-header {
|
|
22
|
+
display: flex;
|
|
23
|
+
align-items: center;
|
|
24
|
+
justify-content: space-between;
|
|
25
|
+
flex-shrink: 0;
|
|
26
|
+
padding: ${t("drawer.header.padding")};
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.p-drawer-footer {
|
|
30
|
+
padding: ${t("drawer.header.padding")};
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.p-drawer-title {
|
|
34
|
+
font-weight: ${t("drawer.title.font.weight")};
|
|
35
|
+
font-size: ${t("drawer.title.font.size")};
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.p-drawer-full .p-drawer {
|
|
39
|
+
transition: none;
|
|
40
|
+
transform: none;
|
|
41
|
+
width: 100vw !important;
|
|
42
|
+
height: 100vh !important;
|
|
43
|
+
max-height: 100%;
|
|
44
|
+
top: 0px !important;
|
|
45
|
+
left: 0px !important;
|
|
46
|
+
border-width: 1px;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.p-drawer-left .p-drawer {
|
|
50
|
+
align-self: start;
|
|
51
|
+
width: 20rem;
|
|
52
|
+
height: 100%;
|
|
53
|
+
border-right-width: 1px;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.p-drawer-right .p-drawer {
|
|
57
|
+
align-self: end;
|
|
58
|
+
width: 20rem;
|
|
59
|
+
height: 100%;
|
|
60
|
+
border-left-width: 1px;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.p-drawer-top .p-drawer {
|
|
64
|
+
height: 10rem;
|
|
65
|
+
width: 100%;
|
|
66
|
+
border-bottom-width: 1px;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.p-drawer-bottom .p-drawer {
|
|
70
|
+
height: 10rem;
|
|
71
|
+
width: 100%;
|
|
72
|
+
border-top-width: 1px;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.p-drawer-left .p-drawer-content,
|
|
76
|
+
.p-drawer-right .p-drawer-content,
|
|
77
|
+
.p-drawer-top .p-drawer-content,
|
|
78
|
+
.p-drawer-bottom .p-drawer-content {
|
|
79
|
+
width: 100%;
|
|
80
|
+
height: 100%;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.p-drawer-open {
|
|
84
|
+
display: flex;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.p-drawer-top {
|
|
88
|
+
justify-content: flex-start;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.p-drawer-bottom {
|
|
92
|
+
justify-content: flex-end;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.p-drawer {
|
|
96
|
+
position: fixed;
|
|
97
|
+
transition: transform 0.3s;
|
|
98
|
+
display: flex;
|
|
99
|
+
flex-direction: column;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.p-drawer-content {
|
|
103
|
+
position: relative;
|
|
104
|
+
overflow-y: auto;
|
|
105
|
+
flex-grow: 1;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.p-drawer-header {
|
|
109
|
+
display: flex;
|
|
110
|
+
align-items: center;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.p-drawer-footer {
|
|
114
|
+
margin-top: auto;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.p-drawer-icon {
|
|
118
|
+
display: flex;
|
|
119
|
+
align-items: center;
|
|
120
|
+
justify-content: center;
|
|
121
|
+
margin-left: auto;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.p-drawer-left {
|
|
125
|
+
top: 0;
|
|
126
|
+
left: 0;
|
|
127
|
+
width: 20rem;
|
|
128
|
+
height: 100%;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
.p-drawer-right {
|
|
132
|
+
top: 0;
|
|
133
|
+
right: 0;
|
|
134
|
+
width: 20rem;
|
|
135
|
+
height: 100%;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
.p-drawer-top {
|
|
139
|
+
top: 0;
|
|
140
|
+
left: 0;
|
|
141
|
+
width: 100%;
|
|
142
|
+
height: 10rem;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
.p-drawer-bottom {
|
|
146
|
+
bottom: 0;
|
|
147
|
+
left: 0;
|
|
148
|
+
width: 100%;
|
|
149
|
+
height: 10rem;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
.p-drawer-full {
|
|
153
|
+
width: 100%;
|
|
154
|
+
height: 100%;
|
|
155
|
+
top: 0;
|
|
156
|
+
left: 0;
|
|
157
|
+
-webkit-transition: none;
|
|
158
|
+
transition: none;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
.p-drawer-mask {
|
|
162
|
+
background-color: rgba(0, 0, 0, 0.4);
|
|
163
|
+
transition-duration: 0.2s;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
.p-overlay-mask {
|
|
167
|
+
position: fixed;
|
|
168
|
+
top: 0;
|
|
169
|
+
left: 0;
|
|
170
|
+
width: 100%;
|
|
171
|
+
height: 100%;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
.p-overlay-mask:dir(rtl) {
|
|
175
|
+
flex-direction: row-reverse;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
.p-overlay-mask-enter {
|
|
179
|
+
animation: p-overlay-mask-enter-animation 150ms forwards;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
.p-overlay-mask-leave {
|
|
183
|
+
animation: p-overlay-mask-leave-animation 150ms forwards;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
@keyframes p-overlay-mask-enter-animation {
|
|
187
|
+
from {
|
|
188
|
+
background-color: transparent;
|
|
189
|
+
}
|
|
190
|
+
to {
|
|
191
|
+
background-color: rgba(0, 0, 0, 0.4);
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
@keyframes p-overlay-mask-leave-animation {
|
|
195
|
+
from {
|
|
196
|
+
background-color: rgba(0, 0, 0, 0.4);
|
|
197
|
+
}
|
|
198
|
+
to {
|
|
199
|
+
background-color: transparent;
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
`,ti={mask:({instance:t})=>({position:"fixed",height:"100%",width:"100%",left:0,top:0,display:"flex",flexDirection:"column",alignItems:t.position==="top"?"flex-start":t.position==="bottom"?"flex-end":"center"})},ii={mask:({instance:t})=>({"p-drawer-mask":!0,"p-overlay-mask p-overlay-mask-enter":t.modal,"p-drawer-open":t.containerVisible,"p-drawer-full":t.fullScreen,[`p-drawer-${t.position}`]:!!t.position}),root:({instance:t})=>({"p-drawer p-component":!0,"p-drawer-full":t.fullScreen}),header:"p-drawer-header",title:"p-drawer-title",pcCloseButton:"p-drawer-close-button",content:"p-drawer-content",footer:"p-drawer-footer"},yt=(()=>{class t extends $e{name="drawer";theme=ei;classes=ii;inlineStyles=ti;static \u0275fac=(()=>{let e;return function(i){return(e||(e=X(t)))(i||t)}})();static \u0275prov=he({token:t,factory:t.\u0275fac})}return t})();var ni=pe([se({transform:"{{transform}}",opacity:0}),ae("{{transition}}")]),ri=pe([ae("{{transition}}",se({transform:"{{transform}}",opacity:0}))]),fe=(()=>{class t extends We{appendTo="body";blockScroll=!1;style;styleClass;ariaCloseLabel;autoZIndex=!0;baseZIndex=0;modal=!0;closeButtonProps={severity:"secondary",text:!0,rounded:!0};dismissible=!0;showCloseIcon=!0;closeOnEscape=!0;transitionOptions="150ms cubic-bezier(0, 0, 0.2, 1)";get visible(){return this._visible}set visible(e){this._visible=e}get position(){return this._position}set position(e){if(this._position=e,e==="full"){this.transformOptions="none";return}switch(e){case"left":this.transformOptions="translate3d(-100%, 0px, 0px)";break;case"right":this.transformOptions="translate3d(100%, 0px, 0px)";break;case"bottom":this.transformOptions="translate3d(0px, 100%, 0px)";break;case"top":this.transformOptions="translate3d(0px, -100%, 0px)";break}}get fullScreen(){return this._fullScreen}set fullScreen(e){this._fullScreen=e,e&&(this.transformOptions="none")}header;maskStyle;closable=!0;onShow=new A;onHide=new A;visibleChange=new A;maskRef;containerViewChild;closeButtonViewChild;initialized;_visible;_position="left";_fullScreen=!1;container;transformOptions="translate3d(-100%, 0px, 0px)";mask;maskClickListener;documentEscapeListener;animationEndListener;_componentStyle=C(yt);ngAfterViewInit(){super.ngAfterViewInit(),this.initialized=!0}headerTemplate;footerTemplate;contentTemplate;closeIconTemplate;headlessTemplate;_headerTemplate;_footerTemplate;_contentTemplate;_closeIconTemplate;_headlessTemplate;templates;ngAfterContentInit(){this.templates?.forEach(e=>{switch(e.getType()){case"content":this._contentTemplate=e.template;break;case"header":this._headerTemplate=e.template;break;case"footer":this._footerTemplate=e.template;break;case"closeicon":this._closeIconTemplate=e.template;break;case"headless":this._headlessTemplate=e.template;break;default:this._contentTemplate=e.template;break}})}onKeyDown(e){e.code==="Escape"&&this.hide(!1)}show(){this.container.setAttribute(this.attrSelector,""),this.autoZIndex&&L.set("modal",this.container,this.baseZIndex||this.config.zIndex.modal),this.modal&&this.enableModality(),this.onShow.emit({}),this.visibleChange.emit(!0)}hide(e=!0){e&&this.onHide.emit({}),this.modal&&this.disableModality()}close(e){this.hide(),this.visibleChange.emit(!1),e.preventDefault()}enableModality(){let e=this.document.querySelectorAll(".p-drawer-active"),n=e.length,i=n==1?String(parseInt(this.container.style.zIndex)-1):String(parseInt(e[n-1].style.zIndex)-1);this.mask||(this.mask=this.renderer.createElement("div"),this.renderer.setStyle(this.mask,"zIndex",i),qe(this.mask,"style",this.maskStyle),de(this.mask,"p-overlay-mask p-drawer-mask p-overlay-mask-enter"),this.dismissible&&(this.maskClickListener=this.renderer.listen(this.mask,"click",r=>{this.dismissible&&this.close(r)})),this.renderer.appendChild(this.document.body,this.mask),this.blockScroll&&ze())}disableModality(){this.mask&&(de(this.mask,"p-overlay-mask-leave"),this.animationEndListener=this.renderer.listen(this.mask,"animationend",this.destroyModal.bind(this)))}destroyModal(){this.unbindMaskClickListener(),this.mask&&this.renderer.removeChild(this.document.body,this.mask),this.blockScroll&&Ge(),this.unbindAnimationEndListener(),this.mask=null}onAnimationStart(e){switch(e.toState){case"visible":this.container=e.element,this.appendContainer(),this.show(),this.closeOnEscape&&this.bindDocumentEscapeListener();break}}onAnimationEnd(e){switch(e.toState){case"void":this.hide(!1),L.clear(this.container),this.unbindGlobalListeners();break}}appendContainer(){this.appendTo&&(this.appendTo==="body"?this.renderer.appendChild(this.document.body,this.container):je(this.appendTo,this.container))}bindDocumentEscapeListener(){let e=this.el?this.el.nativeElement.ownerDocument:this.document;this.documentEscapeListener=this.renderer.listen(e,"keydown",n=>{n.which==27&&parseInt(this.container.style.zIndex)===L.get(this.container)&&this.close(n)})}unbindDocumentEscapeListener(){this.documentEscapeListener&&(this.documentEscapeListener(),this.documentEscapeListener=null)}unbindMaskClickListener(){this.maskClickListener&&(this.maskClickListener(),this.maskClickListener=null)}unbindGlobalListeners(){this.unbindMaskClickListener(),this.unbindDocumentEscapeListener()}unbindAnimationEndListener(){this.animationEndListener&&this.mask&&(this.animationEndListener(),this.animationEndListener=null)}ngOnDestroy(){this.initialized=!1,this.visible&&this.modal&&this.destroyModal(),this.appendTo&&this.container&&this.renderer.appendChild(this.el.nativeElement,this.container),this.container&&this.autoZIndex&&L.clear(this.container),this.container=null,this.unbindGlobalListeners(),this.unbindAnimationEndListener()}static \u0275fac=(()=>{let e;return function(i){return(e||(e=X(t)))(i||t)}})();static \u0275cmp=B({type:t,selectors:[["p-drawer"]],contentQueries:function(n,i,r){if(n&1&&(U(r,Dt,4),U(r,Et,4),U(r,Ut,4),U(r,Ft,4),U(r,Vt,4),U(r,Ze,4)),n&2){let c;y(c=v())&&(i.headerTemplate=c.first),y(c=v())&&(i.footerTemplate=c.first),y(c=v())&&(i.contentTemplate=c.first),y(c=v())&&(i.closeIconTemplate=c.first),y(c=v())&&(i.headlessTemplate=c.first),y(c=v())&&(i.templates=c)}},viewQuery:function(n,i){if(n&1&&(N(Pt,5),N(Rt,5),N(Lt,5)),n&2){let r;y(r=v())&&(i.maskRef=r.first),y(r=v())&&(i.containerViewChild=r.first),y(r=v())&&(i.closeButtonViewChild=r.first)}},inputs:{appendTo:"appendTo",blockScroll:[2,"blockScroll","blockScroll",T],style:"style",styleClass:"styleClass",ariaCloseLabel:"ariaCloseLabel",autoZIndex:[2,"autoZIndex","autoZIndex",T],baseZIndex:[2,"baseZIndex","baseZIndex",Ue],modal:[2,"modal","modal",T],closeButtonProps:"closeButtonProps",dismissible:[2,"dismissible","dismissible",T],showCloseIcon:[2,"showCloseIcon","showCloseIcon",T],closeOnEscape:[2,"closeOnEscape","closeOnEscape",T],transitionOptions:"transitionOptions",visible:"visible",position:"position",fullScreen:"fullScreen",header:"header",maskStyle:"maskStyle",closable:[2,"closable","closable",T]},outputs:{onShow:"onShow",onHide:"onHide",visibleChange:"visibleChange"},features:[Q([yt]),H],ngContentSelectors:Mt,decls:1,vars:1,consts:[["container",""],["icon",""],["role","complementary",3,"ngClass","style","class","keydown",4,"ngIf"],["role","complementary",3,"keydown","ngClass"],[4,"ngTemplateOutlet"],[3,"ngClass"],[3,"class",4,"ngIf"],[3,"ngClass","buttonProps","ariaLabel","onClick","keydown.enter",4,"ngIf"],[4,"ngIf"],[3,"onClick","keydown.enter","ngClass","buttonProps","ariaLabel"]],template:function(n,i){n&1&&(ve(),_(0,Yt,4,21,"div",2)),n&2&&a("ngIf",i.visible)},dependencies:[j,z,G,Ve,Z,Ke,q],encapsulation:2,data:{animation:[Me("panelState",[le("void => visible",[ce(ni)]),le("visible => void",[ce(ri)])])]},changeDetection:0})}return t})(),vt=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=we({type:t});static \u0275inj=ge({imports:[fe,q,q]})}return t})();var ai=["class","page"],kt=t=>({"ng-invalid ng-dirty":t}),si=t=>({groupID:t});function li(t,o){if(t&1){let e=S();p(0,"p-button",21),b("onClick",function(){d(e);let i=l(2);return u(i.onDeleteUser())}),m()}}function pi(t,o){if(t&1){let e=S();p(0,"p-button",22),b("onClick",function(){d(e);let i=l(2);return u(i.onHandleDrawer())}),m()}}function ci(t,o){if(t&1&&(p(0,"div",18),_(1,li,1,0,"p-button",19)(2,pi,1,0,"p-button",20),m()),t&2){let e=l();s(),a("ngIf",e.store.hasCheckedRows()),s(),a("ngIf",e.roleService.user.create)}}function mi(t,o){t&1&&(p(0,"th",26),k(1,"p-tableHeaderCheckbox"),m())}function di(t,o){if(t&1&&(p(0,"tr"),_(1,mi,2,0,"th",25),p(2,"th"),g(3,"LoginID"),m(),p(4,"th"),g(5,"Group"),m()()),t&2){let e=l(2);s(),a("ngIf",e.roleService.user.delete)}}function ui(t,o){t&1&&E(0)}function _i(t,o){if(t&1&&k(0,"p-tableCheckbox",32),t&2){let e=l(3).$implicit;a("value",e)}}function fi(t,o){if(t&1&&_(0,_i,1,1,"p-tableCheckbox",31),t&2){let e=l(4);a("ngIf",e.roleService.user.delete)}}function hi(t,o){if(t&1&&(p(0,"td"),_(1,ui,1,0,"ng-container",30)(2,fi,1,1,"ng-template",null,7,x),m()),t&2){let e=Se(3),n=l().$implicit,i=l(2);s(),a("ngIf",i.roleService.user.delete&&n.userName===i.currentUser())("ngIfElse",e)}}function gi(t,o){if(t&1){let e=S();p(0,"tr"),_(1,hi,4,2,"td",27),p(2,"td")(3,"button",28),b("click",function(){let i=d(e).$implicit,r=l(2);return u(r.onEditUser(i))}),g(4),m()(),p(5,"td")(6,"a",29),g(7),m()()()}if(t&2){let e=o.$implicit,n=l(2);s(),a("ngIf",n.roleService.user.delete),s(2),a("disabled",!n.roleService.user.edit),s(),Te(" ",e.userName||e.userID," "),s(2),a("queryParams",V(5,si,e.groupID)),s(),F(e.groupName)}}function wi(t,o){if(t&1&&g(0),t&2){let e=l(2);Ie(" Showing ",e.store.first()," to ",e.store.end()," of ",e.store.count()," entries ")}}function bi(t,o){t&1&&(p(0,"tr")(1,"td",33)(2,"span"),g(3,"No users found. Try adjusting your filters or add a new user."),m()()())}function xi(t,o){if(t&1){let e=S();p(0,"p-panel")(1,"div",23),k(2,"app-user-tabs"),p(3,"p-table",24),b("onPage",function(i){d(e);let r=l();return u(r.onPageChange(i))})("onRowSelect",function(i){d(e);let r=l();return u(r.onRowSelect(i))})("onRowUnselect",function(i){d(e);let r=l();return u(r.onRowUnselect(i))})("onHeaderCheckboxToggle",function(i){d(e);let r=l();return u(r.onHeaderCheckboxToggle(i))}),_(4,di,6,1,"ng-template",null,3,x)(6,gi,8,7,"ng-template",null,4,x)(8,wi,1,3,"ng-template",null,5,x)(10,bi,4,0,"ng-template",null,6,x),m()()()}if(t&2){let e=l();s(3),a("value",e.store.data())("lazy",!0)("paginator",!0)("rows",e.store.filter().pageSize)("totalRecords",e.store.count())}}function Ci(t,o){if(t&1&&(p(0,"div",34)(1,"div",16)(2,"div",35)(3,"label",36),g(4,"Group"),m(),k(5,"p-select",37),m()()()),t&2){let e=l();a("formGroup",e.forms.filterForm),s(5),a("showClear",!0)("options",e.store.meta().options.groups)}}function yi(t,o){if(t&1&&(p(0,"span",38),g(1),m()),t&2){let e=l();s(),F(e.store.hasCheckedRows()?"Edit User":"Invite User")}}function vi(t,o){if(t&1&&(p(0,"small",14),g(1),m()),t&2){let e=o.$implicit;s(),F(e)}}function ki(t,o){if(t&1&&(p(0,"small",14),g(1),m()),t&2){let e=o.$implicit;s(),F(e)}}var Fn=(()=>{class t extends wt{ngOnInit(){this.generateForm()}constructor(){Fe(()=>{this.store.metaForm()&&this.generateForm()}),super(),this.store=C(_e),this.fb=C(Ne),this.userService=C(K),this.isLoading=R(!1),this.form=null,this.isDrawerOpen=R(!1),this.router=C(Re),this.route=C(Pe),this.isDialogFilterVisible=R(!1),this.roleService=C(rt),this.currentUser=R(null),this.tabs=[{route:"/pages/users/users",label:"Users"},{route:"/pages/users/groups",label:"Groups"}]}ngAfterViewInit(){this.currentUser.set(localStorage.getItem("AUTH_USERNAME")||null)}onPageChange(e){this.store.setFilter(h(f({},this.store.filter()),{pagination:e.first/e.rows+1}))}onRowSelect(e){this.store.onRowSelect(e.data)}onRowUnselect(e){if(Array.isArray(e.data)){e.data.forEach(n=>{this.store.onRowUnselect(n)});return}else this.store.onRowUnselect(e.data)}onHeaderCheckboxToggle(e){this.store.onHeaderCheckboxToggle(e.checked)}generateForm(){this.forms={filterForm:this.fb.group({pagination:this.fb.control(1),pageSize:this.fb.control(10),groupID:this.fb.control(null)}),userForm:this.fb.group({id:this.fb.control({value:this.store.metaForm().form.id,disabled:this.store.metaForm().form.id!==bt},[me.required]),groupID:this.fb.control(this.store.metaForm().form.groupID,[me.required])})}}onHandleDrawer(){this.isDrawerOpen.update(e=>!e),this.store.getUserFormMeta(this.route.snapshot.params.id||null)}onInviteUser(){if(this.forms.userForm.invalid){this.forms.userForm.markAllAsTouched();return}let e=null;this.store.hasCheckedRows()?(console.log(this.store.checkedData()),e={id:this.store.checkedData()[0],groupID:this.forms.userForm.value.groupID}):e=this.forms.userForm.getRawValue(),this.userService.inviteUser(e).pipe(ue("User invited successfully"),J(()=>{this.onHandleDrawer(),this.store.setFilter(f({},this.store.filter())),this.forms.userForm.reset()})).subscribe()}onSearch(e){this.store.setFilter(h(f({},this.store.filter()),{text:e,pagination:1}))}onOKFilter(){if(this.forms.filterForm.invalid){this.forms.filterForm.markAllAsTouched();return}let{groupID:e}=this.forms.filterForm.value;this.store.setFilter(h(f({},this.store.filter()),{groupID:e})),this.isDialogFilterVisible.update(n=>!n)}onEditUser(e){this.store.onRowSelect(e),this.store.getUserFormMeta(this.store.selectedID()),this.isDrawerOpen.update(n=>!n)}onHideDrawer(){this.store.onHeaderCheckboxToggle(!1)}onDeleteUser(){let e=this.store.checkedData();this.userService.deleteUser(e).pipe(ue("User(s) deleted successfully"),J(()=>{this.store.setFilter(f({},this.store.filter()))})).subscribe()}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=B({type:t,selectors:[["app-user",8,"page"]],features:[Q([_e]),H],attrs:ai,decls:27,vars:15,consts:[["actionButton",""],["content",""],["filters",""],["header",""],["body",""],["paginatorleft",""],["emptymessage",""],["showCheckbox",""],["pageTitle","User List",3,"search","isDialogFilterVisibleChange","filterConfirmed","isSearchableInput","isFilterable","isDialogFilterVisible","scrollable"],["position","right",3,"visibleChange","onHide","visible"],[1,"row","py-3","row-gap-3",3,"formGroup"],[1,"col-12"],["for","",1,"m-0"],["fluid","","filter","","filterBy","name","formControlName","id","optionLabel","loginID","optionValue","id","placeholder","Select a User",3,"disabled","options","ngClass"],[1,"text-danger"],["filter","","filterBy","name","formControlName","groupID","optionLabel","name","optionValue","id","placeholder","Select a Group","fluid","",3,"options","ngClass"],[1,"col"],["label","Submit",3,"onClick"],[1,"d-flex","gap-2","flex-wrap"],["severity","danger","label","Delete","icon","fa-solid fa-trash",3,"onClick",4,"ngIf"],["label","Invite",3,"onClick",4,"ngIf"],["severity","danger","label","Delete","icon","fa-solid fa-trash",3,"onClick"],["label","Invite",3,"onClick"],[1,"d-flex","flex-column","gap-3","py-2"],["dataKey","userID",3,"onPage","onRowSelect","onRowUnselect","onHeaderCheckboxToggle","value","lazy","paginator","rows","totalRecords"],["style","width: 4rem",4,"ngIf"],[2,"width","4rem"],[4,"ngIf"],[1,"btn","btn-link","fw-light","text-primary","p-0",2,"text-decoration","none",3,"click","disabled"],["routerLink","/pages/users/groups/forms",1,"link","link-primary",3,"queryParams"],[4,"ngIf","ngIfElse"],[3,"value",4,"ngIf"],[3,"value"],["colspan","3"],[1,"row",3,"formGroup"],[1,"d-flex","flex-column"],["for",""],["appendTo","body","formControlName","groupID","optionValue","id","optionLabel","name","placeholder","Select a Group",3,"showClear","options"],[1,"fs-5"]],template:function(n,i){if(n&1){let r=S();p(0,"app-main-panel",8),b("search",function(w){return d(r),u(i.onSearch(w))}),oe("isDialogFilterVisibleChange",function(w){return d(r),re(i.isDialogFilterVisible,w)||(i.isDialogFilterVisible=w),u(w)}),b("filterConfirmed",function(){return d(r),u(i.onOKFilter())}),_(1,ci,3,2,"ng-template",null,0,x)(3,xi,12,5,"ng-template",null,1,x)(5,Ci,6,3,"ng-template",null,2,x),m(),p(7,"p-drawer",9),oe("visibleChange",function(w){return d(r),re(i.isDrawerOpen,w)||(i.isDrawerOpen=w),u(w)}),b("onHide",function(){return d(r),u(i.onHideDrawer())}),_(8,yi,2,1,"ng-template",null,3,x),p(10,"div",10)(11,"div",11)(12,"div")(13,"label",12),g(14,"Users"),m(),k(15,"p-select",13),te(16,vi,2,1,"small",14,ee),m()(),p(18,"div",11)(19,"div")(20,"label",12),g(21,"Groups"),m(),k(22,"p-select",15),te(23,ki,2,1,"small",14,ee),m()(),p(25,"div",16)(26,"p-button",17),b("onClick",function(){return d(r),u(i.onInviteUser())}),m()()()()}n&2&&(a("isSearchableInput",!0)("isFilterable",!0),ne("isDialogFilterVisible",i.isDialogFilterVisible),a("scrollable",!0),s(7),ne("visible",i.isDrawerOpen),s(3),a("formGroup",i.forms.userForm),s(5),a("disabled",i.store.hasCheckedRows())("options",i.store.metaForm().options.users)("ngClass",V(11,kt,i.isInvalid("id","userForm"))),s(),ie(i.getErrors("id","userForm")),s(6),a("options",i.store.metaForm().options.groups)("ngClass",V(13,kt,i.isInvalid("groupID","userForm"))),s(),ie(i.getErrors("id","userForm")))},dependencies:[mt,j,z,G,gt,_t,ft,ht,tt,Z,vt,fe,Qe,Oe,Ae,Be,He,Ye,Je,Xe,et,ut,dt,xt,nt,it,Ct,Le],styles:['[_nghost-%COMP%]{display:block} .p-tabs .p-tab{padding:"1rem 1.125rem"!important} .p-panel .p-panel-header{display:none!important}'],changeDetection:0})}}return t})();export{Fn as UserPageComponent};
|