Browse Source

Migrate transaction table

pull/58/head
Thomas 4 years ago
parent
commit
ed74e69047
  1. 6
      apps/api/src/app/order/order.controller.ts
  2. 24
      apps/client/src/app/components/transactions-table/transactions-table.component.html
  3. 2
      apps/client/src/app/components/transactions-table/transactions-table.component.ts

6
apps/api/src/app/order/order.controller.ts

@ -71,7 +71,11 @@ export class OrderController {
let orders = await this.orderService.orders({
include: {
Platform: true
Account: {
include: {
Platform: true
}
}
},
orderBy: { date: 'desc' },
where: { userId: impersonationUserId || this.request.user.id }

24
apps/client/src/app/components/transactions-table/transactions-table.component.html

@ -17,25 +17,21 @@
mat-table
[dataSource]="dataSource"
>
<ng-container matColumnDef="platform">
<th
*matHeaderCellDef
class="d-none d-lg-table-cell text-center px-0"
i18n
mat-header-cell
>
Platform
</th>
<td *matCellDef="let element" class="d-none d-lg-table-cell px-0" mat-cell>
<div class="d-flex justify-content-center">
<ng-container matColumnDef="account">
<th *matHeaderCellDef i18n mat-header-cell mat-sort-header>Account</th>
<td *matCellDef="let element" mat-cell>
<div class="d-flex">
<gf-symbol-icon
*ngIf="element.Platform?.url"
[tooltip]="element.Platform?.name"
[url]="element.Platform?.url"
*ngIf="element.Account?.Platform?.url"
class="mr-2"
[tooltip]="element.Account?.Platform?.name"
[url]="element.Account?.Platform?.url"
></gf-symbol-icon>
<span class="d-none d-lg-block">{{ element.Account?.name }}</span>
</div>
</td>
</ng-container>
<ng-container matColumnDef="date">
<th
*matHeaderCellDef

2
apps/client/src/app/components/transactions-table/transactions-table.component.ts

@ -68,7 +68,7 @@ export class TransactionsTableComponent
public ngOnChanges() {
this.displayedColumns = [
'platform',
'account',
'date',
'type',
'symbol',

Loading…
Cancel
Save