Updated fulscreen logic
This commit is contained in:
parent
5229efb6ce
commit
5eb7b502da
@ -30,7 +30,7 @@ import { Store } from '@ngrx/store';
|
|||||||
import { AppState } from '@core/core.state';
|
import { AppState } from '@core/core.state';
|
||||||
import { Authority } from '@shared/models/authority.enum';
|
import { Authority } from '@shared/models/authority.enum';
|
||||||
import { BehaviorSubject, Observable, of } from 'rxjs';
|
import { BehaviorSubject, Observable, of } from 'rxjs';
|
||||||
import { getCurrentAuthUser } from '@core/auth/auth.selectors';
|
import { getCurrentAuthState, getCurrentAuthUser } from '@core/auth/auth.selectors';
|
||||||
import { WidgetContext } from '@home/models/widget-component.models';
|
import { WidgetContext } from '@home/models/widget-component.models';
|
||||||
import {
|
import {
|
||||||
AbstractUserDashboardInfo,
|
AbstractUserDashboardInfo,
|
||||||
@ -48,8 +48,6 @@ import { Direction, SortOrder } from '@shared/models/page/sort-order';
|
|||||||
import { MatSort } from '@angular/material/sort';
|
import { MatSort } from '@angular/material/sort';
|
||||||
import { DashboardInfo } from '@shared/models/dashboard.models';
|
import { DashboardInfo } from '@shared/models/dashboard.models';
|
||||||
import { DashboardAutocompleteComponent } from '@shared/components/dashboard-autocomplete.component';
|
import { DashboardAutocompleteComponent } from '@shared/components/dashboard-autocomplete.component';
|
||||||
import { UserService } from '@core/http/user.service';
|
|
||||||
import { User } from '@shared/models/user.model';
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'tb-recent-dashboards-widget',
|
selector: 'tb-recent-dashboards-widget',
|
||||||
@ -82,19 +80,15 @@ export class RecentDashboardsWidgetComponent extends PageComponent implements On
|
|||||||
|
|
||||||
dirty = false;
|
dirty = false;
|
||||||
public customerId: string;
|
public customerId: string;
|
||||||
private isFullscreenMode = false;
|
private isFullscreenMode = getCurrentAuthState(this.store).forceFullscreen;
|
||||||
|
|
||||||
constructor(protected store: Store<AppState>,
|
constructor(protected store: Store<AppState>,
|
||||||
private cd: ChangeDetectorRef,
|
private cd: ChangeDetectorRef,
|
||||||
private userService: UserService,
|
|
||||||
private userSettingService: UserSettingsService) {
|
private userSettingService: UserSettingsService) {
|
||||||
super(store);
|
super(store);
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.userService.getUser(this.authUser.userId).subscribe((userInfo: User) => {
|
|
||||||
this.isFullscreenMode = userInfo.additionalInfo.defaultDashboardFullscreen;
|
|
||||||
});
|
|
||||||
if (this.authUser.authority === Authority.CUSTOMER_USER) {
|
if (this.authUser.authority === Authority.CUSTOMER_USER) {
|
||||||
this.customerId = this.authUser.customerId;
|
this.customerId = this.authUser.customerId;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user