From 6592dac7fcef770f9dbd06006d256806ccbd4048 Mon Sep 17 00:00:00 2001 From: CSantosM <4a.santos@gmail.com> Date: Wed, 25 Feb 2026 15:28:15 +0100 Subject: [PATCH] frontend: update navigation logic for room cancellation and updates in RoomWizardComponent --- .../rooms/pages/room-wizard/room-wizard.component.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/meet-ce/frontend/projects/shared-meet-components/src/lib/domains/rooms/pages/room-wizard/room-wizard.component.ts b/meet-ce/frontend/projects/shared-meet-components/src/lib/domains/rooms/pages/room-wizard/room-wizard.component.ts index f9ad1a09..23fd1274 100644 --- a/meet-ce/frontend/projects/shared-meet-components/src/lib/domains/rooms/pages/room-wizard/room-wizard.component.ts +++ b/meet-ce/frontend/projects/shared-meet-components/src/lib/domains/rooms/pages/room-wizard/room-wizard.component.ts @@ -130,7 +130,8 @@ export class RoomWizardComponent implements OnInit { async onCancel() { this.wizardService.resetWizard(); - await this.navigationService.navigateTo('/rooms', undefined, true); + const destination = this.editMode && this.roomId ? `/rooms/${this.roomId}` : '/rooms'; + await this.navigationService.navigateTo(destination, undefined, true); } async createRoomBasic(roomName?: string) { @@ -163,7 +164,7 @@ export class RoomWizardComponent implements OnInit { try { if (this.editMode && this.roomId && roomOptions.config) { await this.roomService.updateRoomConfig(this.roomId, roomOptions.config); - await this.navigationService.navigateTo('/rooms', undefined, true); + await this.navigationService.navigateTo(`/rooms/${this.roomId}`, undefined, true); this.notificationService.showSnackbar('Room updated successfully'); } else { // Create new room @@ -178,7 +179,8 @@ export class RoomWizardComponent implements OnInit { const errorMessage = `Failed to ${this.editMode ? 'update' : 'create'} room`; this.notificationService.showSnackbar(errorMessage); console.error(errorMessage, error); - await this.navigationService.navigateTo('/rooms', undefined, true); + const destination = this.editMode && this.roomId ? `/rooms/${this.roomId}` : '/rooms'; + await this.navigationService.navigateTo(destination, undefined, true); } finally { this.wizardService.resetWizard(); // Deactivate loading state