diff --git a/src/app/core/components/header/header.component.html b/src/app/core/components/header/header.component.html index 6eb8b36d..d7f209b9 100644 --- a/src/app/core/components/header/header.component.html +++ b/src/app/core/components/header/header.component.html @@ -28,24 +28,15 @@ diff --git a/src/app/core/components/header/header.component.ts b/src/app/core/components/header/header.component.ts index 78e56192..9fc1b268 100644 --- a/src/app/core/components/header/header.component.ts +++ b/src/app/core/components/header/header.component.ts @@ -21,8 +21,4 @@ export class HeaderComponent implements OnInit { constructor(private userService: UserService, private modalService: ModalService) {} public ngOnInit(): void {} - - public openDialog(): void { - this.modalService.openModal(SettingsComponent); - } } diff --git a/src/app/features/administration/administration.component.ts b/src/app/features/administration/administration.component.ts index 8a2ab535..bf69d01c 100644 --- a/src/app/features/administration/administration.component.ts +++ b/src/app/features/administration/administration.component.ts @@ -20,9 +20,6 @@ export class AdministrationComponent implements OnInit, OnDestroy { constructor(private route: ActivatedRoute, private userService: UserService, private modalService: ModalService) {} ngOnInit(): void { - if (!this.userService.isCurrentUserIdentifiable()) { - this.modalService.openModal(SettingsComponent); - } this.routeSubscription = this.route.data.subscribe((data: { poll: Poll }) => { console.log('data', data); if (data.poll) { diff --git a/src/app/routes-framadate.ts b/src/app/routes-framadate.ts index 01c27943..671b46c1 100644 --- a/src/app/routes-framadate.ts +++ b/src/app/routes-framadate.ts @@ -1,46 +1,40 @@ -import {Routes} from "@angular/router"; -import {HomeComponent} from "./core/components/home/home.component"; -import {PollService} from "./core/services/poll.service"; -import {PageNotFoundComponent} from "./shared/components/page-not-found/page-not-found.component"; +import { Routes } from '@angular/router'; +import { HomeComponent } from './core/components/home/home.component'; +import { PollService } from './core/services/poll.service'; +import { PageNotFoundComponent } from './shared/components/page-not-found/page-not-found.component'; export const routes: Routes = [ - {path: '', component: HomeComponent}, + { path: '', component: HomeComponent }, { path: 'user', - loadChildren: () => import('./features/user-profile/user-profile.module') - .then((m) => m.UserProfileModule), + loadChildren: () => import('./features/user-profile/user-profile.module').then((m) => m.UserProfileModule), }, { path: 'administration', loadChildren: () => - import('./features/administration/administration.module') - .then((m) => m.AdministrationModule), - resolve: {poll: PollService}, + import('./features/administration/administration.module').then((m) => m.AdministrationModule), + // resolve: {poll: PollService}, }, { path: 'poll/:slug/administration', loadChildren: () => - import('./features/administration/administration.module') - .then((m) => m.AdministrationModule), - resolve: {poll: PollService}, + import('./features/administration/administration.module').then((m) => m.AdministrationModule), + resolve: { poll: PollService }, }, { path: 'poll/:slug/consultation', - loadChildren: () => import('./features/consultation/consultation.module') - .then((m) => m.ConsultationModule), - resolve: {poll: PollService}, + loadChildren: () => import('./features/consultation/consultation.module').then((m) => m.ConsultationModule), + resolve: { poll: PollService }, }, { path: 'poll/:slug/participation', - loadChildren: () => import('./features/participation/participation.module') - .then((m) => m.ParticipationModule), - resolve: {poll: PollService}, + loadChildren: () => import('./features/participation/participation.module').then((m) => m.ParticipationModule), + resolve: { poll: PollService }, }, { path: 'oldstuff', - loadChildren: () => import('./features/old-stuff/old-stuff.module') - .then((m) => m.OldStuffModule), + loadChildren: () => import('./features/old-stuff/old-stuff.module').then((m) => m.OldStuffModule), }, - {path: 'page-not-found', component: PageNotFoundComponent}, - {path: '**', redirectTo: 'page-not-found', pathMatch: 'full'}, + { path: 'page-not-found', component: PageNotFoundComponent }, + { path: '**', redirectTo: 'page-not-found', pathMatch: 'full' }, ]; diff --git a/src/app/shared/components/settings/settings.component.ts b/src/app/shared/components/settings/settings.component.ts index e3de49b7..7420fcc6 100644 --- a/src/app/shared/components/settings/settings.component.ts +++ b/src/app/shared/components/settings/settings.component.ts @@ -16,11 +16,7 @@ export class SettingsComponent implements OnInit { constructor(private userService: UserService, public dialogRef: MatDialogRef) {} - ngOnInit(): void { - this.userSubscription = this.userService.user.subscribe((user: User) => { - this.user = user; - }); - } + ngOnInit(): void {} ngOnDestroy(): void { if (this.userSubscription) {