dealposbooks 5.47.0 → 5.48.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/3rdpartylicenses.txt +75 -26
- package/assets/images/users/user1_160.jpg +0 -0
- package/assets/images/users/user1_40.jpg +0 -0
- package/assets/images/users/user1_80.jpg +0 -0
- package/assets/scss/layouts/_sidebar.scss +0 -1
- package/{chunk-2MKKFLNJ.js → chunk-2BI7WNJP.js} +1 -1
- package/{chunk-OVEQKHUV.js → chunk-2H7KQZEC.js} +2 -2
- package/{chunk-XT4YHL2M.js → chunk-2JNXKEYZ.js} +1 -1
- package/{chunk-53HJBLFX.js → chunk-2VZ7JZIO.js} +1 -1
- package/{chunk-YFNWEI3R.js → chunk-2XW2ZOT4.js} +1 -1
- package/{chunk-E4MHRZVH.js → chunk-3DBSHDAQ.js} +1 -1
- package/{chunk-MT3DTYJO.js → chunk-3NWFEFT2.js} +1 -1
- package/{chunk-JOHRJHEX.js → chunk-3UAQHNUY.js} +1 -1
- package/{chunk-3A4BFUGD.js → chunk-3VQUNDVT.js} +1 -1
- package/{chunk-CL4EKWSU.js → chunk-4LI7GDDM.js} +1 -1
- package/chunk-52U5NSQT.js +2 -0
- package/{chunk-VK3G2VIU.js → chunk-5B5AMMR3.js} +1 -1
- package/{chunk-5K3KAKU5.js → chunk-5FV7K5RQ.js} +1 -1
- package/{chunk-6NX36ZC2.js → chunk-6DTQWLB3.js} +1 -1
- package/chunk-6GQ4PTPT.js +7 -0
- package/chunk-6QJHEOXN.js +7 -0
- package/chunk-6WWXJJID.js +1 -0
- package/chunk-72H3DW5Z.js +1 -0
- package/{chunk-L2524E6T.js → chunk-7OP477BS.js} +1 -1
- package/{chunk-EIV4TELQ.js → chunk-7WCUKMRG.js} +1 -1
- package/{chunk-XDJSQLQN.js → chunk-ACDLAA4B.js} +1 -1
- package/{chunk-BUDZ3ONE.js → chunk-AD247LWQ.js} +1 -1
- package/{chunk-HQMTUZZQ.js → chunk-AMGBUOC4.js} +1 -1
- package/{chunk-CWFLUFKM.js → chunk-AN4SAUSA.js} +1 -1
- package/{chunk-KIBBRAL5.js → chunk-ARJ7OCQO.js} +1 -1
- package/{chunk-EEJGJ7WF.js → chunk-B3VZ2ZHJ.js} +1 -1
- package/{chunk-5BXMDXZD.js → chunk-B4C3ZPN6.js} +1 -1
- package/{chunk-WFIXL354.js → chunk-BG6BR7KI.js} +1 -1
- package/chunk-BKTBVFNX.js +1 -0
- package/chunk-BNPR5SPH.js +1 -0
- package/chunk-BT7Y4ADP.js +1 -0
- package/{chunk-5YO43YBO.js → chunk-CEK7MQW2.js} +1 -1
- package/chunk-CVDRHTES.js +1 -0
- package/{chunk-IYFNOI7S.js → chunk-CZSVRFCL.js} +1 -1
- package/chunk-D6IS6PE6.js +1 -0
- package/{chunk-GDQUB54I.js → chunk-DDM2KWNX.js} +1 -1
- package/{chunk-Q7SK53ST.js → chunk-DJXQKSLT.js} +1 -1
- package/chunk-DSZOROE6.js +1 -0
- package/{chunk-2D2YD753.js → chunk-DTYVTTET.js} +1 -1
- package/{chunk-PTQPB44D.js → chunk-E6SW7I4D.js} +1 -1
- package/{chunk-NDLX3ORI.js → chunk-E7QWESN4.js} +1 -1
- package/{chunk-CNXYBR45.js → chunk-ENH6HA3V.js} +1 -1
- package/{chunk-6XE7LGUS.js → chunk-EQTP2O7O.js} +1 -1
- package/{chunk-NHHXXJY6.js → chunk-F3RSX7TC.js} +1 -1
- package/{chunk-3IEOINKV.js → chunk-F6LZM7H5.js} +1 -1
- package/{chunk-AOOG6YOT.js → chunk-F7PVAVLQ.js} +1 -1
- package/{chunk-BXEGWIR3.js → chunk-F7XGJYCZ.js} +1 -1
- package/{chunk-53I5JFOQ.js → chunk-FSB3LHPU.js} +1 -1
- package/{chunk-S3FQPUAS.js → chunk-FUCKNGW4.js} +1 -1
- package/{chunk-AHX56FH2.js → chunk-FVYL3BQ7.js} +1 -1
- package/{chunk-5SYYPB6N.js → chunk-G42V3ZZU.js} +1 -1
- package/{chunk-C3IOIS5V.js → chunk-H7GQCGCR.js} +1 -1
- package/{chunk-F5CCLXIY.js → chunk-IDHDHBFV.js} +1 -1
- package/{chunk-JZVNZ3I3.js → chunk-JD3HX7VY.js} +1 -1
- package/{chunk-DEOAL7PG.js → chunk-JE4XET33.js} +1 -1
- package/{chunk-VSHPIUZM.js → chunk-KZHI6PGZ.js} +1 -1
- package/{chunk-PXN4RATH.js → chunk-LBREDZL5.js} +1 -1
- package/{chunk-35UWKNGE.js → chunk-LCKRY7CZ.js} +1 -1
- package/{chunk-SZAGTA5I.js → chunk-LXLOWSN6.js} +1 -1
- package/{chunk-YZTBV6HG.js → chunk-M4SSELXT.js} +1 -1
- package/{chunk-IMVMIXVJ.js → chunk-ME4ALIS7.js} +1 -1
- package/{chunk-LABWETHZ.js → chunk-MHRSQRHT.js} +1 -1
- package/{chunk-CWDU4F7J.js → chunk-NNNKDAA2.js} +1 -1
- package/{chunk-DRTMMJ4Q.js → chunk-NPXVSAMB.js} +1 -1
- package/chunk-O76TW6JA.js +1 -0
- package/{chunk-U5XXKH2H.js → chunk-OJTHBHGK.js} +1 -1
- package/{chunk-RZFXAB7W.js → chunk-OT3UFDBI.js} +1 -1
- package/chunk-OVDG3ZBT.js +1 -0
- package/{chunk-Q4LKKVQU.js → chunk-PGOSR3RI.js} +1 -1
- package/{chunk-XPRP6AB4.js → chunk-PPXXWO4E.js} +1 -1
- package/{chunk-ML5KV2U2.js → chunk-PQL4GCC5.js} +1 -1
- package/{chunk-QWTGY7FA.js → chunk-QPPFPDWZ.js} +1 -1
- package/{chunk-EQU7DDK6.js → chunk-RE5GBQH6.js} +1 -1
- package/{chunk-PKOERZXQ.js → chunk-RM5HLXNW.js} +1 -1
- package/{chunk-NM5M567G.js → chunk-RXR5DXWS.js} +1 -1
- package/{chunk-ZUDQOT7C.js → chunk-S27Z7D3D.js} +1 -1
- package/{chunk-GJYEM7DL.js → chunk-S2BFXF7C.js} +1 -1
- package/{chunk-DTFLX2XQ.js → chunk-SFMFIWMX.js} +1 -1
- package/{chunk-OLLF6BKH.js → chunk-SUXEBUIX.js} +1 -1
- package/chunk-SV6BE4HG.js +130 -0
- package/{chunk-SEXB43QC.js → chunk-T367AQJ2.js} +1 -1
- package/{chunk-SS4J7T3N.js → chunk-TOGXYKTE.js} +1 -1
- package/{chunk-IGWIRCAS.js → chunk-U2VDC52W.js} +1 -1
- package/{chunk-OW25MQS7.js → chunk-UEFTMQDF.js} +1 -1
- package/{chunk-4X3G6MGP.js → chunk-UI2UMYSE.js} +1 -1
- package/{chunk-RXOOTYEO.js → chunk-UPSNJEHO.js} +1 -1
- package/{chunk-LWYAFMN3.js → chunk-URH77XNK.js} +1 -1
- package/{chunk-HZ7BZ72K.js → chunk-UVSR4LPB.js} +1 -1
- package/{chunk-AXU3K2IY.js → chunk-V22QPBAO.js} +1 -1
- package/{chunk-T3EH4DR2.js → chunk-VDXZGF3M.js} +1 -1
- package/{chunk-ZBO62XAM.js → chunk-VKT27VPR.js} +2 -2
- package/{chunk-OIBDX2CA.js → chunk-VMI3QWC6.js} +1 -1
- package/{chunk-VTCV67A4.js → chunk-VVAI7ZGN.js} +1 -1
- package/{chunk-6PNHT5U7.js → chunk-VW2FJYIZ.js} +1 -1
- package/{chunk-VL2HEHI5.js → chunk-W5E37PZP.js} +1 -1
- package/chunk-W63NE6LU.js +229 -0
- package/{chunk-OJ2VC4ER.js → chunk-WKHQICFW.js} +1 -1
- package/{chunk-DHLFL3KH.js → chunk-WMZF4DQK.js} +1 -1
- package/{chunk-ETFYQ4GV.js → chunk-WOYTUHJD.js} +1 -1
- package/{chunk-WPMC3LJJ.js → chunk-WPJGKTVO.js} +5 -5
- package/{chunk-ZMIVD3SF.js → chunk-WXIG4CXY.js} +1 -1
- package/{chunk-Q47KHO2M.js → chunk-XCTUTMD3.js} +1 -1
- package/{chunk-MBJKUKHJ.js → chunk-XOSALV7T.js} +1 -1
- package/{chunk-RF27SIL3.js → chunk-Y7SF5NXD.js} +1 -1
- package/{chunk-DU72RNAU.js → chunk-YPOBALKC.js} +1 -1
- package/{chunk-V4SH72WU.js → chunk-ZFNIPERQ.js} +1 -1
- package/chunk-ZK43JB4A.js +2 -0
- package/{chunk-5JZTWUDG.js → chunk-ZQWFATZY.js} +1 -1
- package/index.html +2 -2
- package/main-XTOQBEFQ.js +1 -0
- package/package.json +1 -1
- package/{styles-4HAX3IDP.css → styles-4L5CAR46.css} +1 -1
- package/chunk-2RNKYO2Q.js +0 -1
- package/chunk-5CZNOXPC.js +0 -1
- package/chunk-5HZBSMCT.js +0 -7
- package/chunk-6ZZZTNIH.js +0 -130
- package/chunk-EPLZY6T4.js +0 -1
- package/chunk-M3TKVRYP.js +0 -1
- package/chunk-NMCKMUY4.js +0 -7
- package/chunk-QF4D5YPK.js +0 -1
- package/chunk-SN7DLFX2.js +0 -1
- package/chunk-TUFQ5JVG.js +0 -180
- package/chunk-V4B5LQYD.js +0 -2
- package/chunk-VZ5CMS5O.js +0 -2
- package/chunk-WGJFR6CK.js +0 -1
- package/main-Q2T6QX2N.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{i as re,j as pe}from"./chunk-
|
|
1
|
+
import{i as re,j as pe}from"./chunk-ZFNIPERQ.js";import{a as le,w as ce,x as se}from"./chunk-ME4ALIS7.js";import{Da as ne,Ka as oe,La as ie,Ma as V,Ua as ae}from"./chunk-VMI3QWC6.js";import{h as U,k as X,l as Y,m as Z,s as ee}from"./chunk-ZK43JB4A.js";import{c as te,d as S,f as Q,g as B,h as M}from"./chunk-F2X3VGZZ.js";import{$b as P,Aa as v,Cb as R,Dc as L,Eb as c,Fc as h,Gc as z,Hc as G,Lb as f,Mb as i,Qb as C,Sc as J,Wb as d,Xb as m,Yb as T,Zb as x,_b as I,_c as F,ac as w,ca as O,da as $,fc as k,gc as s,hc as H,ia as A,ib as a,ic as E,lc as u,mc as N,nc as _,oc as g,qa as b,ra as y,sc as W,tc as K,ua as D,yb as j,zb as q}from"./chunk-6QJHEOXN.js";var ge=["header"],ue=["icons"],me=["content"],fe=["footer"],he=["headericons"],be=["contentWrapper"],ye=["*",[["p-header"]],[["p-footer"]]],Te=["*","p-header","p-footer"],ve=(e,o)=>({"p-panel p-component":!0,"p-panel-toggleable":e,"p-panel-expanded":o}),Ce=e=>({transitionParams:e,height:"0",opacity:"0"}),xe=e=>({value:"hidden",params:e}),Ie=e=>({transitionParams:e,height:"*",opacity:"1"}),Pe=e=>({value:"visible",params:e}),we=(e,o,t)=>({"p-panel-icons-start":e,"p-panel-icons-end":o,"p-panel-icons-center":t}),ke=e=>({$implicit:e});function Ee(e,o){if(e&1&&(d(0,"span",12),W(1),m()),e&2){let t=s(2);f("id",t.id+"_header"),a(),K(t._header)}}function Fe(e,o){e&1&&P(0)}function Se(e,o){}function Qe(e,o){e&1&&c(0,Se,0,0,"ng-template")}function Be(e,o){if(e&1&&T(0,"span"),e&2){let t=s(6);C(t.expandIcon)}}function Me(e,o){e&1&&T(0,"MinusIcon")}function Ve(e,o){if(e&1&&(x(0),c(1,Be,1,2,"span",16)(2,Me,1,0,"MinusIcon",14),I()),e&2){let t=s(5);a(),i("ngIf",t.expandIcon),a(),i("ngIf",!t.expandIcon)}}function De(e,o){if(e&1&&T(0,"span"),e&2){let t=s(6);C(t.collapseIcon)}}function Oe(e,o){e&1&&T(0,"PlusIcon")}function $e(e,o){if(e&1&&(x(0),c(1,De,1,2,"span",16)(2,Oe,1,0,"PlusIcon",14),I()),e&2){let t=s(5);a(),i("ngIf",t.collapseIcon),a(),i("ngIf",!t.collapseIcon)}}function Ae(e,o){if(e&1&&(x(0),c(1,Ve,3,2,"ng-container",14)(2,$e,3,2,"ng-container",14),I()),e&2){let t=s(4);a(),i("ngIf",!t.collapsed),a(),i("ngIf",t.collapsed)}}function je(e,o){}function qe(e,o){e&1&&c(0,je,0,0,"ng-template")}function Re(e,o){if(e&1&&c(0,Ae,3,2,"ng-container",14)(1,qe,1,0,null,15),e&2){let t=s(3);i("ngIf",!t.headerIconsTemplate&&!t._headerIconsTemplate&&!(t.toggleButtonProps!=null&&t.toggleButtonProps.icon)),a(),i("ngTemplateOutlet",t.headerIconsTemplate||t._headerIconsTemplate)("ngTemplateOutletContext",h(3,ke,t.collapsed))}}function He(e,o){if(e&1){let t=w();d(0,"p-button",13),k("click",function(n){b(t);let r=s(2);return y(r.onIconClick(n))})("keydown",function(n){b(t);let r=s(2);return y(r.onKeyDown(n))}),c(1,Re,2,5,"ng-template",null,1,J),m()}if(e&2){let t=s(2);i("text",!0)("rounded",!0)("buttonProps",t.toggleButtonProps),f("id",t.id+"_header")("aria-label",t.buttonAriaLabel)("aria-controls",t.id+"_content")("aria-expanded",!t.collapsed)}}function Ne(e,o){if(e&1){let t=w();d(0,"div",8),k("click",function(n){b(t);let r=s();return y(r.onHeaderClick(n))}),c(1,Ee,2,2,"span",9),E(2,1),c(3,Fe,1,0,"ng-container",6),d(4,"div",10),c(5,Qe,1,0,null,6)(6,He,3,7,"p-button",11),m()()}if(e&2){let t=s();f("id",t.id+"-titlebar"),a(),i("ngIf",t._header),a(2),i("ngTemplateOutlet",t.headerTemplate||t._headerTemplate),a(),i("ngClass",G(6,we,t.iconPos==="start",t.iconPos==="end",t.iconPos==="center")),a(),i("ngTemplateOutlet",t.iconTemplate||t._iconTemplate),a(),i("ngIf",t.toggleable)}}function We(e,o){e&1&&P(0)}function Ke(e,o){e&1&&P(0)}function Le(e,o){if(e&1&&(d(0,"div",17),E(1,2),c(2,Ke,1,0,"ng-container",6),m()),e&2){let t=s();a(2),i("ngTemplateOutlet",t.footerTemplate||t._footerTemplate)}}var ze=({dt:e})=>`
|
|
2
2
|
.p-panel {
|
|
3
3
|
border: 1px solid ${e("panel.border.color")};
|
|
4
4
|
border-radius: ${e("panel.border.radius")};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as d}from"./chunk-
|
|
1
|
+
import{h as d}from"./chunk-ME4ALIS7.js";import{Cb as s,Lb as l,Qb as p,Wb as c,Xb as C,Yb as m,sa as o,ua as a,yb as r}from"./chunk-6QJHEOXN.js";var u=(()=>{class t extends d{static \u0275fac=(()=>{let n;return function(e){return(n||(n=a(t)))(e||t)}})();static \u0275cmp=r({type:t,selectors:[["ChevronUpIcon"]],features:[s],decls:2,vars:5,consts:[["width","14","height","14","viewBox","0 0 14 14","fill","none","xmlns","http://www.w3.org/2000/svg"],["d","M12.2097 10.4113C12.1057 10.4118 12.0027 10.3915 11.9067 10.3516C11.8107 10.3118 11.7237 10.2532 11.6506 10.1792L6.93602 5.46461L2.22139 10.1476C2.07272 10.244 1.89599 10.2877 1.71953 10.2717C1.54307 10.2556 1.3771 10.1808 1.24822 10.0593C1.11933 9.93766 1.035 9.77633 1.00874 9.6011C0.982477 9.42587 1.0158 9.2469 1.10338 9.09287L6.37701 3.81923C6.52533 3.6711 6.72639 3.58789 6.93602 3.58789C7.14565 3.58789 7.3467 3.6711 7.49502 3.81923L12.7687 9.09287C12.9168 9.24119 13 9.44225 13 9.65187C13 9.8615 12.9168 10.0626 12.7687 10.2109C12.616 10.3487 12.4151 10.4207 12.2097 10.4113Z","fill","currentColor"]],template:function(i,e){i&1&&(o(),c(0,"svg",0),m(1,"path",1),C()),i&2&&(p(e.getClassNames()),l("aria-label",e.ariaLabel)("aria-hidden",e.ariaHidden)("role",e.role))},encapsulation:2})}return t})();export{u as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as Ye}from"./chunk-LWYAFMN3.js";import{a as Ke,b as Re,c as Ue}from"./chunk-E4MHRZVH.js";import{a as Pe}from"./chunk-YZTBV6HG.js";import{a as He}from"./chunk-DHLFL3KH.js";import{a as qe}from"./chunk-ZUDQOT7C.js";import{a as ae,j as Be,l as Ge,n as Ne,p as Ze,r as je,y as We}from"./chunk-IMVMIXVJ.js";import{Aa as Me,C as we,Da as ze,Ga as De,La as Ae,Ma as P,Na as N,Q as z,R as E,T as Ve,U as ke,Ua as Qe,Z as Fe,a as ve,la as Ee,na as oe,oa as Le,qa as G,ra as D,sa as $e,va as se}from"./chunk-OIBDX2CA.js";import{h as ee,j as Se,k as te,l as ie,m as ne,s as le}from"./chunk-VZ5CMS5O.js";import{$b as v,$c as Q,Aa as S,Ba as fe,Bb as W,Cc as Oe,Db as p,Dc as B,Ec as w,Fc as X,Gc as Te,Ha as L,Kb as x,Lb as r,Mb as ye,Ob as R,Pb as q,Qb as Y,Rc as F,Vb as _,Wb as h,Xb as k,Yb as O,Zb as T,_b as C,_c as m,ba as ue,bd as K,ca as _e,cd as Ce,da as he,ec as b,fc as a,hb as c,ia as me,kc as y,lc as V,mc as d,nb as U,nc as u,qa as f,qc as M,ra as g,rc as $,sc as A,tc as J,ua as Z,wc as be,xb as j,xc as Ie,yb as ge,yc as xe}from"./chunk-NMCKMUY4.js";import{a as pe,b as de}from"./chunk-YQFG5XE2.js";var H=t=>({height:t}),lt=(t,s,e)=>({"p-select-option":!0,"p-select-option-selected":t,"p-disabled":s,"p-focus":e}),re=t=>({$implicit:t});function ot(t,s){t&1&&k(0,"CheckIcon",5)}function st(t,s){t&1&&k(0,"BlankIcon",6)}function at(t,s){if(t&1&&(O(0),p(1,ot,1,0,"CheckIcon",3)(2,st,1,0,"BlankIcon",4),T()),t&2){let e=a();c(),r("ngIf",e.selected),c(),r("ngIf",!e.selected)}}function rt(t,s){if(t&1&&(_(0,"span"),$(1),h()),t&2){let e,n=a();c(),A((e=n.label)!==null&&e!==void 0?e:"empty")}}function ct(t,s){t&1&&C(0)}var pt=["item"],dt=["group"],ut=["loader"],_t=["selectedItem"],ht=["header"],Je=["filter"],mt=["footer"],ft=["emptyfilter"],gt=["empty"],yt=["dropdownicon"],bt=["loadingicon"],It=["clearicon"],xt=["filtericon"],Ot=["onicon"],Tt=["officon"],Ct=["cancelicon"],St=["focusInput"],vt=["editableInput"],wt=["items"],Vt=["scroller"],kt=["overlay"],Ft=["firstHiddenFocusableEl"],Et=["lastHiddenFocusableEl"],Lt=()=>({class:"p-select-clear-icon"}),$t=()=>({class:"p-select-dropdown-icon"}),et=t=>({options:t}),tt=(t,s)=>({$implicit:t,options:s}),Mt=()=>({});function zt(t,s){if(t&1&&(O(0),$(1),T()),t&2){let e=a(2);c(),A(e.label()==="p-emptylabel"?"\xA0":e.label())}}function Dt(t,s){if(t&1&&C(0,24),t&2){let e=a(2);r("ngTemplateOutlet",e.selectedItemTemplate||e._selectedItemTemplate)("ngTemplateOutletContext",w(2,re,e.selectedOption))}}function At(t,s){if(t&1&&(_(0,"span"),$(1),h()),t&2){let e=a(3);c(),A(e.label()==="p-emptylabel"?"\xA0":e.label())}}function Qt(t,s){if(t&1&&p(0,At,2,1,"span",18),t&2){let e=a(2);r("ngIf",e.isSelectedOptionEmpty())}}function Kt(t,s){if(t&1){let e=v();_(0,"span",22,3),b("focus",function(i){f(e);let l=a();return g(l.onInputFocus(i))})("blur",function(i){f(e);let l=a();return g(l.onInputBlur(i))})("keydown",function(i){f(e);let l=a();return g(l.onKeyDown(i))}),p(2,zt,2,1,"ng-container",20)(3,Dt,1,4,"ng-container",23)(4,Qt,1,1,"ng-template",null,4,F),h()}if(t&2){let e,n=M(5),i=a();r("ngClass",i.inputClass)("pTooltip",i.tooltip)("tooltipPosition",i.tooltipPosition)("positionStyle",i.tooltipPositionStyle)("tooltipStyleClass",i.tooltipStyleClass)("pAutoFocus",i.autofocus),x("aria-disabled",i.disabled)("id",i.inputId)("aria-label",i.ariaLabel||(i.label()==="p-emptylabel"?void 0:i.label()))("aria-labelledby",i.ariaLabelledBy)("aria-haspopup","listbox")("aria-expanded",(e=i.overlayVisible)!==null&&e!==void 0?e:!1)("aria-controls",i.overlayVisible?i.id+"_list":null)("tabindex",i.disabled?-1:i.tabindex)("aria-activedescendant",i.focused?i.focusedOptionId:void 0)("aria-required",i.required)("required",i.required),c(2),r("ngIf",!i.selectedItemTemplate&&!i._selectedItemTemplate)("ngIfElse",n),c(),r("ngIf",(i.selectedItemTemplate||i._selectedItemTemplate)&&!i.isSelectedOptionEmpty())}}function Pt(t,s){if(t&1){let e=v();_(0,"input",25,5),b("input",function(i){f(e);let l=a();return g(l.onEditableInput(i))})("keydown",function(i){f(e);let l=a();return g(l.onKeyDown(i))})("focus",function(i){f(e);let l=a();return g(l.onInputFocus(i))})("blur",function(i){f(e);let l=a();return g(l.onInputBlur(i))}),h()}if(t&2){let e=a();r("ngClass",e.inputClass)("disabled",e.disabled)("pAutoFocus",e.autofocus),x("id",e.inputId)("maxlength",e.maxlength)("placeholder",e.modelValue()===void 0||e.modelValue()===null?e.placeholder():void 0)("aria-label",e.ariaLabel||(e.label()==="p-emptylabel"?void 0:e.label()))("aria-activedescendant",e.focused?e.focusedOptionId:void 0)}}function Ht(t,s){if(t&1){let e=v();_(0,"TimesIcon",27),b("click",function(i){f(e);let l=a(2);return g(l.clear(i))}),h()}t&2&&x("data-pc-section","clearicon")}function Rt(t,s){}function qt(t,s){t&1&&p(0,Rt,0,0,"ng-template")}function Bt(t,s){if(t&1){let e=v();_(0,"span",27),b("click",function(i){f(e);let l=a(2);return g(l.clear(i))}),p(1,qt,1,0,null,28),h()}if(t&2){let e=a(2);x("data-pc-section","clearicon"),c(),r("ngTemplateOutlet",e.clearIconTemplate||e._clearIconTemplate)("ngTemplateOutletContext",B(3,Lt))}}function Gt(t,s){if(t&1&&(O(0),p(1,Ht,1,1,"TimesIcon",26)(2,Bt,2,4,"span",26),T()),t&2){let e=a();c(),r("ngIf",!e.clearIconTemplate&&!e._clearIconTemplate),c(),r("ngIf",e.clearIconTemplate||e._clearIconTemplate)}}function Nt(t,s){t&1&&C(0)}function Zt(t,s){if(t&1&&(O(0),p(1,Nt,1,0,"ng-container",29),T()),t&2){let e=a(2);c(),r("ngTemplateOutlet",e.loadingIconTemplate||e._loadingIconTemplate)}}function Ut(t,s){if(t&1&&k(0,"span",32),t&2){let e=a(3);r("ngClass","p-select-loading-icon pi-spin "+e.loadingIcon)}}function jt(t,s){t&1&&k(0,"span",33),t&2&&q("p-select-loading-icon pi pi-spinner pi-spin")}function Wt(t,s){if(t&1&&(O(0),p(1,Ut,1,1,"span",30)(2,jt,1,2,"span",31),T()),t&2){let e=a(2);c(),r("ngIf",e.loadingIcon),c(),r("ngIf",!e.loadingIcon)}}function Yt(t,s){if(t&1&&(O(0),p(1,Zt,2,1,"ng-container",18)(2,Wt,3,2,"ng-container",18),T()),t&2){let e=a();c(),r("ngIf",e.loadingIconTemplate||e._loadingIconTemplate),c(),r("ngIf",!e.loadingIconTemplate&&!e._loadingIconTemplate)}}function Jt(t,s){if(t&1&&k(0,"span",37),t&2){let e=a(3);r("ngClass",e.dropdownIcon)}}function Xt(t,s){t&1&&k(0,"ChevronDownIcon",38),t&2&&r("styleClass","p-select-dropdown-icon")}function ei(t,s){if(t&1&&(O(0),p(1,Jt,1,1,"span",35)(2,Xt,1,1,"ChevronDownIcon",36),T()),t&2){let e=a(2);c(),r("ngIf",e.dropdownIcon),c(),r("ngIf",!e.dropdownIcon)}}function ti(t,s){}function ii(t,s){t&1&&p(0,ti,0,0,"ng-template")}function ni(t,s){if(t&1&&(_(0,"span",39),p(1,ii,1,0,null,28),h()),t&2){let e=a(2);c(),r("ngTemplateOutlet",e.dropdownIconTemplate||e._dropdownIconTemplate)("ngTemplateOutletContext",B(2,$t))}}function li(t,s){if(t&1&&p(0,ei,3,2,"ng-container",18)(1,ni,2,3,"span",34),t&2){let e=a();r("ngIf",!e.dropdownIconTemplate&&!e._dropdownIconTemplate),c(),r("ngIf",e.dropdownIconTemplate||e._dropdownIconTemplate)}}function oi(t,s){t&1&&C(0)}function si(t,s){t&1&&C(0)}function ai(t,s){if(t&1&&(O(0),p(1,si,1,0,"ng-container",28),T()),t&2){let e=a(3);c(),r("ngTemplateOutlet",e.filterTemplate||e._filterTemplate)("ngTemplateOutletContext",w(2,et,e.filterOptions))}}function ri(t,s){t&1&&k(0,"SearchIcon")}function ci(t,s){}function pi(t,s){t&1&&p(0,ci,0,0,"ng-template")}function di(t,s){if(t&1&&(_(0,"span"),p(1,pi,1,0,null,29),h()),t&2){let e=a(4);c(),r("ngTemplateOutlet",e.filterIconTemplate||e._filterIconTemplate)}}function ui(t,s){if(t&1){let e=v();_(0,"p-iconfield")(1,"input",46,10),b("input",function(i){f(e);let l=a(3);return g(l.onFilterInputChange(i))})("keydown",function(i){f(e);let l=a(3);return g(l.onFilterKeyDown(i))})("blur",function(i){f(e);let l=a(3);return g(l.onFilterBlur(i))}),h(),_(3,"p-inputicon"),p(4,ri,1,0,"SearchIcon",18)(5,di,2,1,"span",18),h()()}if(t&2){let e=a(3);c(),r("pSize",e.size)("value",e._filterValue()||"")("variant",e.variant),x("placeholder",e.filterPlaceholder)("aria-owns",e.id+"_list")("aria-label",e.ariaFilterLabel)("aria-activedescendant",e.focusedOptionId),c(3),r("ngIf",!e.filterIconTemplate&&!e._filterIconTemplate),c(),r("ngIf",e.filterIconTemplate||e._filterIconTemplate)}}function _i(t,s){if(t&1){let e=v();_(0,"div",45),b("click",function(i){return f(e),g(i.stopPropagation())}),p(1,ai,2,4,"ng-container",20)(2,ui,6,9,"ng-template",null,9,F),h()}if(t&2){let e=M(3),n=a(2);c(),r("ngIf",n.filterTemplate||n._filterTemplate)("ngIfElse",e)}}function hi(t,s){t&1&&C(0)}function mi(t,s){if(t&1&&p(0,hi,1,0,"ng-container",28),t&2){let e=s.$implicit,n=s.options;a(2);let i=M(9);r("ngTemplateOutlet",i)("ngTemplateOutletContext",X(2,tt,e,n))}}function fi(t,s){t&1&&C(0)}function gi(t,s){if(t&1&&p(0,fi,1,0,"ng-container",28),t&2){let e=s.options,n=a(4);r("ngTemplateOutlet",n.loaderTemplate||n._loaderTemplate)("ngTemplateOutletContext",w(2,et,e))}}function yi(t,s){t&1&&(O(0),p(1,gi,1,4,"ng-template",null,12,F),T())}function bi(t,s){if(t&1){let e=v();_(0,"p-scroller",47,11),b("onLazyLoad",function(i){f(e);let l=a(2);return g(l.onLazyLoad.emit(i))}),p(2,mi,1,5,"ng-template",null,2,F)(4,yi,3,0,"ng-container",18),h()}if(t&2){let e=a(2);R(w(8,H,e.scrollHeight)),r("items",e.visibleOptions())("itemSize",e.virtualScrollItemSize||e._itemSize)("autoSize",!0)("lazy",e.lazy)("options",e.virtualScrollOptions),c(4),r("ngIf",e.loaderTemplate||e._loaderTemplate)}}function Ii(t,s){t&1&&C(0)}function xi(t,s){if(t&1&&(O(0),p(1,Ii,1,0,"ng-container",28),T()),t&2){a();let e=M(9),n=a();c(),r("ngTemplateOutlet",e)("ngTemplateOutletContext",X(3,tt,n.visibleOptions(),B(2,Mt)))}}function Oi(t,s){if(t&1&&(_(0,"span"),$(1),h()),t&2){let e=a(2).$implicit,n=a(3);c(),A(n.getOptionGroupLabel(e.optionGroup))}}function Ti(t,s){t&1&&C(0)}function Ci(t,s){if(t&1&&(O(0),_(1,"li",51),p(2,Oi,2,1,"span",18)(3,Ti,1,0,"ng-container",28),h(),T()),t&2){let e=a(),n=e.$implicit,i=e.index,l=a().options,o=a(2);c(),r("ngStyle",w(5,H,l.itemSize+"px")),x("id",o.id+"_"+o.getOptionIndex(i,l)),c(),r("ngIf",!o.groupTemplate&&!o._groupTemplate),c(),r("ngTemplateOutlet",o.groupTemplate||o._groupTemplate)("ngTemplateOutletContext",w(7,re,n.optionGroup))}}function Si(t,s){if(t&1){let e=v();O(0),_(1,"p-selectItem",52),b("onClick",function(i){f(e);let l=a().$implicit,o=a(3);return g(o.onOptionSelect(i,l))})("onMouseEnter",function(i){f(e);let l=a().index,o=a().options,I=a(2);return g(I.onOptionMouseEnter(i,I.getOptionIndex(l,o)))}),h(),T()}if(t&2){let e=a(),n=e.$implicit,i=e.index,l=a().options,o=a(2);c(),r("id",o.id+"_"+o.getOptionIndex(i,l))("option",n)("checkmark",o.checkmark)("selected",o.isSelected(n))("label",o.getOptionLabel(n))("disabled",o.isOptionDisabled(n))("template",o.itemTemplate||o._itemTemplate)("focused",o.focusedOptionIndex()===o.getOptionIndex(i,l))("ariaPosInset",o.getAriaPosInset(o.getOptionIndex(i,l)))("ariaSetSize",o.ariaSetSize)}}function vi(t,s){if(t&1&&p(0,Ci,4,9,"ng-container",18)(1,Si,2,10,"ng-container",18),t&2){let e=s.$implicit,n=a(3);r("ngIf",n.isOptionGroup(e)),c(),r("ngIf",!n.isOptionGroup(e))}}function wi(t,s){if(t&1&&$(0),t&2){let e=a(4);J(" ",e.emptyFilterMessageLabel," ")}}function Vi(t,s){t&1&&C(0,null,14)}function ki(t,s){if(t&1&&p(0,Vi,2,0,"ng-container",29),t&2){let e=a(4);r("ngTemplateOutlet",e.emptyFilterTemplate||e._emptyFilterTemplate||e.emptyTemplate||e._emptyTemplate)}}function Fi(t,s){if(t&1&&(_(0,"li",53),p(1,wi,1,1)(2,ki,1,1,"ng-container"),h()),t&2){let e=a().options,n=a(2);r("ngStyle",w(2,H,e.itemSize+"px")),c(),Y(!n.emptyFilterTemplate&&!n._emptyFilterTemplate&&!n.emptyTemplate?1:2)}}function Ei(t,s){if(t&1&&$(0),t&2){let e=a(4);J(" ",e.emptyMessageLabel," ")}}function Li(t,s){t&1&&C(0,null,15)}function $i(t,s){if(t&1&&p(0,Li,2,0,"ng-container",29),t&2){let e=a(4);r("ngTemplateOutlet",e.emptyTemplate||e._emptyTemplate)}}function Mi(t,s){if(t&1&&(_(0,"li",53),p(1,Ei,1,1)(2,$i,1,1,"ng-container"),h()),t&2){let e=a().options,n=a(2);r("ngStyle",w(2,H,e.itemSize+"px")),c(),Y(!n.emptyTemplate&&!n._emptyTemplate?1:2)}}function zi(t,s){if(t&1&&(_(0,"ul",48,13),p(2,vi,2,2,"ng-template",49)(3,Fi,3,4,"li",50)(4,Mi,3,4,"li",50),h()),t&2){let e=s.$implicit,n=s.options,i=a(2);R(n.contentStyle),r("ngClass",n.contentStyleClass),x("id",i.id+"_list")("aria-label",i.listLabel),c(2),r("ngForOf",e),c(),r("ngIf",i.filterValue&&i.isEmpty()),c(),r("ngIf",!i.filterValue&&i.isEmpty())}}function Di(t,s){t&1&&C(0)}function Ai(t,s){if(t&1){let e=v();_(0,"div",40)(1,"span",41,6),b("focus",function(i){f(e);let l=a();return g(l.onFirstHiddenFocus(i))}),h(),p(3,oi,1,0,"ng-container",29)(4,_i,4,2,"div",42),_(5,"div",43),p(6,bi,5,10,"p-scroller",44)(7,xi,2,6,"ng-container",18)(8,zi,5,8,"ng-template",null,7,F),h(),p(10,Di,1,0,"ng-container",29),_(11,"span",41,8),b("focus",function(i){f(e);let l=a();return g(l.onLastHiddenFocus(i))}),h()()}if(t&2){let e=a();q(e.panelStyleClass),r("ngClass","p-select-overlay p-component")("ngStyle",e.panelStyle),c(),x("tabindex",0)("data-p-hidden-accessible",!0)("data-p-hidden-focusable",!0),c(2),r("ngTemplateOutlet",e.headerTemplate||e._headerTemplate),c(),r("ngIf",e.filter),c(),ye("max-height",e.virtualScroll?"auto":e.scrollHeight||"auto"),c(),r("ngIf",e.virtualScroll),c(),r("ngIf",!e.virtualScroll),c(3),r("ngTemplateOutlet",e.footerTemplate||e._footerTemplate),c(),x("tabindex",0)("data-p-hidden-accessible",!0)("data-p-hidden-focusable",!0)}}var Qi=({dt:t})=>`
|
|
1
|
+
import{a as Ye}from"./chunk-URH77XNK.js";import{a as Ke,b as Re,c as Ue}from"./chunk-3DBSHDAQ.js";import{a as Pe}from"./chunk-M4SSELXT.js";import{a as He}from"./chunk-WMZF4DQK.js";import{a as qe}from"./chunk-S27Z7D3D.js";import{a as ae,j as Be,l as Ge,n as Ne,p as Ze,r as je,y as We}from"./chunk-ME4ALIS7.js";import{Aa as Me,C as we,Da as ze,Ga as De,La as Ae,Ma as P,Na as N,Q as z,R as E,T as Ve,U as ke,Ua as Qe,Z as Fe,a as ve,la as Ee,na as oe,oa as Le,qa as G,ra as D,sa as $e,va as se}from"./chunk-VMI3QWC6.js";import{h as ee,j as Se,k as te,l as ie,m as ne,s as le}from"./chunk-ZK43JB4A.js";import{$b as C,$c as Q,Aa as S,Ba as fe,Cb as W,Dc as Oe,Eb as p,Ec as B,Fc as w,Gc as X,Ha as L,Hc as Te,Lb as x,Mb as r,Nb as ye,Pb as R,Qb as q,Rb as Y,Sc as F,Wb as _,Xb as h,Yb as k,Zb as O,_b as T,_c as m,ac as v,ba as ue,bd as K,ca as _e,cd as Ce,da as he,fc as b,gc as a,ia as me,ib as c,lc as y,mc as V,nc as d,ob as U,oc as u,qa as f,ra as g,rc as M,sc as $,tc as A,ua as Z,uc as J,xc as be,yb as j,yc as Ie,zb as ge,zc as xe}from"./chunk-6QJHEOXN.js";import{a as pe,b as de}from"./chunk-YQFG5XE2.js";var H=t=>({height:t}),lt=(t,s,e)=>({"p-select-option":!0,"p-select-option-selected":t,"p-disabled":s,"p-focus":e}),re=t=>({$implicit:t});function ot(t,s){t&1&&k(0,"CheckIcon",5)}function st(t,s){t&1&&k(0,"BlankIcon",6)}function at(t,s){if(t&1&&(O(0),p(1,ot,1,0,"CheckIcon",3)(2,st,1,0,"BlankIcon",4),T()),t&2){let e=a();c(),r("ngIf",e.selected),c(),r("ngIf",!e.selected)}}function rt(t,s){if(t&1&&(_(0,"span"),$(1),h()),t&2){let e,n=a();c(),A((e=n.label)!==null&&e!==void 0?e:"empty")}}function ct(t,s){t&1&&C(0)}var pt=["item"],dt=["group"],ut=["loader"],_t=["selectedItem"],ht=["header"],Je=["filter"],mt=["footer"],ft=["emptyfilter"],gt=["empty"],yt=["dropdownicon"],bt=["loadingicon"],It=["clearicon"],xt=["filtericon"],Ot=["onicon"],Tt=["officon"],Ct=["cancelicon"],St=["focusInput"],vt=["editableInput"],wt=["items"],Vt=["scroller"],kt=["overlay"],Ft=["firstHiddenFocusableEl"],Et=["lastHiddenFocusableEl"],Lt=()=>({class:"p-select-clear-icon"}),$t=()=>({class:"p-select-dropdown-icon"}),et=t=>({options:t}),tt=(t,s)=>({$implicit:t,options:s}),Mt=()=>({});function zt(t,s){if(t&1&&(O(0),$(1),T()),t&2){let e=a(2);c(),A(e.label()==="p-emptylabel"?"\xA0":e.label())}}function Dt(t,s){if(t&1&&C(0,24),t&2){let e=a(2);r("ngTemplateOutlet",e.selectedItemTemplate||e._selectedItemTemplate)("ngTemplateOutletContext",w(2,re,e.selectedOption))}}function At(t,s){if(t&1&&(_(0,"span"),$(1),h()),t&2){let e=a(3);c(),A(e.label()==="p-emptylabel"?"\xA0":e.label())}}function Qt(t,s){if(t&1&&p(0,At,2,1,"span",18),t&2){let e=a(2);r("ngIf",e.isSelectedOptionEmpty())}}function Kt(t,s){if(t&1){let e=v();_(0,"span",22,3),b("focus",function(i){f(e);let l=a();return g(l.onInputFocus(i))})("blur",function(i){f(e);let l=a();return g(l.onInputBlur(i))})("keydown",function(i){f(e);let l=a();return g(l.onKeyDown(i))}),p(2,zt,2,1,"ng-container",20)(3,Dt,1,4,"ng-container",23)(4,Qt,1,1,"ng-template",null,4,F),h()}if(t&2){let e,n=M(5),i=a();r("ngClass",i.inputClass)("pTooltip",i.tooltip)("tooltipPosition",i.tooltipPosition)("positionStyle",i.tooltipPositionStyle)("tooltipStyleClass",i.tooltipStyleClass)("pAutoFocus",i.autofocus),x("aria-disabled",i.disabled)("id",i.inputId)("aria-label",i.ariaLabel||(i.label()==="p-emptylabel"?void 0:i.label()))("aria-labelledby",i.ariaLabelledBy)("aria-haspopup","listbox")("aria-expanded",(e=i.overlayVisible)!==null&&e!==void 0?e:!1)("aria-controls",i.overlayVisible?i.id+"_list":null)("tabindex",i.disabled?-1:i.tabindex)("aria-activedescendant",i.focused?i.focusedOptionId:void 0)("aria-required",i.required)("required",i.required),c(2),r("ngIf",!i.selectedItemTemplate&&!i._selectedItemTemplate)("ngIfElse",n),c(),r("ngIf",(i.selectedItemTemplate||i._selectedItemTemplate)&&!i.isSelectedOptionEmpty())}}function Pt(t,s){if(t&1){let e=v();_(0,"input",25,5),b("input",function(i){f(e);let l=a();return g(l.onEditableInput(i))})("keydown",function(i){f(e);let l=a();return g(l.onKeyDown(i))})("focus",function(i){f(e);let l=a();return g(l.onInputFocus(i))})("blur",function(i){f(e);let l=a();return g(l.onInputBlur(i))}),h()}if(t&2){let e=a();r("ngClass",e.inputClass)("disabled",e.disabled)("pAutoFocus",e.autofocus),x("id",e.inputId)("maxlength",e.maxlength)("placeholder",e.modelValue()===void 0||e.modelValue()===null?e.placeholder():void 0)("aria-label",e.ariaLabel||(e.label()==="p-emptylabel"?void 0:e.label()))("aria-activedescendant",e.focused?e.focusedOptionId:void 0)}}function Ht(t,s){if(t&1){let e=v();_(0,"TimesIcon",27),b("click",function(i){f(e);let l=a(2);return g(l.clear(i))}),h()}t&2&&x("data-pc-section","clearicon")}function Rt(t,s){}function qt(t,s){t&1&&p(0,Rt,0,0,"ng-template")}function Bt(t,s){if(t&1){let e=v();_(0,"span",27),b("click",function(i){f(e);let l=a(2);return g(l.clear(i))}),p(1,qt,1,0,null,28),h()}if(t&2){let e=a(2);x("data-pc-section","clearicon"),c(),r("ngTemplateOutlet",e.clearIconTemplate||e._clearIconTemplate)("ngTemplateOutletContext",B(3,Lt))}}function Gt(t,s){if(t&1&&(O(0),p(1,Ht,1,1,"TimesIcon",26)(2,Bt,2,4,"span",26),T()),t&2){let e=a();c(),r("ngIf",!e.clearIconTemplate&&!e._clearIconTemplate),c(),r("ngIf",e.clearIconTemplate||e._clearIconTemplate)}}function Nt(t,s){t&1&&C(0)}function Zt(t,s){if(t&1&&(O(0),p(1,Nt,1,0,"ng-container",29),T()),t&2){let e=a(2);c(),r("ngTemplateOutlet",e.loadingIconTemplate||e._loadingIconTemplate)}}function Ut(t,s){if(t&1&&k(0,"span",32),t&2){let e=a(3);r("ngClass","p-select-loading-icon pi-spin "+e.loadingIcon)}}function jt(t,s){t&1&&k(0,"span",33),t&2&&q("p-select-loading-icon pi pi-spinner pi-spin")}function Wt(t,s){if(t&1&&(O(0),p(1,Ut,1,1,"span",30)(2,jt,1,2,"span",31),T()),t&2){let e=a(2);c(),r("ngIf",e.loadingIcon),c(),r("ngIf",!e.loadingIcon)}}function Yt(t,s){if(t&1&&(O(0),p(1,Zt,2,1,"ng-container",18)(2,Wt,3,2,"ng-container",18),T()),t&2){let e=a();c(),r("ngIf",e.loadingIconTemplate||e._loadingIconTemplate),c(),r("ngIf",!e.loadingIconTemplate&&!e._loadingIconTemplate)}}function Jt(t,s){if(t&1&&k(0,"span",37),t&2){let e=a(3);r("ngClass",e.dropdownIcon)}}function Xt(t,s){t&1&&k(0,"ChevronDownIcon",38),t&2&&r("styleClass","p-select-dropdown-icon")}function ei(t,s){if(t&1&&(O(0),p(1,Jt,1,1,"span",35)(2,Xt,1,1,"ChevronDownIcon",36),T()),t&2){let e=a(2);c(),r("ngIf",e.dropdownIcon),c(),r("ngIf",!e.dropdownIcon)}}function ti(t,s){}function ii(t,s){t&1&&p(0,ti,0,0,"ng-template")}function ni(t,s){if(t&1&&(_(0,"span",39),p(1,ii,1,0,null,28),h()),t&2){let e=a(2);c(),r("ngTemplateOutlet",e.dropdownIconTemplate||e._dropdownIconTemplate)("ngTemplateOutletContext",B(2,$t))}}function li(t,s){if(t&1&&p(0,ei,3,2,"ng-container",18)(1,ni,2,3,"span",34),t&2){let e=a();r("ngIf",!e.dropdownIconTemplate&&!e._dropdownIconTemplate),c(),r("ngIf",e.dropdownIconTemplate||e._dropdownIconTemplate)}}function oi(t,s){t&1&&C(0)}function si(t,s){t&1&&C(0)}function ai(t,s){if(t&1&&(O(0),p(1,si,1,0,"ng-container",28),T()),t&2){let e=a(3);c(),r("ngTemplateOutlet",e.filterTemplate||e._filterTemplate)("ngTemplateOutletContext",w(2,et,e.filterOptions))}}function ri(t,s){t&1&&k(0,"SearchIcon")}function ci(t,s){}function pi(t,s){t&1&&p(0,ci,0,0,"ng-template")}function di(t,s){if(t&1&&(_(0,"span"),p(1,pi,1,0,null,29),h()),t&2){let e=a(4);c(),r("ngTemplateOutlet",e.filterIconTemplate||e._filterIconTemplate)}}function ui(t,s){if(t&1){let e=v();_(0,"p-iconfield")(1,"input",46,10),b("input",function(i){f(e);let l=a(3);return g(l.onFilterInputChange(i))})("keydown",function(i){f(e);let l=a(3);return g(l.onFilterKeyDown(i))})("blur",function(i){f(e);let l=a(3);return g(l.onFilterBlur(i))}),h(),_(3,"p-inputicon"),p(4,ri,1,0,"SearchIcon",18)(5,di,2,1,"span",18),h()()}if(t&2){let e=a(3);c(),r("pSize",e.size)("value",e._filterValue()||"")("variant",e.variant),x("placeholder",e.filterPlaceholder)("aria-owns",e.id+"_list")("aria-label",e.ariaFilterLabel)("aria-activedescendant",e.focusedOptionId),c(3),r("ngIf",!e.filterIconTemplate&&!e._filterIconTemplate),c(),r("ngIf",e.filterIconTemplate||e._filterIconTemplate)}}function _i(t,s){if(t&1){let e=v();_(0,"div",45),b("click",function(i){return f(e),g(i.stopPropagation())}),p(1,ai,2,4,"ng-container",20)(2,ui,6,9,"ng-template",null,9,F),h()}if(t&2){let e=M(3),n=a(2);c(),r("ngIf",n.filterTemplate||n._filterTemplate)("ngIfElse",e)}}function hi(t,s){t&1&&C(0)}function mi(t,s){if(t&1&&p(0,hi,1,0,"ng-container",28),t&2){let e=s.$implicit,n=s.options;a(2);let i=M(9);r("ngTemplateOutlet",i)("ngTemplateOutletContext",X(2,tt,e,n))}}function fi(t,s){t&1&&C(0)}function gi(t,s){if(t&1&&p(0,fi,1,0,"ng-container",28),t&2){let e=s.options,n=a(4);r("ngTemplateOutlet",n.loaderTemplate||n._loaderTemplate)("ngTemplateOutletContext",w(2,et,e))}}function yi(t,s){t&1&&(O(0),p(1,gi,1,4,"ng-template",null,12,F),T())}function bi(t,s){if(t&1){let e=v();_(0,"p-scroller",47,11),b("onLazyLoad",function(i){f(e);let l=a(2);return g(l.onLazyLoad.emit(i))}),p(2,mi,1,5,"ng-template",null,2,F)(4,yi,3,0,"ng-container",18),h()}if(t&2){let e=a(2);R(w(8,H,e.scrollHeight)),r("items",e.visibleOptions())("itemSize",e.virtualScrollItemSize||e._itemSize)("autoSize",!0)("lazy",e.lazy)("options",e.virtualScrollOptions),c(4),r("ngIf",e.loaderTemplate||e._loaderTemplate)}}function Ii(t,s){t&1&&C(0)}function xi(t,s){if(t&1&&(O(0),p(1,Ii,1,0,"ng-container",28),T()),t&2){a();let e=M(9),n=a();c(),r("ngTemplateOutlet",e)("ngTemplateOutletContext",X(3,tt,n.visibleOptions(),B(2,Mt)))}}function Oi(t,s){if(t&1&&(_(0,"span"),$(1),h()),t&2){let e=a(2).$implicit,n=a(3);c(),A(n.getOptionGroupLabel(e.optionGroup))}}function Ti(t,s){t&1&&C(0)}function Ci(t,s){if(t&1&&(O(0),_(1,"li",51),p(2,Oi,2,1,"span",18)(3,Ti,1,0,"ng-container",28),h(),T()),t&2){let e=a(),n=e.$implicit,i=e.index,l=a().options,o=a(2);c(),r("ngStyle",w(5,H,l.itemSize+"px")),x("id",o.id+"_"+o.getOptionIndex(i,l)),c(),r("ngIf",!o.groupTemplate&&!o._groupTemplate),c(),r("ngTemplateOutlet",o.groupTemplate||o._groupTemplate)("ngTemplateOutletContext",w(7,re,n.optionGroup))}}function Si(t,s){if(t&1){let e=v();O(0),_(1,"p-selectItem",52),b("onClick",function(i){f(e);let l=a().$implicit,o=a(3);return g(o.onOptionSelect(i,l))})("onMouseEnter",function(i){f(e);let l=a().index,o=a().options,I=a(2);return g(I.onOptionMouseEnter(i,I.getOptionIndex(l,o)))}),h(),T()}if(t&2){let e=a(),n=e.$implicit,i=e.index,l=a().options,o=a(2);c(),r("id",o.id+"_"+o.getOptionIndex(i,l))("option",n)("checkmark",o.checkmark)("selected",o.isSelected(n))("label",o.getOptionLabel(n))("disabled",o.isOptionDisabled(n))("template",o.itemTemplate||o._itemTemplate)("focused",o.focusedOptionIndex()===o.getOptionIndex(i,l))("ariaPosInset",o.getAriaPosInset(o.getOptionIndex(i,l)))("ariaSetSize",o.ariaSetSize)}}function vi(t,s){if(t&1&&p(0,Ci,4,9,"ng-container",18)(1,Si,2,10,"ng-container",18),t&2){let e=s.$implicit,n=a(3);r("ngIf",n.isOptionGroup(e)),c(),r("ngIf",!n.isOptionGroup(e))}}function wi(t,s){if(t&1&&$(0),t&2){let e=a(4);J(" ",e.emptyFilterMessageLabel," ")}}function Vi(t,s){t&1&&C(0,null,14)}function ki(t,s){if(t&1&&p(0,Vi,2,0,"ng-container",29),t&2){let e=a(4);r("ngTemplateOutlet",e.emptyFilterTemplate||e._emptyFilterTemplate||e.emptyTemplate||e._emptyTemplate)}}function Fi(t,s){if(t&1&&(_(0,"li",53),p(1,wi,1,1)(2,ki,1,1,"ng-container"),h()),t&2){let e=a().options,n=a(2);r("ngStyle",w(2,H,e.itemSize+"px")),c(),Y(!n.emptyFilterTemplate&&!n._emptyFilterTemplate&&!n.emptyTemplate?1:2)}}function Ei(t,s){if(t&1&&$(0),t&2){let e=a(4);J(" ",e.emptyMessageLabel," ")}}function Li(t,s){t&1&&C(0,null,15)}function $i(t,s){if(t&1&&p(0,Li,2,0,"ng-container",29),t&2){let e=a(4);r("ngTemplateOutlet",e.emptyTemplate||e._emptyTemplate)}}function Mi(t,s){if(t&1&&(_(0,"li",53),p(1,Ei,1,1)(2,$i,1,1,"ng-container"),h()),t&2){let e=a().options,n=a(2);r("ngStyle",w(2,H,e.itemSize+"px")),c(),Y(!n.emptyTemplate&&!n._emptyTemplate?1:2)}}function zi(t,s){if(t&1&&(_(0,"ul",48,13),p(2,vi,2,2,"ng-template",49)(3,Fi,3,4,"li",50)(4,Mi,3,4,"li",50),h()),t&2){let e=s.$implicit,n=s.options,i=a(2);R(n.contentStyle),r("ngClass",n.contentStyleClass),x("id",i.id+"_list")("aria-label",i.listLabel),c(2),r("ngForOf",e),c(),r("ngIf",i.filterValue&&i.isEmpty()),c(),r("ngIf",!i.filterValue&&i.isEmpty())}}function Di(t,s){t&1&&C(0)}function Ai(t,s){if(t&1){let e=v();_(0,"div",40)(1,"span",41,6),b("focus",function(i){f(e);let l=a();return g(l.onFirstHiddenFocus(i))}),h(),p(3,oi,1,0,"ng-container",29)(4,_i,4,2,"div",42),_(5,"div",43),p(6,bi,5,10,"p-scroller",44)(7,xi,2,6,"ng-container",18)(8,zi,5,8,"ng-template",null,7,F),h(),p(10,Di,1,0,"ng-container",29),_(11,"span",41,8),b("focus",function(i){f(e);let l=a();return g(l.onLastHiddenFocus(i))}),h()()}if(t&2){let e=a();q(e.panelStyleClass),r("ngClass","p-select-overlay p-component")("ngStyle",e.panelStyle),c(),x("tabindex",0)("data-p-hidden-accessible",!0)("data-p-hidden-focusable",!0),c(2),r("ngTemplateOutlet",e.headerTemplate||e._headerTemplate),c(),r("ngIf",e.filter),c(),ye("max-height",e.virtualScroll?"auto":e.scrollHeight||"auto"),c(),r("ngIf",e.virtualScroll),c(),r("ngIf",!e.virtualScroll),c(3),r("ngTemplateOutlet",e.footerTemplate||e._footerTemplate),c(),x("tabindex",0)("data-p-hidden-accessible",!0)("data-p-hidden-focusable",!0)}}var Qi=({dt:t})=>`
|
|
2
2
|
.p-select {
|
|
3
3
|
display: inline-flex;
|
|
4
4
|
cursor: pointer;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{da as o,fa as r,
|
|
1
|
+
import{da as o,fa as r,zb as a}from"./chunk-6QJHEOXN.js";var p=/[&<>"']/g,Oe=RegExp(p.source);function m(){return new l}var l=class{constructor(){this._selected=[]}get value(){return this._selected}select(e,t,i){if(e.selected=!0,(!e.children||!t&&i)&&this._selected.push(e),t)if(e.parent){let n=e.parent.children.length,u=e.parent.children.filter(c=>c.selected).length;e.parent.selected=n===u}else e.children&&(this._setChildrenSelectedState(e.children,!0),this._removeChildren(e),i&&this._activeChildren(e)?this._selected=[...this._selected.filter(n=>n.parent!==e),e]:this._selected=[...this._selected,...e.children.filter(n=>!n.disabled)])}unselect(e,t){if(this._selected=this._selected.filter(i=>i!==e),e.selected=!1,t)if(e.parent&&e.parent.selected){let i=e.parent.children;this._removeParent(e.parent),this._removeChildren(e.parent),this._selected.push(...i.filter(n=>n!==e&&!n.disabled)),e.parent.selected=!1}else e.children&&(this._setChildrenSelectedState(e.children,!1),this._removeChildren(e))}clear(e){this._selected=e?this._selected.filter(t=>t.disabled):[]}_setChildrenSelectedState(e,t){for(let i of e)i.disabled||(i.selected=t)}_removeChildren(e){this._selected=[...this._selected.filter(t=>t.parent!==e),...e.children.filter(t=>t.parent===e&&t.disabled&&t.selected)]}_removeParent(e){this._selected=this._selected.filter(t=>t!==e)}_activeChildren(e){return e.children.every(t=>!t.disabled||t.selected)}};var g=new r("ng-select-selection-model");var ke=(()=>{class s{static{this.\u0275fac=function(i){return new(i||s)}}static{this.\u0275mod=a({type:s})}static{this.\u0275inj=o({providers:[{provide:g,useValue:m}]})}}return s})();export{ke as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as y}from"./chunk-
|
|
1
|
+
import{a as y}from"./chunk-BG6BR7KI.js";import{a as D,b as H}from"./chunk-3VQUNDVT.js";import{d as Y,i as Z,j as ee,k as te}from"./chunk-F6LZM7H5.js";import"./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"./chunk-WMZF4DQK.js";import"./chunk-QPPFPDWZ.js";import{i as X}from"./chunk-W63NE6LU.js";import"./chunk-S27Z7D3D.js";import{b as f,c as $,d as q,e as G,f as J,g as Q,h as W}from"./chunk-BKTBVFNX.js";import"./chunk-ZFNIPERQ.js";import{w as K,x as O}from"./chunk-ME4ALIS7.js";import"./chunk-DTYVTTET.js";import"./chunk-VMI3QWC6.js";import{e as L}from"./chunk-F7PVAVLQ.js";import"./chunk-DSZOROE6.js";import"./chunk-2BI7WNJP.js";import{k as j,p as F,s as A}from"./chunk-ZK43JB4A.js";import"./chunk-F2X3VGZZ.js";import{Dc as B,Eb as E,Mb as h,Oc as v,Qc as M,Sc as _,Wb as r,Xb as l,Y as k,Yb as S,_ as N,ac as R,bd as b,c as P,fc as T,gc as g,ia as x,ib as d,qa as u,ra as C,s as V,sc as p,tc as w,wc as z,yb as U}from"./chunk-6QJHEOXN.js";import{a,b as c}from"./chunk-YQFG5XE2.js";var ne={data:[],count:0,filter:{PageSize:20,PageNumber:1}},I=$(Q(ne),W("Closing Entries Store"),q(t=>({first:b(()=>(t.filter().PageNumber-1)*t.filter().PageSize+1),end:b(()=>Math.min(t.filter().PageNumber*t.filter().PageSize,t.count())),hasCheckedRows:b(()=>t.data().some(s=>s.checked)),selectedItems:b(()=>t.data().filter(s=>s.checked))})),J(t=>{let s=x(y),e={updateFilter:o=>{f(t,n=>c(a({},n),{filter:a(a({},n.filter),o)}))},onRowSelect(o){f(t,n=>{let i=n.data.map(m=>m.id===o.id?c(a({},m),{checked:!0}):m);return c(a({},n),{data:i})})},onRowUnselect(o){f(t,n=>{let i=n.data.map(m=>m.id===o.id?c(a({},m),{checked:!1}):m);return c(a({},n),{data:i})})},onHeaderCheckboxToggle(o){f(t,n=>{let i=n.data.map(m=>c(a({},m),{checked:o}));return c(a({},n),{data:i})})},getClosingEntries:D(P(k(o=>s.getClosingEntries(o).pipe(V(n=>n.map(i=>c(a({},i),{checked:!1}))),H({next:n=>{f(t,i=>c(a({},i),{data:n})),e.getClosingEntryCount()},error:n=>{console.error("Error fetching closing entries:",n)}}))))),getClosingEntryCount:D(P(k(()=>s.getClosingEntryCount().pipe(H({next:({count:o})=>{f(t,n=>c(a({},n),{count:o}))},error:o=>{console.error("Error fetching closing entry count:",o)}})))))};return e}),G(t=>({onInit:()=>{t.getClosingEntries(t.filter)}})));function oe(t,s){if(t&1){let e=R();r(0,"p-button",11),T("onClick",function(){u(e);let n=g(2);return C(n.onDeleteClosingEntries())}),l()}}function ie(t,s){if(t&1&&(r(0,"div",7),E(1,oe,1,0,"p-button",8),r(2,"a",9),S(3,"i",10),p(4," Add"),l()()),t&2){let e=g();d(),h("ngIf",e.store.hasCheckedRows())}}function re(t,s){t&1&&(r(0,"tr")(1,"th",13),S(2,"p-tableHeaderCheckbox"),l(),r(3,"th"),p(4,"Period"),l(),r(5,"th"),p(6,"Note"),l(),r(7,"th"),p(8,"Created"),l(),r(9,"th"),p(10,"CreatedBy"),l()())}function ae(t,s){if(t&1&&(r(0,"tr")(1,"td"),S(2,"p-tableCheckbox",14),l(),r(3,"td"),p(4),v(5,"date"),l(),r(6,"td"),p(7),l(),r(8,"td"),p(9),v(10,"date"),l(),r(11,"td"),p(12),l()()),t&2){let e=s.$implicit;d(2),h("value",e),d(2),w(M(5,5,e.period,"d MMM y")),d(3),w(e.note),d(2),w(M(10,8,e.created,"d MMM y")),d(3),w(e.creatorName)}}function le(t,s){if(t&1&&p(0),t&2){let e=g(2);z(" Showing ",e.store.first()," to ",e.store.end()," of ",e.store.count()," entries ")}}function se(t,s){t&1&&(r(0,"tr")(1,"td",15)(2,"span"),p(3," No journal entries found. "),l()()())}function ce(t,s){if(t&1){let e=R();r(0,"p-table",12),T("onPage",function(n){u(e);let i=g();return C(i.onPageChange(n))})("onRowSelect",function(n){u(e);let i=g();return C(i.onRowSelect(n))})("onRowUnselect",function(n){u(e);let i=g();return C(i.onRowUnselect(n))})("onHeaderCheckboxToggle",function(n){u(e);let i=g();return C(i.onHeaderCheckboxToggle(n))}),E(1,re,11,0,"ng-template",null,2,_)(3,ae,13,11,"ng-template",null,3,_)(5,le,1,3,"ng-template",null,4,_)(7,se,4,0,"ng-template",null,5,_),l()}if(t&2){let e=g();h("value",e.store.data())("paginator",!0)("totalRecords",e.store.count())("lazy",!0)("rows",e.store.filter().PageSize)("scrollHeight","calc(100vh - 142px)")}}var Ve=(()=>{class t{constructor(){this.store=x(I),this.closingEntryService=x(y)}onPageChange(e){let o=e.first/e.rows+1;this.store.updateFilter(c(a({},this.store.filter()),{PageSize:o}))}onRowSelect(e){this.store.onRowSelect(e.data)}onRowUnselect(e){if(Array.isArray(e.data)){e.data.forEach(o=>{this.store.onRowUnselect(o)});return}else this.store.onRowUnselect(e.data)}onHeaderCheckboxToggle(e){this.store.onHeaderCheckboxToggle(e.checked)}onDeleteClosingEntries(){let e=this.store.selectedItems().map(o=>o.id).join(",");console.log("Deleting closing entries with IDs:",e),this.closingEntryService.deleteClosingEntry(e).pipe(N(()=>{this.store.updateFilter(a({},this.store.filter()))})).subscribe()}static{this.\u0275fac=function(o){return new(o||t)}}static{this.\u0275cmp=U({type:t,selectors:[["app-closing-page"]],features:[B([I])],decls:5,vars:1,consts:[["actionButton",""],["content",""],["header",""],["body",""],["paginatorleft",""],["emptymessage",""],["pageTitle","Closing Entries List",3,"scrollable"],[1,"d-flex","gap-2"],["label","Delete","severity","danger","icon","fa-solid fa-trash",3,"onClick",4,"ngIf"],["routerLink","create",1,"p-button"],[1,"fa-solid","fa-plus"],["label","Delete","severity","danger","icon","fa-solid fa-trash",3,"onClick"],["dataKey","id","styleClass","d-flex flex-column justify-content-between h-100",3,"onPage","onRowSelect","onRowUnselect","onHeaderCheckboxToggle","value","paginator","totalRecords","lazy","rows","scrollHeight"],[2,"width","1rem"],[3,"value"],["colspan","5"]],template:function(o,n){o&1&&(r(0,"app-main-panel",6),E(1,ie,5,1,"ng-template",null,0,_)(3,ce,9,6,"ng-template",null,1,_),l()),o&2&&h("scrollable",!0)},dependencies:[X,A,j,F,te,Y,Z,ee,L,O,K],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();export{Ve as ClosingPageComponent};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as U,r as H}from"./chunk-
|
|
1
|
+
import{a as U,r as H}from"./chunk-ME4ALIS7.js";import{La as q,Ma as w,Ua as P,a as G}from"./chunk-VMI3QWC6.js";import{h as N,l as j,m as R,s as z}from"./chunk-ZK43JB4A.js";import{$b as L,$c as x,Aa as T,Cb as M,Dc as D,Eb as m,Fc as Q,Lb as g,Mb as s,Pb as F,Qb as E,Rb as I,Wb as h,Xb as f,_c as p,ac as O,ba as v,ca as $,da as C,fc as y,gc as A,ia as _,ib as a,lc as k,mc as B,nc as d,oc as u,qa as r,ra as c,ua as b,yb as S,zb as V}from"./chunk-6QJHEOXN.js";var Y=["handle"],Z=["input"],ee=e=>({checked:e});function te(e,K){e&1&&L(0)}function ie(e,K){if(e&1&&m(0,te,1,0,"ng-container",4),e&2){let i=A();s("ngTemplateOutlet",i.handleTemplate||i._handleTemplate)("ngTemplateOutletContext",Q(2,ee,i.checked()))}}var oe=({dt:e})=>`
|
|
2
2
|
.p-toggleswitch {
|
|
3
3
|
display: inline-block;
|
|
4
4
|
width: ${e("toggleswitch.width")};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as r}from"./chunk-
|
|
1
|
+
import{a as r}from"./chunk-DSZOROE6.js";import{ca as i,ia as n}from"./chunk-6QJHEOXN.js";var u=(()=>{class e{constructor(){this.httpService=n(r)}getClosingEntries(t){return this.httpService.get(void 0,"api/SetupClosingEntries/GetAll",{params:t})}createClosingEntry(t){return this.httpService.post(void 0,"api/SetupClosingEntries/Submit",t)}deleteClosingEntry(t){return this.httpService.delete(void 0,`api/SetupClosingEntries/Delete?closingEntryIds=${t}`)}getClosingEntryCount(){return this.httpService.get(void 0,"api/SetupClosingEntries/GetAllCount")}static{this.\u0275fac=function(o){return new(o||e)}}static{this.\u0275prov=i({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();export{u as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as _}from"./chunk-ZK43JB4A.js";import{Bb as N,Ga as K,Ha as g,La as A,ad as S,bd as m,ca as y,cd as E,fa as T,ia as h,xa as $}from"./chunk-6QJHEOXN.js";import{a as c,b as u}from"./chunk-YQFG5XE2.js";var ce=(()=>{class t{transform(e,o=50,r=!1,a="..."){if(!e||typeof e!="string")return"";if(e.length<=o)return e;let i=e.substring(0,o);if(r){let s=i.lastIndexOf(" ");s>0&&(i=i.substring(0,s))}return i+a}static{this.\u0275fac=function(o){return new(o||t)}}static{this.\u0275pipe=N({name:"truncate",type:t,pure:!0})}}return t})();function R(t){let n=S(()=>t());return J(n)?new Proxy(t,{get(e,o){return o in n?(K(e[o])||Object.defineProperty(e,o,{value:m(()=>e()[o]),configurable:!0}),R(e[o])):e[o]}}):t}var H=[WeakSet,WeakMap,Promise,Date,Error,RegExp,ArrayBuffer,DataView,Function];function J(t){if(t===null||typeof t!="object"||q(t))return!1;let n=Object.getPrototypeOf(t);if(n===Object.prototype)return!0;for(;n&&n!==Object.prototype;){if(H.includes(n.constructor))return!1;n=Object.getPrototypeOf(n)}return n===Object.prototype}function q(t){return typeof t?.[Symbol.iterator]=="function"}var G=new WeakMap,d=Symbol("STATE_SOURCE");function I(t,...n){t[d].update(e=>n.reduce((o,r)=>c(c({},o),typeof r=="function"?r(o):r),e)),Y(t)}function j(t){return t[d]()}function Q(t){return G.get(t[d])||[]}function Y(t){let n=Q(t);for(let e of n){let o=S(()=>j(t));e(o)}}function F(...t){let n=[...t],e=typeof n[0]=="function"?{}:n.shift(),o=n;return(()=>{class a{constructor(){let s=o.reduce((p,X)=>X(p),Z()),{stateSignals:l,props:f,methods:w,hooks:B}=s,M=c(c(c({},l),f),w);this[d]=s[d];for(let p of Reflect.ownKeys(M))this[p]=M[p];let{onInit:x,onDestroy:P}=B;x&&x(),P&&h($).onDestroy(P)}static \u0275fac=function(l){return new(l||a)};static \u0275prov=y({token:a,factory:a.\u0275fac,providedIn:e.providedIn||null})}return a})()}function Z(){return{[d]:g({}),stateSignals:{},props:{},methods:{},hooks:{}}}function k(t,...n){let e=typeof t=="function"?[t,...n]:n;return o=>e.reduce((r,a)=>a(r),o)}function z(t){return n=>{let e=t(c(c(c({[d]:n[d]},n.stateSignals),n.props),n.methods));return Reflect.ownKeys(e),u(c({},n),{props:c(c({},n.props),e)})}}function ee(t){return z(t)}function U(t){return n=>{let e=c(c(c({[d]:n[d]},n.stateSignals),n.props),n.methods),o=typeof t=="function"?t(e):t,r=a=>{let i=o[a],s=n.hooks[a];return i?()=>{s&&s(),i(e)}:s};return u(c({},n),{hooks:{onInit:r("onInit"),onDestroy:r("onDestroy")}})}}function v(t){return n=>{let e=t(c(c(c({[d]:n[d]},n.stateSignals),n.props),n.methods));return Reflect.ownKeys(e),u(c({},n),{methods:c(c({},n.methods),e)})}}function b(t){return n=>{let e=typeof t=="function"?t():t,o=Reflect.ownKeys(e);n[d].update(a=>c(c({},a),e));let r=o.reduce((a,i)=>{let s=m(()=>n[d]()[i]);return u(c({},a),{[i]:R(s)})},{});return u(c({},n),{stateSignals:c(c({},n.stateSignals),r)})}}var D=new Set;function te(t){if(t==null)throw new Error("");return t}var L={send:()=>{}},W=(()=>{class t{#e={};#n=_(h(A));#o=[];#t={};#i=1;#c=this.#n&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__.connect({name:"NgRx SignalStore"}):L;constructor(){if(!this.#n)return;!!window.__REDUX_DEVTOOLS_EXTENSION__||console.info("NgRx Toolkit/DevTools: Redux DevTools Extension is not available.")}ngOnDestroy(){D.clear()}syncToDevTools(e){let o=Object.entries(e).reduce((i,[s,l])=>{let{options:f,name:w}=this.#e[s];return i[w]=f.map(l),i},{});this.#t=c(c({},this.#t),o);let r=Array.from(D),a=r.length?r.join(", "):"Store Update";D.clear(),this.#c.send({type:a},this.#t)}getNextId(){return String(this.#i++)}addStore(e,o,r,a){let i=o,s=Object.values(this.#e).map(f=>f.name);if(s.includes(i)&&!a.indexNames)throw new Error(`An instance of the store ${i} already exists. Enable automatic indexing via withDevTools('${i}', { indexNames: true }), or rename it upon instantiation.`);for(let f=1;s.includes(i);f++)i=`${o}-${f}`;this.#e[e]={name:i,options:a};let l=a.tracker;this.#o.includes(l)||this.#o.push(l),l.onChange(f=>this.syncToDevTools(f)),l.track(e,r)}removeStore(e){let o=this.#e[e].name;this.#e=Object.entries(this.#e).reduce((r,[a,i])=>(a!==e&&(r[a]=i),r),{}),this.#t=Object.entries(this.#t).reduce((r,[a,i])=>(a!==o&&(r[o]=i),r),{});for(let r of this.#o)r.removeStore(e)}renameStore(e,o){let r=Object.values(this.#e).map(i=>i.name),a=te(Object.keys(this.#e).find(i=>this.#e[i].name===e));if(r.includes(o))throw new Error(`NgRx Toolkit/DevTools: cannot rename from ${e} to ${o}. ${o} is already assigned to another SignalStore instance.`);this.#e=Object.entries(this.#e).reduce((i,[s,l])=>(l.name===e?i[s]=u(c({},l),{name:o}):i[s]=l,i),{}),this.#t=Object.entries(this.#t).reduce((i,[s,l])=>(s!==e&&(i[s]=l),i),{}),this.#o.forEach(i=>i.notifyRenamedStore(a))}static{this.\u0275fac=function(o){return new(o||t)}}static{this.\u0275prov=y({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})(),ne=(()=>{class t{#e=g({});get stores(){return this.#e()}#n;#o=E(()=>{if(this.#n===void 0)throw new Error("no callback function defined");let e=this.#e(),o=Object.entries(e).reduce((r,[a,i])=>u(c({},r),{[a]:j(i)}),{});this.#n(o)});track(e,o){this.#e.update(r=>u(c({},r),{[e]:o}))}onChange(e){this.#n=e}removeStore(e){this.#e.update(o=>Object.entries(o).reduce((r,[a,i])=>(a!==e&&(r[a]=i),r),{}))}notifyRenamedStore(e){this.#e()[e]&&this.#e.update(o=>c({},o))}static{this.\u0275fac=function(o){return new(o||t)}}static{this.\u0275prov=y({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})(),oe="___renameDevtoolsName",O="___uniqueDevtoolsId",we=new T("Array contain existing names for the signal stores",{factory:()=>[],providedIn:"root"});function V(t,...n){return k(v(()=>{let e=h(W),o=e.getNextId();return{[oe]:r=>{e.renameStore(t,r)},[O]:()=>o}}),U(e=>{let o=h(W),r=String(e[O]());return{onInit(){let a=String(e[O]()),i={indexNames:!n.some(s=>s.indexNames===!1),map:n.find(s=>s.map)?.map??(s=>s),tracker:h(n.find(s=>s.tracker)?.tracker||ne)};o.addStore(a,t,e,i)},onDestroy(){o.removeStore(r)}}}))}var Ke=Symbol("DEVTOOLS_FEATURE");var Ee=k(b({}));var ie={themeOptions:{theme:"light",dir:"ltr",layout:"vertical",sidebartype:"full",boxed:"boxed",colorTheme:"Blue_Theme",cardType:"shadow"}},Oe=F({providedIn:"root"},b(ie),V("LayoutThemeStore"),v(t=>({updateSidebarType(){I(t,n=>{switch(n.themeOptions.sidebartype){case"full":return u(c({},n),{themeOptions:u(c({},n.themeOptions),{sidebartype:"mini-sidebar"})});case"mini-sidebar":return u(c({},n),{themeOptions:u(c({},n.themeOptions),{sidebartype:"full"})});default:return n}})}})));export{ce as a,I as b,F as c,ee as d,U as e,v as f,b as g,V as h,Oe as i};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as r}from"./chunk-F3RSX7TC.js";import"./chunk-U2VDC52W.js";import{d as n}from"./chunk-F7PVAVLQ.js";import"./chunk-DSZOROE6.js";import"./chunk-2BI7WNJP.js";import"./chunk-ZK43JB4A.js";import"./chunk-F2X3VGZZ.js";import{ia as e}from"./chunk-6QJHEOXN.js";import"./chunk-YQFG5XE2.js";var a=(t,m)=>{let o=e(r),i=e(n),p=o.isAuthenticated(),s=!o.isTokenExpired(),u=o.checkAuthKeysExists();return p&&s&&u?(i.navigateByUrl("/pages/dashboard"),!1):!0};var C=[{path:"",canActivate:[a],loadComponent:()=>import("./chunk-FVYL3BQ7.js").then(t=>t.LoginComponent)},{path:"404",loadComponent:()=>import("./chunk-OJTHBHGK.js").then(t=>t.NotfoundComponent)},{path:"signup",loadComponent:()=>import("./chunk-DDM2KWNX.js").then(t=>t.SignupComponent)},{path:"504",loadComponent:()=>import("./chunk-6DTQWLB3.js").then(t=>t.TimeoutComponent)}];export{C as AuthenticationRoutes};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as o}from"./chunk-6QJHEOXN.js";function i(e="emit"){return r=>r.pipe(o(t=>console.log(`${e}`,t)))}export{i as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as i}from"./chunk-
|
|
1
|
+
import{a as i}from"./chunk-F3RSX7TC.js";import{d as r}from"./chunk-F7PVAVLQ.js";import{ia as e}from"./chunk-6QJHEOXN.js";var f=(a,o)=>{let t=e(i),s=e(r),n=t.isAuthenticated(),u=!t.isTokenExpired(),c=t.checkAuthKeysExists();return!n||!u||!c?(s.navigate(["/"],{queryParams:{returnUrl:o.url}}),!1):!0};export{f as a};
|
|
@@ -0,0 +1 @@
|
|
|
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};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as Xe,b as Ze,c as et,d as tt,e as nt,f as ot}from"./chunk-PKOERZXQ.js";import{a as Qe}from"./chunk-G4XX7EU2.js";import{a as de,b as fe}from"./chunk-3A4BFUGD.js";import{d as le,e as Je,i as Ke,j as qe,k as ne}from"./chunk-3IEOINKV.js";import"./chunk-53I5JFOQ.js";import"./chunk-HQMTUZZQ.js";import"./chunk-RXOOTYEO.js";import{a as Le}from"./chunk-QF4D5YPK.js";import{a as re,b as pe}from"./chunk-Q7SK53ST.js";import"./chunk-SEXB43QC.js";import{a as W,b as j}from"./chunk-CWFLUFKM.js";import"./chunk-LWYAFMN3.js";import"./chunk-NDLX3ORI.js";import"./chunk-E4MHRZVH.js";import"./chunk-XPRP6AB4.js";import"./chunk-YZTBV6HG.js";import{a as Ae,b as J}from"./chunk-ZMIVD3SF.js";import"./chunk-DHLFL3KH.js";import"./chunk-QWTGY7FA.js";import{g as M}from"./chunk-TUFQ5JVG.js";import"./chunk-ZUDQOT7C.js";import{a as Y,b as $}from"./chunk-BUDZ3ONE.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-SN7DLFX2.js";import"./chunk-V4SH72WU.js";import{o as He,w as N,x as G}from"./chunk-IMVMIXVJ.js";import"./chunk-2D2YD753.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-OIBDX2CA.js";import{b as ie,d as Ue,e as D,l as A}from"./chunk-AOOG6YOT.js";import{a as ve}from"./chunk-M3TKVRYP.js";import"./chunk-2MKKFLNJ.js";import{k as B,o as je,s as w}from"./chunk-VZ5CMS5O.js";import"./chunk-F2X3VGZZ.js";import{$b as v,Cc as Se,Db as x,Dc as z,Ec as oe,Ha as I,Lb as c,Nc as Ve,Ob as q,Oc as $e,Qb as Ce,Rb as P,Rc as u,Tb as b,Ub as O,Vb as r,Wb as a,Xb as Z,Y as U,_ as F,bd as ee,c as ue,ca as he,cd as We,ec as y,fc as s,hb as p,ia as h,qa as C,ra as S,rc as m,s as X,sc as _,tc as E,vc as Be,xb as T}from"./chunk-NMCKMUY4.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};
|
|
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};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{u as O}from"./chunk-ZK43JB4A.js";import{Ab as g,Da as p,Db as T,Ea as a,Fa as l,Ha as f,La as H,ad as m,bd as h,ca as u,cd as y,dd as I,fa as r,ia as o,ja as n,tb as C,xa as d,yb as v}from"./chunk-6QJHEOXN.js";import{f as s}from"./chunk-YQFG5XE2.js";var D=new r("HIGHCHARTS_LOADER"),R=new r("HIGHCHARTS_ROOT_MODULES"),S=new r("HIGHCHARTS_OPTIONS"),w=new r("HIGHCHARTS_CONFIG"),M=new r("HIGHCHARTS_TIMEOUT"),A=(()=>{class t{constructor(){this.highcharts=f(null),this.loader=o(D),this.globalOptions=o(S,{optional:!0}),this.globalModules=o(R,{optional:!0})}loadHighchartsWithModules(e){return s(this,null,function*(){let i=yield this.loader();return yield Promise.allSettled([...this.globalModules?.()??[],...e?.modules?.()??[]]),i})}load(e){this.loadHighchartsWithModules(e).then(i=>{this.globalOptions&&i.setOptions(this.globalOptions),this.highcharts.set(i)})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=u({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})(),G=(()=>{class t{delay(e){return new Promise(i=>setTimeout(i,e))}keepChartUpToDate(){y(()=>s(this,null,function*(){this.update();let e=yield this.chart();this.chartCreated?e?.update(this.options(),!0,this.oneToOne()):e&&(this.chartCreated=!0)}))}destroyChart(){return s(this,null,function*(){let e=yield this.chart();e&&e.destroy()})}constructor(){this.constructorType=a("chart"),this.oneToOne=a(!1),this.options=a.required(),this.update=C(),this.chartInstance=p(),this.destroyRef=o(d),this.el=o(l),this.platformId=o(H),this.relativeConfig=o(w,{optional:!0}),this.timeout=o(M,{optional:!0}),this.highchartsChartService=o(A),this.chartCreated=!1,this.constructorChart=h(()=>{let e=this.highchartsChartService.highcharts();if(e)return e[this.constructorType()]}),this.chart=h(()=>s(this,null,function*(){return yield this.delay(this.relativeConfig?.timeout??this.timeout??500),this.constructorChart()?.(this.el.nativeElement,m(()=>this.options()),e=>this.chartInstance.emit(e))})),!(this.platformId&&O(this.platformId))&&(this.highchartsChartService.load(this.relativeConfig),this.destroyRef.onDestroy(()=>this.destroyChart()),I(()=>{this.update()&&this.update.set(!1)}),this.keepChartUpToDate())}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275dir=g({type:t,selectors:[["","highchartsChart",""]],inputs:{constructorType:[1,"constructorType"],oneToOne:[1,"oneToOne"],options:[1,"options"],update:[1,"update"]},outputs:{update:"updateChange",chartInstance:"chartInstance"}})}}return t})(),q=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=v({type:t,selectors:[["highcharts-chart"]],features:[T([{directive:G,inputs:["constructorType","constructorType","oneToOne","oneToOne","options","options","update","update"],outputs:["chartInstance","chartInstance","updateChange","updateChange"]}])],decls:0,vars:0,template:function(i,k){},encapsulation:2,changeDetection:0})}}return t})(),F=()=>[],E=()=>import("./chunk-52U5NSQT.js").then(t=>t.default);function _(t){return n([{provide:D,useValue:t??E}])}function P(t){return n([{provide:S,useValue:t}])}function b(t){return n([{provide:R,useValue:t}])}function z(t={}){let c=[_(t.instance),b(t.modules??F),{provide:M,useValue:t.timeout}];return t.options&&c.push(P(t.options)),n(c)}export{q as a,z as b};
|