Browse Source

Feature/minor improvements in client (#3690)

* Improve view mode form control value change

* Clean up
pull/3694/head
Thomas Kaul 1 month ago
committed by GitHub
parent
commit
84d23764db
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 9
      apps/client/src/app/components/home-holdings/home-holdings.component.ts
  2. 18
      apps/client/src/app/components/home-overview/home-overview.component.ts

9
apps/client/src/app/components/home-holdings/home-holdings.component.ts

@ -98,6 +98,15 @@ export class HomeHoldingsComponent implements OnDestroy, OnInit {
.pipe(takeUntil(this.unsubscribeSubject))
.subscribe(() => {
this.userService.remove();
this.userService
.get()
.pipe(takeUntil(this.unsubscribeSubject))
.subscribe((user) => {
this.user = user;
this.changeDetectorRef.markForCheck();
});
});
});
}

18
apps/client/src/app/components/home-overview/home-overview.component.ts

@ -91,24 +91,6 @@ export class HomeOverviewComponent implements OnDestroy, OnInit {
});
}
public onChangeDateRange(dateRange: DateRange) {
this.dataService
.putUserSetting({ dateRange })
.pipe(takeUntil(this.unsubscribeSubject))
.subscribe(() => {
this.userService.remove();
this.userService
.get()
.pipe(takeUntil(this.unsubscribeSubject))
.subscribe((user) => {
this.user = user;
this.changeDetectorRef.markForCheck();
});
});
}
public ngOnDestroy() {
this.unsubscribeSubject.next();
this.unsubscribeSubject.complete();

Loading…
Cancel
Save