dealposbooks 1.9.4 → 1.9.6-p
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 +374 -374
- package/assets/scss/layouts/_sidebar.scss +2 -2
- package/assets/scss/style.scss +34 -3
- package/assets/scss/variables/_variables.scss +1 -2
- package/chunk-27SWEVDU.js +1 -0
- package/chunk-2DV653RD.js +1 -0
- package/chunk-2OECREUZ.js +1 -0
- package/{chunk-NL5IYBHF.js → chunk-32BR7AQL.js} +1 -1
- package/chunk-34XRAZFC.js +1 -0
- package/chunk-35CWG2OK.js +180 -0
- package/chunk-35KDUCM3.js +1 -0
- package/{chunk-BGDKOH3U.js → chunk-3DN7TZCI.js} +1 -1
- package/chunk-3G3QSUWH.js +1 -0
- package/chunk-3HW557B7.js +1 -0
- package/chunk-3L7IWFXM.js +527 -0
- package/chunk-3WB76KQC.js +430 -0
- package/chunk-43WCLYRX.js +1 -0
- package/chunk-46TNY5N4.js +185 -0
- package/chunk-4FGQ5T64.js +2 -0
- package/chunk-4KXSM3HP.js +1 -0
- package/chunk-4QKRWFW4.js +1 -0
- package/{chunk-AM66YD6C.js → chunk-4S33ZRKF.js} +1 -1
- package/chunk-54OPMMIM.js +1 -0
- package/chunk-6HQX2SM2.js +1 -0
- package/chunk-6TA77CRR.js +1 -0
- package/{chunk-F7TF7ASR.js → chunk-6ZZARVQO.js} +1 -1
- package/{chunk-XMZ7ADZB.js → chunk-7WXXPCRV.js} +1 -1
- package/{chunk-5QMHSLSU.js → chunk-AKMHO3LC.js} +1 -1
- package/chunk-AOSPVPK7.js +231 -0
- package/{chunk-5OU7ECCN.js → chunk-ASK2IVMC.js} +1 -1
- package/chunk-B7JILYJO.js +1 -0
- package/chunk-BNI5KUDE.js +193 -0
- package/chunk-BX3CRF44.js +1 -0
- package/{chunk-KQAMA66M.js → chunk-BYD3JK4R.js} +1 -1
- package/chunk-C4LZX33Q.js +449 -0
- package/{chunk-7TKATLB4.js → chunk-C5GEP4MM.js} +1 -1
- package/chunk-C7UZ6ZYF.js +1 -0
- package/chunk-CSMMP7XG.js +188 -0
- package/chunk-CTCQB63H.js +1 -0
- package/chunk-DCKLQNGL.js +1 -0
- package/chunk-DNK2GUDB.js +1 -0
- package/{chunk-VKO43FOT.js → chunk-DOM7WYRM.js} +1 -1
- package/chunk-ELWFWCNU.js +246 -0
- package/{chunk-5OXHRN43.js → chunk-EXVUABTO.js} +1 -1
- package/chunk-G6FJQBZZ.js +1 -0
- package/chunk-GJXWL5XV.js +1 -0
- package/chunk-GNP7WGSH.js +1 -0
- package/chunk-GTGRV7IH.js +1 -0
- package/chunk-HFFH2WIX.js +98 -0
- package/chunk-HRPP75N7.js +1 -0
- package/{chunk-7XAJOA36.js → chunk-HRQJ5DXP.js} +1 -1
- package/{chunk-XEATX3IC.js → chunk-I3HFXOYS.js} +1 -1
- package/{chunk-HDO45X7Q.js → chunk-IIB2DZLA.js} +1 -1
- package/{chunk-FCGAJLPQ.js → chunk-J2SK4PGN.js} +1 -1
- package/chunk-J77A3DFB.js +1 -0
- package/chunk-JDW35ZB5.js +47 -0
- package/chunk-JMLETF7Y.js +1 -0
- package/{chunk-56MVOUHH.js → chunk-JP3F2QND.js} +1 -1
- package/chunk-JYNZPVLW.js +1 -0
- package/chunk-K6753MGR.js +7 -0
- package/chunk-LD4G6ND6.js +130 -0
- package/{chunk-JQ4DHNFQ.js → chunk-LKZL77YR.js} +1 -1
- package/chunk-LR2DJRRL.js +79 -0
- package/chunk-LTZA6IIO.js +1 -0
- package/chunk-M7MFX6BW.js +1 -0
- package/chunk-MCDQ2TIS.js +1 -0
- package/chunk-MJVSTWYY.js +1 -0
- package/chunk-N2RYBZK7.js +1 -0
- package/{chunk-HPKZYS2A.js → chunk-N6JCA3CN.js} +2 -2
- package/chunk-NF3TF3LT.js +397 -0
- package/chunk-OEJBOFI5.js +1 -0
- package/{chunk-7PDAUPWN.js → chunk-OEOAUJY5.js} +12 -12
- package/{chunk-JRYP3YPK.js → chunk-OVCTOPAO.js} +1 -1
- package/{chunk-4FK4QI2U.js → chunk-OZACNHDP.js} +1 -1
- package/chunk-P6CJ2ONT.js +1 -0
- package/{chunk-T2A6NORZ.js → chunk-PGECEXRR.js} +1 -1
- package/{chunk-ITIRJVUS.js → chunk-QPKNYNLC.js} +2 -2
- package/chunk-RBDJZRHY.js +1 -0
- package/{chunk-25XKSUYX.js → chunk-RT5PUZ5F.js} +1 -1
- package/{chunk-ZKXT6RSI.js → chunk-TC43COAE.js} +1 -1
- package/chunk-TFV5QZKR.js +947 -0
- package/chunk-TK3G2BVM.js +222 -0
- package/{chunk-R6HGHSPM.js → chunk-TQZNJ5WF.js} +1 -1
- package/chunk-UEOO2LYA.js +82 -0
- package/chunk-WEWEITR7.js +1 -0
- package/chunk-WGZN6AN2.js +1 -0
- package/chunk-WZO2ZLBL.js +1 -0
- package/chunk-X34Y3TVX.js +1 -0
- package/chunk-XFSZDZPJ.js +1 -0
- package/chunk-XKEV5AED.js +201 -0
- package/chunk-XZGFG6E3.js +1 -0
- package/chunk-YOEPO6LK.js +959 -0
- package/{chunk-D5AXB5DE.js → chunk-YVEUYFCE.js} +2 -2
- package/chunk-ZWHB7NI7.js +1 -0
- package/index.html +2 -2
- package/main-U5PC2W2C.js +1 -0
- package/package.json +1 -1
- package/styles-GTUKYMN7.css +1 -0
- package/chunk-2TUOAI22.js +0 -1
- package/chunk-3IHOEH5O.js +0 -1
- package/chunk-3VC2KAML.js +0 -1
- package/chunk-4J3EFT67.js +0 -1
- package/chunk-6J5S4UPN.js +0 -2
- package/chunk-7GT5MR57.js +0 -1
- package/chunk-7LCGNNCW.js +0 -627
- package/chunk-7NXTCJMX.js +0 -1
- package/chunk-A3NY5EYN.js +0 -1
- package/chunk-AH5PA2TO.js +0 -1
- package/chunk-B4COOFJS.js +0 -2
- package/chunk-BJGK47CG.js +0 -1
- package/chunk-BWS6U7BM.js +0 -193
- package/chunk-D5RQBZNF.js +0 -1
- package/chunk-DELPZQZH.js +0 -246
- package/chunk-DJUGUNXR.js +0 -503
- package/chunk-DSFIM36S.js +0 -1
- package/chunk-EHCALTHK.js +0 -1
- package/chunk-FUGCJNGU.js +0 -960
- package/chunk-GMLRRSMP.js +0 -1
- package/chunk-IACJNRVA.js +0 -25
- package/chunk-IQZ2MKLS.js +0 -1
- package/chunk-IXPPR5MV.js +0 -1
- package/chunk-J3B5HVW4.js +0 -1
- package/chunk-L6VKOTIV.js +0 -180
- package/chunk-LATJGOV3.js +0 -185
- package/chunk-LLV6TGMT.js +0 -1
- package/chunk-MNCUT4L4.js +0 -1
- package/chunk-NBRL2K4H.js +0 -1
- package/chunk-NDOZ5YES.js +0 -1
- package/chunk-SCEMI63T.js +0 -1
- package/chunk-SDTMCYSJ.js +0 -1
- package/chunk-TDX2HSWE.js +0 -1
- package/chunk-UHVZAFKN.js +0 -1
- package/chunk-UMYCPFK5.js +0 -1660
- package/chunk-UOAJWMSO.js +0 -1
- package/chunk-UZCNPNT7.js +0 -2
- package/chunk-VF7TG32T.js +0 -47
- package/chunk-VI3AV775.js +0 -1
- package/chunk-VK5TK23W.js +0 -7
- package/chunk-VNHXLUHA.js +0 -1
- package/chunk-W6UD5NO5.js +0 -2
- package/chunk-WUGCCSIP.js +0 -1
- package/chunk-X234EQET.js +0 -129
- package/chunk-X3FQFXUZ.js +0 -300
- package/chunk-XJ5BSLZV.js +0 -1
- package/chunk-YAKYBQQ6.js +0 -1
- package/chunk-YQRWSN5V.js +0 -1
- package/main-VQYYYR67.js +0 -1
- package/styles-IDKYTRGA.css +0 -1
|
@@ -0,0 +1,246 @@
|
|
|
1
|
+
import{a as lt}from"./chunk-7WXXPCRV.js";import{a as Nn}from"./chunk-NRULEUE7.js";import{a as Fn,b as we,c as Te}from"./chunk-NF3TF3LT.js";import{a as kn,b as On}from"./chunk-AOSPVPK7.js";import"./chunk-TQZNJ5WF.js";import{a as Vn,b as Ln}from"./chunk-32BR7AQL.js";import{a as Pn}from"./chunk-RT5PUZ5F.js";import"./chunk-OZACNHDP.js";import{b as fn}from"./chunk-LKZL77YR.js";import{a as rt,b as at}from"./chunk-JP3F2QND.js";import{a as vn,b as Sn,c as wn,d as Tn,i as An,j as En,k as Mn}from"./chunk-TFV5QZKR.js";import"./chunk-3WB76KQC.js";import"./chunk-LTZA6IIO.js";import{a as j}from"./chunk-N2RYBZK7.js";import{a as A}from"./chunk-B7JILYJO.js";import{a as un}from"./chunk-HFFH2WIX.js";import{a as In,b as st}from"./chunk-TK3G2BVM.js";import"./chunk-LR2DJRRL.js";import"./chunk-CSMMP7XG.js";import"./chunk-6TA77CRR.js";import"./chunk-JMLETF7Y.js";import"./chunk-C5GEP4MM.js";import"./chunk-TC43COAE.js";import{a as ae,b as se}from"./chunk-JDW35ZB5.js";import"./chunk-WZO2ZLBL.js";import{a as ot,b as K}from"./chunk-6ZZARVQO.js";import{f as yn,h as $}from"./chunk-35CWG2OK.js";import{b as it,c as ge}from"./chunk-EXVUABTO.js";import{a as Q,b as gn,c as hn,e as xn,f as Cn,g as bn}from"./chunk-4S33ZRKF.js";import{c as We,d as Yt,f as Xt}from"./chunk-4FGQ5T64.js";import{a as Le,f as bt,n as tt,o as nt,p as dn,t as _n,u as yt,w as oe,x as re}from"./chunk-YOEPO6LK.js";import"./chunk-ZWHB7NI7.js";import{$ as on,Ba as ln,E as _t,Ea as cn,J as Jt,Ja as mn,L as en,Ma as Je,N as tn,Na as Ve,Pa as pn,R as Ye,S as Xe,Va as et,X as nn,Y as gt,b as te,c as ne,e as H,ea as rn,f as Ce,g as Qt,ha as an,i as N,j as Qe,k as Wt,l as be,la as sn,o as ye,oa as ht,ra as ie,v as Ie,wa as xt,x as ve,xa as Ct,y as Se}from"./chunk-BNI5KUDE.js";import{a as Zt}from"./chunk-35KDUCM3.js";import"./chunk-3HW557B7.js";import{C as J,E as ee,F as B,M as F,c as Z,e as Ht,f as L,g as ut,h as jt,l as Ut,m as M,n as Oe}from"./chunk-BYD3JK4R.js";import{c as dt,d as ft,f as Fe,h as Ne}from"./chunk-F2X3VGZZ.js";import{Ab as Me,Ac as Kt,Cb as d,D as Ke,Ga as I,Ic as qt,J as qe,Jb as P,Jc as zt,Kb as l,L as Nt,Lc as b,Nb as pe,O as Vt,Ob as Pe,Ub as a,Uc as _e,Vb as r,Vc as xe,Wb as h,X as V,Xb as ue,Xc as U,Yb as de,Yc as Gt,Z as S,_b as w,aa as Lt,ba as he,bb as Ee,c as $e,ca as ze,cb as Dt,dc as v,ec as c,fc as Rt,gb as m,gc as Bt,ha as x,ic as He,jc as fe,kc as z,lc as G,mb as pt,oc as Y,pa as _,pc as p,qa as g,qc as k,rc as ke,s as q,t as Ft,ta as Ae,tc as $t,uc as je,vc as Ue,wb as E,wc as Ze,xb as Ge,xc as X,yc as O,za as W,zc as T}from"./chunk-YVEUYFCE.js";import{a as C,b as y}from"./chunk-YQFG5XE2.js";var Qn=["class","page"],Wn=n=>({id:n}),Yn=n=>["fa-solid",n];function Xn(n,s){if(n&1){let e=w();a(0,"div",4)(1,"a",5),p(2,"Cancel"),r(),a(3,"a",6),h(4,"i",7),p(5," Edit"),r(),a(6,"p-button",8),v("onClick",function(){_(e);let i=c();return g(i.onDelete())}),r(),a(7,"a",9),p(8,"Ledger"),r()()}if(n&2){let e,t=c();m(7),l("queryParams",T(1,Wn,(e=t.COAInfo())==null?null:e.id))}}function Jn(n,s){if(n&1&&h(0,"i",18),n&2){let e=s.checked;l("ngClass",T(1,Yn,e?"fa-check":"fa-xmark"))}}function ei(n,s){if(n&1){let e=w();a(0,"div",11)(1,"div",12)(2,"p-card")(3,"div",13)(4,"div",14)(5,"div",15),p(6,"Name"),r(),a(7,"div",16),p(8),r()(),a(9,"div",14)(10,"div",15),p(11,"Code"),r(),a(12,"div",16),p(13),r()(),a(14,"div",14)(15,"div",15),p(16,"Category"),r(),a(17,"div",16),p(18),r()(),a(19,"div",14)(20,"div",15),p(21,"Note"),r(),a(22,"div",16),p(23),r()(),a(24,"div",14)(25,"div",15),p(26,"Outlet"),r(),a(27,"div",16),p(28),r()(),a(29,"div",14)(30,"div",15),p(31,"Discontinued"),r(),a(32,"div",16)(33,"p-toggleswitch",17),v("onChange",function(i){_(e);let o=c(2);return g(o.onDiscontinued(i))}),d(34,Jn,1,3,"ng-template",null,2,b),r()()()()()()()}if(n&2){let e,t,i,o,u,f=c(2);m(8),k((e=f.COAInfo().name)!==null&&e!==void 0?e:"-"),m(5),k((t=f.COAInfo().code)!==null&&t!==void 0?t:"-"),m(5),k((i=f.COAInfo().category)!==null&&i!==void 0?i:"-"),m(5),k((o=f.COAInfo().note)!==null&&o!==void 0?o:"-"),m(5),k((u=f.COAInfo().outletName)!==null&&u!==void 0?u:"-"),m(5),l("ngModel",f.COAInfo().bin)}}function ti(n,s){if(n&1&&d(0,ei,36,6,"div",10),n&2){let e=c();l("ngIf",e.COAInfo())}}var Dn=(()=>{class n{constructor(){this.#e=x(j),this.#t=x(J),this.router=x(ee),this.COAInfo=I(null),this.checked=I(!1)}#e;#t;ngOnInit(){this.#t.paramMap.pipe(A("params"),V(e=>this.#e.getChartAccountById(e.get("id"))),S(e=>this.COAInfo.set(e)),A("response")).subscribe()}onDelete(){if(!confirm("Are you sure you want to delete this Chart of Accounts?"))return;let t=[this.#t.snapshot.paramMap.get("id")];this.#e.deleteChartAccount(t).pipe(S(()=>{this.router.navigate(["/pages/chart-of-account/account"])})).subscribe()}onDiscontinued(e){this.#e.discountedChartAccounts(this.#t.snapshot.paramMap.get("id"),{Discontinued:e.checked}).subscribe()}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=E({type:n,selectors:[["app-coa-account-info",8,"page"]],attrs:Qn,decls:5,vars:0,consts:[["actionButton",""],["content",""],["handle",""],["pageTitle","Chart of Account Details"],[1,"d-flex","gap-2"],["routerLink","/pages/chart-of-account/account",1,"p-button","p-button-secondary","p-button-outlined"],["routerLink","edit",1,"p-button","p-button-secondary","p-button-outlined"],[1,"fa-solid","fa-pen-to-square"],["label","Delete","icon","fa-solid fa-trash","severity","secondary","variant","outlined",3,"onClick"],["routerLink","/pages/report/general-ledger",1,"p-button",3,"queryParams"],["class","row justify-content-center mt-3",4,"ngIf"],[1,"row","justify-content-center","mt-3"],[1,"col","col-lg-8"],[1,"d-flex","flex-column","row-gap-4"],[1,"row"],[1,"col","col-lg-3"],[1,"col"],[3,"onChange","ngModel"],[3,"ngClass"]],template:function(t,i){t&1&&(a(0,"app-main-panel",3),d(1,Xn,9,3,"ng-template",null,0,b)(3,ti,1,1,"ng-template",null,1,b),r())},dependencies:[M,Z,L,ve,H,Qe,We,F,B,$,K,ot,re,oe,wn,Pn],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return n})();var ce=(()=>{class n{constructor(){this.httpService=x(Zt)}fetchCOACategories(){return this.httpService.get("","api/ChartOfAccount/Category")}getCOACategoryByID(e){let t={params:e};return this.httpService.get("","api/ChartOfAccount/CategoryInfo",t)}renameCategory(e,t){return this.httpService.put("",`api/ChartOfAccount/RenameCategory/${e}`,t)}updateParentCategory(e,t){return this.httpService.put("",`api/ChartOfAccount/UpdateParentCategory/${e}`,t).pipe()}deleteCategory(e){return this.httpService.delete("",`api/ChartOfAccount/Category/${e}`)}submitCategory(e,t={}){return this.httpService.post("","api/ChartOfAccount/SubmitCategory",e,t)}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275prov=he({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})();var vt=n=>n?n.reduce((s,e)=>(s.push({label:e.label,data:e.data,key:e.key}),e.children&&e.children.length?s.push(...vt(e.children)):s.push({label:`${e.label} (no children)`,data:e.data,key:`${e.key}-no-children`}),s),[]):[];var St=(n,s,e)=>{let t=Math.ceil(e/s),i=(n-1)*s+1,o=Math.min(n*s,e);return{start:i,end:o,totalRecords:e,totalPages:t}};var ni={filter:{RowCount:20,PageNumber:1,CategoryID:"",Text:"",listOutletID:[]},options:{entities:[],categories:[]},data:[],count:0,perPages:[{key:20,value:"20 per page"},{key:40,value:"40 per page"},{key:60,value:"60 per page"},{key:80,value:"80 per page"},{key:100,value:"100 per page"}]},wt=gn(Cn(ni),bn("ChartOfAccount"),hn(n=>({isAllChecked:U(()=>n.data().every(s=>s.checked)),checkedItems:U(()=>n.data().filter(s=>s.checked)),IDsChecked:U(()=>n.data().filter(s=>s.checked).map(s=>s.id)),categories:U(()=>vt(n.options.categories())),first:U(()=>{let{start:s}=St(n.filter().PageNumber,n.filter().RowCount,n.count());return s}),last:U(()=>{let{end:s}=St(n.filter().PageNumber,n.filter().RowCount,n.count());return s})})),xn(n=>{let s=x(j),e=x(ce),t={updateFilter(i){Q(n,{filter:C({},i)})},checkedItem(i){if(Array.isArray(i))i.forEach(o=>{let u=n.data().map(f=>f.id===o.id?y(C({},f),{checked:!o.checked}):f);Q(n,{data:u})});else{let o=i,u=n.data().map(f=>f.id===o.id?y(C({},f),{checked:!o.checked}):f);Q(n,{data:u})}},checkAllCheckbox(){let i=n.data().map(o=>y(C({},o),{checked:!o.checked}));Q(n,{data:i})},fetchChartOfAccount:rt($e(Ke(()=>!!n.filter()),Nt(300),Vt(),V(i=>s.getPaginatedChartAccounts(i).pipe(q(o=>y(C({},o),{data:o.data.map(u=>y(C({},u),{checked:!1}))})),at({next:o=>Q(n,{data:o.data,count:o.count}),error:o=>{Q(n,{data:[],count:0}),console.error(o)}}))))),fetchLoader:rt($e(V(()=>s.getChartOfAccountLoader().pipe(at({next:i=>{Q(n,{filter:y(C({},n.filter()),{RowCount:i.filter.rowCount,PageNumber:1,CategoryID:i.filter.categoryID||null,Text:"",listOutletID:[]}),options:i.options}),t.fetchChartOfAccount(n.filter)},error:i=>{console.error(i)}}))))),getCategories:rt($e(qe(()=>e.fetchCOACategories().pipe(at({next:i=>{Q(n,{options:{entities:n.options.entities(),categories:i}})},error:i=>{console.error(i)}})))))};return t}));var ii=["*"],oi=({dt:n})=>`
|
|
2
|
+
.p-buttongroup .p-button {
|
|
3
|
+
margin: 0;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.p-buttongroup .p-button:not(:last-child),
|
|
7
|
+
.p-buttongroup .p-button:not(:last-child):hover {
|
|
8
|
+
border-right: 0 none;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.p-buttongroup .p-button:not(:first-of-type):not(:last-of-type) {
|
|
12
|
+
border-radius: 0;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.p-buttongroup .p-button:first-of-type:not(:only-of-type) {
|
|
16
|
+
border-start-end-radius: 0;
|
|
17
|
+
border-end-end-radius: 0;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.p-buttongroup .p-button:last-of-type:not(:only-of-type) {
|
|
21
|
+
border-start-start-radius: 0;
|
|
22
|
+
border-end-start-radius: 0;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.p-buttongroup .p-button:focus {
|
|
26
|
+
position: relative;
|
|
27
|
+
z-index: 1;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.p-buttongroup {
|
|
31
|
+
display:flex;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.p-buttongroup > .p-button {
|
|
35
|
+
flex: 1;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/* For PrimeNG */
|
|
39
|
+
|
|
40
|
+
.p-buttongroup .p-button:focus,
|
|
41
|
+
.p-buttongroup p-button:focus .p-button,
|
|
42
|
+
.p-buttonset .p-button:focus,
|
|
43
|
+
.p-buttonset .p-button:focus,
|
|
44
|
+
.p-buttonset p-button:focus .p-button,
|
|
45
|
+
.p-buttonset .p-button:focus {
|
|
46
|
+
position: relative;
|
|
47
|
+
z-index: 1;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.p-buttongroup .p-button:not(:last-child),
|
|
51
|
+
.p-buttongroup .p-button:not(:last-child):hover,
|
|
52
|
+
.p-buttongroup p-button:not(:last-child) .p-button,
|
|
53
|
+
.p-buttongroup p-button:not(:last-child) .p-button:hover,
|
|
54
|
+
.p-buttonset .p-button:not(:last-child),
|
|
55
|
+
.p-buttonset .p-button:not(:last-child):hover,
|
|
56
|
+
.p-buttonset p-button:not(:last-child) .p-button,
|
|
57
|
+
.p-buttonset p-button:not(:last-child) .p-button:hover {
|
|
58
|
+
border-right: 0 none;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.p-buttongroup .p-button:not(:first-of-type):not(:last-of-type),
|
|
62
|
+
.p-buttongroup p-button:not(:first-of-type):not(:last-of-type) .p-button,
|
|
63
|
+
.p-buttonset .p-button:not(:first-of-type):not(:last-of-type),
|
|
64
|
+
.p-buttonset p-button:not(:first-of-type):not(:last-of-type) .p-button {
|
|
65
|
+
border-radius: 0;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.p-buttongroup .p-button:first-of-type:not(:only-of-type),
|
|
69
|
+
.p-buttongroup p-button:first-of-type:not(:only-of-type) .p-button,
|
|
70
|
+
.p-buttonset .p-button:first-of-type:not(:only-of-type),
|
|
71
|
+
.p-buttonset p-button:first-of-type:not(:only-of-type) .p-button {
|
|
72
|
+
border-start-end-radius: 0;
|
|
73
|
+
border-end-end-radius: 0;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.p-buttongroup .p-button:last-of-type:not(:only-of-type),
|
|
77
|
+
.p-buttongroup p-button:last-of-type:not(:only-of-type) .p-button,
|
|
78
|
+
.p-buttonset .p-button:last-of-type:not(:only-of-type),
|
|
79
|
+
.p-buttonset p-button:last-of-type:not(:only-of-type) .p-button {
|
|
80
|
+
border-start-start-radius: 0;
|
|
81
|
+
border-end-start-radius: 0;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
p-button[iconpos='right'] spinnericon {
|
|
85
|
+
order: 1;
|
|
86
|
+
}
|
|
87
|
+
`,ri={root:"p-buttongroup p-component"},Rn=(()=>{class n extends et{name="buttongroup";theme=oi;classes=ri;static \u0275fac=(()=>{let e;return function(i){return(e||(e=Ae(n)))(i||n)}})();static \u0275prov=he({token:n,factory:n.\u0275fac})}return n})();var ai=(()=>{class n extends Le{_componentStyle=x(Rn);static \u0275fac=(()=>{let e;return function(i){return(e||(e=Ae(n)))(i||n)}})();static \u0275cmp=E({type:n,selectors:[["p-buttonGroup"],["p-buttongroup"],["p-button-group"]],features:[X([Rn]),Me],ngContentSelectors:ii,decls:2,vars:0,consts:[["role","group",1,"p-buttongroup","p-component"]],template:function(t,i){t&1&&(Rt(),a(0,"span",0),Bt(1),r())},dependencies:[M],encapsulation:2,changeDetection:0})}return n})(),Bn=(()=>{class n{static \u0275fac=function(t){return new(t||n)};static \u0275mod=Ge({type:n});static \u0275inj=ze({imports:[ai]})}return n})();var li=["class","page"],ci=()=>["import"],mi=()=>({height:"calc(100vh - 70px)"}),pi=n=>["../account/",n],ui=()=>["/pages/report/general-ledger"],di=n=>({id:n}),fi=()=>({width:"100%"}),_i=()=>({scrollHeight:"200px"});function gi(n,s){if(n&1){let e=w();a(0,"p-button",16),v("onClick",function(){_(e);let i=c(2);return g(i.deleteCOA())}),r()}}function hi(n,s){if(n&1){let e=w();a(0,"div",8),d(1,gi,1,0,"p-button",9),a(2,"a",10),h(3,"i",11),a(4,"span",12),p(5,"Import"),r()(),a(6,"p-button",13),v("onClick",function(){_(e);let i=c();return g(i.onExport())}),r(),a(7,"a",14),h(8,"i",15),p(9," Add"),r()()}if(n&2){let e=c();m(),l("ngIf",e.store.checkedItems().length),m(),l("routerLink",O(2,ci))}}function xi(n,s){n&1&&(a(0,"tr")(1,"th",18),h(2,"p-tableHeaderCheckbox"),r(),a(3,"th"),p(4,"Code"),r(),a(5,"th"),p(6,"Name"),r(),a(7,"th"),p(8,"Category"),r(),a(9,"th"),p(10,"Outlet"),r(),a(11,"th",19),p(12,"Balance"),r()())}function Ci(n,s){if(n&1&&(a(0,"tr")(1,"td"),h(2,"p-tableCheckbox",20),r(),a(3,"td"),p(4),r(),a(5,"td")(6,"a",21),p(7),r()(),a(8,"td"),p(9),r(),a(10,"td"),p(11),r(),a(12,"td",19)(13,"a",22),p(14),qt(15,"number"),r()()()),n&2){let e,t=s.$implicit;m(2),l("value",t),m(2),k(t.code),m(2),l("routerLink",T(11,pi,t.id)),m(),k(t.name),m(2),k(t.category),m(2),k(t.outletName),m(2),l("routerLink",O(13,ui))("queryParams",T(14,di,t.id)),m(),k(zt(15,9,(e=t.balance)!==null&&e!==void 0?e:0))}}function bi(n,s){if(n&1&&p(0),n&2){let e=c(2);$t(" Showing ",e.store.first()," to ",e.store.last()," of ",e.store.count()," entries ")}}function yi(n,s){n&1&&(a(0,"tr")(1,"td",23)(2,"span"),p(3,"No records found."),r()()())}function Ii(n,s){if(n&1){let e=w();a(0,"p-panel")(1,"p-table",17),v("onLazyLoad",function(i){_(e);let o=c();return g(o.loadData(i))})("onRowSelect",function(i){_(e);let o=c();return g(o.onRowSelect(i))})("onRowUnselect",function(i){_(e);let o=c();return g(o.onRowUnselect(i))})("onHeaderCheckboxToggle",function(i){_(e);let o=c();return g(o.onSelectAll(i))})("onPage",function(i){_(e);let o=c();return g(o.onPageChange(i))}),d(2,xi,13,0,"ng-template",null,3,b)(4,Ci,16,16,"ng-template",null,4,b)(6,bi,1,3,"ng-template",null,5,b)(8,yi,4,0,"ng-template",null,6,b),r()()}if(n&2){let e=c();pe(O(9,mi)),m(),l("lazy",!0)("value",e.store.data())("paginator",!0)("rows",e.store.filter().RowCount)("totalRecords",e.store.count())("scrollable",!0)("scrollHeight","calc(100vh - 142px)")}}function vi(n,s){if(n&1){let e=w();a(0,"form",25)(1,"div",26)(2,"label",27),p(3,"Outlet"),r(),h(4,"p-multiselect",28),r(),a(5,"div",26)(6,"label",27),p(7,"Category"),r(),a(8,"p-treeselect",29),v("onFocus",function(){_(e);let i=c(2);return g(i.onCategoryFocus())}),r()(),a(9,"div",30)(10,"label",27),p(11,"Page Size"),r(),h(12,"input",31),r()()}if(n&2){let e=c(2);l("formGroup",e.formFilter),m(4),l("showClear",!0)("virtualScroll",!0)("virtualScrollItemSize",50)("options",e.store.options().entities),m(4),pe(O(12,fi)),l("showClear",!0)("virtualScroll",!0)("virtualScrollItemSize",50)("virtualScrollOptions",O(13,_i))("options",e.categoryNodes())}}function Si(n,s){if(n&1&&d(0,vi,13,14,"form",24),n&2){let e=c();l("ngIf",e.formFilter)}}var Kn=(()=>{class n{ngOnInit(){this.store.fetchLoader(),console.log(this.store.filter().RowCount),this.generateFilterForm()}#e;constructor(){this.routeInfo=qn,this.store=x(wt),this.#e=x(j),this.modalService=x(Yt),this.dialogVisible=I(!1),this.categoryNodes=I([]),this.fb=x(Ie),this.isDialogFilterVisible=I(!1),this.generateFilterForm()}generateFilterForm(){this.formFilter=this.fb.group({outletID:this.fb.control([]),categoryID:this.fb.control(null),pageSize:this.fb.control(this.store.filter().RowCount)})}onPageChange(e){console.log("Page changed to: ",e),this.store.updateFilter(y(C({},this.store.filter()),{PageNumber:e.first/e.rows+1}))}onCategoryFocus(){this.#e.getCachedCategoriesOptions().pipe(S(e=>this.categoryNodes.set(e))).subscribe()}onRowSelect(e){console.log("Row select event: ",e),this.store.checkedItem(e.data)}onRowUnselect(e){console.log("Row unselect event: ",e),this.store.checkedItem(e.data)}onSelectAll(e){console.log("Select all event: ",e),this.store.checkAllCheckbox()}loadData(e){console.log("Lazy load event: ",e)}onSearch(e){console.log("Search text: ",e),this.store.updateFilter(y(C({},this.store.filter()),{Text:e}))}updateFilter(e,t){this.store.updateFilter(y(C({},this.store.filter()),{[e]:t}))}checkAllCheckBox(){this.store.checkAllCheckbox()}checkedItem(e){this.store.checkedItem(e)}deleteCOA(){confirm("Are you sure you want to delete selected Chart of Accounts?")&&this.#e.deleteChartAccount(this.store.IDsChecked()).pipe(A("response"),S(e=>{console.log("Delete COA Response: ",e),this.store.updateFilter(C({},this.store.filter()))})).subscribe()}onSearchEvent(e){this.store.updateFilter(y(C({},this.store.filter()),{Text:e.trim()}))}onFilterEvent(){this.dialogVisible.update(e=>!e)}onFilterOKEvent(){let{categoryID:e,pageSize:t,outletID:i}=this.formFilter.value;this.store.updateFilter(y(C({},this.store.filter()),{listOutletID:i,CategoryID:e?e.key:"",RowCount:+t})),this.isDialogFilterVisible.update(o=>!o)}onExport(){let e=y(C({},this.store.filter()),{ExportPageNumber:1,ExportRowCount:1e4});this.#e.exportChartOfAccounts(e).pipe(A("Export COA Response"),S(t=>{t&&Nn(t,`ChartOfAccount_${new Date().toISOString()}.xlsx`,"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet")})).subscribe()}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=E({type:n,selectors:[["app-cash-of-account",8,"page"]],features:[X([wt])],attrs:li,decls:7,vars:3,consts:[["actionButton",""],["content",""],["filters",""],["header",""],["body",""],["paginatorleft",""],["emptymessage",""],["pageTitle","Chart of Account",3,"search","isDialogFilterVisibleChange","filterEmitted","filterConfirmed","isSearchableInput","isDialogFilterVisible","isFilterable"],[1,"d-flex","gap-2"],["icon","fa-solid fa-trash","label","Delete","severity","danger",3,"onClick",4,"ngIf"],[1,"p-button","p-button-outlined","p-button-secondary",3,"routerLink"],[1,"fa-solid","fa-upload"],[1,"fs-3"],["severity","secondary","label","Export","icon","fa-solid fa-download","styleClass","","variant","outlined",3,"onClick"],["routerLink","add",1,"p-button"],[1,"fa-solid","fa-plus"],["icon","fa-solid fa-trash","label","Delete","severity","danger",3,"onClick"],["dataKey","id","styleClass","d-flex flex-column justify-content-between h-100",1,"",3,"onLazyLoad","onRowSelect","onRowUnselect","onHeaderCheckboxToggle","onPage","lazy","value","paginator","rows","totalRecords","scrollable","scrollHeight"],[2,"width","4rem"],[1,"text-end"],[3,"value"],[1,"link-primary",3,"routerLink"],[1,"link","link-primary",3,"routerLink","queryParams"],["colspan","6"],["class","d-flex flex-column row-gap-3",3,"formGroup",4,"ngIf"],[1,"d-flex","flex-column","row-gap-3",3,"formGroup"],[1,"d-flex","flex-column","position-relative"],["for",""],["appendTo","body","formControlName","outletID","optionLabel","name","optionValue","id","placeholder","Select an Outlet",3,"showClear","virtualScroll","virtualScrollItemSize","options"],["containerStyleClass","w-100","filter","","filterBy","label","appendTo","body","formControlName","categoryID","optionLabel","label","optionValue","key","placeholder","Select a Category",1,"w-100",3,"onFocus","showClear","virtualScroll","virtualScrollItemSize","virtualScrollOptions","options"],[1,"d-flex","flex-column"],["formControlName","pageSize","type","text","pInputText",""]],template:function(t,i){if(t&1){let o=w();a(0,"app-main-panel",7),v("search",function(f){return _(o),g(i.onSearchEvent(f))}),Ze("isDialogFilterVisibleChange",function(f){return _(o),Ue(i.isDialogFilterVisible,f)||(i.isDialogFilterVisible=f),g(f)}),v("filterEmitted",function(){return _(o),g(i.onFilterEvent())})("filterConfirmed",function(){return _(o),g(i.onFilterOKEvent())}),d(1,hi,10,3,"ng-template",null,0,b)(3,Ii,10,10,"ng-template",null,1,b)(5,Si,1,1,"ng-template",null,2,b),r()}t&2&&(l("isSearchableInput",!0),je("isDialogFilterVisible",i.isDialogFilterVisible),l("isFilterable",!0))},dependencies:[M,L,Ut,$,Xt,Bn,lt,ve,Wt,te,H,Ce,F,B,Se,be,ye,We,Mn,Tn,An,En,K,yn,re,oe,st,nt,tt,ge,On,kn,Te,we,se,ae],styles:[".p-card{height:100%} .p-card .p-card-body{height:inherit} .p-card .p-card-body .p-card-content{height:inherit}"],changeDetection:0})}}return n})();var Ti=["class","page"],Ai=()=>["../../"],At=n=>({"ng-invalid ng-dirty":n}),Ei=n=>({"ng-dirty ng-invalid":n});function Mi(n,s){if(n&1){let e=w();a(0,"div",5)(1,"a",6),p(2,"Cancel"),r(),a(3,"p-button",7),v("onClick",function(){_(e);let i=c();return g(i.onSubmit())}),r()()}n&2&&(m(),l("routerLink",O(1,Ai)))}function Pi(n,s){n&1&&(a(0,"div",26),p(1," Name is required "),r())}function ki(n,s){if(n&1&&(a(0,"div"),d(1,Pi,2,0,"div",25),r()),n&2){let e=c(2);m(),l("ngIf",e.form.controls.Name.errors.required)}}function Oi(n,s){n&1&&(a(0,"div",27)(1,"p"),p(2," If you assign an outlet for this product, it is only visible for users who has access to that outlet. "),r()())}function Fi(n,s){if(n&1&&(a(0,"span",28),p(1),r()),n&2){let e=s.$implicit;l("pTooltip",e.name),m(),ke(" ",e.name," ")}}function Ni(n,s){n&1&&(a(0,"div",26),p(1," Code is required "),r())}function Vi(n,s){if(n&1&&(a(0,"div"),d(1,Ni,2,0,"div",25),r()),n&2){let e=c(2);m(),l("ngIf",e.form.controls.Code.errors.required)}}function Li(n,s){n&1&&(a(0,"div",26),p(1," Category is required "),r())}function Di(n,s){if(n&1&&(a(0,"div"),d(1,Li,2,0,"div",25),r()),n&2){let e=c(2);m(),l("ngIf",e.form.controls.Category.errors.required)}}function Ri(n,s){n&1&&(a(0,"div",26),p(1," Note is required "),r())}function Bi(n,s){if(n&1&&(a(0,"div"),d(1,Ri,2,0,"div",25),r()),n&2){let e=c(2);m(),l("ngIf",e.form.controls.Note.errors.required)}}function $i(n,s){n&1&&(a(0,"div",26),p(1," Note is required "),r())}function Ki(n,s){if(n&1&&(a(0,"div"),d(1,$i,2,0,"div",25),r()),n&2){let e=c(3);m(),l("ngIf",e.form.controls.Note.errors.required)}}function qi(n,s){if(n&1&&(a(0,"div",12)(1,"div",13)(2,"label",14),p(3,"Discontinued"),r(),a(4,"div",29)(5,"div",30),h(6,"p-radiobutton",31),a(7,"label",32),p(8,"No"),r()(),a(9,"div",30),h(10,"p-radiobutton",33),a(11,"label",34),p(12,"Yes"),r()()(),d(13,Ki,2,1,"div",16),r()()),n&2){let e=c(2);m(6),l("value",!1),m(4),l("value",!0),m(3),l("ngIf",e.form.controls.Note.errors)}}function zi(n,s){if(n&1&&(a(0,"p-panel",8)(1,"div",9)(2,"div",10)(3,"div",11)(4,"div",12)(5,"div",13)(6,"label",14),p(7,"Name"),r(),h(8,"input",15),d(9,ki,2,1,"div",16),r()(),a(10,"div",12)(11,"div",13)(12,"div")(13,"label",14),p(14,"Outlet"),r(),h(15,"p-button",17),d(16,Oi,3,0,"ng-template",null,2,b),r(),a(18,"p-select",18),d(19,Fi,2,2,"ng-template",null,3,b),r()()(),a(21,"div",12)(22,"div",13)(23,"label",14),p(24,"Code"),r(),h(25,"input",19),d(26,Vi,2,1,"div",16),r()(),a(27,"div",20)(28,"div",21)(29,"label",14),p(30,"Category"),r(),h(31,"p-treeselect",22),d(32,Di,2,1,"div",16),r()(),a(33,"div",12)(34,"div",13)(35,"label",14),p(36,"Note"),r(),h(37,"textarea",23),d(38,Bi,2,1,"div",16),r()(),d(39,qi,14,3,"div",24),r()()()()),n&2){let e=Y(17),t=c();m(),l("formGroup",t.form),m(7),l("ngClass",T(15,At,t.form.controls.Name.invalid&&(t.form.controls.Name.dirty||t.form.controls.Name.touched))),m(),l("ngIf",t.form.controls.Name.invalid&&(t.form.controls.Name.dirty||t.form.controls.Name.touched)),m(6),l("pTooltip",e)("rounded",!0)("text",!0),m(3),l("options",t.outlets()),m(7),l("ngClass",T(17,At,t.form.controls.Code.invalid&&(t.form.controls.Code.dirty||t.form.controls.Code.touched))),m(),l("ngIf",t.form.controls.Code.invalid&&(t.form.controls.Code.dirty||t.form.controls.Code.touched)),m(5),l("options",t.categoryOptions())("ngClass",T(19,Ei,t.form.controls.Category.invalid&&(t.form.controls.Category.dirty||t.form.controls.Category.touched))),m(),l("ngIf",t.form.controls.Category.invalid&&(t.form.controls.Category.dirty||t.form.controls.Category.touched)),m(5),l("ngClass",T(21,At,t.form.controls.Note.invalid&&(t.form.controls.Note.dirty||t.form.controls.Note.touched))),m(),l("ngIf",t.form.controls.Note.errors),m(),l("ngIf",t.hasIdParam)}}var Et=(()=>{class n{constructor(){this.route=x(J),this.coa_service=x(j),this.coa_info=I(null),this.fb=x(Ie),this.isEdit=I(!1),this.categoryOptions=I([]),this.router=x(ee),this.outlets=U(()=>this.coa_info()?this.coa_info().options.entities:[])}findParenChilds(e,t){function i(o,u=null){for(let f of o){if(f.key===t)return{parent:u,child:f};if(f.children){let D=i(f.children,f);if(D)return D}}return null}return i(e)}generateForm(e){this.form=this.fb.group({ID:new N(e.id||""),Name:new N(e.name||"",[ne.required]),Code:new N(e.code||"",[ne.required]),Note:new N(e.note||"",[]),Balance:new N(e.balance||0),Outlet:new N(e.outletID||""),AccessType:new N(e.accessTypeID||0),Category:new N(null,[ne.required]),Bin:new N(e.bin||!1)})}ngOnInit(){this.generateForm({id:"",name:"",code:"",note:"",balance:0,outletID:"",accessTypeID:0,categoryID:null,bin:!1}),this.fetchLoader(),this.fetchCategoryOptions()}fetchLoader(){this.route.paramMap.pipe(qe(e=>{if(e.has("id")){this.isEdit.set(!0);let t=e.get("id");return this.coa_service.getChartAccountFormById(t)}else return this.coa_service.getChartAccountForm()}),A("response"),q(e=>y(C({},e),{form:y(C({},e.form),{categoryID:e.form.categoryID==="00000000-0000-0000-0000-000000000000"?"":e.form.categoryID})})),S(e=>{this.coa_info.set(e),this.generateForm(e.form)})).subscribe()}get hasIdParam(){return this.route.snapshot.paramMap.has("id")}onSubmit(){if(this.form.invalid){this.form.markAllAsTouched();return}let{AccessType:e,Balance:t,Category:i,Code:o,Name:u,Note:f,Outlet:D}=this.form.value,R;this.hasIdParam?R={id:this.coa_info().form.id,categoryID:i.key,name:u,bin:this.form.value.Bin||!1,code:o,note:f,outletID:D||null,balance:t,accessTypeID:e}:R={id:this.coa_info().form.id,categoryID:i.key,bin:this.form.value.Bin||!1,name:u,code:o,note:f,outletID:D||null,balance:t,accessTypeID:e},this.hasIdParam?this.coa_service.submitChartAccount(R).pipe(A("submitChartAccount"),S(()=>{this.form.reset(),this.router.navigate(["/pages/chart-of-account/account"])})).subscribe():this.coa_service.submitChartAccount(R).pipe(A("submitChartAccount"),S(()=>{this.form.reset(),this.router.navigate(["/pages/chart-of-account/account"])})).subscribe()}fetchCategoryOptions(){this.coa_service.fetchCategoryOptions().pipe(A("response"),S(e=>{this.categoryOptions.set(e);let t=this.findParenChilds(this.categoryOptions(),this.coa_info()?.form?.categoryID);this.form.controls.Category.setValue(t?.child)})).subscribe()}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=E({type:n,selectors:[["app-coa-account-form",8,"page"]],attrs:Ti,decls:5,vars:1,consts:[["actionButton",""],["content",""],["tooltipContent",""],["item",""],["pageTitle","Chart Of Account Form",3,"hasMainWrapperPadding"],[1,"d-flex","gap-2"],["type","button",1,"p-button","p-button-secondary","p-button-outlined",3,"routerLink"],["label","Submit",3,"onClick"],["styleClass","rounded-2"],[1,"row","justify-content-center",3,"formGroup"],[1,"col"],[1,"row","row-gap-2"],[1,"col","col-lg-6"],[1,"d-flex","flex-column"],["for",""],["size","small","formControlName","Name","type","text","pInputText","",3,"ngClass"],[4,"ngIf"],["icon","fa-solid fa-circle-info",3,"pTooltip","rounded","text"],["appendTo","body","formControlName","Outlet","optionLabel","name","optionValue","id","placeholder","Select Outlet",3,"options"],["size","small","formControlName","Code","type","text","pInputText","",3,"ngClass"],[1,"co","col-lg-6"],[1,"form-group","d-flex","flex-column"],["formControlName","Category","containerStyleClass","w-full","placeholder","Select a Category",1,"w-full",3,"options","ngClass"],["pSize","small","rows","5","cols","30","pTextarea","","formControlName","Note",3,"ngClass"],["class","col col-lg-6",4,"ngIf"],["class","invalid-feedback text-danger d-block",4,"ngIf"],[1,"invalid-feedback","text-danger","d-block"],[1,"flex","items-center"],[1,"d-inline-block","text-truncate",2,"max-width","200px",3,"pTooltip"],[1,"d-flex","flex-wrap","gap-4"],[1,"d-flex","align-items-center","gap-2"],["name","Bin","formControlName","Bin","inputId","ingredient1",3,"value"],["for","ingredient1",1,"m-0"],["name","Bin","formControlName","Bin","inputId","ingredient2",3,"value"],["for","ingredient2",1,"m-0"]],template:function(t,i){t&1&&(a(0,"app-main-panel",4),d(1,Mi,4,2,"ng-template",null,0,b)(3,zi,40,23,"ng-template",null,1,b),r()),t&2&&l("hasMainWrapperPadding",!0)},dependencies:[$,Se,te,H,Ce,be,ye,lt,M,Z,L,F,B,Te,we,K,nt,tt,Ln,Vn,st,In,ge,it,re,oe,se,ae,Sn,vn],styles:["[_nghost-%COMP%]{display:block}[_nghost-%COMP%] .p-treeselect{width:100%!important}"],changeDetection:0})}}return n})();var Hi=["sublist"],ji=(n,s)=>({"p-contextmenu-submenu":n,"p-contextmenu-root-list":s}),Ui=()=>({"p-contextmenu-item-link":!0}),Gn=()=>({class:"p-contextmenu-submenu-icon"}),Zi=()=>({exact:!1}),Qi=n=>({"p-contextmenu-item-link":!0,"p-disabled":n}),Wi=n=>({$implicit:n});function Yi(n,s){if(n&1&&h(0,"li",8),n&2){let e=c().$implicit,t=c(2);pe(t.getItemProp(e,"style")),l("ngClass",t.getSeparatorItemClass(e)),P("id",t.getItemId(e))("data-pc-section","separator")}}function Xi(n,s){if(n&1&&h(0,"span",19),n&2){let e=c(4).$implicit,t=c(2);l("ngClass",t.getItemProp(e,"icon"))("ngStyle",t.getItemProp(e,"iconStyle")),P("data-pc-section","icon")("aria-hidden",!0)("tabindex",-1)}}function Ji(n,s){if(n&1&&(a(0,"span",20),p(1),r()),n&2){let e=c(4).$implicit,t=c(2);P("data-pc-section","label"),m(),ke(" ",t.getItemLabel(e)," ")}}function eo(n,s){if(n&1&&h(0,"span",21),n&2){let e=c(4).$implicit,t=c(2);l("innerHTML",t.getItemLabel(e),Ee),P("data-pc-section","label")}}function to(n,s){if(n&1&&h(0,"p-badge",22),n&2){let e=c(4).$implicit,t=c(2);l("styleClass",t.getItemProp(e,"badgeStyleClass"))("value",t.getItemProp(e,"badge"))}}function no(n,s){n&1&&h(0,"AngleRightIcon"),n&2&&(Pe("p-contextmenu-submenu-icon"),P("data-pc-section","submenuicon")("aria-hidden",!0))}function io(n,s){}function oo(n,s){n&1&&d(0,io,0,0,"ng-template",25),n&2&&l("data-pc-section","submenuicon")("aria-hidden",!0)}function ro(n,s){if(n&1&&(ue(0),d(1,no,1,4,"AngleRightIcon",23)(2,oo,1,2,null,24),de()),n&2){let e=c(6);m(),l("ngIf",!e.contextMenu.submenuIconTemplate&&!e.contextMenu._submenuIconTemplate),m(),l("ngTemplateOutlet",e.contextMenu.submenuIconTemplate||e.contextMenu._submenuIconTemplate)("ngTemplateOutletContext",O(3,Gn))}}function ao(n,s){if(n&1&&(a(0,"a",15),d(1,Xi,1,5,"span",16)(2,Ji,2,2,"span",17)(3,eo,1,2,"ng-template",null,2,b)(5,to,1,2,"p-badge",18)(6,ro,3,4,"ng-container",11),r()),n&2){let e=Y(4),t=c(3).$implicit,i=c(2);l("target",i.getItemProp(t,"target"))("ngClass",O(12,Ui)),P("href",i.getItemProp(t,"url"),Dt)("aria-hidden",!0)("data-automationid",i.getItemProp(t,"automationId"))("data-pc-section","action")("tabindex",-1),m(),l("ngIf",i.getItemProp(t,"icon")),m(),l("ngIf",i.getItemProp(t,"escape"))("ngIfElse",e),m(3),l("ngIf",i.getItemProp(t,"badge")),m(),l("ngIf",i.isItemGroup(t))}}function so(n,s){if(n&1&&h(0,"span",19),n&2){let e=c(4).$implicit,t=c(2);l("ngClass",t.getItemProp(e,"icon"))("ngStyle",t.getItemProp(e,"iconStyle")),P("data-pc-section","icon")("aria-hidden",!0)("tabindex",-1)}}function lo(n,s){if(n&1&&(a(0,"span",20),p(1),r()),n&2){let e=c(4).$implicit,t=c(2);P("data-pc-section","label"),m(),ke(" ",t.getItemLabel(e)," ")}}function co(n,s){if(n&1&&h(0,"span",21),n&2){let e=c(4).$implicit,t=c(2);l("innerHTML",t.getItemLabel(e),Ee),P("data-pc-section","label")}}function mo(n,s){if(n&1&&h(0,"p-badge",22),n&2){let e=c(4).$implicit,t=c(2);l("styleClass",t.getItemProp(e,"badgeStyleClass"))("value",t.getItemProp(e,"badge"))}}function po(n,s){n&1&&h(0,"AngleRightIcon"),n&2&&(Pe("p-contextmenu-submenu-icon"),P("data-pc-section","submenuicon")("aria-hidden",!0))}function uo(n,s){}function fo(n,s){n&1&&d(0,uo,0,0,"ng-template",25),n&2&&l("data-pc-section","submenuicon")("aria-hidden",!0)}function _o(n,s){if(n&1&&(ue(0),d(1,po,1,4,"AngleRightIcon",23)(2,fo,1,2,null,24),de()),n&2){let e=c(6);m(),l("ngIf",!e.contextMenu.submenuIconTemplate&&!e.contextMenu._submenuIconTemplate),m(),l("ngTemplateOutlet",!e.contextMenu.submenuIconTemplate||!e.contextMenu._submenuIconTemplate)("ngTemplateOutletContext",O(3,Gn))}}function go(n,s){if(n&1&&(a(0,"a",26),d(1,so,1,5,"span",16)(2,lo,2,2,"span",17)(3,co,1,2,"ng-template",null,2,b)(5,mo,1,2,"p-badge",18)(6,_o,3,4,"ng-container",11),r()),n&2){let e=Y(4),t=c(3).$implicit,i=c(2);l("routerLink",i.getItemProp(t,"routerLink"))("queryParams",i.getItemProp(t,"queryParams"))("routerLinkActiveOptions",i.getItemProp(t,"routerLinkActiveOptions")||O(20,Zi))("target",i.getItemProp(t,"target"))("ngClass",T(21,Qi,i.getItemProp(t,"disabled")))("fragment",i.getItemProp(t,"fragment"))("queryParamsHandling",i.getItemProp(t,"queryParamsHandling"))("preserveFragment",i.getItemProp(t,"preserveFragment"))("skipLocationChange",i.getItemProp(t,"skipLocationChange"))("replaceUrl",i.getItemProp(t,"replaceUrl"))("state",i.getItemProp(t,"state")),P("data-automationid",i.getItemProp(t,"automationId"))("tabindex",-1)("aria-hidden",!0)("data-pc-section","action"),m(),l("ngIf",i.getItemProp(t,"icon")),m(),l("ngIf",i.getItemProp(t,"escape"))("ngIfElse",e),m(3),l("ngIf",i.getItemProp(t,"badge")),m(),l("ngIf",i.isItemGroup(t))}}function ho(n,s){if(n&1&&(ue(0),d(1,ao,7,13,"a",13)(2,go,7,23,"a",14),de()),n&2){let e=c(2).$implicit,t=c(2);m(),l("ngIf",!t.getItemProp(e,"routerLink")),m(),l("ngIf",t.getItemProp(e,"routerLink"))}}function xo(n,s){}function Co(n,s){n&1&&d(0,xo,0,0,"ng-template")}function bo(n,s){if(n&1&&(ue(0),d(1,Co,1,0,null,24),de()),n&2){let e=c(2).$implicit,t=c(2);m(),l("ngTemplateOutlet",t.itemTemplate)("ngTemplateOutletContext",T(2,Wi,e.item))}}function yo(n,s){if(n&1){let e=w();a(0,"p-contextmenu-sub",27),v("itemClick",function(i){_(e);let o=c(4);return g(o.itemClick.emit(i))})("itemMouseEnter",function(i){_(e);let o=c(4);return g(o.onItemMouseEnter(i))}),r()}if(n&2){let e=c(2).$implicit,t=c(2);l("items",e.items)("itemTemplate",t.itemTemplate)("menuId",t.menuId)("visible",t.isItemActive(e)&&t.isItemGroup(e))("activeItemPath",t.activeItemPath)("focusedItemId",t.focusedItemId)("level",t.level+1)}}function Io(n,s){if(n&1){let e=w();a(0,"li",9,1)(2,"div",10),v("click",function(i){_(e);let o=c().$implicit,u=c(2);return g(u.onItemClick(i,o))})("mouseenter",function(i){_(e);let o=c().$implicit,u=c(2);return g(u.onItemMouseEnter({$event:i,processedItem:o}))}),d(3,ho,3,2,"ng-container",11)(4,bo,2,4,"ng-container",11),r(),d(5,yo,1,7,"p-contextmenu-sub",12),r()}if(n&2){let e=c(),t=e.$implicit,i=e.index,o=c(2);Pe(o.getItemProp(t,"styleClass")),l("ngStyle",o.getItemProp(t,"style"))("ngClass",o.getItemClass(t))("tooltipOptions",o.getItemProp(t,"tooltipOptions")),P("id",o.getItemId(t))("data-pc-section","menuitem")("data-p-highlight",o.isItemActive(t))("data-p-focused",o.isItemFocused(t))("data-p-disabled",o.isItemDisabled(t))("aria-label",o.getItemLabel(t))("aria-disabled",o.isItemDisabled(t)||void 0)("aria-haspopup",o.isItemGroup(t)&&!o.getItemProp(t,"to")?"menu":void 0)("aria-expanded",o.isItemGroup(t)?o.isItemActive(t):void 0)("aria-level",o.level+1)("aria-setsize",o.getAriaSetSize())("aria-posinset",o.getAriaPosInset(i)),m(2),P("data-pc-section","content"),m(),l("ngIf",!o.itemTemplate),m(),l("ngIf",o.itemTemplate),m(),l("ngIf",o.isItemVisible(t)&&o.isItemGroup(t))}}function vo(n,s){if(n&1&&d(0,Yi,1,5,"li",6)(1,Io,6,21,"li",7),n&2){let e=s.$implicit,t=c(2);l("ngIf",t.isItemVisible(e)&&t.getItemProp(e,"separator")),m(),l("ngIf",t.isItemVisible(e)&&!t.getItemProp(e,"separator"))}}function So(n,s){if(n&1){let e=w();a(0,"ul",4,0),v("@overlayAnimation.start",function(i){_(e);let o=Y(1),u=c();return g(u.onEnter(i,o))})("keydown",function(i){_(e);let o=c();return g(o.menuKeydown.emit(i))})("focus",function(i){_(e);let o=c();return g(o.menuFocus.emit(i))})("blur",function(i){_(e);let o=c();return g(o.menuBlur.emit(i))}),d(2,vo,2,2,"ng-template",5),r()}if(n&2){let e=c();l("ngClass",Kt(10,ji,!e.root,e.root))("@overlayAnimation",e.visible)("tabindex",e.tabindex),P("id",e.menuId+"_list")("aria-label",e.ariaLabel)("aria-labelledBy",e.ariaLabelledBy)("aria-activedescendant",e.focusedItemId)("aria-orientation","vertical")("data-pc-section","menu"),m(2),l("ngForOf",e.items)}}var wo=["item"],To=["submenuicon"],Ao=["rootmenu"],Eo=["container"],Mo=n=>({"p-contextmenu p-component":!0,"p-contextmenu-mobile":n}),Po=()=>({value:"visible"});function ko(n,s){if(n&1){let e=w();a(0,"div",3,0),v("@overlayAnimation.start",function(i){_(e);let o=c();return g(o.onOverlayAnimationStart(i))})("@overlayAnimation.done",function(i){_(e);let o=c();return g(o.onOverlayAnimationEnd(i))}),a(2,"p-contextmenu-sub",4,1),v("itemClick",function(i){_(e);let o=c();return g(o.onItemClick(i))})("menuFocus",function(i){_(e);let o=c();return g(o.onMenuFocus(i))})("menuBlur",function(i){_(e);let o=c();return g(o.onMenuBlur(i))})("menuKeydown",function(i){_(e);let o=c();return g(o.onKeyDown(i))})("itemMouseEnter",function(i){_(e);let o=c();return g(o.onItemMouseEnter(i))}),r()()}if(n&2){let e=c();Pe(e.styleClass),l("ngClass",T(20,Mo,e.queryMatches))("ngStyle",e.style)("@overlayAnimation",O(22,Po)),P("data-pc-section","root")("data-pc-name","contextmenu")("id",e.id),m(2),l("root",!0)("items",e.processedItems)("itemTemplate",e.itemTemplate||e._itemTemplate)("menuId",e.id)("tabindex",e.disabled?-1:e.tabindex)("ariaLabel",e.ariaLabel)("ariaLabelledBy",e.ariaLabelledBy)("baseZIndex",e.baseZIndex)("autoZIndex",e.autoZIndex)("visible",e.submenuVisible())("focusedItemId",e.focused?e.focusedItemId:void 0)("activeItemPath",e.activeItemPath())}}var Oo=({dt:n})=>`
|
|
88
|
+
.p-contextmenu {
|
|
89
|
+
position: absolute;
|
|
90
|
+
background: ${n("contextmenu.background")};
|
|
91
|
+
color: ${n("contextmenu.color")};
|
|
92
|
+
border: 1px solid ${n("contextmenu.border.color")};
|
|
93
|
+
border-radius: ${n("contextmenu.border.radius")};
|
|
94
|
+
box-shadow: ${n("contextmenu.shadow")};
|
|
95
|
+
min-width: 12.5rem;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.p-contextmenu-root-list,
|
|
99
|
+
.p-contextmenu-submenu {
|
|
100
|
+
margin: 0;
|
|
101
|
+
padding: ${n("contextmenu.list.padding")};
|
|
102
|
+
list-style: none;
|
|
103
|
+
outline: 0 none;
|
|
104
|
+
display: flex;
|
|
105
|
+
flex-direction: column;
|
|
106
|
+
gap: ${n("contextmenu.list.gap")};
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.p-contextmenu-submenu {
|
|
110
|
+
position: absolute;
|
|
111
|
+
display: flex;
|
|
112
|
+
flex-direction: column;
|
|
113
|
+
min-width: 100%;
|
|
114
|
+
z-index: 1;
|
|
115
|
+
background: ${n("contextmenu.background")};
|
|
116
|
+
color: ${n("contextmenu.color")};
|
|
117
|
+
border: 1px solid ${n("contextmenu.border.color")};
|
|
118
|
+
border-radius: ${n("contextmenu.border.radius")};
|
|
119
|
+
box-shadow: ${n("contextmenu.shadow")};
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.p-contextmenu-item {
|
|
123
|
+
position: relative;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.p-contextmenu-item-content {
|
|
127
|
+
transition: background ${n("contextmenu.transition.duration")}, color ${n("contextmenu.transition.duration")};
|
|
128
|
+
border-radius: ${n("contextmenu.item.border.radius")};
|
|
129
|
+
color: ${n("contextmenu.item.color")};
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
.p-contextmenu-item-link {
|
|
133
|
+
cursor: pointer;
|
|
134
|
+
display: flex;
|
|
135
|
+
align-items: center;
|
|
136
|
+
text-decoration: none;
|
|
137
|
+
overflow: hidden;
|
|
138
|
+
position: relative;
|
|
139
|
+
color: inherit;
|
|
140
|
+
padding: ${n("contextmenu.item.padding")};
|
|
141
|
+
gap: ${n("contextmenu.item.gap")};
|
|
142
|
+
user-select: none;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
.p-contextmenu-item-label {
|
|
146
|
+
line-height: 1;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
.p-contextmenu-item-icon {
|
|
150
|
+
color: ${n("contextmenu.item.icon.color")};
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
.p-contextmenu-submenu-icon {
|
|
154
|
+
color: ${n("contextmenu.submenu.icon.color")};
|
|
155
|
+
margin-left: auto;
|
|
156
|
+
font-size: ${n("contextmenu.submenu.icon.size")};
|
|
157
|
+
width: ${n("contextmenu.submenu.icon.size")};
|
|
158
|
+
height: ${n("contextmenu.submenu.icon.size")};
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
.p-contextmenu-submenu-icon:dir(rtl) {
|
|
162
|
+
margin-left: 0;
|
|
163
|
+
margin-right: auto;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
.p-contextmenu-item.p-focus > .p-contextmenu-item-content {
|
|
167
|
+
color: ${n("contextmenu.item.focus.color")};
|
|
168
|
+
background: ${n("contextmenu.item.focus.background")};
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
.p-contextmenu-item.p-focus > .p-contextmenu-item-content .p-contextmenu-item-icon {
|
|
172
|
+
color: ${n("contextmenu.item.icon.focus.color")};
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
.p-contextmenu-item.p-focus > .p-contextmenu-item-content .p-contextmenu-submenu-icon {
|
|
176
|
+
color: ${n("contextmenu.submenu.icon.focus.color")};
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
.p-contextmenu-item:not(.p-disabled) > .p-contextmenu-item-content:hover {
|
|
180
|
+
color: ${n("contextmenu.item.focus.color")};
|
|
181
|
+
background: ${n("contextmenu.item.focus.background")};
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
.p-contextmenu-item:not(.p-disabled) > .p-contextmenu-item-content:hover .p-contextmenu-item-icon {
|
|
185
|
+
color: ${n("contextmenu.item.icon.focus.color")};
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
.p-contextmenu-item:not(.p-disabled) > .p-contextmenu-item-content:hover .p-contextmenu-submenu-icon {
|
|
189
|
+
color: ${n("contextmenu.submenu.icon.focus.color")};
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
.p-contextmenu-item-active > .p-contextmenu-item-content {
|
|
193
|
+
color: ${n("contextmenu.item.active.color")};
|
|
194
|
+
background: ${n("contextmenu.item.active.background")};
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
.p-contextmenu-item-active > .p-contextmenu-item-content .p-contextmenu-item-icon {
|
|
198
|
+
color: ${n("contextmenu.item.icon.active.color")};
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
.p-contextmenu-item-active > .p-contextmenu-item-content .p-contextmenu-submenu-icon {
|
|
202
|
+
color: ${n("contextmenu.submenu.icon.active.color")};
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
.p-contextmenu-separator {
|
|
206
|
+
border-top: 1px solid ${n("contextmenu.separator.border.color")};
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
.p-contextmenu-enter-from,
|
|
210
|
+
.p-contextmenu-leave-active {
|
|
211
|
+
opacity: 0;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
.p-contextmenu-enter-active {
|
|
215
|
+
transition: opacity 250ms;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
.p-contextmenu-mobile .p-contextmenu-submenu {
|
|
219
|
+
position: static;
|
|
220
|
+
box-shadow: none;
|
|
221
|
+
border: 0 none;
|
|
222
|
+
padding-left: ${n("tieredmenu.submenu.mobile.indent")};
|
|
223
|
+
padding-right: 0;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
.p-contextmenu-mobile .p-contextmenu-submenu-icon {
|
|
227
|
+
transition: transform 0.2s;
|
|
228
|
+
transform: rotate(90deg);
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
.p-contextmenu-mobile .p-contextmenu-item-active > .p-contextmenu-item-content .p-contextmenu-submenu-icon {
|
|
232
|
+
transform: rotate(-90deg);
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
/* For PrimeNG */
|
|
236
|
+
.p-contextmenu-submenu-icon.p-iconwrapper {
|
|
237
|
+
margin-left: auto;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
.p-contextmenu-submenu-icon.p-iconwrapper:dir(rtl) {
|
|
241
|
+
margin-left: 0;
|
|
242
|
+
margin-right: auto;
|
|
243
|
+
}
|
|
244
|
+
`,Fo={root:"p-contextmenu p-component",rootList:"p-contextmenu-root-list",item:({instance:n,processedItem:s})=>["p-contextmenu-item",{"p-contextmenu-item-active":n.isItemActive(s),"p-focus":n.isItemFocused(s),"p-disabled":n.isItemDisabled(s)}],itemContent:"p-contextmenu-item-content",itemLink:"p-contextmenu-item-link",itemIcon:"p-contextmenu-item-icon",itemLabel:"p-contextmenu-item-label",submenuIcon:"p-contextmenu-submenu-icon",submenu:"p-contextmenu-submenu",separator:"p-contextmenu-separator"},zn=(()=>{class n extends et{name="contextmenu";theme=Oo;classes=Fo;static \u0275fac=(()=>{let e;return function(i){return(e||(e=Ae(n)))(i||n)}})();static \u0275prov=he({token:n,factory:n.\u0275fac})}return n})();var No=(()=>{class n extends Le{contextMenu;visible=!1;items;itemTemplate;root=!1;autoZIndex=!0;baseZIndex=0;popup;menuId;ariaLabel;ariaLabelledBy;level=0;focusedItemId;activeItemPath;tabindex=0;itemClick=new W;itemMouseEnter=new W;menuFocus=new W;menuBlur=new W;menuKeydown=new W;sublistViewChild;constructor(e){super(),this.contextMenu=e}getItemProp(e,t,i=null){return e&&e.item?Ct(e.item[t],i):void 0}getItemId(e){return e.item&&e.item?.id?e.item.id:`${this.menuId}_${e.key}`}getItemKey(e){return this.getItemId(e)}getItemClass(e){return y(C({},this.getItemProp(e,"class")),{"p-contextmenu-item":!0,"p-contextmenu-item-active":this.isItemActive(e),"p-focus":this.isItemFocused(e),"p-disabled":this.isItemDisabled(e)})}getItemLabel(e){return this.getItemProp(e,"label")}getSeparatorItemClass(e){return y(C({},this.getItemProp(e,"class")),{"p-contextmenu-separator":!0})}getAriaSetSize(){return this.items.filter(e=>this.isItemVisible(e)&&!this.getItemProp(e,"separator")).length}getAriaPosInset(e){return e-this.items.slice(0,e).filter(t=>this.isItemVisible(t)&&this.getItemProp(t,"separator")).length+1}isItemVisible(e){return this.getItemProp(e,"visible")!==!1}isItemActive(e){if(this.activeItemPath)return this.activeItemPath.some(t=>t.key===e.key)}isItemDisabled(e){return this.getItemProp(e,"disabled")}isItemFocused(e){return this.focusedItemId===this.getItemId(e)}isItemGroup(e){return ie(e.items)}onItemMouseEnter(e){let{event:t,processedItem:i}=e;this.itemMouseEnter.emit({originalEvent:t,processedItem:i})}onItemClick(e,t){this.getItemProp(t,"command",{originalEvent:e,item:t.item}),this.itemClick.emit({originalEvent:e,processedItem:t,isFocus:!0})}onEnter(e,t){if(e.fromState==="void"&&e.toState){let i=e.element;this.position(i)}}position(e){let t=e.parentElement.parentElement,i=on(e.parentElement.parentElement),o=_t(),u=e.offsetParent?e.offsetWidth:gt(e),f=Jt(t.children[0]);e.style.top="0px",parseInt(i.left,10)+f+u>o.width-tn()?e.style.left=-1*u+"px":e.style.left=f+"px"}static \u0275fac=function(t){return new(t||n)(pt(Lt(()=>mt)))};static \u0275cmp=E({type:n,selectors:[["p-contextMenuSub"],["p-contextmenu-sub"]],viewQuery:function(t,i){if(t&1&&fe(Hi,5),t&2){let o;z(o=G())&&(i.sublistViewChild=o.first)}},inputs:{visible:[2,"visible","visible",_e],items:"items",itemTemplate:"itemTemplate",root:[2,"root","root",_e],autoZIndex:[2,"autoZIndex","autoZIndex",_e],baseZIndex:[2,"baseZIndex","baseZIndex",xe],popup:[2,"popup","popup",_e],menuId:"menuId",ariaLabel:"ariaLabel",ariaLabelledBy:"ariaLabelledBy",level:[2,"level","level",xe],focusedItemId:"focusedItemId",activeItemPath:"activeItemPath",tabindex:[2,"tabindex","tabindex",xe]},outputs:{itemClick:"itemClick",itemMouseEnter:"itemMouseEnter",menuFocus:"menuFocus",menuBlur:"menuBlur",menuKeydown:"menuKeydown"},features:[Me],decls:1,vars:1,consts:[["sublist",""],["listItem",""],["htmlLabel",""],["role","menu",3,"ngClass","tabindex","keydown","focus","blur",4,"ngIf"],["role","menu",3,"keydown","focus","blur","ngClass","tabindex"],["ngFor","",3,"ngForOf"],["role","separator",3,"style","ngClass",4,"ngIf"],["role","menuitem","pTooltip","",3,"ngStyle","ngClass","class","tooltipOptions",4,"ngIf"],["role","separator",3,"ngClass"],["role","menuitem","pTooltip","",3,"ngStyle","ngClass","tooltipOptions"],[1,"p-contextmenu-item-content",3,"click","mouseenter"],[4,"ngIf"],[3,"items","itemTemplate","menuId","visible","activeItemPath","focusedItemId","level","itemClick","itemMouseEnter",4,"ngIf"],["pRipple","",3,"target","ngClass",4,"ngIf"],["pRipple","",3,"routerLink","queryParams","routerLinkActiveOptions","target","ngClass","fragment","queryParamsHandling","preserveFragment","skipLocationChange","replaceUrl","state",4,"ngIf"],["pRipple","",3,"target","ngClass"],["class","p-contextmenu-item-icon",3,"ngClass","ngStyle",4,"ngIf"],["class","p-contextmenu-item-label",4,"ngIf","ngIfElse"],[3,"styleClass","value",4,"ngIf"],[1,"p-contextmenu-item-icon",3,"ngClass","ngStyle"],[1,"p-contextmenu-item-label"],[1,"p-contextmenu-item-label",3,"innerHTML"],[3,"styleClass","value"],[3,"class",4,"ngIf"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[3,"data-pc-section","aria-hidden"],["pRipple","",3,"routerLink","queryParams","routerLinkActiveOptions","target","ngClass","fragment","queryParamsHandling","preserveFragment","skipLocationChange","replaceUrl","state"],[3,"itemClick","itemMouseEnter","items","itemTemplate","menuId","visible","activeItemPath","focusedItemId","level"]],template:function(t,i){t&1&&d(0,So,3,13,"ul",3),t&2&&l("ngIf",i.root?!0:i.visible)},dependencies:[n,M,Z,Ht,L,jt,ut,F,B,dn,ge,it,un,yt,_n,Ve],encapsulation:2,data:{animation:[dt("overlayAnimation",[Ne(":enter",[Fe({opacity:0})]),Ne(":leave",[Fe({opacity:0})])])]}})}return n})(),mt=(()=>{class n extends Le{overlayService;set model(e){this._model=e,this._processedItems=this.createProcessedItems(this._model||[])}get model(){return this._model}triggerEvent="contextmenu";target;global;style;styleClass;appendTo;autoZIndex=!0;baseZIndex=0;id;breakpoint="960px";ariaLabel;ariaLabelledBy;pressDelay=500;onShow=new W;onHide=new W;rootmenu;containerViewChild;container;outsideClickListener;resizeListener;triggerEventListener;documentClickListener;documentTriggerListener;touchEndListener;pageX;pageY;visible=I(!1);relativeAlign;window;focused=!1;activeItemPath=I([]);focusedItemInfo=I({index:-1,level:0,parentKey:"",item:null});submenuVisible=I(!1);searchValue="";searchTimeout;_processedItems;_model;pressTimer;matchMediaListener;query;queryMatches;_componentStyle=x(zn);get visibleItems(){let e=this.activeItemPath().find(t=>t.key===this.focusedItemInfo().parentKey);return e?e.items:this.processedItems}get processedItems(){return(!this._processedItems||!this._processedItems.length)&&(this._processedItems=this.createProcessedItems(this.model||[])),this._processedItems}get focusedItemId(){let e=this.focusedItemInfo();return e.item&&e.item?.id?e.item.id:e.index!==-1?`${this.id}${ie(e.parentKey)?"_"+e.parentKey:""}_${e.index}`:null}constructor(e){super(),this.overlayService=e,Gt(()=>{let t=this.activeItemPath();ie(t)?this.bindGlobalListeners():this.visible()||this.unbindGlobalListeners()})}ngOnInit(){super.ngOnInit(),this.id=this.id||cn("pn_id_"),this.bindMatchMediaListener(),this.bindTriggerEventListener()}isMobile(){return an()||rn()}bindTriggerEventListener(){Oe(this.platformId)&&(this.triggerEventListener||(this.isMobile()?this.global?(this.triggerEventListener=this.renderer.listen(this.document,"touchstart",this.onTouchStart.bind(this)),this.touchEndListener=this.renderer.listen(this.document,"touchend",this.onTouchEnd.bind(this))):this.target&&(this.triggerEventListener=this.renderer.listen(this.target,"touchstart",this.onTouchStart.bind(this)),this.touchEndListener=this.renderer.listen(this.target,"touchend",this.onTouchEnd.bind(this))):this.global?this.triggerEventListener=this.renderer.listen(this.document,this.triggerEvent,e=>{this.show(e)}):this.target&&(this.triggerEventListener=this.renderer.listen(this.target,this.triggerEvent,e=>{this.show(e)}))))}bindGlobalListeners(){if(Oe(this.platformId)){if(!this.documentClickListener){let e=this.el?this.el.nativeElement.ownerDocument:"document";this.documentClickListener=this.renderer.listen(e,"click",t=>{this.containerViewChild.nativeElement.offsetParent&&this.isOutsideClicked(t)&&!t.ctrlKey&&t.button!==2&&this.triggerEvent!=="click"&&this.hide()}),this.documentTriggerListener=this.renderer.listen(e,this.triggerEvent,t=>{this.containerViewChild.nativeElement.offsetParent&&this.isOutsideClicked(t)&&this.hide()})}this.resizeListener||(this.resizeListener=this.renderer.listen(this.document.defaultView,"resize",e=>{this.hide()}))}}itemTemplate;submenuIconTemplate;templates;_submenuIconTemplate;_itemTemplate;ngAfterContentInit(){this.templates?.forEach(e=>{switch(e.getType()){case"submenuicon":this._submenuIconTemplate=e.template;break;case"item":this._itemTemplate=e.template;break;default:this._itemTemplate=e.template;break}})}createProcessedItems(e,t=0,i={},o=""){let u=[];return e&&e.forEach((f,D)=>{let R=(o!==""?o+"_":"")+D,me={item:f,index:D,level:t,key:R,parent:i,parentKey:o};me.items=this.createProcessedItems(f.items,t+1,me,R),u.push(me)}),u}bindMatchMediaListener(){if(Oe(this.platformId)&&!this.matchMediaListener){let e=window.matchMedia(`(max-width: ${this.breakpoint})`);this.query=e,this.queryMatches=e.matches,this.matchMediaListener=()=>{this.queryMatches=e.matches},e.addEventListener("change",this.matchMediaListener)}}unbindMatchMediaListener(){this.matchMediaListener&&(this.query.removeEventListener("change",this.matchMediaListener),this.matchMediaListener=null)}getItemProp(e,t){return e?Ct(e[t]):void 0}getProccessedItemLabel(e){return e?this.getItemLabel(e.item):void 0}getItemLabel(e){return this.getItemProp(e,"label")}isProcessedItemGroup(e){return e&&ie(e.items)}isSelected(e){return this.activeItemPath().some(t=>t.key===e.key)}isValidSelectedItem(e){return this.isValidItem(e)&&this.isSelected(e)}isValidItem(e){return!!e&&!this.isItemDisabled(e.item)&&!this.isItemSeparator(e.item)}isItemDisabled(e){return this.getItemProp(e,"disabled")}isItemSeparator(e){return this.getItemProp(e,"separator")}isItemMatched(e){return this.isValidItem(e)&&this.getProccessedItemLabel(e).toLocaleLowerCase().startsWith(this.searchValue.toLocaleLowerCase())}isProccessedItemGroup(e){return e&&ie(e.items)}onItemClick(e){let{processedItem:t}=e,i=this.isProcessedItemGroup(t);if(this.isSelected(t)){let{index:u,key:f,level:D,parentKey:R,item:me}=t;this.activeItemPath.set(this.activeItemPath().filter(Be=>f!==Be.key&&f.startsWith(Be.key))),this.focusedItemInfo.set({index:u,level:D,parentKey:R,item:me}),Xe(this.rootmenu.sublistViewChild.nativeElement)}else i?this.onItemChange(e):this.hide()}onItemMouseEnter(e){this.onItemChange(e,"hover")}onKeyDown(e){let t=e.metaKey||e.ctrlKey;switch(e.code){case"ArrowDown":this.onArrowDownKey(e);break;case"ArrowUp":this.onArrowUpKey(e);break;case"ArrowLeft":this.onArrowLeftKey(e);break;case"ArrowRight":this.onArrowRightKey(e);break;case"Home":this.onHomeKey(e);break;case"End":this.onEndKey(e);break;case"Space":this.onSpaceKey(e);break;case"Enter":this.onEnterKey(e);break;case"Escape":this.onEscapeKey(e);break;case"Tab":this.onTabKey(e);break;case"PageDown":case"PageUp":case"Backspace":case"ShiftLeft":case"ShiftRight":break;default:!t&&ln(e.key)&&this.searchItems(e,e.key);break}}onArrowDownKey(e){let t=this.focusedItemInfo().index!==-1?this.findNextItemIndex(this.focusedItemInfo().index):this.findFirstFocusedItemIndex();this.changeFocusedItemIndex(e,t),e.preventDefault()}onArrowRightKey(e){let t=this.visibleItems[this.focusedItemInfo().index];this.isProccessedItemGroup(t)&&(this.onItemChange({originalEvent:e,processedItem:t}),this.focusedItemInfo.set({index:-1,parentKey:t.key,item:t.item}),this.searchValue="",this.onArrowDownKey(e)),e.preventDefault()}onArrowUpKey(e){if(e.altKey){if(this.focusedItemInfo().index!==-1){let t=this.visibleItems[this.focusedItemInfo().index];!this.isProccessedItemGroup(t)&&this.onItemChange({originalEvent:e,processedItem:t})}this.hide(),e.preventDefault()}else{let t=this.focusedItemInfo().index!==-1?this.findPrevItemIndex(this.focusedItemInfo().index):this.findLastFocusedItemIndex();this.changeFocusedItemIndex(e,t),e.preventDefault()}}onArrowLeftKey(e){let t=this.visibleItems[this.focusedItemInfo().index],i=this.activeItemPath().find(f=>f.key===t.parentKey);ht(t.parent)||(this.focusedItemInfo.set({index:-1,parentKey:i?i.parentKey:"",item:t.item}),this.searchValue="",this.onArrowDownKey(e));let u=this.activeItemPath().filter(f=>f.parentKey!==this.focusedItemInfo().parentKey);this.activeItemPath.set(u),e.preventDefault()}onHomeKey(e){this.changeFocusedItemIndex(e,this.findFirstItemIndex()),e.preventDefault()}onEndKey(e){this.changeFocusedItemIndex(e,this.findLastItemIndex()),e.preventDefault()}onSpaceKey(e){this.onEnterKey(e)}onEscapeKey(e){this.hide();let t=this.findVisibleItem(this.findFirstFocusedItemIndex()),i=this.focusedItemInfo();this.focusedItemInfo.set(y(C({},i),{index:this.findFirstFocusedItemIndex(),item:t.item})),e.preventDefault()}onTabKey(e){if(this.focusedItemInfo().index!==-1){let t=this.visibleItems[this.focusedItemInfo().index];!this.isProccessedItemGroup(t)&&this.onItemChange({originalEvent:e,processedItem:t})}this.hide()}onEnterKey(e){if(this.focusedItemInfo().index!==-1){let t=Ye(this.rootmenu.el.nativeElement,`li[id="${`${this.focusedItemId}`}"]`),i=t&&Ye(t,'a[data-pc-section="action"]');i?i.click():t&&t.click();let o=this.visibleItems[this.focusedItemInfo().index];if(!this.isProccessedItemGroup(o)){let f=this.focusedItemInfo();this.focusedItemInfo.set(y(C({},f),{index:this.findFirstFocusedItemIndex()}))}}e.preventDefault()}onItemChange(e,t){let{processedItem:i,isFocus:o}=e;if(ht(i))return;let{index:u,key:f,level:D,parentKey:R,items:me}=i,Be=ie(me),kt=this.activeItemPath().filter(Ot=>Ot.parentKey!==R&&Ot.parentKey!==f);Be&&(kt.push(i),this.submenuVisible.set(!0)),this.focusedItemInfo.set({index:u,level:D,parentKey:R,item:i.item}),o&&Xe(this.rootmenu.sublistViewChild.nativeElement),!(t==="hover"&&this.queryMatches)&&this.activeItemPath.set(kt)}onMenuFocus(e){this.focused=!0;let t=this.focusedItemInfo().index!==-1?this.focusedItemInfo():{index:-1,level:0,parentKey:"",item:null};this.focusedItemInfo.set(t)}onMenuBlur(e){this.focused=!1,this.focusedItemInfo.set({index:-1,level:0,parentKey:"",item:null}),this.searchValue=""}onOverlayAnimationStart(e){switch(e.toState){case"visible":this.container=e.element,this.position(),this.moveOnTop(),this.appendOverlay(),this.bindGlobalListeners(),Xe(this.rootmenu.sublistViewChild.nativeElement);break}}onOverlayAnimationEnd(e){switch(e.toState){case"void":this.onOverlayHide();break}}appendOverlay(){this.appendTo&&(this.appendTo==="body"?this.renderer.appendChild(this.document.body,this.containerViewChild.nativeElement):en(this.appendTo,this.containerViewChild.nativeElement))}moveOnTop(){this.autoZIndex&&this.containerViewChild&&bt.set("menu",this.containerViewChild.nativeElement,this.baseZIndex+this.config.zIndex.menu)}onOverlayHide(){this.unbindGlobalListeners(),this.cd.destroyed||(this.target=null),this.container&&this.autoZIndex&&bt.clear(this.container),this.container=null}onTouchStart(e){this.pressTimer=setTimeout(()=>{this.show(e)},this.pressDelay)}onTouchEnd(){clearTimeout(this.pressTimer)}hide(){this.visible.set(!1),this.onHide.emit(),this.activeItemPath.set([]),this.focusedItemInfo.set({index:-1,level:0,parentKey:"",item:null})}toggle(e){this.visible()?this.hide():this.show(e)}show(e){this.activeItemPath.set([]),this.focusedItemInfo.set({index:-1,level:0,parentKey:"",item:null}),this.pageX=e.pageX,this.pageY=e.pageY,this.onShow.emit(),this.visible()?this.position():this.visible.set(!0),e.stopPropagation(),e.preventDefault()}position(){let e=this.pageX+1,t=this.pageY+1,i=this.containerViewChild.nativeElement.offsetParent?this.containerViewChild.nativeElement.offsetWidth:gt(this.containerViewChild.nativeElement),o=this.containerViewChild.nativeElement.offsetParent?this.containerViewChild.nativeElement.offsetHeight:nn(this.containerViewChild.nativeElement),u=_t();e+i-this.document.scrollingElement.scrollLeft>u.width&&(e-=i),t+o-this.document.scrollingElement.scrollTop>u.height&&(t-=o),e<this.document.scrollingElement.scrollLeft&&(e=this.document.scrollingElement.scrollLeft),t<this.document.scrollingElement.scrollTop&&(t=this.document.scrollingElement.scrollTop),this.containerViewChild.nativeElement.style.left=e+"px",this.containerViewChild.nativeElement.style.top=t+"px"}searchItems(e,t){this.searchValue=(this.searchValue||"")+t;let i=-1,o=!1;return this.focusedItemInfo().index!==-1?(i=this.visibleItems.slice(this.focusedItemInfo().index).findIndex(u=>this.isItemMatched(u)),i=i===-1?this.visibleItems.slice(0,this.focusedItemInfo().index).findIndex(u=>this.isItemMatched(u)):i+this.focusedItemInfo().index):i=this.visibleItems.findIndex(u=>this.isItemMatched(u)),i!==-1&&(o=!0),i===-1&&this.focusedItemInfo().index===-1&&(i=this.findFirstFocusedItemIndex()),i!==-1&&this.changeFocusedItemIndex(e,i),this.searchTimeout&&clearTimeout(this.searchTimeout),this.searchTimeout=setTimeout(()=>{this.searchValue="",this.searchTimeout=null},500),o}findVisibleItem(e){return ie(this.visibleItems)?this.visibleItems[e]:null}findLastFocusedItemIndex(){let e=this.findSelectedItemIndex();return e<0?this.findLastItemIndex():e}findLastItemIndex(){return xt(this.visibleItems,e=>this.isValidItem(e))}findPrevItemIndex(e){let t=e>0?xt(this.visibleItems.slice(0,e),i=>this.isValidItem(i)):-1;return t>-1?t:e}findNextItemIndex(e){let t=e<this.visibleItems.length-1?this.visibleItems.slice(e+1).findIndex(i=>this.isValidItem(i)):-1;return t>-1?t+e+1:e}findFirstFocusedItemIndex(){let e=this.findSelectedItemIndex();return e<0?this.findFirstItemIndex():e}findFirstItemIndex(){return this.visibleItems.findIndex(e=>this.isValidItem(e))}findSelectedItemIndex(){return this.visibleItems.findIndex(e=>this.isValidSelectedItem(e))}changeFocusedItemIndex(e,t){let i=this.findVisibleItem(t),o=this.focusedItemInfo();o.index!==t&&(this.focusedItemInfo.set(y(C({},o),{index:t,item:i.item})),this.scrollInView())}scrollInView(e=-1){let t=e!==-1?`${this.id}_${e}`:this.focusedItemId,i=Ye(this.rootmenu.el.nativeElement,`li[id="${t}"]`);i&&i.scrollIntoView&&i.scrollIntoView({block:"nearest",inline:"nearest"})}bindResizeListener(){Oe(this.platformId)&&(this.resizeListener||(this.resizeListener=this.renderer.listen(this.document.defaultView,"resize",e=>{this.hide()})))}isOutsideClicked(e){return!(this.containerViewChild.nativeElement.isSameNode(e.target)||this.containerViewChild.nativeElement.contains(e.target))}unbindResizeListener(){this.resizeListener&&(this.resizeListener(),this.resizeListener=null)}unbindGlobalListeners(){this.documentClickListener&&(this.documentClickListener(),this.documentClickListener=null),this.documentTriggerListener&&(this.documentTriggerListener(),this.documentTriggerListener=null),this.resizeListener&&(this.resizeListener(),this.resizeListener=null),this.touchEndListener&&(this.touchEndListener(),this.touchEndListener=null)}unbindTriggerEventListener(){this.triggerEventListener&&(this.triggerEventListener(),this.triggerEventListener=null)}removeAppendedElements(){this.appendTo&&this.containerViewChild&&(this.appendTo==="body"?this.renderer.removeChild(this.document.body,this.containerViewChild.nativeElement):sn(this.containerViewChild.nativeElement,this.appendTo))}ngOnDestroy(){this.unbindGlobalListeners(),this.unbindTriggerEventListener(),this.unbindMatchMediaListener(),this.removeAppendedElements(),super.ngOnDestroy()}static \u0275fac=function(t){return new(t||n)(pt(mn))};static \u0275cmp=E({type:n,selectors:[["p-contextMenu"],["p-contextmenu"],["p-context-menu"]],contentQueries:function(t,i,o){if(t&1&&(He(o,wo,4),He(o,To,4),He(o,Je,4)),t&2){let u;z(u=G())&&(i.itemTemplate=u.first),z(u=G())&&(i.submenuIconTemplate=u.first),z(u=G())&&(i.templates=u)}},viewQuery:function(t,i){if(t&1&&(fe(Ao,5),fe(Eo,5)),t&2){let o;z(o=G())&&(i.rootmenu=o.first),z(o=G())&&(i.containerViewChild=o.first)}},inputs:{model:"model",triggerEvent:"triggerEvent",target:"target",global:[2,"global","global",_e],style:"style",styleClass:"styleClass",appendTo:"appendTo",autoZIndex:[2,"autoZIndex","autoZIndex",_e],baseZIndex:[2,"baseZIndex","baseZIndex",xe],id:"id",breakpoint:"breakpoint",ariaLabel:"ariaLabel",ariaLabelledBy:"ariaLabelledBy",pressDelay:[2,"pressDelay","pressDelay",xe]},outputs:{onShow:"onShow",onHide:"onHide"},features:[X([zn]),Me],decls:1,vars:1,consts:[["container",""],["rootmenu",""],[3,"ngClass","class","ngStyle",4,"ngIf"],[3,"ngClass","ngStyle"],[3,"itemClick","menuFocus","menuBlur","menuKeydown","itemMouseEnter","root","items","itemTemplate","menuId","tabindex","ariaLabel","ariaLabelledBy","baseZIndex","autoZIndex","visible","focusedItemId","activeItemPath"]],template:function(t,i){t&1&&d(0,ko,4,23,"div",2),t&2&&l("ngIf",i.visible())},dependencies:[M,Z,L,ut,No,F,ge,yt,Ve],encapsulation:2,data:{animation:[dt("overlayAnimation",[Ne(":enter",[Fe({opacity:0}),ft("250ms")]),Ne(":leave",[ft(".1s linear",Fe({opacity:0}))])])]},changeDetection:0})}return n})(),Hn=(()=>{class n{static \u0275fac=function(t){return new(t||n)};static \u0275mod=Ge({type:n});static \u0275inj=ze({imports:[mt,Ve,Ve]})}return n})();var Lo=["editInput"],Do=["tree"],Ro=["class","page"],Bo=()=>({height:"calc(100vh - 70px)"});function $o(n,s){n&1&&(a(0,"a",6),h(1,"i",7),p(2," Add"),r())}function Ko(n,s){if(n&1){let e=w();a(0,"input",14,4),Ze("ngModelChange",function(i){let o=_(e).$implicit;return Ue(o.label,i)||(o.label=i),g(i)}),v("keydown",function(i){_(e);let o=c(2);return g(o.handleEditKeydown(i))})("blur",function(i){_(e);let o=c(2);return g(o.onNodeEditBlur(i))}),r()}if(n&2){let e=s.$implicit;je("ngModel",e.label)}}function qo(n,s){if(n&1){let e=w();a(0,"div",8)(1,"div",9)(2,"p-panel",10)(3,"p-tree",11,2),v("onNodeContextMenuSelect",function(i){_(e);let o=c();return g(o.onNodeContextMenuSelect(i))})("onNodeSelect",function(i){_(e);let o=c();return g(o.onNodeSelect(i))})("onNodeUnselect",function(i){_(e);let o=c();return g(o.onNodeUnselect(i))})("onNodeDrop",function(i){_(e);let o=c();return g(o.onNodeDrop(i))}),d(5,Ko,2,1,"ng-template",12),r(),h(6,"p-contextmenu",13,3),r()()()}if(n&2){let e=Y(7),t=c();m(2),pe(O(14,Bo)),l("showHeader",!1),m(),l("virtualScroll",!0)("virtualScrollItemSize",40)("scrollHeight","calc(100vh - 142px)")("value",t.categoryTree())("contextMenu",e)("selection",t.selectedCategory)("draggableNodes",!0)("droppableNodes",!0)("propagateSelectionUp",!1)("propagateSelectionDown",!1),m(3),l("model",t.contextMenuItems())}}var jn=(()=>{class n{constructor(){this._coaTypesService=x(ce),this._router=x(ee),this.contextMenuItems=I([]),this.categoryTree=I([]),this.selectedCategory=null,this._shouldAutoFocus=I(!1)}ngOnInit(){this._loadCategories().subscribe(),this._initializeContextMenuItems(),this.expandAllNodes()}ngAfterViewChecked(){this.selectedCategory&&!this._shouldAutoFocus()&&this.editInputRef&&(this.editInputRef.nativeElement.focus(),this.editInputRef.nativeElement.select(),this._shouldAutoFocus.set(!0))}_loadCategories(){return this._coaTypesService.fetchCOACategories().pipe(A("COA Categories"),q(e=>this._assignTreeIcons(e)),S(e=>{this.categoryTree.set(e),this.expandAllNodes()}))}_assignTreeIcons(e){return e.map(t=>{let i=!!t.children?.length;return y(C({},t),{icon:void 0,expandedIcon:i?"fa-solid fa-folder-open":void 0,collapsedIcon:i?"fa-solid fa-folder":"fa-solid fa-file",children:i?this._assignTreeIcons(t.children):[]})})}_initializeContextMenuItems(){this.contextMenuItems.set([{label:"Add",icon:"fa-light fa-plus",disabled:!1,command:()=>this._createChildCategory()},{label:"Edit",icon:"fa-light fa-pen-to-square",disabled:!1,command:()=>this._setSelectedNodeToEditMode()},{label:"Delete",icon:"fa-light fa-trash",disabled:!1,command:()=>this._deleteSelectedCategory()},{label:"Properties",icon:"fa-light fa-file",disabled:!1,command:()=>{this._router.navigate(["/pages/chart-of-account/coa-types/info"],{queryParams:{ID:this.selectedCategory?.key}})}}])}_findNodeByKey(e){return this.treeComponent.getNodeWithKey(e,this.categoryTree())??null}_setSelectedNodeToEditMode(){let e=this._findNodeByKey(this.selectedCategory?.key);e&&(this.selectedCategory=e,e.type="edit")}_createChildCategory(){this.selectedCategory?.parent?.key&&this._coaTypesService.submitCategory({Name:"New Child Node",ParentID:this.selectedCategory.key,Code:"",Note:""}).pipe(V(e=>this._loadCategories().pipe(q(()=>e))),S(e=>{let t=this._findNodeByKey(e.id);t&&(this.selectedCategory=t,this._shouldAutoFocus.set(!1),t.type="edit")}),A("Created COA Node")).subscribe()}_deleteSelectedCategory(){this.selectedCategory?.key&&this._coaTypesService.deleteCategory(this.selectedCategory.key).pipe(V(()=>this._loadCategories())).subscribe()}renameNode(e,t=this.selectedCategory){this._coaTypesService.renameCategory(t.key,{Name:e}).pipe(V(()=>this._loadCategories())).subscribe()}onNodeSelect(e){this.selectedCategory=e.node,this._shouldAutoFocus.set(!1),e.node.children?.length&&(e.node.icon="fa-solid fa-folder-open")}onNodeUnselect(e){e.node.children?.length&&(e.node.icon="fa-solid fa-folder")}onNodeContextMenuSelect(e){if(this.selectedCategory=e.node,e.node.parent)this.contextMenuItems.update(t=>t.map(i=>y(C({},i),{disabled:!1})));else{let t=e.node.children?.length===5;this.contextMenuItems.update(i=>i.map(o=>o.label==="Add"?y(C({},o),{disabled:t}):o))}}onNodeDrop(e){let{dragNode:t,dropNode:i}=e;this._coaTypesService.updateParentCategory(t.key,{ParentID:i.key}).pipe(S(()=>this._loadCategories())).subscribe()}onNodeEditBlur(e){let t=e.target;this.renameNode(t.value);let i=this._findNodeByKey(this.selectedCategory?.key);i&&delete i.type}handleEditKeydown(e){let t=e.target;if([" ","Enter"].includes(e.key)&&e.stopPropagation(),e.key==="Enter"){this.renameNode(t.value);let i=this._findNodeByKey(this.selectedCategory?.key);i&&(delete i.type,this.treeComponent.updateSerializedValue?.())}}expandAllNodes(){this.categoryTree().forEach(e=>this._expandRecursive(e,!0))}collapseAllNodes(){this.categoryTree().forEach(e=>this._expandRecursive(e,!1))}_expandRecursive(e,t){e.expanded=t,e.children?.forEach(i=>this._expandRecursive(i,t))}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=E({type:n,selectors:[["app-coa-type",8,"page"]],viewQuery:function(t,i){if(t&1&&(fe(Lo,5),fe(Do,5)),t&2){let o;z(o=G())&&(i.editInputRef=o.first),z(o=G())&&(i.treeComponent=o.first)}},features:[X([pn])],attrs:Ro,decls:5,vars:0,consts:[["actionButton",""],["content",""],["tree",""],["cm",""],["editInput",""],["pageTitle",`Chart of Accounts Category
|
|
245
|
+
`],["routerLink","add",1,"p-button"],[1,"fa-solid","fa-plus"],[1,"row","justify-content-center"],[1,"col"],[3,"showHeader"],["selectionMode","single","draggableScope","self","droppableScope","self",3,"onNodeContextMenuSelect","onNodeSelect","onNodeUnselect","onNodeDrop","virtualScroll","virtualScrollItemSize","scrollHeight","value","contextMenu","selection","draggableNodes","droppableNodes","propagateSelectionUp","propagateSelectionDown"],["pTemplate","edit"],["appendTo","body",3,"model"],["type","text",1,"form-control",3,"ngModelChange","keydown","blur","ngModel"]],template:function(t,i){t&1&&(a(0,"app-main-panel",5),d(1,$o,3,0,"ng-template",null,0,b)(3,qo,8,15,"ng-template",null,1,b),r())},dependencies:[$,Fn,F,B,Hn,mt,Je,M,ve,te,H,Qe,K,fn,se,ae],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return n})();var zo=["class","page"],Mt=n=>({"is-invalid":n});function Go(n,s){if(n&1){let e=w();a(0,"div",3)(1,"p-button",4),v("onClick",function(){_(e);let i=c();return g(i.goBack())}),r(),a(2,"p-button",5),v("onClick",function(){_(e);let i=c();return g(i.onSubmit())}),r()()}}function Ho(n,s){n&1&&(a(0,"div",19),p(1," Name is required "),r())}function jo(n,s){n&1&&(a(0,"div",19),p(1," Code is required "),r())}function Uo(n,s){n&1&&(a(0,"div",19),p(1," Note is required "),r())}function Zo(n,s){if(n&1){let e=w();a(0,"p-panel")(1,"div",6)(2,"div",7)(3,"div",8)(4,"div",9)(5,"div",10)(6,"label",11),p(7,"Name"),r(),h(8,"input",12),d(9,Ho,2,0,"div",13),r()(),a(10,"div",14)(11,"div",10)(12,"label",11),p(13,"Code"),r(),h(14,"input",15),d(15,jo,2,0,"div",13),r()(),a(16,"div",9)(17,"div",10)(18,"label",11),p(19,"Note"),r(),h(20,"textarea",16),d(21,Uo,2,0,"div",13),r()(),a(22,"div",9)(23,"div",17)(24,"label",11),p(25,"Category"),r(),a(26,"p-treeselect",18),v("onFocus",function(){_(e);let i=c();return g(i.loadCategories())}),r()()()()()()()}if(n&2){let e=c();m(3),l("formGroup",e.form),m(5),l("ngClass",T(8,Mt,e.form.controls.Name.invalid&&(e.form.controls.Name.dirty||e.form.controls.Name.touched))),m(),l("ngIf",e.form.controls.Name.errors==null?null:e.form.controls.Name.errors.required),m(5),l("ngClass",T(10,Mt,e.form.controls.Code.invalid&&(e.form.controls.Code.dirty||e.form.controls.Code.touched))),m(),l("ngIf",e.form.controls.Code==null||e.form.controls.Code.errors==null?null:e.form.controls.Code.errors.required),m(5),l("ngClass",T(12,Mt,e.form.controls.Note.invalid&&(e.form.controls.Note.dirty||e.form.controls.Note.touched))),m(),l("ngIf",e.form.controls.Note.errors==null?null:e.form.controls.Note.errors.required),m(5),l("options",e.categories())}}var Pt=(()=>{class n{constructor(){this.categories=I([]),this.COATypeService=x(ce),this.COAService=x(j),this.info=I(null),this.route=x(J),this.router=x(ee),this.fb=x(Ie)}goBack(){this.router.navigate(["/pages/chart-of-account/coa-types"])}ngOnInit(){this.generateForm(),Ft([this.route.paramMap.pipe(q(e=>e.get("id")),Ke(e=>!!e)),this.COATypeService.fetchCOACategories()]).pipe(A("fetchCOACategories"),V(([e,t])=>{let i=this.findNodeByKeyInArray(t,e);return this.categories.set(t),this.COATypeService.getCOACategoryByID({ID:e}).pipe(S(o=>{this.form.patchValue({Name:o.name,Code:o.code,Note:o.note,Category:i.parent})}))})).subscribe()}loadCategories(){this.COAService.getCachedCategoriesOptions().pipe(S(e=>this.categories.set(e))).subscribe()}generateForm(){this.form=new Qt({Name:new N("",[ne.required]),Code:new N("",[ne.required]),Category:new N(null),Note:new N("",[ne.required])})}findNodeByKeyInArray(e,t){for(let i of e){let o=this.findNodeByKey(i,t);if(o)return o}return null}findNodeByKey(e,t,i=null){if(e.key===t||e.label===t)return i&&(e.parent=i),e;if(e.children&&e.children.length>0)for(let o of e.children){let u=this.findNodeByKey(o,t,e);if(u)return u}return null}onSubmit(){let{Name:e,Code:t,Note:i,Category:o}=this.form.value,u=null,f=null;this.route.snapshot.params.id?(u=this.findNodeByKeyInArray(this.categories(),this.route.snapshot.params.id),f={Name:e,Code:t,ParentID:u&&u.parent?u.parent.key:u.key,Note:i,ID:this.route.snapshot.params.id||null}):(u=this.findNodeByKeyInArray(this.categories(),o.key),f={Name:e,Code:t,ParentID:u&&u.parent?u.parent.key:u.key,Note:i}),this.COATypeService.submitCategory(f,{observe:"response"}).pipe(A("response"),S(()=>{this.router.navigate(["/pages/chart-of-account/coa-types"])})).subscribe()}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=E({type:n,selectors:[["app-coa-type-form",8,"page"]],attrs:zo,decls:5,vars:1,consts:[["actionButton",""],["content",""],["pageTitle","Chart of Account Category Form",3,"hasMainWrapperPadding"],[1,"d-flex","gap-2"],["label","Cancel","variant","outlined","severity","secondary",3,"onClick"],["label","Submit",3,"onClick"],[1,"row","justify-content-center"],[1,"col"],[1,"row","row-gap-2",3,"formGroup"],[1,"ol-12","col-md-6","col-lg-6"],[1,"form-group","has-validation"],["for",""],["formControlName","Name",1,"form-control",3,"ngClass"],["id","validationServer03Feedback","class","invalid-feedback",4,"ngIf"],[1,"col-12","col-md-6","col-lg-6"],["formControlName","Code",1,"form-control",3,"ngClass"],["formControlName","Note","placeholder","Enter a description for this COA category","id","floatingTextarea2",1,"form-control",2,"height","100px",3,"ngClass"],[1,"form-group","has-validation","d-flex","flex-column"],["placeholder","Select a Category","formControlName","Category",3,"onFocus","options"],["id","validationServer03Feedback",1,"invalid-feedback"]],template:function(t,i){t&1&&(a(0,"app-main-panel",2),d(1,Go,3,0,"ng-template",null,0,b)(3,Zo,27,14,"ng-template",null,1,b),r()),t&2&&l("hasMainWrapperPadding",!0)},dependencies:[$,F,Te,we,Se,te,H,Ce,be,ye,M,Z,L,K,re,oe,se,ae],styles:["[_nghost-%COMP%]{display:block} .p-treeselect{width:100%}"],changeDetection:0})}}return n})();var Qo=n=>[n];function Wo(n,s){if(n&1&&(a(0,"a",4),h(1,"i",5),a(2,"span"),p(3,"Edit"),r()()),n&2){let e=c(2);l("routerLink",T(1,Qo,"/pages/chart-of-account/coa-types/"+e.info().id+"/edit"))}}function Yo(n,s){if(n&1&&(a(0,"div",6)(1,"div",7)(2,"p-card")(3,"div",8)(4,"div",9)(5,"div",10),p(6,"Name"),r(),a(7,"div",11),p(8),r()(),a(9,"div",9)(10,"div",10),p(11,"Code"),r(),a(12,"div",11),p(13),r()(),a(14,"div",9)(15,"div",10),p(16,"Category"),r(),a(17,"div",11),p(18),r()(),a(19,"div",9)(20,"div",10),p(21,"Note"),r(),a(22,"div",11),h(23,"div",12),r()()()()()()),n&2){let e=c(2);m(8),k(e.info().name),m(5),k(e.info().code),m(5),k(e.info().parentName),m(5),l("innerHTML",e.info().note,Ee)}}function Xo(n,s){n&1&&(ue(0),a(1,"app-main-panel",3),d(2,Wo,4,3,"ng-template",null,0,b)(4,Yo,24,4,"ng-template",null,1,b),r(),de())}var Un=(()=>{class n{constructor(){this.COATypeService=x(ce),this.route=x(J),this.info=I(null)}ngOnInit(){this.route.queryParamMap.pipe(q(e=>e.get("ID")),V(e=>this.COATypeService.getCOACategoryByID({ID:e})),A("getCOACategoryByID"),S(e=>this.info.set(e))).subscribe()}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=E({type:n,selectors:[["app-coa-type-info"]],decls:1,vars:1,consts:[["actionButton",""],["content",""],[4,"ngIf"],["pageTitle",`Type of Account Info
|
|
246
|
+
`],["type","button",1,"p-button","p-button-success",3,"routerLink"],[1,"fa-solid","fa-pen-to-square"],[1,"row","justify-content-center","mt-3"],[1,"col-12","col-lg-8"],[1,"d-flex","flex-column","gap-3"],[1,"d-flex"],[1,"col-3"],[1,"col"],[3,"innerHTML"]],template:function(t,i){t&1&&d(0,Xo,6,0,"ng-container",2),t&2&&l("ngIf",i.info())},dependencies:[M,L,$,K,ot,F,B],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return n})();var fl=[{path:"",redirectTo:"account",pathMatch:"full"},{path:"",children:[{path:"account",component:Kn},{path:"account/add",component:Et},{path:"account/import",loadComponent:()=>import("./chunk-C4LZX33Q.js").then(n=>n.CoaImportComponent)},{path:"account/:id",component:Dn},{path:"account/:id/edit",component:Et},{path:"coa-types",component:jn},{path:"coa-types/add",component:Pt},{path:"coa-types/info",component:Un},{path:"coa-types/:id/edit",component:Pt}]}],qn={path:"cash-of-account",title:"COA",iconName:"fa fa-calculator",class:"",label:"",labelClass:"",extralink:!1,submenu:[{path:"account",title:"Ticket List",iconName:"solar:stop-circle-line-duotone",class:"",label:"",labelClass:"",extralink:!1,submenu:[]},{path:"coa-types",title:"Ticket Details",iconName:"solar:stop-circle-line-duotone",class:"",label:"",labelClass:"",extralink:!1,submenu:[]}]};export{fl as CHART_OF_ACCOUNT_ROUTES,qn as CHART_OF_ACCOUNT_ROUTE_PAGE};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{a as W,c as j,f as u,h as q}from"./chunk-YOEPO6LK.js";import{E as P,Ea as N,F as A,G as R,J as n,L as m,P as F,R as v,Va as _,aa as s,la as Z,z as h}from"./chunk-BNI5KUDE.js";import{n as B}from"./chunk-BYD3JK4R.js";import{Aa as E,Ab as d,Jb as C,Ob as $,Ub as M,Uc as p,Vb as V,Vc as r,Wb as k,ba as b,ca as T,ha as y,ib as x,mb as g,oa as O,ob as D,ra as w,ta as c,wb as I,xb as S,xc as z,yb as H}from"./chunk-YVEUYFCE.js";import{a}from"./chunk-YQFG5XE2.js";var J=({dt:e})=>`
|
|
2
2
|
.p-tooltip {
|
|
3
3
|
position: absolute;
|
|
4
4
|
display: none;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b as P}from"./chunk-GJXWL5XV.js";import{b as A}from"./chunk-LKZL77YR.js";import{b as y}from"./chunk-JDW35ZB5.js";import{a as w,b}from"./chunk-6ZZARVQO.js";import{x as _}from"./chunk-YOEPO6LK.js";import{a as O}from"./chunk-35KDUCM3.js";import{m as M,s as S}from"./chunk-BYD3JK4R.js";import{Cb as C,Da as c,Lc as a,Ub as i,Vb as r,Wb as x,ba as s,ec as m,gb as u,ha as d,pc as p,qc as v,rc as l,wb as h}from"./chunk-YVEUYFCE.js";var k=(()=>{class t{constructor(){this.httpService=d(O),this.dayjs=d(P)}migrateTaxAccount(){return this.httpService.post(void 0,"api/Migrate/accounting/tax",{})}getManualJournalCount(){return this.httpService.get(void 0,"api/migrate/accounting/journalheader-count",{})}getCOACount(){return this.httpService.get(void 0,"api/migrate/accounting/chartOfAccountcount",{})}getCOAConfigurationCount(){return this.httpService.get(void 0,"api/migrate/accounting/chartOfAccountConfigcount",{})}getCOACategoryCount(){return this.httpService.get(void 0,"api/migrate/accounting/chartOfAccountCategorycount",{})}getOutletAccountCount(){return this.httpService.get(void 0,"api/migrate/accounting/outletaccount-count",{})}getPaymentMethodAccountCount(){return this.httpService.get(void 0,"api/migrate/accounting/paymentmethodaccountcount",{})}getWriteOffOutletAccountCount(){return this.httpService.get(void 0,"api/migrate/accounting/writeoffoutletaccountCount",{})}getTaxAccountCount(){return this.httpService.get(void 0,"api/migrate/accounting/taxcount",{})}getExpenseAccountCount(){return this.httpService.get(void 0,"api/migrate/accounting/expenseaccountcount",{})}migrateCoaAccount(){return this.httpService.post(void 0,"api/Migrate/accounting/chartOfAccount",{})}migrateCoaConfig(){return this.httpService.post(void 0,"api/Migrate/accounting/chartOfAccountConfig",{})}migrateCoaCategory(){return this.httpService.post(void 0,"api/Migrate/accounting/chartOfAccountCategory",{})}migrateOutletAccount(){return this.httpService.post(void 0,"api/Migrate/accounting/outletaccount",{})}migrateManualJournal(e){let n={From:e.From?this.dayjs.from(e.From).format():null,To:e.To?this.dayjs.from(e.To).format():null,PageNumber:e.PageNumber||1,PageSize:e.PageSize||50},o=new S;return Object.keys(n).forEach(f=>{o=o.append(f,n[f])}),this.httpService.get(void 0,"api/migrate/accounting/journalheader",{params:o})}formatManualCOA(){return this.httpService.delete(void 0,"api/Migrate/accounting/truncate-coa",{})}formatExpenseAccount(){return this.httpService.delete(void 0,"api/Migrate/accounting/truncate-expenseaccount",{})}formatWriteOff(){return this.httpService.delete(void 0,"api/Migrate/accounting/truncate-writeoff",{})}formatManualCOAConfig(){return this.httpService.delete(void 0,"api/Migrate/accounting/truncate-coa-config",{})}formatOutletAccount(){return this.httpService.delete(void 0,"api/migrate/accounting/truncate-outlet-account",{})}formatPaymentAccount(){return this.httpService.delete(void 0,"api/migrate/accounting/truncate-paymentmethod",{})}formatTaxAccount(){return this.httpService.delete(void 0,"api/migrate/accounting/truncate-tax",{})}formatManualJournal(){return this.httpService.delete(void 0,"api/Migrate/accounting/truncate-journal",{})}formatManualCOACategory(){return this.httpService.delete(void 0,"api/migrate/accounting/truncate-coag",{})}migratePaymentMethod(){return this.httpService.post(void 0,"api/Migrate/accounting/paymentmethodaccount",{})}migrateWriteOffOutlet(){return this.httpService.post(void 0,"api/Migrate/accounting/writeoffoutletaccount",{})}migrateExpenseAccount(){return this.httpService.post(void 0,"api/Migrate/accounting/expenseaccount",{})}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275prov=s({token:t,factory:t.\u0275fac})}}return t})();function j(t,g){t&1&&(i(0,"div",5)(1,"div",6),x(2,"i",7),r()())}function E(t,g){if(t&1&&(i(0,"div",8),p(1),r()),t&2){let e=m();u(),l(" ",e.migrationCount()," ")}}function z(t,g){if(t&1&&(i(0,"div",9),p(1),r()),t&2){let e=m();u(),l(" ",e.migrationTitle()," ")}}function F(t,g){if(t&1&&(i(0,"div",10)(1,"div",11),p(2),r()()),t&2){let e=m();u(2),v(e.migrationPlace())}}var X=(()=>{class t{constructor(){this.migrationTitle=c(),this.migrationCount=c(),this.migrationPlace=c()}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=h({type:t,selectors:[["app-migration-cards"]],inputs:{migrationTitle:[1,"migrationTitle"],migrationCount:[1,"migrationCount"],migrationPlace:[1,"migrationPlace"]},decls:9,vars:0,consts:[["header",""],["title",""],["subtitle",""],["footer",""],[1,"text-center","flex","flex-column","justify-content-center","align-items-center","card-shadow","responsive-card"],[1,"d-flex","justify-content-center"],[1,"d-flex","justify-content-center","align-items-center","mt-4",2,"width","60px","height","60px","background-color","#e0f0ff","border-radius","50%"],[1,"icon","fa-file-lines","fa-light",2,"font-size","25px","color","#007bff"],[1,"bigscale","fw-bold"],[1,"text-sm","text-secondary"],[1,"flex","mt-5"],[1,"p-6","fs-7","fw-bold"]],template:function(n,o){n&1&&(i(0,"p-card",4),C(1,j,3,0,"ng-template",null,0,a)(3,E,2,1,"ng-template",null,1,a)(5,z,2,1,"ng-template",null,2,a)(7,F,3,1,"ng-template",null,3,a),r())},dependencies:[M,b,w,_,A,y],styles:["[_nghost-%COMP%] .p-card .p-card-title .bigscale{font-size:3rem!important;margin-top:2rem!important}[_nghost-%COMP%] .p-card{box-shadow:0 .25rem 1.25rem #0000001a!important;width:21.875rem!important;height:25rem!important}@media (max-width: 85rem){[_nghost-%COMP%] .p-card{width:18.875rem!important;height:21rem!important}[_nghost-%COMP%] .p-card .p-card-title .bigscale{font-size:2rem!important;margin-top:1rem!important}}@media (min-width: 85.001rem) and (max-width: 97.999rem){[_nghost-%COMP%] .p-card{width:21rem!important;height:25rem!important}[_nghost-%COMP%] .p-card .p-card-title .bigscale{font-size:3rem!important;margin-top:2rem!important}}@media (min-width: 98rem){[_nghost-%COMP%] .p-card{width:25rem!important;height:28rem!important}[_nghost-%COMP%] .p-card .p-card-title .bigscale{font-size:5rem!important;margin-top:2rem!important}}"]})}}return t})();export{k as a,X as b};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as rt}from"./chunk-34XRAZFC.js";import{ba as it}from"./chunk-YVEUYFCE.js";import{d as B,e as Q}from"./chunk-YQFG5XE2.js";var st=B((G,K)=>{(function(y,M){typeof G=="object"&&typeof K<"u"?K.exports=M():typeof define=="function"&&define.amd?define(M):(y=typeof globalThis<"u"?globalThis:y||self).dayjs=M()})(G,function(){"use strict";var y=1e3,M=6e4,v=36e5,k="millisecond",D="second",z="minute",c="hour",H="day",j="week",b="month",d="quarter",$="year",o="date",i="Invalid Date",h=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,S=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,O={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(s){var n=["th","st","nd","rd"],t=s%100;return"["+s+(n[(t-20)%10]||n[t]||n[0])+"]"}},g=function(s,n,t){var r=String(s);return!r||r.length>=n?s:""+Array(n+1-r.length).join(t)+s},x={s:g,z:function(s){var n=-s.utcOffset(),t=Math.abs(n),r=Math.floor(t/60),e=t%60;return(n<=0?"+":"-")+g(r,2,"0")+":"+g(e,2,"0")},m:function s(n,t){if(n.date()<t.date())return-s(t,n);var r=12*(t.year()-n.year())+(t.month()-n.month()),e=n.clone().add(r,b),u=t-e<0,a=n.clone().add(r+(u?-1:1),b);return+(-(r+(t-e)/(u?e-a:a-e))||0)},a:function(s){return s<0?Math.ceil(s)||0:Math.floor(s)},p:function(s){return{M:b,y:$,w:j,d:H,D:o,h:c,m:z,s:D,ms:k,Q:d}[s]||String(s||"").toLowerCase().replace(/s$/,"")},u:function(s){return s===void 0}},T="en",_={};_[T]=O;var U="$isDayjsObject",Z=function(s){return s instanceof P||!(!s||!s[U])},I=function s(n,t,r){var e;if(!n)return T;if(typeof n=="string"){var u=n.toLowerCase();_[u]&&(e=u),t&&(_[u]=t,e=u);var a=n.split("-");if(!e&&a.length>1)return s(a[0])}else{var l=n.name;_[l]=n,e=l}return!r&&e&&(T=e),e||!r&&T},m=function(s,n){if(Z(s))return s.clone();var t=typeof n=="object"?n:{};return t.date=s,t.args=arguments,new P(t)},f=x;f.l=I,f.i=Z,f.w=function(s,n){return m(s,{locale:n.$L,utc:n.$u,x:n.$x,$offset:n.$offset})};var P=function(){function s(t){this.$L=I(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[U]=!0}var n=s.prototype;return n.parse=function(t){this.$d=function(r){var e=r.date,u=r.utc;if(e===null)return new Date(NaN);if(f.u(e))return new Date;if(e instanceof Date)return new Date(e);if(typeof e=="string"&&!/Z$/i.test(e)){var a=e.match(h);if(a){var l=a[2]-1||0,p=(a[7]||"0").substring(0,3);return u?new Date(Date.UTC(a[1],l,a[3]||1,a[4]||0,a[5]||0,a[6]||0,p)):new Date(a[1],l,a[3]||1,a[4]||0,a[5]||0,a[6]||0,p)}}return new Date(e)}(t),this.init()},n.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},n.$utils=function(){return f},n.isValid=function(){return this.$d.toString()!==i},n.isSame=function(t,r){var e=m(t);return this.startOf(r)<=e&&e<=this.endOf(r)},n.isAfter=function(t,r){return m(t)<this.startOf(r)},n.isBefore=function(t,r){return this.endOf(r)<m(t)},n.$g=function(t,r,e){return f.u(t)?this[r]:this.set(e,t)},n.unix=function(){return Math.floor(this.valueOf()/1e3)},n.valueOf=function(){return this.$d.getTime()},n.startOf=function(t,r){var e=this,u=!!f.u(r)||r,a=f.p(t),l=function(F,C){var N=f.w(e.$u?Date.UTC(e.$y,C,F):new Date(e.$y,C,F),e);return u?N:N.endOf(H)},p=function(F,C){return f.w(e.toDate()[F].apply(e.toDate("s"),(u?[0,0,0,0]:[23,59,59,999]).slice(C)),e)},w=this.$W,Y=this.$M,L=this.$D,A="set"+(this.$u?"UTC":"");switch(a){case $:return u?l(1,0):l(31,11);case b:return u?l(1,Y):l(0,Y+1);case j:var W=this.$locale().weekStart||0,V=(w<W?w+7:w)-W;return l(u?L-V:L+(6-V),Y);case H:case o:return p(A+"Hours",0);case c:return p(A+"Minutes",1);case z:return p(A+"Seconds",2);case D:return p(A+"Milliseconds",3);default:return this.clone()}},n.endOf=function(t){return this.startOf(t,!1)},n.$set=function(t,r){var e,u=f.p(t),a="set"+(this.$u?"UTC":""),l=(e={},e[H]=a+"Date",e[o]=a+"Date",e[b]=a+"Month",e[$]=a+"FullYear",e[c]=a+"Hours",e[z]=a+"Minutes",e[D]=a+"Seconds",e[k]=a+"Milliseconds",e)[u],p=u===H?this.$D+(r-this.$W):r;if(u===b||u===$){var w=this.clone().set(o,1);w.$d[l](p),w.init(),this.$d=w.set(o,Math.min(this.$D,w.daysInMonth())).$d}else l&&this.$d[l](p);return this.init(),this},n.set=function(t,r){return this.clone().$set(t,r)},n.get=function(t){return this[f.p(t)]()},n.add=function(t,r){var e,u=this;t=Number(t);var a=f.p(r),l=function(Y){var L=m(u);return f.w(L.date(L.date()+Math.round(Y*t)),u)};if(a===b)return this.set(b,this.$M+t);if(a===$)return this.set($,this.$y+t);if(a===H)return l(1);if(a===j)return l(7);var p=(e={},e[z]=M,e[c]=v,e[D]=y,e)[a]||1,w=this.$d.getTime()+t*p;return f.w(w,this)},n.subtract=function(t,r){return this.add(-1*t,r)},n.format=function(t){var r=this,e=this.$locale();if(!this.isValid())return e.invalidDate||i;var u=t||"YYYY-MM-DDTHH:mm:ssZ",a=f.z(this),l=this.$H,p=this.$m,w=this.$M,Y=e.weekdays,L=e.months,A=e.meridiem,W=function(C,N,J,q){return C&&(C[N]||C(r,u))||J[N].slice(0,q)},V=function(C){return f.s(l%12||12,C,"0")},F=A||function(C,N,J){var q=C<12?"AM":"PM";return J?q.toLowerCase():q};return u.replace(S,function(C,N){return N||function(J){switch(J){case"YY":return String(r.$y).slice(-2);case"YYYY":return f.s(r.$y,4,"0");case"M":return w+1;case"MM":return f.s(w+1,2,"0");case"MMM":return W(e.monthsShort,w,L,3);case"MMMM":return W(L,w);case"D":return r.$D;case"DD":return f.s(r.$D,2,"0");case"d":return String(r.$W);case"dd":return W(e.weekdaysMin,r.$W,Y,2);case"ddd":return W(e.weekdaysShort,r.$W,Y,3);case"dddd":return Y[r.$W];case"H":return String(l);case"HH":return f.s(l,2,"0");case"h":return V(1);case"hh":return V(2);case"a":return F(l,p,!0);case"A":return F(l,p,!1);case"m":return String(p);case"mm":return f.s(p,2,"0");case"s":return String(r.$s);case"ss":return f.s(r.$s,2,"0");case"SSS":return f.s(r.$ms,3,"0");case"Z":return a}return null}(C)||a.replace(":","")})},n.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},n.diff=function(t,r,e){var u,a=this,l=f.p(r),p=m(t),w=(p.utcOffset()-this.utcOffset())*M,Y=this-p,L=function(){return f.m(a,p)};switch(l){case $:u=L()/12;break;case b:u=L();break;case d:u=L()/3;break;case j:u=(Y-w)/6048e5;break;case H:u=(Y-w)/864e5;break;case c:u=Y/v;break;case z:u=Y/M;break;case D:u=Y/y;break;default:u=Y}return e?u:f.a(u)},n.daysInMonth=function(){return this.endOf(b).$D},n.$locale=function(){return _[this.$L]},n.locale=function(t,r){if(!t)return this.$L;var e=this.clone(),u=I(t,r,!0);return u&&(e.$L=u),e},n.clone=function(){return f.w(this.$d,this)},n.toDate=function(){return new Date(this.valueOf())},n.toJSON=function(){return this.isValid()?this.toISOString():null},n.toISOString=function(){return this.$d.toISOString()},n.toString=function(){return this.$d.toUTCString()},s}(),nt=P.prototype;return m.prototype=nt,[["$ms",k],["$s",D],["$m",z],["$H",c],["$W",H],["$M",b],["$y",$],["$D",o]].forEach(function(s){nt[s[1]]=function(n){return this.$g(n,s[0],s[1])}}),m.extend=function(s,n){return s.$i||(s(n,P,m),s.$i=!0),m},m.locale=I,m.isDayjs=Z,m.unix=function(s){return m(1e3*s)},m.en=_[T],m.Ls=_,m.p={},m})});var ut=B((R,X)=>{(function(y,M){typeof R=="object"&&typeof X<"u"?X.exports=M():typeof define=="function"&&define.amd?define(M):(y=typeof globalThis<"u"?globalThis:y||self).dayjs_plugin_timezone=M()})(R,function(){"use strict";var y={year:0,month:1,day:2,hour:3,minute:4,second:5},M={};return function(v,k,D){var z,c=function(d,$,o){o===void 0&&(o={});var i=new Date(d),h=function(S,O){O===void 0&&(O={});var g=O.timeZoneName||"short",x=S+"|"+g,T=M[x];return T||(T=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:S,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:g}),M[x]=T),T}($,o);return h.formatToParts(i)},H=function(d,$){for(var o=c(d,$),i=[],h=0;h<o.length;h+=1){var S=o[h],O=S.type,g=S.value,x=y[O];x>=0&&(i[x]=parseInt(g,10))}var T=i[3],_=T===24?0:T,U=i[0]+"-"+i[1]+"-"+i[2]+" "+_+":"+i[4]+":"+i[5]+":000",Z=+d;return(D.utc(U).valueOf()-(Z-=Z%1e3))/6e4},j=k.prototype;j.tz=function(d,$){d===void 0&&(d=z);var o,i=this.utcOffset(),h=this.toDate(),S=h.toLocaleString("en-US",{timeZone:d}),O=Math.round((h-new Date(S))/1e3/60),g=15*-Math.round(h.getTimezoneOffset()/15)-O;if(!Number(g))o=this.utcOffset(0,$);else if(o=D(S,{locale:this.$L}).$set("millisecond",this.$ms).utcOffset(g,!0),$){var x=o.utcOffset();o=o.add(i-x,"minute")}return o.$x.$timezone=d,o},j.offsetName=function(d){var $=this.$x.$timezone||D.tz.guess(),o=c(this.valueOf(),$,{timeZoneName:d}).find(function(i){return i.type.toLowerCase()==="timezonename"});return o&&o.value};var b=j.startOf;j.startOf=function(d,$){if(!this.$x||!this.$x.$timezone)return b.call(this,d,$);var o=D(this.format("YYYY-MM-DD HH:mm:ss:SSS"),{locale:this.$L});return b.call(o,d,$).tz(this.$x.$timezone,!0)},D.tz=function(d,$,o){var i=o&&$,h=o||$||z,S=H(+D(),h);if(typeof d!="string")return D(d).tz(h);var O=function(_,U,Z){var I=_-60*U*1e3,m=H(I,Z);if(U===m)return[I,U];var f=H(I-=60*(m-U)*1e3,Z);return m===f?[I,m]:[_-60*Math.min(m,f)*1e3,Math.max(m,f)]}(D.utc(d,i).valueOf(),S,h),g=O[0],x=O[1],T=D(g).utcOffset(x);return T.$x.$timezone=h,T},D.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},D.tz.setDefault=function(d){z=d}}})});var at=B((tt,et)=>{(function(y,M){typeof tt=="object"&&typeof et<"u"?et.exports=M():typeof define=="function"&&define.amd?define(M):(y=typeof globalThis<"u"?globalThis:y||self).dayjs_plugin_utc=M()})(tt,function(){"use strict";var y="minute",M=/[+-]\d\d(?::?\d\d)?/g,v=/([+-]|\d\d)/g;return function(k,D,z){var c=D.prototype;z.utc=function(i){var h={date:i,utc:!0,args:arguments};return new D(h)},c.utc=function(i){var h=z(this.toDate(),{locale:this.$L,utc:!0});return i?h.add(this.utcOffset(),y):h},c.local=function(){return z(this.toDate(),{locale:this.$L,utc:!1})};var H=c.parse;c.parse=function(i){i.utc&&(this.$u=!0),this.$utils().u(i.$offset)||(this.$offset=i.$offset),H.call(this,i)};var j=c.init;c.init=function(){if(this.$u){var i=this.$d;this.$y=i.getUTCFullYear(),this.$M=i.getUTCMonth(),this.$D=i.getUTCDate(),this.$W=i.getUTCDay(),this.$H=i.getUTCHours(),this.$m=i.getUTCMinutes(),this.$s=i.getUTCSeconds(),this.$ms=i.getUTCMilliseconds()}else j.call(this)};var b=c.utcOffset;c.utcOffset=function(i,h){var S=this.$utils().u;if(S(i))return this.$u?0:S(this.$offset)?b.call(this):this.$offset;if(typeof i=="string"&&(i=function(T){T===void 0&&(T="");var _=T.match(M);if(!_)return null;var U=(""+_[0]).match(v)||["-",0,0],Z=U[0],I=60*+U[1]+ +U[2];return I===0?0:Z==="+"?I:-I}(i),i===null))return this;var O=Math.abs(i)<=16?60*i:i,g=this;if(h)return g.$offset=O,g.$u=i===0,g;if(i!==0){var x=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(g=this.local().add(O+x,y)).$offset=O,g.$x.$localOffset=x}else g=this.utc();return g};var d=c.format;c.format=function(i){var h=i||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return d.call(this,h)},c.valueOf=function(){var i=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*i},c.isUTC=function(){return!!this.$u},c.toISOString=function(){return this.toDate().toISOString()},c.toString=function(){return this.toDate().toUTCString()};var $=c.toDate;c.toDate=function(i){return i==="s"&&this.$offset?z(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():$.call(this)};var o=c.diff;c.diff=function(i,h,S){if(i&&this.$u===i.$u)return o.call(this,i,h,S);var O=this.local(),g=z(i).local();return o.call(O,g,h,S)}}})});var E=Q(st()),ot=Q(ut()),ft=Q(at());E.default.extend(ft.default);E.default.extend(ot.default);var lt=(()=>{class y{constructor(){this._defaultTimezone=rt.defaultTimezone||"Asia/Jakarta",this.validateTimezone(this._defaultTimezone)}get now(){return(0,E.default)().tz(this._defaultTimezone)}from(v){if(v==null||typeof v=="string"&&v==="0001-01-01T00:00:00")return null;let k=(0,E.default)(v);return k.isValid()?k.tz(this._defaultTimezone):null}get defaultTimezone(){return this._defaultTimezone}setDefaultTimezone(v){this.validateTimezone(v),this._defaultTimezone=v}isValidTimezone(v){try{return Intl.DateTimeFormat(void 0,{timeZone:v}),!0}catch{return!1}}withTimezone(v){return this.setDefaultTimezone(v),this}format(v,k="YYYY-MM-DDTHH:mm:ss"){return this.from(v)?.format(k)||""}validateTimezone(v){if(!this.isValidTimezone(v))throw new Error(`Invalid timezone: ${v}`)}static{this.\u0275fac=function(k){return new(k||y)}}static{this.\u0275prov=it({token:y,factory:y.\u0275fac,providedIn:"root"})}}return y})();export{st as a,lt as b};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as me}from"./chunk-P6CJ2ONT.js";import{b as Se}from"./chunk-RT5PUZ5F.js";import{a as A,b as z}from"./chunk-JP3F2QND.js";import{d as L,i as Ce,j as be,k as G}from"./chunk-TFV5QZKR.js";import"./chunk-3WB76KQC.js";import"./chunk-LTZA6IIO.js";import"./chunk-HFFH2WIX.js";import"./chunk-TK3G2BVM.js";import"./chunk-LR2DJRRL.js";import"./chunk-CSMMP7XG.js";import"./chunk-6TA77CRR.js";import"./chunk-JMLETF7Y.js";import"./chunk-C5GEP4MM.js";import"./chunk-TC43COAE.js";import{a as H,b as j}from"./chunk-JDW35ZB5.js";import"./chunk-WZO2ZLBL.js";import{b as xe}from"./chunk-6ZZARVQO.js";import{h as F}from"./chunk-35CWG2OK.js";import"./chunk-EXVUABTO.js";import{a as E,b as ue,c as fe,d as _e,e as ge,f as he}from"./chunk-4S33ZRKF.js";import"./chunk-4FGQ5T64.js";import{o as de,w as O,x as V}from"./chunk-YOEPO6LK.js";import"./chunk-ZWHB7NI7.js";import{y as se}from"./chunk-BNI5KUDE.js";import{a as ce}from"./chunk-35KDUCM3.js";import{a as pe}from"./chunk-3HW557B7.js";import{F as re,M as le,f as ne,k as ae,l as B,m as N,s as oe,u as ie}from"./chunk-BYD3JK4R.js";import"./chunk-F2X3VGZZ.js";import{Cb as w,Ga as $,Ic as b,J as Q,Jc as v,Kb as C,Kc as te,Lc as f,Nb as I,Ub as o,Vb as i,Wb as D,X as M,Xc as S,Z as W,_b as T,ba as X,c as k,cb as Y,dc as R,ec as d,gb as p,ha as _,pa as h,pc as r,qa as x,qc as u,s as q,tc as J,wb as P,xc as Z,yc as y,zc as ee}from"./chunk-YVEUYFCE.js";import{a as m,b as s}from"./chunk-YQFG5XE2.js";var U=(()=>{class t{constructor(){this.httpService=_(ce)}getGenerateCoa(e){let a={params:new oe().set("PageNumber",e.PageNumber).set("RowCount",e.RowCount)};return this.httpService.get(void 0,"api/Tools/GetListCOA",a)}updateCOABalance(e={}){return this.httpService.put(void 0,"api/Tools/UpdateCOABalance",void 0,e)}getUnbalanceJournal(e){return this.httpService.get(void 0,"api/Tools/UnbalanceJurnal/"+e.PageNumber+"/"+e.RowCount)}updateUnbalanceJournal(e){let n={ListID:e};return this.httpService.put(void 0,"api/Tools/RegenerateUnBalanceJournal",n)}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275prov=X({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var ke=()=>({height:"calc(100vh - 70px)"}),Me=()=>({"min-width":"50rem"});function Pe(t,l){if(t&1){let e=T();o(0,"p-button",7),R("onClick",function(){h(e);let a=d();return x(a.updateCoaBalance())}),i()}}function Ie(t,l){t&1&&(o(0,"tr")(1,"th"),r(2,"Code"),i(),o(3,"th"),r(4,"Name"),i(),o(5,"th"),r(6,"Outlet"),i(),o(7,"th"),r(8,"COA Balance"),i(),o(9,"th"),r(10,"Correct Balance"),i()())}function De(t,l){if(t&1&&(o(0,"tr")(1,"td"),r(2),i(),o(3,"td"),r(4),i(),o(5,"td"),r(6),i(),o(7,"td"),r(8),b(9,"number"),i(),o(10,"td"),r(11),b(12,"number"),i()()),t&2){let e=l.$implicit;p(2),u(e.Code),p(2),u(e.Name),p(2),u(e.OutletName),p(2),u(v(9,5,e.Balance)),p(3),u(v(12,7,e.CorrectBalance))}}function Je(t,l){if(t&1&&(o(0,"div",9)(1,"p",10),r(2),i()()),t&2){let e=d(2);p(2),J(" Showing ",e.startIndex()," to ",e.endIndex()," of ",e.coaData().count," entries ")}}function Be(t,l){t&1&&(o(0,"tr")(1,"td",11)(2,"span"),r(3,"No records found."),i()()())}function Ne(t,l){if(t&1){let e=T();o(0,"p-panel")(1,"p-table",8),R("onPage",function(a){h(e);let c=d();return x(c.onPageChange(a))}),w(2,Ie,11,0,"ng-template",null,2,f)(4,De,13,9,"ng-template",null,3,f)(6,Je,3,3,"ng-template",null,4,f)(8,Be,4,0,"ng-template",null,5,f),i()()}if(t&2){let e=d();I(y(10,ke)),p(),C("paginator",!0)("lazy",!0)("totalRecords",e.coaData().count)("scrollable",!0)("scrollHeight","calc(100vh - 142px)")("rows",e.pagination().RowCount)("value",e.coaData().data)("tableStyle",y(11,Me))}}var ve=(()=>{class t{constructor(){this.pagination=$({PageNumber:1,RowCount:20}),this.coaService=_(U),this.toastrService=_(pe),this.coaData=$(null),this.fetchCoaData=A(k(Q(e=>this.coaService.getGenerateCoa(e).pipe(z({next:n=>this.coaData.set(n),error:n=>console.error(n)}))))),this.startIndex=S(()=>this.pagination()?(this.pagination().PageNumber-1)*this.pagination().RowCount+1:0),this.endIndex=S(()=>this.pagination()?Math.min(this.pagination().PageNumber*this.pagination().RowCount,this.coaData()?.count||0):0)}ngOnInit(){this.fetchCoaData(this.pagination)}onPageChange(e){this.pagination.update(n=>s(m({},n),{PageNumber:Math.floor(e.first/e.rows)+1}))}updateCoaBalance(){this.coaService.updateCOABalance({observe:"response"}).pipe(M(()=>this.coaService.getGenerateCoa(this.pagination())),W(e=>{e instanceof ie&&this.toastrService.success(e.body?.message,"Success")})).subscribe()}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=P({type:t,selectors:[["app-tools-update-coa"]],decls:5,vars:0,consts:[["actionButton",""],["content",""],["header",""],["body",""],["paginatorleft",""],["emptymessage",""],["pageTitle","Generate COA"],["label","Update",3,"onClick"],[3,"onPage","paginator","lazy","totalRecords","scrollable","scrollHeight","rows","value","tableStyle"],[1,"flex","align-items-center","custom-font-footer",2,"height","100%"],[1,"m-0"],["colspan","5"]],template:function(n,a){n&1&&(o(0,"app-main-panel",6),w(1,Pe,1,0,"ng-template",null,0,f)(3,Ne,10,12,"ng-template",null,1,f),i())},dependencies:[F,G,L,xe,N,B,V,O,j,H],styles:["[_nghost-%COMP%]{display:block} .p-card{height:100%} .p-card .p-card-body{height:inherit} .p-card .p-card-body .p-card-content{height:inherit} .p-paginator .p-paginator-pages .p-paginator-page{font-size:14px}.custom-font-footer[_ngcontent-%COMP%]{font-size:.875rem}"],changeDetection:0})}}return t})();var Oe={data:{count:0,data:[]},filter:{PageNumber:1,RowCount:20}},K=ue(he(Oe),fe(t=>({first:S(()=>(t.filter().PageNumber-1)*t.filter().RowCount+1),end:S(()=>Math.min(t.filter().PageNumber*t.filter().RowCount,t.data().count)),selectedItems:S(()=>t.data().data.filter(l=>l.checked)),hasCheckedRows:S(()=>t.data().data.some(l=>l.checked))})),ge(t=>{let l=_(U);return{updateFilter(n){E(t,a=>s(m({},a),{filter:m(m({},a.filter),n)}))},onRowSelect(n){E(t,a=>{let c=a.data.data.map(g=>g.id===n.id?s(m({},g),{checked:!0}):g);return s(m({},a),{data:s(m({},a.data),{data:c})})})},onRowUnselect(n){E(t,a=>{let c=a.data.data.map(g=>g.id===n.id?s(m({},g),{checked:!1}):g);return s(m({},a),{data:s(m({},a.data),{data:c})})})},onHeaderCheckboxToggle(n){E(t,a=>{let c=a.data.data.map(g=>s(m({},g),{checked:n}));return s(m({},a),{data:s(m({},a.data),{data:c})})})},loadData:A(k(M(n=>l.getUnbalanceJournal(n).pipe(q(a=>s(m({},a),{data:a.data.map(c=>s(m({},c),{checked:!1}))})),z({next:a=>{E(t,c=>s(m({},c),{data:a}))},error:a=>{console.error("Error loading unbalance journal data:",a)}})))))}}),_e(t=>({onInit:()=>{t.loadData(t.filter)}})));var Ve=()=>({height:"calc(100vh - 70px)"}),He=t=>["/pages/journal/journal-entry",t];function je(t,l){if(t&1){let e=T();o(0,"div",8),D(1,"p-button",9),o(2,"p-button",10),R("onClick",function(){h(e);let a=d(2);return x(a.regenerateUnbalanceJournal())}),r(3,"Regenerate"),i()()}}function Fe(t,l){if(t&1&&w(0,je,4,0,"div",7),t&2){let e=d();C("ngIf",e.store.hasCheckedRows())}}function Ae(t,l){t&1&&(o(0,"tr")(1,"th",12),D(2,"p-tableHeaderCheckbox"),i(),o(3,"th"),r(4,"Date"),i(),o(5,"th"),r(6,"Number"),i(),o(7,"th",13),r(8,"Debit SUM"),i(),o(9,"th",13),r(10,"Credit SUM"),i(),o(11,"th",13),r(12,"Difference"),i(),o(13,"th"),r(14,"Reference"),i(),o(15,"th"),r(16,"Outlet"),i()())}function ze(t,l){if(t&1&&(o(0,"tr")(1,"td"),D(2,"p-tableCheckbox",14),i(),o(3,"td"),r(4),b(5,"date"),i(),o(6,"td")(7,"a",15),r(8),i()(),o(9,"td",13),r(10),b(11,"number"),i(),o(12,"td",13),r(13),b(14,"number"),i(),o(15,"td",13),r(16),b(17,"number"),i(),o(18,"td")(19,"a",16),r(20),i()(),o(21,"td"),r(22),i()()),t&2){let e=l.$implicit,n=d(2);p(2),C("value",e),p(2),u(te(5,10,e.date,"dd MMM yyyy")),p(3),C("routerLink",ee(19,He,e.id)),p(),u(e.number),p(2),u(v(11,13,e.debitSum)),p(3),u(v(14,15,e.creditSum)),p(3),u(v(17,17,e.differences)),p(3),C("href",n.authService.getTenantExternalURL()+"/menu/Orders/Orders/Customer_Invoice/Info?ID="+e.id,Y),p(),u(e.referenceText),p(2),u(e.outletName)}}function Le(t,l){if(t&1&&r(0),t&2){let e=d(2);J(" Showing ",e.store.first()," to ",e.store.end()," of ",e.store.data().count," entries ")}}function Ge(t,l){t&1&&(o(0,"tr")(1,"td",17)(2,"span"),r(3,"No records found."),i()()())}function $e(t,l){if(t&1){let e=T();o(0,"p-panel")(1,"p-table",11),R("onPage",function(a){h(e);let c=d();return x(c.onPageChange(a))})("onRowSelect",function(a){h(e);let c=d();return x(c.onRowSelect(a))})("onRowUnselect",function(a){h(e);let c=d();return x(c.onRowUnselect(a))})("onHeaderCheckboxToggle",function(a){h(e);let c=d();return x(c.onHeaderCheckboxToggle(a))}),w(2,Ae,17,0,"ng-template",null,2,f)(4,ze,23,21,"ng-template",null,3,f)(6,Le,1,3,"ng-template",null,4,f)(8,Ge,4,0,"ng-template",null,5,f),i()()}if(t&2){let e=d();I(y(9,Ve)),p(),C("value",e.store.data().data)("scrollable",!0)("lazy",!0)("scrollHeight","calc(100vh - 142px)")("paginator",!0)("rows",e.store.filter().RowCount)("totalRecords",e.store.data().count)}}var Te=(()=>{class t{constructor(){this.store=_(K),this.toolsService=_(U),this.authService=_(me)}onPageChange(e){console.log("Page changed:",e);let n=e.first/e.rows;this.store.updateFilter({PageNumber:n+1})}onRowSelect(e){this.store.onRowSelect(e.data)}onRowUnselect(e){if(Array.isArray(e.data)){e.data.forEach(n=>{this.store.onRowUnselect(n)});return}else this.store.onRowUnselect(e.data)}onHeaderCheckboxToggle(e){this.store.onHeaderCheckboxToggle(e.checked)}regenerateUnbalanceJournal(){let n=this.store.selectedItems().filter(a=>a.checked==!0).map(a=>a.id);this.toolsService.updateUnbalanceJournal(n).subscribe()}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=P({type:t,selectors:[["app-unbalance-journal"]],features:[Z([K])],decls:5,vars:0,consts:[["actionButton",""],["content",""],["header",""],["body",""],["paginatorleft",""],["emptymessage",""],["pageTitle","Unbalance Journal"],["class","d-flex gap-2",4,"ngIf"],[1,"d-flex","gap-2"],["icon","fa-solid fa-trash","label","Delete","severity","danger"],[3,"onClick"],["paginatorStyleClass","d-flex justify-content-end","dataKey","id",3,"onPage","onRowSelect","onRowUnselect","onHeaderCheckboxToggle","value","scrollable","lazy","scrollHeight","paginator","rows","totalRecords"],[2,"width","4rem"],[1,"text-end"],[3,"value"],["target","_blank",1,"link","link-primary",3,"routerLink"],["target","_blank",1,"link","link-primary",3,"href"],["colspan","6"]],template:function(n,a){n&1&&(o(0,"app-main-panel",6),w(1,Fe,1,1,"ng-template",null,0,f)(3,$e,10,10,"ng-template",null,1,f),i())},dependencies:[F,G,L,Ce,be,Se,de,N,ne,B,ae,se,V,O,j,H,le,re],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var At=[{path:"",redirectTo:"generate-coa",pathMatch:"full"},{path:"generate-coa",component:ve},{path:"unbalance-journal",component:Te}];export{At as TOOLS_ROUTES};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as x,b as L}from"./chunk-G6FJQBZZ.js";import"./chunk-GJXWL5XV.js";import"./chunk-34XRAZFC.js";import{a as E,b as V}from"./chunk-LKZL77YR.js";import{a as R,b as D}from"./chunk-JDW35ZB5.js";import"./chunk-WZO2ZLBL.js";import"./chunk-6ZZARVQO.js";import{h as H}from"./chunk-35CWG2OK.js";import{b as N,c as G}from"./chunk-EXVUABTO.js";import"./chunk-4S33ZRKF.js";import"./chunk-4FGQ5T64.js";import{w as j,x as O}from"./chunk-YOEPO6LK.js";import"./chunk-ZWHB7NI7.js";import"./chunk-BNI5KUDE.js";import"./chunk-35KDUCM3.js";import{a as I}from"./chunk-3HW557B7.js";import{i as $,m as F}from"./chunk-BYD3JK4R.js";import"./chunk-F2X3VGZZ.js";import{Cb as A,Ic as c,Jc as s,Kb as p,Lc as C,Nb as h,Ub as n,V as v,Vb as o,Wb as l,X as T,Z as M,_b as B,dc as y,ec as m,gb as a,h as P,ha as f,pa as g,qa as d,ra as S,s as u,sa as b,wb as k,xc as w,yc as _}from"./chunk-YVEUYFCE.js";import"./chunk-YQFG5XE2.js";var q=()=>({height:"calc(100vh - 100px)"});function J(i,z){if(i&1){let e=B();n(0,"div",3)(1,"p-button",4),y("onClick",function(){g(e);let r=m();return d(r.onFormat())}),o(),n(2,"p-button",5),c(3,"async"),c(4,"async"),y("onClick",function(){g(e);let r=m();return d(r.migratePaymentAccount())}),o()()}if(i&2){let e=m();a(2),p("disabled",s(3,2,e.countInBooks$)!==0)("pTooltip",s(4,4,e.countInBooks$)!==0?"Books already has entries. Please format before re-migrating.":null)}}function K(i,z){if(i&1&&(n(0,"p-scroll-panel")(1,"p-panel")(2,"div",6),l(3,"app-migration-cards",7),c(4,"async"),S(),n(5,"svg",8),l(6,"path",9),o(),b(),l(7,"app-migration-cards",10),c(8,"async"),o()()()),i&2){let e=m();h(_(12,q)),a(),h(_(13,q)),a(2),p("migrationCount",s(4,8,e.countInPOS$))("migrationTitle",e.pageTitle),a(4),p("migrationCount",s(8,10,e.countInBooks$))("migrationTitle",e.pageTitle)}}var ue=(()=>{class i{constructor(){this.migrateService=f(x),this.toastr=f(I),this.refresh$=new P(void 0),this.pageTitle="Payment Account"}ngOnInit(){let e=this.refresh$.pipe(T(()=>this.migrateService.getPaymentMethodAccountCount()),M(t=>console.log("API response:",t)),v(1));this.countInPOS$=e.pipe(u(t=>Number(t.pos))),this.countInBooks$=e.pipe(u(t=>Number(t.books)))}migratePaymentAccount(){this.migrateService.migratePaymentMethod().subscribe(e=>{this.refresh$.next(),this.toastr.success(e.message,"Migration Successful")})}onFormat(){confirm("Are you sure you want to format?")&&this.migrateService.formatPaymentAccount().subscribe(e=>{this.refresh$.next(),this.toastr.success(e.message,"Format Successful")})}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=k({type:i,selectors:[["app-payment-account"]],features:[w([x])],decls:5,vars:1,consts:[["actionButton",""],["content",""],[3,"pageTitle"],[1,"d-flex","gap-2"],["label","Format","severity","danger",3,"onClick"],["label","Migrate","tooltipPosition","left",3,"onClick","disabled","pTooltip"],[1,"flex","gap-30","flex-wrap",2,"display","flex","justify-content","center","align-items","center","gap","1rem","margin-top","40px"],["migrationPlace","Accounting",3,"migrationCount","migrationTitle"],["width","40","height","40","viewBox","0 0 24 24","fill","none"],["d","M8 5l8 7-8 7","stroke","#007bff","stroke-width","2","stroke-linecap","round","stroke-linejoin","round"],["migrationPlace","Books",3,"migrationCount","migrationTitle"]],template:function(t,r){t&1&&(n(0,"app-main-panel",2),A(1,J,5,6,"ng-template",null,0,C)(3,K,9,14,"ng-template",null,1,C),o()),t&2&&p("pageTitle",r.pageTitle)},dependencies:[H,F,$,V,E,D,R,G,N,L,O,j],encapsulation:2})}}return i})();export{ue as PaymentAccountComponent};
|