From 3b885c656e003aafdcd33d2504b5373802d6fcfc Mon Sep 17 00:00:00 2001 From: Thomas Kaul <4159106+dtslvr@users.noreply.github.com> Date: Thu, 6 Aug 2026 08:59:54 +0200 Subject: [PATCH] Add platform logo to account selectors --- .../transfer-balance-dialog.component.ts | 22 +++++++++++++-- .../transfer-balance-dialog.html | 28 +++++++++++++++++++ 2 files changed, 47 insertions(+), 3 deletions(-) diff --git a/apps/client/src/app/pages/accounts/transfer-balance/transfer-balance-dialog.component.ts b/apps/client/src/app/pages/accounts/transfer-balance/transfer-balance-dialog.component.ts index cbf0e460d5..1682874dc7 100644 --- a/apps/client/src/app/pages/accounts/transfer-balance/transfer-balance-dialog.component.ts +++ b/apps/client/src/app/pages/accounts/transfer-balance/transfer-balance-dialog.component.ts @@ -61,12 +61,22 @@ export class GfTransferBalanceDialogComponent { private readonly dialogRef = inject>(MatDialogRef); + protected get selectedFromAccount() { + return this.getAccountById( + this.transferBalanceForm.controls.fromAccount.value + ); + } + + protected get selectedToAccount() { + return this.getAccountById( + this.transferBalanceForm.controls.toAccount.value + ); + } + public ngOnInit() { this.transferBalanceForm.controls.fromAccount.valueChanges.subscribe( (id) => { - const currency = this.accounts.find((account) => { - return account.id === id; - })?.currency; + const currency = this.getAccountById(id)?.currency; if (currency) { this.currency = currency; @@ -101,4 +111,10 @@ export class GfTransferBalanceDialogComponent { return null; } + + private getAccountById(aId: string | null) { + return this.accounts.find(({ id }) => { + return id === aId; + }); + } } diff --git a/apps/client/src/app/pages/accounts/transfer-balance/transfer-balance-dialog.html b/apps/client/src/app/pages/accounts/transfer-balance/transfer-balance-dialog.html index 2f74bfbe72..941c9485a7 100644 --- a/apps/client/src/app/pages/accounts/transfer-balance/transfer-balance-dialog.html +++ b/apps/client/src/app/pages/accounts/transfer-balance/transfer-balance-dialog.html @@ -10,6 +10,20 @@ From + +
+ @if (selectedFromAccount) { + + } + {{ selectedFromAccount?.name }} +
+
+ @for (account of accounts; track account) {
@@ -30,6 +44,20 @@ To + +
+ @if (selectedToAccount) { + + } + {{ selectedToAccount?.name }} +
+
+ @for (account of accounts; track account) {