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>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
} @else if (isInRoomForm()) {
|
|
||||||
<!-- Edit and create Room view -->
|
|
||||||
<div>
|
|
||||||
<router-outlet></router-outlet>
|
|
||||||
</div>
|
|
||||||
} @else {
|
} @else {
|
||||||
<div class="ov-page-container ov-mb-xxl" id="rooms-page-container">
|
<div class="ov-page-container ov-mb-xxl" id="rooms-page-container">
|
||||||
<div class="page-header" id="rooms-page-header">
|
<div class="page-header" id="rooms-page-header">
|
||||||
|
|||||||
@ -72,13 +72,6 @@ export class RoomsComponent implements OnInit {
|
|||||||
await this.loadRooms();
|
await this.loadRooms();
|
||||||
}
|
}
|
||||||
|
|
||||||
isInRoomForm(): boolean {
|
|
||||||
return (
|
|
||||||
this.navigationService.containsRoute('/rooms/') &&
|
|
||||||
(this.navigationService.containsRoute('/edit') || this.navigationService.containsRoute('/new'))
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
async onRoomAction(action: RoomTableAction) {
|
async onRoomAction(action: RoomTableAction) {
|
||||||
switch (action.action) {
|
switch (action.action) {
|
||||||
case 'create':
|
case 'create':
|
||||||
|
|||||||
@ -76,11 +76,15 @@ export const baseRoutes: Routes = [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'rooms',
|
path: 'rooms',
|
||||||
component: RoomsComponent,
|
component: RoomsComponent
|
||||||
children: [
|
},
|
||||||
{ path: 'new', component: RoomWizardComponent },
|
{
|
||||||
{ path: ':roomId/edit', component: RoomWizardComponent }
|
path: 'rooms/new',
|
||||||
]
|
component: RoomWizardComponent
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: 'rooms/:roomId/edit',
|
||||||
|
component: RoomWizardComponent
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'recordings',
|
path: 'recordings',
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user