Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
refactor: TT-189 refactor some names
  • Loading branch information
thegreatyamori committed Apr 6, 2021
commit 1f82410a04ba142d03f9d44b024bd07c9fd85257
8 changes: 2 additions & 6 deletions src/app/app-routing.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,7 @@ const routes: Routes = [
{ path: 'activities-management', component: ActivitiesManagementComponent },
{ path: 'customers-management', canActivate: [AdminGuard], component: CustomerComponent },
{ path: 'users', canActivate: [AdminGuard], component: UsersComponent },
{
path: 'technology-report',
canActivate: [AdminGuard, TechnologiesReportGuard],
component: TechnologyReportComponent,
},
{ path: 'technology-report', canActivate: [AdminGuard, TechnologiesReportGuard], component: TechnologyReportComponent },
{ path: '', pathMatch: 'full', redirectTo: 'time-clock' },
],
},
Expand All @@ -41,4 +37,4 @@ const routes: Routes = [
imports: [RouterModule.forRoot(routes)],
exports: [RouterModule],
})
export class AppRoutingModule {}
export class AppRoutingModule { }
1 change: 1 addition & 0 deletions src/app/guards/admin-guard/admin.guard.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ describe('AdminGuard', () => {
expect(router.navigate).toHaveBeenCalledWith(['login']);
} else {
expect(router.navigate).not.toHaveBeenCalled();
expect(enabled).toBeTrue();
}
});
}
Expand Down
6 changes: 3 additions & 3 deletions src/app/modules/home/home.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { FeatureSwitchGroupService } from '../shared/feature-toggles/switch-grou
styleUrls: ['./home.component.scss'],
})
export class HomeComponent implements OnInit, OnDestroy {
ftSwitchGroup$: Subscription;
FTSwitchGroup$: Subscription;

constructor(
private featureSwitchGroup: FeatureSwitchGroupService,
Expand All @@ -20,7 +20,7 @@ export class HomeComponent implements OnInit, OnDestroy {
) {}

ngOnInit(): void {
this.ftSwitchGroup$ = this.featureSwitchGroup.isActivated().subscribe((enabled) => {
this.FTSwitchGroup$ = this.featureSwitchGroup.isActivated().subscribe((enabled) => {
if (enabled) {
const userId = this.azureAdB2CService.getUserId();
this.store.dispatch(new LoadUser(userId));
Expand All @@ -29,6 +29,6 @@ export class HomeComponent implements OnInit, OnDestroy {
}

ngOnDestroy() {
this.ftSwitchGroup$.unsubscribe();
this.FTSwitchGroup$.unsubscribe();
}
}