From ed6c8cc413ee9a3f828a986febac2a892d6e10cb Mon Sep 17 00:00:00 2001 From: eneller Date: Thu, 23 Jul 2026 18:49:44 +0200 Subject: [PATCH] feat(client): show real data --- .../screen-profile/screen-profile.html | 10 ++-- .../screens/screen-profile/screen-profile.ts | 3 - .../screen-receive/screen-receive.html | 2 +- .../screens/screen-receive/screen-receive.ts | 2 +- .../app/screens/screen-send/screen-send.ts | 2 +- client/src/app/services/api.ts | 17 ++++-- server/src/messages/Login.ts | 2 +- server/src/messages/Send.ts | 1 + server/src/messages/Transactions.ts | 1 + server/src/model/user.ts | 55 +++++++++++++------ server/src/routes/auth.ts | 6 +- server/src/routes/send.ts | 16 +++++- 12 files changed, 77 insertions(+), 40 deletions(-) diff --git a/client/src/app/screens/screen-profile/screen-profile.html b/client/src/app/screens/screen-profile/screen-profile.html index 7391daa..fc0c97f 100644 --- a/client/src/app/screens/screen-profile/screen-profile.html +++ b/client/src/app/screens/screen-profile/screen-profile.html @@ -5,11 +5,11 @@
-

{{ username }}

-

{{ this.api.currentUser }}

+

{{ this.api.currentUser.displayName }}

+

{{ this.api.currentUser.id }}

-

{{ balance | currency}}

+

{{ this.api.currentUser.balance | currency}}

@@ -31,7 +31,7 @@
- @if (transaction.receiverID == this.api.currentUser) { + @if (transaction.receiverID == this.api.currentUser.id) {
{{ transaction.senderID }}
}@else {
{{ transaction.receiverID }}
@@ -40,7 +40,7 @@
- @if (transaction.receiverID == this.api.currentUser) { + @if (transaction.receiverID == this.api.currentUser.id) {
{{ 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 4483e3d..744eaae 100644 --- a/client/src/app/screens/screen-profile/screen-profile.ts +++ b/client/src/app/screens/screen-profile/screen-profile.ts @@ -11,9 +11,6 @@ import { Router } from '@angular/router'; styleUrl: './screen-profile.less', }) export class ScreenProfile implements OnInit{ - // TODO display real data - username = 'John Doe'; - balance = 200; transactions = signal([]) constructor( diff --git a/client/src/app/screens/screen-receive/screen-receive.html b/client/src/app/screens/screen-receive/screen-receive.html index 201925a..f1fd70a 100644 --- a/client/src/app/screens/screen-receive/screen-receive.html +++ b/client/src/app/screens/screen-receive/screen-receive.html @@ -40,7 +40,7 @@