dealposbooks 5.48.0 → 5.49.1

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.
Files changed (108) hide show
  1. package/3rdpartylicenses.txt +5 -5
  2. package/assets/scss/layouts/_sidebar.scss +2 -1
  3. package/assets/scss/style.scss +10 -0
  4. package/{chunk-DDM2KWNX.js → chunk-2LNMV22E.js} +1 -1
  5. package/chunk-3KWJOHNE.js +1 -0
  6. package/chunk-3ZDXMXR7.js +1 -0
  7. package/chunk-4CT2IUWQ.js +1 -0
  8. package/chunk-5DRALZZF.js +1 -0
  9. package/{chunk-VKT27VPR.js → chunk-64PX5TMF.js} +2 -2
  10. package/chunk-6JPM6TG4.js +1 -0
  11. package/chunk-75DDNXGP.js +1 -0
  12. package/chunk-7A5MPGKC.js +1 -0
  13. package/{chunk-YPOBALKC.js → chunk-AFKKNLDY.js} +1 -1
  14. package/chunk-AQYWE6TS.js +1 -0
  15. package/chunk-AYUYBSUN.js +1 -0
  16. package/chunk-BGO4VAXH.js +1 -0
  17. package/chunk-BRKRIPYY.js +1 -0
  18. package/{chunk-NNNKDAA2.js → chunk-CAS5GLLU.js} +1 -1
  19. package/{chunk-FUCKNGW4.js → chunk-CB44HQLK.js} +2 -2
  20. package/chunk-CUCSYZR2.js +202 -0
  21. package/{chunk-F6LZM7H5.js → chunk-DGACZ747.js} +1 -1
  22. package/chunk-DNH5W432.js +1 -0
  23. package/{chunk-FSB3LHPU.js → chunk-EBEY2MBR.js} +1 -1
  24. package/{chunk-RXR5DXWS.js → chunk-ELMSU4U7.js} +1 -1
  25. package/{chunk-2JNXKEYZ.js → chunk-EMJBQMMM.js} +1 -1
  26. package/{chunk-VW2FJYIZ.js → chunk-ES2YST7G.js} +1 -1
  27. package/{chunk-CEK7MQW2.js → chunk-F7JOE6RA.js} +1 -1
  28. package/{chunk-LBREDZL5.js → chunk-FWAGEKIF.js} +1 -1
  29. package/chunk-G75NZLKG.js +1 -0
  30. package/chunk-GPXKVMG6.js +1 -0
  31. package/{chunk-LXLOWSN6.js → chunk-HCJK6VTO.js} +1 -1
  32. package/chunk-IU5ELUD3.js +1 -0
  33. package/chunk-IUM4NWIG.js +1 -0
  34. package/chunk-L5U2UBAI.js +1 -0
  35. package/chunk-LJYIEJUY.js +1 -0
  36. package/{chunk-W63NE6LU.js → chunk-LKOCOLCM.js} +4 -4
  37. package/{chunk-ZQWFATZY.js → chunk-LUNMW7NC.js} +1 -1
  38. package/chunk-LWPIHDR2.js +130 -0
  39. package/chunk-MJZFJU44.js +1 -0
  40. package/chunk-MMRINCFB.js +1 -0
  41. package/chunk-MR3OGQ2R.js +1 -0
  42. package/chunk-N3QZNL7B.js +7 -0
  43. package/chunk-NGLRDAET.js +1 -0
  44. package/chunk-NMU2YBAB.js +1 -0
  45. package/chunk-O26EFRQ7.js +1 -0
  46. package/chunk-O7CGBSJM.js +1 -0
  47. package/chunk-PDW76PO5.js +1 -0
  48. package/{chunk-BG6BR7KI.js → chunk-PKO36DGM.js} +1 -1
  49. package/{chunk-FVYL3BQ7.js → chunk-PMLX776V.js} +1 -1
  50. package/{chunk-SFMFIWMX.js → chunk-PNWKXR6W.js} +1 -1
  51. package/{chunk-UEFTMQDF.js → chunk-Q4KG7LH6.js} +1 -1
  52. package/chunk-QB5TEFDM.js +1 -0
  53. package/{chunk-NPXVSAMB.js → chunk-R6JSPQYG.js} +1 -1
  54. package/chunk-RYDK5DLZ.js +1 -0
  55. package/chunk-TXDQN45R.js +8 -0
  56. package/chunk-UHYWK6PC.js +129 -0
  57. package/{chunk-EQTP2O7O.js → chunk-UJQIYFRL.js} +1 -1
  58. package/chunk-UKAT6MZE.js +1 -0
  59. package/chunk-UQIX3KIP.js +1 -0
  60. package/chunk-V62KSQJI.js +1 -0
  61. package/chunk-VIKI37CB.js +1 -0
  62. package/{chunk-T367AQJ2.js → chunk-VKNINE5Q.js} +1 -1
  63. package/chunk-WUBLGOX2.js +1 -0
  64. package/chunk-XVQLGYG2.js +1 -0
  65. package/chunk-YP2RRUG5.js +1 -0
  66. package/chunk-ZC3INGLB.js +1 -0
  67. package/index.html +2 -2
  68. package/main-SFIF6D5T.js +1 -0
  69. package/package.json +1 -1
  70. package/{styles-4L5CAR46.css → styles-FYY2LVCE.css} +1 -1
  71. package/chunk-2H7KQZEC.js +0 -8
  72. package/chunk-3NWFEFT2.js +0 -1
  73. package/chunk-4LI7GDDM.js +0 -1
  74. package/chunk-5FV7K5RQ.js +0 -1
  75. package/chunk-6GQ4PTPT.js +0 -7
  76. package/chunk-7OP477BS.js +0 -1
  77. package/chunk-7WCUKMRG.js +0 -1
  78. package/chunk-ACDLAA4B.js +0 -1
  79. package/chunk-B3VZ2ZHJ.js +0 -1
  80. package/chunk-BNPR5SPH.js +0 -1
  81. package/chunk-CVDRHTES.js +0 -1
  82. package/chunk-CZSVRFCL.js +0 -1
  83. package/chunk-DSZOROE6.js +0 -1
  84. package/chunk-F3RSX7TC.js +0 -1
  85. package/chunk-G42V3ZZU.js +0 -1
  86. package/chunk-H7GQCGCR.js +0 -1
  87. package/chunk-IDHDHBFV.js +0 -202
  88. package/chunk-JE4XET33.js +0 -1
  89. package/chunk-LCKRY7CZ.js +0 -1
  90. package/chunk-O76TW6JA.js +0 -1
  91. package/chunk-OVDG3ZBT.js +0 -1
  92. package/chunk-PQL4GCC5.js +0 -1
  93. package/chunk-RE5GBQH6.js +0 -1
  94. package/chunk-S2BFXF7C.js +0 -1
  95. package/chunk-SUXEBUIX.js +0 -1
  96. package/chunk-SV6BE4HG.js +0 -130
  97. package/chunk-TOGXYKTE.js +0 -1
  98. package/chunk-UI2UMYSE.js +0 -1
  99. package/chunk-V22QPBAO.js +0 -1
  100. package/chunk-VVAI7ZGN.js +0 -1
  101. package/chunk-W5E37PZP.js +0 -1
  102. package/chunk-WKHQICFW.js +0 -1
  103. package/chunk-WOYTUHJD.js +0 -1
  104. package/chunk-WPJGKTVO.js +0 -129
  105. package/chunk-XCTUTMD3.js +0 -1
  106. package/chunk-XOSALV7T.js +0 -1
  107. package/chunk-Y7SF5NXD.js +0 -1
  108. package/main-XTOQBEFQ.js +0 -1
package/chunk-CVDRHTES.js DELETED
@@ -1 +0,0 @@
1
- import{a as Q}from"./chunk-D6IS6PE6.js";import{f as xt}from"./chunk-ENH6HA3V.js";import{b as vt}from"./chunk-FSB3LHPU.js";import"./chunk-AMGBUOC4.js";import"./chunk-UPSNJEHO.js";import{a as H}from"./chunk-BT7Y4ADP.js";import{b as Pt}from"./chunk-DJXQKSLT.js";import{a as P,b as D}from"./chunk-WXIG4CXY.js";import"./chunk-WMZF4DQK.js";import"./chunk-QPPFPDWZ.js";import{g as S,h as E,i as Mt}from"./chunk-W63NE6LU.js";import"./chunk-S27Z7D3D.js";import{a as Tt,b as Ot}from"./chunk-AD247LWQ.js";import"./chunk-BKTBVFNX.js";import{c as ft}from"./chunk-ZFNIPERQ.js";import{y as kt,z as yt}from"./chunk-ME4ALIS7.js";import{a as w,b as N}from"./chunk-DTYVTTET.js";import{La as bt,x as Ct}from"./chunk-VMI3QWC6.js";import{l as gt}from"./chunk-F7PVAVLQ.js";import{a as ut,c as q}from"./chunk-DSZOROE6.js";import"./chunk-2BI7WNJP.js";import{A as _t,q as mt,s as ht}from"./chunk-ZK43JB4A.js";import"./chunk-F2X3VGZZ.js";import{Da as b,Eb as _,Fa as $,Ha as h,L as z,Mb as m,Oc as J,Pc as K,Rb as f,Sb as it,Sc as X,Ta as tt,Ub as ot,Vb as at,Wb as a,Wc as lt,Xb as r,Yb as g,_ as I,ac as C,bd as dt,ca as Z,cd as T,fc as B,gc as s,ia as u,ib as p,mc as rt,nb as et,nc as st,oc as pt,qa as l,ra as d,rc as R,s as F,sc as k,t as A,tb as nt,tc as ct,u as j,uc as U,wa as W,xc as y,yb as O,yc as M,zc as v}from"./chunk-6QJHEOXN.js";import{a as L,b as V}from"./chunk-YQFG5XE2.js";var G=(()=>{class n{constructor(){this.httpService=u(ut)}createDashboardParams(t){return new _t().set("DashboardPeriod",t)}fetchDashboardLoader(){return this.httpService.get(void 0,"api/DashboardLoader")}fetchCashAndSplineData(t){let e=this.createDashboardParams(t);return this.httpService.get(void 0,"api/dashboard/getcashandbank",{params:e})}fetchCashAndBankPieData(t){let e=this.createDashboardParams(t);return this.httpService.get(void 0,"api/dashboard/getcashandbankpiechart",{params:e})}fetchExpenseSplineData(t){let e=this.createDashboardParams(t);return this.httpService.get(void 0,"api/dashboard/GetExpense",{params:e})}fetchExpensePieData(t){let e=this.createDashboardParams(t);return this.httpService.get(void 0,"api/dashboard/GetExpensePieChart",{params:e})}static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275prov=Z({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})();function Bt(n,c){if(n&1){let t=C();a(0,"p-card",2)(1,"highcharts-chart",5),v("updateChange",function(i){l(t);let o=s();return M(o.updateFlag,i)||(o.updateFlag=i),d(i)}),r()()}if(n&2){let t=s();p(),m("constructorType",t.chartConstructor)("options",t.chartOptionsSpline),y("update",t.updateFlag),m("oneToOne",t.oneToOneFlag)}}function Lt(n,c){n&1&&(a(0,"p-card"),g(1,"p-skeleton",6),r())}function Vt(n,c){if(n&1){let t=C();a(0,"p-card",4)(1,"highcharts-chart",5),v("updateChange",function(i){l(t);let o=s();return M(o.updateFlag,i)||(o.updateFlag=i),d(i)}),r()()}if(n&2){let t=s();p(),m("constructorType",t.chartConstructor)("options",t.chartOptionsPie),y("update",t.updateFlag),m("oneToOne",t.oneToOneFlag)}}function Ft(n,c){n&1&&(a(0,"p-card"),g(1,"p-skeleton",6),r())}var Et=(()=>{class n{constructor(){this.chartConstructor="chart",this.updateFlag=!1,this.oneToOneFlag=!0,this.chartOptionsSpline={},this.chartOptionsPie={},this.dashboardService=u(G),this.cdr=u(lt),this.injector=u(W),this.params=h({dashboardPeriod:2}),this.cashBankTitle=b(),this.amountCashBank=b(),this.isLoading=nt(!0),this.tooltip=b(),this.cashAndBankSource=N((q.production?w(this.params):w(this.params).pipe(z(500))).pipe(j(({dashboardPeriod:t})=>A([this.dashboardService.fetchCashAndSplineData(t),this.dashboardService.fetchCashAndBankPieData(t)])),H("Cash & Bank Dashboard Data"),I(([t])=>{this.isLoading.set(!1),this.amountCashBank.emit(t.data),this.tooltip.emit(t.toolTip)}),F(([t,e])=>({splineData:t,pieData:e}))),{initialValue:null}),T(()=>{let t=this.cashAndBankSource();if(!t)return;let{splineData:e,pieData:i}=t;this.cashBankTitle.emit(e.title),tt(()=>{this.chartOptionsSpline={chart:{height:300},title:{text:e.chartTitle,align:"left",style:{fontWeight:"normal"}},xAxis:{categories:[...e.chart.labels]},yAxis:{title:{text:""}},series:[V(L({},e.chart.series),{type:"spline",name:"Amount",data:[...e.chart.series.data]})],plotOptions:{line:{dataLabels:{enabled:!0},enableMouseTracking:!1}}},this.chartOptionsPie={chart:{type:"pie"},title:{text:e.pieTitle,align:"left",style:{fontWeight:"normal"}},series:[{type:"pie",name:"Amount",data:[...i.series.filter(o=>o.y>0)]}],plotOptions:{pie:{allowPointSelect:!0,cursor:"pointer",dataLabels:[{enabled:!1}],showInLegend:!0}}},this.updateFlag=!0,this.cdr.detectChanges()},{injector:this.injector})})}static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275cmp=O({type:n,selectors:[["app-cash-bank"]],inputs:{isLoading:[1,"isLoading"]},outputs:{cashBankTitle:"cashBankTitle",amountCashBank:"amountCashBank",isLoading:"isLoadingChange",tooltip:"tooltip"},decls:7,vars:2,consts:[[1,"row"],[1,"col-12","col-md-6","col-lg-7"],[1,"chart"],[1,"col-12","col-md-6","col-lg-5"],[1,"pie_chart"],[1,"chart",3,"updateChange","constructorType","options","update","oneToOne"],["width","100%","height","15rem"]],template:function(e,i){e&1&&(a(0,"div",0)(1,"div",1),_(2,Bt,2,4,"p-card",2)(3,Lt,2,0,"p-card"),r(),a(4,"div",3),_(5,Vt,2,4,"p-card",4)(6,Ft,2,0,"p-card"),r()()),e&2&&(p(2),f(i.isLoading()?3:2),p(3),f(i.isLoading()?6:5))},dependencies:[Q,E,S,D,P],styles:[".chart[_ngcontent-%COMP%]{width:100%;height:400px;display:block} p-card.chart .p-card-body{padding-top:0!important;padding-bottom:0!important} p-card.pie_chart .p-card-body{padding-top:0!important;padding-bottom:0!important}"]})}}return n})();function At(n,c){if(n&1){let t=C();a(0,"p-card",2)(1,"highcharts-chart",5),v("updateChange",function(i){l(t);let o=s();return M(o.updateFlag,i)||(o.updateFlag=i),d(i)}),r()()}if(n&2){let t=s();p(),m("constructorType",t.chartConstructor)("options",t.chartOptionsSpline),y("update",t.updateFlag),m("oneToOne",t.oneToOneFlag)}}function jt(n,c){n&1&&(a(0,"p-card"),g(1,"p-skeleton",6),r())}function zt(n,c){if(n&1){let t=C();a(0,"p-card",4)(1,"highcharts-chart",5),v("updateChange",function(i){l(t);let o=s();return M(o.updateFlag,i)||(o.updateFlag=i),d(i)}),r()()}if(n&2){let t=s();p(),m("constructorType",t.chartConstructor)("options",t.chartOptionsPie),y("update",t.updateFlag),m("oneToOne",t.oneToOneFlag)}}function It(n,c){n&1&&(a(0,"p-card"),g(1,"p-skeleton",6),r())}var Dt=(()=>{class n{constructor(){this.chartConstructor="chart",this.updateFlag=!1,this.oneToOneFlag=!0,this.chartOptionsSpline={},this.chartOptionsPie={},this.dashboardService=u(G),this.isLoading=h(!0),this.amountExpense=b(),this.params=h({dashboardPeriod:2}),this.expenseTitle=b(),this.tooltip=b(),this.expenseSource=N((q.production?w(this.params):w(this.params).pipe(z(500))).pipe(j(({dashboardPeriod:t})=>A([this.dashboardService.fetchExpenseSplineData(t),this.dashboardService.fetchExpensePieData(t)])),H("Expense Dashboard Data"),I(([t])=>{this.isLoading.set(!1),this.amountExpense.emit(t.data),this.expenseTitle.emit(t.title),this.tooltip.emit(t.toolTip)}),F(([t,e])=>({splineData:t,pieData:e}))),{initialValue:null}),T(()=>{let t=this.expenseSource();if(!t)return;let{splineData:e,pieData:i}=t;console.log("Spline Data:",e),console.log("Pie Data:",i),this.chartOptionsSpline={chart:{height:300},title:{text:e.chartTitle,align:"left",style:{fontWeight:"normal"}},xAxis:{categories:[...e.chart.labels]},yAxis:{title:{text:""}},series:[V(L({},e.chart.series),{type:"spline",name:"Amount",data:[...e.chart.series.data]})],plotOptions:{line:{dataLabels:{enabled:!0},enableMouseTracking:!1}}},this.chartOptionsPie={chart:{type:"pie"},title:{text:e.pieTitle,align:"left",style:{fontWeight:"normal"}},series:[{type:"pie",name:"Amount",data:[...i.series.filter(o=>o.y>0)]}],plotOptions:{pie:{allowPointSelect:!0,cursor:"pointer",dataLabels:[{enabled:!1}],showInLegend:!0}}},this.updateFlag=!0})}static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275cmp=O({type:n,selectors:[["app-expense"]],outputs:{amountExpense:"amountExpense",expenseTitle:"expenseTitle",tooltip:"tooltip"},decls:7,vars:2,consts:[[1,"row"],[1,"col-12","col-md-6","col-lg-7"],[1,"chart"],[1,"col-12","col-md-6","col-lg-5"],[1,"pie_chart"],[1,"chart",3,"updateChange","constructorType","options","update","oneToOne"],["width","100%","height","15rem"]],template:function(e,i){e&1&&(a(0,"div",0)(1,"div",1),_(2,At,2,4,"p-card",2)(3,jt,2,0,"p-card"),r(),a(4,"div",3),_(5,zt,2,4,"p-card",4)(6,It,2,0,"p-card"),r()()),e&2&&(p(2),f(i.isLoading()?3:2),p(3),f(i.isLoading()?6:5))},dependencies:[Q,E,S,D,P],styles:[".chart[_ngcontent-%COMP%]{width:100%;height:400px;display:block} p-card.chart .p-card-body{padding-top:0!important;padding-bottom:0!important} p-card.pie_chart .p-card-body{padding-top:0!important;padding-bottom:0!important}"]})}}return n})();function Wt(n,c){if(n&1&&(a(0,"span"),k(1),r()),n&2){let t=c.$implicit;p(),ct(t)}}function Rt(n,c){if(n&1&&(a(0,"div",21),ot(1,Wt,2,1,"span",null,it),r()),n&2){let t=s(3);p(),at(t.tooltipExpense())}}function qt(n,c){if(n&1){let t=C();g(0,"input",10,1),a(2,"button",11),B("click",function(i){l(t);let o=R(1),x=s(2);return d(x.handleLinkClick(i,o))}),a(3,"div",12)(4,"div",13)(5,"div",14),g(6,"i",15),r()(),a(7,"p-card",16,2),_(9,Rt,3,0,"ng-template",null,3,X),a(11,"div",17)(12,"div",18)(13,"span",19),k(14,"Expense"),r(),a(15,"p",20),k(16),J(17,"number"),r()()()()()()}if(n&2){let t=R(10),e=s(2);p(7),m("pTooltip",t)("fitContent",!1),p(9),U(" ",K(17,3,e.amounts.expense())," ")}}function Nt(n,c){n&1&&g(0,"p-skeleton",9)}function Ht(n,c){if(n&1&&(a(0,"div",17)(1,"div",18)(2,"span",19),k(3,"Cash and Bank"),r(),a(4,"p",20),k(5),J(6,"number"),r()()()),n&2){let t=s(3);p(5),U(" ",t.amounts.cashBank()===0?"-":K(6,1,t.amounts.cashBank())," ")}}function Qt(n,c){if(n&1){let t=C();g(0,"input",22,4),a(2,"button",11),B("click",function(i){l(t);let o=R(1),x=s(2);return d(x.handleLinkClick(i,o))}),a(3,"div",12)(4,"div",23),g(5,"i",24),r(),a(6,"p-card",25,2),_(8,Ht,7,3,"ng-template",26),r()()()}if(n&2){let t=s(2);p(6),m("pTooltip",t.tooltip.cashBank())}}function Gt(n,c){n&1&&g(0,"p-skeleton",9)}function Ut(n,c){if(n&1){let t=C();a(0,"app-expense",27),B("amountExpense",function(i){l(t);let o=s(2);return d(o.onAmountExpense(i))})("expenseTitle",function(i){l(t);let o=s(2);return d(o.onExpenseTitle(i))})("tooltip",function(i){l(t);let o=s(2);return d(o.onExpenseTooltip(i))}),r()}}function Jt(n,c){if(n&1){let t=C();a(0,"app-cash-bank",28),B("cashBankTitle",function(i){l(t);let o=s(2);return d(o.onCashBankTitle(i))})("amountCashBank",function(i){l(t);let o=s(2);return d(o.onAmountCashBank(i))})("tooltip",function(i){l(t);let o=s(2);return d(o.onCashBankTooltip(i))}),r()}}function Kt(n,c){if(n&1&&(a(0,"p-panel")(1,"main",6)(2,"div",7)(3,"div",8),_(4,qt,18,5)(5,Nt,1,0,"p-skeleton",9),r(),a(6,"div",8),_(7,Qt,9,1)(8,Gt,1,0,"p-skeleton",9),r()(),_(9,Ut,1,0,"app-expense")(10,Jt,1,0,"app-cash-bank"),r()()),n&2){let t=s();p(4),f(t.isLoading()?5:4),p(3),f(t.isLoading()?8:7),p(2),f(t.activeIndex()===0?9:t.activeIndex()===1?10:-1)}}var Ge=(()=>{class n{constructor(){this.activeIndex=h(0),this.pageTitle=h("Dashboard"),this.isLoading=h(!0),this.tooltip={cashBank:h(""),expense:h("")},this.renderer=u(et),this.injector=u(W),this.tooltipExpense=dt(()=>this.tooltip.expense().match(/^(.*?)\s*(\[[^\]]+\])$/)?[RegExp.$1.trim(),RegExp.$2.trim()]:[this.tooltip.expense()]),this.amounts={cashBank:h(0),expense:h(0)}}ngAfterViewInit(){T(()=>{this.isLoading()||queueMicrotask(()=>this.runCardEffect())},{injector:this.injector}),T(()=>{this.activeIndex(),queueMicrotask(()=>this.runCardEffect())},{injector:this.injector})}runCardEffect(){let t=this.activeIndex(),e=this.cards?.toArray();if(!e||e.length===0)return;e.forEach(o=>{let x=o.nativeElement.querySelector(".p-card-body");x&&(this.renderer.setStyle(x,"height","90px"),this.renderer.removeStyle(x,"background-color"),this.renderer.removeStyle(x,"box-shadow"))});let i=e[t];if(i){let o=i.nativeElement.querySelector(".p-card-body");o&&(this.renderer.setStyle(o,"background-color","#F0F0F0"),this.renderer.setStyle(o,"overflow","hidden"))}}onTabChange(t){this.activeIndex.set(t)}handleLinkClick(t,e){t.stopPropagation(),e.checked=!e.checked,e.checked&&(console.log(e.value),this.onTabChange(Number(e.value)))}onCashBankTitle(t){this.pageTitle.set(t),this.isLoading.set(!1)}onExpenseTitle(t){this.pageTitle.set(t),this.isLoading.set(!1)}onAmountCashBank(t){console.log("Total Amount from CashBank:",t),this.amounts.cashBank.set(t)}onAmountExpense(t){console.log("Total Amount from Expense:",t),this.amounts.expense.set(t)}onExpenseTooltip(t){this.tooltip.expense.set(t)}onCashBankTooltip(t){this.tooltip.cashBank.set(t)}static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275cmp=O({type:n,selectors:[["ng-component"]],viewQuery:function(e,i){if(e&1&&rt(P,5,$),e&2){let o;st(o=pt())&&(i.cards=o)}},decls:3,vars:5,consts:[["content",""],["expenseCheckbox",""],["card",""],["tooltipContent",""],["cashBankCheckbox",""],[3,"hasMainWrapperPadding","limitStrLength","overflowScroll","isLoading","pageTitle"],[1,"d-flex","flex-column","row-gap-10"],[1,"row","row-gap-24"],[1,"col-12","col-md-6","col-lg-4"],["width","100%","height","8rem"],["name","dashboardOption","type","radio","hidden","","value","0"],[1,"btn","p-0","border-none","btn-link","w-100",3,"click"],[1,"card-container"],[1,"box-icon",2,"background-color","#d73636"],[1,"d-flex","text-white","align-items-baseline"],[1,"fa-solid","fa-circle-dollar-to-slot"],["tooltipPosition","top",3,"pTooltip","fitContent"],[1,"d-flex","justify-content-end"],[1,"d-flex","flex-column","align-items-end"],[1,"fs-5"],[1,"box-number","fs-4"],[1,"d-flex","flex-column"],["name","dashboardOption","type","radio","hidden","","value","1"],[1,"box-icon"],[1,"fa-duotone","fa-solid","fa-wallet","text-white"],["tooltipPosition","top",3,"pTooltip"],["pTemplate","content"],[3,"amountExpense","expenseTitle","tooltip"],[3,"cashBankTitle","amountCashBank","tooltip"]],template:function(e,i){e&1&&(a(0,"app-main-panel",5),_(1,Kt,11,3,"ng-template",null,0,X),r()),e&2&&m("hasMainWrapperPadding",!0)("limitStrLength",50)("overflowScroll",!0)("isLoading",i.isLoading())("pageTitle",i.pageTitle())},dependencies:[xt,ft,Mt,D,P,bt,ht,mt,Pt,gt,Ot,Tt,Ct,vt,Et,Dt,E,S,yt,kt],styles:['@charset "UTF-8";.card-container[_ngcontent-%COMP%] a[_ngcontent-%COMP%], .card-container[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0}.card-container[_ngcontent-%COMP%]{position:relative;height:4rem}.card-container[_ngcontent-%COMP%] .box-icon[_ngcontent-%COMP%]{height:50px;width:50px;background-color:#2175d0;display:flex;justify-content:center;align-items:center;z-index:2;position:relative;border-radius:4px;left:1.5rem;top:-.6rem}.card-container[_ngcontent-%COMP%] .box-icon[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:30px}.card-container[_ngcontent-%COMP%] .box-number[_ngcontent-%COMP%]{font-size:1.25rem;font-weight:500}.card-container[_ngcontent-%COMP%] .box-title[_ngcontent-%COMP%]{font-size:1rem}.card-container[_ngcontent-%COMP%] p-card[_ngcontent-%COMP%]{position:absolute;top:calc(2.6rem - 55%);left:0;width:100%;z-index:1;margin:0!important;padding:0!important}@media (max-width: 85rem){.card-container[_ngcontent-%COMP%] a[_ngcontent-%COMP%], .card-container[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0}.card-container[_ngcontent-%COMP%]{position:relative;height:4rem}.card-container[_ngcontent-%COMP%] .box-icon[_ngcontent-%COMP%]{height:50px;width:50px;background-color:#2175d0;display:flex;justify-content:center;align-items:center;z-index:2;position:relative;border-radius:4px;left:1.5rem;top:-.6rem}.card-container[_ngcontent-%COMP%] .box-icon[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:30px}.card-container[_ngcontent-%COMP%] .box-number[_ngcontent-%COMP%]{font-size:1.25rem;font-weight:500}.card-container[_ngcontent-%COMP%] .box-title[_ngcontent-%COMP%]{font-size:1rem}.card-container[_ngcontent-%COMP%] p-card[_ngcontent-%COMP%]{position:absolute;top:calc(2.6rem - 55%);left:0;width:100%;z-index:1;margin:0!important;padding:0!important}}@media (min-width: 85.001rem) and (max-width: 97.999rem){.card-container[_ngcontent-%COMP%] a[_ngcontent-%COMP%], .card-container[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0}.card-container[_ngcontent-%COMP%]{position:relative;height:4rem}.card-container[_ngcontent-%COMP%] .box-icon[_ngcontent-%COMP%]{height:50px;width:50px;background-color:#2175d0;display:flex;justify-content:center;align-items:center;z-index:2;position:relative;border-radius:4px;left:1.5rem;top:-.6rem}.card-container[_ngcontent-%COMP%] .box-icon[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:30px}.card-container[_ngcontent-%COMP%] .box-number[_ngcontent-%COMP%]{font-size:1.25rem;font-weight:500}.card-container[_ngcontent-%COMP%] .box-title[_ngcontent-%COMP%]{font-size:1rem}.card-container[_ngcontent-%COMP%] p-card[_ngcontent-%COMP%]{position:absolute;top:calc(2.6rem - 55%);left:0;width:100%;z-index:1;margin:0!important;padding:0!important}}@media (min-width: 98rem){.card-container[_ngcontent-%COMP%] a[_ngcontent-%COMP%], .card-container[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0}.card-container[_ngcontent-%COMP%]{position:relative;height:4rem}.card-container[_ngcontent-%COMP%] .box-icon[_ngcontent-%COMP%]{height:80px;width:80px;background-color:#2175d0;display:flex;justify-content:center;align-items:center;z-index:2;position:relative;border-radius:4px;left:1.5rem;top:-.6rem}.card-container[_ngcontent-%COMP%] .box-icon[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:40px}.card-container[_ngcontent-%COMP%] .box-number[_ngcontent-%COMP%]{font-size:1.25rem;font-weight:500}.card-container[_ngcontent-%COMP%] .box-title[_ngcontent-%COMP%]{font-size:1.15rem}.card-container[_ngcontent-%COMP%] p-card[_ngcontent-%COMP%]{position:absolute;top:calc(2.6rem - 55%);left:0;width:100%;z-index:1;margin:0!important;padding:0!important}}']})}}return n})();export{Ge as Dashboard1Component};
package/chunk-CZSVRFCL.js DELETED
@@ -1 +0,0 @@
1
- import{a as Xe,b as Ze,c as et,d as tt,e as nt,f as ot}from"./chunk-RM5HLXNW.js";import{a as Qe}from"./chunk-G4XX7EU2.js";import{a as de,b as fe}from"./chunk-3VQUNDVT.js";import{d as le,e as Je,i as Ke,j as qe,k as ne}from"./chunk-F6LZM7H5.js";import"./chunk-FSB3LHPU.js";import"./chunk-AMGBUOC4.js";import"./chunk-UPSNJEHO.js";import{a as Le}from"./chunk-BT7Y4ADP.js";import{a as re,b as pe}from"./chunk-DJXQKSLT.js";import"./chunk-T367AQJ2.js";import{a as W,b as j}from"./chunk-AN4SAUSA.js";import"./chunk-URH77XNK.js";import"./chunk-E7QWESN4.js";import"./chunk-3DBSHDAQ.js";import"./chunk-PPXXWO4E.js";import"./chunk-M4SSELXT.js";import{a as Ae,b as J}from"./chunk-WXIG4CXY.js";import"./chunk-WMZF4DQK.js";import"./chunk-QPPFPDWZ.js";import{i as M}from"./chunk-W63NE6LU.js";import"./chunk-S27Z7D3D.js";import{a as Y,b as $}from"./chunk-AD247LWQ.js";import{b as Q,c as Fe,d as Te,e as we,f as Me,g as De,h as Ye}from"./chunk-BKTBVFNX.js";import"./chunk-ZFNIPERQ.js";import{o as He,w as N,x as G}from"./chunk-ME4ALIS7.js";import"./chunk-DTYVTTET.js";import{e as V,f as ye,j as te,k as Pe,l as be,m as Oe,n as ze,o as Ie,u as Ee,w as H,x as ae}from"./chunk-VMI3QWC6.js";import{b as ie,d as Ue,e as D,l as A}from"./chunk-F7PVAVLQ.js";import{a as ve}from"./chunk-DSZOROE6.js";import"./chunk-2BI7WNJP.js";import{k as B,o as je,s as w}from"./chunk-ZK43JB4A.js";import"./chunk-F2X3VGZZ.js";import{Dc as Se,Eb as x,Ec as z,Fc as oe,Ha as I,Mb as c,Oc as Ve,Pb as q,Pc as $e,Rb as Ce,Sb as P,Sc as u,Ub as b,Vb as O,Wb as r,Xb as a,Y as U,Yb as Z,_ as F,ac as v,bd as ee,c as ue,ca as he,cd as We,fc as y,gc as s,ia as h,ib as p,qa as C,ra as S,s as X,sc as m,tc as _,uc as E,wc as Be,yb as T}from"./chunk-6QJHEOXN.js";import{a as f,b as g}from"./chunk-YQFG5XE2.js";var k=(()=>{class t{constructor(){this.httpService=h(ve)}getGlobalConfiguration(){return this.httpService.get(void 0,"/api/setup/GlobalConfiguration")}saveGlobalConfiguration(e){return this.httpService.post(void 0,"/api/setup/SubmitGlobalConfiguration",e)}fetchPOSOutletConfiguration(e){return this.httpService.get(void 0,"/api/Setup/OutletConfiguration",{params:e})}fetchPOSOutletFormConfiguration(e){let n={params:e};return this.httpService.get(void 0,"/api/Setup/OutletConfigurationForm",n)}updatePOSOutletConfiguration(e){return this.httpService.post(void 0,"/api/Setup/SubmitOutletConfiguration",e)}fetchPOSPaymentConfiguration(e){return this.httpService.get(void 0,"/api/Setup/PaymentConfiguration",{params:e})}fetchPOSPaymentFormConfiguration(e){let n={params:e};return this.httpService.get(void 0,"api/Setup/PaymentConfigurationForm",n)}updatePOSPaymentConfiguration(e){return this.httpService.post(void 0,"/api/Setup/SubmitPaymentConfiguration",e)}fetchPOSTaxConfiguration(){return this.httpService.get(void 0,"/api/setup/TaxConfigurationForm")}updatePOSTaxConfiguration(e){return this.httpService.post(void 0,"/api/setup/SubmitTaxConfiguration",e)}fetchPOSWriteOffConfiguration(){return this.httpService.get(void 0,"/api/setup/WriteOffConfigurationList")}fetchPOSWriteOffFormConfiguration(e){let n={params:e};return this.httpService.get(void 0,"/api/setup/WriteOffConfigurationForm",n)}updatePOSWriteOffConfiguration(e){return this.httpService.post(void 0,"/api/setup/SubmitWriteOffConfiguration",e)}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275prov=he({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var R=function(t){return t.POSGLOBAL_SELL="Sell",t.POSGLOBAL_BUY="Buy",t.POSGLOBAL_ADJUSTMENT="Adjustment",t.POSGLOBAL_PREPAID="Prepaid",t.POSGLOBAL_RETURN="Return",t.POSGLOBAL_DEBT="Debt",t.POSGLOBAL_PAYMENTFEE="Payment Fee",t.POSGLOBAL_MANUFACTURING="Manufacturing",t.POSGLOBAL_ADVANCE="Advance",t}(R||{});var it={[R.POSGLOBAL_SELL]:[{typeID:2,side:"debit",label:"Account Receivable"},{typeID:1,side:"credit",label:"Sales"},{typeID:4,side:"debit",label:"COGS"},{typeID:3,side:"credit",label:"Sold Inventory"},{typeID:10,side:"debit",label:"Sales Discount"}],[R.POSGLOBAL_BUY]:[{typeID:27,side:"debit",label:"Pending Paid Inventory"},{typeID:5,side:"credit",label:"Account Payable"},{typeID:28,side:"debit",label:"Inventory Bought"},{typeID:27,side:"credit",label:"Pending Paid Inventory"},{typeID:11,side:"credit",label:"Purchase Discount"}],[R.POSGLOBAL_ADJUSTMENT]:[{typeID:26,side:"debit",label:"Adjustment Asset"},{typeID:21,side:"credit",label:"Adjustment Expense"}],[R.POSGLOBAL_PREPAID]:[{typeID:29,side:"debit",label:"Accounting for Prepaid"},{typeID:30,side:"debit",label:"Sales For Prepaid"}],[R.POSGLOBAL_RETURN]:[{typeID:8,side:"debit",label:"Sales Return"},{typeID:27,side:"debit",label:"Inventory"},{typeID:4,side:"credit",label:"COGS"},{typeID:9,side:"credit",label:"Purchase Return"}],[R.POSGLOBAL_DEBT]:[{typeID:17,side:"debit",label:"Consignment Payable"}],[R.POSGLOBAL_PAYMENTFEE]:[{typeID:19,side:"debit",label:"Payment Fee"},{typeID:20,side:"credit",label:"Surcharge"}],[R.POSGLOBAL_MANUFACTURING]:[{typeID:24,side:"debit",label:"Finished Goods"},{typeID:23,side:"credit",label:"Raw Material"},{typeID:25,side:"credit",label:"Production Expenses"}],[R.POSGLOBAL_ADVANCE]:[{typeID:15,side:"debit",label:"Crossing Account"},{typeID:16,side:"debit",label:"Retained Earnings"},{typeID:18,side:"debit",label:"Current Earnings"}]};function _t(t,i){if(t&1){let e=v();r(0,"div",5)(1,"p-button",6),y("onClick",function(){C(e);let o=s();return S(o.onSubmit())}),a()()}}function gt(t,i){if(t&1&&(r(0,"p-tab",10),m(1),a()),t&2){let e=i.$implicit;c("value",e.value),p(),_(e.label)}}function xt(t,i){if(t&1&&(r(0,"div",19)(1,"div")(2,"span"),m(3),a()(),r(4,"div")(5,"span"),m(6),a()()()),t&2){let e=i.$implicit;p(3),E("(",e.code,")"),p(3),_(e.name)}}function ht(t,i){if(t&1&&(r(0,"div",19)(1,"div")(2,"span"),m(3),a()(),r(4,"div")(5,"span"),m(6),a()()()),t&2){let e=i.$implicit;p(3),E("(",e.code,")"),p(3),_(e.name)}}function Ct(t,i){if(t&1&&(r(0,"div",14)(1,"div",15)(2,"div",5)(3,"label",16),m(4),a(),r(5,"span",17),m(6),a()(),r(7,"p-select",18),x(8,xt,7,2,"ng-template",null,2,u)(10,ht,7,2,"ng-template",null,3,u),a()()()),t&2){let e=i.$implicit,n=s(4);c("formGroupName",e.index),p(4),_(e.entry.value.label),p(2),_(e.entry.value.side),p(),c("options",n.posIntegration().options.accounts)}}function St(t,i){if(t&1&&(r(0,"div",19)(1,"div")(2,"span"),m(3),a()(),r(4,"div")(5,"span"),m(6),a()()()),t&2){let e=i.$implicit;p(3),E("(",e.code,")"),p(3),_(e.name)}}function vt(t,i){if(t&1&&(r(0,"div",19)(1,"div")(2,"span"),m(3),a()(),r(4,"div")(5,"span"),m(6),a()()()),t&2){let e=i.$implicit;p(3),E("(",e.code,")"),p(3),_(e.name)}}function yt(t,i){if(t&1&&(r(0,"div",14)(1,"div",15)(2,"div",5)(3,"label",16),m(4),a(),r(5,"span",20),m(6),a()(),r(7,"p-select",18),x(8,St,7,2,"ng-template",null,2,u)(10,vt,7,2,"ng-template",null,3,u),a()()()),t&2){let e=i.$implicit,n=s(4);c("formGroupName",e.index),p(4),_(e.entry.value.label),p(2),_(e.entry.value.side),p(),c("options",n.posIntegration().options.accounts)}}function Pt(t,i){if(t&1&&(r(0,"p-tabpanel",10)(1,"div",11)(2,"div",12)(3,"div",13),b(4,Ct,12,4,"div",14,P),a()(),r(6,"div",12)(7,"div",13),b(8,yt,12,4,"div",14,P),a()()()()),t&2){let e=i.$implicit,n=s(3);c("value",e.value),p(),c("formGroupName",e.value),p(3),O(n.getDebitEntries(e.value)),p(4),O(n.getCreditEntries(e.value))}}function bt(t,i){if(t&1){let e=v();r(0,"form",8),y("ngSubmit",function(){C(e);let o=s(2);return S(o.onSubmit())}),r(1,"p-tabs",9)(2,"p-tablist"),b(3,gt,2,2,"p-tab",10,P),a(),r(5,"p-tabpanels"),b(6,Pt,10,2,"p-tabpanel",10,P),a()()()}if(t&2){let e=s(2);c("formGroup",e.accountForm),p(),c("value",e.tab())("lazy",!0),p(2),O(e.tabs()),p(3),O(e.tabs())}}function Ot(t,i){if(t&1&&x(0,bt,8,3,"form",7),t&2){let e=s();c("ngIf",e.posIntegration()&&e.accountForm)}}var at=(()=>{class t{constructor(){this.posConfigService=h(k),this.fb=h(Ee),this.tab=I(R.POSGLOBAL_SELL),this.tabs=I(Object.values(R).map(e=>({label:e,value:e}))),this.posIntegration=I(null),this.form=I([]),this.descriptionsMap=new Map,this.objectKeys=Object.keys,this.posGlobalTabEnum=R}ngOnInit(){this.posConfigService.getGlobalConfiguration().pipe(F(e=>{this.posIntegration.set(e),this.form.set(e.form),this.descriptionsMap=new Map(e.descriptions.map(n=>[+n.id,n.name])),this.initializeForm()})).subscribe()}initializeForm(){let e={};this.tabs().forEach(n=>{let o=this.getEntriesForTab(n.value);console.log(`Entries for ${n.value}:`,o),e[n.value]=this.fb.array(o.map(l=>this.createEntryFormGroup(l)))}),this.accountForm=this.fb.group(e)}createEntryFormGroup(e){let n=this.fb.group({typeID:[e.typeID],label:[e.label],side:[e.side],accountID:[this.getAccountIDByTypeID(e.typeID)]});return n.get("accountID").valueChanges.subscribe(o=>{this.syncAccountIDs(e.typeID,o,n)}),n}getAccountIDByTypeID(e){return this.form().find(o=>o.typeID===e)?.accountID||""}getEntriesForTab(e){return it[e]||[]}getTabEntries(e){return this.accountForm.get(e)}onSubmit(){let e=this.accountForm.getRawValue(),n=[],o=new Set;for(let l of Object.values(e))for(let{typeID:d,accountID:L}of l){let ce=`${d}_${L}`;o.has(ce)||(o.add(ce),n.push({typeID:d,accountID:L||Qe}))}console.log("Form submitted with value:",n),this.posConfigService.saveGlobalConfiguration({form:n}).subscribe({next:()=>console.log("Save successful"),error:l=>console.error("Save failed",l)})}getDebitEntries(e){return this.getTabEntries(e).controls.map((n,o)=>({entry:n,index:o})).filter(n=>n.entry.value.side==="debit")}getCreditEntries(e){return this.getTabEntries(e).controls.map((n,o)=>({entry:n,index:o})).filter(n=>n.entry.value.side==="credit")}syncAccountIDs(e,n,o){Object.values(this.accountForm.controls).forEach(l=>{l.controls.forEach(d=>{d!==o&&d.get("typeID")?.value===e&&d.get("accountID")?.value!==n&&d.get("accountID")?.setValue(n,{emitEvent:!1})})})}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=T({type:t,selectors:[["app-pos-global"]],decls:5,vars:0,consts:[["actionButton",""],["content",""],["selectedItem",""],["item",""],["pageTitle","POS Integration"],[1,"d-flex","gap-2"],["label","Submit",3,"onClick"],[3,"formGroup","ngSubmit",4,"ngIf"],[3,"ngSubmit","formGroup"],[1,"border-top",3,"value","lazy"],[3,"value"],[1,"row",3,"formGroupName"],[1,"col"],[1,"row","gap-3"],[1,"col-12",3,"formGroupName"],[1,"form-group","d-flex","flex-column"],["for","",1,"fs-3"],[1,"text-success","fs-3"],["filter","","filterBy","code,name","formControlName","accountID","optionLabel","name","optionValue","id",3,"options"],[1,"d-flex","align-items-center","gap-2"],[1,"text-danger","fs-3"]],template:function(n,o){n&1&&(r(0,"app-main-panel",4),x(1,_t,2,0,"ng-template",null,0,u)(3,Ot,1,1,"ng-template",null,1,u),a())},dependencies:[M,ot,nt,tt,et,Xe,Ze,He,j,W,H,Pe,V,ye,w,B,A,G,N,ae,be,Ie,Oe],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var It=t=>[t];function Et(t,i){if(t&1&&(r(0,"th",7),m(1),a()),t&2){let e=i.$implicit;p(),_(e.name.slice(0,10))}}function Ft(t,i){if(t&1&&(r(0,"tr")(1,"th",6),m(2,"Method"),a()(),r(3,"tr"),b(4,Et,2,1,"th",7,P),a()),t&2){let e=s(3);p(4),O(e.paymentConfiguration().outlets)}}function Tt(t,i){if(t&1&&(r(0,"td"),m(1),a()),t&2){let e=i.$implicit;p(),_(e.accountName)}}function wt(t,i){if(t&1&&(r(0,"tr")(1,"td",8)(2,"a",9),m(3),a()(),b(4,Tt,2,1,"td",null,P),a()),t&2){let e=i.$implicit;p(2),c("routerLink",oe(2,It,e.id)),p(),_(e.name),p(),O(e.accounts)}}function Mt(t,i){if(t&1&&(r(0,"p-table",5),x(1,Ft,6,0,"ng-template",null,1,u)(3,wt,6,4,"ng-template",null,2,u),a()),t&2){let e=s(2);c("value",e.paymentConfiguration().payment)}}function Dt(t,i){if(t&1){let e=v();r(0,"app-main-panel",4),y("search",function(o){C(e);let l=s();return S(l.onSearch(o))}),x(1,Mt,5,1,"ng-template",null,0,u),a()}t&2&&c("isSearchableInput",!0)("scrollable",!0)}var pt=(()=>{class t{constructor(){this.POSSetupService=h(k),this.paymentConfiguration=I(null)}ngOnInit(){this.POSSetupService.fetchPOSPaymentConfiguration({}).pipe(F(e=>{this.paymentConfiguration.set(e)})).subscribe()}onSearch(e){this.POSSetupService.fetchPOSPaymentConfiguration({Search:e}).pipe(F(n=>{this.paymentConfiguration.set(n)})).subscribe()}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=T({type:t,selectors:[["app-pos-payment"]],decls:1,vars:1,consts:[["content",""],["header",""],["body",""],["pageTitle","Payment Method Accounting",3,"isSearchableInput","scrollable","search",4,"ngIf"],["pageTitle","Payment Method Accounting",3,"search","isSearchableInput","scrollable"],[3,"value"],["rowspan","3",2,"min-width","300px"],[2,"min-width","200px"],["pFrozenColumn",""],[1,"link-primary",3,"routerLink"]],template:function(n,o){n&1&&x(0,Dt,3,2,"app-main-panel",3),n&2&&c("ngIf",o.paymentConfiguration())},dependencies:[M,ne,le,Je,w,B,A,D],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var At={data:{listOutletAccount:[],listCOAType:[],pageNumber:1,pageSize:20,totalCount:0,totalPages:0},filter:{PageNumber:1,PageSize:20,Search:""}},Ne=Fe(De(At),Te(t=>({first:ee(()=>(t.filter().PageNumber-1)*t.filter().PageSize+1),end:ee(()=>Math.min(t.filter().PageNumber*t.filter().PageSize,t.data().totalCount))})),Me(t=>{let i=h(k);return{updateFilter:n=>{Q(t,o=>g(f({},o),{filter:f(f({},o.filter),n)}))},getPOSOutlets:de(ue(U(n=>i.fetchPOSOutletConfiguration(n).pipe(fe({next:o=>{Q(t,l=>g(f({},l),{data:o}))},error:o=>{console.error("Error fetching POS outlets:",o)}})))))}}),we(t=>({onInit:()=>{t.getPOSOutlets(t.filter)}})));var kt=t=>[t];function Rt(t,i){if(t&1&&(r(0,"th"),m(1),a()),t&2){let e=i.$implicit;p(),_(e.value)}}function Lt(t,i){if(t&1&&(r(0,"tr")(1,"th"),m(2,"Name"),a(),b(3,Rt,2,1,"th",null,P),a()),t&2){let e=s(2);p(3),O(e.store.data().listCOAType)}}function Nt(t,i){if(t&1&&(r(0,"td"),m(1),a()),t&2){let e=i.$implicit;p(),_(e)}}function Gt(t,i){if(t&1&&(r(0,"tr")(1,"td")(2,"a",7),m(3),a()(),b(4,Nt,2,1,"td",null,P),a()),t&2){let e=i.$implicit;p(2),c("routerLink",oe(2,kt,e.OutletID)),p(),E(" ",e.OutletName,""),p(),O(e.Accounts)}}function Bt(t,i){if(t&1&&m(0),t&2){let e=s(2);Be(" Showing ",e.store.first()," to ",e.store.end()," of ",e.store.data().totalCount," entries ")}}function Vt(t,i){t&1&&(r(0,"tr")(1,"td",8)(2,"span"),m(3," No journal entries found. "),a()()())}function $t(t,i){if(t&1){let e=v();r(0,"p-panel")(1,"p-table",6),y("onPage",function(o){C(e);let l=s();return S(l.onPage(o))}),x(2,Lt,5,0,"ng-template",null,1,u)(4,Gt,6,4,"ng-template",null,2,u)(6,Bt,1,3,"ng-template",null,3,u)(8,Vt,4,0,"ng-template",null,4,u),a()()}if(t&2){let e=s();p(),c("value",e.store.data().listOutletAccount)("paginator",!0)("rows",e.store.filter().PageSize)("lazy",!0)("totalRecords",e.store.data().totalCount)}}var lt=(()=>{class t{constructor(){this.store=h(Ne)}onSearch(e){this.store.updateFilter({PageNumber:1,PageSize:20,Search:e})}onPage(e){let n=e.first/e.rows+1;this.store.updateFilter(g(f({},this.store.filter()),{PageSize:e.rows,PageNumber:n}))}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=T({type:t,selectors:[["app-pos-outlet"]],features:[Se([Ne])],decls:3,vars:2,consts:[["content",""],["header",""],["body",""],["paginatorleft",""],["emptymessage",""],["pageTitle","Outlet Account",3,"search","isSearchableInput","scrollable"],["styleClass","d-flex flex-column justify-content-between h-100",3,"onPage","value","paginator","rows","lazy","totalRecords"],[1,"link","link-primary",3,"routerLink"],["colspan","8"]],template:function(n,o){if(n&1){let l=v();r(0,"app-main-panel",5),y("search",function(L){return C(l),S(o.onSearch(L))}),x(1,$t,10,5,"ng-template",null,0,u),a()}n&2&&c("isSearchableInput",!0)("scrollable",!0)},dependencies:[M,w,J,ne,le,A,D,$,Y],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var Wt=()=>({height:"calc(100vh - 100px)"}),jt=()=>({height:"calc(100vh - 150px)"});function Ut(t,i){if(t&1){let e=v();r(0,"a",5),m(1,"Cancel"),a(),r(2,"p-button",6),y("onClick",function(){C(e);let o=s();return S(o.updatePOsOutletConfiguration())}),a()}}function zt(t,i){if(t&1&&(r(0,"div",16)(1,"div",17)(2,"span"),m(3),a()(),r(4,"div",17)(5,"span",17),m(6),a()()()),t&2){let e=i.$implicit;p(3),E("(",e.code,")"),p(3),_(e.name)}}function Ht(t,i){if(t&1&&(r(0,"div",16)(1,"div",17)(2,"span"),m(3),a()(),r(4,"div",18)(5,"span",17),m(6),a()()()),t&2){let e=i.$implicit;p(3),E("(",e.code,")"),p(3),_(e.name)}}function Yt(t,i){if(t&1&&(r(0,"div",12)(1,"span",14),m(2),a(),r(3,"p-select",15),x(4,zt,7,2,"ng-template",null,2,u)(6,Ht,7,2,"ng-template",null,3,u),a()()),t&2){let e,n=i.$implicit,o=i.$index,l=s(3);c("formGroupName",o),p(2),_((e=n.get("TypeName"))==null?null:e.value),p(),c("options",l.options.accounts)}}function Jt(t,i){t&1&&Z(0,"hr")}function Kt(t,i){if(t&1&&(r(0,"div",9)(1,"h3",10),m(2),Ve(3,"titlecase"),a(),r(4,"div",11),b(5,Yt,8,3,"div",12,P),a()(),x(7,Jt,1,0,"hr",13)),t&2){let e,n=i.$implicit,o=i.$index,l=i.$index,d=i.$count,L=s(2);c("formGroupName",o),p(2),E(" ",$e(3,3,(e=n.get("groupName"))==null?null:e.value)," "),p(3),O(L.getAccountsFormArray(l).controls),p(2),c("ngIf",l!==d-1)}}function qt(t,i){if(t&1&&(r(0,"p-panel")(1,"p-scroll-panel")(2,"form",7)(3,"div",8),b(4,Kt,8,5,null,null,P),a()()()()),t&2){let e=s();q(z(5,Wt)),p(),q(z(6,jt)),p(),c("formGroup",e.accountsForm),p(2),O(e.accountGroupsArray.controls)}}var mt=(()=>{class t{constructor(){this.route=h(ie),this.POSSetupService=h(k),this.outletForm=I(null),this.allAccounts=[],this.options=null,this.outletName="",this.accountGroups=[{name:"sell",typeIds:[1,2,10],accounts:[]},{name:"delivery",typeIds:[3,4],accounts:[]},{name:"buy",typeIds:[27,11,28],accounts:[]},{name:"purchase return",typeIds:[9],accounts:[]},{name:"sales return",typeIds:[8],accounts:[]},{name:"adjustment",typeIds:[21,26],accounts:[]}],this.fb=h(Ee)}ngOnInit(){this.accountsForm=this.fb.group({accountGroups:this.fb.array([])}),this.route.paramMap.pipe(X(e=>e.get("id")),U(e=>this.POSSetupService.fetchPOSOutletFormConfiguration({outletID:e})),F(e=>{this.allAccounts=e.form,this.options=e.options,this.outletName=e.form[0].OutletName,this.accountGroups.forEach(o=>{o.accounts=this.allAccounts.filter(l=>o.typeIds.includes(l.TypeID))});let n=this.accountsForm.get("accountGroups");this.accountGroups.forEach(o=>{n.push(this.createAccountGroupControl(o))})})).subscribe()}get accountGroupsArray(){return this.accountsForm.get("accountGroups")}getAccountsFormArray(e){return this.accountGroupsArray.at(e).get("accounts")}createAccountGroupControl(e){return this.fb.group({groupName:[e.name],accounts:this.fb.array(e.accounts.map(n=>this.createAccountControl(n)))})}createAccountControl(e){return this.fb.group({AccountID:[e.AccountID],TypeID:[e.TypeID],TypeName:[e.TypeName],OutletID:[e.OutletID],OutletName:[e.OutletName]})}updatePOsOutletConfiguration(){let{accountGroups:e}=this.accountsForm.value,n={form:e.flatMap(o=>o.accounts.map(l=>({AccountID:l.AccountID,TypeID:l.TypeID,TypeName:l.TypeName,OutletID:l.OutletID,OutletName:l.OutletName})))};this.POSSetupService.updatePOSOutletConfiguration(n).pipe().subscribe()}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=T({type:t,selectors:[["app-pos-outlet-form"]],decls:5,vars:2,consts:[["actionButton",""],["content",""],["selectedItem",""],["item",""],[3,"pageTitle","hasMainWrapperPadding"],["routerLink","/pages/pos-setup/outlets",1,"p-button","p-button-secondary","p-button-outlined"],["label","Submit",3,"onClick"],[1,"",3,"formGroup"],["formArrayName","accountGroups",1,"d-flex","flex-column","gap-2"],[1,"row",3,"formGroupName"],[1,"fs-4","fw-semibold"],["formArrayName","accounts",1,"row","row-gap-3"],[1,"col-6",3,"formGroupName"],[4,"ngIf"],[1,"fs-3"],["formControlName","AccountID","filter","","filterBy","code,name","optionLabel","name","optionValue","id","placeholder","Select an account",1,"w-100",3,"options"],[1,"d-flex","gap-2"],[1,""],[1,"d-inline-block","text-truncate",2,"max-width","250px"]],template:function(n,o){n&1&&(r(0,"app-main-panel",4),x(1,Ut,3,0,"ng-template",null,0,u)(3,qt,6,7,"ng-template",null,1,u),a()),n&2&&c("pageTitle","Edit "+o.outletName)("hasMainWrapperPadding",!0)},dependencies:[M,w,B,je,J,ae,Pe,V,ye,be,Ie,Oe,ze,j,W,$,Y,re,G,N,A,D],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var Zt=()=>({height:"calc(100vh - 100px)"}),en=()=>({width:"100%",height:"calc(100vh - 150px)"}),tn=()=>({width:"100%"});function nn(t,i){if(t&1){let e=v();r(0,"a",6),m(1,"Cancel"),a(),r(2,"p-button",7),y("onClick",function(){C(e);let o=s(3);return S(o.updatePOSOutletConfiguration())}),a()}}function on(t,i){if(t&1&&(r(0,"div",16)(1,"div",17)(2,"span"),m(3),a()(),r(4,"div",17)(5,"span",17),m(6),a()()()),t&2){let e=i.$implicit;p(3),E("(",e.code,")"),p(3),_(e.name)}}function an(t,i){if(t&1&&(r(0,"div",16)(1,"div",17)(2,"span"),m(3),a()(),r(4,"div",18)(5,"span",17),m(6),a()()()),t&2){let e=i.$implicit;p(3),E("(",e.code,")"),p(3),_(e.name)}}function rn(t,i){if(t&1){let e=v();r(0,"div",9)(1,"div",10)(2,"div",11)(3,"label",12),m(4),a()(),Z(5,"div",13),r(6,"div",14)(7,"p-select",15),y("ngModelChange",function(o){let l=C(e).$index,d=s(4);return S(d.updateAccountById(o,l))}),x(8,on,7,2,"ng-template",null,2,u)(10,an,7,2,"ng-template",null,3,u),a()()()()}if(t&2){let e=i.$implicit,n=i.$index,o=s(4);p(4),_(e.outletName.slice(0,15)),p(3),q(z(7,tn)),c("ngModel",o.paymentForm().form.accounts[n].accountID)("virtualScroll",!0)("virtualScrollItemSize",50)("options",o.paymentForm().options.chartOfAccount)}}function pn(t,i){if(t&1&&(r(0,"p-card")(1,"p-scrollpanel")(2,"div",8),b(3,rn,12,8,"div",9,P),a()()()),t&2){let e=s(3);q(z(4,Zt)),p(),q(z(5,en)),p(2),O(e.paymentForm().form.accounts)}}function ln(t,i){if(t&1&&(r(0,"app-main-panel",4),x(1,nn,3,0,"ng-template",null,0,u)(3,pn,5,6,"ng-template",null,1,u),a()),t&2){let e=s(2);c("pageTitle",e.paymentForm().form.paymentMethod.name+" Form Accounting")("hasMainWrapperPadding",!0)}}function mn(t,i){if(t&1&&x(0,ln,5,2,"app-main-panel",5),t&2){let e=s();c("ngIf",e.paymentForm())}}var st=(()=>{class t{constructor(){this.route=h(ie),this.POSSetupService=h(k),this.paymentForm=I(null),this.router=h(Ue)}ngOnInit(){this.route.paramMap.pipe(X(e=>+e.get("id")),U(e=>this.POSSetupService.fetchPOSPaymentFormConfiguration({ID:e})),F(e=>{this.paymentForm.set(e)}),Le("response")).subscribe()}updateAccountById(e,n){let o=this.paymentForm().form.accounts,l=g(f({},this.paymentForm()),{form:g(f({},this.paymentForm().form),{accounts:o.map((d,L)=>L===n?g(f({},d),{accountID:e}):d)})});this.paymentForm.set(l)}updatePOSOutletConfiguration(){let e={form:[...this.paymentForm().form.accounts]};this.POSSetupService.updatePOSPaymentConfiguration(e).pipe(Le("response"),F(()=>{this.router.navigate(["/pages/pos-setup/payments"])})).subscribe()}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=T({type:t,selectors:[["app-pos-payment-form"]],decls:1,vars:1,consts:[["actionButton",""],["content",""],["selectedItem",""],["item",""],[3,"pageTitle","hasMainWrapperPadding"],[3,"pageTitle","hasMainWrapperPadding",4,"ngIf"],["routerLink","/pages/pos-setup/payments",1,"p-button","p-button-outlined","p-button-secondary"],["label","Submit",3,"onClick"],[1,"row","row-gap-3"],[1,"col-6","d-flex","flex-column","gap-2"],[1,"row","row-gap-4"],[1,"col-2"],["for",""],[1,"col-3"],[1,"col-7"],["filter","","filterBy","name,code","optionLabel","name","optionValue","id","placeholder","Select an account",1,"w-full",3,"ngModelChange","ngModel","virtualScroll","virtualScrollItemSize","options"],[1,"d-flex","gap-2"],[1,""],[1,"d-inline-block","text-truncate",2,"max-width","250px"]],template:function(n,o){n&1&&x(0,mn,1,1,"app-main-panel",4),n&2&&Ce(o.paymentForm()?0:-1)},dependencies:[J,Ae,M,w,B,pe,re,j,W,H,V,te,A,D,G,N,$],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();function sn(t,i){if(t&1){let e=v();r(0,"div",5)(1,"a",6),m(2,"Cancel"),a(),r(3,"p-button",7),y("onClick",function(){C(e);let o=s();return S(o.updatePOSTaxConfiguration())}),a()()}}function cn(t,i){if(t&1&&(r(0,"div",5)(1,"div",15)(2,"span"),m(3),a()(),r(4,"div",15)(5,"span",15),m(6),a()()()),t&2){let e=i.$implicit;p(3),E("(",e.code,")"),p(3),_(e.name)}}function un(t,i){if(t&1&&(r(0,"div",5)(1,"div",15)(2,"span"),m(3),a()(),r(4,"div",16)(5,"span",15),m(6),a()()()),t&2){let e=i.$implicit;p(3),E("(",e.code,")"),p(3),_(e.name)}}function dn(t,i){if(t&1){let e=v();r(0,"div",11)(1,"div",12)(2,"label",13),m(3),a(),r(4,"p-select",14),y("ngModelChange",function(o){let l=C(e).$index,d=s(2);return S(d.updateAccountID(o,l))}),x(5,cn,7,2,"ng-template",null,2,u)(7,un,7,2,"ng-template",null,3,u),a()()()}if(t&2){let e=i.$implicit,n=i.$index,o=s(2);p(3),_(e.name),p(),c("options",o.taxForm().options.chartOfAccount)("ngModel",o.taxForm().form[n].accountID)}}function fn(t,i){if(t&1&&(r(0,"p-panel")(1,"div",8)(2,"div",9)(3,"div",10),b(4,dn,9,3,"div",11,P),a()()()()),t&2){let e=s();p(4),O(e.taxForm().form)}}var ct=(()=>{class t{constructor(){this.POSSetupService=h(k),this.taxForm=I(null)}ngOnInit(){this.POSSetupService.fetchPOSTaxConfiguration().pipe(F(e=>{this.taxForm.set(e)})).subscribe()}updateAccountID(e,n){let o=this.taxForm().form,l=g(f({},this.taxForm()),{form:o.map((d,L)=>L===n?g(f({},d),{accountID:e}):d)});this.taxForm.set(l)}updatePOSTaxConfiguration(){let e={form:[...this.taxForm().form]};this.POSSetupService.updatePOSTaxConfiguration(e).pipe(F(n=>console.log(n))).subscribe()}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=T({type:t,selectors:[["app-pos-tax"]],decls:5,vars:1,consts:[["actionButton",""],["content",""],["selectedItem",""],["item",""],["pageTitle","Tax Setup",3,"scrollable"],[1,"d-flex","gap-2"],["routerLink","..",1,"p-button","p-button-secondary","p-button-outlined"],["label","Submit",3,"onClick"],[1,"row"],[1,"col-4"],[1,"row","row-gap-3"],[1,"col-12"],[1,"d-flex","flex-column"],["for",""],["filter","","filterBy","name,code","optionLabel","name","optionValue","id","placeholder","Select an Account",3,"ngModelChange","options","ngModel"],[1,""],[1,"d-inline-block","text-truncate",2,"max-width","250px"]],template:function(n,o){n&1&&(r(0,"app-main-panel",4),x(1,sn,4,0,"ng-template",null,0,u)(3,fn,6,0,"ng-template",null,1,u),a()),n&2&&c("scrollable",!0)},dependencies:[M,J,w,j,W,pe,H,V,te,A,D,G,N,$,Y],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var _n=()=>({"min-width":"50rem"}),gn=t=>[t];function xn(t,i){t&1&&Z(0,"p-button",6)}function hn(t,i){if(t&1&&x(0,xn,1,0,"p-button",5),t&2){let e=s();c("ngIf",e.hasCheckedItems())}}function Cn(t,i){t&1&&(r(0,"tr")(1,"th",8),Z(2,"p-tableHeaderCheckbox"),a(),r(3,"th"),m(4,"Name"),a(),r(5,"th"),m(6,"Description"),a()())}function Sn(t,i){if(t&1&&(r(0,"tr")(1,"td"),Z(2,"p-tableCheckbox",9),a(),r(3,"td")(4,"a",10),m(5),a()(),r(6,"td"),m(7),a()()),t&2){let e=i.$implicit;p(2),c("value",e),p(2),c("routerLink",oe(4,gn,e.id)),p(),_(e.name),p(2),_(e.description)}}function vn(t,i){if(t&1){let e=v();r(0,"p-panel")(1,"p-table",7),y("onRowSelect",function(o){C(e);let l=s();return S(l.onRowSelect(o))})("onRowUnselect",function(o){C(e);let l=s();return S(l.onRowSelect(o))})("onHeaderCheckboxToggle",function(o){C(e);let l=s();return S(l.onSelectAll(o))}),x(2,Cn,7,0,"ng-template",null,2,u)(4,Sn,8,6,"ng-template",null,3,u),a()()}if(t&2){let e=s();p(),c("value",e.writeoffList().data)("tableStyle",z(2,_n))}}var ut=(()=>{class t{constructor(){this.POSSetupService=h(k),this.writeoffList=I(null),this.hasCheckedItems=ee(()=>{let e=this.writeoffList();return!e||!e.data||!Array.isArray(e.data)?!1:e.data.some(n=>n&&n.checked===!0)})}ngOnInit(){this.POSSetupService.fetchPOSWriteOffConfiguration().pipe(X(e=>g(f({},e),{data:e.data.map(n=>g(f({},n),{checked:!1}))})),F(e=>{this.writeoffList.set(e)})).subscribe()}onRowSelect(e){console.log("Selected Row:",e.data);let n=this.writeoffList();if(!n||!n.data)return;let o=n.data.findIndex(l=>l.id===e.data.id);if(o!==-1){let l=[...n.data];l[o]=g(f({},l[o]),{checked:!l[o].checked}),this.writeoffList.set(g(f({},n),{data:l}))}}onSelectAll(e){let n=this.writeoffList();if(!n?.data)return;let o=n.data.map(l=>g(f({},l),{checked:e.checked}));this.writeoffList.set(g(f({},n),{data:o}))}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=T({type:t,selectors:[["app-pos-writeoff"]],decls:5,vars:1,consts:[["actionButton",""],["content",""],["header",""],["body",""],["pageTitle","Write Off",3,"scrollable"],["severity","danger","label","Delete","icon","fa-solid fa-trash",4,"ngIf"],["severity","danger","label","Delete","icon","fa-solid fa-trash"],["dataKey","id",3,"onRowSelect","onRowUnselect","onHeaderCheckboxToggle","value","tableStyle"],[2,"width","1rem"],[3,"value"],[1,"link-primary",3,"routerLink"]],template:function(n,o){n&1&&(r(0,"app-main-panel",4),x(1,hn,1,1,"ng-template",null,0,u)(3,vn,6,3,"ng-template",null,1,u),a()),n&2&&c("scrollable",!0)},dependencies:[M,w,B,ne,le,Ke,qe,A,D,G,N,$,Y],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var yn=()=>({witdh:"100%",height:"calc(100vh - 150px)"});function Pn(t,i){if(t&1){let e=v();r(0,"div",6)(1,"a",7),m(2,"Cancel"),a(),r(3,"p-button",8),y("onClick",function(){C(e);let o=s(2);return S(o.updateWriteOffConfiguration())}),a()()}}function bn(t,i){if(t&1&&(r(0,"div",6)(1,"span",16),m(2),a(),r(3,"span",16),m(4),a()()),t&2){let e=i.$implicit;p(2),E("(",e.code,")"),p(2),_(e.name)}}function On(t,i){if(t&1&&(r(0,"div",6)(1,"span",16),m(2),a(),r(3,"span",16),m(4),a()()),t&2){let e=i.$implicit;p(2),E("(",e.code,")"),p(2),_(e.name)}}function In(t,i){if(t&1){let e=v();r(0,"div",12)(1,"div",13)(2,"label",14),m(3),a(),r(4,"p-select",15),y("ngModelChange",function(o){let l=C(e).$index,d=s(3);return S(d.updateAccountById(o,l))}),x(5,bn,5,2,"ng-template",null,2,u)(7,On,5,2,"ng-template",null,3,u),a()()()}if(t&2){let e=i.$implicit,n=s(3);p(3),_(e.name),p(),c("ngModel",e.accountID)("options",n.writeOffForm().options.account)("virtualScroll",!0)("virtualScrollItemSize",50)}}function En(t,i){if(t&1&&(r(0,"p-card")(1,"p-scroll-panel")(2,"div",9)(3,"div",10)(4,"div",11),b(5,In,9,5,"div",12,P),a()()()()()),t&2){let e=s(2);p(),q(z(2,yn)),p(4),O(e.writeOffForm().form)}}function Fn(t,i){if(t&1&&(r(0,"app-main-panel",5),x(1,Pn,4,0,"ng-template",null,0,u)(3,En,7,3,"ng-template",null,1,u),a()),t&2){let e=s();c("pageTitle","Write Off Form "+e.writeOffForm().info.name)("hasMainWrapperPadding",!0)}}var dt=(()=>{class t{constructor(){this.POSSetupService=h(k),this.route=h(ie),this.writeOffForm=I(null)}ngOnInit(){this.route.paramMap.pipe(X(e=>e.get("id")),U(e=>this.POSSetupService.fetchPOSWriteOffFormConfiguration({ID:e})),F(e=>this.writeOffForm.set(e))).subscribe()}updateAccountById(e,n){let o=this.writeOffForm().form,l=g(f({},this.writeOffForm()),{form:o.map((d,L)=>L===n?g(f({},d),{accountID:e}):d)});this.writeOffForm.set(l)}updateWriteOffConfiguration(){let e={form:this.writeOffForm().form};this.POSSetupService.updatePOSWriteOffConfiguration(e).pipe().subscribe()}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=T({type:t,selectors:[["app-pos-writeoff-form"]],decls:1,vars:1,consts:[["actionButton",""],["content",""],["selectedItem",""],["item",""],[3,"pageTitle","hasMainWrapperPadding",4,"ngIf"],[3,"pageTitle","hasMainWrapperPadding"],[1,"d-flex","gap-2"],["routerLink","/pages/pos-setup/writeoff",1,"p-button","p-button-secondary","p-button-outlined"],["label","Submit",3,"onClick"],[1,"row"],[1,"col"],[1,"row","row-gap-3"],[1,"col-3"],[1,"d-flex","flex-column"],["for","",1,"d-inline-block","text-truncate",2,"max-width","300px"],["filter","","filterBy","name,code","optionLabel","name","filter","","filterBy","name,code","optionValue","id","placeholder","Select an account",3,"ngModelChange","ngModel","options","virtualScroll","virtualScrollItemSize"],[1,""]],template:function(n,o){n&1&&x(0,Fn,5,2,"app-main-panel",4),n&2&&c("ngIf",o.writeOffForm())},dependencies:[M,w,B,J,Ae,pe,re,j,W,H,V,te,A,D,G,N],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var Re=(()=>{class t{constructor(){this.httpService=h(ve)}getExpenseOptions(){return this.httpService.get(void 0,"/api/SetupExpenseOption/GetExpenseOptions")}getExpenseOptionsLoader(){return this.httpService.get(void 0,"/api/SetupExpenseOptionLoader/GetExpenseOptions")}updatePOSExpenseOptionConfiguration(e){return this.httpService.put(void 0,"/api/SetupExpenseOption/UpdateExpenseAccount",e)}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275prov=he({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var Tn={data:{expenseOptions:[],options:{chartOfAccountOptions:[]}}},Ge=Fe(De(Tn),Ye("POSExpenseOptionStore"),Te(t=>({hasCheckedRows:ee(()=>t.data().expenseOptions.some(i=>i.checked)),checkedInvoice:ee(()=>t.data().expenseOptions.filter(i=>i.checked).map(i=>i.id))})),Me(t=>{let i=h(Re);return{onRowSelect(n){Q(t,o=>{let l=o.data.expenseOptions.map(d=>d.id===n.id?g(f({},d),{checked:!0}):d);return g(f({},o),{data:g(f({},o.data),{expenseOptions:l})})})},onRowUnselect(n){Q(t,o=>{let l=o.data.expenseOptions.map(d=>d.id===n.id?g(f({},d),{checked:!1}):d);return g(f({},o),{data:g(f({},o.data),{expenseOptions:l})})})},onHeaderCheckboxToggle(n){Q(t,o=>{let l=o.data.expenseOptions.map(d=>g(f({},d),{checked:n}));return g(f({},o),{data:g(f({},o.data),{expenseOptions:l})})})},getExpenseOptions:de(ue(U(()=>i.getExpenseOptions().pipe(fe({next:n=>{Q(t,o=>g(f({},o),{data:g(f({},o.data),{expenseOptions:n.expenseOptions.map(l=>g(f({},l),{checked:!1}))})}))},error:n=>{console.error("Error fetching expense options:",n)}}))))),getExpenseOptionsLoader:de(ue(U(()=>i.getExpenseOptionsLoader().pipe(fe({next:n=>{Q(t,o=>g(f({},o),{data:g(f({},o.data),{options:{chartOfAccountOptions:n.options.chartOfAccountOptions}})}))},error:n=>{console.error("Error fetching expense options:",n)}})))))}}),we({onInit:t=>{t.getExpenseOptions(),t.getExpenseOptionsLoader()}}));function wn(t,i){if(t&1){let e=v();r(0,"div",5)(1,"a",6),m(2,"Cancel"),a(),r(3,"p-button",7),y("onClick",function(){C(e);let o=s();return S(o.updatePOSExpenseOptionConfiguration())}),a()()}}function Mn(t,i){if(t&1&&(r(0,"div",5)(1,"div",14)(2,"span",14),m(3),a()()()),t&2){let e=i.$implicit;p(3),_(e.value)}}function Dn(t,i){if(t&1&&(r(0,"div",5)(1,"div",15)(2,"span",14),m(3),a()()()),t&2){let e=i.$implicit;p(3),_(e.value)}}function An(t,i){if(t&1){let e=v();r(0,"div",10)(1,"div",11)(2,"label",12),m(3),a(),r(4,"p-select",13),y("ngModelChange",function(o){let l=C(e).$index,d=s(3);return S(d.updateData(o,l))}),x(5,Mn,4,1,"ng-template",null,2,u)(7,Dn,4,1,"ng-template",null,3,u),a()()()}if(t&2){let e,n=i.$implicit,o=i.$index,l=s(3);p(3),_(n.name),p(),c("options",l.store.data().options.chartOfAccountOptions)("ngModel",((e=l.expenseOptForm().ListData[o])==null?null:e.AccountID)||"")}}function kn(t,i){if(t&1&&b(0,An,9,3,"div",10,P),t&2){let e=s(2);O(e.store.data().expenseOptions)}}function Rn(t,i){t&1&&(r(0,"div",9)(1,"p"),m(2,"No expense options available."),a()())}function Ln(t,i){if(t&1&&(r(0,"p-panel")(1,"div",8)(2,"div",9)(3,"div",8),x(4,kn,2,0)(5,Rn,3,0,"div",9),a()()()()),t&2){let e=s();p(4),Ce(e.store.data().expenseOptions&&e.store.data().expenseOptions.length?4:5)}}var ft=(()=>{class t{constructor(){this.store=h(Ge),this.expenseOptService=h(Re),this.expenseOptForm=I({ListData:[]}),this.originalData=I([]),We(()=>{let e=this.store.data().expenseOptions;if(e&&e.length>0){let n=e.map(o=>({ID:o.id,AccountID:o.accountID||""}));this.expenseOptForm.set({ListData:n}),this.originalData.set([...n])}})}onRowSelect(e){this.store.onRowSelect(e.data)}onRowUnselect(e){Array.isArray(e.data)?e.data.forEach(n=>{this.store.onRowUnselect(n)}):this.store.onRowUnselect(e.data)}onHeaderCheckboxToggle(e){this.store.onHeaderCheckboxToggle(e.checked)}updatePOSExpenseOptionConfiguration(){let e=this.expenseOptForm().ListData,n=this.originalData(),o=e.filter((d,L)=>{let ce=n[L];return ce&&d.AccountID!==ce.AccountID});if(o.length===0)return;let l={ListData:o};this.expenseOptService.updatePOSExpenseOptionConfiguration(l).pipe(F(d=>{console.log("Update response:",d),this.originalData.set([...e])})).subscribe()}updateData(e,n){let l=[...this.expenseOptForm().ListData];l[n]&&(l[n]=g(f({},l[n]),{AccountID:e}),this.expenseOptForm.set({ListData:l}))}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=T({type:t,selectors:[["app-pos-expense-option"]],features:[Se([Ge])],decls:5,vars:1,consts:[["actionButton",""],["content",""],["selectedItem",""],["item",""],["pageTitle","Expense Option",3,"scrollable"],[1,"d-flex","gap-2"],["routerLink","..",1,"p-button","p-button-secondary","p-button-outlined"],["label","Submit",3,"onClick"],[1,"row"],[1,"col-12"],[1,"col-4"],[1,"d-flex","flex-column","card","rounded-3","p-3","border"],["for",""],["filter","","filterBy","key,value","optionLabel","value","optionValue","key","placeholder","Select COA",3,"ngModelChange","options","ngModel"],[1,""],[1,"d-inline-block","text-truncate",2,"max-width","250px"]],template:function(n,o){n&1&&(r(0,"app-main-panel",4),x(1,wn,4,0,"ng-template",null,0,u)(3,Ln,6,1,"ng-template",null,1,u),a()),n&2&&c("scrollable",!0)},dependencies:[M,ne,$,Y,G,N,w,D,j,W,ae,V,H,te],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var za=[{path:"",redirectTo:"global",pathMatch:"full"},{path:"",children:[{path:"global",component:at},{path:"outlets",component:lt},{path:"outlets/:id",component:mt},{path:"payments",component:pt},{path:"payments/:id",component:st},{path:"taxs",component:ct},{path:"writeoff",component:ut},{path:"writeoff/:id",component:dt},{path:"expense-option",component:ft}]}];export{za as POS_SETUP_ROUTES};
package/chunk-DSZOROE6.js DELETED
@@ -1 +0,0 @@
1
- import{a as b}from"./chunk-2BI7WNJP.js";import{C as I,D as g,E as D}from"./chunk-ZK43JB4A.js";import{I as u,_ as d,ca as m,ia as f,n as y,s as h}from"./chunk-6QJHEOXN.js";import{a as o,b as c}from"./chunk-YQFG5XE2.js";var L=(()=>{class s{constructor(){this.httpClient=f(D),this.toastr=f(b)}get(t="",e,a={}){return this.httpClient.get(`${t}${e}`,a).pipe(u(this.handleError.bind(this)))}post(t="",e,a,r={observe:"response"}){return this.httpClient.post(`${t}${e}`,a,o({},r)).pipe(d(this.handleResponse.bind(this)),h(n=>n instanceof I&&Object.prototype.hasOwnProperty.call(r,"observe")&&r.observe==="response"?n.body instanceof Blob?n:n.body:n),u(this.handleError.bind(this)))}put(t="",e,a,r={}){return this.httpClient.put(`${t}${e}`,a,c(o({},r),{observe:"response"})).pipe(d(this.handleResponse.bind(this)),h(n=>n.body),u(this.handleError.bind(this)))}delete(t="",e,a={}){return this.httpClient.delete(`${t}${e}`,c(o({},a),{observe:"response"})).pipe(d(this.handleResponse.bind(this)),h(r=>r.body),u(this.handleError.bind(this)))}handleResponse(t){if(t instanceof I&&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 g)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 g&&(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)),y(()=>e)}static{this.\u0275fac=function(e){return new(e||s)}}static{this.\u0275prov=m({token:s,factory:s.\u0275fac,providedIn:"root"})}}return s})();var p={production:!0,version:"5.48.0",changelogUrl:"https://changelog.dealpos.com/?categories=cat_O6pYAT7GI1mts",defaultTimezone:"Asia/Jakarta",intercom:{appId:"xv1oomgl"}};var l=class s{static{this.emailRegex=/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/}static{this.phoneNumberRegex=/^\d+$/}static{this.GuidEmpty="00000000-0000-0000-0000-000000000000"}static{this.DecimalMinValue="-7.922816251426434e+28"}static{this.InputLockTimeSpan=500}static{this.MinDate="0001-01-01T00:00:00"}static{this.MinTime="00:00:00"}static{this.MinDecimal="-79228162514264337593543950335"}static StringFormat(i,...t){for(let e=0;e<t.length;e++)i=i.replace(`{${e}}`,t[e]);return i}static{this.isMobileDevice=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}static IsNotEmpty(i){return i!=""&&!s.containsOnlySpaces(i)&&i!=s.GuidEmpty&&i!=null&&i!=null}static IsEmpty(i){return!!(i==""||s.containsOnlySpaces(i)||i==null||i==null||i==s.GuidEmpty)}static isGuid(i){let t=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/gi,e=!1;return i&&(e=t.test(i)),e}static containsOnlySpaces(i){return/^\s*$/.test(i)}static FilterByID(i,t){try{let e=i.filter(a=>a.ID==t);if(e.length>0)return e[0]}catch{}return null}static{this.Months=[{ID:1,Label:"January"},{ID:2,Label:"February"},{ID:3,Label:"March"},{ID:4,Label:"April"},{ID:5,Label:"May"},{ID:6,Label:"June"},{ID:7,Label:"July"},{ID:8,Label:"August"},{ID:9,Label:"September"},{ID:10,Label:"October"},{ID:11,Label:"November"},{ID:12,Label:"December"}]}static GenerateYears(i,t,e){let a=-1;(t==null||t==null)&&(t=11),(e==null||e==null||!e)&&(a=1);let r=[];for(let n=0;n<t;n++)r.push(i+n*a);return r}static DateOnly(i){return i?new Date(new Date(i).toDateString()):new Date(new Date().toDateString())}static differentInDays(i,t){let e=t.getTime()-i.getTime();return Math.floor(e/(1e3*3600*24))}static minutesDiff(i,t){let e=(t.getTime()-i.getTime())/6e4;return Math.ceil(e)}static hoursDiff(i,t){let a=(t.getTime()-i.getTime())/(1e3*3600);return parseFloat(a.toFixed(1))}static Guid_NewGuid(){let i=new Date().getTime();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var a=(i+Math.random()*16)%16|0;return i=Math.floor(i/16),(e=="x"?a:a&3|8).toString(16)})}static parseJwt(i){var t=i.split(".")[1],e=t.replace(/-/g,"+").replace(/_/g,"/"),a=decodeURIComponent(atob(e).split("").map(function(r){return"%"+("00"+r.charCodeAt(0).toString(16)).slice(-2)}).join(""));return JSON.parse(a)}static numberOnly(i){let t=i.which?i.which:i.keyCode;return!(t>31&&(t<48||t>57))}static formatNumber(i){let t="",e="",a=Math.abs(i);return a>999&&a<1e6?(e="K",t=(a/1e3).toFixed(0)):a>=1e6?(e="M",t=(a/1e6).toFixed(0)):a<999&&(t=a.toString()),i<0&&(t="-"+t),t.replace(/\B(?=(\d{3})+(?!\d))/g,",")+e}static isToDay(i){if(this.IsNotEmpty(i)){i=typeof i=="string"?new Date(i):i;let t=new Date;return t.setHours(0,0,0,0),i.setHours(0,0,0,0),t.getTime()==i.getTime()}return!1}static setToLatestTime(i){let t=new Date(i);return t.setHours(23,59,59),t}static setToFirstTime(i){let t=new Date(i);return t.setHours(0,0,0),t}static compare(i,t,e){return(i<t?-1:1)*(e?1:-1)}static generateSerialasNote(i=[]){let t="";return i&&i.length>0&&(t=`[${i.map((a,r)=>`${r>0?" ":""}${a.Number}${a.Quantity>1||a.Quantity<0?"*"+a.Quantity:""}`)}]`),t}static getDatesInRange(i,t){let e=new Date(i.getTime()),a=[];for(;e<=t;)a.push(new Date(e)),e.setDate(e.getDate()+1);return a}static getDaysBefore(i,t){return new Date(i.setDate(new Date().getDate()-t))}static getRangeDate(i,t){let e=new Date;e.setMonth(i),e.setFullYear(t);let a=new Date(e.getFullYear(),e.getMonth()-1,1),r=new Date(e.getFullYear(),e.getMonth(),0);return{firstDay:a,lastDay:r}}static setDateTime(i,t){let e=new Date;t&&(e=new Date(t));let a=i.split(":");return e.setHours(parseInt(a[0])),e.setMinutes(parseInt(a[1])),e}static isMaskingField(i=""){return i.includes("?")}static generateMaskingField(i=[]){let t={};return i.forEach((e,a)=>{e=e.split(" ")?.join(""),t=c(o({},t),{[e]:!0})}),t}static checkJSApiSupported(i){let t;return i in window?t=!0:t=!1,t}static cloneObject(i){let t;return this.checkJSApiSupported("structuredClone")?t=structuredClone(i):t=JSON.parse(JSON.stringify(i)),t}static formatTitleFromDate(i,t){let e=null,a=new Date(i),r=new Date(t);return a.getDate()!=r.getDate()&&(e="d"),a.getMonth()!=r.getMonth()&&(e="d MMM"),a.getFullYear()!=r.getFullYear()&&(e="d MMM yyyy"),e}};var N=(()=>{class s{initializeIntercom(){let t=this.getFromLocalStorage();l.IsNotEmpty(t)&&window.Intercom("boot",{app_id:p.intercom.appId,name:t.name,email:t.email,created_at:t.created,user_hash:t.hash})}shutdown(){window.Intercom("shutdown"),this.clearStorage()}clearStorage(){localStorage.removeItem("INTERCOM")}updateLocalStorage(t){localStorage.setItem("INTERCOM",JSON.stringify(t))}getFromLocalStorage(){let t=localStorage.getItem("INTERCOM");return JSON.parse(t)}hideLauncher(){let t=this.getFromLocalStorage();t.hide_default_launcher=!0,window.Intercom("update",o({app_id:p.intercom.appId},t)),this.updateLocalStorage(t)}showLauncher(){let t=this.getFromLocalStorage();t.hide_default_launcher=!1,window.Intercom("update",o({app_id:p.intercom.appId},t)),this.updateLocalStorage(t)}isHideLauncher(){let t=this.getFromLocalStorage();return l.IsEmpty(t?.hide_default_launcher)?!1:t?.hide_default_launcher}static{this.\u0275fac=function(e){return new(e||s)}}static{this.\u0275prov=m({token:s,factory:s.\u0275fac,providedIn:"root"})}}return s})();export{L as a,l as b,p as c,N as d};
package/chunk-F3RSX7TC.js DELETED
@@ -1 +0,0 @@
1
- import{a as i,b as T}from"./chunk-U2VDC52W.js";import{d as s}from"./chunk-F7PVAVLQ.js";import{a as l,d as m}from"./chunk-DSZOROE6.js";import{_ as a,ca as c,ia as r}from"./chunk-6QJHEOXN.js";var h=(()=>{class o{constructor(){this.httpService=r(l),this.router=r(s),this.intercomService=r(m),this.tokenService=r(T),this.autoLogout()}login(e){return this.httpService.post("","api/Authentication/login",e).pipe(a(t=>{let n=e.SubDomain;localStorage.setItem("AUTH_TOKEN",t.access_token),localStorage.setItem("AUTH_POS_TOKEN",t.pos.access_token),localStorage.setItem("AUTH_TOKEN_TYPE",t.token_type),localStorage.setItem("AUTH_EXPIRES_AT",t.expiredAt),localStorage.setItem("AUTH_DOMAIN",n.substring(n.indexOf("."))),localStorage.setItem("AUTH_SUB_DOMAIN",e.SubDomain.split(".")[0]),localStorage.setItem("AUTH_USERNAME",e.Username),this.storeIntercom(t),this.storeTenantId(t.pos.access_token),this.storeRoles(t.access_token),this.tokenService.setToken(t.access_token),this.autoLogout()}))}storeIntercom(e){let t=e.intercomWidget?JSON.stringify(e.intercomWidget):null;t&&localStorage.setItem("INTERCOM",t)}isAuthenticated(){return!!localStorage.getItem("AUTH_TOKEN")}getToken(){return localStorage.getItem("AUTH_TOKEN")}getTokenType(){return localStorage.getItem("AUTH_TOKEN_TYPE")}isTokenExpired(){let e=localStorage.getItem("AUTH_EXPIRES_AT");return e?new Date(e).getTime()<Date.now():!0}autoLogout(){clearTimeout(this.logoutTimer);let e=localStorage.getItem("AUTH_EXPIRES_AT");if(!e)return;let t=new Date(e).getTime()-Date.now();t>0?this.logoutTimer=setTimeout(()=>this.logout(),t):this.logout()}getTenantExternalURL(){let e=localStorage.getItem("AUTH_SUB_DOMAIN")||"",t=localStorage.getItem("AUTH_DOMAIN")||"";return e&&t?`https://${e}${t}`:""}getTanantToken(){return localStorage.getItem("AUTH_POS_TOKEN")}logout(){this.intercomService.shutdown(),localStorage.removeItem("AUTH_TOKEN"),localStorage.removeItem("AUTH_TOKEN_TYPE"),localStorage.removeItem("AUTH_EXPIRES_AT"),localStorage.removeItem("INTERCOM"),clearTimeout(this.logoutTimer),this.router.navigate([""])}getFullDomain(){let e=localStorage.getItem("AUTH_SUB_DOMAIN"),t=localStorage.getItem("AUTH_DOMAIN");return!e||!t?(console.error("Subdomain or domain is missing in local storage."),null):`${e}${t}`}storeTenantId(e){let t=i(e);console.log("Decoded Token:",t),t&&(localStorage.setItem("AC_TENANT_BRAND",t.Brand),localStorage.setItem("AC_TENANT_LID",t.LID))}storeRoles(e){let t=i(e);console.log("Decoded Token:",t),t&&localStorage.setItem("AUTH_ROLES",JSON.stringify(t["http://schemas.microsoft.com/ws/2008/06/identity/claims/role"]))}checkAuthKeysExists(){return["AC_TENANT_BRAND","AC_TENANT_LID","AUTH_DOMAIN","AUTH_EXPIRES_AT","AUTH_POS_TOKEN","AUTH_SUB_DOMAIN","AUTH_TOKEN","AUTH_TOKEN_TYPE","AUTH_USERNAME","AUTH_ROLES"].every(t=>!!localStorage.getItem(t))}static{this.\u0275fac=function(t){return new(t||o)}}static{this.\u0275prov=c({token:o,factory:o.\u0275fac,providedIn:"root"})}}return o})();export{h as a};
package/chunk-G42V3ZZU.js DELETED
@@ -1 +0,0 @@
1
- import{b as Se}from"./chunk-YPOBALKC.js";import{a as I,b as V}from"./chunk-3VQUNDVT.js";import{d as _e,k as xe}from"./chunk-F6LZM7H5.js";import{a as be,b as Ce}from"./chunk-FSB3LHPU.js";import"./chunk-AMGBUOC4.js";import"./chunk-UPSNJEHO.js";import"./chunk-T367AQJ2.js";import"./chunk-AN4SAUSA.js";import"./chunk-URH77XNK.js";import"./chunk-E7QWESN4.js";import"./chunk-3DBSHDAQ.js";import"./chunk-PPXXWO4E.js";import"./chunk-M4SSELXT.js";import{b as ge}from"./chunk-WXIG4CXY.js";import"./chunk-WMZF4DQK.js";import"./chunk-QPPFPDWZ.js";import{i as he}from"./chunk-W63NE6LU.js";import"./chunk-S27Z7D3D.js";import{a as ae,b as re}from"./chunk-AD247LWQ.js";import{b as T,c as se,d as me,e as ce,f as de,g as fe,h as ue}from"./chunk-BKTBVFNX.js";import"./chunk-ZFNIPERQ.js";import{y as le,z as pe}from"./chunk-ME4ALIS7.js";import"./chunk-DTYVTTET.js";import{e as Y,f as Z,k as $,l as ee,o as te,u as ie,w as oe,x as ne}from"./chunk-VMI3QWC6.js";import{e as z,l as J}from"./chunk-F7PVAVLQ.js";import{a as X}from"./chunk-DSZOROE6.js";import"./chunk-2BI7WNJP.js";import{q as W,s as q}from"./chunk-ZK43JB4A.js";import"./chunk-F2X3VGZZ.js";import{D as M,Dc as H,Eb as F,Ec as Q,Fc as P,Ha as O,Mb as f,Oc as u,Pc as h,Sc as g,Wb as o,Xb as n,Y as D,Yb as E,ac as L,bd as B,c as v,ca as N,cd as U,fc as w,gc as k,ia as d,ib as p,qa as x,ra as S,sc as r,tc as y,uc as C,xc as j,yb as R,yc as G,zc as K}from"./chunk-6QJHEOXN.js";import{a as m,b as c}from"./chunk-YQFG5XE2.js";var ke=(()=>{class e{constructor(){this.httpService=d(X)}fetchCashAndBankLoader(){return this.httpService.get("","api/CashAndBankLoader/GetCashAndBank")}fetchCashAndBankData(t){return this.httpService.get("","api/CashAndBank/GetCashAndBank",{params:t})}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=N({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var ve={data:{data:[],pageTitle:"",pageSubTitle:""},filter:null,options:{hasGeneralLedger:!1}},A=se(ue("cash-bank-store"),fe(ve),me(e=>({totalBalance:B(()=>e.data().data.reduce((l,t)=>l+t.balance,0)),subTotalDebit:B(()=>e.data().data.reduce((l,t)=>l+t.debit,0)),subTotalCredit:B(()=>e.data().data.reduce((l,t)=>l+t.credit,0))})),de(e=>{let l=d(ke);return{updateFilterQuery(i){T(e,a=>c(m({},a),{filter:c(m({},i),{pageNumber:1})}))},loadCashAndBankLoader:I(v(D(()=>l.fetchCashAndBankLoader().pipe(V({next:i=>{T(e,a=>c(m({},a),{options:i.options,filter:i.filter}))},error:i=>{console.log("error",i)}}))))),loadCashAndBankData:I(v(M(i=>!!i),D(i=>l.fetchCashAndBankData(i).pipe(V({next:a=>{T(e,s=>c(m({},s),{data:a}))},error:a=>{console.log("error",a)}})))))}}),ce({onInit(e){e.loadCashAndBankLoader(),e.loadCashAndBankData(e.filter)}}));var De=["class","page"],Fe=e=>[e],Ee=()=>["/pages/report/general-ledger"],we=e=>({id:e});function Pe(e,l){e&1&&(o(0,"tr")(1,"th"),r(2,"Code"),n(),o(3,"th"),r(4,"Name"),n(),o(5,"th",8)(6,"span",9),r(7," Debit "),n()(),o(8,"th",8)(9,"span",10),r(10," Credit "),n()(),o(11,"th",8)(12,"span",11),r(13," Current Balance"),n()()())}function Ie(e,l){if(e&1&&(o(0,"tr")(1,"td"),r(2),n(),o(3,"td")(4,"a",12),r(5),n()(),o(6,"td",13),r(7),u(8,"number"),n(),o(9,"td",14),r(10),u(11,"number"),n(),o(12,"td",8)(13,"a",15),r(14),u(15,"number"),n()()()),e&2){let t=l.$implicit;p(2),y(t.code),p(2),f("routerLink",P(14,Fe,"/pages/chart-of-account/account/"+t.accountID)),p(),y(t.name),p(2),C(" ",h(8,8,t.debit)," "),p(3),C(" ",h(11,10,t.credit)," "),p(3),f("routerLink",Q(16,Ee))("queryParams",P(17,we,t.accountID)),p(),y(h(15,12,t.balance))}}function Ve(e,l){if(e&1&&(o(0,"tr"),E(1,"td"),o(2,"td",16),r(3,"Total"),n(),o(4,"td",17),r(5),u(6,"number"),n(),o(7,"td",18),r(8),u(9,"number"),n(),o(10,"td",19),r(11),u(12,"number"),n()()),e&2){let t=k(2);p(5),C(" ",h(6,3,t.store.subTotalDebit())," "),p(3),C(" ",h(9,5,t.store.subTotalCredit())," "),p(3),C(" ",h(12,7,t.store.totalBalance())," ")}}function Ae(e,l){e&1&&(o(0,"tr")(1,"td",20)(2,"span"),r(3,"No records found."),n()()())}function Me(e,l){if(e&1&&(o(0,"p-panel")(1,"p-table",7),F(2,Pe,14,0,"ng-template",null,2,g)(4,Ie,16,19,"ng-template",null,3,g)(6,Ve,13,9,"ng-template",null,4,g)(8,Ae,4,0,"ng-template",null,5,g),n()()),e&2){let t=k();p(),f("value",t.store.data().data)}}function Ne(e,l){if(e&1&&(o(0,"form",21)(1,"div",22)(2,"label",23),r(3,"From - To"),n(),o(4,"div",24),E(5,"p-datepicker",25)(6,"p-datepicker",26),n()()()),e&2){let t=k();f("formGroup",t.filterForm),p(5),f("iconDisplay","input")("showIcon",!0),p(),f("iconDisplay","input")("showIcon",!0)}}var ye=(()=>{class e{constructor(){this.store=d(A),this.isDialogFilterVisible=O(!1),this.routeInfo=Be,this.fb=d(ie),this.dayjsService=d(Se),U(()=>{let t=this.store.filter();if(t){let i=Object.entries(t).reduce((a,[s,b])=>(s==="from"||s==="to"?a[s]=b?new Date(b):null:a[s]=b,a),{});this.filterForm?.patchValue(i)}})}ngOnInit(){this.initForm()}initForm(){this.filterForm=this.fb.group({text:this.fb.control(""),listOutletID:this.fb.control([]),listCategoryID:this.fb.control([]),isInRoleEmptyOutlets:this.fb.control(!1),discontinued:this.fb.control("all"),discontinuedValue:this.fb.control(!1),from:this.fb.control(null),to:this.fb.control(null),pageNumber:this.fb.control(1),pageSize:this.fb.control(10),export:this.fb.control(!1),exportPageNumber:this.fb.control(1),exportPageSize:this.fb.control(10)})}onSearch(t){this.store.updateFilterQuery(c(m({},this.store.filter()),{text:t}))}onFilterOKEvent(){let t=this.filterForm.getRawValue();console.log("\u{1F680} ~ CashBankPageComponent ~ onFilterOKEvent ~ formValue:",t);let i=c(m({},t),{from:t.from?this.dayjsService.format(t.from):void 0,to:t.to?this.dayjsService.format(t.to):void 0});this.store.updateFilterQuery(i),this.isDialogFilterVisible.set(!1)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=R({type:e,selectors:[["app-cash-bank",8,"page"]],features:[H([A])],attrs:De,decls:5,vars:6,consts:[["content",""],["filters",""],["header",""],["body",""],["footer",""],["emptymessage",""],[3,"search","isDialogFilterVisibleChange","filterConfirmed","pageTitle","pageSubTitle","scrollable","isSearchableInput","isFilterable","isDialogFilterVisible"],[3,"value"],[1,"text-end"],["pTooltip","Total debit based on the selected date filter","tooltipPosition","top"],["pTooltip","Total credit based on the selected date filter","tooltipPosition","top"],["pTooltip","Current balance based on the selected date filter","tooltipPosition","top"],[1,"link","link-primary",3,"routerLink"],[1,"text-end","text-success"],[1,"text-end","text-danger"],[1,"link","link-primary",3,"routerLink","queryParams"],[1,"fw-bold"],[1,"fw-bold","text-end","text-success"],[1,"fw-bold","text-end","text-danger"],[1,"text-end","fw-bold"],["colspan","5"],[1,"d-flex","flex-column","row-gap-3",3,"formGroup"],[1,"d-flex","flex-column"],["for","outlet"],[1,"d-flex","flex-column","gap-2"],["formControlName","from","styleClass","w-100 mb-0","appendTo","body","dataType","string","inputId","icondisplay",3,"iconDisplay","showIcon"],["formControlName","to","styleClass","w-100","appendTo","body","inputId","icondisplay",3,"iconDisplay","showIcon"]],template:function(i,a){if(i&1){let s=L();o(0,"app-main-panel",6),w("search",function(_){return x(s),S(a.onSearch(_))}),K("isDialogFilterVisibleChange",function(_){return x(s),G(a.isDialogFilterVisible,_)||(a.isDialogFilterVisible=_),S(_)}),w("filterConfirmed",function(){return x(s),S(a.onFilterOKEvent())}),F(1,Me,10,1,"ng-template",null,0,g)(3,Ne,7,5,"ng-template",null,1,g),n()}i&2&&(f("pageTitle",a.store.data().pageTitle)("pageSubTitle",a.store.data().pageSubTitle)("scrollable",!0)("isSearchableInput",!0)("isFilterable",!0),j("isDialogFilterVisible",a.isDialogFilterVisible))},dependencies:[q,W,he,oe,$,Y,Z,xe,_e,ge,J,z,re,ae,pe,le,ne,ee,te,Ce,be],styles:[".card[_ngcontent-%COMP%]{height:calc(100vh - 120px)}.card[_ngcontent-%COMP%] .card-body[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:inherit;overflow-y:auto}"],changeDetection:0})}}return e})();var St=[{path:"",component:ye,children:[]}],Be={path:"cash-of-account",title:"COA",iconName:"fa fa-calculator",class:"",label:"",labelClass:"",extralink:!1,submenu:[]};export{St as CASH_BANK_ROUTES,Be as CASH_BANK_ROUTE_PAGE};
package/chunk-H7GQCGCR.js DELETED
@@ -1 +0,0 @@
1
- import{a as K}from"./chunk-BG6BR7KI.js";import{b as q}from"./chunk-YPOBALKC.js";import{a as J}from"./chunk-XKI7WLHE.js";import{a as z,b as H}from"./chunk-PGOSR3RI.js";import{a as O,b as W}from"./chunk-FSB3LHPU.js";import"./chunk-AMGBUOC4.js";import"./chunk-UPSNJEHO.js";import"./chunk-WMZF4DQK.js";import"./chunk-QPPFPDWZ.js";import{i as I}from"./chunk-W63NE6LU.js";import"./chunk-S27Z7D3D.js";import{a as G,b as A}from"./chunk-AD247LWQ.js";import"./chunk-BKTBVFNX.js";import"./chunk-ZFNIPERQ.js";import{o as j,w as k,x as B}from"./chunk-ME4ALIS7.js";import"./chunk-DTYVTTET.js";import{b as y,e as D,f as M,k as T,l as w,o as N,u as V,x as R}from"./chunk-VMI3QWC6.js";import{d as P}from"./chunk-F7PVAVLQ.js";import"./chunk-DSZOROE6.js";import"./chunk-2BI7WNJP.js";import{s as F}from"./chunk-ZK43JB4A.js";import"./chunk-F2X3VGZZ.js";import{Cb as S,Eb as p,Mb as c,Sc as a,Wb as i,Xb as t,Yb as f,_ as C,ac as b,fc as E,gc as u,ia as m,ib as _,qa as x,ra as h,sc as l,yb as v}from"./chunk-6QJHEOXN.js";import"./chunk-YQFG5XE2.js";function L(e,d){if(e&1){let o=b();i(0,"p-button",4),E("onClick",function(){x(o);let n=u();return h(n.onSubmit())}),t()}}function Q(e,d){e&1&&(i(0,"div",13)(1,"h3",14),l(2,"General"),t(),i(3,"span",15),l(4,"Enter your closing Fiscal Date"),t()())}function U(e,d){if(e&1&&(i(0,"div",5)(1,"div",6)(2,"p-panel"),p(3,Q,5,0,"ng-template",null,2,a),i(5,"div",5)(6,"div",7)(7,"form",8)(8,"div",9)(9,"label",10),l(10,"Period"),t(),f(11,"p-datePicker",11),t(),i(12,"div",9)(13,"label",10),l(14,"Description"),t(),f(15,"textarea",12),t()()()()()()()),e&2){let o=u();_(7),c("formGroup",o.form)}}var he=(()=>{class e extends J{constructor(){super(),this.closingEntriesService=m(K),this.dayjsService=m(q),this.fb=m(V),this.router=m(P)}ngOnInit(){this.initForm()}initForm(){this.form=this.fb.group({Period:this.fb.control(new Date),Note:this.fb.control("")})}onSubmit(){if(this.form.invalid){this.form.markAllAsTouched();return}let{Period:o}=this.form.getRawValue(),r=Object.entries(this.form.getRawValue()).reduce((n,[s,g])=>(s==="Period"?n[s]=this.dayjsService.from(o)?this.dayjsService.format(g):"":n[s]=g,n),{});this.closingEntriesService.createClosingEntry(r).pipe(C(()=>{this.router.navigate(["/pages/accounting-setup/closing-entries"])})).subscribe()}static{this.\u0275fac=function(r){return new(r||e)}}static{this.\u0275cmp=v({type:e,selectors:[["app-closing-form"]],features:[S],decls:5,vars:1,consts:[["actionButton",""],["content",""],["header",""],["pageTitle","Closing Entries Form",3,"hasMainWrapperPadding"],["label","Submit",3,"onClick"],[1,"row"],[1,"col"],[1,"col-4"],[1,"d-flex","flex-column","row-gap-3",3,"formGroup"],[1,"d-flex","flex-column"],["for",""],["formControlName","Period","fluid",""],["formControlName","Note","rows","5","cols","30","pTextarea",""],[1,"d-flex","flex-column","mx-2"],[1,"fs-5","m-0"],[1,"fs-3"]],template:function(r,n){r&1&&(i(0,"app-main-panel",3),p(1,L,1,0,"ng-template",null,0,a)(3,U,16,1,"ng-template",null,1,a),t()),r&2&&c("hasMainWrapperPadding",!0)},dependencies:[I,F,A,G,W,O,j,H,z,B,k,R,T,y,D,M,w,N],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return e})();export{he as ClosingFormComponent};
package/chunk-IDHDHBFV.js DELETED
@@ -1,202 +0,0 @@
1
- import{a as ie,b as yt}from"./chunk-LBREDZL5.js";import{f as Ct}from"./chunk-RM5HLXNW.js";import"./chunk-E6SW7I4D.js";import{a as xt}from"./chunk-G4XX7EU2.js";import{a as bt}from"./chunk-XKI7WLHE.js";import{a as wt}from"./chunk-RXR5DXWS.js";import"./chunk-VDXZGF3M.js";import"./chunk-MHRSQRHT.js";import{a as rt}from"./chunk-6WWXJJID.js";import"./chunk-U2VDC52W.js";import{a as ee,b as te}from"./chunk-3VQUNDVT.js";import{d as _t,i as ft,j as ht,k as gt}from"./chunk-F6LZM7H5.js";import"./chunk-FSB3LHPU.js";import"./chunk-AMGBUOC4.js";import"./chunk-UPSNJEHO.js";import"./chunk-T367AQJ2.js";import{a as dt,b as ut}from"./chunk-AN4SAUSA.js";import"./chunk-URH77XNK.js";import"./chunk-E7QWESN4.js";import"./chunk-3DBSHDAQ.js";import"./chunk-PPXXWO4E.js";import"./chunk-M4SSELXT.js";import"./chunk-WMZF4DQK.js";import"./chunk-QPPFPDWZ.js";import{i as mt}from"./chunk-W63NE6LU.js";import{a as We}from"./chunk-S27Z7D3D.js";import{a as it,b as nt}from"./chunk-AD247LWQ.js";import{b as E,c as ot,d as at,e as st,f as lt,g as pt,h as ct}from"./chunk-BKTBVFNX.js";import"./chunk-ZFNIPERQ.js";import{a as Je,f as O,k as Ke,m as Xe,o as Ye,s as et,w as Y,x as tt}from"./chunk-ME4ALIS7.js";import"./chunk-DTYVTTET.js";import{A as ze,C as je,K as qe,La as $e,Ma as X,Ua as Ze,c as K,e as Ae,f as Oe,l as Be,ma as Ge,o as Ne,u as He,x as Qe,z as fe}from"./chunk-VMI3QWC6.js";import{b as Pe,d as Le,e as Re}from"./chunk-F7PVAVLQ.js";import"./chunk-DSZOROE6.js";import"./chunk-2BI7WNJP.js";import{h as Z,k as J,m as Ve,s as W}from"./chunk-ZK43JB4A.js";import{c as Me,d as ce,f as me,h as de,i as ue,k as _e}from"./chunk-F2X3VGZZ.js";import{$b as U,$c as Fe,Aa as H,Cb as z,Dc as $,Eb as u,Fc as S,Gc as De,Ha as L,Kc as Ee,Lb as F,Mb as p,Pb as Ce,Qb as ae,Rb as j,Sb as R,Sc as x,Ub as M,Vb as A,Wb as l,Xb as s,Y as N,Yb as y,Zb as ye,_ as re,_b as ve,_c as D,ac as k,bd as P,c as B,ca as we,cd as Ue,da as be,fc as b,gc as c,hc as Te,ia as C,ib as a,ic as ke,lc as V,mc as q,nc as v,oc as T,qa as _,ra as f,rc as Ie,sc as d,tc as I,ua as oe,uc as G,wc as Se,xc as se,yb as Q,yc as le,zb as xe,zc as pe}from"./chunk-6QJHEOXN.js";import{a as h,b as g}from"./chunk-YQFG5XE2.js";var kt={data:[],count:0,filter:{pagination:1,pageSize:10,groupID:null,text:""},meta:{filter:{pagination:1,pageSize:10,groupID:null,text:""},options:{groups:[]}},metaForm:{form:{id:"",groupID:"",accessTypeID:1,listJournalTagID:[]},options:{users:[],groups:[],accessTypes:[],journalTags:[]}}},he=ot(ct("UserStore"),pt(kt),at(t=>({first:P(()=>(t.filter().pagination-1)*t.filter().pageSize+1),end:P(()=>Math.min(t.filter().pagination*t.filter().pageSize,t.count())),hasCheckedRows:P(()=>t.data().some(o=>o.checked)),checkedData:P(()=>t.data().filter(o=>o.checked).map(o=>o.userID)),selectedID:P(()=>t.data().find(o=>o.checked)?.userID||null)})),lt(t=>{let o=C(ie);return{setFilter(n){E(t,i=>g(h({},i),{filter:n}))},onRowSelect(n){E(t,i=>{let r=i.data.map(m=>m.userID===n.userID?g(h({},m),{checked:!0}):m);return g(h({},i),{data:r})})},onRowUnselect(n){E(t,i=>{let r=i.data.map(m=>m.userID===n.userID?g(h({},m),{checked:!1}):m);return g(h({},i),{data:r})})},onHeaderCheckboxToggle(n){let i=localStorage.getItem("AUTH_USERNAME");E(t,r=>{let m=r.data.map(w=>w.userName!==i?g(h({},w),{checked:n}):g(h({},w),{checked:!1}));return g(h({},r),{data:m})})},getUserLoader:ee(B(N(()=>o.getUserLoaderList().pipe(te({next:n=>{E(t,i=>g(h({},i),{meta:n}))},error:n=>{console.error("Failed to fetch user loader list:",n)}}))))),getUserFormMeta:ee(B(N(n=>o.getUserFormMeta(n).pipe(te({next:i=>{E(t,r=>g(h({},r),{metaForm:i}))},error:i=>{console.error("Failed to fetch user form meta:",i)}}))))),getUsers:ee(B(N(n=>o.getUsers(n).pipe(te({next:i=>{E(t,r=>g(h({},r),{data:i.data.map(m=>g(h({},m),{checked:!1})),count:i.count}))},error:i=>{console.error("Failed to fetch users:",i)}})))))}}),st({onInit:t=>{t.getUserLoader(),t.getUsers(t.filter)}}));var Dt=["header"],Et=["footer"],Ft=["content"],Ut=["closeicon"],Vt=["headless"],Pt=["maskRef"],Lt=["container"],Rt=["closeButton"],Mt=["*"],At=(t,o,e,n,i,r)=>({"p-drawer":!0,"p-drawer-active":t,"p-drawer-left":o,"p-drawer-right":e,"p-drawer-top":n,"p-drawer-bottom":i,"p-drawer-full":r}),Ot=(t,o)=>({transform:t,transition:o}),Bt=t=>({value:"visible",params:t});function Nt(t,o){t&1&&U(0)}function Ht(t,o){if(t&1&&u(0,Nt,1,0,"ng-container",4),t&2){let e=c(2);p("ngTemplateOutlet",e.headlessTemplate||e._headlessTemplate)}}function Qt(t,o){t&1&&U(0)}function zt(t,o){if(t&1&&(l(0,"div"),d(1),s()),t&2){let e=c(3);ae(e.cx("title")),a(),I(e.header)}}function jt(t,o){t&1&&y(0,"TimesIcon"),t&2&&F("data-pc-section","closeicon")}function qt(t,o){}function Gt(t,o){t&1&&u(0,qt,0,0,"ng-template")}function $t(t,o){if(t&1&&u(0,jt,1,1,"TimesIcon",8)(1,Gt,1,0,null,4),t&2){let e=c(4);p("ngIf",!e.closeIconTemplate&&!e._closeIconTemplate),a(),p("ngTemplateOutlet",e.closeIconTemplate||e._closeIconTemplate)}}function Zt(t,o){if(t&1){let e=k();l(0,"p-button",9),b("onClick",function(i){_(e);let r=c(3);return f(r.close(i))})("keydown.enter",function(i){_(e);let r=c(3);return f(r.close(i))}),u(1,$t,2,2,"ng-template",null,1,x),s()}if(t&2){let e=c(3);p("ngClass",e.cx("closeButton"))("buttonProps",e.closeButtonProps)("ariaLabel",e.ariaCloseLabel),F("data-pc-section","closebutton")("data-pc-group-section","iconcontainer")}}function Jt(t,o){t&1&&U(0)}function Wt(t,o){t&1&&U(0)}function Kt(t,o){if(t&1&&(ye(0),l(1,"div",5),u(2,Wt,1,0,"ng-container",4),s(),ve()),t&2){let e=c(3);a(),p("ngClass",e.cx("footer")),F("data-pc-section","footer"),a(),p("ngTemplateOutlet",e.footerTemplate||e._footerTemplate)}}function Xt(t,o){if(t&1&&(l(0,"div",5),u(1,Qt,1,0,"ng-container",4)(2,zt,2,3,"div",6)(3,Zt,3,5,"p-button",7),s(),l(4,"div",5),ke(5),u(6,Jt,1,0,"ng-container",4),s(),u(7,Kt,3,3,"ng-container",8)),t&2){let e=c(2);p("ngClass",e.cx("header")),F("data-pc-section","header"),a(),p("ngTemplateOutlet",e.headerTemplate||e._headerTemplate),a(),p("ngIf",e.header),a(),p("ngIf",e.showCloseIcon&&e.closable),a(),p("ngClass",e.cx("content")),F("data-pc-section","content"),a(2),p("ngTemplateOutlet",e.contentTemplate||e._contentTemplate),a(),p("ngIf",e.footerTemplate||e._footerTemplate)}}function Yt(t,o){if(t&1){let e=k();l(0,"div",3,0),b("@panelState.start",function(i){_(e);let r=c();return f(r.onAnimationStart(i))})("@panelState.done",function(i){_(e);let r=c();return f(r.onAnimationEnd(i))})("keydown",function(i){_(e);let r=c();return f(r.onKeyDown(i))}),u(2,Ht,1,1,"ng-container")(3,Xt,8,9),s()}if(t&2){let e=c();Ce(e.style),ae(e.styleClass),p("ngClass",Ee(9,At,e.visible,e.position==="left"&&!e.fullScreen,e.position==="right"&&!e.fullScreen,e.position==="top"&&!e.fullScreen,e.position==="bottom"&&!e.fullScreen,e.fullScreen||e.position==="full"))("@panelState",S(19,Bt,De(16,Ot,e.transformOptions,e.transitionOptions))),F("data-pc-name","sidebar")("data-pc-section","root"),a(2),j(e.headlessTemplate||e._headlessTemplate?2:3)}}var ei=({dt:t})=>`
2
- .p-drawer {
3
- display: flex;
4
- flex-direction: column;
5
- pointer-events: auto;
6
- transform: translate3d(0px, 0px, 0px);
7
- position: fixed;
8
- transition: transform 0.3s;
9
- background: ${t("drawer.background")};
10
- color: ${t("drawer.color")};
11
- border: 1px solid ${t("drawer.border.color")};
12
- box-shadow: ${t("drawer.shadow")};
13
- }
14
-
15
- .p-drawer-content {
16
- overflow-y: auto;
17
- flex-grow: 1;
18
- padding: ${t("drawer.content.padding")};
19
- }
20
-
21
- .p-drawer-header {
22
- display: flex;
23
- align-items: center;
24
- justify-content: space-between;
25
- flex-shrink: 0;
26
- padding: ${t("drawer.header.padding")};
27
- }
28
-
29
- .p-drawer-footer {
30
- padding: ${t("drawer.header.padding")};
31
- }
32
-
33
- .p-drawer-title {
34
- font-weight: ${t("drawer.title.font.weight")};
35
- font-size: ${t("drawer.title.font.size")};
36
- }
37
-
38
- .p-drawer-full .p-drawer {
39
- transition: none;
40
- transform: none;
41
- width: 100vw !important;
42
- height: 100vh !important;
43
- max-height: 100%;
44
- top: 0px !important;
45
- left: 0px !important;
46
- border-width: 1px;
47
- }
48
-
49
- .p-drawer-left .p-drawer {
50
- align-self: start;
51
- width: 20rem;
52
- height: 100%;
53
- border-right-width: 1px;
54
- }
55
-
56
- .p-drawer-right .p-drawer {
57
- align-self: end;
58
- width: 20rem;
59
- height: 100%;
60
- border-left-width: 1px;
61
- }
62
-
63
- .p-drawer-top .p-drawer {
64
- height: 10rem;
65
- width: 100%;
66
- border-bottom-width: 1px;
67
- }
68
-
69
- .p-drawer-bottom .p-drawer {
70
- height: 10rem;
71
- width: 100%;
72
- border-top-width: 1px;
73
- }
74
-
75
- .p-drawer-left .p-drawer-content,
76
- .p-drawer-right .p-drawer-content,
77
- .p-drawer-top .p-drawer-content,
78
- .p-drawer-bottom .p-drawer-content {
79
- width: 100%;
80
- height: 100%;
81
- }
82
-
83
- .p-drawer-open {
84
- display: flex;
85
- }
86
-
87
- .p-drawer-top {
88
- justify-content: flex-start;
89
- }
90
-
91
- .p-drawer-bottom {
92
- justify-content: flex-end;
93
- }
94
-
95
- .p-drawer {
96
- position: fixed;
97
- transition: transform 0.3s;
98
- display: flex;
99
- flex-direction: column;
100
- }
101
-
102
- .p-drawer-content {
103
- position: relative;
104
- overflow-y: auto;
105
- flex-grow: 1;
106
- }
107
-
108
- .p-drawer-header {
109
- display: flex;
110
- align-items: center;
111
- }
112
-
113
- .p-drawer-footer {
114
- margin-top: auto;
115
- }
116
-
117
- .p-drawer-icon {
118
- display: flex;
119
- align-items: center;
120
- justify-content: center;
121
- margin-left: auto;
122
- }
123
-
124
- .p-drawer-left {
125
- top: 0;
126
- left: 0;
127
- width: 20rem;
128
- height: 100%;
129
- }
130
-
131
- .p-drawer-right {
132
- top: 0;
133
- right: 0;
134
- width: 20rem;
135
- height: 100%;
136
- }
137
-
138
- .p-drawer-top {
139
- top: 0;
140
- left: 0;
141
- width: 100%;
142
- height: 10rem;
143
- }
144
-
145
- .p-drawer-bottom {
146
- bottom: 0;
147
- left: 0;
148
- width: 100%;
149
- height: 10rem;
150
- }
151
-
152
- .p-drawer-full {
153
- width: 100%;
154
- height: 100%;
155
- top: 0;
156
- left: 0;
157
- -webkit-transition: none;
158
- transition: none;
159
- }
160
-
161
- .p-drawer-mask {
162
- background-color: rgba(0, 0, 0, 0.4);
163
- transition-duration: 0.2s;
164
- }
165
-
166
- .p-overlay-mask {
167
- position: fixed;
168
- top: 0;
169
- left: 0;
170
- width: 100%;
171
- height: 100%;
172
- }
173
-
174
- .p-overlay-mask:dir(rtl) {
175
- flex-direction: row-reverse;
176
- }
177
-
178
- .p-overlay-mask-enter {
179
- animation: p-overlay-mask-enter-animation 150ms forwards;
180
- }
181
-
182
- .p-overlay-mask-leave {
183
- animation: p-overlay-mask-leave-animation 150ms forwards;
184
- }
185
-
186
- @keyframes p-overlay-mask-enter-animation {
187
- from {
188
- background-color: transparent;
189
- }
190
- to {
191
- background-color: rgba(0, 0, 0, 0.4);
192
- }
193
- }
194
- @keyframes p-overlay-mask-leave-animation {
195
- from {
196
- background-color: rgba(0, 0, 0, 0.4);
197
- }
198
- to {
199
- background-color: transparent;
200
- }
201
- }
202
- `,ti={mask:({instance:t})=>({position:"fixed",height:"100%",width:"100%",left:0,top:0,display:"flex",flexDirection:"column",alignItems:t.position==="top"?"flex-start":t.position==="bottom"?"flex-end":"center"})},ii={mask:({instance:t})=>({"p-drawer-mask":!0,"p-overlay-mask p-overlay-mask-enter":t.modal,"p-drawer-open":t.containerVisible,"p-drawer-full":t.fullScreen,[`p-drawer-${t.position}`]:!!t.position}),root:({instance:t})=>({"p-drawer p-component":!0,"p-drawer-full":t.fullScreen}),header:"p-drawer-header",title:"p-drawer-title",pcCloseButton:"p-drawer-close-button",content:"p-drawer-content",footer:"p-drawer-footer"},vt=(()=>{class t extends Ze{name="drawer";theme=ei;classes=ii;inlineStyles=ti;static \u0275fac=(()=>{let e;return function(i){return(e||(e=oe(t)))(i||t)}})();static \u0275prov=we({token:t,factory:t.\u0275fac})}return t})();var ni=ue([me({transform:"{{transform}}",opacity:0}),ce("{{transition}}")]),ri=ue([ce("{{transition}}",me({transform:"{{transform}}",opacity:0}))]),ge=(()=>{class t extends Je{appendTo="body";blockScroll=!1;style;styleClass;ariaCloseLabel;autoZIndex=!0;baseZIndex=0;modal=!0;closeButtonProps={severity:"secondary",text:!0,rounded:!0};dismissible=!0;showCloseIcon=!0;closeOnEscape=!0;transitionOptions="150ms cubic-bezier(0, 0, 0.2, 1)";get visible(){return this._visible}set visible(e){this._visible=e}get position(){return this._position}set position(e){if(this._position=e,e==="full"){this.transformOptions="none";return}switch(e){case"left":this.transformOptions="translate3d(-100%, 0px, 0px)";break;case"right":this.transformOptions="translate3d(100%, 0px, 0px)";break;case"bottom":this.transformOptions="translate3d(0px, 100%, 0px)";break;case"top":this.transformOptions="translate3d(0px, -100%, 0px)";break}}get fullScreen(){return this._fullScreen}set fullScreen(e){this._fullScreen=e,e&&(this.transformOptions="none")}header;maskStyle;closable=!0;onShow=new H;onHide=new H;visibleChange=new H;maskRef;containerViewChild;closeButtonViewChild;initialized;_visible;_position="left";_fullScreen=!1;container;transformOptions="translate3d(-100%, 0px, 0px)";mask;maskClickListener;documentEscapeListener;animationEndListener;_componentStyle=C(vt);ngAfterViewInit(){super.ngAfterViewInit(),this.initialized=!0}headerTemplate;footerTemplate;contentTemplate;closeIconTemplate;headlessTemplate;_headerTemplate;_footerTemplate;_contentTemplate;_closeIconTemplate;_headlessTemplate;templates;ngAfterContentInit(){this.templates?.forEach(e=>{switch(e.getType()){case"content":this._contentTemplate=e.template;break;case"header":this._headerTemplate=e.template;break;case"footer":this._footerTemplate=e.template;break;case"closeicon":this._closeIconTemplate=e.template;break;case"headless":this._headlessTemplate=e.template;break;default:this._contentTemplate=e.template;break}})}onKeyDown(e){e.code==="Escape"&&this.hide(!1)}show(){this.container.setAttribute(this.attrSelector,""),this.autoZIndex&&O.set("modal",this.container,this.baseZIndex||this.config.zIndex.modal),this.modal&&this.enableModality(),this.onShow.emit({}),this.visibleChange.emit(!0)}hide(e=!0){e&&this.onHide.emit({}),this.modal&&this.disableModality()}close(e){this.hide(),this.visibleChange.emit(!1),e.preventDefault()}enableModality(){let e=this.document.querySelectorAll(".p-drawer-active"),n=e.length,i=n==1?String(parseInt(this.container.style.zIndex)-1):String(parseInt(e[n-1].style.zIndex)-1);this.mask||(this.mask=this.renderer.createElement("div"),this.renderer.setStyle(this.mask,"zIndex",i),Ge(this.mask,"style",this.maskStyle),fe(this.mask,"p-overlay-mask p-drawer-mask p-overlay-mask-enter"),this.dismissible&&(this.maskClickListener=this.renderer.listen(this.mask,"click",r=>{this.dismissible&&this.close(r)})),this.renderer.appendChild(this.document.body,this.mask),this.blockScroll&&ze())}disableModality(){this.mask&&(fe(this.mask,"p-overlay-mask-leave"),this.animationEndListener=this.renderer.listen(this.mask,"animationend",this.destroyModal.bind(this)))}destroyModal(){this.unbindMaskClickListener(),this.mask&&this.renderer.removeChild(this.document.body,this.mask),this.blockScroll&&je(),this.unbindAnimationEndListener(),this.mask=null}onAnimationStart(e){switch(e.toState){case"visible":this.container=e.element,this.appendContainer(),this.show(),this.closeOnEscape&&this.bindDocumentEscapeListener();break}}onAnimationEnd(e){switch(e.toState){case"void":this.hide(!1),O.clear(this.container),this.unbindGlobalListeners();break}}appendContainer(){this.appendTo&&(this.appendTo==="body"?this.renderer.appendChild(this.document.body,this.container):qe(this.appendTo,this.container))}bindDocumentEscapeListener(){let e=this.el?this.el.nativeElement.ownerDocument:this.document;this.documentEscapeListener=this.renderer.listen(e,"keydown",n=>{n.which==27&&parseInt(this.container.style.zIndex)===O.get(this.container)&&this.close(n)})}unbindDocumentEscapeListener(){this.documentEscapeListener&&(this.documentEscapeListener(),this.documentEscapeListener=null)}unbindMaskClickListener(){this.maskClickListener&&(this.maskClickListener(),this.maskClickListener=null)}unbindGlobalListeners(){this.unbindMaskClickListener(),this.unbindDocumentEscapeListener()}unbindAnimationEndListener(){this.animationEndListener&&this.mask&&(this.animationEndListener(),this.animationEndListener=null)}ngOnDestroy(){this.initialized=!1,this.visible&&this.modal&&this.destroyModal(),this.appendTo&&this.container&&this.renderer.appendChild(this.el.nativeElement,this.container),this.container&&this.autoZIndex&&O.clear(this.container),this.container=null,this.unbindGlobalListeners(),this.unbindAnimationEndListener()}static \u0275fac=(()=>{let e;return function(i){return(e||(e=oe(t)))(i||t)}})();static \u0275cmp=Q({type:t,selectors:[["p-drawer"]],contentQueries:function(n,i,r){if(n&1&&(V(r,Dt,4),V(r,Et,4),V(r,Ft,4),V(r,Ut,4),V(r,Vt,4),V(r,$e,4)),n&2){let m;v(m=T())&&(i.headerTemplate=m.first),v(m=T())&&(i.footerTemplate=m.first),v(m=T())&&(i.contentTemplate=m.first),v(m=T())&&(i.closeIconTemplate=m.first),v(m=T())&&(i.headlessTemplate=m.first),v(m=T())&&(i.templates=m)}},viewQuery:function(n,i){if(n&1&&(q(Pt,5),q(Lt,5),q(Rt,5)),n&2){let r;v(r=T())&&(i.maskRef=r.first),v(r=T())&&(i.containerViewChild=r.first),v(r=T())&&(i.closeButtonViewChild=r.first)}},inputs:{appendTo:"appendTo",blockScroll:[2,"blockScroll","blockScroll",D],style:"style",styleClass:"styleClass",ariaCloseLabel:"ariaCloseLabel",autoZIndex:[2,"autoZIndex","autoZIndex",D],baseZIndex:[2,"baseZIndex","baseZIndex",Fe],modal:[2,"modal","modal",D],closeButtonProps:"closeButtonProps",dismissible:[2,"dismissible","dismissible",D],showCloseIcon:[2,"showCloseIcon","showCloseIcon",D],closeOnEscape:[2,"closeOnEscape","closeOnEscape",D],transitionOptions:"transitionOptions",visible:"visible",position:"position",fullScreen:"fullScreen",header:"header",maskStyle:"maskStyle",closable:[2,"closable","closable",D]},outputs:{onShow:"onShow",onHide:"onHide",visibleChange:"visibleChange"},features:[$([vt]),z],ngContentSelectors:Mt,decls:1,vars:1,consts:[["container",""],["icon",""],["role","complementary",3,"ngClass","style","class","keydown",4,"ngIf"],["role","complementary",3,"keydown","ngClass"],[4,"ngTemplateOutlet"],[3,"ngClass"],[3,"class",4,"ngIf"],[3,"ngClass","buttonProps","ariaLabel","onClick","keydown.enter",4,"ngIf"],[4,"ngIf"],[3,"onClick","keydown.enter","ngClass","buttonProps","ariaLabel"]],template:function(n,i){n&1&&(Te(),u(0,Yt,4,21,"div",2)),n&2&&p("ngIf",i.visible)},dependencies:[W,Z,J,Ve,Y,We,X],encapsulation:2,data:{animation:[Me("panelState",[de("void => visible",[_e(ni)]),de("visible => void",[_e(ri)])])]},changeDetection:0})}return t})(),Tt=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=xe({type:t});static \u0275inj=be({imports:[ge,X,X]})}return t})();var ai=["class","page"],ne=t=>({"ng-invalid ng-dirty":t}),si=t=>({groupID:t});function li(t,o){if(t&1){let e=k();l(0,"p-button",23),b("onClick",function(){_(e);let i=c(2);return f(i.onDeleteUser())}),s()}}function pi(t,o){if(t&1){let e=k();l(0,"p-button",24),b("onClick",function(){_(e);let i=c(2);return f(i.onHandleDrawer())}),s()}}function ci(t,o){if(t&1&&(l(0,"div",20),u(1,li,1,0,"p-button",21)(2,pi,1,0,"p-button",22),s()),t&2){let e=c();a(),p("ngIf",e.store.hasCheckedRows()),a(),p("ngIf",e.roleService.user().create)}}function mi(t,o){t&1&&(l(0,"th",28),y(1,"p-tableHeaderCheckbox"),s())}function di(t,o){if(t&1&&(l(0,"tr"),u(1,mi,2,0,"th",27),l(2,"th"),d(3,"LoginID"),s(),l(4,"th"),d(5,"Group"),s(),l(6,"th"),d(7,"Access Type"),s(),l(8,"th"),d(9,"Tags"),s()()),t&2){let e=c(2);a(),p("ngIf",e.roleService.user().delete)}}function ui(t,o){t&1&&U(0)}function _i(t,o){if(t&1&&y(0,"p-tableCheckbox",34),t&2){let e=c(3).$implicit;p("value",e)}}function fi(t,o){if(t&1&&u(0,_i,1,1,"p-tableCheckbox",33),t&2){let e=c(4);p("ngIf",e.roleService.user().delete)}}function hi(t,o){if(t&1&&(l(0,"td"),u(1,ui,1,0,"ng-container",32)(2,fi,1,1,"ng-template",null,7,x),s()),t&2){let e=Ie(3),n=c().$implicit,i=c(2);a(),p("ngIf",i.roleService.user().delete&&n.userName===i.currentUser())("ngIfElse",e)}}function gi(t,o){t&1&&(l(0,"div"),d(1,"No Tags Assigned"),s())}function wi(t,o){if(t&1&&(l(0,"div"),d(1),s()),t&2){let e=c().$implicit;a(),G("",e.tagsCount," Tags Assigned")}}function bi(t,o){if(t&1){let e=k();l(0,"tr"),u(1,hi,4,2,"td",29),l(2,"td")(3,"button",30),b("click",function(){let i=_(e).$implicit,r=c(2);return f(r.onEditUser(i))}),d(4),s()(),l(5,"td")(6,"a",31),d(7),s()(),l(8,"td"),d(9),s(),l(10,"td"),u(11,gi,2,0,"div")(12,wi,2,1,"div"),s()()}if(t&2){let e=o.$implicit,n=c(2);a(),p("ngIf",n.roleService.user().delete),a(2),p("disabled",!n.roleService.user().edit),a(),G(" ",e.userName||e.userID," "),a(2),p("queryParams",S(7,si,e.groupID)),a(),I(e.groupName),a(2),G(" ",e.accessTypeName," "),a(2),j(e.tagsCount===0?11:12)}}function xi(t,o){if(t&1&&d(0),t&2){let e=c(2);Se(" Showing ",e.store.first()," to ",e.store.end()," of ",e.store.count()," entries ")}}function Ci(t,o){t&1&&(l(0,"tr")(1,"td",35)(2,"span"),d(3,"No users found. Try adjusting your filters or add a new user."),s()()())}function yi(t,o){if(t&1){let e=k();l(0,"p-panel")(1,"div",25),y(2,"app-user-tabs"),l(3,"p-table",26),b("onPage",function(i){_(e);let r=c();return f(r.onPageChange(i))})("onRowSelect",function(i){_(e);let r=c();return f(r.onRowSelect(i))})("onRowUnselect",function(i){_(e);let r=c();return f(r.onRowUnselect(i))})("onHeaderCheckboxToggle",function(i){_(e);let r=c();return f(r.onHeaderCheckboxToggle(i))}),u(4,di,10,1,"ng-template",null,3,x)(6,bi,13,9,"ng-template",null,4,x)(8,xi,1,3,"ng-template",null,5,x)(10,Ci,4,0,"ng-template",null,6,x),s()()()}if(t&2){let e=c();a(3),p("value",e.store.data())("lazy",!0)("paginator",!0)("rows",e.store.filter().pageSize)("totalRecords",e.store.count())}}function vi(t,o){if(t&1&&(l(0,"div",36)(1,"div",18)(2,"div",37)(3,"label",38),d(4,"Group"),s(),y(5,"p-select",39),s()()()),t&2){let e=c();p("formGroup",e.forms.filterForm),a(5),p("showClear",!0)("options",e.store.meta().options.groups)}}function Ti(t,o){if(t&1&&(l(0,"span",40),d(1),s()),t&2){let e=c();a(),I(e.store.hasCheckedRows()?"Edit User":"Invite User")}}function ki(t,o){if(t&1&&(l(0,"small",14),d(1),s()),t&2){let e=o.$implicit;a(),I(e)}}function Ii(t,o){if(t&1&&(l(0,"small",14),d(1),s()),t&2){let e=o.$implicit;a(),I(e)}}function Si(t,o){if(t&1&&(l(0,"small",14),d(1),s()),t&2){let e=o.$implicit;a(),I(e)}}function Di(t,o){if(t&1&&(l(0,"small",14),d(1),s()),t&2){let e=o.$implicit;a(),I(e)}}var Rn=(()=>{class t extends bt{ngOnInit(){this.generateForm()}constructor(){Ue(()=>{this.store.metaForm()&&this.generateForm()}),super(),this.store=C(he),this.fb=C(He),this.userService=C(ie),this.isLoading=L(!1),this.form=null,this.isDrawerOpen=L(!1),this.router=C(Le),this.route=C(Pe),this.isDialogFilterVisible=L(!1),this.roleService=C(rt),this.currentUser=L(null),this.tabs=[{route:"/pages/users/users",label:"Users"},{route:"/pages/users/groups",label:"Groups"}]}ngAfterViewInit(){this.currentUser.set(localStorage.getItem("AUTH_USERNAME")||null)}onPageChange(e){this.store.setFilter(g(h({},this.store.filter()),{pagination:e.first/e.rows+1}))}onRowSelect(e){this.store.onRowSelect(e.data)}onRowUnselect(e){if(Array.isArray(e.data)){e.data.forEach(n=>{this.store.onRowUnselect(n)});return}else this.store.onRowUnselect(e.data)}onHeaderCheckboxToggle(e){this.store.onHeaderCheckboxToggle(e.checked)}generateForm(){this.forms={filterForm:this.fb.group({pagination:this.fb.control(1),pageSize:this.fb.control(10),groupID:this.fb.control(null)}),userForm:this.fb.group({id:this.fb.control({value:this.store.metaForm().form.id,disabled:this.store.metaForm().form.id!==xt},[K.required]),groupID:this.fb.control(this.store.metaForm().form.groupID,[K.required]),accessTypeID:this.fb.control(this.store.metaForm().form.accessTypeID,[K.required]),listJournalTagID:this.fb.control(this.store.metaForm().form.listJournalTagID??[])})}}onHandleDrawer(){this.isDrawerOpen.update(e=>!e),this.store.getUserFormMeta(this.route.snapshot.params.id||null)}onInviteUser(){let{userForm:e}=this.forms;if(e.invalid){e.markAllAsTouched();return}let n=e.getRawValue(),i;if(this.store.hasCheckedRows()){let[r]=this.store.checkedData();i={id:r,groupID:n.groupID,accessTypeID:n.accessTypeID,listJournalTagID:n.listJournalTagID}}else i=n;this.userService.inviteUser(i).pipe(re(()=>{this.onHandleDrawer(),this.store.setFilter(h({},this.store.filter())),e.reset()})).subscribe()}onSearch(e){this.store.setFilter(g(h({},this.store.filter()),{text:e,pagination:1}))}onOKFilter(){if(this.forms.filterForm.invalid){this.forms.filterForm.markAllAsTouched();return}let{groupID:e}=this.forms.filterForm.value;this.store.setFilter(g(h({},this.store.filter()),{groupID:e})),this.isDialogFilterVisible.update(n=>!n)}onEditUser(e){this.store.onRowSelect(e),this.store.getUserFormMeta(this.store.selectedID()),this.isDrawerOpen.update(n=>!n)}onHideDrawer(){this.store.onHeaderCheckboxToggle(!1)}onDeleteUser(){let e=this.store.checkedData();this.userService.deleteUser(e).pipe(re(()=>{this.store.setFilter(h({},this.store.filter()))})).subscribe()}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=Q({type:t,selectors:[["app-user",8,"page"]],features:[$([he]),z],attrs:ai,decls:41,vars:23,consts:[["actionButton",""],["content",""],["filters",""],["header",""],["body",""],["paginatorleft",""],["emptymessage",""],["showCheckbox",""],["pageTitle","User List",3,"search","isDialogFilterVisibleChange","filterConfirmed","isSearchableInput","isFilterable","isDialogFilterVisible","scrollable"],["position","right",3,"visibleChange","onHide","visible"],[1,"row","py-3","row-gap-3",3,"formGroup"],[1,"col-12"],["for","",1,"m-0"],["fluid","","filter","","filterBy","name","formControlName","id","optionLabel","loginID","optionValue","id","placeholder","Select a User",3,"disabled","options","ngClass"],[1,"text-danger"],["filter","","filterBy","name","formControlName","groupID","optionLabel","name","optionValue","id","placeholder","Select a Group","fluid","",3,"options","ngClass"],["filter","","filterBy","name","formControlName","accessTypeID","optionLabel","value","optionValue","key","placeholder","Select Access Type","fluid","",3,"options","ngClass"],["fluid","","filter","","filterBy","name","formControlName","listJournalTagID","optionLabel","name","optionValue","id","placeholder","Select a Tag",3,"options","ngClass"],[1,"col"],["label","Submit",3,"onClick"],[1,"d-flex","gap-2","flex-wrap"],["severity","danger","label","Delete","icon","fa-solid fa-trash",3,"onClick",4,"ngIf"],["label","Invite",3,"onClick",4,"ngIf"],["severity","danger","label","Delete","icon","fa-solid fa-trash",3,"onClick"],["label","Invite",3,"onClick"],[1,"d-flex","flex-column","gap-3","py-2"],["dataKey","userID",3,"onPage","onRowSelect","onRowUnselect","onHeaderCheckboxToggle","value","lazy","paginator","rows","totalRecords"],["style","width: 4rem",4,"ngIf"],[2,"width","4rem"],[4,"ngIf"],[1,"btn","btn-link","fw-light","text-primary","p-0",2,"text-decoration","none",3,"click","disabled"],["routerLink","/pages/users/groups/forms",1,"link","link-primary",3,"queryParams"],[4,"ngIf","ngIfElse"],[3,"value",4,"ngIf"],[3,"value"],["colspan","3"],[1,"row",3,"formGroup"],[1,"d-flex","flex-column"],["for",""],["appendTo","body","formControlName","groupID","optionValue","id","optionLabel","name","placeholder","Select a Group",3,"showClear","options"],[1,"fs-5"]],template:function(n,i){if(n&1){let r=k();l(0,"app-main-panel",8),b("search",function(w){return _(r),f(i.onSearch(w))}),pe("isDialogFilterVisibleChange",function(w){return _(r),le(i.isDialogFilterVisible,w)||(i.isDialogFilterVisible=w),f(w)}),b("filterConfirmed",function(){return _(r),f(i.onOKFilter())}),u(1,ci,3,2,"ng-template",null,0,x)(3,yi,12,5,"ng-template",null,1,x)(5,vi,6,3,"ng-template",null,2,x),s(),l(7,"p-drawer",9),pe("visibleChange",function(w){return _(r),le(i.isDrawerOpen,w)||(i.isDrawerOpen=w),f(w)}),b("onHide",function(){return _(r),f(i.onHideDrawer())}),u(8,Ti,2,1,"ng-template",null,3,x),l(10,"div",10)(11,"div",11)(12,"div")(13,"label",12),d(14,"Users"),s(),y(15,"p-select",13),M(16,ki,2,1,"small",14,R),s()(),l(18,"div",11)(19,"div")(20,"label",12),d(21,"Groups"),s(),y(22,"p-select",15),M(23,Ii,2,1,"small",14,R),s()(),l(25,"div",11)(26,"div")(27,"label",12),d(28,"Access Type"),s(),y(29,"p-select",16),M(30,Si,2,1,"small",14,R),s()(),l(32,"div",11)(33,"div")(34,"label",12),d(35,"Tags"),s(),y(36,"p-multiSelect",17),M(37,Di,2,1,"small",14,R),s()(),l(39,"div",18)(40,"p-button",19),b("onClick",function(){return _(r),f(i.onInviteUser())}),s()()()()}n&2&&(p("isSearchableInput",!0)("isFilterable",!0),se("isDialogFilterVisible",i.isDialogFilterVisible),p("scrollable",!0),a(7),se("visible",i.isDrawerOpen),a(3),p("formGroup",i.forms.userForm),a(5),p("disabled",i.store.hasCheckedRows())("options",i.store.metaForm().options.users)("ngClass",S(15,ne,i.isInvalid("id","userForm"))),a(),A(i.getErrors("id","userForm")),a(6),p("options",i.store.metaForm().options.groups)("ngClass",S(17,ne,i.isInvalid("groupID","userForm"))),a(),A(i.getErrors("id","userForm")),a(6),p("options",i.store.metaForm().options.accessTypes)("ngClass",S(19,ne,i.isInvalid("accessTypeID","userForm"))),a(),A(i.getErrors("accessTypeID","userForm")),a(6),p("options",i.store.metaForm().options.journalTags)("ngClass",S(21,ne,i.isInvalid("listJournalTagID","userForm"))),a(),A(i.getErrors("listJournalTagID","userForm")))},dependencies:[mt,W,Z,J,gt,_t,ft,ht,tt,Y,Tt,ge,Qe,Ae,Oe,Be,Ne,Ye,Ke,Xe,et,ut,dt,Ct,nt,it,yt,Re,wt],styles:['[_nghost-%COMP%]{display:block} .p-tabs .p-tab{padding:"1rem 1.125rem"!important} .p-panel .p-panel-header{display:none!important}'],changeDetection:0})}}return t})();export{Rn as UserPageComponent};
package/chunk-JE4XET33.js DELETED
@@ -1 +0,0 @@
1
- import{a as I,b as k,c as F,d as j,e as R,f as O}from"./chunk-RM5HLXNW.js";import"./chunk-UPSNJEHO.js";import{a as E}from"./chunk-BT7Y4ADP.js";import{b as T}from"./chunk-PPXXWO4E.js";import"./chunk-M4SSELXT.js";import"./chunk-QPPFPDWZ.js";import{i as w}from"./chunk-W63NE6LU.js";import"./chunk-S27Z7D3D.js";import{a as S}from"./chunk-AD247LWQ.js";import"./chunk-BKTBVFNX.js";import"./chunk-ZFNIPERQ.js";import"./chunk-ME4ALIS7.js";import"./chunk-DTYVTTET.js";import"./chunk-VMI3QWC6.js";import{a as P}from"./chunk-DSZOROE6.js";import"./chunk-2BI7WNJP.js";import{s as M}from"./chunk-ZK43JB4A.js";import"./chunk-F2X3VGZZ.js";import{Eb as h,Ec as _,Ha as u,Pb as v,Sb as m,Sc as C,Ub as c,Vb as s,Wb as o,Xb as r,_ as f,ca as d,gc as g,ia as l,ib as n,sc as p,tc as x,uc as y,yb as b}from"./chunk-6QJHEOXN.js";import"./chunk-YQFG5XE2.js";var D=(()=>{class e{constructor(){this.httpService=l(P)}getUserProfile(){return this.httpService.get(void 0,"api/MyProfile")}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=d({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var A=()=>({height:"calc(100vh - 70px)"});function B(e,a){if(e&1&&(o(0,"div",10)(1,"div",11)(2,"p",12),p(3),r()()()),e&2){let t=a.$implicit;n(3),y(" ",t.roleName," ")}}function L(e,a){if(e&1&&(o(0,"div",4)(1,"div",5)(2,"div",6)(3,"span",7),p(4),r()()(),o(5,"div",8)(6,"div",9),c(7,B,4,1,"div",10,m),r()()()),e&2){let t=a.$implicit;n(4),x(t.roleGroupName),n(3),s(t.listRole)}}function $(e,a){if(e&1&&(o(0,"p-panel")(1,"p-tabs",2)(2,"p-tablist")(3,"p-tab",2),p(4,"Roles"),r()(),o(5,"p-tabpanels")(6,"p-tabpanel",2)(7,"div",3),c(8,L,9,1,"div",4,m),r()()()()()),e&2){let t,i=g();v(_(2,A)),n(8),s((t=i.roles())==null?null:t.Roles)}}var N=(()=>{class e{constructor(){this.profileService=l(D),this.roles=u(null)}ngOnInit(){this.profileService.getUserProfile().pipe(E("response"),f(t=>this.roles.set(t))).subscribe()}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=b({type:e,selectors:[["app-my-profile"]],decls:3,vars:0,consts:[["content",""],["pageTitle","My Profile"],["value","0"],["formArrayName","roles",1,"container-fluid","d-flex","flex-column","row-gap-3"],[1,"row"],[1,"col-2","border","d-flex","align-items-center","justify-content-between",2,"height","50px","background","#f6f6f6"],[1,"d-flex","justify-content-center","w-100"],[1,"text-dark","fw-semibold","fs-2"],[1,"col"],["formArrayName","roles",1,"row","h-100"],[1,"col-3","border-top","border-bottom","border-end","p-0","bg-white"],[1,"d-flex","h-100","align-items-center","gap-2","px-2"],[1,"fs-2","text-dark","m-0"]],template:function(i,G){i&1&&(o(0,"app-main-panel",1),h(1,$,10,3,"ng-template",null,0,C),r())},dependencies:[w,S,O,R,j,F,I,k,M,T],styles:["[_nghost-%COMP%]{display:block} .p-tabs .p-tab{padding-top:0!important}"],changeDetection:0})}}return e})();var le=[{path:"",redirectTo:"my-profile",pathMatch:"full"},{path:"",children:[{path:"my-profile",component:N}]}];export{le as PROFILE_ROUTES};
package/chunk-LCKRY7CZ.js DELETED
@@ -1 +0,0 @@
1
- import{a as Ve,b as Ae}from"./chunk-E6SW7I4D.js";import{b as Te}from"./chunk-YPOBALKC.js";import{a as je}from"./chunk-XKI7WLHE.js";import{a as Fe,b as Me}from"./chunk-RXR5DXWS.js";import"./chunk-VDXZGF3M.js";import"./chunk-MHRSQRHT.js";import{a as N,b as H}from"./chunk-3VQUNDVT.js";import{d as De,i as ye,j as ke,k as Ie}from"./chunk-F6LZM7H5.js";import{a as we,b as ve}from"./chunk-FSB3LHPU.js";import"./chunk-AMGBUOC4.js";import"./chunk-UPSNJEHO.js";import{a as D}from"./chunk-BT7Y4ADP.js";import"./chunk-T367AQJ2.js";import"./chunk-AN4SAUSA.js";import"./chunk-URH77XNK.js";import"./chunk-E7QWESN4.js";import"./chunk-3DBSHDAQ.js";import"./chunk-PPXXWO4E.js";import"./chunk-M4SSELXT.js";import"./chunk-WMZF4DQK.js";import"./chunk-QPPFPDWZ.js";import{i as Pe}from"./chunk-W63NE6LU.js";import"./chunk-S27Z7D3D.js";import{a as xe,b as he}from"./chunk-AD247LWQ.js";import{b as h,c as _e,d as Ee,e as Re,f as be,g as Se,h as Ce}from"./chunk-BKTBVFNX.js";import"./chunk-ZFNIPERQ.js";import{w as fe,x as ge}from"./chunk-ME4ALIS7.js";import"./chunk-DTYVTTET.js";import{c as L,e as le,f as pe,l as ce,o as me,u as de,x as ue}from"./chunk-VMI3QWC6.js";import{e as oe,l as ae}from"./chunk-F7PVAVLQ.js";import{a as se}from"./chunk-DSZOROE6.js";import"./chunk-2BI7WNJP.js";import{h as Z,j as ee,k as te,p as ie,q as ne,s as re}from"./chunk-ZK43JB4A.js";import"./chunk-F2X3VGZZ.js";import{Cb as K,D as U,Dc as Q,Eb as _,Ec as W,Fc as j,L as B,Mb as f,Oc as V,P as G,Pb as z,Pc as X,Qc as Y,Sc as b,Wb as a,Xb as o,Y as I,Yb as E,_ as T,ac as F,bd as A,c as k,ca as q,fc as M,gc as x,ia as g,ib as u,qa as w,ra as v,s as P,sc as m,tc as R,uc as J,yb as $}from"./chunk-6QJHEOXN.js";import{a as s,b as c}from"./chunk-YQFG5XE2.js";var y=(()=>{class t{constructor(){this.httpService=g(se)}getPostRecurringExpenseLoader(){return this.httpService.get(void 0,"api/RecurringExpenseLoader/RecurringExpensesGenerate")}previewPostRecurringExpense(e){return this.httpService.post(void 0,"api/RecurringExpense/RecurringExpensesGeneratePreview",e)}submitPostRecurringExpense(e){return this.httpService.post(void 0,"api/RecurringExpense/RecurringExpensesGenerate",e)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=q({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var Ne={data:{data:[]},meta:{options:{expenses:[]},form:{date:"",number:"",listIDs:[]}},filter:{date:"",number:"",listIDs:[]}},O=_e(Se(Ne),Ce("PostRecurringExpenseStore"),Ee(t=>({hasCheckedRows:A(()=>t.data().data.some(p=>p.checked)),checkedPRE:A(()=>t.data().data.filter(p=>p.checked))})),be(t=>{let p=g(y);return{updateFilter:i=>{h(t,n=>c(s({},n),{filter:s(s({},n.filter),i)}))},emptyData(){h(t,i=>c(s({},i),{data:{data:[],totalCount:0}}))},onRowSelect(i){h(t,n=>{let r=n.data.data.map(l=>l.lastExpenseDate===i.lastExpenseDate?c(s({},l),{checked:!0}):l);return c(s({},n),{data:c(s({},n.data),{data:r})})})},onRowUnselect(i){h(t,n=>{let r=n.data.data.map(l=>l.lastExpenseDate===i.lastExpenseDate?c(s({},l),{checked:!1}):l);return c(s({},n),{data:c(s({},n.data),{data:r})})})},onHeaderCheckboxToggle(i){h(t,n=>{let r=n.data.data.map(l=>c(s({},l),{checked:i}));return c(s({},n),{data:c(s({},n.data),{data:r})})})},getPRELoader:N(k(I(()=>p.getPostRecurringExpenseLoader().pipe(H({next:i=>{h(t,n=>c(s({},n),{meta:i}))},error:i=>{console.error("Error fetching PRE Loader:",i)}}))))),getPREPreview:N(k(U(i=>i.date&&i.listIDs.length>0),P(i=>({Date:i.date,Number:i.number,ListIDs:i.listIDs})),I(i=>p.previewPostRecurringExpense(i).pipe(P(n=>c(s({},n),{data:n.data.map(r=>c(s({},r),{checked:!1}))})),H({next:n=>{h(t,r=>c(s({},r),{data:n}))},error:n=>{console.error("Error fetching PRE Preview:",n)}})))))}}),Re(t=>({onInit:()=>{t.getPRELoader(),t.getPREPreview(t.filter)}})));var He=()=>({height:"calc(100vh - 70px)"}),Oe=t=>({"ng-invalid ng-dirty":t}),Ue=t=>["/pages/recurring/recurring-expense/details/",t];function Be(t,p){if(t&1){let e=F();a(0,"p-button",7),M("onClick",function(){w(e);let n=x(2);return v(n.onSubmitPRE())}),o()}}function Ge(t,p){if(t&1&&_(0,Be,1,0,"p-button",6),t&2){let e=x();f("ngIf",e.store.hasCheckedRows())}}function qe(t,p){if(t&1&&(a(0,"div")(1,"span",19),m(2),o()()),t&2){let e=p.$implicit;u(2),R(e)}}function $e(t,p){if(t&1&&(a(0,"div"),_(1,qe,3,1,"div",18),o()),t&2){let e=x(2);u(),f("ngForOf",e.getErrors("listIDs"))}}function Ke(t,p){t&1&&(a(0,"tr")(1,"th",20),E(2,"p-tableHeaderCheckbox"),o(),a(3,"th"),m(4,"Name"),o(),a(5,"th"),m(6,"Date"),o(),a(7,"th"),m(8,"Asset Account"),o(),a(9,"th"),m(10,"Expense Account"),o(),a(11,"th",21),m(12,"Amount"),o()())}function ze(t,p){if(t&1&&(a(0,"tr")(1,"td"),E(2,"p-tableCheckbox",22),o(),a(3,"td")(4,"a",23),m(5),o()(),a(6,"td"),m(7),V(8,"date"),o(),a(9,"td"),m(10),o(),a(11,"td"),m(12),o(),a(13,"td",21),m(14),V(15,"number"),o()()),t&2){let e=p.$implicit;u(2),f("value",e),u(2),f("routerLink",j(12,Ue,e.id)),u(),J(" ",e.name," "),u(2),R(Y(8,7,e.nextExpenseDate,"d MMM y")),u(3),R(e.paymentName),u(2),R(e.expenseName),u(2),R(X(15,10,e.amount))}}function Je(t,p){t&1&&(a(0,"tr")(1,"td",24)(2,"span"),m(3,"No records found."),o()()())}function Qe(t,p){if(t&1){let e=F();a(0,"p-panel")(1,"div",8)(2,"div",9)(3,"div",10)(4,"div",11)(5,"div",12)(6,"label",13),m(7,"Date"),o(),E(8,"p-datepicker",14),o()(),a(9,"div",11)(10,"div",12)(11,"label",13),m(12,"Recurring Expense"),o(),E(13,"p-multiselect",15),_(14,$e,2,1,"div",16),o()()()()(),E(15,"p-divider"),a(16,"p-table",17),M("onRowSelect",function(n){w(e);let r=x();return v(r.onRowSelect(n))})("onRowUnselect",function(n){w(e);let r=x();return v(r.onRowUnselect(n))})("onHeaderCheckboxToggle",function(n){w(e);let r=x();return v(r.onHeaderCheckboxToggle(n))}),_(17,Ke,13,0,"ng-template",null,2,b)(19,ze,16,14,"ng-template",null,3,b)(21,Je,4,0,"ng-template",null,4,b),o()()}if(t&2){let e=x();z(W(7,He)),u(),f("formGroup",e.form),u(12),f("ngClass",j(8,Oe,e.isInvalid("listIDs")))("options",e.store.meta().options.expenses),u(),f("ngIf",e.isInvalid("listIDs")),u(2),f("value",e.store.data().data)}}var Lt=(()=>{class t extends je{constructor(){super(),this.store=g(O),this.fb=g(de),this.dayjsService=g(Te),this.PREService=g(y)}ngOnInit(){this.initForm(),this.form.valueChanges.pipe(B(300),G(),D("Form Value Changes"),P(e=>Object.entries(e).reduce((i,[n,r])=>{switch(n){case"date":typeof r=="object"&&r!==null&&!Array.isArray(r)?i[n]=this.dayjsService.from(r)?this.dayjsService.format(r):null:(typeof r=="string"||typeof r=="number"||r instanceof Date)&&!Array.isArray(r)?i[n]=r!=null?String(r):null:i[n]=null;break;default:i[n]=r===null?"":r;break}return i},{})),D("Mapped Form Value"),T(e=>{(!e.listIDs||e.listIDs.length===0)&&this.store.emptyData(),this.store.updateFilter(e)})).subscribe()}initForm(){let{date:e,listIDs:i,number:n}=this.store.filter();this.form=this.fb.group({date:this.fb.control(this.dayjsService.from(e)?this.dayjsService.from(e).toDate():this.dayjsService.now.toDate(),[L.required]),number:this.fb.control(n||""),listIDs:this.fb.control(i,[L.required])})}onRowSelect(e){this.store.onRowSelect(e.data)}onRowUnselect(e){if(Array.isArray(e.data)){e.data.forEach(i=>{this.store.onRowUnselect(i)});return}else this.store.onRowUnselect(e.data)}onHeaderCheckboxToggle(e){this.store.onHeaderCheckboxToggle(e.checked)}onSubmitPRE(){console.log(this.store.checkedPRE());let i=this.store.checkedPRE().reduce((r,l)=>(r[l.id]||(r[l.id]={ID:l.id,ListDate:[]}),r[l.id].ListDate.push(l.lastExpenseDate),r),{}),n=Object.values(i);console.log("Submitting PRE with body:",n),this.PREService.submitPostRecurringExpense(n).pipe(D("Submit Post Recurring Expense"),T(()=>{let r=this.form.getRawValue(),l=Object.entries(r).reduce((S,[C,d])=>{switch(C){case"date":typeof d=="object"&&d!==null&&!Array.isArray(d)?S[C]=this.dayjsService.from(d)?this.dayjsService.format(d):null:(typeof d=="string"||typeof d=="number"||d instanceof Date)&&!Array.isArray(d)?S[C]=d!=null?String(d):null:S[C]=null;break;default:S[C]=d===null?"":d;break}return S},{});this.store.updateFilter(l)})).subscribe()}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=$({type:t,selectors:[["app-post-recurring-expense"]],features:[Q([O]),K],decls:5,vars:1,consts:[["actionButton",""],["content",""],["header",""],["body",""],["emptymessage",""],["pageTitle","Post Recurring Expense",3,"scrollable"],["label","Submit",3,"onClick",4,"ngIf"],["label","Submit",3,"onClick"],[1,"row",3,"formGroup"],[1,"col-6"],[1,"row"],[1,"col"],[1,"d-flex","flex-column"],["for",""],["fluid","","formControlName","date"],["display","chip","formControlName","listIDs","optionLabel","name","optionValue","id","placeholder","Select Recurring Expenses","fluid","",3,"ngClass","options"],[4,"ngIf"],["dataKey","lastExpenseDate",3,"onRowSelect","onRowUnselect","onHeaderCheckboxToggle","value"],[4,"ngFor","ngForOf"],[1,"text-danger"],[2,"width","1rem"],[1,"text-end"],[3,"value"],["target","_blank",1,"link","link-primary",3,"routerLink"],["colspan","6"]],template:function(i,n){i&1&&(a(0,"app-main-panel",5),_(1,Ge,1,1,"ng-template",null,0,b)(3,Qe,23,10,"ng-template",null,1,b),o()),i&2&&f("scrollable",!0)},dependencies:[Pe,re,Z,ee,te,ne,ie,he,xe,Ae,Ve,ve,we,Me,Fe,ue,le,pe,ce,me,Ie,De,ye,ke,ge,fe,ae,oe],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();export{Lt as PostRecurringExpenseComponent};
package/chunk-O76TW6JA.js DELETED
@@ -1 +0,0 @@
1
- import{a}from"./chunk-CEK7MQW2.js";import"./chunk-F3RSX7TC.js";import"./chunk-U2VDC52W.js";import"./chunk-F7PVAVLQ.js";import"./chunk-DSZOROE6.js";import"./chunk-2BI7WNJP.js";import"./chunk-ZK43JB4A.js";import"./chunk-F2X3VGZZ.js";import"./chunk-6QJHEOXN.js";import"./chunk-YQFG5XE2.js";var o=[{path:"",canActivate:[a],children:[{path:"",loadComponent:()=>import("./chunk-CVDRHTES.js").then(t=>t.Dashboard1Component),data:{title:"Dashboard",headerTemplate:"header"}}]}];export{o as DashboardRoutes};
package/chunk-OVDG3ZBT.js DELETED
@@ -1 +0,0 @@
1
- import"./chunk-YQFG5XE2.js";var t=[{path:"",redirectTo:"tax-account",pathMatch:"full"},{path:"tax-account",loadComponent:()=>import("./chunk-UI2UMYSE.js").then(o=>o.TaxAccountComponent)},{path:"chart-of-account",loadComponent:()=>import("./chunk-PQL4GCC5.js").then(o=>o.ChartOfAccountComponent)},{path:"manual-journal",loadComponent:()=>import("./chunk-7OP477BS.js").then(o=>o.ManualJournalComponent)},{path:"payment-account",loadComponent:()=>import("./chunk-XCTUTMD3.js").then(o=>o.PaymentAccountComponent)},{path:"writeoff-outlet",loadComponent:()=>import("./chunk-RE5GBQH6.js").then(o=>o.WriteOffOutletComponent)},{path:"expense-account",loadComponent:()=>import("./chunk-S2BFXF7C.js").then(o=>o.ExpenseAccountComponent)},{path:"coa-configuration",loadComponent:()=>import("./chunk-TOGXYKTE.js").then(o=>o.CoaConfigurationComponent)},{path:"coa-category",loadComponent:()=>import("./chunk-WOYTUHJD.js").then(o=>o.CoaCategoryComponent)},{path:"outlet-account",loadComponent:()=>import("./chunk-4LI7GDDM.js").then(o=>o.OutletAccountComponent)}];export{t as MIGRATE_ROUTES};
package/chunk-PQL4GCC5.js DELETED
@@ -1 +0,0 @@
1
- import{a as v,b as L}from"./chunk-ZQWFATZY.js";import"./chunk-YPOBALKC.js";import{a as I,b as E}from"./chunk-DJXQKSLT.js";import"./chunk-WXIG4CXY.js";import{i as H}from"./chunk-W63NE6LU.js";import"./chunk-S27Z7D3D.js";import{a as R,b as D}from"./chunk-AD247LWQ.js";import"./chunk-BKTBVFNX.js";import"./chunk-ZFNIPERQ.js";import{w as V,x as j,y as N,z as G}from"./chunk-ME4ALIS7.js";import"./chunk-DTYVTTET.js";import"./chunk-VMI3QWC6.js";import"./chunk-DSZOROE6.js";import{a as F}from"./chunk-2BI7WNJP.js";import{n as O,s as $}from"./chunk-ZK43JB4A.js";import"./chunk-F2X3VGZZ.js";import{Dc as P,Eb as w,Ec as _,Mb as p,Oc as s,Pb as h,Pc as m,Sc as x,W as y,Wb as o,Xb as n,Y as M,Yb as l,_ as b,ac as B,fc as C,gc as c,h as T,ia as f,ib as a,qa as g,ra as d,s as u,sa as S,ta as A,yb as k}from"./chunk-6QJHEOXN.js";import"./chunk-YQFG5XE2.js";var q=()=>({height:"calc(100vh - 100px)"});function J(i,z){if(i&1){let t=B();o(0,"div",3)(1,"p-button",4),C("onClick",function(){g(t);let r=c();return d(r.onFormatCOA())}),n(),o(2,"p-button",5),s(3,"async"),s(4,"async"),C("onClick",function(){g(t);let r=c();return d(r.onMigrateCoaAccount())}),n()()}if(i&2){let t=c();a(2),p("disabled",m(3,2,t.countInBooks$)!==0)("pTooltip",m(4,4,t.countInBooks$)!==0?"Books already has entries. Please format before re-migrating.":null)}}function K(i,z){if(i&1&&(o(0,"p-scroll-panel")(1,"p-panel")(2,"div",6),l(3,"app-migration-cards",7),s(4,"async"),S(),o(5,"svg",8),l(6,"path",9),n(),A(),l(7,"app-migration-cards",10),s(8,"async"),n()()()),i&2){let t=c();h(_(12,q)),a(),h(_(13,q)),a(2),p("migrationCount",m(4,8,t.countInPOS$))("migrationTitle",t.pageTitle),a(4),p("migrationCount",m(8,10,t.countInBooks$))("migrationTitle",t.pageTitle)}}var gt=(()=>{class i{constructor(){this.migrateService=f(v),this.toastr=f(F),this.refresh$=new T(void 0),this.pageTitle="Chart of Account"}ngOnInit(){let t=this.refresh$.pipe(M(()=>this.migrateService.getCOACount()),b(e=>console.log("API response:",e)),y(1));this.countInPOS$=t.pipe(u(e=>Number(e.pos))),this.countInBooks$=t.pipe(u(e=>Number(e.books)))}onMigrateCoaAccount(){this.migrateService.migrateCoaAccount().subscribe(t=>{this.refresh$.next(),this.toastr.success(t.message,"Migration Successful")})}onFormatCOA(){window.confirm("Are you sure you want to format this data? This action cannot be undone.")&&this.migrateService.formatManualCOA().subscribe(e=>{this.refresh$.next(),this.toastr.success(e.message,"Format Successful")})}static{this.\u0275fac=function(e){return new(e||i)}}static{this.\u0275cmp=k({type:i,selectors:[["app-chart-of-account"]],features:[P([v])],decls:5,vars:1,consts:[["actionButton",""],["content",""],[3,"pageTitle"],[1,"d-flex","gap-2"],["label","Format","severity","danger",3,"onClick"],["label","Migrate","tooltipPosition","left",3,"onClick","disabled","pTooltip"],[1,"flex","gap-30","flex-wrap",2,"display","flex","justify-content","center","align-items","center","gap","1rem","margin-top","40px"],["migrationPlace","Accounting",3,"migrationCount","migrationTitle"],["width","40","height","40","viewBox","0 0 24 24","fill","none"],["d","M8 5l8 7-8 7","stroke","#007bff","stroke-width","2","stroke-linecap","round","stroke-linejoin","round"],["migrationPlace","Books",3,"migrationCount","migrationTitle"]],template:function(e,r){e&1&&(o(0,"app-main-panel",2),w(1,J,5,6,"ng-template",null,0,x)(3,K,9,14,"ng-template",null,1,x),n()),e&2&&p("pageTitle",r.pageTitle)},dependencies:[H,$,O,L,j,V,E,I,D,R,G,N],encapsulation:2})}}return i})();export{gt as ChartOfAccountComponent};
package/chunk-RE5GBQH6.js DELETED
@@ -1 +0,0 @@
1
- import{a as O,b as H}from"./chunk-ZQWFATZY.js";import"./chunk-YPOBALKC.js";import{a as I,b as E}from"./chunk-DJXQKSLT.js";import"./chunk-WXIG4CXY.js";import{i as G}from"./chunk-W63NE6LU.js";import"./chunk-S27Z7D3D.js";import{a as j,b as R}from"./chunk-AD247LWQ.js";import"./chunk-BKTBVFNX.js";import"./chunk-ZFNIPERQ.js";import{w as V,x as A,y as D,z as N}from"./chunk-ME4ALIS7.js";import"./chunk-DTYVTTET.js";import"./chunk-VMI3QWC6.js";import"./chunk-DSZOROE6.js";import{a as F}from"./chunk-2BI7WNJP.js";import{n as W,s as $}from"./chunk-ZK43JB4A.js";import"./chunk-F2X3VGZZ.js";import{Dc as P,Eb as B,Ec as C,Mb as p,Oc as s,Pb as h,Pc as m,Sc as x,W as y,Wb as o,Xb as n,Y as T,Yb as c,_ as S,ac as w,fc as _,gc as l,h as v,ia as u,ib as a,qa as g,ra as d,s as f,sa as b,ta as k,yb as M}from"./chunk-6QJHEOXN.js";import"./chunk-YQFG5XE2.js";var L=()=>({height:"calc(100vh - 100px)"});function z(i,q){if(i&1){let e=w();o(0,"div",3)(1,"p-button",4),_("onClick",function(){g(e);let r=l();return d(r.onFormat())}),n(),o(2,"p-button",5),s(3,"async"),s(4,"async"),_("onClick",function(){g(e);let r=l();return d(r.migrateWriteoffOutlet())}),n()()}if(i&2){let e=l();a(2),p("disabled",m(3,2,e.countInBooks$)!==0)("pTooltip",m(4,4,e.countInBooks$)!==0?"Books already has entries. Please format before re-migrating.":null)}}function J(i,q){if(i&1&&(o(0,"p-scroll-panel")(1,"p-panel")(2,"div",6),c(3,"app-migration-cards",7),s(4,"async"),b(),o(5,"svg",8),c(6,"path",9),n(),k(),c(7,"app-migration-cards",10),s(8,"async"),n()()()),i&2){let e=l();h(C(12,L)),a(),h(C(13,L)),a(2),p("migrationCount",m(4,8,e.countInPOS$))("migrationTitle",e.pageTitle),a(4),p("migrationCount",m(8,10,e.countInBooks$))("migrationTitle",e.pageTitle)}}var fe=(()=>{class i{constructor(){this.migrateService=u(O),this.toastr=u(F),this.refresh$=new v(void 0),this.pageTitle="Write-Off Outlet"}ngOnInit(){let e=this.refresh$.pipe(T(()=>this.migrateService.getWriteOffOutletAccountCount()),S(t=>console.log("API response:",t)),y(1));this.countInPOS$=e.pipe(f(t=>Number(t.pos))),this.countInBooks$=e.pipe(f(t=>Number(t.books)))}migrateWriteoffOutlet(){this.migrateService.migrateWriteOffOutlet().subscribe(e=>{this.refresh$.next(),this.toastr.success(e.message,"Migration Successful")})}onFormat(){confirm("Are you sure you want to format?")&&this.migrateService.formatWriteOff().subscribe(e=>{this.refresh$.next(),this.toastr.success(e.message,"Format Successful")})}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=M({type:i,selectors:[["app-writeoff-outlet"]],features:[P([O])],decls:5,vars:1,consts:[["actionButton",""],["content",""],[3,"pageTitle"],[1,"d-flex","gap-2"],["label","Format","severity","danger",3,"onClick"],["label","Migrate","tooltipPosition","left",3,"onClick","disabled","pTooltip"],[1,"flex","gap-30","flex-wrap",2,"display","flex","justify-content","center","align-items","center","gap","1rem","margin-top","40px"],["migrationPlace","Accounting",3,"migrationCount","migrationTitle"],["width","40","height","40","viewBox","0 0 24 24","fill","none"],["d","M8 5l8 7-8 7","stroke","#007bff","stroke-width","2","stroke-linecap","round","stroke-linejoin","round"],["migrationPlace","Books",3,"migrationCount","migrationTitle"]],template:function(t,r){t&1&&(o(0,"app-main-panel",2),B(1,z,5,6,"ng-template",null,0,x)(3,J,9,14,"ng-template",null,1,x),n()),t&2&&p("pageTitle",r.pageTitle)},dependencies:[G,$,W,E,I,R,j,N,D,H,A,V],encapsulation:2})}}return i})();export{fe as WriteOffOutletComponent};
package/chunk-S2BFXF7C.js DELETED
@@ -1 +0,0 @@
1
- import{a as v,b as H}from"./chunk-ZQWFATZY.js";import"./chunk-YPOBALKC.js";import{a as F,b as I}from"./chunk-DJXQKSLT.js";import"./chunk-WXIG4CXY.js";import{i as G}from"./chunk-W63NE6LU.js";import"./chunk-S27Z7D3D.js";import{a as O,b as R}from"./chunk-AD247LWQ.js";import"./chunk-BKTBVFNX.js";import"./chunk-ZFNIPERQ.js";import{w as V,x as j,y as D,z as N}from"./chunk-ME4ALIS7.js";import"./chunk-DTYVTTET.js";import"./chunk-VMI3QWC6.js";import"./chunk-DSZOROE6.js";import{a as $}from"./chunk-2BI7WNJP.js";import{n as A,s as P}from"./chunk-ZK43JB4A.js";import"./chunk-F2X3VGZZ.js";import{Dc as B,Eb as E,Ec as _,Mb as p,Oc as c,Pb as x,Pc as m,Sc as C,W as y,Wb as n,Xb as o,Y as b,Yb as l,ac as w,fc as h,gc as s,h as T,ia as f,ib as a,qa as g,ra as d,s as u,sa as M,ta as S,yb as k}from"./chunk-6QJHEOXN.js";import"./chunk-YQFG5XE2.js";var L=()=>({height:"calc(100vh - 100px)"});function z(i,q){if(i&1){let e=w();n(0,"div",3)(1,"p-button",4),h("onClick",function(){g(e);let r=s();return d(r.onFormat())}),o(),n(2,"p-button",5),c(3,"async"),c(4,"async"),h("onClick",function(){g(e);let r=s();return d(r.onMigrate())}),o()()}if(i&2){let e=s();a(2),p("disabled",m(3,2,e.countInBooks$)!==0)("pTooltip",m(4,4,e.countInBooks$)!==0?"Books already has entries. Please format before re-migrating.":null)}}function J(i,q){if(i&1&&(n(0,"p-scroll-panel")(1,"p-panel")(2,"div",6),l(3,"app-migration-cards",7),c(4,"async"),M(),n(5,"svg",8),l(6,"path",9),o(),S(),l(7,"app-migration-cards",10),c(8,"async"),o()()()),i&2){let e=s();x(_(12,L)),a(),x(_(13,L)),a(2),p("migrationCount",m(4,8,e.countInPOS$))("migrationTitle",e.pageTitle),a(4),p("migrationCount",m(8,10,e.countInBooks$))("migrationTitle",e.pageTitle)}}var le=(()=>{class i{constructor(){this.migrateService=f(v),this.toastr=f($),this.refresh$=new T(void 0),this.pageTitle="Expense Account"}ngOnInit(){let e=this.refresh$.pipe(b(()=>this.migrateService.getExpenseAccountCount()),y(1));this.countInPOS$=e.pipe(u(t=>Number(t.pos))),this.countInBooks$=e.pipe(u(t=>Number(t.books)))}onMigrate(){this.migrateService.migrateExpenseAccount().subscribe(e=>{this.refresh$.next(),this.toastr.success(e.message,"Migration Successful")})}onFormat(){window.confirm("Are you sure you want to format this data? This action cannot be undone.")&&this.migrateService.formatExpenseAccount().subscribe(t=>{this.refresh$.next(),this.toastr.success(t.message,"Format Successful")})}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=k({type:i,selectors:[["app-expense-account"]],features:[B([v])],decls:5,vars:1,consts:[["actionButton",""],["content",""],[3,"pageTitle"],[1,"d-flex","gap-2"],["label","Format","severity","danger",3,"onClick"],["label","Migrate","tooltipPosition","left",3,"onClick","disabled","pTooltip"],[1,"flex","gap-30","flex-wrap",2,"display","flex","justify-content","center","align-items","center","gap","1rem","margin-top","40px"],["migrationPlace","Accounting",3,"migrationCount","migrationTitle"],["width","40","height","40","viewBox","0 0 24 24","fill","none"],["d","M8 5l8 7-8 7","stroke","#007bff","stroke-width","2","stroke-linecap","round","stroke-linejoin","round"],["migrationPlace","Books",3,"migrationCount","migrationTitle"]],template:function(t,r){t&1&&(n(0,"app-main-panel",2),E(1,z,5,6,"ng-template",null,0,C)(3,J,9,14,"ng-template",null,1,C),o()),t&2&&p("pageTitle",r.pageTitle)},dependencies:[G,P,A,I,F,R,O,N,D,H,j,V],encapsulation:2})}}return i})();export{le as ExpenseAccountComponent};