dealposbooks 5.49.3 → 5.50.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/3rdpartylicenses.txt +26 -26
- package/assets/scss/style.scss +2 -4
- package/chunk-27SC6O47.js +1 -0
- package/{chunk-ELMSU4U7.js → chunk-2ABEICLB.js} +1 -1
- package/{chunk-KJCHFIF4.js → chunk-2JFOEOZ2.js} +1 -1
- package/{chunk-DTAREQVV.js → chunk-3ALAWCRA.js} +1 -1
- package/chunk-3GYSEQ25.js +1 -0
- package/{chunk-2XW2ZOT4.js → chunk-43JH7CKX.js} +1 -1
- package/chunk-47G2N7SA.js +1 -0
- package/{chunk-FWAGEKIF.js → chunk-4AGTFPOU.js} +1 -1
- package/{chunk-ME4V3YFW.js → chunk-4IMFKRR6.js} +1 -1
- package/chunk-4RBG4SFN.js +1 -0
- package/chunk-56CZGYL5.js +1 -0
- package/chunk-5N5QHECN.js +1 -0
- package/{chunk-DJXQKSLT.js → chunk-5U7KZJ3H.js} +1 -1
- package/{chunk-B4C3ZPN6.js → chunk-5VKDAA74.js} +1 -1
- package/chunk-65V5R4TS.js +1 -0
- package/{chunk-HCJK6VTO.js → chunk-6GILMLXA.js} +1 -1
- package/chunk-6GO647AV.js +1 -0
- package/chunk-7DBOORB2.js +1 -0
- package/{chunk-UPSNJEHO.js → chunk-7L5IAWG2.js} +1 -1
- package/chunk-A6T2KR7U.js +1 -0
- package/chunk-AF6G72MJ.js +1 -0
- package/chunk-ALLR2NXQ.js +1 -0
- package/chunk-BB2CNXSH.js +1 -0
- package/chunk-BFEM6LX7.js +2 -0
- package/{chunk-EBEY2MBR.js → chunk-BME4Z6DH.js} +1 -1
- package/chunk-BOQI2TMP.js +8 -0
- package/{chunk-DGACZ747.js → chunk-BTFX33U6.js} +1 -1
- package/{chunk-E7QWESN4.js → chunk-CN6AT4LE.js} +1 -1
- package/chunk-COSMZ2AH.js +1 -0
- package/chunk-DAFEIZYQ.js +1 -0
- package/{chunk-NMU2YBAB.js → chunk-DAM2WKDY.js} +1 -1
- package/chunk-DM2JLWKE.js +1 -0
- package/chunk-DM45YT57.js +1 -0
- package/chunk-DZCJWJUG.js +1 -0
- package/{chunk-WXIG4CXY.js → chunk-FHJOSHI3.js} +1 -1
- package/chunk-FHXTQXB7.js +160 -0
- package/{chunk-WMZF4DQK.js → chunk-FMAG3RQL.js} +1 -1
- package/{chunk-BKTBVFNX.js → chunk-FNGX2XFA.js} +1 -1
- package/{chunk-3DBSHDAQ.js → chunk-FTBQKOYS.js} +1 -1
- package/chunk-GAXDMEOS.js +1 -0
- package/chunk-GGQ7LRWG.js +0 -0
- package/{chunk-E6SW7I4D.js → chunk-GIRWHO6Q.js} +1 -1
- package/{chunk-BJMEZV24.js → chunk-GU4FXUJC.js} +1 -1
- package/{chunk-2VZ7JZIO.js → chunk-HMZX6SME.js} +1 -1
- package/chunk-HQHEWKLC.js +1 -0
- package/chunk-HU4J3ABZ.js +1 -0
- package/chunk-I2OULINE.js +1 -0
- package/{chunk-PPXXWO4E.js → chunk-II7KELI4.js} +1 -1
- package/{chunk-E3SH454T.js → chunk-IMPGOCFC.js} +1 -1
- package/{chunk-AD247LWQ.js → chunk-ISIYG4D5.js} +1 -1
- package/chunk-J3HFAWXU.js +229 -0
- package/chunk-JERRSTLA.js +1 -0
- package/chunk-JRBGNG24.js +1 -0
- package/{chunk-URH77XNK.js → chunk-JWNGZMSE.js} +1 -1
- package/{chunk-PGOSR3RI.js → chunk-KARG227P.js} +1 -1
- package/chunk-KL3TPLRB.js +2 -0
- package/{chunk-QPPFPDWZ.js → chunk-KONCSTVQ.js} +1 -1
- package/{chunk-2LNMV22E.js → chunk-KORGIX2B.js} +1 -1
- package/{chunk-VDXZGF3M.js → chunk-KQZMRRMA.js} +1 -1
- package/chunk-KXW5NWRO.js +1 -0
- package/{chunk-JD3HX7VY.js → chunk-KZU3VXLG.js} +1 -1
- package/{chunk-M4SSELXT.js → chunk-L4ENW4RK.js} +1 -1
- package/{chunk-IHKBTP2Y.js → chunk-LBXNL7E4.js} +1 -1
- package/{chunk-UVSR4LPB.js → chunk-LO4HJ77Y.js} +1 -1
- package/chunk-MGIEURA2.js +193 -0
- package/{chunk-VKNINE5Q.js → chunk-MJGBBYIO.js} +1 -1
- package/chunk-NHW7GVHK.js +1 -0
- package/{chunk-ME4ALIS7.js → chunk-O44DI62I.js} +1 -1
- package/{chunk-PKO36DGM.js → chunk-ON7PMYMV.js} +1 -1
- package/chunk-OOCCZG53.js +129 -0
- package/{chunk-AN4SAUSA.js → chunk-OW2ND5HU.js} +1 -1
- package/chunk-PB2MFYIM.js +1 -0
- package/chunk-Q4XWXOWE.js +1 -0
- package/chunk-RBNXJUFM.js +252 -0
- package/{chunk-F7XGJYCZ.js → chunk-RMHKEGL5.js} +1 -1
- package/{chunk-KGNH5JRZ.js → chunk-RVUOVLL5.js} +1 -1
- package/chunk-SASRJPT7.js +1 -0
- package/chunk-SJOOTBQ5.js +1 -0
- package/{chunk-3UAQHNUY.js → chunk-SLD7RSX6.js} +1 -1
- package/{chunk-CAS5GLLU.js → chunk-SOYJAYJK.js} +1 -1
- package/{chunk-KZHI6PGZ.js → chunk-SVGPDGYN.js} +1 -1
- package/chunk-SX4XIR77.js +1 -0
- package/{chunk-OBT3IJJQ.js → chunk-SXNOZOOP.js} +5 -5
- package/{chunk-RM5HLXNW.js → chunk-TAN6GLIH.js} +1 -1
- package/{chunk-5DRALZZF.js → chunk-TOR7QRRB.js} +1 -1
- package/{chunk-D6IS6PE6.js → chunk-U4AN6IWJ.js} +1 -1
- package/chunk-URGN4QVD.js +1 -0
- package/chunk-UTOLWW4T.js +1 -0
- package/chunk-VJROOSEO.js +7 -0
- package/chunk-VKUW7E75.js +1 -0
- package/{chunk-S27Z7D3D.js → chunk-VM56C6ZV.js} +1 -1
- package/chunk-VNZUZ5UI.js +1 -0
- package/{chunk-AMGBUOC4.js → chunk-VSDW2RJ5.js} +1 -1
- package/{chunk-U2VDC52W.js → chunk-WL6ZZCYW.js} +1 -1
- package/chunk-WYLIU52Q.js +1 -0
- package/{chunk-5B5AMMR3.js → chunk-X6KL7VKV.js} +1 -1
- package/chunk-XGU6GBEK.js +1 -0
- package/chunk-XN4CDKDI.js +1 -0
- package/chunk-XULSWUMO.js +1 -0
- package/chunk-YHLRDTIS.js +1 -0
- package/chunk-YQYRAH7V.js +1 -0
- package/{chunk-ENH6HA3V.js → chunk-YR5KRTHR.js} +1 -1
- package/{chunk-UD23HDLE.js → chunk-YU4Q7ASX.js} +1 -1
- package/chunk-Z3ZKNQZS.js +1 -0
- package/chunk-Z4XRTHAH.js +1 -0
- package/chunk-ZAMQ4RCL.js +1 -0
- package/chunk-ZC2ADHDH.js +130 -0
- package/{chunk-MHRSQRHT.js → chunk-ZC7ZENN7.js} +1 -1
- package/chunk-ZWNKUBMG.js +202 -0
- package/index.html +2 -2
- package/main-UCTZ3G6L.js +1 -0
- package/package.json +1 -1
- package/{styles-FYY2LVCE.css → styles-T5RGO2FA.css} +1 -1
- package/chunk-26LXGKDF.js +0 -1
- package/chunk-2BI7WNJP.js +0 -1
- package/chunk-3KEAMVYI.js +0 -202
- package/chunk-4G57L7HS.js +0 -1
- package/chunk-4OZIHMKI.js +0 -1
- package/chunk-4UVBCZJG.js +0 -1
- package/chunk-5LGAO5J4.js +0 -1
- package/chunk-6WWXJJID.js +0 -1
- package/chunk-A3P24MDP.js +0 -129
- package/chunk-A7OYELWP.js +0 -1
- package/chunk-ATFRJZK3.js +0 -1
- package/chunk-C5EDHVD7.js +0 -1
- package/chunk-C7ZPOAWO.js +0 -1
- package/chunk-CTINUVLP.js +0 -1
- package/chunk-D2CH2T3I.js +0 -229
- package/chunk-DJTQ4KQ7.js +0 -1
- package/chunk-ES2YST7G.js +0 -1
- package/chunk-F7PVAVLQ.js +0 -1
- package/chunk-FQRRGJBE.js +0 -1
- package/chunk-G4XX7EU2.js +0 -1
- package/chunk-I2IEFBTX.js +0 -1
- package/chunk-IQ4SHFOC.js +0 -252
- package/chunk-L3CQJPFS.js +0 -1
- package/chunk-LG5TMEPP.js +0 -1
- package/chunk-LNFCBMAA.js +0 -1
- package/chunk-LOMHQKQX.js +0 -1
- package/chunk-LUS3QGR4.js +0 -1
- package/chunk-N6LQW4C4.js +0 -1
- package/chunk-NXJQMUGV.js +0 -1
- package/chunk-OFI2JX7N.js +0 -1
- package/chunk-OFLGX5N4.js +0 -160
- package/chunk-OJTHBHGK.js +0 -1
- package/chunk-PW4Y2UWU.js +0 -1
- package/chunk-PZZCPZ6Q.js +0 -1
- package/chunk-Q4KG7LH6.js +0 -1
- package/chunk-QFFI46W6.js +0 -130
- package/chunk-QJ5XIVKM.js +0 -1
- package/chunk-RX37I2ZC.js +0 -1
- package/chunk-S6S265JY.js +0 -7
- package/chunk-SUWUVFH4.js +0 -1
- package/chunk-UK5OOIPU.js +0 -1
- package/chunk-V2P3PRZY.js +0 -1
- package/chunk-V65ONV6D.js +0 -1
- package/chunk-VMI3QWC6.js +0 -193
- package/chunk-VMI7LQOW.js +0 -1
- package/chunk-WRTIQGAC.js +0 -8
- package/chunk-XJFNZBHG.js +0 -1
- package/chunk-XWXTYJHR.js +0 -1
- package/chunk-YIEUIWT7.js +0 -1
- package/chunk-ZFNIPERQ.js +0 -2
- package/chunk-ZK43JB4A.js +0 -2
- package/chunk-ZZEOPBUT.js +0 -1
- package/main-WMHNA6IG.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as ft}from"./chunk-
|
|
1
|
+
import{a as ft}from"./chunk-7L5IAWG2.js";import{a as ht}from"./chunk-KONCSTVQ.js";import{a as $,p as J,q as vt}from"./chunk-O44DI62I.js";import{$ as q,Ea as ut,J as lt,Ma as pt,Na as G,R as ct,S as bt,T as L,Va as dt,da as F,ia as W,ta as U}from"./chunk-MGIEURA2.js";import{j as st,o as rt,u as k,x as z}from"./chunk-DM2JLWKE.js";import{$b as j,$c as at,Cb as m,Db as et,Dc as nt,Ea as d,Eb as u,Fa as Z,Fc as it,Ha as P,Lb as r,Mb as M,Ob as _,Rb as y,Wb as D,Xb as N,Yb as S,_c as C,ac as A,ba as B,bd as s,ca as X,cd as ot,da as Y,fc as I,gc as f,hc as T,ia as p,ib as v,ic as w,lc as Q,mc as x,nc as l,oc as c,qa as O,ra as V,tb as R,ua as h,yb as g,zb as tt}from"./chunk-6QJHEOXN.js";var _t=["previcon"],yt=["nexticon"],Tt=["content"],wt=["prevButton"],xt=["nextButton"],Ct=["inkbar"],kt=["tabs"],E=["*"],$t=e=>({"p-tablist-viewport":e});function Bt(e,b){e&1&&j(0)}function Dt(e,b){if(e&1&&u(0,Bt,1,0,"ng-container",11),e&2){let t=f(2);M("ngTemplateOutlet",t.prevIconTemplate||t._prevIconTemplate)}}function It(e,b){e&1&&S(0,"ChevronLeftIcon")}function Lt(e,b){if(e&1){let t=A();D(0,"button",10,3),I("click",function(){O(t);let n=f();return V(n.onPrevButtonClick())}),u(2,Dt,1,1,"ng-container")(3,It,1,0,"ChevronLeftIcon"),N()}if(e&2){let t=f();r("aria-label",t.prevButtonAriaLabel)("tabindex",t.tabindex())("data-pc-group-section","navigator"),v(2),y(t.prevIconTemplate||t._prevIconTemplate?2:3)}}function Ft(e,b){e&1&&j(0)}function Et(e,b){if(e&1&&u(0,Ft,1,0,"ng-container",11),e&2){let t=f(2);M("ngTemplateOutlet",t.nextIconTemplate||t._nextIconTemplate)}}function Ot(e,b){e&1&&S(0,"ChevronRightIcon")}function Vt(e,b){if(e&1){let t=A();D(0,"button",12,4),I("click",function(){O(t);let n=f();return V(n.onNextButtonClick())}),u(2,Et,1,1,"ng-container")(3,Ot,1,0,"ChevronRightIcon"),N()}if(e&2){let t=f();r("aria-label",t.nextButtonAriaLabel)("tabindex",t.tabindex())("data-pc-group-section","navigator"),v(2),y(t.nextIconTemplate||t._nextIconTemplate?2:3)}}function Pt(e,b){e&1&&w(0)}var Rt=({dt:e})=>`
|
|
2
2
|
.p-tabs {
|
|
3
3
|
display: flex;
|
|
4
4
|
flex-direction: column;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as g}from"./chunk-
|
|
1
|
+
import{a as g}from"./chunk-YQYRAH7V.js";import{f as u,g as l,h as m}from"./chunk-KL3TPLRB.js";import{I as n,_ as d,ca as b,ia as c,n as f,s as h}from"./chunk-6QJHEOXN.js";import{a as o,b as p}from"./chunk-YQFG5XE2.js";var w=(()=>{class a{constructor(){this.httpClient=c(m),this.toastr=c(g)}get(t="",e,r={}){return this.httpClient.get(`${t}${e}`,r).pipe(n(this.handleError.bind(this)))}post(t="",e,r,i={observe:"response"}){return this.httpClient.post(`${t}${e}`,r,o({},i)).pipe(d(this.handleResponse.bind(this)),h(s=>s instanceof u&&Object.prototype.hasOwnProperty.call(i,"observe")&&i.observe==="response"?s.body instanceof Blob?s:s.body:s),n(this.handleError.bind(this)))}put(t="",e,r,i={}){return this.httpClient.put(`${t}${e}`,r,p(o({},i),{observe:"response"})).pipe(d(this.handleResponse.bind(this)),h(s=>s.body),n(this.handleError.bind(this)))}delete(t="",e,r={}){return this.httpClient.delete(`${t}${e}`,p(o({},r),{observe:"response"})).pipe(d(this.handleResponse.bind(this)),h(i=>i.body),n(this.handleError.bind(this)))}handleResponse(t){if(t instanceof u&&t.status===200&&t.body){let e;typeof t.body=="object"&&t.body!==null&&(e=t.body.message||t.body.Message),typeof e=="string"&&e.length>0&&this.toastr.success(e,"Success")}}handleError(t){let e={header:"API Error",message:"An unknown error occurred"};if(t instanceof l)switch(t.status){case 0:e.message="CORS error: Request blocked or server not responding with proper CORS headers",e.header="CORS Error";break;case 504:e.message=t.statusText||"Gateway Timeout",e.header=`API Error: ${t.status}`;break;default:e.header=`API Error: ${t.status}`,e.message=t.error&&(t.error.Message||t.error.message||t.error.error)||t.message}return t instanceof l&&(t.status>=200&&t.status<300?this.toastr.success(e.message,e.header):t.status>=400&&t.status<500?this.toastr.warning(e.message,e.header):t.status>=500&&t.status<600&&this.toastr.error(e.message,e.header)),f(()=>e)}static{this.\u0275fac=function(e){return new(e||a)}}static{this.\u0275prov=b({token:a,factory:a.\u0275fac,providedIn:"root"})}}return a})();export{w as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{y as O}from"./chunk-DM2JLWKE.js";import{Ab as g,Da as p,Db as T,Ea as a,Fa as l,Ha as f,La as H,ad as m,bd as h,ca as u,cd as y,dd as I,fa as r,ia as o,ja as n,tb as C,xa as d,yb as v}from"./chunk-6QJHEOXN.js";import{f as s}from"./chunk-YQFG5XE2.js";var D=new r("HIGHCHARTS_LOADER"),R=new r("HIGHCHARTS_ROOT_MODULES"),S=new r("HIGHCHARTS_OPTIONS"),w=new r("HIGHCHARTS_CONFIG"),M=new r("HIGHCHARTS_TIMEOUT"),A=(()=>{class t{constructor(){this.highcharts=f(null),this.loader=o(D),this.globalOptions=o(S,{optional:!0}),this.globalModules=o(R,{optional:!0})}loadHighchartsWithModules(e){return s(this,null,function*(){let i=yield this.loader();return yield Promise.allSettled([...this.globalModules?.()??[],...e?.modules?.()??[]]),i})}load(e){this.loadHighchartsWithModules(e).then(i=>{this.globalOptions&&i.setOptions(this.globalOptions),this.highcharts.set(i)})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=u({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})(),G=(()=>{class t{delay(e){return new Promise(i=>setTimeout(i,e))}keepChartUpToDate(){y(()=>s(this,null,function*(){this.update();let e=yield this.chart();this.chartCreated?e?.update(this.options(),!0,this.oneToOne()):e&&(this.chartCreated=!0)}))}destroyChart(){return s(this,null,function*(){let e=yield this.chart();e&&e.destroy()})}constructor(){this.constructorType=a("chart"),this.oneToOne=a(!1),this.options=a.required(),this.update=C(),this.chartInstance=p(),this.destroyRef=o(d),this.el=o(l),this.platformId=o(H),this.relativeConfig=o(w,{optional:!0}),this.timeout=o(M,{optional:!0}),this.highchartsChartService=o(A),this.chartCreated=!1,this.constructorChart=h(()=>{let e=this.highchartsChartService.highcharts();if(e)return e[this.constructorType()]}),this.chart=h(()=>s(this,null,function*(){return yield this.delay(this.relativeConfig?.timeout??this.timeout??500),this.constructorChart()?.(this.el.nativeElement,m(()=>this.options()),e=>this.chartInstance.emit(e))})),!(this.platformId&&O(this.platformId))&&(this.highchartsChartService.load(this.relativeConfig),this.destroyRef.onDestroy(()=>this.destroyChart()),I(()=>{this.update()&&this.update.set(!1)}),this.keepChartUpToDate())}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275dir=g({type:t,selectors:[["","highchartsChart",""]],inputs:{constructorType:[1,"constructorType"],oneToOne:[1,"oneToOne"],options:[1,"options"],update:[1,"update"]},outputs:{update:"updateChange",chartInstance:"chartInstance"}})}}return t})(),q=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=v({type:t,selectors:[["highcharts-chart"]],features:[T([{directive:G,inputs:["constructorType","constructorType","oneToOne","oneToOne","options","options","update","update"],outputs:["chartInstance","chartInstance","updateChange","updateChange"]}])],decls:0,vars:0,template:function(i,k){},encapsulation:2,changeDetection:0})}}return t})(),F=()=>[],E=()=>import("./chunk-52U5NSQT.js").then(t=>t.default);function _(t){return n([{provide:D,useValue:t??E}])}function P(t){return n([{provide:S,useValue:t}])}function b(t){return n([{provide:R,useValue:t}])}function z(t={}){let c=[_(t.instance),b(t.modules??F),{provide:M,useValue:t.timeout}];return t.options&&c.push(P(t.options)),n(c)}export{q as a,z as b};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as we}from"./chunk-3ALAWCRA.js";import"./chunk-2JFOEOZ2.js";import{a as Ce,b as ve,c as Ee,d as he,e as Ie,f as be}from"./chunk-X6KL7VKV.js";import{a as ye,b as Ve,c as Se}from"./chunk-KZU3VXLG.js";import"./chunk-WL6ZZCYW.js";import{d as _e,f as ue,g as fe,h as xe,k as ge}from"./chunk-BTFX33U6.js";import"./chunk-BME4Z6DH.js";import"./chunk-VSDW2RJ5.js";import"./chunk-7L5IAWG2.js";import{a as R}from"./chunk-BT7Y4ADP.js";import{a as ie}from"./chunk-5U7KZJ3H.js";import"./chunk-MJGBBYIO.js";import"./chunk-CN6AT4LE.js";import"./chunk-OW2ND5HU.js";import"./chunk-JWNGZMSE.js";import"./chunk-II7KELI4.js";import"./chunk-FTBQKOYS.js";import"./chunk-L4ENW4RK.js";import{a as ce,b as de}from"./chunk-FHJOSHI3.js";import"./chunk-KONCSTVQ.js";import"./chunk-FMAG3RQL.js";import{e as pe,f as me,i as se}from"./chunk-J3HFAWXU.js";import"./chunk-VM56C6ZV.js";import{a as ae,b as le}from"./chunk-ISIYG4D5.js";import"./chunk-ALLR2NXQ.js";import"./chunk-FNGX2XFA.js";import"./chunk-BFEM6LX7.js";import{w as oe,x as re}from"./chunk-O44DI62I.js";import"./chunk-DTYVTTET.js";import"./chunk-MGIEURA2.js";import{d as ne}from"./chunk-DZCJWJUG.js";import"./chunk-TOR7QRRB.js";import"./chunk-YQYRAH7V.js";import"./chunk-KL3TPLRB.js";import"./chunk-RVUOVLL5.js";import"./chunk-GGQ7LRWG.js";import"./chunk-F2X3VGZZ.js";import{j as X,m as Y,r as Z,s as ee,u as te}from"./chunk-DM2JLWKE.js";import{Eb as d,Ec as J,Fc as T,Ha as S,Hc as q,I as N,Mb as m,Oc as E,Pb as A,Pc as I,Qc as G,Rb as h,Sb as F,Sc as c,Ub as P,Vb as D,Wb as n,Xb as i,Y as U,Yb as _,_ as w,ac as v,fc as y,gb as j,gc as s,ia as k,ib as l,m as M,mc as H,nc as L,oc as O,qa as f,ra as x,rc as $,s as B,sc as r,tc as g,uc as C,xc as Q,yb as K,yc as W,zc as z}from"./chunk-6QJHEOXN.js";import{e as Re}from"./chunk-YQFG5XE2.js";var Je=Re(Ve());var ke=["stepper"],Ae=()=>({width:"30vw"}),Fe=()=>({"1199px":"75vw","575px":"100vw"}),Pe=()=>({height:"calc(100vh - 70px)"}),De=t=>({"col-12":t}),Me=(t,p,e)=>({"bg-gradient-danger":t,"bg-gradient-success":p,"bg-gradient-warning":e}),Te=t=>({"state-danger":t});function Be(t,p){if(t&1){let e=v();n(0,"p-button",14),y("click",function(){f(e);let o=s(2);return x(o.onPrevStep())}),i()}if(t&2){let e=s(2);m("disabled",e.stepActiveIndex()===1)}}function Ne(t,p){if(t&1){let e=v();n(0,"p-button",15),y("click",function(){f(e);let o=s(2);return x(o.onNextStep())}),i()}if(t&2){let e=s(2);m("disabled",e.stepActiveIndex()===3||!e.JournalEntryImport())}}function Ue(t,p){if(t&1){let e=v();n(0,"p-button",16),y("click",function(){f(e);let o=s(2);return x(o.onReset())}),i()}}function je(t,p){if(t&1&&d(0,Be,1,1,"p-button",11)(1,Ne,1,1,"p-button",12)(2,Ue,1,0,"p-button",13),t&2){let e=s();m("ngIf",e.stepActiveIndex()>1),l(),m("ngIf",e.stepActiveIndex()<3),l(),m("ngIf",e.stepActiveIndex()===3)}}function Ke(t,p){if(t&1){let e=v();n(0,"POS-uppy",25),y("fileUploaded",function(o){f(e);let u=s(2);return x(u.onFileUploaded(o))})("fileRemoved",function(o){f(e);let u=s(2);return x(u.onFileRemoved(o))}),i(),n(1,"p",26),r(2," Please refer this "),n(3,"a",27),r(4,"article"),i(),r(5," for more information "),i()}if(t&2){let e=s(2);m("uppyCoreConfiguration",e.uppyCore)("dashboardPropsConfiguration",e.dashboardProps)("sampleUrl",e.SAMPLE_URL)("subtitle",e.subtitle)}}function He(t,p){t&1&&(n(0,"tr"),_(1,"th",29),n(2,"th",30),r(3," Number "),_(4,"p-sortIcon",31),i(),n(5,"th",32),r(6," Outlet "),_(7,"p-sortIcon",33),i(),n(8,"th",34),r(9," Date "),_(10,"p-sortIcon",35),i(),n(11,"th",36),r(12," Status "),_(13,"p-sortIcon",37),i(),n(14,"th"),r(15,"Message"),i()())}function Le(t,p){if(t&1&&(n(0,"div",41)(1,"span"),r(2),i(),n(3,"span"),r(4),i()()),t&2){let e=p.$implicit;l(2),g(e.issue),l(2),g(e.solution)}}function Oe(t,p){if(t&1&&(n(0,"div",40),P(1,Le,5,2,"div",41,F),i()),t&2){let e=s(2).$implicit;l(),D(e.issues)}}function $e(t,p){}function Qe(t,p){if(t&1&&d(0,Oe,3,0,"div",40)(1,$e,0,0),t&2){let e=s().$implicit;h(e.issues&&e.issues.length>0?0:1)}}function We(t,p){if(t&1&&(n(0,"tr")(1,"td"),_(2,"p-button",38),i(),n(3,"td"),r(4),i(),n(5,"td"),r(6),i(),n(7,"td"),r(8),E(9,"date"),i(),n(10,"td",39),r(11),i(),n(12,"td",39),d(13,Qe,2,1),i()()),t&2){let e=p.$implicit,a=p.expanded,o=s(4);l(2),m("pRowToggler",e)("text",!0)("rounded",!0)("plain",!0)("icon",a?"fa-solid fa-chevron-down":"fa-solid fa-chevron-right"),l(2),g(e.number),l(2),C(" ",e.outlet," "),l(2),g(G(9,12,e.date,"d MMM y")),l(2),m("ngClass",q(15,Me,e.actionName==="Error",e.actionName==="New",e.actionName==="Update")),l(),C(" ",e.actionName," "),l(),m("ngClass",T(19,Te,o.hasIssue)),l(),h(o.hasIssue?13:-1)}}function ze(t,p){t&1&&(n(0,"tr")(1,"th",45),r(2," Code "),_(3,"p-sortIcon",46),i(),n(4,"th",47),r(5," Name "),_(6,"p-sortIcon",48),i(),n(7,"th",49),r(8," Note "),_(9,"p-sortIcon",50),i(),n(10,"th",51),r(11," Debit "),_(12,"p-sortIcon",52),i(),n(13,"th",53),r(14," Credit "),_(15,"p-sortIcon",54),i(),n(16,"th"),r(17,"Message"),i()())}function qe(t,p){if(t&1&&(n(0,"div",41)(1,"span"),r(2),i(),n(3,"span"),r(4),i()()),t&2){let e=p.$implicit;l(2),g(e.issue),l(2),g(e.solution)}}function Ge(t,p){if(t&1&&(n(0,"div",40),P(1,qe,5,2,"div",41,F),i()),t&2){let e=s().$implicit;l(),D(e.issues)}}function Xe(t,p){if(t&1&&(n(0,"tr")(1,"td"),r(2),i(),n(3,"td"),r(4),i(),n(5,"td"),r(6),i(),n(7,"td"),r(8),E(9,"number"),i(),n(10,"td"),r(11),E(12,"number"),i(),n(13,"td",39),d(14,Ge,3,0,"div",40),i()()),t&2){let e=p.$implicit,a=s(5);l(2),g(e.accountCode),l(2),g(e.accountName),l(2),g(e.note),l(2),C(" ",I(9,7,e.debitAmount)," "),l(3),C(" ",I(12,9,e.creditAmount)," "),l(2),m("ngClass",T(11,Te,e.issues&&e.issues.length>0)),l(),h(a.hasIssue?14:-1)}}function Ye(t,p){t&1&&(n(0,"tr")(1,"td",55),r(2," There are no order for this product yet. "),i()())}function Ze(t,p){if(t&1&&(n(0,"tr")(1,"td",42)(2,"div",43)(3,"p-table",44),d(4,ze,18,0,"ng-template",null,3,c)(6,Xe,15,13,"ng-template",null,6,c)(8,Ye,3,0,"ng-template",null,8,c),i()()()()),t&2){let e=p.$implicit;l(3),m("value",e.items)}}function et(t,p){if(t&1&&(n(0,"p-table",28),d(1,He,16,0,"ng-template",null,3,c)(3,We,14,21,"ng-template",null,6,c)(5,Ze,10,1,"ng-template",null,7,c),i()),t&2){let e=s(3);m("scrollable",!0)("scrollHeight","calc(100vh - 160px)")("value",e.JournalEntryImport().dataRow)}}function tt(t,p){if(t&1&&d(0,et,7,3,"p-table",28),t&2){let e=s(2);h(e.JournalEntryImport()?0:-1)}}function nt(t,p){t&1&&(n(0,"h5"),r(1,"Successfully Imported"),i())}function it(t,p){if(t&1&&(n(0,"p-panel")(1,"p-scroll-panel")(2,"div",17)(3,"div",18)(4,"p-stepper",19,5)(6,"p-step-list")(7,"p-step",20)(8,"div",21),_(9,"i",22),n(10,"span"),r(11,"Upload"),i()()(),n(12,"p-step",20)(13,"div",21),_(14,"i",23),n(15,"span"),r(16,"Preview"),i()()(),n(17,"p-step",20)(18,"div",21),_(19,"i",24),n(20,"span"),r(21,"Finish"),i()()()(),n(22,"p-step-panels")(23,"p-step-panel",20),d(24,Ke,6,4,"ng-template",null,1,c),i(),n(26,"p-step-panel",20),d(27,tt,1,1,"ng-template",null,1,c),i(),n(29,"p-step-panel",20),d(30,nt,2,0,"ng-template",null,1,c),i()()()()()()()),t&2){let e=s();l(),A(J(11,Pe)),l(2),m("ngClass",T(12,De,e.stepActiveIndex()===2)),l(),m("linear",!0)("value",e.stepActiveIndex()),l(3),m("value",1),l(5),m("value",2),l(5),m("value",3),l(6),m("value",1),l(3),m("value",2),l(3),m("value",3)}}function ot(t,p){if(t&1){let e=v();n(0,"p-button",56),y("onClick",function(){f(e);let o=s();return x(o.summaryDialogVisible.set(!1))}),i()}t&2&&m("rounded",!0)("text",!0)}function rt(t,p){if(t&1&&(n(0,"div",57)(1,"h4",58),r(2,"Import Summary"),i(),n(3,"p",59),r(4),i()()),t&2){let e=s();l(4),C("(",e.CSVRowCount()," rows ready for import)")}}function at(t,p){t&1&&(n(0,"div",63)(1,"h4",64),r(2,"Journal"),i()())}function lt(t,p){t&1&&(n(0,"div",65)(1,"h4",64),r(2,"Debit"),i()())}function pt(t,p){t&1&&(n(0,"div",65)(1,"h4",64),r(2,"Credit"),i()())}function mt(t,p){if(t&1&&(n(0,"div",60)(1,"div",61)(2,"p-card"),d(3,at,3,0,"ng-template",null,3,c),n(5,"div",60)(6,"div",61)(7,"h5",62),r(8),E(9,"number"),i()()()()(),n(10,"div",61)(11,"p-card"),d(12,lt,3,0,"ng-template",null,3,c),n(14,"div",60)(15,"div",61)(16,"h5",62),r(17),E(18,"number"),i()()()()(),n(19,"div",61)(20,"p-card"),d(21,pt,3,0,"ng-template",null,3,c),n(23,"div",60)(24,"div",61)(25,"h5",62),r(26),E(27,"number"),i()()()()()()),t&2){let e=s(2);l(8),C(" ",I(9,3,e.JournalEntryImport().summary.journal)," "),l(9),C(" ",I(18,5,e.JournalEntryImport().summary.debit)," "),l(9),C(" ",I(27,7,e.JournalEntryImport().summary.credit)," ")}}function st(t,p){if(t&1&&d(0,mt,28,9,"div",60),t&2){let e=s();h(e.JournalEntryImport()?0:-1)}}function ct(t,p){if(t&1){let e=v();n(0,"p-button",66),y("click",function(){f(e);let o=s();return x(o.summaryDialogVisible.set(!1))}),i(),n(1,"p-button",67),y("click",function(){f(e);let o=s();return x(o.onConfirmImport())}),i()}}var jt=(()=>{class t{constructor(){this.service=k(we),this.router=k(ne),this.subtitle="Accepted file format: .csv & max file size: 1MB",this.stepActiveIndex=S(1),this.JournalEntryImport=S(null),this.summaryDialogVisible=S(!1),this.CSVRowCount=S(0),this.dashboardProps={inline:!0,width:580,height:350},this.uppyCore={restrictions:{allowedFileTypes:["text/csv","application/vnd.ms-excel","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"]}},this.SAMPLE_URL="https://resc.cloudinary.com/pos/raw/upload/POS/CSV/Journal_DealPOS.csv"}ngAfterViewInit(){console.log("Stepper instance:",this.stepperRef)}onFileUpload(e){console.log("File upload event:",e);let a=new FormData;Array.isArray(e.currentFiles)&&e.currentFiles.forEach(o=>{o instanceof File&&a.append("File",o,o.name)}),console.log("Form data prepared for upload:",a.get("File")),this.service.importPreviewJournal(a).pipe(R("Import Preview"),B(o=>({cacheKey:o.cacheKey})),U(o=>this.service.importConfirmJournal(o)),w(()=>{this.router.navigate(["/pages/journal/journal-entry"])})).subscribe()}onFileRemoved(e){console.log("File removed event:",e),this.JournalEntryImport.set(null),this.CSVRowCount.set(0)}onNextStep(){if(this.stepActiveIndex()<3&&(this.stepActiveIndex.update(e=>e+1),this.stepActiveIndex()===3)){this.stepActiveIndex.update(()=>this.stepActiveIndex()-1),this.summaryDialogVisible.set(!0);return}}onPrevStep(){this.stepActiveIndex()>1&&this.stepActiveIndex.update(e=>e-1)}onFileUploaded(e){let a=new FormData;if("name"in e&&typeof e.name=="string")a.append("File",e,e.name),this.service.importPreviewJournal(a).pipe(R("Import Preview"),w(o=>{this.JournalEntryImport.set(o)})).subscribe(),Je.default.parse(e,{header:!0,skipEmptyLines:!0,complete:o=>{console.log("CSV Parsing Results:",o),this.CSVRowCount.set(o.data.length)},error:o=>{console.error("Error parsing CSV:",o)}});else return}onConfirmImport(){if(this.JournalEntryImport()&&this.JournalEntryImport().canProceed){let e={cacheKey:this.JournalEntryImport().cacheKey};this.service.importConfirmJournal(e).pipe(R("Import Confirm"),w(()=>{this.router.navigate(["/pages/journal/journal-entry"]),this.stepActiveIndex.update(a=>a+1),this.summaryDialogVisible.update(a=>!a)}),N(a=>(console.error("Error occurred during import confirmation:",a),this.stepActiveIndex.update(o=>o+1),this.summaryDialogVisible.update(o=>!o),M(null)))).subscribe()}else{console.error("Cannot proceed with import, JournalEntryImport is not set or canProceed is false.");return}}onReset(){this.stepActiveIndex.set(1),this.JournalEntryImport.set(null)}handleKeyboardEvent(e){e.key==="F2"&&this.onConfirmImport()}get hasIssue(){let e=this.JournalEntryImport();return e&&Array.isArray(e.dataRow)?e.dataRow.some(a=>{let o=a.issues&&a.issues.length>0,u=Array.isArray(a.items)&&a.items.some(b=>b.issues&&b.issues.length>0);return o||u}):!1}static{this.\u0275fac=function(a){return new(a||t)}}static{this.\u0275cmp=K({type:t,selectors:[["app-journal-entry-import"]],viewQuery:function(a,o){if(a&1&&H(ke,5),a&2){let u;L(u=O())&&(o.stepperRef=u.first)}},hostBindings:function(a,o){a&1&&y("keydown",function(b){return o.handleKeyboardEvent(b)},!1,j)},decls:14,vars:10,consts:[["actionButton",""],["content",""],["closeIconTemplate",""],["header",""],["footer",""],["stepper",""],["body",""],["expandedrow",""],["emptymessage",""],["pageTitle","Manual Journal Import"],["position","center","appendTo","body",3,"visibleChange","modal","visible","breakpoints","draggable","closeIconTemplate","dismissableMask"],["label","Back","severity","secondary","variant","outlined",3,"disabled","click",4,"ngIf"],["label","Next","severity","primary",3,"disabled","click",4,"ngIf"],["label","Finish","severity","primary",3,"click",4,"ngIf"],["label","Back","severity","secondary","variant","outlined",3,"click","disabled"],["label","Next","severity","primary",3,"click","disabled"],["label","Finish","severity","primary",3,"click"],[1,"row","justify-content-center"],[1,"col-6",3,"ngClass"],[3,"linear","value"],[3,"value"],[1,"d-flex","gap-2","align-items-center"],[1,"fa-solid","fa-upload"],[1,"fa-solid","fa-file"],[1,"fa-solid","fa-check"],[3,"fileUploaded","fileRemoved","uppyCoreConfiguration","dashboardPropsConfiguration","sampleUrl","subtitle"],[1,"fst-italic"],["href","#","target","_blank",1,"link","link-primary"],["dataKey","number",3,"scrollable","scrollHeight","value"],[2,"width","5rem"],["pSortableColumn","number"],["field","number"],["pSortableColumn","outlet"],["field","outlet"],["pSortableColumn","date"],["field","date"],["pSortableColumn","inventoryStatus"],["field","inventoryStatus"],["type","button","pRipple","",3,"pRowToggler","text","rounded","plain","icon"],[3,"ngClass"],[1,"d-flex","flex-column","gap-2"],[1,"d-flex","flex-column"],["colspan","8"],[1,"p-4"],["dataKey","accountID",3,"value"],["pSortableColumn","accountCode"],["field","accountCode"],["pSortableColumn","accountName"],["field","accountName"],["pSortableColumn","note"],["field","note"],["pSortableColumn","debitAmount"],["field","debitAmount"],["pSortableColumn","creditAmount"],["field","creditAmount"],["colspan","6"],["severity","secondary","variant","outlined","icon","fa-solid fa-xmark",3,"onClick","rounded","text"],[1,"d-flex","gap-2","align-items-baseline"],[1,"fs-4","text-white","m-0"],[1,"m-0","fs-3"],[1,"row"],[1,"col"],[1,"fs-2"],[1,"state-new"],[1,"fs-3","m-0"],[1,"state-unchanged"],["label","Cancel","severity","secondary","variant","outlined",3,"click"],["label","OK (F2)",3,"click"]],template:function(a,o){if(a&1){let u=v();n(0,"app-main-panel",9),d(1,je,3,3,"ng-template",null,0,c)(3,it,32,14,"ng-template",null,1,c),i(),n(5,"p-dialog",10),z("visibleChange",function(V){return f(u),W(o.summaryDialogVisible,V)||(o.summaryDialogVisible=V),x(V)}),d(6,ot,1,2,"ng-template",null,2,c)(8,rt,5,1,"ng-template",null,3,c)(10,st,1,1,"ng-template",null,1,c)(12,ct,2,0,"ng-template",null,4,c),i()}if(a&2){let u=$(7);l(5),A(J(8,Ae)),m("modal",!0),Q("visible",o.summaryDialogVisible),m("breakpoints",J(9,Fe))("draggable",!1)("closeIconTemplate",u)("dismissableMask",!0)}},dependencies:[se,te,X,Y,ee,Z,le,ae,ye,de,ce,be,Ie,Ce,he,Ee,ve,Se,re,oe,ge,_e,ue,xe,fe,me,pe,ie],styles:[".p-datatable-thead>tr>th{background-color:transparent!important;color:#000!important} .p-stepper{display:flex;flex-direction:column;align-items:center} .p-stepper .p-steplist{width:40vw} .p-stepper .p-steppanels{width:100%} .p-card{border-radius:4px} .p-card .p-card-body{padding:.75rem!important} .p-card .p-card-header{display:flex;align-items:center;width:100%} .p-card .p-card-header .state-new{width:inherit;padding:.75rem;vertical-align:middle;background:repeating-linear-gradient(-60deg,#beeebb,#beeebb 15px,#afeba8 15px 30px)!important} .p-card .p-card-header .state-updated{width:inherit;padding:.75rem;background:repeating-linear-gradient(-60deg,#fcf3cf,#fcf3cf 15px,#f9e79f 15px 30px)!important} .p-card .p-card-header .state-unchanged{width:inherit;padding:.75rem;border-bottom:1px solid #dee2e6} .p-card .p-card-header .state-error{width:inherit;padding:.75rem;background:repeating-linear-gradient(-60deg,#f8d7da,#f8d7da 15px,#f5c6cb 15px 30px)!important} pos-uppy div div h4{font-size:16px} pos-uppy div div p{font-size:14px!important} pos-uppy div div hr{margin:0}"],changeDetection:0})}}return t})();export{jt as JournalEntryImportComponent};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as F}from"./chunk-4IMFKRR6.js";import{a as ze}from"./chunk-YHLRDTIS.js";import{a as je}from"./chunk-SVGPDGYN.js";import{a as Be,b as He}from"./chunk-LO4HJ77Y.js";import{a as oe}from"./chunk-2JFOEOZ2.js";import{b as D}from"./chunk-LBXNL7E4.js";import{a as Pe}from"./chunk-XKI7WLHE.js";import"./chunk-KQZMRRMA.js";import"./chunk-ZC7ZENN7.js";import"./chunk-WL6ZZCYW.js";import{a as z,b as j}from"./chunk-3VQUNDVT.js";import{d as Je,i as Ne,j as ke,k as Me}from"./chunk-BTFX33U6.js";import{a as Ve,b as De}from"./chunk-BME4Z6DH.js";import"./chunk-VSDW2RJ5.js";import"./chunk-7L5IAWG2.js";import"./chunk-MJGBBYIO.js";import"./chunk-CN6AT4LE.js";import{a as Fe,b as Ae}from"./chunk-OW2ND5HU.js";import"./chunk-JWNGZMSE.js";import"./chunk-II7KELI4.js";import"./chunk-FTBQKOYS.js";import"./chunk-L4ENW4RK.js";import"./chunk-KONCSTVQ.js";import"./chunk-FMAG3RQL.js";import{i as Ee}from"./chunk-J3HFAWXU.js";import"./chunk-VM56C6ZV.js";import{a as xe,b as Ce}from"./chunk-ISIYG4D5.js";import"./chunk-ALLR2NXQ.js";import{a as ve,b as y,c as ye,d as we,e as Re,f as Ie,g as Te}from"./chunk-FNGX2XFA.js";import"./chunk-BFEM6LX7.js";import{n as fe,o as _e,w as ge,x as he,y as be,z as Se}from"./chunk-O44DI62I.js";import"./chunk-DTYVTTET.js";import{b as re,c as ae,e as le,f as me,k as pe,m as se,p as ce,v as de,y as ue}from"./chunk-MGIEURA2.js";import"./chunk-DZCJWJUG.js";import"./chunk-TOR7QRRB.js";import"./chunk-YQYRAH7V.js";import"./chunk-KL3TPLRB.js";import"./chunk-RVUOVLL5.js";import"./chunk-GGQ7LRWG.js";import"./chunk-F2X3VGZZ.js";import{j as Y,l as Z,m as ee,p as te,r as ie,u as ne}from"./chunk-DM2JLWKE.js";import{Cb as K,Dc as Q,Eb as g,Fc as E,Ha as k,Mb as c,Oc as I,Pc as X,Qc as V,Sc as v,Wb as r,Xb as o,Y as N,Yb as b,_ as U,ac as w,bd as T,c as A,db as L,eb as O,fc as R,gc as _,ia as C,ib as m,qa as h,ra as x,s as J,sc as s,tc as S,uc as M,wc as W,xc as $,yb as G,yc as P,zc as q}from"./chunk-6QJHEOXN.js";import{a as d,b as f}from"./chunk-YQFG5XE2.js";var We={data:{data:[],totalCount:0},meta:{options:{outlets:[]},filter:{number:null,outletName:null,from:null,to:null,customerID:null,pageNumber:1,pageSize:20,export:!1,exportPageNumber:1,exportPageSize:1e4,paymentState:0}},filter:{number:null,outletName:null,from:null,to:null,customerID:null,pageNumber:1,pageSize:20,export:!1,exportPageNumber:1,exportPageSize:1e4,paymentState:0}},B=ye(Te(We),we(t=>({first:T(()=>(t.filter().pageNumber-1)*t.filter().pageSize+1),end:T(()=>Math.min(t.filter().pageNumber*t.filter().pageSize,t.data().totalCount)),hasCheckedRows:T(()=>t.data().data.some(a=>a.checked)),checkedARCollection:T(()=>t.data().data.filter(a=>a.checked).map(a=>a.id))})),Ie(t=>{let a=C(F),e=C(D);return{updateFilter(n){y(t,i=>f(d({},i),{filter:d(d({},i.filter),n)}))},onRowSelect(n){y(t,i=>{let u=i.data.data.map(p=>p.id===n.id?f(d({},p),{checked:!0}):p);return f(d({},i),{data:f(d({},i.data),{data:u})})})},onRowUnselect(n){y(t,i=>{let u=i.data.data.map(p=>p.id===n.id?f(d({},p),{checked:!1}):p);return f(d({},i),{data:f(d({},i.data),{data:u})})})},onHeaderCheckboxToggle(n){y(t,i=>{let u=i.data.data.map(p=>f(d({},p),{checked:n}));return f(d({},i),{data:f(d({},i.data),{data:u})})})},getARLoader:z(A(N(()=>a.getARJournalLoader().pipe(j({next:n=>{y(t,i=>f(d({},i),{meta:n}))},error:n=>{console.error("Error fetching AR collection loader:",n)}}))))),getARCollection:z(A(J(n=>Object.entries(n).reduce((i,[u,p])=>(p!=null&&(i[u]=p),i),{})),N(n=>a.getARJournal(n).pipe(J(i=>f(d({},i),{data:i.data.map(u=>f(d({},u),{due:e.from(u.due)?e.from(u.due).format():null,checked:!1}))})),j({next:i=>{y(t,u=>f(d({},u),{data:i}))},error:i=>{console.error("Error fetching customer invoice:",i)}})))))}}),Re(t=>({onInit:()=>{t.getARLoader(),t.getARCollection(t.filter)}})));var H=t=>({"ng-invalid ng-dirty":t});function $e(t,a){if(t&1){let e=w();r(0,"p-button",10),R("onClick",function(){h(e);let n=_(2);return x(n.onCreateJournal())}),o()}}function qe(t,a){if(t&1&&g(0,$e,1,0,"p-button",9),t&2){let e=_();c("ngIf",e.store.hasCheckedRows())}}function Qe(t,a){t&1&&(r(0,"tr")(1,"th",12),b(2,"p-tableHeaderCheckbox"),o(),r(3,"th",13),s(4,"Tag"),o(),r(5,"th",14),s(6,"Number"),o(),r(7,"th",15),s(8,"Customer"),o(),r(9,"th",16),s(10,"Date"),o(),r(11,"th",16),s(12,"Due"),o(),r(13,"th",15),s(14,"Note"),o(),r(15,"th",17),s(16,"Payment"),o(),b(17,"th",18),o())}function Xe(t,a){if(t&1&&(r(0,"tr")(1,"td"),b(2,"p-tableCheckbox",19),o(),r(3,"td"),s(4),o(),r(5,"td")(6,"a",20),s(7),o()(),r(8,"td"),s(9),o(),r(10,"td"),s(11),I(12,"date"),o(),r(13,"td"),s(14),I(15,"date"),o(),r(16,"td"),b(17,"div",21),o(),r(18,"td"),s(19),o(),r(20,"td"),b(21,"p-button",22),o()()),t&2){let e=a.$implicit,l=_(2);m(2),c("value",e),m(2),S(e.outlet),m(2),c("href",l.authService.getTenantExternalURL()+"/menu/Debt/Debt/Join_Invoice/New_Join_Invoice/Info?ID="+e.id,O),m(),M(" ",e.number," "),m(2),S(e.customer),m(2),S(V(12,12,e.date,"d MMM y")),m(3),S(e.due?V(15,15,e.due,"d MMM y hh:mm"):"-"),m(3),c("innerHTML",e.note,L),m(2),S(e.payment),m(2),c("icon",e.integrated?"fa-solid fa-circle-check":"fa-solid fa-circle-xmark")("severity",e.integrated?"success":"danger")("text",!0)}}function Ye(t,a){if(t&1&&s(0),t&2){let e=_(2);W(" Showing ",e.store.first()," to ",e.store.end()," of ",e.store.data().totalCount," entries ")}}function Ze(t,a){t&1&&(r(0,"tr")(1,"td",23)(2,"span"),s(3,"No records found."),o()()())}function et(t,a){if(t&1){let e=w();r(0,"p-panel")(1,"p-table",11),R("onPage",function(n){h(e);let i=_();return x(i.onPageChange(n))})("onHeaderCheckboxToggle",function(n){h(e);let i=_();return x(i.onHeaderCheckboxToggle(n))})("onRowSelect",function(n){h(e);let i=_();return x(i.onRowSelect(n))})("onRowUnselect",function(n){h(e);let i=_();return x(i.onRowUnselect(n))}),g(2,Qe,18,0,"ng-template",null,3,v)(4,Xe,22,18,"ng-template",null,4,v)(6,Ye,1,3,"ng-template",null,5,v)(8,Ze,4,0,"ng-template",null,6,v),o()()}if(t&2){let e=_();m(),c("value",e.store.data().data)("paginator",!0)("rows",e.store.filter().pageSize)("totalRecords",e.store.data().totalCount)("lazy",!0)}}function tt(t,a){if(t&1&&(r(0,"span",34),s(1),I(2,"truncate"),o()),t&2){let e=a.$implicit;c("pTooltip",e.name),m(),M(" ",V(2,2,e.name,30)," ")}}function it(t,a){if(t&1&&(r(0,"div")(1,"span",36),s(2),o()()),t&2){let e=a.$implicit;m(2),S(e)}}function nt(t,a){if(t&1&&(r(0,"div"),g(1,it,3,1,"div",35),o()),t&2){let e=_(2);m(),c("ngForOf",e.getErrors("from"))}}function ot(t,a){if(t&1&&(r(0,"div")(1,"span",36),s(2),o()()),t&2){let e=a.$implicit;m(2),S(e)}}function rt(t,a){if(t&1&&(r(0,"div"),g(1,ot,3,1,"div",35),o()),t&2){let e=_(2);m(),c("ngForOf",e.getErrors("to"))}}function at(t,a){if(t&1&&(r(0,"div")(1,"span",36),s(2),o()()),t&2){let e=a.$implicit;m(2),S(e)}}function lt(t,a){if(t&1&&(r(0,"div"),g(1,at,3,1,"div",35),o()),t&2){let e=_(2);m(),c("ngForOf",e.getErrors("pageSize"))}}function mt(t,a){if(t&1){let e=w();r(0,"form",24)(1,"div",25)(2,"label",26),s(3,"Tag"),o(),r(4,"p-select",27),g(5,tt,3,5,"ng-template",null,7,v),o()(),r(7,"div",25)(8,"label",26),s(9,"From - To"),o(),r(10,"div",28),b(11,"p-datepicker",29),g(12,nt,2,1,"div",30),b(13,"p-datepicker",31),g(14,rt,2,1,"div",30),o()(),r(15,"div",25)(16,"label",26),s(17,"Customer"),o(),r(18,"p-autocomplete",32),I(19,"async"),R("completeMethod",function(n){h(e);let i=_();return x(i.onSearchContact(n))}),o()(),r(20,"div",25)(21,"label",26),s(22,"Page Size"),o(),b(23,"input",33),g(24,lt,2,1,"div",30),o()()}if(t&2){let e=_();c("formGroup",e.form),m(4),c("virtualScrollItemSize",50)("options",e.store.meta().options.outlets),m(7),c("iconDisplay","input")("showIcon",!0)("ngClass",E(16,H,e.isInvalid("from"))),m(),c("ngIf",e.isInvalid("from")),m(),c("iconDisplay","input")("showIcon",!0)("ngClass",E(18,H,e.isInvalid("to"))),m(),c("ngIf",e.isInvalid("to")),m(4),c("suggestions",X(19,14,e.customerSuggestions$)),m(5),c("ngClass",E(20,H,e.isInvalid("pageSize"))),m(),c("ngIf",e.isInvalid("pageSize"))}}var Yt=(()=>{class t extends Pe{constructor(){super(),this.store=C(B),this.generateJournalService=C(F),this.authService=C(oe),this.isDialogFilterVisible=k(!1),this.isInitDialogFilterVisible=k(!1),this.fb=C(de),this.dayjsService=C(D)}ngOnInit(){this.initForm()}initForm(){let{number:e,from:l,to:n,pageNumber:i,pageSize:u,export:p,exportPageNumber:Ue,exportPageSize:Le,outletName:Oe,customerID:Ge,paymentState:Ke}=this.store.filter();this.form=this.fb.group({number:this.fb.control(e),from:this.fb.control(this.dayjsService.from(l)?this.dayjsService.from(l).toDate():null),to:this.fb.control(this.dayjsService.from(n)?this.dayjsService.from(n).toDate():null),pageNumber:this.fb.control(i),pageSize:this.fb.control(u,[ae.required]),export:this.fb.control(p),exportPageNumber:this.fb.control(Ue),exportPageSize:this.fb.control(Le),outletName:this.fb.control(Oe),customerID:this.fb.control(Ge),paymentState:this.fb.control(Ke)})}onFilterOKEvent(){if(this.form.invalid){this.form.markAllAsTouched();return}let e=Object.entries(this.form.getRawValue()).reduce((l,[n,i])=>{switch(n){case"customerID":i||(l[n]=ze);break;case"from":typeof i=="object"?l[n]=this.dayjsService.from(i)?this.dayjsService.format(i):null:l[n]=i!=null?String(i):null;break;case"to":typeof i=="object"?l[n]=this.dayjsService.from(i)?this.dayjsService.format(i):null:l[n]=i!=null?String(i):null;break;default:l[n]=i===null?"":i;break}return l},{});console.log("Filter Body:",e),this.store.updateFilter(e),this.isDialogFilterVisible.set(!1)}onSearchContact(e){this.customerSuggestions$=this.generateJournalService.getCustomerSuggestions(e.query)}onSearch(e){this.store.updateFilter(f(d({},this.store.filter()),{number:e,pageNumber:1})),this.store.getARCollection(this.store.filter())}onPageChange(e){let l=e.first/e.rows;this.store.updateFilter(f(d({},this.store.filter()),{pageNumber:l+1}))}onHeaderCheckboxToggle(e){this.store.onHeaderCheckboxToggle(e.checked)}onRowSelect(e){this.store.onRowSelect(e.data)}onRowUnselect(e){if(Array.isArray(e.data)){e.data.forEach(l=>{this.store.onRowUnselect(l)});return}else this.store.onRowUnselect(e.data)}onCreateJournal(){this.generateJournalService.createARJournal(this.store.checkedARCollection()).pipe(U(()=>this.store.getARCollection(this.store.filter))).subscribe()}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=G({type:t,selectors:[["app-ar-journal"]],features:[Q([B]),K],decls:8,vars:5,consts:[["actionButton",""],["content",""],["filters",""],["header",""],["body",""],["paginatorleft",""],["emptymessage",""],["item",""],["pageTitle","Join Invoice",3,"isDialogFilterVisibleChange","isInitDialogFilterVisibleChange","filterConfirmed","search","isSearchableInput","isFilterable","isDialogFilterVisible","isInitDialogFilterVisible","scrollable"],["label","Generate Journal",3,"onClick",4,"ngIf"],["label","Generate Journal",3,"onClick"],["dataKey","id",3,"onPage","onHeaderCheckboxToggle","onRowSelect","onRowUnselect","value","paginator","rows","totalRecords","lazy"],[2,"width","1rem"],[2,"width","10rem"],[2,"width","12rem"],[2,"width","14rem"],[2,"width","11rem"],[2,"width","9rem"],[2,"width","4rem"],[3,"value"],["target","_blank",1,"link","link-primary",3,"href"],[3,"innerHTML"],[3,"icon","severity","text"],["colspan","9"],[1,"d-flex","flex-column","row-gap-3",3,"formGroup"],[1,"d-flex","flex-column"],["for","outlet"],["virtualScroll","","showClear","","filter","","filterBy","name","formControlName","outletName","appendTo","body","optionLabel","name","optionValue","name","placeholder","Select an Tag",3,"virtualScrollItemSize","options"],[1,"d-flex","flex-column","gap-2"],["showClear","","formControlName","from","styleClass","w-100","appendTo","body","inputId","icondisplay",3,"iconDisplay","showIcon","ngClass"],[4,"ngIf"],["showClear","","formControlName","to","styleClass","w-100","appendTo","body","inputId","icondisplay",3,"iconDisplay","showIcon","ngClass"],["showClear","","formControlName","customerID","appendTo","body","styleClass","w-100","optionLabel","Value","optionValue","Key","inputStyleClass","w-100",3,"completeMethod","suggestions"],["type","text","pInputText","","formControlName","pageSize","appMaskNumber","",3,"ngClass"],[3,"pTooltip"],[4,"ngFor","ngForOf"],[1,"text-danger"]],template:function(l,n){if(l&1){let i=w();r(0,"app-main-panel",8),q("isDialogFilterVisibleChange",function(p){return h(i),P(n.isDialogFilterVisible,p)||(n.isDialogFilterVisible=p),x(p)})("isInitDialogFilterVisibleChange",function(p){return h(i),P(n.isInitDialogFilterVisible,p)||(n.isInitDialogFilterVisible=p),x(p)}),R("filterConfirmed",function(){return h(i),x(n.onFilterOKEvent())})("search",function(p){return h(i),x(n.onSearch(p))}),g(1,qe,1,1,"ng-template",null,0,v)(3,et,10,5,"ng-template",null,1,v),s(5," <"),g(6,mt,25,22,"ng-template",null,2,v),o()}l&2&&(c("isSearchableInput",!0)("isFilterable",!0),$("isDialogFilterVisible",n.isDialogFilterVisible)("isInitDialogFilterVisible",n.isInitDialogFilterVisible),c("scrollable",!0))},dependencies:[Ee,ne,Y,Z,ee,te,ie,Me,Je,Ne,ke,he,ge,Ce,xe,ue,pe,re,le,me,se,ce,Ae,Fe,De,Ve,He,Be,_e,fe,ve,Se,be,je],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();export{Yt as ARJournalComponent};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import{a as pt}from"./chunk-HU4J3ABZ.js";import{a as Re,b as Fe}from"./chunk-LO4HJ77Y.js";import{a as ve}from"./chunk-2JFOEOZ2.js";import{a as Ht,b as de}from"./chunk-LBXNL7E4.js";import{b as rt}from"./chunk-5VKDAA74.js";import{b as Wt,c as at,d as lt}from"./chunk-6GILMLXA.js";import{a as ue,b as _e}from"./chunk-2ABEICLB.js";import"./chunk-KQZMRRMA.js";import"./chunk-ZC7ZENN7.js";import{m as X}from"./chunk-Q4XWXOWE.js";import"./chunk-WL6ZZCYW.js";import{a as we,b as Te}from"./chunk-3VQUNDVT.js";import{a as it,b as nt,d as se,k as ce}from"./chunk-BTFX33U6.js";import{a as pe,b as me}from"./chunk-BME4Z6DH.js";import"./chunk-VSDW2RJ5.js";import"./chunk-7L5IAWG2.js";import{a as ot}from"./chunk-SOYJAYJK.js";import{a as Ne}from"./chunk-BT7Y4ADP.js";import{b as Ie}from"./chunk-5U7KZJ3H.js";import"./chunk-MJGBBYIO.js";import"./chunk-CN6AT4LE.js";import{a as qt,b as De}from"./chunk-OW2ND5HU.js";import"./chunk-JWNGZMSE.js";import"./chunk-II7KELI4.js";import{d as Ue}from"./chunk-FTBQKOYS.js";import"./chunk-L4ENW4RK.js";import{b as le}from"./chunk-FHJOSHI3.js";import"./chunk-KONCSTVQ.js";import"./chunk-FMAG3RQL.js";import{e as et,f as tt,i as ae}from"./chunk-J3HFAWXU.js";import"./chunk-VM56C6ZV.js";import{a as $e,b as re}from"./chunk-ISIYG4D5.js";import"./chunk-ALLR2NXQ.js";import{b as j,c as Ye,d as Xe,e as Je,f as Qe,g as Ze}from"./chunk-FNGX2XFA.js";import"./chunk-BFEM6LX7.js";import{n as Ot,o as Ke,w as ne,x as oe,y as jt,z as zt}from"./chunk-O44DI62I.js";import{b as ye}from"./chunk-DTYVTTET.js";import{b as Bt,c as Pt,e as J,f as Q,g as Gt,i as st,k as Z,m as ee,p as te,v as Ee,y as ie}from"./chunk-MGIEURA2.js";import{b as He,e as $,l as Y}from"./chunk-DZCJWJUG.js";import{a as At}from"./chunk-TOR7QRRB.js";import{a as We}from"./chunk-YQYRAH7V.js";import{c as kt,d as Nt}from"./chunk-KL3TPLRB.js";import{a as Se}from"./chunk-RVUOVLL5.js";import"./chunk-GGQ7LRWG.js";import"./chunk-F2X3VGZZ.js";import{j as ze,m as W,r as qe,s as K,u as U}from"./chunk-DM2JLWKE.js";import{Ac as Mt,Bc as mt,Cc as ge,D as Be,Dc as Oe,Eb as g,Ec as L,Fc as F,Gc as Vt,Ha as y,Hc as je,Mb as s,Oc as S,Pb as Ge,Pc as T,Qc as G,Rb as V,Sb as Le,Sc as _,Ub as Me,Vb as Ve,W as Dt,Wb as o,X as Rt,Xb as r,Y as Ce,Yb as w,Zb as q,_ as M,_b as H,ac as D,bd as R,c as be,ca as Ft,cd as fe,db as z,eb as Pe,fc as I,gc as c,ia as C,ib as l,jc as Lt,qa as h,ra as x,s as Ae,sc as a,tc as b,uc as E,vc as ke,xc as B,yb as N,yc as A,zc as O}from"./chunk-6QJHEOXN.js";import{a as f,b as v,c as xe,e as Tt}from"./chunk-YQFG5XE2.js";var P=(()=>{class t{constructor(){this.httpService=C(At),this.authService=C(ve)}fetchGeneralLedgerLoader(e="single",n={}){return this.httpService.get(void 0,`api/GeneralLedgerLoader/${e==="single"?"GetFilterSingle":"GetFilter"}`,{params:n})}getGLCount(e){return this.httpService.post(void 0,"api/GeneralLedger/GetGeneralLedgerCount",e)}fetchGeneralLedgerReport(e,n="single"){return this.httpService.post(void 0,`api/GeneralLedger/${n==="single"?"GetGeneralLedger":"GetMultiLedger"}`,e)}exportGeneralLedger(e,n={}){let i=f({responseType:"blob"},n);return this.httpService.post(void 0,"/api/GeneralLedgerExport/GetGeneralLedgerExport",e,i)}exportMultiLedger(e,n={}){let i=f({responseType:"blob"},n);return this.httpService.post(void 0,"/api/GeneralLedgerExport/GetMultiLedgerExport",e,i)}getCustomerSuggestions(e){let n={Prefix:e,Count:100};return this.httpService.get(this.authService.getTenantExternalURL(),"/API/AC/GetCustomerSuggestion",{params:n})}getSupplierSuggestions(e){let n={Prefix:e,Count:100};return this.httpService.get(this.authService.getTenantExternalURL(),"/API/AC/GetSupplierSuggestion",{params:n})}getCashierSuggestions(e){let n={Prefix:e,Count:100};return this.httpService.get(this.authService.getTenantExternalURL(),"/api/ac/GetUserSuggestion",{params:n})}getBalanceSheetLoader(){return this.httpService.get(void 0,"/api/BalanceSheetLoader/GetBalanceSheet")}getBalanceSheet(e,n={}){let i=new Nt({fromObject:Object.fromEntries(Object.entries(e).map(([d,k])=>[d,String(k)]))}),p=new kt({"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=f({params:i,headers:p},n);return this.httpService.get(void 0,"/api/BalanceSheet",u)}getIncomeStatementLoader(){return this.httpService.get(void 0,"api/IncomeStatementLoader/Filter")}getIncomeStatement(e,n={}){return this.httpService.post(void 0,"api/IncomeStatement/List",f({},e),n)}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275prov=Ft({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var ri=()=>({width:"30vw"}),ai=()=>({"1199px":"75vw","575px":"90vw"}),li=t=>({"ng-dirty ng-invalid":t}),pi=t=>["/pages/journal/journal-entry/",t],mi=t=>({"text-success":t}),si=t=>({"text-danger":t});function ci(t,m){if(t&1&&(o(0,"div",32)(1,"div",33)(2,"span",34),a(3),r()(),o(4,"div")(5,"span"),a(6,"-"),r()(),o(7,"div",33)(8,"span",35),a(9),r()()()),t&2){let e=m.$implicit;l(3),E("(",e.code,")"),l(6),b(e.name)}}function di(t,m){if(t&1&&(o(0,"div",32)(1,"div",33)(2,"span",34),a(3),r()(),o(4,"div")(5,"span"),a(6,"-"),r()(),o(7,"div",33)(8,"span",35),a(9),r()()()),t&2){let e=m.$implicit;l(3),E("(",e.code,")"),l(6),b(e.name)}}function ui(t,m){t&1&&(o(0,"div",36),a(1," Account is required. "),r())}function _i(t,m){if(t&1&&(o(0,"div",37)(1,"div"),a(2),r()()),t&2){let e=m.$implicit;l(2),b(e.value)}}function gi(t,m){if(t&1&&(o(0,"div",25)(1,"div",26),w(2,"p-radiobutton",38),o(3,"label",39),a(4),r()()()),t&2){let e=m.$implicit;l(2),s("value",e.key)("inputId",e.key),l(),s("for",e.key),l(),b(e.value)}}function fi(t,m){if(t&1){let e=D();o(0,"div",15)(1,"label",16),a(2,"Customer"),r(),o(3,"p-autocomplete",40),I("completeMethod",function(i){h(e);let p=c(3);return x(p.searchCustomer(i))}),r()()}if(t&2){let e=c(3);l(3),s("suggestions",e.customerSuggestions())}}function hi(t,m){if(t&1){let e=D();o(0,"div",15)(1,"label",16),a(2,"Supplier"),r(),o(3,"p-autocomplete",41),I("completeMethod",function(i){h(e);let p=c(3);return x(p.searchSupplier(i))}),r()()}if(t&2){let e=c(3);l(3),s("suggestions",e.supplierSuggestions())}}function xi(t,m){if(t&1){let e=D();o(0,"div",15)(1,"label",16),a(2,"Customer"),r(),o(3,"p-autocomplete",40),I("completeMethod",function(i){h(e);let p=c(3);return x(p.searchCustomer(i))}),r()()}if(t&2){let e=c(3);l(3),s("suggestions",e.customerSuggestions())}}function bi(t,m){if(t&1&&(o(0,"form",14)(1,"div",15)(2,"label",16),a(3,"Accounts"),r(),o(4,"p-select",17),g(5,ci,10,2,"ng-template",null,5,_)(7,di,10,2,"ng-template",null,6,_),r(),g(9,ui,2,0,"div",18),r(),o(10,"div",15)(11,"label",16),a(12,"From"),r(),o(13,"div",19),w(14,"p-datepicker",20)(15,"p-datepicker",21),r()(),o(16,"div",15)(17,"label",16),a(18,"Tag"),r(),o(19,"p-multiselect",22),g(20,_i,3,1,"ng-template",null,6,_),r()(),o(22,"div",15)(23,"label",23),a(24,"Contact Type"),r(),o(25,"div",24),Me(26,gi,5,4,"div",25,Le),r()(),g(28,fi,4,1,"div",15)(29,hi,4,1,"div",15)(30,xi,4,1,"div",15),o(31,"div",15)(32,"label",23),a(33,"Sort order"),r(),o(34,"div",24)(35,"div",25)(36,"div",26),w(37,"p-radiobutton",27),o(38,"label",28),a(39,"Asc"),r()()(),o(40,"div",29)(41,"div",26),w(42,"p-radiobutton",30),o(43,"label",31),a(44,"Desc"),r()()()()()()),t&2){let e,n,i,p=c(2);s("formGroup",p.form),l(4),s("virtualScroll",!0)("virtualScrollItemSize",50)("options",p.loaderMetadata().options.accounts)("ngClass",F(14,li,((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",((n=p.form.get("accountID"))==null?null:n.invalid)&&(((n=p.form.get("accountID"))==null?null:n.touched)||((n=p.form.get("accountID"))==null?null:n.dirty))),l(5),s("showIcon",!0),l(),s("showIcon",!0),l(4),s("virtualScroll",!0)("virtualScrollItemSize",50)("options",p.loaderMetadata().options.outlets),l(7),Ve(p.loaderMetadata().options.contactTypeOptions),l(2),V((i=p.form.controls.contactType.value)===1?28:i===2?29:30),l(9),s("value",!0),l(5),s("value",!1)}}function Ci(t,m){if(t&1&&g(0,bi,45,16,"form",13),t&2){let e=c();s("ngIf",e.loaderMetadata())}}function Si(t,m){if(t&1){let e=D();o(0,"p-button",44),I("onClick",function(){h(e);let i=c(2);return x(i.onToggleExportDialog())}),r()}}function vi(t,m){if(t&1&&(o(0,"div",32)(1,"a",42),a(2,"Return to Accounts"),r(),g(3,Si,1,0,"p-button",43),r()),t&2){let e=c();l(3),s("ngIf",e.roleService.permissions().global.export)}}function yi(t,m){t&1&&(o(0,"tr")(1,"th",51),a(2,"Number"),r(),o(3,"th"),a(4,"Date"),r(),o(5,"th"),a(6,"Contact / Note"),r(),o(7,"th",52),a(8,"Debit"),r(),o(9,"th",52),a(10,"Credit"),r(),o(11,"th",52),a(12,"Balance"),r()())}function Ei(t,m){if(t&1&&(o(0,"div")(1,"span",60),a(2),r()()),t&2){let e=c().$implicit;l(2),E(" ",e.outletName," ")}}function Ii(t,m){if(t&1&&(o(0,"div",15),w(1,"div",61),o(2,"span",62),a(3),r()()),t&2){let e=c().$implicit;l(),s("innerHTML",e.journalNote,z),l(2),E("",e.note," ")}}function wi(t,m){if(t&1&&(o(0,"div",15),w(1,"span",61)(2,"div",61),o(3,"span",63),a(4),r()()),t&2){let e=c().$implicit;l(),s("innerHTML",e.referenceText,z),l(),s("innerHTML",e.journalNote,z),l(2),E("",e.note," ")}}function Ti(t,m){if(t&1&&(q(0),a(1),S(2,"number"),H()),t&2){let e=c().$implicit;l(),E(" ",G(2,1,e.debitAmount,"1.0-2")," ")}}function Di(t,m){if(t&1&&(q(0),a(1),S(2,"number"),H()),t&2){let e=c().$implicit;l(),E(" ",G(2,1,e.creditAmount,"1.0-2")," ")}}function Ri(t,m){if(t&1&&(q(0),a(1),S(2,"number"),H()),t&2){let e=c().$implicit;l(),E(" ",G(2,1,e.balance,"1.0-2")," ")}}function Fi(t,m){if(t&1&&(o(0,"tr")(1,"td",53)(2,"a",54),a(3),r(),g(4,Ei,3,1,"div",55),r(),o(5,"td",53)(6,"span",56),S(7,"date"),a(8),S(9,"date"),r()(),o(10,"td",53)(11,"div",15)(12,"a",57),a(13),r(),g(14,Ii,4,2,"div",15)(15,wi,5,3,"div",15),r()(),o(16,"td",58),g(17,Ti,3,4,"ng-container",55),r(),o(18,"td",58),g(19,Di,3,4,"ng-container",55),r(),o(20,"td",59),g(21,Ri,3,4,"ng-container",55),r()()),t&2){let e=m.$implicit,n=c(3);l(2),s("routerLink",F(19,pi,e.id)),l(),b(e.number),l(),s("ngIf",e.outletName==null?null:e.outletName.trim()),l(2),s("pTooltip",G(7,13,e.date,"dd MMM y")),l(2),E(" ",G(9,16,e.date,"dd MMM y")," "),l(4),s("href",n.authService.getTenantExternalURL()+"/menu/Contacts/Contact/Customers/Info?ID="+e.contactID,Pe),l(),b(e.contactName),l(),V(n.buildReferenceUrl(e)?14:15),l(2),s("ngClass",F(21,mi,e.debitAmount!==0)),l(),s("ngIf",e.debitAmount!==0),l(),s("ngClass",F(23,si,e.creditAmount!==0)),l(),s("ngIf",e.creditAmount!==0),l(2),s("ngIf",e.balance!==0)}}function Li(t,m){if(t&1&&(o(0,"tr"),w(1,"td",64),o(2,"td",65),a(3,"Total"),r(),o(4,"td",66),a(5),S(6,"number"),r(),o(7,"td",67),a(8),S(9,"number"),r(),w(10,"td"),r()),t&2){let e=c(3);l(5),E(" ",T(6,2,e.debitSubTotal())," "),l(3),E(" ",T(9,4,e.creditSubTotal())," ")}}function Mi(t,m){t&1&&(o(0,"tr")(1,"td",68)(2,"span"),a(3,"No records found."),r()()())}function Vi(t,m){if(t&1){let e=D();o(0,"button",69),I("click",function(){h(e);let i=c(3);return x(i.getGLCount())})("keyup.enter",function(){h(e);let i=c(3);return x(i.getGLCount())}),r()}}function ki(t,m){if(t&1&&a(0),t&2){let e=c(3);E(" ",e.count()," ")}}function Ni(t,m){if(t&1){let e=D();o(0,"p-button",70),I("onClick",function(){h(e);let i=c(3);return x(i.onNextPage())}),r()}}function Ai(t,m){if(t&1&&(o(0,"div",46)(1,"p-table",47),g(2,yi,13,0,"ng-template",null,7,_)(4,Fi,22,25,"ng-template",null,8,_)(6,Li,11,6,"ng-template",null,4,_)(8,Mi,4,0,"ng-template",null,9,_),r(),o(10,"div",48)(11,"div"),a(12),g(13,Vi,1,0,"button",49)(14,ki,1,1),a(15," entries "),r(),o(16,"div",32),g(17,Ni,1,0,"p-button",50),r()()()),t&2){let e=c(2);l(),s("value",e.items().data.data),l(11),ke(" Showing ",e.pagination().first," to ",e.pagination().end," of "),l(),V(e.totalRecords()===-1?13:14),l(4),V(e.pagination().hasNext?17:-1)}}function Bi(t,m){if(t&1&&g(0,Ai,18,5,"div",45),t&2){let e=c();s("ngIf",e.items()&&e.items().data)}}function Pi(t,m){if(t&1&&(o(0,"div",71)(1,"div",72),w(2,"div",73),r(),o(3,"div",74)(4,"div",26),w(5,"i",75),o(6,"span",76),a(7),S(8,"number"),S(9,"number"),r()()()()),t&2){let e=c();l(),s("formGroup",e.form),l(6),ke("Exporting data from ",T(8,3,e.filter().exportPageNumber)," - ",T(9,5,e.filter().exportPageSize),"")}}function Gi(t,m){if(t&1){let e=D();o(0,"p-button",77),I("onClick",function(){h(e);let i=c();return x(i.onToggleExportDialog())}),r()}t&2&&s("rounded",!0)("text",!0)}function Oi(t,m){if(t&1){let e=D();o(0,"p-button",78),I("click",function(){h(e);let i=c();return x(i.onToggleExportDialog())}),r(),o(1,"p-button",79),I("click",function(){h(e);let i=c();return x(i.onExport())}),r()}}var Ut=(()=>{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(P),this.route=C(He),this.roleService=C(X),this.authService=C(ve),this.fb=C(Ee),this.coaService=C(ot),this.toastr=C(We),this.dayjsService=C(de),this.metadata=y(null),this.items=y(null),this.totalRecords=y(-1),this.dialogFilterVisible=y(!0),this.initDialogVisible=y(!1),this.isDialogExportVisible=y(!1),this.customerSuggestions=y([]),this.supplierSuggestions=y([]),this.categoriesOptions=y([]),this.localFilter=y({}),this.count=R(()=>this.totalRecords()<0?1/0:this.totalRecords()),this.lastGetDataLength=y(0),this.pagination=R(()=>{let e=this.filter(),n=this.totalRecords()!=null&&this.totalRecords()>=0?this.totalRecords():1/0,i=this.items()?.data?.data?.length||0,p=i==n||this.lastGetDataLength()<e.pageSize;return{first:1,end:e.pageSize>0?i:0,total:n,page:e.pageNumber,pageSize:e.pageSize,hasPrev:e.pageNumber>1,hasNext:!p}}),this.queryFilter=ye(this.route.queryParamMap.pipe(Ae(e=>{let n=e.get("from")?this.dayjsService.format(new Date(e.get("from"))):null,i=e.get("to")?this.dayjsService.format(new Date(e.get("to"))):null,p={},u=e.get("id");return Se.IsNotEmpty(u)&&(p=v(f({},p),{accountID:u})),Se.IsNotEmpty(n)&&Se.IsNotEmpty(i)&&(p=v(f({},p),{from:n,to:i})),p})),{initialValue:null}),this.loaderMetadata=ye(this.reportService.fetchGeneralLedgerLoader("single",this.queryFilter()),{initialValue:null}),this.baseFilter=R(()=>{let e=this.loaderMetadata();return e?e.filter:null}),this.exportFileTypes=y([{key:0,value:"CSV"},{key:1,value:"Excel"}]),this.filter=R(()=>{let e=this.baseFilter(),n=this.localFilter();return e?f(f({},e),n):null}),this.creditSubTotal=R(()=>(this.items()?.data?.data??[]).reduce((n,i)=>n+(Number(i.creditAmount)||0),0)),this.balanceSubTotal=R(()=>(this.items()?.data?.data??[]).reduce((n,i)=>n+(Number(i.balance)||0),0)),this.debitSubTotal=R(()=>(this.items()?.data?.data??[]).reduce((n,i)=>n+(Number(i.debitAmount)||0),0)),this.initializeForm(),fe(()=>{let e=this.filter();e&&(Se.IsEmpty(this.form.value.accountID)||this.form.value.accountID!==e.accountID)&&this.form.patchValue(this.transformFilterToFormValue(e),{emitEvent:!1})}),fe(()=>{let e=this.filter(),n=this.form.value.accountID;!e||Se.IsEmpty(n)||this.reportService.fetchGeneralLedgerReport(e).subscribe(i=>{this.lastGetDataLength.set(i.data?.data?.length),this.items.update(p=>e.pageNumber===1?i:v(f({},i),{data:v(f({},i.data),{data:[...p?.data.data??[],...i.data.data]})}))})})}buildReferenceUrl(e){return pt(e)}ngOnInit(){this.route.queryParamMap.pipe(Be(e=>e.keys.length>0)).subscribe({next:()=>this.initDialogVisible.set(!0)})}initializeForm(){this.form=this.fb.group({accountID:this.fb.control(null,[Pt.required]),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([]),export:this.fb.control(!1),exportPageNumber:this.fb.control(1),exportPageSize:this.fb.control(0)})}findNodeByKey(e,n){for(let i of e){if(i.key===n)return i;if(i.children){let p=this.findNodeByKey(i.children,n);if(p)return p}}return null}transformFilterToFormValue(e){return Object.entries(e).reduce((n,[i,p])=>{switch(i){case"from":n[i]=p&&(typeof p=="string"||typeof p=="number"||p instanceof Date)?this.dayjsService.from(p)?.toDate():null;break;case"to":n[i]=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)?n[i]=p.map(u=>this.findNodeByKey(this.categoriesOptions(),u)).filter(u=>!!u):n[i]=[];break;case"listOutletID":case"listAccountID":n[i]=Array.isArray(p)?p:[];break;case"pageNumber":case"pageSize":case"exportPageNumber":case"exportPageSize":n[i]=p!=null?Number(p):0;break;case"sortAscending":case"export":n[i]=!!p;break;case"contactType":n[i]=p!=null?Number(p):null;break;default:n[i]=p}return n},{})}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(n=>this.customerSuggestions.set(n))).subscribe()}searchSupplier(e){this.reportService.getSupplierSuggestions(e.query).pipe(M(n=>this.supplierSuggestions.set(n))).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),this.totalRecords()!==-1&&this.getGLCount()}buildFilterBody(){let p=this.form.getRawValue(),{from:e,to:n}=p,i=xe(p,["from","to"]);return v(f({},this.filter()),{pageNumber:i.pageNumber,pageSize:i.pageSize,sortAscending:i.sortAscending,accountID:i.accountID,contactID:i.contactID?.length===0?null:i.contactID,listOutletID:i.listOutletID??[],listAccountID:i.listAccountID??[],from:this.dayjsService.from(e)?this.dayjsService.format(e):null,to:this.dayjsService.from(n)?this.dayjsService.format(n):null,contactType:i.contactType})}onExport(){let e=this.buildExportBody();this.performExport(e)}performExport(e){this.reportService.exportGeneralLedger(e,{responseType:"blob",observe:"response"}).pipe(M(n=>this.handleExportResponse(n))).subscribe()}handleExportResponse(e){let n=e.headers,i=n.get("Content-Disposition")??n.get("content-disposition"),p="download.csv";if(i){let d=i.match(/filename\*?=(?:UTF-8'')?"?([^;\r\n"]+)/i);d?.[1]&&(p=decodeURIComponent(d[1].replace(/"/g,"")))}let u=e.body;lt(u,p,u.type)}buildExportBody(){let p=this.form.value,{from:e,to:n}=p,i=xe(p,["from","to"]);return v(f({},this.filter()),{exportPageNumber:+i.exportPageNumber,pageNumber:i.pageNumber,pageSize:i.pageSize,sortAscending:i.sortAscending,accountID:i.accountID,contactID:i.contactID?.length===0?null:i.contactID,listOutletID:i.listOutletID??[],listAccountID:i.listAccountID??[],from:this.dayjsService.from(e)?this.dayjsService.format(e):null,to:this.dayjsService.from(n)?this.dayjsService.format(n):null,contactType:i.contactType,export:!0})}onNextPage(){this.localFilter.update(e=>{let n=e.pageNumber??this.baseFilter()?.pageNumber??1;return v(f({},e),{pageNumber:n+1,balance:this.items().data.data[this.items().data.data.length-1]?.balance??0,credit:this.items().data.data[this.items().data.data.length-1]?.creditAmount??0,debit:this.items().data.data[this.items().data.data.length-1]?.debitAmount??0})})}onPrevPage(){this.localFilter.update(e=>{let n=e.pageNumber??this.baseFilter()?.pageNumber??1;return v(f({},e),{pageNumber:Math.max(1,n-1)})})}goToPage(e){this.localFilter.update(n=>v(f({},n),{pageNumber:e}))}goToLastPage(){let e=this.filter();if(!e)return;let n=this.totalRecords();if(n===-1||!isFinite(n)){this.toastr.info("Please load total records before going to the last page","Info");return}let i=Math.ceil(n/e.pageSize);if(e.pageNumber>=i){this.toastr.warning("You are already on the last page","Warning");return}this.localFilter.update(p=>v(f({},p),{pageNumber:i}))}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=N({type:t,selectors:[["app-report-general-ledger"]],decls:13,vars:13,consts:[["filters",""],["actionButton",""],["content",""],["closeIconTemplate",""],["footer",""],["selectedItem",""],["item",""],["header",""],["body",""],["emptymessage",""],[3,"isDialogFilterVisibleChange","isInitDialogFilterVisibleChange","filterConfirmed","pageTitle","isDialogFilterVisible","isFilterable","isInitDialogFilterVisible","scrollable"],["header","Export General Ledger",3,"visibleChange","modal","visible","breakpoints"],["class","d-flex flex-column gap-3",4,"ngIf"],["class","d-flex flex-column row-gap-3",3,"formGroup",4,"ngIf"],[1,"d-flex","flex-column","row-gap-3",3,"formGroup"],[1,"d-flex","flex-column"],["for","outlet"],["showClear","","filter","","filterBy","code,name","display","chip","formControlName","accountID","appendTo","body","optionLabel","name","optionValue","id","placeholder","Select Accounts",3,"virtualScroll","virtualScrollItemSize","options","ngClass"],["class","text-danger",4,"ngIf"],[1,"d-flex","flex-column","gap-2"],["showClear","","formControlName","from","styleClass","w-100","appendTo","body","iconDisplay","input","inputId","icondisplay",3,"showIcon"],["showClear","","formControlName","to","styleClass","w-100","appendTo","body","iconDisplay","input","inputId","icondisplay",3,"showIcon"],["showClear","","display","chip","formControlName","listOutletID","appendTo","body","optionLabel","value","optionValue","key","placeholder","Select an Tag",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,"d-flex","gap-2"],[1,""],[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"],["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"],[2,"width","180px"],[1,"text-end"],[1,"text-break"],["target","_blank",1,"link","link-primary",3,"routerLink"],[4,"ngIf"],["tooltipPosition","top",3,"pTooltip"],["target","_blank",1,"link","link-primary",3,"href"],[1,"text-end","text-break",3,"ngClass"],[1,"text-end","text-break"],[1,"badge","bg-light","text-dark"],[3,"innerHTML"],[2,"width","300px","white-space","normal","word-break","break-word"],[2,"white-space","normal","word-break","break-word"],["colspan","2"],[1,"text-end","fw-semibold"],[1,"text-end","fw-semibold","text-success"],[1,"text-end","fw-semibold","text-danger"],["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"],["variant","outlined","severity","secondary","icon","fa-solid fa-angle-right","size","small","label","next",3,"onClick"],[1,"d-flex","flex-column","gap-3"],[1,"row",3,"formGroup"],[1,"col-8"],["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(n,i){if(n&1){let p=D();o(0,"app-main-panel",10),O("isDialogFilterVisibleChange",function(d){return h(p),A(i.dialogFilterVisible,d)||(i.dialogFilterVisible=d),x(d)})("isInitDialogFilterVisibleChange",function(d){return h(p),A(i.initDialogVisible,d)||(i.initDialogVisible=d),x(d)}),I("filterConfirmed",function(){return h(p),x(i.onFilterOKEvent())}),g(1,Ci,1,1,"ng-template",null,0,_)(3,vi,4,1,"ng-template",null,1,_)(5,Bi,1,1,"ng-template",null,2,_),r(),o(7,"p-dialog",11),O("visibleChange",function(d){return h(p),A(i.isDialogExportVisible,d)||(i.isDialogExportVisible=d),x(d)}),g(8,Pi,10,7,"div",12)(9,Gi,1,2,"ng-template",null,3,_)(11,Oi,2,0,"ng-template",null,4,_),r()}n&2&&(s("pageTitle",i.pageTitle),B("isDialogFilterVisible",i.dialogFilterVisible),s("isFilterable",!0),B("isInitDialogFilterVisible",i.initDialogVisible),s("scrollable",!0),l(7),Ge(L(11,ri)),s("modal",!0),B("visible",i.isDialogExportVisible),s("breakpoints",L(12,ai)),l(),s("ngIf",i.form&&i.filter()))},dependencies:[ae,U,ze,W,K,qe,le,ce,se,tt,et,oe,ne,De,qt,me,pe,Fe,Re,ie,Z,J,Q,ee,te,_e,ue,Ie,Ue,at,rt,re,Y,$,nt,it,zt,jt,Ke],styles:["[_nghost-%COMP%] .p-datatable .p-datatable-header{padding:.75rem 1rem .75rem 0}[_nghost-%COMP%] th:nth-child(1){width:10%}[_nghost-%COMP%] th:nth-child(2){width:15%}[_nghost-%COMP%] th:nth-child(3){width:40%}[_nghost-%COMP%] th:nth-child(4){width:15%}[_nghost-%COMP%] th:nth-child(5){width:15%}[_nghost-%COMP%] th:nth-child(6){width:15%}"],changeDetection:0})}}return t})();var ji={data:{},filter:{EntityID:[],CashierID:null,Text:null,from:null,to:null},isLoading:!0,loader:{options:{outlets:[]},filter:{from:"",to:"",outletID:[]},roles:{isInRoleEmptyOutlet:!1}}},xt=Ye(Ze(ji),Xe(t=>{let m={totalCOGS:R(()=>{let e=t.data()?.data?.cogs;return Array.isArray(e)?e.reduce((n,i)=>n+(i?.amount??0),0):0}),totalRevenue:R(()=>{let e=t.data()?.data?.revenue;return Array.isArray(e)?e.reduce((n,i)=>n+(i?.amount??0),0):0}),totalExpense:R(()=>{let e=t.data()?.data?.expense;return Array.isArray(e)?e.reduce((n,i)=>n+(i?.amount??0),0):0}),grossProfit:R(()=>Array.isArray(t.data()?.data?.cogs)&&Array.isArray(t.data()?.data?.revenue)?m.totalRevenue()-m.totalCOGS():0),profitOrLoss:R(()=>m.totalRevenue()-m.totalCOGS()-m.totalExpense()),isDataEmpty:R(()=>Object.keys(t.data()?.data??{}).length===0)};return m}),Qe(t=>{let m=C(P),e=C(de),n={updateFilter(i){j(t,p=>v(f({},p),{filter:f(f({},p.filter),i)}))},getLoader:we(be(Ce(()=>m.getIncomeStatementLoader().pipe(Te({next:i=>{j(t,p=>v(f({},p),{loader:i,filter:v(f({},p.filter),{from:e.format(i.filter.from),to:e.format(i.filter.to)})})),n.getIncomeStatement(t.filter)},error:i=>{console.error(i)}}))))),getIncomeStatement:we(be(Ce(i=>m.getIncomeStatement(i).pipe(Rt(()=>j(t,p=>v(f({},p),{isLoading:!0}))),Te({next:p=>{j(t,u=>v(f({},u),{data:p,isLoading:!1}))},error:p=>{console.error(p)}})))))};return n}),Je({onInit:t=>{t.getLoader()}}));var bt=()=>({}),Ct=t=>["/pages/chart-of-account/account/",t],St=()=>["/pages/report/general-ledger"],vt=(t,m,e)=>({id:t,from:m,to:e});function qi(t,m){if(t&1){let e=D();o(0,"p-button",10),I("onClick",function(){h(e);let i=c(2);return x(i.onExport())}),r()}}function Hi(t,m){if(t&1&&(o(0,"div",8),g(1,qi,1,0,"p-button",9),r()),t&2){let e=c();l(),s("ngIf",e.roleService.permissions().global.export)}}function Wi(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 Ki(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;c(2);let n=ge(0),i=ge(1);l(2),b(e.code),l(2),s("routerLink",F(8,Ct,e.accountID)),l(),b(e.name),l(2),s("routerLink",L(10,St))("queryParams",je(11,vt,e.accountID,n,i)),l(),b(T(9,6,e.amount))}}function Ui(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),b(T(7,1,e.store.totalRevenue()))}}function $i(t,m){t&1&&(o(0,"tr")(1,"td",23)(2,"span"),a(3,"No revenue records available"),r()()())}function Yi(t,m){if(t&1&&(o(0,"h6",12),a(1,"Revenue"),r(),o(2,"p-table",13),g(3,Wi,7,0,"ng-template",null,3,_)(5,Ki,10,15,"ng-template",null,4,_)(7,Ui,8,3,"ng-template",null,5,_)(9,$i,4,0,"ng-template",null,6,_),r()),t&2){let e,n=c(2);l(2),s("value",(e=n.store.data())==null||e.data==null?null:e.data.revenue)}}function Xi(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 Ji(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;c(2);let n=ge(0),i=ge(1);l(2),b(e.code),l(2),s("routerLink",F(8,Ct,e.accountID)),l(),b(e.name),l(2),s("routerLink",L(10,St))("queryParams",je(11,vt,e.accountID,n,i)),l(),b(T(9,6,e.amount))}}function Qi(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),b(T(7,2,e.store.totalCOGS())),l(8),b(T(15,4,e.store.grossProfit()))}}function Zi(t,m){t&1&&(o(0,"tr")(1,"td",23)(2,"span"),a(3,"No COGS records available"),r()()())}function en(t,m){if(t&1&&(o(0,"h4",12),a(1,"COGS"),r(),o(2,"p-table",13),g(3,Xi,7,0,"ng-template",null,3,_)(5,Ji,10,15,"ng-template",null,4,_)(7,Qi,16,6,"ng-template",null,5,_)(9,Zi,4,0,"ng-template",null,6,_),r()),t&2){let e,n=c(2);l(2),s("value",(e=n.store.data())==null||e.data==null?null:e.data.cogs)}}function tn(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 nn(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;c(2);let n=ge(0),i=ge(1);l(2),b(e.code),l(2),s("routerLink",F(8,Ct,e.accountID)),l(),b(e.name),l(2),s("routerLink",L(10,St))("queryParams",je(11,vt,e.accountID,n,i)),l(),b(T(9,6,e.amount))}}function on(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),b(T(7,2,e.store.totalExpense())),l(8),b(T(15,4,e.store.profitOrLoss()))}}function rn(t,m){t&1&&(o(0,"tr")(1,"td",23)(2,"span"),a(3,"No expense records available"),r()()())}function an(t,m){if(t&1&&(o(0,"h4",12),a(1,"Expense"),r(),o(2,"p-table",13),g(3,tn,7,0,"ng-template",null,3,_)(5,nn,10,15,"ng-template",null,4,_)(7,on,16,6,"ng-template",null,5,_)(9,rn,4,0,"ng-template",null,6,_),r()),t&2){let e,n=c(2);l(2),s("value",(e=n.store.data())==null||e.data==null?null:e.data.expense)}}function ln(t,m){if(t&1&&(Mt(0)(1),o(2,"p-panel")(3,"div",11),g(4,Yi,11,1)(5,en,11,1)(6,an,11,1),r()()),t&2){let e,n,i,p,u,d=c();mt((e=d.store.filter())!=null&&e.from?d.store.filter().from:null),l(),mt((n=d.store.filter())!=null&&n.to?d.store.filter().to:null),l(3),V(d.Object.keys((i=d.store.data().data)!==null&&i!==void 0?i:L(5,bt)).length>0?4:-1),l(),V(d.Object.keys((p=(p=d.store.data().data)==null?null:p.cogs)!==null&&p!==void 0?p:L(6,bt)).length>0?5:-1),l(),V(d.Object.keys((u=(u=d.store.data().data)==null?null:u.expense)!==null&&u!==void 0?u:L(7,bt)).length>0?6:-1)}}function pn(t,m){if(t&1){let e=D();o(0,"form",25)(1,"div",26)(2,"label",27),a(3,"Tag"),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(i){h(e);let p=c();return x(p.onCashierSearch(i))})("onSelect",function(i){h(e);let p=c();return x(p.onCashierSelect(i))}),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 $t=(()=>{class t{constructor(){this.dayjsService=C(de),this.store=C(xt),this.fb=C(Ee),this.reportService=C(P),this.roleService=C(X),this.isInitDialogFilterVisible=y(!1),this.dialogFilterVisible=y(!1),this.cashierSuggestions=y([]),this.cashierHashMap=new Map,this.Object=Object,fe(()=>{this.store.filter()&&this.initForm()})}ngOnInit(){this.initForm()}onSearch(e){this.store.updateFilter(v(f({},this.store.filter()),{Text:e}))}onCashierSearch(e){this.reportService.getCashierSuggestions(e.query).pipe(Ne("Cashier Suggestions"),M(n=>this.cashierSuggestions.set(n))).subscribe()}initForm(){let e=this.store.filter();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(),n=Object.entries(e).reduce((i,[p,u])=>(p==="from"||p==="to"?u instanceof Date&&(i[p]=this.dayjsService.format(u)):i[p]=u||null,i),{});this.store.updateFilter(f(f({},this.store.filter()),n)),this.dialogFilterVisible.update(i=>!i),console.log("body",e)}onCashierSelect(e){console.log("Cashier selected:",e),!this.cashierHashMap.has(e.value.Key)&&(this.cashierHashMap.set(e.value.Key,e.value.Value),console.log("Cashier HashMap:",this.cashierHashMap))}onExport(){let e=v(f({},this.store.filter()),{export:!0,ExportPageNumber:1,ExportPageSize:1e4});this.reportService.getIncomeStatement(e,{responseType:"blob"}).pipe(Ne("Export Profit & Loss"),M(n=>{let i=n.type,p=[n],u=document.createElement("a");u.href=window.URL.createObjectURL(new Blob(p,{type:i}));let d=`profit-and-loss.${i.split("/")[1]}`;u.setAttribute("download",d),document.body.appendChild(u),u.click(),document.body.removeChild(u)})).subscribe()}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=N({type:t,selectors:[["app-report-income-statement"]],features:[Oe([xt])],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 Tag",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(n,i){if(n&1){let p=D();o(0,"app-main-panel",7),O("isDialogFilterVisibleChange",function(d){return h(p),A(i.dialogFilterVisible,d)||(i.dialogFilterVisible=d),x(d)})("isInitDialogFilterVisibleChange",function(d){return h(p),A(i.isInitDialogFilterVisible,d)||(i.isInitDialogFilterVisible=d),x(d)}),I("filterConfirmed",function(){return h(p),x(i.onFilterOK())}),g(1,Hi,2,1,"ng-template",null,0,_)(3,ln,7,8,"ng-template",null,1,_)(5,pn,15,12,"ng-template",null,2,_),r()}n&2&&(s("isFilterable",!0)("pageTitle",i.store.data().pageTitle),B("isDialogFilterVisible",i.dialogFilterVisible)("isInitDialogFilterVisible",i.isInitDialogFilterVisible),s("scrollable",!0))},dependencies:[ae,U,W,K,De,me,pe,ie,Z,J,Q,ee,te,_e,ue,le,ce,se,re,$e,Y,$,Fe,Re,oe,ne],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var yt=Tt(Ht());var mn={metadata:{options:{outlets:[]},filter:{to:"",outletID:[]},roles:{isInRoleEmptyOutlet:!1}},data:{asset:[],liability:[],equity:[],pageTitle:""},filter:{date:(0,yt.default)().format("YYYY-MM-DD"),listOutletParam:[]}},Et=Ye(Ze(mn),Xe(t=>({totalAsset:R(()=>t.data().asset.reduce((m,e)=>m+ +e.amount,0)),totalLiability:R(()=>t.data().liability.reduce((m,e)=>m+ +e.counterAmount,0)),totalEquity:R(()=>t.data().equity.reduce((m,e)=>m+ +e.counterAmount,0))})),Qe(t=>{let m=C(P),e={updateFilter:n=>{j(t,i=>v(f({},i),{filter:n}))},fetchBalanceSheet:we(be(Be(()=>{let n=t.filter();return Object.entries(n).every(([i,p])=>p!=null&&p!=="")}),Ce(n=>m.getBalanceSheet(n).pipe(Te({next:i=>{j(t,p=>v(f({},p),{data:i}))},error:i=>{console.error(i)}}))),Dt(1))),fetchLoader:we(be(Ce(()=>m.getBalanceSheetLoader().pipe(Te({next:n=>{j(t,i=>v(f({},i),{metadata:n,filter:{date:(0,yt.default)(n.filter.to).format("YYYY-MM-DD")}})),e.fetchBalanceSheet(t.filter)},error:n=>{console.error(n)}})))))};return e}),Je(t=>({onInit:()=>{t.fetchLoader()}})));var Yt=Tt(Ht());var It=t=>["/pages/chart-of-account/account/",t],wt=()=>["/pages/report/general-ledger"],sn=(t,m)=>({id:t,to:m}),Xt=t=>({id:t});function cn(t,m){if(t&1){let e=D();o(0,"p-button",11),I("onClick",function(){h(e);let i=c(2);return x(i.onExport())}),r()}}function dn(t,m){if(t&1&&(o(0,"div",9),g(1,cn,1,0,"p-button",10),r()),t&2){let e=c();l(),s("ngIf",e.roleService.permissions().global.export)}}function un(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 _n(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,n=c(3);l(2),b(e.code),l(2),s("routerLink",F(8,It,e.accountID)),l(),b(e.name),l(2),s("routerLink",L(10,wt))("queryParams",Vt(11,sn,e.accountID,n.store.filter().date)),l(),b(T(9,6,e.amount))}}function gn(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),E(" ",T(5,1,e.store.totalAsset())," ")}}function fn(t,m){t&1&&(o(0,"tr")(1,"td",23)(2,"span"),a(3,"No asset records found."),r()()())}function hn(t,m){if(t&1&&(o(0,"h4",14),a(1,"Asset"),r(),o(2,"p-table",15),g(3,un,7,0,"ng-template",null,3,_)(5,_n,10,14,"ng-template",null,4,_)(7,gn,6,3,"ng-template",null,5,_)(9,fn,4,0,"ng-template",null,6,_),r()),t&2){let e=c(2);l(2),s("value",e.store.data().asset)}}function xn(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 bn(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),b(e.code),l(2),s("routerLink",F(8,It,e.accountID)),l(),b(e.name),l(2),s("routerLink",L(10,wt))("queryParams",F(11,Xt,e.accountID)),l(),b(T(9,6,e.counterAmount))}}function Cn(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),E(" ",T(5,1,e.store.totalLiability())," ")}}function Sn(t,m){t&1&&(o(0,"tr")(1,"td",23)(2,"span"),a(3,"No liability records found."),r()()())}function vn(t,m){if(t&1&&(o(0,"h4",24),a(1,"Liability"),r(),o(2,"p-table",15),g(3,xn,7,0,"ng-template",null,3,_)(5,bn,10,13,"ng-template",null,4,_)(7,Cn,6,3,"ng-template",null,5,_)(9,Sn,4,0,"ng-template",null,6,_),r()),t&2){let e=c(2);l(2),s("value",e.store.data().liability)}}function yn(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 En(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),b(e.code),l(2),s("routerLink",F(8,It,e.accountID)),l(),b(e.name),l(2),s("routerLink",L(10,wt))("queryParams",F(11,Xt,e.accountID)),l(),b(T(9,6,e.counterAmount))}}function In(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),E(" ",T(5,2,e.store.totalEquity())," "),l(6),E(" ",T(11,4,e.store.totalLiability()+e.store.totalEquity())," ")}}function wn(t,m){t&1&&(o(0,"tr")(1,"td",23)(2,"span"),a(3,"No equity records found."),r()()())}function Tn(t,m){if(t&1&&(o(0,"h4",24),a(1,"Equity"),r(),o(2,"p-table",15),g(3,yn,7,0,"ng-template",null,3,_)(5,En,10,13,"ng-template",null,4,_),a(7," <"),g(8,In,12,6,"ng-template",null,5,_)(10,wn,4,0,"ng-template",null,6,_),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),g(2,hn,11,1)(3,vn,11,1)(4,Tn,12,1),r()()),t&2){let e=c();s("showHeader",!1),l(2),V(e.Object.keys(e.store.data().asset).length>0?2:-1),l(),V(e.Object.keys(e.store.data().liability).length>0?3:-1),l(),V(e.Object.keys(e.store.data().equity).length>0?4:-1)}}function Rn(t,m){if(t&1&&(o(0,"div",31)(1,"div"),a(2),r()()),t&2){let e=m.$implicit;l(2),b(e.value)}}function Fn(t,m){if(t&1&&(o(0,"form",26)(1,"div",27)(2,"label",28),a(3,"Tag"),r(),o(4,"p-multiselect",29),g(5,Rn,3,1,"ng-template",null,7,_),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 Jt=(()=>{class t{constructor(){this.store=C(Et),this.ReportServiceStore=C(P),this.dialogFilterVisible=y(!1),this.isInitDialogFilterVisible=y(!1),this.roleService=C(X),this.Object=Object}ngOnInit(){this.generateFilterForm()}generateFilterForm(){this.filterForm=new Gt({date:new st(new Date),outletID:new st([])})}onFilterOKEvent(){let{date:e,outletID:n}=this.filterForm.value;this.store.updateFilter({date:(0,Yt.default)(e).format("YYYY-MM-DD"),listOutletParam:n}),this.dialogFilterVisible.update(i=>!i)}onExport(){let e=v(f({},this.store.filter()),{export:!0,ExportPageNumber:1,ExportPageSize:1e4});this.ReportServiceStore.getBalanceSheet(e,{responseType:"blob"}).pipe(Ne("Export Balance Sheet"),M(n=>{let i=n.type,p=[n],u=document.createElement("a");u.href=window.URL.createObjectURL(new Blob(p,{type:i}));let d=`balance-sheet.${i.split("/")[1]}`;u.setAttribute("download",d),document.body.appendChild(u),u.click(),document.body.removeChild(u)})).subscribe()}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=N({type:t,selectors:[["app-report-balance-sheet"]],features:[Oe([Et])],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","12rem"],["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 an Tag",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(n,i){if(n&1){let p=D();o(0,"app-main-panel",8),O("isDialogFilterVisibleChange",function(d){return h(p),A(i.dialogFilterVisible,d)||(i.dialogFilterVisible=d),x(d)})("isInitDialogFilterVisibleChange",function(d){return h(p),A(i.isInitDialogFilterVisible,d)||(i.isInitDialogFilterVisible=d),x(d)}),I("filterConfirmed",function(){return h(p),x(i.onFilterOKEvent())}),g(1,dn,2,1,"ng-template",null,0,_)(3,Dn,5,4,"ng-template",null,1,_)(5,Fn,11,7,"ng-template",null,2,_),r()}n&2&&(s("pageTitle",i.store.data().pageTitle)("isFilterable",!0),B("isDialogFilterVisible",i.dialogFilterVisible)("isInitDialogFilterVisible",i.isInitDialogFilterVisible),s("scrollable",!0))},dependencies:[ae,U,W,K,ce,se,le,oe,ne,ie,Z,J,Q,ee,te,_e,ue,me,pe,Ie,re,$e,Y,$],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var Qt=(()=>{class t{static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=N({type:t,selectors:[["app-report-comparative-balance"]],decls:3,vars:0,template:function(n,i){n&1&&(o(0,"p"),a(1,"report-comparative-balance works!"),r(),a(2,`
|
|
2
|
+
,
|
|
3
|
+
`))},styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var Zt=(()=>{class t{static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=N({type:t,selectors:[["app-report-cash-flow"]],decls:3,vars:0,template:function(n,i){n&1&&(o(0,"p"),a(1,"report-cash-flow works!"),r(),a(2,`
|
|
4
|
+
,
|
|
5
|
+
`))},styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var ei=(()=>{class t{static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=N({type:t,selectors:[["app-report-trial-balance"]],decls:3,vars:0,template:function(n,i){n&1&&(o(0,"p"),a(1,"report-trial-balance works!"),r(),a(2,`
|
|
6
|
+
,
|
|
7
|
+
`))},styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var Ln=()=>({width:"30vw"}),Mn=()=>({"1199px":"75vw","575px":"90vw"}),Vn=t=>["/pages/journal/journal-entry/",t],ti=t=>({"text-success":t}),kn=t=>({"text-danger":t}),Nn=t=>({"ng-dirty ng-invalid":t}),An=()=>({scrollHeight:"250px"});function Bn(t,m){if(t&1){let e=D();o(0,"p-button",27),I("onClick",function(){h(e);let i=c(2);return x(i.onToggleExportDialog())}),r()}}function Pn(t,m){if(t&1&&(o(0,"div",24)(1,"a",25),a(2,"Return to Accounts"),r(),g(3,Bn,1,0,"p-button",26),r()),t&2){let e=c();l(3),s("ngIf",e.roleService.permissions().global.export)}}function Gn(t,m){if(t&1&&(o(0,"div",24)(1,"span",31)(2,"h2",32),a(3),r()(),o(4,"span",31)(5,"h2",32),a(6),r()()()),t&2){let e=c().$implicit;l(3),b(e.name),l(3),E(" (",e.chartOfAccountCode,") ")}}function On(t,m){t&1&&(o(0,"tr")(1,"th"),a(2,"No."),r(),o(3,"th"),a(4,"Date"),r(),o(5,"th"),a(6,"Contact / Note"),r(),o(7,"th",33),a(8,"Debit"),r(),o(9,"th",33),a(10,"Credit"),r(),o(11,"th",33),a(12,"Balance"),r()())}function jn(t,m){if(t&1&&(o(0,"div")(1,"span",42),a(2),r()()),t&2){let e=c().$implicit;l(2),E(" ",e.outletName," ")}}function zn(t,m){if(t&1&&(o(0,"div",38),w(1,"div",43),o(2,"span",44),a(3),r()()),t&2){let e=c().$implicit;l(),s("innerHTML",e.journalNote,z),l(2),E("",e.note," ")}}function qn(t,m){if(t&1&&(o(0,"div",38),w(1,"span",43)(2,"div",43),o(3,"span",44),a(4),r()()),t&2){let e=c().$implicit;l(),s("innerHTML",e.referenceText,z),l(),s("innerHTML",e.journalNote,z),l(2),E("",e.note," ")}}function Hn(t,m){if(t&1&&(q(0),a(1),S(2,"number"),H()),t&2){let e=c().$implicit;l(),E(" ",G(2,1,e.debitAmount,"1.0-2")," ")}}function Wn(t,m){if(t&1&&(q(0),a(1),S(2,"number"),H()),t&2){let e=c().$implicit;l(),E(" ",G(2,1,e.creditAmount,"1.0-2")," ")}}function Kn(t,m){if(t&1&&(q(0),a(1),S(2,"number"),H()),t&2){let e=c().$implicit;l(),E(" ",G(2,1,e.balance,"1.0-2")," ")}}function Un(t,m){if(t&1&&(o(0,"tr")(1,"td",34),g(2,jn,3,1,"div",35),o(3,"a",36),a(4),r()(),o(5,"td",34),a(6),S(7,"date"),r(),o(8,"td",37)(9,"div",38)(10,"a",39),a(11),r(),g(12,zn,4,2,"div",38)(13,qn,5,3,"div",38),r()(),o(14,"td",40),g(15,Hn,3,4,"ng-container",35),r(),o(16,"td",40),g(17,Wn,3,4,"ng-container",35),r(),o(18,"td",41),g(19,Kn,3,4,"ng-container",35),r()()),t&2){let e=m.$implicit,n=c(4);l(2),s("ngIf",e.outletName==null?null:e.outletName.trim()),l(),s("routerLink",F(16,Vn,e.id)),l(),b(e.number),l(2),E(" ",G(7,13,e.date,"dd MMM yyyy")," "),l(2),s("ngClass",F(18,ti,e.debitAmount!==0)),l(2),s("href",n.authService.getTenantExternalURL()+"/menu/Contacts/Contact/Customers/Info?ID="+e.contactID,Pe),l(),b(e.contactName),l(),V(n.buildReferenceUrl(e)?12:13),l(2),s("ngClass",F(20,ti,e.debitAmount!==0)),l(),s("ngIf",e.debitAmount!==0),l(),s("ngClass",F(22,kn,e.creditAmount!==0)),l(),s("ngIf",e.creditAmount!==0),l(2),s("ngIf",e.balance!==0)}}function $n(t,m){if(t&1&&(o(0,"tr"),w(1,"td",45),o(2,"td",46),a(3,"Total"),r(),o(4,"td",47),a(5),S(6,"number"),r(),o(7,"td",48),a(8),S(9,"number"),r(),w(10,"td"),r()),t&2){let e=c().$index,n=c(3);l(5),E(" ",T(6,2,n.items().data[e].debitTotal)," "),l(3),E(" ",T(9,4,n.items().data[e].creditTotal)," ")}}function Yn(t,m){t&1&&(o(0,"tr")(1,"td",49)(2,"span"),a(3,"No records found."),r()()())}function Xn(t,m){if(t&1&&(o(0,"p-table",30),g(1,Gn,7,2,"ng-template",null,5,_)(3,On,13,0,"ng-template",null,6,_)(5,Un,20,24,"ng-template",null,7,_)(7,$n,11,6,"ng-template",null,4,_)(9,Yn,4,0,"ng-template",null,8,_),r()),t&2){let e=m.$implicit;s("value",e.data)}}function Jn(t,m){if(t&1&&(o(0,"div",29),Me(1,Xn,11,1,"p-table",30,Le),r()),t&2){let e=c(2);l(),Ve(e.items().data)}}function Qn(t,m){if(t&1&&g(0,Jn,3,0,"div",28),t&2){let e=c();s("ngIf",e.items()&&e.items().data)}}function Zn(t,m){if(t&1&&(o(0,"div",24)(1,"div",31)(2,"span",65),a(3),r()(),o(4,"div")(5,"span"),a(6,"-"),r()(),o(7,"div",31)(8,"span",66),a(9),r()()()),t&2){let e=m.$implicit;l(3),E("(",e.code,")"),l(6),b(e.name)}}function eo(t,m){if(t&1&&(o(0,"div",24)(1,"div",31)(2,"span",65),a(3),r()(),o(4,"div")(5,"span"),a(6,"-"),r()(),o(7,"div",31)(8,"span",66),a(9),r()()()),t&2){let e=m.$implicit;l(3),E("(",e.code,")"),l(6),b(e.name)}}function to(t,m){t&1&&(o(0,"div",67),a(1," Account is required. "),r())}function io(t,m){if(t&1&&(o(0,"div",68)(1,"div"),a(2),r()()),t&2){let e=m.$implicit;l(2),b(e.value)}}function no(t,m){if(t&1&&(o(0,"div",59)(1,"div",21),w(2,"p-radiobutton",69),o(3,"label",70),a(4),r()()()),t&2){let e=m.$implicit;l(2),s("value",e.key)("inputId",e.key),l(),Lt("for",e.key),l(),b(e.value)}}function oo(t,m){if(t&1){let e=D();o(0,"div",38)(1,"label",51),a(2,"Customer"),r(),o(3,"p-autocomplete",71),I("completeMethod",function(i){h(e);let p=c(2);return x(p.searchCustomer(i))}),r()()}if(t&2){let e=c(2);l(3),s("suggestions",e.customerSuggestions())}}function ro(t,m){if(t&1){let e=D();o(0,"div",38)(1,"label",51),a(2,"Supplier"),r(),o(3,"p-autocomplete",72),I("completeMethod",function(i){h(e);let p=c(2);return x(p.searchSupplier(i))}),r()()}if(t&2){let e=c(2);l(3),s("suggestions",e.supplierSuggestions())}}function ao(t,m){if(t&1){let e=D();o(0,"div",38)(1,"label",51),a(2,"Customer"),r(),o(3,"p-autocomplete",71),I("completeMethod",function(i){h(e);let p=c(2);return x(p.searchCustomer(i))}),r()()}if(t&2){let e=c(2);l(3),s("suggestions",e.customerSuggestions())}}function lo(t,m){if(t&1){let e=D();o(0,"form",50)(1,"div",38)(2,"label",51),a(3,"Accounts"),r(),o(4,"p-multiselect",52),I("onChange",function(i){h(e);let p=c();return x(p.onAccountChange(i))}),g(5,Zn,10,2,"ng-template",null,9,_)(7,eo,10,2,"ng-template",null,10,_),r(),g(9,to,2,0,"div",53),r(),o(10,"div",38)(11,"label",51),a(12,"From"),r(),o(13,"div",54),w(14,"p-datepicker",55)(15,"p-datepicker",56),r()(),o(16,"div",38)(17,"label",51),a(18,"Tag"),r(),o(19,"p-multiselect",57),g(20,io,3,1,"ng-template",null,10,_),r()(),o(22,"div",38)(23,"label",51),a(24,"Category"),r(),o(25,"p-treeselect",58),I("onFocus",function(){h(e);let i=c();return x(i.onCategoryFocus())}),r()(),o(26,"div",38)(27,"label",18),a(28,"Contact Type"),r(),o(29,"div",16),Me(30,no,5,4,"div",59,Le),r()(),o(32,"div",38)(33,"label",18),a(34,"Sort order"),r(),o(35,"div",16)(36,"div",59)(37,"div",21),w(38,"p-radiobutton",60),o(39,"label",61),a(40,"Asc"),r()()(),o(41,"div",62)(42,"div",21),w(43,"p-radiobutton",63),o(44,"label",64),a(45,"Desc"),r()()()()(),g(46,oo,4,1,"div",38)(47,ro,4,1,"div",38)(48,ao,4,1,"div",38),r()}if(t&2){let e,n,i,p,u,d,k=c();s("formGroup",k.form),l(4),s("virtualScroll",!0)("virtualScrollItemSize",50)("options",(e=k.loaderMetadata())==null||e.options==null?null:e.options.accounts)("selectionLimit",5)("ngClass",F(21,Nn,((n=k.form.get("listAccountID"))==null?null:n.invalid)&&(((n=k.form.get("listAccountID"))==null?null:n.touched)||((n=k.form.get("listAccountID"))==null?null:n.dirty)))),l(5),s("ngIf",((i=k.form.get("listAccountID"))==null?null:i.invalid)&&(((i=k.form.get("listAccountID"))==null?null:i.touched)||((i=k.form.get("listAccountID"))==null?null:i.dirty))),l(5),s("showIcon",!0),l(),s("iconDisplay","input")("showIcon",!0),l(4),s("virtualScroll",!0)("virtualScrollItemSize",50)("options",(p=k.loaderMetadata())==null||p.options==null?null:p.options.outlets),l(6),s("metaKeySelection",!1)("virtualScroll",!0)("virtualScrollItemSize",50)("virtualScrollOptions",L(23,An))("options",k.categoriesOptions()),l(5),Ve((u=k.loaderMetadata())==null||u.options==null?null:u.options.contactTypeOptions),l(8),s("value",!0),l(5),s("value",!1),l(3),V((d=k.form.controls.contactType.value)===1?46:d===2?47:48)}}function po(t,m){if(t&1){let e=D();o(0,"p-button",73),I("onClick",function(){h(e);let i=c();return x(i.onToggleExportDialog())}),r()}t&2&&s("rounded",!0)("text",!0)}function mo(t,m){if(t&1){let e=D();o(0,"p-button",74),I("click",function(){h(e);let i=c();return x(i.onToggleExportDialog())}),r(),o(1,"p-button",75),I("click",function(){h(e);let i=c();return x(i.onExport())}),r()}}var ii=(()=>{class t{buildReferenceUrl(e){return pt(e)}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(P),this.route=C(He),this.roleService=C(X),this.authService=C(ve),this.fb=C(Ee),this.coaService=C(ot),this.toastr=C(We),this.dayjsService=C(de),this.infinity=1/0,this.metadata=y(null),this.items=y(null),this.totalRecords=y(-1),this.dialogFilterVisible=y(!0),this.initDialogVisible=y(!1),this.isDialogExportVisible=y(!1),this.customerSuggestions=y([]),this.supplierSuggestions=y([]),this.categoriesOptions=y([]),this.localFilter=y({}),this.count=R(()=>this.totalRecords()<0?1/0:this.totalRecords()),this.pagination=R(()=>{let e=this.filter(),n=this.totalRecords()!=null&&this.totalRecords()>=0?this.totalRecords():1/0,i=Math.min(e.pageNumber*e.pageSize,isFinite(n)?n:e.pageNumber*e.pageSize);return{first:1,end:e.pageSize>0?i:0,total:n,page:e.pageNumber,pageSize:e.pageSize,hasPrev:e.pageNumber>1,hasNext:isFinite(n)?e.pageNumber*e.pageSize<n:!0}}),this.loaderMetadata=ye(this.reportService.fetchGeneralLedgerLoader("multiple"),{initialValue:null}),this.baseFilter=R(()=>{let e=this.loaderMetadata();return e?e.filter:null}),this.exportFileTypes=y([{key:0,value:"CSV"},{key:1,value:"Excel"}]),this.queryFilter=ye(this.route.queryParamMap.pipe(Ae(e=>({accountID:e.get("id"),to:e.get("to")}))),{initialValue:null}),this.filter=R(()=>{let e=this.baseFilter(),n=this.queryFilter(),i=this.localFilter();return e?f(f(f({},e),n??{}),i):null}),this.creditSubTotal=R(()=>0),this.debitSubTotal=R(()=>0),this.initializeForm(),fe(()=>{let e=this.filter();if(e){this.form.patchValue(this.transformFilterToFormValue(e),{emitEvent:!1});let n=Array.isArray(e.listAccountID)?e.listAccountID:[],i=Array.isArray(e.listCategoryID)?e.listCategoryID:[];(n.length>0||i.length>0)&&this.reportService.fetchGeneralLedgerReport(e,"multiple").pipe().subscribe(p=>{this.items.set(p)})}})}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),listCategoryID:this.fb.control([]),listAccountID:this.fb.control([]),export:this.fb.control(!1),exportPageNumber:this.fb.control(1),exportPageSize:this.fb.control(0)})}findNodeByKey(e,n){for(let i of e){if(i.key===n)return i;if(i.children){let p=this.findNodeByKey(i.children,n);if(p)return p}}return null}transformFilterToFormValue(e){return Object.entries(e).reduce((n,[i,p])=>{switch(i){case"from":break;case"to":n[i]=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)?n[i]=p.map(u=>this.findNodeByKey(this.categoriesOptions(),u)).filter(u=>!!u):n[i]=[];break;case"listOutletID":case"listAccountID":n[i]=Array.isArray(p)?p:[];break;case"pageNumber":case"pageSize":case"exportPageNumber":case"exportPageSize":n[i]=p!=null?Number(p):0;break;case"sortAscending":case"export":n[i]=!!p;break;case"contactType":console.log("contactType value:",p),n[i]=p!=null?Number(p):null;break;default:n[i]=p}return n},{})}clearContactValueOnContactTypeChange(){this.form.get("contactType")?.valueChanges.subscribe(()=>this.form.get("contactID")?.setValue(""))}onFormValueChange(){let e=this.form.controls.listAccountID.value,n=this.form.controls.listCategoryID.value;e.length<=0&&n.length<=0?(this.form.controls.listAccountID.enable({emitEvent:!1}),this.form.controls.listCategoryID.enable({emitEvent:!1})):e.length>0?(this.form.controls.listAccountID.enable({emitEvent:!1}),this.form.controls.listCategoryID.disable({emitEvent:!1})):n.length>0&&(this.form.controls.listAccountID.disable({emitEvent:!1}),this.form.controls.listCategoryID.enable({emitEvent:!1}))}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(n=>this.customerSuggestions.set(n))).subscribe()}searchSupplier(e){this.reportService.getSupplierSuggestions(e.query).pipe(M(n=>this.supplierSuggestions.set(n))).subscribe()}onAccountChange(e){Array.isArray(e.value)&&e.value.length>5&&this.toastr.warning("Please select at most 5 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.value,{from:e,to:n}=p,i=xe(p,["from","to"]);return v(f({},this.filter()),{pageNumber:i.pageNumber,pageSize:i.pageSize,sortAscending:i.sortAscending,accountID:i.accountID,listCategoryID:i.listCategoryID?.map(u=>u.key)??[],contactID:i.contactID?.length===0?null:i.contactID,listOutletID:i.listOutletID??[],listAccountID:i.listAccountID??[],from:this.dayjsService.from(e)?this.dayjsService.format(e):null,to:this.dayjsService.from(n)?this.dayjsService.format(n):null,contactType:i.contactType})}onExport(){let e=this.buildExportBody();this.performExport(e)}performExport(e){this.reportService.exportMultiLedger(e,{responseType:"blob",observe:"response"}).pipe(M(n=>this.handleExportResponse(n))).subscribe()}handleExportResponse(e){let n=e.headers,i=n.get("Content-Disposition")??n.get("content-disposition"),p="download.csv";if(i){let d=i.match(/filename\*?=(?:UTF-8'')?"?([^;\r\n"]+)/i);d?.[1]&&(p=decodeURIComponent(d[1].replace(/"/g,"")))}let u=e.body;lt(u,p,u.type)}buildExportBody(){let p=this.form.value,{from:e,to:n}=p,i=xe(p,["from","to"]);return v(f({},this.filter()),{exportPageNumber:+i.exportPageNumber,pageNumber:i.pageNumber,pageSize:i.pageSize,sortAscending:i.sortAscending,accountID:i.accountID,listCategoryID:i.listCategoryID?.map(u=>u.key)??[],contactID:i.contactID?.length===0?null:i.contactID,listOutletID:i.listOutletID??[],listAccountID:i.listAccountID??[],from:this.dayjsService.from(e)?this.dayjsService.format(e):null,to:this.dayjsService.from(n)?this.dayjsService.format(n):null,contactType:i.contactType,export:!0})}onNextPage(){this.localFilter.update(e=>{let n=e.pageNumber??this.baseFilter()?.pageNumber??1;return v(f({},e),{pageNumber:n+1})})}onPrevPage(){this.localFilter.update(e=>{let n=e.pageNumber??this.baseFilter()?.pageNumber??1;return v(f({},e),{pageNumber:Math.max(1,n-1)})})}goToPage(e){this.localFilter.update(n=>v(f({},n),{pageNumber:e}))}goToLastPage(){let e=this.filter();if(!e)return;let n=this.totalRecords();if(n===-1||!isFinite(n)){this.toastr.info("Please load total records before going to the last page","Info");return}let i=Math.ceil(n/e.pageSize);if(e.pageNumber>=i){this.toastr.warning("You are already on the last page","Warning");return}this.localFilter.update(p=>v(f({},p),{pageNumber:i}))}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=N({type:t,selectors:[["app-report-multiple-ledger"]],decls:28,vars:19,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"],[1,"d-flex","flex-column","gap-3"],[1,"row",3,"formGroup"],[1,"col-8"],[1,"row"],[1,"col"],["for",""],["type","text","formControlName","exportPageNumber","fluid","","pInputText","","pSize","small"],["role","alert",1,"alert","alert-primary","m-0","p-2"],[1,"d-flex","align-items-center","gap-2"],[1,"fa-solid","fa-circle-info"],[1,"fs-2","text-dark","fw-semibold"],[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,""],[1,"fs-5","fw-semibold"],[1,"text-end"],[1,"text-break"],[4,"ngIf"],["target","_blank",1,"link","link-primary",3,"routerLink"],[1,"text-break",3,"ngClass"],[1,"d-flex","flex-column"],["target","_blank",1,"link","link-primary",3,"href"],[1,"text-end","text-break",3,"ngClass"],[1,"text-end","text-break"],[1,"badge","bg-light","text-dark"],[3,"innerHTML"],[2,"width","300px","white-space","normal","word-break","break-word"],["colspan","2"],[1,"text-end","fw-semibold"],[1,"text-end","fw-semibold","text-success"],[1,"text-end","fw-semibold","text-danger"],["colspan","8"],[1,"d-flex","flex-column","row-gap-3",3,"formGroup"],["for","outlet"],["showClear","","filter","","filterBy","code,name","display","chip","formControlName","listAccountID","appendTo","body","optionLabel","name","optionValue","id","placeholder","Select Accounts",3,"onChange","virtualScroll","virtualScrollItemSize","options","selectionLimit","ngClass"],["class","text-danger",4,"ngIf"],[1,"d-flex","flex-column","gap-2"],["showClear","","formControlName","from","styleClass","w-100","appendTo","body","iconDisplay","input","inputId","icondisplay",3,"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 an Tag",3,"virtualScroll","virtualScrollItemSize","options"],["showClear","","display","chip","selectionMode","multiple","filter","","filterBy","label","formControlName","listCategoryID","appendTo","body","containerStyleClass","w-100","optionLabel","label","optionValue","key","placeholder","Select Category",3,"onFocus","metaKeySelection","virtualScroll","virtualScrollItemSize","virtualScrollOptions","options"],[1,"col-4"],["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"],["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(n,i){if(n&1){let p=D();o(0,"app-main-panel",11),O("isDialogFilterVisibleChange",function(d){return h(p),A(i.dialogFilterVisible,d)||(i.dialogFilterVisible=d),x(d)})("isInitDialogFilterVisibleChange",function(d){return h(p),A(i.initDialogVisible,d)||(i.initDialogVisible=d),x(d)}),I("filterConfirmed",function(){return h(p),x(i.onFilterOKEvent())}),g(1,Pn,4,1,"ng-template",null,0,_)(3,Qn,1,1,"ng-template",null,1,_)(5,lo,49,24,"ng-template",null,2,_),r(),o(7,"p-dialog",12),O("visibleChange",function(d){return h(p),A(i.isDialogExportVisible,d)||(i.isDialogExportVisible=d),x(d)}),o(8,"div",13)(9,"div",14)(10,"div",15)(11,"div",16)(12,"div",17)(13,"label",18),a(14,"Page"),r()(),o(15,"div",17),w(16,"input",19),r()()()(),o(17,"div",20)(18,"div",21),w(19,"i",22),o(20,"span",23),a(21),S(22,"number"),S(23,"number"),r()()()(),g(24,po,1,2,"ng-template",null,3,_)(26,mo,2,0,"ng-template",null,4,_),r()}if(n&2){let p;s("pageTitle",i.pageTitle),B("isDialogFilterVisible",i.dialogFilterVisible),s("isFilterable",!0),B("isInitDialogFilterVisible",i.initDialogVisible),s("scrollable",!0),l(7),Ge(L(17,Ln)),s("modal",!0),B("visible",i.isDialogExportVisible),s("breakpoints",L(18,Mn)),l(2),s("formGroup",i.form),l(12),ke("Exporting data from ",T(22,13,(p=i.filter())==null?null:p.exportPageNumber)," - ",T(23,15,(p=i.filter())==null?null:p.exportPageSize),"")}},dependencies:[ae,U,ze,W,K,qe,le,ce,se,tt,et,oe,ne,De,me,pe,Fe,Re,ie,Z,Bt,J,Q,ee,te,_e,ue,Ie,Ue,at,Wt,rt,re,Y,$,nt,it,Ke,Ot],styles:["[_nghost-%COMP%] .p-datatable .p-datatable-header{padding:.75rem 1rem .75rem 0}[_nghost-%COMP%] th:nth-child(1){width:10%}[_nghost-%COMP%] th:nth-child(2){width:15%}[_nghost-%COMP%] th:nth-child(3){width:40%}[_nghost-%COMP%] th:nth-child(4){width:15%}[_nghost-%COMP%] th:nth-child(5){width:15%}[_nghost-%COMP%] th:nth-child(6){width:15%}"],changeDetection:0})}}return t})();var tl=[{path:"",redirectTo:"general-ledger",pathMatch:"full"},{path:"",children:[{path:"general-ledger",component:Ut},{path:"multiple-general-ledger",component:ii},{path:"profit-loss",component:$t},{path:"balance-sheet",component:Jt},{path:"comparative-balance",component:Qt},{path:"trial-balance",component:ei},{path:"cash-flow",component:Zt}]}];export{tl as REPORTS_ROUTES};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b as E}from"./chunk-LBXNL7E4.js";import{b as w}from"./chunk-5U7KZJ3H.js";import{a as T,b as j}from"./chunk-FHJOSHI3.js";import{b as P}from"./chunk-ISIYG4D5.js";import{x as b}from"./chunk-O44DI62I.js";import{a as y}from"./chunk-TOR7QRRB.js";import{d as _}from"./chunk-KL3TPLRB.js";import{s as O,u as A}from"./chunk-DM2JLWKE.js";import{Ea as c,Eb as C,Oc as M,Qc as S,Sc as a,Wb as i,Xb as r,Yb as x,ca as s,gc as m,ia as g,ib as u,sc as p,tc as v,uc as l,yb as h}from"./chunk-6QJHEOXN.js";var N=(()=>{class t{constructor(){this.httpService=g(y),this.dayjs=g(E)}migrateTaxAccount(){return this.httpService.post(void 0,"api/Migrate/accounting/tax",{})}getManualJournalCount(){return this.httpService.get(void 0,"api/migrate/accounting/journalheader-count",{})}getCOACount(){return this.httpService.get(void 0,"api/migrate/accounting/chartOfAccountcount",{})}getCOAConfigurationCount(){return this.httpService.get(void 0,"api/migrate/accounting/chartOfAccountConfigcount",{})}getCOACategoryCount(){return this.httpService.get(void 0,"api/migrate/accounting/chartOfAccountCategorycount",{})}getOutletAccountCount(){return this.httpService.get(void 0,"api/migrate/accounting/outletaccount-count",{})}getPaymentMethodAccountCount(){return this.httpService.get(void 0,"api/migrate/accounting/paymentmethodaccountcount",{})}getWriteOffOutletAccountCount(){return this.httpService.get(void 0,"api/migrate/accounting/writeoffoutletaccountCount",{})}getTaxAccountCount(){return this.httpService.get(void 0,"api/migrate/accounting/taxcount",{})}getExpenseAccountCount(){return this.httpService.get(void 0,"api/migrate/accounting/expenseaccountcount",{})}migrateCoaAccount(){return this.httpService.post(void 0,"api/Migrate/accounting/chartOfAccount",{})}migrateCoaConfig(){return this.httpService.post(void 0,"api/Migrate/accounting/chartOfAccountConfig",{})}migrateCoaCategory(){return this.httpService.post(void 0,"api/Migrate/accounting/chartOfAccountCategory",{})}migrateOutletAccount(){return this.httpService.post(void 0,"api/Migrate/accounting/outletaccount",{})}migrateManualJournal(e){let n={From:e.From?this.dayjs.from(e.From).format():null,To:e.To?this.dayjs.from(e.To).format():null,PageNumber:e.PageNumber||1,PageSize:e.PageSize||50},o=new _;return Object.keys(n).forEach(f=>{o=o.append(f,n[f])}),this.httpService.get(void 0,"api/migrate/accounting/journalheader",{params:o})}formatManualCOA(){return this.httpService.delete(void 0,"api/Migrate/accounting/truncate-coa",{})}formatExpenseAccount(){return this.httpService.delete(void 0,"api/Migrate/accounting/truncate-expenseaccount",{})}formatWriteOff(){return this.httpService.delete(void 0,"api/Migrate/accounting/truncate-writeoff",{})}formatManualCOAConfig(){return this.httpService.delete(void 0,"api/Migrate/accounting/truncate-coa-config",{})}formatOutletAccount(){return this.httpService.delete(void 0,"api/migrate/accounting/truncate-outlet-account",{})}formatPaymentAccount(){return this.httpService.delete(void 0,"api/migrate/accounting/truncate-paymentmethod",{})}formatTaxAccount(){return this.httpService.delete(void 0,"api/migrate/accounting/truncate-tax",{})}formatManualJournal(){return this.httpService.delete(void 0,"api/Migrate/accounting/truncate-journal",{})}formatManualCOACategory(){return this.httpService.delete(void 0,"api/migrate/accounting/truncate-coag",{})}migratePaymentMethod(){return this.httpService.post(void 0,"api/Migrate/accounting/paymentmethodaccount",{})}migrateWriteOffOutlet(){return this.httpService.post(void 0,"api/Migrate/accounting/writeoffoutletaccount",{})}migrateExpenseAccount(){return this.httpService.post(void 0,"api/Migrate/accounting/expenseaccount",{})}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275prov=s({token:t,factory:t.\u0275fac})}}return t})();function F(t,d){t&1&&(i(0,"div",5)(1,"div",6),x(2,"i",7),r()())}function I(t,d){if(t&1&&(i(0,"div",8),p(1),M(2,"number"),r()),t&2){let e=m();u(),l(" ",S(2,1,e.migrationCount(),"1.0-0")," ")}}function D(t,d){if(t&1&&(i(0,"div",9),p(1),r()),t&2){let e=m();u(),l(" ",e.migrationTitle()," ")}}function R(t,d){if(t&1&&(i(0,"div",10)(1,"div",11),p(2),r()()),t&2){let e=m();u(2),v(e.migrationPlace())}}var q=(()=>{class t{constructor(){this.migrationTitle=c(),this.migrationCount=c(),this.migrationPlace=c()}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=h({type:t,selectors:[["app-migration-cards"]],inputs:{migrationTitle:[1,"migrationTitle"],migrationCount:[1,"migrationCount"],migrationPlace:[1,"migrationPlace"]},decls:9,vars:0,consts:[["header",""],["title",""],["subtitle",""],["footer",""],[1,"text-center","flex","flex-column","justify-content-center","align-items-center","card-shadow","responsive-card"],[1,"d-flex","justify-content-center"],[1,"d-flex","justify-content-center","align-items-center","mt-4",2,"width","60px","height","60px","background-color","#e0f0ff","border-radius","50%"],[1,"icon","fa-file-lines","fa-light",2,"font-size","25px","color","#007bff"],[1,"bigscale","fw-bold"],[1,"text-sm","text-secondary"],[1,"flex","mt-5"],[1,"p-6","fs-7","fw-bold"]],template:function(n,o){n&1&&(i(0,"p-card",4),C(1,F,3,0,"ng-template",null,0,a)(3,I,3,4,"ng-template",null,1,a)(5,D,2,1,"ng-template",null,2,a)(7,R,3,1,"ng-template",null,3,a),r())},dependencies:[A,O,j,T,b,w,P],styles:["[_nghost-%COMP%] .p-card .p-card-title .bigscale{font-size:3rem!important;margin-top:2rem!important}[_nghost-%COMP%] .p-card{box-shadow:0 .25rem 1.25rem #0000001a!important;width:21.875rem!important;height:25rem!important}@media (max-width: 85rem){[_nghost-%COMP%] .p-card{width:18.875rem!important;height:21rem!important}[_nghost-%COMP%] .p-card .p-card-title .bigscale{font-size:2rem!important;margin-top:1rem!important}}@media (min-width: 85.001rem) and (max-width: 97.999rem){[_nghost-%COMP%] .p-card{width:21rem!important;height:25rem!important}[_nghost-%COMP%] .p-card .p-card-title .bigscale{font-size:3rem!important;margin-top:2rem!important}}@media (min-width: 98rem){[_nghost-%COMP%] .p-card{width:25rem!important;height:28rem!important}[_nghost-%COMP%] .p-card .p-card-title .bigscale{font-size:5rem!important;margin-top:2rem!important}}"]})}}return t})();export{N as a,q as b};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as p}from"./chunk-
|
|
1
|
+
import{h as p}from"./chunk-O44DI62I.js";import{Cb as s,Lb as l,Qb as C,Wb as m,Xb as c,Yb as d,sa as a,ua as o,yb as r}from"./chunk-6QJHEOXN.js";var L=(()=>{class t extends p{static \u0275fac=(()=>{let i;return function(e){return(i||(i=o(t)))(e||t)}})();static \u0275cmp=r({type:t,selectors:[["TimesIcon"]],features:[s],decls:2,vars:5,consts:[["width","14","height","14","viewBox","0 0 14 14","fill","none","xmlns","http://www.w3.org/2000/svg"],["d","M8.01186 7.00933L12.27 2.75116C12.341 2.68501 12.398 2.60524 12.4375 2.51661C12.4769 2.42798 12.4982 2.3323 12.4999 2.23529C12.5016 2.13827 12.4838 2.0419 12.4474 1.95194C12.4111 1.86197 12.357 1.78024 12.2884 1.71163C12.2198 1.64302 12.138 1.58893 12.0481 1.55259C11.9581 1.51625 11.8617 1.4984 11.7647 1.50011C11.6677 1.50182 11.572 1.52306 11.4834 1.56255C11.3948 1.60204 11.315 1.65898 11.2488 1.72997L6.99067 5.98814L2.7325 1.72997C2.59553 1.60234 2.41437 1.53286 2.22718 1.53616C2.03999 1.53946 1.8614 1.61529 1.72901 1.74767C1.59663 1.88006 1.5208 2.05865 1.5175 2.24584C1.5142 2.43303 1.58368 2.61419 1.71131 2.75116L5.96948 7.00933L1.71131 11.2675C1.576 11.403 1.5 11.5866 1.5 11.7781C1.5 11.9696 1.576 12.1532 1.71131 12.2887C1.84679 12.424 2.03043 12.5 2.2219 12.5C2.41338 12.5 2.59702 12.424 2.7325 12.2887L6.99067 8.03052L11.2488 12.2887C11.3843 12.424 11.568 12.5 11.7594 12.5C11.9509 12.5 12.1346 12.424 12.27 12.2887C12.4053 12.1532 12.4813 11.9696 12.4813 11.7781C12.4813 11.5866 12.4053 11.403 12.27 11.2675L8.01186 7.00933Z","fill","currentColor"]],template:function(n,e){n&1&&(a(),m(0,"svg",0),d(1,"path",1),c()),n&2&&(C(e.getClassNames()),l("aria-label",e.ariaLabel)("aria-hidden",e.ariaHidden)("role",e.role))},encapsulation:2})}return t})();export{L as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{m as p}from"./chunk-Q4XWXOWE.js";import"./chunk-WL6ZZCYW.js";import{i as d}from"./chunk-J3HFAWXU.js";import"./chunk-VM56C6ZV.js";import"./chunk-FNGX2XFA.js";import"./chunk-BFEM6LX7.js";import"./chunk-O44DI62I.js";import"./chunk-DTYVTTET.js";import"./chunk-MGIEURA2.js";import"./chunk-RVUOVLL5.js";import"./chunk-GGQ7LRWG.js";import"./chunk-F2X3VGZZ.js";import"./chunk-DM2JLWKE.js";import{Eb as l,Sc as c,Wb as t,Xb as n,Yb as m,ia as r,sc as i,yb as a}from"./chunk-6QJHEOXN.js";import"./chunk-YQFG5XE2.js";function f(e,u){e&1&&(t(0,"div",2),m(1,"img",3),t(2,"h1",4),i(3,"You are not authorized"),n(),t(4,"p",5),i(5," This page require "),t(6,"span",6),i(7,"Journal"),n(),i(8," role. Please contact your Administrator to gain access! "),n()())}var y=(()=>{class e{constructor(){this.roleService=r(p)}static{this.\u0275fac=function(o){return new(o||e)}}static{this.\u0275cmp=a({type:e,selectors:[["app-forbidden"]],decls:3,vars:0,consts:[["content",""],["pageTitle","Unauthorized"],[1,"h-100","d-flex","flex-column","justify-content-center","align-items-center"],["src","https://cdn.dealpos.xyz/web-image/locked.svg","alt","Forbidden"],[1,"fs-6","fw-semibold"],[1,"fs-3"],[1,"fw-semibold"]],template:function(o,g){o&1&&(t(0,"app-main-panel",1),l(1,f,9,0,"ng-template",null,0,c),n())},dependencies:[d],encapsulation:2})}}return e})();export{y as ForbiddenComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as d}from"./chunk-
|
|
1
|
+
import{h as d}from"./chunk-O44DI62I.js";import{Cb as s,Lb as l,Qb as p,Wb as c,Xb as C,Yb as m,sa as o,ua as a,yb as r}from"./chunk-6QJHEOXN.js";var u=(()=>{class t extends d{static \u0275fac=(()=>{let n;return function(e){return(n||(n=a(t)))(e||t)}})();static \u0275cmp=r({type:t,selectors:[["ChevronUpIcon"]],features:[s],decls:2,vars:5,consts:[["width","14","height","14","viewBox","0 0 14 14","fill","none","xmlns","http://www.w3.org/2000/svg"],["d","M12.2097 10.4113C12.1057 10.4118 12.0027 10.3915 11.9067 10.3516C11.8107 10.3118 11.7237 10.2532 11.6506 10.1792L6.93602 5.46461L2.22139 10.1476C2.07272 10.244 1.89599 10.2877 1.71953 10.2717C1.54307 10.2556 1.3771 10.1808 1.24822 10.0593C1.11933 9.93766 1.035 9.77633 1.00874 9.6011C0.982477 9.42587 1.0158 9.2469 1.10338 9.09287L6.37701 3.81923C6.52533 3.6711 6.72639 3.58789 6.93602 3.58789C7.14565 3.58789 7.3467 3.6711 7.49502 3.81923L12.7687 9.09287C12.9168 9.24119 13 9.44225 13 9.65187C13 9.8615 12.9168 10.0626 12.7687 10.2109C12.616 10.3487 12.4151 10.4207 12.2097 10.4113Z","fill","currentColor"]],template:function(i,e){i&1&&(o(),c(0,"svg",0),m(1,"path",1),C()),i&2&&(p(e.getClassNames()),l("aria-label",e.ariaLabel)("aria-hidden",e.ariaHidden)("role",e.role))},encapsulation:2})}return t})();export{u as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Ha as
|
|
1
|
+
import{Ha as c,ca as i}from"./chunk-6QJHEOXN.js";var n=class extends Error{};n.prototype.name="InvalidTokenError";function l(e){return decodeURIComponent(atob(e).replace(/(.)/g,(r,t)=>{let o=t.charCodeAt(0).toString(16).toUpperCase();return o.length<2&&(o="0"+o),"%"+o}))}function d(e){let r=e.replace(/-/g,"+").replace(/_/g,"/");switch(r.length%4){case 0:break;case 2:r+="==";break;case 3:r+="=";break;default:throw new Error("base64 string is not of the correct length")}try{return l(r)}catch{return atob(r)}}function p(e,r){if(typeof e!="string")throw new n("Invalid token specified: must be a string");r||(r={});let t=r.header===!0?0:1,o=e.split(".")[t];if(typeof o!="string")throw new n(`Invalid token specified: missing part #${t+1}`);let s;try{s=d(o)}catch(a){throw new n(`Invalid token specified: invalid base64 for part #${t+1} (${a.message})`)}try{return JSON.parse(s)}catch(a){throw new n(`Invalid token specified: invalid json for part #${t+1} (${a.message})`)}}var m=(()=>{class e{constructor(){this._token=c(localStorage.getItem("AUTH_TOKEN")),this.tokenSignal=this._token.asReadonly()}setToken(t){this._token.set(t),t?localStorage.setItem("AUTH_TOKEN",t):localStorage.removeItem("AUTH_TOKEN")}clearToken(){this.setToken(null)}static{this.\u0275fac=function(o){return new(o||e)}}static{this.\u0275prov=i({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();export{p as a,m as b};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"./chunk-YU4Q7ASX.js";import"./chunk-2JFOEOZ2.js";import"./chunk-WL6ZZCYW.js";import"./chunk-DZCJWJUG.js";import"./chunk-TOR7QRRB.js";import"./chunk-YQYRAH7V.js";import"./chunk-KL3TPLRB.js";import"./chunk-RVUOVLL5.js";import"./chunk-GGQ7LRWG.js";import"./chunk-F2X3VGZZ.js";import"./chunk-DM2JLWKE.js";import"./chunk-6QJHEOXN.js";import"./chunk-YQFG5XE2.js";var o=[{path:"",canActivate:[a],children:[{path:"",loadComponent:()=>import("./chunk-KXW5NWRO.js").then(t=>t.Dashboard1Component),data:{title:"Dashboard",headerTemplate:"header"}}]}];export{o as DashboardRoutes};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as f,g as W}from"./chunk-
|
|
1
|
+
import{a as f,g as W}from"./chunk-O44DI62I.js";import{Ea as he,Ma as U,Na as y,Q as fe,Va as ge,va as me}from"./chunk-MGIEURA2.js";import{c as de,d as R,f as G,g as J,h as K}from"./chunk-F2X3VGZZ.js";import{o as N,u as d}from"./chunk-DM2JLWKE.js";import{$b as E,Cb as c,Dc as ue,Ea as M,Eb as h,Fc as Q,Ha as se,Hc as q,Lb as $,Mb as F,Ob as u,Rb as C,Wb as w,Xb as O,Yb as z,ac as oe,ba as m,bd as s,ca as te,cd as H,da as ne,fc as ae,gc as k,hc as g,ia as D,ib as _,ic as v,lc as I,nc as P,oc as B,pc as b,qa as ie,qc as L,ra as pe,rb as V,sb as j,sc as le,tb as T,tc as ce,ua as a,yb as l,zb as re}from"./chunk-6QJHEOXN.js";var x=["*"],ye=["content"],Se=(e,r,t)=>({activateCallback:e,value:r,active:t});function _e(e,r){e&1&&z(0,"p-stepper-separator")}function $e(e,r){if(e&1){let t=oe();w(0,"button",0),ae("click",function(){ie(t);let n=k();return pe(n.onStepClick())}),w(1,"span",1),le(2),O(),w(3,"span",2),v(4),O()(),h(5,_e,1,0,"p-stepper-separator")}if(e&2){let t=k();F("tabindex",t.isStepDisabled()?-1:void 0)("disabled",t.isStepDisabled()),$("id",t.id())("role","tab")("aria-controls",t.ariaControls()),_(2),ce(t.value()),_(3),C(t.isSeparatorVisible()?5:-1)}}function Ce(e,r){e&1&&E(0)}function xe(e,r){e&1&&z(0,"p-stepper-separator")}function De(e,r){if(e&1&&h(0,Ce,1,0,"ng-container",3)(1,xe,1,0,"p-stepper-separator"),e&2){let t=k();F("ngTemplateOutlet",t.content||t._contentTemplate)("ngTemplateOutletContext",q(3,Se,t.onStepClick.bind(t),t.value(),t.active())),_(),C(t.isSeparatorVisible()?1:-1)}}var ve=e=>({transitionParams:e}),Te=e=>({value:"visible",params:e}),Fe=e=>({value:"hidden",params:e});function we(e,r){e&1&&z(0,"p-stepper-separator")}function ke(e,r){e&1&&E(0)}function Ie(e,r){if(e&1&&h(0,ke,1,0,"ng-container",1),e&2){let t=k();F("ngTemplateOutlet",t.contentTemplate||t._contentTemplate)("ngTemplateOutletContext",q(2,Se,t.updateValue.bind(t),t.value(),t.active()))}}var Pe=({dt:e})=>`
|
|
2
2
|
.p-steplist {
|
|
3
3
|
position: relative;
|
|
4
4
|
display: flex;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as y,b as J}from"./chunk-VKUW7E75.js";import"./chunk-LBXNL7E4.js";import{m as V}from"./chunk-Q4XWXOWE.js";import"./chunk-WL6ZZCYW.js";import{a as j,b as R}from"./chunk-5U7KZJ3H.js";import"./chunk-FHJOSHI3.js";import{i as z}from"./chunk-J3HFAWXU.js";import"./chunk-VM56C6ZV.js";import{a as G,b as H}from"./chunk-ISIYG4D5.js";import"./chunk-ALLR2NXQ.js";import"./chunk-FNGX2XFA.js";import"./chunk-BFEM6LX7.js";import{w as D,x as N,y as L,z as q}from"./chunk-O44DI62I.js";import"./chunk-DTYVTTET.js";import"./chunk-MGIEURA2.js";import"./chunk-TOR7QRRB.js";import{a as I}from"./chunk-YQYRAH7V.js";import"./chunk-KL3TPLRB.js";import"./chunk-RVUOVLL5.js";import"./chunk-GGQ7LRWG.js";import"./chunk-F2X3VGZZ.js";import{p as F,u as E}from"./chunk-DM2JLWKE.js";import{Dc as $,Eb as C,Ec as T,Mb as p,Oc as c,Pb as h,Pc as s,Rb as x,Sc as b,W as M,Wb as o,Xb as n,Y as k,Yb as u,_ as O,ac as v,fc as S,gc as a,h as A,ia as m,ib as r,qa as g,ra as _,s as d,sa as B,ta as P,yb as w}from"./chunk-6QJHEOXN.js";import"./chunk-YQFG5XE2.js";var K=()=>({height:"calc(100vh - 100px)"});function Q(e,f){if(e&1){let t=v();o(0,"p-button",6),S("onClick",function(){g(t);let l=a(2);return _(l.onFormat())}),n()}}function U(e,f){if(e&1){let t=v();o(0,"p-button",7),c(1,"async"),c(2,"async"),S("onClick",function(){g(t);let l=a(2);return _(l.onMigrateOutletAccount())}),n()}if(e&2){let t=a(2);p("disabled",s(1,2,t.countInBooks$)!==0)("pTooltip",s(2,4,t.countInBooks$)!==0?"Books already has entries. Please format before re-migrating.":null)}}function W(e,f){if(e&1&&(o(0,"div",3),C(1,Q,1,0,"p-button",4)(2,U,3,6,"p-button",5),n()),e&2){let t=a();r(),x(t.roleService.permissions().migrate.delete?1:-1),r(),x(t.roleService.permissions().migrate.create?2:-1)}}function X(e,f){if(e&1&&(o(0,"p-scroll-panel")(1,"p-panel")(2,"div",8),u(3,"app-migration-cards",9),c(4,"async"),B(),o(5,"svg",10),u(6,"path",11),n(),P(),u(7,"app-migration-cards",12),c(8,"async"),n()()()),e&2){let t=a();h(T(12,K)),r(),h(T(13,K)),r(2),p("migrationCount",s(4,8,t.countInPOS$))("migrationTitle",t.pageTitle),r(4),p("migrationCount",s(8,10,t.countInBooks$))("migrationTitle",t.pageTitle)}}var Ct=(()=>{class e{constructor(){this.migrateService=m(y),this.toastr=m(I),this.refresh$=new A(void 0),this.pageTitle="Outlet Account",this.roleService=m(V)}ngOnInit(){let t=this.refresh$.pipe(k(()=>this.migrateService.getOutletAccountCount()),O(i=>console.log("API response:",i)),M(1));this.countInPOS$=t.pipe(d(i=>Number(i.pos))),this.countInBooks$=t.pipe(d(i=>Number(i.books)))}onMigrateOutletAccount(){this.migrateService.migrateOutletAccount().subscribe(t=>{this.refresh$.next(),this.toastr.success(t.message,"Migration Successful")})}onFormat(){confirm("Are you sure you want to format?")&&this.migrateService.formatOutletAccount().subscribe(t=>{this.refresh$.next(),this.toastr.success(t.message,"Format Successful")})}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=w({type:e,selectors:[["app-outlet-account"]],features:[$([y])],decls:5,vars:1,consts:[["actionButton",""],["content",""],[3,"pageTitle"],[1,"d-flex","gap-2"],["label","Format","severity","danger"],["label","Create","tooltipPosition","left",3,"disabled","pTooltip"],["label","Format","severity","danger",3,"onClick"],["label","Create","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(i,l){i&1&&(o(0,"app-main-panel",2),C(1,W,3,2,"ng-template",null,0,b)(3,X,9,14,"ng-template",null,1,b),n()),i&2&&p("pageTitle",l.pageTitle)},dependencies:[z,E,F,N,D,R,j,H,G,q,L,J],encapsulation:2})}}return e})();export{Ct as OutletAccountComponent};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as oe}from"./chunk-YHLRDTIS.js";import{a as ut}from"./chunk-SVGPDGYN.js";import{a as dt,b as gt}from"./chunk-LO4HJ77Y.js";import{a as Xe}from"./chunk-2JFOEOZ2.js";import{a as Rt,b as pt}from"./chunk-LBXNL7E4.js";import{a as st,b as ct}from"./chunk-KARG227P.js";import{a as mt}from"./chunk-XKI7WLHE.js";import"./chunk-KQZMRRMA.js";import"./chunk-ZC7ZENN7.js";import{m as _e}from"./chunk-Q4XWXOWE.js";import"./chunk-WL6ZZCYW.js";import{a as ie,b as re}from"./chunk-3VQUNDVT.js";import{b as ot,d as Ve,i as at,j as lt,k as Ne}from"./chunk-BTFX33U6.js";import{a as it,b as rt}from"./chunk-BME4Z6DH.js";import"./chunk-VSDW2RJ5.js";import"./chunk-7L5IAWG2.js";import{a as Ae}from"./chunk-BT7Y4ADP.js";import{a as Ie,b as Te}from"./chunk-5U7KZJ3H.js";import"./chunk-MJGBBYIO.js";import"./chunk-CN6AT4LE.js";import{a as Me,b as ke}from"./chunk-OW2ND5HU.js";import"./chunk-JWNGZMSE.js";import"./chunk-II7KELI4.js";import"./chunk-FTBQKOYS.js";import"./chunk-L4ENW4RK.js";import{b as Z}from"./chunk-FHJOSHI3.js";import"./chunk-KONCSTVQ.js";import"./chunk-FMAG3RQL.js";import{f as nt,i as L}from"./chunk-J3HFAWXU.js";import"./chunk-VM56C6ZV.js";import{a as N,b as A}from"./chunk-ISIYG4D5.js";import"./chunk-ALLR2NXQ.js";import{b as T,c as Pe,d as tt,e as we,f as Fe,g as De}from"./chunk-FNGX2XFA.js";import"./chunk-BFEM6LX7.js";import{n as ye,o as Re,w as J,x as Q}from"./chunk-O44DI62I.js";import"./chunk-DTYVTTET.js";import{b as he,c as X,e as Y,f as Ee,i as Ye,j as Je,k as ve,m as Se,p as be,v as Qe,w as Ze,x as et,y as Ce}from"./chunk-MGIEURA2.js";import{b as ge,d as fe,e as k,l as V}from"./chunk-DZCJWJUG.js";import{a as xe}from"./chunk-TOR7QRRB.js";import"./chunk-YQYRAH7V.js";import"./chunk-KL3TPLRB.js";import"./chunk-RVUOVLL5.js";import"./chunk-GGQ7LRWG.js";import"./chunk-F2X3VGZZ.js";import{j as Ke,m as D,r as de,s as K,u as M}from"./chunk-DM2JLWKE.js";import{Cb as $e,Dc as ue,Eb as x,Ec as We,Fc as C,Ha as O,J as Ue,Mb as m,Oc as b,Pc as w,Qc as U,Rb as G,Sb as $,Sc as _,Ub as H,Vb as W,Wb as r,Xb as n,Y as q,Yb as g,_ as P,ac as y,bd as ne,c as te,ca as pe,fc as R,gc as u,ia as d,ib as l,qa as v,ra as S,s as z,sc as a,tc as E,ua as ze,uc as I,wc as He,xa as Ge,xc as se,yb as F,yc as ce,zc as me}from"./chunk-6QJHEOXN.js";import{a as f,b as h,e as yt}from"./chunk-YQFG5XE2.js";var B=(()=>{class t{#e=d(xe);#t=d(Xe);getRecurringExpenseLoader(){return this.#e.get(void 0,"api/RecurringExpenseLoader/GetList")}getRecurringExpenses(e){return this.#e.post(void 0,"api/RecurringExpense/GetList",e)}fetchRecurringExpenseForm(e){return this.#e.get(void 0,`api/RecurringExpense/form/${e??""}`)}fetchSupplierSuggestion(e){let o={count:100,prefix:e};return this.#e.post(this.#t.getTenantExternalURL(),"/API/AC/GetSupplierSuggestion",o)}fetchCustomerSuggestion(e){let o={count:100,prefix:e};return this.#e.post(this.#t.getTenantExternalURL(),"/API/AC/GetCustomerSuggestion",o)}submitRecurringExpense(e,o={}){return this.#e.post(void 0,"api/RecurringExpense/submit",e,o)}removeRecurringExpense(e){return this.#e.delete(void 0,`api/RecurringExpense/${e}`,void 0)}removeRecurringExpenses(e){let o={body:e};return this.#e.delete(void 0,"api/RecurringExpense/Batch",o)}getRecurringExpenseByID(e){return this.#e.get(void 0,`api/RecurringExpense/Info/${e}`)}getAssetValueList(){return this.#e.get(void 0,"api/AssetValue/GetListt")}static{this.\u0275fac=function(o){return new(o||t)}}static{this.\u0275prov=pe({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var It={data:{data:[],count:0},meta:{Options:{Frequencies:[]},Filter:{text:null,Frequency:0,pageNumber:1,pageSize:20,export:!1,exportPageNumber:1,exportPageSize:1e4}},filter:{text:null,Frequency:0,pageNumber:1,pageSize:20,export:!1,exportPageNumber:1,exportPageSize:1e4}},Le=Pe(De(It),tt(t=>({first:ne(()=>(t.filter().pageNumber-1)*t.filter().pageSize+1),end:ne(()=>Math.min(t.filter().pageNumber*t.filter().pageSize,t.data().count)),hasCheckedRows:ne(()=>t.data().data.some(s=>s.checked)),checkedInvoice:ne(()=>t.data().data.filter(s=>s.checked).map(s=>s.id))})),Fe(t=>{let s=d(B);return{updateFilter(o){T(t,i=>h(f({},i),{filter:f(f({},i.filter),o)}))},onRowSelect(o){T(t,i=>{let c=i.data.data.map(p=>p.id===o.id?h(f({},p),{checked:!0}):p);return h(f({},i),{data:h(f({},i.data),{data:c})})})},onRowUnselect(o){T(t,i=>{let c=i.data.data.map(p=>p.id===o.id?h(f({},p),{checked:!1}):p);return h(f({},i),{data:h(f({},i.data),{data:c})})})},onHeaderCheckboxToggle(o){T(t,i=>{let c=i.data.data.map(p=>h(f({},p),{checked:o}));return h(f({},i),{data:h(f({},i.data),{data:c})})})},getRecurringExpenseLoader:ie(te(q(()=>s.getRecurringExpenseLoader().pipe(re({next:o=>{T(t,i=>h(f({},i),{meta:o}))},error:o=>{console.error("Error fetching Recurring Expense Loader:",o)}}))))),getRecurringExpenses:ie(te(z(o=>Object.entries(o).reduce((i,[c,p])=>(p!=null&&(i[c]=p),i),{})),q(o=>s.getRecurringExpenses(o).pipe(re({next:i=>{T(t,c=>h(f({},c),{data:i}))},error:i=>{console.error("Error fetching Recurring Expenses:",i)}})))))}}),we(t=>({onInit:()=>{t.getRecurringExpenseLoader(),t.getRecurringExpenses(t.filter)}})));var wt=["class","page"],Ft=t=>["details/",t];function Dt(t,s){if(t&1){let e=y();r(0,"p-button",11),R("onClick",function(){v(e);let i=u(2);return S(i.onDeleteSelected())}),n()}}function Mt(t,s){t&1&&(r(0,"a",10),g(1,"i",12),r(2,"span"),a(3,"Add"),n()())}function kt(t,s){if(t&1&&(r(0,"div",8),x(1,Dt,1,0,"p-button",9)(2,Mt,4,0,"a",10),n()),t&2){let e=u();l(),m("ngIf",e.store.hasCheckedRows()&&e.roleService.permissions().recurring.delete),l(),G(e.roleService.permissions().recurring.create?2:-1)}}function Vt(t,s){t&1&&(r(0,"th"),g(1,"p-tableHeaderCheckbox"),n())}function Nt(t,s){if(t&1&&(r(0,"tr"),x(1,Vt,2,0,"th"),r(2,"th"),a(3,"Tag"),n(),r(4,"th"),a(5,"Name"),n(),r(6,"th"),a(7,"Expense Account"),n(),r(8,"th"),a(9,"Start Date"),n(),r(10,"th"),a(11,"End Date"),n(),r(12,"th"),a(13,"Last Expense"),n(),r(14,"th"),a(15,"Amount"),n(),r(16,"th"),a(17,"Frequency"),n()()),t&2){let e=u(2);l(),G(e.roleService.permissions().recurring.delete?1:-1)}}function At(t,s){if(t&1&&(r(0,"td"),g(1,"p-tableCheckbox",15),n()),t&2){let e=u().$implicit;l(),m("value",e)}}function Lt(t,s){if(t&1&&(r(0,"tr"),x(1,At,2,1,"td"),r(2,"td"),a(3),n(),r(4,"td")(5,"a",14),a(6),n()(),r(7,"td"),a(8),n(),r(9,"td"),a(10),b(11,"date"),n(),r(12,"td"),a(13),b(14,"date"),n(),r(15,"td"),a(16),b(17,"date"),n(),r(18,"td"),a(19),b(20,"number"),n(),r(21,"td"),a(22),n()()),t&2){let e=s.$implicit,o=u(2);l(),G(o.roleService.permissions().recurring.delete?1:-1),l(2),E(e.outletName),l(2),m("routerLink",C(21,Ft,e.id)),l(),E(e.name),l(2),E(e.expenseName),l(2),E(U(11,10,e.startDate,"d MMM y")),l(3),E(U(14,13,e.endDate,"d MMM y")),l(3),E(U(17,16,e.lastExpenseDate,"d MMM y")),l(3),E(w(20,19,e.amount)),l(3),E(e.repeatTypeLabel)}}function Bt(t,s){if(t&1&&(r(0,"div"),a(1),n()),t&2){let e=u(2);l(),He(" Showing ",e.store.first()," to ",e.store.end()," of ",e.store.data().count," entries ")}}function jt(t,s){t&1&&(r(0,"tr")(1,"td",16)(2,"span"),a(3,"No recurring expenses found."),n()()())}function qt(t,s){if(t&1){let e=y();r(0,"p-panel")(1,"p-table",13),R("onPage",function(i){v(e);let c=u();return S(c.onPageChange(i))})("onHeaderCheckboxToggle",function(i){v(e);let c=u();return S(c.onHeaderCheckboxToggle(i))})("onRowSelect",function(i){v(e);let c=u();return S(c.onRowSelect(i))})("onRowUnselect",function(i){v(e);let c=u();return S(c.onRowUnselect(i))}),x(2,Nt,18,1,"ng-template",null,3,_)(4,Lt,23,23,"ng-template",null,4,_)(6,Bt,2,3,"ng-template",null,5,_)(8,jt,4,0,"ng-template",null,6,_),n()()}if(t&2){let e=u();l(),m("lazy",!0)("totalRecords",e.store.data().count)("rows",e.store.filter().pageSize)("paginator",!0)("value",e.store.data().data)}}function Ot(t,s){if(t&1&&(r(0,"form",17)(1,"div",18)(2,"label",19),a(3,"Type"),n(),g(4,"p-select",20),n()()),t&2){let e=u();m("formGroup",e.form),l(4),m("options",e.store.meta().Options.Frequencies)}}var _t=(()=>{class t extends mt{constructor(){super(...arguments),this.store=d(Le),this.recurringExpenseService=d(B),this.fb=d(Qe),this.isDialogFilterVisible=O(!1),this.roleService=d(_e)}ngOnInit(){this.initForm()}onPageChange(e){let o=e.first/e.rows;this.store.updateFilter(h(f({},this.store.filter()),{pageNumber:o+1}))}onDeleteSelected(){this.recurringExpenseService.removeRecurringExpenses(this.store.checkedInvoice()).pipe(P(()=>{this.store.updateFilter(h(f({},this.store.filter()),{pageNumber:1}))})).subscribe()}onSearchEvent(e){this.store.updateFilter(h(f({},this.store.filter()),{text:e}))}onFilterEvent(){this.onSubmitFilterDialog()}onSubmitFilterDialog(){if(this.form.invalid){this.form.markAllAsTouched();return}let e=Object.entries(this.form.getRawValue()).reduce((o,[i,c])=>(c!=null&&(o[i]=c),o),{});this.store.updateFilter(e),this.isDialogFilterVisible.update(o=>!o)}onHeaderCheckboxToggle(e){this.store.onHeaderCheckboxToggle(e.checked)}onRowSelect(e){this.store.onRowSelect(e.data)}onRowUnselect(e){if(Array.isArray(e.data)){e.data.forEach(o=>{this.store.onRowUnselect(o)});return}else this.store.onRowUnselect(e.data)}initForm(){let{text:e,Frequency:o,pageNumber:i,pageSize:c,export:p,exportPageNumber:j,exportPageSize:Ct}=this.store.filter();this.form=this.fb.group({text:this.fb.control(e),Frequency:this.fb.control(o),pageNumber:this.fb.control(i),pageSize:this.fb.control(c),export:this.fb.control(p),exportPageNumber:this.fb.control(j),exportPageSize:this.fb.control(Ct)})}static{this.\u0275fac=(()=>{let e;return function(i){return(e||(e=ze(t)))(i||t)}})()}static{this.\u0275cmp=F({type:t,selectors:[["app-recurring-expense",8,"page"]],features:[ue([Le]),$e],attrs:wt,decls:7,vars:4,consts:[["actionButton",""],["content",""],["filters",""],["header",""],["body",""],["paginatorleft",""],["emptymessage",""],["pageTitle","Recurring Expenses",3,"search","isDialogFilterVisibleChange","filterConfirmed","isSearchableInput","isFilterable","isDialogFilterVisible","scrollable"],[1,"d-flex","gap-2"],["severity","danger","label","Delete","icon","fa-solid fa-trash",3,"onClick",4,"ngIf"],["routerLink","create",1,"p-button"],["severity","danger","label","Delete","icon","fa-solid fa-trash",3,"onClick"],[1,"fa-solid","fa-plus"],["dataKey","id","styleClass","d-flex flex-column justify-content-between h-100",3,"onPage","onHeaderCheckboxToggle","onRowSelect","onRowUnselect","lazy","totalRecords","rows","paginator","value"],[1,"link-primary",3,"routerLink"],[3,"value"],["colspan","9"],[1,"d-flex","flex-column",3,"formGroup"],[1,"d-flex","flex-column"],["for","outlet"],["formControlName","Frequency","appendTo","body","optionLabel","value","optionValue","key","placeholder","Select Type",3,"options"]],template:function(o,i){if(o&1){let c=y();r(0,"app-main-panel",7),R("search",function(j){return v(c),S(i.onSearchEvent(j))}),me("isDialogFilterVisibleChange",function(j){return v(c),ce(i.isDialogFilterVisible,j)||(i.isDialogFilterVisible=j),S(j)}),R("filterConfirmed",function(){return v(c),S(i.onFilterEvent())}),x(1,kt,3,2,"ng-template",null,0,_)(3,qt,10,5,"ng-template",null,1,_)(5,Ot,5,2,"ng-template",null,2,_),n()}o&2&&(m("isSearchableInput",!0)("isFilterable",!0),se("isDialogFilterVisible",i.isDialogFilterVisible),m("scrollable",!0))},dependencies:[L,k,Z,Ne,Ve,at,lt,M,D,K,de,V,nt,ke,Me,Q,J,Ce,ve,Y,Ee,Se,be,A,N],styles:["[_nghost-%COMP%]{display:block} .p-card{height:100%} .p-card .p-card-body{height:inherit} .p-card .p-card-body .p-card-content{height:inherit}"],changeDetection:0})}}return t})();var ee=yt(Rt());var Gt=["class","page"],$t=()=>["/pages/recurring/recurring-expense"],le=t=>({"ng-dirty ng-invalid":t});function Ht(t,s){if(t&1){let e=y();r(0,"div",5)(1,"a",6),a(2," Cancel "),n(),r(3,"p-button",7),R("click",function(){v(e);let i=u();return S(i.onSubmit())}),n()()}t&2&&(l(),m("routerLink",We(1,$t)))}function Wt(t,s){if(t&1&&(r(0,"small",19),a(1),n()),t&2){let e=s.$implicit;l(),E(e)}}function Kt(t,s){if(t&1&&(r(0,"div",32)(1,"div",33),a(2),n()()),t&2){let e=s.$implicit;l(2),I(" ",e.name," ")}}function Xt(t,s){if(t&1&&(r(0,"small",19),a(1),n()),t&2){let e=s.$implicit;l(),E(e)}}function Yt(t,s){if(t&1&&(r(0,"small",19),a(1),n()),t&2){let e=s.$implicit;l(),E(e)}}function Jt(t,s){if(t&1&&(r(0,"div",5)(1,"div")(2,"span"),a(3),n()(),r(4,"div",33),a(5),n()()),t&2){let e=s.$implicit;l(3),I("(",e.code,")"),l(2),I(" ",e.value," ")}}function Qt(t,s){if(t&1&&(r(0,"small",19),a(1),n()),t&2){let e=s.$implicit;l(),E(e)}}function Zt(t,s){if(t&1&&(r(0,"div",5)(1,"div")(2,"span"),a(3),n()(),r(4,"div",33),a(5),n()()),t&2){let e=s.$implicit;l(3),I("(",e.code,")"),l(2),I(" ",e.value," ")}}function en(t,s){if(t&1&&(r(0,"small",19),a(1),n()),t&2){let e=s.$implicit;l(),E(e)}}function tn(t,s){if(t&1){let e=y();r(0,"div",9)(1,"div",10)(2,"p-panel",11)(3,"p-scroll-panel")(4,"div",12)(5,"div",13)(6,"form",14)(7,"div",15)(8,"div",13)(9,"div",16)(10,"label",17),a(11,"Name"),n(),g(12,"input",18),r(13,"div"),H(14,Wt,2,1,"small",19,$),n()()(),r(16,"div",20,2)(18,"div",16)(19,"label",17),a(20,"Tag"),n(),r(21,"p-select",21),x(22,Kt,3,1,"ng-template",null,3,_),n()()(),r(24,"div",20)(25,"div",16)(26,"div")(27,"label",17),a(28,"Supplier"),n(),r(29,"p-autocomplete",22),R("completeMethod",function(i){v(e);let c=u(2);return S(c.searchContact(i))}),n()(),r(30,"div"),H(31,Xt,2,1,"small",19,$),n()()(),r(33,"div",20)(34,"div",16)(35,"label",17),a(36,"From"),n(),g(37,"p-datepicker",23),n()(),r(38,"div",20)(39,"div",16)(40,"label",17),a(41,"To"),n(),g(42,"p-datepicker",24),n()(),g(43,"div",25),n(),g(44,"hr"),r(45,"div",15)(46,"div",20)(47,"div",16)(48,"label",17),a(49,"Amount"),n(),g(50,"input",26),r(51,"div"),H(52,Yt,2,1,"small",19,$),n()()(),r(54,"div",20)(55,"div",16)(56,"label",17),a(57,"Frequency"),n(),g(58,"p-select",27),n()(),r(59,"div",20)(60,"div",16)(61,"label",17),a(62,"Expense (Debit)"),n(),r(63,"p-select",28),x(64,Jt,6,2,"ng-template",null,3,_),n()(),r(66,"div"),H(67,Qt,2,1,"small",19,$),n()(),r(69,"div",20)(70,"div",16)(71,"label",17),a(72,"Payment (Credit)"),n(),r(73,"p-select",29),x(74,Zt,6,2,"ng-template",null,3,_),n()(),r(76,"div"),H(77,en,2,1,"small",19,$),n()(),r(79,"div",30)(80,"div",16)(81,"label",17),a(82,"Description"),n(),g(83,"textarea",31),n()()()()()()()()()()}if(t&2){let e,o,i,c,p=u(2);l(6),m("formGroup",p.recurringExpenseForm),l(6),m("ngClass",C(16,le,p.isInvalid("name"))),l(2),W(p.getErrors("name")),l(7),m("options",(e=p.recurringExpenseData())==null||e.options==null?null:e.options.entities),l(8),m("showClear",!0)("ngClass",C(18,le,p.isInvalid("contact")))("suggestions",p.customerSupplierSuggestions()),l(2),W(p.getErrors("contact")),l(6),m("iconDisplay","input")("showIcon",!0),l(5),m("iconDisplay","input")("showIcon",!0),l(8),m("ngClass",C(20,le,p.isInvalid("amount"))),l(2),W(p.getErrors("amount")),l(6),m("options",(o=p.recurringExpenseData())==null||o.options==null?null:o.options.frequency),l(5),m("options",(i=p.recurringExpenseData())==null||i.options==null?null:i.options.expenses)("ngClass",C(22,le,p.isInvalid("expenseAccountID"))),l(4),W(p.getErrors("expenseAccountID")),l(6),m("ngClass",C(24,le,p.isInvalid("paymentAccountID")))("options",(c=p.recurringExpenseData())==null||c.options==null?null:c.options.assets),l(4),W(p.getErrors("paymentAccountID"))}}function nn(t,s){if(t&1&&x(0,tn,84,26,"div",8),t&2){let e=u();m("ngIf",e.recurringExpenseData())}}var qe=(()=>{class t{constructor(){this.recurringExpenseService=d(B),this.fb=d(Ze),this.destroyRef=d(Ge),this.route=d(ge),this.recurringExpenseData=O(null),this.customerSupplierSuggestions=O([]),this.router=d(fe),this.contactType=new Ye(0),this.dayjsService=d(pt)}ngOnInit(){this.initializeForm(),this.fetchRecurringExpenseForm()}initializeForm(){this.recurringExpenseForm=this.fb.group({id:this.fb.control(""),name:this.fb.control("",[X.required]),repeatTypeID:this.fb.control(1,[X.required]),startDate:this.fb.control((0,ee.default)().toISOString()),endDate:this.fb.control(null),lastExpenseDate:this.fb.control(""),amount:this.fb.control(0,[X.required]),paymentAccountID:this.fb.control(null,[X.required]),expenseAccountID:this.fb.control(null,[X.required]),contact:this.fb.control("",[]),description:this.fb.control(""),repeatTypeLabel:this.fb.control(""),outletID:this.fb.control(""),creatorID:this.fb.control(""),created:this.fb.control(""),modifierID:this.fb.control(""),modified:this.fb.control("")})}fetchRecurringExpenseForm(){this.route.paramMap.pipe(z(e=>e.get("id")),q(e=>e?this.recurringExpenseService.fetchRecurringExpenseForm(e):this.recurringExpenseService.fetchRecurringExpenseForm()),P(e=>{this.recurringExpenseData.set(e),this.updateFormWithRecurringExpense(e.form)})).subscribe()}updateFormWithRecurringExpense(e){let o=Object.entries(e).reduce((i,[c,p])=>{switch(c){case"startDate":i[c]=(0,ee.default)(p).isSame((0,ee.default)("0001-01-01T00:00:00"))?(0,ee.default)().toDate():(0,ee.default)(p).toDate();break;case"repeatTypeID":i[c]=1;break;case"contactID":i.contact=e.contactID?{Key:e.contactID,Value:e.contactName}:null;break;case"paymentAccountID":i[c]=p===oe?null:p;break;case"expenseAccountID":i[c]=p===oe?null:p;break;default:i[c]=p}return i},{});this.recurringExpenseForm.patchValue(o)}searchContact(e){this.recurringExpenseService.fetchSupplierSuggestion(e.query).pipe(P(this.customerSupplierSuggestions.set)).subscribe()}onSubmit(){let e=this.recurringExpenseForm.value;if(this.recurringExpenseForm.invalid){this.recurringExpenseForm.markAllAsTouched();return}let o=Object.entries(e).reduce((i,[c,p])=>{switch(c){case"amount":i[c]=+p;break;case"startDate":i[c]=p?this.dayjsService.from(p).format():null;break;case"endDate":i[c]=p?this.dayjsService.from(p).format():null;break;case"contact":typeof p=="string"?i.contactID=p:typeof p=="object"&&p!==null?i.contactID=p&&Object.prototype.hasOwnProperty.call(p,"Key")?p.Key:p:i.contactID=oe;break;default:i[c]=p;break}return i},{});this.recurringExpenseService.submitRecurringExpense(o).pipe(P(()=>{this.router.navigate(["/pages/recurring/recurring-expense"])})).subscribe()}isInvalid(e){let o=this.recurringExpenseForm.controls[e];return o.invalid&&(o.dirty||o.touched)}getErrors(e){if(!this.isInvalid(e))return null;let o=this.recurringExpenseForm.controls[e];if(!o.errors)return null;let i=[];for(let[c,p]of Object.entries(o.errors))switch(c){case"required":i.push("This field is required.");break;case"minlength":i.push(`Minimum length is ${p.requiredLength} characters.`);break;case"maxlength":i.push(`Maximum length is ${p.requiredLength} characters.`);break;case"email":i.push("Please enter a valid email address.");break;case"pattern":i.push("The format is invalid.");break;case"min":i.push(`Minimum value is ${p.min}.`);break;case"max":i.push(`Maximum value is ${p.max}.`);break;default:i.push("Invalid value.")}return i}static{this.\u0275fac=function(o){return new(o||t)}}static{this.\u0275cmp=F({type:t,selectors:[["app-recurring-expense-form",8,"page"]],attrs:Gt,decls:5,vars:2,consts:[["actionButton",""],["content",""],["outlet",""],["item",""],["pageTitle","Recurring Expense Form",3,"hasMainWrapperPadding","overflowScroll"],[1,"d-flex","gap-2"],["type","button",1,"p-button","p-button-secondary","p-button-outlined",3,"routerLink"],["label","Submit","icon","fa-solid fa-plus",3,"click"],["class","row justify-content-center",4,"ngIf"],[1,"row","justify-content-center"],[1,"col-6"],[1,"h-100","d-flex"],[1,"row","justify-content-center","h-100"],[1,"col-12"],[1,"d-flex","flex-column","row-gap-2",3,"formGroup"],[1,"row","row-gap-2"],[1,"d-flex","flex-column"],["for",""],["formControlName","name","type","text","pInputText","",3,"ngClass"],[1,"text-danger"],[1,"col","col-lg-6"],["filter","","filterBy","name","appendTo","body","formControlName","outletID","optionLabel","name","optionValue","id","placeholder","Select an Tag",3,"options"],["formControlName","contact","inputStyleClass","w-100","styleClass","w-100","optionLabel","Value","optionValue","Key",3,"completeMethod","showClear","ngClass","suggestions"],["dateFormat","mm/dd/yy","appendTo","body","formControlName","startDate","styleClass","w-100","inputId","icondisplay",3,"iconDisplay","showIcon"],["appendTo","body","formControlName","endDate","styleClass","w-100","inputId","icondisplay",3,"iconDisplay","showIcon"],[1,"col"],["formControlName","amount","type","text","appMaskNumber","","pInputText","",3,"ngClass"],["appendTo","body","formControlName","repeatTypeID","optionLabel","value","optionValue","key","placeholder","Select Outlet",3,"options"],["appendTo","body","formControlName","expenseAccountID","optionLabel","value","optionValue","key","placeholder","Select Expense","filter","","filterBy","code,value",3,"options","ngClass"],["appendTo","body","formControlName","paymentAccountID","optionLabel","value","optionValue","key","filter","","filterBy","code,value","placeholder","Select Payment",3,"ngClass","options"],[1,"col","col-lg-12"],["formControlName","description","rows","3","cols","30","pTextarea",""],[1,"flex","items-center","gap-2"],[1,"text-truncate","d-inline-block",2,"max-width","250px"]],template:function(o,i){o&1&&(r(0,"app-main-panel",4),x(1,Ht,4,2,"ng-template",null,0,_)(3,nn,1,1,"ng-template",null,1,_),n()),o&2&&m("hasMainWrapperPadding",!0)("overflowScroll",!0)},dependencies:[L,Z,Re,ye,ke,Me,rt,it,gt,dt,ct,st,Te,Ie,M,Ke,D,Ce,ve,he,Y,Ee,Se,be,V,k,Q,J,ut,A,N,ot],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var rn=["class","page"],on=t=>["/pages/recurring/recurring-expense/edit",t];function an(t,s){if(t&1&&(r(0,"a",7),g(1,"i",8),r(2,"span"),a(3,"Edit"),n()()),t&2){let e=u(4);m("routerLink",C(1,on,e.currentRecurringExpense().id))}}function ln(t,s){if(t&1){let e=y();r(0,"p-button",9),R("onClick",function(){v(e);let i=u(4);return S(i.onDeleteRecurringExpense(i.currentRecurringExpense().id))}),n()}}function pn(t,s){if(t&1&&(r(0,"div",4),x(1,an,4,3,"a",5)(2,ln,1,0,"p-button",6),n()),t&2){let e=u(3);l(),m("ngIf",e.roleService.permissions().recurring.edit),l(),m("ngIf",e.roleService.permissions().recurring.delete)}}function sn(t,s){if(t&1&&x(0,pn,3,2,"div",3),t&2){let e=u(2);m("ngIf",e.currentRecurringExpense())}}function cn(t,s){if(t&1){let e=y();r(0,"p-panel",13)(1,"p-scroll-panel")(2,"div",10)(3,"div",14)(4,"div",15)(5,"div",14)(6,"div",16)(7,"div",17)(8,"div",18)(9,"label",19),a(10,"Tag"),n(),r(11,"input",20),me("ngModelChange",function(i){v(e);let c=u(3);return ce(c.currentRecurringExpense().outletName,i)||(c.currentRecurringExpense().outletName=i),S(i)}),n()()(),r(12,"div",17)(13,"div",18)(14,"label",19),a(15,"Supplier"),n(),g(16,"input",21),n()(),r(17,"div",17)(18,"div",18)(19,"label",19),a(20,"From"),n(),g(21,"input",22),b(22,"date"),n()(),r(23,"div",17)(24,"div",18)(25,"label",19),a(26,"To"),n(),g(27,"input",22),b(28,"date"),n()()(),g(29,"hr"),r(30,"div",16)(31,"div",17)(32,"div",18)(33,"label",19),a(34,"Amount"),n(),g(35,"input",22),b(36,"number"),n()(),r(37,"div",17)(38,"div",18)(39,"label",19),a(40,"Frequency"),n(),g(41,"input",22),n()(),r(42,"div",17)(43,"div",18)(44,"label",19),a(45,"Expense (Debit)"),n(),g(46,"input",22),n()(),r(47,"div",17)(48,"div",18)(49,"label",19),a(50,"Payment (Credit)"),n(),g(51,"input",22),n()(),r(52,"div",23)(53,"div",18)(54,"label",19),a(55,"Description"),n(),g(56,"textarea",24),n()()()()()()()()()}if(t&2){let e=u(3);l(11),se("ngModel",e.currentRecurringExpense().outletName),l(5),m("value",e.currentRecurringExpense().contactName),l(5),m("value",U(22,9,e.currentRecurringExpense().startDate,"d MMM y")),l(6),m("value",U(28,12,e.currentRecurringExpense().endDate,"d MMM y")),l(8),m("value",w(36,15,e.currentRecurringExpense().amount)),l(6),m("value",e.currentRecurringExpense().repeatTypeLabel),l(5),m("value",e.currentRecurringExpense().expenseName),l(5),m("value",e.currentRecurringExpense().paymentName),l(5),m("value",e.currentRecurringExpense().description)}}function mn(t,s){if(t&1&&(r(0,"div",10)(1,"div",11),x(2,cn,57,17,"p-panel",12),n()()),t&2){let e=u(2);l(2),m("ngIf",e.currentRecurringExpense())}}function un(t,s){if(t&1&&(r(0,"app-main-panel",2),x(1,sn,1,1,"ng-template",null,0,_)(3,mn,3,1,"ng-template",null,1,_),n()),t&2){let e=u();m("pageTitle",e.currentRecurringExpense().name+" Info")("hasMainWrapperPadding",!0)("overflowScroll",!0)}}var Et=(()=>{class t{constructor(){this.recurringExpenseService=d(B),this.route=d(ge),this.router=d(fe),this.currentRecurringExpense=O(null),this.roleService=d(_e)}ngOnInit(){this.route.paramMap.pipe(z(e=>e.get("id")),Ae("params"),Ue(e=>this.recurringExpenseService.getRecurringExpenseByID(e)),P(e=>this.currentRecurringExpense.set(e)),Ae("recurringExpense")).subscribe()}onDeleteRecurringExpense(e){this.recurringExpenseService.removeRecurringExpense(e).pipe(P(()=>{this.router.navigate(["/pages/recurring/recurring-expense"])})).subscribe()}static{this.\u0275fac=function(o){return new(o||t)}}static{this.\u0275cmp=F({type:t,selectors:[["app-recurring-expense-info",8,"page"]],attrs:rn,decls:1,vars:1,consts:[["actionButton",""],["content",""],[3,"pageTitle","hasMainWrapperPadding","overflowScroll"],["class","d-flex gap-2",4,"ngIf"],[1,"d-flex","gap-2"],["class","p-button p-button-outlined p-button-secondary d-flex gap-2 align-items-center",3,"routerLink",4,"ngIf"],["icon","fa-solid fa-trash","label","Delete","severity","danger",3,"onClick",4,"ngIf"],[1,"p-button","p-button-outlined","p-button-secondary","d-flex","gap-2","align-items-center",3,"routerLink"],[1,"fa-solid","fa-pen-to-square"],["icon","fa-solid fa-trash","label","Delete","severity","danger",3,"onClick"],[1,"row","justify-content-center"],[1,"col-6"],["class","h-100 d-flex",4,"ngIf"],[1,"h-100","d-flex"],[1,"col"],[1,"row"],[1,"row","row-gap-2"],[1,"col","col-lg-6"],[1,"d-flex","flex-column"],["for",""],["readonly","","type","text","pInputText","",3,"ngModelChange","ngModel"],["type","text","readonly","","pInputText","",3,"value"],["readonly","","type","text","pInputText","",3,"value"],[1,"col","col-lg-12"],["readonly","","rows","5","cols","30","pTextarea","",3,"value"]],template:function(o,i){o&1&&x(0,un,5,3,"app-main-panel",2),o&2&&G(i.currentRecurringExpense()?0:-1)},dependencies:[L,Z,M,D,K,de,Re,ye,et,he,Y,Je,Q,J,V,k,A,N,Te,Ie],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var vt=[{path:"",redirectTo:"",pathMatch:"full"},{path:"",children:[{path:"",component:_t},{path:"create",component:qe},{path:"details/:id",component:Et},{path:"edit/:id",component:qe}]}];var St=(()=>{class t{constructor(){this.httpService=d(xe)}getAssetValue(e){return this.httpService.post(void 0,"/api/AssetValue/GetList",e)}static{this.\u0275fac=function(o){return new(o||t)}}static{this.\u0275prov=pe({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var dn={filter:{Text:"",Frequency:0,PageNumber:1,PageSize:10},data:null},Oe=Pe(De(dn),Fe(t=>{let s=d(St);return{getAssetValue:ie(te(q(o=>s.getAssetValue(o).pipe(re({next:i=>{T(t,c=>h(f({},c),{data:i}))},error:i=>{console.error("Error fetching asset value:",i)}}))))),updateFilter:o=>{T(t,i=>h(f({},i),{filter:o}))}}}),we({onInit:t=>{t.getAssetValue(t.filter())}}));var gn=t=>["/pages/recurring/recurring-expense/details/",t];function fn(t,s){t&1&&g(0,"div",5)}function xn(t,s){t&1&&(r(0,"tr")(1,"th"),a(2,"Tags"),n(),r(3,"th"),a(4,"Name"),n(),r(5,"th"),a(6,"Account Code"),n(),r(7,"th",8),a(8,"Price on Purchase"),n(),r(9,"th",8),a(10,"Accomulated Depreciation"),n(),r(11,"th",8),a(12,"Book Value"),n(),r(13,"th",8),a(14,"Frequency"),n()())}function _n(t,s){if(t&1&&(r(0,"tr")(1,"td"),a(2),n(),r(3,"td")(4,"a",9),a(5),n()(),r(6,"td"),a(7),n(),r(8,"td",8),a(9),b(10,"number"),n(),r(11,"td",8),a(12),b(13,"number"),n(),r(14,"td",8),a(15),b(16,"number"),n(),r(17,"td",8),a(18),b(19,"number"),n()()),t&2){let e=s.$implicit;l(2),E(e.entityName),l(2),m("routerLink",C(16,gn,e.id)),l(),E(e.name),l(2),E(e.accountCode),l(2),E(w(10,8,e.priceOnPurchase)),l(3),I(" ",w(13,10,e.accumulatedDepreciation)," "),l(3),I(" ",w(16,12,e.bookValue)," "),l(3),I(" ",w(19,14,e.depreciationPerYear)," ")}}function hn(t,s){if(t&1&&(r(0,"p-panel")(1,"p-table",7),x(2,xn,15,0,"ng-template",null,2,_)(4,_n,20,18,"ng-template",null,3,_),n()()),t&2){let e=u(2);l(),m("value",e.store.data().data)("rows",e.store.filter().PageSize)("totalRecords",e.store.data().count)}}function En(t,s){if(t&1&&x(0,hn,6,3,"p-panel",6),t&2){let e=u();m("ngIf",e.store.data())}}var bt=(()=>{class t{constructor(){this.store=d(Oe)}static{this.\u0275fac=function(o){return new(o||t)}}static{this.\u0275cmp=F({type:t,selectors:[["app-asset-value"]],features:[ue([Oe])],decls:5,vars:2,consts:[["actionButton",""],["content",""],["header",""],["body",""],["pageTitle","Asset Value",3,"isSearchableInput","scrollable"],[1,"d-flex","gap-2"],[4,"ngIf"],["styleClass","h-100","dataKey","id",1,"",3,"value","rows","totalRecords"],[1,"text-end"],["target","_blank",1,"link","link-primary",3,"routerLink"]],template:function(o,i){o&1&&(r(0,"app-main-panel",4),x(1,fn,1,0,"ng-template",null,0,_)(3,En,1,1,"ng-template",null,1,_),n()),o&2&&m("isSearchableInput",!0)("scrollable",!0)},dependencies:[L,M,D,K,A,N,Ne,Ve,V,k],encapsulation:2})}}return t})();var fr=[{path:"",redirectTo:"recurring-expense",pathMatch:"full"},{path:"recurring-expense",children:vt},{path:"asset-value",component:bt},{path:"post-to-journal",loadComponent:()=>import("./chunk-HQHEWKLC.js").then(t=>t.PostRecurringExpenseComponent)}];export{fr as RECURRING_ROUTES};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as D,b as le}from"./chunk-VKUW7E75.js";import"./chunk-LBXNL7E4.js";import{m as H}from"./chunk-Q4XWXOWE.js";import"./chunk-WL6ZZCYW.js";import{a as ne,b as oe}from"./chunk-BME4Z6DH.js";import"./chunk-VSDW2RJ5.js";import"./chunk-7L5IAWG2.js";import{a as U,b as X}from"./chunk-5U7KZJ3H.js";import{a as re,b as ae}from"./chunk-CN6AT4LE.js";import{b as ie}from"./chunk-FHJOSHI3.js";import"./chunk-KONCSTVQ.js";import"./chunk-FMAG3RQL.js";import{i as te}from"./chunk-J3HFAWXU.js";import"./chunk-VM56C6ZV.js";import{a as $,b as ee}from"./chunk-ISIYG4D5.js";import"./chunk-ALLR2NXQ.js";import"./chunk-FNGX2XFA.js";import"./chunk-BFEM6LX7.js";import{w as Y,x as Z}from"./chunk-O44DI62I.js";import"./chunk-DTYVTTET.js";import{e as q,j as K,x as Q}from"./chunk-MGIEURA2.js";import"./chunk-TOR7QRRB.js";import{a as G}from"./chunk-YQYRAH7V.js";import"./chunk-KL3TPLRB.js";import"./chunk-RVUOVLL5.js";import"./chunk-GGQ7LRWG.js";import"./chunk-F2X3VGZZ.js";import{p as R,u as A}from"./chunk-DM2JLWKE.js";import{Dc as z,Eb as F,Ec as P,Ha as b,Mb as u,Oc as V,Pb as T,Pc as k,Rb as v,Sc as x,W,Wb as r,Xb as a,Y as I,Yb as w,_ as N,ac as _,fc as f,gc as s,h as B,ia as M,ib as m,qa as l,ra as p,s as S,sa as O,sc as C,ta as L,xc as c,yb as j,yc as g,zc as d}from"./chunk-6QJHEOXN.js";import{a as E}from"./chunk-YQFG5XE2.js";var pe=()=>({height:"calc(100vh - 100px)"});function me(i,h){if(i&1){let e=_();r(0,"p-button",7),f("onClick",function(){l(e);let t=s(2);return p(t.onFormat())}),a()}}function se(i,h){if(i&1){let e=_();r(0,"p-button",8),f("onClick",function(){l(e);let t=s(2);return p(t.openMigrateDialog())}),a()}}function ue(i,h){if(i&1&&(r(0,"div",4),F(1,me,1,0,"p-button",5)(2,se,1,0,"p-button",6),a()),i&2){let e=s();m(),v(e.roleService.permissions().migrate.delete?1:-1),m(),v(e.roleService.permissions().migrate.create?2:-1)}}function ce(i,h){if(i&1){let e=_();r(0,"div",9)(1,"div",10)(2,"label",11),C(3,"From"),a(),r(4,"p-datepicker",12),d("ngModelChange",function(t){l(e);let o=s();return g(o.filter().From,t)||(o.filter().From=t),p(t)}),a()(),r(5,"div",10)(6,"label",11),C(7,"To"),a(),r(8,"p-datepicker",12),d("ngModelChange",function(t){l(e);let o=s();return g(o.filter().To,t)||(o.filter().To=t),p(t)}),a()(),r(9,"div",10)(10,"label",11),C(11,"Page Number"),a(),r(12,"p-inputnumber",13),d("ngModelChange",function(t){l(e);let o=s();return g(o.filter().PageNumber,t)||(o.filter().PageNumber=t),p(t)}),a()(),r(13,"div",10)(14,"label",11),C(15,"Page Size"),a(),r(16,"p-inputnumber",13),d("ngModelChange",function(t){l(e);let o=s();return g(o.filter().PageSize,t)||(o.filter().PageSize=t),p(t)}),a()()()}if(i&2){let e=s();m(4),u("showIcon",!0),c("ngModel",e.filter().From),m(4),u("showIcon",!0),c("ngModel",e.filter().To),m(4),c("ngModel",e.filter().PageNumber),m(4),c("ngModel",e.filter().PageSize)}}function ge(i,h){if(i&1&&(r(0,"p-scroll-panel")(1,"p-panel")(2,"div",14),w(3,"app-migration-cards",15),V(4,"async"),O(),r(5,"svg",16),w(6,"path",17),a(),L(),w(7,"app-migration-cards",18),V(8,"async"),a()()()),i&2){let e=s();T(P(12,pe)),m(),T(P(13,pe)),m(2),u("migrationCount",k(4,8,e.countInPOS$))("migrationTitle",e.pageTitle),m(4),u("migrationCount",k(8,10,e.countInBooks$))("migrationTitle",e.pageTitle)}}var je=(()=>{class i{constructor(){this.migrateService=M(D),this.refresh$=new B(void 0),this.toastr=M(G),this.pageTitle="Manual Journal",this.filter=b({From:new Date,To:new Date,PageSize:45e3,PageNumber:1}),this.isFilterDialogOpen=b(!1),this.previousFilter=null,this.roleService=M(H)}ngOnInit(){let e=this.refresh$.pipe(I(()=>this.migrateService.getManualJournalCount()),W(1));this.countInPOS$=e.pipe(S(n=>Number(n.pos))),this.countInBooks$=e.pipe(S(n=>Number(n.books)))}openMigrateDialog(){this.previousFilter=E({},this.filter()),this.isFilterDialogOpen.set(!0)}onMigrate(){this.migrateService.migrateManualJournal(this.filter()).pipe(N(()=>{this.isFilterDialogOpen.update(e=>!e),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(n=>{this.refresh$.next(),this.toastr.success(n.message,"Format Successful")})}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275cmp=j({type:i,selectors:[["app-manual-journal"]],features:[z([D])],decls:7,vars:2,consts:[["actionButton",""],["filters",""],["content",""],[3,"filterConfirmed","isDialogFilterVisibleChange","filterCanceled","pageTitle","isDialogFilterVisible"],[1,"d-flex","gap-2"],["label","Format","severity","danger"],["label","Create"],["label","Format","severity","danger",3,"onClick"],["label","Create",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(n,t){if(n&1){let o=_();r(0,"app-main-panel",3),f("filterConfirmed",function(){return l(o),p(t.onMigrate())}),d("isDialogFilterVisibleChange",function(y){return l(o),g(t.isFilterDialogOpen,y)||(t.isFilterDialogOpen=y),p(y)}),f("filterCanceled",function(){return l(o),p(t.onFilterCanceled())}),F(1,ue,3,2,"ng-template",null,0,x)(3,ce,17,6,"ng-template",null,1,x)(5,ge,9,14,"ng-template",null,2,x),a()}n&2&&(u("pageTitle",t.pageTitle),c("isDialogFilterVisible",t.isFilterDialogOpen))},dependencies:[te,A,R,ie,Z,Y,X,U,ee,$,le,oe,ne,Q,q,K,ae,re],encapsulation:2})}}return i})();export{je as ManualJournalComponent};
|