dealposbarcode 26.46.2 → 26.46.4

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.
@@ -1 +1 @@
1
- import{t as i}from"./chunk-CKXRHkCI.js";import{t as h}from"./chunk-CyE7pq6Z.js";import{c as Sn,f as gr,h as qr,r as Ee}from"./chunk-DVmYwAhe.js";import"./chunk-CZtkF-WL.js";import"./chunk-DAfeU1o0.js";import{F as fh,K as oh,P as dh,S as Tl,X as sh,c as Hr,i as Fo,tt as vl}from"./chunk-CtdBLXrI.js";import{B as GI,Ci as zu,E,Ft as Rh,H as Gu,Hn as fl,Ot as QI,St as Pi,bt as Pb,gn as _h,ii as ub,m as Bh,or as iI,qr as ql,qt as Tw,u as Aw,yt as PD}from"./chunk-LD3k3Loy.js";function N(n,M){if(n&1){let e=Tw();Pi(0,`div`,3)(1,`p-button`,4),Bh(`onClick`,function(){Gu(e);let l=Aw();return zu(l.verifyAPICredential())}),fl(),Pi(2,`p-button`,5),Bh(`onClick`,function(){Gu(e);let l=Aw();return zu(l.onSubmit())}),fl()()}}function R(n,M){if(n&1&&(Pi(0,`p-panel`)(1,`div`,6)(2,`div`)(3,`h3`,7),ub(4,`Account`),fl(),Pi(5,`p`,8),ub(6,`Configure Client ID & Client Secret`),fl()(),Pi(7,`div`,9)(8,`div`,10)(9,`div`)(10,`label`,11),ub(11,`Client ID`),fl(),Pi(12,`input`,12),GI(),fl()()(),Pi(13,`div`,10)(14,`div`)(15,`label`,11),ub(16,`Client Secret`),fl(),Pi(17,`input`,13),GI(),fl()()()()()()),n&2){let e=Aw();iI(7),Rh(`formGroup`,e.form),iI(5),QI(),iI(5),QI()}}var Z=(()=>{class n{constructor(){this.fb=E(dh),this.setupUserService=E(h),this.toastr=E(Hr)}initForm(){this.form=this.fb.group({clientID:this.fb.control(``),clientSecret:this.fb.control(``)})}ngOnInit(){this.initForm(),this.setupUserService.getAPICredential().pipe(ql(e=>{this.form.patchValue({clientID:e.ClientID,clientSecret:e.ClientSecret})})).subscribe()}onSubmit(){if(this.form.invalid){this.form.markAllAsTouched();return}let e=this.form.getRawValue();this.setupUserService.submitAPICredential({ClientID:e.clientID,ClientSecret:e.clientSecret}).pipe(ql(()=>{this.toastr.success(`API Credential saved successfully`,`Success`)})).subscribe()}verifyAPICredential(){let e=this.form.getRawValue();this.setupUserService.verifyAPICredential(e).pipe(i(`response`),ql(r=>{this.toastr.success(r.Message,`Success`)})).subscribe()}static{this.ɵfac=function(r){return new(r||n)}}static{this.ɵcmp=PD({type:n,selectors:[[`app-credential`]],decls:5,vars:0,consts:[[`actionButton`,``],[`content`,``],[`pageTitle`,`API Credential`],[1,`d-flex`,`gap-2`,`justify-content-end`,`align-items-center`],[`label`,`Verify`,`severity`,`info`,3,`onClick`],[`label`,`Update`,`severity`,`info`,3,`onClick`],[1,`container-fluid`],[1,`fs-5`,`m-0`],[1,`fs-3`,`fst-italic`],[1,`row`,3,`formGroup`],[1,`col`],[`for`,``],[`formControlName`,`clientID`,`type`,`text`,`pInputText`,``,1,`form-control`],[`formControlName`,`clientSecret`,`type`,`text`,`pInputText`,``,1,`form-control`]],template:function(r,l){r&1&&(Pi(0,`app-main-panel`,2),_h(1,N,3,0,`ng-template`,null,0,Pb)(3,R,18,1,`ng-template`,null,1,Pb),fl())},dependencies:[gr,qr,Sn,Ee,fh,Fo,oh,sh,vl,Tl],encapsulation:2,changeDetection:1})}}return n})();export{Z as CredentialComponent};
1
+ import{t as i}from"./chunk-CKXRHkCI.js";import{t as h}from"./chunk-CyE7pq6Z.js";import{c as Sn,f as gr,h as qr,r as Ee}from"./chunk-CpMSXHia.js";import"./chunk-CZtkF-WL.js";import"./chunk-DAfeU1o0.js";import{F as fh,K as oh,P as dh,S as Tl,X as sh,c as Hr,i as Fo,tt as vl}from"./chunk-CtdBLXrI.js";import{B as GI,Ci as zu,E,Ft as Rh,H as Gu,Hn as fl,Ot as QI,St as Pi,bt as Pb,gn as _h,ii as ub,m as Bh,or as iI,qr as ql,qt as Tw,u as Aw,yt as PD}from"./chunk-LD3k3Loy.js";function N(n,M){if(n&1){let e=Tw();Pi(0,`div`,3)(1,`p-button`,4),Bh(`onClick`,function(){Gu(e);let l=Aw();return zu(l.verifyAPICredential())}),fl(),Pi(2,`p-button`,5),Bh(`onClick`,function(){Gu(e);let l=Aw();return zu(l.onSubmit())}),fl()()}}function R(n,M){if(n&1&&(Pi(0,`p-panel`)(1,`div`,6)(2,`div`)(3,`h3`,7),ub(4,`Account`),fl(),Pi(5,`p`,8),ub(6,`Configure Client ID & Client Secret`),fl()(),Pi(7,`div`,9)(8,`div`,10)(9,`div`)(10,`label`,11),ub(11,`Client ID`),fl(),Pi(12,`input`,12),GI(),fl()()(),Pi(13,`div`,10)(14,`div`)(15,`label`,11),ub(16,`Client Secret`),fl(),Pi(17,`input`,13),GI(),fl()()()()()()),n&2){let e=Aw();iI(7),Rh(`formGroup`,e.form),iI(5),QI(),iI(5),QI()}}var Z=(()=>{class n{constructor(){this.fb=E(dh),this.setupUserService=E(h),this.toastr=E(Hr)}initForm(){this.form=this.fb.group({clientID:this.fb.control(``),clientSecret:this.fb.control(``)})}ngOnInit(){this.initForm(),this.setupUserService.getAPICredential().pipe(ql(e=>{this.form.patchValue({clientID:e.ClientID,clientSecret:e.ClientSecret})})).subscribe()}onSubmit(){if(this.form.invalid){this.form.markAllAsTouched();return}let e=this.form.getRawValue();this.setupUserService.submitAPICredential({ClientID:e.clientID,ClientSecret:e.clientSecret}).pipe(ql(()=>{this.toastr.success(`API Credential saved successfully`,`Success`)})).subscribe()}verifyAPICredential(){let e=this.form.getRawValue();this.setupUserService.verifyAPICredential(e).pipe(i(`response`),ql(r=>{this.toastr.success(r.Message,`Success`)})).subscribe()}static{this.ɵfac=function(r){return new(r||n)}}static{this.ɵcmp=PD({type:n,selectors:[[`app-credential`]],decls:5,vars:0,consts:[[`actionButton`,``],[`content`,``],[`pageTitle`,`API Credential`],[1,`d-flex`,`gap-2`,`justify-content-end`,`align-items-center`],[`label`,`Verify`,`severity`,`info`,3,`onClick`],[`label`,`Update`,`severity`,`info`,3,`onClick`],[1,`container-fluid`],[1,`fs-5`,`m-0`],[1,`fs-3`,`fst-italic`],[1,`row`,3,`formGroup`],[1,`col`],[`for`,``],[`formControlName`,`clientID`,`type`,`text`,`pInputText`,``,1,`form-control`],[`formControlName`,`clientSecret`,`type`,`text`,`pInputText`,``,1,`form-control`]],template:function(r,l){r&1&&(Pi(0,`app-main-panel`,2),_h(1,N,3,0,`ng-template`,null,0,Pb)(3,R,18,1,`ng-template`,null,1,Pb),fl())},dependencies:[gr,qr,Sn,Ee,fh,Fo,oh,sh,vl,Tl],encapsulation:2,changeDetection:1})}}return n})();export{Z as CredentialComponent};
@@ -1,4 +1,4 @@
1
- import{a as ea,c as ra,i as _i,l as vi,n as Mt,o as ha,s as hl,t as Ai$1}from"./chunk-BTkPXAJR.js";import{l as xt,p as U,s as Wt}from"./main-Q45KL3O3.js";import{c as Sn,d as gn,g as ye,l as Ti,m as mn,p as jn,s as Ri,u as Wn}from"./chunk-DVmYwAhe.js";import{$ as gl,At as ze,Dt as yi,Et as wl,G as bl,H as _t,I as Wl,J as dl,L as Xi,Mt as zr,O as Su,Q as gd,Tt as wc,X as fe,Z as fl,_ as Hl,at as ks,b as Kr,bt as ul,c as Bl,d as Do$1,dt as qa$1,et as hd,f as El,ft as qu,g as Fs,h as Fo$1,jt as zl,kt as z,lt as nl,mt as rp,n as Aa,p as Eo$1,q as ct,r as Ac$1,s as At,st as md,t as $,ut as ol,vt as tu,w as Ol,wt as vu,z as Ze}from"./chunk-CZtkF-WL.js";import{K as oh,R as hh,U as le,Y as sc,it as xe,k as _l,o as Go$1,ot as xs}from"./chunk-CtdBLXrI.js";import{$ as Jw,$n as hb,B as GI,Ci as zu,Dr as ml,E,Er as mi,Fn as ee,Fr as od,Ft as Rh,H as Gu,Hn as fl$1,Jn as gi$1,Kn as fw,Lr as ov,Lt as Sb,Ot as QI,Pn as eb,Qn as gw,S as Db,Sr as lg,St as Pi,Ti as G,Tn as cg,Ut as Tg,V as Gh,Vn as fg,Vt as Tb,W as Hb,Wt as Th,X as Jh,Yn as gl$1,Yt as U1,_r as kh,_t as Ow,ai as ue,ar as hw,bi as zh,br as kw,bt as Pb,c as Ah,di as vw,ei as ti,en as Vw,er as hd$1,fr as jw,ft as O1,g as Br,gi as x,gn as _h,hn as _b,ht as Oh,ii as ub,it as Mb,j as F1,jr as mw,kn as dg,lt as Nb,m as Bh,nn as W1,on as Xi$1,or as iI,pr as k1,qn as gb,qt as Tw,tr as hg,tt as L1,u as Aw,ur as jD,vi as yw,vn as bb,vt as P1,w as Du,wi as F,wr as mb,xr as le$1,xt as Ph,yr as ko$1,yt as PD,z as GD}from"./chunk-LD3k3Loy.js";var $a=`
1
+ import{a as ea,c as ra,i as _i,l as vi,n as Mt,o as ha,s as hl,t as Ai$1}from"./chunk-2WAnOzGd.js";import{l as xt,p as U,s as Wt}from"./main-Q2MGVNT6.js";import{c as Sn,d as gn,g as ye,l as Ti,m as mn,p as jn,s as Ri,u as Wn}from"./chunk-CpMSXHia.js";import{$ as gl,At as ze,Dt as yi,Et as wl,G as bl,H as _t,I as Wl,J as dl,L as Xi,Mt as zr,O as Su,Q as gd,Tt as wc,X as fe,Z as fl,_ as Hl,at as ks,b as Kr,bt as ul,c as Bl,d as Do$1,dt as qa$1,et as hd,f as El,ft as qu,g as Fs,h as Fo$1,jt as zl,kt as z,lt as nl,mt as rp,n as Aa,p as Eo$1,q as ct,r as Ac$1,s as At,st as md,t as $,ut as ol,vt as tu,w as Ol,wt as vu,z as Ze}from"./chunk-CZtkF-WL.js";import{K as oh,R as hh,U as le,Y as sc,it as xe,k as _l,o as Go$1,ot as xs}from"./chunk-CtdBLXrI.js";import{$ as Jw,$n as hb,B as GI,Ci as zu,Dr as ml,E,Er as mi,Fn as ee,Fr as od,Ft as Rh,H as Gu,Hn as fl$1,Jn as gi$1,Kn as fw,Lr as ov,Lt as Sb,Ot as QI,Pn as eb,Qn as gw,S as Db,Sr as lg,St as Pi,Ti as G,Tn as cg,Ut as Tg,V as Gh,Vn as fg,Vt as Tb,W as Hb,Wt as Th,X as Jh,Yn as gl$1,Yt as U1,_r as kh,_t as Ow,ai as ue,ar as hw,bi as zh,br as kw,bt as Pb,c as Ah,di as vw,ei as ti,en as Vw,er as hd$1,fr as jw,ft as O1,g as Br,gi as x,gn as _h,hn as _b,ht as Oh,ii as ub,it as Mb,j as F1,jr as mw,kn as dg,lt as Nb,m as Bh,nn as W1,on as Xi$1,or as iI,pr as k1,qn as gb,qt as Tw,tr as hg,tt as L1,u as Aw,ur as jD,vi as yw,vn as bb,vt as P1,w as Du,wi as F,wr as mb,xr as le$1,xt as Ph,yr as ko$1,yt as PD,z as GD}from"./chunk-LD3k3Loy.js";var $a=`
2
2
  .p-datatable {
3
3
  position: relative;
4
4
  display: block;
@@ -1 +1 @@
1
- import{a as dj,s as vz}from"./chunk-Bt9WVrBi.js";import{b as Z$1,p as U,x as eu}from"./main-Q45KL3O3.js";import"./chunk-BUsg5rFD.js";import"./chunk-BTkPXAJR.js";import"./chunk-CKXRHkCI.js";import"./chunk-DVmYwAhe.js";import{Y as el}from"./chunk-CZtkF-WL.js";import"./chunk-DAfeU1o0.js";import{B as js,D as Xi,_ as Ps,at as xh,w as Us}from"./chunk-CtdBLXrI.js";import{Dr as ml,E,Ft as Rh,Gn as fs,Hn as fl,Kn as fw,St as Pi,Tn as cg,X as Jh,Xr as rm,ar as hw,bt as Pb,cr as it,di as vw,gn as _h,hr as kb,ht as Oh,ii as ub,jn as ds,mt as Ob,o as Ab,or as iI,pr as k1,qr as ql,u as Aw,vi as yw,yn as be,yt as PD}from"./chunk-LD3k3Loy.js";function J(t,c){if(t&1&&(Pi(0,`div`,2)(1,`span`),ub(2),fl(),Pi(3,`span`),ub(4),Ab(5,`number`),fl()(),Pi(6,`span`,2),ub(7),Ab(8,`date`),fl()),t&2){let e=Aw();Rh(`ngStyle`,e.stickerHeaderDesc1Style),iI(2),cg(e.priceLabelTemplate.CurrencySymbol),iI(2),cg(Ob(5,5,e.item().baseUnitPrice)),iI(2),Rh(`ngStyle`,e.stickerHeaderDesc2Style),iI(),ml(` sd `,kb(8,7,e.item().promotion.ExpirationDate,`dd-MM-yyyy`),` `)}}function K(t,c){if(t&1&&(Pi(0,`span`,2),ub(1),fl(),Pi(2,`span`,2),ub(3),Ab(4,`number`),fl()),t&2){let e=Aw();Jh(`font-size`,e.priceLabelTemplate.CurrencySymbolFontSize+`px`),Rh(`ngStyle`,e.stickerContentHeaderDesc1Style),iI(),ml(` `,e.priceLabelTemplate.CurrencySymbol,` `),iI(),Rh(`ngStyle`,e.stickerContentHeaderDesc2Style),iI(),ml(` `,Ob(4,6,e.item().effectiveUnitPrice),` `)}}function Q(t,c){if(t&1&&(Pi(0,`span`,2),ub(1),fl(),Pi(2,`span`,2),ub(3),Ab(4,`number`),fl()),t&2){let e=Aw();Jh(`font-size`,e.priceLabelTemplate.CurrencySymbolFontSize+`px`),Rh(`ngStyle`,e.stickerContentHeaderDesc1Style),iI(),ml(` `,e.priceLabelTemplate.CurrencySymbol,` `),iI(),Rh(`ngStyle`,e.stickerContentHeaderDesc2Style),iI(),ml(` `,Ob(4,6,e.item().effectiveUnitPrice),` `)}}function X(t,c){if(t&1&&(Pi(0,`span`,2),ub(1),fl(),Pi(2,`span`,2),ub(3),Ab(4,`number`),fl()),t&2){let e=Aw();Jh(`font-size`,e.priceLabelTemplate.CurrencySymbolFontSize+`px`),Rh(`ngStyle`,e.stickerContentHeaderDesc1Style),iI(),ml(` `,e.priceLabelTemplate.CurrencySymbol,` `),iI(),Rh(`ngStyle`,e.stickerContentHeaderDesc2Style),iI(),cg(Ob(4,6,e.item().baseUnitPrice))}}function Y(t,c){t&1&&(Pi(0,`span`),ub(1,`PROMOSI`),fl(),Pi(2,`span`),ub(3,`PROMOSI`),fl())}var q=(()=>{class t{constructor(){this.appStore=E(eu),this.item=k1(),this.printDate=/* @__PURE__ */ new Date}get priceLabelTemplate(){return this.appStore.priceLabelTemplate()||null}get stickerContainerStyles(){return{display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,gap:`10px`,width:`100%`,height:`100%`}}get stickerStyle(){return{width:`71mm`,overflow:`hidden`,border:`1px solid #000`,display:`flex`,flexDirection:`column`}}get stickerHeaderStyle(){return{padding:`0 4px`,display:`flex`,justifyContent:`space-between`,height:this.item().promotion?`max-content`:`20px`}}get stickerHeaderDesc1Style(){return this.priceLabelTemplate?{fontWeight:`600`,fontSize:`${this.priceLabelTemplate.PromotionDateFontSize}px`,textDecoration:this.item()?`line-through`:`none`}:{}}get stickerHeaderDesc2Style(){return this.priceLabelTemplate?{fontWeight:`600`,fontSize:`${this.priceLabelTemplate.PromotionDateFontSize}px`}:{}}get stickerContentStyle(){return{padding:`0 4px`,display:`flex`,flexDirection:`column`,flex:`1 1 0`}}get stickerContentHeaderStyle(){return{display:`flex`,justifyContent:`space-between`,alignItems:`flex-start`,lineHeight:`.8`}}get stickerContentHeaderDesc1Style(){return{fontWeight:`800`}}get stickerContentHeaderDesc2Style(){return{fontSize:`${this.priceLabelTemplate.NormalFontSize}px`,margin:`0`,padding:`0`,fontWeight:`800`}}get stickerContentBodyStyle(){return{display:`flex`,flexDirection:`column`,justifyContent:`space-between`,fontWeight:`600`}}get stickerContentBodyDesc1Style(){return{textAlign:`start`,fontSize:`${this.priceLabelTemplate.ProductNameFontSize}px`}}get stickerContentBodyDesc2Style(){return{textAlign:`start`,fontSize:`${this.priceLabelTemplate.ProductCodeFontSize}px`}}get stickerFooterStyle(){return{display:`flex`,flexDirection:`column`}}get stickerFooterHeaderStyle(){return{display:`flex`,justifyContent:`end`,padding:`0 4px`}}get stickerFooterHeaderDesc1Style(){return{fontWeight:`600`,textDecoration:`none`,fontSize:`${this.priceLabelTemplate.PrintDateFontSize}px`}}get stickerFooterBodyStyle(){return{backgroundColor:`#000`,color:`#fff`,display:`flex`,justifyContent:`space-between`,alignItems:`center`,padding:`2px 6px`,fontWeight:`600`}}get stickerFooterBodyDesc1Style(){return{display:`flex`,gap:`10px`,fontSize:`${this.priceLabelTemplate.PromotionDescFontSize}px`}}get stickerFooterBodyDesc2Style(){return{fontSize:`${this.priceLabelTemplate.StoreNameFontSize}px`}}promotionDiscount(e){try{return Object.keys(e).length?e.Discount&&e.Discount>0?e.UnitPrice-e.UnitPrice*e.Discount/100:e.UnitPrice:0}catch(o){throw new Error(`error: `+(o instanceof Error?o.message:String(o)))}}static{this.ɵfac=function(o){return new(o||t)}}static{this.ɵcmp=PD({type:t,selectors:[[`app-label-preview`]],inputs:{item:[1,`item`]},decls:23,vars:23,consts:[[`id`,`sticker`,1,`sticker`,3,`ngStyle`],[`id`,`sticker-header`,3,`ngStyle`],[3,`ngStyle`]],template:function(o,n){o&1&&(Pi(0,`div`,0)(1,`div`,1),fw(2,J,9,10),fl(),Pi(3,`div`,2)(4,`div`,2),fw(5,K,5,8)(6,Q,5,8)(7,X,5,8),fl(),Pi(8,`div`,2)(9,`span`,2),ub(10),fl(),Pi(11,`span`,2),ub(12),fl()()(),Pi(13,`div`,2)(14,`div`,2)(15,`span`,2),ub(16),Ab(17,`date`),fl()(),Pi(18,`div`,2)(19,`div`,2),fw(20,Y,4,0),fl(),Pi(21,`span`,2),ub(22),fl()()()()),o&2&&(Rh(`ngStyle`,n.stickerStyle),iI(),Rh(`ngStyle`,n.stickerHeaderStyle),iI(),hw(n.item().promotion?2:-1),iI(),Rh(`ngStyle`,n.stickerContentStyle),iI(),Rh(`ngStyle`,n.stickerContentHeaderStyle),iI(),hw(n.item().promotion?5:n.item().outletPrice?6:7),iI(3),Rh(`ngStyle`,n.stickerContentBodyStyle),iI(),Rh(`ngStyle`,n.stickerContentBodyDesc1Style),iI(),cg(n.item().product.Name),iI(),Rh(`ngStyle`,n.stickerContentBodyDesc2Style),iI(),cg(n.item().product.Code),iI(),Rh(`ngStyle`,n.stickerFooterStyle),iI(),Rh(`ngStyle`,n.stickerFooterHeaderStyle),iI(),Rh(`ngStyle`,n.stickerFooterHeaderDesc1Style),iI(),cg(kb(17,20,n.printDate,`dd-MM-yyyy`)),iI(2),Rh(`ngStyle`,n.stickerFooterBodyStyle),iI(),Rh(`ngStyle`,n.stickerFooterBodyDesc1Style),iI(),hw(n.item().promotion?20:-1),iI(),Rh(`ngStyle`,n.stickerFooterBodyDesc2Style),iI(),cg(n.priceLabelTemplate.CompanyNameLabel))},dependencies:[Xi,Ps,Us,js],encapsulation:2})}}return t})();var Z=(t,c)=>c.id;function ee(t,c){t&1&&Oh(0,`choose-product`)}function te(t,c){t&1&&Oh(0,`div`,4)}function ie(t,c){if(t&1&&(Oh(0,`app-label-preview`,3),fw(1,te,1,0,`div`,4)),t&2){let e=c.$implicit,o=c.$index,n=c.$count;Rh(`item`,e),iI(),hw(o!==n-1?1:-1)}}function ne(t,c){if(t&1&&(Pi(0,`div`,2),yw(1,ie,2,2,null,null,Z),fl()),t&2){let e=c.$implicit;iI(),vw(e)}}function re(t,c){t&1&&(Pi(0,`app-customize-label`,1),_h(1,ne,3,0,`ng-template`,null,0,Pb),fl())}var Pe=(()=>{class t{constructor(){this.store=E(el),this.appStore=E(eu),this.httpService=E(xh),this.destroyRef=E(be),this.routes=E(Z$1)}get printMode(){let e=this.routes.snapshot.queryParamMap.get(`printMode`);return console.log(`printMode`,e),e}get currentStep(){return this.appStore.currentStep()}ngOnInit(){this.store.onReset(),console.log(localStorage.getItem(`Domain`))}ngAfterViewInit(){let e=this.getHostFromDomain();this.loadInitialData(e)}getHostFromDomain(){let e=localStorage.getItem(`Domain`);return e?this.hasProtocol(e)?new URL(e).hostname:e:null}hasProtocol(e){return/^(https?):\/\//.test(e)}loadInitialData(e){if(!e){console.warn(`No domain found in localStorage`);return}let o=this.httpService.post(`api/ConfigShelf/PaperConfig`,{SubDomain:e}).pipe(fs(s=>ds({error:s}))),n=this.httpService.get(`/API/V3/Tax`,void 0,`https://${e}`).pipe(fs(s=>ds({error:s})));rm([o,n]).pipe(U(this.destroyRef),it(([s,D])=>this.normalizeResponses(s,D)),ql(({paperConfig:s,taxs:D})=>this.applyDataToStore(s,D))).subscribe()}normalizeResponses(e,o){let n=s=>s&&`error`in s;return{paperConfig:n(e)?null:e,taxs:n(o)?null:o}}applyDataToStore(e,o){e&&this.store.onChangeShelfLabelConfig(e),o&&this.store.onChangeTaxs(o)}static{this.ɵfac=function(o){return new(o||t)}}static{this.ɵcmp=PD({type:t,selectors:[[`app-price-label-wrapper`]],decls:2,vars:1,consts:[[`content`,``],[`sidebarConfig`,`label`],[1,`d-flex`,`flex-column`,`gap-2`],[3,`item`],[1,`divider`]],template:function(o,n){if(o&1&&fw(0,ee,1,0,`choose-product`)(1,re,3,0,`app-customize-label`,1),o&2){let s;hw((s=n.currentStep)===1?0:s===2?1:-1)}},dependencies:[vz,dj,q],styles:[`[_nghost-%COMP%]{display:block;height:100%}.divider[_ngcontent-%COMP%]{border:1px dashed #000;width:100%}`]})}}return t})();export{Pe as PriceLabelWrapperComponent};
1
+ import{a as dj,s as vz}from"./chunk-BqiKYBZB.js";import{b as Z$1,p as U,x as eu}from"./main-Q2MGVNT6.js";import"./chunk-BUsg5rFD.js";import"./chunk-2WAnOzGd.js";import"./chunk-CKXRHkCI.js";import"./chunk-CpMSXHia.js";import{Y as el}from"./chunk-CZtkF-WL.js";import"./chunk-DAfeU1o0.js";import{B as js,D as Xi,_ as Ps,at as xh,w as Us}from"./chunk-CtdBLXrI.js";import{Dr as ml,E,Ft as Rh,Gn as fs,Hn as fl,Kn as fw,St as Pi,Tn as cg,X as Jh,Xr as rm,ar as hw,bt as Pb,cr as it,di as vw,gn as _h,hr as kb,ht as Oh,ii as ub,jn as ds,mt as Ob,o as Ab,or as iI,pr as k1,qr as ql,u as Aw,vi as yw,yn as be,yt as PD}from"./chunk-LD3k3Loy.js";function J(t,c){if(t&1&&(Pi(0,`div`,2)(1,`span`),ub(2),fl(),Pi(3,`span`),ub(4),Ab(5,`number`),fl()(),Pi(6,`span`,2),ub(7),Ab(8,`date`),fl()),t&2){let e=Aw();Rh(`ngStyle`,e.stickerHeaderDesc1Style),iI(2),cg(e.priceLabelTemplate.CurrencySymbol),iI(2),cg(Ob(5,5,e.item().baseUnitPrice)),iI(2),Rh(`ngStyle`,e.stickerHeaderDesc2Style),iI(),ml(` sd `,kb(8,7,e.item().promotion.ExpirationDate,`dd-MM-yyyy`),` `)}}function K(t,c){if(t&1&&(Pi(0,`span`,2),ub(1),fl(),Pi(2,`span`,2),ub(3),Ab(4,`number`),fl()),t&2){let e=Aw();Jh(`font-size`,e.priceLabelTemplate.CurrencySymbolFontSize+`px`),Rh(`ngStyle`,e.stickerContentHeaderDesc1Style),iI(),ml(` `,e.priceLabelTemplate.CurrencySymbol,` `),iI(),Rh(`ngStyle`,e.stickerContentHeaderDesc2Style),iI(),ml(` `,Ob(4,6,e.item().effectiveUnitPrice),` `)}}function Q(t,c){if(t&1&&(Pi(0,`span`,2),ub(1),fl(),Pi(2,`span`,2),ub(3),Ab(4,`number`),fl()),t&2){let e=Aw();Jh(`font-size`,e.priceLabelTemplate.CurrencySymbolFontSize+`px`),Rh(`ngStyle`,e.stickerContentHeaderDesc1Style),iI(),ml(` `,e.priceLabelTemplate.CurrencySymbol,` `),iI(),Rh(`ngStyle`,e.stickerContentHeaderDesc2Style),iI(),ml(` `,Ob(4,6,e.item().effectiveUnitPrice),` `)}}function X(t,c){if(t&1&&(Pi(0,`span`,2),ub(1),fl(),Pi(2,`span`,2),ub(3),Ab(4,`number`),fl()),t&2){let e=Aw();Jh(`font-size`,e.priceLabelTemplate.CurrencySymbolFontSize+`px`),Rh(`ngStyle`,e.stickerContentHeaderDesc1Style),iI(),ml(` `,e.priceLabelTemplate.CurrencySymbol,` `),iI(),Rh(`ngStyle`,e.stickerContentHeaderDesc2Style),iI(),cg(Ob(4,6,e.item().baseUnitPrice))}}function Y(t,c){t&1&&(Pi(0,`span`),ub(1,`PROMOSI`),fl(),Pi(2,`span`),ub(3,`PROMOSI`),fl())}var q=(()=>{class t{constructor(){this.appStore=E(eu),this.item=k1(),this.printDate=/* @__PURE__ */ new Date}get priceLabelTemplate(){return this.appStore.priceLabelTemplate()||null}get stickerContainerStyles(){return{display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,gap:`10px`,width:`100%`,height:`100%`}}get stickerStyle(){return{width:`71mm`,overflow:`hidden`,border:`1px solid #000`,display:`flex`,flexDirection:`column`}}get stickerHeaderStyle(){return{padding:`0 4px`,display:`flex`,justifyContent:`space-between`,height:this.item().promotion?`max-content`:`20px`}}get stickerHeaderDesc1Style(){return this.priceLabelTemplate?{fontWeight:`600`,fontSize:`${this.priceLabelTemplate.PromotionDateFontSize}px`,textDecoration:this.item()?`line-through`:`none`}:{}}get stickerHeaderDesc2Style(){return this.priceLabelTemplate?{fontWeight:`600`,fontSize:`${this.priceLabelTemplate.PromotionDateFontSize}px`}:{}}get stickerContentStyle(){return{padding:`0 4px`,display:`flex`,flexDirection:`column`,flex:`1 1 0`}}get stickerContentHeaderStyle(){return{display:`flex`,justifyContent:`space-between`,alignItems:`flex-start`,lineHeight:`.8`}}get stickerContentHeaderDesc1Style(){return{fontWeight:`800`}}get stickerContentHeaderDesc2Style(){return{fontSize:`${this.priceLabelTemplate.NormalFontSize}px`,margin:`0`,padding:`0`,fontWeight:`800`}}get stickerContentBodyStyle(){return{display:`flex`,flexDirection:`column`,justifyContent:`space-between`,fontWeight:`600`}}get stickerContentBodyDesc1Style(){return{textAlign:`start`,fontSize:`${this.priceLabelTemplate.ProductNameFontSize}px`}}get stickerContentBodyDesc2Style(){return{textAlign:`start`,fontSize:`${this.priceLabelTemplate.ProductCodeFontSize}px`}}get stickerFooterStyle(){return{display:`flex`,flexDirection:`column`}}get stickerFooterHeaderStyle(){return{display:`flex`,justifyContent:`end`,padding:`0 4px`}}get stickerFooterHeaderDesc1Style(){return{fontWeight:`600`,textDecoration:`none`,fontSize:`${this.priceLabelTemplate.PrintDateFontSize}px`}}get stickerFooterBodyStyle(){return{backgroundColor:`#000`,color:`#fff`,display:`flex`,justifyContent:`space-between`,alignItems:`center`,padding:`2px 6px`,fontWeight:`600`}}get stickerFooterBodyDesc1Style(){return{display:`flex`,gap:`10px`,fontSize:`${this.priceLabelTemplate.PromotionDescFontSize}px`}}get stickerFooterBodyDesc2Style(){return{fontSize:`${this.priceLabelTemplate.StoreNameFontSize}px`}}promotionDiscount(e){try{return Object.keys(e).length?e.Discount&&e.Discount>0?e.UnitPrice-e.UnitPrice*e.Discount/100:e.UnitPrice:0}catch(o){throw new Error(`error: `+(o instanceof Error?o.message:String(o)))}}static{this.ɵfac=function(o){return new(o||t)}}static{this.ɵcmp=PD({type:t,selectors:[[`app-label-preview`]],inputs:{item:[1,`item`]},decls:23,vars:23,consts:[[`id`,`sticker`,1,`sticker`,3,`ngStyle`],[`id`,`sticker-header`,3,`ngStyle`],[3,`ngStyle`]],template:function(o,n){o&1&&(Pi(0,`div`,0)(1,`div`,1),fw(2,J,9,10),fl(),Pi(3,`div`,2)(4,`div`,2),fw(5,K,5,8)(6,Q,5,8)(7,X,5,8),fl(),Pi(8,`div`,2)(9,`span`,2),ub(10),fl(),Pi(11,`span`,2),ub(12),fl()()(),Pi(13,`div`,2)(14,`div`,2)(15,`span`,2),ub(16),Ab(17,`date`),fl()(),Pi(18,`div`,2)(19,`div`,2),fw(20,Y,4,0),fl(),Pi(21,`span`,2),ub(22),fl()()()()),o&2&&(Rh(`ngStyle`,n.stickerStyle),iI(),Rh(`ngStyle`,n.stickerHeaderStyle),iI(),hw(n.item().promotion?2:-1),iI(),Rh(`ngStyle`,n.stickerContentStyle),iI(),Rh(`ngStyle`,n.stickerContentHeaderStyle),iI(),hw(n.item().promotion?5:n.item().outletPrice?6:7),iI(3),Rh(`ngStyle`,n.stickerContentBodyStyle),iI(),Rh(`ngStyle`,n.stickerContentBodyDesc1Style),iI(),cg(n.item().product.Name),iI(),Rh(`ngStyle`,n.stickerContentBodyDesc2Style),iI(),cg(n.item().product.Code),iI(),Rh(`ngStyle`,n.stickerFooterStyle),iI(),Rh(`ngStyle`,n.stickerFooterHeaderStyle),iI(),Rh(`ngStyle`,n.stickerFooterHeaderDesc1Style),iI(),cg(kb(17,20,n.printDate,`dd-MM-yyyy`)),iI(2),Rh(`ngStyle`,n.stickerFooterBodyStyle),iI(),Rh(`ngStyle`,n.stickerFooterBodyDesc1Style),iI(),hw(n.item().promotion?20:-1),iI(),Rh(`ngStyle`,n.stickerFooterBodyDesc2Style),iI(),cg(n.priceLabelTemplate.CompanyNameLabel))},dependencies:[Xi,Ps,Us,js],encapsulation:2})}}return t})();var Z=(t,c)=>c.id;function ee(t,c){t&1&&Oh(0,`choose-product`)}function te(t,c){t&1&&Oh(0,`div`,4)}function ie(t,c){if(t&1&&(Oh(0,`app-label-preview`,3),fw(1,te,1,0,`div`,4)),t&2){let e=c.$implicit,o=c.$index,n=c.$count;Rh(`item`,e),iI(),hw(o!==n-1?1:-1)}}function ne(t,c){if(t&1&&(Pi(0,`div`,2),yw(1,ie,2,2,null,null,Z),fl()),t&2){let e=c.$implicit;iI(),vw(e)}}function re(t,c){t&1&&(Pi(0,`app-customize-label`,1),_h(1,ne,3,0,`ng-template`,null,0,Pb),fl())}var Pe=(()=>{class t{constructor(){this.store=E(el),this.appStore=E(eu),this.httpService=E(xh),this.destroyRef=E(be),this.routes=E(Z$1)}get printMode(){let e=this.routes.snapshot.queryParamMap.get(`printMode`);return console.log(`printMode`,e),e}get currentStep(){return this.appStore.currentStep()}ngOnInit(){this.store.onReset(),console.log(localStorage.getItem(`Domain`))}ngAfterViewInit(){let e=this.getHostFromDomain();this.loadInitialData(e)}getHostFromDomain(){let e=localStorage.getItem(`Domain`);return e?this.hasProtocol(e)?new URL(e).hostname:e:null}hasProtocol(e){return/^(https?):\/\//.test(e)}loadInitialData(e){if(!e){console.warn(`No domain found in localStorage`);return}let o=this.httpService.post(`api/ConfigShelf/PaperConfig`,{SubDomain:e}).pipe(fs(s=>ds({error:s}))),n=this.httpService.get(`/API/V3/Tax`,void 0,`https://${e}`).pipe(fs(s=>ds({error:s})));rm([o,n]).pipe(U(this.destroyRef),it(([s,D])=>this.normalizeResponses(s,D)),ql(({paperConfig:s,taxs:D})=>this.applyDataToStore(s,D))).subscribe()}normalizeResponses(e,o){let n=s=>s&&`error`in s;return{paperConfig:n(e)?null:e,taxs:n(o)?null:o}}applyDataToStore(e,o){e&&this.store.onChangeShelfLabelConfig(e),o&&this.store.onChangeTaxs(o)}static{this.ɵfac=function(o){return new(o||t)}}static{this.ɵcmp=PD({type:t,selectors:[[`app-price-label-wrapper`]],decls:2,vars:1,consts:[[`content`,``],[`sidebarConfig`,`label`],[1,`d-flex`,`flex-column`,`gap-2`],[3,`item`],[1,`divider`]],template:function(o,n){if(o&1&&fw(0,ee,1,0,`choose-product`)(1,re,3,0,`app-customize-label`,1),o&2){let s;hw((s=n.currentStep)===1?0:s===2?1:-1)}},dependencies:[vz,dj,q],styles:[`[_nghost-%COMP%]{display:block;height:100%}.divider[_ngcontent-%COMP%]{border:1px dashed #000;width:100%}`]})}}return t})();export{Pe as PriceLabelWrapperComponent};
@@ -1 +1 @@
1
- import{_ as W,b as Z,f as T,p as U,x as eu,y as Ya}from"./main-Q45KL3O3.js";import{i as ur,n as dr,r as mr,t as Ac}from"./chunk-ANgQsrxT.js";import{t as Ai}from"./chunk-BTkPXAJR.js";import{t as h}from"./chunk-CyE7pq6Z.js";import{f as gr,h as qr,n as An,r as Ee}from"./chunk-DVmYwAhe.js";import"./chunk-CZtkF-WL.js";import"./chunk-DAfeU1o0.js";import{F as fh,K as oh,P as dh,S as Tl,W as lh,X as sh,tt as vl}from"./chunk-CtdBLXrI.js";import{$ as Jw,$n as hb,B as GI,Ci as zu,E,Ft as Rh,G as He,Gn as fs,H as Gu,Hn as fl,Kn as fw,Ot as QI,Qr as sm,St as Pi,Ti as G,Tn as cg,Vn as fg,W as Hb,Xr as rm,ar as hw,bt as Pb,ei as ti,er as hd,fi as wb,gn as _h,ht as Oh,ii as ub,kn as dg,m as Bh,oi as ug,or as iI,qr as ql,qt as Tw,sr as im,u as Aw,wi as F,yn as be$1,yt as PD}from"./chunk-LD3k3Loy.js";var ge=()=>({width:`25rem`});var he=()=>({"min-width":`50rem`});function fe(n,u){if(n&1){let e=Tw();Pi(0,`p-button`,19),Bh(`onClick`,function(){Gu(e);let i=Aw(2);return zu(i.onDeleteUser())}),fl()}}function be(n,u){if(n&1){let e=Tw();Pi(0,`p-button`,20),Bh(`onClick`,function(){Gu(e);let i=Aw(2);return zu(i.openAddUser())}),fl()}}function Ce(n,u){if(n&1&&(Pi(0,`div`,16),fw(1,fe,1,0,`p-button`,17),fw(2,be,1,0,`p-button`,18),fl()),n&2){let e=Aw();iI(),hw(e.userChecked()&&e.userChecked().length>0?1:-1),iI(),hw(e.isUserAdmin?2:-1)}}function Ue(n,u){n&1&&(Pi(0,`th`,23),Oh(1,`p-table-header-checkbox`),fl())}function ye(n,u){if(n&1&&(Pi(0,`tr`),fw(1,Ue,2,0,`th`,23),Pi(2,`th`),ub(3,`Login ID`),fl(),Pi(4,`th`),ub(5,`Group`),fl()()),n&2){let e=Aw(3);iI(),hw(e.isUserAdmin?1:-1)}}function ve(n,u){if(n&1&&(Pi(0,`td`),Oh(1,`p-table-checkbox`,25),fl()),n&2){let e=Aw().$implicit;iI(),Rh(`value`,e)}}function Se(n,u){if(n&1){let e=Tw();Pi(0,`tr`),fw(1,ve,2,1,`td`),Pi(2,`td`)(3,`button`,24),Bh(`click`,function(){let i=Gu(e).$implicit,s=Aw(3);return zu(s.openEditUser(i.UserID))}),Pi(4,`span`),ub(5),fl()()(),Pi(6,`td`),ub(7),fl()()}if(n&2){let e=u.$implicit,t=Aw(3);iI(),hw(t.isUserAdmin?1:-1),iI(4),cg(e.Name),iI(2),cg(e.GroupName)}}function xe(n,u){if(n&1&&ub(0),n&2){let e=Aw(3);ug(` Showing `,e.displayStart(),` to `,e.displayEnd(),` of `,e.userCount(),` entries `)}}function we(n,u){if(n&1){let e=Tw();Pi(0,`p-table`,22),Bh(`onPage`,function(i){Gu(e);let s=Aw(2);return zu(s.pageChange(i))})(`onRowUnselect`,function(i){Gu(e);let s=Aw(2);return zu(s.onRowUnselect(i))})(`onRowSelect`,function(i){Gu(e);let s=Aw(2);return zu(s.onRowSelect(i))}),_h(1,ye,6,1,`ng-template`,null,3,Pb)(3,Se,8,3,`ng-template`,null,4,Pb)(5,xe,1,3,`ng-template`,null,5,Pb),fl()}if(n&2){let e=Aw(2);Rh(`lazy`,!0)(`paginator`,!0)(`rows`,e.rowsPerPage())(`first`,e.firstIndex())(`totalRecords`,e.userCount())(`value`,e.userList())(`tableStyle`,wb(7,he))}}function De(n,u){if(n&1&&(Pi(0,`p-panel`),fw(1,we,7,8,`p-table`,21),fl()),n&2){let e=Aw();iI(),hw(e.filter()?1:-1)}}function Fe(n,u){if(n&1){let e=Tw();Pi(0,`form`,8)(1,`div`,9)(2,`label`,10),ub(3,`Group`),fl(),Pi(4,`p-select`,12),GI(),fl()(),Pi(5,`div`,13)(6,`p-button`,14),Bh(`onClick`,function(){Gu(e);let i=Aw();return zu(i.onCloseFilterDialog())}),fl(),Pi(7,`p-button`,26),Bh(`onClick`,function(){Gu(e);let i=Aw();return zu(i.submitFilter())}),fl()()()}if(n&2){let e=Aw();Rh(`formGroup`,e.dialogFilterForm),iI(4),Rh(`options`,e.groupOptions()),QI()}}var Ye=(()=>{class n{constructor(){this.dialogFilterVisible=ti(!1),this.userList=ti([]),this.groupOptions=ti([]),this.userOptions=ti([]),this.userChecked=ti([]),this.dialogVisible=ti(!1),this.dialogMode=ti(null),this.querySearch=ti(``),this.filter=ti(null),this.userCount=ti(0),this.firstIndex=ti(0),this.rowsPerPage=ti(10),this.displayStart=Hb(()=>{let e=this.userCount();return e===0?0:Math.min(this.firstIndex()+1,e)}),this.displayEnd=Hb(()=>Math.min(this.firstIndex()+this.rowsPerPage(),this.userCount())),this.setupUsersService=E(h),this.fb=E(dh),this.route=E(Z),this.router=E(W),this.destroyRef=E(be$1),this.appStore=E(eu),this.initForm(),this.loadUsers(),this.loadOptions(),this.listenRouteState(),hd(()=>{let e=Object.fromEntries(Object.entries(this.filter()??{}).filter(([t,i])=>i!==Ya));this.loadUsers(e)}),T(this.querySearch).pipe(im(300),sm(),U(this.destroyRef)).subscribe(e=>{this.firstIndex.set(0),this.filter.update(t=>t&&G(F({},t),{Name:e?.trim()?e.trim():`00000000-0000-0000-0000-000000000000`,PageNumber:1}))})}get isUserAdmin(){return this.appStore.userRole()===`admin`}initForm(){this.inviteUserForm=this.fb.group({UserID:this.fb.control(null),GroupID:this.fb.control(null)}),this.dialogFilterForm=this.fb.group({GroupID:this.fb.control(null)})}loadUsers(e){this.setupUsersService.getUserList(e).pipe(ql(t=>{this.userList.set(t.Data),this.userCount.set(t.Count)}),fs(t=>(this.userList.set([]),this.userCount.set(0),He)),U(this.destroyRef)).subscribe()}submitFilter(){if(this.dialogFilterForm.invalid){this.dialogFilterForm.markAllAsTouched();return}let e=this.dialogFilterForm.getRawValue();this.filter.update(t=>t&&G(F({},t),{GroupID:e.GroupID||`00000000-0000-0000-0000-000000000000`,PageNumber:1})),this.dialogFilterVisible.set(!1)}pageChange(e){console.log(e),this.firstIndex.set(e.first??0),this.rowsPerPage.set(e.rows??this.rowsPerPage());let t=(e.first??0)/(e.rows??this.rowsPerPage())+1;this.filter.update(i=>i&&G(F({},i),{PageNumber:t}))}loadOptions(){let e=this.route.snapshot.queryParamMap.has(`id`)?{ID:this.route.snapshot.queryParamMap.get(`id`)||``}:{};rm([this.setupUsersService.getUserListLoader1(),this.setupUsersService.getUserListLoader2(e)]).pipe(ql(([t,i])=>{this.filter.update(()=>G(F({},t.Filter),{Name:t.Filter.Name||`00000000-0000-0000-0000-000000000000`,GroupID:t.Filter.GroupID||`00000000-0000-0000-0000-000000000000`})),this.groupOptions.set(t.Options),this.userOptions.set(i.Data);let s=t.Filter.PageSize??this.rowsPerPage(),f=t.Filter.PageNumber??1;this.rowsPerPage.set(s),this.firstIndex.set((f-1)*s)}),U(this.destroyRef)).subscribe()}listenRouteState(){this.route.queryParamMap.pipe(ql(e=>{let t=e.get(`dialog`),i=e.get(`id`);if(t===`create`){this.dialogMode.update(s=>`create`),this.dialogVisible.update(s=>!0);return}if(t===`edit`&&i){this.dialogMode.update(s=>`edit`),this.dialogVisible.update(s=>!0),this.handleUserEdit(i);return}this.dialogVisible.update(s=>!1),this.dialogMode.update(s=>null)})).subscribe()}openAddUser(){this.router.navigate([],{queryParams:{dialog:`create`},queryParamsHandling:`merge`})}openEditUser(e){this.router.navigate([],{queryParams:{dialog:`edit`,id:e},queryParamsHandling:`merge`})}closeModal(){this.router.navigate([],{queryParams:{dialog:null,id:null},queryParamsHandling:`merge`}),this.inviteUserForm.reset(),this.inviteUserForm.controls.UserID.enable({emitEvent:!1})}resetModalState(){this.dialogMode.update(e=>null),this.inviteUserForm.reset()}onSubmit(){if(this.inviteUserForm.invalid){this.inviteUserForm.markAllAsTouched();return}let e=this.inviteUserForm.getRawValue();(this.dialogMode()===`edit`?this.setupUsersService.updateUser(e.UserID,e.GroupID):this.setupUsersService.inviteUser(e)).pipe(ql(()=>{this.loadUsers(),this.closeModal(),this.userChecked.set([]),this.inviteUserForm.reset(),this.inviteUserForm.controls.UserID.enable({emitEvent:!1})}),U(this.destroyRef)).subscribe()}onDeleteUser(){this.setupUsersService.deleteUser(this.userChecked()).pipe(ql(()=>{this.loadUsers(),this.userChecked.set([])}),U(this.destroyRef)).subscribe()}handleUserEdit(e){this.inviteUserForm.reset(),this.setupUsersService.getUserByID(e).pipe(ql(t=>{this.loadOptions(),this.inviteUserForm.controls.UserID.disable({emitEvent:!1}),this.isUserAdmin||this.inviteUserForm.controls.GroupID.disable({emitEvent:!1}),this.inviteUserForm.patchValue({UserID:t.UserID,GroupID:t.GroupID})}),U(this.destroyRef)).subscribe()}onCloseFilterDialog(){this.dialogFilterVisible.set(!1)}onRowSelect(e){let t=e.data.UserID;this.userChecked().includes(t)||this.userChecked.update(i=>[...i,t])}onRowUnselect(e){if(`UserID`in e.data){let t=e.data?.UserID;if(!t)return;this.userChecked.update(i=>i.filter(s=>s!==t))}}static{this.ɵfac=function(t){return new(t||n)}}static{this.ɵcmp=PD({type:n,selectors:[[`app-users`]],decls:20,vars:14,consts:[[`actionButton`,``],[`content`,``],[`filterDialog`,``],[`header`,``],[`body`,``],[`paginatorleft`,``],[`pageTitle`,`Users`,3,`dialogFilterVisibleChange`,`querySearchChange`,`searchable`,`filterable`,`dialogFilterVisible`,`querySearch`],[`appendTo`,`body`,3,`visibleChange`,`onHide`,`header`,`modal`,`visible`],[1,`d-flex`,`flex-column`,`gap-4`,3,`formGroup`],[1,`form-group`,`d-flex`,`flex-column`,`gap-1`],[`for`,``],[`filter`,``,`filterBy`,`LoginID`,`formControlName`,`UserID`,`appendTo`,`body`,`optionLabel`,`LoginID`,`optionValue`,`ID`,`placeholder`,`Select a User`,3,`options`],[`showClear`,``,`filter`,``,`filterBy`,`Name`,`formControlName`,`GroupID`,`appendTo`,`body`,`optionLabel`,`Name`,`optionValue`,`ID`,`placeholder`,`Select a Group`,3,`options`],[1,`d-flex`,`justify-content-end`,`gap-2`],[`label`,`Cancel`,`outlined`,``,`severity`,`secondary`,3,`onClick`],[`severity`,`info`,`label`,`Save`,3,`onClick`,`disabled`],[1,`d-flex`,`gap-2`,`justify-content-end`,`align-items-center`],[`label`,`Delete`],[`severity`,`info`,`label`,`Invite`],[`label`,`Delete`,3,`onClick`],[`severity`,`info`,`label`,`Invite`,3,`onClick`],[`dataKey`,`UserID`,3,`lazy`,`paginator`,`rows`,`first`,`totalRecords`,`value`,`tableStyle`],[`dataKey`,`UserID`,3,`onPage`,`onRowUnselect`,`onRowSelect`,`lazy`,`paginator`,`rows`,`first`,`totalRecords`,`value`,`tableStyle`],[2,`width`,`4rem`],[1,`btn`,`btn-link`,`link-primary`,`link-underline-opacity-0`,3,`click`],[3,`value`],[`severity`,`info`,`label`,`Apply`,3,`onClick`]],template:function(t,i){if(t&1){let s=Tw();Pi(0,`app-main-panel`,6),fg(`dialogFilterVisibleChange`,function(c){return Gu(s),hb(i.dialogFilterVisible,c)||(i.dialogFilterVisible=c),zu(c)})(`querySearchChange`,function(c){return Gu(s),hb(i.querySearch,c)||(i.querySearch=c),zu(c)}),_h(1,Ce,3,2,`ng-template`,null,0,Pb)(3,De,2,1,`ng-template`,null,1,Pb)(5,Fe,8,2,`ng-template`,null,2,Pb),fl(),Pi(7,`p-dialog`,7),fg(`visibleChange`,function(c){return Gu(s),hb(i.dialogVisible,c)||(i.dialogVisible=c),zu(c)}),Bh(`onHide`,function(){return i.closeModal()}),Pi(8,`form`,8)(9,`div`,9)(10,`label`,10),ub(11,`User`),fl(),Pi(12,`p-select`,11),GI(),fl()(),Pi(13,`div`,9)(14,`label`,10),ub(15,`Group`),fl(),Pi(16,`p-select`,12),GI(),fl()(),Pi(17,`div`,13)(18,`p-button`,14),Bh(`onClick`,function(){return i.closeModal()}),fl(),Pi(19,`p-button`,15),Bh(`onClick`,function(){return i.onSubmit()}),fl()()()()}t&2&&(Rh(`searchable`,!0)(`filterable`,!0),dg(`dialogFilterVisible`,i.dialogFilterVisible)(`querySearch`,i.querySearch),iI(7),Jw(wb(13,ge)),Rh(`header`,i.dialogMode()===`edit`?`Edit User`:`Invite User`)(`modal`,!0),dg(`visible`,i.dialogVisible),iI(),Rh(`formGroup`,i.inviteUserForm),iI(4),Rh(`options`,i.userOptions()),QI(),iI(4),Rh(`options`,i.groupOptions()),QI(),iI(3),Rh(`disabled`,!i.isUserAdmin))},dependencies:[gr,Ac,dr,ur,mr,qr,Ee,An,Ai,fh,lh,oh,sh,vl,Tl],styles:[`.p-datatable .p-datatable-thead tr th{background-color:#f6f6f6!important}`],changeDetection:1})}}return n})();export{Ye as UsersComponent};
1
+ import{_ as W,b as Z,f as T,p as U,x as eu,y as Ya}from"./main-Q2MGVNT6.js";import{i as ur,n as dr,r as mr,t as Ac}from"./chunk-DgvU-8oj.js";import{t as Ai}from"./chunk-2WAnOzGd.js";import{t as h}from"./chunk-CyE7pq6Z.js";import{f as gr,h as qr,n as An,r as Ee}from"./chunk-CpMSXHia.js";import"./chunk-CZtkF-WL.js";import"./chunk-DAfeU1o0.js";import{F as fh,K as oh,P as dh,S as Tl,W as lh,X as sh,tt as vl}from"./chunk-CtdBLXrI.js";import{$ as Jw,$n as hb,B as GI,Ci as zu,E,Ft as Rh,G as He,Gn as fs,H as Gu,Hn as fl,Kn as fw,Ot as QI,Qr as sm,St as Pi,Ti as G,Tn as cg,Vn as fg,W as Hb,Xr as rm,ar as hw,bt as Pb,ei as ti,er as hd,fi as wb,gn as _h,ht as Oh,ii as ub,kn as dg,m as Bh,oi as ug,or as iI,qr as ql,qt as Tw,sr as im,u as Aw,wi as F,yn as be$1,yt as PD}from"./chunk-LD3k3Loy.js";var ge=()=>({width:`25rem`});var he=()=>({"min-width":`50rem`});function fe(n,u){if(n&1){let e=Tw();Pi(0,`p-button`,19),Bh(`onClick`,function(){Gu(e);let i=Aw(2);return zu(i.onDeleteUser())}),fl()}}function be(n,u){if(n&1){let e=Tw();Pi(0,`p-button`,20),Bh(`onClick`,function(){Gu(e);let i=Aw(2);return zu(i.openAddUser())}),fl()}}function Ce(n,u){if(n&1&&(Pi(0,`div`,16),fw(1,fe,1,0,`p-button`,17),fw(2,be,1,0,`p-button`,18),fl()),n&2){let e=Aw();iI(),hw(e.userChecked()&&e.userChecked().length>0?1:-1),iI(),hw(e.isUserAdmin?2:-1)}}function Ue(n,u){n&1&&(Pi(0,`th`,23),Oh(1,`p-table-header-checkbox`),fl())}function ye(n,u){if(n&1&&(Pi(0,`tr`),fw(1,Ue,2,0,`th`,23),Pi(2,`th`),ub(3,`Login ID`),fl(),Pi(4,`th`),ub(5,`Group`),fl()()),n&2){let e=Aw(3);iI(),hw(e.isUserAdmin?1:-1)}}function ve(n,u){if(n&1&&(Pi(0,`td`),Oh(1,`p-table-checkbox`,25),fl()),n&2){let e=Aw().$implicit;iI(),Rh(`value`,e)}}function Se(n,u){if(n&1){let e=Tw();Pi(0,`tr`),fw(1,ve,2,1,`td`),Pi(2,`td`)(3,`button`,24),Bh(`click`,function(){let i=Gu(e).$implicit,s=Aw(3);return zu(s.openEditUser(i.UserID))}),Pi(4,`span`),ub(5),fl()()(),Pi(6,`td`),ub(7),fl()()}if(n&2){let e=u.$implicit,t=Aw(3);iI(),hw(t.isUserAdmin?1:-1),iI(4),cg(e.Name),iI(2),cg(e.GroupName)}}function xe(n,u){if(n&1&&ub(0),n&2){let e=Aw(3);ug(` Showing `,e.displayStart(),` to `,e.displayEnd(),` of `,e.userCount(),` entries `)}}function we(n,u){if(n&1){let e=Tw();Pi(0,`p-table`,22),Bh(`onPage`,function(i){Gu(e);let s=Aw(2);return zu(s.pageChange(i))})(`onRowUnselect`,function(i){Gu(e);let s=Aw(2);return zu(s.onRowUnselect(i))})(`onRowSelect`,function(i){Gu(e);let s=Aw(2);return zu(s.onRowSelect(i))}),_h(1,ye,6,1,`ng-template`,null,3,Pb)(3,Se,8,3,`ng-template`,null,4,Pb)(5,xe,1,3,`ng-template`,null,5,Pb),fl()}if(n&2){let e=Aw(2);Rh(`lazy`,!0)(`paginator`,!0)(`rows`,e.rowsPerPage())(`first`,e.firstIndex())(`totalRecords`,e.userCount())(`value`,e.userList())(`tableStyle`,wb(7,he))}}function De(n,u){if(n&1&&(Pi(0,`p-panel`),fw(1,we,7,8,`p-table`,21),fl()),n&2){let e=Aw();iI(),hw(e.filter()?1:-1)}}function Fe(n,u){if(n&1){let e=Tw();Pi(0,`form`,8)(1,`div`,9)(2,`label`,10),ub(3,`Group`),fl(),Pi(4,`p-select`,12),GI(),fl()(),Pi(5,`div`,13)(6,`p-button`,14),Bh(`onClick`,function(){Gu(e);let i=Aw();return zu(i.onCloseFilterDialog())}),fl(),Pi(7,`p-button`,26),Bh(`onClick`,function(){Gu(e);let i=Aw();return zu(i.submitFilter())}),fl()()()}if(n&2){let e=Aw();Rh(`formGroup`,e.dialogFilterForm),iI(4),Rh(`options`,e.groupOptions()),QI()}}var Ye=(()=>{class n{constructor(){this.dialogFilterVisible=ti(!1),this.userList=ti([]),this.groupOptions=ti([]),this.userOptions=ti([]),this.userChecked=ti([]),this.dialogVisible=ti(!1),this.dialogMode=ti(null),this.querySearch=ti(``),this.filter=ti(null),this.userCount=ti(0),this.firstIndex=ti(0),this.rowsPerPage=ti(10),this.displayStart=Hb(()=>{let e=this.userCount();return e===0?0:Math.min(this.firstIndex()+1,e)}),this.displayEnd=Hb(()=>Math.min(this.firstIndex()+this.rowsPerPage(),this.userCount())),this.setupUsersService=E(h),this.fb=E(dh),this.route=E(Z),this.router=E(W),this.destroyRef=E(be$1),this.appStore=E(eu),this.initForm(),this.loadUsers(),this.loadOptions(),this.listenRouteState(),hd(()=>{let e=Object.fromEntries(Object.entries(this.filter()??{}).filter(([t,i])=>i!==Ya));this.loadUsers(e)}),T(this.querySearch).pipe(im(300),sm(),U(this.destroyRef)).subscribe(e=>{this.firstIndex.set(0),this.filter.update(t=>t&&G(F({},t),{Name:e?.trim()?e.trim():`00000000-0000-0000-0000-000000000000`,PageNumber:1}))})}get isUserAdmin(){return this.appStore.userRole()===`admin`}initForm(){this.inviteUserForm=this.fb.group({UserID:this.fb.control(null),GroupID:this.fb.control(null)}),this.dialogFilterForm=this.fb.group({GroupID:this.fb.control(null)})}loadUsers(e){this.setupUsersService.getUserList(e).pipe(ql(t=>{this.userList.set(t.Data),this.userCount.set(t.Count)}),fs(t=>(this.userList.set([]),this.userCount.set(0),He)),U(this.destroyRef)).subscribe()}submitFilter(){if(this.dialogFilterForm.invalid){this.dialogFilterForm.markAllAsTouched();return}let e=this.dialogFilterForm.getRawValue();this.filter.update(t=>t&&G(F({},t),{GroupID:e.GroupID||`00000000-0000-0000-0000-000000000000`,PageNumber:1})),this.dialogFilterVisible.set(!1)}pageChange(e){console.log(e),this.firstIndex.set(e.first??0),this.rowsPerPage.set(e.rows??this.rowsPerPage());let t=(e.first??0)/(e.rows??this.rowsPerPage())+1;this.filter.update(i=>i&&G(F({},i),{PageNumber:t}))}loadOptions(){let e=this.route.snapshot.queryParamMap.has(`id`)?{ID:this.route.snapshot.queryParamMap.get(`id`)||``}:{};rm([this.setupUsersService.getUserListLoader1(),this.setupUsersService.getUserListLoader2(e)]).pipe(ql(([t,i])=>{this.filter.update(()=>G(F({},t.Filter),{Name:t.Filter.Name||`00000000-0000-0000-0000-000000000000`,GroupID:t.Filter.GroupID||`00000000-0000-0000-0000-000000000000`})),this.groupOptions.set(t.Options),this.userOptions.set(i.Data);let s=t.Filter.PageSize??this.rowsPerPage(),f=t.Filter.PageNumber??1;this.rowsPerPage.set(s),this.firstIndex.set((f-1)*s)}),U(this.destroyRef)).subscribe()}listenRouteState(){this.route.queryParamMap.pipe(ql(e=>{let t=e.get(`dialog`),i=e.get(`id`);if(t===`create`){this.dialogMode.update(s=>`create`),this.dialogVisible.update(s=>!0);return}if(t===`edit`&&i){this.dialogMode.update(s=>`edit`),this.dialogVisible.update(s=>!0),this.handleUserEdit(i);return}this.dialogVisible.update(s=>!1),this.dialogMode.update(s=>null)})).subscribe()}openAddUser(){this.router.navigate([],{queryParams:{dialog:`create`},queryParamsHandling:`merge`})}openEditUser(e){this.router.navigate([],{queryParams:{dialog:`edit`,id:e},queryParamsHandling:`merge`})}closeModal(){this.router.navigate([],{queryParams:{dialog:null,id:null},queryParamsHandling:`merge`}),this.inviteUserForm.reset(),this.inviteUserForm.controls.UserID.enable({emitEvent:!1})}resetModalState(){this.dialogMode.update(e=>null),this.inviteUserForm.reset()}onSubmit(){if(this.inviteUserForm.invalid){this.inviteUserForm.markAllAsTouched();return}let e=this.inviteUserForm.getRawValue();(this.dialogMode()===`edit`?this.setupUsersService.updateUser(e.UserID,e.GroupID):this.setupUsersService.inviteUser(e)).pipe(ql(()=>{this.loadUsers(),this.closeModal(),this.userChecked.set([]),this.inviteUserForm.reset(),this.inviteUserForm.controls.UserID.enable({emitEvent:!1})}),U(this.destroyRef)).subscribe()}onDeleteUser(){this.setupUsersService.deleteUser(this.userChecked()).pipe(ql(()=>{this.loadUsers(),this.userChecked.set([])}),U(this.destroyRef)).subscribe()}handleUserEdit(e){this.inviteUserForm.reset(),this.setupUsersService.getUserByID(e).pipe(ql(t=>{this.loadOptions(),this.inviteUserForm.controls.UserID.disable({emitEvent:!1}),this.isUserAdmin||this.inviteUserForm.controls.GroupID.disable({emitEvent:!1}),this.inviteUserForm.patchValue({UserID:t.UserID,GroupID:t.GroupID})}),U(this.destroyRef)).subscribe()}onCloseFilterDialog(){this.dialogFilterVisible.set(!1)}onRowSelect(e){let t=e.data.UserID;this.userChecked().includes(t)||this.userChecked.update(i=>[...i,t])}onRowUnselect(e){if(`UserID`in e.data){let t=e.data?.UserID;if(!t)return;this.userChecked.update(i=>i.filter(s=>s!==t))}}static{this.ɵfac=function(t){return new(t||n)}}static{this.ɵcmp=PD({type:n,selectors:[[`app-users`]],decls:20,vars:14,consts:[[`actionButton`,``],[`content`,``],[`filterDialog`,``],[`header`,``],[`body`,``],[`paginatorleft`,``],[`pageTitle`,`Users`,3,`dialogFilterVisibleChange`,`querySearchChange`,`searchable`,`filterable`,`dialogFilterVisible`,`querySearch`],[`appendTo`,`body`,3,`visibleChange`,`onHide`,`header`,`modal`,`visible`],[1,`d-flex`,`flex-column`,`gap-4`,3,`formGroup`],[1,`form-group`,`d-flex`,`flex-column`,`gap-1`],[`for`,``],[`filter`,``,`filterBy`,`LoginID`,`formControlName`,`UserID`,`appendTo`,`body`,`optionLabel`,`LoginID`,`optionValue`,`ID`,`placeholder`,`Select a User`,3,`options`],[`showClear`,``,`filter`,``,`filterBy`,`Name`,`formControlName`,`GroupID`,`appendTo`,`body`,`optionLabel`,`Name`,`optionValue`,`ID`,`placeholder`,`Select a Group`,3,`options`],[1,`d-flex`,`justify-content-end`,`gap-2`],[`label`,`Cancel`,`outlined`,``,`severity`,`secondary`,3,`onClick`],[`severity`,`info`,`label`,`Save`,3,`onClick`,`disabled`],[1,`d-flex`,`gap-2`,`justify-content-end`,`align-items-center`],[`label`,`Delete`],[`severity`,`info`,`label`,`Invite`],[`label`,`Delete`,3,`onClick`],[`severity`,`info`,`label`,`Invite`,3,`onClick`],[`dataKey`,`UserID`,3,`lazy`,`paginator`,`rows`,`first`,`totalRecords`,`value`,`tableStyle`],[`dataKey`,`UserID`,3,`onPage`,`onRowUnselect`,`onRowSelect`,`lazy`,`paginator`,`rows`,`first`,`totalRecords`,`value`,`tableStyle`],[2,`width`,`4rem`],[1,`btn`,`btn-link`,`link-primary`,`link-underline-opacity-0`,3,`click`],[3,`value`],[`severity`,`info`,`label`,`Apply`,3,`onClick`]],template:function(t,i){if(t&1){let s=Tw();Pi(0,`app-main-panel`,6),fg(`dialogFilterVisibleChange`,function(c){return Gu(s),hb(i.dialogFilterVisible,c)||(i.dialogFilterVisible=c),zu(c)})(`querySearchChange`,function(c){return Gu(s),hb(i.querySearch,c)||(i.querySearch=c),zu(c)}),_h(1,Ce,3,2,`ng-template`,null,0,Pb)(3,De,2,1,`ng-template`,null,1,Pb)(5,Fe,8,2,`ng-template`,null,2,Pb),fl(),Pi(7,`p-dialog`,7),fg(`visibleChange`,function(c){return Gu(s),hb(i.dialogVisible,c)||(i.dialogVisible=c),zu(c)}),Bh(`onHide`,function(){return i.closeModal()}),Pi(8,`form`,8)(9,`div`,9)(10,`label`,10),ub(11,`User`),fl(),Pi(12,`p-select`,11),GI(),fl()(),Pi(13,`div`,9)(14,`label`,10),ub(15,`Group`),fl(),Pi(16,`p-select`,12),GI(),fl()(),Pi(17,`div`,13)(18,`p-button`,14),Bh(`onClick`,function(){return i.closeModal()}),fl(),Pi(19,`p-button`,15),Bh(`onClick`,function(){return i.onSubmit()}),fl()()()()}t&2&&(Rh(`searchable`,!0)(`filterable`,!0),dg(`dialogFilterVisible`,i.dialogFilterVisible)(`querySearch`,i.querySearch),iI(7),Jw(wb(13,ge)),Rh(`header`,i.dialogMode()===`edit`?`Edit User`:`Invite User`)(`modal`,!0),dg(`visible`,i.dialogVisible),iI(),Rh(`formGroup`,i.inviteUserForm),iI(4),Rh(`options`,i.userOptions()),QI(),iI(4),Rh(`options`,i.groupOptions()),QI(),iI(3),Rh(`disabled`,!i.isUserAdmin))},dependencies:[gr,Ac,dr,ur,mr,qr,Ee,An,Ai,fh,lh,oh,sh,vl,Tl],styles:[`.p-datatable .p-datatable-thead tr th{background-color:#f6f6f6!important}`],changeDetection:1})}}return n})();export{Ye as UsersComponent};
@@ -1 +1 @@
1
- import{n as dr,t as Ac}from"./chunk-ANgQsrxT.js";import"./chunk-BTkPXAJR.js";import"./main-Q45KL3O3.js";import{t as i}from"./chunk-CKXRHkCI.js";import{t as h}from"./chunk-CyE7pq6Z.js";import{f as gr,h as qr}from"./chunk-DVmYwAhe.js";import"./chunk-CZtkF-WL.js";import"./chunk-DAfeU1o0.js";import"./chunk-CtdBLXrI.js";import{E as E$1,Ft as Rh,Hn as fl,St as Pi,Tn as cg,bt as Pb,ei as ti,fi as wb,gn as _h,ii as ub,or as iI,qr as ql,u as Aw,yt as PD}from"./chunk-LD3k3Loy.js";var E=()=>({"min-width":`50rem`});function D(t,p){}function G(t,p){t&1&&(Pi(0,`tr`)(1,`th`),ub(2,`Name`),fl(),Pi(3,`th`),ub(4,`Desc`),fl()())}function T(t,p){if(t&1&&(Pi(0,`tr`)(1,`td`)(2,`span`),ub(3),fl()(),Pi(4,`td`)(5,`span`),ub(6),fl()()()),t&2){let e=p.$implicit;iI(3),cg(e.Name),iI(3),cg(e.Description)}}function L(t,p){if(t&1&&(Pi(0,`p-panel`)(1,`p-table`,5),_h(2,G,5,0,`ng-template`,null,2,Pb)(4,T,7,2,`ng-template`,null,3,Pb),fl()()),t&2){let e=Aw();iI(),Rh(`value`,e.groupList())(`tableStyle`,wb(2,E))}}var K=(()=>{class t{constructor(){this.setupUserService=E$1(h),this.groupList=ti([])}ngOnInit(){this.setupUserService.getGroupList().pipe(i(`Groups`),ql(e=>this.groupList.set(e.Data))).subscribe()}static{this.ɵfac=function(l){return new(l||t)}}static{this.ɵcmp=PD({type:t,selectors:[[`app-groups`]],decls:5,vars:0,consts:[[`actionButton`,``],[`content`,``],[`header`,``],[`body`,``],[`pageTitle`,`Users`],[`dataKey`,`UserID`,3,`value`,`tableStyle`]],template:function(l,M){l&1&&(Pi(0,`app-main-panel`,4),_h(1,D,0,0,`ng-template`,null,0,Pb)(3,L,6,3,`ng-template`,null,1,Pb),fl())},dependencies:[gr,qr,Ac,dr],styles:[`.p-datatable .p-datatable-thead tr th{background-color:#f6f6f6!important}`],changeDetection:1})}}return t})();export{K as GroupsComponent};
1
+ import{n as dr,t as Ac}from"./chunk-DgvU-8oj.js";import"./chunk-2WAnOzGd.js";import"./main-Q2MGVNT6.js";import{t as i}from"./chunk-CKXRHkCI.js";import{t as h}from"./chunk-CyE7pq6Z.js";import{f as gr,h as qr}from"./chunk-CpMSXHia.js";import"./chunk-CZtkF-WL.js";import"./chunk-DAfeU1o0.js";import"./chunk-CtdBLXrI.js";import{E as E$1,Ft as Rh,Hn as fl,St as Pi,Tn as cg,bt as Pb,ei as ti,fi as wb,gn as _h,ii as ub,or as iI,qr as ql,u as Aw,yt as PD}from"./chunk-LD3k3Loy.js";var E=()=>({"min-width":`50rem`});function D(t,p){}function G(t,p){t&1&&(Pi(0,`tr`)(1,`th`),ub(2,`Name`),fl(),Pi(3,`th`),ub(4,`Desc`),fl()())}function T(t,p){if(t&1&&(Pi(0,`tr`)(1,`td`)(2,`span`),ub(3),fl()(),Pi(4,`td`)(5,`span`),ub(6),fl()()()),t&2){let e=p.$implicit;iI(3),cg(e.Name),iI(3),cg(e.Description)}}function L(t,p){if(t&1&&(Pi(0,`p-panel`)(1,`p-table`,5),_h(2,G,5,0,`ng-template`,null,2,Pb)(4,T,7,2,`ng-template`,null,3,Pb),fl()()),t&2){let e=Aw();iI(),Rh(`value`,e.groupList())(`tableStyle`,wb(2,E))}}var K=(()=>{class t{constructor(){this.setupUserService=E$1(h),this.groupList=ti([])}ngOnInit(){this.setupUserService.getGroupList().pipe(i(`Groups`),ql(e=>this.groupList.set(e.Data))).subscribe()}static{this.ɵfac=function(l){return new(l||t)}}static{this.ɵcmp=PD({type:t,selectors:[[`app-groups`]],decls:5,vars:0,consts:[[`actionButton`,``],[`content`,``],[`header`,``],[`body`,``],[`pageTitle`,`Users`],[`dataKey`,`UserID`,3,`value`,`tableStyle`]],template:function(l,M){l&1&&(Pi(0,`app-main-panel`,4),_h(1,D,0,0,`ng-template`,null,0,Pb)(3,L,6,3,`ng-template`,null,1,Pb),fl())},dependencies:[gr,qr,Ac,dr],styles:[`.p-datatable .p-datatable-thead tr th{background-color:#f6f6f6!important}`],changeDetection:1})}}return t})();export{K as GroupsComponent};