dealposbooks 5.32.0 → 5.32.2

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 (55) hide show
  1. package/{chunk-IU2PF53V.js → chunk-2CSSUKCF.js} +1 -1
  2. package/{chunk-WSZ5MU6V.js → chunk-2QWFLAG5.js} +1 -1
  3. package/{chunk-74MJ3NFN.js → chunk-4EUKDALJ.js} +1 -1
  4. package/{chunk-RBTNUVT5.js → chunk-4W2QF5R5.js} +1 -1
  5. package/{chunk-INXSCWN3.js → chunk-5OYK64TO.js} +1 -1
  6. package/{chunk-HAZ77TED.js → chunk-6UIJBWT6.js} +1 -1
  7. package/{chunk-OYHHWU2W.js → chunk-7I5R2CUM.js} +1 -1
  8. package/{chunk-VVHTNAHQ.js → chunk-AGLKA7OG.js} +1 -1
  9. package/{chunk-QLUQTLSH.js → chunk-ALYAGR32.js} +1 -1
  10. package/{chunk-33YEAYJV.js → chunk-B4HCPA6E.js} +1 -1
  11. package/{chunk-REXWFSN3.js → chunk-B7A5CWPE.js} +1 -1
  12. package/{chunk-2KB4NNVP.js → chunk-BDDB5AS7.js} +1 -1
  13. package/{chunk-GORMHEMA.js → chunk-BJ7FEOET.js} +1 -1
  14. package/{chunk-63YXSI43.js → chunk-CACGTOSZ.js} +1 -1
  15. package/{chunk-PV3NLUKC.js → chunk-CJ6UGNBN.js} +1 -1
  16. package/{chunk-MXBBJHYA.js → chunk-CMRVHYI7.js} +1 -1
  17. package/{chunk-W4SAEISC.js → chunk-CR2R5F5T.js} +2 -2
  18. package/{chunk-XILGARZ5.js → chunk-ERFXO32T.js} +1 -1
  19. package/{chunk-W24I5WPW.js → chunk-EXGI2AG7.js} +1 -1
  20. package/{chunk-7VQQO4OE.js → chunk-FP5LIX5S.js} +1 -1
  21. package/{chunk-UWNAF5OL.js → chunk-FSEW3LUP.js} +1 -1
  22. package/{chunk-SEGRH6C4.js → chunk-GK2S4TYF.js} +1 -1
  23. package/{chunk-XJEZJFWN.js → chunk-HICPZPJI.js} +1 -1
  24. package/{chunk-7EZGTYA2.js → chunk-HKQCPLSX.js} +1 -1
  25. package/{chunk-BQXWTZHK.js → chunk-ICOTZOJJ.js} +5 -5
  26. package/{chunk-QSWSGP4B.js → chunk-JZU6YAPX.js} +1 -1
  27. package/{chunk-3WD3CTYC.js → chunk-MEXKKLEE.js} +1 -1
  28. package/{chunk-L725MUU2.js → chunk-NCY25JG4.js} +4 -4
  29. package/{chunk-6OQPMZXU.js → chunk-OQ52MPGS.js} +1 -1
  30. package/{chunk-JPP5O2O5.js → chunk-QTALSVSB.js} +1 -1
  31. package/{chunk-C6U3U6SW.js → chunk-RPPLUBX5.js} +1 -1
  32. package/{chunk-7EJVMM7V.js → chunk-RQ4G322O.js} +1 -1
  33. package/{chunk-B5JORMF2.js → chunk-SASCD5HU.js} +1 -1
  34. package/{chunk-3LDYJV3L.js → chunk-SUYXXZHZ.js} +1 -1
  35. package/{chunk-TT745CJN.js → chunk-SZ3LQIKH.js} +1 -1
  36. package/{chunk-2BCAGP7R.js → chunk-UEWFM35O.js} +1 -1
  37. package/{chunk-AIZN44RL.js → chunk-UVXRATHG.js} +1 -1
  38. package/{chunk-6DRYMDZA.js → chunk-V5OZ47U6.js} +1 -1
  39. package/{chunk-F5Z3IX4J.js → chunk-VJBDOS6M.js} +1 -1
  40. package/{chunk-VYK2CQ72.js → chunk-VVGZUJP6.js} +1 -1
  41. package/{chunk-ZNIFAG4O.js → chunk-W4GXLPRM.js} +1 -1
  42. package/{chunk-2FU3LWGL.js → chunk-Y5FQDBGQ.js} +1 -1
  43. package/chunk-YBZSBC7H.js +7 -0
  44. package/chunk-YGEMHXDD.js +1 -0
  45. package/{chunk-RMRYZWCP.js → chunk-ZA5U4RYI.js} +1 -1
  46. package/chunk-ZGXJEG37.js +1 -0
  47. package/{chunk-MFH4UZ6J.js → chunk-ZM5TVQUU.js} +1 -1
  48. package/{chunk-A7EGGUJQ.js → chunk-ZSVULSVG.js} +1 -1
  49. package/index.html +2 -2
  50. package/main-RAHFUIZB.js +1 -0
  51. package/package.json +1 -1
  52. package/chunk-4ANXHXE3.js +0 -7
  53. package/chunk-56GDP75Z.js +0 -1
  54. package/chunk-P3V7Z3A6.js +0 -1
  55. package/main-OTYR5DFR.js +0 -1
@@ -1 +1 @@
1
- import{a as A}from"./chunk-W24I5WPW.js";import{a as He}from"./chunk-MDH73MG3.js";import{b as ze}from"./chunk-XILGARZ5.js";import"./chunk-MFH4UZ6J.js";import{a as re}from"./chunk-VVHTNAHQ.js";import{a as Pe}from"./chunk-XKI7WLHE.js";import"./chunk-C2GO6SPF.js";import{a as P,b as z}from"./chunk-O4QM64EH.js";import{d as ke,i as Ne,j as Re,k as Me}from"./chunk-EW3R2HAB.js";import{a as Fe,b as Ve}from"./chunk-OLOVFS3Y.js";import"./chunk-QCLAOAVG.js";import"./chunk-Q33XIUDN.js";import"./chunk-PKN47FQE.js";import{a as Je,b as De}from"./chunk-LRRVQSMI.js";import"./chunk-42UIGXWH.js";import"./chunk-NA5YXAMJ.js";import"./chunk-253IFSMV.js";import"./chunk-QYXQYPHB.js";import"./chunk-FBEBMNVC.js";import"./chunk-6NGIQJIP.js";import"./chunk-YDEVG4CR.js";import{g as Ie,h as Ae}from"./chunk-UYC454VQ.js";import{b as Ee,c as Te}from"./chunk-C7LM5UCK.js";import{a as be,b as Ce}from"./chunk-J4XRJAME.js";import{a as v,b as Se,c as we,d as ve,e as ye,f as je}from"./chunk-JBSIAXM5.js";import"./chunk-GH5Z5SPB.js";import{n as _e,o as ge,w as he,x as xe}from"./chunk-67VPWIWW.js";import"./chunk-BHV2HCJY.js";import{b as ae,c as le,e as me,f as pe,k as se,l as de,o as ue,v as ce,y as fe}from"./chunk-FMVCTBCQ.js";import"./chunk-P3V7Z3A6.js";import"./chunk-VFEEFGWW.js";import"./chunk-F2X3VGZZ.js";import{c as Z,e as ee,f as te,k as ie,l as ne,m as oe}from"./chunk-B63BKC6F.js";import{Ab as W,Ac as T,Cb as g,Ga as D,Jc as I,Kb as d,Kc as Y,Lc as M,Mc as S,Nb as K,Ub as a,Vb as r,Wb as b,X as J,Yc as y,Z as B,_b as j,bb as G,c as F,cb as U,dc as E,ec as f,gb as m,ha as w,pa as h,qa as x,qc as p,rc as C,s as V,sc as k,uc as q,vc as Q,wb as L,wc as N,xc as $,yc as X,zc as R}from"./chunk-JP6RBSB3.js";import{a as s,b as c}from"./chunk-YQFG5XE2.js";var Ue={data:{data:[],totalCount:0},meta:{options:{outlets:[]},filter:{number:null,from:null,to:null,pageNumber:1,rowCount:20,pageSize:20,export:!1,exportPageNumber:1,exportRowCount:1e4,outletName:""}},filter:{number:null,from:null,to:null,pageNumber:1,rowCount:20,pageSize:20,export:!1,exportPageNumber:1,exportRowCount:1e4,outletName:""}},H=Se(je(Ue),we(t=>({first:y(()=>(t.filter().pageNumber-1)*t.filter().pageSize+1),end:y(()=>Math.min(t.filter().pageNumber*t.filter().pageSize,t.data().totalCount)),hasCheckedRows:y(()=>t.data().data.some(l=>l.checked)),checkedAdjustment:y(()=>t.data().data.filter(l=>l.checked).map(l=>l.id))})),ye(t=>{let l=w(A);return{updateFilter(n){v(t,i=>c(s({},i),{filter:s(s({},i.filter),n)}))},onRowSelect(n){v(t,i=>{let o=i.data.data.map(u=>u.id===n.id?c(s({},u),{checked:!0}):u);return c(s({},i),{data:c(s({},i.data),{data:o})})})},onRowUnselect(n){v(t,i=>{let o=i.data.data.map(u=>u.id===n.id?c(s({},u),{checked:!1}):u);return c(s({},i),{data:c(s({},i.data),{data:o})})})},onHeaderCheckboxToggle(n){v(t,i=>{let o=i.data.data.map(u=>c(s({},u),{checked:n}));return c(s({},i),{data:c(s({},i.data),{data:o})})})},getGJAdjustmentLoader:P(F(J(()=>l.getGJAdjustmentLoader().pipe(z({next:n=>{v(t,i=>c(s({},i),{meta:n}))},error:n=>{console.error("Error fetching adjustment loader:",n)}}))))),getAdjustmentJournal:P(F(V(n=>Object.entries(n).reduce((i,[o,u])=>(u!=null&&(i[o]=u),i),{})),J(n=>l.getAdjustmentJournal(n).pipe(V(i=>c(s({},i),{data:i.data.map(o=>c(s({},o),{checked:!1}))})),z({next:i=>{v(t,o=>c(s({},o),{data:i}))},error:i=>{console.error("Error fetching customer invoice:",i)}})))))}}),ve(t=>({onInit:()=>{t.getGJAdjustmentLoader(),t.getAdjustmentJournal(t.filter)}})));var Le=()=>({height:"calc(100vh - 70px)"}),O=t=>({"ng-invalid ng-dirty":t}),We=()=>({});function Ke(t,l){if(t&1){let e=j();a(0,"p-button",10),E("onClick",function(){h(e);let i=f(2);return x(i.generateAdjusmentJournal())}),r()}}function qe(t,l){if(t&1&&g(0,Ke,1,0,"p-button",9),t&2){let e=f();d("ngIf",e.store.hasCheckedRows())}}function Qe(t,l){t&1&&(a(0,"tr")(1,"th",12),b(2,"p-tableHeaderCheckbox"),r(),a(3,"th",13),p(4,"Outlet"),r(),a(5,"th",14),p(6,"Number"),r(),a(7,"th",15),p(8,"Date"),r(),a(9,"th",14),p(10,"Adjustment Qty"),r(),a(11,"th",13),p(12,"Type"),r(),a(13,"th",16),p(14,"State"),r(),a(15,"th",17),p(16,"Note"),r(),b(17,"th",12),r())}function $e(t,l){if(t&1&&(a(0,"tr")(1,"td"),b(2,"p-tableCheckbox",18),r(),a(3,"td"),p(4),r(),a(5,"td")(6,"a",19),p(7),r()(),a(8,"td"),p(9),I(10,"date"),r(),a(11,"td"),p(12),I(13,"number"),r(),a(14,"td"),p(15),r(),a(16,"td"),p(17),r(),a(18,"td"),b(19,"div",20),r(),a(20,"td"),b(21,"p-button",21),r()()),t&2){let e=l.$implicit,n=f(2);m(2),d("value",e),m(2),C(e.outlet),m(2),d("href",n.authService.getTenantExternalURL()+"/menu/Adjustment/Adjustment/Archive/Info?ID="+e.id,U),m(),k(" ",e.number," "),m(2),C(M(10,12,e.date,"d MMM y")),m(3),C(Y(13,15,e.quantitySUM)),m(3),C(e.type),m(2),C(e.state),m(2),d("innerHTML",e.note,G),m(2),d("icon",e.integrated?"fa-solid fa-circle-check":"fa-solid fa-circle-xmark")("severity",e.integrated?"success":"danger")("text",!0)}}function Xe(t,l){if(t&1&&p(0),t&2){let e=f(2);q(" Showing ",e.store.first()," to ",e.store.end()," of ",e.store.data().totalCount," entries ")}}function Ye(t,l){t&1&&(a(0,"tr")(1,"td",22)(2,"span"),p(3,"No records found."),r()()())}function Ze(t,l){if(t&1){let e=j();a(0,"p-panel")(1,"p-table",11),E("onRowSelect",function(i){h(e);let o=f();return x(o.onRowSelect(i))})("onRowUnselect",function(i){h(e);let o=f();return x(o.onRowUnselect(i))})("onHeaderCheckboxToggle",function(i){h(e);let o=f();return x(o.onHeaderCheckboxToggle(i))})("onPage",function(i){h(e);let o=f();return x(o.onPageChange(i))}),g(2,Qe,18,0,"ng-template",null,3,S)(4,$e,22,17,"ng-template",null,4,S)(6,Xe,1,3,"ng-template",null,5,S)(8,Ye,4,0,"ng-template",null,6,S),r()()}if(t&2){let e=f();K(R(9,Le)),m(),d("value",e.store.data().data)("scrollable",!0)("scrollHeight","calc(100vh - 142px)")("paginator",!0)("rows",e.store.filter().pageSize)("totalRecords",e.store.data().totalCount)("lazy",!0)}}function et(t,l){if(t&1&&(a(0,"span",31),p(1),I(2,"truncate"),r()),t&2){let e=l.$implicit;d("pTooltip",e.name),m(),k(" ",M(2,2,e.name,30)," ")}}function tt(t,l){if(t&1&&(a(0,"div")(1,"span",33),p(2),r()()),t&2){let e=l.$implicit;m(2),C(e)}}function it(t,l){if(t&1&&(a(0,"div"),g(1,tt,3,1,"div",32),r()),t&2){let e=f(2);m(),d("ngForOf",e.getErrors("from"))}}function nt(t,l){if(t&1&&(a(0,"div")(1,"span",33),p(2),r()()),t&2){let e=l.$implicit;m(2),C(e)}}function ot(t,l){if(t&1&&(a(0,"div"),g(1,nt,3,1,"div",32),r()),t&2){let e=f(2);m(),d("ngForOf",e.getErrors("to"))}}function rt(t,l){if(t&1&&(a(0,"div")(1,"span",33),p(2),r()()),t&2){let e=l.$implicit;m(2),C(e)}}function at(t,l){if(t&1&&(a(0,"div"),g(1,rt,3,1,"div",32),r()),t&2){let e=f(2);m(),d("ngForOf",e.getErrors("pageSize"))}}function lt(t,l){if(t&1&&(a(0,"form",23)(1,"div",24)(2,"label",25),p(3,"Outlet"),r(),a(4,"p-select",26),g(5,et,3,5,"ng-template",null,7,S),r()(),a(7,"div",24)(8,"label",25),p(9,"From"),r(),b(10,"p-datepicker",27),g(11,it,2,1,"div",28),r(),a(12,"div",24)(13,"label",25),p(14,"To"),r(),b(15,"p-datepicker",29),g(16,ot,2,1,"div",28),r(),a(17,"div",24)(18,"label",25),p(19,"Page Size"),r(),b(20,"input",30),g(21,at,2,1,"div",28),r()()),t&2){let e=f();d("formGroup",e.form),m(4),d("virtualScrollItemSize",50)("options",e.store.meta().options.outlets),m(6),d("iconDisplay","input")("showIcon",!0)("ngClass",T(14,O,e.isInvalid("from"))),m(),d("ngIf",e.isInvalid("from")),m(4),d("iconDisplay","input")("showIcon",!0)("ngClass",T(16,O,e.isInvalid("to"))),m(),d("ngIf",e.isInvalid("to")),m(4),d("autoNumeric",R(18,We))("ngClass",T(19,O,e.isInvalid("pageSize"))),m(),d("ngIf",e.isInvalid("pageSize"))}}var Kt=(()=>{class t extends Pe{constructor(){super(),this.store=w(H),this.generateJournalService=w(A),this.authService=w(re),this.isDialogFilterVisible=D(!1),this.isInitDialogFilterVisible=D(!1),this.fb=w(ce),this.dayjsService=w(ze)}ngOnInit(){this.initForm()}initForm(){let{number:e,from:n,to:i,pageNumber:o,rowCount:u,pageSize:_,export:Oe,exportPageNumber:Be,exportRowCount:Ge}=this.store.filter();this.form=this.fb.group({number:this.fb.control(e),outletName:this.fb.control(""),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),pageNumber:this.fb.control(o),rowCount:this.fb.control(u),pageSize:this.fb.control(_,[le.required]),export:this.fb.control(Oe),exportPageNumber:this.fb.control(Be),exportRowCount:this.fb.control(Ge)})}onSearch(e){this.store.updateFilter(c(s({},this.store.filter()),{number:e,pageNumber:1}))}onFilterOKEvent(){if(this.form.invalid){this.form.markAllAsTouched();return}let e=Object.entries(this.form.getRawValue()).reduce((n,[i,o])=>{switch(i){case"from":typeof o=="object"?n[i]=this.dayjsService.from(o)?this.dayjsService.format(o):null:n[i]=o!=null?String(o):null;break;case"to":typeof o=="object"?n[i]=this.dayjsService.from(o)?this.dayjsService.format(o):null:n[i]=o!=null?String(o):null;break;default:n[i]=o===null?"":o;break}return n},{});this.store.updateFilter(e),this.isDialogFilterVisible.set(!1)}onRowSelect(e){this.store.onRowSelect(e.data)}onRowUnselect(e){if(Array.isArray(e.data)){e.data.forEach(n=>{this.store.onRowUnselect(n)});return}else this.store.onRowUnselect(e.data)}onHeaderCheckboxToggle(e){this.store.onHeaderCheckboxToggle(e.checked)}onPageChange(e){let n=e.first/e.rows;this.store.updateFilter(c(s({},this.store.filter()),{pageNumber:n+1}))}generateAdjusmentJournal(){this.generateJournalService.createAdjustmentJournal(this.store.checkedAdjustment()).pipe(B(()=>this.store.getAdjustmentJournal(this.store.filter))).subscribe()}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=L({type:t,selectors:[["app-adjustment-journal"]],features:[X([H]),W],decls:7,vars:4,consts:[["actionButton",""],["content",""],["filters",""],["header",""],["body",""],["paginatorleft",""],["emptymessage",""],["item",""],["pageTitle","Adjustment",3,"isDialogFilterVisibleChange","isInitDialogFilterVisibleChange","filterConfirmed","search","isSearchableInput","isFilterable","isDialogFilterVisible","isInitDialogFilterVisible"],["label","Generate Journal",3,"onClick",4,"ngIf"],["label","Generate Journal",3,"onClick"],["dataKey","id",3,"onRowSelect","onRowUnselect","onHeaderCheckboxToggle","onPage","value","scrollable","scrollHeight","paginator","rows","totalRecords","lazy"],[2,"width","4rem"],[2,"width","10rem"],[2,"width","12rem"],[2,"width","11rem"],[2,"width","9rem"],[2,"width","14rem"],[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"],["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"],["type","text","pInputText","","formControlName","pageSize",3,"autoNumeric","ngClass"],[3,"pTooltip"],[4,"ngFor","ngForOf"],[1,"text-danger"]],template:function(n,i){if(n&1){let o=j();a(0,"app-main-panel",8),$("isDialogFilterVisibleChange",function(_){return h(o),N(i.isDialogFilterVisible,_)||(i.isDialogFilterVisible=_),x(_)})("isInitDialogFilterVisibleChange",function(_){return h(o),N(i.isInitDialogFilterVisible,_)||(i.isInitDialogFilterVisible=_),x(_)}),E("filterConfirmed",function(){return h(o),x(i.onFilterOKEvent())})("search",function(_){return h(o),x(i.onSearch(_))}),g(1,qe,1,1,"ng-template",null,0,S)(3,Ze,10,10,"ng-template",null,1,S)(5,lt,22,21,"ng-template",null,2,S),r()}n&2&&(d("isSearchableInput",!0)("isFilterable",!0),Q("isDialogFilterVisible",i.isDialogFilterVisible)("isInitDialogFilterVisible",i.isInitDialogFilterVisible))},dependencies:[Ae,Me,ke,Ne,Re,oe,Z,ee,te,ne,ie,Ce,be,xe,he,Ve,Fe,De,Je,fe,se,ae,me,pe,de,ue,ge,_e,Ie,Te,Ee,He],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();export{Kt as AdjustmentJournalComponent};
1
+ import{a as A}from"./chunk-EXGI2AG7.js";import{a as He}from"./chunk-MDH73MG3.js";import{b as ze}from"./chunk-ERFXO32T.js";import"./chunk-ZM5TVQUU.js";import{a as re}from"./chunk-AGLKA7OG.js";import{a as Pe}from"./chunk-XKI7WLHE.js";import"./chunk-C2GO6SPF.js";import{a as P,b as z}from"./chunk-O4QM64EH.js";import{d as ke,i as Ne,j as Re,k as Me}from"./chunk-EW3R2HAB.js";import{a as Fe,b as Ve}from"./chunk-OLOVFS3Y.js";import"./chunk-QCLAOAVG.js";import"./chunk-Q33XIUDN.js";import"./chunk-PKN47FQE.js";import{a as Je,b as De}from"./chunk-LRRVQSMI.js";import"./chunk-42UIGXWH.js";import"./chunk-NA5YXAMJ.js";import"./chunk-253IFSMV.js";import"./chunk-QYXQYPHB.js";import"./chunk-FBEBMNVC.js";import"./chunk-6NGIQJIP.js";import"./chunk-YDEVG4CR.js";import{g as Ie,h as Ae}from"./chunk-UYC454VQ.js";import{b as Ee,c as Te}from"./chunk-C7LM5UCK.js";import{a as be,b as Ce}from"./chunk-J4XRJAME.js";import{a as v,b as Se,c as we,d as ve,e as ye,f as je}from"./chunk-JBSIAXM5.js";import"./chunk-GH5Z5SPB.js";import{n as _e,o as ge,w as he,x as xe}from"./chunk-67VPWIWW.js";import"./chunk-BHV2HCJY.js";import{b as ae,c as le,e as me,f as pe,k as se,l as de,o as ue,v as ce,y as fe}from"./chunk-FMVCTBCQ.js";import"./chunk-ZGXJEG37.js";import"./chunk-VFEEFGWW.js";import"./chunk-F2X3VGZZ.js";import{c as Z,e as ee,f as te,k as ie,l as ne,m as oe}from"./chunk-B63BKC6F.js";import{Ab as W,Ac as T,Cb as g,Ga as D,Jc as I,Kb as d,Kc as Y,Lc as M,Mc as S,Nb as K,Ub as a,Vb as r,Wb as b,X as J,Yc as y,Z as B,_b as j,bb as G,c as F,cb as U,dc as E,ec as f,gb as m,ha as w,pa as h,qa as x,qc as p,rc as C,s as V,sc as k,uc as q,vc as Q,wb as L,wc as N,xc as $,yc as X,zc as R}from"./chunk-JP6RBSB3.js";import{a as s,b as c}from"./chunk-YQFG5XE2.js";var Ue={data:{data:[],totalCount:0},meta:{options:{outlets:[]},filter:{number:null,from:null,to:null,pageNumber:1,rowCount:20,pageSize:20,export:!1,exportPageNumber:1,exportRowCount:1e4,outletName:""}},filter:{number:null,from:null,to:null,pageNumber:1,rowCount:20,pageSize:20,export:!1,exportPageNumber:1,exportRowCount:1e4,outletName:""}},H=Se(je(Ue),we(t=>({first:y(()=>(t.filter().pageNumber-1)*t.filter().pageSize+1),end:y(()=>Math.min(t.filter().pageNumber*t.filter().pageSize,t.data().totalCount)),hasCheckedRows:y(()=>t.data().data.some(l=>l.checked)),checkedAdjustment:y(()=>t.data().data.filter(l=>l.checked).map(l=>l.id))})),ye(t=>{let l=w(A);return{updateFilter(n){v(t,i=>c(s({},i),{filter:s(s({},i.filter),n)}))},onRowSelect(n){v(t,i=>{let o=i.data.data.map(u=>u.id===n.id?c(s({},u),{checked:!0}):u);return c(s({},i),{data:c(s({},i.data),{data:o})})})},onRowUnselect(n){v(t,i=>{let o=i.data.data.map(u=>u.id===n.id?c(s({},u),{checked:!1}):u);return c(s({},i),{data:c(s({},i.data),{data:o})})})},onHeaderCheckboxToggle(n){v(t,i=>{let o=i.data.data.map(u=>c(s({},u),{checked:n}));return c(s({},i),{data:c(s({},i.data),{data:o})})})},getGJAdjustmentLoader:P(F(J(()=>l.getGJAdjustmentLoader().pipe(z({next:n=>{v(t,i=>c(s({},i),{meta:n}))},error:n=>{console.error("Error fetching adjustment loader:",n)}}))))),getAdjustmentJournal:P(F(V(n=>Object.entries(n).reduce((i,[o,u])=>(u!=null&&(i[o]=u),i),{})),J(n=>l.getAdjustmentJournal(n).pipe(V(i=>c(s({},i),{data:i.data.map(o=>c(s({},o),{checked:!1}))})),z({next:i=>{v(t,o=>c(s({},o),{data:i}))},error:i=>{console.error("Error fetching customer invoice:",i)}})))))}}),ve(t=>({onInit:()=>{t.getGJAdjustmentLoader(),t.getAdjustmentJournal(t.filter)}})));var Le=()=>({height:"calc(100vh - 70px)"}),O=t=>({"ng-invalid ng-dirty":t}),We=()=>({});function Ke(t,l){if(t&1){let e=j();a(0,"p-button",10),E("onClick",function(){h(e);let i=f(2);return x(i.generateAdjusmentJournal())}),r()}}function qe(t,l){if(t&1&&g(0,Ke,1,0,"p-button",9),t&2){let e=f();d("ngIf",e.store.hasCheckedRows())}}function Qe(t,l){t&1&&(a(0,"tr")(1,"th",12),b(2,"p-tableHeaderCheckbox"),r(),a(3,"th",13),p(4,"Outlet"),r(),a(5,"th",14),p(6,"Number"),r(),a(7,"th",15),p(8,"Date"),r(),a(9,"th",14),p(10,"Adjustment Qty"),r(),a(11,"th",13),p(12,"Type"),r(),a(13,"th",16),p(14,"State"),r(),a(15,"th",17),p(16,"Note"),r(),b(17,"th",12),r())}function $e(t,l){if(t&1&&(a(0,"tr")(1,"td"),b(2,"p-tableCheckbox",18),r(),a(3,"td"),p(4),r(),a(5,"td")(6,"a",19),p(7),r()(),a(8,"td"),p(9),I(10,"date"),r(),a(11,"td"),p(12),I(13,"number"),r(),a(14,"td"),p(15),r(),a(16,"td"),p(17),r(),a(18,"td"),b(19,"div",20),r(),a(20,"td"),b(21,"p-button",21),r()()),t&2){let e=l.$implicit,n=f(2);m(2),d("value",e),m(2),C(e.outlet),m(2),d("href",n.authService.getTenantExternalURL()+"/menu/Adjustment/Adjustment/Archive/Info?ID="+e.id,U),m(),k(" ",e.number," "),m(2),C(M(10,12,e.date,"d MMM y")),m(3),C(Y(13,15,e.quantitySUM)),m(3),C(e.type),m(2),C(e.state),m(2),d("innerHTML",e.note,G),m(2),d("icon",e.integrated?"fa-solid fa-circle-check":"fa-solid fa-circle-xmark")("severity",e.integrated?"success":"danger")("text",!0)}}function Xe(t,l){if(t&1&&p(0),t&2){let e=f(2);q(" Showing ",e.store.first()," to ",e.store.end()," of ",e.store.data().totalCount," entries ")}}function Ye(t,l){t&1&&(a(0,"tr")(1,"td",22)(2,"span"),p(3,"No records found."),r()()())}function Ze(t,l){if(t&1){let e=j();a(0,"p-panel")(1,"p-table",11),E("onRowSelect",function(i){h(e);let o=f();return x(o.onRowSelect(i))})("onRowUnselect",function(i){h(e);let o=f();return x(o.onRowUnselect(i))})("onHeaderCheckboxToggle",function(i){h(e);let o=f();return x(o.onHeaderCheckboxToggle(i))})("onPage",function(i){h(e);let o=f();return x(o.onPageChange(i))}),g(2,Qe,18,0,"ng-template",null,3,S)(4,$e,22,17,"ng-template",null,4,S)(6,Xe,1,3,"ng-template",null,5,S)(8,Ye,4,0,"ng-template",null,6,S),r()()}if(t&2){let e=f();K(R(9,Le)),m(),d("value",e.store.data().data)("scrollable",!0)("scrollHeight","calc(100vh - 142px)")("paginator",!0)("rows",e.store.filter().pageSize)("totalRecords",e.store.data().totalCount)("lazy",!0)}}function et(t,l){if(t&1&&(a(0,"span",31),p(1),I(2,"truncate"),r()),t&2){let e=l.$implicit;d("pTooltip",e.name),m(),k(" ",M(2,2,e.name,30)," ")}}function tt(t,l){if(t&1&&(a(0,"div")(1,"span",33),p(2),r()()),t&2){let e=l.$implicit;m(2),C(e)}}function it(t,l){if(t&1&&(a(0,"div"),g(1,tt,3,1,"div",32),r()),t&2){let e=f(2);m(),d("ngForOf",e.getErrors("from"))}}function nt(t,l){if(t&1&&(a(0,"div")(1,"span",33),p(2),r()()),t&2){let e=l.$implicit;m(2),C(e)}}function ot(t,l){if(t&1&&(a(0,"div"),g(1,nt,3,1,"div",32),r()),t&2){let e=f(2);m(),d("ngForOf",e.getErrors("to"))}}function rt(t,l){if(t&1&&(a(0,"div")(1,"span",33),p(2),r()()),t&2){let e=l.$implicit;m(2),C(e)}}function at(t,l){if(t&1&&(a(0,"div"),g(1,rt,3,1,"div",32),r()),t&2){let e=f(2);m(),d("ngForOf",e.getErrors("pageSize"))}}function lt(t,l){if(t&1&&(a(0,"form",23)(1,"div",24)(2,"label",25),p(3,"Outlet"),r(),a(4,"p-select",26),g(5,et,3,5,"ng-template",null,7,S),r()(),a(7,"div",24)(8,"label",25),p(9,"From"),r(),b(10,"p-datepicker",27),g(11,it,2,1,"div",28),r(),a(12,"div",24)(13,"label",25),p(14,"To"),r(),b(15,"p-datepicker",29),g(16,ot,2,1,"div",28),r(),a(17,"div",24)(18,"label",25),p(19,"Page Size"),r(),b(20,"input",30),g(21,at,2,1,"div",28),r()()),t&2){let e=f();d("formGroup",e.form),m(4),d("virtualScrollItemSize",50)("options",e.store.meta().options.outlets),m(6),d("iconDisplay","input")("showIcon",!0)("ngClass",T(14,O,e.isInvalid("from"))),m(),d("ngIf",e.isInvalid("from")),m(4),d("iconDisplay","input")("showIcon",!0)("ngClass",T(16,O,e.isInvalid("to"))),m(),d("ngIf",e.isInvalid("to")),m(4),d("autoNumeric",R(18,We))("ngClass",T(19,O,e.isInvalid("pageSize"))),m(),d("ngIf",e.isInvalid("pageSize"))}}var Kt=(()=>{class t extends Pe{constructor(){super(),this.store=w(H),this.generateJournalService=w(A),this.authService=w(re),this.isDialogFilterVisible=D(!1),this.isInitDialogFilterVisible=D(!1),this.fb=w(ce),this.dayjsService=w(ze)}ngOnInit(){this.initForm()}initForm(){let{number:e,from:n,to:i,pageNumber:o,rowCount:u,pageSize:_,export:Oe,exportPageNumber:Be,exportRowCount:Ge}=this.store.filter();this.form=this.fb.group({number:this.fb.control(e),outletName:this.fb.control(""),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),pageNumber:this.fb.control(o),rowCount:this.fb.control(u),pageSize:this.fb.control(_,[le.required]),export:this.fb.control(Oe),exportPageNumber:this.fb.control(Be),exportRowCount:this.fb.control(Ge)})}onSearch(e){this.store.updateFilter(c(s({},this.store.filter()),{number:e,pageNumber:1}))}onFilterOKEvent(){if(this.form.invalid){this.form.markAllAsTouched();return}let e=Object.entries(this.form.getRawValue()).reduce((n,[i,o])=>{switch(i){case"from":typeof o=="object"?n[i]=this.dayjsService.from(o)?this.dayjsService.format(o):null:n[i]=o!=null?String(o):null;break;case"to":typeof o=="object"?n[i]=this.dayjsService.from(o)?this.dayjsService.format(o):null:n[i]=o!=null?String(o):null;break;default:n[i]=o===null?"":o;break}return n},{});this.store.updateFilter(e),this.isDialogFilterVisible.set(!1)}onRowSelect(e){this.store.onRowSelect(e.data)}onRowUnselect(e){if(Array.isArray(e.data)){e.data.forEach(n=>{this.store.onRowUnselect(n)});return}else this.store.onRowUnselect(e.data)}onHeaderCheckboxToggle(e){this.store.onHeaderCheckboxToggle(e.checked)}onPageChange(e){let n=e.first/e.rows;this.store.updateFilter(c(s({},this.store.filter()),{pageNumber:n+1}))}generateAdjusmentJournal(){this.generateJournalService.createAdjustmentJournal(this.store.checkedAdjustment()).pipe(B(()=>this.store.getAdjustmentJournal(this.store.filter))).subscribe()}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=L({type:t,selectors:[["app-adjustment-journal"]],features:[X([H]),W],decls:7,vars:4,consts:[["actionButton",""],["content",""],["filters",""],["header",""],["body",""],["paginatorleft",""],["emptymessage",""],["item",""],["pageTitle","Adjustment",3,"isDialogFilterVisibleChange","isInitDialogFilterVisibleChange","filterConfirmed","search","isSearchableInput","isFilterable","isDialogFilterVisible","isInitDialogFilterVisible"],["label","Generate Journal",3,"onClick",4,"ngIf"],["label","Generate Journal",3,"onClick"],["dataKey","id",3,"onRowSelect","onRowUnselect","onHeaderCheckboxToggle","onPage","value","scrollable","scrollHeight","paginator","rows","totalRecords","lazy"],[2,"width","4rem"],[2,"width","10rem"],[2,"width","12rem"],[2,"width","11rem"],[2,"width","9rem"],[2,"width","14rem"],[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"],["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"],["type","text","pInputText","","formControlName","pageSize",3,"autoNumeric","ngClass"],[3,"pTooltip"],[4,"ngFor","ngForOf"],[1,"text-danger"]],template:function(n,i){if(n&1){let o=j();a(0,"app-main-panel",8),$("isDialogFilterVisibleChange",function(_){return h(o),N(i.isDialogFilterVisible,_)||(i.isDialogFilterVisible=_),x(_)})("isInitDialogFilterVisibleChange",function(_){return h(o),N(i.isInitDialogFilterVisible,_)||(i.isInitDialogFilterVisible=_),x(_)}),E("filterConfirmed",function(){return h(o),x(i.onFilterOKEvent())})("search",function(_){return h(o),x(i.onSearch(_))}),g(1,qe,1,1,"ng-template",null,0,S)(3,Ze,10,10,"ng-template",null,1,S)(5,lt,22,21,"ng-template",null,2,S),r()}n&2&&(d("isSearchableInput",!0)("isFilterable",!0),Q("isDialogFilterVisible",i.isDialogFilterVisible)("isInitDialogFilterVisible",i.isInitDialogFilterVisible))},dependencies:[Ae,Me,ke,Ne,Re,oe,Z,ee,te,ne,ie,Ce,be,xe,he,Ve,Fe,De,Je,fe,se,ae,me,pe,de,ue,ge,_e,Ie,Te,Ee,He],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();export{Kt as AdjustmentJournalComponent};
@@ -1 +1 @@
1
- import{a}from"./chunk-P3V7Z3A6.js";import{ba as c,ha as n,i as o}from"./chunk-JP6RBSB3.js";import{a as i}from"./chunk-YQFG5XE2.js";var C=(()=>{class r{constructor(){this.httpService=n(a),this.categoryOptionsCache$=new o(1),this.isInitialized=!1}getChartOfAccountLoader(){return this.httpService.get("","api/ChartOfAccountLoader")}getPaginatedChartAccounts(t){let e=i({},t);return this.httpService.post("","api/ChartOfAccount/GetPaginatedList",e,{observe:"body"})}getChartAccountForm(){return this.httpService.get("","api/ChartOfAccount/Form")}getChartAccountById(t){return this.httpService.get("",`api/ChartOfAccount/Info/${t}`)}getChartAccountFormById(t){return this.httpService.get("",`api/ChartOfAccount/Form/${t}`)}submitChartAccount(t,e={}){return this.httpService.post("","api/ChartOfAccount/Submit",t,e)}deleteChartAccount(t){if(t.length>1){let e={body:t};return this.httpService.delete("","api/ChartOfAccount/Batch",e)}else return this.httpService.delete("",`api/ChartOfAccount/${t[0]}`)}fetchCategoryOptions(){return this.httpService.get("","api/ChartOfAccount/CategoryOptions")}getCachedCategoriesOptions(){return this.isInitialized||(this.isInitialized=!0,this.fetchCategoryOptions().subscribe({next:t=>this.categoryOptionsCache$.next(t),error:t=>this.categoryOptionsCache$.error(t)})),this.categoryOptionsCache$.asObservable()}exportChartOfAccounts(t){return this.httpService.post(void 0,"api/ChartOfAccountExport/export",t,{observe:"response",responseType:"blob"})}importPreviewChartOfAccounts(t){return this.httpService.post(void 0,"api/chartofaccount/importpreview",t)}importConfirmChartOfAccounts(t){return this.httpService.post(void 0,"api/chartofaccount/importconfirm",t)}discountedChartAccounts(t,e){return this.httpService.put(void 0,`/api/ChartOfAccount/${t}/discontinued`,e)}static{this.\u0275fac=function(e){return new(e||r)}}static{this.\u0275prov=c({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})();export{C as a};
1
+ import{a}from"./chunk-ZGXJEG37.js";import{ba as c,ha as n,i as o}from"./chunk-JP6RBSB3.js";import{a as i}from"./chunk-YQFG5XE2.js";var C=(()=>{class r{constructor(){this.httpService=n(a),this.categoryOptionsCache$=new o(1),this.isInitialized=!1}getChartOfAccountLoader(){return this.httpService.get("","api/ChartOfAccountLoader")}getPaginatedChartAccounts(t){let e=i({},t);return this.httpService.post("","api/ChartOfAccount/GetPaginatedList",e,{observe:"body"})}getChartAccountForm(){return this.httpService.get("","api/ChartOfAccount/Form")}getChartAccountById(t){return this.httpService.get("",`api/ChartOfAccount/Info/${t}`)}getChartAccountFormById(t){return this.httpService.get("",`api/ChartOfAccount/Form/${t}`)}submitChartAccount(t,e={}){return this.httpService.post("","api/ChartOfAccount/Submit",t,e)}deleteChartAccount(t){if(t.length>1){let e={body:t};return this.httpService.delete("","api/ChartOfAccount/Batch",e)}else return this.httpService.delete("",`api/ChartOfAccount/${t[0]}`)}fetchCategoryOptions(){return this.httpService.get("","api/ChartOfAccount/CategoryOptions")}getCachedCategoriesOptions(){return this.isInitialized||(this.isInitialized=!0,this.fetchCategoryOptions().subscribe({next:t=>this.categoryOptionsCache$.next(t),error:t=>this.categoryOptionsCache$.error(t)})),this.categoryOptionsCache$.asObservable()}exportChartOfAccounts(t){return this.httpService.post(void 0,"api/ChartOfAccountExport/export",t,{observe:"response",responseType:"blob"})}importPreviewChartOfAccounts(t){return this.httpService.post(void 0,"api/chartofaccount/importpreview",t)}importConfirmChartOfAccounts(t){return this.httpService.post(void 0,"api/chartofaccount/importconfirm",t)}discountedChartAccounts(t,e){return this.httpService.put(void 0,`/api/ChartOfAccount/${t}/discontinued`,e)}static{this.\u0275fac=function(e){return new(e||r)}}static{this.\u0275prov=c({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})();export{C as a};
@@ -1,4 +1,4 @@
1
- import{a as re,b as Tt}from"./chunk-2BCAGP7R.js";import{f as It}from"./chunk-EDCDR4RJ.js";import"./chunk-HHDFSN55.js";import{a as ut}from"./chunk-6ACYDH2N.js";import"./chunk-C2GO6SPF.js";import{a as ve,b as Ce}from"./chunk-O4QM64EH.js";import{d as vt,i as Ct,j as wt,k as xt}from"./chunk-EW3R2HAB.js";import"./chunk-OLOVFS3Y.js";import"./chunk-QCLAOAVG.js";import"./chunk-Q33XIUDN.js";import{a as nt}from"./chunk-PKN47FQE.js";import"./chunk-LRRVQSMI.js";import{a as Ot}from"./chunk-42UIGXWH.js";import"./chunk-NA5YXAMJ.js";import"./chunk-253IFSMV.js";import{a as ot}from"./chunk-QYXQYPHB.js";import"./chunk-FBEBMNVC.js";import"./chunk-6NGIQJIP.js";import"./chunk-YDEVG4CR.js";import{h as yt}from"./chunk-UYC454VQ.js";import{a as at}from"./chunk-C7LM5UCK.js";import{a as pt,b as dt}from"./chunk-J4XRJAME.js";import{a as K,b as ht,c as ft,d as mt,e as gt,f as _t,g as bt}from"./chunk-JBSIAXM5.js";import"./chunk-GH5Z5SPB.js";import{a as Oe,p as st,r as lt,w as ct,x as rt}from"./chunk-67VPWIWW.js";import"./chunk-BHV2HCJY.js";import{$ as Xe,Ba as Je,E as Qe,Ea as Ye,J as Ne,Ja as Ze,Ma as et,N as Ue,Na as W,Oa as tt,R as We,S as le,Va as it,Y as je,a as Re,e as Ke,f as Ae,l as Be,o as He,oa as ce,ra as x,sa as M,ta as be,v as ze,wa as ye,y as qe}from"./chunk-FMVCTBCQ.js";import"./chunk-P3V7Z3A6.js";import"./chunk-VFEEFGWW.js";import"./chunk-F2X3VGZZ.js";import{F as $e,G as De,c as ge,e as Pe,f as N,g as Ge,h as _e,m as U}from"./chunk-B63BKC6F.js";import{Ab as he,Ac as Q,Bc as Me,Cb as m,Ga as P,Jb as y,Kb as r,Mc as T,Nb as fe,Ob as Z,Ub as d,Vb as u,Vc as V,Wb as F,Wc as me,X as de,Xb as D,Yb as R,Yc as G,Z as xe,Zb as ee,Zc as Le,_b as S,aa as Ie,ba as Te,c as pe,ca as Se,dc as v,ec as p,gb as c,ha as k,jc as E,kc as z,lc as C,mb as ue,mc as w,oa as Ve,pa as h,pc as te,qa as f,qc as b,rc as B,sc as ie,ta as ke,uc as Ee,vc as ne,wb as H,wc as oe,xb as Fe,xc as ae,yc as se,za as I,zc as q}from"./chunk-JP6RBSB3.js";import{a as g,b as _}from"./chunk-YQFG5XE2.js";var kt={data:[],count:0,meta:{filter:{pagination:1,pageSize:10,rolesID:null,text:""},options:{roles:[]}},filter:{pagination:1,pageSize:10,rolesID:null,text:""}},we=ht(_t(kt),bt("GroupStore"),ft(t=>({first:G(()=>(t.filter().pagination-1)*t.filter().pageSize+1),end:G(()=>Math.min(t.filter().pagination*t.filter().pageSize,t.count())),hasCheckedRows:G(()=>t.data().some(s=>s.checked)),checkedData:G(()=>t.data().filter(s=>s.checked).map(s=>s.id))})),gt(t=>{let s=k(re),e={setFilter(n){K(t,i=>_(g({},i),{filter:n}))},onRowSelect(n){K(t,i=>{let o=i.data.map(a=>a.id===n.id?_(g({},a),{checked:!0}):a);return _(g({},i),{data:o})})},onRowUnselect(n){K(t,i=>{let o=i.data.map(a=>a.id===n.id?_(g({},a),{checked:!1}):a);return _(g({},i),{data:o})})},onHeaderCheckboxToggle(n){K(t,i=>{let o=i.data.map(a=>_(g({},a),{checked:n}));return _(g({},i),{data:o})})},getGroupList:ve(pe(de(n=>s.getGroupList(n).pipe(Ce(i=>{K(t,o=>_(g({},o),{data:i.data,count:i.count}))},i=>{console.error("Error fetching group list:",i)}))))),getGroupLoader:ve(pe(de(()=>s.getGroupLoader().pipe(Ce({next:n=>{K(t,i=>_(g({},i),{meta:n,filter:n.filter})),e.getGroupList(t.filter)},error:n=>{console.error("Error fetching group loader:",n)}})))))};return e}),mt(t=>({onInit:()=>{t.getGroupLoader()}})));var Mt=t=>({$implicit:t});function Lt(t,s){t&1&&ee(0)}function Pt(t,s){if(t&1&&(D(0),m(1,Lt,1,0,"ng-container",8),R()),t&2){let e=p().$implicit,n=p();c(),r("ngTemplateOutlet",n.optionTemplate)("ngTemplateOutletContext",Q(2,Mt,e==null?null:e.option))}}function Gt(t,s){if(t&1&&(d(0,"span",9),b(1),u()),t&2){let e=p().$implicit,n=p();y("data-pc-section","text"),c(),B(n.getOptionLabelToRender(e))}}function $t(t,s){t&1&&F(0,"AngleRightIcon")}function Dt(t,s){}function Rt(t,s){t&1&&m(0,Dt,0,0,"ng-template")}function Kt(t,s){if(t&1&&(d(0,"span",10),m(1,$t,1,0,"AngleRightIcon",11)(2,Rt,1,0,null,12),u()),t&2){let e=p(2);y("data-pc-section","groupIcon"),c(),r("ngIf",!e.groupicon),c(),r("ngTemplateOutlet",e.groupicon)}}function At(t,s){if(t&1){let e=S();d(0,"p-cascadeselect-sub",13),v("onChange",function(i){h(e);let o=p(2);return f(o.onChange.emit(i))})("onFocusChange",function(i){h(e);let o=p(2);return f(o.onFocusChange.emit(i))})("onFocusEnterChange",function(i){h(e);let o=p(2);return f(o.onFocusEnterChange.emit(i))}),u()}if(t&2){let e=p().$implicit,n=p();r("role","group")("selectId",n.selectId)("focusedOptionId",n.focusedOptionId)("activeOptionPath",n.activeOptionPath)("options",n.getOptionGroupChildren(e))("optionLabel",n.optionLabel)("optionValue",n.optionValue)("level",n.level+1)("optionGroupLabel",n.optionGroupLabel)("optionGroupChildren",n.optionGroupChildren)("dirty",n.dirty)("optionTemplate",n.optionTemplate)}}function Bt(t,s){if(t&1){let e=S();d(0,"li",3)(1,"div",4),v("click",function(i){let o=h(e).$implicit,a=p();return f(a.onOptionClick(i,o))})("mouseenter",function(i){let o=h(e).$implicit,a=p();return f(a.onOptionMouseEnter(i,o))})("mousemove",function(i){let o=h(e).$implicit,a=p();return f(a.onOptionMouseMove(i,o))}),m(2,Pt,2,4,"ng-container",5)(3,Gt,2,2,"ng-template",null,0,T)(5,Kt,3,3,"span",6),u(),m(6,At,1,12,"p-cascadeselect-sub",7),u()}if(t&2){let e=s.$implicit,n=s.index,i=te(4),o=p();r("ngClass",o.getItemClass(e))("id",o.getOptionId(e)),y("aria-level",o.level+1)("aria-setsize",o.options.length)("data-pc-section","item")("aria-label",o.getOptionLabelToRender(e))("aria-selected",o.isOptionGroup(e)?void 0:o.isOptionSelected(e))("aria-posinset",n+1),c(),y("data-pc-section","content"),c(),r("ngIf",o.optionTemplate)("ngIfElse",i),c(3),r("ngIf",o.isOptionGroup(e)),c(),r("ngIf",o.isOptionGroup(e)&&o.isOptionActive(e))}}var Ht=["value"],zt=["option"],qt=["header"],Qt=["footer"],Nt=["triggericon"],Ut=["loadingicon"],Wt=["optiongroupicon"],jt=["clearicon"],Xt=["focusInput"],Jt=["container"],Yt=["panel"],Zt=["overlay"],ei=(t,s)=>({$implicit:t,placeholder:s}),ti=t=>({"p-cascadeselect-overlay p-component":!0,"p-cascadeselect-mobile-active":t});function ii(t,s){t&1&&ee(0)}function ni(t,s){if(t&1&&(D(0),m(1,ii,1,0,"ng-container",16),R()),t&2){let e=p();c(),r("ngTemplateOutlet",e.valueTemplate||e._valueTemplate)("ngTemplateOutletContext",Me(2,ei,e.value,e.placeholder))}}function oi(t,s){if(t&1&&b(0),t&2){let e=p();ie(" ",e.label()," ")}}function ai(t,s){if(t&1){let e=S();d(0,"TimesIcon",18),v("click",function(i){h(e);let o=p(2);return f(o.clear(i))}),u()}t&2&&y("data-pc-section","clearicon")("aria-hidden",!0)}function si(t,s){}function li(t,s){t&1&&m(0,si,0,0,"ng-template")}function ci(t,s){if(t&1){let e=S();d(0,"span",18),v("click",function(i){h(e);let o=p(2);return f(o.clear(i))}),m(1,li,1,0,null,19),u()}if(t&2){let e=p(2);y("data-pc-section","clearicon")("aria-hidden",!0),c(),r("ngTemplateOutlet",e.clearIconTemplate||e._clearIconTemplate)}}function ri(t,s){if(t&1&&(D(0),m(1,ai,1,2,"TimesIcon",17)(2,ci,2,3,"span",17),R()),t&2){let e=p();c(),r("ngIf",!e.clearIconTemplate&&!e._clearIconTemplate),c(),r("ngIf",e.clearIconTemplate||e._clearIconTemplate)}}function pi(t,s){t&1&&ee(0)}function di(t,s){if(t&1&&(D(0),m(1,pi,1,0,"ng-container",19),R()),t&2){let e=p(2);c(),r("ngTemplateOutlet",e.loadingIconTemplate||e._loadingIconTemplate)}}function ui(t,s){if(t&1&&F(0,"span",22),t&2){let e=p(3);r("ngClass","p-cascadeselect-loading-icon pi-spin "+e.loadingIcon)}}function hi(t,s){t&1&&F(0,"span",23),t&2&&Z("p-cascadeselect-loading-icon pi pi-spinner pi-spin")}function fi(t,s){if(t&1&&(D(0),m(1,ui,1,1,"span",20)(2,hi,1,2,"span",21),R()),t&2){let e=p(2);c(),r("ngIf",e.loadingIcon),c(),r("ngIf",!e.loadingIcon)}}function mi(t,s){if(t&1&&(D(0),m(1,di,2,1,"ng-container",12)(2,fi,3,2,"ng-container",12),R()),t&2){let e=p();c(),r("ngIf",e.loadingIconTemplate||e._loadingIconTemplate),c(),r("ngIf",!e.loadingIconTemplate&&!e._loadingIconTemplate)}}function gi(t,s){t&1&&F(0,"ChevronDownIcon",26),t&2&&r("styleClass","p-cascadeselect-dropdown-icon")}function _i(t,s){}function bi(t,s){t&1&&m(0,_i,0,0,"ng-template")}function yi(t,s){if(t&1&&(d(0,"span",27),m(1,bi,1,0,null,19),u()),t&2){let e=p(2);c(),r("ngTemplateOutlet",e.triggerIconTemplate||e._triggerIconTemplate)}}function Oi(t,s){if(t&1&&m(0,gi,1,1,"ChevronDownIcon",24)(1,yi,2,1,"span",25),t&2){let e=p();r("ngIf",!e.triggerIconTemplate&&!e._triggerIconTemplate),c(),r("ngIf",e.triggerIconTemplate||e._triggerIconTemplate)}}function vi(t,s){}function Ci(t,s){t&1&&m(0,vi,0,0,"ng-template")}function wi(t,s){}function xi(t,s){t&1&&m(0,wi,0,0,"ng-template")}function Ii(t,s){if(t&1){let e=S();d(0,"div",28,6),m(2,Ci,1,0,null,19),d(3,"div",29)(4,"p-cascadeselect-sub",30),v("onChange",function(i){h(e);let o=p();return f(o.onOptionClick(i))})("onFocusChange",function(i){h(e);let o=p();return f(o.onOptionMouseMove(i))})("onFocusEnterChange",function(i){h(e);let o=p();return f(o.onOptionMouseEnter(i))}),u()(),d(5,"span",14),b(6),u(),m(7,xi,1,0,null,19),u()}if(t&2){let e=p();Z(e.panelStyleClass),r("ngClass",Q(24,ti,e.queryMatches()))("ngStyle",e.panelStyle),y("data-pc-section","panel"),c(2),r("ngTemplateOutlet",e.headerTemplate||e._headerTemplate),c(),y("data-pc-section","wrapper"),c(),r("options",e.processedOptions)("selectId",e.id)("focusedOptionId",e.focused?e.focusedOptionId:void 0)("activeOptionPath",e.activeOptionPath())("optionLabel",e.optionLabel)("optionValue",e.optionValue)("level",0)("optionTemplate",e.optionTemplate||e._optionTemplate)("groupicon",e.groupIconTemplate||e.groupIconTemplate)("optionGroupLabel",e.optionGroupLabel)("optionGroupChildren",e.optionGroupChildren)("optionDisabled",e.optionDisabled)("root",!0)("dirty",e.dirty)("role","tree"),c(2),ie(" ",e.selectedMessageText," "),c(),r("ngTemplateOutlet",e.footerTemplate||e._footerTemplate)}}var Ti=({dt:t})=>`
1
+ import{a as re,b as Tt}from"./chunk-UEWFM35O.js";import{f as It}from"./chunk-EDCDR4RJ.js";import"./chunk-HHDFSN55.js";import{a as ut}from"./chunk-6ACYDH2N.js";import"./chunk-C2GO6SPF.js";import{a as ve,b as Ce}from"./chunk-O4QM64EH.js";import{d as vt,i as Ct,j as wt,k as xt}from"./chunk-EW3R2HAB.js";import"./chunk-OLOVFS3Y.js";import"./chunk-QCLAOAVG.js";import"./chunk-Q33XIUDN.js";import{a as nt}from"./chunk-PKN47FQE.js";import"./chunk-LRRVQSMI.js";import{a as Ot}from"./chunk-42UIGXWH.js";import"./chunk-NA5YXAMJ.js";import"./chunk-253IFSMV.js";import{a as ot}from"./chunk-QYXQYPHB.js";import"./chunk-FBEBMNVC.js";import"./chunk-6NGIQJIP.js";import"./chunk-YDEVG4CR.js";import{h as yt}from"./chunk-UYC454VQ.js";import{a as at}from"./chunk-C7LM5UCK.js";import{a as pt,b as dt}from"./chunk-J4XRJAME.js";import{a as K,b as ht,c as ft,d as mt,e as gt,f as _t,g as bt}from"./chunk-JBSIAXM5.js";import"./chunk-GH5Z5SPB.js";import{a as Oe,p as st,r as lt,w as ct,x as rt}from"./chunk-67VPWIWW.js";import"./chunk-BHV2HCJY.js";import{$ as Xe,Ba as Je,E as Qe,Ea as Ye,J as Ne,Ja as Ze,Ma as et,N as Ue,Na as W,Oa as tt,R as We,S as le,Va as it,Y as je,a as Re,e as Ke,f as Ae,l as Be,o as He,oa as ce,ra as x,sa as M,ta as be,v as ze,wa as ye,y as qe}from"./chunk-FMVCTBCQ.js";import"./chunk-ZGXJEG37.js";import"./chunk-VFEEFGWW.js";import"./chunk-F2X3VGZZ.js";import{F as $e,G as De,c as ge,e as Pe,f as N,g as Ge,h as _e,m as U}from"./chunk-B63BKC6F.js";import{Ab as he,Ac as Q,Bc as Me,Cb as m,Ga as P,Jb as y,Kb as r,Mc as T,Nb as fe,Ob as Z,Ub as d,Vb as u,Vc as V,Wb as F,Wc as me,X as de,Xb as D,Yb as R,Yc as G,Z as xe,Zb as ee,Zc as Le,_b as S,aa as Ie,ba as Te,c as pe,ca as Se,dc as v,ec as p,gb as c,ha as k,jc as E,kc as z,lc as C,mb as ue,mc as w,oa as Ve,pa as h,pc as te,qa as f,qc as b,rc as B,sc as ie,ta as ke,uc as Ee,vc as ne,wb as H,wc as oe,xb as Fe,xc as ae,yc as se,za as I,zc as q}from"./chunk-JP6RBSB3.js";import{a as g,b as _}from"./chunk-YQFG5XE2.js";var kt={data:[],count:0,meta:{filter:{pagination:1,pageSize:10,rolesID:null,text:""},options:{roles:[]}},filter:{pagination:1,pageSize:10,rolesID:null,text:""}},we=ht(_t(kt),bt("GroupStore"),ft(t=>({first:G(()=>(t.filter().pagination-1)*t.filter().pageSize+1),end:G(()=>Math.min(t.filter().pagination*t.filter().pageSize,t.count())),hasCheckedRows:G(()=>t.data().some(s=>s.checked)),checkedData:G(()=>t.data().filter(s=>s.checked).map(s=>s.id))})),gt(t=>{let s=k(re),e={setFilter(n){K(t,i=>_(g({},i),{filter:n}))},onRowSelect(n){K(t,i=>{let o=i.data.map(a=>a.id===n.id?_(g({},a),{checked:!0}):a);return _(g({},i),{data:o})})},onRowUnselect(n){K(t,i=>{let o=i.data.map(a=>a.id===n.id?_(g({},a),{checked:!1}):a);return _(g({},i),{data:o})})},onHeaderCheckboxToggle(n){K(t,i=>{let o=i.data.map(a=>_(g({},a),{checked:n}));return _(g({},i),{data:o})})},getGroupList:ve(pe(de(n=>s.getGroupList(n).pipe(Ce(i=>{K(t,o=>_(g({},o),{data:i.data,count:i.count}))},i=>{console.error("Error fetching group list:",i)}))))),getGroupLoader:ve(pe(de(()=>s.getGroupLoader().pipe(Ce({next:n=>{K(t,i=>_(g({},i),{meta:n,filter:n.filter})),e.getGroupList(t.filter)},error:n=>{console.error("Error fetching group loader:",n)}})))))};return e}),mt(t=>({onInit:()=>{t.getGroupLoader()}})));var Mt=t=>({$implicit:t});function Lt(t,s){t&1&&ee(0)}function Pt(t,s){if(t&1&&(D(0),m(1,Lt,1,0,"ng-container",8),R()),t&2){let e=p().$implicit,n=p();c(),r("ngTemplateOutlet",n.optionTemplate)("ngTemplateOutletContext",Q(2,Mt,e==null?null:e.option))}}function Gt(t,s){if(t&1&&(d(0,"span",9),b(1),u()),t&2){let e=p().$implicit,n=p();y("data-pc-section","text"),c(),B(n.getOptionLabelToRender(e))}}function $t(t,s){t&1&&F(0,"AngleRightIcon")}function Dt(t,s){}function Rt(t,s){t&1&&m(0,Dt,0,0,"ng-template")}function Kt(t,s){if(t&1&&(d(0,"span",10),m(1,$t,1,0,"AngleRightIcon",11)(2,Rt,1,0,null,12),u()),t&2){let e=p(2);y("data-pc-section","groupIcon"),c(),r("ngIf",!e.groupicon),c(),r("ngTemplateOutlet",e.groupicon)}}function At(t,s){if(t&1){let e=S();d(0,"p-cascadeselect-sub",13),v("onChange",function(i){h(e);let o=p(2);return f(o.onChange.emit(i))})("onFocusChange",function(i){h(e);let o=p(2);return f(o.onFocusChange.emit(i))})("onFocusEnterChange",function(i){h(e);let o=p(2);return f(o.onFocusEnterChange.emit(i))}),u()}if(t&2){let e=p().$implicit,n=p();r("role","group")("selectId",n.selectId)("focusedOptionId",n.focusedOptionId)("activeOptionPath",n.activeOptionPath)("options",n.getOptionGroupChildren(e))("optionLabel",n.optionLabel)("optionValue",n.optionValue)("level",n.level+1)("optionGroupLabel",n.optionGroupLabel)("optionGroupChildren",n.optionGroupChildren)("dirty",n.dirty)("optionTemplate",n.optionTemplate)}}function Bt(t,s){if(t&1){let e=S();d(0,"li",3)(1,"div",4),v("click",function(i){let o=h(e).$implicit,a=p();return f(a.onOptionClick(i,o))})("mouseenter",function(i){let o=h(e).$implicit,a=p();return f(a.onOptionMouseEnter(i,o))})("mousemove",function(i){let o=h(e).$implicit,a=p();return f(a.onOptionMouseMove(i,o))}),m(2,Pt,2,4,"ng-container",5)(3,Gt,2,2,"ng-template",null,0,T)(5,Kt,3,3,"span",6),u(),m(6,At,1,12,"p-cascadeselect-sub",7),u()}if(t&2){let e=s.$implicit,n=s.index,i=te(4),o=p();r("ngClass",o.getItemClass(e))("id",o.getOptionId(e)),y("aria-level",o.level+1)("aria-setsize",o.options.length)("data-pc-section","item")("aria-label",o.getOptionLabelToRender(e))("aria-selected",o.isOptionGroup(e)?void 0:o.isOptionSelected(e))("aria-posinset",n+1),c(),y("data-pc-section","content"),c(),r("ngIf",o.optionTemplate)("ngIfElse",i),c(3),r("ngIf",o.isOptionGroup(e)),c(),r("ngIf",o.isOptionGroup(e)&&o.isOptionActive(e))}}var Ht=["value"],zt=["option"],qt=["header"],Qt=["footer"],Nt=["triggericon"],Ut=["loadingicon"],Wt=["optiongroupicon"],jt=["clearicon"],Xt=["focusInput"],Jt=["container"],Yt=["panel"],Zt=["overlay"],ei=(t,s)=>({$implicit:t,placeholder:s}),ti=t=>({"p-cascadeselect-overlay p-component":!0,"p-cascadeselect-mobile-active":t});function ii(t,s){t&1&&ee(0)}function ni(t,s){if(t&1&&(D(0),m(1,ii,1,0,"ng-container",16),R()),t&2){let e=p();c(),r("ngTemplateOutlet",e.valueTemplate||e._valueTemplate)("ngTemplateOutletContext",Me(2,ei,e.value,e.placeholder))}}function oi(t,s){if(t&1&&b(0),t&2){let e=p();ie(" ",e.label()," ")}}function ai(t,s){if(t&1){let e=S();d(0,"TimesIcon",18),v("click",function(i){h(e);let o=p(2);return f(o.clear(i))}),u()}t&2&&y("data-pc-section","clearicon")("aria-hidden",!0)}function si(t,s){}function li(t,s){t&1&&m(0,si,0,0,"ng-template")}function ci(t,s){if(t&1){let e=S();d(0,"span",18),v("click",function(i){h(e);let o=p(2);return f(o.clear(i))}),m(1,li,1,0,null,19),u()}if(t&2){let e=p(2);y("data-pc-section","clearicon")("aria-hidden",!0),c(),r("ngTemplateOutlet",e.clearIconTemplate||e._clearIconTemplate)}}function ri(t,s){if(t&1&&(D(0),m(1,ai,1,2,"TimesIcon",17)(2,ci,2,3,"span",17),R()),t&2){let e=p();c(),r("ngIf",!e.clearIconTemplate&&!e._clearIconTemplate),c(),r("ngIf",e.clearIconTemplate||e._clearIconTemplate)}}function pi(t,s){t&1&&ee(0)}function di(t,s){if(t&1&&(D(0),m(1,pi,1,0,"ng-container",19),R()),t&2){let e=p(2);c(),r("ngTemplateOutlet",e.loadingIconTemplate||e._loadingIconTemplate)}}function ui(t,s){if(t&1&&F(0,"span",22),t&2){let e=p(3);r("ngClass","p-cascadeselect-loading-icon pi-spin "+e.loadingIcon)}}function hi(t,s){t&1&&F(0,"span",23),t&2&&Z("p-cascadeselect-loading-icon pi pi-spinner pi-spin")}function fi(t,s){if(t&1&&(D(0),m(1,ui,1,1,"span",20)(2,hi,1,2,"span",21),R()),t&2){let e=p(2);c(),r("ngIf",e.loadingIcon),c(),r("ngIf",!e.loadingIcon)}}function mi(t,s){if(t&1&&(D(0),m(1,di,2,1,"ng-container",12)(2,fi,3,2,"ng-container",12),R()),t&2){let e=p();c(),r("ngIf",e.loadingIconTemplate||e._loadingIconTemplate),c(),r("ngIf",!e.loadingIconTemplate&&!e._loadingIconTemplate)}}function gi(t,s){t&1&&F(0,"ChevronDownIcon",26),t&2&&r("styleClass","p-cascadeselect-dropdown-icon")}function _i(t,s){}function bi(t,s){t&1&&m(0,_i,0,0,"ng-template")}function yi(t,s){if(t&1&&(d(0,"span",27),m(1,bi,1,0,null,19),u()),t&2){let e=p(2);c(),r("ngTemplateOutlet",e.triggerIconTemplate||e._triggerIconTemplate)}}function Oi(t,s){if(t&1&&m(0,gi,1,1,"ChevronDownIcon",24)(1,yi,2,1,"span",25),t&2){let e=p();r("ngIf",!e.triggerIconTemplate&&!e._triggerIconTemplate),c(),r("ngIf",e.triggerIconTemplate||e._triggerIconTemplate)}}function vi(t,s){}function Ci(t,s){t&1&&m(0,vi,0,0,"ng-template")}function wi(t,s){}function xi(t,s){t&1&&m(0,wi,0,0,"ng-template")}function Ii(t,s){if(t&1){let e=S();d(0,"div",28,6),m(2,Ci,1,0,null,19),d(3,"div",29)(4,"p-cascadeselect-sub",30),v("onChange",function(i){h(e);let o=p();return f(o.onOptionClick(i))})("onFocusChange",function(i){h(e);let o=p();return f(o.onOptionMouseMove(i))})("onFocusEnterChange",function(i){h(e);let o=p();return f(o.onOptionMouseEnter(i))}),u()(),d(5,"span",14),b(6),u(),m(7,xi,1,0,null,19),u()}if(t&2){let e=p();Z(e.panelStyleClass),r("ngClass",Q(24,ti,e.queryMatches()))("ngStyle",e.panelStyle),y("data-pc-section","panel"),c(2),r("ngTemplateOutlet",e.headerTemplate||e._headerTemplate),c(),y("data-pc-section","wrapper"),c(),r("options",e.processedOptions)("selectId",e.id)("focusedOptionId",e.focused?e.focusedOptionId:void 0)("activeOptionPath",e.activeOptionPath())("optionLabel",e.optionLabel)("optionValue",e.optionValue)("level",0)("optionTemplate",e.optionTemplate||e._optionTemplate)("groupicon",e.groupIconTemplate||e.groupIconTemplate)("optionGroupLabel",e.optionGroupLabel)("optionGroupChildren",e.optionGroupChildren)("optionDisabled",e.optionDisabled)("root",!0)("dirty",e.dirty)("role","tree"),c(2),ie(" ",e.selectedMessageText," "),c(),r("ngTemplateOutlet",e.footerTemplate||e._footerTemplate)}}var Ti=({dt:t})=>`
2
2
  .p-cascadeselect {
3
3
  display: inline-flex;
4
4
  cursor: pointer;
@@ -1 +1 @@
1
- import"./chunk-YQFG5XE2.js";var t=[{path:"",redirectTo:"users",pathMatch:"full"},{path:"",children:[{path:"users",loadComponent:()=>import("./chunk-MXBBJHYA.js").then(o=>o.UserPageComponent)},{path:"groups",loadComponent:()=>import("./chunk-7EJVMM7V.js").then(o=>o.GroupPageComponent)},{path:"groups/forms",loadComponent:()=>import("./chunk-TT745CJN.js").then(o=>o.GroupFormComponent)}]}];export{t as USERS_ROUTES};
1
+ import"./chunk-YQFG5XE2.js";var t=[{path:"",redirectTo:"users",pathMatch:"full"},{path:"",children:[{path:"users",loadComponent:()=>import("./chunk-CMRVHYI7.js").then(o=>o.UserPageComponent)},{path:"groups",loadComponent:()=>import("./chunk-RQ4G322O.js").then(o=>o.GroupPageComponent)},{path:"groups/forms",loadComponent:()=>import("./chunk-SZ3LQIKH.js").then(o=>o.GroupFormComponent)}]}];export{t as USERS_ROUTES};
@@ -1 +1 @@
1
- import{a as r}from"./chunk-P3V7Z3A6.js";import{ba as i,ha as n}from"./chunk-JP6RBSB3.js";var u=(()=>{class e{constructor(){this.httpService=n(r)}getClosingEntries(t){return this.httpService.get(void 0,"api/SetupClosingEntries/GetAll",{params:t})}createClosingEntry(t){return this.httpService.post(void 0,"api/SetupClosingEntries/Submit",t)}deleteClosingEntry(t){return this.httpService.delete(void 0,`api/SetupClosingEntries/Delete?closingEntryIds=${t}`)}getClosingEntryCount(){return this.httpService.get(void 0,"api/SetupClosingEntries/GetAllCount")}static{this.\u0275fac=function(o){return new(o||e)}}static{this.\u0275prov=i({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();export{u as a};
1
+ import{a as r}from"./chunk-ZGXJEG37.js";import{ba as i,ha as n}from"./chunk-JP6RBSB3.js";var u=(()=>{class e{constructor(){this.httpService=n(r)}getClosingEntries(t){return this.httpService.get(void 0,"api/SetupClosingEntries/GetAll",{params:t})}createClosingEntry(t){return this.httpService.post(void 0,"api/SetupClosingEntries/Submit",t)}deleteClosingEntry(t){return this.httpService.delete(void 0,`api/SetupClosingEntries/Delete?closingEntryIds=${t}`)}getClosingEntryCount(){return this.httpService.get(void 0,"api/SetupClosingEntries/GetAllCount")}static{this.\u0275fac=function(o){return new(o||e)}}static{this.\u0275prov=i({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();export{u as a};
@@ -1 +1 @@
1
- import{a as Se,b as ke}from"./chunk-2BCAGP7R.js";import{a as ve,b as be,c as xe,d as ye,e as Ce,f as Fe}from"./chunk-EDCDR4RJ.js";import"./chunk-HHDFSN55.js";import{a as ge,b as he}from"./chunk-TVNXFJII.js";import{a as _e}from"./chunk-XKI7WLHE.js";import{a as ce}from"./chunk-6ACYDH2N.js";import"./chunk-C2GO6SPF.js";import"./chunk-Q33XIUDN.js";import{a as G}from"./chunk-XKCLERWG.js";import"./chunk-253IFSMV.js";import{a as re,b as ie}from"./chunk-FBEBMNVC.js";import"./chunk-YDEVG4CR.js";import{h as fe}from"./chunk-UYC454VQ.js";import{b as ue,c as de}from"./chunk-C7LM5UCK.js";import{a as me,b as se}from"./chunk-J4XRJAME.js";import"./chunk-JBSIAXM5.js";import"./chunk-GH5Z5SPB.js";import{n as ne,o as ae,w as le,x as pe}from"./chunk-67VPWIWW.js";import"./chunk-BHV2HCJY.js";import{b as H,c as J,e as K,f as Q,k as W,l as X,m as Y,n as Z,o as ee,v as te,y as oe}from"./chunk-FMVCTBCQ.js";import"./chunk-P3V7Z3A6.js";import"./chunk-VFEEFGWW.js";import"./chunk-F2X3VGZZ.js";import{D as U,F as L,c as $,e as j,f as q,m as z}from"./chunk-B63BKC6F.js";import{Ab as P,Ac as b,Cb as f,Ga as D,Kb as a,Mc as I,Nb as _,Ob as C,Qb as F,Qc as B,Sb as S,Tb as k,Ub as i,Vb as n,Wb as g,X as M,Z as y,_b as R,dc as V,ec as u,gb as r,ha as c,pa as E,qa as N,qc as h,rc as T,sc as O,ta as A,wb as w,zc as v}from"./chunk-JP6RBSB3.js";import"./chunk-YQFG5XE2.js";var Me=()=>({height:"calc(100vh - 70px)"}),Ee=t=>({"ng-invalid ng-dirty":t}),Te=t=>({"ps-0":t}),Ie=()=>({display:"flex"});function Ne(t,l){if(t&1){let e=R();i(0,"p-button",4),V("onClick",function(){E(e);let p=u(2);return N(p.onSubmit())}),n()}}function Ae(t,l){if(t&1&&f(0,Ne,1,0,"p-button",3),t&2){let e=u();a("ngIf",e.roleService.user.edit)}}function De(t,l){if(t&1&&(i(0,"div")(1,"span",16),h(2),n()()),t&2){let e=l.$implicit;r(2),T(e)}}function we(t,l){if(t&1&&(i(0,"div"),f(1,De,3,1,"div",15),n()),t&2){let e=u(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,Ie)),a("binary",!0),r(2),O(" ",e.get("name").value," ")}}function Re(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),S(8,Pe,5,7,"div",25,F),n()()()),t&2){let e=l.$implicit,o=l.$index,p=u(3);a("formGroupName",o),r(4),T(e.get("groupName").value),r(),_(v(5,Ie)),a("binary",!0),r(3),k(p.getRolesArray(o).controls)}}function Ve(t,l){if(t&1&&(i(0,"div",17),S(1,Re,10,6,"div",18,F),n()),t&2){let e=u(2);r(),k(e.rolesFormArray.controls)}}function Oe(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,we,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,Ve,3,0,"div",12),n()(),i(16,"p-tabpanel",10)(17,"div",13),g(18,"textarea",14),n()()()()()()),t&2){let e=u();_(v(13,Me)),r(3),a("formGroup",e.form),r(),a("fluid",!0)("ngClass",b(14,Ee,e.isInvalid("name"))),r(),a("ngIf",e.isInvalid("name")),r(3),C(b(16,Te,e.router.url.includes("forms"))),r(2),C(b(18,Te,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 gt=(()=>{class t extends _e{constructor(){super(...arguments),this.service=c(Se),this.fb=c(te),this.cdr=c(B),this.route=c(U),this.router=c(L),this.roleService=c(ce),this.form=this.fb.group({groupID:this.fb.control(""),name:this.fb.control("",[J.required]),description:this.fb.control(""),roles:this.fb.array([])}),this.groupFormMeta=D(null)}ngOnInit(){this.route.queryParamMap.pipe(M(e=>this.service.getGroupFormMeta(e.get("groupID")).pipe(G("Group form meta loaded"),y(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||"")}))),d=this.fb.group({groupName:this.fb.control(p.name),groupChecked:this.fb.control(!1),roles:s}),Ge=s.controls.every(m=>m.get("checked").value);d.get("groupChecked").setValue(Ge,{emitEvent:!1}),this.roleService.user.edit?d.get("groupChecked").enable():d.get("groupChecked").disable(),d.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);d.get("groupChecked").setValue(m,{emitEvent:!1})}),o.push(d)}),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(G("Group roles assigned successfully"),y(()=>{this.router.navigate(["/pages/users/groups"])})).subscribe(),console.log(e)}static{this.\u0275fac=(()=>{let e;return function(p){return(e||(e=A(t)))(p||t)}})()}static{this.\u0275cmp=w({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",3,"formGroupName"],[1,"col-2","border","d-flex","align-items-center","justify-content-between",2,"height","40px","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"],["formArrayName","roles",1,"row","h-100"],["tooltipPosition","top",1,"col-3","border","p-0","bg-white",3,"formGroupName","pTooltip"],[1,"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,Ae,1,1,"ng-template",null,0,I)(3,Oe,19,20,"ng-template",null,1,I),n()),o&2&&a("overflowScroll",!0)},dependencies:[fe,ie,re,oe,W,H,K,Q,X,ee,Y,Z,z,$,j,q,ae,ne,Fe,Ce,ye,xe,ve,be,he,ge,pe,le,ke,se,me,de,ue],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}"],changeDetection:0})}}return t})();export{gt as GroupFormComponent};
1
+ import{a as Se,b as ke}from"./chunk-UEWFM35O.js";import{a as ve,b as be,c as xe,d as ye,e as Ce,f as Fe}from"./chunk-EDCDR4RJ.js";import"./chunk-HHDFSN55.js";import{a as ge,b as he}from"./chunk-TVNXFJII.js";import{a as _e}from"./chunk-XKI7WLHE.js";import{a as ce}from"./chunk-6ACYDH2N.js";import"./chunk-C2GO6SPF.js";import"./chunk-Q33XIUDN.js";import{a as G}from"./chunk-XKCLERWG.js";import"./chunk-253IFSMV.js";import{a as re,b as ie}from"./chunk-FBEBMNVC.js";import"./chunk-YDEVG4CR.js";import{h as fe}from"./chunk-UYC454VQ.js";import{b as ue,c as de}from"./chunk-C7LM5UCK.js";import{a as me,b as se}from"./chunk-J4XRJAME.js";import"./chunk-JBSIAXM5.js";import"./chunk-GH5Z5SPB.js";import{n as ne,o as ae,w as le,x as pe}from"./chunk-67VPWIWW.js";import"./chunk-BHV2HCJY.js";import{b as H,c as J,e as K,f as Q,k as W,l as X,m as Y,n as Z,o as ee,v as te,y as oe}from"./chunk-FMVCTBCQ.js";import"./chunk-ZGXJEG37.js";import"./chunk-VFEEFGWW.js";import"./chunk-F2X3VGZZ.js";import{D as U,F as L,c as $,e as j,f as q,m as z}from"./chunk-B63BKC6F.js";import{Ab as P,Ac as b,Cb as f,Ga as D,Kb as a,Mc as I,Nb as _,Ob as C,Qb as F,Qc as B,Sb as S,Tb as k,Ub as i,Vb as n,Wb as g,X as M,Z as y,_b as R,dc as V,ec as u,gb as r,ha as c,pa as E,qa as N,qc as h,rc as T,sc as O,ta as A,wb as w,zc as v}from"./chunk-JP6RBSB3.js";import"./chunk-YQFG5XE2.js";var Me=()=>({height:"calc(100vh - 70px)"}),Ee=t=>({"ng-invalid ng-dirty":t}),Te=t=>({"ps-0":t}),Ie=()=>({display:"flex"});function Ne(t,l){if(t&1){let e=R();i(0,"p-button",4),V("onClick",function(){E(e);let p=u(2);return N(p.onSubmit())}),n()}}function Ae(t,l){if(t&1&&f(0,Ne,1,0,"p-button",3),t&2){let e=u();a("ngIf",e.roleService.user.edit)}}function De(t,l){if(t&1&&(i(0,"div")(1,"span",16),h(2),n()()),t&2){let e=l.$implicit;r(2),T(e)}}function we(t,l){if(t&1&&(i(0,"div"),f(1,De,3,1,"div",15),n()),t&2){let e=u(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,Ie)),a("binary",!0),r(2),O(" ",e.get("name").value," ")}}function Re(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),S(8,Pe,5,7,"div",25,F),n()()()),t&2){let e=l.$implicit,o=l.$index,p=u(3);a("formGroupName",o),r(4),T(e.get("groupName").value),r(),_(v(5,Ie)),a("binary",!0),r(3),k(p.getRolesArray(o).controls)}}function Ve(t,l){if(t&1&&(i(0,"div",17),S(1,Re,10,6,"div",18,F),n()),t&2){let e=u(2);r(),k(e.rolesFormArray.controls)}}function Oe(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,we,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,Ve,3,0,"div",12),n()(),i(16,"p-tabpanel",10)(17,"div",13),g(18,"textarea",14),n()()()()()()),t&2){let e=u();_(v(13,Me)),r(3),a("formGroup",e.form),r(),a("fluid",!0)("ngClass",b(14,Ee,e.isInvalid("name"))),r(),a("ngIf",e.isInvalid("name")),r(3),C(b(16,Te,e.router.url.includes("forms"))),r(2),C(b(18,Te,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 gt=(()=>{class t extends _e{constructor(){super(...arguments),this.service=c(Se),this.fb=c(te),this.cdr=c(B),this.route=c(U),this.router=c(L),this.roleService=c(ce),this.form=this.fb.group({groupID:this.fb.control(""),name:this.fb.control("",[J.required]),description:this.fb.control(""),roles:this.fb.array([])}),this.groupFormMeta=D(null)}ngOnInit(){this.route.queryParamMap.pipe(M(e=>this.service.getGroupFormMeta(e.get("groupID")).pipe(G("Group form meta loaded"),y(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||"")}))),d=this.fb.group({groupName:this.fb.control(p.name),groupChecked:this.fb.control(!1),roles:s}),Ge=s.controls.every(m=>m.get("checked").value);d.get("groupChecked").setValue(Ge,{emitEvent:!1}),this.roleService.user.edit?d.get("groupChecked").enable():d.get("groupChecked").disable(),d.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);d.get("groupChecked").setValue(m,{emitEvent:!1})}),o.push(d)}),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(G("Group roles assigned successfully"),y(()=>{this.router.navigate(["/pages/users/groups"])})).subscribe(),console.log(e)}static{this.\u0275fac=(()=>{let e;return function(p){return(e||(e=A(t)))(p||t)}})()}static{this.\u0275cmp=w({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",3,"formGroupName"],[1,"col-2","border","d-flex","align-items-center","justify-content-between",2,"height","40px","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"],["formArrayName","roles",1,"row","h-100"],["tooltipPosition","top",1,"col-3","border","p-0","bg-white",3,"formGroupName","pTooltip"],[1,"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,Ae,1,1,"ng-template",null,0,I)(3,Oe,19,20,"ng-template",null,1,I),n()),o&2&&a("overflowScroll",!0)},dependencies:[fe,ie,re,oe,W,H,K,Q,X,ee,Y,Z,z,$,j,q,ae,ne,Fe,Ce,ye,xe,ve,be,he,ge,pe,le,ke,se,me,de,ue],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}"],changeDetection:0})}}return t})();export{gt as GroupFormComponent};
@@ -1 +1 @@
1
- import{a as y,b as C,e as F,f as M}from"./chunk-EDCDR4RJ.js";import{b as T}from"./chunk-HHDFSN55.js";import{a as G}from"./chunk-P3V7Z3A6.js";import{F as L,G as S,m as U}from"./chunk-B63BKC6F.js";import{Ac as g,Kb as n,Ob as l,Sb as m,Tb as f,Ub as a,Vb as p,ba as c,ec as h,gb as s,ha as i,qc as v,rc as b,wb as d}from"./chunk-JP6RBSB3.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-EDCDR4RJ.js";import{b as T}from"./chunk-HHDFSN55.js";import{a as G}from"./chunk-ZGXJEG37.js";import{F as L,G as S,m as U}from"./chunk-B63BKC6F.js";import{Ac as g,Kb as n,Ob as l,Sb as m,Tb as f,Ub as a,Vb as p,ba as c,ec as h,gb as s,ha as i,qc as v,rc as b,wb as d}from"./chunk-JP6RBSB3.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};