Skip to content

Commit

Permalink
✨ login page: no redirection if election hasn't started (#225) (#226)
Browse files Browse the repository at this point in the history
Parent issue: sequentech/meta#331
  • Loading branch information
edulix authored Feb 16, 2024
1 parent f2e9d9e commit 567aa23
Showing 1 changed file with 0 additions and 21 deletions.
21 changes: 0 additions & 21 deletions avElection/public-controller/public-controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,27 +121,6 @@ angular
ConfigService.theme = presentation.theme;
}

// if state is not started but we are in login, redirect to default url
if (
$state.current.name === "election.public.show.login" &&
!_.contains(
['started', 'resumed'],
value.data.payload.state
) &&
$window.location.pathname !== ConfigService.defaultRoute
) {
if (
!presentation ||
!presentation.extra_options ||
!presentation.extra_options.disable__public_home
) {
$window.location.href = '/election/' + $stateParams.id + '/public/home';
} else {
window.location.href = ConfigService.defaultRoute;
}
return;
}

// if we are showing the election home but it is disabled then perform
// a redirect
if (
Expand Down

0 comments on commit 567aa23

Please sign in to comment.