Open Source Wealth Management Software. Angular + NestJS + Prisma + Nx + TypeScript 🤍
TypeScript angularetffinancefintechghostfoliohacktoberfestinvestingnestjsosspersonal-financeportfolioprismasoftwarestocktrackertradingtypescriptwealth-managementweb
Task/prefill form with current cash balance value in account details dialog (#6998)
David Requeno449eaa1baa67
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex ef50d292fc..07002a2d12 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).+## Unreleased++### Changed++- Prefilled the form in the account balance management with the current cash balance+## 3.8.0 - 2026-06-07### Addeddiff --git a/apps/client/src/app/components/account-detail-dialog/account-detail-dialog.html b/apps/client/src/app/components/account-detail-dialog/account-detail-dialog.htmlindex cd397e35ee..4b652db96c 100644--- a/apps/client/src/app/components/account-detail-dialog/account-detail-dialog.html+++ b/apps/client/src/app/components/account-detail-dialog/account-detail-dialog.html@@ -148,6 +148,7 @@[accountBalances]="accountBalances"[accountCurrency]="currency"[accountId]="data.accountId"+ [currentBalance]="balance"[locale]="user?.settings?.locale"[showActions]="!data.hasImpersonationId &&diff --git a/libs/ui/src/lib/account-balances/account-balances.component.ts b/libs/ui/src/lib/account-balances/account-balances.component.tsindex 7b26263b01..503f840715 100644--- a/libs/ui/src/lib/account-balances/account-balances.component.ts+++ b/libs/ui/src/lib/account-balances/account-balances.component.ts@@ -13,6 +13,7 @@ import {OnChanges,OnInit,Output,+ effect,inject,input,viewChild@@ -70,6 +71,7 @@ export class GfAccountBalancesComponent implements OnChanges, OnInit {input.required<AccountBalancesResponse['balances']>();public readonly accountCurrency = input.required<string>();public readonly accountId = input.required<string>();+ public readonly currentBalance = input<number | null>();public readonly displayedColumns: string[] = ['date', 'value', 'actions'];public readonly locale = input(getLocale());public readonly showActions = input(true);@@ -89,6 +91,17 @@ export class GfAccountBalancesComponent implements OnChanges, OnInit {public constructor() {addIcons({ calendarClearOutline, ellipsisHorizontal, trashOutline });++ effect(() => {+ const currentBalance = this.currentBalance();++ if (+ this.accountBalanceForm.controls.balance.pristine &&+ typeof currentBalance === 'number'+ ) {+ this.accountBalanceForm.controls.balance.setValue(currentBalance);+ }+ });}public ngOnInit() {