@@ -30,7 +30,7 @@
-
diff --git a/apps/red-ui/src/app/modules/account/screens/user-profile/user-profile-screen/user-profile-screen.component.ts b/apps/red-ui/src/app/modules/account/screens/user-profile/user-profile-screen/user-profile-screen.component.ts
index 8b6770493..8c3d896bf 100644
--- a/apps/red-ui/src/app/modules/account/screens/user-profile/user-profile-screen/user-profile-screen.component.ts
+++ b/apps/red-ui/src/app/modules/account/screens/user-profile/user-profile-screen/user-profile-screen.component.ts
@@ -17,7 +17,7 @@ import { LanguageService } from '../../../../../i18n/language.service';
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class UserProfileScreenComponent implements OnInit {
- readonly formGroup: FormGroup = this._getForm();
+ readonly form: FormGroup = this._getForm();
changePasswordUrl: SafeResourceUrl;
translations = languagesTranslations;
@@ -50,16 +50,15 @@ export class UserProfileScreenComponent implements OnInit {
}
get languageChanged(): boolean {
- console.log('plm');
- return this._profileModel['language'] !== this.formGroup.get('language').value;
+ return this._profileModel['language'] !== this.form.get('language').value;
}
get profileChanged(): boolean {
- const keys = Object.keys(this.formGroup.getRawValue());
+ const keys = Object.keys(this.form.getRawValue());
keys.splice(keys.indexOf('language'), 1);
for (const key of keys) {
- if (this._profileModel[key] !== this.formGroup.get(key).value) {
+ if (this._profileModel[key] !== this.form.get(key).value) {
return true;
}
}
@@ -79,11 +78,11 @@ export class UserProfileScreenComponent implements OnInit {
this._loadingService.start();
if (this.languageChanged) {
- await this._languageService.changeLanguage(this.formGroup.get('language').value);
+ await this._languageService.changeLanguage(this.form.get('language').value);
}
if (this.profileChanged) {
- const value = this.formGroup.value as IProfile;
+ const value = this.form.value as IProfile;
delete value.language;
await this._userService
@@ -109,9 +108,9 @@ export class UserProfileScreenComponent implements OnInit {
};
if (this._userService.currentUser.email) {
// disable email if it's already set
- this.formGroup.get('email').disable();
+ this.form.get('email').disable();
}
- this.formGroup.patchValue(this._profileModel, { emitEvent: false });
+ this.form.patchValue(this._profileModel, { emitEvent: false });
} catch (e) {
} finally {
this._loadingService.stop();