diff --git a/frontend/src/app/Views/dashboard/dashboard.component.html b/frontend/src/app/Views/dashboard/dashboard.component.html
index db59f2b..4c3fb73 100644
--- a/frontend/src/app/Views/dashboard/dashboard.component.html
+++ b/frontend/src/app/Views/dashboard/dashboard.component.html
@@ -33,7 +33,7 @@
Price |
- {{ element.current_price }}$
+ {{ element.current_price }}€
|
@@ -84,18 +84,18 @@
savings{{ depotCurrentValue.toFixed(2) }}$
+ >{{ depotCurrentValue.toFixed(2) }}€
paid{{ depotCost.toFixed(2) }}$
+ >{{ depotCost.toFixed(2) }}€
account_balance= 0, red: profit < 0 }"
- >{{ profit.toFixed(2) }}${{ profit.toFixed(2) }}€
diff --git a/frontend/src/app/Views/dashboard/dashboard.component.ts b/frontend/src/app/Views/dashboard/dashboard.component.ts
index 23d514d..449e21e 100644
--- a/frontend/src/app/Views/dashboard/dashboard.component.ts
+++ b/frontend/src/app/Views/dashboard/dashboard.component.ts
@@ -63,8 +63,6 @@ export class DashboardComponent implements OnInit {
});
}
this.dataSourceTransactions = TRANSACTION_DATA;
- //TODO move to helper service
-
this.profit = this.depotCurrentValue - this.depotCost;
});
}
@@ -78,7 +76,8 @@ export class DashboardComponent implements OnInit {
console.log(data);
this.depotCurrentValue = 0;
for (let i = 0; i < data.data.length; i++) {
- this.depotCurrentValue = data.data[i].current_price;
+ this.depotCurrentValue +=
+ data.data[i].current_price * data.data[i].count;
STOCK_DATA.push({
count: data.data[i].count,
comment: data.data[i].comment,
diff --git a/frontend/src/app/Views/dashboard/user-dialog/user-dialog.component.html b/frontend/src/app/Views/dashboard/user-dialog/user-dialog.component.html
index 460d431..c3e31ee 100644
--- a/frontend/src/app/Views/dashboard/user-dialog/user-dialog.component.html
+++ b/frontend/src/app/Views/dashboard/user-dialog/user-dialog.component.html
@@ -20,7 +20,7 @@
/>
-
+
@@ -61,7 +61,7 @@
-
+