From 308225f1904dabd5f03d3d68a10296beb4631079 Mon Sep 17 00:00:00 2001 From: eneller Date: Fri, 6 Mar 2026 19:34:38 +0100 Subject: [PATCH] fix: transactions display --- .../screens/screen-profile/screen-profile.html | 18 ++++++++++++++---- .../screens/screen-profile/screen-profile.ts | 2 +- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/client/src/app/screens/screen-profile/screen-profile.html b/client/src/app/screens/screen-profile/screen-profile.html index 71197f5..7f26032 100644 --- a/client/src/app/screens/screen-profile/screen-profile.html +++ b/client/src/app/screens/screen-profile/screen-profile.html @@ -6,7 +6,7 @@

{{ username }}

-

{{ email }}

+

{{ userID }}

@@ -27,14 +27,24 @@
+ @if (transaction.receiverID == userID) {
{{ transaction.senderID }}
+ }@else { +
{{ transaction.receiverID }}
+ } {{ transaction.date | date:'medium' }}
-
- {{ transaction.amount | currency }} -
+ @if (transaction.receiverID == userID) { +
+ {{ transaction.amount | currency }} +
+ }@else { +
+ {{ - transaction.amount | currency }} +
+ }
diff --git a/client/src/app/screens/screen-profile/screen-profile.ts b/client/src/app/screens/screen-profile/screen-profile.ts index 07b5bff..0c51175 100644 --- a/client/src/app/screens/screen-profile/screen-profile.ts +++ b/client/src/app/screens/screen-profile/screen-profile.ts @@ -11,7 +11,7 @@ import Transaction from '@model/transaction'; }) export class ScreenProfile implements OnInit{ username = 'John Doe'; - email = 'john.doe@example.com'; + userID = 'testuser'; transactions!: Transaction[]; constructor(private api: APIService){}