From 0de9e41d0d888843debdb57bf49db9b64166ddab Mon Sep 17 00:00:00 2001 From: mutugiii Date: Mon, 6 Jan 2025 20:54:45 +0300 Subject: [PATCH] Handle isLoading logic --- .../users-achievements-update.component.html | 8 +++----- .../users-achievements-update.component.ts | 3 --- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/src/app/users/users-achievements/users-achievements-update.component.html b/src/app/users/users-achievements/users-achievements-update.component.html index 3651c0305c..7147bde432 100644 --- a/src/app/users/users-achievements/users-achievements-update.component.html +++ b/src/app/users/users-achievements/users-achievements-update.component.html @@ -1,9 +1,7 @@ - - - Add Achievements - Edit Achievements - + + Add Achievements + Edit Achievements
diff --git a/src/app/users/users-achievements/users-achievements-update.component.ts b/src/app/users/users-achievements/users-achievements-update.component.ts index 2c05bf1ca4..0b6c8fd501 100644 --- a/src/app/users/users-achievements/users-achievements-update.component.ts +++ b/src/app/users/users-achievements/users-achievements-update.component.ts @@ -25,7 +25,6 @@ export class UsersAchievementsUpdateComponent implements OnInit, OnDestroy { docInfo = { '_id': this.user._id + '@' + this.configuration.code, '_rev': undefined }; readonly dbName = 'achievements'; achievementNotFound = false; - isLoading = true; editForm: FormGroup; profileForm: FormGroup; private onDestroy$ = new Subject(); @@ -64,7 +63,6 @@ export class UsersAchievementsUpdateComponent implements OnInit, OnDestroy { catchError(() => this.usersAchievementsService.getAchievements(this.user._id)) ) .subscribe((achievements) => { - this.isLoading = false; this.editForm.patchValue(achievements); this.editForm.controls.achievements = this.fb.array(achievements.achievements || []); this.editForm.controls.references = this.fb.array(achievements.references || []); @@ -78,7 +76,6 @@ export class UsersAchievementsUpdateComponent implements OnInit, OnDestroy { }, (error) => { console.log(error); this.achievementNotFound = true; - this.isLoading = false; }); this.planetStepListService.stepMoveClick$.pipe(takeUntil(this.onDestroy$)).subscribe(