diff --git a/src/app/cris-layout/cris-layout-loader/cris-layout-horizontal/cris-layout-navbar/cris-layout-navbar.component.html b/src/app/cris-layout/cris-layout-loader/cris-layout-horizontal/cris-layout-navbar/cris-layout-navbar.component.html index 2e5cd07b045..ac889721a2b 100644 --- a/src/app/cris-layout/cris-layout-loader/cris-layout-horizontal/cris-layout-navbar/cris-layout-navbar.component.html +++ b/src/app/cris-layout/cris-layout-loader/cris-layout-horizontal/cris-layout-navbar/cris-layout-navbar.component.html @@ -1,4 +1,4 @@ - diff --git a/src/app/cris-layout/cris-layout-loader/cris-layout-horizontal/cris-layout-navbar/cris-layout-navbar.component.spec.ts b/src/app/cris-layout/cris-layout-loader/cris-layout-horizontal/cris-layout-navbar/cris-layout-navbar.component.spec.ts index 824d9f4c741..e17cd0bc769 100644 --- a/src/app/cris-layout/cris-layout-loader/cris-layout-horizontal/cris-layout-navbar/cris-layout-navbar.component.spec.ts +++ b/src/app/cris-layout/cris-layout-loader/cris-layout-horizontal/cris-layout-navbar/cris-layout-navbar.component.spec.ts @@ -13,7 +13,10 @@ import { TranslateLoader, TranslateModule, } from '@ngx-translate/core'; -import { BehaviorSubject } from 'rxjs'; +import { + BehaviorSubject, + of, +} from 'rxjs'; import { CrisLayoutTab } from '../../../../core/layout/models/tab.model'; import { Item } from '../../../../core/shared/item.model'; @@ -101,6 +104,7 @@ describe('CrisLayoutNavbarComponent', () => { component.tabs = loaderMultilevelTabs; component.item = mockItem; component.activeTab$ = new BehaviorSubject(loaderMultilevelTabs[0]); + component.isXsOrSm$ = of(true); component.ngOnInit(); fixture.detectChanges(); }); @@ -114,6 +118,7 @@ describe('CrisLayoutNavbarComponent', () => { beforeEach(() => { windowServiceStub.setWidth(400); + component.ngOnInit(); fixture.detectChanges(); }); diff --git a/src/app/cris-layout/cris-layout-loader/cris-layout-horizontal/cris-layout-navbar/cris-layout-navbar.component.ts b/src/app/cris-layout/cris-layout-loader/cris-layout-horizontal/cris-layout-navbar/cris-layout-navbar.component.ts index ed0c3ed28d3..6ddd34f083f 100644 --- a/src/app/cris-layout/cris-layout-loader/cris-layout-horizontal/cris-layout-navbar/cris-layout-navbar.component.ts +++ b/src/app/cris-layout/cris-layout-loader/cris-layout-horizontal/cris-layout-navbar/cris-layout-navbar.component.ts @@ -13,6 +13,7 @@ import { Output, } from '@angular/core'; import { TranslateModule } from '@ngx-translate/core'; +import { Observable } from 'rxjs'; import { CrisLayoutTab } from '../../../../core/layout/models/tab.model'; import { Item } from '../../../../core/shared/item.model'; @@ -59,8 +60,11 @@ export class CrisLayoutNavbarComponent extends CrisLayoutTabsComponent implement windowService = inject(HostWindowService); + isXsOrSm$: Observable; + ngOnInit(): void { this.init(); + this.isXsOrSm$ = this.windowService.isXsOrSm(); } emitSelected(selectedTab) { diff --git a/src/app/cris-layout/cris-layout-loader/cris-layout-vertical/cris-layout-sidebar/cris-layout-sidebar.component.html b/src/app/cris-layout/cris-layout-loader/cris-layout-vertical/cris-layout-sidebar/cris-layout-sidebar.component.html index 250bf88acf0..63fe4ba6e26 100644 --- a/src/app/cris-layout/cris-layout-loader/cris-layout-vertical/cris-layout-sidebar/cris-layout-sidebar.component.html +++ b/src/app/cris-layout/cris-layout-loader/cris-layout-vertical/cris-layout-sidebar/cris-layout-sidebar.component.html @@ -1,6 +1,6 @@ -
-