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

View File

@ -85,6 +85,7 @@ export class RecordingListsComponent implements OnInit, OnChanges {
@Input() canDeleteRecordings = false;
@Input() showFilters = false;
@Input() showSelection = true;
@Input() showRoomInfo = true;
@Input() loading = false;
// Host binding for styling when recordings are selected
@ -184,8 +185,11 @@ export class RecordingListsComponent implements OnInit, OnChanges {
if (this.showSelection) {
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 =====