Fixed issue with feature-toggling. Also implemented spinner when organization is changed.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
|
||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { ErrorListComponent } from './error-list.component';
|
||||
|
||||
describe('ErrorListComponent', () => {
|
||||
@@ -8,9 +8,9 @@ describe('ErrorListComponent', () => {
|
||||
|
||||
beforeEach(async () => {
|
||||
await TestBed.configureTestingModule({
|
||||
declarations: [ ErrorListComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
||||
declarations: [ErrorListComponent],
|
||||
}).compileComponents();
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { NgModule } from '@angular/core';
|
||||
import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core';
|
||||
import { RouterModule } from '@angular/router';
|
||||
import { IconModule } from '@msfa-shared/components/icon/icon.module';
|
||||
import { SidebarComponent } from './sidebar.component';
|
||||
|
||||
@NgModule({
|
||||
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
||||
declarations: [SidebarComponent],
|
||||
imports: [CommonModule, RouterModule, IconModule],
|
||||
exports: [SidebarComponent],
|
||||
|
||||
@@ -18,3 +18,10 @@
|
||||
|
||||
<msfa-footer class="msfa__footer"></msfa-footer>
|
||||
</div>
|
||||
|
||||
<div
|
||||
*ngIf="(userLoading$ | async) || (rolesLoading$ | async)"
|
||||
class="msfa__loading-wrapper msfa__loading-wrapper--full-screen"
|
||||
>
|
||||
<digi-icon-spinner class="msfa__spinner"></digi-icon-spinner>
|
||||
</div>
|
||||
|
||||
@@ -28,7 +28,9 @@ export class LayoutComponent extends UnsubscribeDirective {
|
||||
isLoggedIn$: Observable<boolean> = this.authenticationService.isLoggedIn$;
|
||||
selectedOrganization$: Observable<Organization> = this.userService.selectedOrganization$;
|
||||
user$: Observable<Employee> = this.userService.user$.pipe(filter(user => !!user));
|
||||
roles$: Observable<Role[]> = this.userService.userRoles$.pipe(filter(roles => !!roles?.length));
|
||||
roles$: Observable<Role[]> = this.userService.userRoles$.pipe(filter(roles => !!roles));
|
||||
userLoading$: Observable<boolean> = this.userService.userLoading$;
|
||||
rolesLoading$: Observable<boolean> = this.userService.userRolesLoading$;
|
||||
|
||||
get breadcrumbsItems(): NavigationBreadcrumbsItem[] {
|
||||
return this._breadcrumbsItems$.getValue();
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { DigiNgNavigationBreadcrumbsModule } from '@af/digi-ng/_navigation/navigation-breadcrumbs';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { HttpClient } from '@angular/common/http';
|
||||
import { NgModule } from '@angular/core';
|
||||
import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core';
|
||||
import { RouterModule } from '@angular/router';
|
||||
import { MarkdownModule } from 'ngx-markdown';
|
||||
import { FooterModule } from './components/footer/footer.module';
|
||||
@@ -11,6 +11,7 @@ import { SkipToContentModule } from './components/skip-to-content/skip-to-conten
|
||||
import { LayoutComponent } from './layout.component';
|
||||
|
||||
@NgModule({
|
||||
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
||||
declarations: [LayoutComponent],
|
||||
imports: [
|
||||
CommonModule,
|
||||
|
||||
Reference in New Issue
Block a user