Merge remote-tracking branch 'origin/main'

This commit is contained in:
Administrator 2022-04-06 12:34:22 +02:00
commit 60deb927b0
4 changed files with 41 additions and 12 deletions

View File

@ -6,29 +6,37 @@
<div class="vertical-center">Aktienübersicht</div>
</div>
<mat-card class="placeholder">
<div class="stockTable">
<table mat-table [dataSource]="dataSourceTransactions">
<div class="stockTableLHS">
<table mat-table [dataSource]="dataSourceStocks">
<!--- Note that these columns can be defined in any order.
The actual rendered columns are set as a property on the row definition" -->
<!-- Position Column -->
<!-- Symbol Column -->
<ng-container matColumnDef="position">
<th mat-header-cell *matHeaderCellDef>Symbol</th>
<td mat-cell *matCellDef="let element">{{ element.symbol }}</td>
</ng-container>
<!-- Name Column -->
<!-- Count Column -->
<ng-container matColumnDef="name">
<th mat-header-cell *matHeaderCellDef>Count</th>
<td mat-cell *matCellDef="let element">{{ element.count }}</td>
</ng-container>
<!-- Weight Column -->
<!-- Time Column -->
<ng-container matColumnDef="weight">
<th mat-header-cell *matHeaderCellDef>Time</th>
<td mat-cell *matCellDef="let element">{{ element.time }}</td>
</ng-container>
<!-- Time Column -->
<ng-container matColumnDef="current-price">
<th mat-header-cell *matHeaderCellDef>Current Price</th>
<td mat-cell *matCellDef="let element">
{{ element.currentPrice }}
</td>
</ng-container>
<tr mat-header-row *matHeaderRowDef="displayedColumnsStocks"></tr>
<tr
mat-row
@ -45,12 +53,12 @@
<div class="heading fix-right-side">
<div class="vertical-center">Depotübersicht</div>
</div>
<mat-card class="placeholder"></mat-card>
<mat-card class="placeholderRHS"></mat-card>
</div>
</mat-grid-tile>
<!-- Transaktions -->
<mat-grid-tile colspan="1" rowspan="1" class="right-side">
<div class="depotOverview">
<div class="depotOverviewDown">
<div class="heading fix-right-side">
<div class="vertical-center">Transaktionen</div>
<span class="spacer"></span>
@ -64,7 +72,7 @@
<mat-icon>add</mat-icon>
</button>
</div>
<mat-card class="placeholder"
<mat-card class="placeholderRHS"
><div class="stockTable">
<table mat-table [dataSource]="dataSourceTransactions">
<!--- Note that these columns can be defined in any order.

View File

@ -15,12 +15,25 @@
margin-right: 10%;
}
.depotOverviewDown {
height: 100%;
width: 100%;
margin-left: 5%;
margin-right: 10%;
}
.stockTable {
overflow: auto;
height: 100%;
width: 100%;
}
.stockTableLHS {
overflow: auto;
height: 83%;
width: 100%;
}
.heading {
font-size: xx-large;
height: 10%;
@ -63,6 +76,10 @@ table {
height: 100%;
}
.placeholderRHS {
height: 80%;
}
side-heading {
display: inline;
}

View File

@ -12,7 +12,7 @@ export interface PeriodicElement {
export interface Stock {
count: number;
// price: number;
currentPrice: number;
symbol: string;
time: string;
}
@ -53,6 +53,7 @@ export class DashboardComponent implements OnInit {
for (let i = 0; i < data.data.length; i++) {
STOCK_DATA.push({
count: data.data[i].count,
currentPrice: data.data[i].current_price,
symbol: data.data[i].symbol,
time: data.data[i].last_transaction,
});
@ -86,7 +87,6 @@ export class DashboardComponent implements OnInit {
openDialog(): void {
const dialogRef = this.dialog.open(UserDialogComponent, {
width: '50vw',
height: '55vh',
data: {
symbol: this.symbol,
time: this.time,
@ -101,6 +101,11 @@ export class DashboardComponent implements OnInit {
}
displayedColumns: string[] = ['weight', 'position', 'name', 'symbol'];
displayedColumnsStocks: string[] = ['position', 'name', 'weight'];
displayedColumnsStocks: string[] = [
'position',
'name',
'weight',
'current-price',
];
dataSource = ELEMENT_DATA;
}

View File

@ -1 +0,0 @@