From f2bd16a0c41d889600aa534001f83902ac741c08 Mon Sep 17 00:00:00 2001 From: KiruthigaManivannan <162679756+KiruthigaManivannan@users.noreply.github.com> Date: Thu, 6 Jun 2024 18:45:17 +0530 Subject: [PATCH] PM-1938 Migrate Accept Emergency Component (#9177) * PM-1938 Migrate Accept Emergency Component * PM-1938 Updated OSS routing module * PM-1938 Updated anon layout path and removed width * PM-1938 Addressed review comments * PM-1938 - Move canActivate up a level. * PM-1938 - Consolidate routing after merging in main. --------- Co-authored-by: Jared Snider <116684653+JaredSnider-Bitwarden@users.noreply.github.com> Co-authored-by: Jared Snider --- .../accept/accept-emergency.component.html | 64 +++++++++---------- apps/web/src/app/oss-routing.module.ts | 32 +++++++--- 2 files changed, 52 insertions(+), 44 deletions(-) diff --git a/apps/web/src/app/auth/emergency-access/accept/accept-emergency.component.html b/apps/web/src/app/auth/emergency-access/accept/accept-emergency.component.html index 4690a4e63a5..3e1db406316 100644 --- a/apps/web/src/app/auth/emergency-access/accept/accept-emergency.component.html +++ b/apps/web/src/app/auth/emergency-access/accept/accept-emergency.component.html @@ -1,45 +1,39 @@ -
+
- -

+

- {{ "loading" | i18n }} + {{ "loading" | i18n }}

-
-
-
-

{{ "emergencyAccess" | i18n }}

-
-
-

- {{ name }} -

-

{{ "acceptEmergencyAccess" | i18n }}

-
- -
-
-
+
+

+ {{ name }} +

+

{{ "acceptEmergencyAccess" | i18n }}

+
+
diff --git a/apps/web/src/app/oss-routing.module.ts b/apps/web/src/app/oss-routing.module.ts index 8509e987eb4..77e51172269 100644 --- a/apps/web/src/app/oss-routing.module.ts +++ b/apps/web/src/app/oss-routing.module.ts @@ -128,15 +128,6 @@ const routes: Routes = [ component: AcceptOrganizationComponent, data: { titleId: "joinOrganization", doNotSaveUrl: false } satisfies DataProperties, }, - { - path: "accept-emergency", - canActivate: [deepLinkGuard()], - data: { titleId: "acceptEmergency", doNotSaveUrl: false } satisfies DataProperties, - loadComponent: () => - import("./auth/emergency-access/accept/accept-emergency.component").then( - (mod) => mod.AcceptEmergencyComponent, - ), - }, { path: "accept-families-for-enterprise", component: AcceptFamilySponsorshipComponent, @@ -223,6 +214,29 @@ const routes: Routes = [ titleId: "recoverAccountTwoStep", } satisfies DataProperties & AnonLayoutWrapperData, }, + { + path: "accept-emergency", + canActivate: [deepLinkGuard()], + children: [ + { + path: "", + data: { + pageTitle: "emergencyAccess", + titleId: "acceptEmergency", + doNotSaveUrl: false, + } satisfies DataProperties & AnonLayoutWrapperData, + loadComponent: () => + import("./auth/emergency-access/accept/accept-emergency.component").then( + (mod) => mod.AcceptEmergencyComponent, + ), + }, + { + path: "", + component: EnvironmentSelectorComponent, + outlet: "environment-selector", + }, + ], + }, ], }, {