frontend: remove unused isInRoomForm method and streamline routing for room creation and editing
This commit is contained in:
parent
0c7b1ae1c1
commit
707d3487d3
@ -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">
|
||||
|
||||
@ -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':
|
||||
|
||||
@ -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',
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user