Administration/src/app/views/dashboard/dashboard.component.html
Rajbir Singh f0030f9222
All checks were successful
Quality Check / Linting (pull_request) Successful in 31s
Quality Check / Linting (push) Successful in 31s
TD-36: Implement Administration player filter options
2025-03-06 10:59:13 +01:00

43 lines
1.9 KiB
HTML

<div class="dashboard">
@if (authService.$user|async) {
<div class="dashboard__search">
<mat-form-field class="dashboard__search__input-field">
<mat-icon matPrefix>search</mat-icon>
<input matInput placeholder="" #searchbar>
</mat-form-field>
<mat-form-field>
<mat-label>Banned</mat-label>
<mat-select>
<mat-option>Reset</mat-option>
<mat-option>Banned</mat-option>
<mat-option>Not Banned</mat-option>
</mat-select>
</mat-form-field>
<button mat-fab class="shadowless" (click)="onSearch(searchbar)">
<mat-icon>check</mat-icon>
</button>
<button mat-fab class="warn shadowless" (click)="resetFilter(searchbar)">
<mat-icon>backspace</mat-icon>
</button>
</div>
<mat-table [dataSource]="usersDataSource" class="dashboard__table">
<ng-container matColumnDef="username">
<th mat-header-cell *matHeaderCellDef>Username</th>
<td mat-cell *matCellDef="let user"> {{ user.username }}</td>
</ng-container>
<ng-container matColumnDef="actions">
<th mat-header-cell *matHeaderCellDef>Actions</th>
<td mat-cell *matCellDef="let user">
<button mat-mini-fab class="warn shadowless" (click)="banPlayer(user)">
<mat-icon>block</mat-icon>
</button>
</td>
</ng-container>
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
<tr mat-row *matRowDef="let row; columns: displayedColumns;"></tr>
</mat-table>
} @else {
<p>Du musst eingeloggt sein, um dies zu sehen</p>
}
</div>