Add notification on save of stats-profile.

This commit is contained in:
Konstantinos Triantafyllou 2023-04-11 14:01:14 +03:00
parent 7b59267582
commit 9a5de31d58
1 changed files with 2 additions and 1 deletions

View File

@ -73,7 +73,7 @@ export class StatsProfilesComponent implements OnInit, OnDestroy {
} }
resetForm() { resetForm() {
this.statsProfilesForm =this.fb.array([]); this.statsProfilesForm = this.fb.array([]);
this.statsProfiles.forEach(statsProfile => { this.statsProfiles.forEach(statsProfile => {
this.statsProfilesForm.push(this.fb.group({ this.statsProfilesForm.push(this.fb.group({
_id: this.fb.control(statsProfile._id), _id: this.fb.control(statsProfile._id),
@ -114,6 +114,7 @@ export class StatsProfilesComponent implements OnInit, OnDestroy {
save() { save() {
this.loading = true; this.loading = true;
this.subscriptions.push(this.statsProfilesService.saveStatsProfiles(this.statsProfilesForm.getRawValue()).subscribe(statsProfiles => { this.subscriptions.push(this.statsProfilesService.saveStatsProfiles(this.statsProfilesForm.getRawValue()).subscribe(statsProfiles => {
NotificationHandler.rise('Stats Profiles have been successfully saved');
this.statsProfiles = statsProfiles; this.statsProfiles = statsProfiles;
this.resetForm(); this.resetForm();
this.loading = false; this.loading = false;