Skip to content

Commit

Permalink
PEnding approval for returning users added
Browse files Browse the repository at this point in the history
  • Loading branch information
saravanpa-aot committed Apr 14, 2021
1 parent 7a565f9 commit 5769850
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions auth-web/src/routes/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,10 +120,10 @@ router.beforeEach((to, from, next) => {
}
} else if (currentOrganization?.statusCode === AccountStatus.PENDING_STAFF_REVIEW) {
console.log('[Navigation Guard] Redirecting user to PENDING_APPROVAL since user has pending affidavits')
return next({ path: `/${Pages.PENDING_APPROVAL}/${currentAccountSettings?.label}/true` }) // TODO put the account name back once its avaialable ;may be needs a fix in sbc-common
return next({ path: `/${Pages.PENDING_APPROVAL}/${encodeURIComponent(btoa(currentAccountSettings?.label))}/true` }) // TODO put the account name back once its avaialable ;may be needs a fix in sbc-common
} else if (currentAccountSettings && currentMembership?.membershipStatus === MembershipStatus.Pending) {
console.log('[Navigation Guard] Redirecting user to PENDING_APPROVAL since users membership status is pending')
return next({ path: `/${Pages.PENDING_APPROVAL}/${currentAccountSettings?.label}` })
return next({ path: `/${Pages.PENDING_APPROVAL}/${encodeURIComponent(btoa(currentAccountSettings?.label))}` })
} else if (!currentOrganization || currentMembership?.membershipStatus !== MembershipStatus.Active) {
console.log('[Navigation Guard] Redirecting user to Create Account since users nerither has account nor an active status')
switch (currentUser?.loginSource) {
Expand Down

0 comments on commit 5769850

Please sign in to comment.