frontend: remove unused isInRoomForm method and streamline routing for room creation and editing

This commit is contained in:
juancarmore 2025-07-07 17:06:20 +02:00
parent 0c7b1ae1c1
commit 707d3487d3
3 changed files with 9 additions and 17 deletions

View File

@ -17,11 +17,6 @@
</div>
</div>
}
} @else if (isInRoomForm()) {
<!-- Edit and create Room view -->
<div>
<router-outlet></router-outlet>
</div>
} @else {
<div class="ov-page-container ov-mb-xxl" id="rooms-page-container">
<div class="page-header" id="rooms-page-header">

View File

@ -72,13 +72,6 @@ export class RoomsComponent implements OnInit {
await this.loadRooms();
}
isInRoomForm(): boolean {
return (
this.navigationService.containsRoute('/rooms/') &&
(this.navigationService.containsRoute('/edit') || this.navigationService.containsRoute('/new'))
);
}
async onRoomAction(action: RoomTableAction) {
switch (action.action) {
case 'create':

View File

@ -76,11 +76,15 @@ export const baseRoutes: Routes = [
},
{
path: 'rooms',
component: RoomsComponent,
children: [
{ path: 'new', component: RoomWizardComponent },
{ path: ':roomId/edit', component: RoomWizardComponent }
]
component: RoomsComponent
},
{
path: 'rooms/new',
component: RoomWizardComponent
},
{
path: 'rooms/:roomId/edit',
component: RoomWizardComponent
},
{
path: 'recordings',