Skip to content

Commit

Permalink
Remove unused resolvers in organizations
Browse files Browse the repository at this point in the history
  • Loading branch information
ajaygandecha committed May 25, 2024
1 parent 47133c5 commit fcf9e16
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,11 @@
*/

import { Component, Signal } from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router';
import { Router } from '@angular/router';
import { Organization } from '../organization.model';
import { MatSnackBar } from '@angular/material/snack-bar';
import { Observable } from 'rxjs';
import { Profile } from '../../profile/profile.service';
import { profileResolver } from '../../profile/profile.resolver';
import { Profile, ProfileService } from '../../profile/profile.service';
import { OrganizationService } from '../organization.service';
import { PermissionService } from '../../permission.service';

Expand All @@ -36,25 +35,19 @@ export class OrganizationAdminComponent {
public static Route = {
path: 'admin',
component: OrganizationAdminComponent,
title: 'Organization Administration',
resolve: { profile: profileResolver }
title: 'Organization Administration'
};

constructor(
private route: ActivatedRoute,
private router: Router,
private snackBar: MatSnackBar,
private profileService: ProfileService,
private organizationService: OrganizationService,
private permissionService: PermissionService
) {
this.profile = this.profileService.profile()!;
this.organizations = organizationService.organizations;
this.displayedOrganizations = organizationService.adminOrganizations;

/** Get the profile data of the signed in user */
const data = this.route.snapshot.data as {
profile: Profile;
};
this.profile = data.profile;
}

/** Resposible for generating delete and create buttons in HTML code when admin signed in.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@
[organization]="organization"
[profile]="profile" />

<div class="event-listing-container">
<!-- <event-list
<!-- <div class="event-listing-container">
<event-list
[eventsPerDay]="eventsPerDay"
[organization]="organization()"
[organization]="organization"
[selectedEvent]="null"
[disableLinks]="false"
[showHeader]="true"
[showCreateButton]="(eventCreationPermission$ | async)!" /> -->
</div>
[showCreateButton]="(eventCreationPermission$ | async)!" />
</div> -->
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
*/

import { Component, Signal, effect } from '@angular/core';
import { profileResolver } from '../../profile/profile.resolver';
import { Organization } from '../organization.model';
import { MatSnackBar } from '@angular/material/snack-bar';
import { Profile, ProfileService } from '../../profile/profile.service';
Expand All @@ -27,8 +26,7 @@ export class OrganizationPageComponent {
path: '',
title: 'CS Organizations',
component: OrganizationPageComponent,
canActivate: [],
resolve: { profile: profileResolver }
canActivate: []
};

/** Current search bar query on the organization page. */
Expand Down

0 comments on commit fcf9e16

Please sign in to comment.