|
|
@ -27,6 +27,8 @@ import { isDefinedAndNotNull } from '@core/utils'; |
|
|
import { EntityTableConfig } from '@home/models/entity/entities-table-config.models'; |
|
|
import { EntityTableConfig } from '@home/models/entity/entities-table-config.models'; |
|
|
import { ActionNotificationShow } from '@app/core/notification/notification.actions'; |
|
|
import { ActionNotificationShow } from '@app/core/notification/notification.actions'; |
|
|
import { TranslateService } from '@ngx-translate/core'; |
|
|
import { TranslateService } from '@ngx-translate/core'; |
|
|
|
|
|
import { environment as env } from '@env/environment'; |
|
|
|
|
|
import { UnitSystems } from '@shared/models/unit.models'; |
|
|
|
|
|
|
|
|
@Component({ |
|
|
@Component({ |
|
|
selector: 'tb-user', |
|
|
selector: 'tb-user', |
|
|
@ -36,6 +38,8 @@ import { TranslateService } from '@ngx-translate/core'; |
|
|
export class UserComponent extends EntityComponent<User> { |
|
|
export class UserComponent extends EntityComponent<User> { |
|
|
|
|
|
|
|
|
authority = Authority; |
|
|
authority = Authority; |
|
|
|
|
|
languageList = env.supportedLangs; |
|
|
|
|
|
UnitSystems = UnitSystems; |
|
|
|
|
|
|
|
|
loginAsUserEnabled$ = this.store.pipe( |
|
|
loginAsUserEnabled$ = this.store.pipe( |
|
|
select(selectAuth), |
|
|
select(selectAuth), |
|
|
@ -77,6 +81,8 @@ export class UserComponent extends EntityComponent<User> { |
|
|
additionalInfo: this.fb.group( |
|
|
additionalInfo: this.fb.group( |
|
|
{ |
|
|
{ |
|
|
description: [entity && entity.additionalInfo ? entity.additionalInfo.description : ''], |
|
|
description: [entity && entity.additionalInfo ? entity.additionalInfo.description : ''], |
|
|
|
|
|
lang: [entity && entity.additionalInfo ? entity.additionalInfo.lang : null], |
|
|
|
|
|
unitSystem: [entity && entity.additionalInfo ? entity.additionalInfo.unitSystem : null], |
|
|
defaultDashboardId: [entity && entity.additionalInfo ? entity.additionalInfo.defaultDashboardId : null], |
|
|
defaultDashboardId: [entity && entity.additionalInfo ? entity.additionalInfo.defaultDashboardId : null], |
|
|
defaultDashboardFullscreen: [entity && entity.additionalInfo ? entity.additionalInfo.defaultDashboardFullscreen : false], |
|
|
defaultDashboardFullscreen: [entity && entity.additionalInfo ? entity.additionalInfo.defaultDashboardFullscreen : false], |
|
|
homeDashboardId: [entity && entity.additionalInfo ? entity.additionalInfo.homeDashboardId : null], |
|
|
homeDashboardId: [entity && entity.additionalInfo ? entity.additionalInfo.homeDashboardId : null], |
|
|
@ -94,6 +100,10 @@ export class UserComponent extends EntityComponent<User> { |
|
|
this.entityForm.patchValue({lastName: entity.lastName}); |
|
|
this.entityForm.patchValue({lastName: entity.lastName}); |
|
|
this.entityForm.patchValue({phone: entity.phone}); |
|
|
this.entityForm.patchValue({phone: entity.phone}); |
|
|
this.entityForm.patchValue({additionalInfo: {description: entity.additionalInfo ? entity.additionalInfo.description : ''}}); |
|
|
this.entityForm.patchValue({additionalInfo: {description: entity.additionalInfo ? entity.additionalInfo.description : ''}}); |
|
|
|
|
|
this.entityForm.patchValue({additionalInfo: |
|
|
|
|
|
{lang: entity.additionalInfo ? entity.additionalInfo.lang : env.defaultLang}}); |
|
|
|
|
|
this.entityForm.patchValue({additionalInfo: |
|
|
|
|
|
{unitSystem: entity.additionalInfo ? entity.additionalInfo.unitSystem : null}}); |
|
|
this.entityForm.patchValue({additionalInfo: |
|
|
this.entityForm.patchValue({additionalInfo: |
|
|
{defaultDashboardId: entity.additionalInfo ? entity.additionalInfo.defaultDashboardId : null}}); |
|
|
{defaultDashboardId: entity.additionalInfo ? entity.additionalInfo.defaultDashboardId : null}}); |
|
|
this.entityForm.patchValue({additionalInfo: |
|
|
this.entityForm.patchValue({additionalInfo: |
|
|
|