Skip to content

Commit

Permalink
Bug bix - #3709 (#699) (#703)
Browse files Browse the repository at this point in the history
* Bug bix - #3709

Safff user redirect to staff dashboard.

* bug fix - #3705

Redirect user to create account when current account is null.
  • Loading branch information
mengdong19 authored May 19, 2020
1 parent dc7bdd9 commit 3900b6f
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 11 deletions.
20 changes: 10 additions & 10 deletions auth-web/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions auth-web/src/components/auth/EntityManagement.vue
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,9 @@ export default class EntityManagement extends Mixins(AccountChangeMixin, NextPag
}
private async mounted () {
if (this.currentMembership === undefined) {
this.$router.push(`/${Pages.CREATE_ACCOUNT}`)
}
// If pending approval on current account, redirect away
if (this.currentMembership?.membershipStatus !== MembershipStatus.Active) {
this.$router.push(this.getNextPageUrl())
Expand Down
3 changes: 2 additions & 1 deletion auth-web/src/util/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ export enum Pages {
USER_PROFILE_TERMS = 'userprofileterms',
USER_PROFILE_TERMS_DECLINE = 'unauthorizedtermsdecline',
HOME = 'home',
EDIT_ACCOUNT_TYPE= '/change-account'
EDIT_ACCOUNT_TYPE= '/change-account',
STAFF_DASHBOARD= 'searchbusiness'
}

export enum Account {
Expand Down
5 changes: 5 additions & 0 deletions auth-web/src/views/auth/HomeView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,7 @@ export default class HomeView extends Vue {
private noPasscodeDialog = false
private accountDialog = false
private isDirSearchUser: boolean = false
private isStaffUser: boolean = false
private readonly resetCurrentOrganisation!: () => void
private get showManageBusinessesBtn (): boolean {
Expand All @@ -286,6 +287,10 @@ export default class HomeView extends Vue {
mounted () {
this.isDirSearchUser = (this.currentUser?.loginSource === LoginSource.BCROS)
this.isStaffUser = (this.currentUser?.loginSource === LoginSource.IDIR)
if (this.isStaffUser) {
this.$router.push(`/${Pages.STAFF_DASHBOARD}`)
}
}
}
</script>
Expand Down

0 comments on commit 3900b6f

Please sign in to comment.