Merge pull request #7925 from ArtemDzhereleiko/AD/notification-system/user-phone-number
Added phone number to user profile
This commit is contained in:
commit
2bc5771472
@ -718,6 +718,7 @@ export class EntityService {
|
|||||||
entityFieldKeys.push(entityFields.email.keyName);
|
entityFieldKeys.push(entityFields.email.keyName);
|
||||||
entityFieldKeys.push(entityFields.firstName.keyName);
|
entityFieldKeys.push(entityFields.firstName.keyName);
|
||||||
entityFieldKeys.push(entityFields.lastName.keyName);
|
entityFieldKeys.push(entityFields.lastName.keyName);
|
||||||
|
entityFieldKeys.push(entityFields.phone.keyName);
|
||||||
break;
|
break;
|
||||||
case EntityType.TENANT:
|
case EntityType.TENANT:
|
||||||
case EntityType.CUSTOMER:
|
case EntityType.CUSTOMER:
|
||||||
|
|||||||
@ -56,6 +56,11 @@
|
|||||||
<mat-label translate>user.last-name</mat-label>
|
<mat-label translate>user.last-name</mat-label>
|
||||||
<input matInput formControlName="lastName"/>
|
<input matInput formControlName="lastName"/>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
<tb-phone-input [required]="false"
|
||||||
|
[label]="'contact.phone'"
|
||||||
|
[enableFlagsSelect]="true"
|
||||||
|
formControlName="phone">
|
||||||
|
</tb-phone-input>
|
||||||
<mat-form-field class="mat-block">
|
<mat-form-field class="mat-block">
|
||||||
<mat-label translate>language.language</mat-label>
|
<mat-label translate>language.language</mat-label>
|
||||||
<mat-select formControlName="language">
|
<mat-select formControlName="language">
|
||||||
|
|||||||
@ -63,6 +63,7 @@ export class ProfileComponent extends PageComponent implements OnInit, HasConfir
|
|||||||
email: ['', [Validators.required, Validators.email]],
|
email: ['', [Validators.required, Validators.email]],
|
||||||
firstName: [''],
|
firstName: [''],
|
||||||
lastName: [''],
|
lastName: [''],
|
||||||
|
phone: [''],
|
||||||
language: [''],
|
language: [''],
|
||||||
homeDashboardId: [null],
|
homeDashboardId: [null],
|
||||||
homeDashboardHideToolbar: [true]
|
homeDashboardHideToolbar: [true]
|
||||||
@ -87,6 +88,7 @@ export class ProfileComponent extends PageComponent implements OnInit, HasConfir
|
|||||||
tenantId: user.tenantId,
|
tenantId: user.tenantId,
|
||||||
customerId: user.customerId,
|
customerId: user.customerId,
|
||||||
email: user.email,
|
email: user.email,
|
||||||
|
phone: user.phone,
|
||||||
firstName: user.firstName,
|
firstName: user.firstName,
|
||||||
id: user.id,
|
id: user.id,
|
||||||
lastName: user.lastName,
|
lastName: user.lastName,
|
||||||
|
|||||||
@ -92,6 +92,11 @@
|
|||||||
<mat-label translate>user.last-name</mat-label>
|
<mat-label translate>user.last-name</mat-label>
|
||||||
<input matInput formControlName="lastName">
|
<input matInput formControlName="lastName">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
<tb-phone-input [required]="false"
|
||||||
|
[label]="'contact.phone'"
|
||||||
|
[enableFlagsSelect]="true"
|
||||||
|
formControlName="phone">
|
||||||
|
</tb-phone-input>
|
||||||
<div formGroupName="additionalInfo" fxLayout="column">
|
<div formGroupName="additionalInfo" fxLayout="column">
|
||||||
<mat-form-field class="mat-block">
|
<mat-form-field class="mat-block">
|
||||||
<mat-label translate>user.description</mat-label>
|
<mat-label translate>user.description</mat-label>
|
||||||
|
|||||||
@ -73,6 +73,7 @@ export class UserComponent extends EntityComponent<User> {
|
|||||||
email: [entity ? entity.email : '', [Validators.required, Validators.email]],
|
email: [entity ? entity.email : '', [Validators.required, Validators.email]],
|
||||||
firstName: [entity ? entity.firstName : ''],
|
firstName: [entity ? entity.firstName : ''],
|
||||||
lastName: [entity ? entity.lastName : ''],
|
lastName: [entity ? entity.lastName : ''],
|
||||||
|
phone: [entity ? entity.phone : ''],
|
||||||
additionalInfo: this.fb.group(
|
additionalInfo: this.fb.group(
|
||||||
{
|
{
|
||||||
description: [entity && entity.additionalInfo ? entity.additionalInfo.description : ''],
|
description: [entity && entity.additionalInfo ? entity.additionalInfo.description : ''],
|
||||||
@ -91,6 +92,7 @@ export class UserComponent extends EntityComponent<User> {
|
|||||||
this.entityForm.patchValue({email: entity.email});
|
this.entityForm.patchValue({email: entity.email});
|
||||||
this.entityForm.patchValue({firstName: entity.firstName});
|
this.entityForm.patchValue({firstName: entity.firstName});
|
||||||
this.entityForm.patchValue({lastName: entity.lastName});
|
this.entityForm.patchValue({lastName: entity.lastName});
|
||||||
|
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:
|
this.entityForm.patchValue({additionalInfo:
|
||||||
{defaultDashboardId: entity.additionalInfo ? entity.additionalInfo.defaultDashboardId : null}});
|
{defaultDashboardId: entity.additionalInfo ? entity.additionalInfo.defaultDashboardId : null}});
|
||||||
@ -112,7 +114,7 @@ export class UserComponent extends EntityComponent<User> {
|
|||||||
verticalPosition: 'bottom',
|
verticalPosition: 'bottom',
|
||||||
horizontalPosition: 'right'
|
horizontalPosition: 'right'
|
||||||
}
|
}
|
||||||
))
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -24,6 +24,7 @@ export interface User extends BaseData<UserId> {
|
|||||||
tenantId: TenantId;
|
tenantId: TenantId;
|
||||||
customerId: CustomerId;
|
customerId: CustomerId;
|
||||||
email: string;
|
email: string;
|
||||||
|
phone: string;
|
||||||
authority: Authority;
|
authority: Authority;
|
||||||
firstName: string;
|
firstName: string;
|
||||||
lastName: string;
|
lastName: string;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user