|
|
@ -18,6 +18,7 @@ import { |
|
|
import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; |
|
|
import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; |
|
|
import { MatCardModule } from '@angular/material/card'; |
|
|
import { MatCardModule } from '@angular/material/card'; |
|
|
import { DeviceDetectorService } from 'ngx-device-detector'; |
|
|
import { DeviceDetectorService } from 'ngx-device-detector'; |
|
|
|
|
|
import { switchMap } from 'rxjs'; |
|
|
|
|
|
|
|
|
@Component({ |
|
|
@Component({ |
|
|
changeDetection: ChangeDetectionStrategy.OnPush, |
|
|
changeDetection: ChangeDetectionStrategy.OnPush, |
|
|
@ -75,15 +76,13 @@ export class GfHomeSummaryComponent implements OnInit { |
|
|
protected onChangeEmergencyFund(emergencyFund: number) { |
|
|
protected onChangeEmergencyFund(emergencyFund: number) { |
|
|
this.dataService |
|
|
this.dataService |
|
|
.putUserSetting({ emergencyFund }) |
|
|
.putUserSetting({ emergencyFund }) |
|
|
.pipe(takeUntilDestroyed(this.destroyRef)) |
|
|
.pipe( |
|
|
.subscribe(() => { |
|
|
switchMap(() => this.userService.get(true)), |
|
|
this.userService |
|
|
takeUntilDestroyed(this.destroyRef) |
|
|
.get(true) |
|
|
) |
|
|
.pipe(takeUntilDestroyed(this.destroyRef)) |
|
|
|
|
|
.subscribe((user) => { |
|
|
.subscribe((user) => { |
|
|
this.user.set(user); |
|
|
this.user.set(user); |
|
|
}); |
|
|
}); |
|
|
}); |
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
private update() { |
|
|
private update() { |
|
|
|