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

View File

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

View File

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

View File

@ -1 +0,0 @@