1- <!-- Dashboard Breadcrumbs -->
21< div class ="admin-nav-gap ">
32 < mat-toolbar class ="breadcrumbs-toolbar " color ="transparent ">
4- < span > < mat-icon > dashboard</ mat-icon > Dashboard</ span >
3+ < span >
4+ < mat-icon > dashboard</ mat-icon > Dashboard
5+ </ span >
56 </ mat-toolbar >
67</ div >
7-
8- <!-- Main Admin Content -->
98< div class ="admin-content p-4 ">
10- <!-- Top Summary Card -->
119 < mat-card class ="mb-4 top-card ">
1210 < div fxLayout ="row " fxLayoutGap ="24px " fxLayoutAlign ="start stretch ">
1311 < div class ="top-row ">
1412 <!-- Inactive Users -->
1513 < div class ="inactive-users ">
1614 < mat-card >
1715 < mat-card-title >
18- < span class ="title-with-badge ">
19- Inactive Users
20- < span matBadge ="{{ count() }} " matBadgeColor ="accent " matBadgeOverlap ="false " class ="inline-badge "> </ span >
16+ < span class ="title-with-badge "> Inactive Users < span matBadge ="{{ count() }} " matBadgeColor ="accent " matBadgeOverlap ="false " class ="inline-badge "> </ span >
2117 </ span >
2218 </ mat-card-title >
2319 < div class ="search-wrapper ">
3632 </ button >
3733 </ mat-list-item >
3834 </ mat-list >
39-
4035 < div class ="pagination-controls ">
4136 < button mat-button (click) ="previous() " [disabled] ="!hasPrevious() "> ← Previous User</ button >
4237 < button mat-button (click) ="next() " [disabled] ="!hasNext() "> Next User →</ button >
4338 </ div >
4439 </ mat-card >
4540 </ div >
46-
4741 <!-- Unregistered Devices -->
4842 < div class ="unregistered-devices ">
4943 < mat-card >
5044 < mat-card-title >
51- < span class ="title-with-badge ">
52- Unregistered Devices
53- < span matBadge ="{{ deviceCount() }} " matBadgeColor ="accent " matBadgeOverlap ="false " class ="inline-badge "> </ span >
45+ < span class ="title-with-badge "> Unregistered Devices < span matBadge ="{{ deviceCount() }} " matBadgeColor ="accent " matBadgeOverlap ="false " class ="inline-badge "> </ span >
5446 </ span >
5547 </ mat-card-title >
56-
5748 < div class ="search-wrapper ">
5849 < mat-form-field class ="w-100 mb-3 ">
5950 < mat-label > Search</ mat-label >
6354 < mat-list >
6455 < mat-list-item *ngFor ="let d of unregisteredDevices " (click) ="gotoDevice(d) " class ="clickable ">
6556 < mat-icon matListIcon [ngClass] ="iconClass(d) "> </ mat-icon >
66- < div matLine *ngIf ="d.user "> {{ d.user.displayName }}</ div >
67- < div matLine class ="text-muted " *ngIf ="d.user "> ({{ d.uid }})</ div >
57+ < div class ="mat-line-horizontal ">
58+ < span *ngIf ="d.user "> {{ d.user.displayName }}</ span >
59+ < span class ="text-muted "> ({{ d.uid }})</ span >
60+ </ div >
6861 < button mat-mini-button color ="primary " *ngIf ="hasPermission('UPDATE_DEVICE') " (click) ="registerDevice($event, d) ">
6962 < mat-icon > check</ mat-icon > Register
7063 </ button >
7164 </ mat-list-item >
7265 </ mat-list >
73-
7466 < div class ="pagination-controls ">
7567 < button mat-button (click) ="previousDevice() " [disabled] ="!hasPreviousDevice() "> ← Previous Device</ button >
7668 < button mat-button (click) ="nextDevice() " [disabled] ="!hasNextDevice() "> Next Device →</ button >
8072 </ div >
8173 </ div >
8274 </ mat-card >
83-
8475 <!-- Logins Section -->
8576 < mat-card class ="mt-5 logins ">
8677 < div class ="logins-header ">
8778 < mat-card-title > Logins</ mat-card-title >
8879 </ div >
89-
90- <!-- Filter Toggle Button above the filter bar -->
9180 < div class ="filter-toggle-wrapper ">
9281 < button mat-stroked-button color ="primary " (click) ="toggleFilters = !toggleFilters " [attr.aria-expanded] ="toggleFilters ">
9382 < mat-icon > {{ toggleFilters ? 'close' : 'filter_list' }}</ mat-icon >
9483 {{ toggleFilters ? 'Hide Filters' : 'Show Filters' }}
9584 </ button >
9685 </ div >
97-
9886 <!-- Filter Bar -->
9987 < div class ="filter-bar " [ngClass] ="{ 'expanded': toggleFilters } ">
10088 < mat-form-field >
10189 < mat-label > Filter on User</ mat-label >
102- < input
103- type ="text "
104- matInput
105- [matAutocomplete] ="userAuto "
106- [(ngModel)] ="user "
107- (ngModelChange) ="onUserInputChange($event) "
108- />
90+ < input type ="text " matInput [matAutocomplete] ="userAuto " [(ngModel)] ="user " (ngModelChange) ="onUserInputChange($event) " />
91+ < button mat-icon-button matSuffix *ngIf ="user " aria-label ="Clear " (click) ="clearUserFilter() ">
92+ < mat-icon > close</ mat-icon >
93+ </ button >
10994 < mat-autocomplete #userAuto ="matAutocomplete " (optionSelected) ="filterLogins() " [displayWith] ="displayUser ">
11095 < mat-option *ngFor ="let u of loginSearchResults " [value] ="u ">
11196 {{ u.displayName }}
11297 </ mat-option >
11398 </ mat-autocomplete >
11499 </ mat-form-field >
115-
116100 < mat-form-field >
117101 < mat-label > Filter on Device</ mat-label >
118102 < mat-select [(ngModel)] ="device " (selectionChange) ="filterLogins() " multiple >
119103 < mat-option *ngFor ="let d of loginDeviceSearchResults " [value] ="d ">
120- {{ d.userAgent }}
104+ {{ d.uid }} - {{ d.user?.displayName || 'Unknown User' }}
121105 </ mat-option >
122106 </ mat-select >
107+ < button mat-icon-button matSuffix *ngIf ="device?.length " aria-label ="Clear " (click) ="clearDeviceFilter() ">
108+ < mat-icon > close</ mat-icon >
109+ </ button >
123110 </ mat-form-field >
124-
125111 < mat-form-field >
126112 < mat-label > Start Date</ mat-label >
127113 < input matInput [matDatepicker] ="startPicker " [(ngModel)] ="login.startDate " (dateChange) ="dateFilterChanged() " />
128114 < mat-datepicker-toggle matSuffix [for] ="startPicker "> </ mat-datepicker-toggle >
129115 < mat-datepicker #startPicker > </ mat-datepicker >
130116 </ mat-form-field >
131-
132117 < mat-form-field >
133118 < mat-label > End Date</ mat-label >
134119 < input matInput [matDatepicker] ="endPicker " [(ngModel)] ="login.endDate " (dateChange) ="dateFilterChanged() " />
135120 < mat-datepicker-toggle matSuffix [for] ="endPicker "> </ mat-datepicker-toggle >
136121 < mat-datepicker #endPicker > </ mat-datepicker >
137122 </ mat-form-field >
138-
139123 < div class ="results-select ">
140124 < mat-form-field >
141125 < mat-label > Results</ mat-label >
145129 </ mat-form-field >
146130 </ div >
147131 </ div >
148-
149- <!-- Table Wrapper -->
150132 < div class ="table-wrapper ">
151133 < table mat-table [dataSource] ="loginPage?.logins " class ="mat-elevation-z1 full-width-table ">
152134 <!-- Icon Column -->
156138 < mat-icon [ngClass] ="iconClass(login.device) "> </ mat-icon >
157139 </ td >
158140 </ ng-container >
159-
160141 <!-- User Column -->
161142 < ng-container matColumnDef ="user ">
162143 < th mat-header-cell *matHeaderCellDef > User</ th >
163144 < td mat-cell *matCellDef ="let login ">
164145 < a (click) ="gotoUser(login.user) "> {{ login.user.displayName }}</ a >
165146 </ td >
166147 </ ng-container >
167-
168148 <!-- Device Column -->
169149 < ng-container matColumnDef ="device ">
170150 < th mat-header-cell *matHeaderCellDef > Device</ th >
171151 < td mat-cell *matCellDef ="let login ">
172152 < a (click) ="gotoDevice(login.device) "> {{ login.device.uid }}</ a >
173153 </ td >
174154 </ ng-container >
175-
176155 <!-- Timestamp Column -->
177156 < ng-container matColumnDef ="timestamp ">
178157 < th mat-header-cell *matHeaderCellDef > Timestamp</ th >
179158 < td mat-cell *matCellDef ="let login ">
180159 {{ login.timestamp | date:'short' }}
181160 </ td >
182161 </ ng-container >
183-
184162 <!-- Table Rows -->
185163 < tr mat-header-row *matHeaderRowDef ="['icon', 'user', 'device', 'timestamp'] "> </ tr >
186164 < tr mat-row *matRowDef ="let row; columns: ['icon', 'user', 'device', 'timestamp'] "> </ tr >
187165 </ table >
188166 </ div >
189-
190167 <!-- Pagination -->
191168 < div class ="d-flex justify-content-end mt-3 pagination-controls ">
192169 < button mat-button (click) ="pageLogin(loginPage.prev) " [disabled] ="!showPrevious "> ← Previous</ button >
193170 < button mat-button (click) ="pageLogin(loginPage.next) " [disabled] ="!showNext "> Next →</ button >
194171 </ div >
195172 </ mat-card >
196- </ div >
173+ </ div >
0 commit comments