diff --git a/client/src/app/screens/screen-profile/screen-profile.html b/client/src/app/screens/screen-profile/screen-profile.html index 7eb931c..ee40f38 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 }}

-

{{ userID }}

+

{{ this.api.currentUser }}

{{ balance | currency}}

@@ -31,7 +31,7 @@
- @if (transaction.receiverID == userID) { + @if (transaction.receiverID == this.api.currentUser) {
{{ transaction.senderID }}
}@else {
{{ transaction.receiverID }}
@@ -40,7 +40,7 @@
- @if (transaction.receiverID == userID) { + @if (transaction.receiverID == this.api.currentUser) {
{{ 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 f16a718..c1ca96c 100644 --- a/client/src/app/screens/screen-profile/screen-profile.ts +++ b/client/src/app/screens/screen-profile/screen-profile.ts @@ -1,5 +1,5 @@ import { CommonModule, CurrencyPipe, DatePipe } from '@angular/common'; -import { Component, OnInit } from '@angular/core'; +import { Component, inject, OnInit } from '@angular/core'; import { APIService } from '../../services/api'; import Transaction from '@model/transaction'; import { Router } from '@angular/router'; @@ -13,12 +13,11 @@ import { Router } from '@angular/router'; export class ScreenProfile implements OnInit{ // TODO display real data username = 'John Doe'; - userID = 'testuser'; balance = 200; transactions!: Transaction[]; constructor( - private api: APIService, + protected api: APIService, private router: Router, ){} diff --git a/client/src/app/screens/screen-receive/screen-receive.html b/client/src/app/screens/screen-receive/screen-receive.html index 9b5df88..201925a 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 @@