From 87d6158647bf415c4fab0af0c55b14318ea27404 Mon Sep 17 00:00:00 2001 From: amentis Date: Wed, 15 May 2024 13:22:17 +0300 Subject: [PATCH] user profile reload page after save --- .../src/app/ui/user-profile/user-profile.component.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/dmp-frontend/src/app/ui/user-profile/user-profile.component.ts b/dmp-frontend/src/app/ui/user-profile/user-profile.component.ts index f67df945d..5179089e0 100644 --- a/dmp-frontend/src/app/ui/user-profile/user-profile.component.ts +++ b/dmp-frontend/src/app/ui/user-profile/user-profile.component.ts @@ -249,21 +249,20 @@ export class UserProfileComponent extends BaseComponent implements OnInit, OnDes return; } const formData = this.formService.getValue(this.formGroup.value) as UserPersist; - formData.additionalInfo.organization.typeId = Guid.parse(this.referenceTypeService.getOrganizationReferenceType()); + if (formData.additionalInfo.organization) formData.additionalInfo.organization.typeId = Guid.parse(this.referenceTypeService.getOrganizationReferenceType()); this.userService.persist(formData) .pipe(takeUntil(this._destroyed)) .subscribe( x => { this.editMode = false; this.languageService.changeLanguage(this.formGroup.get('additionalInfo').get('language').value); - this.getOrRefreshData(); this.authService.refresh() .pipe(takeUntil(this._destroyed)) .subscribe(result => { this.uiNotificationService.snackBarNotification(this.language.instant('GENERAL.SNACK-BAR.SUCCESSFUL-UPDATE'), SnackBarNotificationLevel.Success); - this.router.navigate(['/profile']); + // this.router.navigate(['/profile']); + window.location.reload(); }); - // .subscribe(result => window.location.reload()); }, error => this.onCallbackError(error)); }