diff --git a/src/app/admin/states/f-units/f-units.component.html b/src/app/admin/states/f-units/f-units.component.html index ca561aec2..1ec03f641 100644 --- a/src/app/admin/states/f-units/f-units.component.html +++ b/src/app/admin/states/f-units/f-units.component.html @@ -98,7 +98,7 @@

{{ title }}

- @if (mode === 'tutor') { + @if (mode === 'tutor' || mode === 'auditor') { {{ title }} [uiParams]="{unitId: row.id}" > } - @if (mode === 'admin' || mode === 'auditor') { + @if (mode === 'admin') { {{ title }} - @if (mode === 'admin' || mode === 'auditor') { + @if (mode === 'admin') { + diff --git a/src/app/home/states/home/home.component.ts b/src/app/home/states/home/home.component.ts index 40dd37118..aacb6d1e2 100644 --- a/src/app/home/states/home/home.component.ts +++ b/src/app/home/states/home/home.component.ts @@ -14,13 +14,11 @@ import {Subscription} from 'rxjs'; export class HomeComponent implements OnInit, OnDestroy { projects: Project[]; unitRoles: UnitRole[]; - units: Unit[] = []; showSpinner: boolean; dataLoaded: boolean; notEnrolled: boolean; ifAdmin: boolean; ifConvenor: boolean; - loadingUnits: boolean; loadingUnitRoles: boolean; loadingProjects: boolean; @@ -80,27 +78,12 @@ export class HomeComponent implements OnInit, OnDestroy { this.ifAdmin = this.currentUser.role === 'Admin' || this.currentUser.role === 'Auditor'; this.ifConvenor = this.currentUser.role === 'Convenor'; - - if (this.ifAdmin) { - this.loadingUnits = true; - this.subscriptions.push( - this.unitService.query().subscribe({ - next: (units) => this.unitsLoaded(units), - error: (err) => {}, - }), - ); - } } get currentUser(): User { return this.userService.currentUser; } - unitsLoaded(units: Unit[]): void { - this.units = units; - this.loadingUnits = false; - } - unitRolesLoaded(unitRoles: UnitRole[]): void { this.unitRoles = unitRoles; this.loadingUnitRoles = false;