dealposbooks 5.47.0 → 5.47.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (59) hide show
  1. package/{chunk-5K3KAKU5.js → chunk-3TL7F2KM.js} +1 -1
  2. package/{chunk-DTFLX2XQ.js → chunk-3TPMIYM6.js} +1 -1
  3. package/{chunk-ZBO62XAM.js → chunk-53SYMJT3.js} +2 -2
  4. package/{chunk-ML5KV2U2.js → chunk-55EJL7IR.js} +1 -1
  5. package/chunk-5N7FOORD.js +1 -0
  6. package/{chunk-EEJGJ7WF.js → chunk-5PBHMN6G.js} +1 -1
  7. package/{chunk-C3IOIS5V.js → chunk-5ZBLFL65.js} +1 -1
  8. package/{chunk-IYFNOI7S.js → chunk-6IZPVRGJ.js} +1 -1
  9. package/{chunk-OVEQKHUV.js → chunk-7GZBVXWZ.js} +2 -2
  10. package/{chunk-EIV4TELQ.js → chunk-ABFKSSKO.js} +1 -1
  11. package/{chunk-WFIXL354.js → chunk-AUZDLI47.js} +1 -1
  12. package/{chunk-OLLF6BKH.js → chunk-CD46WARP.js} +1 -1
  13. package/{chunk-CWDU4F7J.js → chunk-CJCMWPPM.js} +1 -1
  14. package/{chunk-5SYYPB6N.js → chunk-CKQDZ5V3.js} +1 -1
  15. package/{chunk-OJ2VC4ER.js → chunk-EAFXWJXR.js} +1 -1
  16. package/{chunk-SS4J7T3N.js → chunk-EE75EMIP.js} +1 -1
  17. package/{chunk-WGJFR6CK.js → chunk-GLBRPUVN.js} +1 -1
  18. package/chunk-GXFYCEYY.js +7 -0
  19. package/{chunk-GJYEM7DL.js → chunk-GY5YPT6L.js} +1 -1
  20. package/{chunk-DU72RNAU.js → chunk-I23KOE73.js} +1 -1
  21. package/chunk-IRGC65GN.js +1 -0
  22. package/{chunk-F5CCLXIY.js → chunk-IZ7ZAVDB.js} +1 -1
  23. package/{chunk-5YO43YBO.js → chunk-KPHDNZQR.js} +1 -1
  24. package/{chunk-VL2HEHI5.js → chunk-KSA3KTUZ.js} +1 -1
  25. package/{chunk-S3FQPUAS.js → chunk-L56Y2VZA.js} +1 -1
  26. package/{chunk-XDJSQLQN.js → chunk-L6AAVCV5.js} +1 -1
  27. package/{chunk-CL4EKWSU.js → chunk-LT4TNQWP.js} +1 -1
  28. package/{chunk-35UWKNGE.js → chunk-MQJPYOYS.js} +1 -1
  29. package/{chunk-NHHXXJY6.js → chunk-MYREYOSL.js} +1 -1
  30. package/{chunk-ETFYQ4GV.js → chunk-N4JFV34B.js} +1 -1
  31. package/{chunk-6ZZZTNIH.js → chunk-NJIJC7GH.js} +2 -2
  32. package/{chunk-DEOAL7PG.js → chunk-OABNAZCH.js} +1 -1
  33. package/{chunk-DRTMMJ4Q.js → chunk-OMQE3MLE.js} +1 -1
  34. package/{chunk-5JZTWUDG.js → chunk-OP5H3EZS.js} +1 -1
  35. package/{chunk-MT3DTYJO.js → chunk-OT26ZWS2.js} +1 -1
  36. package/{chunk-L2524E6T.js → chunk-OZYJ4SOH.js} +1 -1
  37. package/{chunk-TUFQ5JVG.js → chunk-P4DH4OHM.js} +1 -1
  38. package/{chunk-V4B5LQYD.js → chunk-PE5AWYXZ.js} +1 -1
  39. package/{chunk-AXU3K2IY.js → chunk-PG45FZTK.js} +1 -1
  40. package/{chunk-AHX56FH2.js → chunk-PPGOVQXM.js} +1 -1
  41. package/{chunk-XT4YHL2M.js → chunk-RKFZQV37.js} +1 -1
  42. package/{chunk-EPLZY6T4.js → chunk-RYNNNPBD.js} +1 -1
  43. package/{chunk-MBJKUKHJ.js → chunk-SH2QYE6S.js} +1 -1
  44. package/{chunk-RF27SIL3.js → chunk-SQUBEFKB.js} +1 -1
  45. package/{chunk-4X3G6MGP.js → chunk-UAZOJSS3.js} +1 -1
  46. package/{chunk-OW25MQS7.js → chunk-UBPSH6UX.js} +1 -1
  47. package/{chunk-PXN4RATH.js → chunk-UW7IAYIG.js} +1 -1
  48. package/{chunk-VTCV67A4.js → chunk-UYWLPZ66.js} +1 -1
  49. package/{chunk-EQU7DDK6.js → chunk-VEEJ5Z24.js} +1 -1
  50. package/{chunk-M3TKVRYP.js → chunk-XJ7SJUJ2.js} +1 -1
  51. package/{chunk-Q47KHO2M.js → chunk-XQB3OGS3.js} +1 -1
  52. package/{chunk-WPMC3LJJ.js → chunk-Y5V2RWZ2.js} +2 -2
  53. package/{chunk-6XE7LGUS.js → chunk-Z65OWCDJ.js} +1 -1
  54. package/index.html +2 -2
  55. package/{main-Q2T6QX2N.js → main-2FOYJ7E6.js} +1 -1
  56. package/package.json +1 -1
  57. package/chunk-2RNKYO2Q.js +0 -1
  58. package/chunk-5HZBSMCT.js +0 -7
  59. package/chunk-SN7DLFX2.js +0 -1
@@ -1 +1 @@
1
- import{a as Fe,b as ke}from"./chunk-PXN4RATH.js";import{a as _e,b as ve,c as be,d as xe,e as Ce,f as ye}from"./chunk-PKOERZXQ.js";import"./chunk-PTQPB44D.js";import{a as he}from"./chunk-XKI7WLHE.js";import{a as fe,b as ge}from"./chunk-Q4LKKVQU.js";import{a as se}from"./chunk-5CZNOXPC.js";import"./chunk-IGWIRCAS.js";import"./chunk-RXOOTYEO.js";import{a as oe,b as re}from"./chunk-XPRP6AB4.js";import"./chunk-YZTBV6HG.js";import"./chunk-QWTGY7FA.js";import{g as ue}from"./chunk-TUFQ5JVG.js";import"./chunk-ZUDQOT7C.js";import{a as pe,b as me}from"./chunk-BUDZ3ONE.js";import"./chunk-SN7DLFX2.js";import"./chunk-V4SH72WU.js";import{n as ie,o as ne,w as ae,x as le,y as ce,z as de}from"./chunk-IMVMIXVJ.js";import"./chunk-2D2YD753.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-OIBDX2CA.js";import{b as z,d as U}from"./chunk-AOOG6YOT.js";import"./chunk-M3TKVRYP.js";import"./chunk-2MKKFLNJ.js";import{h as B,j as $,k as j,s as q}from"./chunk-VZ5CMS5O.js";import"./chunk-F2X3VGZZ.js";import{$b as O,Bb as P,Db as f,Dc as v,Ec as b,Ha as A,Lb as a,Ob as _,Pb as y,Rb as F,Rc as T,Tb as k,Ub as M,Vb as i,Vc as V,Wb as n,Xb as g,Y as I,_ as C,ec as w,fc as d,hb as r,ia as c,qa as G,ra as E,rc as h,sc as S,tc as R,ua as N,xb as D}from"./chunk-NMCKMUY4.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-UW7IAYIG.js";import{a as _e,b as ve,c as be,d as xe,e as Ce,f as ye}from"./chunk-PKOERZXQ.js";import"./chunk-PTQPB44D.js";import{a as he}from"./chunk-XKI7WLHE.js";import{a as fe,b as ge}from"./chunk-Q4LKKVQU.js";import{a as se}from"./chunk-5CZNOXPC.js";import"./chunk-IGWIRCAS.js";import"./chunk-RXOOTYEO.js";import{a as oe,b as re}from"./chunk-XPRP6AB4.js";import"./chunk-YZTBV6HG.js";import"./chunk-QWTGY7FA.js";import{g as ue}from"./chunk-P4DH4OHM.js";import"./chunk-ZUDQOT7C.js";import{a as pe,b as me}from"./chunk-BUDZ3ONE.js";import"./chunk-IRGC65GN.js";import"./chunk-V4SH72WU.js";import{n as ie,o as ne,w as ae,x as le,y as ce,z as de}from"./chunk-IMVMIXVJ.js";import"./chunk-2D2YD753.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-OIBDX2CA.js";import{b as z,d as U}from"./chunk-AOOG6YOT.js";import"./chunk-XJ7SJUJ2.js";import"./chunk-2MKKFLNJ.js";import{h as B,j as $,k as j,s as q}from"./chunk-VZ5CMS5O.js";import"./chunk-F2X3VGZZ.js";import{$b as O,Bb as P,Db as f,Dc as v,Ec as b,Ha as A,Lb as a,Ob as _,Pb as y,Rb as F,Rc as T,Tb as k,Ub as M,Vb as i,Vc as V,Wb as n,Xb as g,Y as I,_ as C,ec as w,fc as d,hb as r,ia as c,qa as G,ra as E,rc as h,sc as S,tc as R,ua as N,xb as D}from"./chunk-NMCKMUY4.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 un}from"./chunk-NHHXXJY6.js";import{a as qn}from"./chunk-KIBBRAL5.js";import{a as Xn}from"./chunk-5CZNOXPC.js";import"./chunk-IGWIRCAS.js";import{a as Fn}from"./chunk-HQMTUZZQ.js";import{a as $n}from"./chunk-RXOOTYEO.js";import{b as Wn}from"./chunk-CWFLUFKM.js";import"./chunk-LWYAFMN3.js";import"./chunk-E4MHRZVH.js";import"./chunk-YZTBV6HG.js";import{b as jn}from"./chunk-ZMIVD3SF.js";import{a as Dn}from"./chunk-DHLFL3KH.js";import{a as Vn}from"./chunk-QWTGY7FA.js";import"./chunk-ZUDQOT7C.js";import{b as Gn}from"./chunk-BUDZ3ONE.js";import{c as Mn}from"./chunk-V4SH72WU.js";import{a as et,c as An,f as ai,o as Bn,p as Rn,t as Hn,u as Si,w as Nn,x as oi,y as Yn,z as Ti}from"./chunk-IMVMIXVJ.js";import"./chunk-2D2YD753.js";import{Da as si,G as Sn,Ia as Ln,J as Tn,Ja as kn,K as Pn,Ka as zn,La as ri,Ma as ge,P as Ie,Q as _t,R as Nt,S as En,Ua as Je,b as mn,e as fn,f as gn,h as hn,ia as On,j as vn,k as wn,ma as In,p as bn,q as yn,r as _n,s as Cn,w as ni,x as xn}from"./chunk-OIBDX2CA.js";import{b as rn,d as an,e as on,f as ln,l as Ht}from"./chunk-AOOG6YOT.js";import{a as cn,c as Mi}from"./chunk-M3TKVRYP.js";import{a as pn}from"./chunk-2MKKFLNJ.js";import{H as sn,h as ct,j as ii,k as Ft,l as Bt,m as Rt,n as tn,s as we,t as Oe,z as nn}from"./chunk-VZ5CMS5O.js";import{c as dn,d as _i,f as Ci,h as xi}from"./chunk-F2X3VGZZ.js";import{$b as ve,$c as Vt,Aa as We,Ab as Qi,Ba as Wi,Bb as Ke,Cc as Ze,Da as qi,Db as X,Dc as Ji,Ea as xe,Ec as pe,Fa as wt,Fc as Be,Gc as ti,Ha as Ee,Kb as Z,La as Ui,Lb as $,Nb as Ki,Nc as Dt,Ob as Qt,Oc as $t,Pb as ye,Qb as Kt,Rb as Zt,Rc as dt,Tb as Jt,Ub as ei,Vb as G,W as Xi,Wb as N,Xb as te,Yb as at,Zb as ot,_b as Me,_c as pt,ba as Yi,bd as en,ca as Ye,cb as bi,da as je,db as qe,ec as ie,fc as H,gc as bt,hb as R,hc as lt,ia as ae,kc as fe,lc as yt,mc as ne,nb as Ue,nc as se,pa as ji,qa as U,qc as Lt,ra as Q,rc as le,s as wi,sb as Ut,sc as Fe,t as Gi,tc as yi,ua as Ae,uc as Zi,wc as kt,xb as he,xc as zt,yb as Qe,yc as At}from"./chunk-NMCKMUY4.js";import{a as me,b as It}from"./chunk-YQFG5XE2.js";var sr=["*"],rr=({dt:i})=>`
1
+ import{a as un}from"./chunk-MYREYOSL.js";import{a as qn}from"./chunk-KIBBRAL5.js";import{a as Xn}from"./chunk-5CZNOXPC.js";import"./chunk-IGWIRCAS.js";import{a as Fn}from"./chunk-HQMTUZZQ.js";import{a as $n}from"./chunk-RXOOTYEO.js";import{b as Wn}from"./chunk-CWFLUFKM.js";import"./chunk-LWYAFMN3.js";import"./chunk-E4MHRZVH.js";import"./chunk-YZTBV6HG.js";import{b as jn}from"./chunk-ZMIVD3SF.js";import{a as Dn}from"./chunk-DHLFL3KH.js";import{a as Vn}from"./chunk-QWTGY7FA.js";import"./chunk-ZUDQOT7C.js";import{b as Gn}from"./chunk-BUDZ3ONE.js";import{c as Mn}from"./chunk-V4SH72WU.js";import{a as et,c as An,f as ai,o as Bn,p as Rn,t as Hn,u as Si,w as Nn,x as oi,y as Yn,z as Ti}from"./chunk-IMVMIXVJ.js";import"./chunk-2D2YD753.js";import{Da as si,G as Sn,Ia as Ln,J as Tn,Ja as kn,K as Pn,Ka as zn,La as ri,Ma as ge,P as Ie,Q as _t,R as Nt,S as En,Ua as Je,b as mn,e as fn,f as gn,h as hn,ia as On,j as vn,k as wn,ma as In,p as bn,q as yn,r as _n,s as Cn,w as ni,x as xn}from"./chunk-OIBDX2CA.js";import{b as rn,d as an,e as on,f as ln,l as Ht}from"./chunk-AOOG6YOT.js";import{a as cn,c as Mi}from"./chunk-XJ7SJUJ2.js";import{a as pn}from"./chunk-2MKKFLNJ.js";import{H as sn,h as ct,j as ii,k as Ft,l as Bt,m as Rt,n as tn,s as we,t as Oe,z as nn}from"./chunk-VZ5CMS5O.js";import{c as dn,d as _i,f as Ci,h as xi}from"./chunk-F2X3VGZZ.js";import{$b as ve,$c as Vt,Aa as We,Ab as Qi,Ba as Wi,Bb as Ke,Cc as Ze,Da as qi,Db as X,Dc as Ji,Ea as xe,Ec as pe,Fa as wt,Fc as Be,Gc as ti,Ha as Ee,Kb as Z,La as Ui,Lb as $,Nb as Ki,Nc as Dt,Ob as Qt,Oc as $t,Pb as ye,Qb as Kt,Rb as Zt,Rc as dt,Tb as Jt,Ub as ei,Vb as G,W as Xi,Wb as N,Xb as te,Yb as at,Zb as ot,_b as Me,_c as pt,ba as Yi,bd as en,ca as Ye,cb as bi,da as je,db as qe,ec as ie,fc as H,gc as bt,hb as R,hc as lt,ia as ae,kc as fe,lc as yt,mc as ne,nb as Ue,nc as se,pa as ji,qa as U,qc as Lt,ra as Q,rc as le,s as wi,sb as Ut,sc as Fe,t as Gi,tc as yi,ua as Ae,uc as Zi,wc as kt,xb as he,xc as zt,yb as Qe,yc as At}from"./chunk-NMCKMUY4.js";import{a as me,b as It}from"./chunk-YQFG5XE2.js";var sr=["*"],rr=({dt:i})=>`
2
2
  .p-inputgroup,
3
3
  .p-inputgroup .p-floatlabel,
4
4
  .p-inputgroup .p-iftalabel {
@@ -1 +1 @@
1
- import{a as u}from"./chunk-NHHXXJY6.js";import{a as o}from"./chunk-M3TKVRYP.js";import{ca as i,ia as n}from"./chunk-NMCKMUY4.js";var d=(()=>{class r{constructor(){this.httpService=n(o),this.authService=n(u)}getJournalInvoiceLoader(){return this.httpService.get(void 0,"api/GenerateJournal/invoice/Loader")}getCustomerSuggestions(e){let t={Prefix:e,Count:100};return this.httpService.get(this.authService.getTenantExternalURL(),"/API/AC/GetCustomerSuggestion",{params:t})}getJournalInvoice(e){let t={params:e};return this.httpService.get(void 0,"api/GenerateJournal/invoice/get",t)}generateJournalInvoice(e){return this.httpService.post(void 0,"api/GenerateJournal/invoice/Submit",e)}getGJSupplierBillLoader(){return this.httpService.get(void 0,"api/GenerateJournal/bill/Loader")}getJournalSupplierBill(e){let t={params:e};return this.httpService.get(void 0,"api/GenerateJournal/bill/get",t)}generateJournalSupplierBill(e){return this.httpService.post(void 0,"api/GenerateJournal/bill/Submit",e)}getGJShiftLoader(){return this.httpService.get(void 0,"api/GenerateJournal/Shift/Loader")}getJournalShift(e){let t={params:e};return this.httpService.get(void 0,"api/GenerateJournal/Shift/get",t)}generateJornalShift(e){return this.httpService.post(void 0,"api/GenerateJournal/Shift/Submit",e)}getARJournalLoader(){return this.httpService.get(void 0,"/api/GenerateJournal/JoinInvoice/Loader")}getARJournal(e){let t={params:e};return this.httpService.get(void 0,"api/GenerateJournal/JoinInvoice/get",t)}createARJournal(e){return this.httpService.post(void 0,"api/GenerateJournal/JoinInvoice/Submit",e)}getAPJournalLoader(){return this.httpService.get(void 0,"/api/GenerateJournal/JoinBill/Loader")}getAPJournal(e){let t={params:e};return this.httpService.get(void 0,"api/GenerateJournal/JoinBill/get",t)}createAPJournal(e){return this.httpService.post(void 0,"api/GenerateJournal/JoinBill/Submit",e)}getGJAdjustmentLoader(){return this.httpService.get(void 0,"api/GenerateJournal/InventoryAdjustment/Loader")}getAdjustmentJournal(e){let t={params:e};return this.httpService.get(void 0,"api/GenerateJournal/InventoryAdjustment/get",t)}createAdjustmentJournal(e){return this.httpService.post(void 0,"api/GenerateJournal/InventoryAdjustment/Submit",e)}getSupplierSuggestions(e){let t={Prefix:e,Count:100};return this.httpService.get(this.authService.getTenantExternalURL(),"/API/AC/GetSupplierSuggestion",{params:t})}static{this.\u0275fac=function(t){return new(t||r)}}static{this.\u0275prov=i({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})();export{d as a};
1
+ import{a as u}from"./chunk-MYREYOSL.js";import{a as o}from"./chunk-XJ7SJUJ2.js";import{ca as i,ia as n}from"./chunk-NMCKMUY4.js";var d=(()=>{class r{constructor(){this.httpService=n(o),this.authService=n(u)}getJournalInvoiceLoader(){return this.httpService.get(void 0,"api/GenerateJournal/invoice/Loader")}getCustomerSuggestions(e){let t={Prefix:e,Count:100};return this.httpService.get(this.authService.getTenantExternalURL(),"/API/AC/GetCustomerSuggestion",{params:t})}getJournalInvoice(e){let t={params:e};return this.httpService.get(void 0,"api/GenerateJournal/invoice/get",t)}generateJournalInvoice(e){return this.httpService.post(void 0,"api/GenerateJournal/invoice/Submit",e)}getGJSupplierBillLoader(){return this.httpService.get(void 0,"api/GenerateJournal/bill/Loader")}getJournalSupplierBill(e){let t={params:e};return this.httpService.get(void 0,"api/GenerateJournal/bill/get",t)}generateJournalSupplierBill(e){return this.httpService.post(void 0,"api/GenerateJournal/bill/Submit",e)}getGJShiftLoader(){return this.httpService.get(void 0,"api/GenerateJournal/Shift/Loader")}getJournalShift(e){let t={params:e};return this.httpService.get(void 0,"api/GenerateJournal/Shift/get",t)}generateJornalShift(e){return this.httpService.post(void 0,"api/GenerateJournal/Shift/Submit",e)}getARJournalLoader(){return this.httpService.get(void 0,"/api/GenerateJournal/JoinInvoice/Loader")}getARJournal(e){let t={params:e};return this.httpService.get(void 0,"api/GenerateJournal/JoinInvoice/get",t)}createARJournal(e){return this.httpService.post(void 0,"api/GenerateJournal/JoinInvoice/Submit",e)}getAPJournalLoader(){return this.httpService.get(void 0,"/api/GenerateJournal/JoinBill/Loader")}getAPJournal(e){let t={params:e};return this.httpService.get(void 0,"api/GenerateJournal/JoinBill/get",t)}createAPJournal(e){return this.httpService.post(void 0,"api/GenerateJournal/JoinBill/Submit",e)}getGJAdjustmentLoader(){return this.httpService.get(void 0,"api/GenerateJournal/InventoryAdjustment/Loader")}getAdjustmentJournal(e){let t={params:e};return this.httpService.get(void 0,"api/GenerateJournal/InventoryAdjustment/get",t)}createAdjustmentJournal(e){return this.httpService.post(void 0,"api/GenerateJournal/InventoryAdjustment/Submit",e)}getSupplierSuggestions(e){let t={Prefix:e,Count:100};return this.httpService.get(this.authService.getTenantExternalURL(),"/API/AC/GetSupplierSuggestion",{params:t})}static{this.\u0275fac=function(t){return new(t||r)}}static{this.\u0275prov=i({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})();export{d as a};
@@ -1 +1 @@
1
- import{a as r}from"./chunk-NHHXXJY6.js";import"./chunk-IGWIRCAS.js";import{d as n}from"./chunk-AOOG6YOT.js";import"./chunk-M3TKVRYP.js";import"./chunk-2MKKFLNJ.js";import"./chunk-VZ5CMS5O.js";import"./chunk-F2X3VGZZ.js";import{ia as e}from"./chunk-NMCKMUY4.js";import"./chunk-YQFG5XE2.js";var a=(t,m)=>{let o=e(r),i=e(n),p=o.isAuthenticated(),s=!o.isTokenExpired(),u=o.checkAuthKeysExists();return p&&s&&u?(i.navigateByUrl("/pages/dashboard"),!1):!0};var C=[{path:"",canActivate:[a],loadComponent:()=>import("./chunk-AHX56FH2.js").then(t=>t.LoginComponent)},{path:"404",loadComponent:()=>import("./chunk-U5XXKH2H.js").then(t=>t.NotfoundComponent)},{path:"signup",loadComponent:()=>import("./chunk-GDQUB54I.js").then(t=>t.SignupComponent)},{path:"504",loadComponent:()=>import("./chunk-6NX36ZC2.js").then(t=>t.TimeoutComponent)}];export{C as AuthenticationRoutes};
1
+ import{a as r}from"./chunk-MYREYOSL.js";import"./chunk-IGWIRCAS.js";import{d as n}from"./chunk-AOOG6YOT.js";import"./chunk-XJ7SJUJ2.js";import"./chunk-2MKKFLNJ.js";import"./chunk-VZ5CMS5O.js";import"./chunk-F2X3VGZZ.js";import{ia as e}from"./chunk-NMCKMUY4.js";import"./chunk-YQFG5XE2.js";var a=(t,m)=>{let o=e(r),i=e(n),p=o.isAuthenticated(),s=!o.isTokenExpired(),u=o.checkAuthKeysExists();return p&&s&&u?(i.navigateByUrl("/pages/dashboard"),!1):!0};var C=[{path:"",canActivate:[a],loadComponent:()=>import("./chunk-PPGOVQXM.js").then(t=>t.LoginComponent)},{path:"404",loadComponent:()=>import("./chunk-U5XXKH2H.js").then(t=>t.NotfoundComponent)},{path:"signup",loadComponent:()=>import("./chunk-GDQUB54I.js").then(t=>t.SignupComponent)},{path:"504",loadComponent:()=>import("./chunk-6NX36ZC2.js").then(t=>t.TimeoutComponent)}];export{C as AuthenticationRoutes};
@@ -1 +1 @@
1
- import{a as F}from"./chunk-OW25MQS7.js";import{a as q}from"./chunk-53HJBLFX.js";import{a as R}from"./chunk-QF4D5YPK.js";import{g as w}from"./chunk-TUFQ5JVG.js";import"./chunk-ZUDQOT7C.js";import{a as k}from"./chunk-BUDZ3ONE.js";import"./chunk-SN7DLFX2.js";import"./chunk-V4SH72WU.js";import{w as P}from"./chunk-IMVMIXVJ.js";import{b as M}from"./chunk-2D2YD753.js";import"./chunk-OIBDX2CA.js";import{b as I,d as E,e as D}from"./chunk-AOOG6YOT.js";import"./chunk-M3TKVRYP.js";import"./chunk-2MKKFLNJ.js";import"./chunk-VZ5CMS5O.js";import"./chunk-F2X3VGZZ.js";import{$b as y,D as f,Db as u,Dc as J,Ec as b,Lb as m,Qb as h,Rc as s,Vb as n,Wb as o,Xb as j,Y as _,_ as x,ec as S,fc as a,hb as p,ia as l,qa as T,ra as v,rc as r,sc as c,xb as C}from"./chunk-NMCKMUY4.js";import"./chunk-YQFG5XE2.js";var V=()=>["/pages/accounting-setup/journal-tag/form"],B=t=>({id:t});function L(t,d){if(t&1){let e=y();n(0,"div",3)(1,"p-button-group"),j(2,"p-button",4),n(3,"p-button",5),S("onClick",function(){T(e);let g=a();return v(g.onJournalTagDelete())}),o()()()}if(t&2){let e=a();p(2),m("routerLink",J(2,V))("queryParams",b(3,B,e.journalTag().id))}}function W(t,d){if(t&1&&(n(0,"div",6)(1,"div",7)(2,"p-panel",8)(3,"div",9)(4,"div",6)(5,"div",10),r(6,"Name"),o(),n(7,"div",10),r(8),o()(),n(9,"div",6)(10,"div",10),r(11,"Description"),o(),n(12,"div",10),r(13),o()()()()()()),t&2){let e=a(2);p(8),c(e.journalTag().name),p(5),c(e.journalTag().description)}}function A(t,d){if(t&1&&u(0,W,14,2,"div",6),t&2){let e=a();h(e.journalTag()?0:-1)}}var tt=(()=>{class t{constructor(){this.journalTagService=l(F),this.route=l(I),this.router=l(E),this.journalTag=M(this.route.queryParamMap.pipe(f(e=>e.has("id")),_(e=>this.journalTagService.journalTagInfo(e.get("id"))),R("Journal Tag Info ")),{initialValue:null})}onJournalTagDelete(){this.journalTagService.journalTagDelete(this.journalTag().id).pipe(x(()=>this.router.navigate(["/pages/accounting-setup/journal-tag"]))).subscribe()}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=C({type:t,selectors:[["app-journal-tag-info"]],decls:5,vars:1,consts:[["actionButton",""],["content",""],["pageTitle","Journal Tag Form",3,"hasMainWrapperPadding"],[1,"d-flex","gap-2"],["severity","secondary","outlined","","label","Edit","icon","fa-solid fa-pen-to-square",3,"routerLink","queryParams"],["severity","secondary","outlined","","label","Delete","icon","fa-solid fa-trash",3,"onClick"],[1,"row"],[1,"col-6"],["styleClass","rounded-2"],[1,"d-flex","flex-column","gap-2"],[1,"col"]],template:function(i,g){i&1&&(n(0,"app-main-panel",2),u(1,L,4,5,"ng-template",null,0,s)(3,A,1,1,"ng-template",null,1,s),o()),i&2&&m("hasMainWrapperPadding",!0)},dependencies:[w,k,q,P,D],encapsulation:2})}}return t})();export{tt as JournalTagInfoComponent};
1
+ import{a as F}from"./chunk-UBPSH6UX.js";import{a as q}from"./chunk-53HJBLFX.js";import{a as R}from"./chunk-QF4D5YPK.js";import{g as w}from"./chunk-P4DH4OHM.js";import"./chunk-ZUDQOT7C.js";import{a as k}from"./chunk-BUDZ3ONE.js";import"./chunk-IRGC65GN.js";import"./chunk-V4SH72WU.js";import{w as P}from"./chunk-IMVMIXVJ.js";import{b as M}from"./chunk-2D2YD753.js";import"./chunk-OIBDX2CA.js";import{b as I,d as E,e as D}from"./chunk-AOOG6YOT.js";import"./chunk-XJ7SJUJ2.js";import"./chunk-2MKKFLNJ.js";import"./chunk-VZ5CMS5O.js";import"./chunk-F2X3VGZZ.js";import{$b as y,D as f,Db as u,Dc as J,Ec as b,Lb as m,Qb as h,Rc as s,Vb as n,Wb as o,Xb as j,Y as _,_ as x,ec as S,fc as a,hb as p,ia as l,qa as T,ra as v,rc as r,sc as c,xb as C}from"./chunk-NMCKMUY4.js";import"./chunk-YQFG5XE2.js";var V=()=>["/pages/accounting-setup/journal-tag/form"],B=t=>({id:t});function L(t,d){if(t&1){let e=y();n(0,"div",3)(1,"p-button-group"),j(2,"p-button",4),n(3,"p-button",5),S("onClick",function(){T(e);let g=a();return v(g.onJournalTagDelete())}),o()()()}if(t&2){let e=a();p(2),m("routerLink",J(2,V))("queryParams",b(3,B,e.journalTag().id))}}function W(t,d){if(t&1&&(n(0,"div",6)(1,"div",7)(2,"p-panel",8)(3,"div",9)(4,"div",6)(5,"div",10),r(6,"Name"),o(),n(7,"div",10),r(8),o()(),n(9,"div",6)(10,"div",10),r(11,"Description"),o(),n(12,"div",10),r(13),o()()()()()()),t&2){let e=a(2);p(8),c(e.journalTag().name),p(5),c(e.journalTag().description)}}function A(t,d){if(t&1&&u(0,W,14,2,"div",6),t&2){let e=a();h(e.journalTag()?0:-1)}}var tt=(()=>{class t{constructor(){this.journalTagService=l(F),this.route=l(I),this.router=l(E),this.journalTag=M(this.route.queryParamMap.pipe(f(e=>e.has("id")),_(e=>this.journalTagService.journalTagInfo(e.get("id"))),R("Journal Tag Info ")),{initialValue:null})}onJournalTagDelete(){this.journalTagService.journalTagDelete(this.journalTag().id).pipe(x(()=>this.router.navigate(["/pages/accounting-setup/journal-tag"]))).subscribe()}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=C({type:t,selectors:[["app-journal-tag-info"]],decls:5,vars:1,consts:[["actionButton",""],["content",""],["pageTitle","Journal Tag Form",3,"hasMainWrapperPadding"],[1,"d-flex","gap-2"],["severity","secondary","outlined","","label","Edit","icon","fa-solid fa-pen-to-square",3,"routerLink","queryParams"],["severity","secondary","outlined","","label","Delete","icon","fa-solid fa-trash",3,"onClick"],[1,"row"],[1,"col-6"],["styleClass","rounded-2"],[1,"d-flex","flex-column","gap-2"],[1,"col"]],template:function(i,g){i&1&&(n(0,"app-main-panel",2),u(1,L,4,5,"ng-template",null,0,s)(3,A,1,1,"ng-template",null,1,s),o()),i&2&&m("hasMainWrapperPadding",!0)},dependencies:[w,k,q,P,D],encapsulation:2})}}return t})();export{tt as JournalTagInfoComponent};
@@ -1 +1 @@
1
- import{a as F}from"./chunk-XT4YHL2M.js";import{a as ze}from"./chunk-VSHPIUZM.js";import{a as je,b as Be}from"./chunk-HZ7BZ72K.js";import{a as oe}from"./chunk-NHHXXJY6.js";import{b as A}from"./chunk-DU72RNAU.js";import{a as Me}from"./chunk-XKI7WLHE.js";import"./chunk-T3EH4DR2.js";import"./chunk-LABWETHZ.js";import"./chunk-IGWIRCAS.js";import{a as z,b as j}from"./chunk-3A4BFUGD.js";import{d as ke,i as Ne,j as Pe,k as Re}from"./chunk-3IEOINKV.js";import{a as De,b as Ae}from"./chunk-53I5JFOQ.js";import"./chunk-HQMTUZZQ.js";import"./chunk-RXOOTYEO.js";import"./chunk-SEXB43QC.js";import{a as Fe,b as Je}from"./chunk-CWFLUFKM.js";import"./chunk-LWYAFMN3.js";import"./chunk-NDLX3ORI.js";import"./chunk-E4MHRZVH.js";import"./chunk-XPRP6AB4.js";import"./chunk-YZTBV6HG.js";import"./chunk-DHLFL3KH.js";import"./chunk-QWTGY7FA.js";import{g as Ve}from"./chunk-TUFQ5JVG.js";import"./chunk-ZUDQOT7C.js";import{a as xe,b as Ce}from"./chunk-BUDZ3ONE.js";import{a as ve,b as y,c as ye,d as we,e as Ie,f as Te,g as Ee}from"./chunk-SN7DLFX2.js";import"./chunk-V4SH72WU.js";import{n as fe,o as _e,w as ge,x as he,y as Se,z as be}from"./chunk-IMVMIXVJ.js";import"./chunk-2D2YD753.js";import{b as re,c as ae,e as le,f as pe,k as me,l as se,o as ce,u as de,x as ue}from"./chunk-OIBDX2CA.js";import"./chunk-AOOG6YOT.js";import"./chunk-M3TKVRYP.js";import"./chunk-2MKKFLNJ.js";import{h as Y,j as Z,k as ee,n as te,p as ie,s as ne}from"./chunk-VZ5CMS5O.js";import"./chunk-F2X3VGZZ.js";import{$b as w,Bb as K,Cc as Q,Db as x,Ec as V,Ha as P,Lb as c,Nc as T,Oc as X,Pc as D,Rc as v,Vb as r,Wb as o,Xb as S,Y as N,_ as H,bd as E,c as J,cb as U,db as L,ec as I,fc as _,hb as l,ia as C,qa as g,ra as h,rc as s,s as k,sc as b,tc as R,vc as W,wc as $,xb as G,xc as M,yc as q}from"./chunk-NMCKMUY4.js";import{a as d,b as f}from"./chunk-YQFG5XE2.js";var Ke={data:{data:[],totalCount:0},filter:{number:null,outletName:null,from:null,to:null,supplierID:null,pageNumber:1,pageSize:20,export:!1,exportPageNumber:1,exportPageSize:1e4,paymentState:0},meta:{options:{outlets:[]},filter:{number:null,outletName:null,from:null,to:null,supplierID:null,pageNumber:1,pageSize:20,export:!1,exportPageNumber:1,exportPageSize:1e4,paymentState:0}}},B=ye(Ee(Ke),we(t=>({first:E(()=>(t.filter().pageNumber-1)*t.filter().pageSize+1),end:E(()=>Math.min(t.filter().pageNumber*t.filter().pageSize,t.data().totalCount)),hasCheckedRows:E(()=>t.data().data.some(a=>a.checked)),checkedAPCollection:E(()=>t.data().data.filter(a=>a.checked).map(a=>a.id))})),Te(t=>{let a=C(F),e=C(A);return{updateFilter(n){y(t,i=>f(d({},i),{filter:d(d({},i.filter),n)}))},onRowSelect(n){y(t,i=>{let u=i.data.data.map(m=>m.id===n.id?f(d({},m),{checked:!0}):m);return f(d({},i),{data:f(d({},i.data),{data:u})})})},onRowUnselect(n){y(t,i=>{let u=i.data.data.map(m=>m.id===n.id?f(d({},m),{checked:!1}):m);return f(d({},i),{data:f(d({},i.data),{data:u})})})},onHeaderCheckboxToggle(n){y(t,i=>{let u=i.data.data.map(m=>f(d({},m),{checked:n}));return f(d({},i),{data:f(d({},i.data),{data:u})})})},getAPLoader:z(J(N(()=>a.getAPJournalLoader().pipe(j({next:n=>{y(t,i=>f(d({},i),{meta:n}))},error:n=>{console.error("Error fetching AP journal:",n)}}))))),getARCollection:z(J(k(n=>Object.entries(n).reduce((i,[u,m])=>(m!=null&&(i[u]=m),i),{})),N(n=>a.getAPJournal(n).pipe(k(i=>f(d({},i),{data:i.data.map(u=>f(d({},u),{due:e.from(u.due)?e.from(u.due).format():null,checked:!1}))})),j({next:i=>{y(t,u=>f(d({},u),{data:i}))},error:i=>{console.error("Error fetching customer invoice:",i)}})))))}}),Ie(t=>({onInit:()=>{t.getAPLoader(),t.getARCollection(t.filter)}})));var O=t=>({"ng-invalid ng-dirty":t});function We(t,a){if(t&1){let e=w();r(0,"p-button",10),I("onClick",function(){g(e);let n=_(2);return h(n.onCreateJournal())}),o()}}function $e(t,a){if(t&1&&x(0,We,1,0,"p-button",9),t&2){let e=_();c("ngIf",e.store.hasCheckedRows())}}function qe(t,a){t&1&&(r(0,"tr")(1,"th",12),S(2,"p-tableHeaderCheckbox"),o(),r(3,"th",13),s(4,"Outlet"),o(),r(5,"th",14),s(6,"Number"),o(),r(7,"th",15),s(8,"Supplier"),o(),r(9,"th",16),s(10,"Date"),o(),r(11,"th",16),s(12,"Due"),o(),r(13,"th",15),s(14,"Note"),o(),r(15,"th",17),s(16,"Payment"),o(),S(17,"th",18),o())}function Qe(t,a){if(t&1&&(r(0,"tr")(1,"td"),S(2,"p-tableCheckbox",19),o(),r(3,"td"),s(4),o(),r(5,"td")(6,"a",20),s(7),o()(),r(8,"td"),s(9),o(),r(10,"td"),s(11),T(12,"date"),o(),r(13,"td"),s(14),T(15,"date"),o(),r(16,"td"),S(17,"div",21),o(),r(18,"td"),s(19),o(),r(20,"td"),S(21,"p-button",22),o()()),t&2){let e=a.$implicit,p=_(2);l(2),c("value",e),l(2),b(e.outlet),l(2),c("href",p.authService.getTenantExternalURL()+"/menu/Debt/Debt/Join_Bill/New_Join_Bill/Info?ID="+e.id,L),l(),R(" ",e.number," "),l(2),b(e.customer),l(2),b(D(12,12,e.date,"d MMM y")),l(3),b(e.due?D(15,15,e.due,"d MMM y hh:mm"):"-"),l(3),c("innerHTML",e.note,U),l(2),b(e.payment),l(2),c("icon",e.integrated?"fa-solid fa-circle-check":"fa-solid fa-circle-xmark")("severity",e.integrated?"success":"danger")("text",!0)}}function Xe(t,a){if(t&1&&s(0),t&2){let e=_(2);W(" Showing ",e.store.first()," to ",e.store.end()," of ",e.store.data().totalCount," entries ")}}function Ye(t,a){t&1&&(r(0,"tr")(1,"td",23)(2,"span"),s(3,"No records found."),o()()())}function Ze(t,a){if(t&1){let e=w();r(0,"p-panel")(1,"p-table",11),I("onPage",function(n){g(e);let i=_();return h(i.onPageChange(n))})("onHeaderCheckboxToggle",function(n){g(e);let i=_();return h(i.onHeaderCheckboxToggle(n))})("onRowSelect",function(n){g(e);let i=_();return h(i.onRowSelect(n))})("onRowUnselect",function(n){g(e);let i=_();return h(i.onRowUnselect(n))}),x(2,qe,18,0,"ng-template",null,3,v)(4,Qe,22,18,"ng-template",null,4,v)(6,Xe,1,3,"ng-template",null,5,v)(8,Ye,4,0,"ng-template",null,6,v),o()()}if(t&2){let e=_();l(),c("value",e.store.data().data)("paginator",!0)("rows",e.store.filter().pageSize)("totalRecords",e.store.data().totalCount)("lazy",!0)}}function et(t,a){if(t&1&&(r(0,"span",34),s(1),T(2,"truncate"),o()),t&2){let e=a.$implicit;c("pTooltip",e.name),l(),R(" ",D(2,2,e.name,30)," ")}}function tt(t,a){if(t&1&&(r(0,"div")(1,"span",36),s(2),o()()),t&2){let e=a.$implicit;l(2),b(e)}}function it(t,a){if(t&1&&(r(0,"div"),x(1,tt,3,1,"div",35),o()),t&2){let e=_(2);l(),c("ngForOf",e.getErrors("from"))}}function nt(t,a){if(t&1&&(r(0,"div")(1,"span",36),s(2),o()()),t&2){let e=a.$implicit;l(2),b(e)}}function ot(t,a){if(t&1&&(r(0,"div"),x(1,nt,3,1,"div",35),o()),t&2){let e=_(2);l(),c("ngForOf",e.getErrors("to"))}}function rt(t,a){if(t&1&&(r(0,"div")(1,"span",36),s(2),o()()),t&2){let e=a.$implicit;l(2),b(e)}}function at(t,a){if(t&1&&(r(0,"div"),x(1,rt,3,1,"div",35),o()),t&2){let e=_(2);l(),c("ngForOf",e.getErrors("pageSize"))}}function lt(t,a){if(t&1){let e=w();r(0,"form",24)(1,"div",25)(2,"label",26),s(3,"Outlet"),o(),r(4,"p-select",27),x(5,et,3,5,"ng-template",null,7,v),o()(),r(7,"div",25)(8,"label",26),s(9,"From - To"),o(),r(10,"div",28),S(11,"p-datepicker",29),x(12,it,2,1,"div",30),S(13,"p-datepicker",31),x(14,ot,2,1,"div",30),o()(),r(15,"div",25)(16,"label",26),s(17,"Supplier"),o(),r(18,"p-autocomplete",32),T(19,"async"),I("completeMethod",function(n){g(e);let i=_();return h(i.onSearchSupplier(n))}),o()(),r(20,"div",25)(21,"label",26),s(22,"Page Size"),o(),S(23,"input",33),x(24,at,2,1,"div",30),o()()}if(t&2){let e=_();c("formGroup",e.form),l(4),c("virtualScrollItemSize",50)("options",e.store.meta().options.outlets),l(7),c("iconDisplay","input")("showIcon",!0)("ngClass",V(16,O,e.isInvalid("from"))),l(),c("ngIf",e.isInvalid("from")),l(),c("iconDisplay","input")("showIcon",!0)("ngClass",V(18,O,e.isInvalid("to"))),l(),c("ngIf",e.isInvalid("to")),l(4),c("suggestions",X(19,14,e.supplierSuggestions$)),l(5),c("ngClass",V(20,O,e.isInvalid("pageSize"))),l(),c("ngIf",e.isInvalid("pageSize"))}}var Qt=(()=>{class t extends Me{constructor(){super(),this.store=C(B),this.generateJournalService=C(F),this.authService=C(oe),this.isDialogFilterVisible=P(!1),this.isInitDialogFilterVisible=P(!1),this.fb=C(de),this.dayjsService=C(A)}ngOnInit(){this.initform()}initform(){let{outletName:e,number:p,from:n,to:i,paymentState:u,supplierID:m,pageNumber:Oe,pageSize:He,export:Ue,exportPageNumber:Le,exportPageSize:Ge}=this.store.filter();this.form=this.fb.group({outletName:this.fb.control(e),number:this.fb.control(p),from:this.fb.control(this.dayjsService.from(n)?this.dayjsService.from(n).toDate():null),to:this.fb.control(this.dayjsService.from(i)?this.dayjsService.from(i).toDate():null),paymentState:this.fb.control(u),supplierID:this.fb.control(m),pageNumber:this.fb.control(Oe),pageSize:this.fb.control(He,[ae.required]),export:this.fb.control(Ue),exportPageNumber:this.fb.control(Le),exportPageSize:this.fb.control(Ge)})}onFilterOKEvent(){if(this.form.invalid){this.form.markAllAsTouched();return}let e=Object.entries(this.form.getRawValue()).reduce((p,[n,i])=>(i!=null&&(n==="from"||n==="to"?(typeof i=="string"||typeof i=="number"||i instanceof Date)&&(p[n]=this.dayjsService.from(i)?this.dayjsService.format(i):null):p[n]=i),p),{});this.store.updateFilter(e),this.isDialogFilterVisible.update(p=>!p)}onSearch(e){this.store.updateFilter(f(d({},this.store.filter()),{number:e}))}onSearchSupplier(e){this.supplierSuggestions$=this.generateJournalService.getSupplierSuggestions(e.query).pipe()}onPageChange(e){let p=e.first/e.rows;this.store.updateFilter(f(d({},this.store.filter()),{pageNumber:p+1}))}onHeaderCheckboxToggle(e){this.store.onHeaderCheckboxToggle(e.checked)}onRowSelect(e){this.store.onRowSelect(e.data)}onRowUnselect(e){if(Array.isArray(e.data)){e.data.forEach(p=>{this.store.onRowUnselect(p)});return}else this.store.onRowUnselect(e.data)}onCreateJournal(){this.generateJournalService.createAPJournal(this.store.checkedAPCollection()).pipe(H(()=>{this.store.getARCollection(this.store.filter)})).subscribe()}static{this.\u0275fac=function(p){return new(p||t)}}static{this.\u0275cmp=G({type:t,selectors:[["app-ap-journal"]],features:[Q([B]),K],decls:7,vars:5,consts:[["actionButton",""],["content",""],["filters",""],["header",""],["body",""],["paginatorleft",""],["emptymessage",""],["item",""],["pageTitle","AP Collection",3,"isDialogFilterVisibleChange","isInitDialogFilterVisibleChange","filterConfirmed","search","isSearchableInput","isFilterable","isDialogFilterVisible","isInitDialogFilterVisible","scrollable"],["label","Generate Journal",3,"onClick",4,"ngIf"],["label","Generate Journal",3,"onClick"],["dataKey","id",3,"onPage","onHeaderCheckboxToggle","onRowSelect","onRowUnselect","value","paginator","rows","totalRecords","lazy"],[2,"width","1rem"],[2,"width","10rem"],[2,"width","12rem"],[2,"width","14rem"],[2,"width","11rem"],[2,"width","9rem"],[2,"width","4rem"],[3,"value"],["target","_blank",1,"link","link-primary",3,"href"],[3,"innerHTML"],[3,"icon","severity","text"],["colspan","9"],[1,"d-flex","flex-column","row-gap-3",3,"formGroup"],[1,"d-flex","flex-column"],["for","outlet"],["virtualScroll","","showClear","","filter","","filterBy","name","formControlName","outletName","appendTo","body","optionLabel","name","optionValue","name","placeholder","Select an Outlet",3,"virtualScrollItemSize","options"],[1,"d-flex","flex-column","gap-2"],["showClear","","formControlName","from","styleClass","w-100","appendTo","body","inputId","icondisplay",3,"iconDisplay","showIcon","ngClass"],[4,"ngIf"],["showClear","","formControlName","to","styleClass","w-100","appendTo","body","inputId","icondisplay",3,"iconDisplay","showIcon","ngClass"],["showClear","","formControlName","supplierID","appendTo","body","styleClass","w-100","optionLabel","Value","optionValue","Key","inputStyleClass","w-100",3,"completeMethod","suggestions"],["appMaskNumber","","type","text","pInputText","","formControlName","pageSize",3,"ngClass"],[3,"pTooltip"],[4,"ngFor","ngForOf"],[1,"text-danger"]],template:function(p,n){if(p&1){let i=w();r(0,"app-main-panel",8),q("isDialogFilterVisibleChange",function(m){return g(i),M(n.isDialogFilterVisible,m)||(n.isDialogFilterVisible=m),h(m)})("isInitDialogFilterVisibleChange",function(m){return g(i),M(n.isInitDialogFilterVisible,m)||(n.isInitDialogFilterVisible=m),h(m)}),I("filterConfirmed",function(){return g(i),h(n.onFilterOKEvent())})("search",function(m){return g(i),h(n.onSearch(m))}),x(1,$e,1,1,"ng-template",null,0,v)(3,Ze,10,5,"ng-template",null,1,v)(5,lt,25,22,"ng-template",null,2,v),o()}p&2&&(c("isSearchableInput",!0)("isFilterable",!0),$("isDialogFilterVisible",n.isDialogFilterVisible)("isInitDialogFilterVisible",n.isInitDialogFilterVisible),c("scrollable",!0))},dependencies:[Ve,Re,ke,Ne,Pe,ne,Y,Z,ee,te,ie,he,ge,Ce,xe,ue,me,re,le,pe,se,ce,Je,Fe,Ae,De,_e,fe,Be,je,be,Se,ve,ze],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();export{Qt as ApJournalComponent};
1
+ import{a as F}from"./chunk-RKFZQV37.js";import{a as ze}from"./chunk-VSHPIUZM.js";import{a as je,b as Be}from"./chunk-HZ7BZ72K.js";import{a as oe}from"./chunk-MYREYOSL.js";import{b as A}from"./chunk-I23KOE73.js";import{a as Me}from"./chunk-XKI7WLHE.js";import"./chunk-T3EH4DR2.js";import"./chunk-LABWETHZ.js";import"./chunk-IGWIRCAS.js";import{a as z,b as j}from"./chunk-3A4BFUGD.js";import{d as ke,i as Ne,j as Pe,k as Re}from"./chunk-3IEOINKV.js";import{a as De,b as Ae}from"./chunk-53I5JFOQ.js";import"./chunk-HQMTUZZQ.js";import"./chunk-RXOOTYEO.js";import"./chunk-SEXB43QC.js";import{a as Fe,b as Je}from"./chunk-CWFLUFKM.js";import"./chunk-LWYAFMN3.js";import"./chunk-NDLX3ORI.js";import"./chunk-E4MHRZVH.js";import"./chunk-XPRP6AB4.js";import"./chunk-YZTBV6HG.js";import"./chunk-DHLFL3KH.js";import"./chunk-QWTGY7FA.js";import{g as Ve}from"./chunk-P4DH4OHM.js";import"./chunk-ZUDQOT7C.js";import{a as xe,b as Ce}from"./chunk-BUDZ3ONE.js";import{a as ve,b as y,c as ye,d as we,e as Ie,f as Te,g as Ee}from"./chunk-IRGC65GN.js";import"./chunk-V4SH72WU.js";import{n as fe,o as _e,w as ge,x as he,y as Se,z as be}from"./chunk-IMVMIXVJ.js";import"./chunk-2D2YD753.js";import{b as re,c as ae,e as le,f as pe,k as me,l as se,o as ce,u as de,x as ue}from"./chunk-OIBDX2CA.js";import"./chunk-AOOG6YOT.js";import"./chunk-XJ7SJUJ2.js";import"./chunk-2MKKFLNJ.js";import{h as Y,j as Z,k as ee,n as te,p as ie,s as ne}from"./chunk-VZ5CMS5O.js";import"./chunk-F2X3VGZZ.js";import{$b as w,Bb as K,Cc as Q,Db as x,Ec as V,Ha as P,Lb as c,Nc as T,Oc as X,Pc as D,Rc as v,Vb as r,Wb as o,Xb as S,Y as N,_ as H,bd as E,c as J,cb as U,db as L,ec as I,fc as _,hb as l,ia as C,qa as g,ra as h,rc as s,s as k,sc as b,tc as R,vc as W,wc as $,xb as G,xc as M,yc as q}from"./chunk-NMCKMUY4.js";import{a as d,b as f}from"./chunk-YQFG5XE2.js";var Ke={data:{data:[],totalCount:0},filter:{number:null,outletName:null,from:null,to:null,supplierID:null,pageNumber:1,pageSize:20,export:!1,exportPageNumber:1,exportPageSize:1e4,paymentState:0},meta:{options:{outlets:[]},filter:{number:null,outletName:null,from:null,to:null,supplierID:null,pageNumber:1,pageSize:20,export:!1,exportPageNumber:1,exportPageSize:1e4,paymentState:0}}},B=ye(Ee(Ke),we(t=>({first:E(()=>(t.filter().pageNumber-1)*t.filter().pageSize+1),end:E(()=>Math.min(t.filter().pageNumber*t.filter().pageSize,t.data().totalCount)),hasCheckedRows:E(()=>t.data().data.some(a=>a.checked)),checkedAPCollection:E(()=>t.data().data.filter(a=>a.checked).map(a=>a.id))})),Te(t=>{let a=C(F),e=C(A);return{updateFilter(n){y(t,i=>f(d({},i),{filter:d(d({},i.filter),n)}))},onRowSelect(n){y(t,i=>{let u=i.data.data.map(m=>m.id===n.id?f(d({},m),{checked:!0}):m);return f(d({},i),{data:f(d({},i.data),{data:u})})})},onRowUnselect(n){y(t,i=>{let u=i.data.data.map(m=>m.id===n.id?f(d({},m),{checked:!1}):m);return f(d({},i),{data:f(d({},i.data),{data:u})})})},onHeaderCheckboxToggle(n){y(t,i=>{let u=i.data.data.map(m=>f(d({},m),{checked:n}));return f(d({},i),{data:f(d({},i.data),{data:u})})})},getAPLoader:z(J(N(()=>a.getAPJournalLoader().pipe(j({next:n=>{y(t,i=>f(d({},i),{meta:n}))},error:n=>{console.error("Error fetching AP journal:",n)}}))))),getARCollection:z(J(k(n=>Object.entries(n).reduce((i,[u,m])=>(m!=null&&(i[u]=m),i),{})),N(n=>a.getAPJournal(n).pipe(k(i=>f(d({},i),{data:i.data.map(u=>f(d({},u),{due:e.from(u.due)?e.from(u.due).format():null,checked:!1}))})),j({next:i=>{y(t,u=>f(d({},u),{data:i}))},error:i=>{console.error("Error fetching customer invoice:",i)}})))))}}),Ie(t=>({onInit:()=>{t.getAPLoader(),t.getARCollection(t.filter)}})));var O=t=>({"ng-invalid ng-dirty":t});function We(t,a){if(t&1){let e=w();r(0,"p-button",10),I("onClick",function(){g(e);let n=_(2);return h(n.onCreateJournal())}),o()}}function $e(t,a){if(t&1&&x(0,We,1,0,"p-button",9),t&2){let e=_();c("ngIf",e.store.hasCheckedRows())}}function qe(t,a){t&1&&(r(0,"tr")(1,"th",12),S(2,"p-tableHeaderCheckbox"),o(),r(3,"th",13),s(4,"Outlet"),o(),r(5,"th",14),s(6,"Number"),o(),r(7,"th",15),s(8,"Supplier"),o(),r(9,"th",16),s(10,"Date"),o(),r(11,"th",16),s(12,"Due"),o(),r(13,"th",15),s(14,"Note"),o(),r(15,"th",17),s(16,"Payment"),o(),S(17,"th",18),o())}function Qe(t,a){if(t&1&&(r(0,"tr")(1,"td"),S(2,"p-tableCheckbox",19),o(),r(3,"td"),s(4),o(),r(5,"td")(6,"a",20),s(7),o()(),r(8,"td"),s(9),o(),r(10,"td"),s(11),T(12,"date"),o(),r(13,"td"),s(14),T(15,"date"),o(),r(16,"td"),S(17,"div",21),o(),r(18,"td"),s(19),o(),r(20,"td"),S(21,"p-button",22),o()()),t&2){let e=a.$implicit,p=_(2);l(2),c("value",e),l(2),b(e.outlet),l(2),c("href",p.authService.getTenantExternalURL()+"/menu/Debt/Debt/Join_Bill/New_Join_Bill/Info?ID="+e.id,L),l(),R(" ",e.number," "),l(2),b(e.customer),l(2),b(D(12,12,e.date,"d MMM y")),l(3),b(e.due?D(15,15,e.due,"d MMM y hh:mm"):"-"),l(3),c("innerHTML",e.note,U),l(2),b(e.payment),l(2),c("icon",e.integrated?"fa-solid fa-circle-check":"fa-solid fa-circle-xmark")("severity",e.integrated?"success":"danger")("text",!0)}}function Xe(t,a){if(t&1&&s(0),t&2){let e=_(2);W(" Showing ",e.store.first()," to ",e.store.end()," of ",e.store.data().totalCount," entries ")}}function Ye(t,a){t&1&&(r(0,"tr")(1,"td",23)(2,"span"),s(3,"No records found."),o()()())}function Ze(t,a){if(t&1){let e=w();r(0,"p-panel")(1,"p-table",11),I("onPage",function(n){g(e);let i=_();return h(i.onPageChange(n))})("onHeaderCheckboxToggle",function(n){g(e);let i=_();return h(i.onHeaderCheckboxToggle(n))})("onRowSelect",function(n){g(e);let i=_();return h(i.onRowSelect(n))})("onRowUnselect",function(n){g(e);let i=_();return h(i.onRowUnselect(n))}),x(2,qe,18,0,"ng-template",null,3,v)(4,Qe,22,18,"ng-template",null,4,v)(6,Xe,1,3,"ng-template",null,5,v)(8,Ye,4,0,"ng-template",null,6,v),o()()}if(t&2){let e=_();l(),c("value",e.store.data().data)("paginator",!0)("rows",e.store.filter().pageSize)("totalRecords",e.store.data().totalCount)("lazy",!0)}}function et(t,a){if(t&1&&(r(0,"span",34),s(1),T(2,"truncate"),o()),t&2){let e=a.$implicit;c("pTooltip",e.name),l(),R(" ",D(2,2,e.name,30)," ")}}function tt(t,a){if(t&1&&(r(0,"div")(1,"span",36),s(2),o()()),t&2){let e=a.$implicit;l(2),b(e)}}function it(t,a){if(t&1&&(r(0,"div"),x(1,tt,3,1,"div",35),o()),t&2){let e=_(2);l(),c("ngForOf",e.getErrors("from"))}}function nt(t,a){if(t&1&&(r(0,"div")(1,"span",36),s(2),o()()),t&2){let e=a.$implicit;l(2),b(e)}}function ot(t,a){if(t&1&&(r(0,"div"),x(1,nt,3,1,"div",35),o()),t&2){let e=_(2);l(),c("ngForOf",e.getErrors("to"))}}function rt(t,a){if(t&1&&(r(0,"div")(1,"span",36),s(2),o()()),t&2){let e=a.$implicit;l(2),b(e)}}function at(t,a){if(t&1&&(r(0,"div"),x(1,rt,3,1,"div",35),o()),t&2){let e=_(2);l(),c("ngForOf",e.getErrors("pageSize"))}}function lt(t,a){if(t&1){let e=w();r(0,"form",24)(1,"div",25)(2,"label",26),s(3,"Outlet"),o(),r(4,"p-select",27),x(5,et,3,5,"ng-template",null,7,v),o()(),r(7,"div",25)(8,"label",26),s(9,"From - To"),o(),r(10,"div",28),S(11,"p-datepicker",29),x(12,it,2,1,"div",30),S(13,"p-datepicker",31),x(14,ot,2,1,"div",30),o()(),r(15,"div",25)(16,"label",26),s(17,"Supplier"),o(),r(18,"p-autocomplete",32),T(19,"async"),I("completeMethod",function(n){g(e);let i=_();return h(i.onSearchSupplier(n))}),o()(),r(20,"div",25)(21,"label",26),s(22,"Page Size"),o(),S(23,"input",33),x(24,at,2,1,"div",30),o()()}if(t&2){let e=_();c("formGroup",e.form),l(4),c("virtualScrollItemSize",50)("options",e.store.meta().options.outlets),l(7),c("iconDisplay","input")("showIcon",!0)("ngClass",V(16,O,e.isInvalid("from"))),l(),c("ngIf",e.isInvalid("from")),l(),c("iconDisplay","input")("showIcon",!0)("ngClass",V(18,O,e.isInvalid("to"))),l(),c("ngIf",e.isInvalid("to")),l(4),c("suggestions",X(19,14,e.supplierSuggestions$)),l(5),c("ngClass",V(20,O,e.isInvalid("pageSize"))),l(),c("ngIf",e.isInvalid("pageSize"))}}var Qt=(()=>{class t extends Me{constructor(){super(),this.store=C(B),this.generateJournalService=C(F),this.authService=C(oe),this.isDialogFilterVisible=P(!1),this.isInitDialogFilterVisible=P(!1),this.fb=C(de),this.dayjsService=C(A)}ngOnInit(){this.initform()}initform(){let{outletName:e,number:p,from:n,to:i,paymentState:u,supplierID:m,pageNumber:Oe,pageSize:He,export:Ue,exportPageNumber:Le,exportPageSize:Ge}=this.store.filter();this.form=this.fb.group({outletName:this.fb.control(e),number:this.fb.control(p),from:this.fb.control(this.dayjsService.from(n)?this.dayjsService.from(n).toDate():null),to:this.fb.control(this.dayjsService.from(i)?this.dayjsService.from(i).toDate():null),paymentState:this.fb.control(u),supplierID:this.fb.control(m),pageNumber:this.fb.control(Oe),pageSize:this.fb.control(He,[ae.required]),export:this.fb.control(Ue),exportPageNumber:this.fb.control(Le),exportPageSize:this.fb.control(Ge)})}onFilterOKEvent(){if(this.form.invalid){this.form.markAllAsTouched();return}let e=Object.entries(this.form.getRawValue()).reduce((p,[n,i])=>(i!=null&&(n==="from"||n==="to"?(typeof i=="string"||typeof i=="number"||i instanceof Date)&&(p[n]=this.dayjsService.from(i)?this.dayjsService.format(i):null):p[n]=i),p),{});this.store.updateFilter(e),this.isDialogFilterVisible.update(p=>!p)}onSearch(e){this.store.updateFilter(f(d({},this.store.filter()),{number:e}))}onSearchSupplier(e){this.supplierSuggestions$=this.generateJournalService.getSupplierSuggestions(e.query).pipe()}onPageChange(e){let p=e.first/e.rows;this.store.updateFilter(f(d({},this.store.filter()),{pageNumber:p+1}))}onHeaderCheckboxToggle(e){this.store.onHeaderCheckboxToggle(e.checked)}onRowSelect(e){this.store.onRowSelect(e.data)}onRowUnselect(e){if(Array.isArray(e.data)){e.data.forEach(p=>{this.store.onRowUnselect(p)});return}else this.store.onRowUnselect(e.data)}onCreateJournal(){this.generateJournalService.createAPJournal(this.store.checkedAPCollection()).pipe(H(()=>{this.store.getARCollection(this.store.filter)})).subscribe()}static{this.\u0275fac=function(p){return new(p||t)}}static{this.\u0275cmp=G({type:t,selectors:[["app-ap-journal"]],features:[Q([B]),K],decls:7,vars:5,consts:[["actionButton",""],["content",""],["filters",""],["header",""],["body",""],["paginatorleft",""],["emptymessage",""],["item",""],["pageTitle","AP Collection",3,"isDialogFilterVisibleChange","isInitDialogFilterVisibleChange","filterConfirmed","search","isSearchableInput","isFilterable","isDialogFilterVisible","isInitDialogFilterVisible","scrollable"],["label","Generate Journal",3,"onClick",4,"ngIf"],["label","Generate Journal",3,"onClick"],["dataKey","id",3,"onPage","onHeaderCheckboxToggle","onRowSelect","onRowUnselect","value","paginator","rows","totalRecords","lazy"],[2,"width","1rem"],[2,"width","10rem"],[2,"width","12rem"],[2,"width","14rem"],[2,"width","11rem"],[2,"width","9rem"],[2,"width","4rem"],[3,"value"],["target","_blank",1,"link","link-primary",3,"href"],[3,"innerHTML"],[3,"icon","severity","text"],["colspan","9"],[1,"d-flex","flex-column","row-gap-3",3,"formGroup"],[1,"d-flex","flex-column"],["for","outlet"],["virtualScroll","","showClear","","filter","","filterBy","name","formControlName","outletName","appendTo","body","optionLabel","name","optionValue","name","placeholder","Select an Outlet",3,"virtualScrollItemSize","options"],[1,"d-flex","flex-column","gap-2"],["showClear","","formControlName","from","styleClass","w-100","appendTo","body","inputId","icondisplay",3,"iconDisplay","showIcon","ngClass"],[4,"ngIf"],["showClear","","formControlName","to","styleClass","w-100","appendTo","body","inputId","icondisplay",3,"iconDisplay","showIcon","ngClass"],["showClear","","formControlName","supplierID","appendTo","body","styleClass","w-100","optionLabel","Value","optionValue","Key","inputStyleClass","w-100",3,"completeMethod","suggestions"],["appMaskNumber","","type","text","pInputText","","formControlName","pageSize",3,"ngClass"],[3,"pTooltip"],[4,"ngFor","ngForOf"],[1,"text-danger"]],template:function(p,n){if(p&1){let i=w();r(0,"app-main-panel",8),q("isDialogFilterVisibleChange",function(m){return g(i),M(n.isDialogFilterVisible,m)||(n.isDialogFilterVisible=m),h(m)})("isInitDialogFilterVisibleChange",function(m){return g(i),M(n.isInitDialogFilterVisible,m)||(n.isInitDialogFilterVisible=m),h(m)}),I("filterConfirmed",function(){return g(i),h(n.onFilterOKEvent())})("search",function(m){return g(i),h(n.onSearch(m))}),x(1,$e,1,1,"ng-template",null,0,v)(3,Ze,10,5,"ng-template",null,1,v)(5,lt,25,22,"ng-template",null,2,v),o()}p&2&&(c("isSearchableInput",!0)("isFilterable",!0),$("isDialogFilterVisible",n.isDialogFilterVisible)("isInitDialogFilterVisible",n.isInitDialogFilterVisible),c("scrollable",!0))},dependencies:[Ve,Re,ke,Ne,Pe,ne,Y,Z,ee,te,ie,he,ge,Ce,xe,ue,me,re,le,pe,se,ce,Je,Fe,Ae,De,_e,fe,Be,je,be,Se,ve,ze],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();export{Qt as ApJournalComponent};
@@ -1 +1 @@
1
- import{a as C,b as L}from"./chunk-5JZTWUDG.js";import"./chunk-DU72RNAU.js";import{a as E,b as V}from"./chunk-Q7SK53ST.js";import"./chunk-ZMIVD3SF.js";import{g as H}from"./chunk-TUFQ5JVG.js";import"./chunk-ZUDQOT7C.js";import{a as R,b as D}from"./chunk-BUDZ3ONE.js";import"./chunk-SN7DLFX2.js";import"./chunk-V4SH72WU.js";import{w as j,x as O,y as N,z as G}from"./chunk-IMVMIXVJ.js";import"./chunk-2D2YD753.js";import"./chunk-OIBDX2CA.js";import"./chunk-M3TKVRYP.js";import{a as I}from"./chunk-2MKKFLNJ.js";import{n as $,s as F}from"./chunk-VZ5CMS5O.js";import"./chunk-F2X3VGZZ.js";import{$b as P,Cc as w,Db as A,Dc as _,Lb as p,Nc as c,Ob as x,Oc as l,Rc as T,Vb as n,W as y,Wb as o,Xb as m,Y as M,_ as S,ec as h,fc as s,h as v,hb as a,ia as f,qa as g,ra as d,s as u,sa as b,ta as k,xb as B}from"./chunk-NMCKMUY4.js";import"./chunk-YQFG5XE2.js";var q=()=>({height:"calc(100vh - 100px)"});function J(i,z){if(i&1){let e=P();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",l(3,2,e.countInBooks$)!==0)("pTooltip",l(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),m(3,"app-migration-cards",7),c(4,"async"),b(),n(5,"svg",8),m(6,"path",9),o(),k(),m(7,"app-migration-cards",10),c(8,"async"),o()()()),i&2){let e=s();x(_(12,q)),a(),x(_(13,q)),a(2),p("migrationCount",l(4,8,e.countInPOS$))("migrationTitle",e.pageTitle),a(4),p("migrationCount",l(8,10,e.countInBooks$))("migrationTitle",e.pageTitle)}}var ue=(()=>{class i{constructor(){this.migrateService=f(C),this.toastr=f(I),this.refresh$=new v(void 0),this.pageTitle="Tax Account"}ngOnInit(){let e=this.refresh$.pipe(M(()=>this.migrateService.getTaxAccountCount()),S(t=>console.log("API response:",t)),y(1));this.countInPOS$=e.pipe(u(t=>Number(t.pos))),this.countInBooks$=e.pipe(u(t=>Number(t.books)))}onMigrate(){this.migrateService.migrateTaxAccount().subscribe(e=>{this.refresh$.next(),this.toastr.success(e.message,"Migration Successful")})}onFormat(){confirm("Are you sure you want to format?")&&this.migrateService.formatTaxAccount().subscribe(e=>{this.refresh$.next(),this.toastr.success(e.message,"Format Successful")})}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=B({type:i,selectors:[["app-tax-account"]],features:[w([C])],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,T)(3,K,9,14,"ng-template",null,1,T),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 TaxAccountComponent};
1
+ import{a as C,b as L}from"./chunk-OP5H3EZS.js";import"./chunk-I23KOE73.js";import{a as E,b as V}from"./chunk-Q7SK53ST.js";import"./chunk-ZMIVD3SF.js";import{g as H}from"./chunk-P4DH4OHM.js";import"./chunk-ZUDQOT7C.js";import{a as R,b as D}from"./chunk-BUDZ3ONE.js";import"./chunk-IRGC65GN.js";import"./chunk-V4SH72WU.js";import{w as j,x as O,y as N,z as G}from"./chunk-IMVMIXVJ.js";import"./chunk-2D2YD753.js";import"./chunk-OIBDX2CA.js";import"./chunk-XJ7SJUJ2.js";import{a as I}from"./chunk-2MKKFLNJ.js";import{n as $,s as F}from"./chunk-VZ5CMS5O.js";import"./chunk-F2X3VGZZ.js";import{$b as P,Cc as w,Db as A,Dc as _,Lb as p,Nc as c,Ob as x,Oc as l,Rc as T,Vb as n,W as y,Wb as o,Xb as m,Y as M,_ as S,ec as h,fc as s,h as v,hb as a,ia as f,qa as g,ra as d,s as u,sa as b,ta as k,xb as B}from"./chunk-NMCKMUY4.js";import"./chunk-YQFG5XE2.js";var q=()=>({height:"calc(100vh - 100px)"});function J(i,z){if(i&1){let e=P();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",l(3,2,e.countInBooks$)!==0)("pTooltip",l(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),m(3,"app-migration-cards",7),c(4,"async"),b(),n(5,"svg",8),m(6,"path",9),o(),k(),m(7,"app-migration-cards",10),c(8,"async"),o()()()),i&2){let e=s();x(_(12,q)),a(),x(_(13,q)),a(2),p("migrationCount",l(4,8,e.countInPOS$))("migrationTitle",e.pageTitle),a(4),p("migrationCount",l(8,10,e.countInBooks$))("migrationTitle",e.pageTitle)}}var ue=(()=>{class i{constructor(){this.migrateService=f(C),this.toastr=f(I),this.refresh$=new v(void 0),this.pageTitle="Tax Account"}ngOnInit(){let e=this.refresh$.pipe(M(()=>this.migrateService.getTaxAccountCount()),S(t=>console.log("API response:",t)),y(1));this.countInPOS$=e.pipe(u(t=>Number(t.pos))),this.countInBooks$=e.pipe(u(t=>Number(t.books)))}onMigrate(){this.migrateService.migrateTaxAccount().subscribe(e=>{this.refresh$.next(),this.toastr.success(e.message,"Migration Successful")})}onFormat(){confirm("Are you sure you want to format?")&&this.migrateService.formatTaxAccount().subscribe(e=>{this.refresh$.next(),this.toastr.success(e.message,"Format Successful")})}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=B({type:i,selectors:[["app-tax-account"]],features:[w([C])],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,T)(3,K,9,14,"ng-template",null,1,T),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 TaxAccountComponent};
@@ -1 +1 @@
1
- import{a as o}from"./chunk-M3TKVRYP.js";import{z as n}from"./chunk-VZ5CMS5O.js";import{ca as a,ia as i}from"./chunk-NMCKMUY4.js";var d=(()=>{class e{constructor(){this.httpService=i(o)}journalTagList({pageNumber:t,pageSize:r}={}){let u={params:new n().set("pageNumber",t).set("pageSize",r)};return this.httpService.get(void 0,"/api/journalTag/list",u)}journalTagCreate(t){return this.httpService.post(void 0,"/api/journalTag",t)}journalTagGet(t){return this.httpService.get(void 0,`/api/journalTag?ID=${t}`)}journalTagUpdate(t,r){return this.httpService.put(void 0,`/api/journalTag?ID=${r}`,t)}journalTagDelete(t){return this.httpService.delete(void 0,`/api/journaltag?ID=${t}`)}journalTagInfo(t){return this.httpService.get(void 0,`/api/journaltag?ID=${t}`)}journalTagMigrate(){return this.httpService.post(void 0,"/api/JournalTag/migrate",{})}static{this.\u0275fac=function(r){return new(r||e)}}static{this.\u0275prov=a({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();export{d as a};
1
+ import{a as o}from"./chunk-XJ7SJUJ2.js";import{z as n}from"./chunk-VZ5CMS5O.js";import{ca as a,ia as i}from"./chunk-NMCKMUY4.js";var d=(()=>{class e{constructor(){this.httpService=i(o)}journalTagList({pageNumber:t,pageSize:r}={}){let u={params:new n().set("pageNumber",t).set("pageSize",r)};return this.httpService.get(void 0,"/api/journalTag/list",u)}journalTagCreate(t){return this.httpService.post(void 0,"/api/journalTag",t)}journalTagGet(t){return this.httpService.get(void 0,`/api/journalTag?ID=${t}`)}journalTagUpdate(t,r){return this.httpService.put(void 0,`/api/journalTag?ID=${r}`,t)}journalTagDelete(t){return this.httpService.delete(void 0,`/api/journaltag?ID=${t}`)}journalTagInfo(t){return this.httpService.get(void 0,`/api/journaltag?ID=${t}`)}journalTagMigrate(){return this.httpService.post(void 0,"/api/JournalTag/migrate",{})}static{this.\u0275fac=function(r){return new(r||e)}}static{this.\u0275prov=a({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();export{d as a};
@@ -1 +1 @@
1
- import{a as y,b as C,e as F,f as M}from"./chunk-PKOERZXQ.js";import{b as T}from"./chunk-PTQPB44D.js";import{d as L,e as S}from"./chunk-AOOG6YOT.js";import{a as G}from"./chunk-M3TKVRYP.js";import{s as U}from"./chunk-VZ5CMS5O.js";import{Ec as g,Lb as n,Pb as l,Tb as m,Ub as f,Vb as a,Wb as p,ca as c,fc as h,hb as s,ia as i,rc as v,sc as b,xb as d}from"./chunk-NMCKMUY4.js";var $=(()=>{class t{constructor(){this.httpService=i(G)}getUserLoaderList(){return this.httpService.get(void 0,"api/UserLoader/List")}getUsers(e){return this.httpService.post(void 0,"api/User/List",e)}getUserFormMeta(e){return this.httpService.post(void 0,"api/UserLoader/Form",{ID:e})}inviteUser(e){return this.httpService.post(void 0,"api/User/Submit",e)}deleteUser(e){return this.httpService.post(void 0,"api/User/Delete",{ListID:e})}getGroupLoader(){return this.httpService.get(void 0,"api/UserGroupLoader/List")}getGroupList(e){return this.httpService.post(void 0,"api/UserGroup/List",e)}getGroupFormMeta(e){return this.httpService.get(void 0,e?`api/UserGroup/Form/${e}`:"api/UserGroup/Form")}assignGroupRole(e){return this.httpService.post(void 0,"api/UserGroup/AssignRole",e)}deleteGroup(e){return this.httpService.post(void 0,"api/UserGroup/Delete",{ListID:e})}static{this.\u0275fac=function(r){return new(r||t)}}static{this.\u0275prov=c({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var k=t=>({"ps-0":t}),x=(t,o)=>o.route;function _(t,o){if(t&1&&(a(0,"p-tab",2)(1,"span"),v(2),p()()),t&2){let e=o.$implicit,r=h();l(g(5,k,r.router.url.includes("forms"))),n("value",e.route)("routerLink",e.route),s(2),b(e.label)}}var B=(()=>{class t{constructor(){this.router=i(L),this.tabs=[{route:"/pages/users/users",label:"Users"},{route:"/pages/users/groups",label:"Groups"}]}get activeTab(){return this.tabs.find(r=>this.router.url.startsWith(r.route)).route||this.tabs[0].route}static{this.\u0275fac=function(r){return new(r||t)}}static{this.\u0275cmp=d({type:t,selectors:[["app-user-tabs"]],decls:4,vars:1,consts:[[3,"value"],[3,"value","routerLink","class"],[3,"value","routerLink"]],template:function(r,u){r&1&&(a(0,"p-tabs",0)(1,"p-tablist"),m(2,_,3,7,"p-tab",1,x),p()()),r&2&&(n("value",u.activeTab),s(2),f(u.tabs))},dependencies:[M,F,y,C,S,T,U],styles:["[_nghost-%COMP%]{display:block} .p-tabs .p-tab{padding:0 1.125rem .6rem 0!important}"],changeDetection:0})}}return t})();export{$ as a,B as b};
1
+ import{a as y,b as C,e as F,f as M}from"./chunk-PKOERZXQ.js";import{b as T}from"./chunk-PTQPB44D.js";import{d as L,e as S}from"./chunk-AOOG6YOT.js";import{a as G}from"./chunk-XJ7SJUJ2.js";import{s as U}from"./chunk-VZ5CMS5O.js";import{Ec as g,Lb as n,Pb as l,Tb as m,Ub as f,Vb as a,Wb as p,ca as c,fc as h,hb as s,ia as i,rc as v,sc as b,xb as d}from"./chunk-NMCKMUY4.js";var $=(()=>{class t{constructor(){this.httpService=i(G)}getUserLoaderList(){return this.httpService.get(void 0,"api/UserLoader/List")}getUsers(e){return this.httpService.post(void 0,"api/User/List",e)}getUserFormMeta(e){return this.httpService.post(void 0,"api/UserLoader/Form",{ID:e})}inviteUser(e){return this.httpService.post(void 0,"api/User/Submit",e)}deleteUser(e){return this.httpService.post(void 0,"api/User/Delete",{ListID:e})}getGroupLoader(){return this.httpService.get(void 0,"api/UserGroupLoader/List")}getGroupList(e){return this.httpService.post(void 0,"api/UserGroup/List",e)}getGroupFormMeta(e){return this.httpService.get(void 0,e?`api/UserGroup/Form/${e}`:"api/UserGroup/Form")}assignGroupRole(e){return this.httpService.post(void 0,"api/UserGroup/AssignRole",e)}deleteGroup(e){return this.httpService.post(void 0,"api/UserGroup/Delete",{ListID:e})}static{this.\u0275fac=function(r){return new(r||t)}}static{this.\u0275prov=c({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var k=t=>({"ps-0":t}),x=(t,o)=>o.route;function _(t,o){if(t&1&&(a(0,"p-tab",2)(1,"span"),v(2),p()()),t&2){let e=o.$implicit,r=h();l(g(5,k,r.router.url.includes("forms"))),n("value",e.route)("routerLink",e.route),s(2),b(e.label)}}var B=(()=>{class t{constructor(){this.router=i(L),this.tabs=[{route:"/pages/users/users",label:"Users"},{route:"/pages/users/groups",label:"Groups"}]}get activeTab(){return this.tabs.find(r=>this.router.url.startsWith(r.route)).route||this.tabs[0].route}static{this.\u0275fac=function(r){return new(r||t)}}static{this.\u0275cmp=d({type:t,selectors:[["app-user-tabs"]],decls:4,vars:1,consts:[[3,"value"],[3,"value","routerLink","class"],[3,"value","routerLink"]],template:function(r,u){r&1&&(a(0,"p-tabs",0)(1,"p-tablist"),m(2,_,3,7,"p-tab",1,x),p()()),r&2&&(n("value",u.activeTab),s(2),f(u.tabs))},dependencies:[M,F,y,C,S,T,U],styles:["[_nghost-%COMP%]{display:block} .p-tabs .p-tab{padding:0 1.125rem .6rem 0!important}"],changeDetection:0})}}return t})();export{$ as a,B as b};
@@ -1 +1 @@
1
- import{a as Q}from"./chunk-OW25MQS7.js";import{a as W}from"./chunk-Q4LKKVQU.js";import{a as O}from"./chunk-QF4D5YPK.js";import{g as B}from"./chunk-TUFQ5JVG.js";import"./chunk-ZUDQOT7C.js";import{a as A}from"./chunk-BUDZ3ONE.js";import"./chunk-SN7DLFX2.js";import"./chunk-V4SH72WU.js";import{n as z,w as D}from"./chunk-IMVMIXVJ.js";import"./chunk-2D2YD753.js";import{b as I,c as N,e as w,f as R,l as P,o as V,u as G,x as q}from"./chunk-OIBDX2CA.js";import{b as M,d as k}from"./chunk-AOOG6YOT.js";import"./chunk-M3TKVRYP.js";import"./chunk-2MKKFLNJ.js";import{h as E,k as J}from"./chunk-VZ5CMS5O.js";import"./chunk-F2X3VGZZ.js";import{$b as F,D as x,Db as p,Ec as j,I as h,Lb as r,N as T,Rc as v,Vb as i,Wb as n,Xb as g,Y as d,_ as f,ec as S,fc as s,hb as a,ia as m,k as _,qa as C,ra as b,rc as c,xb as y}from"./chunk-NMCKMUY4.js";import"./chunk-YQFG5XE2.js";var U=t=>({"ng-invalid ng-dirty":t});function Y(t,u){if(t&1){let e=F();i(0,"div")(1,"p-button",3),S("onClick",function(){C(e);let l=s();return b(l.onSubmit())}),n()()}}function H(t,u){t&1&&(i(0,"div",14),c(1," Name is required "),n())}function K(t,u){if(t&1&&(i(0,"div"),p(1,H,2,0,"div",13),n()),t&2){let e=s(2);a(),r("ngIf",e.form.controls.name.errors.required)}}function L(t,u){if(t&1&&(i(0,"p-panel",4)(1,"div",5)(2,"div",6)(3,"div",7)(4,"div",8)(5,"label",9),c(6,"Name"),n(),g(7,"input",10),p(8,K,2,1,"div",11),n()(),i(9,"div",7)(10,"div",8)(11,"label",9),c(12,"Description"),n(),g(13,"textarea",12),n()()()()()),t&2){let e=s();a(),r("formGroup",e.form),a(6),r("ngClass",j(4,U,e.form.controls.name.invalid&&(e.form.controls.name.dirty||e.form.controls.name.touched))),a(),r("ngIf",e.form.controls.name.invalid&&(e.form.controls.name.dirty||e.form.controls.name.touched)),a(5),r("autoResize",!0)}}var ue=(()=>{class t{constructor(){this.fb=m(G),this.journalTagService=m(Q),this.route=m(M),this.router=m(k)}initForm(){console.log("Initializing form"),this.form=this.fb.group({name:this.fb.control("",[N.required]),description:this.fb.control("")})}ngOnInit(){this.initForm(),this.route.queryParamMap.pipe(x(e=>e.has("id")),d(e=>this.journalTagService.journalTagGet(e.get("id"))),O("Query params"),f(e=>{console.log("Got journal tag:",e),this.form.patchValue({name:e.name,description:e.description})})).subscribe()}onSubmit(){if(this.form.invalid){this.form.markAllAsTouched();return}let e=this.form.getRawValue();this.route.queryParamMap.pipe(T(1),d(o=>{let l=o.get("id");return l?this.journalTagService.journalTagUpdate(e,l):this.journalTagService.journalTagCreate(e)}),f(()=>{console.log("Journal tag saved successfully"),this.router.navigate(["/pages/accounting-setup/journal-tag"])}),h(o=>(console.error("Failed to save journal tag:",o),_))).subscribe()}static{this.\u0275fac=function(o){return new(o||t)}}static{this.\u0275cmp=y({type:t,selectors:[["app-journal-tag-form"]],decls:5,vars:1,consts:[["actionButton",""],["content",""],["pageTitle","Journal Tag Form",3,"hasMainWrapperPadding"],["label","Submit",3,"onClick"],["styleClass","rounded-2"],[1,"d-flex","flex-column","gap-2",3,"formGroup"],[1,"row"],[1,"col-6"],[1,"d-flex","flex-column"],["for",""],["size","small","formControlName","name","type","text","pInputText","",3,"ngClass"],[4,"ngIf"],["rows","2","pSize","large","cols","30","pTextarea","","formControlName","description",3,"autoResize"],["class","invalid-feedback text-danger d-block",4,"ngIf"],[1,"invalid-feedback","text-danger","d-block"]],template:function(o,l){o&1&&(i(0,"app-main-panel",2),p(1,Y,2,0,"ng-template",null,0,v)(3,L,14,6,"ng-template",null,1,v),n()),o&2&&r("hasMainWrapperPadding",!0)},dependencies:[B,z,J,A,q,I,w,R,P,V,W,D,E],encapsulation:2})}}return t})();export{ue as JournalTagFormComponent};
1
+ import{a as Q}from"./chunk-UBPSH6UX.js";import{a as W}from"./chunk-Q4LKKVQU.js";import{a as O}from"./chunk-QF4D5YPK.js";import{g as B}from"./chunk-P4DH4OHM.js";import"./chunk-ZUDQOT7C.js";import{a as A}from"./chunk-BUDZ3ONE.js";import"./chunk-IRGC65GN.js";import"./chunk-V4SH72WU.js";import{n as z,w as D}from"./chunk-IMVMIXVJ.js";import"./chunk-2D2YD753.js";import{b as I,c as N,e as w,f as R,l as P,o as V,u as G,x as q}from"./chunk-OIBDX2CA.js";import{b as M,d as k}from"./chunk-AOOG6YOT.js";import"./chunk-XJ7SJUJ2.js";import"./chunk-2MKKFLNJ.js";import{h as E,k as J}from"./chunk-VZ5CMS5O.js";import"./chunk-F2X3VGZZ.js";import{$b as F,D as x,Db as p,Ec as j,I as h,Lb as r,N as T,Rc as v,Vb as i,Wb as n,Xb as g,Y as d,_ as f,ec as S,fc as s,hb as a,ia as m,k as _,qa as C,ra as b,rc as c,xb as y}from"./chunk-NMCKMUY4.js";import"./chunk-YQFG5XE2.js";var U=t=>({"ng-invalid ng-dirty":t});function Y(t,u){if(t&1){let e=F();i(0,"div")(1,"p-button",3),S("onClick",function(){C(e);let l=s();return b(l.onSubmit())}),n()()}}function H(t,u){t&1&&(i(0,"div",14),c(1," Name is required "),n())}function K(t,u){if(t&1&&(i(0,"div"),p(1,H,2,0,"div",13),n()),t&2){let e=s(2);a(),r("ngIf",e.form.controls.name.errors.required)}}function L(t,u){if(t&1&&(i(0,"p-panel",4)(1,"div",5)(2,"div",6)(3,"div",7)(4,"div",8)(5,"label",9),c(6,"Name"),n(),g(7,"input",10),p(8,K,2,1,"div",11),n()(),i(9,"div",7)(10,"div",8)(11,"label",9),c(12,"Description"),n(),g(13,"textarea",12),n()()()()()),t&2){let e=s();a(),r("formGroup",e.form),a(6),r("ngClass",j(4,U,e.form.controls.name.invalid&&(e.form.controls.name.dirty||e.form.controls.name.touched))),a(),r("ngIf",e.form.controls.name.invalid&&(e.form.controls.name.dirty||e.form.controls.name.touched)),a(5),r("autoResize",!0)}}var ue=(()=>{class t{constructor(){this.fb=m(G),this.journalTagService=m(Q),this.route=m(M),this.router=m(k)}initForm(){console.log("Initializing form"),this.form=this.fb.group({name:this.fb.control("",[N.required]),description:this.fb.control("")})}ngOnInit(){this.initForm(),this.route.queryParamMap.pipe(x(e=>e.has("id")),d(e=>this.journalTagService.journalTagGet(e.get("id"))),O("Query params"),f(e=>{console.log("Got journal tag:",e),this.form.patchValue({name:e.name,description:e.description})})).subscribe()}onSubmit(){if(this.form.invalid){this.form.markAllAsTouched();return}let e=this.form.getRawValue();this.route.queryParamMap.pipe(T(1),d(o=>{let l=o.get("id");return l?this.journalTagService.journalTagUpdate(e,l):this.journalTagService.journalTagCreate(e)}),f(()=>{console.log("Journal tag saved successfully"),this.router.navigate(["/pages/accounting-setup/journal-tag"])}),h(o=>(console.error("Failed to save journal tag:",o),_))).subscribe()}static{this.\u0275fac=function(o){return new(o||t)}}static{this.\u0275cmp=y({type:t,selectors:[["app-journal-tag-form"]],decls:5,vars:1,consts:[["actionButton",""],["content",""],["pageTitle","Journal Tag Form",3,"hasMainWrapperPadding"],["label","Submit",3,"onClick"],["styleClass","rounded-2"],[1,"d-flex","flex-column","gap-2",3,"formGroup"],[1,"row"],[1,"col-6"],[1,"d-flex","flex-column"],["for",""],["size","small","formControlName","name","type","text","pInputText","",3,"ngClass"],[4,"ngIf"],["rows","2","pSize","large","cols","30","pTextarea","","formControlName","description",3,"autoResize"],["class","invalid-feedback text-danger d-block",4,"ngIf"],[1,"invalid-feedback","text-danger","d-block"]],template:function(o,l){o&1&&(i(0,"app-main-panel",2),p(1,Y,2,0,"ng-template",null,0,v)(3,L,14,6,"ng-template",null,1,v),n()),o&2&&r("hasMainWrapperPadding",!0)},dependencies:[B,z,J,A,q,I,w,R,P,V,W,D,E],encapsulation:2})}}return t})();export{ue as JournalTagFormComponent};
@@ -1 +1 @@
1
- import{a as O,b as H}from"./chunk-5JZTWUDG.js";import"./chunk-DU72RNAU.js";import{a as I,b as E}from"./chunk-Q7SK53ST.js";import"./chunk-ZMIVD3SF.js";import{g as G}from"./chunk-TUFQ5JVG.js";import"./chunk-ZUDQOT7C.js";import{a as j,b as R}from"./chunk-BUDZ3ONE.js";import"./chunk-SN7DLFX2.js";import"./chunk-V4SH72WU.js";import{w as V,x as A,y as D,z as N}from"./chunk-IMVMIXVJ.js";import"./chunk-2D2YD753.js";import"./chunk-OIBDX2CA.js";import"./chunk-M3TKVRYP.js";import{a as F}from"./chunk-2MKKFLNJ.js";import{n as W,s as $}from"./chunk-VZ5CMS5O.js";import"./chunk-F2X3VGZZ.js";import{$b as w,Cc as P,Db as B,Dc as C,Lb as p,Nc as s,Ob as h,Oc as m,Rc as x,Vb as o,W as y,Wb as n,Xb as c,Y as T,_ as S,ec as _,fc as l,h as v,hb as a,ia as u,qa as g,ra as d,s as f,sa as b,ta as k,xb as M}from"./chunk-NMCKMUY4.js";import"./chunk-YQFG5XE2.js";var L=()=>({height:"calc(100vh - 100px)"});function z(i,q){if(i&1){let e=w();o(0,"div",3)(1,"p-button",4),_("onClick",function(){g(e);let r=l();return d(r.onFormat())}),n(),o(2,"p-button",5),s(3,"async"),s(4,"async"),_("onClick",function(){g(e);let r=l();return d(r.migrateWriteoffOutlet())}),n()()}if(i&2){let e=l();a(2),p("disabled",m(3,2,e.countInBooks$)!==0)("pTooltip",m(4,4,e.countInBooks$)!==0?"Books already has entries. Please format before re-migrating.":null)}}function J(i,q){if(i&1&&(o(0,"p-scroll-panel")(1,"p-panel")(2,"div",6),c(3,"app-migration-cards",7),s(4,"async"),b(),o(5,"svg",8),c(6,"path",9),n(),k(),c(7,"app-migration-cards",10),s(8,"async"),n()()()),i&2){let e=l();h(C(12,L)),a(),h(C(13,L)),a(2),p("migrationCount",m(4,8,e.countInPOS$))("migrationTitle",e.pageTitle),a(4),p("migrationCount",m(8,10,e.countInBooks$))("migrationTitle",e.pageTitle)}}var fe=(()=>{class i{constructor(){this.migrateService=u(O),this.toastr=u(F),this.refresh$=new v(void 0),this.pageTitle="Write-Off Outlet"}ngOnInit(){let e=this.refresh$.pipe(T(()=>this.migrateService.getWriteOffOutletAccountCount()),S(t=>console.log("API response:",t)),y(1));this.countInPOS$=e.pipe(f(t=>Number(t.pos))),this.countInBooks$=e.pipe(f(t=>Number(t.books)))}migrateWriteoffOutlet(){this.migrateService.migrateWriteOffOutlet().subscribe(e=>{this.refresh$.next(),this.toastr.success(e.message,"Migration Successful")})}onFormat(){confirm("Are you sure you want to format?")&&this.migrateService.formatWriteOff().subscribe(e=>{this.refresh$.next(),this.toastr.success(e.message,"Format Successful")})}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=M({type:i,selectors:[["app-writeoff-outlet"]],features:[P([O])],decls:5,vars:1,consts:[["actionButton",""],["content",""],[3,"pageTitle"],[1,"d-flex","gap-2"],["label","Format","severity","danger",3,"onClick"],["label","Migrate","tooltipPosition","left",3,"onClick","disabled","pTooltip"],[1,"flex","gap-30","flex-wrap",2,"display","flex","justify-content","center","align-items","center","gap","1rem","margin-top","40px"],["migrationPlace","Accounting",3,"migrationCount","migrationTitle"],["width","40","height","40","viewBox","0 0 24 24","fill","none"],["d","M8 5l8 7-8 7","stroke","#007bff","stroke-width","2","stroke-linecap","round","stroke-linejoin","round"],["migrationPlace","Books",3,"migrationCount","migrationTitle"]],template:function(t,r){t&1&&(o(0,"app-main-panel",2),B(1,z,5,6,"ng-template",null,0,x)(3,J,9,14,"ng-template",null,1,x),n()),t&2&&p("pageTitle",r.pageTitle)},dependencies:[G,$,W,E,I,R,j,N,D,H,A,V],encapsulation:2})}}return i})();export{fe as WriteOffOutletComponent};
1
+ import{a as O,b as H}from"./chunk-OP5H3EZS.js";import"./chunk-I23KOE73.js";import{a as I,b as E}from"./chunk-Q7SK53ST.js";import"./chunk-ZMIVD3SF.js";import{g as G}from"./chunk-P4DH4OHM.js";import"./chunk-ZUDQOT7C.js";import{a as j,b as R}from"./chunk-BUDZ3ONE.js";import"./chunk-IRGC65GN.js";import"./chunk-V4SH72WU.js";import{w as V,x as A,y as D,z as N}from"./chunk-IMVMIXVJ.js";import"./chunk-2D2YD753.js";import"./chunk-OIBDX2CA.js";import"./chunk-XJ7SJUJ2.js";import{a as F}from"./chunk-2MKKFLNJ.js";import{n as W,s as $}from"./chunk-VZ5CMS5O.js";import"./chunk-F2X3VGZZ.js";import{$b as w,Cc as P,Db as B,Dc as C,Lb as p,Nc as s,Ob as h,Oc as m,Rc as x,Vb as o,W as y,Wb as n,Xb as c,Y as T,_ as S,ec as _,fc as l,h as v,hb as a,ia as u,qa as g,ra as d,s as f,sa as b,ta as k,xb as M}from"./chunk-NMCKMUY4.js";import"./chunk-YQFG5XE2.js";var L=()=>({height:"calc(100vh - 100px)"});function z(i,q){if(i&1){let e=w();o(0,"div",3)(1,"p-button",4),_("onClick",function(){g(e);let r=l();return d(r.onFormat())}),n(),o(2,"p-button",5),s(3,"async"),s(4,"async"),_("onClick",function(){g(e);let r=l();return d(r.migrateWriteoffOutlet())}),n()()}if(i&2){let e=l();a(2),p("disabled",m(3,2,e.countInBooks$)!==0)("pTooltip",m(4,4,e.countInBooks$)!==0?"Books already has entries. Please format before re-migrating.":null)}}function J(i,q){if(i&1&&(o(0,"p-scroll-panel")(1,"p-panel")(2,"div",6),c(3,"app-migration-cards",7),s(4,"async"),b(),o(5,"svg",8),c(6,"path",9),n(),k(),c(7,"app-migration-cards",10),s(8,"async"),n()()()),i&2){let e=l();h(C(12,L)),a(),h(C(13,L)),a(2),p("migrationCount",m(4,8,e.countInPOS$))("migrationTitle",e.pageTitle),a(4),p("migrationCount",m(8,10,e.countInBooks$))("migrationTitle",e.pageTitle)}}var fe=(()=>{class i{constructor(){this.migrateService=u(O),this.toastr=u(F),this.refresh$=new v(void 0),this.pageTitle="Write-Off Outlet"}ngOnInit(){let e=this.refresh$.pipe(T(()=>this.migrateService.getWriteOffOutletAccountCount()),S(t=>console.log("API response:",t)),y(1));this.countInPOS$=e.pipe(f(t=>Number(t.pos))),this.countInBooks$=e.pipe(f(t=>Number(t.books)))}migrateWriteoffOutlet(){this.migrateService.migrateWriteOffOutlet().subscribe(e=>{this.refresh$.next(),this.toastr.success(e.message,"Migration Successful")})}onFormat(){confirm("Are you sure you want to format?")&&this.migrateService.formatWriteOff().subscribe(e=>{this.refresh$.next(),this.toastr.success(e.message,"Format Successful")})}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=M({type:i,selectors:[["app-writeoff-outlet"]],features:[P([O])],decls:5,vars:1,consts:[["actionButton",""],["content",""],[3,"pageTitle"],[1,"d-flex","gap-2"],["label","Format","severity","danger",3,"onClick"],["label","Migrate","tooltipPosition","left",3,"onClick","disabled","pTooltip"],[1,"flex","gap-30","flex-wrap",2,"display","flex","justify-content","center","align-items","center","gap","1rem","margin-top","40px"],["migrationPlace","Accounting",3,"migrationCount","migrationTitle"],["width","40","height","40","viewBox","0 0 24 24","fill","none"],["d","M8 5l8 7-8 7","stroke","#007bff","stroke-width","2","stroke-linecap","round","stroke-linejoin","round"],["migrationPlace","Books",3,"migrationCount","migrationTitle"]],template:function(t,r){t&1&&(o(0,"app-main-panel",2),B(1,z,5,6,"ng-template",null,0,x)(3,J,9,14,"ng-template",null,1,x),n()),t&2&&p("pageTitle",r.pageTitle)},dependencies:[G,$,W,E,I,R,j,N,D,H,A,V],encapsulation:2})}}return i})();export{fe as WriteOffOutletComponent};
@@ -1 +1 @@
1
- import{a as b}from"./chunk-2MKKFLNJ.js";import{B as I,C as g,D}from"./chunk-VZ5CMS5O.js";import{I as u,_ as d,ca as m,ia as f,n as y,s as h}from"./chunk-NMCKMUY4.js";import{a as o,b as c}from"./chunk-YQFG5XE2.js";var L=(()=>{class s{constructor(){this.httpClient=f(D),this.toastr=f(b)}get(t="",e,a={}){return this.httpClient.get(`${t}${e}`,a).pipe(u(this.handleError.bind(this)))}post(t="",e,a,r={observe:"response"}){return this.httpClient.post(`${t}${e}`,a,o({},r)).pipe(d(this.handleResponse.bind(this)),h(n=>n instanceof I&&Object.prototype.hasOwnProperty.call(r,"observe")&&r.observe==="response"?n.body instanceof Blob?n:n.body:n),u(this.handleError.bind(this)))}put(t="",e,a,r={}){return this.httpClient.put(`${t}${e}`,a,c(o({},r),{observe:"response"})).pipe(d(this.handleResponse.bind(this)),h(n=>n.body),u(this.handleError.bind(this)))}delete(t="",e,a={}){return this.httpClient.delete(`${t}${e}`,c(o({},a),{observe:"response"})).pipe(d(this.handleResponse.bind(this)),h(r=>r.body),u(this.handleError.bind(this)))}handleResponse(t){if(t instanceof I&&t.status===200&&t.body){let e;typeof t.body=="object"&&t.body!==null&&(e=t.body.message||t.body.Message),typeof e=="string"&&e.length>0&&this.toastr.success(e,"Success")}}handleError(t){let e={header:"API Error",message:"An unknown error occurred"};if(t instanceof g)switch(t.status){case 0:e.message="CORS error: Request blocked or server not responding with proper CORS headers",e.header="CORS Error";break;case 504:e.message=t.statusText||"Gateway Timeout",e.header=`API Error: ${t.status}`;break;default:e.header=`API Error: ${t.status}`,e.message=t.error&&(t.error.Message||t.error.message||t.error.error)||t.message}return t instanceof g&&(t.status>=200&&t.status<300?this.toastr.success(e.message,e.header):t.status>=400&&t.status<500?this.toastr.warning(e.message,e.header):t.status>=500&&t.status<600&&this.toastr.error(e.message,e.header)),y(()=>e)}static{this.\u0275fac=function(e){return new(e||s)}}static{this.\u0275prov=m({token:s,factory:s.\u0275fac,providedIn:"root"})}}return s})();var p={production:!0,version:"5.47.0",changelogUrl:"https://changelog.dealpos.com/?categories=cat_O6pYAT7GI1mts",defaultTimezone:"Asia/Jakarta",intercom:{appId:"xv1oomgl"}};var l=class s{static{this.emailRegex=/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/}static{this.phoneNumberRegex=/^\d+$/}static{this.GuidEmpty="00000000-0000-0000-0000-000000000000"}static{this.DecimalMinValue="-7.922816251426434e+28"}static{this.InputLockTimeSpan=500}static{this.MinDate="0001-01-01T00:00:00"}static{this.MinTime="00:00:00"}static{this.MinDecimal="-79228162514264337593543950335"}static StringFormat(i,...t){for(let e=0;e<t.length;e++)i=i.replace(`{${e}}`,t[e]);return i}static{this.isMobileDevice=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}static IsNotEmpty(i){return i!=""&&!s.containsOnlySpaces(i)&&i!=s.GuidEmpty&&i!=null&&i!=null}static IsEmpty(i){return!!(i==""||s.containsOnlySpaces(i)||i==null||i==null||i==s.GuidEmpty)}static isGuid(i){let t=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/gi,e=!1;return i&&(e=t.test(i)),e}static containsOnlySpaces(i){return/^\s*$/.test(i)}static FilterByID(i,t){try{let e=i.filter(a=>a.ID==t);if(e.length>0)return e[0]}catch{}return null}static{this.Months=[{ID:1,Label:"January"},{ID:2,Label:"February"},{ID:3,Label:"March"},{ID:4,Label:"April"},{ID:5,Label:"May"},{ID:6,Label:"June"},{ID:7,Label:"July"},{ID:8,Label:"August"},{ID:9,Label:"September"},{ID:10,Label:"October"},{ID:11,Label:"November"},{ID:12,Label:"December"}]}static GenerateYears(i,t,e){let a=-1;(t==null||t==null)&&(t=11),(e==null||e==null||!e)&&(a=1);let r=[];for(let n=0;n<t;n++)r.push(i+n*a);return r}static DateOnly(i){return i?new Date(new Date(i).toDateString()):new Date(new Date().toDateString())}static differentInDays(i,t){let e=t.getTime()-i.getTime();return Math.floor(e/(1e3*3600*24))}static minutesDiff(i,t){let e=(t.getTime()-i.getTime())/6e4;return Math.ceil(e)}static hoursDiff(i,t){let a=(t.getTime()-i.getTime())/(1e3*3600);return parseFloat(a.toFixed(1))}static Guid_NewGuid(){let i=new Date().getTime();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var a=(i+Math.random()*16)%16|0;return i=Math.floor(i/16),(e=="x"?a:a&3|8).toString(16)})}static parseJwt(i){var t=i.split(".")[1],e=t.replace(/-/g,"+").replace(/_/g,"/"),a=decodeURIComponent(atob(e).split("").map(function(r){return"%"+("00"+r.charCodeAt(0).toString(16)).slice(-2)}).join(""));return JSON.parse(a)}static numberOnly(i){let t=i.which?i.which:i.keyCode;return!(t>31&&(t<48||t>57))}static formatNumber(i){let t="",e="",a=Math.abs(i);return a>999&&a<1e6?(e="K",t=(a/1e3).toFixed(0)):a>=1e6?(e="M",t=(a/1e6).toFixed(0)):a<999&&(t=a.toString()),i<0&&(t="-"+t),t.replace(/\B(?=(\d{3})+(?!\d))/g,",")+e}static isToDay(i){if(this.IsNotEmpty(i)){i=typeof i=="string"?new Date(i):i;let t=new Date;return t.setHours(0,0,0,0),i.setHours(0,0,0,0),t.getTime()==i.getTime()}return!1}static setToLatestTime(i){let t=new Date(i);return t.setHours(23,59,59),t}static setToFirstTime(i){let t=new Date(i);return t.setHours(0,0,0),t}static compare(i,t,e){return(i<t?-1:1)*(e?1:-1)}static generateSerialasNote(i=[]){let t="";return i&&i.length>0&&(t=`[${i.map((a,r)=>`${r>0?" ":""}${a.Number}${a.Quantity>1||a.Quantity<0?"*"+a.Quantity:""}`)}]`),t}static getDatesInRange(i,t){let e=new Date(i.getTime()),a=[];for(;e<=t;)a.push(new Date(e)),e.setDate(e.getDate()+1);return a}static getDaysBefore(i,t){return new Date(i.setDate(new Date().getDate()-t))}static getRangeDate(i,t){let e=new Date;e.setMonth(i),e.setFullYear(t);let a=new Date(e.getFullYear(),e.getMonth()-1,1),r=new Date(e.getFullYear(),e.getMonth(),0);return{firstDay:a,lastDay:r}}static setDateTime(i,t){let e=new Date;t&&(e=new Date(t));let a=i.split(":");return e.setHours(parseInt(a[0])),e.setMinutes(parseInt(a[1])),e}static isMaskingField(i=""){return i.includes("?")}static generateMaskingField(i=[]){let t={};return i.forEach((e,a)=>{e=e.split(" ")?.join(""),t=c(o({},t),{[e]:!0})}),t}static checkJSApiSupported(i){let t;return i in window?t=!0:t=!1,t}static cloneObject(i){let t;return this.checkJSApiSupported("structuredClone")?t=structuredClone(i):t=JSON.parse(JSON.stringify(i)),t}static formatTitleFromDate(i,t){let e=null,a=new Date(i),r=new Date(t);return a.getDate()!=r.getDate()&&(e="d"),a.getMonth()!=r.getMonth()&&(e="d MMM"),a.getFullYear()!=r.getFullYear()&&(e="d MMM yyyy"),e}};var N=(()=>{class s{initializeIntercom(){let t=this.getFromLocalStorage();l.IsNotEmpty(t)&&window.Intercom("boot",{app_id:p.intercom.appId,name:t.name,email:t.email,created_at:t.created,user_hash:t.hash})}shutdown(){window.Intercom("shutdown"),this.clearStorage()}clearStorage(){localStorage.removeItem("INTERCOM")}updateLocalStorage(t){localStorage.setItem("INTERCOM",JSON.stringify(t))}getFromLocalStorage(){let t=localStorage.getItem("INTERCOM");return JSON.parse(t)}hideLauncher(){let t=this.getFromLocalStorage();t.hide_default_launcher=!0,window.Intercom("update",o({app_id:p.intercom.appId},t)),this.updateLocalStorage(t)}showLauncher(){let t=this.getFromLocalStorage();t.hide_default_launcher=!1,window.Intercom("update",o({app_id:p.intercom.appId},t)),this.updateLocalStorage(t)}isHideLauncher(){let t=this.getFromLocalStorage();return l.IsEmpty(t?.hide_default_launcher)?!1:t?.hide_default_launcher}static{this.\u0275fac=function(e){return new(e||s)}}static{this.\u0275prov=m({token:s,factory:s.\u0275fac,providedIn:"root"})}}return s})();export{L as a,l as b,p as c,N as d};
1
+ import{a as b}from"./chunk-2MKKFLNJ.js";import{B as I,C as g,D}from"./chunk-VZ5CMS5O.js";import{I as u,_ as d,ca as m,ia as f,n as y,s as h}from"./chunk-NMCKMUY4.js";import{a as o,b as c}from"./chunk-YQFG5XE2.js";var L=(()=>{class s{constructor(){this.httpClient=f(D),this.toastr=f(b)}get(t="",e,a={}){return this.httpClient.get(`${t}${e}`,a).pipe(u(this.handleError.bind(this)))}post(t="",e,a,r={observe:"response"}){return this.httpClient.post(`${t}${e}`,a,o({},r)).pipe(d(this.handleResponse.bind(this)),h(n=>n instanceof I&&Object.prototype.hasOwnProperty.call(r,"observe")&&r.observe==="response"?n.body instanceof Blob?n:n.body:n),u(this.handleError.bind(this)))}put(t="",e,a,r={}){return this.httpClient.put(`${t}${e}`,a,c(o({},r),{observe:"response"})).pipe(d(this.handleResponse.bind(this)),h(n=>n.body),u(this.handleError.bind(this)))}delete(t="",e,a={}){return this.httpClient.delete(`${t}${e}`,c(o({},a),{observe:"response"})).pipe(d(this.handleResponse.bind(this)),h(r=>r.body),u(this.handleError.bind(this)))}handleResponse(t){if(t instanceof I&&t.status===200&&t.body){let e;typeof t.body=="object"&&t.body!==null&&(e=t.body.message||t.body.Message),typeof e=="string"&&e.length>0&&this.toastr.success(e,"Success")}}handleError(t){let e={header:"API Error",message:"An unknown error occurred"};if(t instanceof g)switch(t.status){case 0:e.message="CORS error: Request blocked or server not responding with proper CORS headers",e.header="CORS Error";break;case 504:e.message=t.statusText||"Gateway Timeout",e.header=`API Error: ${t.status}`;break;default:e.header=`API Error: ${t.status}`,e.message=t.error&&(t.error.Message||t.error.message||t.error.error)||t.message}return t instanceof g&&(t.status>=200&&t.status<300?this.toastr.success(e.message,e.header):t.status>=400&&t.status<500?this.toastr.warning(e.message,e.header):t.status>=500&&t.status<600&&this.toastr.error(e.message,e.header)),y(()=>e)}static{this.\u0275fac=function(e){return new(e||s)}}static{this.\u0275prov=m({token:s,factory:s.\u0275fac,providedIn:"root"})}}return s})();var p={production:!0,version:"5.47.1",changelogUrl:"https://changelog.dealpos.com/?categories=cat_O6pYAT7GI1mts",defaultTimezone:"Asia/Jakarta",intercom:{appId:"xv1oomgl"}};var l=class s{static{this.emailRegex=/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/}static{this.phoneNumberRegex=/^\d+$/}static{this.GuidEmpty="00000000-0000-0000-0000-000000000000"}static{this.DecimalMinValue="-7.922816251426434e+28"}static{this.InputLockTimeSpan=500}static{this.MinDate="0001-01-01T00:00:00"}static{this.MinTime="00:00:00"}static{this.MinDecimal="-79228162514264337593543950335"}static StringFormat(i,...t){for(let e=0;e<t.length;e++)i=i.replace(`{${e}}`,t[e]);return i}static{this.isMobileDevice=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}static IsNotEmpty(i){return i!=""&&!s.containsOnlySpaces(i)&&i!=s.GuidEmpty&&i!=null&&i!=null}static IsEmpty(i){return!!(i==""||s.containsOnlySpaces(i)||i==null||i==null||i==s.GuidEmpty)}static isGuid(i){let t=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/gi,e=!1;return i&&(e=t.test(i)),e}static containsOnlySpaces(i){return/^\s*$/.test(i)}static FilterByID(i,t){try{let e=i.filter(a=>a.ID==t);if(e.length>0)return e[0]}catch{}return null}static{this.Months=[{ID:1,Label:"January"},{ID:2,Label:"February"},{ID:3,Label:"March"},{ID:4,Label:"April"},{ID:5,Label:"May"},{ID:6,Label:"June"},{ID:7,Label:"July"},{ID:8,Label:"August"},{ID:9,Label:"September"},{ID:10,Label:"October"},{ID:11,Label:"November"},{ID:12,Label:"December"}]}static GenerateYears(i,t,e){let a=-1;(t==null||t==null)&&(t=11),(e==null||e==null||!e)&&(a=1);let r=[];for(let n=0;n<t;n++)r.push(i+n*a);return r}static DateOnly(i){return i?new Date(new Date(i).toDateString()):new Date(new Date().toDateString())}static differentInDays(i,t){let e=t.getTime()-i.getTime();return Math.floor(e/(1e3*3600*24))}static minutesDiff(i,t){let e=(t.getTime()-i.getTime())/6e4;return Math.ceil(e)}static hoursDiff(i,t){let a=(t.getTime()-i.getTime())/(1e3*3600);return parseFloat(a.toFixed(1))}static Guid_NewGuid(){let i=new Date().getTime();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var a=(i+Math.random()*16)%16|0;return i=Math.floor(i/16),(e=="x"?a:a&3|8).toString(16)})}static parseJwt(i){var t=i.split(".")[1],e=t.replace(/-/g,"+").replace(/_/g,"/"),a=decodeURIComponent(atob(e).split("").map(function(r){return"%"+("00"+r.charCodeAt(0).toString(16)).slice(-2)}).join(""));return JSON.parse(a)}static numberOnly(i){let t=i.which?i.which:i.keyCode;return!(t>31&&(t<48||t>57))}static formatNumber(i){let t="",e="",a=Math.abs(i);return a>999&&a<1e6?(e="K",t=(a/1e3).toFixed(0)):a>=1e6?(e="M",t=(a/1e6).toFixed(0)):a<999&&(t=a.toString()),i<0&&(t="-"+t),t.replace(/\B(?=(\d{3})+(?!\d))/g,",")+e}static isToDay(i){if(this.IsNotEmpty(i)){i=typeof i=="string"?new Date(i):i;let t=new Date;return t.setHours(0,0,0,0),i.setHours(0,0,0,0),t.getTime()==i.getTime()}return!1}static setToLatestTime(i){let t=new Date(i);return t.setHours(23,59,59),t}static setToFirstTime(i){let t=new Date(i);return t.setHours(0,0,0),t}static compare(i,t,e){return(i<t?-1:1)*(e?1:-1)}static generateSerialasNote(i=[]){let t="";return i&&i.length>0&&(t=`[${i.map((a,r)=>`${r>0?" ":""}${a.Number}${a.Quantity>1||a.Quantity<0?"*"+a.Quantity:""}`)}]`),t}static getDatesInRange(i,t){let e=new Date(i.getTime()),a=[];for(;e<=t;)a.push(new Date(e)),e.setDate(e.getDate()+1);return a}static getDaysBefore(i,t){return new Date(i.setDate(new Date().getDate()-t))}static getRangeDate(i,t){let e=new Date;e.setMonth(i),e.setFullYear(t);let a=new Date(e.getFullYear(),e.getMonth()-1,1),r=new Date(e.getFullYear(),e.getMonth(),0);return{firstDay:a,lastDay:r}}static setDateTime(i,t){let e=new Date;t&&(e=new Date(t));let a=i.split(":");return e.setHours(parseInt(a[0])),e.setMinutes(parseInt(a[1])),e}static isMaskingField(i=""){return i.includes("?")}static generateMaskingField(i=[]){let t={};return i.forEach((e,a)=>{e=e.split(" ")?.join(""),t=c(o({},t),{[e]:!0})}),t}static checkJSApiSupported(i){let t;return i in window?t=!0:t=!1,t}static cloneObject(i){let t;return this.checkJSApiSupported("structuredClone")?t=structuredClone(i):t=JSON.parse(JSON.stringify(i)),t}static formatTitleFromDate(i,t){let e=null,a=new Date(i),r=new Date(t);return a.getDate()!=r.getDate()&&(e="d"),a.getMonth()!=r.getMonth()&&(e="d MMM"),a.getFullYear()!=r.getFullYear()&&(e="d MMM yyyy"),e}};var N=(()=>{class s{initializeIntercom(){let t=this.getFromLocalStorage();l.IsNotEmpty(t)&&window.Intercom("boot",{app_id:p.intercom.appId,name:t.name,email:t.email,created_at:t.created,user_hash:t.hash})}shutdown(){window.Intercom("shutdown"),this.clearStorage()}clearStorage(){localStorage.removeItem("INTERCOM")}updateLocalStorage(t){localStorage.setItem("INTERCOM",JSON.stringify(t))}getFromLocalStorage(){let t=localStorage.getItem("INTERCOM");return JSON.parse(t)}hideLauncher(){let t=this.getFromLocalStorage();t.hide_default_launcher=!0,window.Intercom("update",o({app_id:p.intercom.appId},t)),this.updateLocalStorage(t)}showLauncher(){let t=this.getFromLocalStorage();t.hide_default_launcher=!1,window.Intercom("update",o({app_id:p.intercom.appId},t)),this.updateLocalStorage(t)}isHideLauncher(){let t=this.getFromLocalStorage();return l.IsEmpty(t?.hide_default_launcher)?!1:t?.hide_default_launcher}static{this.\u0275fac=function(e){return new(e||s)}}static{this.\u0275prov=m({token:s,factory:s.\u0275fac,providedIn:"root"})}}return s})();export{L as a,l as b,p as c,N as d};
@@ -1 +1 @@
1
- import{a as x,b as L}from"./chunk-5JZTWUDG.js";import"./chunk-DU72RNAU.js";import{a as E,b as V}from"./chunk-Q7SK53ST.js";import"./chunk-ZMIVD3SF.js";import{g as H}from"./chunk-TUFQ5JVG.js";import"./chunk-ZUDQOT7C.js";import{a as R,b as D}from"./chunk-BUDZ3ONE.js";import"./chunk-SN7DLFX2.js";import"./chunk-V4SH72WU.js";import{w as j,x as O,y as N,z as G}from"./chunk-IMVMIXVJ.js";import"./chunk-2D2YD753.js";import"./chunk-OIBDX2CA.js";import"./chunk-M3TKVRYP.js";import{a as I}from"./chunk-2MKKFLNJ.js";import{n as $,s as F}from"./chunk-VZ5CMS5O.js";import"./chunk-F2X3VGZZ.js";import{$b as B,Cc as w,Db as A,Dc as _,Lb as p,Nc as c,Ob as h,Oc as s,Rc as C,Vb as n,W as v,Wb as o,Xb as l,Y as T,_ as M,ec as y,fc as m,h as P,hb as a,ia as f,qa as g,ra as d,s as u,sa as S,ta as b,xb as k}from"./chunk-NMCKMUY4.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};
1
+ import{a as x,b as L}from"./chunk-OP5H3EZS.js";import"./chunk-I23KOE73.js";import{a as E,b as V}from"./chunk-Q7SK53ST.js";import"./chunk-ZMIVD3SF.js";import{g as H}from"./chunk-P4DH4OHM.js";import"./chunk-ZUDQOT7C.js";import{a as R,b as D}from"./chunk-BUDZ3ONE.js";import"./chunk-IRGC65GN.js";import"./chunk-V4SH72WU.js";import{w as j,x as O,y as N,z as G}from"./chunk-IMVMIXVJ.js";import"./chunk-2D2YD753.js";import"./chunk-OIBDX2CA.js";import"./chunk-XJ7SJUJ2.js";import{a as I}from"./chunk-2MKKFLNJ.js";import{n as $,s as F}from"./chunk-VZ5CMS5O.js";import"./chunk-F2X3VGZZ.js";import{$b as B,Cc as w,Db as A,Dc as _,Lb as p,Nc as c,Ob as h,Oc as s,Rc as C,Vb as n,W as v,Wb as o,Xb as l,Y as T,_ as M,ec as y,fc as m,h as P,hb as a,ia as f,qa as g,ra as d,s as u,sa as S,ta as b,xb as k}from"./chunk-NMCKMUY4.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};