Browse Source
Feature/add currency suffix to emergency fund dialog (#7969)
* Add currency suffix to emergency fund dialog
* Update changelog
pull/7971/head
Thomas Kaul
1 week ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with
14 additions and
3 deletions
-
CHANGELOG.md
-
apps/client/src/app/components/portfolio-summary/portfolio-summary.component.ts
-
libs/ui/src/lib/notifications/interfaces/interfaces.ts
-
libs/ui/src/lib/notifications/notification.service.ts
-
libs/ui/src/lib/notifications/prompt-dialog/interfaces/interfaces.ts
-
libs/ui/src/lib/notifications/prompt-dialog/prompt-dialog.component.ts
-
libs/ui/src/lib/notifications/prompt-dialog/prompt-dialog.html
|
|
|
@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 |
|
|
|
|
|
|
|
### Changed |
|
|
|
|
|
|
|
- Extended the emergency fund dialog in the portfolio summary to include the currency suffix |
|
|
|
- Migrated the client to the code generated by the new `prisma-client` generator of _Prisma_ |
|
|
|
|
|
|
|
## 3.75.0 - 2026-09-28 |
|
|
|
|
|
|
|
@ -201,7 +201,8 @@ export class GfPortfolioSummaryComponent implements OnChanges { |
|
|
|
}, |
|
|
|
confirmLabel: $localize`Save`, |
|
|
|
defaultValue: this.summary.emergencyFund?.total?.toString() ?? '0', |
|
|
|
title: $localize`Please set the amount of your emergency fund.` |
|
|
|
title: $localize`Please set the amount of your emergency fund.`, |
|
|
|
valueSuffix: this.baseCurrency |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@ -26,4 +26,5 @@ export interface PromptParams { |
|
|
|
discardLabel?: string; |
|
|
|
title: string; |
|
|
|
valueLabel?: string; |
|
|
|
valueSuffix?: string; |
|
|
|
} |
|
|
|
|
|
|
|
@ -87,7 +87,8 @@ export class NotificationService { |
|
|
|
defaultValue: aParams.defaultValue, |
|
|
|
discardLabel: aParams.discardLabel, |
|
|
|
title: aParams.title, |
|
|
|
valueLabel: aParams.valueLabel |
|
|
|
valueLabel: aParams.valueLabel, |
|
|
|
valueSuffix: aParams.valueSuffix |
|
|
|
}); |
|
|
|
|
|
|
|
return dialog.afterClosed().subscribe((result: string) => { |
|
|
|
|
|
|
|
@ -4,4 +4,5 @@ export interface PromptDialogParams { |
|
|
|
discardLabel: string; |
|
|
|
title: string; |
|
|
|
valueLabel?: string; |
|
|
|
valueSuffix?: string; |
|
|
|
} |
|
|
|
|
|
|
|
@ -26,6 +26,7 @@ export class GfPromptDialogComponent { |
|
|
|
public formControl = new FormControl(''); |
|
|
|
public title: string; |
|
|
|
public valueLabel?: string; |
|
|
|
public valueSuffix?: string; |
|
|
|
|
|
|
|
protected readonly dialogRef = |
|
|
|
inject<MatDialogRef<GfPromptDialogComponent>>(MatDialogRef); |
|
|
|
@ -35,7 +36,8 @@ export class GfPromptDialogComponent { |
|
|
|
defaultValue, |
|
|
|
discardLabel, |
|
|
|
title, |
|
|
|
valueLabel |
|
|
|
valueLabel, |
|
|
|
valueSuffix |
|
|
|
}: PromptDialogParams) { |
|
|
|
this.confirmLabel = confirmLabel; |
|
|
|
this.defaultValue = defaultValue; |
|
|
|
@ -43,5 +45,6 @@ export class GfPromptDialogComponent { |
|
|
|
this.formControl.setValue(defaultValue ?? null); |
|
|
|
this.title = title; |
|
|
|
this.valueLabel = valueLabel; |
|
|
|
this.valueSuffix = valueSuffix; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
@ -8,6 +8,9 @@ |
|
|
|
<mat-label>{{ valueLabel }}</mat-label> |
|
|
|
} |
|
|
|
<input matInput [formControl]="formControl" /> |
|
|
|
@if (valueSuffix) { |
|
|
|
<span class="ml-2" matTextSuffix>{{ valueSuffix }}</span> |
|
|
|
} |
|
|
|
</mat-form-field> |
|
|
|
</div> |
|
|
|
|
|
|
|
|