dealposbooks 5.49.1 → 5.49.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (56) hide show
  1. package/{chunk-PDW76PO5.js → chunk-26LXGKDF.js} +1 -1
  2. package/{chunk-CUCSYZR2.js → chunk-3KEAMVYI.js} +1 -1
  3. package/{chunk-MMRINCFB.js → chunk-4G57L7HS.js} +1 -1
  4. package/{chunk-6JPM6TG4.js → chunk-4OZIHMKI.js} +1 -1
  5. package/{chunk-LUNMW7NC.js → chunk-4UVBCZJG.js} +1 -1
  6. package/chunk-5LGAO5J4.js +1 -0
  7. package/{chunk-UHYWK6PC.js → chunk-A3P24MDP.js} +3 -3
  8. package/{chunk-UQIX3KIP.js → chunk-A7OYELWP.js} +1 -1
  9. package/{chunk-O7CGBSJM.js → chunk-ATFRJZK3.js} +1 -1
  10. package/{chunk-UJQIYFRL.js → chunk-BJMEZV24.js} +1 -1
  11. package/{chunk-AYUYBSUN.js → chunk-C5EDHVD7.js} +1 -1
  12. package/{chunk-O26EFRQ7.js → chunk-C7ZPOAWO.js} +1 -1
  13. package/{chunk-LJYIEJUY.js → chunk-CTINUVLP.js} +1 -1
  14. package/{chunk-LKOCOLCM.js → chunk-D2CH2T3I.js} +1 -1
  15. package/{chunk-G75NZLKG.js → chunk-DJTQ4KQ7.js} +1 -1
  16. package/{chunk-R6JSPQYG.js → chunk-DTAREQVV.js} +1 -1
  17. package/{chunk-CB44HQLK.js → chunk-E3SH454T.js} +1 -1
  18. package/{chunk-3ZDXMXR7.js → chunk-I2IEFBTX.js} +1 -1
  19. package/{chunk-AFKKNLDY.js → chunk-IHKBTP2Y.js} +1 -1
  20. package/{chunk-PNWKXR6W.js → chunk-IQ4SHFOC.js} +1 -1
  21. package/{chunk-GPXKVMG6.js → chunk-KGNH5JRZ.js} +1 -1
  22. package/{chunk-YP2RRUG5.js → chunk-KJCHFIF4.js} +1 -1
  23. package/{chunk-3KWJOHNE.js → chunk-L3CQJPFS.js} +1 -1
  24. package/{chunk-UKAT6MZE.js → chunk-LG5TMEPP.js} +1 -1
  25. package/chunk-LNFCBMAA.js +1 -0
  26. package/{chunk-DNH5W432.js → chunk-LOMHQKQX.js} +1 -1
  27. package/{chunk-IUM4NWIG.js → chunk-LUS3QGR4.js} +1 -1
  28. package/{chunk-EMJBQMMM.js → chunk-ME4V3YFW.js} +1 -1
  29. package/{chunk-AQYWE6TS.js → chunk-N6LQW4C4.js} +1 -1
  30. package/{chunk-4CT2IUWQ.js → chunk-NXJQMUGV.js} +1 -1
  31. package/{chunk-PMLX776V.js → chunk-OBT3IJJQ.js} +1 -1
  32. package/{chunk-7A5MPGKC.js → chunk-OFI2JX7N.js} +1 -1
  33. package/{chunk-64PX5TMF.js → chunk-OFLGX5N4.js} +2 -2
  34. package/{chunk-NGLRDAET.js → chunk-PW4Y2UWU.js} +1 -1
  35. package/{chunk-VIKI37CB.js → chunk-PZZCPZ6Q.js} +1 -1
  36. package/{chunk-LWPIHDR2.js → chunk-QFFI46W6.js} +1 -1
  37. package/{chunk-MJZFJU44.js → chunk-QJ5XIVKM.js} +1 -1
  38. package/{chunk-WUBLGOX2.js → chunk-RX37I2ZC.js} +1 -1
  39. package/{chunk-N3QZNL7B.js → chunk-S6S265JY.js} +2 -2
  40. package/{chunk-RYDK5DLZ.js → chunk-SUWUVFH4.js} +1 -1
  41. package/{chunk-F7JOE6RA.js → chunk-UD23HDLE.js} +1 -1
  42. package/{chunk-QB5TEFDM.js → chunk-UK5OOIPU.js} +1 -1
  43. package/{chunk-V62KSQJI.js → chunk-V2P3PRZY.js} +1 -1
  44. package/{chunk-XVQLGYG2.js → chunk-V65ONV6D.js} +1 -1
  45. package/{chunk-BGO4VAXH.js → chunk-VMI7LQOW.js} +1 -1
  46. package/{chunk-TXDQN45R.js → chunk-WRTIQGAC.js} +2 -2
  47. package/{chunk-L5U2UBAI.js → chunk-XJFNZBHG.js} +1 -1
  48. package/{chunk-IU5ELUD3.js → chunk-XWXTYJHR.js} +1 -1
  49. package/{chunk-MR3OGQ2R.js → chunk-YIEUIWT7.js} +1 -1
  50. package/chunk-ZZEOPBUT.js +1 -0
  51. package/index.html +2 -2
  52. package/{main-SFIF6D5T.js → main-WMHNA6IG.js} +1 -1
  53. package/package.json +1 -1
  54. package/chunk-75DDNXGP.js +0 -1
  55. package/chunk-BRKRIPYY.js +0 -1
  56. package/chunk-ZC3INGLB.js +0 -1
@@ -1 +1 @@
1
- import{a as Fe,b as ke}from"./chunk-FWAGEKIF.js";import{a as _e,b as ve,c as be,d as xe,e as Ce,f as ye}from"./chunk-RM5HLXNW.js";import"./chunk-E6SW7I4D.js";import{a as fe,b as ge}from"./chunk-PGOSR3RI.js";import{a as he}from"./chunk-XKI7WLHE.js";import{a as se}from"./chunk-6WWXJJID.js";import"./chunk-U2VDC52W.js";import"./chunk-UPSNJEHO.js";import{a as oe,b as re}from"./chunk-PPXXWO4E.js";import"./chunk-M4SSELXT.js";import"./chunk-QPPFPDWZ.js";import{i as ue}from"./chunk-LKOCOLCM.js";import"./chunk-S27Z7D3D.js";import{a as pe,b as me}from"./chunk-AD247LWQ.js";import"./chunk-BKTBVFNX.js";import"./chunk-ZFNIPERQ.js";import{n as ie,o as ne,w as ae,x as le,y as ce,z as de}from"./chunk-ME4ALIS7.js";import"./chunk-DTYVTTET.js";import{b as L,c as H,e as J,f as K,k as Q,l as W,m as X,n as Y,o as Z,u as ee,x as te}from"./chunk-VMI3QWC6.js";import{b as z,d as U}from"./chunk-F7PVAVLQ.js";import"./chunk-GPXKVMG6.js";import"./chunk-5DRALZZF.js";import"./chunk-2BI7WNJP.js";import{h as B,j as $,k as j,s as q}from"./chunk-ZK43JB4A.js";import"./chunk-F2X3VGZZ.js";import{Cb as P,Eb as f,Ec as v,Fc as b,Ha as A,Mb as a,Pb as _,Qb as y,Sb as F,Sc as T,Ub as k,Vb as M,Wb as i,Wc as V,Xb as n,Y as I,Yb as g,_ as C,ac as O,fc as w,gc as d,ia as c,ib as r,qa as G,ra as E,sc as h,tc as S,ua as N,uc as R,yb as D}from"./chunk-6QJHEOXN.js";import"./chunk-YQFG5XE2.js";var Ie=()=>({height:"calc(100vh - 70px)"}),Ge=t=>({"ng-invalid ng-dirty":t}),Me=t=>({"ps-0":t}),Se=()=>({display:"flex"});function Ee(t,l){if(t&1){let e=O();i(0,"p-button",4),w("onClick",function(){G(e);let p=d(2);return E(p.onSubmit())}),n()}}function Ne(t,l){if(t&1&&f(0,Ee,1,0,"p-button",3),t&2){let e=d();a("ngIf",e.roleService.user().edit)}}function Ae(t,l){if(t&1&&(i(0,"div")(1,"span",16),h(2),n()()),t&2){let e=l.$implicit;r(2),S(e)}}function De(t,l){if(t&1&&(i(0,"div"),f(1,Ae,3,1,"div",15),n()),t&2){let e=d(2);r(),a("ngForOf",e.getErrors("name"))}}function Pe(t,l){if(t&1&&(i(0,"div",25)(1,"div",26),g(2,"p-checkbox",27),i(3,"p",28),h(4),n()()()),t&2){let e=l.$implicit,o=l.$index;a("formGroupName",o)("pTooltip",e.get("description").value),r(2),_(v(6,Se)),a("binary",!0),r(2),R(" ",e.get("name").value," ")}}function Oe(t,l){if(t&1&&(i(0,"div",18)(1,"div",19)(2,"div",20)(3,"span",21),h(4),n()(),g(5,"p-checkbox",22),n(),i(6,"div",23)(7,"div",24),k(8,Pe,5,7,"div",25,F),n()()()),t&2){let e=l.$implicit,o=l.$index,p=d(3);a("formGroupName",o),r(4),S(e.get("groupName").value),r(),_(v(5,Se)),a("binary",!0),r(3),M(p.getRolesArray(o).controls)}}function we(t,l){if(t&1&&(i(0,"div",17),k(1,Oe,10,6,"div",18,F),n()),t&2){let e=d(2);r(),M(e.rolesFormArray.controls)}}function Re(t,l){if(t&1&&(i(0,"p-panel")(1,"div",5),g(2,"app-user-tabs"),i(3,"form",6),g(4,"input",7),f(5,De,2,1,"div",8),n(),i(6,"p-tabs",9)(7,"p-tablist")(8,"p-tab",9),h(9,"Permission"),n(),i(10,"p-tab",10),h(11,"Description"),n()(),i(12,"p-tabpanels",11)(13,"p-tabpanel",9)(14,"form",6),f(15,we,3,0,"div",12),n()(),i(16,"p-tabpanel",10)(17,"div",13),g(18,"textarea",14),n()()()()()()),t&2){let e=d();_(v(13,Ie)),r(3),a("formGroup",e.form),r(),a("fluid",!0)("ngClass",b(14,Ge,e.isInvalid("name"))),r(),a("ngIf",e.isInvalid("name")),r(3),y(b(16,Me,e.router.url.includes("forms"))),r(2),y(b(18,Me,e.router.url.includes("forms"))),r(4),a("formGroup",e.form),r(),a("ngIf",e.rolesFormArray.length>0),r(2),a("formGroup",e.form)}}var ut=(()=>{class t extends he{constructor(){super(...arguments),this.service=c(Fe),this.fb=c(ee),this.cdr=c(V),this.route=c(z),this.router=c(U),this.roleService=c(se),this.form=this.fb.group({groupID:this.fb.control(""),name:this.fb.control("",[H.required]),description:this.fb.control(""),roles:this.fb.array([])}),this.groupFormMeta=A(null)}ngOnInit(){this.route.queryParamMap.pipe(I(e=>this.service.getGroupFormMeta(e.get("groupID")).pipe(C(o=>{this.groupFormMeta.set(o),this.populateForm(o)})))).subscribe()}populateForm(e){this.form.patchValue({groupID:e.form.groupID,name:e.form.name,description:e.form.description});let o=this.rolesFormArray;o.clear(),e.options.roles.forEach(p=>{let s=this.fb.array(p.roles.map(m=>this.fb.group({id:this.fb.control(m.id),name:this.fb.control(m.name),checked:this.fb.control({value:e.form.rolesID.includes(m.id),disabled:!this.roleService.user().edit}),description:this.fb.control(m.description||"")}))),u=this.fb.group({groupName:this.fb.control(p.name),groupChecked:this.fb.control(!1),roles:s}),Te=s.controls.every(m=>m.get("checked").value);u.get("groupChecked").setValue(Te,{emitEvent:!1}),this.roleService.user().edit?u.get("groupChecked").enable():u.get("groupChecked").disable(),u.get("groupChecked").valueChanges.subscribe(m=>{s.controls.forEach(x=>{x.get("checked").setValue(m,{emitEvent:!1})})}),s.valueChanges.subscribe(()=>{let m=s.controls.every(x=>x.get("checked").value);u.get("groupChecked").setValue(m,{emitEvent:!1})}),o.push(u)}),this.cdr.detectChanges()}get rolesFormArray(){return this.form.get("roles")}getRolesArray(e){return this.rolesFormArray.at(e).get("roles")}getSelectedRoleIDs(){let e=[];return this.rolesFormArray.controls.forEach(o=>{o.get("roles").controls.forEach(s=>{s.get("checked").value&&e.push(s.get("id").value)})}),e}onSubmit(){if(this.form.invalid){this.form.markAllAsTouched();return}let e={groupID:this.form.get("groupID").value,name:this.form.get("name").value,rolesID:this.getSelectedRoleIDs(),description:this.form.controls.description.value};this.service.assignGroupRole(e).pipe(C(()=>{this.router.navigate(["/pages/users/groups"])})).subscribe()}static{this.\u0275fac=(()=>{let e;return function(p){return(e||(e=N(t)))(p||t)}})()}static{this.\u0275cmp=D({type:t,selectors:[["app-group-form"]],features:[P],decls:5,vars:1,consts:[["actionButton",""],["content",""],["pageTitle","Group Form",3,"overflowScroll"],["label","Submit",3,"onClick",4,"ngIf"],["label","Submit",3,"onClick"],[1,"d-flex","flex-column","gap-3","py-2"],[1,"d-flex","flex-column","gap-2",3,"formGroup"],["type","text","pInputText","","formControlName","name","placeholder","Group Name",3,"fluid","ngClass"],[4,"ngIf"],["value","0"],["value","1"],[2,"padding-left","0"],["formArrayName","roles","class","container-fluid d-flex flex-column row-gap-3",4,"ngIf"],[3,"formGroup"],["formControlName","description","fluid","","rows","5","cols","30","pTextarea",""],[4,"ngFor","ngForOf"],[1,"text-danger"],["formArrayName","roles",1,"container-fluid","d-flex","flex-column","row-gap-3"],[1,"row","align-items-stretch",3,"formGroupName"],[1,"col-2","py-2","border-top","border-bottom","border-start","d-flex","justify-content-between",2,"background","#f6f6f6"],[1,"d-flex","justify-content-center","w-100"],[1,"text-dark","fw-semibold","fs-2"],["size","small","formControlName","groupChecked",3,"binary"],[1,"col","p-0"],["formArrayName","roles",1,"roles-grid","h-100"],["tooltipPosition","top",1,"role-cell",3,"formGroupName","pTooltip"],[1,"py-2","d-flex","h-100","align-items-center","gap-2","px-2"],["size","small","formControlName","checked",3,"binary"],[1,"fs-2","text-dark","m-0"]],template:function(o,p){o&1&&(i(0,"app-main-panel",2),f(1,Ne,1,1,"ng-template",null,0,T)(3,Re,19,20,"ng-template",null,1,T),n()),o&2&&a("overflowScroll",!0)},dependencies:[ue,re,oe,te,Q,L,J,K,W,Z,X,Y,q,B,$,j,ne,ie,ye,Ce,xe,be,_e,ve,ge,fe,le,ae,ke,me,pe,de,ce],styles:["[_nghost-%COMP%]{display:block}[_nghost-%COMP%] .p-checkbox{display:flex!important}[_nghost-%COMP%] .p-tabs .p-tab{padding-left:0!important}[_nghost-%COMP%] .p-panel .p-panel-header{display:none!important}.roles-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(4,1fr)}.role-cell[_ngcontent-%COMP%]{border:1px solid #ddd;border-top:none;border-left:none;background:#fff}.roles-grid[_ngcontent-%COMP%] > [_ngcontent-%COMP%]:nth-child(-n+4){border-top:1px solid #ddd}.roles-grid[_ngcontent-%COMP%] > [_ngcontent-%COMP%]:nth-child(4n+1){border-left:1px solid #ddd}"],changeDetection:0})}}return t})();export{ut as GroupFormComponent};
1
+ import{a as Fe,b as ke}from"./chunk-FWAGEKIF.js";import{a as _e,b as ve,c as be,d as xe,e as Ce,f as ye}from"./chunk-RM5HLXNW.js";import"./chunk-E6SW7I4D.js";import{a as fe,b as ge}from"./chunk-PGOSR3RI.js";import{a as he}from"./chunk-XKI7WLHE.js";import{a as se}from"./chunk-6WWXJJID.js";import"./chunk-U2VDC52W.js";import"./chunk-UPSNJEHO.js";import{a as oe,b as re}from"./chunk-PPXXWO4E.js";import"./chunk-M4SSELXT.js";import"./chunk-QPPFPDWZ.js";import{i as ue}from"./chunk-D2CH2T3I.js";import"./chunk-S27Z7D3D.js";import{a as pe,b as me}from"./chunk-AD247LWQ.js";import"./chunk-BKTBVFNX.js";import"./chunk-ZFNIPERQ.js";import{n as ie,o as ne,w as ae,x as le,y as ce,z as de}from"./chunk-ME4ALIS7.js";import"./chunk-DTYVTTET.js";import{b as L,c as H,e as J,f as K,k as Q,l as W,m as X,n as Y,o as Z,u as ee,x as te}from"./chunk-VMI3QWC6.js";import{b as z,d as U}from"./chunk-F7PVAVLQ.js";import"./chunk-KGNH5JRZ.js";import"./chunk-5DRALZZF.js";import"./chunk-2BI7WNJP.js";import{h as B,j as $,k as j,s as q}from"./chunk-ZK43JB4A.js";import"./chunk-F2X3VGZZ.js";import{Cb as P,Eb as f,Ec as v,Fc as b,Ha as A,Mb as a,Pb as _,Qb as y,Sb as F,Sc as T,Ub as k,Vb as M,Wb as i,Wc as V,Xb as n,Y as I,Yb as g,_ as C,ac as O,fc as w,gc as d,ia as c,ib as r,qa as G,ra as E,sc as h,tc as S,ua as N,uc as R,yb as D}from"./chunk-6QJHEOXN.js";import"./chunk-YQFG5XE2.js";var Ie=()=>({height:"calc(100vh - 70px)"}),Ge=t=>({"ng-invalid ng-dirty":t}),Me=t=>({"ps-0":t}),Se=()=>({display:"flex"});function Ee(t,l){if(t&1){let e=O();i(0,"p-button",4),w("onClick",function(){G(e);let p=d(2);return E(p.onSubmit())}),n()}}function Ne(t,l){if(t&1&&f(0,Ee,1,0,"p-button",3),t&2){let e=d();a("ngIf",e.roleService.user().edit)}}function Ae(t,l){if(t&1&&(i(0,"div")(1,"span",16),h(2),n()()),t&2){let e=l.$implicit;r(2),S(e)}}function De(t,l){if(t&1&&(i(0,"div"),f(1,Ae,3,1,"div",15),n()),t&2){let e=d(2);r(),a("ngForOf",e.getErrors("name"))}}function Pe(t,l){if(t&1&&(i(0,"div",25)(1,"div",26),g(2,"p-checkbox",27),i(3,"p",28),h(4),n()()()),t&2){let e=l.$implicit,o=l.$index;a("formGroupName",o)("pTooltip",e.get("description").value),r(2),_(v(6,Se)),a("binary",!0),r(2),R(" ",e.get("name").value," ")}}function Oe(t,l){if(t&1&&(i(0,"div",18)(1,"div",19)(2,"div",20)(3,"span",21),h(4),n()(),g(5,"p-checkbox",22),n(),i(6,"div",23)(7,"div",24),k(8,Pe,5,7,"div",25,F),n()()()),t&2){let e=l.$implicit,o=l.$index,p=d(3);a("formGroupName",o),r(4),S(e.get("groupName").value),r(),_(v(5,Se)),a("binary",!0),r(3),M(p.getRolesArray(o).controls)}}function we(t,l){if(t&1&&(i(0,"div",17),k(1,Oe,10,6,"div",18,F),n()),t&2){let e=d(2);r(),M(e.rolesFormArray.controls)}}function Re(t,l){if(t&1&&(i(0,"p-panel")(1,"div",5),g(2,"app-user-tabs"),i(3,"form",6),g(4,"input",7),f(5,De,2,1,"div",8),n(),i(6,"p-tabs",9)(7,"p-tablist")(8,"p-tab",9),h(9,"Permission"),n(),i(10,"p-tab",10),h(11,"Description"),n()(),i(12,"p-tabpanels",11)(13,"p-tabpanel",9)(14,"form",6),f(15,we,3,0,"div",12),n()(),i(16,"p-tabpanel",10)(17,"div",13),g(18,"textarea",14),n()()()()()()),t&2){let e=d();_(v(13,Ie)),r(3),a("formGroup",e.form),r(),a("fluid",!0)("ngClass",b(14,Ge,e.isInvalid("name"))),r(),a("ngIf",e.isInvalid("name")),r(3),y(b(16,Me,e.router.url.includes("forms"))),r(2),y(b(18,Me,e.router.url.includes("forms"))),r(4),a("formGroup",e.form),r(),a("ngIf",e.rolesFormArray.length>0),r(2),a("formGroup",e.form)}}var ut=(()=>{class t extends he{constructor(){super(...arguments),this.service=c(Fe),this.fb=c(ee),this.cdr=c(V),this.route=c(z),this.router=c(U),this.roleService=c(se),this.form=this.fb.group({groupID:this.fb.control(""),name:this.fb.control("",[H.required]),description:this.fb.control(""),roles:this.fb.array([])}),this.groupFormMeta=A(null)}ngOnInit(){this.route.queryParamMap.pipe(I(e=>this.service.getGroupFormMeta(e.get("groupID")).pipe(C(o=>{this.groupFormMeta.set(o),this.populateForm(o)})))).subscribe()}populateForm(e){this.form.patchValue({groupID:e.form.groupID,name:e.form.name,description:e.form.description});let o=this.rolesFormArray;o.clear(),e.options.roles.forEach(p=>{let s=this.fb.array(p.roles.map(m=>this.fb.group({id:this.fb.control(m.id),name:this.fb.control(m.name),checked:this.fb.control({value:e.form.rolesID.includes(m.id),disabled:!this.roleService.user().edit}),description:this.fb.control(m.description||"")}))),u=this.fb.group({groupName:this.fb.control(p.name),groupChecked:this.fb.control(!1),roles:s}),Te=s.controls.every(m=>m.get("checked").value);u.get("groupChecked").setValue(Te,{emitEvent:!1}),this.roleService.user().edit?u.get("groupChecked").enable():u.get("groupChecked").disable(),u.get("groupChecked").valueChanges.subscribe(m=>{s.controls.forEach(x=>{x.get("checked").setValue(m,{emitEvent:!1})})}),s.valueChanges.subscribe(()=>{let m=s.controls.every(x=>x.get("checked").value);u.get("groupChecked").setValue(m,{emitEvent:!1})}),o.push(u)}),this.cdr.detectChanges()}get rolesFormArray(){return this.form.get("roles")}getRolesArray(e){return this.rolesFormArray.at(e).get("roles")}getSelectedRoleIDs(){let e=[];return this.rolesFormArray.controls.forEach(o=>{o.get("roles").controls.forEach(s=>{s.get("checked").value&&e.push(s.get("id").value)})}),e}onSubmit(){if(this.form.invalid){this.form.markAllAsTouched();return}let e={groupID:this.form.get("groupID").value,name:this.form.get("name").value,rolesID:this.getSelectedRoleIDs(),description:this.form.controls.description.value};this.service.assignGroupRole(e).pipe(C(()=>{this.router.navigate(["/pages/users/groups"])})).subscribe()}static{this.\u0275fac=(()=>{let e;return function(p){return(e||(e=N(t)))(p||t)}})()}static{this.\u0275cmp=D({type:t,selectors:[["app-group-form"]],features:[P],decls:5,vars:1,consts:[["actionButton",""],["content",""],["pageTitle","Group Form",3,"overflowScroll"],["label","Submit",3,"onClick",4,"ngIf"],["label","Submit",3,"onClick"],[1,"d-flex","flex-column","gap-3","py-2"],[1,"d-flex","flex-column","gap-2",3,"formGroup"],["type","text","pInputText","","formControlName","name","placeholder","Group Name",3,"fluid","ngClass"],[4,"ngIf"],["value","0"],["value","1"],[2,"padding-left","0"],["formArrayName","roles","class","container-fluid d-flex flex-column row-gap-3",4,"ngIf"],[3,"formGroup"],["formControlName","description","fluid","","rows","5","cols","30","pTextarea",""],[4,"ngFor","ngForOf"],[1,"text-danger"],["formArrayName","roles",1,"container-fluid","d-flex","flex-column","row-gap-3"],[1,"row","align-items-stretch",3,"formGroupName"],[1,"col-2","py-2","border-top","border-bottom","border-start","d-flex","justify-content-between",2,"background","#f6f6f6"],[1,"d-flex","justify-content-center","w-100"],[1,"text-dark","fw-semibold","fs-2"],["size","small","formControlName","groupChecked",3,"binary"],[1,"col","p-0"],["formArrayName","roles",1,"roles-grid","h-100"],["tooltipPosition","top",1,"role-cell",3,"formGroupName","pTooltip"],[1,"py-2","d-flex","h-100","align-items-center","gap-2","px-2"],["size","small","formControlName","checked",3,"binary"],[1,"fs-2","text-dark","m-0"]],template:function(o,p){o&1&&(i(0,"app-main-panel",2),f(1,Ne,1,1,"ng-template",null,0,T)(3,Re,19,20,"ng-template",null,1,T),n()),o&2&&a("overflowScroll",!0)},dependencies:[ue,re,oe,te,Q,L,J,K,W,Z,X,Y,q,B,$,j,ne,ie,ye,Ce,xe,be,_e,ve,ge,fe,le,ae,ke,me,pe,de,ce],styles:["[_nghost-%COMP%]{display:block}[_nghost-%COMP%] .p-checkbox{display:flex!important}[_nghost-%COMP%] .p-tabs .p-tab{padding-left:0!important}[_nghost-%COMP%] .p-panel .p-panel-header{display:none!important}.roles-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(4,1fr)}.role-cell[_ngcontent-%COMP%]{border:1px solid #ddd;border-top:none;border-left:none;background:#fff}.roles-grid[_ngcontent-%COMP%] > [_ngcontent-%COMP%]:nth-child(-n+4){border-top:1px solid #ddd}.roles-grid[_ngcontent-%COMP%] > [_ngcontent-%COMP%]:nth-child(4n+1){border-left:1px solid #ddd}"],changeDetection:0})}}return t})();export{ut as GroupFormComponent};
@@ -1,4 +1,4 @@
1
- import{a as ie,b as kt}from"./chunk-FWAGEKIF.js";import{f as Tt}from"./chunk-RM5HLXNW.js";import"./chunk-E6SW7I4D.js";import{a as vt}from"./chunk-G4XX7EU2.js";import{a as yt}from"./chunk-XKI7WLHE.js";import{a as Ct}from"./chunk-ELMSU4U7.js";import"./chunk-VDXZGF3M.js";import"./chunk-MHRSQRHT.js";import{a as st}from"./chunk-6WWXJJID.js";import"./chunk-U2VDC52W.js";import{a as ee,b as te}from"./chunk-3VQUNDVT.js";import{d as gt,i as wt,j as bt,k as xt}from"./chunk-DGACZ747.js";import"./chunk-EBEY2MBR.js";import"./chunk-AMGBUOC4.js";import"./chunk-UPSNJEHO.js";import"./chunk-VKNINE5Q.js";import"./chunk-E7QWESN4.js";import{a as ft,b as ht}from"./chunk-AN4SAUSA.js";import"./chunk-URH77XNK.js";import"./chunk-PPXXWO4E.js";import"./chunk-3DBSHDAQ.js";import"./chunk-M4SSELXT.js";import"./chunk-QPPFPDWZ.js";import"./chunk-WMZF4DQK.js";import{i as _t}from"./chunk-LKOCOLCM.js";import{a as Ye}from"./chunk-S27Z7D3D.js";import{a as ot,b as at}from"./chunk-AD247LWQ.js";import{b as E,c as lt,d as pt,e as ct,f as mt,g as dt,h as ut}from"./chunk-BKTBVFNX.js";import"./chunk-ZFNIPERQ.js";import{a as Xe,f as O,k as et,m as tt,o as it,s as nt,w as Y,x as rt}from"./chunk-ME4ALIS7.js";import"./chunk-DTYVTTET.js";import{A as Ge,C as $e,K as Ze,La as We,Ma as X,Ua as Ke,c as K,e as He,f as Ne,l as Qe,ma as Je,o as ze,u as je,x as qe,z as fe}from"./chunk-VMI3QWC6.js";import{b as Re,d as Ae,e as Oe}from"./chunk-F7PVAVLQ.js";import"./chunk-GPXKVMG6.js";import"./chunk-5DRALZZF.js";import"./chunk-2BI7WNJP.js";import{h as Z,k as J,m as Le,p as Me,s as W}from"./chunk-ZK43JB4A.js";import{c as Be,d as ce,f as me,h as de,i as ue,k as _e}from"./chunk-F2X3VGZZ.js";import{$b as U,$c as Ve,Aa as N,Cb as z,Dc as $,Eb as u,Fc as I,Gc as De,Ha as L,Kc as Ee,Lb as F,Mb as p,Oc as Fe,Pb as Ce,Qb as ae,Qc as Ue,Rb as j,Sb as M,Sc as x,Ub as R,Vb as A,Wb as l,Xb as a,Y as H,Yb as y,Zb as ye,_ as re,_b as ve,_c as D,ac as S,bd as P,c as B,ca as we,cd as Pe,da as be,fc as b,gc as c,hc as Te,ia as C,ib as s,ic as ke,lc as V,mc as q,nc as v,oc as T,qa as _,ra as f,rc as Se,sc as d,tc as k,ua as oe,uc as G,wc as Ie,xc as se,yb as Q,yc as le,zb as xe,zc as pe}from"./chunk-6QJHEOXN.js";import{a as h,b as g}from"./chunk-YQFG5XE2.js";var Dt={data:[],count:0,filter:{pagination:1,pageSize:10,groupID:null,text:""},meta:{filter:{pagination:1,pageSize:10,groupID:null,text:""},options:{groups:[]}},metaForm:{form:{id:"",groupID:"",accessTypeID:1,listJournalTagID:[]},options:{users:[],groups:[],accessTypes:[],journalTags:[]}}},he=lt(ut("UserStore"),dt(Dt),pt(t=>({first:P(()=>(t.filter().pagination-1)*t.filter().pageSize+1),end:P(()=>Math.min(t.filter().pagination*t.filter().pageSize,t.count())),hasCheckedRows:P(()=>t.data().some(o=>o.checked)),checkedData:P(()=>t.data().filter(o=>o.checked).map(o=>o.userID)),selectedID:P(()=>t.data().find(o=>o.checked)?.userID||null)})),mt(t=>{let o=C(ie);return{setFilter(n){E(t,i=>g(h({},i),{filter:n}))},onRowSelect(n){E(t,i=>{let r=i.data.map(m=>m.userID===n.userID?g(h({},m),{checked:!0}):m);return g(h({},i),{data:r})})},onRowUnselect(n){E(t,i=>{let r=i.data.map(m=>m.userID===n.userID?g(h({},m),{checked:!1}):m);return g(h({},i),{data:r})})},onHeaderCheckboxToggle(n){let i=localStorage.getItem("AUTH_USERNAME");E(t,r=>{let m=r.data.map(w=>w.userName!==i?g(h({},w),{checked:n}):g(h({},w),{checked:!1}));return g(h({},r),{data:m})})},getUserLoader:ee(B(H(()=>o.getUserLoaderList().pipe(te({next:n=>{E(t,i=>g(h({},i),{meta:n}))},error:n=>{console.error("Failed to fetch user loader list:",n)}}))))),getUserFormMeta:ee(B(H(n=>o.getUserFormMeta(n).pipe(te({next:i=>{E(t,r=>g(h({},r),{metaForm:i}))},error:i=>{console.error("Failed to fetch user form meta:",i)}}))))),getUsers:ee(B(H(n=>o.getUsers(n).pipe(te({next:i=>{E(t,r=>g(h({},r),{data:i.data.map(m=>g(h({},m),{checked:!1})),count:i.count}))},error:i=>{console.error("Failed to fetch users:",i)}})))))}}),ct({onInit:t=>{t.getUserLoader(),t.getUsers(t.filter)}}));var Ut=["header"],Vt=["footer"],Pt=["content"],Lt=["closeicon"],Mt=["headless"],Rt=["maskRef"],At=["container"],Ot=["closeButton"],Bt=["*"],Ht=(t,o,e,n,i,r)=>({"p-drawer":!0,"p-drawer-active":t,"p-drawer-left":o,"p-drawer-right":e,"p-drawer-top":n,"p-drawer-bottom":i,"p-drawer-full":r}),Nt=(t,o)=>({transform:t,transition:o}),Qt=t=>({value:"visible",params:t});function zt(t,o){t&1&&U(0)}function jt(t,o){if(t&1&&u(0,zt,1,0,"ng-container",4),t&2){let e=c(2);p("ngTemplateOutlet",e.headlessTemplate||e._headlessTemplate)}}function qt(t,o){t&1&&U(0)}function Gt(t,o){if(t&1&&(l(0,"div"),d(1),a()),t&2){let e=c(3);ae(e.cx("title")),s(),k(e.header)}}function $t(t,o){t&1&&y(0,"TimesIcon"),t&2&&F("data-pc-section","closeicon")}function Zt(t,o){}function Jt(t,o){t&1&&u(0,Zt,0,0,"ng-template")}function Wt(t,o){if(t&1&&u(0,$t,1,1,"TimesIcon",8)(1,Jt,1,0,null,4),t&2){let e=c(4);p("ngIf",!e.closeIconTemplate&&!e._closeIconTemplate),s(),p("ngTemplateOutlet",e.closeIconTemplate||e._closeIconTemplate)}}function Kt(t,o){if(t&1){let e=S();l(0,"p-button",9),b("onClick",function(i){_(e);let r=c(3);return f(r.close(i))})("keydown.enter",function(i){_(e);let r=c(3);return f(r.close(i))}),u(1,Wt,2,2,"ng-template",null,1,x),a()}if(t&2){let e=c(3);p("ngClass",e.cx("closeButton"))("buttonProps",e.closeButtonProps)("ariaLabel",e.ariaCloseLabel),F("data-pc-section","closebutton")("data-pc-group-section","iconcontainer")}}function Xt(t,o){t&1&&U(0)}function Yt(t,o){t&1&&U(0)}function ei(t,o){if(t&1&&(ye(0),l(1,"div",5),u(2,Yt,1,0,"ng-container",4),a(),ve()),t&2){let e=c(3);s(),p("ngClass",e.cx("footer")),F("data-pc-section","footer"),s(),p("ngTemplateOutlet",e.footerTemplate||e._footerTemplate)}}function ti(t,o){if(t&1&&(l(0,"div",5),u(1,qt,1,0,"ng-container",4)(2,Gt,2,3,"div",6)(3,Kt,3,5,"p-button",7),a(),l(4,"div",5),ke(5),u(6,Xt,1,0,"ng-container",4),a(),u(7,ei,3,3,"ng-container",8)),t&2){let e=c(2);p("ngClass",e.cx("header")),F("data-pc-section","header"),s(),p("ngTemplateOutlet",e.headerTemplate||e._headerTemplate),s(),p("ngIf",e.header),s(),p("ngIf",e.showCloseIcon&&e.closable),s(),p("ngClass",e.cx("content")),F("data-pc-section","content"),s(2),p("ngTemplateOutlet",e.contentTemplate||e._contentTemplate),s(),p("ngIf",e.footerTemplate||e._footerTemplate)}}function ii(t,o){if(t&1){let e=S();l(0,"div",3,0),b("@panelState.start",function(i){_(e);let r=c();return f(r.onAnimationStart(i))})("@panelState.done",function(i){_(e);let r=c();return f(r.onAnimationEnd(i))})("keydown",function(i){_(e);let r=c();return f(r.onKeyDown(i))}),u(2,jt,1,1,"ng-container")(3,ti,8,9),a()}if(t&2){let e=c();Ce(e.style),ae(e.styleClass),p("ngClass",Ee(9,Ht,e.visible,e.position==="left"&&!e.fullScreen,e.position==="right"&&!e.fullScreen,e.position==="top"&&!e.fullScreen,e.position==="bottom"&&!e.fullScreen,e.fullScreen||e.position==="full"))("@panelState",I(19,Qt,De(16,Nt,e.transformOptions,e.transitionOptions))),F("data-pc-name","sidebar")("data-pc-section","root"),s(2),j(e.headlessTemplate||e._headlessTemplate?2:3)}}var ni=({dt:t})=>`
1
+ import{a as ie,b as kt}from"./chunk-FWAGEKIF.js";import{f as Tt}from"./chunk-RM5HLXNW.js";import"./chunk-E6SW7I4D.js";import{a as vt}from"./chunk-G4XX7EU2.js";import{a as yt}from"./chunk-XKI7WLHE.js";import{a as Ct}from"./chunk-ELMSU4U7.js";import"./chunk-VDXZGF3M.js";import"./chunk-MHRSQRHT.js";import{a as st}from"./chunk-6WWXJJID.js";import"./chunk-U2VDC52W.js";import{a as ee,b as te}from"./chunk-3VQUNDVT.js";import{d as gt,i as wt,j as bt,k as xt}from"./chunk-DGACZ747.js";import"./chunk-EBEY2MBR.js";import"./chunk-AMGBUOC4.js";import"./chunk-UPSNJEHO.js";import"./chunk-VKNINE5Q.js";import"./chunk-E7QWESN4.js";import{a as ft,b as ht}from"./chunk-AN4SAUSA.js";import"./chunk-URH77XNK.js";import"./chunk-PPXXWO4E.js";import"./chunk-3DBSHDAQ.js";import"./chunk-M4SSELXT.js";import"./chunk-QPPFPDWZ.js";import"./chunk-WMZF4DQK.js";import{i as _t}from"./chunk-D2CH2T3I.js";import{a as Ye}from"./chunk-S27Z7D3D.js";import{a as ot,b as at}from"./chunk-AD247LWQ.js";import{b as E,c as lt,d as pt,e as ct,f as mt,g as dt,h as ut}from"./chunk-BKTBVFNX.js";import"./chunk-ZFNIPERQ.js";import{a as Xe,f as O,k as et,m as tt,o as it,s as nt,w as Y,x as rt}from"./chunk-ME4ALIS7.js";import"./chunk-DTYVTTET.js";import{A as Ge,C as $e,K as Ze,La as We,Ma as X,Ua as Ke,c as K,e as He,f as Ne,l as Qe,ma as Je,o as ze,u as je,x as qe,z as fe}from"./chunk-VMI3QWC6.js";import{b as Re,d as Ae,e as Oe}from"./chunk-F7PVAVLQ.js";import"./chunk-KGNH5JRZ.js";import"./chunk-5DRALZZF.js";import"./chunk-2BI7WNJP.js";import{h as Z,k as J,m as Le,p as Me,s as W}from"./chunk-ZK43JB4A.js";import{c as Be,d as ce,f as me,h as de,i as ue,k as _e}from"./chunk-F2X3VGZZ.js";import{$b as U,$c as Ve,Aa as N,Cb as z,Dc as $,Eb as u,Fc as I,Gc as De,Ha as L,Kc as Ee,Lb as F,Mb as p,Oc as Fe,Pb as Ce,Qb as ae,Qc as Ue,Rb as j,Sb as M,Sc as x,Ub as R,Vb as A,Wb as l,Xb as a,Y as H,Yb as y,Zb as ye,_ as re,_b as ve,_c as D,ac as S,bd as P,c as B,ca as we,cd as Pe,da as be,fc as b,gc as c,hc as Te,ia as C,ib as s,ic as ke,lc as V,mc as q,nc as v,oc as T,qa as _,ra as f,rc as Se,sc as d,tc as k,ua as oe,uc as G,wc as Ie,xc as se,yb as Q,yc as le,zb as xe,zc as pe}from"./chunk-6QJHEOXN.js";import{a as h,b as g}from"./chunk-YQFG5XE2.js";var Dt={data:[],count:0,filter:{pagination:1,pageSize:10,groupID:null,text:""},meta:{filter:{pagination:1,pageSize:10,groupID:null,text:""},options:{groups:[]}},metaForm:{form:{id:"",groupID:"",accessTypeID:1,listJournalTagID:[]},options:{users:[],groups:[],accessTypes:[],journalTags:[]}}},he=lt(ut("UserStore"),dt(Dt),pt(t=>({first:P(()=>(t.filter().pagination-1)*t.filter().pageSize+1),end:P(()=>Math.min(t.filter().pagination*t.filter().pageSize,t.count())),hasCheckedRows:P(()=>t.data().some(o=>o.checked)),checkedData:P(()=>t.data().filter(o=>o.checked).map(o=>o.userID)),selectedID:P(()=>t.data().find(o=>o.checked)?.userID||null)})),mt(t=>{let o=C(ie);return{setFilter(n){E(t,i=>g(h({},i),{filter:n}))},onRowSelect(n){E(t,i=>{let r=i.data.map(m=>m.userID===n.userID?g(h({},m),{checked:!0}):m);return g(h({},i),{data:r})})},onRowUnselect(n){E(t,i=>{let r=i.data.map(m=>m.userID===n.userID?g(h({},m),{checked:!1}):m);return g(h({},i),{data:r})})},onHeaderCheckboxToggle(n){let i=localStorage.getItem("AUTH_USERNAME");E(t,r=>{let m=r.data.map(w=>w.userName!==i?g(h({},w),{checked:n}):g(h({},w),{checked:!1}));return g(h({},r),{data:m})})},getUserLoader:ee(B(H(()=>o.getUserLoaderList().pipe(te({next:n=>{E(t,i=>g(h({},i),{meta:n}))},error:n=>{console.error("Failed to fetch user loader list:",n)}}))))),getUserFormMeta:ee(B(H(n=>o.getUserFormMeta(n).pipe(te({next:i=>{E(t,r=>g(h({},r),{metaForm:i}))},error:i=>{console.error("Failed to fetch user form meta:",i)}}))))),getUsers:ee(B(H(n=>o.getUsers(n).pipe(te({next:i=>{E(t,r=>g(h({},r),{data:i.data.map(m=>g(h({},m),{checked:!1})),count:i.count}))},error:i=>{console.error("Failed to fetch users:",i)}})))))}}),ct({onInit:t=>{t.getUserLoader(),t.getUsers(t.filter)}}));var Ut=["header"],Vt=["footer"],Pt=["content"],Lt=["closeicon"],Mt=["headless"],Rt=["maskRef"],At=["container"],Ot=["closeButton"],Bt=["*"],Ht=(t,o,e,n,i,r)=>({"p-drawer":!0,"p-drawer-active":t,"p-drawer-left":o,"p-drawer-right":e,"p-drawer-top":n,"p-drawer-bottom":i,"p-drawer-full":r}),Nt=(t,o)=>({transform:t,transition:o}),Qt=t=>({value:"visible",params:t});function zt(t,o){t&1&&U(0)}function jt(t,o){if(t&1&&u(0,zt,1,0,"ng-container",4),t&2){let e=c(2);p("ngTemplateOutlet",e.headlessTemplate||e._headlessTemplate)}}function qt(t,o){t&1&&U(0)}function Gt(t,o){if(t&1&&(l(0,"div"),d(1),a()),t&2){let e=c(3);ae(e.cx("title")),s(),k(e.header)}}function $t(t,o){t&1&&y(0,"TimesIcon"),t&2&&F("data-pc-section","closeicon")}function Zt(t,o){}function Jt(t,o){t&1&&u(0,Zt,0,0,"ng-template")}function Wt(t,o){if(t&1&&u(0,$t,1,1,"TimesIcon",8)(1,Jt,1,0,null,4),t&2){let e=c(4);p("ngIf",!e.closeIconTemplate&&!e._closeIconTemplate),s(),p("ngTemplateOutlet",e.closeIconTemplate||e._closeIconTemplate)}}function Kt(t,o){if(t&1){let e=S();l(0,"p-button",9),b("onClick",function(i){_(e);let r=c(3);return f(r.close(i))})("keydown.enter",function(i){_(e);let r=c(3);return f(r.close(i))}),u(1,Wt,2,2,"ng-template",null,1,x),a()}if(t&2){let e=c(3);p("ngClass",e.cx("closeButton"))("buttonProps",e.closeButtonProps)("ariaLabel",e.ariaCloseLabel),F("data-pc-section","closebutton")("data-pc-group-section","iconcontainer")}}function Xt(t,o){t&1&&U(0)}function Yt(t,o){t&1&&U(0)}function ei(t,o){if(t&1&&(ye(0),l(1,"div",5),u(2,Yt,1,0,"ng-container",4),a(),ve()),t&2){let e=c(3);s(),p("ngClass",e.cx("footer")),F("data-pc-section","footer"),s(),p("ngTemplateOutlet",e.footerTemplate||e._footerTemplate)}}function ti(t,o){if(t&1&&(l(0,"div",5),u(1,qt,1,0,"ng-container",4)(2,Gt,2,3,"div",6)(3,Kt,3,5,"p-button",7),a(),l(4,"div",5),ke(5),u(6,Xt,1,0,"ng-container",4),a(),u(7,ei,3,3,"ng-container",8)),t&2){let e=c(2);p("ngClass",e.cx("header")),F("data-pc-section","header"),s(),p("ngTemplateOutlet",e.headerTemplate||e._headerTemplate),s(),p("ngIf",e.header),s(),p("ngIf",e.showCloseIcon&&e.closable),s(),p("ngClass",e.cx("content")),F("data-pc-section","content"),s(2),p("ngTemplateOutlet",e.contentTemplate||e._contentTemplate),s(),p("ngIf",e.footerTemplate||e._footerTemplate)}}function ii(t,o){if(t&1){let e=S();l(0,"div",3,0),b("@panelState.start",function(i){_(e);let r=c();return f(r.onAnimationStart(i))})("@panelState.done",function(i){_(e);let r=c();return f(r.onAnimationEnd(i))})("keydown",function(i){_(e);let r=c();return f(r.onKeyDown(i))}),u(2,jt,1,1,"ng-container")(3,ti,8,9),a()}if(t&2){let e=c();Ce(e.style),ae(e.styleClass),p("ngClass",Ee(9,Ht,e.visible,e.position==="left"&&!e.fullScreen,e.position==="right"&&!e.fullScreen,e.position==="top"&&!e.fullScreen,e.position==="bottom"&&!e.fullScreen,e.fullScreen||e.position==="full"))("@panelState",I(19,Qt,De(16,Nt,e.transformOptions,e.transitionOptions))),F("data-pc-name","sidebar")("data-pc-section","root"),s(2),j(e.headlessTemplate||e._headlessTemplate?2:3)}}var ni=({dt:t})=>`
2
2
  .p-drawer {
3
3
  display: flex;
4
4
  flex-direction: column;
@@ -1 +1 @@
1
- import{a as Q}from"./chunk-D6IS6PE6.js";import{f as xt}from"./chunk-ENH6HA3V.js";import{b as vt}from"./chunk-EBEY2MBR.js";import"./chunk-AMGBUOC4.js";import"./chunk-UPSNJEHO.js";import{a as N}from"./chunk-BT7Y4ADP.js";import{b as Pt}from"./chunk-DJXQKSLT.js";import{a as P,b as D}from"./chunk-WXIG4CXY.js";import"./chunk-QPPFPDWZ.js";import"./chunk-WMZF4DQK.js";import{g as S,h as E,i as Mt}from"./chunk-LKOCOLCM.js";import"./chunk-S27Z7D3D.js";import{a as Tt,b as Ot}from"./chunk-AD247LWQ.js";import"./chunk-BKTBVFNX.js";import{c as ft}from"./chunk-ZFNIPERQ.js";import{y as kt,z as yt}from"./chunk-ME4ALIS7.js";import{a as w,b as H}from"./chunk-DTYVTTET.js";import{La as bt,x as Ct}from"./chunk-VMI3QWC6.js";import{l as gt}from"./chunk-F7PVAVLQ.js";import{b as q}from"./chunk-GPXKVMG6.js";import{a as ut}from"./chunk-5DRALZZF.js";import"./chunk-2BI7WNJP.js";import{A as _t,q as mt,s as ht}from"./chunk-ZK43JB4A.js";import"./chunk-F2X3VGZZ.js";import{Da as b,Eb as _,Fa as $,Ha as h,L as z,Mb as m,Oc as J,Pc as K,Rb as f,Sb as it,Sc as X,Ta as tt,Ub as ot,Vb as at,Wb as a,Wc as lt,Xb as r,Yb as g,_ as I,ac as C,bd as dt,ca as Z,cd as T,fc as B,gc as s,ia as u,ib as p,mc as rt,nb as et,nc as st,oc as pt,qa as l,ra as d,rc as R,s as F,sc as k,t as A,tb as nt,tc as ct,u as j,uc as U,wa as W,xc as y,yb as O,yc as M,zc as v}from"./chunk-6QJHEOXN.js";import{a as L,b as V}from"./chunk-YQFG5XE2.js";var G=(()=>{class n{constructor(){this.httpService=u(ut)}createDashboardParams(t){return new _t().set("DashboardPeriod",t)}fetchDashboardLoader(){return this.httpService.get(void 0,"api/DashboardLoader")}fetchCashAndSplineData(t){let e=this.createDashboardParams(t);return this.httpService.get(void 0,"api/dashboard/getcashandbank",{params:e})}fetchCashAndBankPieData(t){let e=this.createDashboardParams(t);return this.httpService.get(void 0,"api/dashboard/getcashandbankpiechart",{params:e})}fetchExpenseSplineData(t){let e=this.createDashboardParams(t);return this.httpService.get(void 0,"api/dashboard/GetExpense",{params:e})}fetchExpensePieData(t){let e=this.createDashboardParams(t);return this.httpService.get(void 0,"api/dashboard/GetExpensePieChart",{params:e})}static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275prov=Z({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})();function Bt(n,c){if(n&1){let t=C();a(0,"p-card",2)(1,"highcharts-chart",5),v("updateChange",function(i){l(t);let o=s();return M(o.updateFlag,i)||(o.updateFlag=i),d(i)}),r()()}if(n&2){let t=s();p(),m("constructorType",t.chartConstructor)("options",t.chartOptionsSpline),y("update",t.updateFlag),m("oneToOne",t.oneToOneFlag)}}function Lt(n,c){n&1&&(a(0,"p-card"),g(1,"p-skeleton",6),r())}function Vt(n,c){if(n&1){let t=C();a(0,"p-card",4)(1,"highcharts-chart",5),v("updateChange",function(i){l(t);let o=s();return M(o.updateFlag,i)||(o.updateFlag=i),d(i)}),r()()}if(n&2){let t=s();p(),m("constructorType",t.chartConstructor)("options",t.chartOptionsPie),y("update",t.updateFlag),m("oneToOne",t.oneToOneFlag)}}function Ft(n,c){n&1&&(a(0,"p-card"),g(1,"p-skeleton",6),r())}var Et=(()=>{class n{constructor(){this.chartConstructor="chart",this.updateFlag=!1,this.oneToOneFlag=!0,this.chartOptionsSpline={},this.chartOptionsPie={},this.dashboardService=u(G),this.cdr=u(lt),this.injector=u(W),this.params=h({dashboardPeriod:2}),this.cashBankTitle=b(),this.amountCashBank=b(),this.isLoading=nt(!0),this.tooltip=b(),this.cashAndBankSource=H((q.production?w(this.params):w(this.params).pipe(z(500))).pipe(j(({dashboardPeriod:t})=>A([this.dashboardService.fetchCashAndSplineData(t),this.dashboardService.fetchCashAndBankPieData(t)])),N("Cash & Bank Dashboard Data"),I(([t])=>{this.isLoading.set(!1),this.amountCashBank.emit(t.data),this.tooltip.emit(t.toolTip)}),F(([t,e])=>({splineData:t,pieData:e}))),{initialValue:null}),T(()=>{let t=this.cashAndBankSource();if(!t)return;let{splineData:e,pieData:i}=t;this.cashBankTitle.emit(e.title),tt(()=>{this.chartOptionsSpline={chart:{height:300},title:{text:e.chartTitle,align:"left",style:{fontWeight:"normal"}},xAxis:{categories:[...e.chart.labels]},yAxis:{title:{text:""}},series:[V(L({},e.chart.series),{type:"spline",name:"Amount",data:[...e.chart.series.data]})],plotOptions:{line:{dataLabels:{enabled:!0},enableMouseTracking:!1}}},this.chartOptionsPie={chart:{type:"pie"},title:{text:e.pieTitle,align:"left",style:{fontWeight:"normal"}},series:[{type:"pie",name:"Amount",data:[...i.series.filter(o=>o.y>0)]}],plotOptions:{pie:{allowPointSelect:!0,cursor:"pointer",dataLabels:[{enabled:!1}],showInLegend:!0}}},this.updateFlag=!0,this.cdr.detectChanges()},{injector:this.injector})})}static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275cmp=O({type:n,selectors:[["app-cash-bank"]],inputs:{isLoading:[1,"isLoading"]},outputs:{cashBankTitle:"cashBankTitle",amountCashBank:"amountCashBank",isLoading:"isLoadingChange",tooltip:"tooltip"},decls:7,vars:2,consts:[[1,"row"],[1,"col-12","col-md-6","col-lg-7"],[1,"chart"],[1,"col-12","col-md-6","col-lg-5"],[1,"pie_chart"],[1,"chart",3,"updateChange","constructorType","options","update","oneToOne"],["width","100%","height","15rem"]],template:function(e,i){e&1&&(a(0,"div",0)(1,"div",1),_(2,Bt,2,4,"p-card",2)(3,Lt,2,0,"p-card"),r(),a(4,"div",3),_(5,Vt,2,4,"p-card",4)(6,Ft,2,0,"p-card"),r()()),e&2&&(p(2),f(i.isLoading()?3:2),p(3),f(i.isLoading()?6:5))},dependencies:[Q,E,S,D,P],styles:[".chart[_ngcontent-%COMP%]{width:100%;height:400px;display:block} p-card.chart .p-card-body{padding-top:0!important;padding-bottom:0!important} p-card.pie_chart .p-card-body{padding-top:0!important;padding-bottom:0!important}"]})}}return n})();function At(n,c){if(n&1){let t=C();a(0,"p-card",2)(1,"highcharts-chart",5),v("updateChange",function(i){l(t);let o=s();return M(o.updateFlag,i)||(o.updateFlag=i),d(i)}),r()()}if(n&2){let t=s();p(),m("constructorType",t.chartConstructor)("options",t.chartOptionsSpline),y("update",t.updateFlag),m("oneToOne",t.oneToOneFlag)}}function jt(n,c){n&1&&(a(0,"p-card"),g(1,"p-skeleton",6),r())}function zt(n,c){if(n&1){let t=C();a(0,"p-card",4)(1,"highcharts-chart",5),v("updateChange",function(i){l(t);let o=s();return M(o.updateFlag,i)||(o.updateFlag=i),d(i)}),r()()}if(n&2){let t=s();p(),m("constructorType",t.chartConstructor)("options",t.chartOptionsPie),y("update",t.updateFlag),m("oneToOne",t.oneToOneFlag)}}function It(n,c){n&1&&(a(0,"p-card"),g(1,"p-skeleton",6),r())}var Dt=(()=>{class n{constructor(){this.chartConstructor="chart",this.updateFlag=!1,this.oneToOneFlag=!0,this.chartOptionsSpline={},this.chartOptionsPie={},this.dashboardService=u(G),this.isLoading=h(!0),this.amountExpense=b(),this.params=h({dashboardPeriod:2}),this.expenseTitle=b(),this.tooltip=b(),this.expenseSource=H((q.production?w(this.params):w(this.params).pipe(z(500))).pipe(j(({dashboardPeriod:t})=>A([this.dashboardService.fetchExpenseSplineData(t),this.dashboardService.fetchExpensePieData(t)])),N("Expense Dashboard Data"),I(([t])=>{this.isLoading.set(!1),this.amountExpense.emit(t.data),this.expenseTitle.emit(t.title),this.tooltip.emit(t.toolTip)}),F(([t,e])=>({splineData:t,pieData:e}))),{initialValue:null}),T(()=>{let t=this.expenseSource();if(!t)return;let{splineData:e,pieData:i}=t;console.log("Spline Data:",e),console.log("Pie Data:",i),this.chartOptionsSpline={chart:{height:300},title:{text:e.chartTitle,align:"left",style:{fontWeight:"normal"}},xAxis:{categories:[...e.chart.labels]},yAxis:{title:{text:""}},series:[V(L({},e.chart.series),{type:"spline",name:"Amount",data:[...e.chart.series.data]})],plotOptions:{line:{dataLabels:{enabled:!0},enableMouseTracking:!1}}},this.chartOptionsPie={chart:{type:"pie"},title:{text:e.pieTitle,align:"left",style:{fontWeight:"normal"}},series:[{type:"pie",name:"Amount",data:[...i.series.filter(o=>o.y>0)]}],plotOptions:{pie:{allowPointSelect:!0,cursor:"pointer",dataLabels:[{enabled:!1}],showInLegend:!0}}},this.updateFlag=!0})}static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275cmp=O({type:n,selectors:[["app-expense"]],outputs:{amountExpense:"amountExpense",expenseTitle:"expenseTitle",tooltip:"tooltip"},decls:7,vars:2,consts:[[1,"row"],[1,"col-12","col-md-6","col-lg-7"],[1,"chart"],[1,"col-12","col-md-6","col-lg-5"],[1,"pie_chart"],[1,"chart",3,"updateChange","constructorType","options","update","oneToOne"],["width","100%","height","15rem"]],template:function(e,i){e&1&&(a(0,"div",0)(1,"div",1),_(2,At,2,4,"p-card",2)(3,jt,2,0,"p-card"),r(),a(4,"div",3),_(5,zt,2,4,"p-card",4)(6,It,2,0,"p-card"),r()()),e&2&&(p(2),f(i.isLoading()?3:2),p(3),f(i.isLoading()?6:5))},dependencies:[Q,E,S,D,P],styles:[".chart[_ngcontent-%COMP%]{width:100%;height:400px;display:block} p-card.chart .p-card-body{padding-top:0!important;padding-bottom:0!important} p-card.pie_chart .p-card-body{padding-top:0!important;padding-bottom:0!important}"]})}}return n})();function Wt(n,c){if(n&1&&(a(0,"span"),k(1),r()),n&2){let t=c.$implicit;p(),ct(t)}}function Rt(n,c){if(n&1&&(a(0,"div",21),ot(1,Wt,2,1,"span",null,it),r()),n&2){let t=s(3);p(),at(t.tooltipExpense())}}function qt(n,c){if(n&1){let t=C();g(0,"input",10,1),a(2,"button",11),B("click",function(i){l(t);let o=R(1),x=s(2);return d(x.handleLinkClick(i,o))}),a(3,"div",12)(4,"div",13)(5,"div",14),g(6,"i",15),r()(),a(7,"p-card",16,2),_(9,Rt,3,0,"ng-template",null,3,X),a(11,"div",17)(12,"div",18)(13,"span",19),k(14,"Expense"),r(),a(15,"p",20),k(16),J(17,"number"),r()()()()()()}if(n&2){let t=R(10),e=s(2);p(7),m("pTooltip",t)("fitContent",!1),p(9),U(" ",K(17,3,e.amounts.expense())," ")}}function Ht(n,c){n&1&&g(0,"p-skeleton",9)}function Nt(n,c){if(n&1&&(a(0,"div",17)(1,"div",18)(2,"span",19),k(3,"Cash and Bank"),r(),a(4,"p",20),k(5),J(6,"number"),r()()()),n&2){let t=s(3);p(5),U(" ",t.amounts.cashBank()===0?"-":K(6,1,t.amounts.cashBank())," ")}}function Qt(n,c){if(n&1){let t=C();g(0,"input",22,4),a(2,"button",11),B("click",function(i){l(t);let o=R(1),x=s(2);return d(x.handleLinkClick(i,o))}),a(3,"div",12)(4,"div",23),g(5,"i",24),r(),a(6,"p-card",25,2),_(8,Nt,7,3,"ng-template",26),r()()()}if(n&2){let t=s(2);p(6),m("pTooltip",t.tooltip.cashBank())}}function Gt(n,c){n&1&&g(0,"p-skeleton",9)}function Ut(n,c){if(n&1){let t=C();a(0,"app-expense",27),B("amountExpense",function(i){l(t);let o=s(2);return d(o.onAmountExpense(i))})("expenseTitle",function(i){l(t);let o=s(2);return d(o.onExpenseTitle(i))})("tooltip",function(i){l(t);let o=s(2);return d(o.onExpenseTooltip(i))}),r()}}function Jt(n,c){if(n&1){let t=C();a(0,"app-cash-bank",28),B("cashBankTitle",function(i){l(t);let o=s(2);return d(o.onCashBankTitle(i))})("amountCashBank",function(i){l(t);let o=s(2);return d(o.onAmountCashBank(i))})("tooltip",function(i){l(t);let o=s(2);return d(o.onCashBankTooltip(i))}),r()}}function Kt(n,c){if(n&1&&(a(0,"p-panel")(1,"main",6)(2,"div",7)(3,"div",8),_(4,qt,18,5)(5,Ht,1,0,"p-skeleton",9),r(),a(6,"div",8),_(7,Qt,9,1)(8,Gt,1,0,"p-skeleton",9),r()(),_(9,Ut,1,0,"app-expense")(10,Jt,1,0,"app-cash-bank"),r()()),n&2){let t=s();p(4),f(t.isLoading()?5:4),p(3),f(t.isLoading()?8:7),p(2),f(t.activeIndex()===0?9:t.activeIndex()===1?10:-1)}}var Ge=(()=>{class n{constructor(){this.activeIndex=h(0),this.pageTitle=h("Dashboard"),this.isLoading=h(!0),this.tooltip={cashBank:h(""),expense:h("")},this.renderer=u(et),this.injector=u(W),this.tooltipExpense=dt(()=>this.tooltip.expense().match(/^(.*?)\s*(\[[^\]]+\])$/)?[RegExp.$1.trim(),RegExp.$2.trim()]:[this.tooltip.expense()]),this.amounts={cashBank:h(0),expense:h(0)}}ngAfterViewInit(){T(()=>{this.isLoading()||queueMicrotask(()=>this.runCardEffect())},{injector:this.injector}),T(()=>{this.activeIndex(),queueMicrotask(()=>this.runCardEffect())},{injector:this.injector})}runCardEffect(){let t=this.activeIndex(),e=this.cards?.toArray();if(!e||e.length===0)return;e.forEach(o=>{let x=o.nativeElement.querySelector(".p-card-body");x&&(this.renderer.setStyle(x,"height","90px"),this.renderer.removeStyle(x,"background-color"),this.renderer.removeStyle(x,"box-shadow"))});let i=e[t];if(i){let o=i.nativeElement.querySelector(".p-card-body");o&&(this.renderer.setStyle(o,"background-color","#F0F0F0"),this.renderer.setStyle(o,"overflow","hidden"))}}onTabChange(t){this.activeIndex.set(t)}handleLinkClick(t,e){t.stopPropagation(),e.checked=!e.checked,e.checked&&(console.log(e.value),this.onTabChange(Number(e.value)))}onCashBankTitle(t){this.pageTitle.set(t),this.isLoading.set(!1)}onExpenseTitle(t){this.pageTitle.set(t),this.isLoading.set(!1)}onAmountCashBank(t){console.log("Total Amount from CashBank:",t),this.amounts.cashBank.set(t)}onAmountExpense(t){console.log("Total Amount from Expense:",t),this.amounts.expense.set(t)}onExpenseTooltip(t){this.tooltip.expense.set(t)}onCashBankTooltip(t){this.tooltip.cashBank.set(t)}static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275cmp=O({type:n,selectors:[["ng-component"]],viewQuery:function(e,i){if(e&1&&rt(P,5,$),e&2){let o;st(o=pt())&&(i.cards=o)}},decls:3,vars:5,consts:[["content",""],["expenseCheckbox",""],["card",""],["tooltipContent",""],["cashBankCheckbox",""],[3,"hasMainWrapperPadding","limitStrLength","overflowScroll","isLoading","pageTitle"],[1,"d-flex","flex-column","row-gap-10"],[1,"row","row-gap-24"],[1,"col-12","col-md-6","col-lg-4"],["width","100%","height","8rem"],["name","dashboardOption","type","radio","hidden","","value","0"],[1,"btn","p-0","border-none","btn-link","w-100",3,"click"],[1,"card-container"],[1,"box-icon",2,"background-color","#d73636"],[1,"d-flex","text-white","align-items-baseline"],[1,"fa-solid","fa-circle-dollar-to-slot"],["tooltipPosition","top",3,"pTooltip","fitContent"],[1,"d-flex","justify-content-end"],[1,"d-flex","flex-column","align-items-end"],[1,"fs-5"],[1,"box-number","fs-4"],[1,"d-flex","flex-column"],["name","dashboardOption","type","radio","hidden","","value","1"],[1,"box-icon"],[1,"fa-duotone","fa-solid","fa-wallet","text-white"],["tooltipPosition","top",3,"pTooltip"],["pTemplate","content"],[3,"amountExpense","expenseTitle","tooltip"],[3,"cashBankTitle","amountCashBank","tooltip"]],template:function(e,i){e&1&&(a(0,"app-main-panel",5),_(1,Kt,11,3,"ng-template",null,0,X),r()),e&2&&m("hasMainWrapperPadding",!0)("limitStrLength",50)("overflowScroll",!0)("isLoading",i.isLoading())("pageTitle",i.pageTitle())},dependencies:[xt,ft,Mt,D,P,bt,ht,mt,Pt,gt,Ot,Tt,Ct,vt,Et,Dt,E,S,yt,kt],styles:['@charset "UTF-8";.card-container[_ngcontent-%COMP%] a[_ngcontent-%COMP%], .card-container[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0}.card-container[_ngcontent-%COMP%]{position:relative;height:4rem}.card-container[_ngcontent-%COMP%] .box-icon[_ngcontent-%COMP%]{height:50px;width:50px;background-color:#2175d0;display:flex;justify-content:center;align-items:center;z-index:2;position:relative;border-radius:4px;left:1.5rem;top:-.6rem}.card-container[_ngcontent-%COMP%] .box-icon[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:30px}.card-container[_ngcontent-%COMP%] .box-number[_ngcontent-%COMP%]{font-size:1.25rem;font-weight:500}.card-container[_ngcontent-%COMP%] .box-title[_ngcontent-%COMP%]{font-size:1rem}.card-container[_ngcontent-%COMP%] p-card[_ngcontent-%COMP%]{position:absolute;top:calc(2.6rem - 55%);left:0;width:100%;z-index:1;margin:0!important;padding:0!important}@media (max-width: 85rem){.card-container[_ngcontent-%COMP%] a[_ngcontent-%COMP%], .card-container[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0}.card-container[_ngcontent-%COMP%]{position:relative;height:4rem}.card-container[_ngcontent-%COMP%] .box-icon[_ngcontent-%COMP%]{height:50px;width:50px;background-color:#2175d0;display:flex;justify-content:center;align-items:center;z-index:2;position:relative;border-radius:4px;left:1.5rem;top:-.6rem}.card-container[_ngcontent-%COMP%] .box-icon[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:30px}.card-container[_ngcontent-%COMP%] .box-number[_ngcontent-%COMP%]{font-size:1.25rem;font-weight:500}.card-container[_ngcontent-%COMP%] .box-title[_ngcontent-%COMP%]{font-size:1rem}.card-container[_ngcontent-%COMP%] p-card[_ngcontent-%COMP%]{position:absolute;top:calc(2.6rem - 55%);left:0;width:100%;z-index:1;margin:0!important;padding:0!important}}@media (min-width: 85.001rem) and (max-width: 97.999rem){.card-container[_ngcontent-%COMP%] a[_ngcontent-%COMP%], .card-container[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0}.card-container[_ngcontent-%COMP%]{position:relative;height:4rem}.card-container[_ngcontent-%COMP%] .box-icon[_ngcontent-%COMP%]{height:50px;width:50px;background-color:#2175d0;display:flex;justify-content:center;align-items:center;z-index:2;position:relative;border-radius:4px;left:1.5rem;top:-.6rem}.card-container[_ngcontent-%COMP%] .box-icon[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:30px}.card-container[_ngcontent-%COMP%] .box-number[_ngcontent-%COMP%]{font-size:1.25rem;font-weight:500}.card-container[_ngcontent-%COMP%] .box-title[_ngcontent-%COMP%]{font-size:1rem}.card-container[_ngcontent-%COMP%] p-card[_ngcontent-%COMP%]{position:absolute;top:calc(2.6rem - 55%);left:0;width:100%;z-index:1;margin:0!important;padding:0!important}}@media (min-width: 98rem){.card-container[_ngcontent-%COMP%] a[_ngcontent-%COMP%], .card-container[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0}.card-container[_ngcontent-%COMP%]{position:relative;height:4rem}.card-container[_ngcontent-%COMP%] .box-icon[_ngcontent-%COMP%]{height:80px;width:80px;background-color:#2175d0;display:flex;justify-content:center;align-items:center;z-index:2;position:relative;border-radius:4px;left:1.5rem;top:-.6rem}.card-container[_ngcontent-%COMP%] .box-icon[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:40px}.card-container[_ngcontent-%COMP%] .box-number[_ngcontent-%COMP%]{font-size:1.25rem;font-weight:500}.card-container[_ngcontent-%COMP%] .box-title[_ngcontent-%COMP%]{font-size:1.15rem}.card-container[_ngcontent-%COMP%] p-card[_ngcontent-%COMP%]{position:absolute;top:calc(2.6rem - 55%);left:0;width:100%;z-index:1;margin:0!important;padding:0!important}}']})}}return n})();export{Ge as Dashboard1Component};
1
+ import{a as Q}from"./chunk-D6IS6PE6.js";import{f as xt}from"./chunk-ENH6HA3V.js";import{b as vt}from"./chunk-EBEY2MBR.js";import"./chunk-AMGBUOC4.js";import"./chunk-UPSNJEHO.js";import{a as N}from"./chunk-BT7Y4ADP.js";import{b as Pt}from"./chunk-DJXQKSLT.js";import{a as P,b as D}from"./chunk-WXIG4CXY.js";import"./chunk-QPPFPDWZ.js";import"./chunk-WMZF4DQK.js";import{g as S,h as E,i as Mt}from"./chunk-D2CH2T3I.js";import"./chunk-S27Z7D3D.js";import{a as Tt,b as Ot}from"./chunk-AD247LWQ.js";import"./chunk-BKTBVFNX.js";import{c as ft}from"./chunk-ZFNIPERQ.js";import{y as kt,z as yt}from"./chunk-ME4ALIS7.js";import{a as w,b as H}from"./chunk-DTYVTTET.js";import{La as bt,x as Ct}from"./chunk-VMI3QWC6.js";import{l as gt}from"./chunk-F7PVAVLQ.js";import{b as q}from"./chunk-KGNH5JRZ.js";import{a as ut}from"./chunk-5DRALZZF.js";import"./chunk-2BI7WNJP.js";import{A as _t,q as mt,s as ht}from"./chunk-ZK43JB4A.js";import"./chunk-F2X3VGZZ.js";import{Da as b,Eb as _,Fa as $,Ha as h,L as z,Mb as m,Oc as J,Pc as K,Rb as f,Sb as it,Sc as X,Ta as tt,Ub as ot,Vb as at,Wb as a,Wc as lt,Xb as r,Yb as g,_ as I,ac as C,bd as dt,ca as Z,cd as T,fc as B,gc as s,ia as u,ib as p,mc as rt,nb as et,nc as st,oc as pt,qa as l,ra as d,rc as R,s as F,sc as k,t as A,tb as nt,tc as ct,u as j,uc as U,wa as W,xc as y,yb as O,yc as M,zc as v}from"./chunk-6QJHEOXN.js";import{a as L,b as V}from"./chunk-YQFG5XE2.js";var G=(()=>{class n{constructor(){this.httpService=u(ut)}createDashboardParams(t){return new _t().set("DashboardPeriod",t)}fetchDashboardLoader(){return this.httpService.get(void 0,"api/DashboardLoader")}fetchCashAndSplineData(t){let e=this.createDashboardParams(t);return this.httpService.get(void 0,"api/dashboard/getcashandbank",{params:e})}fetchCashAndBankPieData(t){let e=this.createDashboardParams(t);return this.httpService.get(void 0,"api/dashboard/getcashandbankpiechart",{params:e})}fetchExpenseSplineData(t){let e=this.createDashboardParams(t);return this.httpService.get(void 0,"api/dashboard/GetExpense",{params:e})}fetchExpensePieData(t){let e=this.createDashboardParams(t);return this.httpService.get(void 0,"api/dashboard/GetExpensePieChart",{params:e})}static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275prov=Z({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})();function Bt(n,c){if(n&1){let t=C();a(0,"p-card",2)(1,"highcharts-chart",5),v("updateChange",function(i){l(t);let o=s();return M(o.updateFlag,i)||(o.updateFlag=i),d(i)}),r()()}if(n&2){let t=s();p(),m("constructorType",t.chartConstructor)("options",t.chartOptionsSpline),y("update",t.updateFlag),m("oneToOne",t.oneToOneFlag)}}function Lt(n,c){n&1&&(a(0,"p-card"),g(1,"p-skeleton",6),r())}function Vt(n,c){if(n&1){let t=C();a(0,"p-card",4)(1,"highcharts-chart",5),v("updateChange",function(i){l(t);let o=s();return M(o.updateFlag,i)||(o.updateFlag=i),d(i)}),r()()}if(n&2){let t=s();p(),m("constructorType",t.chartConstructor)("options",t.chartOptionsPie),y("update",t.updateFlag),m("oneToOne",t.oneToOneFlag)}}function Ft(n,c){n&1&&(a(0,"p-card"),g(1,"p-skeleton",6),r())}var Et=(()=>{class n{constructor(){this.chartConstructor="chart",this.updateFlag=!1,this.oneToOneFlag=!0,this.chartOptionsSpline={},this.chartOptionsPie={},this.dashboardService=u(G),this.cdr=u(lt),this.injector=u(W),this.params=h({dashboardPeriod:2}),this.cashBankTitle=b(),this.amountCashBank=b(),this.isLoading=nt(!0),this.tooltip=b(),this.cashAndBankSource=H((q.production?w(this.params):w(this.params).pipe(z(500))).pipe(j(({dashboardPeriod:t})=>A([this.dashboardService.fetchCashAndSplineData(t),this.dashboardService.fetchCashAndBankPieData(t)])),N("Cash & Bank Dashboard Data"),I(([t])=>{this.isLoading.set(!1),this.amountCashBank.emit(t.data),this.tooltip.emit(t.toolTip)}),F(([t,e])=>({splineData:t,pieData:e}))),{initialValue:null}),T(()=>{let t=this.cashAndBankSource();if(!t)return;let{splineData:e,pieData:i}=t;this.cashBankTitle.emit(e.title),tt(()=>{this.chartOptionsSpline={chart:{height:300},title:{text:e.chartTitle,align:"left",style:{fontWeight:"normal"}},xAxis:{categories:[...e.chart.labels]},yAxis:{title:{text:""}},series:[V(L({},e.chart.series),{type:"spline",name:"Amount",data:[...e.chart.series.data]})],plotOptions:{line:{dataLabels:{enabled:!0},enableMouseTracking:!1}}},this.chartOptionsPie={chart:{type:"pie"},title:{text:e.pieTitle,align:"left",style:{fontWeight:"normal"}},series:[{type:"pie",name:"Amount",data:[...i.series.filter(o=>o.y>0)]}],plotOptions:{pie:{allowPointSelect:!0,cursor:"pointer",dataLabels:[{enabled:!1}],showInLegend:!0}}},this.updateFlag=!0,this.cdr.detectChanges()},{injector:this.injector})})}static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275cmp=O({type:n,selectors:[["app-cash-bank"]],inputs:{isLoading:[1,"isLoading"]},outputs:{cashBankTitle:"cashBankTitle",amountCashBank:"amountCashBank",isLoading:"isLoadingChange",tooltip:"tooltip"},decls:7,vars:2,consts:[[1,"row"],[1,"col-12","col-md-6","col-lg-7"],[1,"chart"],[1,"col-12","col-md-6","col-lg-5"],[1,"pie_chart"],[1,"chart",3,"updateChange","constructorType","options","update","oneToOne"],["width","100%","height","15rem"]],template:function(e,i){e&1&&(a(0,"div",0)(1,"div",1),_(2,Bt,2,4,"p-card",2)(3,Lt,2,0,"p-card"),r(),a(4,"div",3),_(5,Vt,2,4,"p-card",4)(6,Ft,2,0,"p-card"),r()()),e&2&&(p(2),f(i.isLoading()?3:2),p(3),f(i.isLoading()?6:5))},dependencies:[Q,E,S,D,P],styles:[".chart[_ngcontent-%COMP%]{width:100%;height:400px;display:block} p-card.chart .p-card-body{padding-top:0!important;padding-bottom:0!important} p-card.pie_chart .p-card-body{padding-top:0!important;padding-bottom:0!important}"]})}}return n})();function At(n,c){if(n&1){let t=C();a(0,"p-card",2)(1,"highcharts-chart",5),v("updateChange",function(i){l(t);let o=s();return M(o.updateFlag,i)||(o.updateFlag=i),d(i)}),r()()}if(n&2){let t=s();p(),m("constructorType",t.chartConstructor)("options",t.chartOptionsSpline),y("update",t.updateFlag),m("oneToOne",t.oneToOneFlag)}}function jt(n,c){n&1&&(a(0,"p-card"),g(1,"p-skeleton",6),r())}function zt(n,c){if(n&1){let t=C();a(0,"p-card",4)(1,"highcharts-chart",5),v("updateChange",function(i){l(t);let o=s();return M(o.updateFlag,i)||(o.updateFlag=i),d(i)}),r()()}if(n&2){let t=s();p(),m("constructorType",t.chartConstructor)("options",t.chartOptionsPie),y("update",t.updateFlag),m("oneToOne",t.oneToOneFlag)}}function It(n,c){n&1&&(a(0,"p-card"),g(1,"p-skeleton",6),r())}var Dt=(()=>{class n{constructor(){this.chartConstructor="chart",this.updateFlag=!1,this.oneToOneFlag=!0,this.chartOptionsSpline={},this.chartOptionsPie={},this.dashboardService=u(G),this.isLoading=h(!0),this.amountExpense=b(),this.params=h({dashboardPeriod:2}),this.expenseTitle=b(),this.tooltip=b(),this.expenseSource=H((q.production?w(this.params):w(this.params).pipe(z(500))).pipe(j(({dashboardPeriod:t})=>A([this.dashboardService.fetchExpenseSplineData(t),this.dashboardService.fetchExpensePieData(t)])),N("Expense Dashboard Data"),I(([t])=>{this.isLoading.set(!1),this.amountExpense.emit(t.data),this.expenseTitle.emit(t.title),this.tooltip.emit(t.toolTip)}),F(([t,e])=>({splineData:t,pieData:e}))),{initialValue:null}),T(()=>{let t=this.expenseSource();if(!t)return;let{splineData:e,pieData:i}=t;console.log("Spline Data:",e),console.log("Pie Data:",i),this.chartOptionsSpline={chart:{height:300},title:{text:e.chartTitle,align:"left",style:{fontWeight:"normal"}},xAxis:{categories:[...e.chart.labels]},yAxis:{title:{text:""}},series:[V(L({},e.chart.series),{type:"spline",name:"Amount",data:[...e.chart.series.data]})],plotOptions:{line:{dataLabels:{enabled:!0},enableMouseTracking:!1}}},this.chartOptionsPie={chart:{type:"pie"},title:{text:e.pieTitle,align:"left",style:{fontWeight:"normal"}},series:[{type:"pie",name:"Amount",data:[...i.series.filter(o=>o.y>0)]}],plotOptions:{pie:{allowPointSelect:!0,cursor:"pointer",dataLabels:[{enabled:!1}],showInLegend:!0}}},this.updateFlag=!0})}static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275cmp=O({type:n,selectors:[["app-expense"]],outputs:{amountExpense:"amountExpense",expenseTitle:"expenseTitle",tooltip:"tooltip"},decls:7,vars:2,consts:[[1,"row"],[1,"col-12","col-md-6","col-lg-7"],[1,"chart"],[1,"col-12","col-md-6","col-lg-5"],[1,"pie_chart"],[1,"chart",3,"updateChange","constructorType","options","update","oneToOne"],["width","100%","height","15rem"]],template:function(e,i){e&1&&(a(0,"div",0)(1,"div",1),_(2,At,2,4,"p-card",2)(3,jt,2,0,"p-card"),r(),a(4,"div",3),_(5,zt,2,4,"p-card",4)(6,It,2,0,"p-card"),r()()),e&2&&(p(2),f(i.isLoading()?3:2),p(3),f(i.isLoading()?6:5))},dependencies:[Q,E,S,D,P],styles:[".chart[_ngcontent-%COMP%]{width:100%;height:400px;display:block} p-card.chart .p-card-body{padding-top:0!important;padding-bottom:0!important} p-card.pie_chart .p-card-body{padding-top:0!important;padding-bottom:0!important}"]})}}return n})();function Wt(n,c){if(n&1&&(a(0,"span"),k(1),r()),n&2){let t=c.$implicit;p(),ct(t)}}function Rt(n,c){if(n&1&&(a(0,"div",21),ot(1,Wt,2,1,"span",null,it),r()),n&2){let t=s(3);p(),at(t.tooltipExpense())}}function qt(n,c){if(n&1){let t=C();g(0,"input",10,1),a(2,"button",11),B("click",function(i){l(t);let o=R(1),x=s(2);return d(x.handleLinkClick(i,o))}),a(3,"div",12)(4,"div",13)(5,"div",14),g(6,"i",15),r()(),a(7,"p-card",16,2),_(9,Rt,3,0,"ng-template",null,3,X),a(11,"div",17)(12,"div",18)(13,"span",19),k(14,"Expense"),r(),a(15,"p",20),k(16),J(17,"number"),r()()()()()()}if(n&2){let t=R(10),e=s(2);p(7),m("pTooltip",t)("fitContent",!1),p(9),U(" ",K(17,3,e.amounts.expense())," ")}}function Ht(n,c){n&1&&g(0,"p-skeleton",9)}function Nt(n,c){if(n&1&&(a(0,"div",17)(1,"div",18)(2,"span",19),k(3,"Cash and Bank"),r(),a(4,"p",20),k(5),J(6,"number"),r()()()),n&2){let t=s(3);p(5),U(" ",t.amounts.cashBank()===0?"-":K(6,1,t.amounts.cashBank())," ")}}function Qt(n,c){if(n&1){let t=C();g(0,"input",22,4),a(2,"button",11),B("click",function(i){l(t);let o=R(1),x=s(2);return d(x.handleLinkClick(i,o))}),a(3,"div",12)(4,"div",23),g(5,"i",24),r(),a(6,"p-card",25,2),_(8,Nt,7,3,"ng-template",26),r()()()}if(n&2){let t=s(2);p(6),m("pTooltip",t.tooltip.cashBank())}}function Gt(n,c){n&1&&g(0,"p-skeleton",9)}function Ut(n,c){if(n&1){let t=C();a(0,"app-expense",27),B("amountExpense",function(i){l(t);let o=s(2);return d(o.onAmountExpense(i))})("expenseTitle",function(i){l(t);let o=s(2);return d(o.onExpenseTitle(i))})("tooltip",function(i){l(t);let o=s(2);return d(o.onExpenseTooltip(i))}),r()}}function Jt(n,c){if(n&1){let t=C();a(0,"app-cash-bank",28),B("cashBankTitle",function(i){l(t);let o=s(2);return d(o.onCashBankTitle(i))})("amountCashBank",function(i){l(t);let o=s(2);return d(o.onAmountCashBank(i))})("tooltip",function(i){l(t);let o=s(2);return d(o.onCashBankTooltip(i))}),r()}}function Kt(n,c){if(n&1&&(a(0,"p-panel")(1,"main",6)(2,"div",7)(3,"div",8),_(4,qt,18,5)(5,Ht,1,0,"p-skeleton",9),r(),a(6,"div",8),_(7,Qt,9,1)(8,Gt,1,0,"p-skeleton",9),r()(),_(9,Ut,1,0,"app-expense")(10,Jt,1,0,"app-cash-bank"),r()()),n&2){let t=s();p(4),f(t.isLoading()?5:4),p(3),f(t.isLoading()?8:7),p(2),f(t.activeIndex()===0?9:t.activeIndex()===1?10:-1)}}var Ge=(()=>{class n{constructor(){this.activeIndex=h(0),this.pageTitle=h("Dashboard"),this.isLoading=h(!0),this.tooltip={cashBank:h(""),expense:h("")},this.renderer=u(et),this.injector=u(W),this.tooltipExpense=dt(()=>this.tooltip.expense().match(/^(.*?)\s*(\[[^\]]+\])$/)?[RegExp.$1.trim(),RegExp.$2.trim()]:[this.tooltip.expense()]),this.amounts={cashBank:h(0),expense:h(0)}}ngAfterViewInit(){T(()=>{this.isLoading()||queueMicrotask(()=>this.runCardEffect())},{injector:this.injector}),T(()=>{this.activeIndex(),queueMicrotask(()=>this.runCardEffect())},{injector:this.injector})}runCardEffect(){let t=this.activeIndex(),e=this.cards?.toArray();if(!e||e.length===0)return;e.forEach(o=>{let x=o.nativeElement.querySelector(".p-card-body");x&&(this.renderer.setStyle(x,"height","90px"),this.renderer.removeStyle(x,"background-color"),this.renderer.removeStyle(x,"box-shadow"))});let i=e[t];if(i){let o=i.nativeElement.querySelector(".p-card-body");o&&(this.renderer.setStyle(o,"background-color","#F0F0F0"),this.renderer.setStyle(o,"overflow","hidden"))}}onTabChange(t){this.activeIndex.set(t)}handleLinkClick(t,e){t.stopPropagation(),e.checked=!e.checked,e.checked&&(console.log(e.value),this.onTabChange(Number(e.value)))}onCashBankTitle(t){this.pageTitle.set(t),this.isLoading.set(!1)}onExpenseTitle(t){this.pageTitle.set(t),this.isLoading.set(!1)}onAmountCashBank(t){console.log("Total Amount from CashBank:",t),this.amounts.cashBank.set(t)}onAmountExpense(t){console.log("Total Amount from Expense:",t),this.amounts.expense.set(t)}onExpenseTooltip(t){this.tooltip.expense.set(t)}onCashBankTooltip(t){this.tooltip.cashBank.set(t)}static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275cmp=O({type:n,selectors:[["ng-component"]],viewQuery:function(e,i){if(e&1&&rt(P,5,$),e&2){let o;st(o=pt())&&(i.cards=o)}},decls:3,vars:5,consts:[["content",""],["expenseCheckbox",""],["card",""],["tooltipContent",""],["cashBankCheckbox",""],[3,"hasMainWrapperPadding","limitStrLength","overflowScroll","isLoading","pageTitle"],[1,"d-flex","flex-column","row-gap-10"],[1,"row","row-gap-24"],[1,"col-12","col-md-6","col-lg-4"],["width","100%","height","8rem"],["name","dashboardOption","type","radio","hidden","","value","0"],[1,"btn","p-0","border-none","btn-link","w-100",3,"click"],[1,"card-container"],[1,"box-icon",2,"background-color","#d73636"],[1,"d-flex","text-white","align-items-baseline"],[1,"fa-solid","fa-circle-dollar-to-slot"],["tooltipPosition","top",3,"pTooltip","fitContent"],[1,"d-flex","justify-content-end"],[1,"d-flex","flex-column","align-items-end"],[1,"fs-5"],[1,"box-number","fs-4"],[1,"d-flex","flex-column"],["name","dashboardOption","type","radio","hidden","","value","1"],[1,"box-icon"],[1,"fa-duotone","fa-solid","fa-wallet","text-white"],["tooltipPosition","top",3,"pTooltip"],["pTemplate","content"],[3,"amountExpense","expenseTitle","tooltip"],[3,"cashBankTitle","amountCashBank","tooltip"]],template:function(e,i){e&1&&(a(0,"app-main-panel",5),_(1,Kt,11,3,"ng-template",null,0,X),r()),e&2&&m("hasMainWrapperPadding",!0)("limitStrLength",50)("overflowScroll",!0)("isLoading",i.isLoading())("pageTitle",i.pageTitle())},dependencies:[xt,ft,Mt,D,P,bt,ht,mt,Pt,gt,Ot,Tt,Ct,vt,Et,Dt,E,S,yt,kt],styles:['@charset "UTF-8";.card-container[_ngcontent-%COMP%] a[_ngcontent-%COMP%], .card-container[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0}.card-container[_ngcontent-%COMP%]{position:relative;height:4rem}.card-container[_ngcontent-%COMP%] .box-icon[_ngcontent-%COMP%]{height:50px;width:50px;background-color:#2175d0;display:flex;justify-content:center;align-items:center;z-index:2;position:relative;border-radius:4px;left:1.5rem;top:-.6rem}.card-container[_ngcontent-%COMP%] .box-icon[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:30px}.card-container[_ngcontent-%COMP%] .box-number[_ngcontent-%COMP%]{font-size:1.25rem;font-weight:500}.card-container[_ngcontent-%COMP%] .box-title[_ngcontent-%COMP%]{font-size:1rem}.card-container[_ngcontent-%COMP%] p-card[_ngcontent-%COMP%]{position:absolute;top:calc(2.6rem - 55%);left:0;width:100%;z-index:1;margin:0!important;padding:0!important}@media (max-width: 85rem){.card-container[_ngcontent-%COMP%] a[_ngcontent-%COMP%], .card-container[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0}.card-container[_ngcontent-%COMP%]{position:relative;height:4rem}.card-container[_ngcontent-%COMP%] .box-icon[_ngcontent-%COMP%]{height:50px;width:50px;background-color:#2175d0;display:flex;justify-content:center;align-items:center;z-index:2;position:relative;border-radius:4px;left:1.5rem;top:-.6rem}.card-container[_ngcontent-%COMP%] .box-icon[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:30px}.card-container[_ngcontent-%COMP%] .box-number[_ngcontent-%COMP%]{font-size:1.25rem;font-weight:500}.card-container[_ngcontent-%COMP%] .box-title[_ngcontent-%COMP%]{font-size:1rem}.card-container[_ngcontent-%COMP%] p-card[_ngcontent-%COMP%]{position:absolute;top:calc(2.6rem - 55%);left:0;width:100%;z-index:1;margin:0!important;padding:0!important}}@media (min-width: 85.001rem) and (max-width: 97.999rem){.card-container[_ngcontent-%COMP%] a[_ngcontent-%COMP%], .card-container[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0}.card-container[_ngcontent-%COMP%]{position:relative;height:4rem}.card-container[_ngcontent-%COMP%] .box-icon[_ngcontent-%COMP%]{height:50px;width:50px;background-color:#2175d0;display:flex;justify-content:center;align-items:center;z-index:2;position:relative;border-radius:4px;left:1.5rem;top:-.6rem}.card-container[_ngcontent-%COMP%] .box-icon[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:30px}.card-container[_ngcontent-%COMP%] .box-number[_ngcontent-%COMP%]{font-size:1.25rem;font-weight:500}.card-container[_ngcontent-%COMP%] .box-title[_ngcontent-%COMP%]{font-size:1rem}.card-container[_ngcontent-%COMP%] p-card[_ngcontent-%COMP%]{position:absolute;top:calc(2.6rem - 55%);left:0;width:100%;z-index:1;margin:0!important;padding:0!important}}@media (min-width: 98rem){.card-container[_ngcontent-%COMP%] a[_ngcontent-%COMP%], .card-container[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0}.card-container[_ngcontent-%COMP%]{position:relative;height:4rem}.card-container[_ngcontent-%COMP%] .box-icon[_ngcontent-%COMP%]{height:80px;width:80px;background-color:#2175d0;display:flex;justify-content:center;align-items:center;z-index:2;position:relative;border-radius:4px;left:1.5rem;top:-.6rem}.card-container[_ngcontent-%COMP%] .box-icon[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:40px}.card-container[_ngcontent-%COMP%] .box-number[_ngcontent-%COMP%]{font-size:1.25rem;font-weight:500}.card-container[_ngcontent-%COMP%] .box-title[_ngcontent-%COMP%]{font-size:1.15rem}.card-container[_ngcontent-%COMP%] p-card[_ngcontent-%COMP%]{position:absolute;top:calc(2.6rem - 55%);left:0;width:100%;z-index:1;margin:0!important;padding:0!important}}']})}}return n})();export{Ge as Dashboard1Component};
@@ -1 +1 @@
1
- import{a as v,b as H}from"./chunk-LUNMW7NC.js";import"./chunk-AFKKNLDY.js";import{a as F,b as I}from"./chunk-DJXQKSLT.js";import"./chunk-WXIG4CXY.js";import{i as G}from"./chunk-LKOCOLCM.js";import"./chunk-S27Z7D3D.js";import{a as O,b as R}from"./chunk-AD247LWQ.js";import"./chunk-BKTBVFNX.js";import"./chunk-ZFNIPERQ.js";import{w as V,x as j,y as D,z as N}from"./chunk-ME4ALIS7.js";import"./chunk-DTYVTTET.js";import"./chunk-VMI3QWC6.js";import"./chunk-GPXKVMG6.js";import"./chunk-5DRALZZF.js";import{a as $}from"./chunk-2BI7WNJP.js";import{n as A,s as P}from"./chunk-ZK43JB4A.js";import"./chunk-F2X3VGZZ.js";import{Dc as B,Eb as E,Ec as _,Mb as p,Oc as c,Pb as x,Pc as m,Sc as C,W as y,Wb as n,Xb as o,Y as b,Yb as l,ac as w,fc as h,gc as s,h as T,ia as f,ib as a,qa as g,ra as d,s as u,sa as M,ta as S,yb as k}from"./chunk-6QJHEOXN.js";import"./chunk-YQFG5XE2.js";var L=()=>({height:"calc(100vh - 100px)"});function z(i,q){if(i&1){let e=w();n(0,"div",3)(1,"p-button",4),h("onClick",function(){g(e);let r=s();return d(r.onFormat())}),o(),n(2,"p-button",5),c(3,"async"),c(4,"async"),h("onClick",function(){g(e);let r=s();return d(r.onMigrate())}),o()()}if(i&2){let e=s();a(2),p("disabled",m(3,2,e.countInBooks$)!==0)("pTooltip",m(4,4,e.countInBooks$)!==0?"Books already has entries. Please format before re-migrating.":null)}}function J(i,q){if(i&1&&(n(0,"p-scroll-panel")(1,"p-panel")(2,"div",6),l(3,"app-migration-cards",7),c(4,"async"),M(),n(5,"svg",8),l(6,"path",9),o(),S(),l(7,"app-migration-cards",10),c(8,"async"),o()()()),i&2){let e=s();x(_(12,L)),a(),x(_(13,L)),a(2),p("migrationCount",m(4,8,e.countInPOS$))("migrationTitle",e.pageTitle),a(4),p("migrationCount",m(8,10,e.countInBooks$))("migrationTitle",e.pageTitle)}}var le=(()=>{class i{constructor(){this.migrateService=f(v),this.toastr=f($),this.refresh$=new T(void 0),this.pageTitle="Expense Account"}ngOnInit(){let e=this.refresh$.pipe(b(()=>this.migrateService.getExpenseAccountCount()),y(1));this.countInPOS$=e.pipe(u(t=>Number(t.pos))),this.countInBooks$=e.pipe(u(t=>Number(t.books)))}onMigrate(){this.migrateService.migrateExpenseAccount().subscribe(e=>{this.refresh$.next(),this.toastr.success(e.message,"Migration Successful")})}onFormat(){window.confirm("Are you sure you want to format this data? This action cannot be undone.")&&this.migrateService.formatExpenseAccount().subscribe(t=>{this.refresh$.next(),this.toastr.success(t.message,"Format Successful")})}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=k({type:i,selectors:[["app-expense-account"]],features:[B([v])],decls:5,vars:1,consts:[["actionButton",""],["content",""],[3,"pageTitle"],[1,"d-flex","gap-2"],["label","Format","severity","danger",3,"onClick"],["label","Migrate","tooltipPosition","left",3,"onClick","disabled","pTooltip"],[1,"flex","gap-30","flex-wrap",2,"display","flex","justify-content","center","align-items","center","gap","1rem","margin-top","40px"],["migrationPlace","Accounting",3,"migrationCount","migrationTitle"],["width","40","height","40","viewBox","0 0 24 24","fill","none"],["d","M8 5l8 7-8 7","stroke","#007bff","stroke-width","2","stroke-linecap","round","stroke-linejoin","round"],["migrationPlace","Books",3,"migrationCount","migrationTitle"]],template:function(t,r){t&1&&(n(0,"app-main-panel",2),E(1,z,5,6,"ng-template",null,0,C)(3,J,9,14,"ng-template",null,1,C),o()),t&2&&p("pageTitle",r.pageTitle)},dependencies:[G,P,A,I,F,R,O,N,D,H,j,V],encapsulation:2})}}return i})();export{le as ExpenseAccountComponent};
1
+ import{a as v,b as H}from"./chunk-4UVBCZJG.js";import"./chunk-IHKBTP2Y.js";import{a as F,b as I}from"./chunk-DJXQKSLT.js";import"./chunk-WXIG4CXY.js";import{i as G}from"./chunk-D2CH2T3I.js";import"./chunk-S27Z7D3D.js";import{a as O,b as R}from"./chunk-AD247LWQ.js";import"./chunk-BKTBVFNX.js";import"./chunk-ZFNIPERQ.js";import{w as V,x as j,y as D,z as N}from"./chunk-ME4ALIS7.js";import"./chunk-DTYVTTET.js";import"./chunk-VMI3QWC6.js";import"./chunk-KGNH5JRZ.js";import"./chunk-5DRALZZF.js";import{a as $}from"./chunk-2BI7WNJP.js";import{n as A,s as P}from"./chunk-ZK43JB4A.js";import"./chunk-F2X3VGZZ.js";import{Dc as B,Eb as E,Ec as _,Mb as p,Oc as c,Pb as x,Pc as m,Sc as C,W as y,Wb as n,Xb as o,Y as b,Yb as l,ac as w,fc as h,gc as s,h as T,ia as f,ib as a,qa as g,ra as d,s as u,sa as M,ta as S,yb as k}from"./chunk-6QJHEOXN.js";import"./chunk-YQFG5XE2.js";var L=()=>({height:"calc(100vh - 100px)"});function z(i,q){if(i&1){let e=w();n(0,"div",3)(1,"p-button",4),h("onClick",function(){g(e);let r=s();return d(r.onFormat())}),o(),n(2,"p-button",5),c(3,"async"),c(4,"async"),h("onClick",function(){g(e);let r=s();return d(r.onMigrate())}),o()()}if(i&2){let e=s();a(2),p("disabled",m(3,2,e.countInBooks$)!==0)("pTooltip",m(4,4,e.countInBooks$)!==0?"Books already has entries. Please format before re-migrating.":null)}}function J(i,q){if(i&1&&(n(0,"p-scroll-panel")(1,"p-panel")(2,"div",6),l(3,"app-migration-cards",7),c(4,"async"),M(),n(5,"svg",8),l(6,"path",9),o(),S(),l(7,"app-migration-cards",10),c(8,"async"),o()()()),i&2){let e=s();x(_(12,L)),a(),x(_(13,L)),a(2),p("migrationCount",m(4,8,e.countInPOS$))("migrationTitle",e.pageTitle),a(4),p("migrationCount",m(8,10,e.countInBooks$))("migrationTitle",e.pageTitle)}}var le=(()=>{class i{constructor(){this.migrateService=f(v),this.toastr=f($),this.refresh$=new T(void 0),this.pageTitle="Expense Account"}ngOnInit(){let e=this.refresh$.pipe(b(()=>this.migrateService.getExpenseAccountCount()),y(1));this.countInPOS$=e.pipe(u(t=>Number(t.pos))),this.countInBooks$=e.pipe(u(t=>Number(t.books)))}onMigrate(){this.migrateService.migrateExpenseAccount().subscribe(e=>{this.refresh$.next(),this.toastr.success(e.message,"Migration Successful")})}onFormat(){window.confirm("Are you sure you want to format this data? This action cannot be undone.")&&this.migrateService.formatExpenseAccount().subscribe(t=>{this.refresh$.next(),this.toastr.success(t.message,"Format Successful")})}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=k({type:i,selectors:[["app-expense-account"]],features:[B([v])],decls:5,vars:1,consts:[["actionButton",""],["content",""],[3,"pageTitle"],[1,"d-flex","gap-2"],["label","Format","severity","danger",3,"onClick"],["label","Migrate","tooltipPosition","left",3,"onClick","disabled","pTooltip"],[1,"flex","gap-30","flex-wrap",2,"display","flex","justify-content","center","align-items","center","gap","1rem","margin-top","40px"],["migrationPlace","Accounting",3,"migrationCount","migrationTitle"],["width","40","height","40","viewBox","0 0 24 24","fill","none"],["d","M8 5l8 7-8 7","stroke","#007bff","stroke-width","2","stroke-linecap","round","stroke-linejoin","round"],["migrationPlace","Books",3,"migrationCount","migrationTitle"]],template:function(t,r){t&1&&(n(0,"app-main-panel",2),E(1,z,5,6,"ng-template",null,0,C)(3,J,9,14,"ng-template",null,1,C),o()),t&2&&p("pageTitle",r.pageTitle)},dependencies:[G,P,A,I,F,R,O,N,D,H,j,V],encapsulation:2})}}return i})();export{le as ExpenseAccountComponent};
@@ -1 +1 @@
1
- import{b as E}from"./chunk-AFKKNLDY.js";import{b as w}from"./chunk-DJXQKSLT.js";import{a as T,b as j}from"./chunk-WXIG4CXY.js";import{b as P}from"./chunk-AD247LWQ.js";import{x as b}from"./chunk-ME4ALIS7.js";import{a as y}from"./chunk-5DRALZZF.js";import{A as _,q as O,s as A}from"./chunk-ZK43JB4A.js";import{Ea as c,Eb as C,Oc as M,Qc as S,Sc as a,Wb as i,Xb as r,Yb as x,ca as s,gc as m,ia as g,ib as u,sc as p,tc as v,uc as l,yb as h}from"./chunk-6QJHEOXN.js";var N=(()=>{class t{constructor(){this.httpService=g(y),this.dayjs=g(E)}migrateTaxAccount(){return this.httpService.post(void 0,"api/Migrate/accounting/tax",{})}getManualJournalCount(){return this.httpService.get(void 0,"api/migrate/accounting/journalheader-count",{})}getCOACount(){return this.httpService.get(void 0,"api/migrate/accounting/chartOfAccountcount",{})}getCOAConfigurationCount(){return this.httpService.get(void 0,"api/migrate/accounting/chartOfAccountConfigcount",{})}getCOACategoryCount(){return this.httpService.get(void 0,"api/migrate/accounting/chartOfAccountCategorycount",{})}getOutletAccountCount(){return this.httpService.get(void 0,"api/migrate/accounting/outletaccount-count",{})}getPaymentMethodAccountCount(){return this.httpService.get(void 0,"api/migrate/accounting/paymentmethodaccountcount",{})}getWriteOffOutletAccountCount(){return this.httpService.get(void 0,"api/migrate/accounting/writeoffoutletaccountCount",{})}getTaxAccountCount(){return this.httpService.get(void 0,"api/migrate/accounting/taxcount",{})}getExpenseAccountCount(){return this.httpService.get(void 0,"api/migrate/accounting/expenseaccountcount",{})}migrateCoaAccount(){return this.httpService.post(void 0,"api/Migrate/accounting/chartOfAccount",{})}migrateCoaConfig(){return this.httpService.post(void 0,"api/Migrate/accounting/chartOfAccountConfig",{})}migrateCoaCategory(){return this.httpService.post(void 0,"api/Migrate/accounting/chartOfAccountCategory",{})}migrateOutletAccount(){return this.httpService.post(void 0,"api/Migrate/accounting/outletaccount",{})}migrateManualJournal(e){let n={From:e.From?this.dayjs.from(e.From).format():null,To:e.To?this.dayjs.from(e.To).format():null,PageNumber:e.PageNumber||1,PageSize:e.PageSize||50},o=new _;return Object.keys(n).forEach(f=>{o=o.append(f,n[f])}),this.httpService.get(void 0,"api/migrate/accounting/journalheader",{params:o})}formatManualCOA(){return this.httpService.delete(void 0,"api/Migrate/accounting/truncate-coa",{})}formatExpenseAccount(){return this.httpService.delete(void 0,"api/Migrate/accounting/truncate-expenseaccount",{})}formatWriteOff(){return this.httpService.delete(void 0,"api/Migrate/accounting/truncate-writeoff",{})}formatManualCOAConfig(){return this.httpService.delete(void 0,"api/Migrate/accounting/truncate-coa-config",{})}formatOutletAccount(){return this.httpService.delete(void 0,"api/migrate/accounting/truncate-outlet-account",{})}formatPaymentAccount(){return this.httpService.delete(void 0,"api/migrate/accounting/truncate-paymentmethod",{})}formatTaxAccount(){return this.httpService.delete(void 0,"api/migrate/accounting/truncate-tax",{})}formatManualJournal(){return this.httpService.delete(void 0,"api/Migrate/accounting/truncate-journal",{})}formatManualCOACategory(){return this.httpService.delete(void 0,"api/migrate/accounting/truncate-coag",{})}migratePaymentMethod(){return this.httpService.post(void 0,"api/Migrate/accounting/paymentmethodaccount",{})}migrateWriteOffOutlet(){return this.httpService.post(void 0,"api/Migrate/accounting/writeoffoutletaccount",{})}migrateExpenseAccount(){return this.httpService.post(void 0,"api/Migrate/accounting/expenseaccount",{})}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275prov=s({token:t,factory:t.\u0275fac})}}return t})();function F(t,d){t&1&&(i(0,"div",5)(1,"div",6),x(2,"i",7),r()())}function I(t,d){if(t&1&&(i(0,"div",8),p(1),M(2,"number"),r()),t&2){let e=m();u(),l(" ",S(2,1,e.migrationCount(),"1.0-0")," ")}}function D(t,d){if(t&1&&(i(0,"div",9),p(1),r()),t&2){let e=m();u(),l(" ",e.migrationTitle()," ")}}function R(t,d){if(t&1&&(i(0,"div",10)(1,"div",11),p(2),r()()),t&2){let e=m();u(2),v(e.migrationPlace())}}var q=(()=>{class t{constructor(){this.migrationTitle=c(),this.migrationCount=c(),this.migrationPlace=c()}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=h({type:t,selectors:[["app-migration-cards"]],inputs:{migrationTitle:[1,"migrationTitle"],migrationCount:[1,"migrationCount"],migrationPlace:[1,"migrationPlace"]},decls:9,vars:0,consts:[["header",""],["title",""],["subtitle",""],["footer",""],[1,"text-center","flex","flex-column","justify-content-center","align-items-center","card-shadow","responsive-card"],[1,"d-flex","justify-content-center"],[1,"d-flex","justify-content-center","align-items-center","mt-4",2,"width","60px","height","60px","background-color","#e0f0ff","border-radius","50%"],[1,"icon","fa-file-lines","fa-light",2,"font-size","25px","color","#007bff"],[1,"bigscale","fw-bold"],[1,"text-sm","text-secondary"],[1,"flex","mt-5"],[1,"p-6","fs-7","fw-bold"]],template:function(n,o){n&1&&(i(0,"p-card",4),C(1,F,3,0,"ng-template",null,0,a)(3,I,3,4,"ng-template",null,1,a)(5,D,2,1,"ng-template",null,2,a)(7,R,3,1,"ng-template",null,3,a),r())},dependencies:[A,O,j,T,b,w,P],styles:["[_nghost-%COMP%] .p-card .p-card-title .bigscale{font-size:3rem!important;margin-top:2rem!important}[_nghost-%COMP%] .p-card{box-shadow:0 .25rem 1.25rem #0000001a!important;width:21.875rem!important;height:25rem!important}@media (max-width: 85rem){[_nghost-%COMP%] .p-card{width:18.875rem!important;height:21rem!important}[_nghost-%COMP%] .p-card .p-card-title .bigscale{font-size:2rem!important;margin-top:1rem!important}}@media (min-width: 85.001rem) and (max-width: 97.999rem){[_nghost-%COMP%] .p-card{width:21rem!important;height:25rem!important}[_nghost-%COMP%] .p-card .p-card-title .bigscale{font-size:3rem!important;margin-top:2rem!important}}@media (min-width: 98rem){[_nghost-%COMP%] .p-card{width:25rem!important;height:28rem!important}[_nghost-%COMP%] .p-card .p-card-title .bigscale{font-size:5rem!important;margin-top:2rem!important}}"]})}}return t})();export{N as a,q as b};
1
+ import{b as E}from"./chunk-IHKBTP2Y.js";import{b as w}from"./chunk-DJXQKSLT.js";import{a as T,b as j}from"./chunk-WXIG4CXY.js";import{b as P}from"./chunk-AD247LWQ.js";import{x as b}from"./chunk-ME4ALIS7.js";import{a as y}from"./chunk-5DRALZZF.js";import{A as _,q as O,s as A}from"./chunk-ZK43JB4A.js";import{Ea as c,Eb as C,Oc as M,Qc as S,Sc as a,Wb as i,Xb as r,Yb as x,ca as s,gc as m,ia as g,ib as u,sc as p,tc as v,uc as l,yb as h}from"./chunk-6QJHEOXN.js";var N=(()=>{class t{constructor(){this.httpService=g(y),this.dayjs=g(E)}migrateTaxAccount(){return this.httpService.post(void 0,"api/Migrate/accounting/tax",{})}getManualJournalCount(){return this.httpService.get(void 0,"api/migrate/accounting/journalheader-count",{})}getCOACount(){return this.httpService.get(void 0,"api/migrate/accounting/chartOfAccountcount",{})}getCOAConfigurationCount(){return this.httpService.get(void 0,"api/migrate/accounting/chartOfAccountConfigcount",{})}getCOACategoryCount(){return this.httpService.get(void 0,"api/migrate/accounting/chartOfAccountCategorycount",{})}getOutletAccountCount(){return this.httpService.get(void 0,"api/migrate/accounting/outletaccount-count",{})}getPaymentMethodAccountCount(){return this.httpService.get(void 0,"api/migrate/accounting/paymentmethodaccountcount",{})}getWriteOffOutletAccountCount(){return this.httpService.get(void 0,"api/migrate/accounting/writeoffoutletaccountCount",{})}getTaxAccountCount(){return this.httpService.get(void 0,"api/migrate/accounting/taxcount",{})}getExpenseAccountCount(){return this.httpService.get(void 0,"api/migrate/accounting/expenseaccountcount",{})}migrateCoaAccount(){return this.httpService.post(void 0,"api/Migrate/accounting/chartOfAccount",{})}migrateCoaConfig(){return this.httpService.post(void 0,"api/Migrate/accounting/chartOfAccountConfig",{})}migrateCoaCategory(){return this.httpService.post(void 0,"api/Migrate/accounting/chartOfAccountCategory",{})}migrateOutletAccount(){return this.httpService.post(void 0,"api/Migrate/accounting/outletaccount",{})}migrateManualJournal(e){let n={From:e.From?this.dayjs.from(e.From).format():null,To:e.To?this.dayjs.from(e.To).format():null,PageNumber:e.PageNumber||1,PageSize:e.PageSize||50},o=new _;return Object.keys(n).forEach(f=>{o=o.append(f,n[f])}),this.httpService.get(void 0,"api/migrate/accounting/journalheader",{params:o})}formatManualCOA(){return this.httpService.delete(void 0,"api/Migrate/accounting/truncate-coa",{})}formatExpenseAccount(){return this.httpService.delete(void 0,"api/Migrate/accounting/truncate-expenseaccount",{})}formatWriteOff(){return this.httpService.delete(void 0,"api/Migrate/accounting/truncate-writeoff",{})}formatManualCOAConfig(){return this.httpService.delete(void 0,"api/Migrate/accounting/truncate-coa-config",{})}formatOutletAccount(){return this.httpService.delete(void 0,"api/migrate/accounting/truncate-outlet-account",{})}formatPaymentAccount(){return this.httpService.delete(void 0,"api/migrate/accounting/truncate-paymentmethod",{})}formatTaxAccount(){return this.httpService.delete(void 0,"api/migrate/accounting/truncate-tax",{})}formatManualJournal(){return this.httpService.delete(void 0,"api/Migrate/accounting/truncate-journal",{})}formatManualCOACategory(){return this.httpService.delete(void 0,"api/migrate/accounting/truncate-coag",{})}migratePaymentMethod(){return this.httpService.post(void 0,"api/Migrate/accounting/paymentmethodaccount",{})}migrateWriteOffOutlet(){return this.httpService.post(void 0,"api/Migrate/accounting/writeoffoutletaccount",{})}migrateExpenseAccount(){return this.httpService.post(void 0,"api/Migrate/accounting/expenseaccount",{})}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275prov=s({token:t,factory:t.\u0275fac})}}return t})();function F(t,d){t&1&&(i(0,"div",5)(1,"div",6),x(2,"i",7),r()())}function I(t,d){if(t&1&&(i(0,"div",8),p(1),M(2,"number"),r()),t&2){let e=m();u(),l(" ",S(2,1,e.migrationCount(),"1.0-0")," ")}}function D(t,d){if(t&1&&(i(0,"div",9),p(1),r()),t&2){let e=m();u(),l(" ",e.migrationTitle()," ")}}function R(t,d){if(t&1&&(i(0,"div",10)(1,"div",11),p(2),r()()),t&2){let e=m();u(2),v(e.migrationPlace())}}var q=(()=>{class t{constructor(){this.migrationTitle=c(),this.migrationCount=c(),this.migrationPlace=c()}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=h({type:t,selectors:[["app-migration-cards"]],inputs:{migrationTitle:[1,"migrationTitle"],migrationCount:[1,"migrationCount"],migrationPlace:[1,"migrationPlace"]},decls:9,vars:0,consts:[["header",""],["title",""],["subtitle",""],["footer",""],[1,"text-center","flex","flex-column","justify-content-center","align-items-center","card-shadow","responsive-card"],[1,"d-flex","justify-content-center"],[1,"d-flex","justify-content-center","align-items-center","mt-4",2,"width","60px","height","60px","background-color","#e0f0ff","border-radius","50%"],[1,"icon","fa-file-lines","fa-light",2,"font-size","25px","color","#007bff"],[1,"bigscale","fw-bold"],[1,"text-sm","text-secondary"],[1,"flex","mt-5"],[1,"p-6","fs-7","fw-bold"]],template:function(n,o){n&1&&(i(0,"p-card",4),C(1,F,3,0,"ng-template",null,0,a)(3,I,3,4,"ng-template",null,1,a)(5,D,2,1,"ng-template",null,2,a)(7,R,3,1,"ng-template",null,3,a),r())},dependencies:[A,O,j,T,b,w,P],styles:["[_nghost-%COMP%] .p-card .p-card-title .bigscale{font-size:3rem!important;margin-top:2rem!important}[_nghost-%COMP%] .p-card{box-shadow:0 .25rem 1.25rem #0000001a!important;width:21.875rem!important;height:25rem!important}@media (max-width: 85rem){[_nghost-%COMP%] .p-card{width:18.875rem!important;height:21rem!important}[_nghost-%COMP%] .p-card .p-card-title .bigscale{font-size:2rem!important;margin-top:1rem!important}}@media (min-width: 85.001rem) and (max-width: 97.999rem){[_nghost-%COMP%] .p-card{width:21rem!important;height:25rem!important}[_nghost-%COMP%] .p-card .p-card-title .bigscale{font-size:3rem!important;margin-top:2rem!important}}@media (min-width: 98rem){[_nghost-%COMP%] .p-card{width:25rem!important;height:28rem!important}[_nghost-%COMP%] .p-card .p-card-title .bigscale{font-size:5rem!important;margin-top:2rem!important}}"]})}}return t})();export{N as a,q as b};
@@ -0,0 +1 @@
1
+ import{a as G}from"./chunk-NMU2YBAB.js";import{a as I,b as q}from"./chunk-AN4SAUSA.js";import"./chunk-URH77XNK.js";import"./chunk-3DBSHDAQ.js";import"./chunk-M4SSELXT.js";import"./chunk-WMZF4DQK.js";import{i as Z}from"./chunk-D2CH2T3I.js";import"./chunk-S27Z7D3D.js";import{a as D,b as F}from"./chunk-AD247LWQ.js";import"./chunk-BKTBVFNX.js";import"./chunk-ZFNIPERQ.js";import{w as W,x as j}from"./chunk-ME4ALIS7.js";import"./chunk-DTYVTTET.js";import{e as R,j as A,w as N}from"./chunk-VMI3QWC6.js";import"./chunk-KGNH5JRZ.js";import"./chunk-5DRALZZF.js";import{a as k}from"./chunk-2BI7WNJP.js";import{n as B,s as P}from"./chunk-ZK43JB4A.js";import"./chunk-F2X3VGZZ.js";import{Ac as b,Bc as E,Cc as _,Eb as d,Ha as x,Mb as S,Oc as L,Pc as V,Sc as a,W as C,Wb as i,Xb as l,_ as T,ac as u,fc as v,gc as m,ia as p,ib as h,qa as s,ra as c,sc as f,xc as w,yb as z,yc as y,zc as M}from"./chunk-6QJHEOXN.js";import"./chunk-YQFG5XE2.js";function H(t,g){if(t&1){let o=u();i(0,"p-button",4),v("onClick",function(){s(o);let n=m(),r=_(0);return c(n.onSaveTimezone(r))}),l()}}function J(t,g){t&1&&(i(0,"div",8)(1,"div",9),f(2,"Timezone Configuration"),l(),i(3,"small",10),f(4,"Set the timezone to ensure that all journals and date filtering follow this timezone"),l()())}function K(t,g){if(t&1){let o=u();i(0,"p-panel"),d(1,J,5,0,"ng-template",null,2,a),i(3,"div",5)(4,"div",6)(5,"p-select",7),M("ngModelChange",function(n){s(o);let r=m();return y(r.selectedTimezone,n)||(r.selectedTimezone=n),c(n)}),l()()()()}if(t&2){let o=m(),e=_(0);h(5),S("fluid",!0)("showClear",!0)("filter",!0)("options",e==null||e.options==null?null:e.options.timezones),w("ngModel",o.selectedTimezone)}}var ce=(()=>{class t{constructor(){this.setupService=p(G),this.toastr=p(k),this.selectedTimezone=x(null),this.loader$=this.setupService.fetchLoaderConfiguration().pipe(T(o=>{this.selectedTimezone.set(o?.form?.timeZone||null)}),C(1))}onSaveTimezone(o){let e=o.form;e.timeZone=this.selectedTimezone(),this.setupService.updateAccountingIntegrationConfiguration({form:e}).subscribe()}static{this.\u0275fac=function(e){return new(e||t)}}static{this.\u0275cmp=z({type:t,selectors:[["app-timezone"]],decls:7,vars:3,consts:[["actionButton",""],["content",""],["header",""],["pageTitle","Timezone"],["label","Save","icon","fa-solid fa-floppy-disk",3,"onClick"],[1,"row"],[1,"col-4"],["appendTo","body","optionLabel","displayName","optionValue","id","placeholder","Select Timezone",3,"ngModelChange","fluid","showClear","filter","options","ngModel"],[1,"d-flex","flex-column","px-2"],[1,"mb-0","fw-normal","fs-4"],[1,"fst-italic","text-muted"]],template:function(e,n){e&1&&(b(0),L(1,"async"),i(2,"app-main-panel",3),d(3,H,1,0,"ng-template",null,0,a)(5,K,6,5,"ng-template",null,1,a),l()),e&2&&E(V(1,0,n.loader$))},dependencies:[P,B,N,R,A,Z,F,D,j,W,q,I],encapsulation:2})}}return t})();export{ce as TimezoneComponent};