Skip to content

Open Source Wealth Management Software. Angular + NestJS + Prisma + Nx + TypeScript 🤍

Feature/add currency suffix to emergency fund dialog (#7969)

Thomas Kaulcce3f7bdc4a3
diff --git a/CHANGELOG.md b/CHANGELOG.md
index d90f853cd0..1e3529e9e6 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -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
diff --git a/apps/client/src/app/components/portfolio-summary/portfolio-summary.component.ts b/apps/client/src/app/components/portfolio-summary/portfolio-summary.component.ts
index 23e32a0c9c..feedddacae 100644
--- a/apps/client/src/app/components/portfolio-summary/portfolio-summary.component.ts
+++ b/apps/client/src/app/components/portfolio-summary/portfolio-summary.component.ts
@@ -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
});
}
diff --git a/libs/ui/src/lib/notifications/interfaces/interfaces.ts b/libs/ui/src/lib/notifications/interfaces/interfaces.ts
index dcea7d53c9..a9e065d83d 100644
--- a/libs/ui/src/lib/notifications/interfaces/interfaces.ts
+++ b/libs/ui/src/lib/notifications/interfaces/interfaces.ts
@@ -26,4 +26,5 @@ export interface PromptParams {
discardLabel?: string;
title: string;
valueLabel?: string;
+ valueSuffix?: string;
}
diff --git a/libs/ui/src/lib/notifications/notification.service.ts b/libs/ui/src/lib/notifications/notification.service.ts
index b0758b5763..4eb1cbd54d 100644
--- a/libs/ui/src/lib/notifications/notification.service.ts
+++ b/libs/ui/src/lib/notifications/notification.service.ts
@@ -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) => {
diff --git a/libs/ui/src/lib/notifications/prompt-dialog/interfaces/interfaces.ts b/libs/ui/src/lib/notifications/prompt-dialog/interfaces/interfaces.ts
index 607577dfa0..d3dcccf596 100644
--- a/libs/ui/src/lib/notifications/prompt-dialog/interfaces/interfaces.ts
+++ b/libs/ui/src/lib/notifications/prompt-dialog/interfaces/interfaces.ts
@@ -4,4 +4,5 @@ export interface PromptDialogParams {
discardLabel: string;
title: string;
valueLabel?: string;
+ valueSuffix?: string;
}
diff --git a/libs/ui/src/lib/notifications/prompt-dialog/prompt-dialog.component.ts b/libs/ui/src/lib/notifications/prompt-dialog/prompt-dialog.component.ts
index e9750c3f52..e74056401c 100644
--- a/libs/ui/src/lib/notifications/prompt-dialog/prompt-dialog.component.ts
+++ b/libs/ui/src/lib/notifications/prompt-dialog/prompt-dialog.component.ts
@@ -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;
}
}
diff --git a/libs/ui/src/lib/notifications/prompt-dialog/prompt-dialog.html b/libs/ui/src/lib/notifications/prompt-dialog/prompt-dialog.html
index d73c8dabb5..0b39f22e17 100644
--- a/libs/ui/src/lib/notifications/prompt-dialog/prompt-dialog.html
+++ b/libs/ui/src/lib/notifications/prompt-dialog/prompt-dialog.html
@@ -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>