2 lines
26 KiB
JavaScript
2 lines
26 KiB
JavaScript
import{a as Ge,b as qe}from"./chunk-TDFJQLRV.js";import{a as v}from"./chunk-IRVPX2IZ.js";import{a as Je}from"./chunk-4E7NWUSO.js";import{a as ve,b as Se,c as ye,d as Ee,e as Ae,f as we,g as Ue,h as Te,i as De,j as ke,k as Fe}from"./chunk-CAFW6QNR.js";import"./chunk-MS4AQ6UA.js";import"./chunk-N73CTY2C.js";import{a as Ie,b as Ve}from"./chunk-GIRDLTGV.js";import{a as Le}from"./chunk-RDQGS2XZ.js";import{c as Re}from"./chunk-P3ICZX4Q.js";import{a as ze,b as Ne,c as Be,d as $e}from"./chunk-37GOEORY.js";import{c as je,g as He}from"./chunk-YWCH6MM5.js";import"./chunk-VX6WCCL3.js";import"./chunk-66PBOFKL.js";import"./chunk-NYYADJNO.js";import{b as se,c as de}from"./chunk-R3PUHZUP.js";import"./chunk-3RK6DDJD.js";import{a as me}from"./chunk-7XDVX5KB.js";import{a as be}from"./chunk-B4CGVF35.js";import{b as xe}from"./chunk-NIBVQDYD.js";import"./chunk-LLJSP5R2.js";import"./chunk-HMKN2VB2.js";import{a as Pe}from"./chunk-3NOMFGTV.js";import"./chunk-M5XZ5N2D.js";import{b as he,g as Oe}from"./chunk-TAS7XC6E.js";import"./chunk-3GOV5KJM.js";import{b as ae,e as le,i as ce}from"./chunk-EGL4ZKWQ.js";import{a as Y,b as Z,c as ee,d as te,e as ne,f as ie,h as re,i as oe}from"./chunk-6NRCTHHS.js";import{a as fe,b as Me}from"./chunk-N6VRXIQE.js";import{b as H,f as G,g as q,l as J,o as W,r as K,x as Q,z as X}from"./chunk-GWD5A44H.js";import"./chunk-52JZ5I3Y.js";import{Aa as Ce,h as N,j as B,u as $,ua as _e,w as j,wa as ge,ya as pe,za as ue}from"./chunk-COFYR5MX.js";import{Db as h,Eb as O,Ec as U,F as T,Hb as R,I as D,Ib as I,Jb as _,Kb as e,Lb as n,Mb as S,Qb as M,Rb as P,Tb as x,Xb as s,Za as l,Zb as m,a as y,b as E,da as f,hc as V,ia as p,ja as u,lc as i,mc as g,nc as b,oa as k,ob as F,oc as L,ub as C,vc as z,wc as A,xc as w}from"./chunk-2MUIW2M6.js";var Qe=()=>[10,25,50,100],Xe=(o,t)=>t.id;function Ye(o,t){o&1&&(e(0,"div",31),S(1,"mat-spinner",34),e(2,"p"),i(3,"Loading users..."),n()())}function Ze(o,t){if(o&1){let r=x();e(0,"mat-card",32)(1,"mat-card-content")(2,"div",35)(3,"mat-icon",36),i(4,"error_outline"),n(),e(5,"div",37)(6,"h3"),i(7,"Failed to Load Users"),n(),e(8,"p"),i(9),n()()(),e(10,"button",38),s("click",function(){p(r);let c=m();return u(c.refreshUsers())}),e(11,"mat-icon"),i(12,"refresh"),n(),i(13," Try Again "),n()()()}if(o&2){let r=m();l(9),g(r.error())}}function et(o,t){if(o&1&&(e(0,"span",41),i(1),n()),o&2){let r,a=m(2);l(),L(" Total: ",(r=a.pagination())==null?null:r.totalItems," user",((r=a.pagination())==null?null:r.totalItems)!==1?"s":""," ")}}function tt(o,t){o&1&&(e(0,"th",58),i(1,"Username"),n())}function nt(o,t){if(o&1&&(e(0,"td",59)(1,"div",60)(2,"mat-icon",61),i(3,"account_circle"),n(),e(4,"span"),i(5),n()()()),o&2){let r=t.$implicit;l(5),g(r.username)}}function it(o,t){o&1&&(e(0,"th",58),i(1,"Email"),n())}function rt(o,t){if(o&1&&(e(0,"td",59),i(1),n()),o&2){let r=t.$implicit;l(),g(r.email)}}function ot(o,t){o&1&&(e(0,"th",58),i(1,"Role"),n())}function at(o,t){if(o&1&&(e(0,"td",59)(1,"mat-chip",62),i(2),A(3,"uppercase"),n()()),o&2){let r=t.$implicit,a=m(2);l(),_("color",a.getRoleColor(r.role)),l(),b(" ",w(3,2,r.role)," ")}}function lt(o,t){o&1&&(e(0,"th",58),i(1,"Status"),n())}function ct(o,t){if(o&1&&(e(0,"td",59)(1,"mat-chip",62),i(2),n()()),o&2){let r=t.$implicit,a=m(2);l(),_("color",a.getStatusColor(r.isActive)),l(),b(" ",a.getStatusText(r.isActive)," ")}}function mt(o,t){o&1&&(e(0,"th",58),i(1,"Joined"),n())}function st(o,t){if(o&1&&(e(0,"td",59),i(1),n()),o&2){let r=t.$implicit,a=m(2);l(),g(a.formatDate(r.createdAt))}}function dt(o,t){o&1&&(e(0,"th",58),i(1,"Last Login"),n())}function _t(o,t){if(o&1&&(e(0,"td",59),i(1),n()),o&2){let r=t.$implicit,a=m(2);l(),g(a.formatDateTime(r.lastLoginAt))}}function gt(o,t){o&1&&(e(0,"th",58),i(1,"Actions"),n())}function pt(o,t){if(o&1){let r=x();e(0,"td",59)(1,"button",63)(2,"mat-icon"),i(3,"more_vert"),n()(),e(4,"mat-menu",null,0)(6,"button",64),s("click",function(){let c=p(r).$implicit,d=m(2);return u(d.viewUserDetails(c.id))}),e(7,"mat-icon"),i(8,"visibility"),n(),e(9,"span"),i(10,"View Details"),n()(),e(11,"button",64),s("click",function(){let c=p(r).$implicit,d=m(2);return u(d.editUserRole(c))}),e(12,"mat-icon"),i(13,"edit"),n(),e(14,"span"),i(15,"Edit Role"),n()(),e(16,"button",64),s("click",function(){let c=p(r).$implicit,d=m(2);return u(d.toggleUserStatus(c))}),e(17,"mat-icon"),i(18),n(),e(19,"span"),i(20),n()()()()}if(o&2){let r=t.$implicit,a=V(5);l(),_("matMenuTriggerFor",a),l(17),g(r.isActive?"block":"check_circle"),l(2),g(r.isActive?"Deactivate":"Activate")}}function ut(o,t){o&1&&S(0,"tr",65)}function Ct(o,t){o&1&&S(0,"tr",66)}function ft(o,t){if(o&1){let r=x();e(0,"mat-card",56)(1,"mat-card-header")(2,"mat-icon",67),i(3,"account_circle"),n(),e(4,"mat-card-title"),i(5),n(),e(6,"mat-card-subtitle"),i(7),n()(),e(8,"mat-card-content")(9,"div",68)(10,"div",69)(11,"span",70),i(12,"Role:"),n(),e(13,"mat-chip",62),i(14),A(15,"uppercase"),n()(),e(16,"div",69)(17,"span",70),i(18,"Status:"),n(),e(19,"mat-chip",62),i(20),n()(),e(21,"div",69)(22,"span",70),i(23,"Joined:"),n(),e(24,"span"),i(25),n()(),e(26,"div",69)(27,"span",70),i(28,"Last Login:"),n(),e(29,"span"),i(30),n()()()(),e(31,"mat-card-actions")(32,"button",71),s("click",function(){let c=p(r).$implicit,d=m(2);return u(d.viewUserDetails(c.id))}),e(33,"mat-icon"),i(34,"visibility"),n(),i(35," View "),n(),e(36,"button",71),s("click",function(){let c=p(r).$implicit,d=m(2);return u(d.editUserRole(c))}),e(37,"mat-icon"),i(38,"edit"),n(),i(39," Edit Role "),n(),e(40,"button",72),s("click",function(){let c=p(r).$implicit,d=m(2);return u(d.toggleUserStatus(c))}),e(41,"mat-icon"),i(42),n(),i(43),n()()()}if(o&2){let r=t.$implicit,a=m(2);l(5),g(r.username),l(2),g(r.email),l(6),_("color",a.getRoleColor(r.role)),l(),b(" ",w(15,11,r.role)," "),l(5),_("color",a.getStatusColor(r.isActive)),l(),b(" ",a.getStatusText(r.isActive)," "),l(5),g(a.formatDate(r.createdAt)),l(5),g(a.formatDateTime(r.lastLoginAt)),l(10),_("color",r.isActive?"warn":"primary"),l(2),g(r.isActive?"block":"check_circle"),l(),b(" ",r.isActive?"Deactivate":"Activate"," ")}}function Mt(o,t){if(o&1){let r=x();e(0,"app-pagination",73),s("pageChange",function(c){p(r);let d=m(2);return u(d.goToPage(c))})("pageSizeChange",function(c){p(r);let d=m(2);return u(d.onPageSizeChange(c))}),n()}if(o&2){let r=m(2);_("state",r.paginationState())("pageNumbers",r.pageNumbers())("pageSizeOptions",z(5,Qe))("showFirstLast",!0)("itemLabel","users")}}function Pt(o,t){if(o&1&&(e(0,"mat-card",39)(1,"div",40)(2,"h2"),i(3,"Users"),n(),h(4,et,2,2,"span",41),n(),e(5,"div",42)(6,"table",43),M(7,44),C(8,tt,2,0,"th",45)(9,nt,6,1,"td",46),P(),M(10,47),C(11,it,2,0,"th",45)(12,rt,2,1,"td",46),P(),M(13,48),C(14,ot,2,0,"th",45)(15,at,4,4,"td",46),P(),M(16,49),C(17,lt,2,0,"th",45)(18,ct,3,2,"td",46),P(),M(19,50),C(20,mt,2,0,"th",45)(21,st,2,1,"td",46),P(),M(22,51),C(23,dt,2,0,"th",45)(24,_t,2,1,"td",46),P(),M(25,52),C(26,gt,2,0,"th",45)(27,pt,21,3,"td",46),P(),C(28,ut,1,0,"tr",53)(29,Ct,1,0,"tr",54),n()()(),e(30,"div",55),R(31,ft,44,13,"mat-card",56,Xe),n(),h(33,Mt,1,6,"app-pagination",57)),o&2){let r=m();l(4),O(r.pagination()?4:-1),l(2),_("dataSource",r.users()),l(22),_("matHeaderRowDef",r.displayedColumns),l(),_("matRowDefColumns",r.displayedColumns),l(2),I(r.users()),l(2),O(r.paginationState()?33:-1)}}function ht(o,t){if(o&1){let r=x();e(0,"mat-card",33)(1,"mat-card-content")(2,"mat-icon"),i(3,"people_outline"),n(),e(4,"h3"),i(5,"No Users Found"),n(),e(6,"p"),i(7,"No users match your current filters."),n(),e(8,"button",38),s("click",function(){p(r);let c=m();return u(c.resetFilters())}),e(9,"mat-icon"),i(10,"clear"),n(),i(11," Clear Filters "),n()()()}}var We=class o{adminService=f(Le);router=f(j);route=f($);fb=f(Q);destroyRef=f(k);dialog=f(je);paginationService=f(Pe);users=this.adminService.adminUsersState;isLoading=this.adminService.isLoadingUsers;error=this.adminService.usersError;pagination=this.adminService.usersPagination;paginationState=U(()=>{let t=this.pagination();return t?this.paginationService.calculatePaginationState({currentPage:t.currentPage,pageSize:t.itemsPerPage,totalItems:t.totalItems}):null});pageNumbers=U(()=>{let t=this.paginationState();return t?this.paginationService.calculatePageNumbers(t.currentPage,t.totalPages,5):[]});displayedColumns=["username","email","role","status","joinedDate","lastLogin","actions"];filterForm;currentParams={page:1,limit:10,role:"all",isActive:"all",sortBy:"createdAt",sortOrder:"desc",search:""};Math=Math;ngOnInit(){this.initializeFilterForm(),this.setupSearchDebounce(),this.loadUsersFromRoute()}initializeFilterForm(){this.filterForm=this.fb.group({search:[""],role:["all"],isActive:["all"],sortBy:["createdAt"],sortOrder:["desc"]})}setupSearchDebounce(){this.filterForm.get("search")?.valueChanges.pipe(T(500),D(),v(this.destroyRef)).subscribe(()=>{this.applyFilters()})}loadUsersFromRoute(){this.route.queryParams.pipe(v(this.destroyRef)).subscribe(t=>{this.currentParams={page:+(t.page||1),limit:+(t.limit||10),role:t.role||"all",isActive:t.isActive||"all",sortBy:t.sortBy||"createdAt",sortOrder:t.sortOrder||"desc",search:t.search||""},this.filterForm.patchValue({search:this.currentParams.search,role:this.currentParams.role,isActive:this.currentParams.isActive,sortBy:this.currentParams.sortBy,sortOrder:this.currentParams.sortOrder},{emitEvent:!1}),this.loadUsers()})}loadUsers(){this.adminService.getUsers(this.currentParams).pipe(v(this.destroyRef)).subscribe()}applyFilters(){let t=this.filterForm.value;this.currentParams=E(y({},this.currentParams),{page:1,search:t.search||"",role:t.role||"all",isActive:t.isActive||"all",sortBy:t.sortBy||"createdAt",sortOrder:t.sortOrder||"desc"}),this.updateRouteParams()}goToPage(t){t<1||t>(this.pagination()?.totalPages??1)||(this.currentParams=E(y({},this.currentParams),{page:t}),this.updateRouteParams())}onPageSizeChange(t){this.currentParams=E(y({},this.currentParams),{page:1,limit:t}),this.updateRouteParams()}updateRouteParams(){this.router.navigate([],{relativeTo:this.route,queryParams:this.currentParams,queryParamsHandling:"merge"})}refreshUsers(){this.loadUsers()}resetFilters(){this.filterForm.reset({search:"",role:"all",isActive:"all",sortBy:"createdAt",sortOrder:"desc"}),this.applyFilters()}viewUserDetails(t){this.router.navigate(["/admin/users",t])}editUserRole(t){this.dialog.open(Ge,{width:"600px",maxWidth:"95vw",data:{user:t},disableClose:!1}).afterClosed().subscribe(a=>{a&&a!==t.role&&this.adminService.updateUserRole(t.id,a).subscribe({next:()=>{},error:()=>{}})})}toggleUserStatus(t){let r=t.isActive?"deactivate":"activate";this.dialog.open(qe,{width:"500px",data:{user:t,action:r},disableClose:!1,autoFocus:!0}).afterClosed().pipe(v(this.destroyRef)).subscribe(c=>{if(!c)return;(r==="activate"?this.adminService.activateUser(t.id):this.adminService.deactivateUser(t.id)).pipe(v(this.destroyRef)).subscribe({next:()=>{},error:Ke=>{console.error("Error updating user status:",Ke)}})})}getRoleColor(t){return t==="admin"?"primary":"accent"}getStatusColor(t){return t?"primary":"warn"}getStatusText(t){return t?"Active":"Inactive"}formatDate(t){return t?new Date(t).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"}):"Never"}formatDateTime(t){return t?new Date(t).toLocaleString("en-US",{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"}):"Never"}goBack(){this.router.navigate(["/admin"])}static \u0275fac=function(r){return new(r||o)};static \u0275cmp=F({type:o,selectors:[["app-admin-users"]],decls:81,vars:6,consts:[["actionMenu","matMenu"],[1,"admin-users-container"],[1,"users-header"],[1,"header-left"],["mat-icon-button","","matTooltip","Back to Dashboard",3,"click"],[1,"header-title"],[1,"subtitle"],[1,"header-actions"],["mat-stroked-button","",3,"click","disabled"],[1,"filters-card"],[1,"filters-form",3,"formGroup"],["appearance","outline",1,"search-field"],["matInput","","formControlName","search","placeholder","Search by username or email"],["matPrefix",""],["appearance","outline"],["formControlName","role",3,"selectionChange"],["value","all"],["value","user"],["value","admin"],["formControlName","isActive",3,"selectionChange"],["value","active"],["value","inactive"],["formControlName","sortBy",3,"selectionChange"],["value","username"],["value","email"],["value","createdAt"],["value","lastLoginAt"],["formControlName","sortOrder",3,"selectionChange"],["value","asc"],["value","desc"],["mat-stroked-button","","type","button",3,"click"],[1,"loading-container"],[1,"error-card"],[1,"empty-card"],["diameter","60"],[1,"error-content"],["color","warn"],[1,"error-text"],["mat-raised-button","","color","primary",3,"click"],[1,"table-card","desktop-table"],[1,"table-header"],[1,"total-count"],[1,"table-container"],["mat-table","",1,"users-table",3,"dataSource"],["matColumnDef","username"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","email"],["matColumnDef","role"],["matColumnDef","status"],["matColumnDef","joinedDate"],["matColumnDef","lastLogin"],["matColumnDef","actions"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],[1,"mobile-cards"],[1,"user-card"],[3,"state","pageNumbers","pageSizeOptions","showFirstLast","itemLabel"],["mat-header-cell",""],["mat-cell",""],[1,"username-cell"],[1,"user-icon"],["highlighted","",3,"color"],["mat-icon-button","",3,"matMenuTriggerFor"],["mat-menu-item","",3,"click"],["mat-header-row",""],["mat-row",""],["mat-card-avatar","",1,"card-avatar"],[1,"card-info"],[1,"info-row"],[1,"label"],["mat-button","",3,"click"],["mat-button","",3,"click","color"],[3,"pageChange","pageSizeChange","state","pageNumbers","pageSizeOptions","showFirstLast","itemLabel"]],template:function(r,a){r&1&&(e(0,"div",1)(1,"div",2)(2,"div",3)(3,"button",4),s("click",function(){return a.goBack()}),e(4,"mat-icon"),i(5,"arrow_back"),n()(),e(6,"div",5)(7,"h1"),i(8,"User Management"),n(),e(9,"p",6),i(10,"Manage all users and their permissions"),n()()(),e(11,"div",7)(12,"button",8),s("click",function(){return a.refreshUsers()}),e(13,"mat-icon"),i(14,"refresh"),n(),i(15," Refresh "),n()()(),e(16,"mat-card",9)(17,"mat-card-content")(18,"form",10)(19,"mat-form-field",11)(20,"mat-label"),i(21,"Search"),n(),S(22,"input",12),e(23,"mat-icon",13),i(24,"search"),n()(),e(25,"mat-form-field",14)(26,"mat-label"),i(27,"Role"),n(),e(28,"mat-select",15),s("selectionChange",function(){return a.applyFilters()}),e(29,"mat-option",16),i(30,"All Roles"),n(),e(31,"mat-option",17),i(32,"User"),n(),e(33,"mat-option",18),i(34,"Admin"),n()(),e(35,"mat-icon",13),i(36,"badge"),n()(),e(37,"mat-form-field",14)(38,"mat-label"),i(39,"Status"),n(),e(40,"mat-select",19),s("selectionChange",function(){return a.applyFilters()}),e(41,"mat-option",16),i(42,"All Status"),n(),e(43,"mat-option",20),i(44,"Active"),n(),e(45,"mat-option",21),i(46,"Inactive"),n()(),e(47,"mat-icon",13),i(48,"toggle_on"),n()(),e(49,"mat-form-field",14)(50,"mat-label"),i(51,"Sort By"),n(),e(52,"mat-select",22),s("selectionChange",function(){return a.applyFilters()}),e(53,"mat-option",23),i(54,"Username"),n(),e(55,"mat-option",24),i(56,"Email"),n(),e(57,"mat-option",25),i(58,"Join Date"),n(),e(59,"mat-option",26),i(60,"Last Login"),n()(),e(61,"mat-icon",13),i(62,"sort"),n()(),e(63,"mat-form-field",14)(64,"mat-label"),i(65,"Order"),n(),e(66,"mat-select",27),s("selectionChange",function(){return a.applyFilters()}),e(67,"mat-option",28),i(68,"Ascending"),n(),e(69,"mat-option",29),i(70,"Descending"),n()(),e(71,"mat-icon",13),i(72,"swap_vert"),n()(),e(73,"button",30),s("click",function(){return a.resetFilters()}),e(74,"mat-icon"),i(75,"clear"),n(),i(76," Reset "),n()()()(),h(77,Ye,4,0,"div",31),h(78,Ze,14,1,"mat-card",32),h(79,Pt,34,5),h(80,ht,12,0,"mat-card",33),n()),r&2&&(l(12),_("disabled",a.isLoading()),l(6),_("formGroup",a.filterForm),l(59),O(a.isLoading()&&a.users().length===0?77:-1),l(),O(a.error()&&!a.isLoading()&&a.users().length===0?78:-1),l(),O(a.users().length>0?79:-1),l(),O(!a.isLoading()&&!a.error()&&a.users().length===0?80:-1))},dependencies:[B,X,J,H,G,q,W,K,oe,Y,ne,re,ee,ie,te,Z,pe,ge,_e,Ce,ue,Fe,ve,ye,Ue,Ee,Se,Te,Ae,we,De,ke,de,se,ce,ae,le,me,Ve,Ie,Re,Me,fe,be,xe,Oe,he,$e,Ne,ze,Be,He,Je,N],styles:[".admin-users-container[_ngcontent-%COMP%]{max-width:1400px;margin:0 auto;padding:2rem}.users-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:flex-start;margin-bottom:2rem;gap:1rem;flex-wrap:wrap}.users-header[_ngcontent-%COMP%] .header-left[_ngcontent-%COMP%]{display:flex;align-items:center;gap:1rem;flex:1}.users-header[_ngcontent-%COMP%] .header-left[_ngcontent-%COMP%] .header-title[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{margin:0;font-size:2rem;font-weight:600;color:#333}.users-header[_ngcontent-%COMP%] .header-left[_ngcontent-%COMP%] .header-title[_ngcontent-%COMP%] .subtitle[_ngcontent-%COMP%]{margin:.25rem 0 0;color:#666;font-size:.95rem}.users-header[_ngcontent-%COMP%] .header-actions[_ngcontent-%COMP%]{display:flex;gap:.75rem}.users-header[_ngcontent-%COMP%] .header-actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{margin-right:.5rem}.filters-card[_ngcontent-%COMP%]{margin-bottom:2rem}.filters-card[_ngcontent-%COMP%] .filters-form[_ngcontent-%COMP%]{display:grid;grid-template-columns:2fr repeat(4,1fr) auto;gap:1rem;align-items:start}.filters-card[_ngcontent-%COMP%] .filters-form[_ngcontent-%COMP%] .search-field[_ngcontent-%COMP%]{grid-column:1}.filters-card[_ngcontent-%COMP%] .filters-form[_ngcontent-%COMP%] mat-form-field[_ngcontent-%COMP%]{width:100%}.filters-card[_ngcontent-%COMP%] .filters-form[_ngcontent-%COMP%] mat-form-field[_ngcontent-%COMP%] mat-icon[matPrefix][_ngcontent-%COMP%]{margin-right:.5rem;color:#666}.filters-card[_ngcontent-%COMP%] .filters-form[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{margin-top:.5rem}.loading-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:4rem 2rem;gap:1.5rem}.loading-container[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{color:#666;font-size:1rem}.error-card[_ngcontent-%COMP%]{margin-bottom:2rem}.error-card[_ngcontent-%COMP%] .error-content[_ngcontent-%COMP%]{display:flex;align-items:center;gap:1rem;margin-bottom:1.5rem}.error-card[_ngcontent-%COMP%] .error-content[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:3rem;width:3rem;height:3rem}.error-card[_ngcontent-%COMP%] .error-content[_ngcontent-%COMP%] .error-text[_ngcontent-%COMP%]{flex:1}.error-card[_ngcontent-%COMP%] .error-content[_ngcontent-%COMP%] .error-text[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:0 0 .5rem;color:#d32f2f;font-size:1.25rem}.error-card[_ngcontent-%COMP%] .error-content[_ngcontent-%COMP%] .error-text[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0;color:#666}.table-card[_ngcontent-%COMP%]{margin-bottom:2rem}.table-card[_ngcontent-%COMP%] .table-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;padding:1rem 1.5rem;border-bottom:1px solid #e0e0e0}.table-card[_ngcontent-%COMP%] .table-header[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{margin:0;font-size:1.5rem;font-weight:600}.table-card[_ngcontent-%COMP%] .table-header[_ngcontent-%COMP%] .total-count[_ngcontent-%COMP%]{color:#666;font-size:.9rem}.table-card[_ngcontent-%COMP%] .table-container[_ngcontent-%COMP%]{overflow-x:auto}.table-card[_ngcontent-%COMP%] .users-table[_ngcontent-%COMP%]{width:100%}.table-card[_ngcontent-%COMP%] .users-table[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{font-weight:600;color:#333;background:#f5f5f5}.table-card[_ngcontent-%COMP%] .users-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%], .table-card[_ngcontent-%COMP%] .users-table[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{padding:1rem}.table-card[_ngcontent-%COMP%] .users-table[_ngcontent-%COMP%] .username-cell[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem}.table-card[_ngcontent-%COMP%] .users-table[_ngcontent-%COMP%] .username-cell[_ngcontent-%COMP%] .user-icon[_ngcontent-%COMP%]{color:#666;font-size:24px;width:24px;height:24px}.table-card[_ngcontent-%COMP%] .users-table[_ngcontent-%COMP%] mat-chip[_ngcontent-%COMP%]{font-size:.75rem;min-height:24px;padding:0 .5rem}.table-card[_ngcontent-%COMP%] .users-table[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:hover{background:#f9f9f9}.mobile-cards[_ngcontent-%COMP%]{display:none;flex-direction:column;gap:1rem;margin-bottom:2rem}.mobile-cards[_ngcontent-%COMP%] .user-card[_ngcontent-%COMP%] mat-card-header[_ngcontent-%COMP%]{margin-bottom:1rem}.mobile-cards[_ngcontent-%COMP%] .user-card[_ngcontent-%COMP%] mat-card-header[_ngcontent-%COMP%] .card-avatar[_ngcontent-%COMP%]{font-size:40px;width:40px;height:40px;color:#666}.mobile-cards[_ngcontent-%COMP%] .user-card[_ngcontent-%COMP%] .card-info[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.75rem}.mobile-cards[_ngcontent-%COMP%] .user-card[_ngcontent-%COMP%] .card-info[_ngcontent-%COMP%] .info-row[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center}.mobile-cards[_ngcontent-%COMP%] .user-card[_ngcontent-%COMP%] .card-info[_ngcontent-%COMP%] .info-row[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{font-weight:500;color:#666}.mobile-cards[_ngcontent-%COMP%] .user-card[_ngcontent-%COMP%] mat-card-actions[_ngcontent-%COMP%]{display:flex;gap:.5rem;padding:.75rem 1rem;border-top:1px solid #e0e0e0}.mobile-cards[_ngcontent-%COMP%] .user-card[_ngcontent-%COMP%] mat-card-actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{flex:1}.mobile-cards[_ngcontent-%COMP%] .user-card[_ngcontent-%COMP%] mat-card-actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{margin-right:.25rem;font-size:18px;width:18px;height:18px}.pagination-container[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;padding:1.5rem;background:#fff;border-radius:8px;box-shadow:0 2px 4px #0000001a}.pagination-container[_ngcontent-%COMP%] .pagination-info[_ngcontent-%COMP%]{color:#666;font-size:.9rem}.pagination-container[_ngcontent-%COMP%] .pagination-controls[_ngcontent-%COMP%]{display:flex;gap:.25rem;align-items:center}.pagination-container[_ngcontent-%COMP%] .pagination-controls[_ngcontent-%COMP%] button.active[_ngcontent-%COMP%]{background:#3f51b5;color:#fff}.empty-card[_ngcontent-%COMP%]{text-align:center;padding:4rem 2rem}.empty-card[_ngcontent-%COMP%] mat-card-content[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:80px;width:80px;height:80px;color:#999;margin-bottom:1rem}.empty-card[_ngcontent-%COMP%] mat-card-content[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:0 0 .5rem;color:#333;font-size:1.5rem}.empty-card[_ngcontent-%COMP%] mat-card-content[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0 0 1.5rem;color:#666}@media (max-width: 768px){.admin-users-container[_ngcontent-%COMP%]{padding:1rem}.users-header[_ngcontent-%COMP%]{flex-direction:column;align-items:stretch}.users-header[_ngcontent-%COMP%] .header-left[_ngcontent-%COMP%]{flex-direction:column;align-items:flex-start}.users-header[_ngcontent-%COMP%] .header-left[_ngcontent-%COMP%] .header-title[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{font-size:1.5rem}.users-header[_ngcontent-%COMP%] .header-actions[_ngcontent-%COMP%]{width:100%}.users-header[_ngcontent-%COMP%] .header-actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{flex:1}.filters-card[_ngcontent-%COMP%] .filters-form[_ngcontent-%COMP%]{grid-template-columns:1fr}.filters-card[_ngcontent-%COMP%] .filters-form[_ngcontent-%COMP%] .search-field[_ngcontent-%COMP%]{grid-column:1}.filters-card[_ngcontent-%COMP%] .filters-form[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{width:100%}.desktop-table[_ngcontent-%COMP%]{display:none}.mobile-cards[_ngcontent-%COMP%]{display:flex}.pagination-container[_ngcontent-%COMP%]{flex-direction:column;gap:1rem}.pagination-container[_ngcontent-%COMP%] .pagination-info[_ngcontent-%COMP%]{text-align:center}.pagination-container[_ngcontent-%COMP%] .pagination-controls[_ngcontent-%COMP%]{flex-wrap:wrap;justify-content:center}}@media (max-width: 1024px) and (min-width: 769px){.filters-card[_ngcontent-%COMP%] .filters-form[_ngcontent-%COMP%]{grid-template-columns:1fr 1fr}.filters-card[_ngcontent-%COMP%] .filters-form[_ngcontent-%COMP%] .search-field[_ngcontent-%COMP%], .filters-card[_ngcontent-%COMP%] .filters-form[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{grid-column:1/-1}.users-table[_ngcontent-%COMP%]{font-size:.9rem}.users-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%], .users-table[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{padding:.75rem}}@media (max-width: 1200px){.users-table[_ngcontent-%COMP%] th[_ngcontent-%COMP%]:nth-child(6), .users-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:nth-child(6){display:none}}@media (prefers-color-scheme: dark){.users-header[_ngcontent-%COMP%] .header-title[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{color:#fff}.users-header[_ngcontent-%COMP%] .subtitle[_ngcontent-%COMP%], .loading-container[_ngcontent-%COMP%] p[_ngcontent-%COMP%], .error-card[_ngcontent-%COMP%] .error-content[_ngcontent-%COMP%] .error-text[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{color:#aaa}.table-card[_ngcontent-%COMP%] .table-header[_ngcontent-%COMP%]{border-bottom-color:#444}.table-card[_ngcontent-%COMP%] .table-header[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{color:#fff}.table-card[_ngcontent-%COMP%] .table-header[_ngcontent-%COMP%] .total-count[_ngcontent-%COMP%]{color:#aaa}.table-card[_ngcontent-%COMP%] .users-table[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{background:#2a2a2a;color:#fff}.table-card[_ngcontent-%COMP%] .users-table[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:hover{background:#2a2a2a}.mobile-cards[_ngcontent-%COMP%] .user-card[_ngcontent-%COMP%] mat-card-actions[_ngcontent-%COMP%]{border-top-color:#444}.pagination-container[_ngcontent-%COMP%]{background:#1a1a1a}.pagination-container[_ngcontent-%COMP%] .pagination-info[_ngcontent-%COMP%]{color:#aaa}.empty-card[_ngcontent-%COMP%] mat-card-content[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:#666}.empty-card[_ngcontent-%COMP%] mat-card-content[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{color:#fff}.empty-card[_ngcontent-%COMP%] mat-card-content[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{color:#aaa}}"]})};export{We as AdminUsersComponent};
|