This commit introduces a new `DetailsComponent` for displaying detailed punishment data and establishes a route to view punishment history by ID and type. It also updates the API to support fetching individual punishment records and refines database mappings for improved data handling.
54 lines
2.0 KiB
HTML
54 lines
2.0 KiB
HTML
<ng-container *ngIf="history.length === 0">
|
|
<p>No history found</p>
|
|
</ng-container>
|
|
|
|
<ng-container *ngIf="history.length > 0">
|
|
<table [cellSpacing]="0">
|
|
<div class="historyTableHead">
|
|
<thead>
|
|
<tr>
|
|
<th class="historyType">Type</th>
|
|
<th class="historyPlayer">Player</th>
|
|
<th class="historyPlayer">Banned By</th>
|
|
<th class="historyReason">Reason</th>
|
|
<th class="historyDate">Date</th>
|
|
<th class="historyDate">Expires</th>
|
|
</tr>
|
|
</thead>
|
|
</div>
|
|
<div>
|
|
<tbody>
|
|
<tr class="historyPlayerRow" *ngFor="let entry of history">
|
|
<td class="historyType" (click)="showDetailedPunishment(entry)">
|
|
{{ this.historyFormat.getType(entry) }}
|
|
</td>
|
|
<td class="historyPlayer" (click)="setSearch(entry.type, entry.username, 'player')">
|
|
<div class="playerContainer">
|
|
<img class="avatar" [ngSrc]="this.historyFormat.getAvatarUrl(entry.uuid)" width="25" height="25"
|
|
alt="{{entry.username}}'s Minecraft skin">
|
|
<span class="username">{{ entry.username }}</span>
|
|
</div>
|
|
</td>
|
|
<td class="historyPlayer" (click)="setSearch(entry.type, entry.punishedBy, 'staff')">
|
|
<div class="playerContainer">
|
|
<img class="avatar" [ngSrc]="this.historyFormat.getAvatarUrl(entry.punishedByUuid)" width="25" height="25"
|
|
alt="{{entry.punishedBy}}'s Minecraft skin">
|
|
<span>{{ entry.punishedBy }}</span>
|
|
</div>
|
|
</td>
|
|
<td class="historyReason" (click)="showDetailedPunishment(entry)">
|
|
{{ entry.reason | removeTrailingPeriod }}
|
|
</td>
|
|
<td class="historyDate" (click)="showDetailedPunishment(entry)">
|
|
{{ this.historyFormat.getPunishmentTime(entry) }}
|
|
</td>
|
|
<td class="historyDate" (click)="showDetailedPunishment(entry)">
|
|
{{ this.historyFormat.getExpiredTime(entry) }}
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</div>
|
|
</table>
|
|
</ng-container>
|
|
|