dealposbooks 5.36.2 → 5.36.3
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/{chunk-AYDYX3J4.js → chunk-2CFYVQAK.js} +1 -1
- package/{chunk-7SXGBB2J.js → chunk-2LQZ4KWH.js} +1 -1
- package/{chunk-UDNPUUWO.js → chunk-4DYLPYFL.js} +1 -1
- package/{chunk-6Y7LC5K4.js → chunk-66USIUOD.js} +1 -1
- package/chunk-6EKEG6RN.js +1 -0
- package/{chunk-EVRPQUZB.js → chunk-6I5H3YGD.js} +1 -1
- package/{chunk-5L5UVIIK.js → chunk-6M3ROM2S.js} +1 -1
- package/{chunk-EA47GVMD.js → chunk-6VR5JNBD.js} +1 -1
- package/{chunk-GCTX4M5B.js → chunk-7ABLTWH5.js} +1 -1
- package/{chunk-O3JBRZF4.js → chunk-7BWZMKYR.js} +1 -1
- package/{chunk-XZQ3IYQ6.js → chunk-7INXBUUN.js} +1 -1
- package/{chunk-6SQ75ZSO.js → chunk-7QH3KK6N.js} +1 -1
- package/{chunk-5U2DQZ3P.js → chunk-A52O36YW.js} +1 -1
- package/{chunk-IQQJUFFQ.js → chunk-AA444QAF.js} +1 -1
- package/{chunk-FE4Q3L6W.js → chunk-AF7SZ7GC.js} +1 -1
- package/{chunk-LSY7PUC7.js → chunk-C5LLL3Q2.js} +1 -1
- package/{chunk-JTK43IPK.js → chunk-CQPOKER3.js} +1 -1
- package/{chunk-6DH5EZBL.js → chunk-CT4PVBTR.js} +2 -2
- package/{chunk-4AOHMAEQ.js → chunk-CV4R4TBA.js} +1 -1
- package/{chunk-VKYNOYJC.js → chunk-DOISARVN.js} +1 -1
- package/{chunk-3PPJHQQ4.js → chunk-ENIW7TNR.js} +1 -1
- package/{chunk-62S2RZ5N.js → chunk-EY42XRK4.js} +2 -2
- package/{chunk-ASZXOTXP.js → chunk-FHKTIAXX.js} +1 -1
- package/{chunk-N5RPPHA6.js → chunk-FXYYPCNX.js} +1 -1
- package/{chunk-SSZSLP4Z.js → chunk-G3SKSKOH.js} +1 -1
- package/{chunk-GTVRKYLY.js → chunk-GI246KYJ.js} +1 -1
- package/{chunk-YARD4P64.js → chunk-GIYK6BQG.js} +1 -1
- package/{chunk-FETWPNGI.js → chunk-HGXQRTWW.js} +1 -1
- package/{chunk-MQPAWXQR.js → chunk-HNKJIRE3.js} +1 -1
- package/{chunk-TB6LDOLG.js → chunk-I4PT5J7Y.js} +1 -1
- package/{chunk-SNKHWMQW.js → chunk-INB6OCHW.js} +1 -1
- package/{chunk-GI2IGVR7.js → chunk-IPYNYURM.js} +1 -1
- package/{chunk-LZSGMIGM.js → chunk-J2PXABSJ.js} +1 -1
- package/{chunk-JOLNIJ36.js → chunk-JJ4OPVUC.js} +1 -1
- package/{chunk-O75U5E6H.js → chunk-K6XRQ3BT.js} +1 -1
- package/{chunk-NSHK5C75.js → chunk-KGYYEYB3.js} +1 -1
- package/{chunk-WKBCELT6.js → chunk-KY7VHQP6.js} +1 -1
- package/{chunk-EM3AQZPZ.js → chunk-LGEAM7GG.js} +1 -1
- package/{chunk-XGCWDZO7.js → chunk-MLQD24WT.js} +1 -1
- package/{chunk-EBEP5ZNI.js → chunk-NHIRDW4W.js} +1 -1
- package/{chunk-4O47GML2.js → chunk-OEK2FZGW.js} +1 -1
- package/{chunk-6XZEYZFV.js → chunk-OWIJGDDS.js} +1 -1
- package/{chunk-WW5ELKKO.js → chunk-PXCF3E7D.js} +1 -1
- package/{chunk-YJ2QEIBF.js → chunk-QBFAXFUM.js} +1 -1
- package/{chunk-X5PP77DR.js → chunk-QUUZKSSA.js} +1 -1
- package/{chunk-4OMJSWGH.js → chunk-VG24FAJ7.js} +1 -1
- package/{chunk-7K7AJJBA.js → chunk-YIH3GJPY.js} +1 -1
- package/{chunk-XO27WEAF.js → chunk-YZSCPMW2.js} +1 -1
- package/index.html +2 -2
- package/{main-RSQGAYLC.js → main-JNWTJZEO.js} +1 -1
- package/package.json +1 -1
- package/chunk-4BKREZBV.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as kt}from"./chunk-SMZ363LC.js";import{a as Ee,b as Ie}from"./chunk-AACWH3EJ.js";import{a as Lt,b as se}from"./chunk-SNKHWMQW.js";import{a as he}from"./chunk-WW5ELKKO.js";import{b as Mt,c as nt,d as ot}from"./chunk-5XDCBC5Q.js";import{a as pe,b as me}from"./chunk-YYVQS5LF.js";import"./chunk-FLZXCWDU.js";import{b as it}from"./chunk-Q23KXB3T.js";import"./chunk-DHW7UHFT.js";import{a as te}from"./chunk-BY6QUHQI.js";import"./chunk-C2GO6SPF.js";import{a as Se,b as ve}from"./chunk-O4QM64EH.js";import{a as Ze,b as et,d as ae,k as le}from"./chunk-SVXDMOLP.js";import{a as oe,b as re}from"./chunk-S6X7PJAB.js";import"./chunk-LWLJZPBI.js";import"./chunk-3NU3P6NL.js";import{a as tt}from"./chunk-6Y7LC5K4.js";import{a as Fe}from"./chunk-XKCLERWG.js";import{b as Ce}from"./chunk-H57SDRPH.js";import"./chunk-GDX5XEV3.js";import{a as Vt,b as ye}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 ne}from"./chunk-4CDAAU6Z.js";import{e as Je,f as Qe,h as ie}from"./chunk-XZQ3IYQ6.js";import"./chunk-X22YKT5B.js";import{a as Ue,b as ee}from"./chunk-JYCUE5HV.js";import{a as P,b as We,c as Ke,d as Ye,e as $e,f as Xe}from"./chunk-JMEBBWX4.js";import"./chunk-FUZFAJGJ.js";import{n as ze,o as qe,w as Q,x as Z}from"./chunk-5FSMHZSY.js";import{b as be}from"./chunk-A5HAJEPC.js";import{b as je,e as W,f as K,g as Ft,i as rt,k as Y,l as $,o as X,u as xe,x as J}from"./chunk-G5S5AZA7.js";import{b as Pe,e as H,l as U}from"./chunk-Z45NTTES.js";import{a as Dt}from"./chunk-4AOHMAEQ.js";import{a as Oe}from"./chunk-BLQJXMNV.js";import"./chunk-F2X3VGZZ.js";import{h as Ae,k as j,p as Ge,q as z,r as q,x as Rt,y as Tt}from"./chunk-OKCHQM5Q.js";import{Ac as F,Bc as wt,Cb as b,D as Me,Ga as E,Jc as S,Kb as s,Kc as v,Lc as Be,Mc as d,Nb as Le,Pb as L,Qb as we,Sb as Re,Tb as Te,Ub as o,V as yt,Vb as r,W as Et,Wb as w,X as _e,Yc as T,Z as M,Zc as ge,_b as R,ba as It,bb as O,c as ue,cb as fe,dc as I,ec as c,gb as l,ha as C,hc as ke,pa as h,qa as x,qc as a,rc as f,s as Ve,sc as D,tc as De,vc as B,wb as k,wc as N,xc as G,yc as Ne,zc as V}from"./chunk-JP6RBSB3.js";import{a as g,b as y,c as de,e as vt}from"./chunk-YQFG5XE2.js";var A=(()=>{class t{constructor(){this.httpService=C(Dt),this.authService=C(he)}fetchGeneralLedgerLoader(e="single"){return this.httpService.get(void 0,`api/GeneralLedgerLoader/${e==="single"?"GetFilterSingle":"GetFilter"}`)}getGLCount(e){return this.httpService.post(void 0,"api/GeneralLedger/GetSingleCount",e)}fetchGeneralLedgerReport(e,i="single"){return this.httpService.post(void 0,`api/GeneralLedger/${i==="single"?"GetSingle":"Get"}`,e)}exportGeneralLedger(e,i={}){let n=g({responseType:"blob"},i);return this.httpService.post(void 0,"/api/GeneralLedgerExport/GetGeneralLedgerExport",e,n)}getCustomerSuggestions(e){let i={Prefix:e,Count:100};return this.httpService.get(this.authService.getTenantExternalURL(),"/API/AC/GetCustomerSuggestion",{params:i})}getSupplierSuggestions(e){let i={Prefix:e,Count:100};return this.httpService.get(this.authService.getTenantExternalURL(),"/API/AC/GetSupplierSuggestion",{params:i})}getCashierSuggestions(e){let i={Prefix:e,Count:100};return this.httpService.get(this.authService.getTenantExternalURL(),"/api/ac/GetUserSuggestion",{params:i})}getBalanceSheetLoader(){return this.httpService.get(void 0,"/api/BalanceSheetLoader/GetBalanceSheet")}getBalanceSheet(e,i={}){let n=new Tt({fromObject:Object.fromEntries(Object.entries(e).map(([_,Ut])=>[_,String(Ut)]))}),p=new Rt({"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"}),u=g({params:n,headers:p},i);return this.httpService.get(void 0,"/api/BalanceSheet",u)}getIncomeStatementLoader(){return this.httpService.get(void 0,"api/IncomeStatementLoader/Filter")}getIncomeStatement(e,i={}){return this.httpService.post(void 0,"api/IncomeStatement/List",g({},e),i)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=It({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var $t=()=>({width:"30vw"}),Xt=()=>({"1199px":"75vw","575px":"90vw"}),Jt=t=>["/pages/journal/journal-entry/",t],Qt=t=>({"ng-dirty ng-invalid":t});function Zt(t,m){if(t&1){let e=R();o(0,"p-button",17),I("onClick",function(){h(e);let n=c(2);return x(n.onToggleExportDialog())}),r()}}function ei(t,m){if(t&1&&(o(0,"div",14)(1,"a",15),a(2,"Return to Accounts"),r(),b(3,Zt,1,0,"p-button",16),r()),t&2){let e=c();l(3),s("ngIf",e.roleService.global.export)}}function ti(t,m){if(t&1&&(o(0,"div",14)(1,"span",24)(2,"h2",25),a(3),r()(),o(4,"span",24)(5,"h2",25),a(6),r()()()),t&2){let e=c(3);l(3),f(e.items().data.name),l(3),D(" (",e.items().data.chartOfAccountCode,") ")}}function ii(t,m){t&1&&(o(0,"tr")(1,"th",26),a(2,"Outlet"),r(),o(3,"th",26),a(4,"No."),r(),o(5,"th",26),a(6,"Date"),r(),o(7,"th"),a(8,"Contact / Note"),r(),o(9,"th",27),a(10,"Debit"),r(),o(11,"th",28),a(12,"Credit"),r(),o(13,"th",28),a(14,"Balance"),r()())}function ni(t,m){if(t&1&&(o(0,"div",31)(1,"a",32),a(2),r(),w(3,"div",34),o(4,"span",35),a(5),r()()),t&2){let e=c().$implicit,i=c(3);l(),s("href",i.authService.getTenantExternalURL()+i.buildReferenceUrl(e),fe),l(),f(e.referenceText),l(),s("innerHTML",e.journalNote,O),l(2),D("",e.note," ")}}function oi(t,m){if(t&1&&(o(0,"div",31),w(1,"span",34)(2,"div",34),o(3,"span",35),a(4),r()()),t&2){let e=c().$implicit;l(),s("innerHTML",e.referenceText,O),l(),s("innerHTML",e.journalNote,O),l(2),D("",e.note," ")}}function ri(t,m){if(t&1&&(o(0,"tr")(1,"td",29),a(2),r(),o(3,"td",29)(4,"a",30),a(5),r()(),o(6,"td",29),a(7),S(8,"date"),r(),o(9,"td",29)(10,"div",31)(11,"a",32),a(12),r(),b(13,ni,6,4,"div",31)(14,oi,5,3,"div",31),r()(),o(15,"td",33),a(16),S(17,"number"),r(),o(18,"td",33),a(19),S(20,"number"),r(),o(21,"td",33),a(22),S(23,"number"),r()()),t&2){let e=m.$implicit,i=c(3);l(2),f(e.outletName),l(2),s("routerLink",F(19,Jt,e.id)),l(),f(e.number),l(2),f(Be(8,10,e.date,"dd MMM yyyy")),l(4),s("href",i.authService.getTenantExternalURL()+"/menu/Contacts/Contact/Customers/Info?ID="+e.contactID,fe),l(),f(e.contactName),l(),L(i.buildReferenceUrl(e)?13:14),l(3),D(" ",v(17,13,e.debitAmount)," "),l(3),D(" ",v(20,15,e.creditAmount)," "),l(3),f(v(23,17,e.balance))}}function ai(t,m){if(t&1&&(o(0,"tr"),w(1,"td",36),o(2,"td",37),a(3,"Total"),r(),o(4,"td",37),a(5),S(6,"number"),r(),o(7,"td",37),a(8),S(9,"number"),r(),w(10,"td"),r()),t&2){let e=c(3);l(5),f(v(6,2,e.debitSubTotal())),l(3),D(" ",v(9,4,e.creditSubTotal())," ")}}function li(t,m){t&1&&(o(0,"tr")(1,"td",38)(2,"span"),a(3,"No records found."),r()()())}function pi(t,m){if(t&1){let e=R();o(0,"button",39),I("click",function(){h(e);let n=c(3);return x(n.getGLCount())})("keyup.enter",function(){h(e);let n=c(3);return x(n.getGLCount())}),r()}}function mi(t,m){if(t&1&&a(0),t&2){let e=c(3);D(" ",e.count()," ")}}function si(t,m){if(t&1){let e=R();o(0,"div",19)(1,"p-table",20),b(2,ti,7,2,"ng-template",null,5,d)(4,ii,15,0,"ng-template",null,6,d)(6,ri,24,21,"ng-template",null,7,d)(8,ai,11,6,"ng-template",null,4,d)(10,li,4,0,"ng-template",null,8,d),r(),o(12,"div",21)(13,"div"),a(14),b(15,pi,1,0,"button",22)(16,mi,1,1),a(17," entries "),r(),o(18,"div",14)(19,"p-button",23),I("onClick",function(){h(e);let n=c(2);return x(n.onNextPage())}),r()()()()}if(t&2){let e=c(2);l(),s("value",e.items().data.data),l(13),De(" Showing ",e.pagination().first," to ",e.pagination().end," of "),l(),L(e.totalRecords()===-1?15:16),l(4),s("disabled",!e.pagination().hasNext)}}function ci(t,m){if(t&1&&b(0,si,20,5,"div",18),t&2){let e=c();s("ngIf",e.items()&&e.items().data)}}function di(t,m){if(t&1&&(o(0,"div",14)(1,"div",24)(2,"span",58),a(3),r()(),o(4,"div")(5,"span"),a(6,"-"),r()(),o(7,"div",24)(8,"span",59),a(9),r()()()),t&2){let e=m.$implicit;l(3),D("(",e.code,")"),l(6),f(e.name)}}function ui(t,m){if(t&1&&(o(0,"div",14)(1,"div",24)(2,"span",58),a(3),r()(),o(4,"div")(5,"span"),a(6,"-"),r()(),o(7,"div",24)(8,"span",59),a(9),r()()()),t&2){let e=m.$implicit;l(3),D("(",e.code,")"),l(6),f(e.name)}}function _i(t,m){t&1&&(o(0,"div",60),a(1," Account is required. "),r())}function fi(t,m){if(t&1&&(o(0,"div",61)(1,"div"),a(2),r()()),t&2){let e=m.$implicit;l(2),f(e.value)}}function gi(t,m){if(t&1&&(o(0,"div",51)(1,"div",52),w(2,"p-radiobutton",62),o(3,"label",63),a(4),r()()()),t&2){let e=m.$implicit;l(2),s("value",e.key)("inputId",e.key),l(),ke("for",e.key),l(),f(e.value)}}function hi(t,m){if(t&1){let e=R();o(0,"div",31)(1,"label",42),a(2,"Customer"),r(),o(3,"p-autocomplete",64),I("completeMethod",function(n){h(e);let p=c(3);return x(p.searchCustomer(n))}),r()()}if(t&2){let e=c(3);l(3),s("suggestions",e.customerSuggestions())}}function xi(t,m){if(t&1){let e=R();o(0,"div",31)(1,"label",42),a(2,"Supplier"),r(),o(3,"p-autocomplete",65),I("completeMethod",function(n){h(e);let p=c(3);return x(p.searchSupplier(n))}),r()()}if(t&2){let e=c(3);l(3),s("suggestions",e.supplierSuggestions())}}function bi(t,m){if(t&1){let e=R();o(0,"div",31)(1,"label",42),a(2,"Customer"),r(),o(3,"p-autocomplete",64),I("completeMethod",function(n){h(e);let p=c(3);return x(p.searchCustomer(n))}),r()()}if(t&2){let e=c(3);l(3),s("suggestions",e.customerSuggestions())}}function Ci(t,m){if(t&1){let e=R();o(0,"form",41)(1,"div",31)(2,"label",42),a(3,"Accounts"),r(),o(4,"p-select",43),I("onChange",function(n){h(e);let p=c(2);return x(p.onAccountChange(n))}),b(5,di,10,2,"ng-template",null,9,d)(7,ui,10,2,"ng-template",null,10,d),r(),b(9,_i,2,0,"div",44),r(),o(10,"div",31)(11,"label",42),a(12,"From"),r(),o(13,"div",45),w(14,"p-datepicker",46)(15,"p-datepicker",47),r()(),o(16,"div",31)(17,"label",42),a(18,"Outlets"),r(),o(19,"p-multiselect",48),b(20,fi,3,1,"ng-template",null,10,d),r()(),o(22,"div",31)(23,"label",49),a(24,"Contact Type"),r(),o(25,"div",50),Re(26,gi,5,4,"div",51,we),r()(),o(28,"div",31)(29,"label",49),a(30,"Sort order"),r(),o(31,"div",50)(32,"div",51)(33,"div",52),w(34,"p-radiobutton",53),o(35,"label",54),a(36,"Asc"),r()()(),o(37,"div",55)(38,"div",52),w(39,"p-radiobutton",56),o(40,"label",57),a(41,"Desc"),r()()()()(),b(42,hi,4,1,"div",31)(43,xi,4,1,"div",31)(44,bi,4,1,"div",31),r()}if(t&2){let e,i,n,p=c(2);s("formGroup",p.form),l(4),s("virtualScroll",!0)("virtualScrollItemSize",50)("options",p.loaderMetadata().options.accounts)("ngClass",F(16,Qt,((e=p.form.get("accountID"))==null?null:e.invalid)&&(((e=p.form.get("accountID"))==null?null:e.touched)||((e=p.form.get("accountID"))==null?null:e.dirty)))),l(5),s("ngIf",((i=p.form.get("accountID"))==null?null:i.invalid)&&(((i=p.form.get("accountID"))==null?null:i.touched)||((i=p.form.get("accountID"))==null?null:i.dirty))),l(5),s("iconDisplay","input")("showIcon",!0),l(),s("iconDisplay","input")("showIcon",!0),l(4),s("virtualScroll",!0)("virtualScrollItemSize",50)("options",p.loaderMetadata().options.outlets),l(7),Te(p.loaderMetadata().options.contactTypeOptions),l(8),s("value",!0),l(5),s("value",!1),l(3),L((n=p.form.controls.contactType.value)===1?42:n===2?43:44)}}function Si(t,m){if(t&1&&b(0,Ci,45,18,"form",40),t&2){let e=c();s("ngIf",e.loaderMetadata())}}function vi(t,m){if(t&1&&(o(0,"div",66)(1,"div",67)(2,"div",68)(3,"div",50)(4,"div",69)(5,"label",49),a(6,"Page"),r()(),o(7,"div",69),w(8,"input",70),r()()()(),o(9,"div",71)(10,"div",52),w(11,"i",72),o(12,"span",73),a(13),S(14,"number"),S(15,"number"),r()()()()),t&2){let e=c();l(),s("formGroup",e.form),l(12),De("Exporting data from ",v(14,3,e.filter().exportPageNumber)," - ",v(15,5,e.filter().exportRowCount),"")}}function yi(t,m){if(t&1){let e=R();o(0,"p-button",74),I("onClick",function(){h(e);let n=c();return x(n.onToggleExportDialog())}),r()}t&2&&s("rounded",!0)("text",!0)}function Ei(t,m){if(t&1){let e=R();o(0,"p-button",75),I("click",function(){h(e);let n=c();return x(n.onToggleExportDialog())}),r(),o(1,"p-button",76),I("click",function(){h(e);let n=c();return x(n.onExport())}),r()}}var Bt=(()=>{class t{getGLCount(){this.reportService.getGLCount(this.filter()).pipe(M(({count:e})=>{this.totalRecords.set(e)})).subscribe()}onToggleExportDialog(){this.isDialogExportVisible.update(e=>!e)}get pageTitle(){return this.items()&&this.items().pageTitle?this.items().pageTitle:"General Ledger"}constructor(){this.reportService=C(A),this.route=C(Pe),this.roleService=C(te),this.authService=C(he),this.fb=C(xe),this.coaService=C(tt),this.toastr=C(Oe),this.dayjsService=C(se),this.infinity=1/0,this.metadata=E(null),this.items=E(null),this.totalRecords=E(-1),this.dialogFilterVisible=E(!0),this.initDialogVisible=E(!1),this.isDialogExportVisible=E(!1),this.customerSuggestions=E([]),this.supplierSuggestions=E([]),this.categoriesOptions=E([]),this.localFilter=E({}),this.count=T(()=>this.totalRecords()<0?1/0:this.totalRecords()),this.pagination=T(()=>{let e=this.filter(),i=this.totalRecords()!=null&&this.totalRecords()>=0?this.totalRecords():1/0,n=Math.min(e.pageNumber*e.pageSize,isFinite(i)?i:e.pageNumber*e.pageSize);return{first:1,end:e.pageSize>0?n:0,total:i,page:e.pageNumber,pageSize:e.pageSize,hasPrev:e.pageNumber>1,hasNext:isFinite(i)?e.pageNumber*e.pageSize<i:!0}}),this.loaderMetadata=be(this.reportService.fetchGeneralLedgerLoader(),{initialValue:null}),this.baseFilter=T(()=>{let e=this.loaderMetadata();return e?e.filter:null}),this.exportFileTypes=E([{key:0,value:"CSV"},{key:1,value:"Excel"}]),this.queryFilter=be(this.route.queryParamMap.pipe(Ve(e=>({accountID:e.get("id"),to:e.get("to")}))),{initialValue:null}),this.filter=T(()=>{let e=this.baseFilter(),i=this.queryFilter(),n=this.localFilter();return e?g(g(g({},e),i??{}),n):null}),this.creditSubTotal=T(()=>(this.items()?.data?.data??[]).reduce((i,n)=>i+(Number(n.creditAmount)||0),0)),this.debitSubTotal=T(()=>(this.items()?.data?.data??[]).reduce((i,n)=>i+(Number(n.debitAmount)||0),0)),this.hasNextPage=T(()=>{let e=this.filter();if(!e)return!1;let i=Math.ceil(e.rowCount/e.pageSize);return e.pageNumber<i}),this.initializeForm(),ge(()=>{let e=this.filter();e&&e.accountID&&(this.form.patchValue(this.transformFilterToFormValue(e),{emitEvent:!1}),this.reportService.fetchGeneralLedgerReport(e).subscribe(i=>{this.items.update(n=>e.pageNumber===1?i:y(g({},i),{data:y(g({},i.data),{data:[...n?.data.data??[],...i.data.data]})}))}))})}buildReferenceUrl(e){return kt(e)}ngOnInit(){this.route.queryParamMap.pipe(Me(e=>e.keys.length>0)).subscribe({next:()=>this.initDialogVisible.set(!0)})}initializeForm(){this.form=this.fb.group({accountID:this.fb.control(null),from:this.fb.control(null),to:this.fb.control(new Date),contactType:this.fb.control(null),contactID:this.fb.control(""),listOutletID:this.fb.control([]),pageNumber:this.fb.control(1),pageSize:this.fb.control(50),sortAscending:this.fb.control(!0),listAccountID:this.fb.control([]),rowCount:this.fb.control(0),export:this.fb.control(!1),exportPageNumber:this.fb.control(1),exportRowCount:this.fb.control(0)})}findNodeByKey(e,i){for(let n of e){if(n.key===i)return n;if(n.children){let p=this.findNodeByKey(n.children,i);if(p)return p}}return null}transformFilterToFormValue(e){return Object.entries(e).reduce((i,[n,p])=>{switch(n){case"from":break;case"to":i[n]=p&&(typeof p=="string"||typeof p=="number"||p instanceof Date)?this.dayjsService.from(p)?.toDate():this.dayjsService.now.toDate();break;case"listCategoryID":Array.isArray(p)?i[n]=p.map(u=>this.findNodeByKey(this.categoriesOptions(),u)).filter(u=>!!u):i[n]=[];break;case"listOutletID":case"listAccountID":i[n]=Array.isArray(p)?p:[];break;case"pageNumber":case"pageSize":case"rowCount":case"exportPageNumber":case"exportRowCount":i[n]=p!=null?Number(p):0;break;case"sortAscending":case"export":i[n]=!!p;break;case"contactType":i[n]=p!=null?Number(p):null;break;default:i[n]=p}return i},{})}clearContactValueOnContactTypeChange(){this.form.get("contactType")?.valueChanges.subscribe(()=>this.form.get("contactID")?.setValue(""))}isEmpty(e){return e==null||typeof e=="string"&&e.trim().length===0}onCategoryFocus(){this.coaService.getCachedCategoriesOptions().pipe(M(e=>this.categoriesOptions.set(e))).subscribe()}searchCustomer(e){this.reportService.getCustomerSuggestions(e.query).pipe(M(i=>this.customerSuggestions.set(i))).subscribe()}searchSupplier(e){this.reportService.getSupplierSuggestions(e.query).pipe(M(i=>this.supplierSuggestions.set(i))).subscribe()}onAccountChange(e){Array.isArray(e.value)&&e.value.length>=1&&this.toastr.warning("Please select at least 1 accounts for the general ledger report.","Warning")}onFilterOKEvent(){if(this.form.invalid){this.form.markAllAsTouched(),this.dialogFilterVisible.set(!0);return}let e=this.buildFilterBody();this.dialogFilterVisible.set(!1),this.localFilter.set(e)}buildFilterBody(){let p=this.form.getRawValue(),{from:e,to:i}=p,n=de(p,["from","to"]);return y(g({},this.filter()),{pageNumber:n.pageNumber,pageSize:n.pageSize,sortAscending:n.sortAscending,accountID:n.accountID,contactID:n.contactID?.length===0?null:n.contactID,listOutletID:n.listOutletID??[],listAccountID:n.listAccountID??[],from:this.dayjsService.from(e)?this.dayjsService.format(e):null,to:this.dayjsService.from(i)?this.dayjsService.format(i):null,contactType:n.contactType})}onExport(){let e=this.buildExportBody();this.performExport(e)}performExport(e){this.reportService.exportGeneralLedger(e,{responseType:"blob",observe:"response"}).pipe(M(i=>this.handleExportResponse(i))).subscribe()}handleExportResponse(e){let i=e.headers,n=i.get("Content-Disposition")??i.get("content-disposition"),p="download.csv";if(n){let _=n.match(/filename\*?=(?:UTF-8'')?"?([^;\r\n"]+)/i);_?.[1]&&(p=decodeURIComponent(_[1].replace(/"/g,"")))}let u=e.body;ot(u,p,u.type)}buildExportBody(){let p=this.form.value,{from:e,to:i}=p,n=de(p,["from","to"]);return y(g({},this.filter()),{exportPageNumber:+n.exportPageNumber,pageNumber:n.pageNumber,pageSize:n.pageSize,sortAscending:n.sortAscending,accountID:n.accountID,contactID:n.contactID?.length===0?null:n.contactID,listOutletID:n.listOutletID??[],listAccountID:n.listAccountID??[],from:this.dayjsService.from(e)?this.dayjsService.format(e):null,to:this.dayjsService.from(i)?this.dayjsService.format(i):null,contactType:n.contactType,export:!0})}onNextPage(){this.localFilter.update(e=>{let i=e.pageNumber??this.baseFilter()?.pageNumber??1;return y(g({},e),{pageNumber:i+1,balance:this.items().data.data[this.items().data.data.length-1]?.balance??0})})}onPrevPage(){this.localFilter.update(e=>{let i=e.pageNumber??this.baseFilter()?.pageNumber??1;return y(g({},e),{pageNumber:Math.max(1,i-1)})})}goToPage(e){this.localFilter.update(i=>y(g({},i),{pageNumber:e}))}goToLastPage(){let e=this.filter();if(!e)return;let i=this.totalRecords();if(i===-1||!isFinite(i)){this.toastr.info("Please load total records before going to the last page","Info");return}let n=Math.ceil(i/e.pageSize);if(e.pageNumber>=n){this.toastr.warning("You are already on the last page","Warning");return}this.localFilter.update(p=>y(g({},p),{pageNumber:n}))}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=k({type:t,selectors:[["app-report-general-ledger"]],decls:13,vars:13,consts:[["actionButton",""],["content",""],["filters",""],["closeIconTemplate",""],["footer",""],["caption",""],["header",""],["body",""],["emptymessage",""],["selectedItem",""],["item",""],[3,"isDialogFilterVisibleChange","isInitDialogFilterVisibleChange","filterConfirmed","pageTitle","isDialogFilterVisible","isFilterable","isInitDialogFilterVisible","scrollable"],["header","Export Journal Entry",3,"visibleChange","modal","visible","breakpoints"],["class","d-flex flex-column gap-3",4,"ngIf"],[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 h-100 bg-white border-top",4,"ngIf"],[1,"px-3","h-100","bg-white","border-top"],[3,"value"],[1,"d-flex","justify-content-between","align-items-center","my-2"],["type","button","aria-label","Get journal entry count","tabindex","0",1,"fa-solid","fa-circle-question","cursor-pointer","p-0","border-0","bg-transparent"],["variant","outlined","severity","secondary","icon","fa-solid fa-angle-right","size","small","label","next",3,"onClick","disabled"],[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"],[1,"text-end","text-break"],[3,"innerHTML"],[2,"width","300px","white-space","normal","word-break","break-word"],["colspan","3"],[1,"text-end","fw-semibold"],["colspan","8"],["type","button","aria-label","Get journal entry count","tabindex","0",1,"fa-solid","fa-circle-question","cursor-pointer","p-0","border-0","bg-transparent",3,"click","keyup.enter"],["class","d-flex flex-column row-gap-3",3,"formGroup",4,"ngIf"],[1,"d-flex","flex-column","row-gap-3",3,"formGroup"],["for","outlet"],["showClear","","filter","","filterBy","code,name","display","chip","formControlName","accountID","appendTo","body","optionLabel","name","optionValue","id","placeholder","Select Accounts",3,"onChange","virtualScroll","virtualScrollItemSize","options","ngClass"],["class","text-danger",4,"ngIf"],[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"],["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,"text-danger"],[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"],[1,"d-flex","flex-column","gap-3"],[1,"row",3,"formGroup"],[1,"col-8"],[1,"col"],["type","text","formControlName","exportPageNumber","fluid","","pInputText","","pSize","small"],["role","alert",1,"alert","alert-primary","m-0","p-2"],[1,"fa-solid","fa-circle-info"],[1,"fs-2","text-dark","fw-semibold"],["severity","secondary","variant","outlined","icon","fa-solid fa-xmark",3,"onClick","rounded","text"],["label","Cancel","severity","secondary","variant","outlined",3,"click"],["label","OK (F2)",3,"click"]],template:function(i,n){if(i&1){let p=R();o(0,"app-main-panel",11),G("isDialogFilterVisibleChange",function(_){return h(p),N(n.dialogFilterVisible,_)||(n.dialogFilterVisible=_),x(_)})("isInitDialogFilterVisibleChange",function(_){return h(p),N(n.initDialogVisible,_)||(n.initDialogVisible=_),x(_)}),I("filterConfirmed",function(){return h(p),x(n.onFilterOKEvent())}),b(1,ei,4,1,"ng-template",null,0,d)(3,ci,1,1,"ng-template",null,1,d)(5,Si,1,1,"ng-template",null,2,d),r(),o(7,"p-dialog",12),G("visibleChange",function(_){return h(p),N(n.isDialogExportVisible,_)||(n.isDialogExportVisible=_),x(_)}),b(8,vi,16,7,"div",13)(9,yi,1,2,"ng-template",null,3,d)(11,Ei,2,0,"ng-template",null,4,d),r()}i&2&&(s("pageTitle",n.pageTitle),B("isDialogFilterVisible",n.dialogFilterVisible),s("isFilterable",!0),B("isInitDialogFilterVisible",n.initDialogVisible),s("scrollable",!0),l(7),Le(V(11,$t)),s("modal",!0),B("visible",n.isDialogExportVisible),s("breakpoints",V(12,Xt)),l(),s("ngIf",n.form&&n.filter()))},dependencies:[ie,q,Ae,j,z,Ge,ne,le,ae,Qe,Je,Z,Q,ye,Vt,re,oe,Ie,Ee,J,Y,je,W,K,$,X,me,pe,Ce,He,nt,it,ee,U,H,et,Ze,qe,ze],styles:["[_nghost-%COMP%] .p-datatable .p-datatable-header{padding:.75rem 1rem .75rem 0}"],changeDetection:0})}}return t})();var Ii={data:{},filter:{EntityID:[],CashierID:null,Text:null,from:null,to:null},isLoading:!0,loader:{options:{outlets:[]},filter:{from:"",to:"",outletID:[]},roles:{isInRoleEmptyOutlet:!1}}},ut=We(Xe(Ii),Ke(t=>{let m={totalCOGS:T(()=>{let e=t.data()?.data?.cogs;return Array.isArray(e)?e.reduce((i,n)=>i+(n?.amount??0),0):0}),totalRevenue:T(()=>{let e=t.data()?.data?.revenue;return Array.isArray(e)?e.reduce((i,n)=>i+(n?.amount??0),0):0}),totalExpense:T(()=>{let e=t.data()?.data?.expense;return Array.isArray(e)?e.reduce((i,n)=>i+(n?.amount??0),0):0}),grossProfit:T(()=>Array.isArray(t.data()?.data?.cogs)&&Array.isArray(t.data()?.data?.revenue)?m.totalRevenue()-m.totalCOGS():0),profitOrLoss:T(()=>m.totalRevenue()-m.totalCOGS()-m.totalExpense()),isDataEmpty:T(()=>Object.keys(t.data()?.data??{}).length===0)};return m}),$e(t=>{let m=C(A),e=C(se),i={updateFilter(n){P(t,p=>y(g({},p),{filter:g(g({},p.filter),n)}))},getLoader:Se(ue(_e(()=>m.getIncomeStatementLoader().pipe(ve({next:n=>{P(t,p=>y(g({},p),{loader:n,filter:y(g({},p.filter),{from:e.from(n.filter.from).format(),to:e.from(n.filter.to).format()})})),i.getIncomeStatement(t.filter)},error:n=>{console.error(n)}}))))),getIncomeStatement:Se(ue(_e(n=>m.getIncomeStatement(n).pipe(Et(()=>P(t,p=>y(g({},p),{isLoading:!0}))),ve({next:p=>{P(t,u=>y(g({},u),{data:p,isLoading:!1}))},error:p=>{console.error(p)}})))))};return i}),Ye({onInit:t=>{t.getLoader()}}));var _t=()=>({}),ft=t=>["/pages/chart-of-account/account/",t],gt=()=>["/pages/report/general-ledger"],ht=t=>({id:t});function Ri(t,m){if(t&1){let e=R();o(0,"p-button",10),I("onClick",function(){h(e);let n=c(2);return x(n.onExport())}),r()}}function Ti(t,m){if(t&1&&(o(0,"div",8),b(1,Ri,1,0,"p-button",9),r()),t&2){let e=c();l(),s("ngIf",e.roleService.global.export)}}function Di(t,m){t&1&&(o(0,"tr")(1,"th",14),a(2,"Code"),r(),o(3,"th",15),a(4,"Name"),r(),o(5,"th",16),a(6,"Total"),r()())}function Fi(t,m){if(t&1&&(o(0,"tr")(1,"td"),a(2),r(),o(3,"td")(4,"a",17),a(5),r()(),o(6,"td",16)(7,"a",18),a(8),S(9,"number"),r()()()),t&2){let e=m.$implicit;l(2),f(e.code),l(2),s("routerLink",F(8,ft,e.accountID)),l(),f(e.name),l(2),s("routerLink",V(10,gt))("queryParams",F(11,ht,e.accountID)),l(),f(v(9,6,e.amount))}}function Vi(t,m){if(t&1&&(o(0,"tr")(1,"td",19)(2,"div",20)(3,"span",21),a(4,"Total Revenue :"),r(),o(5,"span",22),a(6),S(7,"number"),r()()()()),t&2){let e=c(3);l(6),f(v(7,1,e.store.totalRevenue()))}}function Mi(t,m){t&1&&(o(0,"tr")(1,"td",23)(2,"span"),a(3,"No revenue records available"),r()()())}function Li(t,m){if(t&1&&(o(0,"h6",12),a(1,"Revenue"),r(),o(2,"p-table",13),b(3,Di,7,0,"ng-template",null,3,d)(5,Fi,10,13,"ng-template",null,4,d)(7,Vi,8,3,"ng-template",null,5,d)(9,Mi,4,0,"ng-template",null,6,d),r()),t&2){let e,i=c(2);l(2),s("value",(e=i.store.data())==null||e.data==null?null:e.data.revenue)}}function ki(t,m){t&1&&(o(0,"tr")(1,"th",14),a(2,"Code"),r(),o(3,"th",15),a(4,"Name"),r(),o(5,"th",24),a(6,"Total"),r()())}function Ni(t,m){if(t&1&&(o(0,"tr")(1,"td"),a(2),r(),o(3,"td")(4,"a",17),a(5),r()(),o(6,"td",16)(7,"a",18),a(8),S(9,"number"),r()()()),t&2){let e=m.$implicit;l(2),f(e.code),l(2),s("routerLink",F(8,ft,e.accountID)),l(),f(e.name),l(2),s("routerLink",V(10,gt))("queryParams",F(11,ht,e.accountID)),l(),f(v(9,6,e.amount))}}function Bi(t,m){if(t&1&&(o(0,"tr")(1,"td",19)(2,"div",20)(3,"span",21),a(4,"Total COGS :"),r(),o(5,"span",22),a(6),S(7,"number"),r()()()(),o(8,"tr")(9,"td",19)(10,"div",20)(11,"span",21),a(12,"Gross Profit :"),r(),o(13,"span",22),a(14),S(15,"number"),r()()()()),t&2){let e=c(3);l(6),f(v(7,2,e.store.totalCOGS())),l(8),f(v(15,4,e.store.grossProfit()))}}function Ai(t,m){t&1&&(o(0,"tr")(1,"td",23)(2,"span"),a(3,"No COGS records available"),r()()())}function Gi(t,m){if(t&1&&(o(0,"h4",12),a(1,"COGS"),r(),o(2,"p-table",13),b(3,ki,7,0,"ng-template",null,3,d)(5,Ni,10,13,"ng-template",null,4,d)(7,Bi,16,6,"ng-template",null,5,d)(9,Ai,4,0,"ng-template",null,6,d),r()),t&2){let e,i=c(2);l(2),s("value",(e=i.store.data())==null||e.data==null?null:e.data.cogs)}}function Pi(t,m){t&1&&(o(0,"tr")(1,"th",14),a(2,"Code"),r(),o(3,"th",15),a(4,"Name"),r(),o(5,"th",16),a(6,"Total"),r()())}function Oi(t,m){if(t&1&&(o(0,"tr")(1,"td"),a(2),r(),o(3,"td")(4,"a",17),a(5),r()(),o(6,"td",16)(7,"a",18),a(8),S(9,"number"),r()()()),t&2){let e=m.$implicit;l(2),f(e.code),l(2),s("routerLink",F(8,ft,e.accountID)),l(),f(e.name),l(2),s("routerLink",V(10,gt))("queryParams",F(11,ht,e.accountID)),l(),f(v(9,6,e.amount))}}function ji(t,m){if(t&1&&(o(0,"tr")(1,"td",19)(2,"div",20)(3,"span",21),a(4,"Total Expense :"),r(),o(5,"span",22),a(6),S(7,"number"),r()()()(),o(8,"tr")(9,"td",19)(10,"div",20)(11,"span",21),a(12,"Profit / Loss :"),r(),o(13,"span",22),a(14),S(15,"number"),r()()()()),t&2){let e=c(3);l(6),f(v(7,2,e.store.totalExpense())),l(8),f(v(15,4,e.store.profitOrLoss()))}}function zi(t,m){t&1&&(o(0,"tr")(1,"td",23)(2,"span"),a(3,"No expense records available"),r()()())}function qi(t,m){if(t&1&&(o(0,"h4",12),a(1,"Expense"),r(),o(2,"p-table",13),b(3,Pi,7,0,"ng-template",null,3,d)(5,Oi,10,13,"ng-template",null,4,d)(7,ji,16,6,"ng-template",null,5,d)(9,zi,4,0,"ng-template",null,6,d),r()),t&2){let e,i=c(2);l(2),s("value",(e=i.store.data())==null||e.data==null?null:e.data.expense)}}function Hi(t,m){if(t&1&&(o(0,"p-panel")(1,"div",11),b(2,Li,11,1)(3,Gi,11,1)(4,qi,11,1),r()()),t&2){let e,i,n,p=c();l(2),L(p.Object.keys((e=p.store.data().data)!==null&&e!==void 0?e:V(3,_t)).length>0?2:-1),l(),L(p.Object.keys((i=(i=p.store.data().data)==null?null:i.cogs)!==null&&i!==void 0?i:V(4,_t)).length>0?3:-1),l(),L(p.Object.keys((n=(n=p.store.data().data)==null?null:n.expense)!==null&&n!==void 0?n:V(5,_t)).length>0?4:-1)}}function Ui(t,m){if(t&1){let e=R();o(0,"form",25)(1,"div",26)(2,"label",27),a(3,"Outlet"),r(),w(4,"p-multiselect",28),r(),o(5,"div",26)(6,"label",27),a(7,"Cashier"),r(),o(8,"p-autocomplete",29),I("completeMethod",function(n){h(e);let p=c();return x(p.onCashierSearch(n))})("onSelect",function(n){h(e);let p=c();return x(p.onCashierSelect(n))}),r()(),o(9,"div",26)(10,"label",30),a(11,"From - To"),r(),o(12,"div",31),w(13,"p-datepicker",32)(14,"p-datepicker",33),r()()()}if(t&2){let e=c();s("formGroup",e.formFilter),l(4),s("virtualScroll",!0)("virtualScrollItemSize",50)("options",e.store.loader().options.outlets)("showClear",!0),l(4),s("showClear",!0)("suggestions",e.cashierSuggestions())("showClear",!0),l(5),s("iconDisplay","input")("showIcon",!0),l(),s("iconDisplay","input")("showIcon",!0)}}var At=(()=>{class t{constructor(){this.dayjsService=C(se),this.store=C(ut),this.fb=C(xe),this.reportService=C(A),this.roleService=C(te),this.isInitDialogFilterVisible=E(!1),this.dialogFilterVisible=E(!1),this.cashierSuggestions=E([]),this.cashierHashMap=new Map,this.Object=Object,ge(()=>{this.store.filter()&&this.initForm()})}ngOnInit(){this.initForm(),console.log(this.cashierHashMap.entries())}onSearch(e){this.store.updateFilter(y(g({},this.store.filter()),{Text:e}))}onCashierSearch(e){this.reportService.getCashierSuggestions(e.query).pipe(Fe("Cashier Suggestions"),M(i=>this.cashierSuggestions.set(i))).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(),i=Object.entries(e).reduce((n,[p,u])=>(p==="from"||p==="to"?u instanceof Date&&(n[p]=this.dayjsService.from(u).format()):n[p]=u||null,n),{});this.store.updateFilter(g(g({},this.store.filter()),i)),this.dialogFilterVisible.update(n=>!n),console.log("body",e)}onCashierSelect(e){console.log("Cashier selected:",e),!this.cashierHashMap.has(e.value.Key)&&(this.cashierHashMap.set(e.value.Key,e.value.Value),console.log("Cashier HashMap:",this.cashierHashMap))}onExport(){let e=y(g({},this.store.filter()),{export:!0,ExportPageNumber:1,ExportRowCount:1e4});this.reportService.getIncomeStatement(e,{responseType:"blob"}).pipe(Fe("Export Profit & Loss"),M(i=>{let n=i.type,p=[i],u=document.createElement("a");u.href=window.URL.createObjectURL(new Blob(p,{type:n}));let _=`profit-and-loss.${n.split("/")[1]}`;u.setAttribute("download",_),document.body.appendChild(u),u.click(),document.body.removeChild(u)})).subscribe()}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=k({type:t,selectors:[["app-report-income-statement"]],features:[Ne([ut])],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(i,n){if(i&1){let p=R();o(0,"app-main-panel",7),G("isDialogFilterVisibleChange",function(_){return h(p),N(n.dialogFilterVisible,_)||(n.dialogFilterVisible=_),x(_)})("isInitDialogFilterVisibleChange",function(_){return h(p),N(n.isInitDialogFilterVisible,_)||(n.isInitDialogFilterVisible=_),x(_)}),I("filterConfirmed",function(){return h(p),x(n.onFilterOK())}),b(1,Ti,2,1,"ng-template",null,0,d)(3,Hi,5,6,"ng-template",null,1,d)(5,Ui,15,12,"ng-template",null,2,d),r()}i&2&&(s("isFilterable",!0)("pageTitle",n.store.data().pageTitle),B("isDialogFilterVisible",n.dialogFilterVisible)("isInitDialogFilterVisible",n.isInitDialogFilterVisible),s("scrollable",!0))},dependencies:[ie,q,j,z,ye,re,oe,J,Y,W,K,$,X,me,pe,ne,le,ae,ee,Ue,U,H,Ie,Ee,Z,Q],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var xt=vt(Lt());var Wi={metadata:{options:{outlets:[]},filter:{to:"",outletID:[]},roles:{isInRoleEmptyOutlet:!1}},data:{asset:[],liability:[],equity:[],pageTitle:""},filter:{date:(0,xt.default)().format("YYYY-MM-DD"),listOutletParam:[]}},bt=We(Xe(Wi),Ke(t=>({totalAsset:T(()=>t.data().asset.reduce((m,e)=>m+ +e.amount,0)),totalLiability:T(()=>t.data().liability.reduce((m,e)=>m+ +e.counterAmount,0)),totalEquity:T(()=>t.data().equity.reduce((m,e)=>m+ +e.counterAmount,0))})),$e(t=>{let m=C(A),e={updateFilter:i=>{P(t,n=>y(g({},n),{filter:i}))},fetchBalanceSheet:Se(ue(Me(()=>{let i=t.filter();return Object.entries(i).every(([n,p])=>p!=null&&p!=="")}),_e(i=>m.getBalanceSheet(i).pipe(ve({next:n=>{P(t,p=>y(g({},p),{data:n}))},error:n=>{console.error(n)}}))),yt(1))),fetchLoader:Se(ue(_e(()=>m.getBalanceSheetLoader().pipe(ve({next:i=>{P(t,n=>y(g({},n),{metadata:i,filter:{date:(0,xt.default)(i.filter.to).format("YYYY-MM-DD")}})),e.fetchBalanceSheet(t.filter)},error:i=>{console.error(i)}})))))};return e}),Ye(t=>({onInit:()=>{t.fetchLoader()}})));var Gt=vt(Lt());var Ct=t=>["/pages/chart-of-account/account/",t],St=()=>["/pages/report/general-ledger"],Ki=(t,m)=>({id:t,to:m}),Pt=t=>({id:t});function Yi(t,m){if(t&1){let e=R();o(0,"p-button",11),I("onClick",function(){h(e);let n=c(2);return x(n.onExport())}),r()}}function $i(t,m){if(t&1&&(o(0,"div",9),b(1,Yi,1,0,"p-button",10),r()),t&2){let e=c();l(),s("ngIf",e.roleService.global.export)}}function Xi(t,m){t&1&&(o(0,"tr")(1,"th",16),a(2,"Code"),r(),o(3,"th"),a(4,"Asset"),r(),o(5,"th",17),a(6,"Total"),r()())}function Ji(t,m){if(t&1&&(o(0,"tr")(1,"td"),a(2),r(),o(3,"td")(4,"a",18),a(5),r()(),o(6,"td",19)(7,"a",20),a(8),S(9,"number"),r()()()),t&2){let e=m.$implicit,i=c(3);l(2),f(e.code),l(2),s("routerLink",F(8,Ct,e.accountID)),l(),f(e.name),l(2),s("routerLink",V(10,St))("queryParams",wt(11,Ki,e.accountID,i.store.filter().date)),l(),f(v(9,6,e.amount))}}function Qi(t,m){if(t&1&&(o(0,"tr")(1,"td",21),a(2,"Total Asset"),r(),o(3,"td",22),a(4),S(5,"number"),r()()),t&2){let e=c(3);l(4),D(" ",v(5,1,e.store.totalAsset())," ")}}function Zi(t,m){t&1&&(o(0,"tr")(1,"td",23)(2,"span"),a(3,"No asset records found."),r()()())}function en(t,m){if(t&1&&(o(0,"h4",14),a(1,"Asset"),r(),o(2,"p-table",15),b(3,Xi,7,0,"ng-template",null,3,d)(5,Ji,10,14,"ng-template",null,4,d)(7,Qi,6,3,"ng-template",null,5,d)(9,Zi,4,0,"ng-template",null,6,d),r()),t&2){let e=c(2);l(2),s("value",e.store.data().asset)}}function tn(t,m){t&1&&(o(0,"tr")(1,"th",16),a(2,"Code"),r(),o(3,"th"),a(4,"Liability"),r(),o(5,"th",17),a(6,"Total"),r()())}function nn(t,m){if(t&1&&(o(0,"tr")(1,"td"),a(2),r(),o(3,"td")(4,"a",25),a(5),r()(),o(6,"td",19)(7,"a",20),a(8),S(9,"number"),r()()()),t&2){let e=m.$implicit;l(2),f(e.code),l(2),s("routerLink",F(8,Ct,e.accountID)),l(),f(e.name),l(2),s("routerLink",V(10,St))("queryParams",F(11,Pt,e.accountID)),l(),f(v(9,6,e.counterAmount))}}function on(t,m){if(t&1&&(o(0,"tr")(1,"td",21),a(2," Total Liability "),r(),o(3,"td",22),a(4),S(5,"number"),r()()),t&2){let e=c(3);l(4),D(" ",v(5,1,e.store.totalLiability())," ")}}function rn(t,m){t&1&&(o(0,"tr")(1,"td",23)(2,"span"),a(3,"No liability records found."),r()()())}function an(t,m){if(t&1&&(o(0,"h4",24),a(1,"Liability"),r(),o(2,"p-table",15),b(3,tn,7,0,"ng-template",null,3,d)(5,nn,10,13,"ng-template",null,4,d)(7,on,6,3,"ng-template",null,5,d)(9,rn,4,0,"ng-template",null,6,d),r()),t&2){let e=c(2);l(2),s("value",e.store.data().liability)}}function ln(t,m){t&1&&(o(0,"tr")(1,"th",16),a(2,"Code"),r(),o(3,"th"),a(4,"Equity"),r(),o(5,"th",17),a(6,"Total"),r()())}function pn(t,m){if(t&1&&(o(0,"tr")(1,"td"),a(2),r(),o(3,"td")(4,"a",18),a(5),r()(),o(6,"td",19)(7,"a",20),a(8),S(9,"number"),r()()()),t&2){let e=m.$implicit;l(2),f(e.code),l(2),s("routerLink",F(8,Ct,e.accountID)),l(),f(e.name),l(2),s("routerLink",V(10,St))("queryParams",F(11,Pt,e.accountID)),l(),f(v(9,6,e.counterAmount))}}function mn(t,m){if(t&1&&(o(0,"tr")(1,"td",21),a(2,"Total Equity"),r(),o(3,"td",22),a(4),S(5,"number"),r()(),o(6,"tr")(7,"td",21),a(8," Total Liability + Equity "),r(),o(9,"td",22),a(10),S(11,"number"),r()()),t&2){let e=c(3);l(4),D(" ",v(5,2,e.store.totalEquity())," "),l(6),D(" ",v(11,4,e.store.totalLiability()+e.store.totalEquity())," ")}}function sn(t,m){t&1&&(o(0,"tr")(1,"td",23)(2,"span"),a(3,"No equity records found."),r()()())}function cn(t,m){if(t&1&&(o(0,"h4",24),a(1,"Equity"),r(),o(2,"p-table",15),b(3,ln,7,0,"ng-template",null,3,d)(5,pn,10,13,"ng-template",null,4,d),a(7," <"),b(8,mn,12,6,"ng-template",null,5,d)(10,sn,4,0,"ng-template",null,6,d),r()),t&2){let e=c(2);l(2),s("value",e.store.data().equity)}}function dn(t,m){if(t&1&&(o(0,"p-panel",12)(1,"div",13),b(2,en,11,1)(3,an,11,1)(4,cn,12,1),r()()),t&2){let e=c();s("showHeader",!1),l(2),L(e.Object.keys(e.store.data().asset).length>0?2:-1),l(),L(e.Object.keys(e.store.data().liability).length>0?3:-1),l(),L(e.Object.keys(e.store.data().equity).length>0?4:-1)}}function un(t,m){if(t&1&&(o(0,"div",31)(1,"div"),a(2),r()()),t&2){let e=m.$implicit;l(2),f(e.value)}}function _n(t,m){if(t&1&&(o(0,"form",26)(1,"div",27)(2,"label",28),a(3,"Outlet"),r(),o(4,"p-multiselect",29),b(5,un,3,1,"ng-template",null,7,d),r()(),o(7,"div",27)(8,"label",28),a(9,"From"),r(),w(10,"p-datepicker",30),r()()),t&2){let e=c();s("formGroup",e.filterForm),l(4),s("virtualScroll",!0)("virtualScrollItemSize",50)("options",e.store.metadata().options.outlets)("showClear",!0),l(6),s("iconDisplay","input")("showIcon",!0)}}var Ot=(()=>{class t{constructor(){this.store=C(bt),this.ReportServiceStore=C(A),this.dialogFilterVisible=E(!1),this.isInitDialogFilterVisible=E(!1),this.roleService=C(te),this.Object=Object}ngOnInit(){this.generateFilterForm()}generateFilterForm(){this.filterForm=new Ft({date:new rt(new Date),outletID:new rt([])})}onFilterOKEvent(){let{date:e,outletID:i}=this.filterForm.value;this.store.updateFilter({date:(0,Gt.default)(e).format("YYYY-MM-DD"),listOutletParam:i}),this.dialogFilterVisible.update(n=>!n)}onExport(){let e=y(g({},this.store.filter()),{export:!0,ExportPageNumber:1,ExportRowCount:1e4});this.ReportServiceStore.getBalanceSheet(e,{responseType:"blob"}).pipe(Fe("Export Balance Sheet"),M(i=>{let n=i.type,p=[i],u=document.createElement("a");u.href=window.URL.createObjectURL(new Blob(p,{type:n}));let _=`balance-sheet.${n.split("/")[1]}`;u.setAttribute("download",_),document.body.appendChild(u),u.click(),document.body.removeChild(u)})).subscribe()}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=k({type:t,selectors:[["app-report-balance-sheet"]],features:[Ne([bt])],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(i,n){if(i&1){let p=R();o(0,"app-main-panel",8),G("isDialogFilterVisibleChange",function(_){return h(p),N(n.dialogFilterVisible,_)||(n.dialogFilterVisible=_),x(_)})("isInitDialogFilterVisibleChange",function(_){return h(p),N(n.isInitDialogFilterVisible,_)||(n.isInitDialogFilterVisible=_),x(_)}),I("filterConfirmed",function(){return h(p),x(n.onFilterOKEvent())}),b(1,$i,2,1,"ng-template",null,0,d)(3,dn,5,4,"ng-template",null,1,d)(5,_n,11,7,"ng-template",null,2,d),r()}i&2&&(s("pageTitle",n.store.data().pageTitle)("isFilterable",!0),B("isDialogFilterVisible",n.dialogFilterVisible)("isInitDialogFilterVisible",n.isInitDialogFilterVisible),s("scrollable",!0))},dependencies:[ie,q,j,z,le,ae,ne,Z,Q,J,Y,W,K,$,X,me,pe,re,oe,Ce,ee,Ue,U,H],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var jt=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=k({type:t,selectors:[["app-report-comparative-balance"]],decls:3,vars:0,template:function(i,n){i&1&&(o(0,"p"),a(1,"report-comparative-balance works!"),r(),a(2,`
|
|
1
|
+
import{a as kt}from"./chunk-SMZ363LC.js";import{a as Ee,b as Ie}from"./chunk-AACWH3EJ.js";import{a as Lt,b as se}from"./chunk-INB6OCHW.js";import{a as he}from"./chunk-PXCF3E7D.js";import{b as Mt,c as nt,d as ot}from"./chunk-5XDCBC5Q.js";import{a as pe,b as me}from"./chunk-YYVQS5LF.js";import"./chunk-FLZXCWDU.js";import{b as it}from"./chunk-Q23KXB3T.js";import"./chunk-DHW7UHFT.js";import{a as te}from"./chunk-BY6QUHQI.js";import"./chunk-C2GO6SPF.js";import{a as Se,b as ve}from"./chunk-O4QM64EH.js";import{a as Ze,b as et,d as ae,k as le}from"./chunk-SVXDMOLP.js";import{a as oe,b as re}from"./chunk-S6X7PJAB.js";import"./chunk-LWLJZPBI.js";import"./chunk-3NU3P6NL.js";import{a as tt}from"./chunk-66USIUOD.js";import{a as Fe}from"./chunk-XKCLERWG.js";import{b as Ce}from"./chunk-H57SDRPH.js";import"./chunk-GDX5XEV3.js";import{a as Vt,b as ye}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 ne}from"./chunk-4CDAAU6Z.js";import{e as Je,f as Qe,h as ie}from"./chunk-7INXBUUN.js";import"./chunk-X22YKT5B.js";import{a as Ue,b as ee}from"./chunk-JYCUE5HV.js";import{a as P,b as We,c as Ke,d as Ye,e as $e,f as Xe}from"./chunk-JMEBBWX4.js";import"./chunk-FUZFAJGJ.js";import{n as ze,o as qe,w as Q,x as Z}from"./chunk-5FSMHZSY.js";import{b as be}from"./chunk-A5HAJEPC.js";import{b as je,e as W,f as K,g as Ft,i as rt,k as Y,l as $,o as X,u as xe,x as J}from"./chunk-G5S5AZA7.js";import{b as Pe,e as H,l as U}from"./chunk-Z45NTTES.js";import{a as Dt}from"./chunk-CV4R4TBA.js";import{a as Oe}from"./chunk-BLQJXMNV.js";import"./chunk-F2X3VGZZ.js";import{h as Ae,k as j,p as Ge,q as z,r as q,x as Rt,y as Tt}from"./chunk-OKCHQM5Q.js";import{Ac as F,Bc as wt,Cb as b,D as Me,Ga as E,Jc as S,Kb as s,Kc as v,Lc as Be,Mc as d,Nb as Le,Pb as L,Qb as we,Sb as Re,Tb as Te,Ub as o,V as yt,Vb as r,W as Et,Wb as w,X as _e,Yc as T,Z as M,Zc as ge,_b as R,ba as It,bb as O,c as ue,cb as fe,dc as I,ec as c,gb as l,ha as C,hc as ke,pa as h,qa as x,qc as a,rc as f,s as Ve,sc as D,tc as De,vc as B,wb as k,wc as N,xc as G,yc as Ne,zc as V}from"./chunk-JP6RBSB3.js";import{a as g,b as y,c as de,e as vt}from"./chunk-YQFG5XE2.js";var A=(()=>{class t{constructor(){this.httpService=C(Dt),this.authService=C(he)}fetchGeneralLedgerLoader(e="single"){return this.httpService.get(void 0,`api/GeneralLedgerLoader/${e==="single"?"GetFilterSingle":"GetFilter"}`)}getGLCount(e){return this.httpService.post(void 0,"api/GeneralLedger/GetSingleCount",e)}fetchGeneralLedgerReport(e,i="single"){return this.httpService.post(void 0,`api/GeneralLedger/${i==="single"?"GetSingle":"Get"}`,e)}exportGeneralLedger(e,i={}){let n=g({responseType:"blob"},i);return this.httpService.post(void 0,"/api/GeneralLedgerExport/GetGeneralLedgerExport",e,n)}getCustomerSuggestions(e){let i={Prefix:e,Count:100};return this.httpService.get(this.authService.getTenantExternalURL(),"/API/AC/GetCustomerSuggestion",{params:i})}getSupplierSuggestions(e){let i={Prefix:e,Count:100};return this.httpService.get(this.authService.getTenantExternalURL(),"/API/AC/GetSupplierSuggestion",{params:i})}getCashierSuggestions(e){let i={Prefix:e,Count:100};return this.httpService.get(this.authService.getTenantExternalURL(),"/api/ac/GetUserSuggestion",{params:i})}getBalanceSheetLoader(){return this.httpService.get(void 0,"/api/BalanceSheetLoader/GetBalanceSheet")}getBalanceSheet(e,i={}){let n=new Tt({fromObject:Object.fromEntries(Object.entries(e).map(([_,Ut])=>[_,String(Ut)]))}),p=new Rt({"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"}),u=g({params:n,headers:p},i);return this.httpService.get(void 0,"/api/BalanceSheet",u)}getIncomeStatementLoader(){return this.httpService.get(void 0,"api/IncomeStatementLoader/Filter")}getIncomeStatement(e,i={}){return this.httpService.post(void 0,"api/IncomeStatement/List",g({},e),i)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=It({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var $t=()=>({width:"30vw"}),Xt=()=>({"1199px":"75vw","575px":"90vw"}),Jt=t=>["/pages/journal/journal-entry/",t],Qt=t=>({"ng-dirty ng-invalid":t});function Zt(t,m){if(t&1){let e=R();o(0,"p-button",17),I("onClick",function(){h(e);let n=c(2);return x(n.onToggleExportDialog())}),r()}}function ei(t,m){if(t&1&&(o(0,"div",14)(1,"a",15),a(2,"Return to Accounts"),r(),b(3,Zt,1,0,"p-button",16),r()),t&2){let e=c();l(3),s("ngIf",e.roleService.global.export)}}function ti(t,m){if(t&1&&(o(0,"div",14)(1,"span",24)(2,"h2",25),a(3),r()(),o(4,"span",24)(5,"h2",25),a(6),r()()()),t&2){let e=c(3);l(3),f(e.items().data.name),l(3),D(" (",e.items().data.chartOfAccountCode,") ")}}function ii(t,m){t&1&&(o(0,"tr")(1,"th",26),a(2,"Outlet"),r(),o(3,"th",26),a(4,"No."),r(),o(5,"th",26),a(6,"Date"),r(),o(7,"th"),a(8,"Contact / Note"),r(),o(9,"th",27),a(10,"Debit"),r(),o(11,"th",28),a(12,"Credit"),r(),o(13,"th",28),a(14,"Balance"),r()())}function ni(t,m){if(t&1&&(o(0,"div",31)(1,"a",32),a(2),r(),w(3,"div",34),o(4,"span",35),a(5),r()()),t&2){let e=c().$implicit,i=c(3);l(),s("href",i.authService.getTenantExternalURL()+i.buildReferenceUrl(e),fe),l(),f(e.referenceText),l(),s("innerHTML",e.journalNote,O),l(2),D("",e.note," ")}}function oi(t,m){if(t&1&&(o(0,"div",31),w(1,"span",34)(2,"div",34),o(3,"span",35),a(4),r()()),t&2){let e=c().$implicit;l(),s("innerHTML",e.referenceText,O),l(),s("innerHTML",e.journalNote,O),l(2),D("",e.note," ")}}function ri(t,m){if(t&1&&(o(0,"tr")(1,"td",29),a(2),r(),o(3,"td",29)(4,"a",30),a(5),r()(),o(6,"td",29),a(7),S(8,"date"),r(),o(9,"td",29)(10,"div",31)(11,"a",32),a(12),r(),b(13,ni,6,4,"div",31)(14,oi,5,3,"div",31),r()(),o(15,"td",33),a(16),S(17,"number"),r(),o(18,"td",33),a(19),S(20,"number"),r(),o(21,"td",33),a(22),S(23,"number"),r()()),t&2){let e=m.$implicit,i=c(3);l(2),f(e.outletName),l(2),s("routerLink",F(19,Jt,e.id)),l(),f(e.number),l(2),f(Be(8,10,e.date,"dd MMM yyyy")),l(4),s("href",i.authService.getTenantExternalURL()+"/menu/Contacts/Contact/Customers/Info?ID="+e.contactID,fe),l(),f(e.contactName),l(),L(i.buildReferenceUrl(e)?13:14),l(3),D(" ",v(17,13,e.debitAmount)," "),l(3),D(" ",v(20,15,e.creditAmount)," "),l(3),f(v(23,17,e.balance))}}function ai(t,m){if(t&1&&(o(0,"tr"),w(1,"td",36),o(2,"td",37),a(3,"Total"),r(),o(4,"td",37),a(5),S(6,"number"),r(),o(7,"td",37),a(8),S(9,"number"),r(),w(10,"td"),r()),t&2){let e=c(3);l(5),f(v(6,2,e.debitSubTotal())),l(3),D(" ",v(9,4,e.creditSubTotal())," ")}}function li(t,m){t&1&&(o(0,"tr")(1,"td",38)(2,"span"),a(3,"No records found."),r()()())}function pi(t,m){if(t&1){let e=R();o(0,"button",39),I("click",function(){h(e);let n=c(3);return x(n.getGLCount())})("keyup.enter",function(){h(e);let n=c(3);return x(n.getGLCount())}),r()}}function mi(t,m){if(t&1&&a(0),t&2){let e=c(3);D(" ",e.count()," ")}}function si(t,m){if(t&1){let e=R();o(0,"div",19)(1,"p-table",20),b(2,ti,7,2,"ng-template",null,5,d)(4,ii,15,0,"ng-template",null,6,d)(6,ri,24,21,"ng-template",null,7,d)(8,ai,11,6,"ng-template",null,4,d)(10,li,4,0,"ng-template",null,8,d),r(),o(12,"div",21)(13,"div"),a(14),b(15,pi,1,0,"button",22)(16,mi,1,1),a(17," entries "),r(),o(18,"div",14)(19,"p-button",23),I("onClick",function(){h(e);let n=c(2);return x(n.onNextPage())}),r()()()()}if(t&2){let e=c(2);l(),s("value",e.items().data.data),l(13),De(" Showing ",e.pagination().first," to ",e.pagination().end," of "),l(),L(e.totalRecords()===-1?15:16),l(4),s("disabled",!e.pagination().hasNext)}}function ci(t,m){if(t&1&&b(0,si,20,5,"div",18),t&2){let e=c();s("ngIf",e.items()&&e.items().data)}}function di(t,m){if(t&1&&(o(0,"div",14)(1,"div",24)(2,"span",58),a(3),r()(),o(4,"div")(5,"span"),a(6,"-"),r()(),o(7,"div",24)(8,"span",59),a(9),r()()()),t&2){let e=m.$implicit;l(3),D("(",e.code,")"),l(6),f(e.name)}}function ui(t,m){if(t&1&&(o(0,"div",14)(1,"div",24)(2,"span",58),a(3),r()(),o(4,"div")(5,"span"),a(6,"-"),r()(),o(7,"div",24)(8,"span",59),a(9),r()()()),t&2){let e=m.$implicit;l(3),D("(",e.code,")"),l(6),f(e.name)}}function _i(t,m){t&1&&(o(0,"div",60),a(1," Account is required. "),r())}function fi(t,m){if(t&1&&(o(0,"div",61)(1,"div"),a(2),r()()),t&2){let e=m.$implicit;l(2),f(e.value)}}function gi(t,m){if(t&1&&(o(0,"div",51)(1,"div",52),w(2,"p-radiobutton",62),o(3,"label",63),a(4),r()()()),t&2){let e=m.$implicit;l(2),s("value",e.key)("inputId",e.key),l(),ke("for",e.key),l(),f(e.value)}}function hi(t,m){if(t&1){let e=R();o(0,"div",31)(1,"label",42),a(2,"Customer"),r(),o(3,"p-autocomplete",64),I("completeMethod",function(n){h(e);let p=c(3);return x(p.searchCustomer(n))}),r()()}if(t&2){let e=c(3);l(3),s("suggestions",e.customerSuggestions())}}function xi(t,m){if(t&1){let e=R();o(0,"div",31)(1,"label",42),a(2,"Supplier"),r(),o(3,"p-autocomplete",65),I("completeMethod",function(n){h(e);let p=c(3);return x(p.searchSupplier(n))}),r()()}if(t&2){let e=c(3);l(3),s("suggestions",e.supplierSuggestions())}}function bi(t,m){if(t&1){let e=R();o(0,"div",31)(1,"label",42),a(2,"Customer"),r(),o(3,"p-autocomplete",64),I("completeMethod",function(n){h(e);let p=c(3);return x(p.searchCustomer(n))}),r()()}if(t&2){let e=c(3);l(3),s("suggestions",e.customerSuggestions())}}function Ci(t,m){if(t&1){let e=R();o(0,"form",41)(1,"div",31)(2,"label",42),a(3,"Accounts"),r(),o(4,"p-select",43),I("onChange",function(n){h(e);let p=c(2);return x(p.onAccountChange(n))}),b(5,di,10,2,"ng-template",null,9,d)(7,ui,10,2,"ng-template",null,10,d),r(),b(9,_i,2,0,"div",44),r(),o(10,"div",31)(11,"label",42),a(12,"From"),r(),o(13,"div",45),w(14,"p-datepicker",46)(15,"p-datepicker",47),r()(),o(16,"div",31)(17,"label",42),a(18,"Outlets"),r(),o(19,"p-multiselect",48),b(20,fi,3,1,"ng-template",null,10,d),r()(),o(22,"div",31)(23,"label",49),a(24,"Contact Type"),r(),o(25,"div",50),Re(26,gi,5,4,"div",51,we),r()(),o(28,"div",31)(29,"label",49),a(30,"Sort order"),r(),o(31,"div",50)(32,"div",51)(33,"div",52),w(34,"p-radiobutton",53),o(35,"label",54),a(36,"Asc"),r()()(),o(37,"div",55)(38,"div",52),w(39,"p-radiobutton",56),o(40,"label",57),a(41,"Desc"),r()()()()(),b(42,hi,4,1,"div",31)(43,xi,4,1,"div",31)(44,bi,4,1,"div",31),r()}if(t&2){let e,i,n,p=c(2);s("formGroup",p.form),l(4),s("virtualScroll",!0)("virtualScrollItemSize",50)("options",p.loaderMetadata().options.accounts)("ngClass",F(16,Qt,((e=p.form.get("accountID"))==null?null:e.invalid)&&(((e=p.form.get("accountID"))==null?null:e.touched)||((e=p.form.get("accountID"))==null?null:e.dirty)))),l(5),s("ngIf",((i=p.form.get("accountID"))==null?null:i.invalid)&&(((i=p.form.get("accountID"))==null?null:i.touched)||((i=p.form.get("accountID"))==null?null:i.dirty))),l(5),s("iconDisplay","input")("showIcon",!0),l(),s("iconDisplay","input")("showIcon",!0),l(4),s("virtualScroll",!0)("virtualScrollItemSize",50)("options",p.loaderMetadata().options.outlets),l(7),Te(p.loaderMetadata().options.contactTypeOptions),l(8),s("value",!0),l(5),s("value",!1),l(3),L((n=p.form.controls.contactType.value)===1?42:n===2?43:44)}}function Si(t,m){if(t&1&&b(0,Ci,45,18,"form",40),t&2){let e=c();s("ngIf",e.loaderMetadata())}}function vi(t,m){if(t&1&&(o(0,"div",66)(1,"div",67)(2,"div",68)(3,"div",50)(4,"div",69)(5,"label",49),a(6,"Page"),r()(),o(7,"div",69),w(8,"input",70),r()()()(),o(9,"div",71)(10,"div",52),w(11,"i",72),o(12,"span",73),a(13),S(14,"number"),S(15,"number"),r()()()()),t&2){let e=c();l(),s("formGroup",e.form),l(12),De("Exporting data from ",v(14,3,e.filter().exportPageNumber)," - ",v(15,5,e.filter().exportRowCount),"")}}function yi(t,m){if(t&1){let e=R();o(0,"p-button",74),I("onClick",function(){h(e);let n=c();return x(n.onToggleExportDialog())}),r()}t&2&&s("rounded",!0)("text",!0)}function Ei(t,m){if(t&1){let e=R();o(0,"p-button",75),I("click",function(){h(e);let n=c();return x(n.onToggleExportDialog())}),r(),o(1,"p-button",76),I("click",function(){h(e);let n=c();return x(n.onExport())}),r()}}var Bt=(()=>{class t{getGLCount(){this.reportService.getGLCount(this.filter()).pipe(M(({count:e})=>{this.totalRecords.set(e)})).subscribe()}onToggleExportDialog(){this.isDialogExportVisible.update(e=>!e)}get pageTitle(){return this.items()&&this.items().pageTitle?this.items().pageTitle:"General Ledger"}constructor(){this.reportService=C(A),this.route=C(Pe),this.roleService=C(te),this.authService=C(he),this.fb=C(xe),this.coaService=C(tt),this.toastr=C(Oe),this.dayjsService=C(se),this.infinity=1/0,this.metadata=E(null),this.items=E(null),this.totalRecords=E(-1),this.dialogFilterVisible=E(!0),this.initDialogVisible=E(!1),this.isDialogExportVisible=E(!1),this.customerSuggestions=E([]),this.supplierSuggestions=E([]),this.categoriesOptions=E([]),this.localFilter=E({}),this.count=T(()=>this.totalRecords()<0?1/0:this.totalRecords()),this.pagination=T(()=>{let e=this.filter(),i=this.totalRecords()!=null&&this.totalRecords()>=0?this.totalRecords():1/0,n=Math.min(e.pageNumber*e.pageSize,isFinite(i)?i:e.pageNumber*e.pageSize);return{first:1,end:e.pageSize>0?n:0,total:i,page:e.pageNumber,pageSize:e.pageSize,hasPrev:e.pageNumber>1,hasNext:isFinite(i)?e.pageNumber*e.pageSize<i:!0}}),this.loaderMetadata=be(this.reportService.fetchGeneralLedgerLoader(),{initialValue:null}),this.baseFilter=T(()=>{let e=this.loaderMetadata();return e?e.filter:null}),this.exportFileTypes=E([{key:0,value:"CSV"},{key:1,value:"Excel"}]),this.queryFilter=be(this.route.queryParamMap.pipe(Ve(e=>({accountID:e.get("id"),to:e.get("to")}))),{initialValue:null}),this.filter=T(()=>{let e=this.baseFilter(),i=this.queryFilter(),n=this.localFilter();return e?g(g(g({},e),i??{}),n):null}),this.creditSubTotal=T(()=>(this.items()?.data?.data??[]).reduce((i,n)=>i+(Number(n.creditAmount)||0),0)),this.debitSubTotal=T(()=>(this.items()?.data?.data??[]).reduce((i,n)=>i+(Number(n.debitAmount)||0),0)),this.hasNextPage=T(()=>{let e=this.filter();if(!e)return!1;let i=Math.ceil(e.rowCount/e.pageSize);return e.pageNumber<i}),this.initializeForm(),ge(()=>{let e=this.filter();e&&e.accountID&&(this.form.patchValue(this.transformFilterToFormValue(e),{emitEvent:!1}),this.reportService.fetchGeneralLedgerReport(e).subscribe(i=>{this.items.update(n=>e.pageNumber===1?i:y(g({},i),{data:y(g({},i.data),{data:[...n?.data.data??[],...i.data.data]})}))}))})}buildReferenceUrl(e){return kt(e)}ngOnInit(){this.route.queryParamMap.pipe(Me(e=>e.keys.length>0)).subscribe({next:()=>this.initDialogVisible.set(!0)})}initializeForm(){this.form=this.fb.group({accountID:this.fb.control(null),from:this.fb.control(null),to:this.fb.control(new Date),contactType:this.fb.control(null),contactID:this.fb.control(""),listOutletID:this.fb.control([]),pageNumber:this.fb.control(1),pageSize:this.fb.control(50),sortAscending:this.fb.control(!0),listAccountID:this.fb.control([]),rowCount:this.fb.control(0),export:this.fb.control(!1),exportPageNumber:this.fb.control(1),exportRowCount:this.fb.control(0)})}findNodeByKey(e,i){for(let n of e){if(n.key===i)return n;if(n.children){let p=this.findNodeByKey(n.children,i);if(p)return p}}return null}transformFilterToFormValue(e){return Object.entries(e).reduce((i,[n,p])=>{switch(n){case"from":break;case"to":i[n]=p&&(typeof p=="string"||typeof p=="number"||p instanceof Date)?this.dayjsService.from(p)?.toDate():this.dayjsService.now.toDate();break;case"listCategoryID":Array.isArray(p)?i[n]=p.map(u=>this.findNodeByKey(this.categoriesOptions(),u)).filter(u=>!!u):i[n]=[];break;case"listOutletID":case"listAccountID":i[n]=Array.isArray(p)?p:[];break;case"pageNumber":case"pageSize":case"rowCount":case"exportPageNumber":case"exportRowCount":i[n]=p!=null?Number(p):0;break;case"sortAscending":case"export":i[n]=!!p;break;case"contactType":i[n]=p!=null?Number(p):null;break;default:i[n]=p}return i},{})}clearContactValueOnContactTypeChange(){this.form.get("contactType")?.valueChanges.subscribe(()=>this.form.get("contactID")?.setValue(""))}isEmpty(e){return e==null||typeof e=="string"&&e.trim().length===0}onCategoryFocus(){this.coaService.getCachedCategoriesOptions().pipe(M(e=>this.categoriesOptions.set(e))).subscribe()}searchCustomer(e){this.reportService.getCustomerSuggestions(e.query).pipe(M(i=>this.customerSuggestions.set(i))).subscribe()}searchSupplier(e){this.reportService.getSupplierSuggestions(e.query).pipe(M(i=>this.supplierSuggestions.set(i))).subscribe()}onAccountChange(e){Array.isArray(e.value)&&e.value.length>=1&&this.toastr.warning("Please select at least 1 accounts for the general ledger report.","Warning")}onFilterOKEvent(){if(this.form.invalid){this.form.markAllAsTouched(),this.dialogFilterVisible.set(!0);return}let e=this.buildFilterBody();this.dialogFilterVisible.set(!1),this.localFilter.set(e)}buildFilterBody(){let p=this.form.getRawValue(),{from:e,to:i}=p,n=de(p,["from","to"]);return y(g({},this.filter()),{pageNumber:n.pageNumber,pageSize:n.pageSize,sortAscending:n.sortAscending,accountID:n.accountID,contactID:n.contactID?.length===0?null:n.contactID,listOutletID:n.listOutletID??[],listAccountID:n.listAccountID??[],from:this.dayjsService.from(e)?this.dayjsService.format(e):null,to:this.dayjsService.from(i)?this.dayjsService.format(i):null,contactType:n.contactType})}onExport(){let e=this.buildExportBody();this.performExport(e)}performExport(e){this.reportService.exportGeneralLedger(e,{responseType:"blob",observe:"response"}).pipe(M(i=>this.handleExportResponse(i))).subscribe()}handleExportResponse(e){let i=e.headers,n=i.get("Content-Disposition")??i.get("content-disposition"),p="download.csv";if(n){let _=n.match(/filename\*?=(?:UTF-8'')?"?([^;\r\n"]+)/i);_?.[1]&&(p=decodeURIComponent(_[1].replace(/"/g,"")))}let u=e.body;ot(u,p,u.type)}buildExportBody(){let p=this.form.value,{from:e,to:i}=p,n=de(p,["from","to"]);return y(g({},this.filter()),{exportPageNumber:+n.exportPageNumber,pageNumber:n.pageNumber,pageSize:n.pageSize,sortAscending:n.sortAscending,accountID:n.accountID,contactID:n.contactID?.length===0?null:n.contactID,listOutletID:n.listOutletID??[],listAccountID:n.listAccountID??[],from:this.dayjsService.from(e)?this.dayjsService.format(e):null,to:this.dayjsService.from(i)?this.dayjsService.format(i):null,contactType:n.contactType,export:!0})}onNextPage(){this.localFilter.update(e=>{let i=e.pageNumber??this.baseFilter()?.pageNumber??1;return y(g({},e),{pageNumber:i+1,balance:this.items().data.data[this.items().data.data.length-1]?.balance??0})})}onPrevPage(){this.localFilter.update(e=>{let i=e.pageNumber??this.baseFilter()?.pageNumber??1;return y(g({},e),{pageNumber:Math.max(1,i-1)})})}goToPage(e){this.localFilter.update(i=>y(g({},i),{pageNumber:e}))}goToLastPage(){let e=this.filter();if(!e)return;let i=this.totalRecords();if(i===-1||!isFinite(i)){this.toastr.info("Please load total records before going to the last page","Info");return}let n=Math.ceil(i/e.pageSize);if(e.pageNumber>=n){this.toastr.warning("You are already on the last page","Warning");return}this.localFilter.update(p=>y(g({},p),{pageNumber:n}))}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=k({type:t,selectors:[["app-report-general-ledger"]],decls:13,vars:13,consts:[["actionButton",""],["content",""],["filters",""],["closeIconTemplate",""],["footer",""],["caption",""],["header",""],["body",""],["emptymessage",""],["selectedItem",""],["item",""],[3,"isDialogFilterVisibleChange","isInitDialogFilterVisibleChange","filterConfirmed","pageTitle","isDialogFilterVisible","isFilterable","isInitDialogFilterVisible","scrollable"],["header","Export Journal Entry",3,"visibleChange","modal","visible","breakpoints"],["class","d-flex flex-column gap-3",4,"ngIf"],[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 h-100 bg-white border-top",4,"ngIf"],[1,"px-3","h-100","bg-white","border-top"],[3,"value"],[1,"d-flex","justify-content-between","align-items-center","my-2"],["type","button","aria-label","Get journal entry count","tabindex","0",1,"fa-solid","fa-circle-question","cursor-pointer","p-0","border-0","bg-transparent"],["variant","outlined","severity","secondary","icon","fa-solid fa-angle-right","size","small","label","next",3,"onClick","disabled"],[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"],[1,"text-end","text-break"],[3,"innerHTML"],[2,"width","300px","white-space","normal","word-break","break-word"],["colspan","3"],[1,"text-end","fw-semibold"],["colspan","8"],["type","button","aria-label","Get journal entry count","tabindex","0",1,"fa-solid","fa-circle-question","cursor-pointer","p-0","border-0","bg-transparent",3,"click","keyup.enter"],["class","d-flex flex-column row-gap-3",3,"formGroup",4,"ngIf"],[1,"d-flex","flex-column","row-gap-3",3,"formGroup"],["for","outlet"],["showClear","","filter","","filterBy","code,name","display","chip","formControlName","accountID","appendTo","body","optionLabel","name","optionValue","id","placeholder","Select Accounts",3,"onChange","virtualScroll","virtualScrollItemSize","options","ngClass"],["class","text-danger",4,"ngIf"],[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"],["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,"text-danger"],[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"],[1,"d-flex","flex-column","gap-3"],[1,"row",3,"formGroup"],[1,"col-8"],[1,"col"],["type","text","formControlName","exportPageNumber","fluid","","pInputText","","pSize","small"],["role","alert",1,"alert","alert-primary","m-0","p-2"],[1,"fa-solid","fa-circle-info"],[1,"fs-2","text-dark","fw-semibold"],["severity","secondary","variant","outlined","icon","fa-solid fa-xmark",3,"onClick","rounded","text"],["label","Cancel","severity","secondary","variant","outlined",3,"click"],["label","OK (F2)",3,"click"]],template:function(i,n){if(i&1){let p=R();o(0,"app-main-panel",11),G("isDialogFilterVisibleChange",function(_){return h(p),N(n.dialogFilterVisible,_)||(n.dialogFilterVisible=_),x(_)})("isInitDialogFilterVisibleChange",function(_){return h(p),N(n.initDialogVisible,_)||(n.initDialogVisible=_),x(_)}),I("filterConfirmed",function(){return h(p),x(n.onFilterOKEvent())}),b(1,ei,4,1,"ng-template",null,0,d)(3,ci,1,1,"ng-template",null,1,d)(5,Si,1,1,"ng-template",null,2,d),r(),o(7,"p-dialog",12),G("visibleChange",function(_){return h(p),N(n.isDialogExportVisible,_)||(n.isDialogExportVisible=_),x(_)}),b(8,vi,16,7,"div",13)(9,yi,1,2,"ng-template",null,3,d)(11,Ei,2,0,"ng-template",null,4,d),r()}i&2&&(s("pageTitle",n.pageTitle),B("isDialogFilterVisible",n.dialogFilterVisible),s("isFilterable",!0),B("isInitDialogFilterVisible",n.initDialogVisible),s("scrollable",!0),l(7),Le(V(11,$t)),s("modal",!0),B("visible",n.isDialogExportVisible),s("breakpoints",V(12,Xt)),l(),s("ngIf",n.form&&n.filter()))},dependencies:[ie,q,Ae,j,z,Ge,ne,le,ae,Qe,Je,Z,Q,ye,Vt,re,oe,Ie,Ee,J,Y,je,W,K,$,X,me,pe,Ce,He,nt,it,ee,U,H,et,Ze,qe,ze],styles:["[_nghost-%COMP%] .p-datatable .p-datatable-header{padding:.75rem 1rem .75rem 0}"],changeDetection:0})}}return t})();var Ii={data:{},filter:{EntityID:[],CashierID:null,Text:null,from:null,to:null},isLoading:!0,loader:{options:{outlets:[]},filter:{from:"",to:"",outletID:[]},roles:{isInRoleEmptyOutlet:!1}}},ut=We(Xe(Ii),Ke(t=>{let m={totalCOGS:T(()=>{let e=t.data()?.data?.cogs;return Array.isArray(e)?e.reduce((i,n)=>i+(n?.amount??0),0):0}),totalRevenue:T(()=>{let e=t.data()?.data?.revenue;return Array.isArray(e)?e.reduce((i,n)=>i+(n?.amount??0),0):0}),totalExpense:T(()=>{let e=t.data()?.data?.expense;return Array.isArray(e)?e.reduce((i,n)=>i+(n?.amount??0),0):0}),grossProfit:T(()=>Array.isArray(t.data()?.data?.cogs)&&Array.isArray(t.data()?.data?.revenue)?m.totalRevenue()-m.totalCOGS():0),profitOrLoss:T(()=>m.totalRevenue()-m.totalCOGS()-m.totalExpense()),isDataEmpty:T(()=>Object.keys(t.data()?.data??{}).length===0)};return m}),$e(t=>{let m=C(A),e=C(se),i={updateFilter(n){P(t,p=>y(g({},p),{filter:g(g({},p.filter),n)}))},getLoader:Se(ue(_e(()=>m.getIncomeStatementLoader().pipe(ve({next:n=>{P(t,p=>y(g({},p),{loader:n,filter:y(g({},p.filter),{from:e.from(n.filter.from).format(),to:e.from(n.filter.to).format()})})),i.getIncomeStatement(t.filter)},error:n=>{console.error(n)}}))))),getIncomeStatement:Se(ue(_e(n=>m.getIncomeStatement(n).pipe(Et(()=>P(t,p=>y(g({},p),{isLoading:!0}))),ve({next:p=>{P(t,u=>y(g({},u),{data:p,isLoading:!1}))},error:p=>{console.error(p)}})))))};return i}),Ye({onInit:t=>{t.getLoader()}}));var _t=()=>({}),ft=t=>["/pages/chart-of-account/account/",t],gt=()=>["/pages/report/general-ledger"],ht=t=>({id:t});function Ri(t,m){if(t&1){let e=R();o(0,"p-button",10),I("onClick",function(){h(e);let n=c(2);return x(n.onExport())}),r()}}function Ti(t,m){if(t&1&&(o(0,"div",8),b(1,Ri,1,0,"p-button",9),r()),t&2){let e=c();l(),s("ngIf",e.roleService.global.export)}}function Di(t,m){t&1&&(o(0,"tr")(1,"th",14),a(2,"Code"),r(),o(3,"th",15),a(4,"Name"),r(),o(5,"th",16),a(6,"Total"),r()())}function Fi(t,m){if(t&1&&(o(0,"tr")(1,"td"),a(2),r(),o(3,"td")(4,"a",17),a(5),r()(),o(6,"td",16)(7,"a",18),a(8),S(9,"number"),r()()()),t&2){let e=m.$implicit;l(2),f(e.code),l(2),s("routerLink",F(8,ft,e.accountID)),l(),f(e.name),l(2),s("routerLink",V(10,gt))("queryParams",F(11,ht,e.accountID)),l(),f(v(9,6,e.amount))}}function Vi(t,m){if(t&1&&(o(0,"tr")(1,"td",19)(2,"div",20)(3,"span",21),a(4,"Total Revenue :"),r(),o(5,"span",22),a(6),S(7,"number"),r()()()()),t&2){let e=c(3);l(6),f(v(7,1,e.store.totalRevenue()))}}function Mi(t,m){t&1&&(o(0,"tr")(1,"td",23)(2,"span"),a(3,"No revenue records available"),r()()())}function Li(t,m){if(t&1&&(o(0,"h6",12),a(1,"Revenue"),r(),o(2,"p-table",13),b(3,Di,7,0,"ng-template",null,3,d)(5,Fi,10,13,"ng-template",null,4,d)(7,Vi,8,3,"ng-template",null,5,d)(9,Mi,4,0,"ng-template",null,6,d),r()),t&2){let e,i=c(2);l(2),s("value",(e=i.store.data())==null||e.data==null?null:e.data.revenue)}}function ki(t,m){t&1&&(o(0,"tr")(1,"th",14),a(2,"Code"),r(),o(3,"th",15),a(4,"Name"),r(),o(5,"th",24),a(6,"Total"),r()())}function Ni(t,m){if(t&1&&(o(0,"tr")(1,"td"),a(2),r(),o(3,"td")(4,"a",17),a(5),r()(),o(6,"td",16)(7,"a",18),a(8),S(9,"number"),r()()()),t&2){let e=m.$implicit;l(2),f(e.code),l(2),s("routerLink",F(8,ft,e.accountID)),l(),f(e.name),l(2),s("routerLink",V(10,gt))("queryParams",F(11,ht,e.accountID)),l(),f(v(9,6,e.amount))}}function Bi(t,m){if(t&1&&(o(0,"tr")(1,"td",19)(2,"div",20)(3,"span",21),a(4,"Total COGS :"),r(),o(5,"span",22),a(6),S(7,"number"),r()()()(),o(8,"tr")(9,"td",19)(10,"div",20)(11,"span",21),a(12,"Gross Profit :"),r(),o(13,"span",22),a(14),S(15,"number"),r()()()()),t&2){let e=c(3);l(6),f(v(7,2,e.store.totalCOGS())),l(8),f(v(15,4,e.store.grossProfit()))}}function Ai(t,m){t&1&&(o(0,"tr")(1,"td",23)(2,"span"),a(3,"No COGS records available"),r()()())}function Gi(t,m){if(t&1&&(o(0,"h4",12),a(1,"COGS"),r(),o(2,"p-table",13),b(3,ki,7,0,"ng-template",null,3,d)(5,Ni,10,13,"ng-template",null,4,d)(7,Bi,16,6,"ng-template",null,5,d)(9,Ai,4,0,"ng-template",null,6,d),r()),t&2){let e,i=c(2);l(2),s("value",(e=i.store.data())==null||e.data==null?null:e.data.cogs)}}function Pi(t,m){t&1&&(o(0,"tr")(1,"th",14),a(2,"Code"),r(),o(3,"th",15),a(4,"Name"),r(),o(5,"th",16),a(6,"Total"),r()())}function Oi(t,m){if(t&1&&(o(0,"tr")(1,"td"),a(2),r(),o(3,"td")(4,"a",17),a(5),r()(),o(6,"td",16)(7,"a",18),a(8),S(9,"number"),r()()()),t&2){let e=m.$implicit;l(2),f(e.code),l(2),s("routerLink",F(8,ft,e.accountID)),l(),f(e.name),l(2),s("routerLink",V(10,gt))("queryParams",F(11,ht,e.accountID)),l(),f(v(9,6,e.amount))}}function ji(t,m){if(t&1&&(o(0,"tr")(1,"td",19)(2,"div",20)(3,"span",21),a(4,"Total Expense :"),r(),o(5,"span",22),a(6),S(7,"number"),r()()()(),o(8,"tr")(9,"td",19)(10,"div",20)(11,"span",21),a(12,"Profit / Loss :"),r(),o(13,"span",22),a(14),S(15,"number"),r()()()()),t&2){let e=c(3);l(6),f(v(7,2,e.store.totalExpense())),l(8),f(v(15,4,e.store.profitOrLoss()))}}function zi(t,m){t&1&&(o(0,"tr")(1,"td",23)(2,"span"),a(3,"No expense records available"),r()()())}function qi(t,m){if(t&1&&(o(0,"h4",12),a(1,"Expense"),r(),o(2,"p-table",13),b(3,Pi,7,0,"ng-template",null,3,d)(5,Oi,10,13,"ng-template",null,4,d)(7,ji,16,6,"ng-template",null,5,d)(9,zi,4,0,"ng-template",null,6,d),r()),t&2){let e,i=c(2);l(2),s("value",(e=i.store.data())==null||e.data==null?null:e.data.expense)}}function Hi(t,m){if(t&1&&(o(0,"p-panel")(1,"div",11),b(2,Li,11,1)(3,Gi,11,1)(4,qi,11,1),r()()),t&2){let e,i,n,p=c();l(2),L(p.Object.keys((e=p.store.data().data)!==null&&e!==void 0?e:V(3,_t)).length>0?2:-1),l(),L(p.Object.keys((i=(i=p.store.data().data)==null?null:i.cogs)!==null&&i!==void 0?i:V(4,_t)).length>0?3:-1),l(),L(p.Object.keys((n=(n=p.store.data().data)==null?null:n.expense)!==null&&n!==void 0?n:V(5,_t)).length>0?4:-1)}}function Ui(t,m){if(t&1){let e=R();o(0,"form",25)(1,"div",26)(2,"label",27),a(3,"Outlet"),r(),w(4,"p-multiselect",28),r(),o(5,"div",26)(6,"label",27),a(7,"Cashier"),r(),o(8,"p-autocomplete",29),I("completeMethod",function(n){h(e);let p=c();return x(p.onCashierSearch(n))})("onSelect",function(n){h(e);let p=c();return x(p.onCashierSelect(n))}),r()(),o(9,"div",26)(10,"label",30),a(11,"From - To"),r(),o(12,"div",31),w(13,"p-datepicker",32)(14,"p-datepicker",33),r()()()}if(t&2){let e=c();s("formGroup",e.formFilter),l(4),s("virtualScroll",!0)("virtualScrollItemSize",50)("options",e.store.loader().options.outlets)("showClear",!0),l(4),s("showClear",!0)("suggestions",e.cashierSuggestions())("showClear",!0),l(5),s("iconDisplay","input")("showIcon",!0),l(),s("iconDisplay","input")("showIcon",!0)}}var At=(()=>{class t{constructor(){this.dayjsService=C(se),this.store=C(ut),this.fb=C(xe),this.reportService=C(A),this.roleService=C(te),this.isInitDialogFilterVisible=E(!1),this.dialogFilterVisible=E(!1),this.cashierSuggestions=E([]),this.cashierHashMap=new Map,this.Object=Object,ge(()=>{this.store.filter()&&this.initForm()})}ngOnInit(){this.initForm(),console.log(this.cashierHashMap.entries())}onSearch(e){this.store.updateFilter(y(g({},this.store.filter()),{Text:e}))}onCashierSearch(e){this.reportService.getCashierSuggestions(e.query).pipe(Fe("Cashier Suggestions"),M(i=>this.cashierSuggestions.set(i))).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(),i=Object.entries(e).reduce((n,[p,u])=>(p==="from"||p==="to"?u instanceof Date&&(n[p]=this.dayjsService.from(u).format()):n[p]=u||null,n),{});this.store.updateFilter(g(g({},this.store.filter()),i)),this.dialogFilterVisible.update(n=>!n),console.log("body",e)}onCashierSelect(e){console.log("Cashier selected:",e),!this.cashierHashMap.has(e.value.Key)&&(this.cashierHashMap.set(e.value.Key,e.value.Value),console.log("Cashier HashMap:",this.cashierHashMap))}onExport(){let e=y(g({},this.store.filter()),{export:!0,ExportPageNumber:1,ExportRowCount:1e4});this.reportService.getIncomeStatement(e,{responseType:"blob"}).pipe(Fe("Export Profit & Loss"),M(i=>{let n=i.type,p=[i],u=document.createElement("a");u.href=window.URL.createObjectURL(new Blob(p,{type:n}));let _=`profit-and-loss.${n.split("/")[1]}`;u.setAttribute("download",_),document.body.appendChild(u),u.click(),document.body.removeChild(u)})).subscribe()}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=k({type:t,selectors:[["app-report-income-statement"]],features:[Ne([ut])],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(i,n){if(i&1){let p=R();o(0,"app-main-panel",7),G("isDialogFilterVisibleChange",function(_){return h(p),N(n.dialogFilterVisible,_)||(n.dialogFilterVisible=_),x(_)})("isInitDialogFilterVisibleChange",function(_){return h(p),N(n.isInitDialogFilterVisible,_)||(n.isInitDialogFilterVisible=_),x(_)}),I("filterConfirmed",function(){return h(p),x(n.onFilterOK())}),b(1,Ti,2,1,"ng-template",null,0,d)(3,Hi,5,6,"ng-template",null,1,d)(5,Ui,15,12,"ng-template",null,2,d),r()}i&2&&(s("isFilterable",!0)("pageTitle",n.store.data().pageTitle),B("isDialogFilterVisible",n.dialogFilterVisible)("isInitDialogFilterVisible",n.isInitDialogFilterVisible),s("scrollable",!0))},dependencies:[ie,q,j,z,ye,re,oe,J,Y,W,K,$,X,me,pe,ne,le,ae,ee,Ue,U,H,Ie,Ee,Z,Q],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var xt=vt(Lt());var Wi={metadata:{options:{outlets:[]},filter:{to:"",outletID:[]},roles:{isInRoleEmptyOutlet:!1}},data:{asset:[],liability:[],equity:[],pageTitle:""},filter:{date:(0,xt.default)().format("YYYY-MM-DD"),listOutletParam:[]}},bt=We(Xe(Wi),Ke(t=>({totalAsset:T(()=>t.data().asset.reduce((m,e)=>m+ +e.amount,0)),totalLiability:T(()=>t.data().liability.reduce((m,e)=>m+ +e.counterAmount,0)),totalEquity:T(()=>t.data().equity.reduce((m,e)=>m+ +e.counterAmount,0))})),$e(t=>{let m=C(A),e={updateFilter:i=>{P(t,n=>y(g({},n),{filter:i}))},fetchBalanceSheet:Se(ue(Me(()=>{let i=t.filter();return Object.entries(i).every(([n,p])=>p!=null&&p!=="")}),_e(i=>m.getBalanceSheet(i).pipe(ve({next:n=>{P(t,p=>y(g({},p),{data:n}))},error:n=>{console.error(n)}}))),yt(1))),fetchLoader:Se(ue(_e(()=>m.getBalanceSheetLoader().pipe(ve({next:i=>{P(t,n=>y(g({},n),{metadata:i,filter:{date:(0,xt.default)(i.filter.to).format("YYYY-MM-DD")}})),e.fetchBalanceSheet(t.filter)},error:i=>{console.error(i)}})))))};return e}),Ye(t=>({onInit:()=>{t.fetchLoader()}})));var Gt=vt(Lt());var Ct=t=>["/pages/chart-of-account/account/",t],St=()=>["/pages/report/general-ledger"],Ki=(t,m)=>({id:t,to:m}),Pt=t=>({id:t});function Yi(t,m){if(t&1){let e=R();o(0,"p-button",11),I("onClick",function(){h(e);let n=c(2);return x(n.onExport())}),r()}}function $i(t,m){if(t&1&&(o(0,"div",9),b(1,Yi,1,0,"p-button",10),r()),t&2){let e=c();l(),s("ngIf",e.roleService.global.export)}}function Xi(t,m){t&1&&(o(0,"tr")(1,"th",16),a(2,"Code"),r(),o(3,"th"),a(4,"Asset"),r(),o(5,"th",17),a(6,"Total"),r()())}function Ji(t,m){if(t&1&&(o(0,"tr")(1,"td"),a(2),r(),o(3,"td")(4,"a",18),a(5),r()(),o(6,"td",19)(7,"a",20),a(8),S(9,"number"),r()()()),t&2){let e=m.$implicit,i=c(3);l(2),f(e.code),l(2),s("routerLink",F(8,Ct,e.accountID)),l(),f(e.name),l(2),s("routerLink",V(10,St))("queryParams",wt(11,Ki,e.accountID,i.store.filter().date)),l(),f(v(9,6,e.amount))}}function Qi(t,m){if(t&1&&(o(0,"tr")(1,"td",21),a(2,"Total Asset"),r(),o(3,"td",22),a(4),S(5,"number"),r()()),t&2){let e=c(3);l(4),D(" ",v(5,1,e.store.totalAsset())," ")}}function Zi(t,m){t&1&&(o(0,"tr")(1,"td",23)(2,"span"),a(3,"No asset records found."),r()()())}function en(t,m){if(t&1&&(o(0,"h4",14),a(1,"Asset"),r(),o(2,"p-table",15),b(3,Xi,7,0,"ng-template",null,3,d)(5,Ji,10,14,"ng-template",null,4,d)(7,Qi,6,3,"ng-template",null,5,d)(9,Zi,4,0,"ng-template",null,6,d),r()),t&2){let e=c(2);l(2),s("value",e.store.data().asset)}}function tn(t,m){t&1&&(o(0,"tr")(1,"th",16),a(2,"Code"),r(),o(3,"th"),a(4,"Liability"),r(),o(5,"th",17),a(6,"Total"),r()())}function nn(t,m){if(t&1&&(o(0,"tr")(1,"td"),a(2),r(),o(3,"td")(4,"a",25),a(5),r()(),o(6,"td",19)(7,"a",20),a(8),S(9,"number"),r()()()),t&2){let e=m.$implicit;l(2),f(e.code),l(2),s("routerLink",F(8,Ct,e.accountID)),l(),f(e.name),l(2),s("routerLink",V(10,St))("queryParams",F(11,Pt,e.accountID)),l(),f(v(9,6,e.counterAmount))}}function on(t,m){if(t&1&&(o(0,"tr")(1,"td",21),a(2," Total Liability "),r(),o(3,"td",22),a(4),S(5,"number"),r()()),t&2){let e=c(3);l(4),D(" ",v(5,1,e.store.totalLiability())," ")}}function rn(t,m){t&1&&(o(0,"tr")(1,"td",23)(2,"span"),a(3,"No liability records found."),r()()())}function an(t,m){if(t&1&&(o(0,"h4",24),a(1,"Liability"),r(),o(2,"p-table",15),b(3,tn,7,0,"ng-template",null,3,d)(5,nn,10,13,"ng-template",null,4,d)(7,on,6,3,"ng-template",null,5,d)(9,rn,4,0,"ng-template",null,6,d),r()),t&2){let e=c(2);l(2),s("value",e.store.data().liability)}}function ln(t,m){t&1&&(o(0,"tr")(1,"th",16),a(2,"Code"),r(),o(3,"th"),a(4,"Equity"),r(),o(5,"th",17),a(6,"Total"),r()())}function pn(t,m){if(t&1&&(o(0,"tr")(1,"td"),a(2),r(),o(3,"td")(4,"a",18),a(5),r()(),o(6,"td",19)(7,"a",20),a(8),S(9,"number"),r()()()),t&2){let e=m.$implicit;l(2),f(e.code),l(2),s("routerLink",F(8,Ct,e.accountID)),l(),f(e.name),l(2),s("routerLink",V(10,St))("queryParams",F(11,Pt,e.accountID)),l(),f(v(9,6,e.counterAmount))}}function mn(t,m){if(t&1&&(o(0,"tr")(1,"td",21),a(2,"Total Equity"),r(),o(3,"td",22),a(4),S(5,"number"),r()(),o(6,"tr")(7,"td",21),a(8," Total Liability + Equity "),r(),o(9,"td",22),a(10),S(11,"number"),r()()),t&2){let e=c(3);l(4),D(" ",v(5,2,e.store.totalEquity())," "),l(6),D(" ",v(11,4,e.store.totalLiability()+e.store.totalEquity())," ")}}function sn(t,m){t&1&&(o(0,"tr")(1,"td",23)(2,"span"),a(3,"No equity records found."),r()()())}function cn(t,m){if(t&1&&(o(0,"h4",24),a(1,"Equity"),r(),o(2,"p-table",15),b(3,ln,7,0,"ng-template",null,3,d)(5,pn,10,13,"ng-template",null,4,d),a(7," <"),b(8,mn,12,6,"ng-template",null,5,d)(10,sn,4,0,"ng-template",null,6,d),r()),t&2){let e=c(2);l(2),s("value",e.store.data().equity)}}function dn(t,m){if(t&1&&(o(0,"p-panel",12)(1,"div",13),b(2,en,11,1)(3,an,11,1)(4,cn,12,1),r()()),t&2){let e=c();s("showHeader",!1),l(2),L(e.Object.keys(e.store.data().asset).length>0?2:-1),l(),L(e.Object.keys(e.store.data().liability).length>0?3:-1),l(),L(e.Object.keys(e.store.data().equity).length>0?4:-1)}}function un(t,m){if(t&1&&(o(0,"div",31)(1,"div"),a(2),r()()),t&2){let e=m.$implicit;l(2),f(e.value)}}function _n(t,m){if(t&1&&(o(0,"form",26)(1,"div",27)(2,"label",28),a(3,"Outlet"),r(),o(4,"p-multiselect",29),b(5,un,3,1,"ng-template",null,7,d),r()(),o(7,"div",27)(8,"label",28),a(9,"From"),r(),w(10,"p-datepicker",30),r()()),t&2){let e=c();s("formGroup",e.filterForm),l(4),s("virtualScroll",!0)("virtualScrollItemSize",50)("options",e.store.metadata().options.outlets)("showClear",!0),l(6),s("iconDisplay","input")("showIcon",!0)}}var Ot=(()=>{class t{constructor(){this.store=C(bt),this.ReportServiceStore=C(A),this.dialogFilterVisible=E(!1),this.isInitDialogFilterVisible=E(!1),this.roleService=C(te),this.Object=Object}ngOnInit(){this.generateFilterForm()}generateFilterForm(){this.filterForm=new Ft({date:new rt(new Date),outletID:new rt([])})}onFilterOKEvent(){let{date:e,outletID:i}=this.filterForm.value;this.store.updateFilter({date:(0,Gt.default)(e).format("YYYY-MM-DD"),listOutletParam:i}),this.dialogFilterVisible.update(n=>!n)}onExport(){let e=y(g({},this.store.filter()),{export:!0,ExportPageNumber:1,ExportRowCount:1e4});this.ReportServiceStore.getBalanceSheet(e,{responseType:"blob"}).pipe(Fe("Export Balance Sheet"),M(i=>{let n=i.type,p=[i],u=document.createElement("a");u.href=window.URL.createObjectURL(new Blob(p,{type:n}));let _=`balance-sheet.${n.split("/")[1]}`;u.setAttribute("download",_),document.body.appendChild(u),u.click(),document.body.removeChild(u)})).subscribe()}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=k({type:t,selectors:[["app-report-balance-sheet"]],features:[Ne([bt])],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(i,n){if(i&1){let p=R();o(0,"app-main-panel",8),G("isDialogFilterVisibleChange",function(_){return h(p),N(n.dialogFilterVisible,_)||(n.dialogFilterVisible=_),x(_)})("isInitDialogFilterVisibleChange",function(_){return h(p),N(n.isInitDialogFilterVisible,_)||(n.isInitDialogFilterVisible=_),x(_)}),I("filterConfirmed",function(){return h(p),x(n.onFilterOKEvent())}),b(1,$i,2,1,"ng-template",null,0,d)(3,dn,5,4,"ng-template",null,1,d)(5,_n,11,7,"ng-template",null,2,d),r()}i&2&&(s("pageTitle",n.store.data().pageTitle)("isFilterable",!0),B("isDialogFilterVisible",n.dialogFilterVisible)("isInitDialogFilterVisible",n.isInitDialogFilterVisible),s("scrollable",!0))},dependencies:[ie,q,j,z,le,ae,ne,Z,Q,J,Y,W,K,$,X,me,pe,re,oe,Ce,ee,Ue,U,H],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var jt=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=k({type:t,selectors:[["app-report-comparative-balance"]],decls:3,vars:0,template:function(i,n){i&1&&(o(0,"p"),a(1,"report-comparative-balance works!"),r(),a(2,`
|
|
2
2
|
,
|
|
3
3
|
`))},styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var zt=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=k({type:t,selectors:[["app-report-cash-flow"]],decls:3,vars:0,template:function(i,n){i&1&&(o(0,"p"),a(1,"report-cash-flow works!"),r(),a(2,`
|
|
4
4
|
,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as y}from"./chunk-
|
|
1
|
+
import{a as y}from"./chunk-J2PXABSJ.js";import{a as D,b as H}from"./chunk-O4QM64EH.js";import{d as Y,i as Z,j as ee,k as te}from"./chunk-SVXDMOLP.js";import"./chunk-S6X7PJAB.js";import"./chunk-LWLJZPBI.js";import"./chunk-3NU3P6NL.js";import"./chunk-GDX5XEV3.js";import"./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 X}from"./chunk-7INXBUUN.js";import"./chunk-X22YKT5B.js";import{a as f,b as $,c as q,d as G,e as J,f as Q,g as W}from"./chunk-JMEBBWX4.js";import"./chunk-FUZFAJGJ.js";import{w as K,x as O}from"./chunk-5FSMHZSY.js";import"./chunk-A5HAJEPC.js";import"./chunk-G5S5AZA7.js";import{e as L}from"./chunk-Z45NTTES.js";import"./chunk-CV4R4TBA.js";import"./chunk-BLQJXMNV.js";import"./chunk-F2X3VGZZ.js";import{k as j,p as F,r as A}from"./chunk-OKCHQM5Q.js";import{Cb as E,Jc as v,Kb as h,Lc as M,Mc as _,Ub as r,Vb as l,Wb as S,X as k,Yc as b,Z as N,_b as R,c as P,dc as T,ec as g,gb as d,ha as x,pa as u,qa as C,qc as p,rc as w,s as V,uc as z,wb as U,yc as B}from"./chunk-JP6RBSB3.js";import{a,b as c}from"./chunk-YQFG5XE2.js";var ne={data:[],count:0,filter:{PageSize:20,PageNumber:1}},I=$(Q(ne),W("Closing Entries Store"),q(t=>({first:b(()=>(t.filter().PageNumber-1)*t.filter().PageSize+1),end:b(()=>Math.min(t.filter().PageNumber*t.filter().PageSize,t.count())),hasCheckedRows:b(()=>t.data().some(s=>s.checked)),selectedItems:b(()=>t.data().filter(s=>s.checked))})),J(t=>{let s=x(y),e={updateFilter:o=>{f(t,n=>c(a({},n),{filter:a(a({},n.filter),o)}))},onRowSelect(o){f(t,n=>{let i=n.data.map(m=>m.id===o.id?c(a({},m),{checked:!0}):m);return c(a({},n),{data:i})})},onRowUnselect(o){f(t,n=>{let i=n.data.map(m=>m.id===o.id?c(a({},m),{checked:!1}):m);return c(a({},n),{data:i})})},onHeaderCheckboxToggle(o){f(t,n=>{let i=n.data.map(m=>c(a({},m),{checked:o}));return c(a({},n),{data:i})})},getClosingEntries:D(P(k(o=>s.getClosingEntries(o).pipe(V(n=>n.map(i=>c(a({},i),{checked:!1}))),H({next:n=>{f(t,i=>c(a({},i),{data:n})),e.getClosingEntryCount()},error:n=>{console.error("Error fetching closing entries:",n)}}))))),getClosingEntryCount:D(P(k(()=>s.getClosingEntryCount().pipe(H({next:({count:o})=>{f(t,n=>c(a({},n),{count:o}))},error:o=>{console.error("Error fetching closing entry count:",o)}})))))};return e}),G(t=>({onInit:()=>{t.getClosingEntries(t.filter)}})));function oe(t,s){if(t&1){let e=R();r(0,"p-button",11),T("onClick",function(){u(e);let n=g(2);return C(n.onDeleteClosingEntries())}),l()}}function ie(t,s){if(t&1&&(r(0,"div",7),E(1,oe,1,0,"p-button",8),r(2,"a",9),S(3,"i",10),p(4," Add"),l()()),t&2){let e=g();d(),h("ngIf",e.store.hasCheckedRows())}}function re(t,s){t&1&&(r(0,"tr")(1,"th",13),S(2,"p-tableHeaderCheckbox"),l(),r(3,"th"),p(4,"Period"),l(),r(5,"th"),p(6,"Note"),l(),r(7,"th"),p(8,"Created"),l(),r(9,"th"),p(10,"CreatedBy"),l()())}function ae(t,s){if(t&1&&(r(0,"tr")(1,"td"),S(2,"p-tableCheckbox",14),l(),r(3,"td"),p(4),v(5,"date"),l(),r(6,"td"),p(7),l(),r(8,"td"),p(9),v(10,"date"),l(),r(11,"td"),p(12),l()()),t&2){let e=s.$implicit;d(2),h("value",e),d(2),w(M(5,5,e.period,"d MMM y")),d(3),w(e.note),d(2),w(M(10,8,e.created,"d MMM y")),d(3),w(e.creatorName)}}function le(t,s){if(t&1&&p(0),t&2){let e=g(2);z(" Showing ",e.store.first()," to ",e.store.end()," of ",e.store.count()," entries ")}}function se(t,s){t&1&&(r(0,"tr")(1,"td",15)(2,"span"),p(3," No journal entries found. "),l()()())}function ce(t,s){if(t&1){let e=R();r(0,"p-table",12),T("onPage",function(n){u(e);let i=g();return C(i.onPageChange(n))})("onRowSelect",function(n){u(e);let i=g();return C(i.onRowSelect(n))})("onRowUnselect",function(n){u(e);let i=g();return C(i.onRowUnselect(n))})("onHeaderCheckboxToggle",function(n){u(e);let i=g();return C(i.onHeaderCheckboxToggle(n))}),E(1,re,11,0,"ng-template",null,2,_)(3,ae,13,11,"ng-template",null,3,_)(5,le,1,3,"ng-template",null,4,_)(7,se,4,0,"ng-template",null,5,_),l()}if(t&2){let e=g();h("value",e.store.data())("paginator",!0)("totalRecords",e.store.count())("lazy",!0)("rows",e.store.filter().PageSize)("scrollHeight","calc(100vh - 142px)")}}var Ve=(()=>{class t{constructor(){this.store=x(I),this.closingEntryService=x(y)}onPageChange(e){let o=e.first/e.rows+1;this.store.updateFilter(c(a({},this.store.filter()),{PageSize:o}))}onRowSelect(e){this.store.onRowSelect(e.data)}onRowUnselect(e){if(Array.isArray(e.data)){e.data.forEach(o=>{this.store.onRowUnselect(o)});return}else this.store.onRowUnselect(e.data)}onHeaderCheckboxToggle(e){this.store.onHeaderCheckboxToggle(e.checked)}onDeleteClosingEntries(){let e=this.store.selectedItems().map(o=>o.id).join(",");console.log("Deleting closing entries with IDs:",e),this.closingEntryService.deleteClosingEntry(e).pipe(N(()=>{this.store.updateFilter(a({},this.store.filter()))})).subscribe()}static{this.\u0275fac=function(o){return new(o||t)}}static{this.\u0275cmp=U({type:t,selectors:[["app-closing-page"]],features:[B([I])],decls:5,vars:1,consts:[["actionButton",""],["content",""],["header",""],["body",""],["paginatorleft",""],["emptymessage",""],["pageTitle","Closing Entries List",3,"scrollable"],[1,"d-flex","gap-2"],["label","Delete","severity","danger","icon","fa-solid fa-trash",3,"onClick",4,"ngIf"],["routerLink","create",1,"p-button"],[1,"fa-solid","fa-plus"],["label","Delete","severity","danger","icon","fa-solid fa-trash",3,"onClick"],["dataKey","id","styleClass","d-flex flex-column justify-content-between h-100",3,"onPage","onRowSelect","onRowUnselect","onHeaderCheckboxToggle","value","paginator","totalRecords","lazy","rows","scrollHeight"],[2,"width","1rem"],[3,"value"],["colspan","5"]],template:function(o,n){o&1&&(r(0,"app-main-panel",6),E(1,ie,5,1,"ng-template",null,0,_)(3,ce,9,6,"ng-template",null,1,_),l()),o&2&&h("scrollable",!0)},dependencies:[X,A,j,F,te,Y,Z,ee,L,O,K],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();export{Ve as ClosingPageComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as V,b as oe}from"./chunk-
|
|
1
|
+
import{a as V,b as oe}from"./chunk-FHKTIAXX.js";import"./chunk-INB6OCHW.js";import{a as te,b as ie}from"./chunk-S6X7PJAB.js";import"./chunk-LWLJZPBI.js";import"./chunk-3NU3P6NL.js";import{a as K,b as Q}from"./chunk-H57SDRPH.js";import{a as ne,b as re}from"./chunk-VVUSFS6O.js";import"./chunk-ZTEDQLOG.js";import"./chunk-EDGADVEY.js";import{b as ee}from"./chunk-4CDAAU6Z.js";import{h as $}from"./chunk-7INXBUUN.js";import"./chunk-X22YKT5B.js";import{a as Y,b as Z}from"./chunk-JYCUE5HV.js";import"./chunk-JMEBBWX4.js";import"./chunk-FUZFAJGJ.js";import{w as U,x as X}from"./chunk-5FSMHZSY.js";import"./chunk-A5HAJEPC.js";import{e as G,j as H,w as q}from"./chunk-G5S5AZA7.js";import"./chunk-CV4R4TBA.js";import{a as A}from"./chunk-BLQJXMNV.js";import"./chunk-F2X3VGZZ.js";import{n as z,r as R}from"./chunk-OKCHQM5Q.js";import{Cb as L,Ga as b,Jc as T,Kb as u,Kc as P,Mc as M,Nb as S,Ub as r,V as E,Vb as o,Wb as C,X as B,Z as W,_b as h,dc as f,ec as m,gb as s,h as J,ha as x,pa as l,qa as p,qc as _,ra as I,s as y,sa as N,vc as c,wb as O,wc as g,xc as d,yc as j,zc as F}from"./chunk-JP6RBSB3.js";import{a as D}from"./chunk-YQFG5XE2.js";var ae=()=>({height:"calc(100vh - 100px)"});function le(a,v){if(a&1){let t=h();r(0,"div",4)(1,"p-button",5),f("onClick",function(){l(t);let e=m();return p(e.onFormat())}),o(),r(2,"p-button",6),f("onClick",function(){l(t);let e=m();return p(e.openMigrateDialog())}),o()()}}function pe(a,v){if(a&1){let t=h();r(0,"div",7)(1,"div",8)(2,"label",9),_(3,"From"),o(),r(4,"p-datepicker",10),d("ngModelChange",function(e){l(t);let n=m();return g(n.filter().From,e)||(n.filter().From=e),p(e)}),o()(),r(5,"div",8)(6,"label",9),_(7,"To"),o(),r(8,"p-datepicker",10),d("ngModelChange",function(e){l(t);let n=m();return g(n.filter().To,e)||(n.filter().To=e),p(e)}),o()(),r(9,"div",8)(10,"label",9),_(11,"Page Number"),o(),r(12,"p-inputnumber",11),d("ngModelChange",function(e){l(t);let n=m();return g(n.filter().PageNumber,e)||(n.filter().PageNumber=e),p(e)}),o()(),r(13,"div",8)(14,"label",9),_(15,"Page Size"),o(),r(16,"p-inputnumber",11),d("ngModelChange",function(e){l(t);let n=m();return g(n.filter().PageSize,e)||(n.filter().PageSize=e),p(e)}),o()()()}if(a&2){let t=m();s(4),u("showIcon",!0),c("ngModel",t.filter().From),s(4),u("showIcon",!0),c("ngModel",t.filter().To),s(4),c("ngModel",t.filter().PageNumber),s(4),c("ngModel",t.filter().PageSize)}}function me(a,v){if(a&1&&(r(0,"p-scroll-panel")(1,"p-panel")(2,"div",12),C(3,"app-migration-cards",13),T(4,"async"),I(),r(5,"svg",14),C(6,"path",15),o(),N(),C(7,"app-migration-cards",16),T(8,"async"),o()()()),a&2){let t=m();S(F(12,ae)),s(),S(F(13,ae)),s(2),u("migrationCount",P(4,8,t.countInPOS$))("migrationTitle",t.pageTitle),s(4),u("migrationCount",P(8,10,t.countInBooks$))("migrationTitle",t.pageTitle)}}var We=(()=>{class a{constructor(){this.migrateService=x(V),this.refresh$=new J(void 0),this.toastr=x(A),this.pageTitle="Manual Journal",this.filter=b({From:new Date,To:new Date,PageSize:45e3,PageNumber:1}),this.isFilterDialogOpen=b(!1),this.previousFilter=null}ngOnInit(){let t=this.refresh$.pipe(B(()=>this.migrateService.getManualJournalCount()),E(1));this.countInPOS$=t.pipe(y(i=>Number(i.pos))),this.countInBooks$=t.pipe(y(i=>Number(i.books)))}openMigrateDialog(){this.previousFilter=D({},this.filter()),this.isFilterDialogOpen.set(!0)}onMigrate(){this.migrateService.migrateManualJournal(this.filter()).pipe(W(()=>{this.isFilterDialogOpen.update(t=>!t),this.refresh$.next(),this.previousFilter=null})).subscribe()}onFilterCanceled(){this.previousFilter&&(this.filter.set(this.previousFilter),this.previousFilter=null)}onFormat(){window.confirm("Are you sure you want to format this data? This action cannot be undone.")&&this.migrateService.formatManualJournal().subscribe(i=>{this.refresh$.next(),this.toastr.success(i.message,"Format Successful")})}static{this.\u0275fac=function(i){return new(i||a)}}static{this.\u0275cmp=O({type:a,selectors:[["app-manual-journal"]],features:[j([V])],decls:7,vars:2,consts:[["actionButton",""],["filters",""],["content",""],[3,"filterConfirmed","isDialogFilterVisibleChange","filterCanceled","pageTitle","isDialogFilterVisible"],[1,"d-flex","gap-2"],["label","Format","severity","danger",3,"onClick"],["label","Migrate",3,"onClick"],[1,"d-flex","flex-column","row-gap-3"],[1,"d-flex","flex-column"],["for","outlet"],["styleClass","w-100","appendTo","body","iconDisplay","input","inputId","icondisplay",3,"ngModelChange","showIcon","ngModel"],["inputId","integeronly",3,"ngModelChange","ngModel"],[1,"flex","gap-30","flex-wrap",2,"display","flex","justify-content","center","align-items","center","gap","1rem","margin-top","40px"],["migrationPlace","Accounting",3,"migrationCount","migrationTitle"],["width","40","height","40","viewBox","0 0 24 24","fill","none"],["d","M8 5l8 7-8 7","stroke","#007bff","stroke-width","2","stroke-linecap","round","stroke-linejoin","round"],["migrationPlace","Books",3,"migrationCount","migrationTitle"]],template:function(i,e){if(i&1){let n=h();r(0,"app-main-panel",3),f("filterConfirmed",function(){return l(n),p(e.onMigrate())}),d("isDialogFilterVisibleChange",function(w){return l(n),g(e.isFilterDialogOpen,w)||(e.isFilterDialogOpen=w),p(w)}),f("filterCanceled",function(){return l(n),p(e.onFilterCanceled())}),L(1,le,3,0,"ng-template",null,0,M)(3,pe,17,6,"ng-template",null,1,M)(5,me,9,14,"ng-template",null,2,M),o()}i&2&&(u("pageTitle",e.pageTitle),c("isDialogFilterVisible",e.isFilterDialogOpen))},dependencies:[$,R,z,ee,X,U,Q,K,Z,Y,oe,ie,te,q,G,H,re,ne],encapsulation:2})}}return a})();export{We as ManualJournalComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"./chunk-
|
|
1
|
+
import{a}from"./chunk-CV4R4TBA.js";import{ba as c,ha as n,i as o}from"./chunk-JP6RBSB3.js";import{a as i}from"./chunk-YQFG5XE2.js";var C=(()=>{class r{constructor(){this.httpService=n(a),this.categoryOptionsCache$=new o(1),this.isInitialized=!1}getChartOfAccountLoader(){return this.httpService.get("","api/ChartOfAccountLoader")}getPaginatedChartAccounts(t){let e=i({},t);return this.httpService.post("","api/ChartOfAccount/GetPaginatedList",e,{observe:"body"})}getChartAccountForm(){return this.httpService.get("","api/ChartOfAccount/Form")}getChartAccountById(t){return this.httpService.get("",`api/ChartOfAccount/Info/${t}`)}getChartAccountFormById(t){return this.httpService.get("",`api/ChartOfAccount/Form/${t}`)}submitChartAccount(t,e={}){return this.httpService.post("","api/ChartOfAccount/Submit",t,e)}deleteChartAccount(t){if(t.length>1){let e={body:t};return this.httpService.delete("","api/ChartOfAccount/Batch",e)}else return this.httpService.delete("",`api/ChartOfAccount/${t[0]}`)}fetchCategoryOptions(){return this.httpService.get("","api/ChartOfAccount/CategoryOptions")}getCachedCategoriesOptions(){return this.isInitialized||(this.isInitialized=!0,this.fetchCategoryOptions().subscribe({next:t=>this.categoryOptionsCache$.next(t),error:t=>this.categoryOptionsCache$.error(t)})),this.categoryOptionsCache$.asObservable()}exportChartOfAccounts(t){return this.httpService.post(void 0,"api/ChartOfAccountExport/export",t,{observe:"response",responseType:"blob"})}importPreviewChartOfAccounts(t){return this.httpService.post(void 0,"api/chartofaccount/importpreview",t)}importConfirmChartOfAccounts(t){return this.httpService.post(void 0,"api/chartofaccount/importconfirm",t)}discountedChartAccounts(t,e){return this.httpService.put(void 0,`/api/ChartOfAccount/${t}/discontinued`,e)}static{this.\u0275fac=function(e){return new(e||r)}}static{this.\u0275prov=c({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})();export{C as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./chunk-YQFG5XE2.js";var t=[{path:"",redirectTo:"tax-account",pathMatch:"full"},{path:"tax-account",loadComponent:()=>import("./chunk-6I5H3YGD.js").then(o=>o.TaxAccountComponent)},{path:"chart-of-account",loadComponent:()=>import("./chunk-I4PT5J7Y.js").then(o=>o.ChartOfAccountComponent)},{path:"manual-journal",loadComponent:()=>import("./chunk-4DYLPYFL.js").then(o=>o.ManualJournalComponent)},{path:"payment-account",loadComponent:()=>import("./chunk-K6XRQ3BT.js").then(o=>o.PaymentAccountComponent)},{path:"writeoff-outlet",loadComponent:()=>import("./chunk-7ABLTWH5.js").then(o=>o.WriteOffOutletComponent)},{path:"expense-account",loadComponent:()=>import("./chunk-7QH3KK6N.js").then(o=>o.ExpenseAccountComponent)},{path:"coa-configuration",loadComponent:()=>import("./chunk-6M3ROM2S.js").then(o=>o.CoaConfigurationComponent)},{path:"coa-category",loadComponent:()=>import("./chunk-GI246KYJ.js").then(o=>o.CoaCategoryComponent)},{path:"outlet-account",loadComponent:()=>import("./chunk-A52O36YW.js").then(o=>o.OutletAccountComponent)}];export{t as MIGRATE_ROUTES};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as C,b as L}from"./chunk-
|
|
1
|
+
import{a as C,b as L}from"./chunk-FHKTIAXX.js";import"./chunk-INB6OCHW.js";import{a as E,b as V}from"./chunk-H57SDRPH.js";import"./chunk-4CDAAU6Z.js";import{h as H}from"./chunk-7INXBUUN.js";import{b as N,c as G}from"./chunk-X22YKT5B.js";import{a as R,b as D}from"./chunk-JYCUE5HV.js";import"./chunk-JMEBBWX4.js";import"./chunk-FUZFAJGJ.js";import{w as j,x as O}from"./chunk-5FSMHZSY.js";import"./chunk-A5HAJEPC.js";import"./chunk-G5S5AZA7.js";import"./chunk-CV4R4TBA.js";import{a as I}from"./chunk-BLQJXMNV.js";import"./chunk-F2X3VGZZ.js";import{n as $,r as F}from"./chunk-OKCHQM5Q.js";import{Cb as A,Jc as c,Kb as p,Kc as l,Mc as T,Nb as x,Ub as n,V as y,Vb as o,Wb as m,X as M,Z as S,_b as P,dc as h,ec as s,gb as a,h as v,ha as f,pa as g,qa as d,ra as b,s as u,sa as k,wb as B,yc as w,zc as _}from"./chunk-JP6RBSB3.js";import"./chunk-YQFG5XE2.js";var q=()=>({height:"calc(100vh - 100px)"});function J(i,z){if(i&1){let e=P();n(0,"div",3)(1,"p-button",4),h("onClick",function(){g(e);let r=s();return d(r.onFormat())}),o(),n(2,"p-button",5),c(3,"async"),c(4,"async"),h("onClick",function(){g(e);let r=s();return d(r.onMigrate())}),o()()}if(i&2){let e=s();a(2),p("disabled",l(3,2,e.countInBooks$)!==0)("pTooltip",l(4,4,e.countInBooks$)!==0?"Books already has entries. Please format before re-migrating.":null)}}function K(i,z){if(i&1&&(n(0,"p-scroll-panel")(1,"p-panel")(2,"div",6),m(3,"app-migration-cards",7),c(4,"async"),b(),n(5,"svg",8),m(6,"path",9),o(),k(),m(7,"app-migration-cards",10),c(8,"async"),o()()()),i&2){let e=s();x(_(12,q)),a(),x(_(13,q)),a(2),p("migrationCount",l(4,8,e.countInPOS$))("migrationTitle",e.pageTitle),a(4),p("migrationCount",l(8,10,e.countInBooks$))("migrationTitle",e.pageTitle)}}var ue=(()=>{class i{constructor(){this.migrateService=f(C),this.toastr=f(I),this.refresh$=new v(void 0),this.pageTitle="Tax Account"}ngOnInit(){let e=this.refresh$.pipe(M(()=>this.migrateService.getTaxAccountCount()),S(t=>console.log("API response:",t)),y(1));this.countInPOS$=e.pipe(u(t=>Number(t.pos))),this.countInBooks$=e.pipe(u(t=>Number(t.books)))}onMigrate(){this.migrateService.migrateTaxAccount().subscribe(e=>{this.refresh$.next(),this.toastr.success(e.message,"Migration Successful")})}onFormat(){confirm("Are you sure you want to format?")&&this.migrateService.formatTaxAccount().subscribe(e=>{this.refresh$.next(),this.toastr.success(e.message,"Format Successful")})}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=B({type:i,selectors:[["app-tax-account"]],features:[w([C])],decls:5,vars:1,consts:[["actionButton",""],["content",""],[3,"pageTitle"],[1,"d-flex","gap-2"],["label","Format","severity","danger",3,"onClick"],["label","Migrate","tooltipPosition","left",3,"onClick","disabled","pTooltip"],[1,"flex","gap-30","flex-wrap",2,"display","flex","justify-content","center","align-items","center","gap","1rem","margin-top","40px"],["migrationPlace","Accounting",3,"migrationCount","migrationTitle"],["width","40","height","40","viewBox","0 0 24 24","fill","none"],["d","M8 5l8 7-8 7","stroke","#007bff","stroke-width","2","stroke-linecap","round","stroke-linejoin","round"],["migrationPlace","Books",3,"migrationCount","migrationTitle"]],template:function(t,r){t&1&&(n(0,"app-main-panel",2),A(1,J,5,6,"ng-template",null,0,T)(3,K,9,14,"ng-template",null,1,T),o()),t&2&&p("pageTitle",r.pageTitle)},dependencies:[H,F,$,V,E,D,R,G,N,L,O,j],encapsulation:2})}}return i})();export{ue as TaxAccountComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as v,b as L}from"./chunk-
|
|
1
|
+
import{a as v,b as L}from"./chunk-FHKTIAXX.js";import"./chunk-INB6OCHW.js";import{a as E,b as O}from"./chunk-H57SDRPH.js";import"./chunk-4CDAAU6Z.js";import{h as H}from"./chunk-7INXBUUN.js";import{b as N,c as G}from"./chunk-X22YKT5B.js";import{a as R,b as D}from"./chunk-JYCUE5HV.js";import"./chunk-JMEBBWX4.js";import"./chunk-FUZFAJGJ.js";import{w as V,x as j}from"./chunk-5FSMHZSY.js";import"./chunk-A5HAJEPC.js";import"./chunk-G5S5AZA7.js";import"./chunk-CV4R4TBA.js";import{a as I}from"./chunk-BLQJXMNV.js";import"./chunk-F2X3VGZZ.js";import{n as A,r as F}from"./chunk-OKCHQM5Q.js";import{Cb as B,Jc as m,Kb as p,Kc as l,Mc as x,Nb as d,Ub as o,V as y,Vb as n,Wb as c,X as M,Z as b,_b as P,dc as h,ec as s,gb as a,h as T,ha as f,pa as g,qa as C,ra as S,s as u,sa as k,wb as w,yc as $,zc as _}from"./chunk-JP6RBSB3.js";import"./chunk-YQFG5XE2.js";var q=()=>({height:"calc(100vh - 100px)"});function J(i,z){if(i&1){let e=P();o(0,"div",3)(1,"p-button",4),h("onClick",function(){g(e);let r=s();return C(r.onFormatCOAConfig())}),n(),o(2,"p-button",5),m(3,"async"),m(4,"async"),h("onClick",function(){g(e);let r=s();return C(r.onMigrateCoaConfig())}),n()()}if(i&2){let e=s();a(2),p("disabled",l(3,2,e.countInBooks$)!==0)("pTooltip",l(4,4,e.countInBooks$)!==0?"Books already has entries. Please format before re-migrating.":null)}}function K(i,z){if(i&1&&(o(0,"p-scroll-panel")(1,"p-panel")(2,"div",6),c(3,"app-migration-cards",7),m(4,"async"),S(),o(5,"svg",8),c(6,"path",9),n(),k(),c(7,"app-migration-cards",10),m(8,"async"),n()()()),i&2){let e=s();d(_(12,q)),a(),d(_(13,q)),a(2),p("migrationCount",l(4,8,e.countInPOS$))("migrationTitle",e.pageTitle),a(4),p("migrationCount",l(8,10,e.countInBooks$))("migrationTitle",e.pageTitle)}}var ge=(()=>{class i{constructor(){this.migrateService=f(v),this.toastr=f(I),this.refresh$=new T(void 0),this.pageTitle="Chart of Account Configuration"}ngOnInit(){let e=this.refresh$.pipe(M(()=>this.migrateService.getCOAConfigurationCount()),b(t=>console.log("API response:",t)),y(1));this.countInPOS$=e.pipe(u(t=>Number(t.pos))),this.countInBooks$=e.pipe(u(t=>Number(t.books)))}onMigrateCoaConfig(){this.migrateService.migrateCoaConfig().subscribe(e=>{this.refresh$.next(),this.toastr.success(e.message,"Migration Successful")})}onFormatCOAConfig(){window.confirm("Are you sure you want to format this data? This action cannot be undone.")&&this.migrateService.formatManualCOAConfig().subscribe(t=>{this.refresh$.next(),this.toastr.success(t.message,"Format Successful")})}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=w({type:i,selectors:[["app-coa-configuration"]],features:[$([v])],decls:5,vars:1,consts:[["actionButton",""],["content",""],[3,"pageTitle"],[1,"d-flex","gap-2"],["label","Format","severity","danger",3,"onClick"],["label","Migrate","tooltipPosition","left",3,"onClick","disabled","pTooltip"],[1,"flex","gap-30","flex-wrap",2,"display","flex","justify-content","center","align-items","center","gap","1rem","margin-top","40px"],["migrationPlace","Accounting",3,"migrationCount","migrationTitle"],["width","40","height","40","viewBox","0 0 24 24","fill","none"],["d","M8 5l8 7-8 7","stroke","#007bff","stroke-width","2","stroke-linecap","round","stroke-linejoin","round"],["migrationPlace","Books",3,"migrationCount","migrationTitle"]],template:function(t,r){t&1&&(o(0,"app-main-panel",2),B(1,J,5,6,"ng-template",null,0,x)(3,K,9,14,"ng-template",null,1,x),n()),t&2&&p("pageTitle",r.pageTitle)},dependencies:[H,F,A,j,V,O,E,D,R,G,N,L],encapsulation:2})}}return i})();export{ge as CoaConfigurationComponent};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as un}from"./chunk-
|
|
1
|
+
import{a as un}from"./chunk-PXCF3E7D.js";import{a as qn}from"./chunk-BTDW4G2F.js";import{a as Xn}from"./chunk-BY6QUHQI.js";import"./chunk-C2GO6SPF.js";import{a as Fn}from"./chunk-LWLJZPBI.js";import{a as $n}from"./chunk-3NU3P6NL.js";import{b as Wn}from"./chunk-DLUALPHU.js";import"./chunk-4DOELXOP.js";import{a as Vn}from"./chunk-ZTEDQLOG.js";import{a as Dn}from"./chunk-EDGADVEY.js";import"./chunk-LZUGPBFD.js";import"./chunk-2KERKGCG.js";import{b as jn}from"./chunk-4CDAAU6Z.js";import{b as Yn,c as Ti}from"./chunk-X22YKT5B.js";import{b as Gn}from"./chunk-JYCUE5HV.js";import{c as Mn}from"./chunk-FUZFAJGJ.js";import{a as et,c as An,f as ai,o as Bn,p as Rn,t as Hn,u as Si,w as Nn,x as oi}from"./chunk-5FSMHZSY.js";import"./chunk-A5HAJEPC.js";import{Da as si,G as Sn,Ia as Ln,J as Tn,Ja as kn,K as Pn,Ka as zn,La as ri,Ma as ge,P as Ie,Q as _t,R as Nt,S as En,Ua as Je,b as mn,e as fn,f as gn,h as hn,ia as On,j as vn,k as wn,ma as In,p as bn,q as yn,r as _n,s as Cn,w as ni,x as xn}from"./chunk-G5S5AZA7.js";import{b as rn,d as an,e as on,f as ln,l as Ht}from"./chunk-Z45NTTES.js";import{a as cn,b as Mi}from"./chunk-CV4R4TBA.js";import{a as pn}from"./chunk-BLQJXMNV.js";import{c as dn,d as _i,f as Ci,h as xi}from"./chunk-F2X3VGZZ.js";import{G as sn,h as ct,j as ii,k as Ft,l as Bt,m as Rt,n as tn,r as we,s as Oe,y as nn}from"./chunk-OKCHQM5Q.js";import{Aa as Wi,Ab as Ke,Ac as pe,Bc as Be,Ca as qi,Cb as X,Cc as ti,Da as xe,Ea as wt,Ga as Ee,Jb as Z,Jc as Dt,Ka as Ui,Kb as $,Kc as $t,Mb as Ki,Mc as dt,Nb as Qt,Ob as ye,Pb as Kt,Qb as Zt,Sb as Jt,Tb as ei,Ub as G,V as Xi,Vb as N,Vc as pt,Wb as te,Wc as Vt,Xb as at,Yb as ot,Yc as en,Zb as Me,_b as ve,aa as Yi,ba as Ye,bb as bi,ca as je,cb as qe,dc as ie,ec as H,fc as bt,gb as R,gc as lt,ha as ae,jc as fe,kc as yt,lc as ne,mb as Ue,mc as se,oa as ji,pa as U,pc as Lt,qa as Q,qc as le,rb as Ut,rc as Fe,s as wi,sc as yi,t as Gi,ta as Ae,tc as Zi,vc as kt,wb as he,wc as zt,xb as Qe,xc as At,yc as Ze,za as We,zb as Qi,zc as Ji}from"./chunk-JP6RBSB3.js";import{a as me,b as It}from"./chunk-YQFG5XE2.js";var sr=["*"],rr=({dt:i})=>`
|
|
2
2
|
.p-inputgroup,
|
|
3
3
|
.p-inputgroup .p-floatlabel,
|
|
4
4
|
.p-inputgroup .p-iftalabel {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as O,b as H}from"./chunk-
|
|
1
|
+
import{a as O,b as H}from"./chunk-FHKTIAXX.js";import"./chunk-INB6OCHW.js";import{a as I,b as E}from"./chunk-H57SDRPH.js";import"./chunk-4CDAAU6Z.js";import{h as G}from"./chunk-7INXBUUN.js";import{b as D,c as N}from"./chunk-X22YKT5B.js";import{a as j,b as R}from"./chunk-JYCUE5HV.js";import"./chunk-JMEBBWX4.js";import"./chunk-FUZFAJGJ.js";import{w as V,x as A}from"./chunk-5FSMHZSY.js";import"./chunk-A5HAJEPC.js";import"./chunk-G5S5AZA7.js";import"./chunk-CV4R4TBA.js";import{a as F}from"./chunk-BLQJXMNV.js";import"./chunk-F2X3VGZZ.js";import{n as W,r as $}from"./chunk-OKCHQM5Q.js";import{Cb as B,Jc as s,Kb as p,Kc as m,Mc as x,Nb as h,Ub as o,V as y,Vb as n,Wb as c,X as T,Z as S,_b as w,dc as _,ec as l,gb as a,h as v,ha as u,pa as g,qa as d,ra as b,s as f,sa as k,wb as M,yc as P,zc as C}from"./chunk-JP6RBSB3.js";import"./chunk-YQFG5XE2.js";var L=()=>({height:"calc(100vh - 100px)"});function z(i,q){if(i&1){let e=w();o(0,"div",3)(1,"p-button",4),_("onClick",function(){g(e);let r=l();return d(r.onFormat())}),n(),o(2,"p-button",5),s(3,"async"),s(4,"async"),_("onClick",function(){g(e);let r=l();return d(r.migrateWriteoffOutlet())}),n()()}if(i&2){let e=l();a(2),p("disabled",m(3,2,e.countInBooks$)!==0)("pTooltip",m(4,4,e.countInBooks$)!==0?"Books already has entries. Please format before re-migrating.":null)}}function J(i,q){if(i&1&&(o(0,"p-scroll-panel")(1,"p-panel")(2,"div",6),c(3,"app-migration-cards",7),s(4,"async"),b(),o(5,"svg",8),c(6,"path",9),n(),k(),c(7,"app-migration-cards",10),s(8,"async"),n()()()),i&2){let e=l();h(C(12,L)),a(),h(C(13,L)),a(2),p("migrationCount",m(4,8,e.countInPOS$))("migrationTitle",e.pageTitle),a(4),p("migrationCount",m(8,10,e.countInBooks$))("migrationTitle",e.pageTitle)}}var fe=(()=>{class i{constructor(){this.migrateService=u(O),this.toastr=u(F),this.refresh$=new v(void 0),this.pageTitle="Write-Off Outlet"}ngOnInit(){let e=this.refresh$.pipe(T(()=>this.migrateService.getWriteOffOutletAccountCount()),S(t=>console.log("API response:",t)),y(1));this.countInPOS$=e.pipe(f(t=>Number(t.pos))),this.countInBooks$=e.pipe(f(t=>Number(t.books)))}migrateWriteoffOutlet(){this.migrateService.migrateWriteOffOutlet().subscribe(e=>{this.refresh$.next(),this.toastr.success(e.message,"Migration Successful")})}onFormat(){confirm("Are you sure you want to format?")&&this.migrateService.formatWriteOff().subscribe(e=>{this.refresh$.next(),this.toastr.success(e.message,"Format Successful")})}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=M({type:i,selectors:[["app-writeoff-outlet"]],features:[P([O])],decls:5,vars:1,consts:[["actionButton",""],["content",""],[3,"pageTitle"],[1,"d-flex","gap-2"],["label","Format","severity","danger",3,"onClick"],["label","Migrate","tooltipPosition","left",3,"onClick","disabled","pTooltip"],[1,"flex","gap-30","flex-wrap",2,"display","flex","justify-content","center","align-items","center","gap","1rem","margin-top","40px"],["migrationPlace","Accounting",3,"migrationCount","migrationTitle"],["width","40","height","40","viewBox","0 0 24 24","fill","none"],["d","M8 5l8 7-8 7","stroke","#007bff","stroke-width","2","stroke-linecap","round","stroke-linejoin","round"],["migrationPlace","Books",3,"migrationCount","migrationTitle"]],template:function(t,r){t&1&&(o(0,"app-main-panel",2),B(1,z,5,6,"ng-template",null,0,x)(3,J,9,14,"ng-template",null,1,x),n()),t&2&&p("pageTitle",r.pageTitle)},dependencies:[G,$,W,E,I,R,j,N,D,H,A,V],encapsulation:2})}}return i})();export{fe as WriteOffOutletComponent};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as K,b as Ct}from"./chunk-
|
|
1
|
+
import{a as K,b as Ct}from"./chunk-NHIRDW4W.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-7INXBUUN.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-A5HAJEPC.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-CV4R4TBA.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
2
|
.p-drawer {
|
|
3
3
|
display: flex;
|
|
4
4
|
flex-direction: column;
|