frontend: add showRoomInfo input to control visibility of room ID column in recording lists

This commit is contained in:
juancarmore 2025-07-24 22:25:08 +02:00
parent 04be9c583b
commit 271b6a77bd
2 changed files with 18 additions and 12 deletions

View File

@ -110,17 +110,19 @@
} }
<!-- Room ID Column --> <!-- Room ID Column -->
@if (showRoomInfo) {
<ng-container matColumnDef="roomId"> <ng-container matColumnDef="roomId">
<th mat-header-cell *matHeaderCellDef class="room-header">Room ID</th> <th mat-header-cell *matHeaderCellDef class="room-header">Room ID</th>
<td mat-cell *matCellDef="let recording" class="room-cell"> <td mat-cell *matCellDef="let recording" class="room-cell">
<div class="room-info"> <div class="room-info">
<span class="room-id">{{ recording.roomId }}</span> <span class="room-id">{{ recording.roomId }}</span>
@if (recording.filename) { @if (recording.filename) {
<span class="filename">{{ recording.filename }}</span> <!-- <span class="filename">{{ recording.filename }}</span> -->
} }
</div> </div>
</td> </td>
</ng-container> </ng-container>
}
<!-- Status Column --> <!-- Status Column -->
<ng-container matColumnDef="status"> <ng-container matColumnDef="status">

View File

@ -85,6 +85,7 @@ export class RecordingListsComponent implements OnInit, OnChanges {
@Input() canDeleteRecordings = false; @Input() canDeleteRecordings = false;
@Input() showFilters = false; @Input() showFilters = false;
@Input() showSelection = true; @Input() showSelection = true;
@Input() showRoomInfo = true;
@Input() loading = false; @Input() loading = false;
// Host binding for styling when recordings are selected // Host binding for styling when recordings are selected
@ -184,8 +185,11 @@ export class RecordingListsComponent implements OnInit, OnChanges {
if (this.showSelection) { if (this.showSelection) {
this.displayedColumns.push('select'); this.displayedColumns.push('select');
} }
if (this.showRoomInfo) {
this.displayedColumns.push('roomId');
}
this.displayedColumns.push('roomId', 'status', 'startDate', 'duration', 'size', 'actions'); this.displayedColumns.push('status', 'startDate', 'duration', 'size', 'actions');
} }
// ===== SELECTION METHODS ===== // ===== SELECTION METHODS =====