RED-3176: Fixed missing email in update profile request

This commit is contained in:
Adina Țeudan 2022-01-13 13:06:11 +02:00
parent 78b24df8d7
commit 4ddd346f90

View File

@ -40,15 +40,6 @@ export class UserProfileScreenComponent implements OnInit {
);
}
private _getForm(): FormGroup {
return this._formBuilder.group({
email: [undefined, [Validators.required, Validators.email]],
firstName: [undefined],
lastName: [undefined],
language: [undefined],
});
}
get languageChanged(): boolean {
return this._profileModel['language'] !== this.form.get('language').value;
}
@ -82,7 +73,7 @@ export class UserProfileScreenComponent implements OnInit {
}
if (this.profileChanged) {
const value = this.form.value as IProfile;
const value = this.form.getRawValue() as IProfile;
delete value.language;
await this._userService
@ -98,6 +89,15 @@ export class UserProfileScreenComponent implements OnInit {
this._initializeForm();
}
private _getForm(): FormGroup {
return this._formBuilder.group({
email: [undefined, [Validators.required, Validators.email]],
firstName: [undefined],
lastName: [undefined],
language: [undefined],
});
}
private _initializeForm(): void {
try {
this._profileModel = {