commit
e2e9ff9735
@ -25,7 +25,7 @@
|
||||
|
||||
<!-- Time Column -->
|
||||
<ng-container matColumnDef="isin">
|
||||
<th mat-header-cell *matHeaderCellDef>ISIN</th>
|
||||
<th mat-header-cell *matHeaderCellDef>ISIN/Symbol</th>
|
||||
<td mat-cell *matCellDef="let element">{{ element.isin }}</td>
|
||||
</ng-container>
|
||||
|
||||
|
@ -53,7 +53,7 @@ export class DashboardComponent implements OnInit {
|
||||
var data = JSON.parse(response);
|
||||
this.depotCost = 0;
|
||||
for (let i = 0; i < data.data.length; i++) {
|
||||
this.depotCost += data.data[i].price;
|
||||
this.depotCost += data.data[i].price * data.data[i].count;
|
||||
TRANSACTION_DATA.push({
|
||||
comment: data.data[i].comment,
|
||||
isin: data.data[i].isin,
|
||||
@ -98,7 +98,7 @@ export class DashboardComponent implements OnInit {
|
||||
var data = JSON.parse(response);
|
||||
this.depotCost = 0;
|
||||
for (let i = 0; i < data.data.length; i++) {
|
||||
this.depotCost += data.data[i].price;
|
||||
this.depotCost += data.data[i].price * data.data[i].count;
|
||||
TRANSACTION_DATA.push({
|
||||
comment: data.data[i].comment,
|
||||
isin: data.data[i].isin,
|
||||
|
@ -45,7 +45,7 @@
|
||||
/>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="count">Count</label>
|
||||
<label for="count">Count (negative for sale/positiv for buy)</label>
|
||||
<input
|
||||
type="number"
|
||||
class="form-control"
|
||||
@ -61,7 +61,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="price">Price in €</label>
|
||||
<label for="price">Price in € per share</label>
|
||||
<input
|
||||
class="form-control"
|
||||
name="price"
|
||||
|
@ -26,10 +26,10 @@ export class UserDialogComponent {
|
||||
priceValid = true;
|
||||
|
||||
onSubmit() {
|
||||
console.log(!isNaN(this.data.count));
|
||||
if (!isNaN(this.data.count) && !isNaN(this.data.price)) {
|
||||
this.priceValid = true;
|
||||
this.countValid = true;
|
||||
console.log(this.data.price);
|
||||
console.log(
|
||||
this.dataService
|
||||
.createTransaction(
|
||||
|
@ -52,7 +52,10 @@ export class ProfileComponent implements OnInit {
|
||||
});
|
||||
}
|
||||
|
||||
onSubmit() {
|
||||
/**
|
||||
* Determines whether submit on
|
||||
*/
|
||||
onSubmit(): void {
|
||||
if (this.userId != '') {
|
||||
console.log(this.userId);
|
||||
this.profileService
|
||||
@ -63,6 +66,9 @@ export class ProfileComponent implements OnInit {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates user
|
||||
*/
|
||||
updateUser() {
|
||||
if (this.form.password === this.form.passwordRepeat) {
|
||||
this.checkPasswordFailed = false;
|
||||
@ -78,6 +84,10 @@ export class ProfileComponent implements OnInit {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Opens dialog
|
||||
* @param action
|
||||
*/
|
||||
openDialog(action: string) {
|
||||
const dialogRef = this.dialog.open(ConfirmationDialogComponent, {
|
||||
width: '50vw',
|
||||
@ -95,6 +105,9 @@ export class ProfileComponent implements OnInit {
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Opens help
|
||||
*/
|
||||
openHelp() {
|
||||
const dialogRef = this.dialog.open(HelpDialogComponent, {
|
||||
width: '50vw',
|
||||
|
Loading…
Reference in New Issue
Block a user